Home » Author Archives: Ted Vinke

Author Archives: Ted Vinke

Ted Vinke
Ted is a Java software engineer with a passion for Web development and JVM languages and works for First8, a Java Web development company in the Netherlands.

The Librarian: Introduction to Test-Driven Development

software-development-2-logo

This will be a series of articles revolving around unit testing where I will work through examples and exploring various aspects of the craft. This is the first installment. The code associated with this article can be found on GitHub. Future and past installments can be found in The Librarian Archive. I will try to implement a few requirements for ...

Read More »

2 Rookie Java Constants and Enums Pitfalls

java-logo

In various code reviews I perform on Java and Groovy code I often see magic numbers and other random Strings littered all over the code base. A magic number, for example, is the 4.2 in below (Groovy) code snippet: if (swashbuckle >= 4.2) { ... } What does 4.2 mean? My advise is to extract such a number to a ...

Read More »

3 Steps For Analyzing a Gradle Project With SonarQube Using Docker

gradle-logo

How hard can it be to get up and running with a Gradle project and getting it analyzed with SonarQube locally? The ingredients are: SonarQube (formerly Sonar) is an open source platform for continuous inspection of code quality. Gradle is an open source build automation system. Docker allows you to package an application with all of its dependencies into a ...

Read More »

Eclipse Mars: Grails 3.1 with Gradle, Groovy and GSP Support

eclipse-logo

What if you want to develop Grails 3 projects with Eclipse Mars (4.5) as easy as you did with Groovy/Grails Tool Suite or previous Eclipse versions? Written and tested with Eclipse Mars.1 Release (4.5.1, build 20150924-1200) and Grails 3.1.0 M1. The Eclipse landscape for Grails 3 development is a bit shady. Yes, the Getting Set Up in an IDE documentation of ...

Read More »

Avoid NullPointerException: Safe Navigation with Groovy

groovy-logo

We know it’s all too common in Java to get a NullPointerException when we use an object reference which is null. This happens when our code tries to access a method or field of an object, or element of an array when there’s no instance present – e.g. it refers to null. class Animal { String name Animal parent } ...

Read More »

Grails’ JSONObject.NULL More or Less Equal To Null

grails-logo

Since Groovy 1.8 we can check if a Map is equal to another Map if the keys and values are the same. Very convenient in tests for example. def someMap = [age: 34, name: "Ted"] assert someMap == [name: "Ted", age: 34] Today I kept staring at a failure, while testing some x and y graph data points returned by ...

Read More »

Basic Groovy and Grails Code Review Guidelines

grails-logo

I’ve been – and still am – teaching Grails to non-Java programmers for a while now. This also meant to coach them into some ways of working I hold very dear, such as pair programming and doing code reviews.                 Of course, in the beginning with a new team I am doing the ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials