A lot of good advice here, adding my recipe for avoiding burnout (~15yrs into my career):
Delineate between not enjoying your job vs. not enjoying your profession. Sometimes getting a new job in a better work environment and especially with a better manager helps immensely.
Get a new job that is adjacent to software, like technical program management, sales engineer, developer evangelism, etc. Here you can still leverage your extensive programming experience but not have to code. For me - I quickly re-discovered my love for programming.
Treat your employer like your customer. This lets you side-step all the petty office politics, the rat race for the next promotion, etc. which are big contributors to stress-related burnout. Your customer is paying a fair market value for your services - the day that does not hold true, you part ways. No hard feelings.
Delineate between not enjoying your job vs. not enjoying your profession. Sometimes getting a new job in a better work environment and especially with a better manager helps immensely.
Get a new job that is adjacent to software, like technical program management, sales engineer, developer evangelism, etc. Here you can still leverage your extensive programming experience but not have to code. For me - I quickly re-discovered my love for programming.
Treat your employer like your customer. This lets you side-step all the petty office politics, the rat race for the next promotion, etc. which are big contributors to stress-related burnout. Your customer is paying a fair market value for your services - the day that does not hold true, you part ways. No hard feelings.