South Bay Clean CodeWhy Clean Code matters Mountain View, March 2nd 2011
Theo Jungeblut• Senior Software Developer at Omnicell Inc. in Mountain View• Has been designing and implementing .NET based applications , components and frameworks for 8 years• Previously worked in factory automation with focus on component based software and framework development for 3 ½ years firstname.lastname@example.org• Degree in Software Engineering and Network Communications www.csharp-lightouse.com
S Single Responsibility Principle O Open/Closed Principle L Liskov Substitution Principle I Interface Segregation Principle D Dependency Inversion PrincipleRobert C Martin: http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod
Summary Clean CodeBeing more efficient through:• Simplification and Specialization (KISS, SoC, SRP)• Decoupling (Contracts, CoP, IoC or SOA)• Avoiding Code Blow (DRY, YAGNI)• Quality through Testability (all of them!)
Q&AGraphic by Nathan Sawaya courtesy of brickartist.com
ReferencesResharperhttp://www.jetbrains.com/resharper/FxCop / Code Analysishttp://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspxhttp://blogs.msdn.com/b/codeanalysis/http://www.binarycoder.net/fxcop/index.htmlCode Contractshttp://msdn.microsoft.com/en-us/devlabs/dd491992http://research.microsoft.com/en-us/projects/contracts/Pex & Molehttp://research.microsoft.com/en-us/projects/pex/StyleCophttp://stylecop.codeplex.com/StyleCop Plugin for Resharperhttp://stylecopforresharper.codeplex.com/Ghostdochttp://submain.com/products/ghostdoc.aspx Lego (trademarked in capitals as LEGO)
gotowww.csharp-lighthouse.com for slides & code examples
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.