The curious case.

…of a mysterious bug that seems to resolve itself when you undo 5 minutes worth of code and redo all of it. Slowly. #

I get that I could have left accidental keyboard artifacts into the code that cause random syntax errors. But those are easy to identify. So then what?

I was writing some JS which involved Google Maps, HTML5 drag and drop and a few other things. Most of which I don’t have much experience with. I’m experimenting and making it up as I go. It was all working just fine until about 5 minutes ago. I turn around to talk to a colleague and turn back and as compulsive behaviour would have it, I hit Ctrl + R. Page refreshes and BLAM! Everything stops working. I double check code history, check git diffs, everything! Nothing had changed! WTF JAVASCRIPT!

I close-reopen the tab, restart chrome. Nothing.
I start undoing everything slowly. You know… undo, check, undo, check. Till I reach a point where its working. I start redoing the same way back. I reach the end of my redo history and guess what? Its working just fine. /cry /wrist

I think browsers like messing with you for the fun of it. Like a mysterious refresh counter which upon reaching a certain number just stops executing code. Those bastards from Chrome like messing with us.

(This was originally written a few months back. Don’t remember when. It was sitting in a text file which, unfortunately, I modified before I could see its last changed date.)

 
0
Kudos
 
0
Kudos

Now read this

KTM Duke 390

On 12th February came home the KTM Duke 390. It is a 373 cc, 43 bhp, street bike capable of the top speed of about 163 km/h. The Duke 200, i.e. the 200 cc variant of this bike, was launched much earlier than the 390 here in India. It was... Continue →