in reply to My greatest coding sin is:
Spending too long trying to fix broken code rather than starting again from scratch.
Seven out of ten times when I start over I end up going back and fixing the original broken code anyway; but starting over from scratch, by removing the influence of the existing structure, variable names, comments etc., the realisation of what is wrong with the existing code often falls into place very quickly, where staring at the original code often leads one's brain down the same path that led to the original error in the first place.
And on the other three occasions, the new code comes together more quickly and cleanly because the second time around you've a clearer picture of what you need to achieve.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: My greatest coding sin is:
by hippo (Chancellor) on Jan 05, 2016 at 12:16 UTC | |
by Ratazong (Monsignor) on Jan 06, 2016 at 09:52 UTC | |
by Pope-O-Matik (Pilgrim) on Jan 10, 2016 at 14:38 UTC |