I saw this post on question on dev.to and I wondered why not share it here with the Hashnode community.
I think it's important to make sure that at least 90% of silly mistakes get caught by compilers, linters, IDEs, unit tests, integration tests and design patterns.
Typos, mixing name and age, adding numbers to text, using = instead of == instead of ===, not checking for nulls, using non-existing variables, forgetting semi-colons, forgetting break in switch, forgetting to check return values, wrong number of arguments...
Life's too short for that (as are deadlines). Use better tooling.
Geez, donʼt get me started.
I made all the silly things one can do with all the languages i worked with. Using = instead of == in C, accidentally redefining Python builtins, you name it.
We do mistakes, thatʼs part of our job description. The important thing is to learn from them quickly and (almost) never do them again.
I've left a single = in an if statement in production for upwards of 3 months and nobody noticed any weird behaviors with the system. Of course, when trying to debug an issue related to it I looked EVERYWHERE ELSE except for the if statement itself. Between that and spelling, my personal debugging checklist continues to grow.
Thamaraiselvam
Lead Consultant at ThoughtWorks
Thanks to Sandeep Panda for the invite.
I made some silly mistakes in the past and punished for it as well. I have mentioned a few of them those are in my mind right now