Thursday, September 27, 2007

Java 'finally'

I have learned about a feature of Java that interests me. Actually, according to this web page, it's one of the shameful things about Java:

In a try/finally block, the finally code really is called in all situations. That's good, because we want to be able to do some in all cases clean-up code a lot of the times. But what happens if you 'intercept' normal control flow? For instance, the code inside the try block wants to return, but we don't let it? Turns out, this code will not return.

void foo() {
  while(true) {
    try {
    } finally {
} } }

While this seems a little bit wild, it's actually really helpful for my current project. You see we're translating some new programming constructs into straight-up Java. The problem is, a user could call return in his code when, according to the semantics of our new features, the method shouldn't return. In summary, I was glad that this was the case, because it lets met avoid some gnarly rewriting of the input code.

Tuesday, September 25, 2007


I like today's Questionable Content. It's the sort of joke that I like to make, and no one likes to laugh at.

Monday, September 24, 2007

Sunday, September 23, 2007


Anyone know what girls like for their birthday?

Thursday, September 20, 2007


I just heard big news from my sister: she and her boyfriend just got engaged!

I am so happy for her! Congratulations!

Oh yeah, forgot to mention the best part: they met while evacuating from Katrina. How funny is that?

Friday Night Lights

I've been hearing about it for long enough, but finally the younger brother (whom I have never met) of my college room mate convinced me, via his blog that, I should be watching Friday Night Lights. I ordered season one on DVD from Amazon. It was only $20, so I'll let you know how it goes.

Tuesday, September 18, 2007


I just finished stringing up my acoustic guitar, something I haven't done in about a year.

I've been picking around a little bit too, trying to get my callouses back into shape.

Just in case you haven't heard, Pittsburgh is about to get Sick Ridiculous.

Java 5 Concurrency

Now that I have a little extra time, graciously granted to me because of my completion of two paper submissions (ICSE and WICSA), I thought I'd point out some cool things.

The Java standard library has at least two concurrency features that I was unaware of, and am now intrigued by.
The first feature (new in Java5) is atomic objects. Java's atomic objects make the development of non-blocking algorithms and data structures actually possible, by providing atomic compare and set operations for primitive and object types. The neat thing about their implementation is that they automagically use the fastest underlying implementation available on your hardware, which is neat, since sometimes really fast compare and swap primitives actually exist.

The other feature is Futures, which allow delayed, concurrent computations. Futures have been a feature of functional programming languages for a while (and honestly, are probably a more appropriate abstraction in their world), but are still neat nonetheless. They allow you to compute some value off in the background, in a parallel thread. When you need the result of that computation, the library blocks until it has finished. So in practice, you get a little bit of extra concurrency without much intellectual overhead.

The point is, if you're programming concurrent code in Java, there's a lot of stuff already available, and it's worth your time getting familiar with the library in order to avoid reimplementing anything.

Monday, September 17, 2007

Papers & Passers

Well it's been a crazy last two weeks, but finally I submitted my paper on Friday night, and I'm back to the world of the living. I am relatively happy with my submission, but were are a few last-minute SNAFUs, probably worth mentioning only at another time when they aren't so fresh in my mind.

After that, this weekend went pretty well. Things were really crowded in Shadyside due to the annual Walnut Street Art festival. I didn't buy anything, but I sure had a tough time parking my car, so in that way I guess I can say that I did get the "experience."

Saturday night B. & I had some drinks at Kelly's, then went to E's b-day party, before joining up with the remnents of the CS first year pub crawl that was going on. It was great seeing everyone, and at last call they gave us all the Boot with a capital B.

Sunday I went to the Steelers/Bills game at Heinz field. It was great. We had endzone seats, which theoretically sucks but practically is awesome. It's so great being able to see right down the field. You can see who's open and whether or not there are holes for the running backs to bust through. It's just a totally new perspective on the game. They are trying to give us a little bit more of this with the follow cam (that little camera that is suspended on two wires above the field and in my opinion is a feat of modern engineering), but they never really use it much, and therefore it does us little good.

Of course I got a snarly sunburn. I was so tired from the whole thing (and staying up until 4:30 the night before) that I crashed at 7pm and didn't wake up until this morning.

Thursday, September 13, 2007

Paper Part Two

I am still working on this paper, but I can see the light at the end of the tunnel! The deadline is 11:59pm Apia time on Friday night. Fortunately for me (or is it unfortunately?) Apia is really far away, and therefore my paper is not due until 7am the next morning! The paper itself is actually in pretty decent shape. I just sent off a second draft to my advisor who is on vacaction.

However, I am still working on running the experiments, so there are no numbers in the paper itself. I need numbers. But I'll take care of that right now and until it's done, hopefully. Wish me luck.

BTW, if you're interested, here's another GIF animation of my work! A quick word of warning, however. The file is pretty big since I haven't figured out how to make ImageMajik optimize GIFs, so you may want to download it to your computer before viewing.

Monday, September 10, 2007

Working on a Paper: The Bleh Edition

I just spent three hours trying to fix a bug that dissapeared as in as strange a manner as it appeared. I did a 'make clean' on the whole simulator, and all of a sudden I Linux wouldn't let me create all of the threads I needed. It punked out with some "Resource not available" error. And yet as far as I know, I am creating less than the available max and always have been. Moreover, I don't think I've changed any of the code that would affect thread creation recently. Finally, I hit make enough times that whatever black magic I created was undone.

I don't know how I am going to get things done for Friday at this pace.

I hate C++.

Saturday, September 8, 2007

Welcome Home BBQ

Originally uploaded by DixiePistols.
Now this was at least two weeks ago, if not more, but check out some pictures from the welcome home BBQ that we had at my apartment! It was pretty fun, although I was feeling a little ill from my first hockey practice in many months, and therefore didn't feel up for much. There are a bunch of neat headshots in this bunch. If you think they look really nice, it's probably because I didn't take any of them...

Urban Hike, Washington PA!

Originally uploaded by DixiePistols.
I was waiting to post this entry until I got my pictures from the hike onto my computer. I lost my USB cable, but replaced it with something better; a compact flash adapter card (PCMCIA styles) for my laptop.

Anyway, last Sunday was my first Urban Hike since I've been back in Pittsburgh. Washington, PA is in Washington county, the center of the whiskey rebellion for you history buffs. It was a fantastic hike, and the weather was amazing. It was such a quaint little town, and it made the 30 minute drive from Pittsburgh totally worth it. We finished the whole thing off with a Washington Wild Things baseball game. This is an independent minor league baseball team (outside of the whole A through AAA system), but they had a great park and nice fans.

Anyway, I started a Flickr photo pool, so if you guys went along and took pictures, you ought to go ahead and add yours to the mix!

Tuesday, September 4, 2007


Today I made some pretty good progress on this paper deadline I am supposed to be working for. Not writing, mind you, but implementation at least.


Keep in mind those are supposed to be robots. This is actually a fully distributed algorithm, so the implementation is non-trivial. Um, also I am going to Cleavland tomorrow night.

Monday, September 3, 2007

Mouth Full of Cowboy

Hey guys,
It just so turns out that my friend Pretus, the rock star, is going to be rolling into Cleavland this Wednesday night with his new band Cowboy Mouth. Okay, it's not so much his band, but he is the new guitarist, and I'm going to go check them out as a way of showing my support. Anyone who wants to do this baby road trip is more than welcome, and I can get you on the list.

Sunday, September 2, 2007

Fantastic Fantasy

So for the first time in my life I am playing in a fantasy football league. It's a pro league, and it seems to be a relatively easy-going one, but I know how this things can turn into smack talking festivals. My roommates got me into it because they and their friends have been playing in for a few years. Last night we had a draft, which was mercifully short. I remember my friends spending hours and hours on theirs in high school... Anyway, here's my roster, so you can tell me how I made all garbage picks. I am already a little worried about what seems to me to be the biggest downside of fantasy football; having to cheer for players you hate. Why am I worried? Well I already have one former LSU player, one former UCLA player, and one current Falcon. Will see if I become jaded... Here are the picks, in order of position:

  1. Donovan McNabb
  2. Brett Favre
  3. Jake Plummer
  4. Lee Evans
  5. Joey Galloway
  6. Kevin Curtis
  7. Derrick Mason
  8. Joseph Addai
  9. Maurice Jones-Drew
  10. Duece McAllister
  11. Alge Crumpler
  12. Owen Daniels
  13. Chicago's Defense
  14. Oakland's Defense
  15. Some kickers...