should we be using APIs?
Nah, it’s a fad.
should we be using APIs?
Nah, it’s a fad.
I’m a programmer. In 2010 I had a boss come up to me and tell me we should start using APIs. He had just read an article about how APIs were the next big thing. Fortunately he had a short attention span and soon wandered off and never mentioned APIs again, and I was able to get back to work on the awesome Blackberry app I was writing.
Where can you take a $3 Uber? If I took an Uber to my next door neighbor’s house it would be more than $3.
I started out with Visual Basic using the Variant type all the time, and even though I was usually just working on one-person projects it was a fucking disaster. You don’t even have to collaborate to see the virtues of strong typing.
And to top it all off, in order to preserve the only thing they have left - their freedom - they want to hand the country over to a dictator. It just doesn’t get any more oxymoronic than that.
It happened because the programmer changed the API from a call that accepted integer values between 0 and 32767 (minimum and maximum wheel speeds) to one that accepted float values between 0.0 and 1.0. A very reasonable change to make, but he quick-fixed all the compiler errors that this produced by casting the passed integer parameters all through his code to float and then clamping the values between 0.0 and 1.0. The result was that formerly low-speed parameters (like 5000 and 6000, for example, which should have produced something like a 20 mph ball with topspin) were instead cast and clamped to 1.0 - maximum speed on both throwing wheels and the aforesaid 125 mph knuckleball. He rewrote his tests to check that passed params were indeed between 0.0 and 1.0, which was pointless since all input was clamped to that range anyway. And there was no way to really test for a “dangerous” throw anyway since the machine was required to be capable of this sort of thing if that’s what the coach using it wanted.
the code they’re testing has painful hardwired dependencies on expensive external resources
I’ve told this story elsewhere, but I had a coworker who wrote an app to remote-control a baseball-throwing machine from a PDA (running WinCE). These machines cost upwards of $50K so he only very rarely had physical access to one. He loved to write tests, which did him no good when his code fired a 125 mph knuckleball a foot over a 10-year-old kid’s head. This resulted in the only occasion in my career when I had to physically restrain a client from punching a colleague.
+1 for slamming Thomas Friedman.