Notes on Programming for Designers

This is intended as a brief survey of some of the many options available to desingers who want to learn programming. It's not a tutorial, just some pointers to books and software that I've found especially good.

I wrote an article for Boxes and Arrows that introduces some basic programming concepts and compares them to Information Architecture techniques.

netpack CMS docs example

“Design By Numbers” book and software by John Maeda

See the DBN Home Page and Amazon listing for the book

Maeda is the head of the MIT Media Lab's Aesthetics and Computation Group, and wrote this book as a guide for visual designers who want to learn about the expressive possibilities offered by code. DBN consists of two parts: a book and a very simple programming environment designed to teach students basic principles of programming, interaction design, and computation. It runs in a little Java application or in your browser as an applet. This is definitely an instructional tool, not a full-featured programming language, so don’t expect to create anything too complex. You can make basic animations and designs that react to mouse, keyboard, and even network input. (Be sure to check out the sample files that come with DBN to see what MIT graduate students can do with it, however.)

If you aren’t put off by Maeda’s minimalist visual and writing styles, the book itself is a good introduction to programming fundamentals. He covers variables, repeat loops, and conditional structures: the basics of any programming language. DBN is intentionally limited, though, so you won’t learn about object-oriented approaches, which can be a big jump when you move to Javascript or Flash.

I’ve had a lot of students (including designers, writers, and artists) complain that DBN has “too much math in it.” The truth is that programming things to appear and move on the screen does require some of that high-school algebra you (and I) struggled through. The DBN language does simplify the screen-coordinate system about as much as is possible, and Maeda’s instructional texts are quite brief and clear. But just like high-school algebra, you pretty much can’t learn it by reading about it; you have to just try stuff out.

(Incidentally, the DBN project seems to have been superceded by "Proce55ing", a more powerful language based on Java. Proce55ing is designed and maintained by two of Maeda's most amazing students, Casey Reas and Ben Fry, so it retains much of DBN's original ideas. But in my opinion, it's traded DBN's minimal simplicity for programming power, and isn't as gentle an instructional language for non-programmers as DBN. The latest signs are that Maeda has taken over the DBN project again after a long break.)

netpack CMS docs example

Flash MX

Of course, there’s always Flash. There’s a lot to learn with Flash, and some of that knowledge would be useless to apply any other programming software. ActionScript is a scripting language based on the standard ECMAScript (Javascript) you’d use in web browsers, but with some weird idiosyncrasies.

If you want to lean about Object-oriented Programming (the programming approach used in pretty much all software), Flash a great place to start: you can actually do interesting things pretty quickly, as opposed to spending weeks to learn how to draw a red square in Java. The advanced parts of ActionScript can be very hard to learn, though.

But for data-driven, dynamic applications, Flash is very powerful. Built-in components (self-contained interactive widgets) can be bound to dynamic data sources (check out the DataProvider Class) and extended to form the basis for real, useful applications.

As of this writing in 2002, version MX of Flash is a huge step from version 5. At the moment, it’s in a weird position supporting both the old ways of doing things (“tellTarget” , nested timelines, and polling for loaded data) and the more Java-like new ways of coding (including complete dot-syntax, more robust XML and LoadVars objects). It remains to be seen whether Macromedia will continue to support the “designer-friendly” ways of project building that have been part of Flash since day one, or whether it will evolve into a more sophisticated programming environment. Probably both.

netpack CMS docs example

MoveableType

http://www.moveabletype.org

MT is free software that lets you build a weblog, which is really just a website that is very easy to update often with short text posts. Usually weblogs allow site visitors to add comments to pages. Everything is automatically archived, categorized, etc. Weblogs are amazingly popular thanks to free software like MT and Blogger. MT uses its own XML-like tag-based language to set up page templates and publishing rules, but you don’t really need to know anything about XML to use and customize the system.

MT also has really brilliant documentation and lots of interesting features. You do run into loops, variables, and if-then constructions, but you don’t really do programming, but you can learn a lot about Content Management and about planning content organization for your site. Naturally it’s open-source, so people are adding cool features all the time.

HTML, CSS, XML

The web technologies HTML and CSS (Cascading Style Sheets) are becoming more important and are very easy to learn. Finally, in 2002, you can stop using all those horrible table-tag based layouts and start using simple HTML and style sheets for presentation. XML is really not a programming language, and you don’t really use it to make web pages. It’s a standard way of structuring information so that it’s easy for any programming language (Java, Flash, Perl, C++) or database to use it. If you will be working with programmers or database designers, it should take about an hour to learn everything you need to know about XML.

Some Words about Books on Programming

If you’ve never plowed though a programming book before, be prepared for a surprise. By and large, the endless shelves of books about Java, Flash, ASP, PHP, and every other programming language suck very badly.

Experienced programmers want books that simply explain the syntax of a new language or piece of software; there are plenty of these reference books in stores and landfills all over the world. They can teach you almost nothing about programming basics and code design. If you’re learning programming, you will have a very hard time finding good instructional texts. Most will fall into two categories: the author will assume you’re an idiot who can't grasp the most basic idea without pages of explanation, or she'll assume you understand everything immediately. It’s the rare programming author that can introduce and explain a new concept with clarity, intelligence, and wit, and who can present material for different learning styles. Most will fall back on tedious, uninspired examples and projects (another multiple choice quiz to program! an address book application!), or will introduce code concepts without any real-world context at all.

There are very few examples of good programming books. Here are a few authors and books I can recommend to the beginner or intermediate coder.

Anything by Ben Forta. Forta is Macromedia’s main ColdFusion (server-side language product) technical author, and he is probably the best technical author I've ever read. His writing is genuinely good, which means his texts are clear, organized, and sometimes even fun to read. His basic ColdFusion book (now in its 5th edition) is worth reading just for its chapters on HTML, database design, and basic SQL (although the latest edition is verging on the bloated, with long discussions of other Macromedia products).

OOP in ActionScript by Branden Hall and Sam Wan. This is definately not a beginner’s book. Hall and Wan are out there defining the hardest-core programming methods in Flash MX’s ActionScript, and this book begins way past where most other Flash books leave off. But if you already feel pretty competent in ActionScript, get this book. Hall and Wan are good writers who communicate with wit and passion, and their code samples projects are origninal and inspiring. Colin Moock’s O’Reilley book “ActionScript: the Definitive Guide” is also great, but more of a reference than an instructional text. (By the way, there are also plenty of good introductory Flash books that don’t emphasize programming.)

The publisher Friends of Ed (who's Ed?) cranks out a new Flash book seemingly every couple of weeks. These are hastily written and edited group efforts, so most suffer horribly from a lack of editorial vision and oversight. (And they don’t seem to recognize that almost every book predictably contains yet another drop-down menu project or shootem-up game.) Still, if you can get past the many styles of programming and project organization of the various authors, there are some great chapters among the FoE books.

Object-Oriented Programming in Java by Gilbert and McCarty. This massive hardcover tome might be out of print (it was published in 1998), and seems not to have been updated for Java 2, which might be a problem, although for beginners it shouldn't matter. But it’s literally one of the only good introductory Java books I’ve seen (and it's certainly worth the $9.95 it's going for used on Amazon!). Most Java books are exercises in tedium written by authors who seem totally ignorant of their audience’s abilities and interests. The authors of “OOP in Java” balance good, clear explanations of concepts with a minimal amount of “first type this, then type that” instruction (though both are necessary). Strangely, it seems to be only one of two books by these authors. You’ll still be creating command-line-only applications after several hundred pages, but it won’t feel like you’ve been reading the phone book along the way.

Do you have any comments on this article?