Interface mania: Considering when to add an interface for class.

Something introduced fairly early in programming courses is the concept of an interface. In practice interfaces help to define the boundaries between components of a system, define the behavior of underlying implementors of the interface, and make it easier to switch implementations of said behavior down the road. Today’s post offers a few thoughts on where interfaces should and should not be used. ...

September 26, 2014 · MichaelHughes

Java ArrayList resize costs

Today we will look at whether it’s worth developer time to pre-size ArrayList objects in Java application code. We will take a similar approach to the one taken in a prior post on how long it takes to handle an exception in Java. ...

September 11, 2014 · MichaelHughes

How long it takes to throw an exception in Java

Today post is exceptional, we’ll take a brief look at the time cost of throwing and re-throwing exceptions and put that time cost in context. To be specific, we’ll look at the timing information for a set of exceptions which might be found in a typical 3-tier business application. In our example the exceptions are thrown and caught in hierarchical order in order to promote separation between the tiers of the application. ...

September 1, 2014 · MichaelHughes

jOOQ Framework - A Java SQL DSL

After reviewing higher level JPA 2.0 ab­strac­tions like Ec­pliseLink and TopLink for tieing a service ap­pli­ca­tion to a database I chose to use jOOQ because of its flex­i­bil­i­ty and ability to provide tight control over the SQL being executed in the ap­pli­ca­tion’s data layer. ...

April 4, 2014 · MichaelHughes