this post was submitted on 30 Oct 2023
989 points (96.1% liked)

Programmer Humor

32343 readers
1182 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] DavidDoesLemmy@aussie.zone 1 points 1 year ago (2 children)

Learn rails in 2004? Good luck. It wasn't released until 2006

[–] ChickenLadyLovesLife@lemmy.world 4 points 1 year ago* (last edited 1 year ago) (2 children)

It was released in 2004. I had a co-worker who was hugely into it in 2005. Entirely coincidentally, he was also into absurdly overcomplicated code and clusterfuck projects that failed after years and millions of dollars.

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

[–] DinosaurSr@programming.dev 7 points 1 year ago (1 children)

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 5 points 1 year ago* (last edited 1 year ago) (1 children)

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 (1 children)

Haha that sounds like the epitome of testing in prod 🤣

[–] SpaceCadet@feddit.nl 10 points 1 year ago (2 children)

Technically, kids are in development.

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

[–] LaunchesKayaks@lemmy.world 3 points 1 year ago

Explain that last sentence please