RSSAmplifier

Blog

Teaching Machines

Chris Johnson teaches people to teach machines. He writes about computer graphics and programming languages and builds lots of little tools to learn and create.

twodee.orgRSS feed ↗12 posts

Latest posts

Calendar Puzzle

I have created the world's most boring puzzle. Each piece is a month of the year. Together they form the calendar. Here's 2026, which started on a Thursday: Note that February is a rectangle in 2026. February is the only month that can be a rectangle, but this only happens when the year starts on a Thursday. It will more often be an octagon. Other months are either a hexagon or an octagon. The…

Spectre

Notice anything interesting about this polygon? Probably not. The magic of this polygon only appears when you have many of them, and you try piecing them together. They will never produce a repeating pattern—which is wild. This polygon is called spectre , and it was discovered in 2023 by David Smith, Joseph Myers, Craig Kaplan, and Chaim Goodman-Strauss. A friend asked if I could make the…

Cutting with Code

Following are the notes from a workshop I gave at 2026 Fab Educators Summit. Hi, folks. I am a computer scientist who likes the physical world as much as the virtual world. I grew up with a father who had every tool imaginable in his shop. But I gravitated toward brain tools, like math and code, because I felt that they were more learnable. They had an explicit notation. They were forgiving. They…

PyTamaro

I recently watched an episode of the Computing Education Things podcast in which host Daniel Prol interviewed professor Matthias Hauswirth about teaching computing through the lens of graphics programming. Hauswirth built the learning platform PyTamaro , which is Python plus a graphics library running in the browser. I was primarily interested in the images he made. These four were begging to be…

Zebra Boxes

I saw a work of op art on the web and decided to recreate it in Twoville: You can change the number of rows, but don't go crazy. Your browser will suffer. The op art movement began in the 1960s. Instead of a sensuous color palette, you get contrast. Instead of representation, you get abstract geometric forms. It's the kind of art you make when your brush is code. I would never hang this on my…

Apple Intelligence

Imagine you are a graphic designer and your boss tells you, “We need a logo for our new AI product.” Creativity feeds on constraint, but there's little constraint to feed on when the topic is as abstract and versatile as AI. Therefore we are not surprised to find many logos for AI products are merely interesting geometry. Apple Intelligence's logo is a 7-point self-intersecting star…

Introducing Exray

This past weekend I had the itch to build a tool for inspecting the intermediate values of subexpressions in a more complex expression. The result is Exray . I didn't really need this tool. But next semester I'm teaching a class on developing software with AI, and I need projects that I'm willing to share or co-develop with AI. I have been too selfish to share my other projects, just as I have…

Making Time with Twoville, a Language for Fabrication

Following are the notes from a talk I gave at the computer science education conference CCSC Eastern 2025 at Arcadia University in Glenside, Pennsylvania. The campus featured a castle. The paper was the result of a collaboration with student Devran Turson. Hi, folks. Sometimes in the middle of lecture, I find myself questioning my life choices. Wouldn't it have been wiser to do something directly…

Computer Graphics Showcase

The final project in my fall 2025 computer graphics class was to build a local multiplayer game with terrain, cameras, textures, billboards, and other effects—which I guess includes zombies. Their final video demonstrations are shared below. We stick to four big topics in the class: shape, lighting, interaction, and texture. Students build their own graphics engine with abstractions for…

Nice Vectors

I wanted to be nice this semester in computer graphics. In my exercises, I ask students to do a lot of 3D vector math. These vectors must often be normalized, which means their magnitude is 1: $$\begin{align} \sqrt{a^2 + b^2 + c^2} &= 1 \\ \end{align}$$ If that's the case, so is their squared magnitude: $$\begin{align} a^2 + b^2 + c^2 &= 1 \\ \end{align}$$ I needed vectors for which this equation…

Fizz Buzz Without Booleans

My programming languages professor Eugene Wallingford recently responded to a post by software developer Evan Hahn , who in turn was relaying this coding challenge from a podcast: Write Fizz Buzz with no booleans, no conditionals, no pattern matching, or other things that are like disguised booleans. A Fizz Buzz solutions shows numbers that are multiples of 3 and 5 as FizzBuzz , multiples of only…

YMMV

You are in the market for a new car and found one you like for $36,500. A week later, the price changed by 3%. Another week later, the price changed by 2%. How much is the car now? $36,113.10 $38,346.90 $34,696.90 $36,843.10