Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: