Java 7 (“Project Coin”) has been out since July of last year. The additions with this release are useful, for example Try with resources – having closable resources handled automatically from try blocks, Strings in switch statements, multicatch for Exceptions and the ‘‘ operator for working with generics. The addition that everyone was anticipating the [...]
Event Programming with Google Guava EventBus
It’s a given in any software application there are objects that need to share information in order to get work done. In Java applications, one way of achieving information sharing is to have event listeners, whose sole purpose is to take some action when a desired event occurs. For the most part this process works [...]
Guava Functions & Java 8 Lambdas
I recently read Brian Goetz’s The State of the Lambda and after reading that article I wanted to try using Java 8 lambda expressions. In his article, Brian goes on to describe interfaces that have one method as “functional” interfaces. Functional interfaces are almost always used as anonymous classes, with the ActionListener being the canonical [...]
Google Guava Cache
This Post is a continuation of my series on Google Guava, this time covering Guava Cache. Guava Cache offers more flexibility and power than either a HashMap or ConcurrentHashMap, but is not as heavy as using EHCache or Memcached (or robust for that matter, as Guava Cache operates solely in memory). The Cache interface has [...]
Simple WordPress Backups
Backing up your data is an important task. As we all know, it’s not a matter of if you are going to experience a crash or failure, but when. Blogs are no exception. I wanted to take a break from my regular style of posts to share my simple backup script. While I’m know there [...]
Google Guava – Futures
This post is a continuation of my series on Google Guava, this time covering Futures. The Futures class is a collection of static utility methods for working with the Future/ListenableFuture interface. A Future is a handle to an asynchronous task, either a Runnable or Callable, that was submitted to an ExecutorService. The Future interface provides [...]
Google Guava Concurrency – ListenableFuture
In my last post I covered using the Monitor class from the com.google.common.util.concurrent package in the Guava Library. In this post I am going to continue my coverage of Guava concurrency utilities and discuss the ListenableFuture interface. A ListenableFuture extends the Future interface from the java.util.concurrent package, by adding a method that accepts a completion [...]
Google Guava – Synchronization with Monitor
The Google Guava project is a collection of libraries that every Java developer should become familiar with. The Guava libraries cover I/O, collections, string manipulation, and concurrency just to name a few. In this post I am going to cover the Monitor class. Monitor is a synchronization construct that can be used anywhere you would [...]
Android Drag and Drop (Part 3)
This is the final post in a 3 part series on implementing Drag and Drop in an Android application. The first post covered hiding an ImageView when starting a drag. The second post covered handling drops outside an intended drop zone. This final installment covers moving a game piece as a result of a valid [...]
Android Drag and Drop (Part 2)
This is the second post in a 3 part series on implementing Android Drag and Drop. In my last post I covered how to hide an ImageView and just show the DragShadowBuilder object at the start of a drag. This post is going to cover my efforts on restricting the drag area. Trying to Restrict [...]



