3 ms·
I can relate to this, somewhat. I've spent quite a bit of the last few years writing code either under deadline, or for work that's ultimately charged hourly.
by kbenson 14y ago
I can relate to this, somewhat. I've spent quite a bit of the last few years writing code either under deadline, or for work that's ultimately charged hourly. That doesn't lend itself to thoughtful refactoring.
As such, when I'm not under those constraints, I sometimes go a little overboard factoring out duplicated code and looking for the beautiful solution. To me, beauty is the maximization of clarity and conciseness. Since I'm usually writing Perl, there's quite a lot to work with in that regard.
For example, yesterday I spent 4-6 hours writing approximately 40 lines of Perl (along with another 40 lines of tests).
On the plus side, what I generate during these binges is generally an efficiency multiplier for the other code I write, as well as a god way to really examine some of the more esoteric, but useful, ways to use your chosen language.