Sacred Cows
Tags: debugging
Published: 2021-05-31 12:14:46

---
title: Sacred Cows
published: true
date: 2021-05-23 12:59:00 UTC
tags: debugging
canonical_url: https://debugmsg.io/sacred-cows/
---

 ![Sacred Cows](https://images.unsplash.com/photo-1585920389306-421b3c127e40?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDY1fHxjb3d8ZW58MHx8fHwxNjIxNzI1OTI2&ixlib=rb-1.2.1&q=80&w=2000)

In an [earlier post](https://debugmsg.io/eliminate-the-impossible/), I discussed the dangers of being wedded to your own ideas. I would like to riff on this because of how often it comes up, in others and even in myself.

When you hold onto a belief without sufficient evidence, you run the very real risk of missing important data to allow you to debug an issue.

"I did **this** , which should make **that** happen. So now that that has happened, let's look over there."

Wait, what? When something "should happen", something that you are relying on in the steps that you are debugging, you had damn well better make **sure** that happened. Validate everything before moving on.

> "Trust no one" – Deep Throat

Holding onto a belief too long can also cause you to diminish evidence that may be pivotal to uncovering something or, at least, to distract your efforts. Constantly evaluate and re-evaluate your evidence to see where you might be making assumptions, or holding onto beliefs, that are not justified.

"My code works this way. That other problem is something else."

Uh, no, not necessarily.

Time is on your side here, in the sense that having a very accurate timeline can pinpoint when things go astray. And that time-based data can fly in the face of your sacred cow. You need to let go when the evidence tells you to.

"Shit really started to hit the fan Tuesday night. What did we do Tuesday night?"

What sorts of evidence can you rely on? We have covered log files already, because they are (if properly done) an archive of what has happened in the process you are debugging. And that archive is gold.

Another useful piece of evidence that is often overlooked is a modification timestamp on a database row or file. Knowing when a piece of data has changed can be the turning point for knowing what did, or did not happen.

This came up recently where some database data we were looking at could be updated in one of two ways. The modification timestamp on the row, correlated with the log files, clearly demonstrated what flow was responsible for the update. And one of the core premises on which we were operating, a mighty cow, had to be put down.

### The Scout Mindset

In the weird way that these things happen, the issue of sacred cows came up on a podcast this week during an interview with Julia Galef, the author of "[The Scout Mindset](https://www.penguinrandomhouse.com/books/555240/the-scout-mindset-by-julia-galef/)", a topic she introduced several years ago in her [TED talk](https://www.ted.com/talks/julia_galef_why_you_think_you_re_right_even_if_you_re_wrong):

<iframe src="https://embed.ted.com/talks/julia_galef_why_you_think_you_re_right_even_if_you_re_wrong" width="560" height="316" frameborder="0" scrolling="no" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

In a nutshell, we are all predisposed to be in one of two modes, or mindsets:

- the "soldier mindset", where we staunchly defend our deeply held beliefs, sometimes to the point of irrationality;
- the "scout mindset", where we don't care about whether we are right and wrong, and merely want to understand.

Clearly (to me) debugging is about being a "scout", uncovering data to get at an understanding of a problem. And this post has been about being mindful of your inner "soldier". Note that, depending on the circumstances and beliefs, we can quickly flip between these two mindsets, with no one person being entirely a "soldier" or a "scout".

But knowing what you are as truthfully and consistently as you can will help you stay intellectually honest, and a be a powerful debugger in the process.