Continuous Code Quality Improvement
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Continuous Code Quality Improvement

on

  • 1,354 views

 

Statistics

Views

Total Views
1,354
Views on SlideShare
1,354
Embed Views
0

Actions

Likes
1
Downloads
15
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Continuous Code Quality Improvement Presentation Transcript

  • 1. Continuous Code Quality Improvement --Tools & Process Navigator, 10-Oct-06
  • 2. Yesterday Better?
  • 3. Today Better! Continuous Code Quality Improvement Tools & Process
  • 4. Tools Summary Code Quality Coding Standard Comment Unit Test Others… Fxcop Ncover Ndoc
  • 5. Tools: Fxcop
    • Coding Standard Examples
      • Don’t declare visible instance fields
      • Pass base type as parameters
      • Nested type should not be visible
    • Rule
      • One rule to one coding standard
    • Fxcop
      • Check code according to rules
      • Rules container
      • Plugable
    Introduction
  • 6. Tools: Fxcop
    • Our Company’s Coding Standard
      • Method must begin with upper case
      • Const values should never be public
      • Must log an exception as soon as it’s caught
    • Extended Rule
      • Implement a small set of Rule API
      • Use Fxcop’s Introspection Engine
    Extension
  • 7. Tools: NCover
    • Accurate unit test coverage
    • Clear indication of where to enhance unit test
      • Requirement
    We expect We need
    • An actual and clear statistics like this:
  • 8. Tools: NCover
      • Introduction
    Code coverage
    • A measure for software testing
    NCover
    • A code coverage tool for .NET
  • 9. Tools: NCover
      • Practice
    Extension: NCoverEx
    • Multiple execute in a loop for single assembly
    • Reformat to statistic table and filter output for non-private methods
  • 10. Tools: NDoc
    • Complete and clear comments
    • A statistics of missing common comments
      • Class Declaration
      • Method Declaration
    • A statistics of missing special comments
      • Whether a parameter or returned value could possibly be null
      • Whether a parameter or returned value could possibly be empty if it is string type
      • Whether a parameter or returned value could possibly be empty if it is collection type
    Requirement
  • 11. Tools: NDoc
    • About Ndoc
      • Generates Documentation for .NET Code
      • Multiple Doc Formats Support
      • Open-Source
    • Extension
    Practice
  • 12. Process Summary Fix & Update Status Discuss Washup Items Claim Publish Check
  • 13. Process: Check
    • One Master for Each Tool
    • Every Week
    • Two Phase
      • Phase1 – Partial and Incremental
        • Fxcop - Sort rules by message level
        • NCover - Missing test classes; Missing test methods
        • NDoc - Fixed count for each component
      • Phase2 – Select All
  • 14. Process: Publish & Claim
    • Uniform Excel Output
    • Claim Items
      • ASAP by Self
      • Generally by Component Ownership
      • by Primitive Authorship
  • 15. Process: Fix & Update Status
    • Must finish by weekend
    • Fit into daily work by each self freely
    • Get help or change ownership if necessary
    • Exclude with reasons
  • 16. Process: Discuss Discuss
    • On Demand
      • After publishing, fix&update, or anytime else
    • Lightweight
      • Discuss Fxcop rules
      • Discuss difficulty in writing unit tests
      • Discuss comment standard
      • Discuss how to further extend Fxcop/Ndoc/NCover
  • 17. Conclusion Yes No Funny Find/Develop Better Tools and Process Find Mistakes Work Focus All Corrected, Easy to Review&Track Limited Corrections, No Review and Track Fix Mistakes Auto, Quick, All Results by Tools Manually, Time-cost, Limited Results Check Mistakes 1 week An Iteration (6 weeks) Frequency Today Yesterday
  • 18. Limits Work Load of Tool Extension Measure & Check of Software Design Class TestClass MethodA MethodB TestMethod1 TestMethod2 TestMethod3 More Accurate Unit Test Coverage
  • 19. Tomorrow
    • From Weekly To Daily
      • Easy to Append Missing Comments and Unit Test Methods
      • Keep Few Mistakes All Along
      • Ultimately Test-Driven Realized
    • Big Rule Repository
    • More and Smarter Tools
  • 20. Thanks