Idiot-Proof APIs

Every week in my Tuesday Lunch & Learn livestream, we choose a useful software development skill, define a challenge related to that skill, and solve the challenge live. This week, we’re looking at how to program idiot-proof APIs.

We’re all idiots at times, of course. “Idiot-proof” really means writing your APIs so that they’re easy to use correctly and difficult to use incorrectly. When somebody uses your API, will they understand how it works? Will they be guided away from obvious mistakes? In today’s episode, we look at four techniques for making your APIs easier to understand and use correctly.

To follow along, download the code from GitHub and check out the 2020-07-28 tag. To see the final result, check out the 2020-07-28-end tag or view it on GitHub.

Visit the Lunch & Learn archive for more.

If you liked this entry, check out my best writing and presentations, and consider subscribing to updates by email or RSS.