Wednesday, September 29, 2004

Does Your Code Suck?

Chances are that some of your code sucks. It's okay to admit it. Some of my code sucks too. Dave Astels enumerates what aspect of your code may suck (e.g. it isn't testable, it's hard to read, etc.). One of the comments to Dave's post references a pretty good rant by Michael Feathers on unit testing. Whether you use stubs, mock objects or some other approach, there's a huge win when you're able to test your code in isolation. And your code will suck less.