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...


Did you find this post useful? Show some love!

Editing in development environment while watching another environment for changes that never come. I'm afraid to say I've wasted way too much time wondering why nothing worked.

Yeah happened to me a lot, or copying a file and then editing the original expecting the copy to change

oh man, similar thing. we have a project that loads two other projects as modules. the one module uses hardlinks so you're able to change the JS/cshtml while it's running. the other project was never set up that way (probably because it was going to be a temporary project). the projects are combined in VS with a "combined" project that has everything in one place so we don't need to run three instances of VS.

so instead of stopping, changing and rebuilding, i would just edit the js/cshtml files that were copied to the main project when everything builds, then copying the changed files back to the project's source directories...

... except when i didn't copy and thought it was safe to rebuild. lost my work so many times. facepalm

How about freaking out over why changes aren't posting to dev only to realize you've been pushing to production... Yeah, me neither...πŸ€«πŸ™„

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

Classic. Wrong file/folder/server is the first I look when helping a co-worker debugging.

Next: permissions

Also: Caching

(Still happens to me all the time xD)

I like how many people relate. Makes me feel slightly less idiotic πŸ˜‚

This is really common. Happened to me when I work on multiple projects at same time. Also when I have many copies "app" "app1" "app2" "apptest"

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.

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.


Hey there, we see you aren't signed in. (Yes you, the reader. This is a fake comment.)

Please consider creating an account on dev.to. It literally takes a few seconds and we'd appreciate the support so much. ❀️

Plus, no fake comments when you're signed in. πŸ™ƒ

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

The biggest face-palm bug I've faced was while working on a language runtime. I was implementing a method aliasing feature that, if working correctly, would extract a method from one object and inject it into another. I coded up a solution that should have worked, fired up a REPL, and attempted to hit the new aliased method.

I was promptly greeted by an error with the message "This method does not exist." Crud!

I went back and reviewed my implementation. I tried adjusting some things, moving allocations and dereferencing pointers slightly differently, and yet each time I got the same answer: "This method does not exist." I put in some debug logging statements, but everything looked correct. I stepped through the whole process in a debugger, and still everything looked correct.

At a loss, I randomly decided to look at the implementation of the method I was attempting to alias. Since it was a library method, and not part of the project I was working on, I had to go check out the code and dig in. Eventually, after working out all the complex inheritance and class-cluster implementation details, I found the source of the specific method I was working with. It was, in effect:

fprintf(stderr, "This method does not exist.");

I just laughed so hard I woke the dog up.

My project for PHP this past semester was a site to track my errors with the idea that eventually you could have multiple users, share them, think of things to look for in your own code, learn, etc. I hadn't thought about the debugging issues that would arise when my code and text was full of the word "error" and oh man, the number of times I would stare at the screen because of the error message that showed up... only to realize that no, that WAS what was supposed to happen, I was TRYING to show those error messages.

Eventually I just added a temporary class to make all of those "error" messages bright green.

I developed a company-internal social application with LDAP authentication.
I used a code snipplet.
As it turned out, any username with empty password worked just fine. The code snipplet would simply skip password check for "undefined" empty password.

I nearly made that same mistake last month x'D luckily while I was testing login, I "accidentally" left the p.w field empty when I was trying out different combos. Lo and behold I got in lol! Fixed fast.

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.

it took me an hour to figure out why i only sometimes got a certain thing to happen (i can't remember what it was, so let's call it a popup). i'd go through the process of doing what needs to be done and only sometimes the popup worked and i couldn't figure it out.

turns out i shot myself in the foot when i used

if (variable) {

"that won't work you knob! 0 is a valid value!"

I accidentally mis-wrote some CSS, so the animation from an svg loading element bled over to all the svg's on the page. The feature we were working on involved a rating page with a bunch of yellow stars (think amazon reviews) that now all spun around. It delighted everyone and they made me show it to the executive in charge of the whole division.πŸ˜…

my cheapest bug in the code:
back in 2005 I needed to send email to 300 customers in two for loops..
so I sent 300 identical emails to each customer, because of index error in second for

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.

We were migrating a database and my leader told me to create a temporary feature that sends a email containing a new randomly generated password to every email address that was registered on the system.

The thing was I forgot to add the "new" keyword when creating the mailer object as I thought it would create a new instance on every call.

Every time the "feature" sent an email, the email address would be appended to a property of the mailer object. Thus, the previous users (that had been emailed) received the email for the next users and had their inbox spammed. Fortunately it was just some randomly generated password.

What a stupid mistake lol.

(Please forgive my grammar mistakes, if there are any)

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.

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. 😜

Oh man that "s" It's my biggest problem specially when the ide or app doesn't show any message.

Another one, re-declaring variables on JavaScript or any language. Or changing the value at some scope.

Script not running because some special character and you cannot see it with some ides or text editors.

Shipping critical new crypto code to production with the wrong keys configured, caused a full DR failover as nothing decrypted any more.

Of course this would have been caught in test, if test had any HSMs installed. Who designed those environments you ask? That would be me...

(In my defence, nobody would pay for a Β£25,000+ HSM outside production, and the supplier didn't have any emulators available)

This was 3 years before : Clients were complaining about freezing of browser after 3 to 4 hours of usage. Debugging helped me to figure out a setInterval inside a closure which was not removed and a TODO note saying TODO : To be removed :)

Adding contextual locking, but forgetting to unlock in case of an exception.
Took a long time for something to go wrong. But when it finally did the application stopped immediately trying to acquire a lock it would never get.

delete from tblSomething - omitting the where :)

Boolean errors. Always forgetting to add a ! in validation code.

this.items = service.call();
if(!!this.item) {
I couldn't see the missing "S" πŸ˜…

Creating member variables within a Servlet thinking they were local... but they are global and in production people overwrote their results making the whole application malfunction.


I deleted a large number of products on an e-commerce platform by deleting their attribute set. And I was thinking this is the development

I don't remember how this happened, but I was building an SMS service and accidentally sent myself ~1500 texts. Probably did something silly in a callback.

Writing try{} catch{} as usual then putting all my code in catch, instead to try. I was wondering why my code does nothing and none of my breakpoints are ever hit.

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.

One very common mistake: forget to "git add" a new file. Time and again the CI fails "for apparently no reason."

But my favorite was to try to solve a conflict running "apt-get remove apt".

Working on a React app, using console.log in the client code and I was expecting them to show up in the server....

I constantly forget the return statement at the end of a method.

Wondering each and every time: Why is the variable null!?!?

Classic DEV Post from May 16

Taking Notes

Using bullet journal techniques to take notes and get things done

Follow @monknomo to see more of their posts in your feed.
Peter Tasker
Programmer in Ottawa Canada.
Trending on dev.to
What's your approach to fixing a "long-term" hairy bug?
What are your programming blogs?
Back to basics: Naming
#naming #javascript #programming #discuss
Ever feel like you have "Programming Synesthesia"?
#discuss #programming #productivity
When is code "too clever" / how do you think about readability/cognitive load?
What are the first differences you noticed in GitHub after Microsoft bought it? Post here yours!
#github #microsoft #discuss
Which contentious opinions in programming actually matter?
#discuss #webdev #programming #grannyrulescomments
How do you make time for your dev/tech projects?
#discuss #productivity