I did something nasty that slowed down our test suite by two minutes (out of eight minutes). That’s when Ted started calling me The Two Minutes Guy. The problem is the result of a series of mistakes I made. * I used a Factory based on HashMap instead of if-else despite the fact that the HashMap contains only two keys. * I put the Factory in the domain object that’s using it instead of creating a separate class. * I named the class which the Factory creates Strategy. In fact, it’s not a Strategy at all. * Because of mistake #2, I created a static block to initialize the HashMap in order to reduce the overhead. But later on I moved the initialization of the HashMap into the constructor. * Then I successfully slowed down our test suite by 25%.
The worst of all the evils is that I was not pairing with anybody!!! Starting from next Monday, I’m gonna be the pair programming/switching police of our team. The first criminal to catch is myself.