Hacker News new | ask | show | jobs
by amouat 5059 days ago
Actually, I think it's a bit more subtle than that. By using stack traces and debuggers etc, I can come up with a working and correct solution. But, by thinking through the problem at a deeper level I can come up with an improved design which may simplify future programming and avoid similar bugs.
1 comments

But one must also be careful not to fall into the trap of premature optimizations and building unnecessary complexity.
You've just hit a real actual problem in the code. Factoring that out isn't premature, it's responding to reality.
I was reacting to the idea that instead of fixing the immediate bug you just found you're going to redesign the whole thing to prevent that type of bug from occurring ever again in the future.
And simonh was pointing out that it's not really premature if it's already occurred :)

Don't get me wrong, you have a point - there is certainly a balance to be struck.