Coming from a freelance background where I set my own deadlines, it took some getting used to having to rush my unfinished,half-tested code. I recently purchased the book '97 Things Every Programmer Should Know', and the first piece of wisdom was entitled 'Act With Prudence' written by Martin Fowler. To summarize, it's an article on "doing it right", or "doing it quick" in respect to project development.

This is something that is constantly on my mind and was comforting to finally have a name for the situation. Ideally, every programmer would love an infinite amount of time to spend on a project making it tidy,clean,fast and bullet proof. However, unfortunately this isn't how money is made and a high percentage of the time we have to do what we can and try to create some leeway.

Find the right/quick balance

Unless your working on a personal project or a project with no deadline, it's more than likely your not going to be able to stick to "just doing it the right way". Occasionally your going to have to get into some debt with your code and deal with it in time in the correct way.

A big part of increasing the "doing it right" proportion was learning how to say "No". Constantly wanting to hit impossible(at times) deadlines I found my self saying 'Yes it can be done', when knowing it would take three of me to complete the task cleanly in the time given. Occasionally saying no gave me more time to write decent solid code and helped put my mind at rest when starting a new iteration of development.

Final Note

Of course there are times where deadlines cannot be dodged and we have to deal with the code debt, and that means overtime. I often find myself spending a couple of hours after work trying to keep the code clean and tidy. Doing so will increase productivity in the long run and reduce stress. There is nothing worse than hack and slash code in a long term, solo project.