4 ms·
Blog post author here. I'm certainly not qualified to disagree with John Carmack! I can speak for my own experience, however. I understand the argument that m
by davethedevguy 6y ago
Blog post author here.
I'm certainly not qualified to disagree with John Carmack! I can speak for my own experience, however.
I understand the argument that moving small sections of code into methods/functions hides the details. However, I probably spend more time reading code than writing it.
When I'm in 'reading mode', I really just want to understand the control flow; I want the details to be hidden from me.
If I'm debugging code, or looking for performance improvements, then I do need to see that complexity. More function/method calls will make this slightly harder for me, but it's a trade-off I'm willing to make for the more common case, I think.
- baby 6y agoI too spend more time reading code than writing, if you have to click through X layers of abstractions to understand something you’re doomed. Clarity must stem from the code, and comments are here to support it.
- lultimouomo 6y agoI think the main argument is the same as other comments pointed out: by factoring out code to separate functions, either they're functionally pure (and this is often hard to do, so much that none of your example functions were) or they're mutating state, which is something you want to have very clearly under your eyes, especially when you're in 'reading mode'.