Looking for bugs


Magical Developer
Apr 25, 2019
A few tips on how to find embarrassing bugs before they make their way in.

One thing an article advises is to imagine the writer of the code (you lol) as this other person who you absolutely loath and think of how incompetent they are. Really go through and tear it apart looking for problems.

Unit / integration tests are great, although people use them a lot less than you would think. You write a few thousand automated tests or so, it kind of depends, to make sure that functions and objects actually behave the way they're supposed to rather than finding that out in production after a user screams.

Get someone else to use it. They will usually find stupid embarrassing things you missed.

Eat your own dog food. In other words, try to use your own software in your day-to-day life rather than just writing code, hauling it off and forgetting about it.

Actually get some understanding about how underlying layers work rather than relying on magic. I for instance went through a significant portion of the source-code of Go's HTTP library, although that isn't necessarily necessary. The less you know, the more likely a problem is to rear it's ugly head in really weird ways.