Bugs are inevitable; Debugging is painful, but the experiences make us better developers.
So let's hear it! Tell us about some of the bugs you've encountered, and how you dealt with it.
Bugs are inevitable; Debugging is painful, but the experiences make us better developers.
So let's hear it! Tell us about some of the bugs you've encountered, and how you dealt with it.
For further actions, you may consider blocking this person and/or reporting abuse
Latest comments (53)
This one was a bug with a third party vendor. I found the bug for them, and it probably remains unfixed to this day.
We were sending off sheets to be printed, and these sheets included randomly generated unique passcodes of five alphanumeric digits (that is, matching
/^[a-z0-9]{5}$/). We had users log into a portal with these passcodes, along with other authentication information. For years, this was the case without issue.Then one day, I get a support call...
At this point, I have a suspicion. I look up the details in the database again.
Some of you may have spotted the issue already. For those who haven't, let's zoom in.
The passcode is listed in our database as 123E4.
I had to confirm that we sent the passcode out as plain text to the vendor - we in fact did. Whatever process they used to lay out the prints had somehow interpreted our string as exponential notation all on its own.
We couldn't convince them that it was their issue, or tell them how to fix it, so our solution was...
To stop including the letter "e" in our codes Β―\_(γ)_/Β―
This is probably the best bug story I ever heard (Of course not mine)
The E-Mail that could not be sent farther than 500 miles
In a big corp, on a java financial application for about 2000 internal users, there was a huge bug that regularly lost datas, each month I had to play sherlock holmes to reconstitute all history of update from log with a giant sql to put datas back so as to feed the accounting app. The other department who developped it couldn't find why, for them it was due to the fact it was a big application so from time to time it was overwhelmed and so lost data. Improbable explanation, but politically you cannot argue in a big corp... I wait for a huge change in IT system to have more favorable political context to oblige to fix the problem after 2 years. Finally the cause was found: someone made a copy and paste of a value, when a user follows some path they didn't expect, that bad code was executed and caused data to be dropped. Overall, the cost of such bug just discounting a few days I had to lose each month on it was about 100K Euros for a bad copy and paste by a developer :)
Once there was a very hungry Caterpillar.....π
I was managing a really small team (me, 1 dev, 1 tester) and we built a node on our government client's data exchange platform. We traveled to their office for acceptance testing. Everything ran fine locally but only worked the first time when deployed on the server. It drove us crazy and we wasted weeks onsite trying to fix it. I was convinced there was an issue with the other vendor's platform. Finally in frustration, I started reviewing all of the developer's code and saw a variable declared as static. You rarely see those in the wild and questioned him on it. He just thought it might be a good idea to use a static there. It was completely unnecessary and the reason for our run-once issue. He removed it, recompiled and deployed. It worked the 2nd time, and the 3rd, and the 4th ...
Happy Coding!
I once wrote a limited JS parser to remove comments and stitch different JS files together into one bundle in PHP (that was before grunt, gulp and webpack or even node.js or AST-based JS transpilers. Yes, I'm that old). Somehow, it broke the code of one of our applications and I had a hard time figuring out where this happened.
First, I made sure that nothing but comments had been removed, but everything was correct on this account. Then, I had a closer look at the bug.
So I searched the whole code for calls of variables that could in some circumstances not contain a function. Again, without any result. After long hours of searching fruitlessly, I had a coffee and try to look at the problem from a new perspective and suddenly, like clouds indiscernibly shifting forms, I saw the issue.
In two of the files, we had encapsulated our code in an IEFE (immediately executed function expression) not to leak variables into the global scope and forgot a semicolon after the first one. The resulting code went like that:
Do you see it, too? The opening parentheses of the second IEFE were interpreted as a call of the assumed function returned by the first IEFE (which of course returned undefined). I introduced a small filter into my parser that made sure that any IEFE would be terminated with a semicolon so that this error should never ever happen again.
I was working on the issue occurred while loading the
General Settings Pagein E-commerce store built with Spree 3.7 + Rails 5.2.3 + Ruby 2.6When I was trying to open the
General Settings Pageit never opens and browser shows its loading. I checked the back-end log and found that it throws the error:FrozenError - can't modify frozen fataland nothing else.After googling the error I found that this FrozenError class has been introduced since Ruby 2.5.0. And it swallows the actually errors.
To debug more precisely I have downgraded ruby to 2.4.6 and after this I found that the issue is with wicked_pdf gem. There is a render method redefined in it and it goes into infinite loop. Which means the render method conflicts with other gems. Here is the details : github.com/mileszs/wicked_pdf/pull...
To resolve the issue, I have downgraded the wicked_pdf version to tag 1.1.0 from latest one.
Here's a dumb one I just encountered:
Spent WAAAYYY too long wondering why
palette_descwasn't getting set properly.I had one bug I'll never forget that I experienced after only a few months into my first dev job. It taught me a few very important lesson.
I was writing some AngularJs code a few years ago. I found myself having issues with some errors being introduced in a line of code I added. AngularJs uses the
ng-modeldirective to get/set the value from an input to a value in the controller, but the error kept complaining about the directive not existing.Now matter what I did, the error didn't go away.
ng-modelwas defective in the current situation, or broken. It wasn't.By this time I had spent half the day on the issue, and was getting pretty frustrated. I eventually started writing a Stack Overflow post with my code. I assumed I met some edge-case only a highly experienced developer would know, or it was a bug with the framework and I hit the jackpot.
While writing my post I miss-typed the word
ng-modelasng-modal. A massive tidal wave of inspiration hit. I struggled to contain myself as I searched for the original code and sure enough I found theng-modaldirective instead ofng-modelI nearly cried as my single letter code change finally fixed the problem.
I realized I needed to use some better tooling, as it would of saved me an entire day of work. I also realized I should of asked for help sooner as just reviewing the problem provided me solution. Finally, I realized its better to understand the issue than it is to fix it. I spent half the day trying to fix the issue instead of carefully reading the error provided which stated very clearly:
ng-modalinstead ofng-model.Happy bug busting!
Iβve already posted my debugging some time. It about how we were trying to find a reason why some customer passwords did not work.
Enjoy π
The Magical Password
Jan Wedel γ» 0 min read
Some comments may only be visible to logged-in visitors. Sign in to view all comments.