There are two documents that I frequently visit when I’m refactoring code, the first is A Taxonomy for Bad Code Smells, which categorizes various smells in Martin Fowler’s Refactoring book. The other is this Smells to Refactorings PDF file, which lists all the smells and refactorings from Fowler’s book as well as from Joshua Kerievsky’s Refactoring to Patterns book.
I’ve been looking for something that lists the various taxa, the smells, and the associated refactorings in both books, thus consolidating the tables on both of these documents. I couldn’t find one, …
… you have a job description like this:
DESCRIPTION:Career Growth! Terrific opportunity in a growing software company for a Java Developer. Must have experience with the design, documentation and implementation of Java 142. Must be strong with implementation of Java. Must also have experience with Spring or Struts. Any experience with Eclipse, Hibernate or Oracle is a great plus. Job duties will include taking a 220 page document of specs and implementing them accurately and efficiently. Will travel to various local client sites. Interviews are taking place right away.
Man am …
If you’ve ever been to a vineyard, you’ve probably seen that they plant rose bushes at the end of each row of grape vines. These rose bushes indicate if there is going to be a problem with the grape vines because the roses are generally weaker than the grape vines, yet have almost the same genetic make-up. The roses will die first if there is a pH-imbalance, insufficient water, too much water, too much sun, or other issues with the environment. The viticulturalists can then react before the …
I like Martin Fowler’s write up on Designed Inheritance, but I’m not so sure I agree with his implied suggestion that you cannot have designed inheritance and provide an enabling design.
If I have a component that is being called by other code, and that component is implemented as an abstract class that only allows subclasses to implement abstract methods (all concrete methods are final), then I cannot override the behavior of the parent class. This is designed inheritance because people can only subclass it in the way that I’ve …
I teach TDD courses, and one of the questions that inevitably pops up is whether you should refactor your tests. When it comes to eliminating duplication in tests, my threshold is very high. By that, I mean that the most important thing to me is readability. I want to read a test like a mini story: I set this up, I execute this, I verify that.
One of the biggest annoyances I encounter with experienced TDDers is when they decompose tests to the point where you can’t see what the …