Posts Categorized: Tech

Scripting

Java, Map and Optional

Posted by & filed under , .

I do like the Optional class in Java — it is a long awaited elegant replacement for returning null whenever something isn’t there then relying on if( x != null ) checks or using ?: in the format (x == null) ? “foo” : “bar”. It works great also with the new Java stream classes […]

Thoughts on Programming and Its Challenges

Posted by & filed under , , .

At the end of another tough week in Netflix I look back at what I have achieved and what has been challenging in achieving it. I do wonder what I do looks like from the outside and I can’t really see how someone would make sense of my job. I sit in front of 3 (sometimes more!) […]

Gotcha When Building Gradle Plugins on Top of docker-java-plugin

Posted by & filed under , .

If you use gradle and docker you must have come across the gradle-docker-plugin. And if you started using it a lot you probably found out that more often than not your builds start using the same boilerplate code to prepare your microservices containers. And if you end up in that situation best thing to avoid boilerplate rubbish […]

Disable PMD Plugin to Run for Test Sources

Posted by & filed under , .

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

Posted by & filed under , .

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

Posted by & filed under , .

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 […]

Of Fibonacci’s Number and Groovy’s Memoization

Posted by & filed under , .

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

Posted by & filed under , .

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 […]