Tasked with organizing a New Year’s white elephant/gift exchange party, I had the idea of creating specialty tickets for the participants.

I started with a ticket template I found on the web.


With a little work I put together something basic but unsatisfying.


So I found a white elephant image online,white-elephant

… and came up with this nice ticket template.


Next I turned it into a set of sheets,


sliced them into pairs,


folded them down the middle.


and then scored them along the middle, to make them easy to detach later on.


Finally I numbered the pairs on the back.

IMG_20140102_192233    IMG_20140102_192254

All ready for the gift exchange! Here was my test piece.


The idea of the tickets is as follows: everyone writes their name on both tickets in a pair, then separates them and keeps one. The caller pulls tickets one at a time and reads out the name, thereby determining order. (The numbers on the back are for those people who can’t bother to actually follow instructions.)

I already hear you complaining.
“You know, one ticket per person would be much more efficient.”

Style, baby, style.


Everybody Dance, Now!


My new team at work likes to have their little Nerf gun wars. They have all sorts of guns, some modded, some not.

I wasn’t particularly interested in playing the testosterone game of Nerf War, but I also wanted to be part of the fun, just … play by my own rules, so I’d walk through their battles with arms raised yelling “Civilian!” They would leave me alone, but once in a while someone would threaten to “get me some day.”

Fortunately, being on the team means that I’m welcome to take one stock Nerf Maverick M-6. So I came up with a way of playing by my own rules: I’d make a gun that didn’t shoot darts, but sang songs of peace.

The web was surprisingly useless on this matter. There are plenty of sites about modding Nerf  guns, and plenty of information about Arduinos and music, but nothing that combined the Nerf guns with Arduinos and music. I briefly flirted with buying an MP3 shield, but who wanted to wait for shipping, and who wanted to pay fourty bucks for just one sub-component? And where would it fit in the gun? And then there was the power source, and all other sorts of crap.

Fortunately, I knew that good ol’ Matt Mastracci had recently been playing with Arduino, so I asked for his advice.


He suggested I get a musical greeting card. Brilliant.

So Wifeberg and I spent 20 minutes in Rite-Aid playing every musical card we could find. Which is pleasant. Finally I settled on what would really be a perfect piece of music: C&C Music Factory’s Everybody Dance Now!

After dismbowling the card and carefully studying my gun’s interior I came up with an execution plan, and all I needed was hot glue and a soldering iron. It took five hours of labor and testing, and much more close contact with hot glue than I imagined.

But 11:15PM on Sunday, my hard work paid off:


And that’s exactly what I did. I played some gun music for Matt, and danced around my chair.

The whole thing took about eight hours from concept to completion, including staring at the gun’s innards and my many mistakes. If I had to do this again it would probably take one to two hours.

Hey, here’s some video proof.



Neat, right? But the real test would be taking it to work: how would they react? Well, various levels of interest from utter amazement, to confusion, to outright disregard, accompanied by a solid Nerf dart beating. In other words, a complete success.

The amazing part of this experiment has been that suddenly, I like dancing! Turns out that showing up your teammates by strutting around to music that demands that you dance makes it easy and fun!

Which brings me to my final story on the matter: this morning while getting breakfast I hummed the song, and boogied around just a little bit. This young, tall, attractive woman noticed me and kind of smiled. So I faced her and explained the whole thing: how I built a music-playing Nerf gun, and had no idea that I’d wind up learning to like dancing more than anything else! She responded, “Uh. You know, that’s cool!” I was amazed by the dancing, she was amazed by the singing gun. I forgot about the gun.

I <3 PocketCasts

I was a committed DoggCatcher user since December 2011. I’ve posted several times on Google+ suggesting people use it. However, many people also loved PocketCasts, which I was reluctant to try because according to claims DoggCatcher was too configurable, and users were lost in all the settings dialogs. I don’t mind those kinds of dialogs, and am able to navigate them, so I was happy to claim that DoggCatcher worked well for me.

A few weeks ago I hit a bug with DoggCatcher that erased the feed list from my phone, resetting it to the default. The only advice from DoggCatcher support was to have had a backup to begin with, a manual process. If I had to configure the software from scratch, I decided it might as well be with another product, and purchased PocketCasts.

Before we make this about bashing DoggCatcher, remember that it was just a bug. I didn’t leave in anger, it was just an opportunity to try something else.

The first couple of days with PocketCasts felt like a typical, irritating, adjustment period, as I tried to figure out how things worked, and set it up just as I wanted: How do I auto-download all episodes from all podcasts? How do I disable auto-delete? Which podcasts are listened to, and not deleted? How do I tell it that I want to manually download an old episode, but wait until the device has a WIFI signal?

It turns the difference isn’t about configurability, it’s that PocketCasts configures things in a nice and useful way. The power lives in their Smart Playlists, which are not immediately obviois out, but boy, are they great. I have one Smart Playlist that is merely responsible for automatically downloading all new episodes. I have another Smart Playlist that shows all finished, and not deleted, episodes. One Smart Playlist for NPR shows, and another one for Doctor Who podcasts.

DoggCatcher has a variable speed playback feature, but you have to purchase it. I’ve always been happy listening to podcasts at 1x speed. Well, it turns out when variable speed is available for free, it’s super useful. In fact, PocketCasts lets you set a playback speed for each feed, so by default, Dan Carlin’s Hardcore History plays at 1.2x speed.

On DoggCatcher, initial durations for fast-forward and reverse were the same. PocketCasts set them to different values. (I can’t remember: was it 10 seconds for reverse and 30 for fast forward?) Either way, the important thing is that they realize the power have having different initial values (if you don’t see the value, try measuring 4 gallons of water with a 3 gallon pail and a 5 gallon pail.)

PocketCasts also supports synchronization, if you like that sort of thing. It doesn’t do much for me, but if you find it useful, I’d like to know how you like it. Can you put down one device, pick up another, and continue from where you left off? How much customization do you still need after getting a new device? By comparison, DoggCatcher has Cloud Sync in limited Beta.

It’s not all sugar and roses with PocketCasts, but the problems are relatively surmountable. For instance, the full list of feeds appears as a grid of icons, when an ordered list would be simpler and easier to comprehend. For crying out loud, they don’t even put a border around each icon, so the images bleed into each other.

I’ve also noticed a problem where rewind is not instantaneous when used with variable-speed playback. So, for instance, if rewind is set for 10 seconds, it might take the app 1.5 seconds just to execute the rewind. So suddenly rewinding 60 seconds takes almost nine seconds of time. Worse, the repeated presses on the rewind button are ignored until prior rewinds complete, so it requires my attention for the full nine seconds.

Another thing about variable-speed playback is that the slider isn’t to easy to control. I like playing things at 1x, 1.1x and 1.2x speeds, and that requires careful nudging of the slider.

PocketCasts support is excellent. I dropped an email to and received my reply an hour later. By comparison, DoggCatcher uses a forum, which means Yet Another Password To Remember.

PocketCasts just wins. I haven’t looked back.

Some exciting guests

This week we’re house sitting for some guinea pigs.


They’re surprisingly easy to care for. Five minutes in the morning to feed them, change their water, clean the cage, and turn on the lights, Five minutes in the evening to make sure they haven’t eaten each other, and turn off the lights.

But I’m not the only one who’s interested in them.


Maggie does not know what to make of this. She loves the smell. Her terrier brain says there is something to hunt. But she just won’t enter.

Here she is two minutes later.



Actually she has been in the room. She stares at them cage. I think she can discern them from the rest of the cage, because she went into her play pose on the first day.

Now, she doesn’t want to go on walks — she wants to see the guinea pigs. She doesn’t want to go to bed — she wants to see the guinea pigs.

Summary: I ❤ Maggie. Still.


Typography is a fun hobby. Like birding, you can practice it almost anywhere. Oh, sure, there are probably more birds than books in the mountains, but there’s probably some writing in your pocket.

I stopped at a diner for breakfast this morning and took an interest in the variety of sugar packets in the sugar bowl, and rather than read my book, I thought about how the different packets used fonts to send messages about itself. Let’s start with the granddaddy.

sugarSugar. That good ol’ sweet product has been around forever, and it’s going remain here long after the others disappear. The serif font suggests an austerity and authority against which all sweeteners must compare. The lettering is rotated slightly to look as if it were the same stamp applied to the crates and sacks used to ship the sugar right to your table. The thick, Cooper Black-like font also drives the sense of being an old-fashioned product, certainly compared to the skinny alternatives to come.

Compare that to the three artificial sweeteners that contrast themselves by color. Sweet ‘n Low led the pack with its red packet. Nutrasweet distinguished itself with a blue packet, and Splenda in yellow. (I recall a fourth artificial sweetener that’s got a green packet, which I believe is a stevia-based sweetener. Green, indeed.)


But the notable thing about the artificial sweeteners is the type. They’re all sans-serif, (that is, modern) with sweeping curves, all slenderer than Sugar. The Sweet ‘n’ Low logo has a treble clef. I think the the sheet-music theme was more popular during its introduction in 1957. Its logo is as anachronistic as the sacccharin inside.

The flowing type also suggests a carefree attitude – something that will help you float like a leaf on the wind. But when you get down to it, what the two types of packets suggest is this: sugar is masculine, artificial sweeteners are feminine.

There’s a fifth packet in the bowl which I assume is Sugar in the Raw. I haven’t looked at it yet, and intentionally everything above without looking at the last packet in order to guess what it might be. I seem to recall Sugar in the Raw being printed in an outline serif, looking even more like something you would see on a burlap sack. Let’s see.


Oh, look! It’s not Sugar in the Raw. “Natural Brand Sugar”. What an interesting mix of fluidity and formality. Sugar remains a solid (serifed) sweetener, but as a “natural” product, it can be green (I am fighting the urge to put “green” in quotes.)  Though like sugar, it’s a serif font, it’s letters are tall and thin, just like the people who use “natural” products.

Inserting Guava Preconditions in Eclipse

Eclipse has the well-known surround-with feature (keyboard shortcut ctrl-alt-Z.) Something I’ve always wanted was to find an easy way to surround expressions with Preconditions. For example, select the right hand side of

this.firstName = firstName;

to make

this.firstName = Preconditions.checkNotNull(firstName);

Unfortunately, Surround With only works with full line selections, which means you can’t select the right hand side of the statement; you can only select the full line. There is, however, another work around, which I will enumerate here: Preferences > Java > Editor > Templates > New… Enter the following values: Name: checkNotNull Context: Java Description: Add Guava Precondition Pattern: ${:import(}Preconditions.checkNotNull(${word_selection}) Repeat this twice more for checkArgument and checkState, and repeat each of those for its static import version. I have supplied a Workspace Mechanic-compatible .epf [gist] that sets all six of these, but use it carefully: the preference would override all other customized templates.

Now let’s quickly describe how to import and use these.

If you use the Workspace Mechanic, store the file in an appropriate place (by cloning the git repository.) Otherwise you can import the file using File > Import > General > Preferences.

Once the preferences are imported, you can use the completion proposal keyboard shortcut (ctrl-space on most platforms,  cmd-space on OSX) it brings up the content assistant. Look in the lower-right corner. It tells you to press that combination again to get another set of completion proposals; in this case it’s Template Proposals.

The template proposals are are there!

Of course, checkArgument and checkState accept boolean arguments, so you might not find them quite as useful, or perhaps useful in a different context.

If you’re having trouble, or you want to configure how the content assistant selects proposal types, navigating to Preferences > Java > Editor > Content Assist > Advanced.

Propaganda, Politics and Trash in Singapore

William Gibson wrote a scathing article about Singapore in 1996 called Disneyland with the Death Penalty. You can imagine his opinion of the city with a title like that. Mine is significantly less dire, but he writes prose; I write software. When he writes software I’ll have a stronger critique of his content, but boldly competing with him on journalism and grammar is something I don’t aspire to.

My very limited view of the Singapore system in action mostly comes from two places: the newspaper supplied by my hotel, and the taxi drivers I met.

I’ll give a brief example of how the newspapers seem to inform public opinion by comparing two articles.

The February 1 edition of the Straits Times has the following cover story: Jobless rate falls to 14-year low.

The edition for the following day, February 2, has the following stories on its cover page: $600 million boost for MRT service, Govt surplus ‘to exceed forecast’, and Inmate numbers fall, thanks to rehabilitation. There were two additional articles mentioned on the front page available online but only to subscribers (hence no links): “Young & jobless in Europe” describing the mounting concern of employment in Europe, and “Yaw back in public eye,” about the  minority political party leader returning after allegations of an extra-marital affair.

Did you catch that, between one day and the next? One day the newspaper mentions Singapore’s low jobless rate, and the next day mentions Europe’s high jobless rate. This seemed to surprise nobody I spoke to.

The taxi drivers almost always seem willing to complain about life in Singapore.

“The political party is PAP. People’s Action Party. Some people say it now means ‘Pay and Pay’.”

“Singapore is a fine and fine country. It’s fine, and if you cause trouble, you get a fine.”

A consolidation of multiple taxi drivers opinions: “All Singapore taxi drivers are from Singapore. That way if there is any trouble, they know exactly where I am. If they had taxi drivers not from Singapore and there was trouble, the person could just leave the country. So, taxis are very safe. Nobody wants to try to pull a trick on you.”

An older cabbie said, “Singapore is a good place for the young to work hard. When you get older, it’s harder, and real estate is getting more expensive. I own a house now, so I’m OK, but I’m worried about the younger people.”

Religious free expression seems to be very positive here. Within two blocks I found a Moslem Mosque, a Hindu temple and a Buddhist temple, all with various levels of openness to the public. And as previously mentioned, I visited the oldest synagogue in Southeast Asia.

You heard the famous stories of the clean streets and lack of graffiti? It’s true. On more than one occasion I actively searched for, and failed, to find any trash on the streets, curbs, or alleys. There were always litter bins close at hand. The only exception I found was inside the boundary of an active alleyway construction site. There I saw a salty snack bag and a soda bottle. I have two other short stories about litter:

While walking through Chinatown on my first day I noticed two young Chinese men in front of me, wearing crisp white shirts. One seemed to accidentally drop a paper napkin while in mid-stride. He looked back and said “Ah!” (as in “Ach, what have I done?”), slowed down, looked around for any eye witnesses, and resumed his normal speed, satisfied it wasn’t an issue.

I saw one person I could classify as homeless. He was standing at an entrance to one of the many immaculate MRT stations.  He looked down, picked up what seemed to be a lighter, failed to light it after several attempts, opened his palm and let the lighter fall out of his hand back onto the ground.

Those are my only litter stories.