>If you are working on an open source project, having to maintain legacy code, or just like to learn a new trick or two, then there are two books I’ve found lately that really should go together.
- Refactoring: Improving the Design of Existing Code by Martin Fowler. This book in and of itself is one that every programmer should have on their shelf within arms reach. Following the suggestions and patterns, code can be made less ugly and easier to maintain. Easy to maintain code is easier to expand and enhance. It also helps to make the code more testable.
- Clean Code by Robert “Uncle Bob” Martin. Uncle Bob is one of those authors who has a rare gift. He can make talking about technical mumbo-jumbo down right hysterical. He’s the Robin Williams of the agile world. Clean Code is not a book that you can just read on a plane, like Refactoring: Improving the Design of Existing Code, it has to be used and put into use.
One of the things that I did find true from Clean Code, is that especially in the open source world, and even more so in the corporate world, we do a lot of “wading” through code. Wading through code is a major sign that the code isn’t clean. Also, in some ways this can be caused by the “Teflon Programmer” as described by Ed Merk’s. Bad, Ugly code that is never refactored, because “we’ll get to it later” is just wrong. The reason. LATER NEVER COMES.
Take a look at any project, how many FIXME or TODO notes are in the code saying “this was done for expiedency, must fix later.” I’ve seen it more than I care to see lately. Keeping code clean is important, especially in an open source world, where anybody can submit or fix a bug. It helps ease the burden of the bug fixers and the maintainers as a whole.
Hopefully we can get Uncle Bob for a keynote speaker at EclipseCon. Maybe he’ll give his Clean Code talk and we might have people needing medical attention from not being able to breathe from laughing so hard.