Recovering from burnout for me (I&#x27;ve been hit twice - once when I got out of school, once more recently from a truly terrible work environment) takes about half a year of avoiding programming, but I have other issues (anxiety, depression) that come with the burnout. It&#x27;s easy to tell now that it&#x27;s happened twice - there&#x27;s this pretty deep unwillingness to code coupled with a kind of fog that comes with reasoning about your programs that makes your work inferior to your 100%.<p>If your job is nasty like mine was, I know it&#x27;s hard to start moving on but you have to switch. The longer you let yourself be burned out, the longer it takes to get back to 100%. I&#x27;ve made a certain set of choices that let me pursue a graduate degree and I feel much better, but you have to be on the lookout for abusive situations. For me, it&#x27;s about 3 to 6 months of laying off of work. But really, extricating yourself from whatever situation is bothering you is what you want to do.<p>Avoiding burnout is pretty simple - be in an environment you like, surrounded by people whose company you enjoy, spending your spare time doing healthy things (exercise, going out, meditating, whatever works for you) that aren&#x27;t related to work. Avoid indulging too much in vices like drinking, smoking, and drugs. Take breaks when you work, stand up, stretch, walk about. Sitting down for too long makes you stiff and feel stagnant. Take your vacation days when you feel worn out. Do what you can to make sure you&#x27;re healthy and happy. If your employer feels threatened by you taking care of yourself, you find a new job.<p>Basically, work is a function of your competence, willingness, and emotional state. You do your best when all three of those are at max.