Month: October 2014
-
There is No Such Thing as Maturity…
There is no such thing as maturity. There is instead an ever-evolving process of maturing. Because when there is a maturity, there is a conclusion and a cessation. That’s the end. That’s when the coffin is closed. – Bruce Lee Read More…
-
Guava: Reducing Cyclomatic Complexity with Objects.firstNonNull(…)
PROBLEM Ever written code like this? While it works, it has several minor problems:- SOLUTION Guava provides a much cleaner solution to address these problems:- Read More…
-
Guava: FluentIterable vs Collections2
PROBLEM Guava’s Collections2 is great when dealing with collections, but it quickly becomes rather clumsy and messy when we try to combine multiple actions together. For example, say we have userIds, which is a collection of user IDs. For each user ID, we want to retrieve the Employee object and add it into an immutable… Read More…
-
Combining and Minifying JavaScript Files with Google Closure Compiler
GOAL The goal is to combine and minify several JS files into one JS file in the right order. PROBLEM Let’s assume we have the following directory structure with three JS files. Directory Structure appdev.js appdev.blackcow.js appdev.whitesheep.js SOLUTION To pull this off, we will leverage Google Closure Compiler. There are multiple ways to use this… Read More…