Mite Mitreski currently works as senior software engineer for Tricode doing development and integration of tailored software solutions in various domains. His main focus are Java EE based applications, Open Source software and modern tools that get the job done like HTML 5 and JavaScript. Currently he is also the community leader at Java User Group Macedonia ( where he organizes talks and events about Java and JVM related technologies. Mite is also enthusiastic about robotics, home automation, Linux, parallel programing, computer science and science fiction movies and books where he spends most of his free time. Mite has posted 11 posts at DZone. You can read more from them at their website. View Full User Profile

Google Guava for Cleaner Code

  • submit to reddit
Some time ago I did a short talk on Google Guava for our local JUG. It was a basic intro into Guava and how it makes stuff simpler, better and cleaner.

It is true that there is an overlap with Apache commons but Guava is build with expectation that there is a Function and a Predicate class as well as various builders which makes it really cool and simple for many use cases.
The talked covered most of the* classes  and basic use of functions in collection and Google collections  and few other features that are part of Guava and I find them very useful.
Source code of the examples can be found on github and here is the actual presentation:

Note one last recommendation that is not just mine but  also part of Guava's wiki :
Excessive use of Guava's functional programming idioms can lead to verbose, confusing, unreadable, and inefficient code. These are by far the most easily (and most commonly) abused parts of Guava, and when you go to preposterous lengths to make your code "a one-liner," the Guava team weeps.

Related links 
Published at DZone with permission of its author, Mite Mitreski. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)