Directory size from the cmd line

Have you ever wanted to scan recursively through a directory to find out how much space each sub directory was taking up? Well, there is an easy way of doing this on *nix. Just run du “Disk Usage”.

~1 min read

Configuring a Java Development Environment on OS X Tiger

Since I just received my new MacBook Pro, I am tasked with setting up my development environment. Since most of my development is Java/Java EE based, the first thing I need to do is decide on the file system layout for all of the Java artifacts. I.e., JDK, IDE’s, Open Source Packages, App Servers, etc… I also need to decide on how I will control the Java runtime environment. I.e., Run App Server under Java 5, run a build under Java 1.4, run a Java Swing app under yet a different virtual machine. Here are my thoughts on each of these:

3 min read

Handy OS X Application for Blogging

After listening to the Maccast, I heard Adam mention this program called MarsEdit developed by Ranchero Software. He said that it was a great program that he uses quite often. So, of course, I had to give it a try. I downloaded the trial version, and within the first 10 minutes, I saw the value of it. Basically, it gives you an “inbox” view of your blog. Where each “message” corresponds to a blog entry. You “compose” entries as if they were an email, and then when you are done composing you “send” them to your blog. Maybe now I will follow my new years resolution of blogging more often.

~1 min read

Static Method Synchronization

What happens when you try to synchronize on a static method? When a static synchronized method is called, which object are we referring to? A static method does not have a notion of a this reference. It is not possible to obtain a lock on an object that does not exist.

~1 min read

Hashcodes in Java

What happens if two different object hash to the same hashcode and then are placed in a HashMap?

1 min read