2 ms·
Sounds normal. At first you want to get something that works, and works correctly. This is rarely achieved by small and optimized code. Once you have the corre
by Artlav 10y ago
Sounds normal. At first you want to get something that works, and works correctly. This is rarely achieved by small and optimized code.
Once you have the correct code, you'll also have a more complete understanding of the problem and it's parts.
At this point you can start simplifying, optimizing and so on.
Also, having a correct code makes that job easier, since now you can have both a proven set of tests and a reference - errors are trivial to catch.
> I think "why the heck couldn't I have written that simple code in the first place - it would have taken me 25 minutes instead of 8 hours"
You didn't know it back then, now you do. The path from there to here resulted in that understanding, and the hindsight through the understanding makes the past looks absurd.