News for hackers. Stuff that matters.
Re:An API is a user interface by hliyan on Wednesday November 25, 2020 @02:25AM (#25206742)
> I tend to start by writing a few basic usage examples and documenting it

This is exactly what I do. Before I even think about the internals of a function, module or endpoint, I imagine that it exists in the ideal form that I or any other programmer would want, and then write a few usage examples. Then I pick the best one and implement it.

Re:An API is a user interface by sethammons on Wednesday November 25, 2020 @08:17AM (#25208874)
Documentation driven design.

I nearly always start at the exposed API and try to make it make sense, then design code and models that enable that interface. The API is your product.