Jiffle.net

Skip to content



Java

Open Source Java Directory

Submitted by david on Thu, 31/05/2007 - 19:17.

I suspect I might be the last one to find this, and I haven’t yet checked enough of the entries to know how up-to-date they are, but this is a pretty lengthy listing of Java OSS software.

DeveloperWorks article on Java Compilation Techniques

Submitted by david on Thu, 17/05/2007 - 09:09.

When Java was initially introduced, performance - more specifically Java’s limited performance - was rightly one of the main criticisms of the platform.

However it surprises me when I talk to developers nowadays who still confidently assert that Java is slower than equivalent languages because it is not compiled directly to an executable. That assertion shows little or no understanding of the decisions that compilers have to make, and the performance losses that can happen when the compilers ‘guess’ wrongly how the program is going to behave in real use.

This article examines the strengths and weaknesses of Ahead-Of-Time (traditional executable compilation) and the Just-In-Time approach used by many JVMs.

Working with Hibernate generated files, Eclipse and Subversion

Submitted by david on Wed, 13/12/2006 - 13:13.

I have been working with autogenerated Hibernate 3.0 mapping files and objects recently, and this note describes (maybe not the best way, but) at least one way to use them in a project with Eclipse and Subversion.

This note contains two tips on how to manage Hibernate files in this environment in a way that allows periodic regeneration while reducing the work that has to be done each time that happens.

  • Tip 1 — How to separate project source from generated files
  • Tip 2 — How to regenerate files without breaking Subversion!

Formatting Dates in different TimeZones on a Java Server

Submitted by david on Fri, 08/12/2006 - 01:39.

At first I thought it would be a trivial piece of code to write… parse a date/time string, put it into a Timestamp and store it in the Database, ensuring that the resulting value used the UTC Time zone (GMT if you like). After all, I knew all about the Date & Calendar classes (or thought I did), and so could see no reason why it should take more than a few minutes to implement.

Wrong! Every approach I tried, from the obvious through a whole set of permutations of timezone initialisations, kept coming up with the wrong answers.

This article describes how to do that, and also how to convert strings in user specific timezones to & from that standard time.

Bye-Bye Boxing

Submitted by david on Sat, 02/09/2006 - 18:16.

After just 4 months of programming with Java 5 (and enjoying the new language features immensely) I have made Autoboxing a compilation error in my development environment.

The reason - I found that it was wasting more development time than it was saving. There was some debate when is was announced that Autoboxing would be added to Java, mostly about the scope that it introduced for hidden inefficiencies in code, however what was mostly ignored was that it seriously weakens null/non-null code contracts.

JMeter - Module Controller Gotcha

Submitted by david on Sun, 11/12/2005 - 09:03.

JMeter is a really useful load testing tool. It is not a record/replay one, but it does allow the creation of functional tests very quickly, and the tests can also be easily modified to test subtly different behaviours. It can be downloaded from JMeter Home Page.

Ignoring the user interface (which, is my opinion, is one of the best adverts for not using Swing to build a UI), there is one particular gotcha that I’d like to highlight. The setup for this gotcha goes like this:

1 Since version 1.9 it has been possible to create a Module Controller. This contains no functionality itself, but acts as a symbolic link to another test controller that is held in a ‘library’ area in the test. This allows you to rapidly reconfigure your test plan between a number of options.

Handling Exceptions Decision Diagram

Submitted by david on Thu, 27/10/2005 - 08:00.

The process of handling a checked exception and deciding what to do with it is different as it involves the options of recovering from the exception, propagating it, or escalating it by rethrowing it as an unchecked exception.

Handling Checked Exceptions Decision Diagram

Exception Throwing Decision Diagram

Submitted by david on Thu, 27/10/2005 - 07:55.

This diagram shows the decision making process to follow when throwing an exception.

Throwing Exceptions Decision Diagram

CheckStyle Configuration Settings

Submitted by david on Tue, 13/09/2005 - 15:35.

This is the settings file that holds the coding conventions for CheckStyle 3.4

Eclipse Code Format Settings

Submitted by david on Tue, 13/09/2005 - 15:14.

This is the settings file for code formatting in Eclipse 3.0



© David Hamilton 2007
Powered by Drupal Logo