Stack overflow why cant i comment
I always tell my co-workers. I believe you meant, "never rely on the code". I'm sure the spec, design and requirements required a return code or true : — gbjbaanb. Things like this actually happen, people don't bother keeping documentation up to date with changes even if it's right above the function.
Trust me. Reminds me of a fellow who swore he could optimize a mechanical theorem-proving algorithm I wrote years ago in an AI project. He did improve performance but then the code didn't work Hmm, haven't I seen this one somewhere? If it doesn't have to work, I can optimize any code to a runtime of zero.
That's what source control is for. Waste a few hours trying to optimize it, and then if it doesn't work out, just roll back. The funniest part is that ti's placed in a finally block, which means it should always happen Yes, that was the joke. If you have a System. Reason to use Debug. PSD is not a good format. PSD is not even a bad format. PSD makes inconsistency an art form.
Here, though, it is not included. A sane format would pick one. The line right after that and its comment really top the cake. What sanity? The format ate it all Now it matches my thoughts. I pity that programmer for having to go through such a pain!!! But awesome piece of comment. Has poured his heart out. In today's market 10 now has a value of only 9. Maybe someday we will evolve more fingers Calling Fortran from C - Fortran only does call-by-reference so you need variables for all constants.
Show 15 more comments. That's a win. A huge win OK I am going to use this next time I need four empty arrays and two hashes! A loud "FAIL! I doubt that he didn't know about the format-free language. I'm still trying to figure out how to comment an XSLT in a way that makes sense. We really need more dragons in our code. Initially I thought of en. I cried out in anguish. Did someone call for me? Looks like Lisp! That comment is probably there to fix a compiler bug. Show 16 more comments.
Makes me think about the far vs. It still works perfectly fine. We first put it in our compiler at Convex about 25 years ago because DMR suggested that that should be the name for our 64 bit-bit ints.
Honestly in comment! I love the honesty. The first step to improvement is to acknowledge the deficiency. Dimension the script auto-checks for updates everyday, so you can just wait. A new version will not override any customization of comment texts, no. Show 9 more comments. I just came here to ask the same thing - yes please. Yes, also iin suggested edit summaries.
This feature request has been migrated to this issue on Github and thanks Duncan. Where do you recommend storing the comments for the external source? Github maybe? KitMenke, for testing I used DropBox, the poor man's web server.
If you could have it automatically update the remote sources, that'd be great. There seem to be problems with parallel ajax queries here. While trying the next version I found the comments sometimes just disappear and never come back. Benjol I'm glad I did try that then. Has this evolved any? Is local storage used? I probably don't want a remote call every time I use the script which is often , but once per browser session would be great.
I plan on using an Github Gist, btw. Benjol, could the remote comment source be expanded to sync all md files in a given github repo?
SmokeDispenser, you'll get more luck on github though I haven't done much work on the extension recently — Benjol. Has anyone managed to get this to work with a GitHub repository, I have tried to get this to work with this repository but when I try and use the plugin to pull the jsonp down it never completes. Where is the "remote" link this comment asks me to click on? All I see is the "auto" link next to the comment box.
Noumenon, it's after you've clicked on the auto link that you'll see the remote link. RichardSlater Thanks Richard! I was finally able to get this working with your steps. I uploaded my comments to GitHub Pages but it always says "parsererror".
Show 1 more comment. I'll drop my setup here. You don't even have to login! They should automatically generate such 'comments' when you flag something — Ivo Flipse. Benjol Oh, I guess I shouldn't have messed around on a totally random post after all : — badp. Posting setups is a good idea though — Benjol. I'm starting to like your list more than my own : — Benjol. How can I import your list? Roland Copy paste? Either way, importing comments doesn't seem to work for me Love it. Thanks for the additional comments.
Using them now! KevinVermeer That's SO only — badp. As already said by many others - thank you so much for this script!! Epic turnaround time and awesome script! Implemented the following features: Head list items are intended for users , sub list items are intended for developers.
Scrollbar for when the amount of comments exceeds the standard height. Added a link to allow the user to toggle the visibility of descriptions. This is remembered by using the local storage. Fixed greeting consistency , it's now added again after editing comments. Old version: Please make sure that both versions do not conflict. Fixed a bug with incorrectly loading the visibility of descriptions. Spotted a bug : In-line editing a greeted comment saves the greeting within the comment.
I won't fix this Tom, they say imitation is the sincerest form of flattery, so I'll forgive you suggesting people remove my script! I think it would be interesting if you could 'export' your comments and paste them here, like badp did. Pastebin - Still an early version as I haven't made much auto-comments, but it does the job. Yeah, I don't mean to replace you work, made some improvements to make it more usable to me and thought about sharing the changes.
Also, I learned how local storage works in extensions because of you TomWij, V1. Benjol: V1. Hasturkan: Oh, it's still there? Can you tell us how to reproduce this? I thought I got it fixed here Hasturkan, Tom. Must have missed that one.
Fixing now Another side effect is that if you open the second time on an 'old' user, you still get the greeting — Benjol. Benjol Great and fast response! Implementation thoughts: See my answer for a local storage based extension. Use a new syntax eg. This is how I do this now. Not going to implement this myself because I dislike an extra click This is a formal request for that feature. Suggested presentation: This is only a suggestion - incorporate it into the existing options file.
This line represents the default. Yes, it's planned for vNext, just not sure quite how to present it yet. Benjol: Just bringing your attention to my edit, that didn't fit in a comment. If I knew how to write anything and could gain some reps, I'd set a bounty for it. I don't care how it's presented in the UI I second the feature-request. On TeX. SE we also have a special Welcome meta post we link to.
I hacked my local copy of the script to use it, but making it configurable is much better. CodyGray, this is done now. Benjol: Where can the option be configured? AmalMurali: When you bring up the main screen, there is a link to "welcome" in the bottom right corner.
Given how often I make use of this, I wanted to save the extra click. Benjol The implementation is dirty. If you would want to put this in your version, it could be improved. You can check the diff to see what I did. I had actually forgotten to push my changes :P — Der Hochstapler. For that you'll either have to a wait a few months until I hit 10k, b hack the script to get what you want and send me the correction : — Benjol. I guess you could try Benjol: I've updated my post to include the needed changes.
ThiefMaster, can I assume you've tested that? Yes, works fine for me — ThiefMaster. ThiefMaster, included in V1. Unless you already know what causes this, I'll keep an eye on it and report back. I've been using this script for a while, and I've never seen this. Where did it happen? Pekka, I'm convinced I never saw this post in my inbox. I only just discovered it now! I corrected this bug a while back, I believe It uses localStorage, so it's going to nag you on every single site where you use it : — Benjol.
Fixed that bug in v1. This makes it very hard to find the app once you forgot its name :D. People copy a lot of code from Stack Overflow questions and answers. That code falls under Creative Commons licenses requiring attribution. A reference comment satisfies that requirement. Similarly, you should reference tutorials that were helpful, so they can be found again and as thanks to their author:.
Links to standards and other documentation can help readers understand the problem your code is solving. While this information may be somewhere in a design document, a well-placed comment gives readers the pointer when and where it is most needed.
Comments should be added not just when initially writing code but also when modifying it, especially fixing bugs. Consider this comment:. Not only does the comment help the reader understand the code in the current and referenced methods, it is helpful for determining whether the code is still needed and how to test it. While git blame can be used to find the commit in which a line was added or modified, commit messages tend to be brief, and the most important change e.
Using a standard format for such comments helps with measuring and addressing technical debt. Better yet, add an issue to your tracker, and reference the issue in your comment.
I mostly subscribe to the sentiment in this article. I do have one habit that is somewhat different from this set of guidelines: I only link to external sources e. StackOverflow to attribute the solution or code.
I do not want the code to rely on external sources for an explanation. Links rot, need a click and maintenance. Even when it works. As the article argues: maintenance and debugging is extremely important and can only be done efficiently when the code is readable. People need to like curl be able to understand what it does, how to talk to it, how to debug it, etc. And this sort of stuff belongs front and center in your service catalogs, not buried in code comments.
Good code comments are very helpful when looking at code through a microscope. It was the kind of code that promoted jokes about Job Security. One key use case that I think is sort of covered in some of the practices but not explicitly stated is workarounds. That way a future dev or future you can quickly check to see if the issue is fixed and the dependency can be updated and the workaround removed. This is an important point. For anything else it is way excessive.
One extra tip. You may find this one controversial or disagreeable, but in my personal experience it has been very helpful. You may not be the same type of person as me, so your mileage may vary. If something frustrates you, make it known. Hell, write a rant if necessary. Use expletives liberally. As long it gets the meaning across. So imagine this situation. Maybe it makes you cringe too, but after hours of burning your brain out and discussing with your team you came to the conclusion that there is simply no better way to do it.
In other words, feel free to write a rant, so as to advise others to avoid the frustration. Whatever it takes to get the meaning across. Programmers are humans after all although that Copilot thing… It scares me and we need psychological relief as much as we do physical. It may simply be the most practical thing to do at the moment to regain your composure and become productive again.
A problem with using unprofessional speech inside program code is that it may be shown, even accidentally, to managers, clients, or even sensitive co-workers who will take offence at the unprofessionalism. You also may be not able to e-mail or download program code that has naughty words in. There are web sites as well as utilities for this, it consists of swapping the first 13 letters of the alphabet A to M with the other 13 N to Z , and it has the convenient symmetry that tneoyr-ing what you write and un-tneoyr-ing it is the same operation.
The code blocks on rule 2 broke my eyes. Rule 0 of writing code: use consistent formatting and colours. I tend to follow most of these, though I disagree with 8. Yes, I totally agree with that and in fact have been asking junior programmers to remove such comments or, if they still fall under one of the listed categories above, to rephrase them. So one time I fixed a bug in a huge project and had a strong suspicion that similar bugs existed elsewhere, so I put in a comment describing the bug, and the fix, and moved on.
The team lead deleted the comment without bothering to tell me, sigh and when a similar failure turned up elsewhere a few weeks later I went looking for the comment. What should have been a half hour fix became 40 hours of work. I was somewhat irate. Did you really spend 40 hours fixing a bug because you did not manage to find the commit you authored? Good and interesting article. Keep comments in source code is another way to help in the development cycle.
I find it very helpful to note the date of changes as part of the comments. Learn more. Stack Overflow. Help center. What are comments? How do I comment? The following community members will be automatically notified of your comment: the owner of the post you're commenting on one additional user when your comment contains a username 1 reply 1 You can only reply to users who have already left a comment, or edited the post.
When should I comment?
0コメント