Hacker News new | past | comments | ask | show | jobs | submit login

The short answer is "yes, it's worth the time".

One big improvement I've made in my code over the years is that I take the time to improve my code. Continuously improving code quality does lead to high code quality, and high code quality reduces maintenance hours (both amount needed and time spent).




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.


The 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: