What Software Craftsmanship Means to Me
While I self identify as a Software Craftsman, like Corey, I find that I agree with Dan regarding the movement. Maybe I agree with Dan because I self identify as a craftsman. No one else calls me a craftsman. There was no exam, no council of masters, just me and a desire to write less crappy software. So what does it all mean? What is Software Craftsmanship?
Well, it means not writing crap code, obviously! But what is crap code? I have never in the last 10 years worked with a developer who set out to write crap code. Working at a Fortune 100 company with annual releases, a team that laughed at the one guy doing unit testing and code that could fill hundreds of Daily WTF posts, we were all doing the best we knew how and trying to regularly (every single year!) produce value for our customers. Were we Software Craftsmen? I guess so. I mean, nothing in the manifesto would contradict that assertion.
So what is Software Craftsmanship? More importantly, what isn't Software Craftsmanship? I think the Ri answer is "Software Craftsmanship is doing the right thing." That isn't likely the Shu or Ha answer. Who knows what they are? I guess it depends, right? ;-)
I'm in no position to define this movement, but I will share my thoughts anyway. What else are blogs for, right?
- First and foremost, Software Craftsmanship requires constant self improvement through study and practice. This includes learning from the experience of others (books, blogs, discussion groups, Twitter, etc.) and willingly sharing your knowledge and experience with those in the community, especially your coworkers.
- Software Craftsmanship favors Clean Code (as defined by Robert Martin): concise, expressive code with limited duplication, (many) single responsibility classes and clear abstractions. Learn about and apply the correct design principles and patterns for your solution.
- Software Craftsmanship insists on testable code with high levels of code coverage. This is more important than some grand design with perfect abstractions and encapsulation. Let the tests guide your design.
- Software Craftsmanship emphasizes maintenance and enhancement of existing systems rather than regularly attempting to recreate what a business has already paid to build. It can take years for a new system to repay the high initial development investment. If we let it fall into disrepair and demand a rewrite just as the company breaks even, we are not adding business value, we are destroying it.
- Software Craftsmanship favors Domain Driven Design rather than Data Driven Design or RAD. RAD tools emphasize the creation phase at the expense of the maintenance phase of a system's life cycle. Data Driven Design produces systems that are bound to a database implementation, generally less expressive of the intentions of the solution and likely run into performance and scalability limitations (vendor promises not withstanding.)
- Software Craftsmanship prefers simple over configurable, Little Design Up Front over Big Design Up Front, flexible code over extensive frameworks.