Sorry, your browser doesn't support the <canvas> element.
Hi! I'm Harold Cooper and here are some things I've made.

Spinning Diagrams with CSS explains how I made the diagrams for Visual Sum of Cubes below.

(further discussion on Hacker News and Twitter)


Visual Sum of Cubes discusses a visual derivation of the formula for the sum of cubes.

(further discussion on Hacker News and Twitter)


Turing Machine Halting in Lean uses the Lean theorem proving language to prove whether some very simple Turing machines halt or not.


An Intriguing Triangle proves a couple facts about a triangle of integers, and binomial coefficients.


Latent Loops was an interactive dancefloor Catherine McCurry and I built for Google and installed at the Sónar music festival in Barcelona. It used Google Magenta's MusicVAE neural network to interpolate through a latent space of user-created melodies.


Outcognito Mode was a Chrome extension which publicly tweeted every website you visit and everything you type, made at the Stupid Shit No One Needs & Terrible Ideas Hackathon. The code is very simple.


Fooling Around with Word Embeddings is a jupyter notebook exploring the structure and behavior of word embedding vectors like word2vec and GloVe.


Continued Fraction Streams discusses why the golden ratio is "the most irrational number", and how to convert between streams of continued fraction coefficients and streams of digits.


Non-Empty Recursion in Elm discusses recursion on non-empty lists using elm-cons, a library for representing non-empty lists in Elm.

(further discussion on


Coroutine Event Loops in Javascript discusses the use of coroutines for Javascript event-handling, as an intriguing alternative to callbacks.

(further discussion on Hacker News and Twitter)


One-line Tree in Python is a frivolous use of the builtin defaultdict to implement a tree structure.

(discussed on GitHub, Hacker News, and Twitter)

def tree(): return defaultdict(tree)

Bezier.hs is a quick demonstration of how simple Bezier curves are, and how easily you can implement them in Haskell.


ExtendNY is an interactive map which extends the Manhattan Grid of streets and avenues to every point on Earth.

It received lots of feedback, including people around the world tweeting their "New York" addresses, many comparisons to View of the World from 9th Avenue, and was called "Infographic Of The Day" despite not really being an infographic.

I also gave a short talk about the project.


PCollections serves as a persistent and immutable analogue of the Java Collections Framework.


Spectra is a math poem thought experiment which asks the question "Is there a continuous surface made up of every continuous function?" and meanders towards the answer.


Mechanical Linkages in Python provides a graphical interface for simulating mechanical linkages, and describes the rigidity theory used to implement the simulator.


Phi is a frenetic Processing sketch which zooms in and out through the endless golden spiral.