François Chollet+ Your Authors @fchollet Deep learning @google. Creator of Keras, neural networks library. Author of 'Deep Learning with Python'. Opinions are my own. Dec. 10, 2019 1 min read + Your Authors

An API has two sides: first, the mental models underlying it, which should straightforwardly map to the mental models of domain experts. Then, the actual objects/signatures of the API.

API design is mostly about designing the 1st. The 2nd is just a mechanical consequence of it.

So to design a new API, start from expert mental models and end-to-end workflows.

The worst APIs I've seen originated from confused mental models. You can't create a simple language to specify how to do XYZ if you don't have a crystal clear understanding of XYZ.

Remember that the actual objects & signatures are pretty much an afterthought. Don't start with them. End with them.

You can follow @fchollet.


Tip: mention @threader_app on a Twitter thread with the keyword “compile” to get a link to it.

Enjoy Threader? Sign up.

Since you’re here...

... we’re asking visitors like you to make a contribution to support this independent project. In these uncertain times, access to information is vital. Threader gets 1,000,000+ visits a month and our iOS Twitter client was featured as an App of the Day by Apple. Your financial support will help two developers to keep working on this app. Everyone’s contribution, big or small, is so valuable. Support Threader by becoming premium or by donating on PayPal. Thank you.