Software engineering involves the writing of code, but more than anything, it involves the management of complexity. Almost anybody can learn to write code – if you’ve had any interest in learning, you should try it out. But not as many people enjoy managing complexity, and that’s where the real challenge lies.
Life is the same way. In terms of systems theory, humans are the ultimate “medium number systems” – there are so many variables that make up life and our interactions with the world and others, pinning these systems down and forming cohesive theories is extremely difficult. This is born out through all the political, social, and economic debates that rage across the world.
But what about complexity at the individual level? How do we manage the complexity and stress we face as individuals?
I’d like to posit that stress is the collision of dependencies in our lives beyond which we can comfortably manage. In software, a system becomes unmaintainable and un-improvable when the dependencies are not properly designed or managed. The greater these dependencies, the greater the complexity, the greater the necessity for being able to “figure it all out”.
A recent work project had me trying to fix a bug on one single page. This page was so poorly designed that the change was nearly impossible to make without breaking other pieces of functionality. What was originally estimated to take 2 days ended up taking 2 weeks – it was simply impossible to disentangle all of the dependencies to get at the final solution. In agreement with my team’s assessment of the situation, I had to “hack” it with a sub-optimal solution that fixed the behavior, but not the problem, which will be dealt with some other time.
And this is what people often do as well. Instead of fixing the sources of their stress, they take a class on meditation, or they set aside time for themselves, or they read some self-improvement book, or they try to earn more money. What people often aren’t doing is choosing not to commit to new projects in the first place. They’re not finding ways to avoid their subscriptions, or avoid needing their cars so much. They’re having larger families and wondering why they’re so stressed out, or they’re taking on big monthly payments for new things.
And it’s not that any of these things is bad in itself, but all of these things increase the complexity in our lives, and therefore increase the cognitive load not only to maintain, but also to survive the lives we’ve created for ourselves. We are often our own worst enemies.
Here’s a rookie software mistake: defining a variable in two places, modifying the value for one, and forgetting to modify the value for the other. What you need to do is find a way to make that variable global to the context, meaning it can be accessed from one place for each of its references. Sure, you can spend money on 5 streaming services, but maybe the shows you want to watch can be checked out for free from the library. Now that’s how you refactor!
There’s another concept in software called YAGNI, meaning “you ain’t gonna need it”. It’s a message about removing variables and methods that aren’t being used. When something isn’t being used, you remove it. It’s pretty silly to have a system full of functionality that doesn’t serve any purpose, as it increases mental overhead just being there and getting in the way. In the same way, don’t have gym subscriptions you don’t use (unless you signed a 2-year contract 3 months before a pandemic…fuck…). Don’t have extra cars you don’t use. Don’t buy books you’re never going to read. Don’t buy tools you can rent for free and will only need once or twice in your life (that one’s for me). Don’t keep a basement/garage/attic full of stuff you never use, either. All this does is cost money, increase complexity, and become a pain in the ass when you’re trying to find the function that actually matters to your life. You ain’t gonna need it.
I think one reason we build up so much unnecessary complexity in our lives is the normative cues we receive from society. New cars, car collections, posh apartments. Everybody else has junk, so we go along with it. Everybody else is busy, so we become busy, and who wants to be a bum in the eyes of everyone else? Aren’t we all supposed to be doing big, important things? Volunteering at the homeless shelter? Participating in 5 mid-week church events? Rioting and smashing cars in the name of social justice like a bunch of idiots?
Sometimes these cues are passed on to us from our parents. But our parents aren’t perfect, just as we aren’t perfect. I try to challenge the habits I’ve picked up from my parents. Some of those habits are good, some are not.
I use the same examples over and over again because I think they’re powerful, but if you find yourself worried about your car – maybe it’s making noises and you don’t know what they are from, or maybe you do know what they are from but the repair is expensive – imagine simply not needing your car! Would you be less stressed?
Or let’s say you’re stressed because your workplace is toxic but you don’t know how to get out. Imagine you have five years of expenses saved up in cash and you’re basically free to walk out and take your time finding a new job. Would you be less stressed?
Decrease complexity! Generally speaking, this will decrease your stress.
Now, life is complex no matter what. There aren’t many software systems that completely avoid complexity and are still commercially viable. There is also a sense of hormesis around all of this. Rich, spoiled children grow into adults that sometimes aren’t able to handle the stresses of life and society. That’s no good. I don’t think the purpose of life is to eliminate stress. After all, some stress can be a good thing, and can encourage us into better lives. For example, my short excursion on the Colorado trail this year was stressful and kind of scary, but I’m so glad I did it. That was a huge step for me, but it was pretty amazing to achieve, simply because it was so far out of my comfort zone. But never mistake the natural stress of life for the stress that we create for ourselves.
In other words, mitigating stress only goes so far. Avoiding the things that cause you stress in the first place is a better idea. For that you need to ask yourself what exactly it is that is causing you so much stress, and work from there. Here I think it’s helpful to also calculate an ROI for these stressors, as some have greater weight than others. Nobody simply goes about refactoring a whole system – they identify the most important parts that need refactoring first.