Craftsmanship and Ethics

Hacker News LinkedIn Facebook Twitter by Abby Fichtner

Japanese Swordmaker

Bob Martin’s Craftsmanship and Ethics presentation is now freely available. Think of it as a 45 minute video on the key principles of agile programming. Or, if you’d prefer, a tutorial on how to become a professional developer.

As developers, our main product is our code. And, so, to be considered professionals, we must craft our product (code) in a disciplined manner. We should always, for example, check in the code a little cleaner then we found it so that our systems are always improving (as opposed to degrading). However, in this industry, one of our biggest problems is that we almost always check it in worse then we found it. Uncle Bob jokes,

“It’s difficult to call ourselves professionals when our primary outcome is a huge, stinking mess!”

“How many times have you been significantly slowed down by bad code? Martin asks and we can be sure all programmer Robert Martin presentation on Craftsmanship and Ethicshands went up. “Then why did you write it?” he asks. There is laughter because of the truth in his question. We have all been slowed by bad code and yet, we continue to allow bad code to be written on our projects. And why? Because we didn’t have time to write it well?

We fool ourselves into thinking we can defer the problems of bad code until later. But the problem is that the slow down is not something that occurs months from now, it’s immediate. “How many of you have stared at code you wrote 2 hours ago and thought, ‘what the hell does that do?!'”

“Bad code is not something that slows someone else down months from now. It slows us down immediately. We must not write bad code. Period. This is a fundamental issue of professional behavior.”

And, so, Uncle Bob presents us with a number of principles we can follow if we want to become professionals. In doing so, he offers justification behind many of the agile practices – iterative development, pair programming, TDD, avoiding Big Up Front Designs (only Uncle Bob likes to call them “Turgid, Viscous Architectures”). And, what I think is arguably one of the most important lessons of agile, which is that “the only way to go fast is to go well.”

  • Pingback: seo plan template 2018()

  • Abby Fichtner

    Well, not your code… ;-)

    I absolutely think you can be that objective if you take the time to look. Experience helps, but I think as humans we’re awfully good at looking at things and finding ways they can be improved.

    I think it goes back to just accepting that as a part of coding. First, make it work. Then, make it clean. We accept that with documents or articles we produce, why should code be any different? They’re all things that need to be read and understood by other people…

  • Huh. I usually think of bad code as something someone else has done!

    Since I don’t code much myself, I don’t have a lot of experience with this feeling: do you think you can often look back at your code after such a short period and see that it smells? Can you be that objective?