Tag Archive: development


There is a PMD rule that checks for mutators (getters and setters) on Java Beans: BeanMembersShouldSerialize. I have a lot of these violations in my code. I’d rather understand the issue than just turn it off, but I’m struggling with what it means.

What I learned is: being Serializable does not make a class a Java Bean. And, to be Serializeable, you don’t need mutators.

But PMD thinks my object is a bean. Why? View full article »

From http://www.javacodegeeks.com/2011/07/top-97-things-every-programmer-or.html:
It’s never too early to think about performance – Rebecca Parsons

From Effective Java:
More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason—including blind stupidity.

—William A. Wulf [Wulf72]

We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.

—Donald E. Knuth [Knuth74]

We follow two rules in the matter of optimization:

Rule 1. Don’t do it.

Rule 2 (for experts only). Don’t do it yet—that is, not until you have a perfectly clear and unoptimized solution.

—M. A. Jackson [Jackson75]

When I started programming I thought the goal was to produce code that was fast. So I wrote concise code without regard for readability. Now, I lean toward readability. I guess I’m just trying to differentiate performance and optimization. Performance is good. (Premature) optimization is bad. I struggle with this because I find it easier and more enjoyable working with the details and not at a system level.

All views expressed here are of Adam Koch solely and do not represent his employer's.