So I got my Karma replaced. They were actually stunningly efficient; I
called, got an RMA number, sent it to them and had a new one, all in
under a week.

Now, naturally, I want to put some songs on it. Previously I'd used
the Java app it comes with to do this from OS X, and that worked
fine, except that it's slow. On an 11mbps wireless link, it
takes about a minute per ~5MB song. It should take at most
6 or 7 seconds; 802.11b (with good signal strength) is faster than
1MB per second (which is still faster than USB 1.1, which is my
other alternative).

The funny thing is, I used the Java app on a friend's Windows machine
at Christmas, and it was nice and snappy, so I guess Mac OS X's Java
VM has super crappy networking or something. So I figure hey, this is
Java, right? I'll just run it in Linux; maybe the VM there has better
networking. You can actually get a Java VM for Linux/PPC from IBM..
except that when you try to run the Karma transfer program it dumps
core. Great. Write once, run anywhere my ass.

So then I see libkarma. Looks
promising.. except that it's horribly written, segfaults all over
the place and does fun stuff like returning pointers to buffers on
the stack. So then I just cut my losses and write a simple app using
WvStreams to copy
files to the Karma, and guess what? It doesn't take a minute per song!

I don't know why people haven't done more with the Karma. It's
got networking for crying out loud! And the protocol is
documented! You can definitely do some cool stuff with that, so it's
surprising nobody has, especially since people have written gnome-vfs
backends and KIOSlaves for the Rio 500. Anyway, my plan is to write
a fuse filesystem for it so I can just mount the sucker.

Moral of the story: don't buy a Karma unless you really like
tinkering.

Work

Was super busy for a while, but a bit less so now. It looks like I'm going
to have to write a bunch of Java code soon-ish, which will be, uh,
interesting, since I've not written any Java code in years.

In an effort to re-familiarise myself with Java today, I've been looking
at the new generics implementation in Java 5 (apparently that's the
correct thing to call it; will Sun ever stop having rediculously stupid
version numbers?)

It turns out that to support backwards compatibility, they've used
erasure to implement generics in Java. So you can do this:

And then if you pass it just a Vector, or a
Vector<Integer>, you'll get an error (which is what
you want).

But then you can also do this:

public String joinStrings(Vector listOfStrings, String delim);

And pass in Vector<Integer> if you like. I can see
that if you want old class files and old code to work on the new VM
and with the new compiler, you need this kind of thing, but it makes
generics considerably less useful.

Another nice tidbit is that you can never do new T();
inside a generic class, because the type information is gone, so
the compiler doesn't know if the type replacing T provides a
no-parameter constructor. So what you see is that
in the actual JDK, the code written by engineers at Sun, they're
doing nasty things like T[] foo = (T[])new Object[size];

The other way around this is to pass in a Class object of the
appropriate type:

Yeesh. It seems like there are a lot of these kinds of things in Java;
things you want that are there, but only in a half-baked, semi-useful
way.

Notice that I dissed Java without even touching on the GC or VM.
Those are old, old debates and everybody has opinions on them, so
whatever.. apparently that stuff is better these days, but I have
no idea.

Like most, I was pretty excited to see Novell getting into this space in an open
source fashion. I finally got some time today and played around with it
a bit. Previously, I couldn't even get it to compile on non-2.6 systems
and then I could get it to compile but it would segfault immediately.
Now the latest stuff in svn finally seems to be working.

So, first off, it's pretty, but it's not really usefully pretty.
IMO there's far too much graphics. This is a web app, and the web is slow.
Most people use dialup. No, really, they do. Even now.

I also don't really like the fact that creating a calendar event is
like writing an email, with a "to", "cc", etc. Sure, maybe you want
to invite people if it's a meeting, but not always (eg. doctor's
appointment). I don't know what to put there. My email? My name? My
username?

Also the "new event" page feels like filling out a form. I don't like
forms, and I especially don't like web forms. Give me a better way to
do this, by clicking on a time in the day view or something. Oh, yeah,
why does the day view have no times? Most calendar apps show you the hours of the day in day view, not just a summary of your events. That's
a much more useful visual representation, IMO.

Now I don't mean to be overly critical. I realise this project just
got started and of course I really hope it turns into something great;
a solid web mail/calendar/contacts app is sorely missing from the open
source stack, but some of the initial design decisions are a bit worrying,
in that it seems at risk of becoming "yet another Horde."

I just found out that my coworker and friend Deniz Sarikaya has passed
away. It came as a complete surprise to me that someone so full of
vigour and so lively could be removed from our lives like this. I have
great memories of the summer at Niti
with her, and I don't think anyone would disagree that she brought a
warmth and liveliness to the office that will be sorely missed.

Several people today, after seeing my T-shirt, asked me about
Nitix. Where do I sign to get my
free advertising bonus?

Sci Fi

So, Enterprise is officially cancelled, barring any fan-supported
rescue. I watch it, and I'm ashamed of it, because it's so bad,
so I'm not really sad to see it go. But it is a shame there won't
be any new Star Trek.

On another note, iMac brought all
the Firefly DVDs with him, and we've been watching those. It's a pretty
good show, so my desire for decent sci-fi is being satisfied for the
moment.

And for when I'm finished those.. I bought the entire Star Trek TNG
series on DVD. All 7 seasons, 48 DVDs. Oh baby. Only cost me $130
incl. shipping on eBay. It's gonna be
good. I was thinking it'd be fun to index the subtitles so I can search
for episodes. With 48 DVDs, you want to know exactly which one contains
the episode you're looking for...

So mag, being the monkey
man that he is, bought a projector. It's only 800x600, but
it's nice and bright and is pretty damn decent for playing
Smash Brothers or Star Fox 64, not to mention watching
movies. Last night we watched Kill Bill, and the other day pphaneuf expressed
his undying love for me on it.

Weekend

We're going to the Computer
History Museum today. Should be interesting. drheld has also
convinced me to see Sideways tonight, which is
supposed to be good. Then there's talk of cheesecake. Mmm, cheesecake.
The thing is there's this cheesecake place around here that also serves
normal meals, but their meals are so big that if you go for a meal you
won't be able to have cheesecake. So it looks like dinner today will
be a very healthy piece of cheesecake. Meh, whatever, I eat enough
healthy food at Google during the
week.

It broke again. So I'm going to send it in and get it replaced, and
hopefully the new one won't exhibit the same problem. But apparently
it's pretty common with these things, so if you're looking for a
portable player that plays Oggs,
I can't recommend it.

So, after a fair bit of tweaking, I have the Debian on my laptop setup decently,
with Ion as my
window manager. Ion just makes more sense on a laptop, where your mouse
probably sucks and your resources are probably more limited (and they
certainly are on my laptop :) Although to get certain settings, I have
to run gnome-settings-daemon from my .xinitrc, which doesn't
seem to be mucking too much stuff up yet, but apparently it horribly
screwed some stuff up for mag
and drheld,
so I guess we'll see. They had some weird Xresources problem
I think.

Life

I haven't blogged too much about the goings on down here. Mostly
because my laptop was semi-functional and I was too lazy to actually
nab pictures off my camera. But we've been having a lot of fun. Last
weekend we walked around Stanford.

This weekend we went with our landlord, a very strange but well-meaning
guy, for a drive around the coast and a bit of a hike. It was nice,
and it was good to get out of Palo Alto for a bit. And I hadn't seen
the Pacific in over a year, so that was fun.

I can make Gaim almost usable if I minimise my buddy list and chat
window, put them on all desktops (in GNOME), use audio notifications
(notification icon would be much nicer though) and turn off window
raise. Window raise pisses me the hell off, because I'll be typing
in Vim or something, and a freaking
window will pop up and steal focus. So I'll end up telling
my friend something like "foo.bar();" Not to mention it completely
disrupted my train of thought, etc.

So fine, I set everything up that way. What's the problem? As soon
as a new buddy (i.e. one for which there is no tab in my message window)
messages me or I double-click a new buddy to add a tab to my message
window, the window becomes "un-sticky" again. Meaning I have to
re-stick it, or I'll lose it among all my desktops.

If they just made it so the message window didn't steal focus when
it popped up, I could stand to use the pop-up mode. But my ideal way
to use it would be to have a notification icon, no sounds, no popups,
and no stupidly becoming "un-sticky". Ah well, maybe someday...

So I recently installed Debian
on my laptop, because Ubuntu
just wasn't doing it for me (long story). I found a deb source with a
PPC mplayer and installed it. Great. So I fire it up and try to watch
something, but it's insanely slow and the audio is out of sync and
it isn't full screen (well it is, but it's not scaled, so there's a
tiny video in the middle of the screen).

After reading the man page for a while, it turns out that the
magic incantation to make things not suck is mplayer -cache
8192 -vo xv -zoom <filename>. Oh, of course. That's so
obvious. If that's what makes it not suck, why the fork isn't that
the default!? Sigh. I mean it's not hard to detect that I have XV
and use it, and it's obviously not hard to detect that I need cache
because if I don't use it, it prints a message telling me to.
Clue for the clueless: if you're going to print a message telling
the user to turn on an option, just turn the bloody thing on already!

Totem did work out of the box, of course, but turned out to be not
quite fast enough to play things smoothly. It usually is my preferred
video player though, for precisely the above reason.

That was this week's cynical software rant. Be sure to join us next
time :)

My cube-mate apparently wore hers home the day we got them. Mine's still
at the office :)

Flex Hours

So I guess flex hours were partially rescinded at Niti, based on PlaNit. Wow. Times change, eh? I was
definitely one of the "baddies" when I was there, typically showing up
between noon and 1. But I often worked until 2am, and I liked it that
way, and it made me happy to sleep until 11:30.

I'm so insanely stupid that it took me a billion years to get anything
done at Niti.

In fact, neither of these is true (well, there's evidence that I'm
insanely stupid, but it didn't take me a billion years to do stuff at Niti). It's just that I found that during
the day at Niti, I wasn't all that
productive. I talked to people, helped people with their problems, they
helped with mine, I made espresso, played foosball, etc. At night, when
nobody was around, I could just blast through the bugs (and espresso)
like nobody's business. I guess the same effect could have been acheived
by showing up insanely early, but I just can't think very well before 11
or so. I tried going to bed early and getting up early in Waterloo for a
while, and it just didn't work for me...

At Google there are flex hours too,
although almost everybody is in by 11 so you feel a bit odd showing up
much later. The funny thing is people were still there tonight when I left
at 12:30. Typical silicon valley hardcore-ness I guess. I've taken to
showering there (which makes sense, since I cycle in) thus avoiding the
4 to 1 person to shower bottleneck at our home in the morning, giving me
a few more minutes of sweet, sweet unconsciousness :)

Proprietary software

So the last few days I've been dealing with a binary-only shared library
provided by a certain software vendor. All I have is the header, a PDF
doc, and a .so. But this particular software vendor is particularly
evil, in that their header file blatantly lies. It lies by
telling you some functions want a foo * instead of a foo
**, and your stuff is segfaulting all over the place until you
objdump the .so to look at the asm and realise it's
dereferencing twice. (I became very intimately familiar with
objdump during my training; it's a
life saver).

And then there's the PDF API docs, which also blatantly lie, by telling
you stuff like "If you pass in a foo ** here, we'll point it to
something valid with some stuff in it." No you won't, you liars, you'll
just leave it as NULL. I mean the least you can do if you're going to
release a binary-only .so is have some decent docs and accurate headers.

Fortunately, I've managed to work around most of this crud and should be
ready for my first code review tomorrow. My first checkin will involve
no less than 5 languages. Fun stuff.

I gotta say, it's pretty damn sweet. The thing that bothers me the most
is probably how confidentiality-happy they are. drheld mentioned
that in a previous post, and I feel similarly. People ask me what I'm
working on, what I'm doing, etc. and I have to be careful not to be
too specific, which I'm totally not used to.

But I'm definitely enjoying the work I'm doing. This week I've been
doing a lot of hacking in Ruby, which I didn't really expect at all.
But so far I've been enjoying it; I like how you can define mutator
members to essentially override '=', and its syntax is terse while
still being relatively clean.

One of the things that's been hard to get used to is the scale of it
all. Google is bigger than any other company I've worked for, by orders
of magnitude. And it's apparent everywhere; many things are more
bureaucratic, and there's a kind of "lushness" to it all, from the food
to the on-site gym to the massages and car washes, it all just seems
a bit surreal at the moment.

Life

I've borrowed a pretty sweet road bike for while I'm here, and I've used
it to cycle to work a few times. I even have the clip-in shoes (alright
I'll admit it; I did fall once the first time I used them :) I've never
had a road bike and it's pretty cool. You sure can go pretty damn fast; I
was doing 60 the other day for a while. The downside, of course, is that
you really can only use the thing on roads. Gravel of any kind is a
serious no-no, so I can't go explore any bike trails near here unless I
borrow somebody else's bike.

Got a bank account the other day, without a social security number! Take
that, homeland security! That brings the number of countries in which I
have accounts to 5.. I should really close some of the ones I don't use
sometime. It has a whopping $20 USD in it right now, but at least I can
in theory get paid. I'm thinking Monday will be "get social security
number day" (or rather, "apply for SSN day"), a process that is
apparently not much fun.

Rio Karma

So, I had the damn thing for about a week, and then the other day the
disk went and died on me. So now I have to go and try to get it fixed or
replaced, and I'm obviously wondering whether it was a good decision in
the first place.. sigh. I didn't want to go iPod because of the whole
Ogg thing, but at least iPods work. I guess I'll get it fixed and see
how it goes, but I don't think I can really recommend it any more...

Update: So I Googled around a bit tonight
about the problem I was having with my Karma. Apparently some people had
managed to make previously-busted Karmas work again by smacking them
against blunt objects. I figured I didn't really have anything to lose,
so I tried it, and it worked. My Karma now starts up again and appears
to be working normally. The only thing is.. maybe I should have left it
broken so I could have gotten it replaced. Now I feel like I have to
break it again to be able to send it in.

But if smacking it against stuff fixes it.. how the block do I break it??