Same here. Comments are often either misleading/outdated or extremely redundant (“//now I’m adding two things together!”). And the compiler doesn’t care. Also less emphasis on comments I think drives more emphasis on clear code. “Code should read like a book”.https://twitter.com/Chrikomu/status/1191778623784734721 …
-
Show this thread
-
That all being said, of course there’s exceptions. If your code is doing something exceptionally weird or unexpected- yes- please explain.
1 reply 0 retweets 1 likeShow this thread -
Replying to @citnaj
I respectfully disagree. Commented code is a basis for all stuff in documentation. Imagine large and shuffled teams with new additions working on an ever growing project. How would a newbie comprehend? Even skilled devs would save a lot of time with comments in place.
1 reply 0 retweets 0 likes -
Replying to @ionicdevil
Good code can go way further than any comments to convey actual reliable understanding of what’s going on. But if you’re not dealing with good code then yeah- you’ll need the comment crutches!
1 reply 0 retweets 0 likes -
Replying to @citnaj
True. In my limited experience, I think that at a certain point, despite all the reviews, clean-up and sprints dedicated for code efficiency, every code rots. Devs won't remove some code cuz it will break a feature. Sometimes refactoring's nightmare. Commenting is practical.
1 reply 0 retweets 1 like -
Replying to @ionicdevil
All very good points. I don’t think I’ve run into a situation where code doesn’t devolve over time ha. So you might be embracing the much more realistic approach....
1 reply 0 retweets 0 likes -
Replying to @citnaj
Oh I saved the best one to the end. Some Tech Directors get offended if you dare touch their code. Some files are "sacred" even if they are highly toxically outdated. We just called it legacy in comments and worked around it. Thank you inheritance and runtime polymorphism.
1 reply 0 retweets 1 like
Oh yes that’s very familiar ha
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.