DEV Community

loading...

Discussion on: What was the worst bug you've ever written?

Collapse
jake profile image
Jake Casto

I was messing with a (dumb) co worker. I told him that ‘rm -rF /‘ would fix all issues in his code. As a joke I added it at to the top of the loader for our web app... I accidentally pushed it to a production server. Long story short I lost my job and had to rewrite everything.

Collapse
terceranexus6 profile image
Paula

Damn, this is hardcore

Collapse
dfellini profile image
Dan Fellini

Epic. I love it.

Collapse
ben profile image
Ben Halpern Author

Are you being serious? That is remarkable.

Collapse
jake profile image
Jake Casto

I’m dead serious.

Thread Thread
rogerogeroger profile image
𝚓𝚘𝚕𝚕𝚢 | 𝚠𝚒𝚕𝚌𝚘

that's the Chicago Fire method of fixing things-- burn it all down, and start over

Collapse
mpeyper profile image
Michael Peyper

I think you win this round or "who's made the biggest mistake"

Collapse
andy profile image
Andy Zhao (he/him)

Oh man... My heart really sunk for you...

Collapse
jake profile image
Jake Casto

It did fix all code issues though :)

Collapse
rsalunga29 profile image
Roland "Akio" Salunga

Holy sh*t. My boss would've killed me if I was in your position.

Collapse
phlash909 profile image
Phil Ashby

To your credit you identified a number of workflow issues doing that:

  • peer review anyone?
  • the code only /exists/ on production (where's the source control)?
  • firing you /before/ asking you to re-write seems pretty short sighted..

I hope you've got a job somewhere more thoughtful now :)

Collapse
jake profile image
Jake Casto

Thank you for trying to credit me, a few issues there haha. I was the primary reviewer, I had worked on everything so long that no one really bothered reviewing my code. We had two git repos, one development & one production. I pushed the commit to the production repo instead of the development one haha.

Collapse
codemouse92 profile image
Jason C. McDonald

Yikes! This is exactly why we tell people not to make light of death commands. :P You make that mistake once, and never again!

Collapse
alephnaught2tog profile image
M. Shemayev

Such a benign version, but I still remember how super upset I was as a kid and someone told me alt+f4 would refresh the page or something.

Thread Thread
rogerogeroger profile image
𝚓𝚘𝚕𝚕𝚢 | 𝚠𝚒𝚕𝚌𝚘

"there's this really cool Gameboy cheat code for Tetris, if you press 'Select, Start, B, and A' all at the same time" is a really cool/cruel joke kids of the early 90s would tell each other ...

Thread Thread
rogerogeroger profile image
𝚓𝚘𝚕𝚕𝚢 | 𝚠𝚒𝚕𝚌𝚘

more related to your benign example (and even more benign): when i was first really tinkering with Linux back in like 2001/2002, i couldn't figure out how to get out of this program i was using (you'd think it would be Vi, but it was probably just a Man page) and a co-worker suggested Alt-F4-- while that did technically get me unstuck from my issue, it took me another day or so to figure out what i'd actually done

Thread Thread
codemouse92 profile image
Jason C. McDonald

Let me guess - erases scores?

Thread Thread
rogerogeroger profile image
𝚓𝚘𝚕𝚕𝚢 | 𝚠𝚒𝚕𝚌𝚘

it reboots the device!

Thread Thread
moopet profile image
Ben Sinclair

On IRC it'd be "use /quit bugging me " to ignore someone.

Collapse
pgoodjohn profile image
Pietro Bongiovanni

I once ran rm -rf / in a virtual machine just for fun to see what it would happen.

The VM had some shared disks with my actual OS and it started deleting everything that I had on my desktop and some other important folders.

I was long due for a backup so I ended up losing a crap ton of data, but now I will never forget to check for shared disks when i'm working in a VM.