All posts by Dan Newton

I am a Computer Science graduate from the University of Leicester and currently working at Accenture as a Java Developer. Opinions and views found in my posts are my own and do not represent Accenture's views on any subject.

Learning Big O Notation with O(n) complexity

Big O Notation is one of those things that I was taught at university but never really grasped the concept. I knew enough to answer very basic questions on it but that was about it. Nothing has changed since then as I have not used or heard any of my colleagues mention it since I started ...

A Little Lazy Lambda Tutorial

Everyone is a bit lazy, so why not our code? Lambda expressions in Java 8 allow us to make our code that bit more lazy. In this short post I will cover how using Lambda expressions can make code more lazy. If you have not used Lambda expressions before have a look at my some ...

Setting up Bootstrap-4-alpha6 in Rails 5

This is a little post in how to setup Bootstrap-4-alpha6 in Rails 5.1.0. Rails version => 5.1.0.rc1 Bootstrap Ruby Gem => 4.0.0.alpha6 I noticed some guides mentioned installing node.js, which I already had setup. So you could try it without node.js if you want but you might run into some issues that are not covered ...

Request Mapping with multiple Rest Controllers

In this post we will look at a possible problem when multiple rest controllers are defined onto the same path and how to use multiple rest controllers within your application. I used Spring Boot to write this application. So what happens when you have two rest controller defined onto the same path? If you don't ...

Simple Spring Boot: POST

A very quick and little tutorial into sending a POST request to a Rest Controller in Spring Boot. Have a look at Spring’s starter guide if your starting from scratch. The setup that is not described in this post is covered there. The Maven dependencies required in this post are The Rest Controller The first thing ...

Building with the Builder Pattern

If you have ever looked at a long constructor and got confused about the order that input values need to be added then I am here to help! The Builder Pattern helps expel this confusion as it removes the need for this long constructor and replaces it the a series of setters which make it clear ...

Testing Data Transfer Objects and Rest Controllers in Spring Boot

In this post I will cover some tests that can be run to ensure that your DTOs (Data Transfer Objects) are being serialized and deserialized correctly leading onto testing whether they are being passed to and returned from a Rest Controller without errors. Have a look at my previous posts, Passing Data Transfer Objects with GET ...