A lot has been written about how to design a good user interface, but very little about how to design a good programming interface (API: Application Program Interface, or a library). This is somewhat surprising, since an API is nothing more than an UI for programmers, and programmers are normally good at writing tools for each other.
I got stuck debugging someone else’s Perl code today, and it was chock-full of the sorts of things that annoy the piss out of those of us who know better.
Recently, a coworker whipped up a Perl script that’ll build all of the
Perl modules we support. This is useful for when we add a new
supported OS or OS version. This script takes a config file, moduledefs, which lists the modules to build, as well as various quirks that affect how and whether the modules should be built. moduledefs is itself a `require‘d Perl script: