top | item 46433790

(no title)

reedlaw | 2 months 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.

discuss

order

tempodox|2 months ago

I agree. Moreover, I submit that “good code” isn’t even a universal constant, but context-sensitive along several dimensions.

deaux|2 months ago

> 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.

reedlaw|2 months ago

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.