Lean Software Development
Lean Software Development
#93
Get More Refcardz! Visit refcardz.com
CONTENTS INCLUDE:
n
n
About Lean Software Development
Getting Started Getting Started with
Lean Software Development
n
Zero Practices
n
Daily Standup
n
Automated Testing
n
Continuous Integration and more...
By Curt Hibbs, Steve Jewett, and Mike Sullivan
to accomplish a task, recognizing their efforts, and standing by
ABOUT LEAN SOFTWARE DEVELOPMENT them when those efforts are unsuccessful.
Lean Software Development is an outgrowth of the larger Lean Optimize the Whole
movement that includes areas such as manufacturing, supply Optimizing the whole development process generates better
chain management, product development, and back-office results than optimizing local processes in isolation, which is
operations. Its goal is the same: deliver value to the customer usually done the expense of other local processes.
more quickly by eliminating waste and improving quality.
Lean vs. Agile
Though software development differs from the manufacturing
Comparing Lean and Agile software development reveals
context in which Lean was born, it draws on many of the same
they share many characteristics, including the quick delivery
principles.
of value to the customer, but they differ in two significant
Seven Principles of Lean Software Development ways: scope and focus. The narrow scope of Agile addresses
Lean Software Development embodies seven principles, the development of software and focuses on adaptability to
originally described in the book Implementing Lean Software deliver quickly. Lean looks at the bigger picture, the context
Development: From Concept to Cash1, by Mary and Tom in which development occurs, and delivers value quickly by
www.dzone.com
Poppendieck. Each of these seven principles contributes to the focusing on the elimination of waste. As it turns out, they are
“leaning out” of a software development process. complementary, and real world processes often draw
from both.
Eliminate Waste
Waste is anything that does not contribute value to the GETTING STARTED
final product, including inefficient processes, unnecessary
documentation, and features that won’t be used. Eliminating Newcomers to Lean Software Development sometimes have
waste is the guiding principle in Lean Software Development. trouble implementing a Lean process. The Lean principles
don’t describe an “out-of-the-box” solution, so one approach
Build Quality In
is to start with an Agile methodology. However, a number
Building quality into a product means preventing defects,
of methodologies exist, and choosing the right one can be
rather than using post-implementation integration and testing
difficult.
to detect them after the fact.
Getting Started with Lean Software Development
Defer Commitment
Making irreversible decisions at the last reasonable moment
allows time for the creation of more knowledge, which
results in better decisions. Deferring commitment is positive
procrastination.
Deliver Fast
Delivering fast puts the product in front of the customer
quickly so they can provide feedback. Fast delivery is
accomplished using short iterations, which produce software
in small increments by focusing on a limited number of the
highest priority requirements.
Respect People
Respecting people means giving the development team’s most
important resource, its members, freedom to find the best way
The following practices can stand-alone, and implementing of commands (a script) that creates the final product from the
any of them will have a positive effect on productivity. Lean source code stored in SCM. Scripts may be simple command
Software Development relies on prioritization, so the practices files, make files, or complex builds within a tool such as
are prioritized to generate the highest return on investment. Maven or Ant.
While implementing any one practice will help lean out a
process, doing them in order will return the most Scripted builds eliminate the potential errors of manual builds
“bang for the buck.” by executing the same way each time. They complete the basic
development cycle of making changes, updating the SCM
The list of six practices is preceded by two prerequisites, or repository, and rebuilding to verify there are no errors.
“zero practices”, every software project should be doing, Select an appropriate build tool for your project. Integrated
whether Lean, Agile or something more traditional. If your development environments like Visual Studio or Eclipse have
project doesn’t do these things, this is the best place to start. build managers or integrate with 3rd party build managers.
Create a script that builds the product from scratch, starting
with source code from SCM.
ZERO PRACTICES
Lean Principles
• Create Knowledge: SCM consolidates project knowledge
in a single place.
Figure 1: Centralized Repository
• Eliminate Waste: Manual work is eliminated by
Source code management is the first practice described automating builds.
because it is the foundation for a practical development
• Build Quality In: Automating builds eliminates a source
environment, and it should be implemented before going any
of errors.
further.
Lean Principles
• Respect People: Standups foster a team-oriented
attitude; team members know what other members are
doing and can get or give help as needed to move the
project forward.
• Retrofit unit test suites to existing legacy code only Continuous integration (CI) is the frequent integration of small
when the code is modified (writing unit tests for code changes during implementation. It seeks to reduce, or even
which is already written and functional usually is not eliminate, the long, drawn-out integration phase traditionally
cost effective). following implementation. Integrating small changes doesn’t
just spread the effort out over the whole cycle, it reduces the of code. Large code bases mean more implementation,
amount of integration time because small changes are easier to integration, and debugging time, as well as higher long term
integrate and aid debugging by isolating defects to small areas maintenance costs. All of these are non-value added work (i.e.,
of code. waste) when the code base contains unneeded or
inefficient code.
CI systems use a source code repository, scripted builds,
and automated tests to retrieve source code, build software, All aspects of software development can affect the code base
execute tests, and report results each time a change is made. size. Requirements analysis resulting in features with little
likelihood of use and overly generic, all-encompassing designs
• Use a dedicated build machine to host the CI system.
generate extra code. Scope creep and unnecessary features
Refer to the Continuous Integration: Servers and Tools
increase the amount of code. Even testing can generate
Refcard (#87) for details on setting up a CI system.
unnecessary code if the code under test is itself unnecessary.
• Check code changes into the repository a minimum of
once a day (per developer); once an hour or more is Minimizing code base size requires two actions: identify
even better. and eliminate unnecessary code, and write efficient code.
Minimizing code base size is not unlike a fitness program: diet
• Immediately address any failures in the build. Fixing the to eliminate the excess, and exercise to shape up what’s left.
build takes precedence over further implementation.
Eliminate Unnecessary Code
While the use of a dedicated computer, or build machine, to Eliminating unnecessary code means identifying the code, or
host the CI system may seem obvious for a large project, it the forces that create it, and removing it.
provides advantages on small projects as well:
• Dedicated machines don’t compete for resources, • Adopt a fierce, minimalist approach. Every bit of code
Hot so builds are quicker and the results get back to the added to the code base must be justifiable. Remove
Tip developers sooner.
excessive requirements, simplify designs, and eliminate
• Dedicated machines have a stable, well-known scope creep.
configuration. Builds don’t fail because a new version
of a library was loaded or the runtime environment
was changed. • Reuse code and employ libraries to reduce the amount of
new code that must be written.
A CI system can also check coding standards, analyze code
coverage, create documentation, create deployment packages, • Prioritize requirements so developers implement
and deploy the packages. Anything that can be automated can important features first. As customers adjust the priorities
be included in a CI system. over the course of development, they drive development
of only useful features; unused features never get
implemented.
Feedback and Course Corrections • Deliver Fast: New, functional software is delivered to the
Feedback from the customer is the best way to discover customer in closely-spaced intervals.
what’s valuable to them. Each delivery of new functionality
creates a new opportunity for feedback, which in turn drives
course corrections due to clarification of the customer’s CUSTOMER PARTICIPATION
intent or actual changes to the requirements. Short iterations
produce more feedback opportunities and allow more course Customer participation in traditional projects typically is
corrections, so developers can hone in on what the limited to requirements specification at the beginning of the
customer wants. project and acceptance testing at the end. Collaboration
between customers and developers in the intervening time is
limited, typically consisting of status reports and the occasional
design review.
• Mark the end of the iteration with a demo and an official • Provide access to the product so the customer can see for
handoff to the customer. Demos foster pride in the themselves how it works, and provide a simple, direct
product by allowing the team to show off its work. feedback path so customers can input feedback easily.
Collaborate
SUMMARY
Collaborating directly with the customer is necessary for
developers to refine the requirements and understand exactly
what the customer wants. Most discussions of Lean Software Development don’t define
specific practices for implementing the process, and the large
• Designate a customer representative. The representative
number of Agile methodologies to choose from can leave
writes and/or collects requirements and prioritizes them.
newcomers confused and uncertain where to start. The specific
The representative clarifies requirements for developers.
practices outlined here provide a step-by-step approach to
• Schedule face-to-face time with the customer. At the very implementing a Lean Software Development process. Adopt
least, include a demo at the end of each iteration. one, several, or all the practices and take your first step into
the world of Lean Software Development.
Actual customers make the best customer
representatives, but when customer representatives are References
Hot not available a customer proxy can fill the role. A customer Implementing Lean Software Development: From Concept to Cash,
1
Tip proxy should be from the development team’s organization Poppendieck/Poppendieck, Addison-Wesley Professional, 2006
and must have a good understanding of the customer’s 2
Moving Toward Stillness, Lowry, Tuttle Publishing, 2000.
needs and business environment.
Emergent Design: The Evolutionary Nature of Professional Software
3
#82
CONTENTS INCLUDE:
■
■
About Cloud Computing
Usage Scenarios Getting Started with
Aldon Cloud#64Computing
■
Underlying Concepts
Cost
by...
■
Upcoming Refcardz
youTechnologies ®
■
Data
t toTier
brough Comply.
borate.
Platform Management and more...
■
Chan
ge. Colla By Daniel Rubio
tion:
dz. com
tegra ternvasll
ABOUT CLOUD COMPUTING one time events. TEN TS
INC ■
HTML LUD E:
us Ind Anti-PPaat
Basics
Automated growthHTM
ref car
nuorn
■
Valid
ation one time events, cloud ML
connected to what is now deemed the ‘cloud’. Having the capability to support
ul M.
computing platforms alsoulfacilitate
#84
Open the gradual growth curves
n an
Page Source
o
■
s
Vis it
C
faced by web applications. Tools
Core
By Key ■
Elem
Patte
has changed substantially in recent years, especially with Structur
E: al Elem ents
INC LUD gration the entrance of service providers like Amazon, Google and Large scale growth scenarios involvingents
specialized
NTS and mor equipment
rdz !
HTML
CO NTE Microsoft. es e... away by
(e.g. load balancers and clusters) are all but abstracted
Continu at Every e chang
m
About ns to isolat
relying on a cloud computing platform’s technology.
Software i-patter
space
■
n
Re fca
e Work
Build
riptio
and Ant
Desc
These companies have a Privat
are in long deployed
trol repos
itory
webmana applications
ge HTM
L BAS
■
Build
re
Buil Repo
This Refcard active
will introduce are within
to you to cloud riente computing, with an
d units
RATION etc. Some platforms ram support large grapRDBMS deployments.
■
The src
dy Ha
softw
e ine loping and Java s written in hical on of
INTEG attribute
task-o it all
softwar emphasis onDeve es by
Mainl these
ines providers, so youComm can better understand
also rece JavaScri user interfac web develop and the rris
Vis it
Network Security
codel chang desc
INUOU ding Task Level as the
e code
ww w.dzone.com
Label
Build
manu
al
d tool
depe deplo t need but as if
eve , a ) stalle the same nmen for stan overlap uen
(i.e. , inef Build t, use target enviro Amazon EC2: Industry standard it has
software and uagvirtualization ine. HTM , so <a>< tly are) nest
with terns problem ce pre-in whether dards
ated b></
ory. ns (i.e. Autom Redu ymen
has bec become e with a> is
via pat ticular d deploEAR) in each very little L
Maven 3
reposit -patter s that Pay only cieswhat you consume
tagge or Amazon’s cloud you cho platform
computing
the curr isome
heavily based moron fine. b></ ed insid
lained ) and anti the par solution duce nden For each (e.g. WAR es t
ent stan ose to writ more e imp a></ e
not lega each othe
x” b> is
be exp text to “fi are al Depeapplication deployment
Web ge until t a
librarifew years agonmen
t enviro was similar that will softwaredard
industry standard and virtualization app
e HTM technology.
orta nt,
tterns to pro Minim packa nden
Mo re
CI can ticular con used can rity all depe all targe
s will L or XHT arent. Reg the HTM l, but r. Tags
etimes Anti-pa they
tend
es, but to most phone services:
y Integ alizeplans with le that
late fialloted resources, ts with an and XHT simplify all help ML, und ardless
L VS
XHTM <a><
in a par hes som
Centr
end,
Binar
pro cess. the practic enti ng incurred costgeme
nt
whether e a single
such
temp
resources on
were consumed
t enviro
nmen
orthenot. Virtualization MLaare your
othe
you prov
erst of L
b></
in bad Mana based muchallows physical piece of hardware to
ide be HTM
approac ed with the cial, but, implem anding
Creat targe es to actually r web
rily nden
cy rties are nt
of the a solid L has
into differe coding.resources
necessa pared to
chang
efi Depe prope itting utilized by multiple operating
function systems.simplerThis allows foundati job adm been arou
associat to be ben
er
Ge t
te builds commo
are not Fortuna
late Verifi e comm than on
n com Cloud computing asRun it’sremo
known etoday has changed this.
befor alitytohas irably, nd for
They they
etc.
Temp Build (e.g. bandwidth, n memory, CPU) be allocated exclusively to tely exp that som
lts whe
ually,
appear effects. Privat y, contin Every elem mov used
to be, HTML
ecte job e time
ed resu The various resourcesPerfo rm a
consumed by webperio applications
dicall (e.g. nt team
pag
individual operating entsinstances. ed to CSS
system Brow d. Earl
y HTM has expand . Whi
gration
opme because
adverse unintend d Builds sitory Build r to devel common e (HTML . ser ed far le it has don
ous Inte web dev manufacture L had very
Stage Repo
e bandwidth, memory, CPU) areIntegtallied
ration on a per-unit CI serve basis or XHT
produc tinu e Build rm an from
extensio .) All are limited more than e its
e.com
ard ML shar
tern.
ack elopers rs add
Con Refc Privat
(starting from zero) by Perfo all majorated cloud
feedb computing platforms. As a user of Amazon’s esse
term e, this
on
n. HTM EC2 cloud
ntiallycomputing es certplatform, you are result
is a lack came up ed many com
layout anybody
the pat
occur
gration as based
of the ” cycl such Build Send
autom as they builds pr L plain ain elem supp
ous Inte tional use and test concepts
soon with clev ort.
Integ
ration ors as ion with text ents in of stan peting
entat
tinu dar er wor standar
ven “build include
docum
Con kar
the con s to the
oper
to rate devel
While efer of CI Gene
notion
DZone, Inc.
Cloud Computing
the
s on
expand
ISBN-13: 978-1-934238-74-5
140 Preston Executive Dr. ISBN-10: 1-934238-74-0
Suite 100
50795
Cary, NC 27513