The iPhone 3G S has been all the rage, and admittedly I’m still pondering the upgrade from my 3G. Sure, I can nab it for $200 from AT&T and sell my current one to cover the costs, but what about next year? Will AT&T allow full subsidized price again to those who already took advantage of it twice within two years? I’m not so sure.
So I think I’ll wait for the next iPhone, and in the interest of saying “I told you so,” I am making the following predictions for it and the 4.0 OS.
Read full post »
With the advent of MooTools 1.2.2 comes the ability to mark Class methods as private protected. Let’s take a look at some code.
Read full post »
MooTools is just the best JavaScript thing ever. And I say that totally subjectively because I honestly don’t have much experience with anything else other than jQuery. Some of the design decisions are nothing short of genius – custom events, element properties, and class mutators – to name a few.
The Binds mutator is particularly headache relieving. My only issue with it is that you need to list out all the methods you want bound, which somehow, I am very prone to jacking up due to forgetfulness or quick refactoring.
Binds : ['update', 'include', ...] // yadi yada
So since I have nothing better to do in the airport than watch a depressing House episode, I figured I’d write my own BindAll mutator to save myself from my own misery (and maybe save you from yours).
Read full post »
I just spent a few hours tracking down this lovely bug that broke my portfolio page in Safari 4 Beta (build 5528.16). If you add a property to a constructor’s prototype after initializing an object from that constructor, then that new property will not be enumerable in a for-in loop (presumably it’s been mistakenly marked DontEnum).
(update: The May 12th update to Safari 4 - build 5528.17 - fixes this issue, woohoo)
I first discovered this when the oneEvent method that I added to the Events Class was not getting implemented into my other Classes. The JS.Class blog mentioned a Function.prototype enumeration bug that may be related, but other than that I couldn’t find any mention of this problem on Google.
Read full post »
Lately, I’ve been bothered about the amount of typing and lines required to create a simple element in MooTools.
var curly = new Element('div', {
id : 'curly',
'class' : 'stooge'
});
In jQuery, you’re given the convenience of writing HTML into the jQuery function –
var $curly = $('<div id="curly" class="stooge" />');
To me, this is quick and easy, but it’s very unnatural typing HTML into JavaScript and I’ve seen this convenience become quickly (and horrifyingly) abused. MooTools deserves something cleaner and cooler, so today I realized I could use a limited selector to create an element. I liked that idea very much.
var curly = $E('div#curly.stooge');
(update: Apparently I’m not the first to think of this. A couple weeks before I wrote this post, this commit was made to MooTools 2.0 adding this capability to new Element. The idea came from Thomas Aylott. I am so happy to see this become a part of the next version of MooTools!)
Read full post »
Tonight, I’ve been playing with the fantastic MooTools plugin, ReMooz by Harald Kirschner, with the hope of adapting it for my upcoming web portfolio. One of the pieces of functionality I was looking for was to close the zoom box when the user clicks outside of it. The solution I thought had the most Moo was to create a custom event, clickout.
(update: I just discovered Jan Kassens blogged a similar custom event, outerClick. We took very different approaches, but I thought I’d give proper credit)
Read full post »
A while back I made Proggit a regular stop on my daily Internet stroll. I was struck by the readers’ apparent bias toward Haskell and thought, What the Hell, I should at least attempt to learn something new today. It was here that I had that lazy evaluation Eureka moment. So of course, I then thought to myself, How can I get a piece of that sweet functional programming action in JavaScript?
For the uninitiated, lazy evaluation is, in a nutshell, the concept of a program not computing the value of something until absolutely needed. This is especially useful for long (perhaps even infinite) lists that would cause severe nausea or swelling to compute ahead of time. The example I read about used the Fibonacci sequence to butter up my brain, so that is what I will use here to electrify yours.
Read full post »
Okay, so this topic doesn’t align with the ones I outlined in my previous post as being the focus of this blog, but this is Battlestar Frakkin’ Galactica, which is very important to me.
I’ve been reading some discussions online (mainly on Galactica SITREP), and I decided to express my own critical opinions of Daybreak, Part 2 here, bullet style.
Read full post »
Please allow me to briefly introduce myself and my very first blog (making me fashionably late to the party).
I’m a Northern Californian living in New York City as a recent college graduate working as a web developer. “For whom?” you might ask. “For R/GA,” I would then answer, “mostly on NikeBasketball.com, but I could be for you too if there’s mutual interest – please feel free to contact me anytime.”
I’m somewhat of a JavaScript junkie. When I don’t feel like doing anything else, I just open up the latest version of MooTools, jQuery, or anything else interesting, and just read for anything that I might not already understand. The reasons why I love JavaScript so much are deserving of many future posts, so I won’t spill the beans on that quite yet. Sometimes it feels like every day I’m learning or seeing something interesting in JavaScript or CSS, so this will be my new outlet for sharing those juicy tidbits of knowledge to whomever is listening. There will also a smattering of (hopefully) insightful commentary and opinion on whatever is new in the tech world, probably mostly Apple related due to my strong fruit company bias.
In addition to my yapping, this site will host my soon-to-be-beta Mac video conversion and tagging utility, which currently is sine nomine, as well as my MooTools and jQuery plugins. A small portfolio would be nice too, we’ll see. I suspect that if you’re reading this, then I’ve already written a number of posts, maybe one of which you found interesting, which led you to read back into my archives. For that, I must say, “Thank you for your interest.”