skip navigation
"Software developer with a kaizen mindset"

Hypotheses instead of assumptions

Sunday Feb 7, 2021

We all know the expression “Assumptions are the mother of all f*ck ups”. However that should not mean that you shouldn’t make assumptions. Or maybe we should call them hypothesis even when debugging. Let’s have a closer look.

So what do we mean by assumptions. For that let’s first look at the dictionary definition.

Assumption - something that you accept as true without question or proof
Cambridge Dictionary

The dictionary definition is pretty clear, yet I’d like to point out the second part of that definition: without question or proof.
This is where the expression comes in. There is nothing wrong with having or making assumptions. It gets problematic when treating them as true without question.
So what would be a better way of dealing with assumptions? Simple… treat them as a hypothesis.

Hypothesis - an idea or explanation for something that is based on known facts but has not yet been proved
Cambridge Dictionary

So here we see that the main thing setting it apart that we consider it not yet proven. Now that we are aware of the fact that we’re not sure we can start looking for evidence. In the situation where we’re debugging this evidence might take the form of log statements or metrics that show the flow of data through our application.

Here we can take the math approach to solutions. If we find one example that disproves our hypothesis we can move on and try another assumption or rather hypothesis. If we find an example that supports our hypothesis we should continue searching. Still if you can not find an example that disproves your hypothesis this does not mean it is true. At some point you’ll have to make a choice and weigh the risk between going ahead and build upon the assumption and continue searching. Note: if you do decide the build upon the assumption you have to keep in mind that it still might be false and you’ll have to back track later on.

If you find you can’t find metrics or logs that help you make observations about whatever you’re trying to debug add them. Adding logs or metrics is often a lot less impactful compared to changing logic.

The difficult part is when you have made assumptions that you’re not aware of.

Share on:
Support: