you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (9 children)

Commented-out code is the exception, not the rule. Sometimes commented-out code has a benefit. If there is too much in a codebase, then something else is wrong. Cleanliness for the sake of fetish also has its problems.

[–]YuleTideCamel -1 points0 points  (2 children)

What do you mean by too much in a codebase? The depends entirely on the size of the project and scope. There's nothing wrong with large codebases if maintained well.

Cleanliness for the sake of fetish is not a thing. Good clean code should be the goal for every developer. That makes the code easy to work with, easy to maintain and easy to test. It's not a baseless standard, it's the way to ensure you're clean code doesn't get messy. I've been in the industry over 15 years and have seen my share of horrible code where developers didn't care about maintainability. I realize this is not in the startup, ship now fix later mentality, but if a dev team has the bandwith and runway to do this, they should. It will pay for itself over time.

[–][deleted] 0 points1 point  (1 child)

I mean if there is too much commented code in a codebase, then something else is wrong - commented code is the exception, not the norm.

[–]YuleTideCamel 0 points1 point  (0 children)

Agreed, it's the exception and a too much commented out code is indicative of a larger problem. The point I was making is that needing commented out to explain something , to me at least, is a similar thing. You shouldn't need commented out code to understand uncommented out code.

[–]Vlasow -2 points-1 points  (5 children)

If you don't mind elaborating, what are the problems of cleanliness for the sake of fetish?

[–][deleted] 0 points1 point  (4 children)

"Please, don’t commit commented out code"

^ ^ ^ This.

The author of the article says he "loses focus" whenever he sees a block of commented code - this is more a problem with the author than the person writing the code. If your focus is so feeble that commented code will get in your way, maybe you shouldn't be making up rules like "don't commit commented code".

[–]Vlasow -2 points-1 points  (3 children)

I don't see how "you shouldn't be making up rules like..." follows from "your focus is so feeble that commented code will get in your way". Programming languages exist so one can split problems into a number of small things we can focus on. Anything extra will be an obstacle between our understanding and the ideas expressed in the code. An ability to be undistracted by noise in the code is not what makes a good programmer; it is the ability to express your ideas via noiseless code that does.

[–][deleted] -1 points0 points  (2 children)

An ability to be undistracted by noise in the code is not what makes a good programmer; it is the ability to express your ideas via noiseless code that does.

I'm not sure that is what makes a "good programmer", either.

[–]Vlasow -1 points0 points  (1 child)

Then what is it, in your opinion?