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

A beginning.

I’ve been meaning to start writing for a while now. I just never got around to it considering I can hardly ever think of anything to write about. But I DO want to write. It is satisfying… or so people say. I almost always end up hating... Continue →