What to chunk

So in my previous post, I talked about the need for chunking large datasets. The problem I discussed is that it is very difficult to browse large datasets in small enough pieces, and find what you want.

I should mention that in this context, browsing is different from searching. Searching is looking for something very specific (i.e. ‘Desire by U2′) and browsing is when you don’t know exactly what you want, but can narrow it down through a series of small decisions. Browsing is also a more appropriate mechanism for devices, where you don’t want to try typing in a search term on a small keypad with your thumb.

So how do you, at a software level, provide the minimal set of choices to the user to allow them to find what they’re looking for most of the time? This is the core concept behind “chunking.”
Read the rest of this entry »

No Comments

Chunking large datasets

My wife and I have a collection of about 45G of MP3s. This was a long effort to rip all of our CDs over the course of a few months. All the files are stored on a linux box, but managed with iTunes. This is some 10,000 songs, by many different artists, in many genres.

Recently we purchased a Linksys Wireless Music System so that we could play music in our bedroom. The concept is pretty cool: its a WiFi radio – it uses UPnP to find music collections on your network, and then you can browse and stream them to the radio. It has a remote control and a little LCD display so you don’t even have to think about the fact that these are MP3s off on some Linux box. Good idea, huh? Not quite…
Read the rest of this entry »

No Comments

Using generators to hide loop initialization

How often have you wanted to do a number of things in a loop, but had to move items out of the loop for performance reasons? Here’s a cool use of generators that I just figured out to hide the initialization.
Read the rest of this entry »

No Comments

demangling ‘property’ values

I’m learning more about how properties work in Python. One thing I’m learning is that a property objects are only evaluated in the context of the parent object they’re attached to.
Read the rest of this entry »

No Comments

Looking at Tiger

Wow, I’ve just started reading Ars Technica’s first look at Tiger. Needless to say I’m impressed. It sounds like they’ve done quite a bit under the hood this time around, making for a really interesting platform. Between that and trying to make ugly apps pretty with wxWindows, I’m getting jealous of people writing mac-only apps.

A few of my favorite things in Tiger that I’ve read about:

  • Incrementally better support for 64-bit addressing. Not tremendously interesting in itself, but its helping Mac keep pace with ia64 without completely revamping the whole OS like you have to do when running linux-ia64.
  • launchd – very cool replacement for the umteen different ways unix-like OS’s use for launching processes not directly invoked by the user. It replaces inetd, cron, initd, and more. Good riddens.
  • Awesome filesystem support – ACLs, strong lightweight metadata, etc. I think WinFS is such a cool idea and I hope OSX and Linux can eventually follow suit.

And that’s just the beginning. I need to finish the article. Next stop, I might have to get myself a personal Mac.

No Comments

cool python tricks

Man I love Python. I came up with a neat trick yesterday that also couldn’t be done in any static language. Needless to say, I’m pretty pleased with myself. This trick isn’t slow or hard to understand, and actually makes a lot of my code very simple, and avoids a lot of boilerplate that I would have had to write in another language

I needed a way to given a basic color to a class, and then have easy access to various tints of that color for painting different aspects of an object. The tints are based on HSV, not RGB, but all the callers need to deal with RGB.

The solution: wrap the property() descriptor with my own descriptor.
Read the rest of this entry »

No Comments

How python can be fast

So now that I’ve been working with python for a good 3-4 months, I’m starting to understand why people like it so much.. a bit part of it is that its just so damn simple. Its so easy to write code that works very quickly. The syntax is very elegant and easy to read. I’ve come to actually prefer the indent-based code grouping over most other language’s braces.

But one thing that has been plaguing me is how a dynamiclanguage could actually be faster than a static language like C++ or Java. I have faith in the theory, but its just that: faith. Until today, I didn’t have any real world examples. I needed something that you simply can’t do in a static language without bending over backwards. Conversely, I needed something that required the dynamicism of a language.

I just picked up the Python Cookbook the other day and I’ve found a very concrete example about how a dynamic language can be fast.
Read the rest of this entry »

No Comments

Chandler

So where have I been? On January 10th of this year, I started working at the Open Source Applications Foundation. (http://www.osafoundation.org/) Its been quite an experience, and maybe I’ll actually start posting about THAT since I don’t seem to post about anything else here.

No Comments

Three Bears

This being my first signifigant workout of the year, I’m starting a trianing log on here. So without further ado, the year begins…

Rode the 3 bears alone today – 41 miles roundtrip from home in about 2:50, followed by a 13 minute run on the flats of my neighborhood.

The ride was tough – definitely a wakeup call for the season. Started out riding through berkeley and up spruce. The climb took longer than I expected, about 40 minutes from my house to what I think was the top. Heading out (clockwise) around San Pablo Res, I had a lot of headwind and it was very cold. Many bikers passed me going the other way, so maybe the wind swirls counter-clockwise in the winter? Need to try the other way next time. The three bears themselves weren’t bad – I think they were 3/4 of a mile to about 1.5 miles long each, but I was pretty wiped out by the end of them. Headwinds and hills were tough on the brain, but I didn’t stop and only slowed down when I lost concentration. I passed maybe 4 people on the loop, but by the time I started climbing Wildcat Canyon road, I was so wiped out that 7 people passed me – a few from a Diablo Cyclists group. Returning through berkeley, bumped into Amanda who told me she was trying to get chris to call me for a ride today.

Got home, was going to run around the park. During the transition I realized my three big toes on each foot were completely numb – not even any pins and needles. Headed out around the park but I didn’t feel my toes until 9 minutes in. Got similar leg cramps that I get in races – front interior quad, mostly on the left side. Ankles got just a little of that heavy, stiff pain I sometimes get when I don’t warm up enough. Felt somewhat fresher switching sports – I wasn’t too tight though my effective range of motion was not great.

Recovery with a Powerbar protein bar and gatorade – hip flexors and quads are tired. Tried to stretch a bit.

No Comments

Back in San Francisco

Now that I’ve been able to tell a few people in person, I thought it would finally be appropriate to post here that Heather and I have returned a bit early from our Honeymoon! We had a fantastic time but are glad to be back in the Bay Area. We’re currently looking for a house in the Berkeley/Oakland area, as that seems to be the only place that has anything affordable whatsoever.

I’m also looking for a job, finally. I’m returning to software engineering with the hopes of eventually integrating my interest in education.

No Comments