Get updates


Scott Event Handler Naming Conflict with jQuery

I’m trying out Spine (and CoffeeScript) and encountered a problem setting up event handlers with my controller. Turned out to be caused by my choice of an event handler name.

Continue Reading…

Scott Opera Labs Releases WebGL Preview

Fans of the Opera web browser and 3d graphics (of which I am both) have reason to celebrate.

Continue Reading…

Scott Silent Death Ship Builder Goes Open Source

Silent Death is a fast and fun space combat miniatures game. Previously I began working on a browser-based ship builder app. That app is now open source, with code available on github.

Continue Reading…

Scott Learning to Program Ruby

Ruby is a programming language that is both easy and powerful, and makes a good choice for someone learning to program. Whether you used to program and want to get back into it, or you’ve never programmed before, learning to program with Ruby is easy and fun.

Continue Reading…

Scott Scriptaculous Sortable Drag and Drop Tree Fix

While Scripty2 looks great, drag and drop is still in development and I’m continuing to work with Sortables in Scriptaculous for the time being.

I’ve uncovered what looks like a drag and drop tree bug, and in this post I’ll go over the code to fix it.

Continue Reading…

Scott Hexmap Coordinates the Easy Way

When it comes to turn-based strategy games, I’ve long preferred hexes over a square grid. Naturally in working on my own projects I want to use hexes… but at first glance it seems the coordinate system for hexes must be much more complicated.

It’s actually easier than you’d think, I’ll show you how.

Continue Reading…

Scott Forking Bucketwise

I used to keep track of personal finances with Microsoft Money, but it’s not exactly suited to my needs.

Enter Bucketwise, a personal finance rails app that’s open source – hence ready to be customized.

Continue Reading…

Scott Blog Relaunched

A new, less saturated, coat of paint and a shorter URL – 3DM Design has been relaunched!

Continue Reading…

Scott Blog and Feeds Moving

I’ll soon be moving the blog to, and likewise updating the feed URLs to and

Continue Reading…

Scott Q&A: How to Customize Rails to_json output?

Rails has a bunch of JavaScript helpers, but once you move beyond those and want to write your own JavaScript code for your application, you may find yourself dealing with some JSON produced on the server-side.

By default, the to_json method in Rails is probably a lot more verbose than most people want. I’ll share a few tips on how to tame it.

Question: How can I slim down the output of to_json in Rails?

Continue Reading…

Scott JavaScript Variables and Anonymous Objects

JavaScript is not Ruby, but it does offer syntax that can lead to expressive code. There’s one case where JavaScript could have gone a step further and given us even more expressive code syntax, when dealing with object literals or anonymous objects.

Continue Reading…

Scott Back to Rails

It’s been a long time since I’ve worked on a Rails project, but it feels good to finally get back to Ruby on Rails.

Continue Reading…

Scott JavaScript Event Delegation

Coding interactive behavior into “dumb” HTML elements is one of the basic scenarios for JavaScript use. The standard method is usually to hunt through the DOM looking for elements of a certain id or class and attach an event handler function directly to each one.

For most types of events, there’s a better way: Event Delegation. At the basic level it involves attaching an event delegation function to a parent element, then catching events which bubble up and passing them off to specific handlers based on the event’s target.

Continue Reading…

Scott Learn to Program with JavaScript: Instant Feedback

Last time, with part one of this Learn to Program with JavaScript series, I introduced some basic HTML with an interactive tutorial. As JavaScript works very nicely inside a web page, this gave us the foundation. Now it’s time to add actual JavaScript on top.

Just like other aspects of an HTML page, JavaScript goes into a specific tag. The <script> tag, to be precise. Try out the first example to see our own version of “hello world” in JavaScript:

Continue Reading…

Scott JavaScript RegExp Tool Available

There are times when I just need to process some text quickly and efficiently. Regular Expressions are very well suited to this task, and now I’ve released my own JavaScript Regular Expressions tool for just this purpose.

Continue Reading…

Scott First Steps to Comet: Orbited in PHP

I’ve recently become interested in Comet, as a web technology, and Orbited, as a Comet server. For anyone else starting down this path, I thought I’d write up the summary of this weekend’s quick foray into event-driven server-sent-messaging goodness.

Continue Reading…

Scott Comet for Web Games

For those not familiar with Comet, you’re either not a front end web developer or you’ve been kept in the dark. To sum it up quickly, Comet is a technology like Ajax. While Ajax basically consists of an asynchronous request by the client to the server, followed by the server’s response, Comet is a bit different. In Comet the client establishes a connection (or makes a request) to the server, and then generally keeps that connection open for the server to send responses back to the client on its own schedule.

Continue Reading…

Scott Extending JavaScript Strings with Chomp using Prototypes

Chomp is that oh-so-fun function in Perl to bite off extra newlines from the end of a string. It can be useful to have chomp for JavaScript too, especially in cases such as reading input in textareas.

This time around, I’m going to take a quick look at how we can take the standalone JavaScript chomp function and make it even more accessible by extending JavaScript’s String object, which also gives us an excuse to try out the awesome prototype feature in JavaScript.

Continue Reading…

Scott Learn to Program with JavaScript Series: An HTML Beginner’s Interactive Tutorial

I’m a web developer by day and have been programming, in one language or another, most of my life since age 10. But for someone without consistent (or any) programming experience, how do you learn to program? This question was brought on by a friend of mine who had a programming class or two years ago and is now setting his sights on giving it another shot.

The good news is that you don’t have to be a life-long programmer to have some fun with it. Old, young, students, hobbyists, and non-programmer professionals can all learn to program, provided they have some interest and a little time (it doesn’t take much to get started).

Continue Reading…

Scott Introduction to Regular Expressions in JavaScript: Alternation and Grouping

Regular expressions provide lots of flexibility in processing text, and this article introduces two additional metacharacters (three counting both parentheses), but first I’ll start with a summary of what was covered in the previous regex article:

Continue Reading…

3DM Design is where Scott Drake publishes thoughts on programming web applications in JavaScript and Ruby.