4 ms·
The title is click-bait but the conclusion makes sense. It's just unfortunate that most people have such different ideas about what 'clean code' means. I guess
by cryptica 5y ago
The title is click-bait but the conclusion makes sense. It's just unfortunate that most people have such different ideas about what 'clean code' means. I guess people will ascribe that label to any code which they produce. Everyone (regardless of actual competence) wants to think of themselves as a good developer who writes clean code.
My own definition of 'clean code' means maintainable (anticipates some broad future requirements) and avoids inventing unnecessary abstractions or adding layers of indirection (which just adds complexity and gives other people more work to familiarize themselves with the code).
- heurisko 5y agoIt's very click-baity. "Clean code" primarily means to me descriptive function names and variables, with functions that do one thing, and are not overly long. It's stuff like not using "temp" as a variable name for "temperature" as it unnecessarily adds to the cognitive burden of understanding the code ("Does this mean temporary or temperature?") This what I took away from the Uncle Bob book. I expect some will latch onto the title, however, to keep with traditions, like that somehow variable names are supposed to be abbreviated.