3 ms·
Well, it really depends on business objectives here. If you're writing the code which will live at least a month — definitely. But if you're writing a quick ha
by golergka 12y ago
Well, it really depends on business objectives here.
If you're writing the code which will live at least a month — definitely. But if you're writing a quick hack of a project or test that you're know won't be around next week, it's often a real waste of time and effort.
And I'm not writing about that theoretically now: for me personally, it's a real problem. Whenever I sit to write a simple dirty hackey thing, I always find myself a few hours later googling for the best way to implement unit tests for this particular case or something like that. Which is sometimes educational, but is very distracting.
- ef4 12y agoThe problem is that one-time hacks have a nasty habit of living on and becoming long-lived systems. And it can be hard to explain to users / business owners that just because it appears to work doesn't mean it's "already done". Writing quick hack code is a good thing if you are in an organization that is disciplined enough to throw it away after you've learned from it.