Clean Code with Uncle Bob Martin
Code for long enough, and you’ll eventually run across a codebase that is difficult to deal with. Such codebases have a lot of downsides, with everything from bugs to being extremely difficult to extend or troubleshoot. Worse still, management is unlikely to understand just how expensive such a codebase can become over the long term. A codebase like this can contribute to high employee turnover, make bug fixes slow, and even damage your product over time as it becomes harder to modify.
In this episode, we’ve brought Uncle Bob Martin on to talk about the principles of clean code. Not only will we be discussing software development practices that can help you keep your code clean, but we’ll also be talking about what costs that bad code imposes on everyone and why it’s a bigger problem than you might think, even if you have been in the industry a while.
Uncle Bob probably needs no introduction, but we’ll introduce him here just in case. He has been a software professional since 1970 and an international software consultant since 1990. He is the founder and president of Object Mentor, Inc., which is a team of experienced consultants who mentor their clients worldwide in the fields of C++, Java, C#, and Ruby. He was also a co-author of the agile manifesto. Finally, he is the author of a number of software development books that we highly suggest that you read, including Clean Code, Clean Architecture, The Clean Coder, Clean Agile, and several others. He is a wealth of knowledge about how to properly conduct software development as a craft, rather than a mere job, while producing better code and better systems in the process. He changed the way we both wrote code early in our careers, and did the same for many of our mentors as well.
Having a clean codebase is like having a clean house. It isn’t something that “just happens”, but rather the result of intentional decisions made and (most importantly) followed up upon over a long period of time. Clean codebases provide significant value to organizations and help software systems become assets for a company, while poorly maintained, messy codebases are often serious liabilities.
Chapter 2 is titled bootstrapping your health. It starts off with a story about Andrew Wiles who proved Fermat’s last theorem in 1995. He worked alone and in secret on the mathematic conjecture. When asked how he stayed creative being alone so much he said that we would walk every day. Kutner goes on to talk about studies that show exercise improves memory. The next section is about how simply walking can benefit your health. As programmers we tend to sit a lot and don’t get much walking in our daily activity. Kutner suggests buying a pedometer to measure your steps. If you have a smart phone that never leaves your side then you don’t need to buy one. He goes on in the next section to encourage spending at least 20 minutes a day being active. You want to get your heart rate up, first you have to find your resting heart rate. In the next section he talks about how to walk. While many of us have been doing this since we were children what he shows here is how to walk to reduce the chance of injury or strain. The final section before the retrospective is getting out and actually taking the first steps. In the act on it section he talks about walking to solve problems. When we were in school, Will and I used to do this often. Many times we’d be half way around the block when the solution would come to us.
Tricks of the Trade
It’s all about the responsibility.