I took a neurobiology course in college and there is one lecture I think about often. The topic was addiction and the professor was reviewing the symptoms of withdrawal. Discomfort. Sense of Loss. In the specific case we were looking at, intense pain. One student raised their hand and asked “why can’t you just give them painkillers?” I’ll never forget the response: “You don’t understand. The pain is the rehab.” Drugs trick the brain into believing that drug seeking is more rewarding than food or sleep or rent. According to this professor the way to escape addiction was to re-associate drug seeking with immense struggle instead. There are treatments that help lessen the intensity but “the best way out is always through”.

“The destructive part of addiction comes not from the fact that the object of addiction is rewarding, but that this reward is a phony and unsustainable hack that subverts the healthy purposes of your brain’s reward mechanism.” - Keith Adams

While it may be that nothing compares to the struggles of addiction, we face an analogous problem all the time with products and engineering. We hack together a solution and don’t pay down the technical debt. We build a product that succeeds in the short term but can’t grow further. We look for quick fixes to these problems but at best kick the can down the road. People and companies bend over backwards to feel like they aren’t going backwards.

But at some point you have to embrace the pain to make real progress. Given two otherwise equal stories, humans remember the story that evoked stronger emotion. Emotion is how our brain triages memories. Sometimes it has to hurt for your brain to prioritize it.

When we were rewriting the privacy infrastructure at Facebook in 2010 it was painful. Tons of code had to be rewritten or rearchitected. In fact it was so painful that engineers went to great lengths from that point on to make sure their code complied. That’s what rehabilitation from technical debt looks like.

The other key ingredient is that you have to want the progress you get. If you don’t value where you will be on the other side of the journey then you aren’t likely to make it. I’ve seen good work fall by the wayside in favor of cheap hacks when people aren’t confident that what they are building will matter. Conviction is critical to success. That and a good plan.