Java

Installing Java on Ubuntu 12.x+


I’ve seen a couple of ways to do this on the internet but the easiest is through apt-get and ppa.

The catch with doing anything in Java on Ubuntu is always the same - Ubuntu doesn’t ship with Oracle’s Java installed. Instead, Ubuntu ships with Open JDK installed. Open JDK is an open source version of Java. Some may argue that you can develop with and probably run most things Java with Open JDK. That may be the case, but for me I find the Oracle Java to be more trustworthy for production environment so will be using the Oracle bits. This is simply a matter of opinion.

Apt-get needs to be configured to point to a ppa that will take care of the heavy lifting and then install like anything else via apt.

Are Static Methods an Anti-Pattern?


Is using the Static keyword on class members and methods an anti-pattern? I think so and hopefully this post will get you thinking about it. Primarily I see Static abused when programmers do not want to go through the work of instantiating a class. This is in circumstances in which instantiation is not strictly necessary. The problem with Static members is that they get in the way of approaches such as Inversion of Control and Test Driven development.

Publishing Java to Heroku Cloud Service

Heroku is a jvm-based cloud service. They have scaling appliations and many of the features you expect to see in the cloud. The big thing for me is that it is simple setup, simple to understand, simple billing and lastly - simple to deploy to. Since I am very big on minimalism - Heroku is a huge win in the jvm based cloud arena.

You actually publish to the Heroku Cloud using git with just a handful of commands once you get the initial setup out of the way. Since the modern jvm culture loves git, using git to publish is very natural for jvm development.