How To Know When It's Time To Go
I retired in 2021 at 63.5 after about four decades as a programmer. What made me do this was not failing ability in any way, but after a year of consideration, I realized I didn't care to do it anymore.
Everyone will eventually reach a point at which they can no longer do what they spent their lives doing—but it's not just about retirement; it can happen at any time earlier as well. I've known people much younger than me who became obsolete due to their chosen technology going away or people who simply got tired of writing code or, more commonly, doing it as a job.
Of course its not only programmers, it happens in everything including sports where professionals keep playing beyond their ability (often to make a bunch more money), and even politicians who exceed their limit (currently on view as both US Presidential candidates should not run but won't quit). It can be that you cannot do it anymore, have a lack of desire, a bad job market, obsolete technology, or are discovering something else worth doing. In my life, I've seen all of those.
I knew a young programmer a decade ago who left his CS degree because he was making tons of money shipping mobile apps, he even wrote a book on it, and started several companies. But he burned out and discovered he no longer cared, started a Jeep dealership, then started a land clearing business (riding bulldozers all day) and enjoyed all of that more, plus had more consistent success.
I knew someone who got a CS degree when I was getting my Chemistry degree and spent his career writing only mainframe systems code. Eventually, the mainframe was abandoned, and he had not learned anything else, so he had to work installing network cables. Another team at a place where I worked bragged about how great their technology was (4GL tools generating RPG2); a year later, they were out of a job, and the tool was obsolete. Sometimes, the world passes you by.
You probably don't know any retired programmers—back in the early 80s, when I started, there was only a tiny percentage of programmers compared to today, and over the decades, many gave up, became managers, or became obsolete. So, not many remained writing code long enough to end their career still writing code. Among those who I knew that started when I did, all that remained forty years later were doing legacy work; I was the only one still working on the leading edge of things (in my case, iOS in Swift for a very large company). It's hard to sustain a career that long in an industry with insane amounts of change.
All of you reading this (programmers anyway) will eventually hit a point where you can't do the job anymore for one of the above reasons. It's important to be honest with yourself. Are you keeping up to date sufficiently to continue the job? Is the job even interesting anymore, or is there something else you would rather do? Maybe your programming is not fun, or perhaps it's no longer challenging enough. Despite how unfulfilling it is, I've known people who enjoy the paycheck, do boring work, and keep doing it. That's a choice, but I was never satisfied with that.
It's not only quitting programming that you might consider; the biggest reason to quit may be that your job is not worth doing and that you need to find another one. I've quit perfectly good jobs (and some terrible ones) because I did not find the work interesting, the direction terrible, or a hostile workplace. Naturally, some employers went out of business or laid people off, but I left those jobs involuntarily! A different kind of programming or a different industry could revive your interest. The key is still to be honest with yourself. I've known people who left a high-pressure, high-salary job, started a farm, or began a different career. It's not worth working and being miserable.
Some time ago, I knew a programmer with the same number of years of experience as me. Yet he seemed unable to comprehend what was required of him, and I had to review everything he wrote because it rarely worked; for example, he would copy and paste code but include extra lines that did nothing. I still have no idea how you can work for 30 years and be unable to do even simple things.
None of this says that you should discriminate against people simply due to their age. Age and ability are not correlated. I've known people older than me who were brilliant and some that were incapable, like the previous person. I've seen 20-year-olds who could write anything successfully and others who did not understand simple concepts. Thankfully, I saw little age discrimination besides a few interviews where the interviewer had that look on their face: "Oh no, an old guy." Especially in my last three employers (covering about a decade), each valued everything I did.
When I announced my retirement (with three months' warning), my leaders were shocked. They couldn't comprehend why anyone would retire. One of them, whom I had worked for for two of those jobs and always made his life easier, never spoke to me again or even said goodbye. I still talk with some of my peers and team, and knowing how downhill the work has gone since (although the money got really good), I would have left anyway. I like making a difference and being challenged to do things and work that matters. Money is nice, but I liked making that difference.
Everyone eventually reaches a point where a job, an employer, an industry, or even their entire career ends. It feels better to be honest and make an informed decision rather than discover you are falling behind and possibly being forced out. It feels better to leave a bad job instead of hanging on until your hair falls out, even if the next job is equally terrible (I've been there). Your career is yours; it's up to you to make the most of it, even if you end it.
I still write code every day in support of my generative art practice. The code is much more complex than anything I did previously, and much of it does not have anyone else doing it, so it's a lot of invention, which is fun. While I miss certain aspects of my final job, I don't miss the eternal pressure, long hours, bad executive decision-making, and endless changes. I do miss being a leader and seeing things we wrote being used by our many customers.
Programming can be a fun career, a horrible nightmare, or something in between, and it never stands still. I enjoyed the good parts, tolerated the bad, and switched technologies, industries, and employers often enough to keep it going for four decades. That's long enough.