Defragging OS X

April 26, 2007

When installing Boot Camp on my MacBook Pro, I received an error that files couldn’t be moved to create the Windows partition. Rather than take the Boot Camp Assistant’s advice and format the drive, I decided to enter the world of OS X Disk Defragmenting tools. I settled on iDefrag. The reviews were positive, and the bundled CD Maker app makes it a clear winner: you can build a bootable iDefrag CD that will be able to defrag your Mac’s boot drive.

After a successful defrag pass, I was able to partition my drive just fine.


Why My Python MacPort Was Failing to Build

April 8, 2007

I ran into this issue hard last week when I tried to install the port for rdiff-backup using MacPorts. Rdiff-backup depends on python24, and when trying to build that port I was getting this error:

make: *** [Python/mactoolboxglue.o] Error 1

Ultimately, I was bitten by being space conscious when I installed XCode on this Mac: I hadn’t installed the Quicktime, CoreAudio, or OpenGL SDKs since I had no plans to use them. The python port, however, needs them.


A Very Quick and Dirty Java Rules Engine

April 8, 2007

I was recently tasked with refactoring a mass of business logic that selected the appropriate machinery from a large group for a particular job configuration. The code as written was a huge tree of if/else statements inside a loop over the machines. Each statement would look at a particular set of job characteristics, and check if the current machine could support the job. This code was quite hard to maintain, as any several hundred lines of branching code is prone to be. What I needed was a little rules engine to evaluate my set of rules for every machine… Read the rest of this entry »


More Hibernate and Setters…

March 11, 2007

Over at the MD blog Darren has illustrated more dangers with Hibernate setters.


Serializable? Override hashCode

February 15, 2007

This is one of the rules of thumb when implementing Serializable - you need to override hashCode and equals. I was reminded of that today, when some code wasn’t working in client-server mode, but did in a non-RMI mode.
Read the rest of this entry »