'The Nature of Code' Book Illustrates Coding Design Secrets – And Power of Self-Publishing

In traditional visual arts, some knowledge of color theory and form is essential to being expressive. From there, you move on to tricks of shading and perspective. These shared understandings allow even radical experimentation: the likes of Picasso, Dalí, and even Pollock played with their classical inspirations and training.

Creative programmers have a bag full of tricks that underly a lot of the flashier, cooler effects in their work. These can, in turn, be a window into understanding foundations of math and geometry. (I imagine how much better I would have been at progressing later in mathematics had I been able to play visually, not only as incentive but as a check against what I was doing.)

That’s why I think the teaching work of someone like Dan Shiffman is essential. To everyone who says “I’m a designer, I’m not a coder,” or “I don’t like to get into the technical stuff,” Dan has had an almost-viral effect on people like you in tackling the tough stuff to make code a second language. And we’re not talking dumbed-down material, either, the side salad of iceberg lettuce that is some “programming for beginners”: Dan’s code cooking is rich, full of meat, and smothered in tasty sauce.

In The Nature of Code, Dan gets straight down to the underlying mathematics that can elevate visual structures and motion. And by giving away these secrets in clear, understandable terms, I think people’s code – and math literacy – can improve. They then have a chance to go beyond the commonplace tropes of interactive and motion design to add something that’s their own, to make the stuff we haven’t seen yet.

After years of waiting for this text – and cribbing notes from Dan’s class blogs at New York University, where he teaches, the text is here at last. You can read the whole book online for free now – cleverly, it’s all illustrated in Processing.js, the JavaScript port of creative code language Processing. It’s probably not the best beginner text, as you might start with something like Dan’s Learning Processing. But as a second text, it’s ideal.

Some of the math-driven goodness you’ll find, from the table of contents:

Vectors

Forces

Oscillation

Particle systems

Physics

Autonomous agents

Cellular automata

Fractals

Neural networks

You don’t just plug in off-the-shelf libraries for these functions, either – Dan manages to find simple, elegant ways of coding these libraries yourself. Other texts and teaching I find either oversimplify, meaning you just have a bunch of libraries you could have read about yourself on the Internet, or make things so complex that they lose most of the audience.

But one lesson is beyond code – it’s about self-publishing.

Dan went with a publisher for his last book. I actually remember arguing he shouldn’t, having been a published author myself.

Boy, has he embraced self-publishing now. The advantages are clear – for one thing, you can read the text now, the moment it’s done. Giving away sample copy, while generating sales in PDF and print, can be a no-brainer.

The text itself is under a free license, meaning people can easily submit changes and corrections, or remix lessons into their own expanded texts – ideal for people who are teaching or who run with an idea from the text and build on it.

And then there’s the finances behind this. Here’s where you might be surprised: going with an open source model and giving away some of what you’ve done might sound like a money-loser, but when you’re self-publishing, it can be quite the opposite.

On Elsevier’s web site, you can purchase Learning Processing as an e-book for $53.95. That’s right, fifty-three dollars and ninety-five cents. Incidentally, for each e-book sold I get a royalty of 5%, which is $2.70. That’s right, two dollars and seventy cents. If I self-publish, I can make the book massively cheaper. Selling a digital copy for $10, I’m reducing the cost to the reader by over eighty percent and tripling the money paid to me.

Emphasis mine. That last sentence says it all.

I don’t want to just slam publishers. In fact, kudos to O’Reilly, one of the few publishers who seems to understand this. They’ve gone with more liberal e-book pricing, they often work with authors to embrace more rapid text changes, and have even sometimes worked with open source licenses. But the advantage here is still clear.

Kickstarter has been a final missing ingredient, helping Dan finance this project. (And he has no excess of time or money – the guy is an NYU prof and a Dad. He’s under as much stress as you are.)

And Dan I think is a great model for how to write this kind of text, how to work online, and now how to manage the business of self-publishing.

In music, I never mind returning to a great theory text, like Fux. And I never mind revisiting the basics. Even though I’ve read some bits of this text before, I wholeheartedly look forward to revisiting The Nature of Code. It’ll feel just like practicing scales.

Now, Dan, just do stay safe in the midst of Sandy, you hear?

Pay-what-you-want PDF, free online version with Processing.js, and print version coming soon (sign up for notification):http://natureofcode.com/

We use cookies and other tracking technologies to improve your browsing experience on our site, show personalized content and targeted ads, analyze site traffic, and understand where our audience is coming from. By choosing I Accept, you consent to our use of cookies and other tracking technologies. Please read our Privacy Policy.