Recently, I spent 1.3 buttloads of time (and yes, the buttload is the metric standard unit of time spent coding) coding Javascript.
Why, you ask?
I guess I’m not really sure myself.
But I’m starting to think looking into the eyes of Cthulhu would untangle my mind.
Picture it: a cubicle in corporate America, 2008.
I diligently worked on a solution to one of life’s most puzzling puzzlers: how the crap does one cause a column of check boxes to all check and uncheck when a select all button is pushed?
Lo, I realized that this probably had been solved before, and headed toward the intertubes for reference. So, rather than reinventing the wheel, with corners, I procured a solution. It worked. For the most part.
But then… down came the good Manager and he said, “little coder Falquan, no time to look at pr0n; still there are more boxes, to wire up instead.” Then there was something about 3 more chances, but, really, I lost interest after “no…pr0n”. Oddly enough, though, it was sung to the tune of “Little Bunny Foo Foo.”
And by “was,” I mean, not at all.
Basically, this meant that I needed to devise a way to uniquely identify every single check box on the page, and toggle them on and off based on the status of their related brother and sister check boxes.
As such, I set out to modify and create a system that would automate this process for me.
What resulted was that I learned a lot of sloppy JavaScript. Me-thinks me-needs to make sloppy seconds of it.
What I’ve learned is that, .NET and Javascript inherently hate each other. With knives.
Also, Javascript sucks.
Yes, dynamic typing has it’s place, and I suppose allows for a lot of flexibility, but, I can’t even count the amount of times it interpreted a string as a character array and didn’t, in some way, make it obvious. What is this, C in 1978?
It also made me realize that client-side development is pants-crappingly difficult. Few good tools exist to really make this easy (Prototype, script.aculo.us, etc., help), but I find no really good tools to ease that development. And with as much focus on client-side/AJAX as is going on these days, one would think it would be slick by now.
I guess that’s what I should call “job security.”