4 ms·
The problem with the word "clean" is that it is a very ambiguous term. It can refer to indentation, identifiers, coherent types, cyclomatic complexity, encapsu
by 29athrowaway 7y ago
The problem with the word "clean" is that it is a very ambiguous term.
It can refer to indentation, identifiers, coherent types, cyclomatic complexity, encapsulation, coupling, modularity, configurability...
- huherto 7y agoIt probably means all of the above. You should be able to read the code and understand how everything works.
- durpleDrank 7y agoTrue. On the flip side I think "clean code" is supposed to imply a particular type of coding popularized by people like Uncle Bob. When people say clean code, I don't think of tabs vs spaces etc. I think "Oh this guy codes to Bob Martin's spec".
- boomlinde 7y agoIn a sense these pertain differently to clean code only by degree. Poor indentation is some dust on the six windowsills in your home; small issue, easy to address. Poor coupling for a large, long lived project is guano all over the carpet. The ideal clean code of course has proper indentation, self-explaining identifiers, coherent types, minimal cyclomatic complexity, perfect encapsulation, perfect coupling, perfect level of modularity and perfect level of configurability. To which degree we want to achieve the ideal and to which degree these individually factor into it varies from project to project.