I recently read an interesting chapter from Making Software: What Really Works, and Why We Believe It by Adam Oram & Greg Wilson. It discusses the topic of API usability, which is not something I have encountered in the past. Microsoft has done a lot of excellent research in this area dating back almost a decade now. In their studies they identified three developer personas:
- Opportunistic developers
- Pragmatic developers
- Systematic developers
Each programmer persona approaches coding problems differently. To best develop API’s to support all personas, scenario based testing is highly effective. Defining scenarios of how the API is used focuses attention on what the API is used for instead of what the API is. Interestingly, one of the referenced papers discussed how modern design patterns are negatively affecting API design! One of the major concerns is the area of Dependency Injection and specifically Constructor injection, which are favored patterns of mine. I will certainly need to research this further.