On Development

posted July 20, 2012 by Jer


I'm going to be a code geek at you for a second. I'll try to make it interesting for everyone by including as many allusions to humans being eaten by animals as I can.

Like most things, I'm not great at writing code. This is an odd thing to say about a profession one has maintained for over a decade, but the truth is that like most things people think I'm good at, my true "skill" is my ability to fearlessly jump into something I know nothing about and flail around until I get it. Today the crocodile pit I find myself wrestling in is called JSON, (as an alternative to XML) and the rickety rope-and-wood bridge above the aforementioned swamp filled with brutal razor-toothed hunger is JavaScript.

Today I learned that XML is easy to write but a pain in the ass to use, while JSON is easy to use while a pain in the ass to write.

This is the part where everyone stops reading. Everyone who can write code is thinking "You can't write JSON? What the fuck is wrong with you? It's as straight forward as compiling a linux kernel while debugging your stored procedures. I had JSON libraries baking me muffins by the third grade" and everyone who can't write code is clicking back to Hulu to watch an episode of The Kardashians, ironically to avoid feeling dumb. The four of you still reading can hopefully now see why I live in a very dark and lonely island between two oceans of seething hatred.

What I should point out is that this isn't an entirely bad way to live your life. By not knowing how to do my job yet being able to always make it up as I go, I can become genuinely excited about very simple things that skilled developers take for granted. Let me tell you a story about $.each().

If $.each() was a dude, I would pay to have it serviced by 7 high class hookers while bathing in fancy beer. I'm not ruling this out as a possibility for the humans that originally invented it.

When you program, you often have things filled with other things. It might be a pond teaming with enraged man-flesh craving reptiles, a cave stuffed full of Kodiak bears convinced the approaching primate is a threat to their young, or a dense jungle utterly covered with mosquitoes the size of bald eagles, beetles capable of boring into a skull to eat simian brain matter and armies of furry legged 80lb spiders who can't tell the difference between a human and a tasty local insect, because they're roughly the same size when they get trapped in the industrial-strength ocean trolling fishnet they call a web. When I explain programming to folks, I usually just say "STUFF" is full of "THINGS." Got it? Great.

As I just articulated, there's more than one kind of STUFF. We got caves, jungles and swamps. It could be an ocean full of zombie sharks, a desert covered with especially affectionate scorpions, or a sky full of genetically modified pterodactyls. My point is that there are different ways to get the THINGS out of STUFF, depending on what kind of STUFF it is. It's frustrating, when you're trying to procure some ancient golden aardvark idol for a museum owner in Dubai when deep in the African jungle your passage is blocked by a grove populated by flying, fire-breathing cobras. Well shit, this wasn't in the book.

Enter $.each().

$.each() is miraculous little swiss-army knife that comes with the jQuery library for JavaScript. It handles the THINGS in STUFF. So I can say shit like "Take that forest full of freaky cobras. For each cobra you find, douse it's fire breath with water, tie it's wings up and stuff it's fang-y little head in a cute little burlap sack," then WOOSH. Like a hard working little flying robot buddy, it happens, and I can skip gleefully across the charred and bloated bodies of the poorly equipped adventurers who preceded me.

Pterodactyl problems? $.each() implements the lyceum protocol. Enraged Kodiak bears? $.each() sings them a soothing lullaby. Throwing a BBQ? $.each() grilled steaks for all your buddies to each individual's exact preference. It even poured them a beer.

That's what learning to code is like for me. It's utterly terrifying and painful until I finally find the right tool for the job, then I feel awesome and heroic. I hope you enjoyed my little story. Now I've gotta go stick my face back in a wasps nest called fucking JSON.