Home » Author Archives: Dustin Marx (page 13)

Author Archives: Dustin Marx

Guava’s Objects Class: Equals, HashCode, and ToString

java-logo

If you are fortunate enough to be using JDK 7, the newly available Objects class is the obvious (at least to me) choice for implementing the ‘common’ Java object methods such as equals(Object) [with Objects.equals(Object,Object)], hashCode() [with Objects.hashCode(Object) or Objects.hash(Object…)], and toString() [with Objects.toString(Object)] to appropriately override the default Object implementations. I have written posts about using Objects class: JDK ...

Read More »

Scripted Reports with Groovy

groovy-logo

Groovy has become my favorite scripting language and in this blog I look at some of Groovy’s features that make it particularly attractive for presenting text-based reports. The post will show how custom text-based reports of data stored in the database can be easily presented with Groovy. I will highlight several attractive features of Groovy along the way. I use ...

Read More »

Guava Preconditions Class

java-logo

Anyone who’s written much Java has probably written methods that begin with conditionals that verify either the provided parameters or the state of the object being acted upon before proceeding with the remainder of the method’s implementation. These can add verbosity to the method and sometimes, especially if there are multiple checks, can almost drown out the interesting business logic ...

Read More »

Guava Stopwatch

java-logo

Guava‘s Stopwatch is another Guava class new to Guava Release 10 (as is Optional, the subject of another recent post). As its name implies, this simple class provides a method to conveniently measure time elapsed between two code points. It has several advantages over use of System.currentTimeMillis() or System.nanoTime(). I don’t focus on these advantages here, but the Javadoc documentation ...

Read More »

Guava’s Strings Class

java-logo

In the post Checking for Null or Empty or White Space Only String in Java, I demonstrated common approaches in the Java ecosystem (standard Java, Guava, Apache Commons Lang, and Groovy) for checking whether a String is null, empty, or white space only similar to what C# supports with the String.IsNullOrWhiteSpace method. One of the approaches I showed was a ...

Read More »

Design Patterns: Mogwai or Gremlins?

software-development-2-logo

The 1994 book Design Patterns: Elements of Reusable Object-Oriented Software introduced many software developers to the concept of ‘a catalog of simple and succinct solutions to commonly occurring design problems’ that nearly every object-oriented software developer knows of today as ‘design patterns.’ Like most technical concepts (whether real or hype or somewhere in between), ‘design patterns’ seemed to go through ...

Read More »

Java: The Checker Framework

java-logo

One of the interesting tools I learned about at JavaOne 2012 is The Checker Framework. One of the Checker Framework’s web pages states that the Checker Framework ‘enhances Java’s type system to make it more powerful and useful,’ allowing software developers ‘to detect and prevent errors in their Java programs.’ One way to look at the Checker Framework is as ...

Read More »

JavaOne 2012: Observations and Impressions

javaone-logo

I am starting this particular blog post as I sit the the San Francisco International Airport waiting to board an airplane to head home after another satisfying but tiring JavaOne (2012) experience. It is difficult to write another blog post after having frantically written ~30 blog posts on the conference since the keynotes on last Sunday, but I want to ...

Read More »

JavaOne 2012: JavaFX Graphics Tips and Tricks

javafx-logo

I returned to the Hilton (Imperial Ballroom B) to see Richard Bair‘s (Oracle Java Client Architect) ‘JavaFX Graphics Tips and Tricks.’ Bair is associated with FX Experience and obviously knows JavaFX. Bair said a theme of his talk is on performance. He cautioned that as with most things performance related, avoid performance pre-optimization. He had a big yellow caution screen ...

Read More »

JavaOne 2012: NetBeans.Next – The Roadmap Ahead

javaone-logo

I walked the few steps necessary from Continental Ballroom 4 and one NetBeans topic (Project Easel) to Continental Ballroom 5 to see another NetBeans-oriented presentation: ‘NetBeans.Next – The Roadmap Ahead.’ Ashwin Rao started the Birds of a Feather (BoF) presentation and introduced John Ceccarelli and Tinuola Awopetu. Several audience members attended yesterday’s NetBeans Community Day. Rao showed the typical Oracle ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.