Live data from Hacker News

Secrets to Great API Design (2019)

nylas.com

21–24 of 24 posts

Re: Secrets to Great API Design (2019)

#21

The article brings up interesting points, but reads like I'm blasting through a red bull ad. (Zing Zang Zoom!) API development is super important, and KIS principles should apply, but i felt this post was more marketing and less functional advice.

This post is literal content marketing. Not in a bad way, but that's what it is.

Re: Secrets to Great API Design (2019)

#22
post #15
post #14

Earlier quoted context omitted.

maybe they are able to create good docs, and good guidelines, because they burned themselves in the past creating godawful ones?

I don't remember any bad MS docs and I've been using them on and off since the 1990.

it was a too big mental shortcut, i meant bad APIs. i'll update parent post.

EDIT: oh well too late to do that.

Re: Secrets to Great API Design (2019)

#23
The best API's fit how users actually use them. I'm not sure there is a one-design-fits-all. One has to study to see what's done the most often and optimize around those, yet still allow flexibility for the times that deviate from common usage patterns. Make the common stuff short and easy, but the uncommon stuff possible and clear-cut. It may take a couple of iterations in actual use to tune it.

I also like "self-eating dogfood" in that the shortcuts are defined using existing "long-cuts" and the API user can study, learn from, and change and/or write their own shortcuts using the long-cuts.

C#'s optional-named-parameters (ONP) are ideal for such. I don't why Java and JavaScript don't implement ONP's. The alternatives, such as object literals and method overloading, are just too clunky. Once you tasted ONP's you don't wanna go back.

Post reply on HN