Take Your Time

April 9, 2018
Apprenticeship

I’ve been working on unit test framework for a week now. It feels amazing to test your own software with your own testing tool. But, it takes time. It takes time to figure out what exactly you want to achieve and aim for it.

Most of the time, I got myself thinking about the next features while dealing with the current one. This inattention yields me to make so small mistakes that I can’t figure.

In such case, take your time. Stand up, get some water, get some fresh air or smoke if you do. When you get back, don’t struggle with the dead end, remove the code if possible and start over. You wrote it once, you can write it again. Believe me, typing is not a bottleneck.

Today I lost my two hours. I was trying to implement asynchronous test case support for my framework. The code was working, but I couldn’t realize that I have missed the return keyword in my test cases. I stayed on my desk to find the problem for two hours, but if I would get out of my tunnel vision, I believe I would see it earlier. Don’t be shy, ask people, get a rubber duck. Best way to understand a problem is to explain it to others, or to the rubber duck.