3 ms·
Typing on phone so I'll be brief. The key concept I find missing from this piece is "locality". When dealing with a complex and/or unfamiliar codebase, localit
by andybak 3y ago
Typing on phone so I'll be brief. The key concept I find missing from this piece is "locality".
When dealing with a complex and/or unfamiliar codebase, locality (by which I mean "I can understand this thing here without jumping around the codebase") can make up for a lot of other deficiencies.
And imho, dedupped code with an excess of if statements is actually one of the least worst things to encounter.
- rightbyte 3y agoMany programmers believe that the more complex the better. In my experience good code looks silly simple, such that you might think the problem was easy. And thus underrate the author ... I have never read someone else code at work and complained that a function is too big with too many if clauses. However, deep call trees are really hard to comprehend. Especially if some function is called multiple times in the same call stack (unless the algorithm is recursive in a good way).