Learning to enjoy programming - when you are stuck on a bug you think you will never solve.

As I teach new programming students, I inevitably see frustration in trying to figure out why their program will not build. What this syntax error really means. They get increasingly frustrated and dejected at the possibility of becoming a programmer. To anyone who is a programmer you know this feeling all too well. It is part of the job: the hours that can be spent on a single problem. The hopelessness of never being able to figure out what this error message really means.

But when you learn to love programming these moments become different. To quote a few passages from my spirituality studies, “it’s the journey not the destination”, “this too shall pass”. Programming is an art to be savored not completed. Not that completing a project is not important, but take these opportunities to learn an hone your craft. When you start to see them as learning opportunities instead of wasted time your outlook will change completely. It is not hours wasted on a program that should take 5 minutes. It is a chance to better your debugging skills, to learn more about your ide and how to troubleshoot with it, to learn shortcuts and more efficient techniques. Then the hours are not so frustrating as long as you keep in mind that “this too shall pass”. You will figure out what your bug is and along the way enhance your skills and become a better programming.

We all too often focus on the goal instead of the journey. Approach the problem with an open mind not a singular purpose of solving the problem in the shortest amount of time. Like everything in life it is all in your mindset and expectations that dictate your attitude. This is true in life and in programming.

Take a step back and enjoy the process. You will figure out the problem and learn a few things along the way that will make you a better programmer. And if nothing else, you will have a good war story to tell.