Quantcast
Channel: Stefan Hendriks' Blog » java
Browsing all 11 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

First coderetreat of 2012 in Amsterdam – Retrospective

At the end of 2011 I started organizing a coderetreat. It started on twitter around October. I’ve also posted about it in my last mini blog. The original event can be found here. If anyone was...

View Article



Image may be NSFW.
Clik here to view.

(Win 7) How to really change your default locale for Java

Since I could not find an easy solution for this problem I have decided to blog about this. Lets say your machine (running Windows 7) is running in a Dutch locale. If you install the JDK and request...

View Article

Image may be NSFW.
Clik here to view.

Gotcha’s showing error messages with Spring forms (form:errors)

(I have recently encountered this with Spring 3.1) Want to validate your forms using Spring? Are you using the form tag and bind it with an object? Got the validator working? But still you just can’t...

View Article

Image may be NSFW.
Clik here to view.

The difference between TDD and Test First Development

Recently I promoted to do TDD, instead of “Tests First” development. Some people asked me what the difference is between them. In both cases we write tests first right? So what is the difference? I...

View Article

Image may be NSFW.
Clik here to view.

Working with legacy code – how to start & reveal intent

Recently I posted my opinion about regression. Regression bugs are likely to occur on projects with a lot of legacy code. I consider legacy code as untested code. At the legacy coderetreat we used a...

View Article


Image may be NSFW.
Clik here to view.

What’s ‘wrong’ with this code ? #01

I came accross a piece of code like this: if (null == sessionProxy.getShoppingCart()) { throw new IllegalStateException("ShoppingCart may not be null"); } Can you find what’s ‘wrong’ with this? Note I...

View Article

Image may be NSFW.
Clik here to view.

My answer for – What’s ‘wrong’ with this code ? #01

I asked what was ‘wrong’ in the following code. I had put ‘wrong’ in quotes, because it is an ambigious term. Here is the code: if (null == sessionProxy.getShoppingCart()) { throw new...

View Article

Image may be NSFW.
Clik here to view.

What is wrong with this code #02

Given that the functionality of the method toGenericObject must be preserved; there is something obviously wrong in this code, can you find it? If so, can you think of an easy solution? public MyObject...

View Article


Image may be NSFW.
Clik here to view.

A Randori with Corey Haines

Saturday 8th of September 2012. I came to Amsterdam Amstel train station, to pick up Corey Haines who I had asked if he wanted to meet the local community in Amsterdam and have some fun coding. After I...

View Article


Image may be NSFW.
Clik here to view.

Coupling: The factory method

One of the challenges we face with coding is dealing with coupling. Coupling is an important aspect of programming, it tells us how much our code is tangled. When coupling is too high, we can’t easily...

View Article

Image may be NSFW.
Clik here to view.

Migrating from Spring 3.2.x to Spring 4 and using ‘spring-mock 2.0.8’ gives...

So this is a very short post, with a ‘gotcha’. I wasn’t able to find anything about this, thats why I write it down here right now: If you are migrating from Spring 3 to 4 and you have in your pom.xml...

View Article
Browsing all 11 articles
Browse latest View live




Latest Images