Comment by reedlaw
13 hours ago
The first sentence is problematic:
> For decades, we’ve all known what “good code” looks like.
When relatively trivial concerns such as the ideal length of methods haven't achieved consensus, I doubt there can be any broadly accepted standard for software quality. There are plenty of metrics such as test coverage, but anyone with experience could tell you how easy it is to game those and that enforcing arbitrary standards can even cause harm.
I agree. Moreover, I submit that “good code” isn’t even a universal constant, but context-sensitive along several dimensions.
> When relatively trivial concerns such as the ideal length of methods haven't achieved consensus
Is the consensus not that there isn't one? Surely that's the only consensus to reach? I don't see how there could possibly be an "ideal length", whatever you pick it'd be much too dogmatic.
John Carmack's and Martin Fowler's coding style advice are diametrically opposed. Carmack advocates inlining complex code that is only used once. Fowler advocates extracting it with a good name to clarify intent. I'm not sure the two views can be reconciled except by noting that they address separate concerns. Carmack prioritizes visibility while Fowler prioritizes intent.
With all due respect to these who as programmers are on a whole different dimension than me.. this seems like a case where both either their words were taken out of context, or one of the millions of cases of brilliant people hyperfixating on their particular domain and mistakenly extrapolating that to everywhere. Their advice could well be right for the particular type of code each of them worked on!
But taking them as general rules for coding makes as much sense as applying advice for painting a bridge to painting the Mona Lisa. Seriously, try to come up with a single piece of advice about programming style that applies to every domain. The closest one I can think of is "give descriptive name to your variables", and even that doesn't apply to lots of code written to this very day. It's impossible.
Software in 2025 is far too varied for any of that to make sense, and it has been for many decades.