Clean Code: Writing Code for Humans

Inspired by Steve McConnel’s “Code Complete”, Uncle Bob’s “Clean Code” and Andrew Hunt’s “The Pragmatic Programmer”, this session reviews best practices for writing code in a style that’s easy to create, maintain and understand. We have a lofty goal: programming style as documentation. We’ll discuss concrete methods to get you there and give you a vocabulary for pragmatically evaluating code quality.

Various refactoring techniques, code smells, anti-patterns, and rules of thumb are discussed including fail fast, return early, separation of concerns, arrow code, magic numbers, the boy scout rule, being “stringly typed”, DRY, the stepdown rule, table-driven methods, the importance of staying native, techniques for finding subtle redundancy, reinventing the square wheel, when to create a method, doing comments right, horizontal and vertical density, and simple design patterns. Part of this session involves refactoring a confusing and ugly chunk of code into something beautiful, easy to read and maintain. While examples are in C#, coders in any language should be able to follow along and apply the principles discussed.

Looking for the Handout? Here ya go.

Handout

This session was also adapted and radically expanded into my first Pluralsight course. If you don’t have a Pluralsight subscription, check out their free trial.
Clean Code: Writing Code for Human on Pluralsight

Presented At:

Feedback

.@housecor nailing clean code on stage at #codemash pic.twitter.com/hIfNhAEeWK

— Calvin Allen (@CalvinAllen_) January 9, 2015

No need to read the book “Clean Code” now. 😉 @housecor #codestock pic.twitter.com/HH7rGW3e21

— Tim McLeod (@timmcleod) July 13, 2013

Cory House – Clean Code session was great. If you didn’t see his presentation, get the slides! #hdc12

— Michael Munnis (@mmunnis) September 7, 2012

Yet another knockout talk by @housecor. He maintains his spot on my shortlist of amazing speakers. Inspired to write cleaner code #codemash

— John Strobel (@devunit1) January 9, 2015

Clean Code by @housecor has been the best of #codemash for me, so far.

— Phil Sherwood (@psherwood) January 9, 2015

@housecor is the type of speaker I’m going to go listen to regardless of topic. The clean code talk was great, thanks #codemash

— Lucas Krammes (@lkrammes) January 9, 2015

@housecor Fanastic talk! Time to renew my @pluralsight membership! #codemash

— Calvin Allen (@CalvinAllen_) January 9, 2015

@housecor Amazing Clean Code talk. Thanks for sharing.

— Brett Whittington (@BrettTheWhitt) January 9, 2015