Excessively check your errno 13 Sep 2016

Back when I used to write systems-level software the biggest pet peeves I had were checking every single error case for functions that called out to the OS. Not just seeing if an error had happened so that I could not-so-gracefully die, but to check the different error cases, log the precise system-specific message, and handle the error in a way that makes sense for the application.

At least be capable of logging specific errors as soon as they happen.

I even wrote a set of Perl scripts to read man pages that would output C code with meaningful error messages for error return values. That stuff is ages old (seems to be from 2004–too long for me to remember) and probably doesn’t work any more but I used variations of it in large systems. It worked surprisingly well.

Got a new project you’re working on? Re-tool it to excessively check its assumptions and start fixing stuff.

I think one of the keys to mastery is figuring out how your language community approaches solving the resilience of its systems. This is one of the elements I look at when deciding what next language to learn.