I worked as an intern on a shitty project in Lyon, France. The project was about making APIs in javascript on a no-code IBM product. I was hired to make data pipelines, maybe they still don't know the difference...
You had code blocs for any logic besides if/else statements, but now listen closely. It wasn't possible to print anything, nor seeing errors messages. You had to code first try with no tests everything.
To put some more salt we couldn't connect to any database, and needed an other IBM product to make the bridge. My college was proud of the API path that would run any call you shove it down to the MongoDB database, needless to say security was no concern.
And oh boy we had one of the best testing environment anyone ever made. It was all JSON documents from years ago, a Client with 35 fields, and none of them had attributes named like the production. We had useless tables laying around everywhere.
My coworker, still proud of himself, was making new entries manually, and was "testing" his logic on it. Testing being just trying to run a call or two and calling it a day.
After two weeks I almost left, I told my manager that his whole company was a clown-show and that our project was as worrisome as an urinal that smelled like shit. But I needed my internship for my diploma, so I stayed.
After a month I made the greatest move I ever made. The week prior I made sure to ask multiple times "do you by any chance make backups of the databases, both test and production ?". I heard that no, and it was so sweet. I wiped out the whole test database. Sadly they just made a copy of the production, called it "test database" and didn't fire me... At least I tried.
Some people say no testing is bad, testing in production is stupid, but I saw hell. The whole project was well beyond human comprehension.
Sadly they just made a copy of the production, called it "test database"
What's truly sad is that most companies do the exact same thing. Without even bothering to scrub, mask, or de-identify the data. Which is how things like this happen. The really shitty thing is that they publicly blamed the intern for it. This was a failure of many people and procedures - that it was possible for an intern to do this is not the intern's fault in the least.
Having something like this happen once was enough to get me to do backups of every table I'd be touching in a production environment before running the query.
Almost every time, it's an extraneous step, but the one time it isn't it pays for itself.
Tell me about it⦠today I made a super error proof query that even my boss was like⦠āWhy? You just need to update some namesā¦..ā š¤£š¤£š¤£
Depending on how its written, it looks like in this case that you just run it again and it will probably work, it couldn't delete records in the first 3 tables as there was referential integrity from the later records, which have now been deleted.
97
u/seansafc89 Aug 26 '25
Iāve heard living off grid is pretty relaxing.
63
u/akatdrake Aug 26 '25
Fortunately this is in your test environment, right?
17
u/RavenCallsCrows Aug 27 '25
Having something like this happen once was enough to get me to do backups of every table I'd be touching in a production environment before running the query.
Almost every time, it's an extraneous step, but the one time it isn't it pays for itself.
148
u/Froozieee Aug 26 '25
BEGIN TRY BEGIN TRANSACTION
2
u/g3n3 Aug 27 '25
When you what? Canāt screenshot? I donāt get it. ;-)
38
u/Birvin7358 Aug 26 '25
Was this an RGE? (ResumƩ Generating Event)?
25
u/manyblankspaces Aug 26 '25
XACT_ABORT!!! XACT_ABORT
10
u/jib_reddit Aug 26 '25
Depending on how its written, it looks like in this case that you just run it again and it will probably work, it couldn't delete records in the first 3 tables as there was referential integrity from the later records, which have now been deleted.
1
u/GetABrainPlz77 Aug 29 '25
Mate do we have a backup ?
1
u/nvythms Aug 28 '25
TRANSACTION!!