Category Archives: Articles

Programming With the Joy of a Thirteen Year-Old

One of the exercises in How to Make Feeling Good a Priority by (my running coach) Holly Johnson is to list out the things that gave you the most joy at different stages of your life. For my teen years, I listed programming. I also listed it for later stages, but thinking about it, it was a different activity.

Programming as a teenager had no real point except to do it. At fifty, I still program nearly every day, but mostly as a job. I love it, but it’s different.

Most of my teen programs were unfinished—many times I just wanted to accomplish one effect and then moved on. Many of them were assignments in programming classes, but outside of that, they were unshipped.

I ship way more of my work now, but I wonder what I would make if I had no intention to ship.

New Article in the Swift Companion: Methods

Yesterday, I wrote that books should get you to write code, not just read it. I’ve been working on a companion to Apple’s Swift Programming Language book that helps you do that by offering exercises for each chapter.

I just published the companion to the Methods chapter on App-o-Mat. If you want to start from the beginning, go to the outline of Section 1. If you understand the content of the corresponding chapter, the exercises are meant to be very easy. If you are having trouble with them, it would be a good idea to review the chapter again before moving on.

What are books for?

Questions are places in your mind where answers fit. If you haven’t asked the question, the answer has nowhere to go.

– Clayton Christensen

Clayton Christensen said that he came up with the disruptive innovation theory by asking the question “why do well-run companies go out of business” when he entered business school. He attributed having a unifying question to guiding his research and being open to answers.

I am similarly thinking about the question “what are books for?” I don’t have a lot of good answers yet, but I have seen something that I think is part of my answer.

I just finished “reading” Quantum Country, which is a series of essays about quantum computing. The material is very challenging, but they have a novel technique for helping you process and remember the content. They embedded flash cards in the text, and the site uses spaced repetition algorithms like I described yesterday in my post about Anki.

So, their answer to what books are for is something like “to transfer knowledge from the writer to the reader”, which is an obvious answer, but I have rarely read a book that tries to do this so thoroughly.

There is another answer in this text, somewhat meta, which is “to advance the idea of mnemonic media”, which is what they call this style of book. It’s not surprising that a new form of media would need to explain itself—it’s like how music in new genres needs to explain the genre they are in (see “Rock and Roll is Here to Stay” and “Rapper’s Delight”)

In the world of publishing, there are other possible answers such as “to increase the reputation of the author”, “to entertain while reading”, “to sell related services”.

It’s not so much that I want to know what books are for generally, but more about what I think they should be for. And once I know what they are for, to question whether books are even the right way to deliver on that.

GamePlayKit Rule Systems on Smashing

I wrote a 2-part series on GamePlayKit’s Rule Systems framework for Smashing Magazine.

Part 1 is the basic idea and shows how to replace conditional logic that might be strewn around a project into a GamePlayKit rule-system.

In Part 2, I show the support for fuzzy logic rule-systems (logic values ranging from 0.0 to 1.0 instead of strictly true and false). It covers a little more of the features of rule-systems and how to implement NOT, OR, and AND for fuzzy values.

Both articles are supported by Swift Playgrounds in GitHub so that you can play with the concept and try different rules.