SlideShare a Scribd company logo
Agile Embedded
Software Development
James Grenning
@jwgrenning
james@wingman-sw.com
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Software Development is Easy!
• Just like this Black Diamond
2
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
We never have any
problems like
• Late Delivery
• Poor Quality
• Burnout
• Missed Customer Expectations
3
Software Development is Easy!
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Can Projects be Managed Better?
Figure out
everything, then
do what you
figured
From Winston Royce’s
original paper on Waterfall
4
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 5
Thank you: Hubert Stoffels, from Pittsburgh, USA '''Title:''' Jonathan's Run Falls
'''Description:''' http://commons.wikimedia.org/wiki/File:Jonathan%27s_Run_Falls.jpg
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Figure it All Out, Then Do It
6
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 7Thanks to Yorian, Picture of a waterfall nearby Flam, Norway http://
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Steve McConnell
from Rapid Development
“Software projects contain too
many variables to be able to set
schedules with 100-percent
accuracy. Far from having one
particular date when a project
would finish, for any given project
there is a range of completion
dates, of which some are more
likely and some are less.”
8
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Project Cost and Schedule Uncertainty
9
time
1x
2x
4x
.25x
.5x
Project 

Complete
Cost
Uncertainty
Initial

Definition
Requirements

Specification
Design
1x
1.25x
1.6x
.6x
.8x
Schedule
Uncertainty
Barry Boehm, 1995
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
What is Agile?
10
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Can we get features and functionality to flow?
11
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
What is Agile?
• Agile software development is a conceptual
framework for undertaking software engineering
projects. 

-- wikipedia
• a.k.a. Extreme Programming, Scrum, Feature Driven
Development, DSDM, Crystal Clear, Agile Unified
Process
12
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Agile methods are Designed to...
• Manage with Data
• Improve Visibility
• Improve Predictability
• Improve Quality
• Improve Productivity
• Reduce Waste
13
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Agile Principles
• Communications
• Simplicity
• Feedback
• Courage
• Respect
!
!
!
• Visibility
• Honesty
• Realistic
• High Quality
14
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
www.agilemanifesto.org
15
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Individuals and Interactions 

over Processes and Tools
16
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Skilled Self-Organizing Teams
• Developers work together to organize the work
• Customer or Product Owner works with the teams to
define work and establish priorities
• Managers usually take an outward focus, removing
roadblock, rather than managing day-to-day tasks and
schedules.
17
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Collaboration
• Daily standup meeting
• Pair programming or Daily reviews
• Shared code ownership
• Team room
18
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Working Software 

over Comprehensive Documentation
• Each team has different
needs
• Less formal documentation
might work.
• Prefer executable
Documentation
19
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Customer Collaboration 

over Contract Negotiation
20
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Responding to Change 

over following a plan
21
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Agile Approach is more...
• Visible
• Predictable
• Productive
!
• With a focus on
– High Quality Work
– Reduced Waste
22
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Challenges for Embedded
• Stories and incremental scope control
• Breaking dependencies on hardware
• Applying outside of software
– Mechanics, hardware, ASIC development
!
• Not unique to embedded, though prevalent
– Your own preconceived notions
– Organizational resistance
23
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Iterative and Incremental
Development
Projects end, products don’t (hopefully)
!
Requirements analysis is never done
Design is never done
!
24
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Why Iterative?
• A system's users seldom know exactly what they
what and cannot articulate all they know
• … There are many details we can only discover
once we are well into implementation
• … as humans we can only master only so much
complexity
• … external forces lead to changes in
requirements…
[LARMEN]
25
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 26
“A complex system
designed from scratch
never works, and cannot
be made to work. You
have to start over,
beginning with a simple
system.”
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 27
A Complex system that
works is invariably found to
have evolved from a
simple system that worked
www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 28
Copyright © 2010	

James W. Grenning
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Project Progress is Measurable
Functionality Built and Tested
Requirements
Design
Code
Test
29
CompleteStories
Sprints or Iterations (2-4 weeks)
Learning
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Measure Development Velocity
Estimated work per Iteration
0
5
10
15
20
25
30
35
40
45
50
1 2 3 4 5 6 7 8
30
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Measure Development Velocity
Estimated work per Iteration
31
0
5
10
15
20
25
30
35
40
45
50
1 2 3 4 5 6 7 8
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Product Burn Down Chart
Work to be Completed
32
0
75
150
225
300
1 2 3 4 5 6 7 8 9 10
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Product Burn Down Chart
Work to be Completed
33
0
75
150
225
300
1 2 3 4 5 6 7 8 9 10
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Change Becomes Visible
34
0
75
150
225
300
1 2 3 4 5 6 7 8 9 10
New features
added--what
happens?
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
The Backlog is Made up of Stories
• The short term plan is more detailed.
• Work on it, buying time to refine longer term plan.
!
!
!
• Generally stories are in the order set by customer.
• Engineers can ask to move up stories to reduce risk.
• Stories are tested in the iteration they are implemented;
story tests are automated.
• A story is done when it passes its tests.
35
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Introducing the User Story
• The name of a feature.
• A promise for a conversation. (Ron Jeffries)
• Like the name of a use case, or extension.
– Acceptance tests provide the details.
• Fine grains help make visible progress and avoid gold
plating.
• I call them Product Stories
36
Weekend Light
Schedule
Weekday Light
Schedule
Specific day Light
Schedule
Chinese Holiday
Light Schedule
US Holiday Light
Schedule
Everyday-but
Light Schedule
Everyday Light
Schedule
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Stories and Acceptance Tests
• Stories lack detail
• Details are provided in automated acceptance tests
• The test are like executable use cases
• Test either pass or fail
37
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Fine Grained Scope Control
with Product Stories
Come to my next session ESC 227 for Details
38
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Technical Practices
39
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
High Quality - Visible Progress
• Concurrent requirements and design
• Automated test, continuously, at many levels
• Test Driven Development
• Continuous Refactoring
• Architectural Vision
• Evolutionary Design
• Continuous Integration
• Coding Standard
• Team code ownership
• Pair Programming
• Team workspace
40
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Edsger Dijkstra
Those who want really reliable
software will discover that they
must find means of avoiding the
majority of bugs to start with, and
as a result, the programming
process will become cheaper. If you
want more effective programmers,
you will discover that they should
not waste their time debugging,
they should not introduce the bugs
to start with.
41
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 42
Can we Realize Dijkstra’s
Dream and
Prevent Defects with
Test Driven Development?
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
This Work Flow is Designed to
Produce Defects
43
Development
Test
Defects
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 44
Your program will have
bugs. And they will
surprise you when you
find them.
Intel, Hillsboro, OR
www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. For use by training attendees.
Zune 30G
45
Decem
ber31,2008
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 46
BOOL ConvertDays(UINT32 days, SYSTEMTIME* lpTime)
Intel, Hillsboro, OR
www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. For use by training attendees.
47
One That Got Away
static void SetYearAndDayOfYear(RtcTime* time)	
{	
int days = time->daysSince1980;	
int year = STARTING_YEAR;	
while (days > 365)	
{	
if (IsLeapYear(year))	
{	
if (days > 366)	
{	
days -= 366;	
year += 1;	
}	
}	
else	
{	
days -= 365;	
year += 1;	
}	
}	
!
time->dayOfYear = days;	
time->year = year;	
}
Intel, Hillsboro, OR
www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. For use by training attendees.
48
Your program will have
bugs. And they will
surprise you when you
find them.
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 49
This Test Could Have Prevented it
TEST(Rtc, check20081231)	
{	
days = daysSince1980(2008, 366);	
CHECK(ConvertDays(days, &time));	
assertDate(WED, 2008, 12, 31);	
}	
!
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
The Physics of Debug Later
Programming (DLP)
• As Td increases, Tfind increases dramatically
• Tfix is usually short, but can increase with Td
50
Bug discoveryMistake made
(bug injection)
Bug found Bug fixed
Td Tfind T fix
Time
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
A Bug’s Life
51
From http://www.softwaretestinghelp.com/bug-life-cycle/
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
• Write a test
• Watch it not build
• Make it build, but fail
• Make it pass
• Refactor (clean up any
mess)
• Repeat until done
T
D
D
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Development and Test are a Continuum
preventing defects
53
Development
Test
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
The Physics of Test Driven
Development
• When Td approaches zero, Tfind approaches zero
• In many cases, bugs are not around long enough to be considered bugs.
• See: http://www.renaissancesoftware.net/blog/archives/16
54
Mistake
discovery
Mistake
made
Root cause
found
Mistake fixed
T d Tfind T fix
Time
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Testing is not a Phase
• Testing starts on day one
• Tests provide the
specification of what is to
be developed
• QA/System Test moves
upstream.
55
HELP
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 56
The Two Values of Software
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Rushing Slows You Down
57
Long term slow
down
O
Delayed
opposite
effect
Delayed
effect
O
Feature Velocity
increased defects
Poor code
quality
Rushing
O
O
Short term
improvement
Cause and
effect
Opposite
effect
Copyright (c) 2009 James Grenning
Inspired by Scaling Lean and Agile Development [SLAD]
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Slow Down to Go Faster
58
Inspired by Scaling Lean and Agile Development [SLAD]
Feature Velocity
decreased defects
Code
quality
Refactoring
O
Automated tests
Short term slow
down
O
Long term
speed
O
Delayed
opposite
effect
Delayed
effect
O
Cause and
effect
Opposite
effect
Copyright (c) 2009 James Grenning
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Unit Tests are Critical
59
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Higher Level Tests Cannot be
Broadly Thorough
60
10
states
10
states
10
states
5 interactions
5 interactions
5 interactions
Tests
1000 (or more) tests are needed to testthis simple system
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Unit Tests Can Be Thorough
61
10
states
10
states
10
states
5 interactions
5 interactions
5 interactions
Tests Tests
As few as 30 unit tests and 15
integration test when tested as units
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Manual Test is Not Sustainable
62
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Et = f(Ed)
Et is the effort to test a new feature, and is a function of the
effort to develop the feature.
!
Ed is the effort to develop a new feature
Assume a constant linear relationship
!
Et = f(Ed) = KEd
63
test
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Assume Test Effort is Proportional to
Development Effort
64
Effort
Iterations
dev
5
10
15
20
25
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
• 25% of all defects are
introduced while changing
and fixing code

[R.B Grady, Software Process Improvement]
65
If a system is working,
leave it alone. Don't
change anything
Systems don’t
appreciate being fiddled
and diddled with
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Etn = f(Ed) + C Et(i)
!
Etn is the effort to fully test a product at iteration
N
!
Because any change can break previously working
software, we must retest.
!
Etn is a function of the effort to develop the feature
plus some fraction of the effort to test all previous
iterations.
!
!
66
i = 0
n
x
test
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Manual Test is Unsustainable
67
Effort
Iterations
Unsustainable growth
dev
5
10
15
20
25
test
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Risk Accumulates in the Untested
Code Gap
68
Effort
Iterations
Unsustainable growth
dev
5
10
15
20
25 Untested Code Gap
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Final Thoughts
69
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Challenges
• Legacy C code
• Automated testing
• Stories
• Culture
• Getting out of the cube and into the team
• Engineers get too specialized
70
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
Getting Started
• Honest self-assessment
• Motivation for change
• Open to different approaches
• Learn
• Experiment
• TDD under the radar
• Stories for individual work
• Management support
71
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
References and Resources
• [XP] Kent Beck, Extreme Programming Explained, 1999
• [REF] Martin Fowler. Refactoring. Improving the Design of Existing Code. 1999
• [WELC] Michael Feathers, Working Effectively with Legacy Code
• [TDD] Kent Beck, Test-Driven Development, 2003
• [XUNIT] Gerard Meszaros, xUnit Testing Patterns, 2008
• [PRAG] Andy Hunt, Dave Thomas, The Pragmatic Programmer
• [SLAD] Craig Larman and Bas Voode, Scaling Lean & Agile Development
• [POP] Mary Poppendieck and Tom Poppendieck, Implementing Lean Software
Development: From Concept to Cash, 2006
• [AGILE] Robert C. Martin, Agile Software Development: Principles, Patterns, and
Practices, 2002
• [CLEAN] Robert C. Martin, Clean Code, 2008
• [KANER] Cem Kaner, et. al. Lessons learned in Software Testing
• [TD] Lasse Koskela, Test Driven, 2007
72
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
On-line
!
• Test harnesses
– [CPPTEST] www.sourceforge.org, project CppUTest
– [FITNESSE] www.fitnesse.org
• Groups
• http://groups.yahoo.com/group/testdrivendevelopment
• http://groups.yahoo.com/group/AgileEmbedded
73
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved.
See Embedded TDD and Related Blogs
and Papers
http://www.renaissanceSoftware.net
http://www.renaissancesoftware.net/blog/
• Embedded TDD
• Zune Bug: Test Driven Bug Fix
• Learning Tests are Free!
• TDD as a Design Rot Prevention System
• Crashing Your Way to Great Legacy C Tests
• TDD and the Big Framework Part
• Bug Fixes and TDD
• Physics of Test Driven Development
• Tests vs. Short Term Cache Between Your Ears
• Embedded Systems Conference FAQ
• I miss constructors
• Who says you can’t test drive a device driver?
74
• Why are You Still Using C?
• Planing Poker
• Agile Embedded Software Development (ESC)
• Launching Extreme Programming at a Process
Intensive Company (IEEE)
• Test Driven Development for Embedded Software
• Progress Before Hardware
• Agile Times - Containing Progress Before Hardware
• Test-Driven Development for Embedded C++
Programmers
Agile Embedded Software Development www.wingman-sw.com
james@wingman-sw.com
Copyright © 2008-2013 James W. Grenning	

All Rights Reserved. 75
Talk to me on Twitter
http://twitter.com/jwgrenning!
!
Find my book at!
http://www.pragprog.com/titles/jgade
!
Find me on linkedin.com
http://www.linkedin.com/in/jwgrenning
Please remind me how we met.
!
http://www.renaissancesoftware.net
http:// www.jamesgrenning.com
Please come to my other sessions

More Related Content

PDF
Embedded Extreme Programming - Embedded Systems Conference 2002-2004
PDF
How To Review The Sprints Efficiently
PPTX
Embedded meets Agile
PDF
What is quality, and how do we build it in
PPTX
Agile software architecture
PPTX
AgileCamp 2015: Scrum for Full Scale Manufacturing, Joe Justice
PDF
Agile Adoption Story in LGE (Aps2010)
PPTX
Damn... we missed the date again
Embedded Extreme Programming - Embedded Systems Conference 2002-2004
How To Review The Sprints Efficiently
Embedded meets Agile
What is quality, and how do we build it in
Agile software architecture
AgileCamp 2015: Scrum for Full Scale Manufacturing, Joe Justice
Agile Adoption Story in LGE (Aps2010)
Damn... we missed the date again

What's hot (20)

PPTX
Shifting Left Webinar Slideshow
PDF
GMO'less Software Development Practices
PPTX
Automation CICD
PDF
Shift Left Testing: Going Beyond Agile
PDF
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
PDF
How BDD enables True CI/CD
PPTX
Agile Defense - Changing the Way Wars Are Fought, Logistics Delivered, and Ho...
PPTX
Introduction to Agile Hardware
PPTX
Achieving Balanced Agile Testing
PDF
The Anti-Transformation transformation @DevOps Summit Amsterdam
PDF
Agile Workshop: Releasing Quality Software
PDF
How to Build in Quality from Day 1 using Lean QA and Agile Testing
PDF
Continuous Delivery in a Legacy Shop—One Step at a Time
PDF
Five Flute Overview
PDF
TechTalk 2021: Peningkatan Performa Software Delivery dengan CI/CD
PDF
Advance ALM and DevOps Practices with Continuous Improvement
PDF
How to Measure Agility Project Success in Business Terms
PDF
"The Lean Mindset": Mary & Tom Poppendieck's Keynote at AgileDayChile 2013
PDF
Continuous Integration Is for Everyone—Especially DevOps
PDF
Distributed Agile Patterns
Shifting Left Webinar Slideshow
GMO'less Software Development Practices
Automation CICD
Shift Left Testing: Going Beyond Agile
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
How BDD enables True CI/CD
Agile Defense - Changing the Way Wars Are Fought, Logistics Delivered, and Ho...
Introduction to Agile Hardware
Achieving Balanced Agile Testing
The Anti-Transformation transformation @DevOps Summit Amsterdam
Agile Workshop: Releasing Quality Software
How to Build in Quality from Day 1 using Lean QA and Agile Testing
Continuous Delivery in a Legacy Shop—One Step at a Time
Five Flute Overview
TechTalk 2021: Peningkatan Performa Software Delivery dengan CI/CD
Advance ALM and DevOps Practices with Continuous Improvement
How to Measure Agility Project Success in Business Terms
"The Lean Mindset": Mary & Tom Poppendieck's Keynote at AgileDayChile 2013
Continuous Integration Is for Everyone—Especially DevOps
Distributed Agile Patterns
Ad

Viewers also liked (9)

PDF
Agile Embedded Software Development, what's wrong with it?
PDF
Designing SOLID C - ACCU Conference 2014
PDF
Test-Driven Development for Embedded C -- OOP Conference 2015, Munich
PDF
Will Agile work in my embedded development environment?
PDF
Scrum Embedded Systems
PDF
Test Driven Development for Embedded C
PDF
Technical Excellence - OOP Munich 2015
PPT
Tdd in unity
PPTX
Lean Agile Metrics And KPIs
Agile Embedded Software Development, what's wrong with it?
Designing SOLID C - ACCU Conference 2014
Test-Driven Development for Embedded C -- OOP Conference 2015, Munich
Will Agile work in my embedded development environment?
Scrum Embedded Systems
Test Driven Development for Embedded C
Technical Excellence - OOP Munich 2015
Tdd in unity
Lean Agile Metrics And KPIs
Ad

Similar to Agile Embedded Software (20)

PPTX
03 - Agile Software Development.pptx
PPTX
Agile Overview Session
PDF
Chapter 3 - Agile Software Development.pdf
PPT
An Introduction to XP and Agile
PPTX
Introduction to Software Engineering
PPTX
Agile Software development 2SE2013_04.pptx
PPT
agile software development Model for all
PPTX
ISTQB Agile Extension
PDF
Scrum is not enough - being a successful agile engineer
PPT
Manual Software testing - software development life cycle
PPT
Agile Software Development in Bachelor of Computer Applications.ppt
PDF
What's Agile ? Introduction to Agile methods
PPT
Unit -1.ppt
PDF
Engineering Software Products: 2. agile software engineering
PDF
Introduction to Agile Methodologies
PPT
Agiel sw development
PPTX
Agile-Software-Development in SAP ERP.pptx
PPTX
Agile software process
PPTX
ODP
Agile Engineering
03 - Agile Software Development.pptx
Agile Overview Session
Chapter 3 - Agile Software Development.pdf
An Introduction to XP and Agile
Introduction to Software Engineering
Agile Software development 2SE2013_04.pptx
agile software development Model for all
ISTQB Agile Extension
Scrum is not enough - being a successful agile engineer
Manual Software testing - software development life cycle
Agile Software Development in Bachelor of Computer Applications.ppt
What's Agile ? Introduction to Agile methods
Unit -1.ppt
Engineering Software Products: 2. agile software engineering
Introduction to Agile Methodologies
Agiel sw development
Agile-Software-Development in SAP ERP.pptx
Agile software process
Agile Engineering

Recently uploaded (20)

PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
history of c programming in notes for students .pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Digital Strategies for Manufacturing Companies
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Transform Your Business with a Software ERP System
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Design an Analysis of Algorithms II-SECS-1021-03
Odoo Companies in India – Driving Business Transformation.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
history of c programming in notes for students .pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Digital Strategies for Manufacturing Companies
Odoo POS Development Services by CandidRoot Solutions
Operating system designcfffgfgggggggvggggggggg
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Transform Your Business with a Software ERP System
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
L1 - Introduction to python Backend.pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Which alternative to Crystal Reports is best for small or large businesses.pdf
ManageIQ - Sprint 268 Review - Slide Deck
Upgrade and Innovation Strategies for SAP ERP Customers
VVF-Customer-Presentation2025-Ver1.9.pptx
CHAPTER 2 - PM Management and IT Context
PTS Company Brochure 2025 (1).pdf.......
Design an Analysis of Algorithms II-SECS-1021-03

Agile Embedded Software

  • 1. Agile Embedded Software Development James Grenning @jwgrenning james@wingman-sw.com
  • 2. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Software Development is Easy! • Just like this Black Diamond 2
  • 3. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. We never have any problems like • Late Delivery • Poor Quality • Burnout • Missed Customer Expectations 3 Software Development is Easy!
  • 4. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Can Projects be Managed Better? Figure out everything, then do what you figured From Winston Royce’s original paper on Waterfall 4
  • 5. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 5 Thank you: Hubert Stoffels, from Pittsburgh, USA '''Title:''' Jonathan's Run Falls '''Description:''' http://commons.wikimedia.org/wiki/File:Jonathan%27s_Run_Falls.jpg
  • 6. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Figure it All Out, Then Do It 6
  • 7. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 7Thanks to Yorian, Picture of a waterfall nearby Flam, Norway http://
  • 8. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Steve McConnell from Rapid Development “Software projects contain too many variables to be able to set schedules with 100-percent accuracy. Far from having one particular date when a project would finish, for any given project there is a range of completion dates, of which some are more likely and some are less.” 8
  • 9. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Project Cost and Schedule Uncertainty 9 time 1x 2x 4x .25x .5x Project 
 Complete Cost Uncertainty Initial
 Definition Requirements
 Specification Design 1x 1.25x 1.6x .6x .8x Schedule Uncertainty Barry Boehm, 1995
  • 10. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. What is Agile? 10
  • 11. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Can we get features and functionality to flow? 11
  • 12. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. What is Agile? • Agile software development is a conceptual framework for undertaking software engineering projects. 
 -- wikipedia • a.k.a. Extreme Programming, Scrum, Feature Driven Development, DSDM, Crystal Clear, Agile Unified Process 12
  • 13. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Agile methods are Designed to... • Manage with Data • Improve Visibility • Improve Predictability • Improve Quality • Improve Productivity • Reduce Waste 13
  • 14. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Agile Principles • Communications • Simplicity • Feedback • Courage • Respect ! ! ! • Visibility • Honesty • Realistic • High Quality 14
  • 15. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. www.agilemanifesto.org 15
  • 16. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Individuals and Interactions 
 over Processes and Tools 16
  • 17. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Skilled Self-Organizing Teams • Developers work together to organize the work • Customer or Product Owner works with the teams to define work and establish priorities • Managers usually take an outward focus, removing roadblock, rather than managing day-to-day tasks and schedules. 17
  • 18. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Collaboration • Daily standup meeting • Pair programming or Daily reviews • Shared code ownership • Team room 18
  • 19. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Working Software 
 over Comprehensive Documentation • Each team has different needs • Less formal documentation might work. • Prefer executable Documentation 19
  • 20. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Customer Collaboration 
 over Contract Negotiation 20
  • 21. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Responding to Change 
 over following a plan 21
  • 22. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Agile Approach is more... • Visible • Predictable • Productive ! • With a focus on – High Quality Work – Reduced Waste 22
  • 23. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Challenges for Embedded • Stories and incremental scope control • Breaking dependencies on hardware • Applying outside of software – Mechanics, hardware, ASIC development ! • Not unique to embedded, though prevalent – Your own preconceived notions – Organizational resistance 23
  • 24. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Iterative and Incremental Development Projects end, products don’t (hopefully) ! Requirements analysis is never done Design is never done ! 24
  • 25. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Why Iterative? • A system's users seldom know exactly what they what and cannot articulate all they know • … There are many details we can only discover once we are well into implementation • … as humans we can only master only so much complexity • … external forces lead to changes in requirements… [LARMEN] 25
  • 26. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 26 “A complex system designed from scratch never works, and cannot be made to work. You have to start over, beginning with a simple system.”
  • 27. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 27 A Complex system that works is invariably found to have evolved from a simple system that worked
  • 28. www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 28 Copyright © 2010 James W. Grenning
  • 29. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Project Progress is Measurable Functionality Built and Tested Requirements Design Code Test 29 CompleteStories Sprints or Iterations (2-4 weeks) Learning
  • 30. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Measure Development Velocity Estimated work per Iteration 0 5 10 15 20 25 30 35 40 45 50 1 2 3 4 5 6 7 8 30
  • 31. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Measure Development Velocity Estimated work per Iteration 31 0 5 10 15 20 25 30 35 40 45 50 1 2 3 4 5 6 7 8
  • 32. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Product Burn Down Chart Work to be Completed 32 0 75 150 225 300 1 2 3 4 5 6 7 8 9 10
  • 33. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Product Burn Down Chart Work to be Completed 33 0 75 150 225 300 1 2 3 4 5 6 7 8 9 10
  • 34. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Change Becomes Visible 34 0 75 150 225 300 1 2 3 4 5 6 7 8 9 10 New features added--what happens?
  • 35. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. The Backlog is Made up of Stories • The short term plan is more detailed. • Work on it, buying time to refine longer term plan. ! ! ! • Generally stories are in the order set by customer. • Engineers can ask to move up stories to reduce risk. • Stories are tested in the iteration they are implemented; story tests are automated. • A story is done when it passes its tests. 35
  • 36. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Introducing the User Story • The name of a feature. • A promise for a conversation. (Ron Jeffries) • Like the name of a use case, or extension. – Acceptance tests provide the details. • Fine grains help make visible progress and avoid gold plating. • I call them Product Stories 36 Weekend Light Schedule Weekday Light Schedule Specific day Light Schedule Chinese Holiday Light Schedule US Holiday Light Schedule Everyday-but Light Schedule Everyday Light Schedule
  • 37. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Stories and Acceptance Tests • Stories lack detail • Details are provided in automated acceptance tests • The test are like executable use cases • Test either pass or fail 37
  • 38. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Fine Grained Scope Control with Product Stories Come to my next session ESC 227 for Details 38
  • 39. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Technical Practices 39
  • 40. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. High Quality - Visible Progress • Concurrent requirements and design • Automated test, continuously, at many levels • Test Driven Development • Continuous Refactoring • Architectural Vision • Evolutionary Design • Continuous Integration • Coding Standard • Team code ownership • Pair Programming • Team workspace 40
  • 41. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Edsger Dijkstra Those who want really reliable software will discover that they must find means of avoiding the majority of bugs to start with, and as a result, the programming process will become cheaper. If you want more effective programmers, you will discover that they should not waste their time debugging, they should not introduce the bugs to start with. 41
  • 42. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 42 Can we Realize Dijkstra’s Dream and Prevent Defects with Test Driven Development?
  • 43. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. This Work Flow is Designed to Produce Defects 43 Development Test Defects
  • 44. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 44 Your program will have bugs. And they will surprise you when you find them.
  • 45. Intel, Hillsboro, OR www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. For use by training attendees. Zune 30G 45 Decem ber31,2008
  • 46. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 46 BOOL ConvertDays(UINT32 days, SYSTEMTIME* lpTime)
  • 47. Intel, Hillsboro, OR www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. For use by training attendees. 47 One That Got Away static void SetYearAndDayOfYear(RtcTime* time) { int days = time->daysSince1980; int year = STARTING_YEAR; while (days > 365) { if (IsLeapYear(year)) { if (days > 366) { days -= 366; year += 1; } } else { days -= 365; year += 1; } } ! time->dayOfYear = days; time->year = year; }
  • 48. Intel, Hillsboro, OR www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. For use by training attendees. 48 Your program will have bugs. And they will surprise you when you find them.
  • 49. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 49 This Test Could Have Prevented it TEST(Rtc, check20081231) { days = daysSince1980(2008, 366); CHECK(ConvertDays(days, &time)); assertDate(WED, 2008, 12, 31); } !
  • 50. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. The Physics of Debug Later Programming (DLP) • As Td increases, Tfind increases dramatically • Tfix is usually short, but can increase with Td 50 Bug discoveryMistake made (bug injection) Bug found Bug fixed Td Tfind T fix Time
  • 51. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. A Bug’s Life 51 From http://www.softwaretestinghelp.com/bug-life-cycle/
  • 52. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. • Write a test • Watch it not build • Make it build, but fail • Make it pass • Refactor (clean up any mess) • Repeat until done T D D
  • 53. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Development and Test are a Continuum preventing defects 53 Development Test
  • 54. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. The Physics of Test Driven Development • When Td approaches zero, Tfind approaches zero • In many cases, bugs are not around long enough to be considered bugs. • See: http://www.renaissancesoftware.net/blog/archives/16 54 Mistake discovery Mistake made Root cause found Mistake fixed T d Tfind T fix Time
  • 55. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Testing is not a Phase • Testing starts on day one • Tests provide the specification of what is to be developed • QA/System Test moves upstream. 55 HELP
  • 56. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 56 The Two Values of Software
  • 57. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Rushing Slows You Down 57 Long term slow down O Delayed opposite effect Delayed effect O Feature Velocity increased defects Poor code quality Rushing O O Short term improvement Cause and effect Opposite effect Copyright (c) 2009 James Grenning Inspired by Scaling Lean and Agile Development [SLAD]
  • 58. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Slow Down to Go Faster 58 Inspired by Scaling Lean and Agile Development [SLAD] Feature Velocity decreased defects Code quality Refactoring O Automated tests Short term slow down O Long term speed O Delayed opposite effect Delayed effect O Cause and effect Opposite effect Copyright (c) 2009 James Grenning
  • 59. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Unit Tests are Critical 59
  • 60. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Higher Level Tests Cannot be Broadly Thorough 60 10 states 10 states 10 states 5 interactions 5 interactions 5 interactions Tests 1000 (or more) tests are needed to testthis simple system
  • 61. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Unit Tests Can Be Thorough 61 10 states 10 states 10 states 5 interactions 5 interactions 5 interactions Tests Tests As few as 30 unit tests and 15 integration test when tested as units
  • 62. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Manual Test is Not Sustainable 62
  • 63. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Et = f(Ed) Et is the effort to test a new feature, and is a function of the effort to develop the feature. ! Ed is the effort to develop a new feature Assume a constant linear relationship ! Et = f(Ed) = KEd 63
  • 64. test Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Assume Test Effort is Proportional to Development Effort 64 Effort Iterations dev 5 10 15 20 25
  • 65. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. • 25% of all defects are introduced while changing and fixing code
 [R.B Grady, Software Process Improvement] 65 If a system is working, leave it alone. Don't change anything Systems don’t appreciate being fiddled and diddled with
  • 66. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Etn = f(Ed) + C Et(i) ! Etn is the effort to fully test a product at iteration N ! Because any change can break previously working software, we must retest. ! Etn is a function of the effort to develop the feature plus some fraction of the effort to test all previous iterations. ! ! 66 i = 0 n x
  • 67. test Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Manual Test is Unsustainable 67 Effort Iterations Unsustainable growth dev 5 10 15 20 25
  • 68. test Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Risk Accumulates in the Untested Code Gap 68 Effort Iterations Unsustainable growth dev 5 10 15 20 25 Untested Code Gap
  • 69. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Final Thoughts 69
  • 70. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Challenges • Legacy C code • Automated testing • Stories • Culture • Getting out of the cube and into the team • Engineers get too specialized 70
  • 71. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. Getting Started • Honest self-assessment • Motivation for change • Open to different approaches • Learn • Experiment • TDD under the radar • Stories for individual work • Management support 71
  • 72. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. References and Resources • [XP] Kent Beck, Extreme Programming Explained, 1999 • [REF] Martin Fowler. Refactoring. Improving the Design of Existing Code. 1999 • [WELC] Michael Feathers, Working Effectively with Legacy Code • [TDD] Kent Beck, Test-Driven Development, 2003 • [XUNIT] Gerard Meszaros, xUnit Testing Patterns, 2008 • [PRAG] Andy Hunt, Dave Thomas, The Pragmatic Programmer • [SLAD] Craig Larman and Bas Voode, Scaling Lean & Agile Development • [POP] Mary Poppendieck and Tom Poppendieck, Implementing Lean Software Development: From Concept to Cash, 2006 • [AGILE] Robert C. Martin, Agile Software Development: Principles, Patterns, and Practices, 2002 • [CLEAN] Robert C. Martin, Clean Code, 2008 • [KANER] Cem Kaner, et. al. Lessons learned in Software Testing • [TD] Lasse Koskela, Test Driven, 2007 72
  • 73. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. On-line ! • Test harnesses – [CPPTEST] www.sourceforge.org, project CppUTest – [FITNESSE] www.fitnesse.org • Groups • http://groups.yahoo.com/group/testdrivendevelopment • http://groups.yahoo.com/group/AgileEmbedded 73
  • 74. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. See Embedded TDD and Related Blogs and Papers http://www.renaissanceSoftware.net http://www.renaissancesoftware.net/blog/ • Embedded TDD • Zune Bug: Test Driven Bug Fix • Learning Tests are Free! • TDD as a Design Rot Prevention System • Crashing Your Way to Great Legacy C Tests • TDD and the Big Framework Part • Bug Fixes and TDD • Physics of Test Driven Development • Tests vs. Short Term Cache Between Your Ears • Embedded Systems Conference FAQ • I miss constructors • Who says you can’t test drive a device driver? 74 • Why are You Still Using C? • Planing Poker • Agile Embedded Software Development (ESC) • Launching Extreme Programming at a Process Intensive Company (IEEE) • Test Driven Development for Embedded Software • Progress Before Hardware • Agile Times - Containing Progress Before Hardware • Test-Driven Development for Embedded C++ Programmers
  • 75. Agile Embedded Software Development www.wingman-sw.com james@wingman-sw.com Copyright © 2008-2013 James W. Grenning All Rights Reserved. 75 Talk to me on Twitter http://twitter.com/jwgrenning! ! Find my book at! http://www.pragprog.com/titles/jgade ! Find me on linkedin.com http://www.linkedin.com/in/jwgrenning Please remind me how we met. ! http://www.renaissancesoftware.net http:// www.jamesgrenning.com Please come to my other sessions