January 26, 2007 .net

API Usability

Don has a piece up about something that I’ve always called API Usability.” The idea when building libraries is to write client code first against some pretend API that you wish existed and then to implement that API. Another good name for this approach would be RAD API Design,” simply because it’s the same way I prefer to design UI — layout the UI the way you’d like it to look and then implement it that way. Of course, I have to admit to preferring Don’s name for this style of programming (I like what he calls my conferences, too : ).

BTW, the comments to Don’s piece mention to startling similarity between this approach and Test-Driven Development (TDD). I’m a huge fan of TDD (NUnit is a wonderful tool I use all day every day). I’d say that TDD is a generalization of my little API usability” technique in that you can use it for all kinds of things, e.g. code coverage, perf testing, stress testing, etc, including API usability.

P.S. If we fix the atmosphere, clean up the water, stop polluting the soil and learn to live in harmony with our environment, what’s to motivate us to move off this rock before we lose our aggressive drive and then, when we’re sipping Mai Thais, the sun explodes? Consuming this planet until nothing’s left but an empty husk and we’re forced, like locusts to move on to the next one, may well be the only thing that keeps our species alive (assuming we survive the coming ice age, of course).