Eat Your Vegetables
I was recently in an interview as a candidate with a couple of developers from the team that I might become a part of. Toward the end of the hour, when I was prompted to ask any questions I had, I asked my two standard questions:
- What do you like most about your job?
- What would you change about your job?
The second question is particularly useful in the context I was in where I'm talking with the folks that are actively doing the work on the product. It can give a lot of insight into the reality of the situation that I may be entering. In this case I heard a story I've experienced more times than I can count. It goes something like this:
I wish we could change the way we approach tech debt. There was this time that I came across some debt that could be paid down relatively easily, and I was asked by my product owner to quantify how many hours of productivity we would get back over the next year if we fixed it. How could I possibly know that?
My snarky response to this kind of situation is, "Can you tell me how much longer you would live if you reduced your cholesterol?" Unfortunately that retort doesn't accomplish my goal in that conversation, but it makes the point that sometimes we need to lean on best practices and observations of others rather than rigid modeling when considering priorities. In the story above, it's not that the product owner is trying to do the wrong thing. Their goal is to have objective mechanisms for prioritizing work in a for-profit situation. The problem is that it's not considering the whole picture. Let's explore a different analogy that might help us have productive conversations about tech debt as developers...
Donuts #
Donuts are tasty goodness. As a kid I could eat a dozen at a time. (Gross, right?) I don't know about you, but when one is in front of me, it's almost irresistible. "I'll just eat one." At a technical level, we could justify eating the donut by thinking about the caloric density. I mean, that's a lot of energy in that treat. It wouldn't take many to meet or exceed your daily caloric needs. And they're pretty cheap to boot. How efficient!
On the other hand, there are vegetables. They don't taste as good. They're not as calorically dense. Very rarely would you want brocoli over a donut. Yet we know that vegetables are better for us - long-term for sure, but also shockingly often in the short-term too. There are mountains of data that show the benefits of eating healthy. When you walk down the street you can probably pick out the people that eat more vegetables than donuts and vise versa, right?
Goals #
Let's say that we set the goal of becoming a competitive marathoner. It's a goal that requires a lot of effort over a long time to be successful. There are a lot of miles to be run on any given day and feedback to the system in terms of times recorded and checking in on the way we're feeling and all the data from [insert wearable tracker here]. It requires discipline.* Which of the following would situate us to accomplish the goal easier and to a higher degree?
- We have been eating only donuts for years and plan to continue doing so through our training.
- We have been eating healthy and will continue to do so through our training.
Of course #2! Duh. We know it intuitively. We don't need to model it out to prove to ourselves that it's the right decision with the goal we have in mind. If I asked you to tell me how much faster you'll be at the end of training by eating healthy, do you honestly believe that you could give me anything that resembles an accurate answer? Of course not. It would be absurd to expect that.
So then, if your goal as a business is to position yourself to be able to deliver the most value as fast as possible to your customers at the highest margins possible, don't you think it makes sense to eat your vegetables? (For those not following: Eating vegetables is analogous to making sure your code is clean.)
Good Enough Never Was #
There is an in-between. Maybe you were a donut-eater for a while, but you cleaned up your act and started eating healthier. You feel pretty good about how you're fueling the machine and you can run 12-minute miles for the neighborhood 5k. But you want more. Unfortunately you haven't quite been able to muster the gumption to shed the pounds that have persisted from the before-times. That's a tough spot. Sure, you're way better off than you used to be, but it would be so much easier to go faster and further if you didn't have the extra baggage. This calls for a doubling of discipline and deferring gratification. It's going to hurt for a bit, but think of the accomplishment on the other side of the investment. And, as you chip away, the chipping will get faster and easier. Think of the world of possibilities that will open up to you.
I've Lived It #
I've spent most of my career wading through - sometimes creating - tech debt. I've been in charge of trying to clean it up. It feels like trying to put out a dumpster fire that everyone else is pouring gasoline into.
BUT!
I've also lived the dream. I've been on a team that created the cleanest code you can imagine in your mind with all of the test coverage and linting that help keep it so. It was glorious. It was some of my proudest work by a lot. It also made it possible for the product to pivot on a dime with only a 1-pizza team. You think it's a pipe dream, but it's not. It's 100% possible, and the benefits are immeasurable. It's like inhabiting the body of a world-class athlete - like anything is possible.
Advice #
When faced with similar, frustrating conversations with teammates, remember:
We're on the same team with the same goals. We just see different paths.
If we lean on clear analogies, shared language, and evidence from our own experience and industry best practices, we avoid the trap of defending every cleanup task in terms of ROI. Instead, we help shape a culture where investing in clean code is seen for what it really is: fueling speed and agility. Every bit helps.
* Discipline is the ability to adhere to a long-term strategy** in every moment regardless of the short-term effect or consequences.
** A strategy is a set of principles that guide tactical decisions regardless of perceived degree of importance or difficulty.
- Previous: Music