Debugging Code with Dr.Gregory House

Gregory House (played by the awesome Hugh Laurie) is the chief protagonist of FOX's hit TV Show House M.D. He also happens to be in my top 5 favourite list of TV Characters of all time. Most likely an INTP, the character is modeled after Sherlock Holmes - only with repressed feelings and a overly expressed hedonistic streak. His curmudgeonic character provides the drive for the show's dry sarcastic humour which although seemingly heartless at times, nonetheless overshadows a highly insightful thought process while implying a deeper meaning. Every episode opens ones mind to new ideas about modern life and the human condition.

I think I'll stop there with my fanboy ramblings and get to the point. It so happened that while catching up on past seasons of House M.D I was also in that phase of my project which is fondly called as 'Bug Fixing Phase'. So I was fixing bugs in the software at work all day, only to come home and watch House fix 'bugs' albeit they were in the human body. The parallels between work in the software industry and the medical profession were laid  out plainly before me when I immediately made connections between what House would say and how that would be interpreted in the software world. Below are a few, hope you enjoy them!


House: "...Everything is conditional. You just can't always anticipate the conditions."
Analogy: All code is logical and based on conditions. There are however a multide of ways to get the job done so predicting why a bug is present is hard to ascertain without a sound knowledge of the bug. Bottom line? Reading other people's code sucks.

House: "You could probably scan every one of us and find fifty doo-dads that look like cancer"
Analogy: Never look at the log for a bug blindly. You're probably going to see plenty of errors not related to what you're working on anyway and just end up spending a lot of time figuring out which is the correct error to look into.

House:"If no diagnosis fits, that leaves only one diagnosis.. the patients faking"
Analogy: Invalid bug! The tester tested a wrong scenario.

House: "I value your opinion. I value rejecting your opinion."
Analogy: There is always this one guy who ALWAYS comes to the wrong conclusion, but helps everybody else reach the right one.

House: "You two, go run your tests for genetic diseases and you can go check the house for toxins"
Analogy:"You two check the code for logical inconsistencies and you can go check the server box for database and threading issues".

House:"Good things usually happen, bad things sometimes happen"
Analogy: Most programmer's code usually works well, is well written and smart. Managers ought to know NOT to judge their programmers but what they do wrong, but rather what they do right. The production server didn't crash right?

House: "Patient's dying, I'm done with clever."
Analogy: The bug has to be fixed, even if it screws up everything else.

House:"Great job. Gonna miss you. Want to start missing you as soon as possible."
Analogy: Every bug fixer's thought after fixing a bug and waiting for the testing team to retest it.

House: "Oh my God. You're not wearing a bra."
Analogy: I'm a software engineer and I'm single.

House: "I'm not deflecting because I'm avoiding something deep. I'm deflecting because I'm avoiding something shallow."
Analogy: The attitude of managers at appraisal meetings. They suck, but have to be done.

A big thanks to http://www.housemdquotes.com/ for keeping track of some of these gems!

No comments:

Post a Comment