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! :)

If you want more blog entries like this, check out the official blog over on The Coders Lexicon. There you will find more code, more guides and more resources for programmers of all skill levels!

3 Comments On This Entry

This is very true. I'm glad you noted in the last paragraph though about the dangers of taking too long of breaks. I took several months off while I got involved in, well, let's just say that my life started going downhill with some of the choices I made in this break. Obviously I'm not saying the break in coding was the cause of this poor decisions, but what I'm getting at is that when I got my act straightened up, it took some serious time to catch back up to where I was in my skill.

Yeah programming is like math and if you don't use it for some time you will indeed get rusty pretty quickly. Not to mention technology changes so quickly that not only will you forget it, what you do retain can be quickly outdated. There is a fine line between taking too long of break and just enough to get you refreshed.

I also think take a break from your code for a week really helps you step back and get a clear thought your goals and logic. The long you program a piece of code the more tunnel visioned you get in terms of the greater scheme of things. With a break you get to come back and think about hey, I could merge a couple of classes and save myself some time, or that piece of code just doesn't really fit or work that well.

Nice post, its a far too common trap for many in this profession to forget the value of rest.