Monthly Archives: August 2011

Finally Java gives us a switch on a String

I haven’t really paid much attention to the new features in Java 7. But at the Canberra Java User Group meeting last week a presentation was given on the new features of Java 7. It was actually quite interesting, especially the history bit … but the take home was the ability to use a String with the Switch statement. Definitely in the “About time” category. It has been one of those pet peeves that I just had to accept. (This was especially apparent when working on Java code after doing a few projects in Ruby.)

For example:

String color = "red"; 

switch (color) { 
case "red": 
	System.out.println("Color is Red"); 
	break; 
case "green": 
	System.out.println("Color is Green"); 
	break; 
default: 
	System.out.println("Color not found"); 
}

Code4Lib 2009

In 2009 I attended the Code4Lib Coneference hosted at Brown University.

I presented on RESTafarian-ism at the NLA. Click on the link see the slides and video.

“Two years ago the National Library of Australia decided to go the route of SOA, particularly REST web services. Since then we have developed a stack of them for varying projects. This talk will expose a few of those services (that provide MARCXML, MODS, METS, Identity information and Copyright Status), highlight some of the technology choices and give some idea of the success of this approach.”

It was really fun to hang out with fellow developers from the Library domain. The Code4Lib community is rather interesting too.