$$: Cache, or Crash

May 27th, 2009 § 1 comment § permalink

I recently revised my opinion of a little JavaScript framework you may have heard of. Frankly, I just got tired of simulating inheritance on my own, and Prototype does a better-than-decent job of class extensions, which is more than I can say for other libraries like JQuery or MochiKit.

However, that being said, it’s also worth noting the fact that Sam Stephenson – creator of the Prototype framework – is also a lead developer on RoR, which means that no matter what framework he’s building or what language it’s in, he’s going to make sure arbitrary – borderline useless – methods and helper functions plague the code base. Among these are things like Enumerable.zip, Element.makeClipping, and the oh-so-overrated Rails “dollar-w” Array method, $w. Now, one could argue that absolutely every inch of Prototype – or any framework, for that matter – simply consists of convenience methods and shorthand coding patterns – and that may be true. I mean, let’s face it, a framework can only utiliize a languages already-built-in capabilities – it can’t add to them. Regardless, I have become rather fond of using Prototype’s XPath parsing engine.

You may recognize some Prototype functions that utilize the XPath DOM traversal method like $$Element.getElementsByClassName and
Element.getElementsBySelector. However, these are H-E-A-V-Y on your browser. How heavy? YMMV, but generally, pretty fucking heavy. So heavy, in fact, that Google decided this was a good idea.  The question is, do I care? Meh, nah, not so much. I increase browser performance like Chris Brown punches out pop starlets.

» Read the rest of this entry «

Start-ups and shut downs

May 20th, 2009 § 0 comments § permalink

I was recently listening to Fuel’s “Shimmer” (probably on the radio, since at any given point in time, it’s playing on either Q100 or Project  9-6-1). Then, out of no where, it hit me: Pip and Estella. Now, between the song’s debut in 1998 on the “Sunburn” album and it’s subsequent homicidal death by radio plays, I must have heard “She calls me from the cold” a million times if I’ve heard it once (hyperbole), but it only recently hit me what the song was about. At least, I seem to be able to – and without much work at all – cut pieces from various moments in the song and essentially recreate one of Dickens’ most memorable works: Great Expectations. However, considering the lyrics in “Shimmer” to be a literary act of epic proportions is a bit of a stretch.

(OK, John. Very good. Anything useful today?)

My point is that it’s not about the idea, it’s about the delivery.

» Read the rest of this entry «

Frameworks: Tendency Towards Dependency

May 14th, 2009 § 3 comments § permalink

We’ll get to that in a minute.

Welcome to the blog! If you’re here, and you need an explanation, you’re probably lost. However, because I’m a good sport, you’ve reached the life and times blog of John Napier, a 20-some-odd year old variety-of-things guy. If you know the difference between NP-Hard and NP-Complete, or you feel slightly offended that I’d even ask, you belong here. If you think it’s possible I insulted your mother at some point in that last 60 or so words, you might find your time better spent perusing around some other, less-technical articles – in which case, you’re currently out of luck, as this is my first post. Let’s be on with it then.

» Read the rest of this entry «

Where am I?

You are currently viewing the archives for May, 2009 at Critical Thought.