I use PMD in my Gradle builds quite a bit. (Maybe a bit more nowadays that the FindBugs peeps seem to be struggling with that project — see this email from Andrey on this: https://mailman.cs.umd.edu/pipermail/findbugs-discuss/2016-November/004321.html). The issue I had with it is that there is no way to quickly turn off their checks for the src/test/… […]
PMD Rules
If you have used such plugins in your project as FindBugs, Checkstyle etc then you quite likely have heard of PMD too. (I have used these tools initially with Apache Maven and nowadays use them via Gradle in my builds, but there’s lots of support for others tools, Ant included.) The trouble with PMD as […]
node.js Annoyance: url-download
I been using node.js for a while now, and I do like it. I think I am still to make up my mind as to I consider this a solid production environment or it’s just a great tool for scripting and getting prototype off the ground — but even so, I definitely see its place in […]
Small Request for Lodash Library: Concatenating JavaScript Array In-place
I started using Lodash a few months ago — it does make some of the mundane JavaScript tasks rather easier to perform, such as processing and traversing arrays and collections, filtering and so on. There is however one thing that I would like them to add, and it is to do with arrays concatenation. (And […]
Of Fibonacci’s Number and Groovy’s Memoization
As a developer, chances are every time you hear recursion mentioned you probably also hear of Fibonacci’s number. And in the same breath you probably hear also of stack overflow 🙂 Because — as you get to learn quickly — if you decide to implement Fibonacci’s number via a recursive function, you end up abusing […]
Gradle Multi-module Projects — Centralized Configuration
This is a sweet gradle trick for those of you working on multi-module projects, if you are looking to centralize some of the configuration in the parent gradle build, and avoid repeating configuration / build code across sub-modules. Let’s say you have the following gradle project structure (see image below) where project A is the […]
Collection Sorting — Java vs Groovy
With the introduction of lambdas in Java (not so) recently, some argue that Groovy lost some of its thunder, as closures are now first class citizens in the JDK. However, as I’m about to show, while lambda’s pushed the Java language a great deal forward, Groovy still makes a lot of things incredibly easy (and […]
Netflix Party — 18/Oct/2016
The party:
A Bit of Lovin’ for the Groovy Object Initialization
I’m going to spread some lovin’ today for the widely-used yet less appreciated feature in Groovy which allows creating a Java bean and setting its properties in one line. Especially when dealing with unit tests this saves me a great deal of time and frustration. If you ever worked with “pure” (??) Java beans, then […]
Parallel : Groovy and Java Streams
This is something that every now and then I have to do: check whether either one or all elements of a collection meet a certain criteria. The standard code initially in Java involved a for loop and iterating through the collection explicitly and checking the condition at each step. Then Apache Commons came on with their […]