My programming day is very rarely all success or all disappointments; in truth it probably looks like a sine wave with a very high frequency. Over the course of my career, I have become better at noticing and dealing with how these successes and disappointments affect me as a person.

When I have taken a few disappointments on the chin in any given period, I will often revisit my unit tests and refactor them to make them more clear and readable and then jump back at the task at hand. Sometimes I will notice how to improve the test to be more effective as well. I find this practice has two tangible benefits. Firstly, my tests across time become clearer, more concise and more effective as I tweak them. Secondly, the “refactor / run tests” cycle gives me some easy wins and set me back on my way in a much better frame of mind.