TechWorkRamblings

by Mike Kalvas

202312101839 Think horses, not zebras

#new

There’s a saying in the medical field,

When you hear hoof beats, think horses not zebras.

Which is another way of expressing Occam’s Razor (make note #thread), where the simplest explanation is often the correct one.

The explanation of the saying is that zebras are rare in almost all circumstances, whereas horses can be found anywhere in the world. So it’s more likely that a horse is making the noise than a zebra.

This can be applied to programming in many ways, for instance when debugging the cause of some issue.1

Be careful though, when you’re in the right circumstances it may actually be that zebras are the explanation or the more likely one. See this excellent talk about this side of the coin: Zebras all the way down #thread add citation better and stuff.


  1. Thomas, D., & Hunt, A. (2019). The pragmatic programmer, 20th anniversary edition: Journey to mastery (Second edition) (pp. 95). Addison-Wesley.