1007
PHP is dead? (telegra.ph)
submitted 1 year ago by sag@lemm.ee to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] DinosaurSr@programming.dev 7 points 1 year ago

He was also the only programmer I've ever known whose code literally nearly killed a child.

You can't just leave it at that...

[-] ChickenLadyLovesLife@lemmy.world 6 points 1 year ago* (last edited 1 year ago)

The code was to remotely control (from a PDA) a baseball-throwing machine that had a top speed of 125 mph. This dude fucked everything up for more than a year but somehow was kept on the project. They then had him write a version of the software to be used for Little Leaguers. He decided to test out this version for the first time on a field with actual Little Leaguers - the first ball from the machine was supposed to be a slow grounder to the shortstop, but was instead a 125 mph knuckleball a foot over the kid's head.

If you don't know baseball, a knuckleball is a ball with no spin so its movement is incredibly random.

Edit: incidentally, the reason this happened is that the guy's code originally specified the speeds of the two wheels (a baseball-throwing machine uses two wheels with tires spinning at high speed and a baseball is inserted between them and shot out thereby) using Ints with positive values between 0 and 32767. At some point he decided this was clunky (true) and changed the API to accept Float values between 0.0 and 1.0. All well and good, but this produced a big mess of compile errors in his code which he "fixed" by wrapping every call to the speeds method with Clamp ( CFloat ( iSpeedParam, 0.0, 1.0 ) ). His Little League code passed formerly reasonable integer speed values of, say, 5000 and 6000 (which should have produced something like a 20 mph ball with a bit of topspin) which were then cast and clamped to 1.0 and 1.0, meaning both wheels spun at maximum speed, ejecting a ball at 125 mph with no spin.

[-] DinosaurSr@programming.dev 4 points 1 year ago

Haha that sounds like the epitome of testing in prod 🤣

[-] SpaceCadet@feddit.nl 10 points 1 year ago

Technically, kids are in development.

I really wanted to have at least one kid so I could name him "Developmestuction".

this post was submitted on 30 Oct 2023
1007 points (96.2% liked)

Programmer Humor

32490 readers
530 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS