Blog


Spicing Up Embedded JavaScript

One thing that I absolutely adore is the sheer embeddability of JavaScript. It's a (comparatively) simple language that is fiercely flexible. I tend to liken JavaScript to water - alone it's painfully simple but it can take the form of its container - and mixing it with anything enhances its flavor.

Since JavaScript, alone, is so [...]

14 Comments · Posted: June 15th, 2008 · Tags: ruby, java, python, php, perl, javascript


Algorithmic Ink in JavaScript

The always-excellent Aza Raskin had a little bit of fun recently - inspired by my recent Processing.js work - to port the popular Context Free Art language to JavaScript, using Canvas.

Renamed Algorithm Ink the result is a complete way to programmatically generate elegant pieces of artwork. Aza took the result a step further and built [...]

7 Comments · Posted: June 11th, 2008 · Tags: visualization, javascript


Trivial JavaScript

I've been chatting with the Free Software Foundation and they've posed a tricky question: What is trivial JavaScript? - or - What is not trivial JavaScript?

It seems like an especially hard question to answer - especially without using subjective terms.

For example I would say that the following are all trivial:

Use of inline JavaScript/DOM 0-style code [...]

25 Comments · Posted: June 10th, 2008 · Tags: javascript


Writing ECMAScript 4, Today

A very cool new utility has just been released by Olav Junker Kjær called Mascara which is an ECMAScript 4 to JavaScript translator (written in Python).

Using this utility you can begin writing ECMAScript 4 code today, receiving its full benefits (such as IDE integration and compile-time type-checking) while still being able to run the resulting [...]

13 Comments · Posted: June 10th, 2008 · Tags: javascript, ecmascript, python


Recent Presentations

During the past couple weeks I've given a number of talks around the globe. Here's a quick dump of the talks for those that are interested in them.

jQuery (BarCamp Boston)
Processing and Processing.js (BarCamp Boston)
jQuery (MeshU)
Managing the Mozilla Way (Slashdot, ITWorld)
jQuery (DrupalCamp Toronto)
JavaScript 1.5 to 2.0 - A new talk examining all the language features introduced [...]

7 Comments · Posted: June 8th, 2008 · Tags: speaking, conferences, presentations, javascript, jquery


__FILE__ in JavaScript

A quick snippet that I spotted within the up-and-coming Johnson project (A Ruby/Spidermonkey hybridization.):

[js](function(){
this.__defineGetter__("__FILE__", function() {
return (new Error).stack.split("\n")[2].split("@")[1].split(":").slice(0,-1).join(":");
});
})();[/js]

The above defines a global variable __FILE__ which, when called, returns the file name of the current JavaScript file. It's defined using a getter in particular so that the proper [...]

7 Comments · Posted: June 7th, 2008 · Tags: javascript, ruby, spidermonkey


Processing.js Tower Defense

I'm currently in the process of touring the globe (I've given four talks in two cities, have two talks in two cities left) but I dug up something that should prove to be a lot of fun.

Will Larson has gone about revising the classic Tower Defense genre, porting it to the open web using Processing.js. [...]

13 Comments · Posted: May 27th, 2008 · Tags: games, javascript, processing


Injecting Word Breaks with JavaScript

Recently Eduardo Lundgren pinged me wondering if I had an alternate solution to injecting wbr tags inside a long word.

The wbr tag tells the browser where a possible line break can be inserted, should the need arise. (Opera has some problems with rendering them correctly, but it can be rectified using some CSS.) By adding [...]

12 Comments · Posted: May 24th, 2008 · Tags: javascript, words, language


Next entries » · « Previous entries

Current Projects

jQuery JavaScript Library

jQuery

Comprehensive DOM, Event, Animation, and Ajax JavaScript Library.

Recent Projects

Pro JavaScript Techniques

JavaScript Book

The best techniques for professional JavaScript. Published by Apress.


Hosting provided by the cool dudes at Engine Yard.