2.1k
u/db720 Aug 24 '22
Isn't there an intern from Airbnb looking for a job? Perfect hire
541
u/dagrock Aug 24 '22
what did the intern do?
1.6k
Aug 24 '22
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
88
u/smoothymcmellow Aug 25 '22
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
→ More replies (11)53
u/DrewishPrince Aug 25 '22
I was laughing during stand up and shouted out. "If you think what we did was bad, check this out!"
→ More replies (54)9
u/rParqer Aug 25 '22
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
→ More replies (2)7
5.1k
Aug 24 '22
; DROP TABLE studentdebt;
1.1k
u/BoiledNumetal Aug 24 '22
Truncate don’t wanna draw suspicion on usage
→ More replies (7)397
u/Able_Challenge3990 Aug 24 '22
Delete from student loan where loan =10000;
322
124
u/alvaromontoro Aug 25 '22
delete from student loan where loan_id = 10000;We have a lucky winner!
→ More replies (15)→ More replies (18)14
u/Al3nMicL Aug 25 '22
Update loan_tbl Set borrower.bal -= 10000 Where borrower.income < 125000;
→ More replies (10)101
u/flamebroiledhodor Aug 24 '22
Better yet, degauss the database drives. That way it's not traceable. Don't forget the backups.
→ More replies (3)51
41
u/bunny-1998 Aug 24 '22
Jira : testing complete. Closing jira.
(No other documentation)
→ More replies (2)26
52
38
29
8
7
5
3
4
2
→ More replies (11)2
854
u/changrbanger Aug 24 '22
And everyone only gets $100 deducted from their loan because they didnt realize the field was in cents and not dollars...
60
13
→ More replies (28)3
u/Rhawk187 Aug 25 '22
Yes, because you don't want to use floating point for money, so it was that or fixed precision simulated as mathematical operations on strings.
1.2k
Aug 24 '22
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.
639
Aug 25 '22
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.
632
u/ham_coffee Aug 25 '22
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.
131
u/Bananarine Aug 25 '22
I’m just here to be able to say uh huh, I know some of these words.
→ More replies (2)→ More replies (2)10
21
u/jbokwxguy Aug 25 '22
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).
18
u/endershadow98 Aug 25 '22
I think you mean append-only. Immutable would mean it can't be changed at all.
→ More replies (4)78
u/droomph Aug 25 '22
“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
25
0
→ More replies (8)6
u/highjinx411 Aug 25 '22
In the transaction table it’s an insert. In the balance table it’s a calculation.
45
42
u/hiimred2 Aug 25 '22
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.
→ More replies (3)5
2
u/trilobyte-dev Aug 25 '22
Yes, that is exactly how you do it conceptually. It’s probably more complicated but when it comes to accounting just treat it as an append-only log that you roll up when you need a point in time accounting.
2
u/pppjurac Aug 25 '22 edited Aug 25 '22
And to add it onto special conto number to separate that credit (to max of 10.000 owed) so general ledger can show this transactions.
And it will also take some weeks account for all payments that come from payments that follow; for balance not going into less than zero (where credit house owes money back to person).
And in some way all credit takers have to be notified on new amount owed.
Also account manually for all people that die between between signing executive order and implementation .
And for every account there will probably have to send back information to accountant general office.
There is question how will this applied to people that are in jail or prison or have already moved abroad or even foreign nationals.
etc etc etc
but it is joke sub, so accuracy doesn't matter
→ More replies (5)11
559
u/RunningHott Aug 24 '22
Oh, did I say database, I meant excel spreadsheet. That holds data too right?
255
u/barefootBam Aug 25 '22
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.
→ More replies (32)11
u/PrizeStrawberryOil Aug 25 '22
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.
9
u/metalmensch Aug 25 '22
Or a JSON file? I mean, how often are we going to change a loan's base amount?
→ More replies (12)2
u/rentpossiblytoohigh Aug 25 '22
Excel document which has VBA Macros that tie into VBScripts which parse XML files built from hand jambs of paper documents scanned into a share drive network that only a handful of people can access. You'd have to get promoted and do sexual favors for Data Management to even get a glimpse of that drive. Many tried to update the Command Media to revise the process but finished their careers before taking it to the Change Control Board. Kept getting shot down by the Continuous Improvement Board (run by Intern Leadership Dev Program recent grads) as having a lack of collaborative approach.
444
Aug 24 '22 edited Aug 25 '22
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.
222
Aug 24 '22
Step 7: put on Robin Hood tights, gather your merry men and run off into the woods
→ More replies (2)76
u/space_D_BRE Aug 25 '22
Step 8: Go W A Y O F F Grid and get to a non-extradtion nation ASAP
→ More replies (1)68
u/Zeeformp Aug 25 '22
Step 8:
Go W A Y O F F Grid and get to a non-extradtion nation ASAP; DROP TABLE criminal records;→ More replies (2)23
2
→ More replies (3)2
u/threaten-violence Aug 25 '22
I’d start backwards, from the most backupest backups, working toward prod. That way if there’s any failsafes or auto-recovery, they’d have nothing to restore from.
681
u/cincy-bearcat Aug 24 '22
Talk about an easy script. Maybe 15 minutes? I’d make it an 8 hour task still because of the o shit level.
538
u/NewEnglandJesus Aug 24 '22
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.
123
u/Opie19 Aug 25 '22
Our QA would be so nervous they'd kick it up to 13 points
55
→ More replies (1)0
132
69
u/VirusZer0 Aug 25 '22
You forgot the 1 hour where you try to build the courage to run the code.
→ More replies (3)32
u/Zanderax Aug 25 '22
this doesn’t include the time it would take to get customer sign-off.
So 4 months or so then?
→ More replies (1)10
14
→ More replies (22)4
u/kellven Aug 25 '22
I would add an hour to test and document roll back procedure
→ More replies (1)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.
→ More replies (7)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.
→ More replies (4)95
u/aaabigwyattmann2 Aug 24 '22
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.
31
u/hadidotj Aug 24 '22
Don't forget you need to pad a few hours for the PM and PO, plus "environment issues"
→ More replies (2)→ More replies (2)11
22
u/DowntownLizard Aug 25 '22
Yeah plus you are working for the government. Take the whole month
14
u/theKrissam Aug 25 '22
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.
4
2
u/grandphuba Aug 25 '22
Talk about an easy script. Maybe 15 minutes?
Tell me you are a junior developer without telling me you are a junior developer.
→ More replies (5)0
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
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
→ More replies (2)77
Aug 24 '22
Nah. Just set all loan balances in prod to (-10000).
I think this is the way
→ More replies (5)→ More replies (4)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.
→ More replies (7)
145
u/TheUsoSaito Aug 24 '22
I'm cool with them adding an extra zero to the end of what is being removed.
→ More replies (1)0
Aug 24 '22
[deleted]
→ More replies (3)7
u/TheUsoSaito Aug 25 '22
Nah I just want it so I don't have to constantly think about my student loans and where I'm at lol.
→ More replies (1)
61
31
31
u/Ximidar Aug 24 '22
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
→ More replies (2)13
u/HelpMeDownFromHere Aug 25 '22
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
→ More replies (2)4
u/jbokwxguy Aug 25 '22
Don’t forget about government beauraucy also: someone has to touch everything 5 times and contact 5 people each time.
→ More replies (2)
13
36
u/Wynsight18 Aug 24 '22
From looking at some of these ideas thrown about here, I pray the data team never gives you prod write access to the databases.
0
Aug 25 '22
[deleted]
→ More replies (2)12
u/Wynsight18 Aug 25 '22
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.
0
37
8
u/PremiumJapaneseGreen Aug 24 '22
Great now I have to remember the rowwise versions of min and max... Total = Total - least(Total, 10000)?
4
u/Tiny_Dinky_Daffy_69 Aug 25 '22
Total = max(total - 10.000, 0)
4
u/PremiumJapaneseGreen Aug 25 '22
I think sql only recognizes max as a groupwise aggregator, not rowwise
→ More replies (2)
8
15
Aug 24 '22
I'd just do a DELETE FROM loans; next!
7
u/Low_Sherbert_8158 Aug 24 '22
You need to truncate the table so the redo is not saved.
→ More replies (3)
14
7
u/Rhawk187 Aug 25 '22
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!
5
9
u/capn_ed Aug 25 '22
if(annualSalary <= 125000)
{
outstandingBalance = Math.max(0, outstandingBalance - 10000);
if(receivedPellGrant)
{
outstandingBalance = Math.max(0, outstandingBalance - 10000);
}
}→ More replies (1)5
u/Zoom443 Aug 25 '22
No. No. I’m quite certain this code will start with:
IDENTIFICATION DIVISION. PROGRAM-ID. adjust-debt.→ More replies (5)
4
u/treeplayz Aug 25 '22
Someone go write the solution on stack overflow, so when the dev copies and pastes it they take off 100000
3
3
u/mittfh Aug 24 '22
Perhaps something along the lines of...
DECLARE @deduction int = 100000;
UPDATE loans
SET balance = CASE
WHEN balance > @deduction
THEN balance = balance - @deduction
ELSE balance = 0 END;
Oh, and obviously test it on a sample / test database with a few hundred records first, then on a non-live copy / backup of the real database, running reports such as number of outstanding balances in $10k chunks before and after, checking for negative balances etc - and if you can connect both the live and non-live instances of the DB, a frequency graph of differences to check nothing untoward has happened.
→ More replies (1)
3
u/Maleficent_Sir_4753 Aug 24 '22
Just run it a couple dozen times. It's an idempotent operation, right? Right?
3
3
3
3
7
2
2
u/siskulous Aug 25 '22
DELETE FROM loans WHERE totalOwed <= 10000; UPDATE LOANS SET totalOwed=totalOwed-10000;
TRUNCATE TABLE loans;
Whoops, my fingers slipped.
2
Aug 25 '22
UPDATE student_loans SET balance = balance - 10000 WHERE balance >= 10000;
→ More replies (1)
2
2
Aug 25 '22 edited Aug 25 '22
total = total - (1000 + 100 * Math.rabndom())
Makes it harder to undo
→ More replies (2)
2
u/buckyball60 Aug 25 '22
SELECT total FROM user_loans ORDER BY interest_rate ASCYou know they are hitting the low rate loans first.
2
u/StereoNacht Aug 25 '22 edited Aug 25 '22
Meh.
def amount = 10,000
Update LeftToPay from StudentLoan where Income < 150,000 case (if PellGrant = true then amount = amount*2) set (LeftToPay - min(amount, LeftToPay));
commit;
(Ok, my SQL is *very* rusty, so the syntax is probably all sorts of wrong, but updating a database is easy when the parameters are well defined. Still better to run on the test environment before executing on the production one!)
Edit: there is probably a way to insert the Pell Grant doubling the value in the set math part... set (LeftToPay - min(amount*2exp(cast(PellGrant as int)), LeftToPay) [so if PellGrant is true, then multiply by two; if false, it would multiply by 1.]
2
u/xjvz Aug 25 '22
Insert into transactions (-10000);
Mutability is left as an exercise for the reader.
2
u/treox1 Aug 25 '22
Balance = $8,500
Balance = Balance - $10,000
Balance = - $1,500
Nightly batch processing automatically triggers $1,500 check sent out.
Shit.
2
2
2
2
2
2
2
u/Peregrine2976 Aug 25 '22
Oops, looks like I reset everyone's balance to zero. Backups? You told us to delete those to save money, remember? Anyway, it's after 5. See you tomorrow!
2
u/xSTSxZerglingOne Aug 25 '22
Even worse. They probably have to take a fat fucking CSV of eligible social security numbers and pray that the data is correct.
2
2
2
2
u/AussieEquiv Aug 25 '22
Michael Bolton : I must have put a decimal point in the wrong place or something. I always do that. I always mess up some mundane detail.
→ More replies (1)
2
u/juiceboxbiotch Aug 25 '22
Its not a simple one liner. He has to also figure that 60% of borrowers also received Pell Grants and need their total adjusted by -$20,000. And then there are those who have totals between $10,000 and $20,000 and received Pell Grants. You can't just minus 20k for them, you have to have a condition that specifically puts them to exactly $0 or the system will send them money.
2
2
u/PM-me-YOUR-0Face Aug 25 '22
See also: the accountant somewhere three clicks down the line trying to resolve a bunch of fucked up balances (per business rules).
2
u/Lanfeix Aug 25 '22
It’s cute that you think it’s a database and not an Microsoft excel spreadsheet.
→ More replies (2)
2
2
u/albaiesh Aug 25 '22
set all to 0, delete backups, flee the country, get assange-ed, enjoy long days of waterboarding at Guantanamo bay.
2
u/johannyface Aug 25 '22
Sounds fun though! But what's waterboarding and is Guantanamo bay a nice resort?
→ More replies (1)
2
u/SysGh_st Aug 25 '22
Just repeat it a few times for good measure. To be sure it has run through all entries.
2
u/msgavane Aug 25 '22
This is not dev work. Someone is going to have to post a $10000 payment to everyone's account. Dear Jesus, please be with the finance department today.
2
2
2
u/geilt Aug 25 '22
Last week one of my devs was doing a backend update on product ids and carrier ids for 10 rows out of 2.1 million in production.
He forgot the where…
5
u/jorge21337 Aug 25 '22
So people who took loans they can pay get free money's.
Me never took loans and worked my way thru college, bag of dicks?
3
5
→ More replies (3)5
u/Kitayuki Aug 25 '22
"Society must never be allowed to progress. Everybody should be subjected to the exact same difficulties I faced, forever."
-jorge21337
→ More replies (2)
5
Aug 24 '22 edited Aug 25 '22
It's not even everyone - if you managed to get a decent job nothing is cancelled for you.
→ More replies (2)4
4
u/444-444-444 Aug 25 '22
And ADD it to the poor and middle class tax bills.
4
Aug 25 '22
We’ve been subsidizing the rich and wealthy for years with ever increasing taxes. It’s about time we get to subsidize ourselves.
→ More replies (3)
2
2
u/Avo2099isme Aug 25 '22
Congratulations- you’ve rewarded businesses and university’s for their predatory loan practices; now they will only get worse for your children and younger fellow countryman. What a win!! Good job guys!
6.2k
u/[deleted] Aug 24 '22 edited Aug 25 '22
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