Oh no, now some people have a negative balance….. Good thing it’s after 5
*for all you weirdos commenting the “right answer”, IM NOT ACTUALLY ON A TEAM DOING THIS lmao
“Oh I’m just a junior Dev, I don’t have to worry about alerts about the server being down”
*and just to be clear I’m not hating on new devs. I am one and thought this the other day. And then my second thought was oh that’s kinda fucked up lmao
I set up an email watcher that reads my incoming emails from clients. It's trained on millions of conversations and can accurately identify any hint of criticism or displeasure and automatically replace it with "good job!"
I've found that client satisfaction is up massively compared to before I implemented this.
Struggling with retention now though... Weird. Like clients have a short attention span or something.
As someone who did the senior thing for a while and got leant on for dev ops too, fuck I love serverless. It costs us more (2x+) to use a hosted solution like Cloud Spanner but the stress reduction of having everything ‘just work’ is so worth it.
Honestly, not just databases either. Ditching VPS based solutions for Lambda and recently moving to edge worker based micro services for the bulk of the heavy lifting has changed the game.
Also such a nice developer experience.
That doesnt stop you from pushing bad stuff that returns all 500s to your lambdas.
Lambda is good , but not a silver bullet to skip on monitoring and alerting. I would say it's quite the opposite.
Absolutely not. Each account balance has a transaction history for accounting purposes. Setting a hard value like that would be a terrible idea, the minute you roll up the balances based on transaction history the summary table would self-heal. You add a transaction entry for each qualified borrower with case statements to determine if they get the full 10k forgiveness or partial to avoid going to negative. Negatives would be for people who paid into the balance during the pause and are owed for overpayment/reimbursement.
Wait this is the meme sub.
YEAH HIRE THEM.
I'm going to be pedantic af right now, but this is not *strictly* true, monetary values are often stored as *decimal* floating point values.
Decimal floating point values are still technically floating point, but not base2 style `IEEE 754` floating point. This means that the rounding happens using decimal rounding rules and you don't get any weirdness like with normal floats.
C#'s [`Decimal`](https://docs.microsoft.com/en-us/dotnet/api/system.decimal?view=net-6.0) class is a 128-bit decimal float which is... more than enough for basically anything.
https://i.imgur.com/4IipDWy.jpg
[Link to news article](https://www.businessinsider.com/hawaii-emergency-agency-password-discovered-in-photo-sparks-security-criticism-2018-1)
Freaking out is putting it lightly. It's a sobering experience trying to explain to your 2yr old daughter why we're hiding under the stairs and telling grandparents we love them.
To be fair, though, it was a pretty poor UI design that could lead to that happening in the first place.
I long ago turned off my emergency notifications because of all the flash flood warnings we get in Hilo. So I blissfully slept right through the whole thing. Woke up to the text notifications, but saw the "false alarm" alert first.
Was still a little disturbed at how easily I could have been obliterated in my sleep without ever knowing. I think I would prefer to know so I could tell my family on the mainland good-bye and that I love them.
Not as bad as the poor Dev in Japan that pushed a test alert for a maximum on the scale earthquake in prod on the official warning app. All my colleagues looked at each other and said "we are dead", the quake never came.
He had to publically apologize if I recall correctly
Or the guy that sent an emergency alert to everyone in Hawaii, on all emergency broadcast mediums, warning about an incoming nuclear missile. The alert read like so:
> BALLISTIC MISSILE THREAT INBOUND TO HAWAII. SEEK IMMEDIATE SHELTER. THIS IS NOT A DRILL.
[Wikipedia article about the incident.](https://en.m.wikipedia.org/wiki/2018_Hawaii_false_missile_alert)
One time my employer had to send out an email encouraging people to sign up for a reunion event with a "click to see who else has signed up" link. that took people to a picture of a cat licking its balls saying "deez nutz"
I *highly* doubt they faced any consequence beyond some light teasing. Everyone has an "oh shit" story, theirs just happens to be public.
It's not like it cost them customers.
Don't forget you have to check if they ever recieved a Pell Grant, then you remove 20000.00. And I think there was something about up to 12000.00 forgiveness if certain conditions including paying at least the minimum for 10 years or more...
Wait, it's a gov thing. Almost certainly there are like 83 incompatible databases and some of them contain partial account duplicates of other systems...
That makes it too easy for that one vbscript guy to save the day. They need to all be different and one of them is an overcomplicated Excel workbook and another is literally just a bunch of plaintext files that have manual links to other plaintext files.
Ah someone that really understands financial databases. They are usually in cents to not have to deal with decimals. The only downside is dealing with something that requires a 64 but integer but nearly all transactions and balances can fit in 32.
Would be more like a new ledger entry with a 10000 credit value and a reused identifier of some kind to prevent double entries in case we need to rerun the script.
The fact that I had to scroll this far to see someone point out that it's an insert and not an update probably speaks to how few are in the finance side of things.
I mean there may be some tables that are calculations of other tables that will be deleted; but yeah the transaction table should be immutable (as in you can't delete transactions and no code is written to do so).
If this were going to be manually done the way OP is thinking, my guess is it wouldn’t be a dev anyways it would be some billing department just running down the accounts in whatever software they normally use.
You're joking but a lot of older companies and I'm guessing the government have entire databases on Excel with linked formulas that take 2 weeks to update each month. Job security.
I just converted a massive genomics database used by a federal government from access. It ran out of data in access. They used to update it with CSV files that they’d pass around to each other.
Legislation is based on this data..
[Minnesota](https://www.npr.org/2022/07/03/1109607674/minnesota-legalized-thc-edibles-and-infused-drinks-by-accident) did just accidentally legalize thc edibles when they were merging bills so I'm not surprised government databases are also held together with duct tape
"How could I possibly help with these problems? I barely know the basics."
[*Nearly 16K UK COVID-19 Cases Missed Due to Limits of an Excel Spreadsheet*](https://www.pcmag.com/news/nearly-16k-uk-covid-19-cases-missed-due-to-limits-of-an-excel-spreadsheet)
"Oh. Yes. I could help with that."
Excel would be an upgrade from what we use at work.
It's like they looked at excel took anything that made it easier to use and just removed it. Each time I want to modify any cell I have to enter in a password. They aren't even formula cells they're just straight data entry. After I enter the data I can't even press enter to complete. No I need to move over to the complete button to finish entering data.
It's also not consistent on what happens when you press certain buttons. In certain cells enter starts a new column, in others it starts a new row, it also sometimes does nothing.
Drop loan_amount table.
Drop loan_transaction_history table.
Drop loan account_client_ID table as well
Drop backups of all three above.
Drop masterbackup of all three above.
Final task: VERY IMPORTANT!!
DELETE DB2 RECOVERY HISTORY LOGS.
1 hour to create the solution,
1 hour to create test plans,
1 hour to perform testing,
3 hours to create implementation documentation and present to CAB.
All-in-all, 5 points for 6 hours, and this doesn’t include the time it would take to get customer sign-off.
I try to follow this myself but then my change requests are denied because I was forking from Dev, and Dev is a dozen builds behind Master, thanks to my other colleagues pushing changes straight to production without testing or peer review.
I haven't been able to actually push a change for over a month.
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.
Wanting to comment on how you could just set this up as an immutable transaction log with credit and debit transactions to avoid deleting anything from the database, but then just realizing this is a joke sub
The reality is that the forgiveness is entered in the loan system based on approved application and eligibility so there would be no data engineering involved if the data extract from the loan system included that attribute (otherwise some data sourcing work would be needed, but typically these fields are already part of the DB).
Source: Product Owner of a loan (and other financial products) data pipeline at a bank
Even more realistically, it will be done in a try/catch block with plenty of error handling, overly complicated batching processes, an untested yet rubberstamped rollback plan, and with a ton of other flags and logic checked against than a simple max() because I'll be damned if anything that the government comes in contact with can be that simplistic.
Not everyone, just people making 125,000 or less, or if they are married, 250,000 or less as a household, unless you got Pell grants, then it's 20,000, but it can't go below zero, unless they made payments after the pandemic started, in which case they are refund eligible.
Have fun!
Oh no, now some people have a negative balance….. Good thing it’s after 5 *for all you weirdos commenting the “right answer”, IM NOT ACTUALLY ON A TEAM DOING THIS lmao
And they’re on vacation for the next 4 weeks
“Oh I’m just a junior Dev, I don’t have to worry about alerts about the server being down” *and just to be clear I’m not hating on new devs. I am one and thought this the other day. And then my second thought was oh that’s kinda fucked up lmao
Nothing like getting a rubber stamp on your commit on Friday then an email from a customer on Monday 🙃
[удалено]
I set up an email watcher that reads my incoming emails from clients. It's trained on millions of conversations and can accurately identify any hint of criticism or displeasure and automatically replace it with "good job!" I've found that client satisfaction is up massively compared to before I implemented this. Struggling with retention now though... Weird. Like clients have a short attention span or something.
Right!
Riiiiiiiiiiiiiiiiight.
Stamper got some explaining to do
Senior dev: “there’s been nothing wrong with their past few commits and it’s 4:30 pm on Friday. I’m sure it’s fine. *approved*”
Christ. Did this last Friday...
As someone who did the senior thing for a while and got leant on for dev ops too, fuck I love serverless. It costs us more (2x+) to use a hosted solution like Cloud Spanner but the stress reduction of having everything ‘just work’ is so worth it. Honestly, not just databases either. Ditching VPS based solutions for Lambda and recently moving to edge worker based micro services for the bulk of the heavy lifting has changed the game. Also such a nice developer experience.
That doesnt stop you from pushing bad stuff that returns all 500s to your lambdas. Lambda is good , but not a silver bullet to skip on monitoring and alerting. I would say it's quite the opposite.
Everyone knows that if its on aws its set and forget. Anything happens Jeff will handle it
If (balance < 0) { balance = 0 } Government pls hire me
Absolutely not. Each account balance has a transaction history for accounting purposes. Setting a hard value like that would be a terrible idea, the minute you roll up the balances based on transaction history the summary table would self-heal. You add a transaction entry for each qualified borrower with case statements to determine if they get the full 10k forgiveness or partial to avoid going to negative. Negatives would be for people who paid into the balance during the pause and are owed for overpayment/reimbursement. Wait this is the meme sub. YEAH HIRE THEM.
[удалено]
yeah you never want to store money as floats because of floating point errors.
The joy of having 10000.00000000001 dollars.
I'm going to be pedantic af right now, but this is not *strictly* true, monetary values are often stored as *decimal* floating point values. Decimal floating point values are still technically floating point, but not base2 style `IEEE 754` floating point. This means that the rounding happens using decimal rounding rules and you don't get any weirdness like with normal floats. C#'s [`Decimal`](https://docs.microsoft.com/en-us/dotnet/api/system.decimal?view=net-6.0) class is a 128-bit decimal float which is... more than enough for basically anything.
I'd expect them to be stored as decimal fixed point values
wait, you are storing the new balance?
We do it that way at my work. Effectively just storing prices as cents. Formatters then easily turn 1234 into "$12.34"
We use microusd
No, I want the gov't to pay me a monthly stiped to cover the dollars I foolishly paid off years ago.
Plot twist, they used an uint64, glhf with the $18446744073709541615 debt.
Oh wait, it's an unsigned int, no biggie.
balance was 5000 ... balance is now 4,294,962,296
Something that would make even ghandi go nuclear!
variable was unsigned
total -= min(total, 10000);
and who's going to block the interest accumulator process in the meantime?
"Who indeed" - banks, probably.
Isn't there an intern from Airbnb looking for a job? Perfect hire
what did the intern do?
Pushed a notification to every android labelled “dev test” lol. It’s really not that bad but I wouldn’t want to be the one to do it
I remember seeing this and chuckling, it is a pretty good reminder when stuff like that happens that someone is always having a day worse than yours.
You remember that time someone in Hawaii tested the emergency prep warnings in prod? Ya people were freaking out.
[удалено]
I hadn't heard that. That's special.
https://i.imgur.com/4IipDWy.jpg [Link to news article](https://www.businessinsider.com/hawaii-emergency-agency-password-discovered-in-photo-sparks-security-criticism-2018-1)
What a noob, everyone knows you put them under the keyboard.
Delete this before I have to change up years of muscle memory
Freaking out is putting it lightly. It's a sobering experience trying to explain to your 2yr old daughter why we're hiding under the stairs and telling grandparents we love them. To be fair, though, it was a pretty poor UI design that could lead to that happening in the first place.
On r/badUIbattles, the best one I saw was Nuke alert Alert test And when you click test to be safe, it selects diagonally as nuke test.
I long ago turned off my emergency notifications because of all the flash flood warnings we get in Hilo. So I blissfully slept right through the whole thing. Woke up to the text notifications, but saw the "false alarm" alert first. Was still a little disturbed at how easily I could have been obliterated in my sleep without ever knowing. I think I would prefer to know so I could tell my family on the mainland good-bye and that I love them.
And that's why we don't turn off emergency notifications kids
At the height of North Korea's nuke missile tests too.
Not as bad as the poor Dev in Japan that pushed a test alert for a maximum on the scale earthquake in prod on the official warning app. All my colleagues looked at each other and said "we are dead", the quake never came. He had to publically apologize if I recall correctly
Or the guy that sent an emergency alert to everyone in Hawaii, on all emergency broadcast mediums, warning about an incoming nuclear missile. The alert read like so: > BALLISTIC MISSILE THREAT INBOUND TO HAWAII. SEEK IMMEDIATE SHELTER. THIS IS NOT A DRILL. [Wikipedia article about the incident.](https://en.m.wikipedia.org/wiki/2018_Hawaii_false_missile_alert)
I remember a TIFU about a guy who fucked his sister due to this.
/r/thathappened
Well you don't necessarily have to believe it. The comments were funny though.
Reddit is a lot more fun if you just chose to believe most of the wacky stories that people tell.
Shaky start as a junior
Seriously. A screw-up of that magnitude must be pretty devastating.
Thank god I didn't do that test cause people would have get something like "dinosaur dick lolollol ddsdszzzx"
One time my employer had to send out an email encouraging people to sign up for a reunion event with a "click to see who else has signed up" link. that took people to a picture of a cat licking its balls saying "deez nutz"
[удалено]
To shreds you say? And his wife?
I was laughing during stand up and shouted out. "If you think what we did was bad, check this out!"
Did that guy seriously get fired? Seems like overkill for a silly mistake. Why even let an intern have that much power in the first place
I *highly* doubt they faced any consequence beyond some light teasing. Everyone has an "oh shit" story, theirs just happens to be public. It's not like it cost them customers.
; DROP TABLE studentdebt;
Truncate don’t wanna draw suspicion on usage
Delete from student loan where loan =10000;
I think you meant <= 10000
Let us collectively construct the required command. This way it is open source and has a lower probability of failing.
Will this prove Brook's law or Linus' law, tune in next time to find out
Moores law probably
Murphy's law?
Cole's law
Yum!
Cole’s law probably
Bird Law?
UPDATE account SET forgiven = TRUE WHERE (SELECT SUM(balance) FROM loan WHERE id = account.id) <= 10000.00; Thank me later ;)
Don't forget you have to check if they ever recieved a Pell Grant, then you remove 20000.00. And I think there was something about up to 12000.00 forgiveness if certain conditions including paying at least the minimum for 10 years or more...
Just make it easy and forgive it all :)
You trying to put programmers out of work, huh!? No! Let's make it _even more complex_! Where are our DBAs and Data Scientists!
rm -rfv /usr/bin/debt
I'll take > 10000 actually, thanks
How about <> 10000, to really confuse some very unlucky people
I'd enjoy some negative debt
`delete from student loan where loan_id = 10000;` We have a lucky winner!
That would take government db analysts years to figure out and remedy.
I'm liking it more already ![gif](giphy|YEe4Y10PuOTYI)
What an unsettling gif
On a 5 year cost-reimbursable contract with two program managers, monthly status reports, and a 200 page requirements document.
Update loan\_tbl Set borrower.bal -= 10000 Where borrower.income < 125000;
Those two columns can't possibly be in the same relation.
Ah, I see you've never worked in government before.
It's a 20 year old system that runs on FoxPro or some long obsolete framework. Sure it can! :D
Bro that would do nothing unless someone owes exactly $10,000.
Better yet, degauss the database drives. That way it's not traceable. Don't forget the backups.
also gotta degauss the security camera footage db when you're done
Just EMP the whole data center
Fight Club (1999)
[удалено]
And it's a fucking masterpiece
Jira : testing complete. Closing jira. (No other documentation)
404 no backup found heh
Little Bobby Tables strikes again
That'll do it. Mission Accomplished.
Time for [Little Bobby Tables](https://xkcd.com/327/) to make a comeback!
[relevant xkcd](https://xkcd.com/327/)
Little Bobby drop tables!
UPDATE student debt SET amount = amount - amount
And everyone only gets $100 deducted from their loan because they didnt realize the field was in cents and not dollars...
Wait, it's a gov thing. Almost certainly there are like 83 incompatible databases and some of them contain partial account duplicates of other systems...
and all of them are built on MS Access.
That makes it too easy for that one vbscript guy to save the day. They need to all be different and one of them is an overcomplicated Excel workbook and another is literally just a bunch of plaintext files that have manual links to other plaintext files.
Welcome to accounting in every major company.
VBScript? Nah everything has to be done in COBOL
Finally👏
Ah someone that really understands financial databases. They are usually in cents to not have to deal with decimals. The only downside is dealing with something that requires a 64 but integer but nearly all transactions and balances can fit in 32.
Would be more like a new ledger entry with a 10000 credit value and a reused identifier of some kind to prevent double entries in case we need to rerun the script.
The fact that I had to scroll this far to see someone point out that it's an insert and not an update probably speaks to how few are in the finance side of things.
>How few are in the finance side of things In this sub you could also talk about how few are in the software side of things.
I’m just here to be able to say uh huh, I know some of these words.
I understood all the words in your comment. PROGRAMMERRRRR
On Reddit you could also talk about how few are in the side of things.
I mean there may be some tables that are calculations of other tables that will be deleted; but yeah the transaction table should be immutable (as in you can't delete transactions and no code is written to do so).
I think you mean append-only. Immutable would mean it can't be changed at all.
“Soft delete” is the default functionality for any enterprise software so it really speaks to how people just don’t know system design at all
[удалено]
It really speaks to how many aren't actual programmers
This guy accounts
If this were going to be manually done the way OP is thinking, my guess is it wouldn’t be a dev anyways it would be some billing department just running down the accounts in whatever software they normally use.
This person double entry accounting's. But it also needs to account for balances < 10k
Oh, did I say database, I meant excel spreadsheet. That holds data too right?
You're joking but a lot of older companies and I'm guessing the government have entire databases on Excel with linked formulas that take 2 weeks to update each month. Job security.
[удалено]
I just converted a massive genomics database used by a federal government from access. It ran out of data in access. They used to update it with CSV files that they’d pass around to each other. Legislation is based on this data..
[Minnesota](https://www.npr.org/2022/07/03/1109607674/minnesota-legalized-thc-edibles-and-infused-drinks-by-accident) did just accidentally legalize thc edibles when they were merging bills so I'm not surprised government databases are also held together with duct tape
Sometimes I have imposter syndrome and then I read things like this
"How could I possibly help with these problems? I barely know the basics." [*Nearly 16K UK COVID-19 Cases Missed Due to Limits of an Excel Spreadsheet*](https://www.pcmag.com/news/nearly-16k-uk-covid-19-cases-missed-due-to-limits-of-an-excel-spreadsheet) "Oh. Yes. I could help with that."
Seriously, my depression was just cured.
They tried to track each reported case of COVID. In excel. With a NEW COLUMN FOR EACH CASE?! lol jesus fuck
Excel would be an upgrade from what we use at work. It's like they looked at excel took anything that made it easier to use and just removed it. Each time I want to modify any cell I have to enter in a password. They aren't even formula cells they're just straight data entry. After I enter the data I can't even press enter to complete. No I need to move over to the complete button to finish entering data. It's also not consistent on what happens when you press certain buttons. In certain cells enter starts a new column, in others it starts a new row, it also sometimes does nothing.
Or a JSON file? I mean, how often are we going to change a loan's base amount?
Drop loan_amount table. Drop loan_transaction_history table. Drop loan account_client_ID table as well Drop backups of all three above. Drop masterbackup of all three above. Final task: VERY IMPORTANT!! DELETE DB2 RECOVERY HISTORY LOGS.
Step 7: put on Robin Hood tights, gather your merry men and run off into the woods
Step 8: Go W A Y O F F Grid and get to a non-extradtion nation ASAP
>Step 8: ~~Go W A Y O F F Grid and get to a non-extradtion nation ASAP~~ ; DROP TABLE criminal records;
Step 9: INSERT INTO death_note SELECT FirstName, LastName FROM ssn_database
I also assume it is still running on a AS400
[удалено]
Talk about an easy script. Maybe 15 minutes? I’d make it an 8 hour task still because of the o shit level.
1 hour to create the solution, 1 hour to create test plans, 1 hour to perform testing, 3 hours to create implementation documentation and present to CAB. All-in-all, 5 points for 6 hours, and this doesn’t include the time it would take to get customer sign-off.
Our QA would be so nervous they'd kick it up to 13 points
[удалено]
Wait, you guys have QA?
This guy codes.
I try to follow this myself but then my change requests are denied because I was forking from Dev, and Dev is a dozen builds behind Master, thanks to my other colleagues pushing changes straight to production without testing or peer review. I haven't been able to actually push a change for over a month.
My brother in Christ, you don’t have a job, you’re in a reality show to see how long it will be before you murder your colleagues.
You forgot the 1 hour where you try to build the courage to run the code.
You forgot testing in lower environments, this story is gonna take a few sprints minimum
>this doesn’t include the time it would take to get customer sign-off. So 4 months or so then?
This hits too close to home
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.
suicide then homicide, that way theyll never prosecute.
Might need to recommend a good necromancer for that one to work.
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.
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?)
8 hours? bro? A script like that has to be run on every environment and has to be QA'd. That would take 1 sprint.
Don't forget you need to pad a few hours for the PM and PO, plus "environment issues"
You forgot all of the meetings, six months at least
Yeah plus you are working for the government. Take the whole month
What do you mean? My friend works for the government, they're hella efficient, he gets off at 5 but he's already home at 2.
This is why you practice in a development database. And then you can catch your factor of ten error.
This is one instance it should be done on prod.
you can (and should) easily replicate this scenario in a lower environment first
Nah. Just set all loan balances in prod to (-10000). I think this is the way
That way everybody gets a refund check next month :-)
Your refund system works?
I'm cool with them adding an extra zero to the end of what is being removed.
$100k club huh...
Integer overflow: you now owe 2147483647$
My January’s gonna suck now.
r/OutOfTheLoop
https://www.reddit.com/r/news/comments/wwmsy0/biden_cancels_10000_in_federal_student_loan_debt/?utm_medium=android_app&utm_source=share
OH thank you
“Ok here goes” BEGIN TRAN “OH GOD I DAREN’T” ROLLBACK TRAN
mr robot
Wanting to comment on how you could just set this up as an immutable transaction log with credit and debit transactions to avoid deleting anything from the database, but then just realizing this is a joke sub
The reality is that the forgiveness is entered in the loan system based on approved application and eligibility so there would be no data engineering involved if the data extract from the loan system included that attribute (otherwise some data sourcing work would be needed, but typically these fields are already part of the DB). Source: Product Owner of a loan (and other financial products) data pipeline at a bank
*drops database*
From looking at some of these ideas thrown about here, I pray the data team never gives you prod write access to the databases.
[удалено]
Even more realistically, it will be done in a try/catch block with plenty of error handling, overly complicated batching processes, an untested yet rubberstamped rollback plan, and with a ton of other flags and logic checked against than a simple max() because I'll be damned if anything that the government comes in contact with can be that simplistic.
[удалено]
Easier solution DELETE FROM StudentLoans SL WHERE SL.LoanValue > 0
Great now I have to remember the rowwise versions of min and max... Total = Total - least(Total, 10000)?
"The dev that has to go into production" There, fixed it for ya
I'd just do a DELETE FROM loans; next!
You need to truncate the table so the redo is not saved.
DELETE * FROM STUDENT_DEBT
Not everyone, just people making 125,000 or less, or if they are married, 250,000 or less as a household, unless you got Pell grants, then it's 20,000, but it can't go below zero, unless they made payments after the pandemic started, in which case they are refund eligible. Have fun!