Best Way to Improve Your Code… A Vacation

The idea of taking a sizable break is bantered around from time to time as coding lore, but does it really work? In my opinion it sure does! Newbies and experts alike underestimate the mind when it comes to problem solving and always wonder what is the fountain of youth when it comes to thinking with code clarity. Those of us who go to work to write code for others and then come home to write code for ourselves on a day in and day out basis tend to forget that we really do need a break from time to time. Oh I am not talking about the simple 15 minute break to grab a bite, you should be doing that out of habit, and I am not talking about even the day or weekend off without a single if statement. I am talking about a solid week or so of no compilers, no code, no books on computer science or even technology if you can help it. Ok, maybe the technology part is a bit too far, but you get the idea.

I am one of those people who tends to think about code even when I am not physically at a computer. I think about code when I watch TV or when I am on my way to work to write code. I think about it in the shower or when I walk near the water front. I am a bit of an addict.

Recently I took a trip back to the “motherland” of Seattle Washington, between the holidays, where I spent the better part of a full week chilling and taking in the sights. Little did I know that I was not only having fun, but I was recharging the code machine which is my mind.

Coming back home to Vancouver I slowly got back into my usual routine again of code code and more code. However, things were a bit different. Not only was I writing great code (which I tend to think I do well on any given day), but I was also problem solving extraordinarily well, even for myself. I was looking at code I had written before I left and seeing ways to improve it left and right. Refactoring and simplifying was not only shortening the code but also making it extremely bullet proof… much to my disbelief. I have been writing some extremely powerful stuff since that trip and I am now not only a believer in the occasional code break, but a new believer in the idea of longer breaks to improve the way you code.

Of course there is always the idea of too much of a good thing being bad and I am not advising taking too long of breaks. I feel that a week is really the ideal length to improve what you know without losing any of it. So if you are new or an old hat to programming, be sure you plan that vacation from time to time and STAY AWAY FROM CODE. In the end I think you will be glad you did. You may even find yourself newly motivated and enjoying the 0’s and 1’s a little “bit” more. I will be sure to take more of these breaks in the future!

Thanks for reading! 🙂

About The Author

Martyr2 is the founder of the Coders Lexicon and author of the new ebooks "The Programmers Idea Book" and "Diagnosing the Problem" . He has been a programmer for over 25 years. He works for a hot application development company in Vancouver Canada which service some of the biggest tech companies in the world. He has won numerous awards for his mentoring in software development and contributes regularly to several communities around the web. He is an expert in numerous languages including .NET, PHP, C/C++, Java and more.