
The Worst API Ever Made (2014) - panic
https://caseymuratori.com/blog_0025
======
saagarjha
Wait until you see ptrace(2), for which the man page on my machine contains
choice quotes such as "the following is believed to work correctly" and "the
following system calls are affected (this list is likely incomplete)". I have
used the ptrace API from userspace and worked on reimplementing it kernel-side
and it's pretty horrible either way. If you ever look into the code of GDB,
you'll see it performs a bunch of checks to make sure that your ptrace
conforms to the things that the man page says it should (because it's been
buggy in many kernel versions) and even then has like a dozen fallbacks so
that it can still be useful when pretty much nothing works.

~~~
SAI_Peregrinus
> The resulting type and value of an instance of use of the new value notation
> is determined by the value (and the type of the value) finally assigned to
> the distinguished local reference identified by the keyword VALUE, according
> to the processing of the macrodefinition for the new type notation followed
> by that for the new value notation. — ISO 8824:1988, Annex A

Now, ASN.1 may not strictly be an API, but it's pretty crap.

~~~
memling
there's a reason no one uses the old standards if they can help it. when I
worked on a compiler for asn.1 we supported a very limited subset of the 1988
macros by doing some hard coded generation.

------
cek
I was in the same hallway in Building 26 as the guys designing ETW. They
sounded smart. I was too inexperienced to know better, but a good friend (n@)
clued me into their insanity and I steered clear.

------
mikestew
EDIT: sorry, didn't mean to one-up someone's article. Do read it for it's
intended purpose: showing how much time gets wasted, and how much a dev can
get frustrated, by a bad API.

That's a pretty crappy API, but far from the worst: HP Fortify. When I used it
about four years ago, the code examples wouldn't even compile, let alone work.
The documentation was often flat out wrong. IIRC, there was at least one
method with a named parameter, and the spelling of the parameter name was
wrong. But then when one went to go retrieve it, it would be spelled
correctly. It had every scent of a project that was spec'ed at HP in
colloquial English, then sent to some far-off land where English is at best a
second language for folks and price per hour is more important than coding
chops.

The API referenced in the article is, I'm sure, annoying to work with. But as
far as getting actual work done, I would wager a good sum of money that the
Fortify API will block you far, far more often and for longer than the Windows
Event Tracing API.

 _And am I correct in seeing that the web page turned my scroll thumb fscking
white to match the background? Safari on macOS Catalina._

------
fxtentacle
A truly wonderful read, with a bit of suspense, wonder, disbelief and a lesson
to be learnt.

