Tie Your Shoes and Pull Up Your Pants

What slows down the development of software? Think about this question for a bit.  Why is it that as most software evolves it gets harder and harder to add features and improve its structure? Why is it that tasks that would have at one point been simple are now difficult and complex? Why is it that teams that should be …

Going Backwards to Go Forwards

I worked on an interesting problem this week that might have looked like I was running around in circles if you just looked at my SVN commits. The problem, and the eventual solution, reminded me of an important part of software development—of building anything really. Sometimes you must tear it down! No really, sometimes you build a structure only to …

Refactoring Switches to Classes

I’ve talked about refactoring switch statements several times before. Switch is Just a Fancy If Else Pulling out the Switch: It’s Time for a Whooping Refactoring Switches Advanced I’ve even created a defaultable dictionary for refactoring a switch statement into a dictionary of actions. This time, I am going to talk about refactoring switches when you have switch statements operating …

trashtime.jpg

The Purpose of Unit Testing

I was reminded yesterday that there are still many people out there who still don’t really understand the purpose of unit testing. A funny shift happened in the last 5 or so years. About 5 years ago, when I would suggest TDD or just doing some unit testing when creating code, I would get horrible responses back.  Many developers and …

Refactoring Static Methods Step-Wise vs Wrapping and Delegating

In working with legacy code, I often come across the problem of having to refactor classes that contain static methods or are entirely static methods. I talked about refactoring helper classes before, but this is slightly different. In this case I want to talk about refactoring classes that you want to keep around, but have all or many static members.  …

cucumber depicting a helper class

Should I Leave That Helper Class?

The project I am working on is riddled with “helper” classes.  What is a helper class? Good question.  I don’t really know.  Neither does the helper class. When you ask the helper class, what do you do… he half smiles, looks down at his over-sized feet and replies with a squirrely “stuff”. How to identify helper classes There are a few common attributes we …