3 ms·
If by "worst API ever" he means "didn't do it the way I'd do it", he might be right. But if what he really means is "biggest pain in the arse to use", I give th
by mikestew 11y ago
If by "worst API ever" he means "didn't do it the way I'd do it", he might be right. But if what he really means is "biggest pain in the arse to use", I give the crown to the AirWatch API. Not only do few of the functions work they way that they are documented, the sample code will never work (nor is it even close to a representation of how one might use it in the real world"), and my fave: you have to misspell the parameter name going in, but when it comes out it will be spelled right. So my code is littered with "no, that's not a typo; it's what the API requires" and "don't forget to spell the parameter correctly when referencing the return value". What amounted to maybe 100 lines of code against that API took me days of experimentation and cursing the useless docs. On our internal wiki, I documented what I was writing with a preface: "in 30 years of writing against APIs of all shapes and sizes, including ISAM data engines on IBM 370 mainframes from the 70s and open source projects written by some dude during an all nighter of coding and bong hits, the AirWatch API is by far the most steaming pile of poo I've ever had the displeasure of working with."
To me it's obvious that no one within the AirWatch organization ever used the API. They couldn't without running into the egregious bugs I have. My suspicion is that someone said "we should have an API", wrote a spec and shipped it offshore, then never checked the work that came back.