I was working through
a tutorial on Bogart and CouchDB and decided to implement the examples in
CoffeeScript instead of JavaScript as I've been meaning to play with CoffeeScript for a while now.
One of the files in the tutorial is the package.json file for managing dependencies in the (absolutely lovely) package manager npm. When I wrote the data structure out in CoffeeScript, however, the compiled data structure wasn't valid JSON according to JSONLint (it was nested between parentheses, had unquoted keys, and a trailing semi-colon, as you can see in the code snippet.) (more...)
If you're as lazy as I am, you might want to write out your static data structures in CoffeeScript instead of JSON. This little script lets you convert a file containing a CoffeeScript data structure to valid JSON.
Introducing Dart, Google's second shot at ECMAScript 4.
File this under Ultra-Niche. If you happen to be one of the three people in the world using Adobe's easy-to-use and powerful ExtendScript to script the CS*-series of tools (e.g., Photoshop) and you're using the FIle object to write out files manually, read on.
Under Snow Leopard, the following code would work (you'll find variants of this code floating around the Internets):
(more...)
The File object behaves differently in ExtendScript under OS X Lion.

In the initial version of the upcoming
Update conference web site, I'm optimizing for desktop, iPad, and iPhone-tier phones. This means that I have to create five different versions of nearly every image. One for the desktop size, one for 320px wide screens, one for 480px wide screens, and two for the Retina (@2X) resolutions. Of course, saving all those images by hand would suck. And it's not enough just to resize the images and export them for web since, when resized, I need to unsharp mask them to make sure they're not blurry.
I initially thought I could record an action to do this, but the Photoshop file I have for the graphics has dozens of layers. I thought I could use the Layer comps to files… script that ships with Photoshop but – while it let me export layer comps to files – it wouldn't let me add custom actions in the middle of the process (in this case to unsharp mask the image once it was resized).
(more...)
Using ExtendScript and Photoshop to make it easier to build multi-resolution images for web sites.
Update: sorry everyone, the event sold out in under 24 hours but there is a waiting list you can sign up to in case anyone drops out. Thank-you all for your overwhelming interest and here's looking forward to seeing a bunch of you there in March!
(more...)
Andy Clarke and Remy Sharp square off against Sarah Parmenter and yours truly in a battle of wits as we explore Mobile: Web vs. Native.