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.

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.

Timelapse script for TI-83

I used my graphing calculator as an intervalometer to record a timelapse of our installation in Minneapolis this Summer at Northern Spark. The calculator sent a pulse to my camera over a 2.5mm audio cable. The BASIC code for a TI-83+ is below:

This post is mostly to test out the oEmbed functionality in wordpress, which is pretty neat. You do need to write the url in the HTML editor in order to avoid the automatic <p> tags breaking the embed. Even viewing it in the visual mode breaks them.