Embracing the Messiness in Search of Epic Solutions

Category: Programming Language

  • Jackson 2.x: JSON Serialization Difference for Map.Entry between 2.4.x vs 2.5.x

    It appears Jackson 2.4.5 and 2.5.1 behave a little differently when handling Map.Entry. Let’s assume we have the following bean:- We have a simple Spring MVC rest controller that creates this bean and returns the JSON data back to the client:- Jackson 2.4.5 generates the following JSON:- Jackson 2.5.1 generates the following JSON:- Read More…

  • Spring MVC: Handling Joda Data Types as JSON

    PROBLEM Let’s assume we have the following bean that contains Joda’s LocalDate and LocalDateTime objects:- This simple Spring MVC rest controller creates this bean and returns the JSON data back to the client:- By default, the generated JSON looks like this:- How do we nicely format these values and still retain the correct data types Read More…

  • Karma: Managing Plugin Versions in package.json

    PROBLEM Let’s assume our package.json looks like this:- What we want to do is to update all the plugin versions defined in this file. SOLUTION After trying out several solutions, it appears that using npm-check-updates is a better and cleaner solution for discovering newer versions of these plugins. First, we need to install npm-check-updates globally. Read More…

  • Why I Am Switching to Karma

    OVERVIEW JavaScript testing is hard. Most of the time, it is just plain difficult to set up the test harness just to run Javascript tests. CURRENT STATE Most of my team’s existing production web applications do not use any MV* frameworks. A few newer projects use Backbone/Marionette. We rely on the following stack:- We choose Read More…

  • Jenkins: Getting Karma Generated Test Results to Appear in Maven Project Job

    PROBLEM Jenkins, for some reason, does not pick up Karma generated JUnit test reports even though they are created in the right directory… and apparently, it is a known problem. While Freestyle project job allows us to manually publish these JUnit reports, my intention is to rely on Maven project job to do the same Read More…

  • IntelliJ : Karma Integration

    Overview Although we can run karma start karma.conf.js on the command line to start Karma test runner, JetBrains provides a great Karma-IntelliJ integration to run and display the JavaScript test results within IntelliJ. Prerequisites Install Karma Plugin in IntelliJ The first step is to install the Karma plugin created by JetBrains. Create Karma “Run” Configuration Read More…