teaching machines

Multiple Assignment in Twoville

As I dream up animations in Twoville, I find myself generating a lot of shapes that share properties with other shapes. For instance, these two circles have the same radius and color: a = circle() b = circle() a.radius = 10 b.radius = 10 a.rgb = [1, 1, 0] b.rgb = [1, 1, 0] I […]

With Blocks in Twoville

In my software engineering class in college, Dr. Drake dropped on us a half-written piece of software that managed a database of movies. Our challenge was to improve it. It was the first and only time I’ve touched Visual Basic, and I remember only one thing about the project and the language: with-statements. Suppose you’re […]

Twoville Inching Along

Thanks to a snow day yesterday, I can now export animated GIFs from Twoville, my 2D drawing language. Gif.js made this possible. However, Jeremy, I think naming your project with .js suffix was a big mistake. When one clones the project, one ends up with a directory with a .js extension, which messes everything up. […]

Introducing Twoville

Some students and I are building a programming language for generating animated SVG images. Rather, each of us is building our own language, because each of us wanted 100% of the learning experience. By the end of the semester, we’ll have four different takes on how to build such a language. My take is called […]

Fourlords Paddle

I said I was going to build a co-op game alongside the students in my gamedev class, but I haven’t touched Fourlords (a clone of Warlords) since before the semester started. Not until today, that is. I am in Baltimore for a conference, with a reprieve from lecture preparation. When not developing humans, I get […]

Flat Braid

When all you know of trees is that they have bark and leaves, you view the woods as a background to the more interesting foreground activity of a jog, or a campout, or a proposal. But when one knows the trees, it’s hard to not stop every few feet and shake hands with some old […]

Fourlords Field

In a couple of weeks, I start teaching a brand new elective on game development. Students will team up and build a single game throughout the semester. I’ve taught several such courses in the past, but this one has a couple of twists: The games must be locally cooperative. These games are intended to be […]

Two MPU-6050s

Ugh. After learning how to talk to one accelerometer, I needed to talk to two of them. The MPU-6050 is, for reasons I do not understand, bound to I2C addresses 0x68 or 0x69. In order to put two of them on the same I2C bus, one will have to take on 0x68 and the other […]

Flying with the MPU-6050

A student and I are working on a hardware project. This is world I don’t know well, and I think the best thing I can do is painstakingly document our every step. Unfortunately, the project started four months ago. I’m a bit late. Our first task was to figure out how to talk to an […]

Icosahedron, Part 2

Several hours later, I have now found the difference between an octahedron and an icosahedron. I had been stuck on generating the coordinates of the octahedron. A little reading and experimentation directed my attention to the cube circumscribing the icosahedron. The way I’ve set things up, its vertices are all [±u, ±u, ±u], where u […]

1 2 3 15