Embracing the Messiness in Search of Epic Solutions

Month: March 2014

  • IntelliJ: Auto-generating POJO Builder

    I have been searching for an elegant way to auto-generate a POJO fluent builder with minimal typing and configuration. A builder is a great way to promote object immutability, however it is also a pain to create and mantain yet another class that looks almost like the POJO class we create. There are a few… Read More…

  • Intellij v13.1 Bug: NoClassDefFoundError when Running Unit Test With JaCoCo Configured

    If you are using IntelliJ and your Maven project relies on JaCoCo Maven Plugin, please consider voting up issue IDEA-122895 to get it fixed by JetBrain as soon as possible. Even if you are not using IntelliJ or JaCoCo, but you find this shitty blog to be helpful, please consider voting up this issue to… Read More…

  • FindBug: Solving DM_DEFAULT_ENCODING Warning When Using FileWriter

    PROBLEM Let’s assume we have the following code to write some data into a file:- When running this code against a static code analysis tool, such as Findbugs, we get this high priority warning:- The Javadoc for FileWriter says:- Obviously, this class is too convenient and FindBugs is not happy about it. Further, there is… Read More…

  • Knowns and Unknowns

    There are known knowns. These are things we know that we know. There are known unknowns. That is to say, there are things that we know we don’t know. But there are also unknown unknowns. There are things we don’t know we don’t know. – Donald Rumsfeld Read More…

  • Maven: Excluding All Transitive Dependencies

    I have been using Maven 3.0.3 on my work machine since 2011 because that particular version was released in March that year. How time flies by… Maven 3.2.1 was released exactly a month ago. One feature that immediately jumps out is the ability to exclude a dependency’s transitive dependencies in a very simple manner, which… Read More…

  • Comparing Disassembled Java Class From JVM Languages

    All JVM languages come with some degrees of syntactic sugar to make the code easier to read and write. To satisfy my curiosity, I decided to run javap command to disassemble the bytecode inside the class file generated from several JVM languages. The chosen languages are Java, Groovy, Scala, JRuby and Rhino. I left out… Read More…