Vienna in the 1840s was a scary time and place to give birth. From 1840 to 1846, 7% of women who gave birth at the Vienna General Hospital died of a postpartum infection called childbed fever. One doctor at the hospital, Ignaz Semmelweis, made it his mission to stop the disease. His work saved hundreds of lives, contributed to the development of medical hygiene — and can teach us a few things about debugging.
As I learned from an episode of Stuff You Missed in History Class, when Ignaz Semmelweis began working at Vienna General Hospital, it was a teaching hospital divided into two clinics: the doctors’ clinic and the midwives’ clinic. The two clinics accepted patients on alternating days. If a pregnant woman was lucky, she went into labor on the day the midwives’ clinic was accepting patients.
Quoting from the episode:
At the midwives’ clinic, between 1% and 2% of patients died of childbed fever. And at the doctors’ clinic, the rate varied from 5% to 30%, with an average of about 10%.
This difference between the two clinics was so huge and so well-known that laboring patients who were told that they were being admitted to the doctors’ clinic would beg to be sent to the midwives’ clinic instead. Some even gave birth in the street outside the clinic after hearing that it was the doctors’ day for admission…
Semmelweis noticed that even these births out in the street were safer than giving birth in the doctors’ clinic at the hospital. He wrote, “To me, it appeared logical that patients who experienced street births would become ill at least as frequently as those who delivered in the clinic. What protected those who delivered outside the clinic from these destructive unknown endemic influences?”
He became completely fixated on this question. It was appalling and deeply offensive to him that there was such a huge difference between the doctors’ and the midwives’ clinics. So he started trying to figure out what was different between the two clinics and then making adjustments to what the doctors were doing.
At the midwives’ clinic, patients lay on their sides to deliver. But at the doctors’ clinic they lay on their backs. Semmelweis changed the procedure at the doctors’ clinic to use side-lying, but that didn’t make a difference.
He also noticed that anytime a patient was dying in the doctors’ clinic, the priest who was arriving to give last rites basically had to walk through the whole ward, and he rang a bell while he was doing this. Semmelweis thought maybe this bell and what it signified was so terrifying that it was making people sick. So he got the priest to stop it with the bell. That did not fix the problem.
He looked at how crowded the two clinics were, and it turned out that the midwives’ clinic was, understandably, far more crowded. He looked at the religious practices of the people working in each clinic. He looked at the patients’ diets, and none of these things seemed to make a difference.
Then his friend and colleague Jakob Kolletschka died of what appeared to be childbed fever after accidentally being nicked with a scalpel while performing an autopsy on someone who had died of it. And Kolletschka’s own autopsy results were very similar to those of childbed fever victims.
That’s when Semmelweis realized that midwifery students weren’t performing autopsies as part of their training. Only the medical students were. Another difference was that the medical students were performing vaginal examinations on their patients as a routine part of their care, while midwifery students only did so when there seemed to be a need for one.
Semmelweis’s conclusion was that some kind of cadaverous particles were being transmitted from the autopsies to the patients in the doctors’ clinic.
In mid-May of 1847, Semmelweis started instructing doctors and medical students to wash their hands after conducting autopsies. They were to use chlorinated lime until their hands had no trace of the putrid smell that was left behind by a decaying body…
With Semmelweis’s hand-washing protocol in place, the rate of childbed fever mortality in the doctors’ clinic started to drop.
I was struck by how this narrative mirrored the notes I’ve left behind on many a bug in my team’s case tracking system. A long list of “Tried X — no change” followed eventually by “Noticed Y — Aha!”
We software developers should talk more about debugging. I spend a lot of time debugging, yet it’s not something I was ever taught much about. I’ve learned from experience and from watching other people who are good at it.
People in other fields do work that is essentially debugging by a different name. Detectives, scientists, plumbers… and of course doctors. We can learn from their stories (fiction and nonfiction).
So, what can we learn from Ignaz Semmelweis’s story?
If possible, compare a working version to a non-working version. Semmelweis compared the doctors’ clinic to the midwives’ clinic and to street births. In software, if something used to work and now it’s broken, you can compare to an earlier version. If you can’t seem to get an API to work, you can compare your code to example code.
Come up with hypotheses and test them. Luckily, you can do this without risking any patients’ lives. Or even inconveniencing anyone, assuming you have a sandbox or test system in place. Don’t be discouraged if your hypothesis is wrong. You’ve made progress by ruling it out.
Pay attention to things that seem odd. Sadly, Semmelweis lost his friend Kolletschka. But Semmelweis realized it was odd that someone other than a postpartum patient had died of what looked like childbed fever. He could easily have dismissed the possibility that Kolletschka did die from childbed fever, since this didn’t fit his mental model of the disease. Instead, he asked himself “what if?” and that finally led to a solution.
One last lesson: If by chance you ever have to deliver a baby right after dissecting a cadaver, for god’s sake, wash your hands.