this post was submitted on 04 Apr 2024
164 points (97.7% liked)

Programmer Humor

19618 readers
1 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
[–] Aquila@sh.itjust.works 3 points 7 months ago (1 children)

Need to throw a rand() in there to make it less easy to unfuck

[–] Gork@lemm.ee 1 points 7 months ago (1 children)
[–] Mic_Check_One_Two@reddthat.com 4 points 7 months ago (2 children)

Yup. Rand() chooses a random float value for each entry. By default I believe it’s anywhere between 0 and 1. So it may divide the first bill by .76, then the second by .23, then the third by 0.63, etc… So you’d end up with a completely garbage database because you can’t even undo it by multiplying all of the numbers by a set value.

[–] Buddahriffic@lemmy.world 2 points 7 months ago

Also, by dividing by a number between 0 and 1, you increase the amount it looks like it billed. So income will look like it's higher than outgoing funds, which will raise suspicions of embezzlement. And if someone actually is embezzling, whatever accounting tricks they've been using to hide it might just stop working because everything might need to be examined with a fine tooth comb. "Oh, the billing numbers aren't right, and also it turns out the invoice numbers aren't right either. Billing issue was tracked to a hack, but what's going on with these invoices?"

[–] proper@lemmy.world 2 points 7 months ago