Show Menu

Mathematics of the Deadlift

By 2015 I was tired of endurance sports and shifted my athletic focus to weight lifting. I targeted the deadlift, for a single goal to optimize. It works most of your body and is the strongest lift, so you get big, satisfying numbers. My first training program was just: go to the gym and do…

Read more

Optimal Closet Organization

Computer science can clean up your closet. Closet organization software in the movie “Clueless”. No, not using software—using an algorithm. The algorithm is called “Move to Front”. It is so simple, that you can “compute” it yourself. (In fact, the first “computers” were people.) Here is how it works: When you dress, take the clothes…

Read more

How big of a square fits in a circle?

You can, in fact, fit a square peg into a round hole (and a round peg into a square hole). They fit with mathematical elegance. Square inscribed in circle inscribed in square. This problem is relevant when building software GUIs such as web pages. I had a circular button to make (the green circle). That circle…

Read more

The Mathematics of User Experience

Ever used an app that made you want to throw your phone? Why did it trigger that emotion? Pain. That’s why. Bad user experiences aren’t just bad, they’re painful. MEASURING PAIN Whether you call something “bad” or “painful”, those are just words — what’s the difference? The difference is this: “bad” is subjective; “pain” is measurable. How…

Read more

Breadth-first vs. Depth-first Programming

Programming work has a tree structure: software consists of many files, which consist of many functions, which are themselves implemented with other functions, recursively. There are two approaches to this work: depth-first and breadth-first. Depth-first programming is implementing each new function you need, on-demand. This approach risks “blowing your mental stack” — working on a sub-task only to finish and forget what the point was. It can also lead to premature optimization, and premature coding in general, when continued work reveals a different architecture is required. Breadth-first programming is “stubbing-out” the functions you will eventually need, and solving your higher-level task in terms of those stubs. This keeps the overall architecture in…

Read more

Is the Problem of Other Minds a problem?

The Book of Tea contains an excerpt I love: One day Soshi was walking on the bank of a river with a friend. “How delightfully the fishes are enjoying themselves in the water!” exclaimed Soshi. His friend spake to him thus: “You are not a fish; how do you know that the fishes are enjoying themselves?” “You are not myself,” returned Soshi; “how do you know that I do not know that the fishes are enjoying themselves?”

Read more