3 ms·
My guess is that the code that was thought through first will be better (easier to understand by the next developer) than the code generated by many iterations.
by collyw 6y ago
My guess is that the code that was thought through first will be better (easier to understand by the next developer) than the code generated by many iterations.
- jacquesm 6y agoMost of the times you'd be right. But some of the times you'd be devastatingly wrong. You always need to check your assumptions about runtime, expected behavior and so on and there is only so much modeling you can do in your head. At some point - if the scope is too large to fit in your head at once - you will need to resort to divide and conquer, implement the part that you understand, regroup, then do the rest. And before you know it halfway into doing 'the rest' you will realize a better way to approach the problem.