DEV Community

Cover image for 👻 Do you have any horror stories to share? Spooky bugs, scary data leaks, horrifying code, etc. 🎃
Ben Halpern
Ben Halpern

Posted on

👻 Do you have any horror stories to share? Spooky bugs, scary data leaks, horrifying code, etc. 🎃

Top comments (49)

Collapse
 
rbanffy profile image
Ricardo Bánffy

Every time one installs or updates the JDK, there is the message:

"3 billion devices run Java".

Collapse
 
lpasqualis profile image
Lorenzo Pasqualis

Oh yeah, I remember many years ago when my CTO wanted to clean up a few rows in the DB and ran a select without specifying a WHERE clause.

DELETE FROM users;

The team spent the next week recovering data from printouts ( Hey, it was 1999 :) )

...Opppsssss....

From that moment on, we made him run mysql with the --i-am-a-dummy option.

Collapse
 
lluismf profile image
Lluís Josep Martínez

In 1999 there were already DB backups. And many years before too :-)

Collapse
 
lpasqualis profile image
Lorenzo Pasqualis

Oh, I know... :)

Collapse
 
jess profile image
Jess Lee • Edited

Once upon a time, all my work from the previous night disappeared. git reflog showed a SHA but the line was blank and my work never came back. It was spooked and never used that computer again.

Collapse
 
meisekimiu profile image
Natalie Martin

The "monotable".

I thought it was just a myth. An urban legend people made up for a funny story on The Daily WTF. But then I witnessed it. It happened on my team. Done by people I worked with!

We were working on a system based on a very annoying CMS. We decided to move certain aspects to a database instead of however we were storing those parts in the CMS before. I joined the team near the middle the migration and helped work out some bugs on one component we were migrating to the database.

I then moved on to another aspect of the system, which had some problems with the SQL. I asked the guy on our team responsible for integrating the database in the first place to see the schemas for the tables. And that he did... he showed me the schema for the table. Yes, our entire database consisted of a single table, with columns upon columns added on for additional features.

Now, I've seen some database table monstrosities before, and heck, I've even made some when I was first learning how to work with databases, but this was coupling completely unrelated aspects of the system together. I'm talking about storing user input and system configuration in the SAME table!

So yes, that was pretty spooky.

Collapse
 
ben profile image
Ben Halpern

Just the other day I accidentally committed a ~200mb file to git, which is not allowed in GitHub, but removing it was much more complicated than just deleting the file because it already existed in the git history.

The whole process of removing it was pretty scary as it required rewriting the git history in possibly destructive ways if done wrong. 😱

But it worked out fine. 😄

Collapse
 
andreujuanc profile image
Juan C. Andreu

Or when you forget to create gitignore and you see your connection-strings commited xD

Collapse
 
inidaname profile image
Hassan Sani

Guilty of this😄😄😄

Collapse
 
s_anastasov profile image
Stojan Anastasov

Working with a "REST" API today the error response was

{errorCode:1, error:"Error message"}

For the people who haven't had coffee yet, the quotes for errorCode and error are missing so it isn't a proper JSON. I think it actually took some effort to make it like this instead of proper JSON.

Collapse
 
mogery profile image
Gergő Móricz

Use eval()

Collapse
 
s_anastasov profile image
Stojan Anastasov • Edited

I am not sure what that does... I am writing the Android client (using Kotlin), the server code is written in PHP :)

Thread Thread
 
mogery profile image
Gergő Móricz

Oh,

that’s a valid object in JS, so if you would work in JS and put it in an eval function, it’d return the object.

PLEASE FOR THE LOVE OF GOD NEVER USE EVAL. IT’S VERY UNSAFE.

Collapse
 
luar_serrot profile image
🎃Raúl TorreSpooky🎃

I remember one time that I was forced to debug a 7000 lines, obfuscated javascript file.

I think that says everything. :>

Collapse
 
pildit profile image
pildit

This must be hell..sure it was!

Collapse
 
andreujuanc profile image
Juan C. Andreu • Edited

One time a friend of mine and colleague was "fixing" some purchase orders and he had to delete some of the rows. He opened Management Studio and got some queries running.

After confirming the rows he needed to delete, he started to write the DELETE query. He always commented the delete statements to prevent any accidental data loss, but that night right after when he has just written the table name part of the syntax, he accidentally pressed F5 because he wanted to be sure that the SELECT conditions were correct.

Something like this:

SELECT .. 
FROM [TABLE HERE]
WHERE [LOTS OF CONDITIONS ]

DELETE FROM [SAME TABLE NAME HERE] 
[HE FORGOT TO PLACE THE CONDITIONS HERE]

The best part was when he pressed STOP to stop the query and the cancel was not working, he panicked and unplugged the Ethernet cable from his computer. xD

To this day, some people say that some of those lost rows still appear on query results.

Collapse
 
derekpalmer profile image
Derek Palmer

Being asked "why would I use source control?"

Collapse
 
skyrpex profile image
Cristian Pallarés

Oh, I've been told that, and that code revisions and unit tests are useless...

Collapse
 
derekpalmer profile image
Derek Palmer

Terrifying

Collapse
 
preciselyalyss profile image
Alyss 💜

I once not only deployed on a Friday...I changed the hosting server and underlying software AND THEN deployed on a Friday. 👻

Collapse
 
danieljsummers profile image
Daniel J. Summers

Did it work out, or did you learn why the conventional wisdom about that can be summed up with "don't"?

Collapse
 
preciselyalyss profile image
Alyss 💜

It did work out, but I was enabled and supported by the manager/director from technical operations. I'm not ignorant of the conventional wisdom and I'm stability-conscious. There are nuances to the situation which I didn't feel the need to divulge in a light-hearted post.

Thread Thread
 
danieljsummers profile image
Daniel J. Summers

I wasn't trying to imply otherwise. :) I just wondered if it all worked out; I'm glad it did.

Collapse
 
bgadrian profile image
Adrian B.G.

One of my first days of work, open the project, browse, read and find 2 5000LOC God classes.

Good thing later I used those to practice all the refactoring techniques from a famous book and recognize most of the OOP anti-patterns.

Collapse
 
engineercoding profile image
Wesley Ameling

Which famous book? That could come in handy later for me

Collapse
 
bgadrian profile image
Adrian B.G.
Collapse
 
cdvillard profile image
Charles D. Villard

The word 'Drupal' will probably already send a shiver down many a developer's spine, but that's what I was working on today: updating a client site's core Drupal libraries and modules with drush. This is something I've gotten down to a mad, mechanical sort of a science, but it's not without its flaws. I went through the process only to be met with a styleless page, and what's worse, fixing any issues brought it to a screeching halt in the form of an 500 error! Thankfully this was only a scare as I had forgotten this was on a dev server, but never something to be taken lightly.

Collapse
 
le_newtype profile image
Nicholas ―M― • Edited

I didn't do anything to prevent the unnecessary re-rendering of a React component that used the Google Location API. Within a few hours of it going live, we hit our max amount of free API calls and the whole feature was basically useless for 24 hours 🙃

Thankfully this was when we were slowly reskinning / revamping our product, so clients could still use the old version and knew there wouldn't be a seamless transition until everything was finished.

And that's how I learned why performance lifecycle functions are important.

Collapse
 
maxwell_dev profile image
Max Antonucci

CSS ID selectors...nested inside MORE CSS ID SELECTORS!

Collapse
 
rhymes profile image
rhymes

Definitely guilty of this in the past, due to some mess with jquery and widgets with dynamic content. Not enough of an excuse, I know 🤣

Collapse
 
plutov profile image
Alex Pliutau

For around one month I had a bug on Mac when Mac clicked random parts of the screen sometimes, like switch to another tab in Slack, open a tab in browser, etc. Then I found that it was my coworker who used bluetooth mouse, which was connected to my laptop, I used it one time, so it was saved in configuration.