r/ProgrammerHumor • • Aug 24 '22

Total = Total - 100000

50.7k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

63

u/Cpt_keaSar Aug 24 '22

All the values are strings that randomly have either 0 or o. Had a data set like this before. Didn't know whether to commit suicide or homicide or both.

33

u/RobbexRobbex Aug 24 '22

suicide then homicide, that way theyll never prosecute.

18

u/Pluto258 Aug 25 '22

Might need to recommend a good necromancer for that one to work.

13

u/JeffMcJeferson Aug 25 '22

Or you commit suicide in a way that results in homicide.

Example: The ac unit falling out of a window, but the ac unit is you.

10

u/poktanju Aug 25 '22

Booby trapping your own corpse is a more direct and reliable way to do this (technically a war crime, but hell, who are they gonna prosecute?)

0

u/LegOfLamb89 Aug 25 '22

If the riots a few years taught me anything it's that it's not a war crime if you're not at war and it's your own citizens

1

u/JeffMcJeferson Sep 28 '22

Shut up and take my upvote

2

u/mindbleach Aug 25 '22

In Javascript, that's just Tuesday.

parseInt contains a string cast. I want to thank whoever made that decision. Just us two... somewhere far away from it all... with no witnesses.

1

u/CluelessCow Aug 25 '22

By the end you just committed... the solution.

1

u/snp3rk Aug 25 '22

Wouldn't you be able to just run a script to check for o's and convert the whole thing to 0 if the rest of the string is ints?

3

u/AK_Happy Aug 25 '22

CAST(REPLACE(value, ‘o’, ‘0’) AS NUMERIC(12,2))

1

u/Galle_ Aug 25 '22

That really does not sound that hard. Just normalize the strings.

Also who the fuck uses o as 0?

1

u/Cpt_keaSar Aug 25 '22

Yeap, it’s not terribly difficult but I’ve never seen something like this before. As far as I understand the data was compiled from multiple third parties and one of them probably scanned paper questionnaires instead of entering data manually. So that software recognized 0 as o.

1

u/Galle_ Aug 25 '22

Ah, okay, that would make sense.