— Linus Torvalds
— Linus Torvalds
Programming is ultimately about reading and transforming data. When presented a problem, the bad programmer (presumably not well versed in DS theory) thinks of it first in terms of "steps to reach a solution". Whereas the more skilled programmer is able to identify which set of DS is a good match to a specific problem. That is, which combination of structures allow for an efficient access and manipulation of the data in the context of the problem at hand. The implementation then stems from that insight.
Obviously this skill is mostly valuable in performance critical code, which the bulk of our trade generally doesn't intersect with. And in an age of fast processors and abundant memory, it's common to see O(N) data structures applied to O(1) problems and barely anyone notices the cost. Thus keeping us in the comforting illusion that we're better programmers than we actually are.
I rarely comment on code style for this reason. I want the review to focus on functionality, not style. I don't really believe the notion "imperfect code style is a code smell" anyway.
Blaming developers for something that can be automated? Yeah, something is off here, though not necessarily the review.
> nitpicking of inconsequential things like variable names
To me it sounds like a good thing when there's nothing else to comment on. Making code more readable is a win for everybody.
The style itself is inconsequential, but no consistent style is a red flag to me.
Similar arguments could be made about actual architecture: "If you can't have well-designed and consistent houses, how can you possibly have a well-designed city?"
The best architectures I've seen, by far, had the worst code. Code is not a systemic level issue. The way the pieces fit together is.
A sad fact of good architectures is they actually enable bad code to exist without severe consequences, because that badness is localized.
let c = ... versus let customer_address = ... can save a lot of sanity throughout the years
Structure of the code, as in relationship of classes, data flow and high level design is also important and checked during review.
“I’m a good programmer”, I imagine. I wouldn’t disagree :p