There was a post that trended on Hacker News which was about how much your employer values code quality vs getting things done.
I had so much fun reading the comments on the post. It gave so much insight of how other companies work. Of course, I while reading I also formulated my stand on the issue.
Personally, I think on this kind of things we have to be very pragmatic. If you are working on a startup, sometimes we need to get stuff done, and sometimes we aren’t in a rush. I think part of our job as software developers is to write code that we can come back to in six months and still understand it. As software developers,I think we’re making a poor investment of our time and money if we don’t do that. Reality is sometimes the business really just needs us to get stuff out the door.
In general I believe we are doing ourselves a disservice if we don’t write good, easy-to-understand, high-quality code with lots of tests, because we lose our ability to add features without knowing that we didn’t break anything.
In cases where we need to rush to ship, i think we have to make a conscious decision to take on technical debt, log that we’ve taken it as a task and come back to it when we’re out from under our deadline, as SOON as possible. The mindset should be we have a task on for this refactor on this date, not “someday” we’ll refactor this.
Sometimes we’ll have to sacrifice code quality, but it’s only an okay decision if we accept the responsibility of cleaning it up soon as part of the bargain.
In general, i’m still not a fan. rushing stuff out the door leads to bugs. you’re going to spend the time you would have spent writing good code cleaning up your mess one day, with interest.