Bloomington Code School

Circular logo for Bloomington Code School

Since its inception last Fall, I have been mentoring people learning front-end web development for Bloomington Code School. The students self-study with Treehouse (generously funded by our excellent Monroe County Public Library), and I meet with them once a week to answer questions and do fun exercises that build on what they are studying. Other local professionals have been mentoring other topics, including Web Design and backend programming with PHP and Ruby on Rails.

In the first session, I led with some over-ambitious examples. For the second ten-week session, I pulled back a bit, and I think most students were able to follow along with the samples we made.

The third Code School session starts tomorrow: March 1. You can follow along with us in the github repository and on CodePen.

Can Code for America free the ATF data?

I heard a discussion of assault weapons in civilian markets on Fresh Air yesterday and a few things slid into place. In the interview, Tom Diaz explains how the NRA has effectively blocked the publication of data around gun deaths through a series of riders put forth by former House Representative Todd Tiahrt. These laws apparently work by preventing the Bureau of Alcohol, Tobacco, and Firearms from spending money to release their data about gun sales/use/etc.

I immediately thought of Code for America as a means for publishing this data without incurring cost to the ATF. Code for America assembles teams of coders to work on projects to help make government more transparent, work more effectively, and reach the people it serves (all of us) more easily. Providing public access to ATF data seems like a perfect task for the organization. I don’t know whether this is a real possibility, having only connected the dots based on my understanding of the radio interview. Even if this could work, the long-term effort of undoing the broader damage of the Tiahrt amendment and creating fact-based gun-control measures remains. Hopefully Code for America can help us get a start on educating ourselves about the spread and impact of guns with real data despite the existing obfuscatory legislation.

Philip Glass Rework

I spent the past few months working with Ahna Girshick and Graham McDermott of Snibbe Studio on the design and development of the
REWORK app-album for iOS. REWORK_ features eleven interactive music visualizers and an interactive instrument, Glass Machine.

Each scene in the album is staged with an initial form that is transformed throughout the song. Different aspects of the music are used to either add new elements to the scene or to tug at the base form in different ways. Similarly, viewers can interact with all the elements of the scene, either deforming them, changing their course of movement, or in some cases both.

The first few weeks I was on the project were spent experimenting with the content we had and the themes we wanted to employ in the album. We had some midi data and all the songs, and I spent many hours listening to the album with sketchbook in hand to get a feel for the music. In addition to drawing shapes and writing feelings during the music, I broke down the songs I was responsible for into their component forms (think intro AABCBCBBCAAAAACC outro). This was awesome work, except on the 20+ minute Beck piece, where it was brutal.

In some of the early sketches, we were throwing stuff on screen and using the midi to do things like pulse size/color/velocity or create dynamic structures.

Large cubes clustered in space.
Flocking space junk.
Jagged horizontal lines and wireframe cubes float in space.
Wireframe floaters plus wave lines.
Nodes connected by lines moving across a red background.
Viewing the midi structure plus space junk.

Once we had general breakdowns of each piece and some visual and interaction sketches, we went through and did something closer to a storyboard for the pieces. These were used to agree on the number and types of forms/movements that would be present in each piece. Since the team was small and could envision how they would transform when coded, we kept them pretty simple.

Sketches for Opening remix.
Storyboard sketch for Opening remix.
Sketches for Alight Spiral Ship remix.
Storyboard sketch for Alight Spiral Ship remix.

From the storyboards, I produced primarily black and white interactive animations for the pieces I animated. After animating, I set up a simple framework for applying color to the various elements in the scene. Ahna and a few others at Snibbe worked on selecting colors and timing their appearance and we worked together to make sure they could color the elements in the way they wanted to. I had initially implemented HSV color fading, but for many of the palettes RGB fading ended up looking better.

For the NYC and Island tracks, Pete Hawkes developed a series of great processing sketches and detailed a number of ideas about how they could be modified throughout each of the songs. I ported his work into Cinder and added controls via XML and SVG so that other artists could do the final animation without needing to touch any code.

REWORK_ was written on top of Cinder. For sequencing the animations and matching timing with the music, we used a combination of the timeline interface provided by Cinder and midi files read in using middl. Using midi was actually quite nice, and I spent quite a bit of time toward the end pushing notes around on the piano roll in Logic to control the some of the animations.

Below are some additional process images. To see the final work, you should purchase it from the app store.

A series of concentric circles with bulging deformations.
Reshaping paths into circles.
Spirographic circular shape in black and white.
Opening WIP: flipping normals
A series of rectangles arranged horizontally on a curve.
Nodes loosely following a path.
Groups of circles deform a square grid.
Testing deformers (visible dots for debugging).
Deformed multicolored mesh.
Etoile Polair WIP

The Reluctant Sysadmin: NAS Time Machine


I recently set up a Synology DiskStation thinking it would be wonderful to have a simple wireless backup solution for the handful of laptops in our apartment. Unfortunately, Time Machine has been regularly breaking down and the troubleshooting advice I’ve found most places amounts to holding your breath and wishing that things will magically work. The error looks like this:

time machine completed a verification of your backups. To improve reliability, Time Machine must create a new backup for you.
In other words, it’s all gone. I know, wtf?

Forum posts suggest everything from getting a UPS (it might have been a power spike or dip that ruined it) to using a wired connection (since wifi might not always be stable and apparently no one accounted for that), to making sure your computer doesn’t go to sleep while backing up to Time Machine. While I did go for the UPS and even tried plugging in for a while, none of those solutions worked.

The advice I received from Synology in an (impressively prompt) email was much the same (emphasis theirs):

This can happen when you let the system go into hibernation/sleep during a backup or if you are performing the backups over wireless.

I don’t buy it. Wireless technology has been around for decades, and packet retransmission is no big deal. As a test, I have purposely closed my laptop in the middle of large backups over wireless with no ill effects.

What I do believe could fix this issue and kill it dead is something I found in some older posts about enabling Time Machine on an NAS before it was officially supported by Synology (although that official support doesn’t extend to making sure it works without getting corrupted). Apparently, HFS+ file systems can handle crazy huge numbers of files coexisting in a single folder. Whatever flavor of Linux is running on the NAS cannot. The failed verification results from Apple software trying to dump too many files in the same folder (in this case, the files are sparse bundle stripes). Too many files are created when you start having a large-ish backup. Say 300GB+. For me, that can happen after a week or so of file changes, since my initial backup is in the 290GB range. The solution to enabling more backup space is to increase the band size of the time machine backup so that your NAS’s filesystem doesn’t get overwhelmed by the number of files Time Machine attempts to store in a single folder. Fewer, bigger files.

This is not a how-to post, nor do I make any claims about the usefulness of this information, but the following concepts should point you in the right direction if you’ve experienced the issue (or would like to avoid it in the first place). Create a sparse bundle with a 128MB sparse-band-size and then replace the bundle generated by time machine with it. You will also need to copy the*.plist files from the Time Machine-generated bundle. Those plists will let Time Machine identify the sparsebundle as one it can and should use. Don’t copy the .bckup files, token, Info.plist, or bands/.

Here are some bash scripts for creating your own sparse bundle and copying the important plists from one bundle to another:

I have only just now set this up, and I will definitely follow up if this process doesn’t fix the issues that plagued me over the last month or so. Also, I didn’t come up with this on my own. After hours of tedious forum reading and web searching (and weeks of trying non-solutions), I found the following posts and some lightbulbs came on:

This seems like a sane culprit for the errors I’ve been having, as it addresses a real software limitation. The power flickers and wireless network problems seem like chasing ghosts, and my partner’s smaller (100GB) backup hasn’t become corrupted.