logoalt Hacker News

Animats • today at 5:46 AM • 1 reply • view on HN

We're only at the beginning of this.

At one time, APIs had to be simple and reliable enough that people could learn them. Such as, say, the UNIX kernel API or the C library API. That stopped being essential when Stack Overflow came along. It became even less important once users could query an AI. Now that AIs can do the coding, the pressure for clean APIs decreases still more more.

The additional cognitive load from badly defined APIs pushes people towards cognitive surrender. Without a clean API, the effort required to understand something you're using is high. No human can understand all the library APIs they use, and the problems behind them, any more. That load forces us to cognitive surrender.

Yet if you insist on clean API's, you get over-engineered packages capable of handling cases that will never come up. There was an HN article about that earlier today, from a company that just wanted a web front-end that worked for their use case, not some general purpose system. There's not much of a market left for those beautiful software jewels MIT students were once taught to create, back when they learned programming from Structure and Interpretation of Computer Programs.

That's where we really are. We're stuck with muddling through, or turning the whole job over to AIs.


Replies

rspeele • today at 7:53 AM

I wouldn't hold up the C library API as an example of simple and reliable, seeing as darn near every string function had to get replaced with another version with an explicit length bound, `gets()` got completely nuked, `atoi()` remains unusable to this day, and even some of the functions that already had length bounds like strncpy() were busted and more modern alternatives like strlcpy() are preferred.

I can't think of another standard library that had so many functions on release that were not merely buggy in some particular implementation, but impossible to implement durably due to their API type signatures.

I mean, it's a product of its time and it was wildly successful, but its stdlib API was not a jewel. Definitely one of the NJ style "worse is better" products.