this post was submitted on 09 Aug 2024
1178 points (98.0% liked)

Programmer Humor

19154 readers
2012 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 130 points 1 month ago* (last edited 1 month ago) (14 children)

Back when I was the "new guy" code monkey at a fairly sizeable brick-and-mortor-and-e-retailer, I let the intrusive thoughts win and did some impromptu QA on the e-commerce site. (In the test environment. Don't worry.)

It handled things like trying to put "0" or "-1" or "9999999999999" or "argyle" quantity of an item in the cart just fine.

But I know my 2's-compliment signed integers. So I tried putting "0xFFFFFFFF" quantity of an item in my cart. Lo and behold, there was now -1 quantity of that item in my cart and my subtotal was also negative. I could also do things like put a $100.00 thing in the cart and then -1 quantity of something that cost $99.00 in the cart and have a $1.00 subtotal.

(IIRC, there was some issue with McDonalds ordering kiosks at one time where you could compose an order with negative quantities of things to get an arbitrarily large unauthorized discount.)

The rest of my team thought I was a fucking genius from that moment on. I highly recommend if you're ever the "new guy" dev on a team and want to appear indispensible, find a bug that it would never occur to a QA engineer who doesn't have a computer science degree to even test for.

[–] [email protected] 11 points 1 month ago (4 children)

I thought testing 2s complement was a common thing. That's like your second year cs class

[–] [email protected] 13 points 1 month ago* (last edited 1 month ago) (2 children)

To be fair, the team at the time was all business majors. (Is "Computer Information Systems" what they call that degree most places or just at my alma mater?) I think I was the only computer science major there.

They'd done a surprisingly admirable job of cobbling together a working e-commerce, loss prevention, customer sercvice portal, orderfulfillment, and CMS suite. And their schooling was in, like, finance, MS Office, and maybe one semester on actual programming.

None of them had ever learned how to count in binary. Let alone been exposed to 2's compliment. And there were no QA engineers.

Oh, there was the sysadmin. He had a temper and was a cowboy. If you asked him to do something, it'd be fuckin' done, man. But you did not want to know how he made sausage. The boss asked him to set up a way for us to do code reviews and he installed Atlassian Fisheye/Crucible on a laptop under his desk. We used that for years. And a lot of the business logic of the customer-facing e-commerce site lived in the rewrite rules in the Apache config that only he had access to and no one else could decipher if they did have access.

Those were good times. Good times.

[–] [email protected] 4 points 1 month ago (1 children)

My school also had a major called “Computer Information Systems”. That was in the 90s. Do they still even offer that? Last I checked I didn’t see my school still offering that.

[–] [email protected] 1 points 1 month ago

Oh yeah it's still pretty popular actually. Maybe because people want to do more business side or less coding and math

[–] [email protected] 3 points 1 month ago* (last edited 1 month ago)

I know a french degree that I would translate to Computer Information System in English but there is waay more computer science in it that what you described... I'm so glad I didn't live thought the hardship of international studies!

load more comments (1 replies)
load more comments (10 replies)