For an industry that prides itself on its analytical ability and abstract mental processing, we often don’t do a great job applying that mental skill to the most important element of the programmer’s tool chest—that is, ourselves.

“Keep to your dreams.” The posters and the memes are incessant. “Believe in yourself.” The exhortations are obvious. “Never give up. Never quit. Never stop fighting.”

I’ve been a software developer. I’ve been an architect. I’ve been a startup founder (several times), a manager, a university guest lecturer, a conference speaker, a corporate trainer, and a few other things to boot. Each one of these has in common one thing: I’ve walked away from them at some point or another to try something new, something different. Sometimes the transition felt like a natural progression (developer to architect, for example), and sometimes it felt like a wild step to the side (speaker and trainer to startup founder), but in each case, I had to look in the mirror, think about what I was doing at the moment, and say, “Yup, it’s time.”

In some cases, it was because there were other things I wanted to do instead. Those situations are the easy ones to grasp, because the thought of doing the new thing makes it pretty easy to think about leaving the old thing—it’s an A vs. B comparison that’s usually pretty easy to compare and contrast. Choosing to dump your current career as a host at a diner in order to pursue a career as a software developer, for example, is a pretty open-and-shut case. But choosing to walk away from twenty years as a software developer because you want to pursue opening your own restaurant—or coming to grips with the idea that maybe it’s time to close down the restaurant—those aren’t nearly as clear.

Economists often refer to something called opportunity cost, and the idea is simple but a little abstract. Formally, it’s “the loss of potential gain from other alternatives when one alternative is chosen.” Consider $100 in your pocket. You can spend this $100 on a book, but then you can’t spend that same $100 on a set of headset earbuds. Spending the money on one alternative (the book) means that you lose the potential gain you’d have gotten from the headset earbuds. And it’s not like you can avoid it—spending the $100 on the headset earbuds means you lose the potential gain from having bought the book! Either way, you’re losing something—and if you choose to just put the $100 in the bank, you’re losing the potential gain from both the book and the earbuds. For most of us, doing the mental math on the opportunity cost on actual currency is easy; doing that opportunity cost calculation on our time is much, much harder, and makes it that much easier to fall under the spell of motivational posters or that whispered voice in the back of our heads.

How do you know when it’s time?

Walk Away When….

No absolute formula exists that will work for all people, all the time, but here are a couple of thoughts as to when walking away is actually better for you than sticking with it. It’s time to walk away when:

Your health, mental, financial, or physical, is taking a toll. At some point, the cost involved in continuing in the current situation just doesn’t justify the return-on-investment. Professional athletes can tell when it’s time to hang up the spikes because their bodies simply don’t heal as fast as they used to, or they’ve “lost that step.” Financial trends are relatively easy to spot once you start looking at your financial records and “do the math.” Mental toll is just as important to track—and is incredibly difficult to track. Ask people close to you to give you their honest feedback about your mental state: Do you seem happy? Are you expressing frustration more often than hope, or disappointment more often than satisfaction? When we’re in the middle of a situation, it’s extremely hard to keep a clear eye on where and how we actually feel. But when you do finally figure out that the spend is higher than the income, it’s time to get out.

You’re not sure what the end game looks like. Everybody wants to stick with something until it’s successful, but what does “success” really mean? What’s your target, your end goal? Is getting a promotion really going to make the difference? For a startup, for example, it’s easy to imagine being the next Microsoft—but that almost never happens. What about acquisition? Or partnerships? Or selling your share to your partners and walking away grateful for the experience?

You can’t see how things can get any better. The boss that hates you isn’t going away any time soon. The coworkers you can’t stand are showing no signs of improving or being disciplined for their poor performance. The company’s financials keep tanking. Although nobody can predict the future, past performance usually is a pretty good indicator of what’s most likely to happen next, and sticking in it despite the evidence leading to continued downward trends isn’t perseverance, it’s insanity. If you can’t formulate a concrete idea of how things can get better, then they’re probably not going to. And if that “concrete” idea of things getting better involves winning the lottery—or something even more improbable—then you don’t really have a concrete idea.

There’s nothing left to learn. Failure teaches us a great deal about what we could do better next time, but at a certain point, there are just no more lessons left, only the feeling of being beat down. Again.

You’re more concerned about the time/energy/money invested already than what it will cost you to "stick it out." The Sunk Cost Fallacy traps all of the best of us, and the only way to get past it is to start counting from here going forward—and not include what all has already been spent. “I gave five years of my life to that company!” is just focusing on the past, not the future: Are you willing to give another five years?

Frequently, professional athletes, successful actors, or other high-profile folks will announce their retirement and when asked why, will reply with a simple, “It was time.” Like so many things uttered in the public limelight, this simple phrase usually masks hours and hours, if not weeks and months, of deep contemplation and reflection about their lives, position, and goals. If you’re feeling the same nibblings around the edges of your consciousness, but don’t want to face them, understand that most of what you’re afraid to face is the feelings of “being a quitter” or the fear that “if I give up now, I’ll never know if that next corner was the one that would’ve made me win.” Nobody can predict the future, but sometimes, that pivot, that willingness to turn away and try something new, is exactly what leads you to that success or “win” that we crave, too.

It’s okay to say “It’s time” and try something else.

Summary

Speaking of endings, it’s time. This will be the last editorial I write for CODE Magazine.

I’ve enjoyed the time I’ve had here; I’ve enjoyed reading the various responses that you have posted to me over Twitter, and the conversations we’ve had at conferences, and the exchanges we’ve posted back and forth over email and such. The CODE Magazine audience is a great audience to write for, and I’ve learned as much from you as I have anything else in my life. Walking away from a thing I’ve enjoyed is never easy, but when I did that same bit of reflection and meditation and examination of the future and what it held, a thought crystallized: It’s time to hang up the Microsoft Word template, and put the time spent on these editorials into other endeavors and projects.

My thanks to Rod Paddock for the opportunity to reach out to you for all these years. My thanks to the rest of the CODE Magazine authors for keeping the quality bar high and the “interesting topic” bar even higher, so that I could piggyback my words on the backs of your amazing work. Most of all, my thanks to all of you, the audience, for allowing me to put these ideas in my head down onto paper (er…Word doc), because forcing myself to do so made me think so much more deeper about them than I would have otherwise.

Douglas Adams put it best: So long, and thanks for all the fish.