Core Java
-
Building smart Builders
When building an API, you should always think about who is going to use it. When the API is simply…
Read More » -
Train Wreck Pattern – A much improved implementation in Java 8
Venkat Subramaniam at a talk today mentioned about Cascade Method pattern or Train Wreck pattern which looks something like: …
Read More » -
JDK 8’s Calendar.Builder
One of the defining characteristics of the brave new world of Java is the increasing prevalence of the builder pattern…
Read More » -
Template Method Pattern – Using Lambda Expressions, Default Methods
Template Method pattern is one of the 23 design patterns explained in the famous Design Patterns book by Erich Gamma,…
Read More » -
A simple application of Lambda Expressions in Java 8
I have been trying to fit in lambda expressions in the code I write and this simple example is a…
Read More » -
Rare Uses of a “ControlFlowException”
Control flows are a “relict” from imperative programming, which has leaked into various other programming paradigms, including Java’s object oriented…
Read More » -
Even in the jdk there is bad code
Java 7, TreeSet and NullPointerException. Recently I tried to compile with java 7 a project developed with java 6. Lot…
Read More » -
How to create a memory leak
This is going to be a rather evil post – something you will be googling when you really wish to…
Read More » -
Why a synchronized StringBuffer was never a good idea
Introduction StringBuffer is a synchronized class for mutable strings. The main problem with making it synchronized is that It was…
Read More »