not playing the guitar for 4 years means you lose muscle memory and a few songs, but leaving programming for 4 years is like a death sentence to your technical knowledge. Not because you’ll forget what an
ifstatement is, but because programming languages move so quickly that 4 years could include 2 or 3 new versions of your language.
My experience, however, is the opposite, and I can tell you exactly why.
Rob left programming to become a manager and then came back to it, and each time faced a learning curve to get his programming skills back up to speed. I left programming to become a starving artist, and although I also faced a similar learning curve upon my return, what I lost in technical knowledge I gained in perspective. One thing I spent a lot of time on was developing the ability to draw accurately and realistically, and when you do that, you train your mind to observe very precisely, and to throw away inaccurate observations.
After that period, the code I wrote upon returning was more compact and more powerful. The things I built were more inventive, more original, and more worth building in the first place.
It's no surprise that a programmer who took a programming hiatus as a manager says he suffered as a result, and a programmer who took time off to draw says he improved. Ultimately these are very subjective reports, and without side-by-side comparison of code over time, we'd be hard-pressed to make any claims of scientific objectivity here. We're basically saying, "My vacation was fun," and "My vacation wasn't." If we're going to be scientific about it, the most we can say is that time off as a manager affects your opinion of your programming skill poorly, and time off as an artist affects your opinion of your programming skill well.
I have another point also. I'm not disputing that time off affects your memory of particular APIs. But those APIs change so quickly that trying to hold onto an API is like trying to tell somebody that because you love their smile at a particular moment, they should never change their expression. You might as well try to bottle the wind. The APIs change rapidly for a reason, and you don't really need to catch up on all the changes - just the latest ones.
There's a very, very big flaw in Rob's statement here:
4 years could include 2 or 3 new versions of your language.
Consider how different this sentence would be if Rob wasn't assuming that you use one language, you choose that language, you settle on that language, and four years later, even though you haven't written any code in it over the past four years, that language is still your language.
4 years could include 2 or 3 new languages you might use.
Suddenly it sounds like fun!
All you have to do make it fun is decide that languages are toys to play with, not treadmills to run on.
If you want time off from programming to be good for your programming skill, choose a way to spend that time off which will be good for you in general; and if you trap yourself in any particular language, confusing your choice of a tool with your choice of a spouse or a religion, the loss of flexibility you subsequently experience may have nothing to do with any time off you may take.
Time away from programming is very, very healthy, and you should definitely take it now and again.