Doug Hiebert questions conventional wisdom that is taken for granted when writing code, and presents alternatives by way of before-and-after examples.
Doug Hiebert is a software developer at Protegra, with over five years of software development experience. His passion for deeply learning technologies both new and old has often landed him in a mentorship role with those around him. His programming interests outside of his day job as a Java developer are playing around with Ruby and Scala frameworks and exploring aspects of functional programming
Disagree on Commenting
Also conditionals may be ugly, but they are easier to understand than polymorphism.
Re: Disagree on Commenting
Frank Lloyd Teh
When using third party libraries, I believe it is faster to browse through Java Doc than to read the code. So developers in Apache, Spring and other open source communities have my sincere thanks.
I like preventing NPEs by returning an empty Collection, if returning that does not have a logical difference with returning null. But seriously? polymorphism and Options over the simplicity of null checks? Didn't this speaker say we should prefer simplicity at the very beginning of this presentation?
If I have several layers of nested properties, each of which can be null and I'd just do one thing if any of those were null, I'll just wrap it in a try catch block.