If It Ain't Broke, Don't Fix It

June 19th, 2019

One thing I've always been astounded by at every level of my professional software development career is the response many of my coworkers will take to the phrase "If it ain't broken, don't fix it".

This is of course entirely dependent on the type of company you may find yourself working for, but I've been pretty fortunate thus far in the regard that most of the fellow software engineers at work have always tried to not only improve on things that already exist but that already work. Whether that's database querying, API request processing, the front-end user experience, etc. Amazingly, those around me are always pondering the same quandery: "But how can I make it better?".

It's a question that continuously runs through our minds and I love that.

"If it ain't broken don't fix it". What does that mean exactly? At it's core, I guess one could define it as that if something is still able to accomplish it's bare-minimum purpose, why even both trying to improve upon it?

I'm not the best programmer by any means. I find myself sometimes falling back into the lazy train-of-thought that phrase represents, but thankfully my mind can't help but think in the opposite direction when it comes to the code I touch.

Whether it was during school or now in full-time employment, I'm regularly being told to uphold these principles of fine-tuning my work even if it already does what it needs to do, and I will be forever grateful for that constant forced conditioning.

Because these practices don't pertain to just only software development. They can also be applied to many of life's hardships as you find yourself confronted with them.

Here's a personal example. My depression is something I've struggled with on a daily basis for years now. It often times feels as if I'm trying to claw myself out of deep holes that keep me trapped and feeling sorry for myself all day. Here's what I get a glimpse of every time I finally manage to emerge from one of these holes before I eventually fall back into the next one: A lot of things that work. Barely.

What I mean by that is, is that I found myself surrounded by things that sure maybe on the surface were doing okay, but could be greatly improved upon if I just exerted the extra effort.

That probably sounds obvious in nature. We all have things in life that maybe aren't going too well, but depression is an ugly, shadowy beast that can cover your eyes and prevent you from having the awareness to recognize even the most apparent issues.

I would be blind to giant fires screaming at me for water.

Once, when I had awoken from one of these bouts of depression and gained a semblance of cognizance to the world around me, I realized I had been sleeping on a broken bed frame for months. I had been unconsciously replacing these wooden planks and 2x4s every time they shifted and fell underneath my mattress for the longest time before realizing I should just spend 30 minutes to drive to Home Depot, buy new planks, and replace the broken ones. That was just never an option that crossed my mind because my depression prevented me from pursuing a solution.

It got to be that bad sometimes.

I'm currently attempting to expand this practice of what I like to call "mindful refactoring" out to more significant concerns. My career. My relationships. My appearance. My mental and physical health.

2019 was supposed to be my year of self-love and self-care and it only took getting half-way through it to realize I've been doing a horrible job in both areas thus far.

Am I actually satisfied at my current job? In my current relationship? With how I present yourself? Am I actually healthy or do I just feel healthy? These questions had apparent answers at first while my head was underwater, but when I actually took some time to critically consider each one before moving on to the next, I found numerous things in need of attention.

My biggest enemy was complacency.

I wasn't applying the principles I used every day at work to things that were exponentially more important than my code. The whole point of cleaning up and refactoring existing code, is that it'll make my life easier when more problems arise in the future. Like with my work, I should be constantly thinking about and finding ways to better improve these larger and personal aspects of my life, not leaving them alone. If I don't, the smallest thing could catapult me back into the dangerously safe comfort of the depression pits.

And that's what I'm focusing on now. Having this realization helped a lot.

"If it ain't broke, don't fix it". Fuck that.

Instead, I'm going to choose to be present and searching for of all the problems that maybe on the surface don't reveal themselves immediately.

Sometimes that requires a little help from others to find them. Sometimes you'll never become fully aware to those fires in need of water until it's too late, and I've accepted that too.

I also realized that that even if they're minuscule in nature, it helps to build up addressing smaller issues that in turn can give me the power to take on the larger ones. An important part of any engineer's job is to take large problems, and break them down into smaller, more easily-manageable ones. There have been billion-dollar companies and softwares created around specifically these types of concepts. But it's not a practice solely for those in engineering.

So although this nerdy little analogy about refactoring code is primarily penned towards maybe those in software development or tech, I hope this personal lesson finds its way to anyone else who may find themselves struggling. By attempting to write these goals into existence, maybe this is helping me too.

Even if it means just simply getting up out of bed to find breakfast, don't let the comfortableness settle in. Don't be okay with living and operating in a way that just works. Constantly challenge yourself to change your perspective, and fiddle around with it until it works even better.

All of this is easier said than done of course and life's problems, depression, and other mental illnesses in general can affect people in different ways, but whether it's your career goals, or even your physical health, at least attempt to strive for perfection. Just be okay if you don't quite hit the mark.

Martin Fowler, one of the most highly-regarded voices on clean design and refactoring of code, once wrote "It takes a while to create nothing". What he means by that is that it can take one a long time to refactor their code into more of a workable and reusable state, and sometimes at the end of it you'll not actually have anything new to show. That's okay.

We as human beings can never reach real fulfillment if we always leave our assets as just barely functioning. We'd spend too much time miserably maintaining the status quo, rather than improving.

Nowadays whenever I discover something that "ain't broke", I check again.