670 likes | 825 Views
SESSION CODE: DPR306. Metrics That Matter Real Measures to Improve Software Development . Steven Borg, Principal ALM Consultant Northwest Cadence Steven.Borg@nwcadence.com.
E N D
SESSION CODE: DPR306 Metrics That Matter Real Measures to Improve Software Development Steven Borg, Principal ALM Consultant Northwest Cadence Steven.Borg@nwcadence.com
Every ‘best in class’ company measures software quality. There are no exceptions. If your company does not do this it is not an industry leader and there is a good chance that your software quality levels are marginal at best. • Capers Jones, Applied Software Measurement
Clichés. True? • You get what you measure. • If you don’t measure it, you can’t manage it. • You cannot improve what you can’t measure. • Garbage in, garbage out. • If you don’t measure it, it’s just a hobby. • "You can't manage what you can't control, and you can't control what you don't measure. " • Tom DeMarco
Metrics Matter • Without metrics you can’t predict • Without metrics you can’t judge quality • Without metrics you can’t accurately estimate • Without metrics you can’t measure impacts • Without metrics you can’t improve consistently
Questions for you. • Is your development team more effective that they were 4 years ago? • How effective was your last dev tool purchase? • How effective was your last process improvement initiative? • What percentage of bugs get removed prior to shipping? • What is your velocity? Throughput? • Other questions?
What makes a metric effective? Defining metrics that matter
Honest? Before After Print 1.ToString() Print 2.ToString() Print 3.ToString() Print 4.ToString() Print 5.ToString() Print 6.ToString() Print 7.ToString() Print 8.ToString() Print 9.ToString() Print 10.ToString() For i=1 To 10 Do Print i.ToString() Next i 3x more productive?
True Metrics vs Proxy Metrics • True Metric • What you SHOULD measure • Proxy Metric • What you CAN measure
Focus on the true metric, not proxy metrics Tip #1
Determining the right metrics • Collecting metrics has a cost • At a minimum that cost includes time and effort • Tools such as Team Foundation Server can help dramatically reduce overall cost of metric collection and simplify gathering metrics • Collect only those metrics that you can directly leverage to improve your process, or validate an improvement • With powerful tools, there is a tendency to want to collect “everything” – this is a mistake
“The companies that wish to improve but do not measure are at the mercy of fads and chance. Progress may not be impossible, but it is certainly unlikely.” (Capers Jones, p. 67)
ITIL Seven Step Improvement Process • Define what you should measure. • Define what you can measure. • Gather the data. • Who? How? When? Integrity of the data. • Process the data. • Frequency, format, system, accuracy • Analyze the data. • Relationships, trends, according to plan, targets met, corrective action • Present and use the information. • Implement the corrective action.
Standardize by setting triggers to alert you to slips in prior metrics Tip #3
Some widely used metrics with proven value A few effective metrics
Quality Metrics • Defect Removal Efficiency • Warning: Not always “simple” • Code Coverage • Warning: Not always “honest” • Performance Profiling • Code Coverage • Test Cases per feature • Bugs per feature (bug density metrics)
Sizing Metrics • Lines of Code • Warning: Not always “honest” • Function Points • Warning: Not “simple” • Effort (in hours, days, weeks, etc) • Warning: Not always “honest” or “comparable” • Story Points • Warning: Rarely “comparable”
Productivity Metrics • Velocity • Warning: Not always “simple” • Throughput • Lines of Code / Developer / Day (???) • Quality* • Note: Defect Removal Efficiency is highly correlated with Productivity • So highly correlated it can often act as proxy metric for productivity
User Metrics • User satisfaction • Warning: Not always “comparable” • Post-release bug count • Number of Help Desk calls • Warning: Not always “honest”
Business Metrics • Schedule Estimation Accuracy • Warning: Not always “honest” • Cost Estimation Accuracy • Warning: Not always “honest” • Scope Estimation Accuracy • Warning: Rarely “honest” • ROI Estimation Accuracy • Warning: Rarely “simple”, Not always “honest”
First identify your problem, THEN identify the metric Tip #4
Balance introduction of new metrics across different categories Tip #5
The problem today is not a deficiency in software measurement technology itself; rather, it is cultural resistance on the part of software management and staff. The resistance is due to the natural human belief that measures might be used against them. This feeling is the greatest barrier to applied software measurement. • Capers Jones, Applied Software Measurement
Slide Demo Process Improvement in Action A Real World Example
Setting the Stage • Process was ad-hoc • Delivery dates were often missed • Quality problems occurred frequently • Deployment generally problematic • Decision was made to adopt Agile
Goals • Provide process around software development • Through Scrum/Agile adoption • Not have failures in releases • Better quality • Track process (visibility to management) • More predictability Metrics: • Estimates vsActuals • % of iteration tasks completed / committed • Status measured by state transitions
Sprint 1 • No data because they were in the middle of an upgrade • There was a Sprint 0 to examine technologies for use in the project • Requirements were poorly conceived • A large part of sprint 1 was fixing the structure and content of the backlog
Trending Development 1 July
A special case for metrics Estimation and Planning
“There is a perfect correlation between measurement accuracy and estimation accuracy: Companies that measure well can estimate well; companies that do not measure accurately cannot estimate accurately either.” • Capers Jones • "Optimism is an occupational hazard of programming: feedback is the treatment." • Kent Beck • “Planning and estimation are the mirror images of measurement. ” • Capers Jones
Demo Using historical metrics to estimate effort and timelines. Estimation with Historical Data
Recording actuals is hard Warning!
Understanding the power of tooling Team Foundation Server
Why ALM Tooling? • "Tools are very important element of defining a path of least resistance. If I can set up a tool so that it’s easier for a developer to do something the way that I want the developer to do it, and harder for the developer to do it some other way, then I think it’s very likely the developer is going to do it the way I want them to, because it’s easier. It’s the path of least resistance." • Steve McConnell
When possible, use an integrated ALM Tool to gather metrics Tip #9
The social aspects of collecting metrics Cultural issues with Metrics