No more static methods

Tired of those static methods that make your unit test skills look bad? You want to get rid of those hard to mock static methods? You refuse to use PowerMock? Here's a simple way of replacing static methods with non-static methods without breaking your entire code base (or worse someone else's code base).

Read More


0 Comments4 Minutes

SSH Bad Permissions in Windows

Yesterday i was fiddling with Docker en Jenkins. I was busy trying to assemble a cluster of 2 CentOS 7 servers running in docker containers. I wanted to figure out how to set up a Jenkins master and slave scenario. One of the things you need to do in order to configure it is, setting up SSH access with public and private key pairs.

When I was ready to SSH into the machine I stumbled upon an error. I couldn't connect from my Windows 10 host to my CentOS server/container. That's strange because I could connect to the CentOS server with that same key from a Linux box. My .pem file on my Windows box had "Bad Permissions".

Read More


0 Comments2 Minutes

Building for readability

Readability of code should not only be pursued in production code. It is also very important to make your (unit)tests as readable as possible.

One of my favourite patterns for enhancing readability is the builder pattern.

Read More


0 Comments6 Minutes

From conditional to maintainable code (part 3)

I've been refactoring the ATM Service class in my last 2 posts of this blog post series. I am still not there where I want to be. Two more things are in serious need of improvement for my solution to be maintainable. I am going to try to achieve this using the "Chain of responsibility" design pattern.

Read More


0 Comments12 Minutes

From conditional to maintainable code (part 2)

In my previous blog, in my search for maintainable code, I ended up with an initial piece of code which needs a bit of refactoring. The code meets the requirement but it still could use some bit of tweaking in terms of readability and maintainability.

Read More


0 Comments7 Minutes

From conditional to maintainable code (part 1)

Recently I was fiddling around doing some experimenting on some kata stuff. I was trying to implement a simple representation of an automated teller machine (ATM) in several different ways.

Read More


0 Comments7 Minutes

Dependency Inversion Principle… Say what???

Dependency Injection is one of the ways of implementing the Dependency Inversion Principle. This is my take on Dependency Injection

Read More


0 Comments13 Minutes

Unit Testing and Refactoring Legacy Code

In this video I will be unit testing and do some refactoring of some piece of legacy code (existing code without any unit test). The code is based upon the "Tire Pressure Kata" as described in "The Coding Dojo Handbook" by Emily Bache.

Read More


0 Comments3 Minutes

Set up an SVN Server on a Synology NAS

Subversion is an open source version control system often used for version control in an IT development environment. In this how to I am going to show you how to set up a SVN Server on a Synology NAS through the Synology Disk Station Manager (DSM 4.2) web page.

Read More


0 Comments2 Minutes