This might seem a little odd, but I have a habit of reading the code of web pages.  It might seem less odd when you realize I still do a bit of WebDev now and then, and it can be a useful way of figuring out the tricks people use to accomplish different things.

Sometimes, I come across a page with interesting ‘comments.’  For those who might not know, most languages have a function where you can enter snippets of information that won’t be executed – they’re basically cheat sheet notes for the coder, or also used to help other people who might need to work on the code later on.  You’ll find all kinds of gems in code comments.  I’ve seen code with Haikus inserted, bits of poetry, rants against ex wives…  I even know a website where the author maintains his personal Blog within the comments of the website.  It’s un-viewable to anyone who doesn’t read the code of the site.  However, that site is a well known, widely used forum for web developers, so there’s probably a lot of people who read it.

Anyway, I was reading the code of a web page today, and came across some comments that reflect a certain, personality, of the developer.  It’s a big commercial site, so I think the coder was probably exercising a bit of “freedom” by inserting one or two extraneous comments.  I’ll share a couple of them here.

// Look!  A clock.  Niiiice.

(someone is proud of their spiffy clock generator code)

// Yay for Suckerfish!

(actually, this is a nice little tip of the hat – Suckerfish is a well known and widely used chunk of code used to generate those spiffy drop-down menus you see all over the web)

// Let’s define the innumerable global arrays that Javascript will use to keep track of things.

(someone’s a little bored with grinding out variables)

// …that’s a bit of an overstatement, don’t you think? there might be a lot, but innumerable?!

(someone’s boss is reading their code comments)

// Various data arrays.

(yup, they’re still bored with grinding out data chunks and variables)

Ok, maybe that’s only interesting to me.  I dunno.  Seemed kinda cute at the time.

One thing I should mention.  If you’re a sensitive type who’s easily offended by foul language, never, ever, read the code for the Linux kernel.   Linux kernel writers have issues with cuss words.

Something to say?

%d bloggers like this: