SlideShare a Scribd company logo
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

More Related Content

PPTX
Continuous Integration: Blueprint, Toolbox, Master Craft
PPTX
Advanced Code Analysis with .NET
PPTX
Continuous Integration DCAEC12
PPTX
Test Driven Development: Blueprint, Toolbox, and Master Craft
PPTX
Continuous Integration - NoVA CodeCamp 2014-10-11
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow.
PDF
Writing Code That Lasts - #Magento2Seminar, Utrecht
Continuous Integration: Blueprint, Toolbox, Master Craft
Advanced Code Analysis with .NET
Continuous Integration DCAEC12
Test Driven Development: Blueprint, Toolbox, and Master Craft
Continuous Integration - NoVA CodeCamp 2014-10-11
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow.
Writing Code That Lasts - #Magento2Seminar, Utrecht

What's hot (6)

PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow.
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow.
PDF
Writing code that lasts - JAB14
PDF
.NET Fest 2018. Dylan Beattie. Ctrl-Alt-Del: Learning to Love Legacy Code
PPTX
Java Generics Adoption: How New Features are Introduced Championed or Ignored
PDF
DevTechDocsOps
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.
Writing code that lasts - JAB14
.NET Fest 2018. Dylan Beattie. Ctrl-Alt-Del: Learning to Love Legacy Code
Java Generics Adoption: How New Features are Introduced Championed or Ignored
DevTechDocsOps
Ad

Similar to Advanced Code Analysis In .NET (11)

PPTX
Continuous Integration: Blueprint, Toolbox, Master Craft
PPTX
Continuous Integration: Toolbox, Blueprint, Master Craft
PPTX
DevOps Requires Agility
PDF
How Can I use the AI Hype in my Business Context?
PDF
SF Bay Area Splunk User Group Meeting October 5, 2022
PDF
Petcube. How to build a hardware startup from scratch
PDF
Metrics for aglie teams
PDF
Semantics And Multimedia
PPTX
Cryptocurrency && Ruby
PDF
api-driven-development.pdf
PDF
Blue team reboot - HackFest
Continuous Integration: Blueprint, Toolbox, Master Craft
Continuous Integration: Toolbox, Blueprint, Master Craft
DevOps Requires Agility
How Can I use the AI Hype in my Business Context?
SF Bay Area Splunk User Group Meeting October 5, 2022
Petcube. How to build a hardware startup from scratch
Metrics for aglie teams
Semantics And Multimedia
Cryptocurrency && Ruby
api-driven-development.pdf
Blue team reboot - HackFest
Ad

More from Stephen Ritchie (13)

PPTX
Overview of .NET Best Practices
PPTX
Lightweight Documentation
PPTX
Agile Engineering Sparker GLASScon 2015
PPTX
Lightweight Documentation: An Agile Approach
PPTX
Continuous Integration: Blueprint, Toolbox, Master Craft
PDF
Dc scrum agile_eng_20130923
PPTX
Agile Testing Best Practices
PPTX
An Overview of .NET Best Practices
PPTX
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
PPTX
An Overview of .NET Best Practices
PPTX
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
PPTX
Automated Testing: Obstacles, Pitfalls, and Dangers
PPTX
Automated Testing with Databases
Overview of .NET Best Practices
Lightweight Documentation
Agile Engineering Sparker GLASScon 2015
Lightweight Documentation: An Agile Approach
Continuous Integration: Blueprint, Toolbox, Master Craft
Dc scrum agile_eng_20130923
Agile Testing Best Practices
An Overview of .NET Best Practices
Overcoming the Obstacles, Pitfalls, and Dangers of Unit Testing
An Overview of .NET Best Practices
DCDNUG 10/16/2012 Automated testing obstacles pitfalls dangers
Automated Testing: Obstacles, Pitfalls, and Dangers
Automated Testing with Databases

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
MYSQL Presentation for SQL database connectivity
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The AUB Centre for AI in Media Proposal.docx
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
A Presentation on Artificial Intelligence
MYSQL Presentation for SQL database connectivity
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Diabetes mellitus diagnosis method based random forest with bat algorithm
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Modernizing your data center with Dell and AMD
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Advanced Code Analysis In .NET

  • 1. 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
  • 4. Da Vinci Code … Analyzer Stephen D. Ritchie 4
  • 5. Code Analysis Static versus Stephen D. Ritchie 5
  • 7. But wait … Stephen D. Ritchie 7
  • 8. 1940 Tacoma Narrows Bridge • 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: Objection 1 Sweating the small stuff Nitpicking Useless “Don’t make the same mistake once.” Stephen D. Ritchie 12
  • 12. Code Analysis: Objection 2 Not worth the effort Low ROI No Bandwidth “Crawl, Walk, Run” Stephen D. Ritchie 13
  • 13. Code Analysis: Objection 3 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. The Master Craft Stephen D. Ritchie 19
  • 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. The Master Craft Stephen D. Ritchie 29
  • 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