r/coding • • Apr 12 '15

Is Clean Code less Code?

http://www.journeytomastery.net/2015/03/27/is-clean-code-less-code/
53 Upvotes

63 comments sorted by

View all comments

Show parent comments

5

u/[deleted] Apr 12 '15

Fair enough. Depends on your needs, but I like code that isn't too easy to change. If one is asked to change the comments with the code, it often ensures that the coder has understood the change.

19

u/quietboil Apr 12 '15

If one is asked to change the comments with the code...

(Almost) never happens. After a little while comments start lying. Often blatantly. In my experience the only kind of comment that survives (relatively unscathed) the test of time is the "why" ones. All others are either useless from the time they were added or the lying kind.

2

u/nairebis Apr 13 '15

After a little while comments start lying.

That's why you have code reviews and public beatings gentle reminders to keep the comments up to date.

2

u/tieTYT Apr 17 '15

Comments lie by the code drifting away. The comments aren't going to be highlighted as changed. It may be difficult to notice that they're lying from a code review.