Dirty Code is Evil
Keeping the Code Clean at InformIT.com
Keeping your code clean is just as important as getting it to work. Clean code allows you to extend and maintain your modules, whereas dirty code ties you in knots. I can't stress this enough: Software professionals don't leave their code in an unclean state. They don't tolerate sloppiness, wanton duplication, or messiness. Professionals take pride not only in getting their code to work, but also in keeping it simple, small, and easy to read.
Good basic article on TDD. I wouldn't have chosen to make the FooToXML code a static class. Why not just place that functionality right into the Foo class? The way Martin has it, it reminds me too much of EJBs (not very object oriented). I like to place the methods that operate on my data in the class that holds the data. But when Martin speaks, you gotta listen. Good cooking analogy at the end.
Keeping your code clean is just as important as getting it to work. Clean code allows you to extend and maintain your modules, whereas dirty code ties you in knots. I can't stress this enough: Software professionals don't leave their code in an unclean state. They don't tolerate sloppiness, wanton duplication, or messiness. Professionals take pride not only in getting their code to work, but also in keeping it simple, small, and easy to read.
Good basic article on TDD. I wouldn't have chosen to make the FooToXML code a static class. Why not just place that functionality right into the Foo class? The way Martin has it, it reminds me too much of EJBs (not very object oriented). I like to place the methods that operate on my data in the class that holds the data. But when Martin speaks, you gotta listen. Good cooking analogy at the end.