"Never attribute to malice that which is adequately explained by stupidity"
Hanlon's razor, and how I use it as a developer
![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ff7ba79f4-ebc0-4a3f-b205-b8b1c7fadc0f_5456x3632.jpeg)
Hanlon’s razor has been a valuable discovery for me. These situations when something does not rule out in our favor do, unfortunately, happen. Usually, it is not someone’s intentional malice against us but rather a stupidity.
However, my personal “special case” of Hanlon's razor is:
“Software/API/programing language which you use is functioning exactly as it is supposed to, it is you who made a mistake”
When I used to be a beginner programmer, seeing something not working while it 100% should work led me to think “I found a bug!”. But, Python has been there for decades, you do coding for a few months: who’s more likely to be wrong here?.
What are the realistic chances that it is a software bug and not your stupidity?
Years later, interns/junior-level developers started coming to me saying something like: “This function does not work! It is broken.”
Usually, these functions “were broken” because they inserted a list where a dictionary was required. Or, some other silly mistake that we all do every day.
I believe that to always assume that it is our mistake, and take a fresh look at our code to find our mistake is a good rule of thumb.