I had a dying battery day yesterday. My mouse batteries died a day after I replaced them. The kitchen scale batteries died. My little clock near my computer had a dead battery. I went back and forth to the battery box several times yesterday.
Things break. In fact, the Second Law of Thermodynamics says that things run to disorder, to chaos. The system devolves into disorder. That means all the batteries die at the same time.
It also means you get a cold when you’re busy. (That happened to me last week.) Or, that everyone on your project wants to take vacation at the same time. Or, that you get a flat tire on the way to the airport or some other version of Murphy’s Law.
I actually think there’s an easier answer for why all the batteries die at the same time. We replace the batteries or add more appliances/tools/whatever at the same time so the batteries go at the same time.
What can you do about the general evolving disorder? It depends. Here are things I do:
- Wait until the disorder occurs and then fix it. That’s what I did with the batteries.
- Wait until the disorder almost occurs and then prevent more. I have a plan to clean up my office this weekend. Some people might say disorder has already hit my office, but I don’t think so. I still have at least one surface I can write on.
- Keep things maintained and as close to “perfect” as possible.
I recommend the last idea, the preventative maintenance for us as humans, for code, for everything we can use it for. That’s because the cost of solving problems later is so high. The cost of doing preventative maintenance now is much lower.
We wait for some problems to occur because the cost of fixing them is small. That’s the battery issue.
We recognize we might have a problem so we can intercede and fix the problem while it’s still relatively inexpensive to fix. That’s my office cleanliness.
The other kinds of potential problems require vigilance. I work out, I watch what I eat, I take care of myself with regular preventative maintenance. I get my vaccines, and flu shot, all that kind of stuff so I don’t have a big problem later.
Deciding when to solve problems is a form of risk management. I can’t have perfect risk management—Murphy’s Law and the Second Law of Thermodynamics say so. On the other hand, I can decide when to address which problems.
The earlier I address certain problems, such as taking care of myself, the less entropy and the better my long term outcome. No guarantees, but I’m better off. For the teams I coach, the earlier they address code problems, the easier it is.
The later I address certain problems such as battery replacement, the easier it is. As long as I have new batteries to replace the old ones, it’s no big deal.
And, some problems fall in the middle, such as my office cleaning.
It’s useful to consider which kind of a problem you have, the risks you might have, and then when you might want to address those risks.
That’s the question this week: When do you address this problem?