DEV Community

Peter Tasker
Peter Tasker

Posted on

What's the dumbest bug you caused yourself

I was thinking about this recently, what's the dumbest bug you've caused yourself?

I'll go first.

More often then not my code won't work because of a rampant letter 's' somewhere in the code. 'Undefined variable s' etc.

The reason? Hitting CMD-s to save a file and letting off CMD too early...

:face-palm:

Oldest comments (48)

Collapse
 
ben profile image
Ben Halpern

One time I was writing some code and I heard the Mac trash can sound in my headphones and it confused me for a second, but I kind of shrugged it off. A little later I went to commit some code to production and it was a tiny fix and I did git add . and made the push without thinking much. Then I went off to do some other things.

A little later I notice that A CRITICAL IMAGE IS MISSING and that's when I realized what the trash can sound was. I accidentally sent something to the trash as my computer lagged and I clicked some keys while it was frozen.

I HEARD THE TRASH CAN sound and when I put two and two together it was major face palm.

Very sloppy.

Collapse
 
ptasker profile image
Peter Tasker

Lol, yeah the trash can sound is never good...

Collapse
 
frosnerd profile image
Frank Rosner

Neither is git add . :P

Collapse
 
ptasker profile image
Peter Tasker

Oh man, so much this.

Collapse
 
andy profile image
Andy Zhao (he/him)

I dropped test coverage by over 60%, all because I left a setting that focused on running a single test and only that test.

This happened today.

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

Spent two days debugging a seemingly impossible freeze-crash.

Day two, my non-programmer mother said "I bet you forgot a semicolon somewhere."

Ten minutes of desk-checking later, yup, there it was. Missing semicolon in a for loop, making it infinite.

Collapse
 
pbouillon profile image
Pierre Bouillon

Changed the name of a git submodule, suddenly making all the submodule files tracked by my repository. Needless to say the repo was wasted and needed to be recreated.

Collapse
 
computersmiths profile image
ComputerSmiths

Recently:
Meant to clean up a development directory with:
rm *~
But missed the tilde

In the past:
Deleted entire directory structure of a CP/M disk and had to rebuild it by hand. Yeah, all my BIOS sources. 😜

Collapse
 
garwan50 profile image
Garwan50 • Edited

Not a big deal but i wrote
curl_setopt($handle, CURLOPT_HTTPHEADER, "Authorization : something");
instead of
curl_setopt($handle, CURLOPT_HTTPHEADER, "Authorization: something");
took me three days and stackoverflow to notice it

Collapse
 
falansari profile image
Ash

ouch XD

Collapse
 
kammy_smb profile image
kammy

This has happened so many times to me it's quite embarrassing at this point

Collapse
 
telexen profile image
Jake C

I often comment out parts of the beginning of a stored procedure and make it more of a script, then strategically place RETURN; statements one at a time to debug SQL statements within the procedure.

Once in a while, I find the problem, fix it, but forget to remove my RETURN; before saving.

Collapse
 
djpallotta profile image
D. J. Pallotta

Forgot to set up a rewind for a segue and wondered why the app dutifully consumed memory no matter how many times the "back" button was tapped. That screen is gone, why are there a dozen copies in memory??!!?

After that adventure I forced myself to learn how to properly use navigation controllers.