Clean Code

Last week I attended the Heartland Developers’ Conference here in Omaha, Nebraska. There were a lot of good sessions there, and one of my favorites was the session on Clean Code, given by Cory House. There were a lot of great points in the talk, which Cory admitted were distilled from a few books: Code Complete, The Pragmatic Programmer and, appropriately, Clean Code.

One of the best tips in the talk that I took home was “If you’re about to write a comment, think about writing a method instead”. Awesome. For instance, if I have a block of code that checks to see whether an account is valid, instead of writing a comment about that, I can make a method called AccountIsValid(account, otherThings). Then I just do if(!AccountIsValid()) throw; Done!

Since I took pretty good notes, here they are (taken in a tool called FreeMind) :

Clean Code

Posted Wednesday, September 12th, 2012 under Code.

One comment so far

Leave a Reply