Overcoming a complicated bug or seeing your app finally come together constitutes a well deserved celebration. Now, you don’t have break out the wine and throw a lavish party, but I strongly believe indulging in these small little accomplishments is a healthy practice. When you’ve spent a hundred hours to fix a bug and get the application to function as expected, I encourage taking a small break.
For example, this past weekend I was putting together the styling for my app. I don’t have a creative bone in my body, so I found a theme and started incorporating it. Up to this point, I’ve been neglecting my styling as my main goal is to learn Ruby. I’ve been relying on Bootstrap just as a tool to help make my app a little more bearable. So as I started putting on the CSS files and using the different classes in my views, it was rewarding. I was able to do most of what I wanted to do from a backend perspective, so the fun part of seeing the frontend was exciting. The different layouts and buttons brought my vision to life and was even more encouragement to keep on going.
So what did I do when the main pages and functionality was built? I took a break. After hours of putting everything together and neglecting my family, I closed my Mac and used my free time playing video games, with family, and not thinking about code. Most developers will agree that when you come across a particular bug or add an enhancement, you’re truly not contempt until it’s finished. You’ll spend hours/days/weeks on these tasks, only to have another one right at your door.
I know it’s hard to stop when you’re on a roll, but separate your tasks into small sections. When you complete one, take a break, because I guarantee you that more frustration and long, isolated hours will come.