Empiricism: Using Science to Solve Complex Problems

John Clifford
CodeX
Published in
11 min readJul 28, 2021

--

Recently on a LinkedIn forum, a poster mentioned that empiricism was not scientific, that “Agile software ‘engineers’ use empiricism but that’s because there is no science (yet),” that “inventors use empiricism, professionals use science.” I disagreed, and so he asked me “Do you really have faith in a car mechanic to fix your car based upon empiricism?” My answer was, yes… because not only have I seen it, I’ve done it!

This is a story I’ve told a few clients, to make a point about how to solve problems… and how not to. Sometimes during a seminar or in a meeting, and sometimes while we’re discussing issues over a drink after work in a local bar. Let me tell you about it in the same way, a story between friends… a story about a software engineer who used empiricism to fix a car. There’s a love angle to the story so it’s not all nuts and bolts. Yes, it’s a true story, a much younger me is the protagonist, and yes… empiricism was the approach used so that the hero could get the girl.

Photo by Weston MacKinnon on Unsplash

I’m going to stop occasionally to ask you a simple question. It’s the same thing I do when I tell the story in person and it’s the same question, asked repeatedly. The answer is both unimportant and very telling… that’s why I want you to record your answers as the story progresses. I promise you that I’ll give you the answer at the end, but no peeking! When I’m done, I’d like you tell me whether you believe empiricism is a sound basis for rational problem analysis and solving.

In the late 1980s I was in my mid-20s and working as a software engineer at a telecommunications software startup in Baton Rouge, Louisiana, where I started dating an LSU coed who spent her weekends barrel racing. For those unfamiliar with barrel racing, it’s a rodeo event that tests both rider and horse, where women compete on horseback to see who is the fastest at riding around barrels. The mounted rider starts just outside a corral with three barrels placed in a triangular shape, with the goal being to take the shortest path while riding a full circle around each of the three barrels. My girlfriend was good at it, but as an amateur rider, she had to make her way to the area rodeos, pulling her horse in a trailer behind her late 1970s Chevy pickup. I tell you these things to set the stage for a critical problem-solving event, not to brag about my then-girlfriend’s considerable athletic prowess or about how I had such a hot woman as my girlfriend. Okay, maybe just a little….

A barrel racer rounds a barrel, rider and horse leaning dramatically
Photo by cjuneau under the Creative Commons Attribution 2.0 Generic license

Shortly after we started dating, I called her up on a Monday to see how her weekend went and if she wanted to get together for dinner. “I can’t,” she said, sounding distressed. “My truck didn’t start this morning, and I missed school and work. I have to get it fixed.”

“How about I take a look at it?” I asked.

“You think you can fix it?” she said. I told her I didn’t know but that there was a good chance I could. “You get my truck fixed and I’ll buy you dinner!”

“It’s a deal,” I said.

Question for the reader: Why won’t the truck start? What’s the problem? Write your best, most honest answer down before proceeding, and at the end of the article I’ll provide all of the answers to check yours against.

I smiled as I hung up the phone… dinner was on. What my new girlfriend didn’t know about me was that I spent my teens working on cars, from necessity. I was too poor to buy anything decent, so the first three cars I purchased were in dire need of mechanical assistance. I had to learn how to do a brake job, how to pull a radiator to get it cleaned and how to change the thermostat, how to remove and rebuild a carb, and how to diagnose and fix electrical problems, even how to pull an engine, tear it down to its individual parts, and rebuild it (I hate Ford Pintos to this day). And, even though I’d learned about the Scientific Method in college, I really never thought about it or how it applied to problem-solving, but I was (and still am) an excellent problem-solver. While I didn’t know what the problem was, I felt very confident I could solve it.

Note to the reader: we always know more about things than we think we do. You already have a lot of information, but do you realize it? What do we know about this truck? What can we deduce? How will that help us narrow down the list of possible problems? Think about it for a second before continuing.

I swung by my apartment after work to clean up a little and to get my tool chest. I didn’t grab a t-shirt, something I probably should have since I was wearing a white button-down oxford shirt and blue jeans. As I drove I thought of what I did know. I know she drove her truck to the rodeo this weekend, and I know she drove back to school last night. Therefore, chances are it’s something simple. I pulled up to my girlfriend’s house (she was staying with an aunt, who was a professor, while at school), and she opened the door as I walked up. “Do you know why my truck won’t start?” she asked, seeing my smile.

“No, but I know how to find out,” I answered. “Do you have your keys?” She nodded. “Good… get in there and fire it up.” I lifted the hood on the truck as she climbed in. “Go ahead, start it.” She turned the key. Instead of the truck starting, I heard clunk-clunk-clunk-clunk-clunk.

Question for the reader: Again… why won’t the truck start? What’s the problem? Write your best, most honest answer down before proceeding.

Hmmm…. The solenoid is chattering. (The solenoid is a high-amperage relay that is triggered by a low-amperage switch… in this case, the key in the ignition switch, when rotated to the ‘start’ position, closes a switch to the solenoid which then energizes the relay that carries the full voltage and amperage from the battery to the starter, rotating the crankshaft quickly enough to get the engine to start running. When the key is released, it returns to the ‘run’ position, de-energizing the solenoid and thus turning off and disengaging the starter but allowing current to run to the ignition system so the engine keeps running. The solenoid is needed because the tremendous demand for current required to run the starter and turn over the engine would burn up the smaller ignition switch. It’s a very clever solution to a problem.) I knew that a chattering solenoid meant that there was insufficient voltage coming from the battery… that as the starter tried to engage it drew enough current to drop the voltage down so that the solenoid would disengage and then the voltage would rise again, the cycle repeating as signified by the chattering solenoid.

Question for the reader: Again… why won’t the truck start? What’s the problem? Write your best, most honest answer down before proceeding.

A gasoline engine needs three things to run: air, fuel, and ‘spark’ (electricity). Sufficient air must be available through the intake system to provide enough air so that the fuel will burn, sufficient fuel must be available to combine with the air in the right ratio (mixture), and the fuel/air mixture needs to be ignited by a spark (electricity) so the engine fires up and runs. All of these things must be present, otherwise the engine could not run.

Now, I didn’t know if the truck was getting sufficient air or fuel, but I did know that it had driven hundreds of miles the previous day, and thus there was no point in worrying about these things yet when I could see an immediate problem: there wasn’t sufficient electrical current available from the battery to even run the starter… but I didn’t know why. There could be several reasons… a dead battery, a bad battery cable, a bad solenoid, or a bad starter. I didn’t know if the lack of current was the problem, or if it was a symptom.

What do we do when we know we have a problem and we believe we have narrowed the list of possibilities, but we’re not sure exactly where the problem lies? In America, there’s a term we use to describe an expensive way to repair an automobile that is often used by incompetent mechanics… ‘shotgunning.’ This refers to the practice of haphazardly replacing any and all components that might possibly be at fault. In short, aiming indiscriminately at a broad target knowing we are ‘hitting’ more than we need to but hoping that our wide ‘pattern’ will hit the faulty component.

I could have told my girlfriend that we needed to spend several hundred dollars replacing the battery, the battery cable, the solenoid, and the starter… but that would be very expensive, take several hours to remove and re-install the parts… and most auto parts stores were already closed. When would I have the time to do the work? Even worse, what if I didn’t get the faulty part? Did she even have the money readily available? More important to me, at least, was that I wanted to stay on her good side; most people aren’t kindly inclined towards someone who gets them to spend several hundred dollars for no benefit.

The problem with using a random approach to problem-solving, i.e., shotgunning, is that what if the problem isn’t caused by one of the many parts that were replaced? What if the problem is intermittent, the mechanic didn’t replace the faulty part, but after the indiscriminate fix the car suddenly works… only to fail later and leave the driver stranded? If you don’t know why your fix works, you didn’t fix it. That is true for auto repair, for software defects, for process issues… it’s a general rule for evaluating a solution for any problem.

No, the better solution is to utilize empiricism, probing the system based upon assumptions to get those assumptions validated or invalidated. Sometimes, the best way to identify the root cause of a problem is by a process of elimination… by ruling out things that aren’t the problem. In this case, there were four likely possibilities: the battery was weak or dead, the battery cables were not making sufficient contact, the solenoid was bad, or the starter was bad. It pays to start with the things that are easiest to check, like the battery. I knew one way to check for sufficient power in the battery. “Turn the headlights on,” I called out. I stepped back from the bumper so I could see the headlights. They came on, but were very dim.

Question for the reader: What’s the problem? Write your best, most honest answer down before proceeding.

Hmmm.… I stepped back up to the truck, looking at the battery closely. There was an electrical issue, but was that the problem? The battery was clean, unusually so, considering how dusty and dirty the rest of the engine compartment was. I looked closely at the battery cables. The negative cable was fine, but the positive cable showed signs of recently-cleaned corrosion. “Did someone work on your car recently?” I called out.

“Yes,” my girlfriend replied. “My brother cleaned my battery.” Maybe he didn’t tighten the cables. I grabbed the negative cable at the battery connector and twisted it. It was solid. I moved to the positive cable. It was also attached solidly, but as I twisted on the cable I could feel crunching inside the insulation. My shirt was suddenly brightly illuminated by the headlights.

I stepped back and moved to where I could see her. The headlights were still blazing. “Try it now.” She turned the key and the truck fired up instantly.

“You fixed it!” she said, jumping out of the truck and running up to me, a big smile on her face.

“No,” I said. “Do you want the good news, or the bad news?”

“The good news,” she said, a little crestfallen.

“I know what the problem is, and I can fix it easily and inexpensively.”

“Then what’s the bad news?” she asked.

“I’m going to get a little dirty so you’re going to have to cook me dinner.” I got a playful punch for that.

Question for the reader: Okay, you know everything I know. What’s the problem? Write your best, most honest answer down before proceeding.

The correct answer to every question, except for the very last one is, “I don’t know.” If you wrote down “the battery,” or “the starter,” or “the solenoid,” or anything else except for “I don’t know,” you were guessing. This is critical: when you guess the answer without sufficient knowledge and understanding to be absolutely certain of the answer, you will likely get the wrong answer. Don’t guess! Use empiricism (for complex domain problems) to gather sufficient information so as to reduce uncertainty to where you can effectively utilize a root-cause analysis technique.

Here’s the problem: a partial break in the positive battery cable just after the clamp, caused by several years of corrosion and likely exacerbated when her brother twisted off the cables to remove and clean the battery. This twisting along with vibrations during the drive back to school in Baton Rouge caused the cable to fail to where it couldn’t carry sufficient current to run the starter or the headlights. When I twisted the cable, I brought enough of the corroded and broken strands together to bridge the circuit, hence the headlights suddenly blazing.

The solution: if there was enough cable remaining, cut the clamp off and replace it. Otherwise, buy a new positive battery cable. I cut the old terminal off past where it was corroded to good cable, and the remaining part was more than long enough to re-use. After I washed my hands, we hopped in my car and went down to the local auto parts store where we picked up a new clamp-on battery connector. It cost $1.49… far cheaper than a new battery, cable, solenoid, and starter. When we got back, it was a few minutes to install it, hook everything back up, and re-test the truck to ensure it started. And then it was time for dinner… and the start of a beautiful relationship thanks to empiricism.

Photo by Misael Nevarez on Unsplash

Where was the empiricism? “Start the truck.” “Turn the headlights on.” “Did someone work on your car?” “Try it now.” Probe, sense, respond. As with any problem that is in the complex domain, one simply can’t sit down at a desk and devise the correct solution through analysis. Instead, you have to use empiricism, you have to have assertions you can test and either validate or disprove, until you have gathered sufficient information to support effective analysis. You must have a basic understanding of the problem domain, you must gather some knowledge, and then you have to learn by probing… by trying things to get a response that provides some direction. Only after you have gathered enough knowledge will analysis be effective.

So, to those who say that empiricism is not science, not something used by professionals, I strongly disagree. Empiricism, whether you call it inspect-and-adapt or PDCA or the Scientific Method, is the foundation of science. Thus, when someone asserts that people use empiricism because they don’t understand the ‘science’ behind what they are doing, they are wrong… and yet they are partially right. Empiricism is the only way to ‘science’ your way through a complex domain problem. The problem is, people think empiricism is trial and error, guessing randomly. It’s not. It’s feedback-based learning, starting from a hypothesis, a theory of why something is or isn’t, and then testing our hypothesis in a way that tries to disprove it. The answer to our test either tells us we’re on the right track, or that we don’t fully understand the problem. Either way, we’ve learned something. So, don’t guess. Science your way to a solution using empiricism.

You can do it.

Tags: #problemsolving #empiricism #scientificmethod #pdca #scrampede

--

--

John Clifford
CodeX
Writer for

Recovering software engineer, manager of engineers, and consultant. See my bio on LinkedIn: https://www.linkedin.com/in/johngclifford/