Comments on tumblr

As a blog platform, tumblr can be too minimalist sometimes. I really wish commenting was a feature built into it. There are ways to help yourself: Adding disqus to your tumblr is what I did, and there are a few manual steps, but it’s nothing terribly difficult.

Funny enough, more people comment on the re-blogged articles that show up as facebook notes than on tumblr itself. I guess that worksforme, too. Just need more friends 🙂

Code Kata: Unrolled Linked List (in C)

The other day I needed a linked list for the umpteenth time, and instead of going with the old (data, next) pairs, I decided I wanted something a bit more efficient, like an unrolled linked list. This also provided a good opportunity to use the CuTest unit testing framework and do some test-first development.

The result is pretty nice, testing actually found a small bug, despite the fact that I was sure can do linked lists in my sleep, and I was so pleased with the performance characteristics (better cache efficiency and far fewer allocations) that I replaced all the lists in Eressea with it.

Code sample:

quicklist *q, *ql = 0;
int i;
// insert element at index:
ql_insert(ql, 0, foo);
ql_insert(ql, 0, bar);
assert(ql_get(ql, 1)==foo);
assert(ql_length(ql)==2);
// push element at end, get indexed element:
ql_push(ql, baz);
assert(ql_get(ql, 2)==baz);
// iterate over list:
for (q=ql,i=0;q;ql_advance(&ql, &i, 1)) {
  printf("%p ", ql_get(q, i));
}

Code is on github. Use as you please.

Geocaching in Napa Valley

Last weekend three of us went caching in Napa valley, blissfully ignoring the fact that as good tourists we should have been drinking wine instead of scrambling up the hills and getting stuck in brambles. It was a fantastic trip: We found a dozen caches, an abandoned mental hospital, rope swings, and many many fences.

We were getting off the trails a lot. It was worth it.  There were lots of wild animals  Uphill all the way  Cleverly hidden in a decoy bird.  Justin at the abandoned water tank  Abandoned mental hospital at Lake Camille  End of day one. A very fortuitous opening in the fence around the park  We found some rope swings! 

Next time, we’ll need to bring a tripod, mosquito spray and lock picks.

I need how many chargers?

Things haven’t improved much at all since Douglas Adams wrote his rant about little dongly things. USB was supposed to solve this, but somehow I still have a lot of chargers in the house. Each of the following charges one or more of the battery-powered mobile devices in my household and has a different plug from all the others:

  • Nokia, US plug
  • Nokia, Europlug
  • Nintendo DS
  • Motorola Xoom
  • proprietary USB plug for iPod
  • Dell laptop
  • Acer netbook
  • Electrical shaver
  • Lumix camera
  • AA battery charger for my GPS

Notice how nothing I own charges from a standard USB plug, and AA batteries have almost entirely disappeared. It’s a pretty sad state of affairs. To be truly mobile, I regularly load my luggage with at least half a dozen wires, plus AC converters.

In my utopian future, I don’t want a flying car or a jetpack. I want more standards.

Is the XOOM Tablet any good?

I got one of these babies at GDC. People ask me how I like it whenever they see it, and I finally have an opinion. It’s a nice device, overall, but I would not have paid the money for it. There’s a place for it in my life, albeit a small one.

The first thing people say when they pick it up is “this is heavy”, and it is true that it’s heavier than the iPad, but I kinda like it. It feels substantial. I have the 4G version without 4G, so I’m only using it on Wireless LAN, which hasn’t been a problem, since I don’t carry it with me at all times. It’s not that kind of device.

Best usage scenarios so far:

  • As a surface for looking at geocaching maps with others and planning a trip.
  • As a TV companion to read up on Doctor Who lore.
  • As bedside internet, keeping me from getting up in the morning.
  • As a mobile phone, thanks to the Skype app.

    Pros:

    • Android 3.0 is pretty cool. I like the UI of the OS quite a lot.
    • The multi-tasking is really working.
    • You get used to the idea that apps don’t need to be closed after a while.
    • It’s made my Google Reader unread items count go down a lot.
    • I like to keep it next to the bed, because it starts so much faster than a PC coming out of hibernation.
    • Google Chat and Google Mail apps are fantastic.
    • The HDMI output is great for presentations.
    • Battery life is about 2 days with my usage pattern.
    • Camera quality is light-years ahead of the iPod camera.

    Cons:

    • There is no good IRC app.
    • It does not charge over USB. I now have yet another charger.
    • Some apps don’t know how to cope with the screen size (Caltrain!)
    • The web browser frequently stops loading things, reboot is the only fix I’ve found.
    • No netflix app.
    • The Skype app doesn’t have video.