No more static methods
28 November 2018
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).
0 Comments4 Minutes
SSH Bad Permissions in Windows
19 July 2018
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".
0 Comments2 Minutes
Building for readability
Java,Refactoring,Design Patterns,How to,
24 February 2018
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.
0 Comments6 Minutes
From conditional to maintainable code (part 3)
Java,Refactoring,SOLIDDesign Patterns,
12 February 2018
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.
0 Comments12 Minutes
From conditional to maintainable code (part 2)
Java,Refactoring,SOLID,Design Patterns
10 February 2018
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.
0 Comments7 Minutes
From conditional to maintainable code (part 1)
Java,Refactoring,SOLID,Design Patterns,
6 February 2018
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.
0 Comments7 Minutes
Dependency Inversion Principle… Say what???
6 January 2018
Dependency Injection is one of the ways of implementing the Dependency Inversion Principle. This is my take on Dependency Injection
0 Comments13 Minutes
Unit Testing and Refactoring Legacy Code
3 January 2018
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.
0 Comments3 Minutes
Set up an SVN Server on a Synology NAS
23 December 2017
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.
0 Comments2 Minutes