20 August 2024

No Starch Press sent me a copy of the book "The Nature of Code", by Daniel Shiffman, and I have to say, it's a lovely piece of work, both figuratively and literally.

Physical

Let's start with the physical (which is rare for a book review, I think): This book is gorgeous. It's clear that No Starch is trying to make this book more than just something that appears on your shelf, but instead takes center stage on your coffee table. A number of "design" books went after this motif, and The Nature of Code (TNoC) definitely feels at home with them. Paper is heavy, covers are solid, and the binding is strong. Definitely a book that can take some abuse as you cart it from desk to restaurant to bed to... well, wherever else you might read stuff while your body is preoccupied with other things.

Secondly, Daniel Shiffman (whom I've never met) clearly knows how to teach. His bio reflects that (creator of The Coding Train channel on YouTube, and associate arts professor at NYU Tech School of the Arts being two of the big credentials there), but there's a fair number of people I know who have a teaching credit in their bio that still don't know how to teach. My mom put it best once: "Some people know how to teach, and some only know how to lecture." Shiffman clearly falls in the latter category: he starts with some core functionality, then builds on that to the next section, then builds on top of that, and so on. The aim is to carefully bring the reader along on a journey, never too far away from where you started (at the start of the chapter) but far enough to realize that yes, you did learn something here.

Next, let's address the elephant in the room: Shiffman makes the material available over a variety of media, including the Web. (In the front matter, he even addresses how his goal has always been to have one set of source materials get transformed--dare I say transpiled?--into a variety of different consumable media, like PDFs, HTML, or printed book. Sentiments quite close to my own heart!) Should you buy the book even though you could read it for free? My answer here is biased and twofold: One, it's always good to support authors in situations like this, so buy the book so Shiffman gets his tiny, tiny royalty. (Seriously, book royalties are not why you write a book.) Two, while I like having books on my Kindle app on my iPad(s), because they travel soooo much easier than carting around physical books, there is still something visceral about turning the page that no e-reader has been able to duplicate yet. I suspect mine may be the last generation (Gen-Xer over ehre) that feels this way, but if you like books over online resources to learn something, then you already knew the answer.

Contents

In terms of the actual contents, TNoC is a hefty tome, weighing in at around 600 pages, and that's not an inflated number due to multi-page code listings (like you might find in certain self-published books). Twelve chapters (starting at chapter 0, as God intended!), covering:

It's pretty clear this isn't a tutorial on how to learn programming, but makes for an excellent follow-up to your traditional programming class, in that Shiffman's goal is to show how to model natural/physical systems in code.

Speaking of programming, the examples make use of p5.js a spirital cousin (if not successor) to Processing, the Java-based environment that allows "creatives" to express their ideas and designs without having to learn Java3D, JavaFX, or any other 3D graphics library + programming language.

Thoughts

Overall, as you've probably guessed, I like the book. This area--graphics and physical motion simulation and so on--is not one of those areas that I consider myself "skilled" in, so in many ways I think I'm in a target audience for the book, and one thing that strikes me as a deep positive is that it never tries to "talk over" me. In too many 3D graphics books, there's a tendency to start spewing Greek symbols all over the page and teach the math behind the code, but doing so before ever showing code. Shiffman doesn't do this--he shows code, then if he wants to go into the math, he does so in simple prose. Granted, I'm not much smarter about the math after reading the chapter, but if I wanted to learn the math, I'd go pick up a math text. Half the time, I don't care how a thing works, I just want to know (and see!) that it does.

If graphics and simulating natural systems appeals to you (and frankly I think anybody who's ever thought about diving into building a video game has thought about this at least once!), then I encourage you to "grab a copy of a bound collection of processed cellulose fibers, imprinted with symbolic glyphs via pigment-based transfer particles direct from me!".

Disclaimer: No Starch Press sent me a review copy of the book; no other compensation was provided.


Tags: book   javascript   book review  

Last modified 20 August 2024