Stop Writing Code Comments #cleancoder medium.com/@bpnorlander/s…
@java wtf, no stop writing *bad* comments. some are super necessary. this is bad advice, especially for new programmers who are most likely to be influenced by this.
@java This isn't the first time I've tensed up with absolute rage looking at Java. Certain it won't be the last.
@java wow what an extraordinarily bad take. it’s impossible to write a good comment when the body of the function is `...`
@java Tracks should be unsigned, cause how can you have negative tracks...
@java YOU SHOULD BE BOTH
@java There's no such thing as "self-explaining code" in a production environment.
@java Bullshit article sorry. The argument also works for methods that are named incorrect. Documents are a part of writing good source code as well as writing test code. If you cant keep these three things in sync then you need to find another path in life.
@java Comments are supposed to be about the hard to see information, the decisions and should guide the eye. No comments mean I don't care about idiots after me and if you don't pay me well, all knowledge is lost or your can reverse engineer the shit out of my code. #responsiblecoder
@java Official Java feed - what are you doing here? While the code comments in the example are bad and should never have been written, popularizing an article titled "Stop Writing Code Comments" does a disservice to new developers. Good comments are necessary and welcome.
@java outright nonsense ! At best, the title should be ' dont write THIS KIND of comments'
@java Comments need to help others understand complex logic even if you have nicely structured code & they also guide people using your libraries in moderns IDEs. They should be reviewed with the code. There are lots of bad articles too, does that mean no one should write any at all?
@java Comments that state the obvious are wasteful and potentially misleading. Comments that explain how to use a class with sample code and background context, on the other hand, are very useful.
@java You know what's worse than comments? fiveWordVariableNamesYikes
@java I have to disagree, I can't expect someone else to be on same level of business understanding. And, if you comment or not, a dev IS a documentor. Because a method name documents what it does, right? ("You are a developer, not a documentor" line). Give others a chance to learn.
@java Not commenting getters and setters: agreed. Not commenting anything else other than regex or SQL? Not so much. Even well structured code with lots of methods and classes can become a maze to follow. Well placed comments can give you (and others developers) a valuable guide.
@java Most people who reply to this tweet seems that they haven’t read the article at all, this is an excellent article, worth reading and worth sharing.
@java I personally hate comments, functions and attributes names should be explaining what they actually do. And in my opinion code with comments to understand is a bad code
@java The comments are NOT the problem. There maybe a correlation between bad code and to many comments but that does not mean that by stoping to write comments the code will magically be better. ... rename the article to "How to write more legible and better code"
@java should be addCompactDisc. Cd is too ambiguous lol
@java I've been writing Java since the first night it was available for download from Sun Micro. I've been writing C since its beginnings, too. And this is the WORST programming advice I ever saw, in a long life writing code.
@java Write comments explaining WHY the code is as it is. This will probably lead to less, but more valuable, comments.
@java On the contrary, please write GOOD comments. Helpful comments. If one could easily determine what a code segment does just by looking at, it probably doesn’t need a comment. But if they can’t, well, that’s why the comment function was created 😊
@java Because anyone cares about application size, all methods only do one thing, the original dev will always be available for consult, and the app is always perfectly documented in the design....
@java Stop using the word “we” in code comments. That is all.
@java Siri, show me the worst programming take you can find
@java Lol wow, no, stop writing bad or unnecessary comments. Don't advocate clean code by telling people to stop writing comments. Some comments are really necessary.