“¡Oy, chele!” or Why I Changed My Twitter Description or Racism is Stupid

Posted by – September 18, 2014

I joined Twitter in 2009. For the past five years, my description has read:

Chele, adj. In colloquial Nicaraguan, a light-skinned person.

This bears some explanation.

From 2002 to 2004, I served a mission for my church in Nicaragua. When most Americans think of Latin America, they think everyone is the same color, and that simply isn’t true. I met Nicaraguans who were nearly as white as I am, and some who were as dark as an African, and some whose ancestors actually were African.

In Nicaragua, people often refer to other people by their physical attributes. A woman might say “la bajita” when talking about her daughter if she happened to be short, for example. Skin tone is also used: people are “negro” (dark), “moreno” (middling), or “chele” (light). This is considered perfectly normal, and nobody is offended by it.

Most importantly, nobody cares what color your skin is. It’s as important to them as your hair or eye color is to the average American.

I’m white, so as you might imagine, everyone called me chele. People would shout it at me as I walked down the street in order to catch my attention. Again, this was perfectly fine.

At one point during my two years in Nicaragua, I had to create an email account and pick a username. I refuse to use numbers as a differentiator, so I had to find something unique. I settled on “cheleball”, a portmanteau of “chele” and the first part of my last name. I’ve used that username everywhere online ever since, and it’s never ever taken.

But of course, nobody in America knows what “chele” means, so I used my Twitter description as an opportunity to explain my handle. But I forgot something: I live in the US of A. True, I have lived my entire life trying to pretend that racism isn’t a thing anymore, that we’ve all put on our big kid pants and have stopped caring. The Ferguson shooting and subsequent cluster fluffle shocked me out of that illusion.

Imagine a white guy walking down the street in America. A black guy shouts at him, “Hey whitey!” to get his attention. What is the subtext of that shout? In Nicaragua, the subtext is that the black guy wants the white guy’s attention. In America…

I don’t want to give the impression that I care about the color of my skin, so I’m changing the description. And I’m making a public stink about it. No, I don’t think changing my Twitter description is a big deal, but I’m just so very tired of racism in this country that I had to get this off my chest. Thanks, as ever, for your indulgence.

Monkeys in Low Earth Orbit

Posted by – December 21, 2013

Backing up is a bit like flossing: everyone who wants to keep their teeth should do it, and a great many do not. No, that’s a bad analogy. Backing up is like planning fire escape routes: the more you have, the safer you are. Wait, no…hang on. I’ve got it. Backing up is like strapping a monkey into a rocket and blasting it into space.

It totally is. Trust me on this.

I backed Space Monkey on Kickstarter because it sounded exactly like a thing that everyone needs: a local backup, an offsite backup, a Dropbox account, and an iOS photo backup service, all rolled up in a single device. Well, a few days ago I received mine. So unfold that chair, focus those binoculars, and get ready to watch the launch, because it’s blog post time.

The Device

The Space Monkey is an attractively designed, pod-shaped data storage device. On the back are three ports: power, ethernet, and USB. The USB is intended for diagnostic purposes only, and does not work for data transfer. The only way to communicate with the device is by plugging it into your router. There is no wifi, which is fine. Wired is faster, and I wouldn’t want a device like the Space Monkey, which is pretty much always using the network, clogging up my wireless.

There is no fan, and the hard drive inside is very quiet. In a quiet room, I could only hear it by listening closely from 3 feet away. After 40 hours of continuous data transfer, the Space Monkey is only slightly warm to the touch.

(Yes, 40 hours. I’ll get to that.)

A set of three colored LEDs indicate device status. The pattern that indicates a normal, happy state is for the blue LED to pulse on and off about once a second. That’s right: it never. stops. BLINKING.

I had to put it in a place that’s out of my field of vision while working at my computer. If I hadn’t, the blinking would have driven me insane.

That’s my least favorite thing about the design. My favorite thing? The ventilation holes in the sides are drilled in a pattern that’s highly suggestive of a rocket ship.

The ventilation holes look like a rocket ship!

A Local Backup

Everyone already has a local backup. Right? (right?) Of course they do. (ahem) So, the local backup aspect of the Space Monkey is not terribly exciting. And actually, the Space Monkey, in its current form, is catastrophically bad at providing a local backup. To explain why, I must first explain how the client software works.

The Client Software

As a Mac user, I can speak only about the Mac client. There is also a Windows client, and, as of this writing, the Linux client is still in development.

The Space Monkey client mounts the device in the Finder using a user-space filesystem called spacefusefs. Its mount point is your home folder, not the system-wide standard /Volumes, so that’s where it shows up, complete with an eject icon next to its name. As it is a mounted volume, it also shows up in all the other places mounted volumes can inhabit.

Get Info your Space Monkey

When you drag a file into the spacefusefs mount, the client software copies the file into its cache under ~/Library/Application Support. It then makes its leisurely way onto the device. This approach has a lot of advantages, but it’s not so great when you want to copy over a huge amount of data, especially if that data is larger than the amount of free space on your boot drive.

So, there is another way to move data onto the Space Monkey: you can right-click on any item in the Finder and select “Copy to Space Monkey”. This approach shoots the data straight over, bypassing the cache.

Copy to space monkey

The cache is used in other ways as well. As you browse through your files on the device, the client preemptively copies any files (but not folders) you highlight into the local cache. It appears as though it keeps copying even if you close the Finder window without opening the file.

(As an aside, I can’t imagine a normal person wrapping their head around all this. Even a tech nerd, being ignorant of this caching behavior, might accidentally fill up her hard drive in the course of using the Space Monkey. You can limit the cache size, but the default setting is unlimited.)

All this caching is necessary for two main reasons: first, the device is a black box. It is not mounted in the traditional sense. In order to manipulate files on the device, the client must pull them into the cache, then push them back out as they change. (If you want a file to stay in the cache, you can pin it.)

Second, the device is slow. But I’ll come back to that, because it deserves its own section.

So, how are you supposed to use the Space Monkey as a local backup? Most backup utilities would run afoul of the cache. SuperDuper, for example, doesn’t recognize the spacefusefs mount as a backup destination. Time Machine support is planned, but not currently present.

The best solution I could think of is to copy my home folder using the direct copy functionality, then keep it up to date with rsync, as an incremental update is more cache-friendly. There may be tools to help with that. If you’re reading this and know of one, I’d love to hear about it.

This is the Vehicle’s Maximum Speed

As I write this, my MacBook Pro has been copying my home folder to the Space Monkey for ~42 hours. In that time, its managed to copy 109 GB of data. That’s an average rate of 5.8 Mbps. I’ve seen peak rates at 25.6 Mbps, but they never last long.

There’s no way around this: copying my 500GB home folder is going to take the better part of a week. Ouch.

The estimate was low

What’s the holdup? At first, I thought it was my crappy CenturyLink-provided DSL modem/router combo, which after all only provides 100 megabit ethernet and may not be capable of saturating that link speed. However, looking at the support page, I see that others are seeing similar speeds. On that page, “Jessica”, a Space Monkey employee, provides some insight:

…you cannot compare to a simple NAS transfer; we hope to reach that one day, but uploading to the SM device is not as simple as a straight upload. Your NAS does not need to encrypt your files, break them up into pieces, and push them out to random users on a network and be able to get them back at a moment’s notice.

In addition to the encryption and chunking she mentioned, the Space Monkey also does internal compression and deduplication. I presume these features are implemented in software rather than with custom silicone, so the transfer speed of the device is limited by the efficiency of that software and by the speed of the processor that runs it.

This is never more apparent than when the client is uploading a large number of small files. During such times, it doesn’t look like much of anything is happening at all.

Transfer speed FAIL

Space Monkey is spinning this in comparison to throttled online backup solutions. All well and good, but I was promised local copy speeds, and honey, this ain’t it.

That being said, I am cognizant of the fact that I am a very early adopter of this device. Space Monkey has said that it’s working on the problem, and I’m reasonably confident they can manage it. The problems this small startup has solved to put this device together are massive, and I have high hopes that they will be able to sort out the performance issues in time.

An Offsite Backup

The main attraction of the Space Monkey is that it is part of a “storage network”. The hard drive inside of the pod, of which you are allowed to use 1TB, is actually 3TB in size. The extra space is used to store other people’s chunked and encrypted data. In return, your data gets chunked, encrypted, and redundantly stored on other people’s devices.

The promise is that, should your device fail, or your house burns down, or floods, or gets hit by a drunk driver (which can happen), your data is still out there, still recoverable. Space Monkey says that they monitor the health of your data in order to ensure that, even if some devices that had been storing your stuff drop off the grid, your data remains safe, redundant, and recoverable.

This means that you can expect your Space Monkey to utilize your Internet connection, up and down, pretty much continuously. Users of bandwidth-capped connections beware. The client allows you to cap the transfer rates, and the defaults (100 Mbps down / 0.668 Mbps up) seem sensible. The upload may be a little low. We are talking about a lot of data here, and while the Space Monkey is autonomous, I’d still rather not wait months for my data to hit the network.

Is this distributed approach better than a dedicated cloud backup service? Yes and no. On the plus side, it’s greener. Data centers need a lot of electricity, both to run and for cooling. It’s also fault tolerant, in that there is no data center to, for example, get hit by a hurricane (which happened to the company I work for. Thanks, Irene).

On the downside, getting your data back out, you are subject to the upload caps of your peers. Maybe they’ll be able to get a bit torrent-like swarm going and give you great performance. I don’t know, and I hope I never need to find out.

A Dropbox Account

Space Monkey gives you access to your files, Dropbox-style, through a web interface and iOS/Android apps. I don’t know if the desktop client works if your computer is not on the same subnet as your device, since I haven’t tested it, but both web and iOS work from anywhere.

Using either of these interfaces, you can upload, download, and delete files and folders. You can also generate download links to any file you wish, which you can use to share files with others.

The Dropbox inspiration for these features is plain. If you have a Dropbox, you will know how nice this is.

I don’t have much more to say about this, except that it works, almost miraculously so. As soon as your files are on your Space Monkey, you can get at them from anywhere, though performance isn’t great (due, I am sure, largely to the upload cap).

An iOS Photo Backup Service

Because I listen to the Accidental Tech Podcast, I learned about Everpix just in time for it to go out of business. The crew spent quite a lot of time lamenting that loss, and wondering if anyone would ever be able to back up all of their photos from their phones.

Well, Space Monkey does. The Space Monkey iOS app can automatically upload every photo and video you take with your iPhone to your Space Monkey. It even works while the app is running in the background. It does not, however, use the iOS 7 periodic wakeup functionality, so it does have to be running for the uploads to take place.

Again, there is little more to say about this, except that it works. After I enabled the feature, the app went to work, and soon all my photos and videos were on my Space Monkey. When I took more photos, the app noticed, and promptly uploaded them. Performance is pretty good, too; after all, the Space Monkey’s download cap is quite high by default.

This was a surprise killer feature that I didn’t know about until I fired up the iOS app, and I think it will end up being the one that I use the most.

Pricing and Availability

There have been several changes to the pricing structure, so you may find conflicting information out there. As of this writing, it’s pretty simple: Pay $200 for the Space Monkey device, and you get a year of service free. Thereafter, you’ll have to pay $50/year to keep using your Space Monkey.

As for availability, they are currently rolling out to their kickstarter backers, who get first dibs. But, right now they have some extra units that were supposed to go to international backers but did not meet international CE regulations. So, right at this moment, if you go to spacemonkey.com, you can buy a device, but there’s no telling how long that stock will last.

Spaceward Bound

In its current state, there is a lot to love about the Space Monkey – and a lot that has disappointed me, too. This is a device produced by a startup (investor-funded, but still on a tight budget), and it’s a very early version, so of course it’s not all honey and roses.

Furthermore, there’s a nagging doubt in the back of my mind that Space Monkey may never reach mainstream acceptance. Nerds like me immediately recognize the value, and potential, of this device, but it’s hard to explain to ordinary people. Have you ever tried to explain to a non-computer nerd how Dropbox works, much less convince them that they need it? Yeah. Explaining the Space Monkey is much the same.

Warts and doubts aside, I am nevertheless astonished that this device exists. They’ve strapped their monkey into a rocket and shot him into space – low earth orbit, but still space. They won’t stop there. They’re aiming for the moon, and I think they can make it. If they don’t run out of money, and enough people believe in them enough to buy in, they will surely make it.

“Thanks for believing”. It’s a phrase we kickstarter backers have heard several times. Well, Space Monkey, I believe. Please, don’t prove me wrong.

Two numbers to consider

Posted by – December 16, 2012

I’ll keep this short, because I hate writing about politics.

  1. Total number of people murdered by firearms in 2009: 11,493 (source: CDC)
  2. Total number of people murdered by drunk drivers in 2010: 10,228 (source: CDC, again)

Alcohol kills nearly as many people in America each year as guns. Where are the cries for us to ban alcohol? How can we allow this fatal substance into the hands of the criminally irresponsible, who then use it to kill?

The answer to that is obvious to anyone who went to high school. We tried it once, and it didn’t work. People kept right on drinking, and in the end it caused a lot more harm than good. The better solution – the only solution available to us – is to teach people not to be criminally irresponsible. And the best way to do that is for two well-adjusted and loving parents to teach it to their kids.

I’m not passionate about guns. I don’t really want to own one. But I tell you this: were the law to ban the sale and possession of guns tomorrow, I would not feel any safer. I would feel a lot less safe, because now not only would good people be less able to defend themselves (and everyone around them), but we would have a repeat of prohibition on our hands. I can see nothing but bad in it.

You can’t fix society with laws. Laws need virtuous citizens in order to work. You can’t fix mental illness with laws. Mentally unstable people, and the people who love them, need help, not laws.

How I feel when coding in various programming languages, depicted pictographically

Posted by – July 4, 2012

I can’t explain it. It’s an emotional thing.

Straight C

Primitive Man


Mad Science!



Shell Script

Old Man


Smug Dog


Whiz Kid


Mr. Clean


Dirty Baby


Boring Business


Muddy Suit



Scheme (err, Racket)

Hipster Peircings

The Seventh Guest Queens Puzzle As Solved By A Nerd

Posted by – March 20, 2012

I played the heck out of The 7th Guest when I was a kid. I was using a Power Mac 6100/60. Ah, those were the days. I do not miss them.

For those that don’t know, The 7th Guest is an entirely pre-rendered game. In other words, you click in a direction to move, and then a pre-rendered movie plays to move you in that direction. Every single frame of the game is a movie. I don’t know if I was limited by my CPU or my 4x CD drive, but the movies did not play smoothly. Sometimes the audio would stutter. The game would pause between receiving a command and playing the movie.

Now I can play the game on my iPhone, and the experience is ridiculously better. I had no idea how horrible the game really played until the first time I moved somewhere and the phone literally flew through the movie, quickly and smoothly. I’d estimate that just moving around takes half the time as it did on my old Power Mac. I suppose this shouldn’t astound me, but it does. Modern cell phones have an astounding amount of processing power and storage space.

I still remember the solutions to the three word puzzles I have encountered so far, which I find amusing. Some puzzles, though…some have solutions I could never have recalled.

Take the queens puzzle. The point is to place 8 queens on a chess board such that no queen could take another. Thus every row, every column, and every diagonal contains exactly one queen. How would you go about solving this problem?

Most people would do a greedy search with a local home-in to the answer. In other words, they’d just start putting queens on the board any which way that works, until they get down to 3, 2, or even 1 queen left and discover that no legal moves remain. Then they start shuffling queens around until they arrive at a solution.

This is what I did the first time(s) I played the game, but this time around I got bored with it pretty quickly. It seemed to me that a computer would do a better job of solving this puzzle than I would. What’s more, it should be able to do so quickly because the problem lends itself to aggressive search space pruning. Every queen placed eliminates a row, column, and two diagonals from the search space, and as soon as we reach an unwinnable board configuration, we can back up and try something else.

Now, I know what you’re thinking. Yes, programming a computer to solve the problem takes a lot longer than the futz-with-it-by-hand method. And yes, I could just look up the solution in the guide book. Shaddup. My way is more fun.

The Code

Before I show you the code, I’d ask you to keep in mind that this is a quick and dirty PHP script. I may be having fun with this, but that doesn’t mean I’m going to spend a lot of time elegantly designing a great solution. It only needs to work once, and never will it be modified again.

The script recursively searches for a solution by trying to place a queen on the board, checking to see if the result is valid, and if not, moving on to the next untried spot. If an unwinnable state is reached, the recursion lets us back up and try a different configuration. This approach is, in this case, quite fast—it produces a correct solution as close to instantaneously as makes no difference on my 4-year-old MacBook Pro.

No, look, seriously, the code

function newBoard()  {
    $board = array();
    for ($i = 0; $i < 8; ++$i)  {
        $board[] = array();

        for ($j = 0; $j < 8; ++$j)  {
            $board[$i][$j] = 0;

    return $board;

function isValidMove($board, $row, $col)  {
    $board[$row][$col] = 1;

    return boardIsValid($board);

function boardIsValid($board)  {
    // Check rows, columns, and diagonals
    for ($i = 0; $i < 8; ++$i)  {
        $rowOneCnt = 0;
        $colOneCnt = 0;
        $diagOneCnt = 0;
        for ($j = 0; $j < 8; ++$j)  {

            if ($board[$i][$j] == 1)  $rowOneCnt++;
            if ($board[$j][$i] == 1)  $colOneCnt++;

            // Up left diagonal
            // This is the only loop that checks the current square ($board[$i][$j])
            for ($di = $i, $dj = $j;
                 $di >= 0 && $dj >= 0;
                 --$di, --$dj)
                if ($board[$di][$dj] == 1)  $diagOneCnt++;
            // Up right diagonal
            for ($di = $i-1, $dj = $j+1;
                 $di >= 0 && $dj < 8;
                 --$di, ++$dj)
                if ($board[$di][$dj] == 1)  $diagOneCnt++;
            // Down left diagonal
            for ($di = $i+1, $dj = $j-1;
                 $di < 8 && $dj >= 0;
                 ++$di, --$dj)
                if ($board[$di][$dj] == 1)  $diagOneCnt++;
            // Down right diagonal
            for ($di = $i+1, $dj = $j+1;
                 $di < 8 && $dj < 8;
                 ++$di, ++$dj)
                if ($board[$di][$dj] == 1)  $diagOneCnt++;

            if ($diagOneCnt > 1 && $board[$i][$j] == 1)  {
                return false;
            $diagOneCnt = 0;
        if ($rowOneCnt > 1 || $colOneCnt > 1)  return false;

    return true;

function findWin($board, $row = 0)  {
    if ($row > 7)  {
        if (boardIsValid($board))
            return $board;
            return false;

    // Starting position on current row
    for ($startPos = 0; $startPos < 8; ++$startPos)  {
        if (isValidMove($board, $row, $startPos))  {
            $board[$row][$startPos] = 1;

            $result = findWin($board, $row+1);

            if ($result !== false)  return $result;
            else  $board[$row][$startPos] = 0;

    return false;

function printBoard($board)  {
    for ($i = 0; $i < 8; ++$i)  {
        for ($j = 0; $j < 8; ++$j)  {
            echo $board[$i][$j] . ' ';
        echo "\n";

$board = findWin(newBoard());


Mice run faster under Lions

Posted by – July 25, 2011

I’ve been running Mac OS X 10.7 Lion for about two hours now, but it didn’t take me that long to notice that something was seriously off with the mouse acceleration. I found myself overshooting pretty much every small target I tried to hit with my mouse. In fact, I felt like I do when I’m forced to use…Windows!

Now, Apple has been making concessions to switchers from Windows for years. I’m happy to say that they outnumber the longtime faithful (means the platform is getting successful), and mouse acceleration has been a sticking point for switchers, so changing to a more Windows-like curve is probably the right thing to do. This is small consolation to me, since it doesn’t change the fact that right now, I can barely use my mouse.

Confirming the shift

How do I know that mouse acceleration has been a sticking point for switchers? Arguments on the Internet, how else? Because of my participation in said arguments, I happened to have a picture of my old preferred acceleration curve:

Old Acceleration Curve

This screenshot, by the way, comes from the excellent ControllerMate, which you can use to configure any arbitrary acceleration curve you want (among many, many other things.)

Here’s how things look under Lion:

Lion accel curve

Ouch! No wonder I’m overshooting things. That curve is way steeper than what I’m used to.

Fixing the curve

Fortunately for me, I didn’t even have to draw a custom curve, since the old curve is still there. Did you know that every notch in the “Tracking Speed” slider of the “Mouse” preference pane in System Preferences is actually a different acceleration curve? My old curve, which used to reside one notch left of center, is now the second notch from the left. I discovered this, again, because ControllerMate lets you see all the OS standard curves.

So, don’t worry; you’re not crazy; your mouse is actually running faster under Lion. Thank goodness the fix is as simple as turning the speed down.

Made with 100% Pure Height

Posted by – June 23, 2010

It happens to every budding web designer eventually: you need something, usually a div, to stretch to the entire height of its container. So, you quite reasonably use CSS to set the height to 100%. This ought to work—there’s no reason why it shouldn’t—but it doesn’t. Every single web browser in existence will point and laugh at your pathetic attempt at a simple solution to a simple problem, and then they will ignore it.

After a couple hours banging their head against the problem, most nascent web designers give up and change their design. That’s because there is no simple, reasonable way to do this. Oh, you can muck about with absolute positioning, which will work if the element’s container can also be positioned absolutely. Sadly, this isn’t often the case.

I’ve also found claims that simply setting the body’s height to 100% will make the setting work for all other elements as well. However, I’ve found that this is just plain wrong; I can’t make it work. It does work if you give the body a height using a fixed unit, such as pixels, which you will almost never be able to do.

The rationale given for why this works is that, in order to calculate a height that is specified as a percentage, the browser needs an element somewhere higher up the containment hierarchy with a defined height. I am entirely too lazy to verify whether or not this explanation is derived from the CSS spec.

(As an aside, this rationale also explains why width does not suffer from the same percentage dysfunction as height. The height of a page is determined by its content, but its width is specified by the width of the browser window unless overridden by CSS.)

Of course, whether or not the rationale is derived from the spec, it’s still a heaping load of crap. Obviously, the browser must calculate the height of every element before it can render anything. It even exposes these calculated heights to the user through Javascript.


Doing the Browser’s Work For It

I said there is no simple, reasonable way to do this, and I meant it. The solution I am about to describe is simple (thanks to the magic of JQuery), but it is in no way reasonable. Using Javascript to fix up your layouts is an obscenely stupid hack that should only be used when all saner options have been exhausted. If you can use the absolute positioning trick, do it. If you can alter your layout to avoid the need for height:100%, then do that. Don’t sully your work with this ridiculousness unless you have no other alternative.

Still reading? Ok, deep breath. Here’s the code; it’s just a few lines:


function height100percent()  {
    $('.container').each(function()  {
        var h = $(this).height();
        $('.100percentHeightPlz', $(this)).height(h);

For those not familiar with JQuery, let me go through this line-by-line.

  1. When the document is loaded and ready for manipulation, run the height100percent function.
  2. Find every element having the CSS class “container” and apply the given function to each of them.
  3. Get the height of the current container element.
  4. Find all objects having the CSS class “100percentHeightPlz” that are children of the current container element. Set their heights to that of their container.

Now, W3C, was that so hard?

Less Stop and More Go

Posted by – June 19, 2010

This is a post about driving. Yes, one of those.

Last night I got caught in a traffic jam on I-15 southbound somewhere between South Jordan and Thanksgiving Point. At 11:30 PM. That’s Utah for you.

(Okay, it was a Friday night, and, due to construction, the four-lane highway was reduced to a single lane. Still, there were a ton of cars on the road for that hour of night.)

Regardless of how ludicrous it may be to get caught in a traffic jam at 11:30 PM, I am certain that you have been there before. You, a single driver caught in the jam, are currently completely stopped. This is not a pleasant state of affairs for one who is trying to get somewhere. Irritation mounts inside you. Suddenly, a ray of hope! The car in front of you starts to move! You take off after it like a shot.

Because you have the reaction time of a normal human being, a space of pavement opens up between you and the car ahead of you before you are able to punch the accelerator. This space enables you to accelerate to a higher speed than the clogged road can sustain. All too soon you have to slam on your brakes. Oh, and by the way, the person in front of you is doing the same thing. This behavioral pattern creates waves that propagate through the traffic, causing everyone to stop and go.

Stop. Go. Stop. Go. This is giving me a headache.

Beyond driver fatigue, stop and go driving is bad for your car and bad for your wallet. All that accelerating and braking puts wear and tear on your engine and brakes, and sinks your MPG into the crapper. Fortunately, you can beat this cycle (with a stick, if need be).

The first step is to recognize that, because the road is over capacity, everyone is going to have to slow down. You can’t change that so you might as well accept it.

The second step is to try to find the speed that the road can accommodate. If you can find and travel at this speed, you won’t have to be constantly stopping and going—you’ll just go, like you normally would on the freeway (only slower). The trick is to open up a large gap between you and the car in front of you. When they get too far away, you can go a little faster; if you find yourself gaining on them, ease off the accelerator.

You should see the distance between yourself and the car in front of you fluctuate regularly. This is because they are caught in the waves and are constantly stopping and going. If the distance between you is large enough, it will eat the wave, enabling you to travel at a more-or-less constant speed. Your traffic jam experience will have a lot less stop and a lot more go.

Last night, I had a great opportunity to practice this technique, and I was treated to a sight that, because I am a nerd, I found delightful. The flashing taillights of the cars in front of me created a very visible wave pattern that propagated up and down the line. But behind me, as far as I could see, everyone was traveling at a constant speed. I had erased the waves.

Then I realized that I wasn’t irritated anymore. I was having fun! By making a very simple change to my behavior, I was able to change the behavior of those behind me, saving all of us some gas and reducing our irritation. I, possessed of the power of nerdiness, used that power for tangible good! And now, you have that same power. Go forth, nerd heros, and use your power for good.

These ideas come from William Beaty, electrical engineer and nerd hero. His site, trafficwaves.org, elucidates them in meticulous and eloquent detail. If you don’t have time to read it, at least watch the video that’s linked from the front page.

The Search for Semantic Writing

Posted by – May 29, 2010

I grew up using word processors. By all rights, we should be old friends.

My first word processor was Final Writer on the Amiga. I used it to type all my school assignments all throughout grade school. It was a great tool, and easy enough that even a grade schooler could figure it out. Back then, I was happy just to be able to type instead of hand writing everything. I’d print my documents out on our Epson dot matrix printer, and, later, on our HP inkjet. What I saw on-screen was, more or less, what I got from the printer; I never thought much of this because it seemed like the obvious way things ought to work. Without the web, I likely never would have realized that it’s a fundamentally broken way to work.

From Final Writer to Claris Works to Microsoft Word, somehow the same little frustrations carried over. Make a word bold, clear the bold setting before entering the next word, make a typo, erase, find that the text is bold again. Repetitiously change formatting for headers and other elements, then change it back for regular text. Never, ever figure out the logic behind the little fiddly bits in the ruler that control indentation according to some incomprehensible arcane formula.

Writing for the web is different. On the web, you author pages in plain text, and what you see is most certainly not what you get. Printers have nothing to do with it; content is paged according to its needs instead of the limited physical space of a piece of paper. Most importantly, web designers who know their stuff create semantically structured documents that separate their content from its presentation.

Arguing Semantics

If you’re not a web designer, the words “semantically structured documents” probably mean bupkis to you. Let me explain.

When you want to create a header in a traditional word processor, what do you do? Font size 16, bold, maybe use a different font? What you’ve done is make the text look like a header without actually calling it a header. Your WYSIWYG document has no structure; it’s just styled text. (Named styles kinda-sorta structure WYSIWYG documents, but they only go halfway. They have the form of semantic structuring, but they deny the power thereof.)

Semantic structuring takes the opposite approach. Instead of applying a style to create a header, you apply a bit of markup that names it a header. Each bit of text is given a name that describes what it is: headers are marked as headers, emphasized text is marked as emphasized, and so on. Writing this way frees you from having to deal with the vagaries of formatting while writing. It’s incredibly liberating.

It’s also deceptively powerful. Write your documents with semantic structure, and you’ll have a source that can be automatically transformed into any sort of output format you desire. Web designers exploit this property to make web sites easier to maintain, but the concept need not be limited to web pages. After drinking the sweet semantic kool-aid, I found myself wanting to write everything using semantic structure.

So, that’s that. We had a good run, WYSIWYG and I, but now I fear we’re breaking up, and I’ll be happy if I never have to use another word processor ever again.

Tools for Semantic Writing

When I went shopping for a semantic writing toolchain, I had a few basic requirements in mind. Whatever I settled on had to have the following four characteristics:

  1. Simple to author, clear to read in source form. As I would mostly be creating simple documents, I didn’t need a lot of advanced features and the complexity they bring.
  2. Works well with Git. I recognize that this is not a common requirement for a writer to have, but I’m also a programmer and am thus addicted to version control.
  3. Has tools to transform into a number of output formats, including pretty PDF and RTF in standard manuscript format.
  4. Elegant to use. Not too much effort to set up if I could help it.

I evaluated HTML, Markdown, LaTeX, and dedicated applications such as Ulysses against these four criteria, and this is what I found.

My First Markup Language: HTML

I’ll be honest: I didn’t spend long thinking I might use HTML for regular writing. While it is a powerful markup language that I know very well, it’s not really designed for writing things other than web pages. It would be unnecessarily cumbersome to write (for example) fiction using HTML, and the tools that convert from HTML to RTF are, from what little I’ve seen, not very good at it.

HTML is still a part of my life. It was my first love in semantic writing, but it couldn’t be my last.

The Mother of All Markup Languages: LaTeX

As far as I know, LaTeX was the first system to separate presentation from content. It consists of a markup language and a toolchain that converts said language into a number of pretty output formats. It’s frequently used in the publishing industry as a basis for typesetting books, and is the standard for writing academic papers and books. These attributes made LaTeX look very promising to me.

That is, until I started to learn it. I quickly discovered that, while I’m sure it’s a great tool for a lot of people, it didn’t fit well with my needs.

  • LaTeX is old. It’s crufty. It has a lot of features that are obsoleted by modern character encodings, for example.
  • LaTeX is complex. It has a lot of features and does a lot of things I didn’t need it to. As a result of this, it was often hard to know which markup construct to use for my specific use case.
  • LaTeX is kind of hard to style. Its style tags are obtuse and complicated.
  • Even after all this time, the toolchain still has that “duct tape and bailing wire” feel common to all too many open source products.

Ultimately, I found LaTeX to be overkill, and not really suited to my needs.

Mark Down, Not Up

Markdown is a simple markup language created by John Gruber of Daring Fireball. It was designed to be natural to read and write, and is typically compiled down to HTML. I love Markdown; it’s great for taking notes and writing simple documents, not to mention its original purpose (blogging). In fact, I’m writing this blog post in Markdown right now.

I’ve been doing most of my (non-coding) schoolwork in Markdown for the past year and a half, and when I take notes, I use Markdown. I’ve even written three short stories using the format. It is very clean, and has a small, focused feature set (if you need more, you can simply drop into HTML). But, it doesn’t scale well to large documents, like novels.

MultiMarkdown is an extension to Markdown created by Fletcher Penny. It was designed to address the large document issue, and also to broaden the range of Markdown’s output formats. I think MultiMarkdown is a great concept, and can recommend it to anyone looking to get into semantic writing. I almost settled on it myself.

What stopped me were the tools. They felt immature and cobbled together. Yes, they are usable, but they simply can’t compete with the elegance and ease of use provided by a dedicated application. If said applications didn’t exist, this is where this post would end, but since they do, we soldier on.

Ulysses the Epic

Yes, there is more than one dedicated semantic writing app for the Mac, but since Ulysses is the one I settled on and most heartily recommend, I will omit mention of the others.

Ulysses brings semantic writing, powerful exporting, and project management together in a capable, more-or-less elegant package. Its simple markup is designed specifically for the needs of fiction writers, and is customizable. It outputs a large number of formats, including RTF, LaTeX, PDF, and (soon) HTML. It provides fine-grained control over styling of output. It is a focused, purpose-built tool, and it is very good at what it does.

Within a project, the actual writing is saved in any number of documents, which can be tagged, reordered, annotated with notes, and otherwise managed. This setup is great for writing really big projects, like novels. (Yes, I’m crazy enough to have started writing a novel. Yes, this fact is what prompted me to really nail down my semantic writing toolchain. And yes, I know my novel is going to suck. Shut up. It’s a first try, and I’m writing it for fun.)

That said, Ulysses is not perfect. Its interface is not the best-designed in the world. In particular, I find its implementation of document groups and filters unusually removed from the documents that they group and filter. There may be a good reason for this that I’ve yet to discover. And do we really need three different types of notes?

Also, of all the tools I’ve explored, Ulysses is the only one that costs money. In fact, it’s a bit on the pricy side, though the educational discount helps. Still, at 35EUR (around 45USD at time of purchase) for an educational license, I had to think long and hard about whether it was worth the money, or if I should just stick with MultiMarkdown. That I opted to spend the money shows that I’m a sucker for good tools.

Lastly, some notes about version control. Those not interested in using a programmer’s tools for writing can skip this.

Ulysses projects are standard Mac OS bundles. Inside, they contain a few plists that manage mundane stuff like UI state and preferences, and a series of folders that contain each individual document in the project. Each document has an Info.plist, a folder for notes, a text file that stores an excerpt (not sure what I’d use that feature for), and triply-redundant storage for the document text itself. There is a plain text file, an RTF file, and a binary .textarchive, each of which contains the full text of the document. I have absolutely no idea why they chose to store documents this way.

The bad news is that the binary textarchive is the “canonical” file. It’s the one that gets loaded when a document is opened, and if the text/rtf files don’t agree with the textarchive, they are simply replaced. The good news is that the only information about the documents that is managed in the central plist is a list of all documents in the project. Furthermore, this list uses folder names (a monotonically increasing numerical index), and not the names you assign the documents through Ulysses’ UI.

This means that you can use version control to manage Ulysses projects, but you do have to step carefully. First, if you always add all new files and commit all changes, even to the plists, you should be able to switch between versions of the entire project with impunity. Second, you can revert individual documents to previous revisions as long as you, again, make sure your commits include the entire contents of the document’s subfolder.

Lastly, absolutely no merging of any kind. I’m not too concerned about that, anyway; I don’t anticipate needing it for my fiction.

Oh, and Ulysses keeps a redundant copy of each open document within the project. These open document folders are prefixed with an “o”, and persist even when the project is closed. From the perspective of version control, these are transient noise that need not be versioned. However, if you remove them without also editing the plist, Ulysses will make you save your project to a different file when you open it again, which could get annoying. At the moment, I think the best way to deal with this is simply to close all open documents before making a commit.


Semantic writing has made my writing life easier in a multitude of ways. If you like me find yourself dissatisfied with your word processor, you should give semantic writing a try. It might just sour you on WYSIWYG forever.

Learning to Do Things the Hard Way

Posted by – March 14, 2010

I’m a little stuck on this game called VVVVVV. It doesn’t look like much on paper: it was made with Flash, and the graphics might have been at home on a Commodore 64. However, the music is great, the quirky little humorous storyline is fun, and, despite multiple playthroughs, I’m still not sick of it.

But this is not a review of the game. No, this is me sharing yon pictograph. But first, some background. (Feel free to skip it if you’re familiar with the game.)

VVVVVV has collectibles (what game doesn’t?) called “shiny trinkets”. Collecting them is the key to accessing the secret bonus level, but some of them are really hard to get. The hardest is appropriately titled “Doing Things the Hard Way”. This trinket is so epic that it took me three minutes to get…the fifth time through. The first time…well, let’s not dwell on that.

The following is a pictographic representation of my fifth time collecting the “Doing Things the Hard Way” trinket. Click it to see it in it’s original-sized glory.


As you can see, it’s quite an endeavor. I feel like I have to retrain my reflexes every time I try it.

Here’s how I made it:

  1. Turn off the backgrounds before palying as they’ll mess up the compositing process.
  2. Obtain the trinket. Record the attempt using a screen recorder (in my case, Snapz Pro) at 15 FPS, which makes good motion trails. Save the resulting movie using lossless compression (I used PNG).
  3. Export the movie to a sequence of still images. I used Quicktime 7 Pro for this (with Snow Leopard, this must be specially installed from the Snow Leopard DVD).
  4. Sort the over 3000 resulting images by room. This doesn’t take all that long but is very tedious and boring since there’s really no way to automate it. I listened to podcasts while I did it.
  5. Copy one of the images and erase the little blue man. This is our base.
  6. Create a Photoshop action that composites the images by:
    1. Copy the base onto the target image (into a new layer).
    2. Set the blend mode of this new layer to “Difference’. This erases everything but the little blue man, leaving him on a black field.
    3. Copy this onto the base (into a new layer).
    4. Use the Select > Color Range… command to select all black.
    5. Delete the black. Now you’ve got the little blue man isolated in his own layer on top of the room base.
    6. Set the little blue man’s transparency to 17%.
  7. Batch-run this action on every image file for every room.
  8. Combine the resulting individual room composites into one very tall image.

Sadly, by the time I actually got the trinket, the timing had drifted enough so the motion trail depicting Captain Viridian (that’s the little blue man’s name) swooping down to collect his prize looks a bit strange.

I thought this was an interesting sight. Perhaps more interesting would be a recording of someone learning to do things the hard way for the first time…but, then again, such a beast would probably be impossibly thick with little blue men. Most first-timers (myself included) die literally hundreds of times on their first attempt at this.