The Martian, Apollo 13, and the engineering mind
The Martian is one of my favorite books of 2015. If you are unfamiliar with the story, I’ll give you my poor summary. When Mark Watney is accidentally stranded on Mars, he has to use incredible problem solving skills to keep himself alive until scientists and engineers on Earth can use their skills to bring him home.
Many moments in the story hinge on detailed math, physics and chemistry. Engineers are the heroes, and they win with their brains. Obviously, this is great fiction for a nerd like me.
What stuck with me after reading the novel is how Watney and other NASA personnel approach problems. Upon discovering that he has been stranded, Watney allows himself a few expletives but immediately starts solving problems. He begins doing math, running experiments and using his engineering mind.
This attitude and approach is something NASA selects for when hiring real astronauts and then drills into trainees every day.
I’ve been thinking about how to apply this admirable and proven approach to my work as an engineer (with my admittedly less life threatening problems).
I think you can boil it down to a three part quote from the great NASA movie: Apollo 13.
As Gene Kranz says:
Let’s everybody keep cool
When a problem comes up, I have a natural urge to freak out. I worry. I start thinking about the worst case. I imagine more disasters.
You can’t do anything in this state. You have to take a breath, realize that all of this friction only exists in your head, and move on to step 2.
Let’s work the problem…
Step 2 is “Work the problem.” To work the problem is to actively and with scientific rigor search for a solution to the problem in front of you. Working the problem means using the scientific method and doing experiments. Collecting data. Using math. Following a procedure and staying on task until you find the answer.
You don’t work on a different problem— not the one you wish you had, the next problem, or one that might happen later. You don’t speculate or let your emotions cloud your judgment— which brings me to the third point.
… and not make it worse by guessing.
This is amazing advice for software engineers. Computers are so logical, and each line of code is so apparently reasonable by itself that we get fooled. We don’t realize how much we don’t know and how complex the things we make are. Every programmer gets caught in this trap from time to time, but the inexperienced and stubborn are particularly prone.
Do you ever fix a bug without reliably reproducing it? How often do those bugs reappear later? Ever tell yourself or your peers that some code can’t do something that it clearly is doing? Ever refresh a page a dozen times to look at the same “impossible” output instead of opening the debugger?
If you are doing this the best case is that you are stuck and not moving toward a solution. The worst case: you are making the situation worse by introducing code that doesn’t actually work, adds technical debt, deceives other developers and has bugs of its own.
Don’t make it worse by guessing.
Next time you feel lost in space, just remember: “Keep cool. Let’s work the problem and not making it worse by guessing.”