Tuesday, August 18, 2009

ICFP programming contest 2009!

Not too long ago, Lindsey Kuper and I stepped into the ring once again to compete in the ICFP Programming Contest!

She's writing up the full story over on Geek Buffet.

The quick recap, however! The problem had to deal with orbital mechanics -- we were to control a simulated satellite as it orbits a simulated earth. First, you just had to transfer orbits, then meet other satellites, and it got increasingly complex from there.

Thankfully, the physics simulator for each kind of problem was included. All you had to do to use it was implement the contest-specific VM! (Easy, right?) Thankfully, the specification for the VM was super-clear, and we got it working surprisingly quickly.

By the end of the contest, we could handle the first two problem types, and that was competitive enough for 120th place worldwide, by the morning when they turned off the leaderboard. Good show, us!

For the full scoop, go read Lindsey's account.

Here's the code! We used Scheme and Python, and R for the visualizations.

Tuesday, August 11, 2009

change of scenery and reviewing conference submissions

So you may not have heard yet, but last month, I left Google Atlanta, packed up my cats and my computers, and headed to Indiana University. Lindsey Kuper helped quite a bit, both in motivation to do this and in the actual moving process. So I'm a PhD student now, very exciting! I'll be working on natural language processing and machine learning -- something I'd wanted to focus on for quite a while.

But in my last two weeks at the Goog, I had this really interesting opportunity, presented by my colleague Katharina Probst. She's a reviewer for the Conference on Information and Knowledge Management (is this the same as being on the program committee?), and asked if I wanted to help. It seemed like good practice for my upcoming stint as an academic.

So we (I, with her guidance and sanity-checking) had this pile of eight papers to get through. Some were fairly mundane, like learning classifiers to determine if a message is a flame, or summarizing a group of documents; one was particularly targeted at finding references to rabbinic literature in other rabbinic literature (they don't use ACM-style citations, typically). And so on. A few were written very clearly and had well-motivated discussions on why the problem is interesting and important, and others... not so much. This is why we have peer review.

But it was an interesting experience, and I'm glad I took it. My tech lead, Miguel, graciously let me use my "20%" time to Advance Science and just review papers for a day. I wanted to do a good job of reviewing, so I read the papers really closely, took a lot of notes, and wrote a few paragraphs in response for each one. Katharina at least seemed to think that it was good feedback, so that was reassuring. (although I would have liked more feedback on my feedback).

Once the other reviewer's ratings came in, I was fairly pleased to see that my ratings weren't far off from the other reviews. If I missed some amazing gem of wisdom, then at least it was apparently hard to find -- the papers I liked the best were accepted. I was more concerned, honestly, that I would mistake some stale old idea as a clever new one. But again, that's why we have many eyes on these things.

Alright! So now I just have to produce some stuff for other people to review. To the lab!

Saturday, August 08, 2009

goto: a utility for bash

Do you ever find yourself, while using bash, wanting to get to a particular file that you know is way down in a big tree of files -- maybe a big Java source tree, or some other nested file structure? You know you want Foo.java, but is it in src/com/foocorp/package/a/b/c, or maybe somewhere else?

Announcing goto, a bash utility which solves just that problem! Now you can just say:

you@computer:~/project$ goto Foo.java
you@computer:~/project/src/com/foocorp/whatever/path/to$ vim Foo.java

... instead of whatever business you were going to do with locate or find or your IDE, or just manually sifting for it.

Here's the README. Comments, complaints, and patches welcome! (and if you find this useful, I'd be really pleased if you'd let me know!)

Friday, August 07, 2009

More Ubuntu: getting the NetworkManager Applet back

Ubuntu comes with this really great network selection applet that sits on your gnome panel. It's called the NetworkManager applet, and it looks and acts more or less like the analogous dropdown menu on Mac OS X. Unfortunately, if you remove it from your panel, it's unintuitive how to get it back.

Maybe you accidentally removed it, and then, after some research, tried "nm-applet" from the command line, messed with the Network Monitor and the Network Connections preference page, and even tried editing nm-system-settings.conf.

What you really want to do is right click on your panel, click Add to Panel, and select Notification Area. Why the nice NetworkManager Applet and battery status applet both live in the Notification Area remains a mystery.

Like so: