←back to thread

361 points mmphosis | 1 comments | | HN request time: 0.211s | source
1. brigandish ◴[] No.42169155[source]
> If you don't know what an API should look like, write the tests first as it'll force you to think of the "customer" which in this case is you.

The other way to do this (or if writing tests isn't helping) is to start with writing examples in the README (or wherever it is you keep docs). If your examples look tortured then your API is torturous. If your examples are understandable then your API is probably laid out reasonably.