Your SlideShare is downloading. ×
0
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Continuous Code Quality Improvement
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Continuous Code Quality Improvement

943

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
943
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

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

×