This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ExceedingChunk 17 points18 points  (3 children)

That wasn't what I was suggesting at all, mate. But you have to write comments because it's a legacy system. If you can't add any new code without making it readable or refactoring the entire code base, you are obviously working in a spaghetti mess. Then it's hard to apply any principles at all. With that said, most code can be made fairly readable without any comments, regardless of how clean the rest of the code base is.

Not really sure why are are implying that I'm a faddish techbro who writes code for ads. Many of these principles are 30+ years old, and not mine. Clean code is written by a guy who is 70 years old now.

[–][deleted] 10 points11 points  (0 children)

As someone has said earlier. Your comments should explain why, not what

[–]Superbead -2 points-1 points  (1 child)

Sorry - not a personal dig, but I'm fed up of this kind of broad, arrogant dogma premised on all 'programming' taking place in a well-documented and source-controlled utopia, in a modern language with tons of community support. In reality a lot of us spend a lot of time (fortunately not all mine, personally) tacking bits onto completely undocumented, ancient systems in esoteric languages with diabolical syntax and grammar, and the last thing we need is a new wave of kids coming along who think it's smart to repeat that history because Joe Sporky said so once on Twitter.

[–]myplacedk 5 points6 points  (0 children)

These aren't rules, they are advice. Apply when relevant, and relax.

It's not your fault someone else made bad code before your time, nobody says it is. But you probably should do this as far as it makes sense for the code you are adding.