3 ms·
Are You Proud Of Your Code?
- edw519 19y agoSometimes when confronted with adding more crap to someone else's crappy program, I just decide to rewrite it right. Probably more often than most others would recommend. My reasons? 1. In the long run, everyone will be better off. 2. If's not how quickly you get started; it's how quickly you get done. 3. I just don't feel like working on crap today (or any other day). 4. I want to write something I could be proud of. Sometimes it just takes a rewrite in order to put yourself in a position of writing code you can be proud of.
- joe24pack 19y agoI've wondered about that myself at times. Some code that I've inherited was truly atrocious and much of that ended up rewritten, but other had been impenetrably dense. Those I had a mind to leave alone simply because I feared breaking the existing code. Usually we ended up "putting up dikes" around it and then clean it up piecemeal. Sometimes it is difficult to tell highly tuned and optimized code from a seething pile of cruft, but a quick run with a profiler against some performance benchmarks usually settles that question. Oh and by the way, yes there is some code that I've written that I am somewhat proud of even if I recognize some of its shortcomings and ugly warts.