Member-only story
Effective Java! Let’s Consider Static Factory Methods
Recently I have been reading through the ever popular Effective Java by Joshua Bloch (Addison-Wesley 2018). Hopefully if you are a Java developer this isn’t the first time you have heard of this book. Perhaps you are like me and the first time you saw it you thought, “That’s probably old and out of date.” Indeed, the first edition was released in the early 2000’s. However after hearing many glowing recommendations I decided I should give is a try. Needless to say I was pleasantly surprised. Alas, it’s unsurprising, good design doesn’t really go out of style (We still talk about the Gang of Four don’t we?)
With all of this in mind, why this series? Honestly, selfishly, the number one reason is for myself. I am a firm believer in the best way to learn something is to teach it. Even so I do have a love for good design and would love to share that love and hopefully help others learn something new and put it into practice. This being said I decided I would try to take some of the principles of the book and share a new one each week. Trying to put low pressure on myself but also give myself a cadence to post on.
Finally, is this series a replacement for the book? Not at all, I still highly suggest you pick up the book. Hopefully this can serve as a companion to the book and give you a different viewpoint on the topics shared therein.
Without further ado, let’s begin.
Chapter One: Static Factories vs. Constructors