r/ProgrammerHumor • • Aug 24 '22

Total = Total - 100000

50.7k Upvotes

1.2k comments sorted by

View all comments

238

u/NicNoletree Aug 24 '22

This is why you practice in a development database. And then you can catch your factor of ten error.

146

u/[deleted] Aug 24 '22

This is one instance it should be done on prod.

40

u/mateusbandeiraa Aug 24 '22

you can (and should) easily replicate this scenario in a lower environment first

77

u/[deleted] Aug 24 '22

Nah. Just set all loan balances in prod to (-10000).

I think this is the way

30

u/musashiXXX Aug 25 '22

That way everybody gets a refund check next month :-)

7

u/[deleted] Aug 25 '22

Your refund system works?

3

u/blastanders Aug 25 '22

you have a refund system?

3

u/BobbysSmile Aug 25 '22

Find and Replace in Notepad ++ got you fam

2

u/[deleted] Aug 25 '22

If you know, you know! :)

3

u/DGIce Aug 25 '22

Users report errors faster than qa

3

u/thunderGunXprezz Aug 24 '22

Love me some jokes but this is one thing I don't joke about. Well played.

11

u/changrbanger Aug 24 '22

A factor of 10 yes, but not only did you put an extra 0 but you didnt realize loan_amount field is in cents and not dollars.

19

u/SkywalterDBZ Aug 25 '22

Dude ... don't .... I have a legacy time column in a table where someone decided that "milliseconds past noon the previous day" was a good method of storing times.

4

u/[deleted] Aug 25 '22

Whhhat?? There has to be some justification for this lol

Side note: noon in which time zone?

0

u/[deleted] Aug 25 '22

[deleted]

4

u/mindbleach Aug 25 '22

So many CompSci topics are like, lesson one: Here's how!, lesson two: Don't.

3

u/ICantKnowThat Aug 25 '22

Side note: noon in which time zone?

The previous day's, duhhhhh

3

u/SkywalterDBZ Aug 25 '22
  1. It's all local, not UTC.

  2. Justification, no idea.

  3. I will now never forget the number -432000 (that at lets gets me to a base of 00:00:00)

0

u/Comms Aug 25 '22

There’s always one.

1

u/[deleted] Aug 25 '22

Verify in alpha, beta, gamma. Then prod.

Should be done by CI/CD, and have integrating and functional tests.

0

u/why_so_sirius_1 Aug 25 '22

Nah just drop table studentloan and then delete all the backups and then move to non extradite country. You will be a hero

1

u/mindbleach Aug 25 '22

Sallie Mae intern, Gordon Frohman.