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


Now read this

Ride to Coorg.

Coorg Two weeks into getting the bike, a few colleagues and me headed off to Coorg for a 2 day trip. The troop consisted of 6 vehicles in all. A Yamaha R15 (J), two Duke 200s (B and S), two 390s (me and K, both still in run-in about... Continue →