News for hackers. Stuff that matters.
Re:Annoyances of API Design by gregmac on Thursday January 28, 2016 @12:36PM (#10989691)
The last half definitely devolves into Android API-bashing. The first half does generally apply to most APIs.

The main issue with most APIs boils down to documentation. Document it well, and it will largely be usable. This means everything from cross-references ("If you are trying to do X, ThisOtherMethod may be a better fit") to examples, and also extends to the API itself (good naming, and discoverable methods). Most developers using your API do not live in your API -- they live in their application domain. So you need to put effort into ensuring jargon is explained, the API is discoverable, and basically they can use the API easily, and get on with their application.

I really like the idea of thinking of API design in terms of Developer Experience (DX), in the same way that user interface designers consider User Experience (UX) about much, much more than simply the layout and colors.

Re:Annoyances of API Design by ascagnel_ on Thursday January 28, 2016 @12:54PM (#10989853)
> Document it well, and it will largely be usable.

And a simple, easy-to-use API will also be comparatively simple to document. If you're at the point where writing documentation is hard, that's strong code smell that something is amiss.

Re:Annoyances of API Design by laveur on Thursday January 28, 2016 @02:15PM (#10990466)
Agreed! The API should basically document itself. If you have to provide long examples of how to do something then there is a good chance the API isn't that good. Easy to use for developers makes a platform more stable and produces better quality apps, IMHO.