Friday, January 29, 2010

You Have Selected Regicide

If you know the name of the king or queen being murdered, press one.

I heard this story on NPR about a group of French royalists who want to restore the monarchy. They recently held their annual gathering at the Basilica of St. Denis to mark the anniversary of the beheading of King Louis XVI and the end of the French monarchy. I mention this not because I'm a some sort of a crypto-royalist or because I have Bourbon blood coursing through my veins (or perhaps, just bourbon) but because I visited the Basilica while in Paris a couple years ago and I thought it was really interesting. As the story points out, more than 50 French monarchs are interred at St. Denis, including P├ępin le Bref (Charlemagne's Dad), Clovis I, and, of course, Louis XVI. It's definitely worth a visit if you're looking for something to do in Paris that's slightly off the beaten path but still touristy.

June 11, 2008 | 3:52 pm | Saint-Denis, France

Wednesday, January 27, 2010

A Tablet By Any Other Name...

Apple released its long-awaited tablet device today. The iPad, as it is unfortunately named, will probably satisfy some market niche that I can't quite comprehend at the moment, but that's not why I'm mentioning it. I first became acquainted with the concept behind this device at a Providence Geeks dinner in the spring of last year when a guy whom I had never seen before and haven't seen since pitched me his idea for an iPad-based multimedia book reader application. His idea and his pitch didn't inspire much confidence, especially since at the time, I had no idea such a device was even rumored to be in development. A cursory internet search later that evening revealed that his idea at least had some basis in reality. Still, I can't get over the fact that he was calling this device the iPad back then, and that he was right. I thought that Apple surely would have found a better name for this thing than any of the silly names that were being tossed around on the Apple gossip blogs.

Tuesday, January 26, 2010

Michael & Michael

We went out to Providence College on Friday night, which has become, at least in my mind, Providence's premier comedy venue, to catch Michael Ian Black and Michael Showalter. As you might expect, the show was a good mix of observational humor, meta-humor, and borderline anti-humor. They even went multimedia and played several clips of a recent interview they did with Fox 2 in Detroit. One of the clips is available online here. As they explained during the performance, they had been up all night prior to this interview and decided to have some fun with it. They also showed clips of them "helping" during the cooking demonstration segment and during the weather report, but I can't find them online.

Wednesday, January 20, 2010

The Pope Must Die(t)

Mehmet Ali Agca, the guy who shot Pope John Paul II 29 years ago, was just released from prison. This article talks about how he's entertaining book, television, and movie deals and how he would like to meet the current Pope. Because everything in life reminds me of the Simpsons, his request for an audience with the current Pope makes me think of the scene from the Brother from the Same Planet episode where Homer goes to the Bigger Brothers office to sign up for their program.

Administrator: And what are your reasons for wanting to meet the Pope?
Mehmet's brain: Don't say so I can shoot him! Don't say so I can shoot him!
Mehmet's mouth: Uh, so I can shoot him?
Mehmet's brain: That's it, I'm gettin' outta here. [footsteps, and a door slam]

Monday, January 18, 2010

Charity Case

Donations have been pouring in from around in the world in response to the devastating earthquake that hit Haiti last week. Major disasters like this really expose the paradox of charitable giving. The main reason people give money in situations like this is out of a belief that their money will help the people affected by the disaster. As it turns out, this isn't always the case. Not all organizations have the expertise, personnel, or capacity to handle every kind of disaster. Some organizations don't try all that hard to use the money they receive to help victims of the disaster and some are outright frauds. Even legitimate organizations that have established operations on location may not be able to use all of the funds that they receive for disaster relief.

Some people look at all of these issues and conclude that charitable giving is a waste of time, another example of naive do-gooders paying no attention to the laws of unintended consequences. I have something of a love-hate relationship with charitable giving, but I think that these attitudes are counter productive. I think that do-gooders have a bad reputation. Sure, they sometimes cause more problems than they solve, but at least their hearts are in the right place. We should save most of our scorn for the people who are actively trying to make things worse.

This article has some good tips on making better charitable donations in the event of a major disaster. To sum it up in a single sentence, the best charitable gifts are the ones that are the least exciting to give. Giving may be an act of charity, but the giver also receives satisfaction of helping someone in need. It's more satisfying to think that your gift is being used to help save someone's life at this very moment in Haiti, but it doesn't help anyone if the charity that you gave to already has more money than they can spend in Haiti and can't redirect your funds to another area of the world because you earmarked it for the Haitian earthquake. So go ahead and donate money, but make sure you're giving it to reputable groups who can really use it and don't worry so much about the disaster of the day; there are plenty of people around the world in need of help, many in places you're probably never heard of. A good charity will make sure that your money goes to a place where it can make a difference, as long as you give them the opportunity to do so.

Thursday, January 14, 2010

(An Actual) Great Moment in Blog Commenting History

I read this article about a guy who gave up driving and riding in automobiles for a year. It's an interesting story, but perhaps even more amazing than his year-long car avoidance is the comments section. As of right now, there are 31 comments, and almost every one of is well-written and civil, including the commenters who disagree with the suject's lifestyle.

h/t: Felix Salmon

Tuesday, January 12, 2010

Boxing Day

Any guesses as to what this program prints when you run it? l = 0? l = 100? Something else?

public class Foo {
static long e(long v) { return 0L; }

static <T> T e(T v) { return null; }

static void f(long l) {
System.out.println("l = " + l);

public static void main(String[] args) {
Long l = 100L;

As it turns out, this program fails with a NullPointerException. There are two version of the e() method, one that takes a primitive long and one that takes a generic Object reference. Since l is a Long instead of a primitive long, the compiler is able to resolve the overload without needing to do unbox l, so it resolves it to the e() method that takes a generic Object reference. The result of this method is then auto-unboxed when it is passed into f(), and since the Object reference version of e() returns null, it fails with a NullPointerException. The solution is pretty easy, just call l.longValue() to convert the value into a primitive long, or better yet, declare l as a primitive long instead of a Long in the first place.

While this example of auto-unboxing and overloading confusion may look contrived and frivolous I've run into this error a couple of times in real life using the EasyMock#eq() methods to set up mock object test case expectations.

Autoboxing and unboxing is a fairly controversial language feature in some circles. I think the benefits outweigh the drawbacks, but, as I've illustrated above, there are definitely some drawbacks. I like the Scala approach better, but there's no way to completely get rid of primitive types at the language level in Java, so autoboxing and unboxing is as good (or as bad, depending on your opinion) as it's going to get.

Thursday, January 07, 2010

This DJ

The AV Club recently ran a nice feature entitled Early experiences in pop-culture dorkiness, where the writers sounded off about their earliest known experiences of turning a critical and/or obsessive eye towards the pop-culture landscape. Many of these stories rang true for me, especially the ones about taping songs off of the radio and pretending to be a disc jockey. At the height of my personal imaginary media empire, I ran a radio station with its own call letters, sponsors (with commercials), and multiple on-air personalities (keep in mind that I almost always worked alone). My station was called NRP Shock Radio, a name that I stole from a Doonesbury comic strip. I believe the strip in question featured Mark taking a page out of the so-called shock jocks playbook and rebranding his program as "NPR Shock Radio". At the time, I had no idea what NPR or shock radio were, but I thought the name sounded cool. The NRP isn't a typo, I assume that I misread the comic.

Needless to say, when I first encountered ads for Quickshot's DJ Machine in the back of my comic books and Boy's Life, I knew I needed to have it. In case you've forgotten about the DJ Machine, or, more likely, you never knew what it was in the first place - here's a link you can check out (the only reference to it I could find online). I received this wonderful machine as a Christmas present in either 1988 or 89 and got plenty of use of it. I used the sound effects to create a jingle for NRP Shock Radio (lasers blasting in the background while I stuttered the 's' in shock). Like all good things, NRP Shock Radio eventually came to an end as I left it behind for other equally dorky pursuits. I'm pretty sure my parent's gave my DJ Machine away several years ago.

I finally got the chance to be a "real" DJ when I went to college. As luck would have it, my college radio shows probably had about as many listeners as NRP Shock Radio. My dorm had its own radio station, but it didn't broadcast. Instead, it sent its signal throughout the dorm over coaxial cable. This meant that anyone who wished to tune in from their room needed to forgo the free cable TV coming into their room and plug their stereo antenna into the cable hookup instead. Needless to say, it wasn't a popular choice. Fortunately, major record labels still thought we were a real radio station and sent us all kinds of promotional materials. Our studio was full of CDs and there was a closet full of old LPs across the hall. It was a really great resource. I was just starting to get into jazz and I probably listened to just about every one of the numerous old jazz records in the library.

I don't know if the radio station still exists, though I did come across a (broken) link to the web site that I built for the station (WLAY 90.1 FM - West Lafayette's Get Lucky Radio Station) on this online radio station directory.

Sunday, January 03, 2010

Nasty, Brutish, and Short

I recently finished reading George Saunders' The Brief and Frightening Reign of Phil. I actually read it twice, once over the span of a couple of weeks and again on a flight (it's only about 130 pages long, some of which are illustrations).

It's hard to not read the story as an allegorical critique of American foreign policy. The first time I read the story, that's about all I got out of it and I found it rather obvious and dull. The second time I read the story, I was able to put politics aside and get into the story on a more personal level. More of Saunders' trademark wit and absurdity came through when I spent more time focusing on the characters (a bizarre assortment of humanoid robots) than trying to match each one to an historical figure (the book's jacket does it no favors by proclaiming it "an Animal Farm for our times").

I was disappointed by the ending at first, but after reading it again, I found it incredibly poignant. In Persuasion Nation, a collection of short stories, is the only other work of Saunders that I've read. What impressed me most about that book was how he was able to make such witty, insightful, and devastating observations about humanity in a handful of paragraphs. The Brief and Frightening Reign of Phil, while short, is not a short story, but the ending really demonstrates Saunders' ability to cover a lot of ground in a few pages though his efficient but memorable use of prose.