Looking for this?

Then you're in the right place: CodeFX.org is now nipafx.dev! It's the same content (spicy Java) by the same guy (me, Nicolai - nice to meet you!), but with a new look and without CodeFX as a middleman. From now on, it's just You. Me. Java.

Got it!

(JavaScript is off, so no cookies - tell me again next time)

Got it!

(and give me a cookie to remember - privacy policy)

Got it!

(and tell me again next time I'm forwarded)

By the way, it looks like you didn't get forwarded to the page you were looking for. If that's indeed the case, it would be great if you could let me know, so I can fix it.

Looking for this?

Then you're in the right place: CodeFX.org is now nipafx.dev! It's the same content (spicy Java) by the same guy (me, Nicolai - nice to meet you!), but with a new look and without CodeFX as a middleman. From now on, it's just You. Me. Java.

Got it!

(JavaScript is off, so no cookies - tell me again next time)

Got it!

(and give me a cookie to remember - privacy policy)

Got it!

(and tell me again next time I'm forwarded)

By the way, it looks like you didn't get forwarded to the page you were looking for. If that's indeed the case, it would be great if you could let me know, so I can fix it.

Use Builders... Cautiously - Effective Java, Item 2

Why and how to avoid the builder pattern and how to make best use of it if you can't

The builder pattern is a powerful tool to ease the instantiation of complex classes. Whether constructor parameters are too numerous, there are too many of the same type, or whether many are optional - with a builder you can make your life easier. Although, I posit, often you can make your life even easier by directly tackling the class' or constructor's complexity.

In this video I show an example of how to simplify a class to make a builder obsolete, but also how to build more powerful builders that add more value than just simplifying constructor calls.

Links to follow up: