Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Mastering code analysis metrics for ALM
SharePoint Konferenz Erding
Hugh Wood – Master Chief – Rencore AB - @HughAJWood
@HughAJWood
https//blog.spcaf.com Hugh.Wood@Rencore.se
Hugh Wood
Leicester, England
Lead Developer @ SPCAF
Mastering code ...
•What are they?
•Who are they important to?
•Where do they come from?
•Looking deeper…
Static Code Analysis Metrics
Master...
What are they?
Mastering code analysis metrics for ALM - @HughAJWood
Who are they important to?
Mastering code analysis metrics for ALM - @HughAJWood
Developer
Architect
Project Manager
Busin...
Where do they come from?
Mastering code analysis metrics for ALM - @HughAJWood
FxCop
StyleCop
Digging deeper…
Mastering code analysis metrics for ALM - @HughAJWood
Visual Studio Metrics
Mastering code analysis metrics for ALM - @HughAJWood
Developer Friendly
Visual Studio Metrics
Mastering code analysis metrics for ALM - @HughAJWood
Developer Friendly
Visual Studio Metrics
Mastering code analysis metrics for ALM - @HughAJWood
Developer Friendly
Visual Studio Metrics
Mastering code analysis metrics for ALM - @HughAJWood
Architect Friendly
Visual Studio Metrics
Mastering code analysis metrics for ALM - @HughAJWood
Architect Friendly
Cyclomatic Complexity Densi...
Visual Studio Metrics
Mastering code analysis metrics for ALM - @HughAJWood
Project Manager Friendly
Cyclomatic Complexity...
Visual Studio Metrics
Mastering code analysis metrics for ALM - @HughAJWood
Business Friendly
Project Complexity: (CC)11 /...
Metrics outside of
Visual Studio
Mastering code analysis metrics for ALM - @HughAJWood
• Quality Metrics
• Security Metric...
Code Quality Metrics
Mastering code analysis metrics for ALM - @HughAJWood
• Defect Density (High/Medium per 1000 LOC)
• C...
Code Quality Metrics
Mastering code analysis metrics for ALM - @HughAJWood
What are Defects?
Code Quality Metrics
Mastering code analysis metrics for ALM - @HughAJWood
What are Defects?
Code Quality Metrics
Mastering code analysis metrics for ALM - @HughAJWood
What are Defects?
Code Quality Metrics
Mastering code analysis metrics for ALM - @HughAJWood
What are Defects?
Code Security Metrics
Mastering code analysis metrics for ALM - @HughAJWood
• Information Security
• System Security – Sys...
Research & Development
Efficiency
Mastering code analysis metrics for ALM - @HughAJWood
• Cyclomatic Complexity
• Comment ...
Policies & Thresholds
Mastering code analysis metrics for ALM - @HughAJWood
• ISO-9000 / ISO-27001
• Defect limits
• Devel...
Policies & Thresholds
Mastering code analysis metrics for ALM - @HughAJWood
• Assign a Defect Lead
• Ignore only false pos...
Adjusting Project Plans
Mastering code analysis metrics for ALM - @HughAJWood
• Size of Code Base
• Outstanding Defects
• ...
Adjusting Project Plans
Mastering code analysis metrics for ALM - @HughAJWood
Measure Defects and Metrics Over Time
Summary
Mastering code analysis metrics for ALM - @HughAJWood
• Ensure Defect and Metric policies are in place
• Delegate ...
Mastering code analysis metrics for ALM - @HughAJWood
Upcoming SlideShare
Loading in …5
×

Mastering Code Analysis Metrics for ALM (Hugh Wood)

546 views

Published on

Many people use static code analysis tooling, but not many know what to do with the metrics nor how often they should collected and how they should be read. I design code analysis and research hundreds of tools and review the way people use them, gathering information on the best way to keep on-top of the metrics supplied and how to most efficiently use them.
These slides cover: The key Code Analysis Metrics in Visual Studio; How to read and utilise reports using free tooling (fxcop, jslint); How to manage exceptions to the rules in your code; How reports should be passed to project lead and tracked at a business level; How Static Code Analysis helps with testing beyond just analysis reports; familiarity with Visual Studio is suggested

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Mastering Code Analysis Metrics for ALM (Hugh Wood)

  1. 1. Mastering code analysis metrics for ALM SharePoint Konferenz Erding Hugh Wood – Master Chief – Rencore AB - @HughAJWood
  2. 2. @HughAJWood https//blog.spcaf.com Hugh.Wood@Rencore.se Hugh Wood Leicester, England Lead Developer @ SPCAF Mastering code analysis metrics for ALM - @HughAJWood
  3. 3. •What are they? •Who are they important to? •Where do they come from? •Looking deeper… Static Code Analysis Metrics Mastering code analysis metrics for ALM - @HughAJWood
  4. 4. What are they? Mastering code analysis metrics for ALM - @HughAJWood
  5. 5. Who are they important to? Mastering code analysis metrics for ALM - @HughAJWood Developer Architect Project Manager Business
  6. 6. Where do they come from? Mastering code analysis metrics for ALM - @HughAJWood FxCop StyleCop
  7. 7. Digging deeper… Mastering code analysis metrics for ALM - @HughAJWood
  8. 8. Visual Studio Metrics Mastering code analysis metrics for ALM - @HughAJWood Developer Friendly
  9. 9. Visual Studio Metrics Mastering code analysis metrics for ALM - @HughAJWood Developer Friendly
  10. 10. Visual Studio Metrics Mastering code analysis metrics for ALM - @HughAJWood Developer Friendly
  11. 11. Visual Studio Metrics Mastering code analysis metrics for ALM - @HughAJWood Architect Friendly
  12. 12. Visual Studio Metrics Mastering code analysis metrics for ALM - @HughAJWood Architect Friendly Cyclomatic Complexity Density Ratio: (CC)11 / (LOC)21 = 0.5 Class Coupling – Use Directly Depth Inheritance – Use Directly Maintainability Index – Use Directly
  13. 13. Visual Studio Metrics Mastering code analysis metrics for ALM - @HughAJWood Project Manager Friendly Cyclomatic Complexity Density Ratio: (CC)11 / (LOC)21 = 0.5 Maintainability Index – Use Directly
  14. 14. Visual Studio Metrics Mastering code analysis metrics for ALM - @HughAJWood Business Friendly Project Complexity: (CC)11 / (LOC)21 = 0.5 x 100 = 50% 25% < Simple 50% < Moderate 70% < Complex 71% > Unsupportable Maintainability Index – Use Directly < 25% Expensive to maintain 26~50% Moderately Expensive 51~70% Low Expenditure 71%+ Extremely Low Expenditure
  15. 15. Metrics outside of Visual Studio Mastering code analysis metrics for ALM - @HughAJWood • Quality Metrics • Security Metrics • Research & Development metrics
  16. 16. Code Quality Metrics Mastering code analysis metrics for ALM - @HughAJWood • Defect Density (High/Medium per 1000 LOC) • Critical Defects / 1000 LOC • Uninspected Defects
  17. 17. Code Quality Metrics Mastering code analysis metrics for ALM - @HughAJWood What are Defects?
  18. 18. Code Quality Metrics Mastering code analysis metrics for ALM - @HughAJWood What are Defects?
  19. 19. Code Quality Metrics Mastering code analysis metrics for ALM - @HughAJWood What are Defects?
  20. 20. Code Quality Metrics Mastering code analysis metrics for ALM - @HughAJWood What are Defects?
  21. 21. Code Security Metrics Mastering code analysis metrics for ALM - @HughAJWood • Information Security • System Security – System and Web
  22. 22. Research & Development Efficiency Mastering code analysis metrics for ALM - @HughAJWood • Cyclomatic Complexity • Comment Density
  23. 23. Policies & Thresholds Mastering code analysis metrics for ALM - @HughAJWood • ISO-9000 / ISO-27001 • Defect limits • Developer Vectors • Defect Contingency • Development Language Segregation
  24. 24. Policies & Thresholds Mastering code analysis metrics for ALM - @HughAJWood • Assign a Defect Lead • Ignore only false positives • Use custom rule sets • Monitor and track all exceptions Managing False Positives
  25. 25. Adjusting Project Plans Mastering code analysis metrics for ALM - @HughAJWood • Size of Code Base • Outstanding Defects • Number of Developers • Defects Per Developer by Category • Time to Inspect Defects (Average) • Time Scheduled per week for triage per Developer • Weeks until project completion
  26. 26. Adjusting Project Plans Mastering code analysis metrics for ALM - @HughAJWood Measure Defects and Metrics Over Time
  27. 27. Summary Mastering code analysis metrics for ALM - @HughAJWood • Ensure Defect and Metric policies are in place • Delegate the responsibility for collating data to a developer • Use code quality tools to keep records of progress • Use gathered metrics to inform Business • Decide on course of action and plan
  28. 28. Mastering code analysis metrics for ALM - @HughAJWood

×