Posts

Official Pandora Desktop and Hotkey Support?

EDIT: There is a slight problem occasionally with this script not being able to send keys to the Pandora Desktop Air app. I've got an updated version of the script that you can use instead of this one. Pandora is a different sort of online music service that uses the work of the Music Genome Project to automatically selects music similar to an artist or particular song, and then streams it over the Internet for your listening pleasure. You can't select individual songs, but you can skip ones you don't like and make as many music channels as you like to suit your particular tastes. Pandora provides a free version of the product that is supported by visual advertising, and a very inexpensive ($36 USD per year as of the creation of this entry) subscription supported version of the product that provides higher quality streams and no advertising. Traditionally, Pandora has been a Flash-based application that required you to have your bulky browser open to listen on the deskto...

Custom Foil Hats

Image
My oldest son wants to announce the launch of online sales of his newest product, Foil Hats. These hats are certified to protect your thoughts from prying government spooks, and brainwave stealing aliens. These hats are custom made to your measurements (up to US hat size 8), for just $3.99 (US). Simply comment on this blog entry, and we can coordinate payment/shipment over more secure channels.

Rollback DB Changes in Unit Tests with Spring

Observation 1: Applications are written human beings, which tend to make mistakes. It's a good idea to have some tools in place to help catch those mistakes early by validating assumptions against reality. One such tool is unit testing. Observation 2: Almost every application out there needs access to some kind of persistent data storage. In a lot of application code, that storage mechanism is some kind of relational database. It is easy to understand, based on the situations described above, that unit testing tools should take into account handling initializing persistent storage systems properly for testing. Thankfully, JUnit has some extensions to make unit testing with a particular set of data in the relational DB easier. DBUnit provides a way to represent test relational data in an XML form that is human readable, and can be loaded into most any JDBC data source. DBUnit's strategy is to reset the database to a known good base state before each unit test runs. I...

Cell Lazurus

Image
I pulled all the pieces back together after 24 hours of drying time, and my patience was rewarded with a working cell phone. You might notice that the phone didn't make it out all together unscathed, as there are some strange bright spots on the screen now. They aren't really noticeable except with a solid color background, so I consider myself somewhat lucky. All the buttons are working, no data was lost, and the speakers and microphone work just fine. The camera is working, and I can even complete calls with the thing! Steve Jobs won't see any (more) of my money for at least a little while longer.

Cell Phone, Deconstructed

Image
Honestly, I was just trying to be helpful. I figured, "Hey! I know how I can help! Laundry needs to be done, so I'll start with the blue jeans..." Of course, my wife doesn't own a waterproof cell phone, and I don't remember to check pockets, so my efforts to "help" ended up with a freshly washed cell phone smelling faintly like a clean breeze and water under the plastic cover for the display. Knowing that electricity and water don't do very much good for the metal in the phone, I removed the battery immediately. The one thing I think I might have going for me is that we have one of those front-loading, water-saving clothes washers. They don't fully submerge clothes for very long, so I'm hoping that with a good drying out for a few days, the phone may be salvageable. Big ups to LG for making a very easy to disassemble phone . I'm crossing my fingers, even though my wife is probably hoping for the worst .

Workaround for Issue with @Any Mapping in Hibernate Tools Plugin

There is a slight problem with 3.2.3.GA release of Hibernate Tools when specifically dealing with the @Any (or the <any> element if you are using xml to configure hibernate) type of relationship. The problem manifests itself with an exception that contains the message "org.hibernate.MappingException: property mapping has wrong number of columns" when you try to open the session factory in Eclipse. I've found a work-around to this problem by updating some of the hibernate jars in the base plugin for Hibernate tools in eclipse. (In the instructions below, replace <eclipse-home> with the location that you've installed Eclipse. Also, the direction of the slashes may be different for you depending on what platform you are on.) First, stop Eclipse. Next grab the hibernate-3.2.6.ga.jar and put it at <eclipse-home>\plugins\org.hibernate.eclipse_3.2.3.GA\lib\hibernate\hibernate3.jar Grab hibernate-annotations-3.3.1.GA.jar and put at <eclipse-home...

Great Eclipse Keyboard Shortcuts

I remembered, at some point prior to Eclipse 3.3, I was able to simply hit F11(Debug) or Ctrl-F11(Run) to launch the last launch that you performed in Eclipse.  This was great for making small, incremental changes and then just smacking F11 to re-run the failing unit test you are trying to get working again. Eclipse 3.3 changed this behavior and I was just living without it until I found a series of blog entries (referenced at the end) that held the answer to my problem.  Eclipse 3.3 changed the default setting for those hot keys and clicking the respective buttons on the tool bar for launches.  To get the pre-3.3 functionality back, all I had to do was go to Window -> Preferences  on the menu, and then into the "type filter text" input box, type "Launching".  If you select the item under the Run/Debug  category, you'll see a dialog that will let you set up the launch function to your liking.  I personally prefer the Launch Operation  section to have the Laun...