Successfully reported this slideshow.

Code Quality Learn, Measure And Organize Awareness

3,111 views

Published on

Code Quality - Learn, Measure and Organize Awareness

Published in: Technology, Business
  • Be the first to comment

Code Quality Learn, Measure And Organize Awareness

  1. 1. <ul><li>Code Quality : </li></ul><ul><li>Learn, Measure and Organize Awareness </li></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  2. 2. JAIBEER MALIK <ul><li>2004 B.Tech from IIT KGP </li></ul><ul><li>Total 5 years of IT Experience in software development </li></ul><ul><li>Former Employers: Sapient, Globallogic </li></ul><ul><li>Currently working as Senior Consultant with Xebia </li></ul><ul><li>Certified Scrum Master </li></ul><ul><li>Experienced in: Java, J2ee, Unix, Flex, Distributed Agile. </li></ul><ul><li>Thumb rule: Delivering Quality solution to all software problems </li></ul><ul><li>Hobbies: Swimming, Basketball, Volleyball, Cricket...Sports </li></ul><ul><li>Web: http://jaibeermalik.wordpress.com </li></ul><ul><li>Profile: http://www.linkedin.com/in/jaibeermalik </li></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  3. 3. Agenda <ul><li>Common Questions </li></ul><ul><li>Code Quality? </li></ul><ul><li>Part I: Learn </li></ul><ul><li>Part II: Measure </li></ul><ul><li>Part III: Organize Awareness </li></ul><ul><li>References </li></ul><ul><li>Questions </li></ul><ul><li>Feedback </li></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  4. 4. Common Questions (Developer)? Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  5. 5. Common Questions (Manager)? Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  6. 6. Common Questions (Team)? Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  7. 7. Code Quality? <ul><li>#Source_code_quality </li></ul><ul><ul><li>“ A computer has no concept of &quot;well-written&quot; source code. However, from a human point of view source code can be written in a way that has an effect on the effort needed to comprehend its behavior. Many source code programming style guides, which often stress readability and usually language-specific conventions are aimed at reducing the cost of source code maintenance.” </li></ul></ul><ul><li>Complaining about Other People's Code </li></ul><ul><ul><li>“ W hen we first encounter a new software system we are, in Dunning and Kruger’s terminology, incompetent compared to the programmers that wrote it.” </li></ul></ul><ul><li>Things you should never do </li></ul><ul><ul><li>“ It’s harder to read code than to write it.” </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  8. 8. Code Quality - WTFs? Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  9. 9. PART I: Learn <ul><li>Focus On Fundamentals </li></ul><ul><ul><li>Start with Basics </li></ul></ul><ul><ul><li>Material </li></ul></ul><ul><ul><li>Games </li></ul></ul><ul><li>How to write Clean Code </li></ul><ul><li>Figure out bad smells and improve code </li></ul><ul><ul><li>WTFs and Refactoring </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  10. 10. Focus On Fundamentals <ul><li>Start with Basics </li></ul><ul><ul><li>Design Principles (S.O.L.I.D.) </li></ul></ul><ul><ul><li>OOA/OOD/OOP </li></ul></ul><ul><ul><li>Design Patterns </li></ul></ul><ul><ul><li>Enterprise Integration Patterns </li></ul></ul><ul><ul><li>Anti Patterns </li></ul></ul><ul><li>Material (e.g. Head First Design Patterns) </li></ul><ul><li>Games </li></ul><ul><ul><li>Patterns Poker, Name that Pattern </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  11. 11. Clean Code & Refactoring <ul><li>How to write clean code </li></ul><ul><ul><li>Clean Code </li></ul></ul><ul><ul><li>Implementation Patterns </li></ul></ul><ul><ul><li>Code Complete </li></ul></ul><ul><li>Figure out bad smells and improve code </li></ul><ul><ul><li>WTFs? </li></ul></ul><ul><ul><li>Refactoring: Improving the design of Existing code </li></ul></ul><ul><ul><li>Refactoring Catalog </li></ul></ul><ul><ul><li>Refacotring Tools </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  12. 12. PART II: Measure <ul><li>Common Problems </li></ul><ul><li>Common Measurement Criteria </li></ul><ul><li>Measurement Tools </li></ul><ul><li>Static Code Analysis </li></ul><ul><ul><li>Why SCA? </li></ul></ul><ul><ul><li>SCA Tools </li></ul></ul><ul><ul><li>Enforce Quality </li></ul></ul><ul><ul><li>WARNING!!! </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  13. 13. Common Problems <ul><li>Code Duplication </li></ul><ul><li>Big Size files </li></ul><ul><li>Unhandled exception </li></ul><ul><li>Large cyclomatic complexity </li></ul><ul><li>Infinite Loops </li></ul><ul><li>Dead code </li></ul><ul><li>Unused variables, parameters, method, classes </li></ul><ul><li>Test coverage </li></ul><ul><li>Coding standards violations </li></ul><ul><li>... </li></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  14. 14. Common Measurement Criteria <ul><li>Cyclomatic Complexity </li></ul><ul><li>Coupling </li></ul><ul><li>Abstractness </li></ul><ul><li>Stability </li></ul><ul><li>Cyclic Dependencies </li></ul><ul><li>Maintainability Index </li></ul><ul><li>ReUse ratio </li></ul><ul><li>... </li></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  15. 15. Static Code Analysis <ul><li>Why Static Code Analysis (SCA)? </li></ul><ul><li>Code Coverage Measurement Tools </li></ul><ul><ul><li>Clover, Cobertura </li></ul></ul><ul><li>SCA Tools </li></ul><ul><ul><li>PMD, FindBugs, Sonar, Simian, CheckStyle, Metrics, XRadar </li></ul></ul><ul><li>How to use SCA tools </li></ul><ul><ul><li>Integrate with build process (ant/mvn target) </li></ul></ul><ul><ul><li>Separate quality build </li></ul></ul><ul><li>Enforce Quality </li></ul><ul><ul><li>Svn pre-commit handlers </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  16. 16. PART III: Organize Awareness <ul><li>Code Quality as Knowledge/Learning </li></ul><ul><li>Why to share with-in team? </li></ul><ul><li>Share and Organize </li></ul><ul><ul><li>Pair-Programming </li></ul></ul><ul><ul><li>Share on wiki </li></ul></ul><ul><ul><li>Coding standards documents </li></ul></ul><ul><ul><li>Quality watch dog </li></ul></ul><ul><ul><li>Fix it and let people know </li></ul></ul><ul><ul><li>Technical Debt </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  17. 17. Organize Awareness: As Team <ul><li>Few points to keep in mind as team </li></ul><ul><ul><li>Pair-up more </li></ul></ul><ul><ul><li>On-going process </li></ul></ul><ul><ul><li>Share in positive way </li></ul></ul><ul><ul><li>Motivate people to fix it and share </li></ul></ul><ul><ul><li>Talk more about quality </li></ul></ul><ul><ul><li>Quality watch dog on rotation basis </li></ul></ul><ul><ul><li>Continuous watch on technical debt </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  18. 18. References <ul><li>Jai's Weblog: </li></ul><ul><ul><li>http://jaibeermalik.wordpress.com/2009/04/12/code-quality-learn-measure-and-organize-awareness/ </li></ul></ul><ul><ul><li>http://jaibeermalik.wordpress.com/2009/04/12/code-quality-learn-oops-desing-patterns-clean-code-and-refactoring/ </li></ul></ul><ul><ul><li>http://jaibeermalik.wordpress.com/2009/04/12/code-quality-measurement-static-code-analysis-tools/ </li></ul></ul><ul><ul><li>http://jaibeermalik.wordpress.com/2009/04/12/code-quality-organizing-awareness-with-in-the-team/ </li></ul></ul><ul><li>TSS: </li></ul><ul><ul><li>http://www.theserverside.com/news/thread.tss?thread_id=54245 </li></ul></ul><ul><li>InfoQ: </li></ul><ul><ul><li>http://www.infoq.com/news/2009/06/code-quality-for-teams </li></ul></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  19. 19. <ul><li>? </li></ul>Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com
  20. 20. Feedback!!! [email_address] [email_address] Follow me @ http://twitter.com/jaibeermalik http://friendfeed.com/jaibeermalik Jaibeer Malik Code Quality: Learn, Measure and Organize Awareness http://jaibeermalik.wordpress.com

×