Mark Caudill

Like any good programmer, I’d like to stay on top of any changes planned for programming languages that I use (or scripting languages).  So when I heard about EcmaScript 5th Edition (near final draft) being released, I wanted to get all of the juicy details on what to expect.  As it turns out, this hasn’t been documented really well yet: so I did the better thing and read the draft.

There are some really exciting things to come, some of the biggest being to the foundation Object object’s functions which will allow turning off Enumeration on properties, making “read only” properties, etc. I’ve noticed a lot of this has come from Mozilla’s innovation and also I see some similarities to PrototypeJS’s modifications to prototypes.

(more…)

There isn’t a huge conspiracy to hide what closures mean to the power of JavaScript, but the principles can be easily understood.

A closure is actually more liberating than the name implies.  It opens the door to new possibilities by passing variables between lower-level functions.

Take for example, a very simple closure:

var ourFunction = function() {
var ourFunction2 = function() { alert(ourVar); };
var ourVar = "A simple JavaScript closure.";

ourFunction2();
};

As you can see, the ourVar variable is available to ourFunction2 despite ourVar being defined in the scope of ourFunction (locally).  Even if ourFunction2 wasn’t defined inside of ourFunction, we’d still have access to ourVar.  Similarly, if ourVar was a parameter of ourFunction, we’d still have access to it within ourFunction2.
(more…)

April 27, 2008

UI Optimization

Web Trends

If you visit half of the top 100 sites on Alexa, you’ll notice a growing trend among “Web2.0” sites. Besides the use of JavaScript with fall back support, you’ll see designs that utilize clean designs that are optimized for the end-user.

This growing trend, which in my opinion is great, seems to have come out of the simple concept: Keep It Simple Stupid. With sites like MSN and NBC, a user can easily get lost in finding what they’re looking for if it’s their first time visiting the site — think of your grandma that just got that brand new Intel Quad Core. They go in looking for show times and end up writing a chain letter about boycotting XYZ Corp.

Some of the biggest design sites out there (e.g. Smashing Magazine) award and applaud sites that adhere to standards, and many of their reward winners are professionally simple sites. Taste isn’t always more graphics.