Yak Shaving is a Good Way to Improve an API

Yak Shaving (uncountable): (idiomatic) Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem. (idiomatic) A less useful activity done to consciously or unconsciously procrastinate about a larger but more useful task. Both interpretations of the term Yak Shaving as explained by Wiktionary are absolutely accurate … Continue reading Yak Shaving is a Good Way to Improve an API

Keeping things DRY: Method overloading

A good clean application design requires discipline in keeping things DRY: Everything has to be done once. Having to do it twice is a coincidence. Having to do it three times is a pattern. — An unknown wise man Now, if you're following the Xtreme Programming rules, you know what needs to be done, when … Continue reading Keeping things DRY: Method overloading

How to Eliminate Bugs Through High Cohesion

Intuition tells us that methods like these ones suffer from a distinct code smell: CompilationTask getTask( Writer out, JavaFileManager fileManager, DiagnosticListener<? super JavaFileObject> diagnosticListener, Iterable<String> options, Iterable<String> classes, Iterable<? extends JavaFileObject> compilationUnits ); Why is that so? Let's delve into this intuition. Here is an example from the JavaCompiler Javadoc: Iterable<? extends JavaFileObject> compilationUnits1 = … Continue reading How to Eliminate Bugs Through High Cohesion