The second law of thermodynamics states that whenever you do something constructive, there is a less-organized waste product. This is mine.

Atom RSS

27 Jun 2012 [link to here]

A few months ago, I came up with an idea for a new music player app for phones, laptops, desktops, etc. I've been too busy with other things to get very far with it, which has been frustrating, because it's something I'm excited about. Today it's more frustrating, because Google scooped me a bit with their Nexus Q music appliance. I what I've been planning is better (simpler to use and you don't have to buy a new amp), but my ideas seem a bit less revolutionary with theirs all over the news. Yesterday would have been a good day for me to blog about it, but today will have to do.

I call it fogjammer, and the basic idea is this: the app shares your music and ratings with other instances of itself on the local network. So when your friend has shuffle-play going at home and you drop by, your music is immediately and automatically included. Also, the part that's choosing which songs to play now looks at both your preferences and plays music that you both might like and avoids anything either of you doesn't like.

As with Google's product, we'd want there to be a way for people to manually adjust the playlist, but I think in many cases that would be Plan B, and Plan A would be "just turn the music on", knowing it won't play anything by that band you hate, at least until you leave.

There's certainly an option for hooking this up to a variety of cloud-based services (acquiring new music, sync'ing music and ratings, publishing your listening habits, clever shuffle algorithms that need large databases), but I would not want to get into the legal quagmire or bandwidth expense of pushing music through the cloud myself.

All I have at this point is a placeholder at GitHub and a pile of notes, some Android music apps I can build on, and a couple uPnP libraries to mess with. Perhaps Google will roll in these features and beat me to it, though hopefully I can get enough traction to attract some a few collaborators and get this off the ground properly.

9 Feb 2012 [link to here]
rights management

It occurred to me this morning that it would possible to build a camera that would refuse to take certain pictures. Using image recognition, stored patterns and images, central databases, and location and orientation sensors, we might find ourselves no longer be able to photograph famous landmarks, works of art, celebrities, or any scene whose composition was deemed too similar to a registered image.

Maybe the objects of interest would get blurred out unless you paid a licensing fee, which you could do on the spot using your camera (which is probably also a phone, browser, etc).

Augmented reality systems will quickly become a delivery platform for advertisements. Will over-zealous copyright enforcement be far behind?

28 May 2010 [link to here]

I wrote a heatmap tool a few months ago and finally released it today.

4 Apr 2010 [link to here]
under the hood

The locked-down nature of the iPad has gotten more people talking about the value of being able to modify one's environment. A few people have made a comparison to cars. Joel Johnson wrote in Gizmodo:

I agree with so much of what we all seem to think about culture, about copyright, and freedoms to tinker. But I don't want to use shitty computers with shitty operating systems, just like I don't want to drive cars that come with their own schematics. Instead I want to drive beautifully engineered machines that scream with precision fury. And if they break, I want to take them to a shop and have them fixed.

I've been using a similar car analogy to explain the difference between open and propriety software, and I agree with Joel right up until the end, where he gets it completely wrong.

When your propriety luxury software breaks, or you want to change it a bit, you can't bring it to your local garage and pay someone to work on it, you have to go to the manufacturer. They might release a free update, or maybe buying next year's model will solve your problem. Often you're just out of luck. You can pay someone to help you use your software, but if needs to be changed, no one can help you without the source code and the license to use it.

You may not have the skills or inclination to tinker with your car or your software, but if it's an open system, you can pay someone else to do it.

The reality of the proprietary vs free trade-off is more complex than that, but let's at least understand which car we can take to the shop.

9 Jun 2009 [link to here]
coffee coup

The conversation went approximately like this:

Barista: Careful, the glass is hot, and since we're out of insulating cardboard sleeves, I can only offer you this napkin, a poor substitute.

Me: Fear not, for I have amassed a hefty collection of coffee sleeves, and I have them right here in my bag! I will use one of mine, as I planned, and leave the rest with you.

Barista: My hero!


24 Feb 2009 [link to here]
loose ends

A funny thing happened at the DMV fourteen years ago. I'd recently paid off my car loan, and in a comedy of paperwork, the DMV swallowed up my only copy of the proof without recording it. California thought the bank owned my car, and I couldn't prove otherwise.

Considering how infrequently the bank asked to borrow the car for the weekend, this didn't seem like a big deal. It might be a problem when I tried to sell or otherwise dispose of the car, but in the meantime, getting it straightened out wasn't particularly urgent.

It sat quietly at the bottom of my to-do list for a dozen more years, in the company of other important chores like "learn French" and "prepare for earthquake", until a friend pointed out that the bank might not even exist anymore. Or maybe they'd had a fire. Or perhaps they discard old files once it's been so long that no reasonable person could possibly need them. If none of these things had happened yet, it might be a good idea to sort things out before it became impossible. All good points, I thought, resolving to deal with it soon. In fact, the bank did exist. I jotted down their phone number.

One morning just two years later, in a burst of industriousness and prepared for an arduous struggle, I called the bank. I quickly reached a real person and told her what I needed, without regaling her with the fascinating tale of how I came to be in such a pickle. Without any fuss at all, she told me what I needed and set off to mail it to me.

I thought this smooth service was a little unfair, given the length of my run-up. After putting it off for so long, it would have been polite to make it more difficult, to help me feel my delay was warranted. But no, I soon received a single notarized sheet of paper that essentially said "he paid us, we're good". I immediately made a photocopy.

With the bank out of the way, I no longer had any reason to rush things. The task had taken on symbolic significance on my to-do list, a shining example of procrastination I might enjoy vanquishing, but this only resulted in a vague desire to take care of it one of these days, once again without any sense of urgency.

I might have let it sit another fourteen years if the DMV hadn't asked me to drop by. They had a funny notion I might have aged visibly since my last photo, ten years prior. This was the motivation I'd been waiting for. If I dealt with it now, I might be able to avoid returning to the DMV until 2019, or until I upgrade my license to include flying cars, whichever comes first.

So I brought everything in, and without any fanfare at all, it was done. The clerk even made me a copy of the bank's document, just in case.

18 Feb 2009 [link to here]
the direct approach

I've been enjoying coffee's energizing effects, but today I learned that it's counterproductive to pour it directly onto the computer.

11 Jan 2009 [link to here]
Happy Pedantic New Year

No, today is not the new year by any reckoning I know. Most people call January 1 the start of the new year, but really it depends on the calendar you use. The vernal equinox always seemed like a more meaningful choice to me, but though the equinox is a global phenomenon, spring is not, so maybe an arbitrary day is as good as any.

The Chinese new year, celebrated by perhaps 1.3 billion people, is coming up on January 26, and it's the last in a run of major new year holidays. I often hear people call it "the lunar new year", which always bugs me because the Chinese calendar is just one of many popular lunar calendars, and because I'm a pedantic nitpicker. (And really, if we're going to nitpick, the Chinese calendar is not strictly lunar, because it tracks the tropical solar year.)

Around 1.5 billion people follow the Islamic calendar, the only truly lunar calendar I've ever heard of (probably because lunar calendars are not useful for any practical purpose), which celebrated its new year on December 28. September 29 marked the Jewish New Year, celebrated by a vocal minority of 15 million.

(Population estimates gleaned from the always-reliable internet.)

16 Dec 2008 [link to here]
advancing the art

A friend and I went to SF MOMA yesterday and spent most of our time looking at early scientific photography from the 1800s. Not exactly modern art, but all the more fascinating. I had no idea people back then had made such high quality photos of the moon, solar eclipses, Saturn, Jupiter, and also microscopic things like bacteria and plant cells.

In many cases, the pioneering photographers of the day were personally engineering better equipment: chemical treatments to increase the sensitivity of the photographic plates, lenses designed to focus the high frequency light the plates responded to, and shutter mechanisms that facilitated making multiple exposures on different regions of a single plate (since changing plates took a while).

Most of my photography is of circus acrobats, who tend to move fast on dimly lit stages, which means my photos are often too dark, motion-blurry, or grainy. A couple days ago, I had an idea for how to get more value from the meager light in my photos: apply a simple convolution filter to add to each pixel some of the light from neighboring pixels. This comes at a cost of image sharpness, but for some photos it's a huge win, especially when I'm just putting low resolution copies online.

I'm advancing my own art, which is nice, but I'm several decades behind the actual frontier for these kinds of tricks. Perhaps it's time to catch up a bit.

14 Dec 2008 [link to here]
moral compass bearing down

Today is cold and rainy, and after being rudely awakened before dawn by my alarm clock, I spent the day outdoors, teaching navigation skills to search and rescue trainees (today, rainees). As cold and rainy as it was, it wasn't as bad as I thought it would be, and I found it quite pleasant. Apparently, half the battle is having the right expectations. The other half is made of fleece and Gore-Tex, in large quantities. Also helpful: a thermos of coffee, still hot five hours in.

26 Nov 2008 [link to here]
echoes and explanations

I haven't posted here in months, and only ten times in the past year. I'm not trying to lull you into a false sense of complacency; your complacency is justified. Embrace it. I have, however, been posting lots of photos (here and on Flickr) and sharing links through Friendfeed (visible in a sidebar on my own site). I have been up to interesting things, but mostly not things I want to share with the whole world.

Yesterday, Rafe pointed out a NY Times article about the Netflix competition and called out this quote:

[W]hile the teams are producing ever-more-accurate recommendations, they cannot precisely explain how they're doing this. Chris Volinsky admits that his team's program has become a black box, its internal logic unknowable.

That's a little misleading. The programmers do know the details of how their programs work, but those details are a collection of statistical optimizations that don't neatly follow how people consciously make or explain their own decisions. That makes the overall effect unintuitive, even though the internal logic itself is known.

It reminded me of some work I heard about in grad school, presented by a guest lecturer in my machine learning class (whose name and affiliation I sadly don't recall). He'd worked on a system that made medical diagnoses. You enter the patient's symptoms and perhaps other personal data, it tries to guess what's wrong with them, based on data from previous cases.

They'd made two systems. One used k Nearest Neighbor (kNN), which works by finding the most similar prior cases (k of them, where k is some relatively small number you like) and guessing that the case in question is probably like those cases.

The other system used a simple neural network, and it was more accurate. The problem was that doctors didn't trust the results of any automated diagnosis and wanted the computer to make a coherent argument supporting its decision. The neural network could explain itself, but not in a useful way. ("I think the patient has pneumonia, because when you add up these fifty thousand numbers using these weights that I computed from your training data, then combine them in this way, you get the following matrix, which ...") The kNN system could present the similar cases it found, which was easy to understand, but its predictions weren't as good.

The dichotomy is mildly interesting, I guess, but the fun part is how they solved it with a hybrid system.

First, a little background. Their neural net was a fairly common topology: a feed-forward network with a single hidden layer with fewer internal nodes than inputs or outputs. The inputs might have been the patient's symptoms (coughing? feverish? blue?) and background (age, sex, personal or family history of various things), and the outputs could have been likelihoods of various diagnoses, the highest of which would be the system's best guess. For any given set of inputs, the activation pattern of the hidden layer can be thought of as a summary of the case. It's not a summary a doctor would want to read, but it's a projection of the data into a lower dimensional space that simplifies the data in a way useful for making predictions, similar to how people are using Singular Value Decomposition in the Netflix contest.

And now the clever trick. They used the neural net to make the diagnosis, and used kNN to justify its prediction, but instead of finding cases similar in the high dimensional space of the inputs, they ran kNN on the hidden layer activations of all the training cases. The system couldn't explain in a non-numerical way how those particular cases were similar to the one in question, but generally it didn't have to, because the doctors could see the similarities for themselves once the relevant cases were pointed out.

In one sense it's just dimensionality reduction, which is something you always do with kNN if you want decent results, but the neural net was probably still more accurate than kNN operating on its hidden layer, and I thought it was clever to use one algorithm for the prediction (the primary objective) and piggyback another on its internal state to argue for its validity (a related task that turned out to be required). It's a bit like handing your brain to a friend so he can explain something from your point of view.