Not to jump off topic, but my takeaway from Norman's "The Design of Everyday Things" was that design is of process of compromises. Could be time, could be budget, could be other factors within the company, etc. But there are almost always unseen forces the public isn't aware of that impacts the design they do see.<p>I would presume APIs are no different. There is no objective and absolute perfect API. Instead there are always tradeoffs, always compromises.
To nitpick: __repr__() is meant to produce a string s.t. if read from (by the Python parser) and subsequently evaluated, will create an object as similar as possible to "self".<p>OP kind of messed that part up.<p>On other counts: I don't know... a lot of this seems true, but also very simple, to the point that I don't know if it needs a special mention. In other words, maybe, to get a better insight into how to make better API one needs to keep looking for "deeper" answers.<p>Also, a lot of practices and techniques this presentation argues against have their merits (eg. having explicit close() method is right out of "Zen of Python" which tells to use explicit over implicit).<p>Perhaps, a better analysis would try to defend the given approach <i>in the light of the justification for the opposite</i>, or, at least, try to assign weights to different approaches (eg. "if explicit code makes user code more prone to error, then implicit should be preferred").
link to YouTube video with better audio: <a href="https://www.youtube.com/watch?v=bVoM2WLt6Hk" rel="nofollow">https://www.youtube.com/watch?v=bVoM2WLt6Hk</a>
Slightly API related rant:<p>I just wanted to get my free/busy info from office 365. I wanted to control a "do not disturb" light without using a phone app. There doesn't seem to be any straightforward method to "generate a token, save it in Bruno or Postman etc, then POST to a specific endpoint". The docs I saw talk about registering an app, and all sorts of heavyweight stuff in Azure.<p>Why can't I just call some URL, or add a webhook somewhere and be done with it?