Live data from Hacker News

The unbearable frustration of figuring out APIs

blog.ar-ms.me

11–20 of 60 posts

Re: The unbearable frustration of figuring out APIs

#11

In all honesty this is how a typical developer experience has been for a long time in a number of systems. Expecting someone to pre-chew your programming food is silly.

The difference is that most of those systems have documentation that explains how to use their weird APIs.

Re: The unbearable frustration of figuring out APIs

#12
All of this is written with a sense of anger and sarcastic invective that doesn't seem appropriate. This is part of learning any new language or API. Going in with an attitude of "I should already know how all this works, why am I forced to do research or look at docs?" seems unfair and will spoil the experience of learning anything.

> Why was that so hard? Why are the models here separate from the ones in the right click menu? Too many questions.

The very screenshot above this paragraph actually answers this, in what admittedly might be an uncharacteristically clear UI: "Siri and Safari will always run translations online."

Re: The unbearable frustration of figuring out APIs

#13
post #6

For me the worst APIs by far are on Android. They are even worse than win32.

Nope, Google AI APIs are second to none. That shit will make you question whether their services are worth it. Edit: Come to think of it, both are made by Google :')

Agreed. Amusingly, a lot of what makes them worse than some older alternatives is that they "fix" things constantly by reworking how to use them. Older paths may be bad, but effort has been made into getting them to work.

Re: The unbearable frustration of figuring out APIs

#15
The "finally got it working then realized Spotlight already does this" moment is brutal.

API design isn't just about functionality. it is about discoverability and if your right-click menu uses different models than your API and your error messages don't explain why, you are just creating friction for no reason.

Sometimes the "proper" solution isn't worth the super complicated maze.

Re: The unbearable frustration of figuring out APIs

#17

All of this is written with a sense of anger and sarcastic invective that doesn't seem appropriate. This is part of learning any new language or API. Going in with an attitude of "I should already know how all this works, why am I forced to do research or look at docs?" seems unfair and will spoil the experience of learning anything. > Why was that so hard? Why are the models here separate from the ones in the right…

This is a story about the risks of AI-induced brainrot. You get so used to having the computer just do your work, that the second you need to engage your noggin you’re lost at sea. Or at least just frustrated.

Reading and understanding the docs and reference material has always been part of the work.

Aside from the commentary it read like an advertisement for how great the swift/macos translation APIs are. PEBCAK

Re: The unbearable frustration of figuring out APIs

#18

All of this is written with a sense of anger and sarcastic invective that doesn't seem appropriate. This is part of learning any new language or API. Going in with an attitude of "I should already know how all this works, why am I forced to do research or look at docs?" seems unfair and will spoil the experience of learning anything. > Why was that so hard? Why are the models here separate from the ones in the right…

Most of the author's frustration was due to lack of good feedback from Swift.

Like, how can it run a command that has an `async` main despite the fact that you didn't extend the async version of command?? That should've been an error (e.g. "bro, you cannot have an async main in this class, you need the Async version of this class which is called AsyncWhatever").

Not awaiting on an async function should be at least a warning. Another frustrating lack of feedback: it just lets you run it and nothing happens.

The version thing: it should show all possible variants in the enum, even the ones you should not be able to use, and then when you try using it, show an error saying "you need to change the version of this file to at least blah to use this". Why can't the Swift LSP do that? Apple has a trillion dollars, they can afford polishing their stuff.

The author is used to Rust, which would've made it very clear what was wrong in all cases.

Swift, being as modern as Rust, should be doing better than that. Languages that fail to give you proper error messages and warnings are just not worth it: just one of these "wtf is going on?" moments can cost you hours. Just use a better language if you can.

Re: The unbearable frustration of figuring out APIs

#20
Way, way back in 2003 or thereabouts, I had to add an "open this report in Excel" function to an existing product. But first I had to figure out how to convert the report to Excel format (with freeze panes, etc.). I found Apache POI and was very happy with its API documentation, especially this "Busy Developers' Guide to Features": https://poi.apache.org/components/spreadsheet/quick-guide.ht...

This page was much simpler 22 years ago (I don't remember this HSSF stuff, whatever that is), but it still looks familiar. Basically everything I needed to do had examples in there. I remember thinking that the authors cared about the users of the library (although the Javadoc seems a little bare.. but I am not sure I needed the Javadoc much).

If I ever create an OSS library, I would certainly also create a "Busy Developers' Guide".

Post reply on HN