setInterval(): the sneaky basterd child of JavaScript
So I’ve mentioned at some point or another that a lot of my work at RY has been developing jquery plugins and the like to make our lives easier during the busy reporting season. Overall they’ve worked out pretty well, but every once in a while someone finds a bug with one (or all) that needs addressing. Since they’re my creations, It’s usually put to me to correct these things.
Most of the time, these bugs are a small oversight on my part, or just straight-up stupidity. I’m not perfect, and I’ll gladly fix these things as they come up. I don’t consider bugs in my code that people find to be an affront to my skill; in reality I find them an opportunity to get better at what I do.
Then you run into something like a bug using setInterval, and things just stop making sense.