Comment by p1necone

17 hours ago

I certainly felt guilty reading it.

Having worked on large codebases with many developers of varying levels of experience I have noticed that bugs that can be written very often will be written - a sort of programming specific version of Murphy's law. So I try to make the ones that seem the most likely impossible. Sometimes I go too far.

> So I try to make the ones that seem the most likely impossible.

Yeah this is a very key point to reflect on. Is this stricter type actually catching a bug that's easy to make? Or is it just giving you more satisfaction of more precise typing? It takes time and practice to make that distinction.

Similar things can also be said about automated tests. I've written too many of them that end up being written for a mistake that never gets made.