Advanced Code Analysis in .NET Stephen Ritchie July 10, 2012 Stephen D. Ritchie – Senior Consultant – Excella Consulting, Inc., 2300 Wilson Blvd, Suite 630, Arlington, VA 22201 – 703.840.8600 – http://excella.com
Blueprint Stephen D. Ritchie 2
Toolbox Stephen D. Ritchie 3
Da Vinci Code … Analyzer Stephen D. Ritchie 4
Code Analysis Static versus Stephen D. Ritchie 5
Static Analysis Stephen D. Ritchie 6
But wait … Stephen D. Ritchie 7
1940 Tacoma Narrows Bridge • Video – http://archive.org/download/SF121/SF121_51 2kb.mp4 Stephen D. Ritchie 9
Static Analysis Source Visualizations Code Checks Assembly Metrics Detections Stephen D. Ritchie 10
Dynamic Analysis Visualizations Checks Metrics Detections Stephen D. Ritchie 11
Code Analysis: Objection 1 Sweating the small stuff Nitpicking Useless “Don’t make the same mistake once.” Stephen D. Ritchie 12
Code Analysis: Objection 2 Not worth the effort Low ROI No Bandwidth “Crawl, Walk, Run” Stephen D. Ritchie 13
Code Analysis: Objection 3 No authorization Forbidden Can’t Fix Issues “Speak truth to power.” Stephen D. Ritchie 14
Blueprint 1 Analyze 2 Monitor Improve 3 Stephen D. Ritchie 15
Toolbox FxCop Detections Checks Visual Studio http://blogs.msdn.com/b/codeanalysis/ Stephen D. Ritchie 16
Toolbox StyleCop Detections Checks http://stylecop.codeplex.com/ Stephen D. Ritchie 17
Toolbox ReSharper http://www.jetbrains.com/resharper/ Detections Checks Gendarme http://www.mono-project.com/Gendarme Stephen D. Ritchie 18
The Master Craft Stephen D. Ritchie 19
Toolbox Simian Detections http://www.harukizaemon.com/simian/ Stephen D. Ritchie 20
The Master Craft Duplicates Finder .NET http://www.jetbrains.com/teamcity/ Clone Doctor Semantic Designs http://www.semdesigns.com/Products/Clone/ Stephen D. Ritchie 21
Dynamic Analysis Code Coverage Stephen D. Ritchie 22
Toolbox dotCover http://www.jetbrains.com/dotcover/ Stephen D. Ritchie 23
Toolbox Open Cover http://nuget.org/packages/OpenCover Stephen D. Ritchie 24
The Master Craft http://www.ncover.com/ Stephen D. Ritchie 25
Dynamic Analysis Sampling Instrumentation Stephen D. Ritchie 26
Toolbox Performance Stephen D. Ritchie 27
Toolbox Performance http://www.jetbrains.com/profiler/ Stephen D. Ritchie 28
The Master Craft Stephen D. Ritchie 29
The Master Craft Memory Queries Logging Security Stephen D. Ritchie 30
Static Analysis Source Visualizations Code Checks Assembly Metrics Detections Stephen D. Ritchie 31
The Master Craft Code Quality Visualizations http://www.ndepend.com/ Checks Metrics Detections http://www.lattix.com/ Stephen D. Ritchie 32
Hanselman’s Placemat http://bit.ly/LwKfwK Stephen D. Ritchie 33
Shameless Self-promotion http://amzn.to/v8TD8E Stephen D. Ritchie 34
Stephen’s Contact Info • Twitter: @ruthlesshelp • Email: stephen.ritchie@excella.com • Blog: http://ruthlesslyhelpful.net • LinkedIn: http://www.linkedin.com/in/sritchie Stephen D. Ritchie 35

Advanced Code Analysis In .NET

  • 1.
    Advanced Code Analysisin .NET Stephen Ritchie July 10, 2012 Stephen D. Ritchie – Senior Consultant – Excella Consulting, Inc., 2300 Wilson Blvd, Suite 630, Arlington, VA 22201 – 703.840.8600 – http://excella.com
  • 2.
  • 3.
  • 4.
    Da Vinci Code… Analyzer Stephen D. Ritchie 4
  • 5.
    Code Analysis Static versus Stephen D. Ritchie 5
  • 6.
  • 7.
  • 8.
    1940 Tacoma NarrowsBridge • Video – http://archive.org/download/SF121/SF121_51 2kb.mp4 Stephen D. Ritchie 9
  • 9.
    Static Analysis Source Visualizations Code Checks Assembly Metrics Detections Stephen D. Ritchie 10
  • 10.
    Dynamic Analysis Visualizations Checks Metrics Detections Stephen D. Ritchie 11
  • 11.
    Code Analysis: Objection1 Sweating the small stuff Nitpicking Useless “Don’t make the same mistake once.” Stephen D. Ritchie 12
  • 12.
    Code Analysis: Objection2 Not worth the effort Low ROI No Bandwidth “Crawl, Walk, Run” Stephen D. Ritchie 13
  • 13.
    Code Analysis: Objection3 No authorization Forbidden Can’t Fix Issues “Speak truth to power.” Stephen D. Ritchie 14
  • 14.
    Blueprint 1 Analyze 2 Monitor Improve 3 Stephen D. Ritchie 15
  • 15.
    Toolbox FxCop Detections Checks Visual Studio http://blogs.msdn.com/b/codeanalysis/ Stephen D. Ritchie 16
  • 16.
    Toolbox StyleCop Detections Checks http://stylecop.codeplex.com/ Stephen D. Ritchie 17
  • 17.
    Toolbox ReSharper http://www.jetbrains.com/resharper/ Detections Checks Gendarme http://www.mono-project.com/Gendarme Stephen D. Ritchie 18
  • 18.
  • 19.
    Toolbox Simian Detections http://www.harukizaemon.com/simian/ Stephen D. Ritchie 20
  • 20.
    The Master Craft Duplicates Finder .NET http://www.jetbrains.com/teamcity/ Clone Doctor Semantic Designs http://www.semdesigns.com/Products/Clone/ Stephen D. Ritchie 21
  • 21.
    Dynamic Analysis Code Coverage Stephen D. Ritchie 22
  • 22.
    Toolbox dotCover http://www.jetbrains.com/dotcover/ Stephen D. Ritchie 23
  • 23.
    Toolbox Open Cover http://nuget.org/packages/OpenCover Stephen D. Ritchie 24
  • 24.
    The Master Craft http://www.ncover.com/ Stephen D. Ritchie 25
  • 25.
    Dynamic Analysis Sampling Instrumentation Stephen D. Ritchie 26
  • 26.
    Toolbox Performance Stephen D. Ritchie 27
  • 27.
    Toolbox Performance http://www.jetbrains.com/profiler/ Stephen D. Ritchie 28
  • 28.
  • 29.
    The Master Craft Memory Queries Logging Security Stephen D. Ritchie 30
  • 30.
    Static Analysis Source Visualizations Code Checks Assembly Metrics Detections Stephen D. Ritchie 31
  • 31.
    The Master Craft Code Quality Visualizations http://www.ndepend.com/ Checks Metrics Detections http://www.lattix.com/ Stephen D. Ritchie 32
  • 32.
    Hanselman’s Placemat http://bit.ly/LwKfwK Stephen D. Ritchie 33
  • 33.
    Shameless Self-promotion http://amzn.to/v8TD8E Stephen D. Ritchie 34
  • 34.
    Stephen’s Contact Info •Twitter: @ruthlesshelp • Email: stephen.ritchie@excella.com • Blog: http://ruthlesslyhelpful.net • LinkedIn: http://www.linkedin.com/in/sritchie Stephen D. Ritchie 35