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

Deep Stack Traces Can be a Sign for Good Code Quality

The term "leaky abstractions" has been around for a while. Coining it is most often attributed to Joel Spolsky, who wrote this often-cited article about it. I've now stumbled upon another interpretation of a leaky abstraction, measured by the depth of a stack trace: So, long stack traces are bad according to Geek & Poke. … Continue reading Deep Stack Traces Can be a Sign for Good Code Quality