Source Code Analysis in an Agile WorldTodd Landry – Senior Product Manager
About Me13+ years in Product ManagementKlocwork PM for 2+ yearsWorked with multiple Agile teamsCertified Scrum Product OwnerContact Info:EMAIL: todd.landry@klocwork.comTWITTER: http://twitter.com/todd_landryBLOG: http://www.klocwork.com/blog
Before We Get Started	Not a sales pitchIntended as an educational sessionProvides a high level overview of Agile and Static Code analysisUnderstand how they can work together
Agenda  Agile OverviewIntroducing Static Code Analysis Adopting tools into AgileHow Klocwork Fits in AgileSummaryQuestions
Agile Adoption Has Reached Mainstream Proportions“Please select the methodology that most closely reflects the development process you are currently using.”  (select only one)Source: Forrester/Dr. Dobb’s Global Developer Technographics® Survey, Q3 2009  |  Forrester Research, Inc.
Who Uses Agile?Software organizations everywhereAerospace: Raytheon, Northrup GrummanAutomotive: GM, DaimlerChryslerBanking: Merrill Lynch & Co., T. Rowe Price GroupCommunications: Verizon Wireless, SBC...
Why Agile? What’s Wrong With Waterfall ?Nothing really, still the most widely used development methodology todayMost predictable of all methods...you know (for the most part), what you’re getting and approximately whenWell documented set of requirements (and most everything else)Structured approach (not chaos like those Agile-guys)However, there are drawbacksCommitments are made early on, and are difficult and costly to change Not always sure you will meet the market needs at release timeRisk is pushed to the end of the development period during testing phasesHard to react to problems when so late in the development process
Why Agile?Visibility - stakeholder collaboration and validation throughout the development life-cycle Value - continuous delivery of much more measurable business value Adaptability - the ability to rapidly respond to changes in strategy, priorities, and plans Risk - the reduction in aggregate project risk as a result of #1-3 aboveSo what is Agile development?
Introduction To AgileAgile first surfaced in mid-1990’sReaction to waterfall development Bureaucratic, slow, and inconsistent with the ways that software developers actually perform effective workDifferent ‘types’ of AgileScrumXPFeature driven developmentLean developmentAdaptive Software DevelopmentDynamic Systems Development Method (DSDM)Kanban
SCA in an Agile World | June 2010
Agile Manifesto SummarizedAgile development is an approachContinuous and rapid delivery of working softwareEmbrace changeCollaboration and communicationAll about the TeamSimplicity
Agile vs. WaterfallWaterfall DevelopmentAgile DevelopmentVerificationImplementationMaintenanceDesignRequirementsx months/years2-4 weeks
Typical Agile Process24 h2-4 WeeksProduct BacklogIteration BacklogIterationWorking Increment of the software
The IterationVerificationImplementation/DevelopmentDesignDeployment/Maintenance
What Happens with Bugs in Agile?During the iteration, bug fixes are addressed before any new feature/task is startedAt the end of an iteration, any outstanding bugs typically go to the top of the list for the next iterationNew features are not started until all bugs are fixedSchedule starts to slipMorale can declineBACKLOGAwesome Feature 1Cool Feature 2Cool Feature 3
SCA in an Agile World | June 2010
Introduction toSource Code Analysis
Source Code Analysis (SCA) – The BasicsWhat is source code analysis?The analysis of computer software (source code) that is performed without actually executing programs built from that software.Automated code analysis technology finds weaknesses in source code Logic errors and implementation defectsSecurity vulnerabilitiesArchitecture validityConcurrency violations and rare boundary conditions Software metrics generation and managementDistinct from more traditional dynamic analysis techniques, such as unit or penetration testsUnderlying technology is called static analysisWork is performed at build time using only the source code of the program or moduleComplete view of every possible execution path, rather than an aspect of observed runtime behaviorConfidential
SCA – A History Lesson1st Generation SCA2nd Generation SCA3rd Generation SCA1970’s2000Today
Source Code Analysis - Historical perspectiveLint was invented as a developer’s toolLots of problems with the modelNoise, inaccuracies, too-small a locality of referenceBut it was always intended to “just give better compiler errors to the developer”Seen by developers as “opt-in” and “mine”What was Lint doing?Scanning, initiallyLooking for “known aberrant” problems with CMissing / extra semi-colonsMissing curlicuesPotentially dangerous implicit casts
SCA – A History Lesson1st Generation SCA2nd Generation SCA3rd Generation SCA1970’s2000Today
Source Code Analysis - Historical perspective2nd generation static analysis provided better core analysis capabilities that extended beyond syntactical and semantic analyses to include:Sophisticated inter-procedural, control- and data-flow analysis New approaches for pruning false pathsEstimating the values that variables will assumeSimulating potential runtime behaviorMoved away from being a developer toolIn order to produce good analysis, must do it at integration buildSo it’s not part of the developer’s workflow, it’s asynchronousSo when a bug is found it’s too lateThe developer is already on some other task and must be dragged back
What kind of bugs?Local bugs vs. inter-procedural bugsLocal bugs are “easier” to find, and certainly easier to understandPicture “slapping head”Inter-procedural bugs are the big payoffsDifficult for different developers working on projects to deal with each other’s code rationallyLots of fingers in lots of pies = lots (and lots) of bugsWhat kinds of bugs?Resource managementPointer management (and yes, this means Java too)Security vulnerabilities (injections, overflows, naivety, stupidity, …)Concurrency
The Costs of Bug Containment2nd Generation Source Code AnalysisConfidential
SCA – A History Lesson1st Generation SCA2nd Generation SCA3rd Generation SCA1970’s2000Today
3rd Generation Source Code AnalysisDeliver 2nd generation analysis capabilities right to the developer desktopFocus on enabling the developer, not blaming themIf the tool is “mine” I’m more likely to use it when I’m in processIf I use it in process, I’ll find and understand the bugs more quicklyIf I understand the bugs, I’ll fix them fasterIf I fix the bugs, the code stream isn’t polluted,                                                     my QA time isn’t wasted, and my product gets betterBottom lineDon’t check in code that doesn’t work!Build defensive coding into the organization from the                                  ground upNarrow the gap between the rock stars and the internsMake a better product
The Costs of Bug Containment2nd Generation Source Code AnalysisConfidential
The Costs of Bug Containment3rd Generation Source Code Analysis2nd Generation Source Code AnalysisConfidential
The Iteration with SCAVerificationImplementation/DevelopmentDesignDeployment/Maintenance
SCA in an Agile World | June 2010
SCA in an Agile World | June 2010
Adopting Tools for Agile
Agile team membersDevelopers have their feet under the table nowProvide input on what’s being doneDetermine whether it makes senseAgile tools tend to cater to the process of teamingProduct manager toolsProject manager toolsTime management toolsCustomer relationship toolsSo where do we come in?None of these tools are targeted at the developer
There are very few developer tools…Continuous integrationOK, but is that all there is?CI helps out with the production processWhere are the tools for actual development?Some IDEs / languages are awesomeJava, Ruby, Python, all great productive languagesC/C++, not so muchAgile isn’t just web pages and prototypesMission critical applications are being developed using Agile nowAnd they use those unpleasant languages.
Agile developer tools?We all know that Agile isn’t about tools, we’ve all read itFirst thing the manifesto breaks out“Individuals and interactions over processes and tools”Times have changed…so have the tools…What kind of tools could help Agile developers?Architectural coherence and sustainabilityRefactoring supportOrganic peer review
How Does Klocwork Help?
Klocwork Agile Desktop	Early Defect DetectionCollaborative MitigationRefactoringCode Review
Find Defects Really EarlyAgile requires a product every iterationIf you don’t hit that milestone, then you fix first, implement later in the next iterationThe worse it gets, the more bug debt you accumulateVelocity deteriorates the further into the project you getBug debt kills projectsLow velocity  Low morale  Angry (or at best skeptical) customersUntil, finally… “This process doesn’t work!”So fix early, fix oftenMaintain high quality, low bug debt, high velocity
Klocwork in Visual Studio
Keep Everyone in the LoopShort iterations require rapid communicationKlocwork provides collaborative mitigation for all reported issuesDevelopers can change the status/add comments for these issuesStatus changes and added comments are automatically synchronized with other developersNo duplication of issue fixesComplex bugs can be worked on/tracked as a team
Refactoring…OK, but why?Refactoring = The process of simplifying and clarifying code without changing the program’s behaviourWell established practice in the Agile development processDevelopers do this all the time…but it’s hard to doNeed ways to do this faster, more efficientlyAnything that has a lifecycle to it needs to be created thinking of the futureIn a development team, the future frequently means different peopleMake the code you’re creating as simple to inherit as possibleSo refactor early, refactor often
RefuctoringRefuctoring is the process of taking a well designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anyone other than yourselfCommon refuctorings include:Pig Latin (for naming conventions)Treasure huntRainy day moduleDeveloper foxholeThe Waterfall Alliance
Code ReviewAlmost always part of the development process, but is:Time consumingBelittlingBoringEmbarrassing
Code Reviews – Mandatory“To what extent are code reviews a part of your regular release cycle?”87%Source: A commissioned study conducted by Forrester Consulting on behalf of Klocwork, February 2010
Klocwork InspectSo how have we changed code reviews?Organic, bottom-up, rather than imposed, top-downPeer-based, not hierarchicalEarly and often, not after the factAsynchronous, rather than “around the table”Defects found through SCA integrated into the code reviewDon’t bring the person to the review, bring the review to the person
How much can Klocwork help? Some examples...2 week iteration & 10 person team5 stories – 300LOC/storyReal world customer ROI examples…Lawrence Livermore saved $200,000 on 365 KLOC projectMotorola reduced # of issues found at System Test by 50%Mentor Graphics found 1000 bugs with no involvement from testing
All Good Stuff...But	There needs to be a balanceTools must help develop better code, and not hinder individual interaction   Tools must do the job with minimal effort, and minimal side effectsBe flexible...Fit the tool to the team, not the team to the tool...otherwise you’re toast!
SummaryAgile is a development methodologyMany different flavours...Klocwork can help in all of themKlocwork provides tools for the developerFinding issues as early as possible in the SDLC eliminating costly reworkAllowing near-real time collaboration on issuesAllowing users to refactor their code for better consistencyProvide a non-intrusive process for a critical (but painful) component of software development...the code review

More Related Content

PDF
Professional Software Development, Practices and Ethics
PDF
Global Day of Coderetreat'14 - Istanbul Event
PDF
GMO'less Software Development Practices
PPT
Agile Austin - Peer Code Review An Agile Process
PPTX
Agile and Agile methods: what is the most important to understand to succeed
PDF
DevOps & Technical Agility: From Theory to Practice
PDF
Big Ball of Mud: Software Maintenance Nightmares
PDF
Clean Software Design - DevNot Summit Istanbul 2017
Professional Software Development, Practices and Ethics
Global Day of Coderetreat'14 - Istanbul Event
GMO'less Software Development Practices
Agile Austin - Peer Code Review An Agile Process
Agile and Agile methods: what is the most important to understand to succeed
DevOps & Technical Agility: From Theory to Practice
Big Ball of Mud: Software Maintenance Nightmares
Clean Software Design - DevNot Summit Istanbul 2017

What's hot (20)

PDF
Waste Driven Development - Agile Coaching Serbia Meetup
PDF
Fighting with Waste Driven Development - XP Days Ukraine 2017
PDF
Digital transformation testing.
PDF
Solving the 3 Biggest Questions in Continuous Testing
PDF
Clean Software Design: The Practices to Make The Design Simple
PPTX
How to Embed Codeless Test Automation Into DevOps
PDF
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
PDF
Agile archiecture iltam 2014
PPTX
agile vs. traditional methodologies
PPT
Evolution of Agile Testing
PDF
Unwritten Manual for Pair Programming
PPT
Waterfallacies V1 1
PPTX
Agile vs. DevOps for Continuous Testing: How to Optimize Your Pipeline
PPT
Agile Engineering Practices
PPT
Continuous Integration
PPTX
Evolution of Software Engineering in NCTR Projects
PDF
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
PDF
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
PPTX
Tdd 4 everyone full version
PPTX
Risk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
Waste Driven Development - Agile Coaching Serbia Meetup
Fighting with Waste Driven Development - XP Days Ukraine 2017
Digital transformation testing.
Solving the 3 Biggest Questions in Continuous Testing
Clean Software Design: The Practices to Make The Design Simple
How to Embed Codeless Test Automation Into DevOps
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Agile archiecture iltam 2014
agile vs. traditional methodologies
Evolution of Agile Testing
Unwritten Manual for Pair Programming
Waterfallacies V1 1
Agile vs. DevOps for Continuous Testing: How to Optimize Your Pipeline
Agile Engineering Practices
Continuous Integration
Evolution of Software Engineering in NCTR Projects
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Tdd 4 everyone full version
Risk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
Ad

Viewers also liked (8)

PPT
Improving Development Productivity: Static Analysis and Continuous Integration
PPT
Introducing: Klocwork Insight Pro | November 2009
PPT
Code Review | 2010
PPT
Advanced Architecture Analysis | January 2010
PDF
Klocwork_Detected_Java_Defects
PPTX
Using static analysis tools within continuous integration systems
PDF
Study: The Future of VR, AR and Self-Driving Cars
PDF
Hype vs. Reality: The AI Explainer
Improving Development Productivity: Static Analysis and Continuous Integration
Introducing: Klocwork Insight Pro | November 2009
Code Review | 2010
Advanced Architecture Analysis | January 2010
Klocwork_Detected_Java_Defects
Using static analysis tools within continuous integration systems
Study: The Future of VR, AR and Self-Driving Cars
Hype vs. Reality: The AI Explainer
Ad

Similar to SCA in an Agile World | June 2010 (20)

PPT
Peer Code Review An Agile Process
PPT
Agile And Open Development
PPTX
Devops Introduction nd basics of DevOps.
PPTX
Software-Engineering-and-Best-Practices.
PDF
Best Practices In Software Development Life Cycle (SDLC)
PDF
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
PPT
Introduction to Software Engineering
PPT
Agile Software Development Overview
PPTX
SAD07 - Project Management
PPT
Agile intro resources
PPTX
Introducing Continuous Integration Using Vsts
PPTX
Software development process basic
PPTX
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
PPTX
A Lap Around Visual Studio 2010
PPTX
Agile & DevOps - It's all about project success
PDF
DevOps for Defenders in the Enterprise
PDF
DevOps for the Discouraged
PPT
Why Agile? Why Now? IPMA Forum 2009
ODP
Agile Engineering
PPT
Part5 - enforcing coding standard and best practices with jas forge v1.0
Peer Code Review An Agile Process
Agile And Open Development
Devops Introduction nd basics of DevOps.
Software-Engineering-and-Best-Practices.
Best Practices In Software Development Life Cycle (SDLC)
Markus Clermont - Surviving in an Agile Environment - Google - SoftTest Ireland
Introduction to Software Engineering
Agile Software Development Overview
SAD07 - Project Management
Agile intro resources
Introducing Continuous Integration Using Vsts
Software development process basic
Ben Walters - Creating Customer Value With Agile Testing - EuroSTAR 2011
A Lap Around Visual Studio 2010
Agile & DevOps - It's all about project success
DevOps for Defenders in the Enterprise
DevOps for the Discouraged
Why Agile? Why Now? IPMA Forum 2009
Agile Engineering
Part5 - enforcing coding standard and best practices with jas forge v1.0

Recently uploaded (20)

PDF
Co-training pseudo-labeling for text classification with support vector machi...
PDF
Advancing precision in air quality forecasting through machine learning integ...
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PPTX
Internet of Everything -Basic concepts details
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
SaaS reusability assessment using machine learning techniques
Co-training pseudo-labeling for text classification with support vector machi...
Advancing precision in air quality forecasting through machine learning integ...
Build automations faster and more reliably with UiPath ScreenPlay
SGT Report The Beast Plan and Cyberphysical Systems of Control
Internet of Everything -Basic concepts details
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
giants, standing on the shoulders of - by Daniel Stenberg
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Presentation - Principles of Instructional Design.pptx
CEH Module 2 Footprinting CEH V13, concepts
Auditboard EB SOX Playbook 2023 edition.
Aug23rd - Mulesoft Community Workshop - Hyd, India.pdf
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
EIS-Webinar-Regulated-Industries-2025-08.pdf
A symptom-driven medical diagnosis support model based on machine learning te...
SaaS reusability assessment using machine learning techniques

SCA in an Agile World | June 2010

  • 1. Source Code Analysis in an Agile WorldTodd Landry – Senior Product Manager
  • 2. About Me13+ years in Product ManagementKlocwork PM for 2+ yearsWorked with multiple Agile teamsCertified Scrum Product OwnerContact Info:EMAIL: [email protected]: http://twitter.com/todd_landryBLOG: http://www.klocwork.com/blog
  • 3. Before We Get Started Not a sales pitchIntended as an educational sessionProvides a high level overview of Agile and Static Code analysisUnderstand how they can work together
  • 4. Agenda Agile OverviewIntroducing Static Code Analysis Adopting tools into AgileHow Klocwork Fits in AgileSummaryQuestions
  • 5. Agile Adoption Has Reached Mainstream Proportions“Please select the methodology that most closely reflects the development process you are currently using.” (select only one)Source: Forrester/Dr. Dobb’s Global Developer Technographics® Survey, Q3 2009 | Forrester Research, Inc.
  • 6. Who Uses Agile?Software organizations everywhereAerospace: Raytheon, Northrup GrummanAutomotive: GM, DaimlerChryslerBanking: Merrill Lynch & Co., T. Rowe Price GroupCommunications: Verizon Wireless, SBC...
  • 7. Why Agile? What’s Wrong With Waterfall ?Nothing really, still the most widely used development methodology todayMost predictable of all methods...you know (for the most part), what you’re getting and approximately whenWell documented set of requirements (and most everything else)Structured approach (not chaos like those Agile-guys)However, there are drawbacksCommitments are made early on, and are difficult and costly to change Not always sure you will meet the market needs at release timeRisk is pushed to the end of the development period during testing phasesHard to react to problems when so late in the development process
  • 8. Why Agile?Visibility - stakeholder collaboration and validation throughout the development life-cycle Value - continuous delivery of much more measurable business value Adaptability - the ability to rapidly respond to changes in strategy, priorities, and plans Risk - the reduction in aggregate project risk as a result of #1-3 aboveSo what is Agile development?
  • 9. Introduction To AgileAgile first surfaced in mid-1990’sReaction to waterfall development Bureaucratic, slow, and inconsistent with the ways that software developers actually perform effective workDifferent ‘types’ of AgileScrumXPFeature driven developmentLean developmentAdaptive Software DevelopmentDynamic Systems Development Method (DSDM)Kanban
  • 11. Agile Manifesto SummarizedAgile development is an approachContinuous and rapid delivery of working softwareEmbrace changeCollaboration and communicationAll about the TeamSimplicity
  • 12. Agile vs. WaterfallWaterfall DevelopmentAgile DevelopmentVerificationImplementationMaintenanceDesignRequirementsx months/years2-4 weeks
  • 13. Typical Agile Process24 h2-4 WeeksProduct BacklogIteration BacklogIterationWorking Increment of the software
  • 15. What Happens with Bugs in Agile?During the iteration, bug fixes are addressed before any new feature/task is startedAt the end of an iteration, any outstanding bugs typically go to the top of the list for the next iterationNew features are not started until all bugs are fixedSchedule starts to slipMorale can declineBACKLOGAwesome Feature 1Cool Feature 2Cool Feature 3
  • 18. Source Code Analysis (SCA) – The BasicsWhat is source code analysis?The analysis of computer software (source code) that is performed without actually executing programs built from that software.Automated code analysis technology finds weaknesses in source code Logic errors and implementation defectsSecurity vulnerabilitiesArchitecture validityConcurrency violations and rare boundary conditions Software metrics generation and managementDistinct from more traditional dynamic analysis techniques, such as unit or penetration testsUnderlying technology is called static analysisWork is performed at build time using only the source code of the program or moduleComplete view of every possible execution path, rather than an aspect of observed runtime behaviorConfidential
  • 19. SCA – A History Lesson1st Generation SCA2nd Generation SCA3rd Generation SCA1970’s2000Today
  • 20. Source Code Analysis - Historical perspectiveLint was invented as a developer’s toolLots of problems with the modelNoise, inaccuracies, too-small a locality of referenceBut it was always intended to “just give better compiler errors to the developer”Seen by developers as “opt-in” and “mine”What was Lint doing?Scanning, initiallyLooking for “known aberrant” problems with CMissing / extra semi-colonsMissing curlicuesPotentially dangerous implicit casts
  • 21. SCA – A History Lesson1st Generation SCA2nd Generation SCA3rd Generation SCA1970’s2000Today
  • 22. Source Code Analysis - Historical perspective2nd generation static analysis provided better core analysis capabilities that extended beyond syntactical and semantic analyses to include:Sophisticated inter-procedural, control- and data-flow analysis New approaches for pruning false pathsEstimating the values that variables will assumeSimulating potential runtime behaviorMoved away from being a developer toolIn order to produce good analysis, must do it at integration buildSo it’s not part of the developer’s workflow, it’s asynchronousSo when a bug is found it’s too lateThe developer is already on some other task and must be dragged back
  • 23. What kind of bugs?Local bugs vs. inter-procedural bugsLocal bugs are “easier” to find, and certainly easier to understandPicture “slapping head”Inter-procedural bugs are the big payoffsDifficult for different developers working on projects to deal with each other’s code rationallyLots of fingers in lots of pies = lots (and lots) of bugsWhat kinds of bugs?Resource managementPointer management (and yes, this means Java too)Security vulnerabilities (injections, overflows, naivety, stupidity, …)Concurrency
  • 24. The Costs of Bug Containment2nd Generation Source Code AnalysisConfidential
  • 25. SCA – A History Lesson1st Generation SCA2nd Generation SCA3rd Generation SCA1970’s2000Today
  • 26. 3rd Generation Source Code AnalysisDeliver 2nd generation analysis capabilities right to the developer desktopFocus on enabling the developer, not blaming themIf the tool is “mine” I’m more likely to use it when I’m in processIf I use it in process, I’ll find and understand the bugs more quicklyIf I understand the bugs, I’ll fix them fasterIf I fix the bugs, the code stream isn’t polluted, my QA time isn’t wasted, and my product gets betterBottom lineDon’t check in code that doesn’t work!Build defensive coding into the organization from the ground upNarrow the gap between the rock stars and the internsMake a better product
  • 27. The Costs of Bug Containment2nd Generation Source Code AnalysisConfidential
  • 28. The Costs of Bug Containment3rd Generation Source Code Analysis2nd Generation Source Code AnalysisConfidential
  • 29. The Iteration with SCAVerificationImplementation/DevelopmentDesignDeployment/Maintenance
  • 33. Agile team membersDevelopers have their feet under the table nowProvide input on what’s being doneDetermine whether it makes senseAgile tools tend to cater to the process of teamingProduct manager toolsProject manager toolsTime management toolsCustomer relationship toolsSo where do we come in?None of these tools are targeted at the developer
  • 34. There are very few developer tools…Continuous integrationOK, but is that all there is?CI helps out with the production processWhere are the tools for actual development?Some IDEs / languages are awesomeJava, Ruby, Python, all great productive languagesC/C++, not so muchAgile isn’t just web pages and prototypesMission critical applications are being developed using Agile nowAnd they use those unpleasant languages.
  • 35. Agile developer tools?We all know that Agile isn’t about tools, we’ve all read itFirst thing the manifesto breaks out“Individuals and interactions over processes and tools”Times have changed…so have the tools…What kind of tools could help Agile developers?Architectural coherence and sustainabilityRefactoring supportOrganic peer review
  • 37. Klocwork Agile Desktop Early Defect DetectionCollaborative MitigationRefactoringCode Review
  • 38. Find Defects Really EarlyAgile requires a product every iterationIf you don’t hit that milestone, then you fix first, implement later in the next iterationThe worse it gets, the more bug debt you accumulateVelocity deteriorates the further into the project you getBug debt kills projectsLow velocity  Low morale  Angry (or at best skeptical) customersUntil, finally… “This process doesn’t work!”So fix early, fix oftenMaintain high quality, low bug debt, high velocity
  • 40. Keep Everyone in the LoopShort iterations require rapid communicationKlocwork provides collaborative mitigation for all reported issuesDevelopers can change the status/add comments for these issuesStatus changes and added comments are automatically synchronized with other developersNo duplication of issue fixesComplex bugs can be worked on/tracked as a team
  • 41. Refactoring…OK, but why?Refactoring = The process of simplifying and clarifying code without changing the program’s behaviourWell established practice in the Agile development processDevelopers do this all the time…but it’s hard to doNeed ways to do this faster, more efficientlyAnything that has a lifecycle to it needs to be created thinking of the futureIn a development team, the future frequently means different peopleMake the code you’re creating as simple to inherit as possibleSo refactor early, refactor often
  • 42. RefuctoringRefuctoring is the process of taking a well designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anyone other than yourselfCommon refuctorings include:Pig Latin (for naming conventions)Treasure huntRainy day moduleDeveloper foxholeThe Waterfall Alliance
  • 43. Code ReviewAlmost always part of the development process, but is:Time consumingBelittlingBoringEmbarrassing
  • 44. Code Reviews – Mandatory“To what extent are code reviews a part of your regular release cycle?”87%Source: A commissioned study conducted by Forrester Consulting on behalf of Klocwork, February 2010
  • 45. Klocwork InspectSo how have we changed code reviews?Organic, bottom-up, rather than imposed, top-downPeer-based, not hierarchicalEarly and often, not after the factAsynchronous, rather than “around the table”Defects found through SCA integrated into the code reviewDon’t bring the person to the review, bring the review to the person
  • 46. How much can Klocwork help? Some examples...2 week iteration & 10 person team5 stories – 300LOC/storyReal world customer ROI examples…Lawrence Livermore saved $200,000 on 365 KLOC projectMotorola reduced # of issues found at System Test by 50%Mentor Graphics found 1000 bugs with no involvement from testing
  • 47. All Good Stuff...But There needs to be a balanceTools must help develop better code, and not hinder individual interaction Tools must do the job with minimal effort, and minimal side effectsBe flexible...Fit the tool to the team, not the team to the tool...otherwise you’re toast!
  • 48. SummaryAgile is a development methodologyMany different flavours...Klocwork can help in all of themKlocwork provides tools for the developerFinding issues as early as possible in the SDLC eliminating costly reworkAllowing near-real time collaboration on issuesAllowing users to refactor their code for better consistencyProvide a non-intrusive process for a critical (but painful) component of software development...the code review

Editor's Notes

  • #43: Introduce variable = introducewayariablevayRename = enameray
  • #47: Good chance to wrap-up and pitch the ROI. Mention that as the customer goes through the POC w/ Klocwork we’ll develop an ROI based on their defect data & assumptions.Assumptions:10 person team (fairly standard size), 2 week iterations, 5 stories/iteration based on experience with various teams/customers, each story creates about 300 LOCBug Detection:Based on data from our customer base, SCA finds approximately 3 bugs for every 1000 LOC. In a case study (from Johns Hopkins...which isn’t yet available, so don’t quote), this customer determined that by using SCA (Klocwork) they were able to save 4 hours/bug.Developers now have an additional 18 hours/iteration to work on new stories rather than fixing defects.Refactoring:Refactoring is all about making your code more inheritable for the next developer who may work on it. In this case, the savings is small per developer, about ¼ of an hour.Developers now have an additional 12.5 hours to work on stories, since they are able to understand the intent of the code quickly.Code Review:Assumption – Code review includes 4 developers in a 1 hour meeting (for a total of 4 developer hours)In a study done at the Royal Military College of Canada, it was determined that developers were 50% more efficient when allowed to review code when/where they wanted to (i.e. Reading it on their desktop) than by performing the same code review in a meeting. Developers now have an additional 10 hours to work on productive development activities.Real world ROI examplesLLNL - http://www.nxtbook.com/nxtbooks/sqe/bettersoftware0708/index.php?startid=36Moto – from Motorola case study http://www.klocwork.com/resources/case-study/motorolaMentor – from Kevin Pendleton customer quote