Live data from Hacker News

The unbearable frustration of figuring out APIs

blog.ar-ms.me

21–30 of 60 posts

Re: The unbearable frustration of figuring out APIs

#21
post #8

I'm really sorry, but when someone posts an entire article that they don't first proof-read at least once, it makes me question the rest of what I'm reading and can't continue. > ... I found mysekf launching TextEdit just to do that I hope everyone else enjoys it!

I like it. It tells me this wasn't written by AI

Re: The unbearable frustration of figuring out APIs

#22

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…

Coming from other languages, figuring out how to get an NWConnection to work was not trivial and just reading the interface docs did not help. I empathise with the frustration of reading apple docs. Sure, the tone isn’t professional, but I don’t believe that is out of place.

Re: The unbearable frustration of figuring out APIs

#23
post #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…

Swift ultimately is a language that is expected to be compiled by xcode. Package.swift isn’t even properly supported by Xcode still.

Re: The unbearable frustration of figuring out APIs

#24
My biggest frustration with docs is when they don't provide examples. Seems like whenever examples are included, everything becomes much easier to understand because you have an explicit usage to reference.

I've always loved Microsoft's API Browser for this reason: https://learn.microsoft.com/en-us/dotnet/api/system.net.netw...

Re: The unbearable frustration of figuring out APIs

#25
post #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

The problem is there are a wide class of problems that you want solved but putting on the work will prevent you from actually doing the task because the cost isn't worth the reward. Because it's for a low impact tool. Or you can't imagine yourself dealing with this API again within a year or two by which time it will probably be completely different with v2 of the API.

So, you reach for AI and it works really well. So you start reaching for that more and more...

Re: The unbearable frustration of figuring out APIs

#26
If you want the ghosts to hallucinate less on things like this you should hook them up with the sosumi MCP. It's been very helpful to me since it seems like Apple's newer APIs are not in the training set of today's models.

When working on my own projects I've found a good rule of thumb to be that if you are being told to use something low level and unintuitive like a semaphore in Swift when doing something that ought to be easy, you are probably either reading a stackoverflow answer from an objective-c developer or in the middle of a LLM session that's gone sideways. Low level libraries might need those things, they are approximately never right for application code. Just throw it out and start over (as you did), saves on sanity.

Re: The unbearable frustration of figuring out APIs

#27
post #17

Earlier quoted context omitted.

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

The problem is there are a wide class of problems that you want solved but putting on the work will prevent you from actually doing the task because the cost isn't worth the reward. Because it's for a low impact tool. Or you can't imagine yourself dealing with this API again within a year or two by which time it will probably be completely different with v2 of the API. So, you reach for AI and it works really well. S…

Having no minimum wage for LLMs is fantastic. It opens up all manner of work that had previously been priced out.
Post reply on HN