Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
l e a n software development
www.poppendieck.com Mary Poppendieck [email protected] [email protected]
Faulty Assumptions
How Lean Software Development Reduces Risk
l e a n software development
www.poppendieck.com Mary Poppendieck [email protected] [email protected]
間違った想定
リーンソフトウェア開発がリスクを減らすやり方
スライド翻訳: 原田騎郎・川口恭伸
l e a n
Assumptions
Assumption: an unstated belief about how the world is, or will become.
At the heart of most disasters we find faulty assumptions in design or operation.
Assumptions made are risks accepted and taken. When assumptions are tied to other assumptions, risks quickly magnify.
April 12 Copyright©2012 Poppendieck.LLC 3
Robert Charette, Challenging the Fundamental Notions of Software Development
http://www.itmpi.org/assets/base/images/itmpi/privaterooms/robertcharette/ChallengingtheFundamentalNotions.pdf
It is not what you know that can hurt you.
It is what you know that is not so. Will Rodgers
Examine Your Assumptions
l e a n
想定を検査しよう
想定
想定(思い込み): 世界のあり方について確かめていないが信じていること
ほとんどの大災害の主たる要因には、デザイン や運用についての間違った想定がある
想定されると、それに含まれるリスクを受け入れ、 リスクをとったことになる。思い込みが他の思い込みとつながると、リスクは急速に増大する。
April 12 Copyright©2012 Poppendieck.LLC 4
Robert Charette, Challenging the Fundamental Notions of Software Development
http://www.itmpi.org/assets/base/images/itmpi/privaterooms/robertcharette/ChallengingtheFundamentalNotions.pdf
あなたを傷つけることを知っているものではない。あなたを傷つけないと知っているものである。
Will Rodgers
l e a n
TPS: Just-in-Time Flow
Faulty Assumption:
Maximum machine productivity = maximum overall productivity
April 12 5 Copyright©2008 Poppendieck.LLC
Faulty Assumption:
Maximum individual productivity = maximum overall productivity
l e a n
TPS: ジャストインタイムの流れ
誤った想定: 機械の生産性最大 =
全体生産性最大
April 12 6 Copyright©2008 Poppendieck.LLC
誤った想定: 個人の生産性最大 =
全体生産性最大
l e a n April 12 7 Cop
yrig
ht©
200
6
Pop
pen
diec
k.L
LC
Assumption:
Early Specification Reduces Waste
Features and Functions Used in a Typical System
Standish Group Study Reported at XP2002 by Jim Johnson, Chairman
Always
7%
Often
13%
Sometimes
16% Rarely
19%
Never 45%
Rarely or Never
Used: 64%
Often or Always
Used: 20%
l e a n April 12 8 Copyright©2006 Poppendieck.LLC
想定: 早く仕様を固めればムダを減らせる
一般的なシステムにおけるフィーチャーや機能の使用頻度
Standish Group Study Reported at XP2002 by Jim Johnson, Chairman
いつも使う
7%
よく使う
13%
ときどき 16%
めったに使わない 19%
まったく 使わない
45%
めったに使わない、 全く使わない: 64%
いつも使う、 よく使う: 20%
l e a n April 12 9 Cop
yrig
ht©
200
6
Pop
pen
diec
k.L
LC
Lean Principle:
Eliminate Waste
Waste is making the wrong thing or making the thing wrong.
Features that will not be used are waste, even if customers asked for them!
In any system where technology or market conditions change, an early detailed specification significantly increases waste.
The Biggest opportunity for increasing Software Development Productivity: Write Less Code!
Cost
Time
l e a n April 12 10 Cop
yrig
ht©
200
6
Pop
pen
diec
k.L
LC
リーンの原則: ムダをなくす
間違ったモノを作るムダ、作る方法を間違えるムダ
使われないフィーチャーはムダ。顧客が要求したにしても!
どんなシステムでも技術動向、市場動向が変化すれば、早すぎる詳細化仕様はムダを大きく増やす
Tソフトウェア開発における生産性向上の 最大の機会: 書くコードを減らせ!
Cost
Time
l e a n
TPS: Single Digit Set-up
Manufacturing
Faulty Assumption: Die changed have a huge overhead
Don’t change dies very often
TPS: Economics requires frequent die change
One Digit Exchange of Die
Software Development
Faulty Assumption: Releases have a huge overhead
Don’t release very often
Lean: Economics requires many frequent releases
Continuous Delivery
March, 2003 11 Cop
yrig
nt©
200
3
Pop
pen
diec
k.L
LC
l e a n
TPS: シングル段取り
製造業
誤った想定: 金型交換のオーバーヘッドは大きい
しょっちゅう金型を換えるな
TPS: 経済的状況により、金型を換えざるを得ない
シングル段取り(10分未満で金型交換完了)
ソフトウェア開発
誤った想定: リリースのオーバーヘッドは大きい
しょっちゅうリリースするな
リーン: 経済的状況により、しょっちゅうリリースせざ
るを得ない
継続的デリバリー
March, 2003 12
Copyrignt©2003 Poppendieck.LLC
l e a n April 12 13 Cop
yrig
ht©
200
6
Pop
pen
diec
k.L
LC
Assumption: The Job of
Testing is to Find Defects
The job of testing is to prevent defects
If you are focused on finding defects
– you are not focused on preventing them.
A quality process builds quality into the code
If you routinely find defects during verification
– your process is defective.
Defects are not caused by developers
Defects are caused by a system which allows defects.
– Defects are a management problem. --- W. Edwards Deming
l e a n April 12 14 Cop
yrig
ht©
200
6
Pop
pen
diec
k.L
LC
想定: テストの仕事は、不良を見つけることだ
テストの仕事は、不良を防止することだ 不良の発見に集中してしまうと、
– 不良の防止に注意を払わなくなる
品質プロセスは、品質をコードの中に作り込む 検証中にしょっちゅう不良が見つかるなら、
– プロセスが壊れている
不良の原因は開発者ではない 不良の原因は、不良を許すシステム にある
– 不良はマネジメントの問題である --- W. Edwards Deming
l e a n
Lean Principle:
Build Quality In
How good are you? When in your release cycle do you try to freeze code and test the system?
What percent of the release cycle remains for this “hardening”?
Typical: 30%
Sometimes: 50%
Top Companies: <10%
Release Cycle
Every software development process ever invented has had the same primary goal – find and fix defects as early in the development process as possible. If you are finding defects at the end of the development process – your process is not working for you.
April 12 Copyright©2012 Poppendieck.LLC 15
l e a n
リーンの原則:
品質を作り込む
どれくらいうまく使えている? リリースサイクルの中で、コードをフリーズしてテストを始めるのはいつ? リリースサイクルの中で、コードフリーズ後の「堅牢化」作業が締める割合は?
普通: 30%
時々: 50%
トップ企業: <10%
リリースサイクル
これまでに考案されたソフトウェア開発プロセスには、すべからく共通のゴールを持っている。不良はなるべく早く発見し修正することだ。開発プロセスの最後で不良が見つかるなら、そのプロセスは適切に使われていない。
April 12 Copyright©2012 Poppendieck.LLC 16
l e a n
Total Cycle Time
Assumption: Releases are
Painful! Avoid Releases!
Is Your Release Cycle greater than six months?
Quick & Dirty Value Stream Map:
April 12 Copyright©2012 Poppendieck.LLC 17
Release Cycle Release Cycle
Harden Design UAT Develop Need a Feature
Release Cycle
Total Cycle Time Value-Added Time
Average Start End Start
Need a Feature
How can a one week feature
take over a year to deliver?
l e a n
Total Cycle Time
想定: リリースは辛い! リリースを避けよう!
リリースサイクルが6ヶ月以上?
バリューストリームマップはこんな感じ:
April 12 Copyright©2012 Poppendieck.LLC 18
リリースサイクル リリースサイクル
堅牢化 設計 受け入れテスト 開発 フィーチャー
要求
リリースサイクル
トータルサイクルタイム 付加価値時間
Average Start End Start
フィーチャー 要求
開発に1週間しかかからないフィーチャーのリリースに、 半年以上かかるの?
l e a n
Lean Principle:
Learn Constantly
For Each Business Capability:
1. Design a. Specify: Discuss and agree on
examples of intended behavior.
b. Automate: Put the examples into a regression framework (eg. cucumber).
2. Implement a. Develop: TDD + CI (with Contract Tests)
b. Refactor: Clean up the code to keep it simple.
c. Regression: End-to-End testing with regression framework.
3. Validate a. Test: Exploratory Testing, Performance Testing, Canary Releasing
b. Measure Value: A/B Experiments, Cohort Metrics, Interviews, etc.
4. Learn April 12 Copyright©2012 Poppendieck.LLC 19
Iter
ate
l e a n
リーン原則: 常に学ぶ
各ビジネス価値について: 1. デザイン
a. 明確化: 引き出したい行動の具体的な 例について議論し、合意する。
b. 自動化: その例をテストフレームワーク (cucumberなど)に入れる
2. 実装 a. 開発: TDD + CI (with Contract Tests) b. リファクタリング: コードをきれいに、シンプルに保つ c. 手戻りの防止: テストフレームワークで全体をテストする
3. 確認 a. テスト: 探索的テスト, パフォーマンステスト, カナリアリリース b. 価値を実測する: A/B テスト, コホート分析, インタビュー, etc.
4. 学習
April 12 Copyright©2012 Poppendieck.LLC 20
繰り
返す
TDD: Test Driven Development CI: Continuous Integration
l e a n
Rep
orts
Met
adat
a
Rep
orts
Met
adat
a
BIN
AR
IS
Continuous Delivery
Testers
Self-Service Deployments
Source
Code & Tests
UAT Stage Configure Environment
Deploy Binaries
Smoke Test
Manual Testing
Rep
orts
Met
adat
a
Capacity Stage Configure Environment
Deploy Binaries
Smoke Test
Run Capacity Tests
Operations Push-Button
Releases
Testers
Production Configure Environment
Deploy Binaries
Smoke Test
Acceptance Stage Configure Environment
Deploy Binaries
Smoke Test
Run Acceptance Tests
Commit Stage Compile
Commit Tests
Assembly
Code Analysis
BIN
AR
IS
VERSION CONTROL
ARTIFACT REPOSITORY
Environment
& Application
Configuration
Scripts
BIN
AR
IS
Develop Stage Design
Code & Script
Unit Test
Refactor
Rep
orts
Met
adat
a
April 12 Copyright©2012 Poppendieck.LLC 21
Design Stage Model
Hypothesis
SBE
Wireframes
l e a n
レポ
ート
メタ
デー
タ
レポ
ート
メタ
デー
タ
バイ
ナリ
継続的デリバリー
テスター
セルフサービス デプロイメント
ソースコード & テスト
UATステージ 環境設定
バイナリのデプロイ スモークテスト
手動テスト
レポ
ート
メタ
デー
タ
キャパシティ ステージ 環境設定
バイナリのデプロイ スモークテスト
キャパシティテストを実行
オペレーション
ボタンを押す だけでリリース
Testers
本番(プロダクション) 環境設定
バイナリのデプロイ スモークテスト
受入 ステージ 環境設定
バイナリのデプロイ スモークテスト
受入テストを実行
コミット ステージ コンパイル
コミットテスト アセンブリ
コードアナリシス
バイ
ナリ
バージョン管理
成果物(アーティファクト) リポジトリ
環境 & アプリケーション 設定スクリプト
バイ
ナリ
開発ステージ 設計
コード & Script ユニットテスト
リファクタリング
レポ
ート
メタ
デー
タ
April 12 Copyright©2012 Poppendieck.LLC 22
設計ステージ モデリング
仮説 SBE
ワイヤフレーム
l e a n
Assumption:
Organize with Projects
Up-front funding
Decompose into Detailed Tasks
Schedule Each Task
Manage Tasks to Schedule
Success = Cost/Schedule/Scope
Projects have an “end”
Project Teams Disband
Start of Project
Completion
Maintenance
Batch Funding →
Short Term Thinking
April 12 Copyright©2011 Poppendieck.LLC 23
Projects
l e a n
想定: プロジェクトを組織する
事前に予算決め
詳細なタスクに分割
個々のタスクをスケジュール
タスクのスケジュール管理
成功 = コスト/スケジュール/スコープ
プロジェクトは「終了」する
プロジェクトチームは解散
プロジェクト開始
完了
保守
一括で予算決め → 近視眼的思考
April 12 Copyright©2011 Poppendieck.LLC 24
プロジェクト
l e a n
Lean Principle:
Optimize the Whole System
Products
Incremental funding
Scope is expected to evolve
Learning is more important than “The Plan”
Manage Workflow, rather than Tasks
Success = profit/market share
Successful Products don’t “end”
Team usually stays with the Product
Concept Feasibility
Internal Release
Alpha Release
Beta Release
First Production Release
Major Release
Dot upgrade
Incremental Funding
→ System Thinking
April 12 Copyright©2011 Poppendieck.LLC 25
l e a n
リーンの原則: システム全体を最適化
プロダクト
漸進的予算
スコープは進化することを予期している
学習は、「計画」よりも重要
ワークフローを管理。タスク管理でなく
成功 = 利益/市場シェア
成功した製品は、「終了」しない
チームは、製品とともに存続する
コンセプト 実現可能性
内部リリース
アルファ版
ベータ版
製品版初版
メジャーリリース
小規模修正
漸進的予算
→ システム思考
April 12 Copyright©2011 Poppendieck.LLC 26
l e a n
Empire State Building
September 22, 1929
Demolition started
January 22, 1930
Excavation started
March 17, 1930
Construction started
November 13, 1930
Exterior completed
May 1, 1931
Building opened
Exactly on time
18% under budget
One Year Earlier:
How did they do it? The key: Focus on FLOW. April 12 Copyright©2011 Poppendieck.LLC 27
l e a n
エンパイアステートビル
1929/9/22
解体工事開始 1930/1/22
基礎工事開始
1930/3/17
建設開始
1930/11/13
外装建築完了
1931/5/1 ビルがオープン
予定通り
予算は18%下回る
当初予定より1年早く竣工:
どうしてこんなことが可能? 鍵は: 流れに集中すること April 12 Copyright©2011 Poppendieck.LLC 28
l e a n
Steel Schedule
We thought of the work as if it
were a band marching through
the building and out the top.
From: “Building the Empire State” Builders Notebook: Edited by Carol Willis
April 12 Copyright©2011 Poppendieck.LLC 29
l e a n
鉄骨の スケジュール
自分たちは、ビルの中をしたから一番上まで行進するバンドみたいなつもりで仕事をしていた。
From: “Building the Empire State” Builders Notebook: Edited by Carol Willis
April 12 Copyright©2011 Poppendieck.LLC 30
l e a n
The Four Pacemakers
1. Structural Steel Construction
Completed September 22, 12 days early
2. Concrete Floor Construction
Completed October 22, 6 days early
3. Exterior Metal Trim &Windows
Completed October 17, 35 days early
4. Exterior Limestone
Completed November 13, 17 days early
From: “Building the Empire State” Builders Notebook: Edited by Carol Willis
April 12 Copyright©2011 Poppendieck.LLC 31
l e a n
4つのペースメーカー
1. 構造鉄骨の建築 9/22 完了, 12 日早く
2. コンクリート床の建築 10/22完了, 6 日早く
3. 窓枠などの外装と窓 10/17完了, 35 日早く
4. 石灰岩の外装 11/13完了, 17 日早く
From: “Building the Empire State” Builders Notebook: Edited by Carol Willis
April 12 Copyright©2011 Poppendieck.LLC 32
l e a n
Key Success Factors
1. Teamwork of owner, architect, and builder
Eliminated design loops by consulting experts early.
2. Deeply Experienced Builders
Fixed Price Contract!
3. Focus on the key constraint: Material Flow
500 trucks a day – no storage on site
4. Decoupling
The pacemakers (and other systems) were designed to be independent
5. Cash Flow Thinking Every day of delay cost $10,000 ($120,000 today).
6. Schedule was not laid out based on the details of the building design, the building was designed based on the constraints of the situation.
Two acres of land in the middle of New York City, zoning ordinances, $35,000,000 of capital, the laws of physics, and a May 1, 1931 deadline.
April 12 Copyright©2011 Poppendieck.LLC 33
l e a n
主な成功要因
1. オーナー、アーキテクト、施工者のチームワーク エキスパートに早くから相談することで、設計の ループをなくす
2. 熟達した施工者 固定価格契約!
3. 主要な制約に集中: 資材の流れ トラック500台/日 – 現地に資材置き場はない
4. 依存の切り離し 4つのペースメーカー(と他のシステム) は独立して動けるように設計された
5. キャッシュフロー思考 一日遅れのコストは、$10,000 (今の価値に直すと$120,000).
6. ビル設計の詳細をもとにスケジュールを引くことはしなかった。ビルは、状況における制約に基づいて設計された ニューヨークの中心の2エーカーの土地、土地利用区分、3500万ドルの資
金、物理法則、1931/5/1 という納期
April 12 Copyright©2011 Poppendieck.LLC 34
l e a n
Lessons
Design system to meet the real constraints;
do not derive constraints from the design.
Workflows are easier to control &
more predictable than schedules.
Decouple workflows;
break dependencies!
April 12 Copyright©2011 Poppendieck.LLC 35
l e a n
学び
システムを現実の制約に合うように設計せよ 設計から制約を導く出すのではない
スケジュールよりワークフローのほうが
予想しやすく制御しやすい
ワークフローを切り離せ
依存関係をなくせ!
April 12 Copyright©2011 Poppendieck.LLC 36
l e a n
Iterative Workflow
Concept
Product
or
Business Goals
High Level
Stories
& Tests
Daily
Delivery Discovery
Deployable
Software with
Test Suites
Feedback Ready–Ready
Done–Done
Every 2-4
Weeks
Shortly Before
Implementation
April 12 Copyright©2011 Poppendieck.LLC 37
l e a n
繰り返しワークフロー
Concept
Product
or
Business Goals
High Level
ストーリーと テスト
毎日
デリバリー 発見
デプロイ可能
テスト付き ソフトウェア
フィードバック Ready–Ready
Done–Done
2-4週毎 実装のちょっと前
April 12 Copyright©2011 Poppendieck.LLC 38
l e a n
Kanban Workflow
Visualize and Manage Workflow Limit Work in Process
Clarify “Done” for each Column Understand Capacity
Discover Dev/Unit Test Deploy orem ipsum dolor sit
amet, co nse ctetur
orem ipsum dolor sit
amet, co nse ctetur
orem ipsum dolor sit
amet, co nse ctetur
orem ipsum dolor sit
amet, co nse ctetur
SIT 5 6 3
FLOW Avg cycle time: days 12
orem ipsum dolor sit
amet, co nse ctetur
orem ipsum dolor sit
amet, co nse ctetur
orem ipsum dolor sit
amet, co nse ctetur
Next 3
orem ipsum dolor sit
amet, co nse ctetur
orem ipsum dolor sit
amet, co nse ctetur
Weekly Dev
Ready
SIT Ready
April 12 Copyright©2011 Poppendieck.LLC 39
Ready to Develop:
1. Wireframes
2. Story Tests
3. Less than 3 days work
Ready for system test
1. Story test passed & in
regression harness
2. No false negatives
3. Proper environment
Ready to Design:
1. Vendor time committed
2. ……..
Ready to Deploy:
1. Regression passed
2. ……..
l e a n
Kanban ワークフロー
ワークフローを見える化して管理 仕掛品を制限
各列の “Done” の定義の明確化 能力量を把握する
発見 開発/単体テスト デプロイ orem ipsum dolor sit amet, co nse ctetur
orem ipsum dolor sit amet, co nse ctetur
orem ipsum dolor sit amet, co nse ctetur
orem ipsum dolor sit amet, co nse ctetur
SIT 5 6 3
流れ 平均サイクルタイム: 日 12
orem ipsum dolor sit amet, co nse ctetur
orem ipsum dolor sit amet, co nse ctetur
orem ipsum dolor sit amet, co nse ctetur
次 3
orem ipsum dolor sit amet, co nse ctetur
orem ipsum dolor sit amet, co nse ctetur
週次 Dev
Ready
SIT Ready
April 12 Copyright©2011 Poppendieck.LLC 40
Ready to Develop: 1. Wireframes 2. Story Tests 3. Less than 3 days work
Ready for system test 1. Story test passed & in
regression harness 2. No false negatives 3. Proper environment
Ready to Design: 1. Vendor time committed 2. ……..
Ready to Deploy: 1. Regression passed 2. ……..
l e a n April 12 41 Cop
yrig
ht©
200
6
Pop
pen
diec
k.L
LC
Principles of
Lean Software Development
1. Eliminate Waste
2. Build Quality In
3. Learn Constantly
4. Deliver Fast
5. Optimize the Whole
6. Engage Everyone
7. Keep Getting Better
Speed
Quality Low Cost
l e a n April 12 42 Cop
yrig
ht©
200
6
Pop
pen
diec
k.L
LC
リーンソフトウェア開発 の原則
1. ムダをなくす
2. 品質を作り込む
3. 常に学ぶ
4. 速く届ける
5. 全体を最適化
6. 全員参加
7. 継続的改善
スピード
品質 コスト低減
l e a n software development
www.poppendieck.com Mary Poppendieck [email protected] [email protected]
Thank You!
More Information: www.poppendieck.com
l e a n software development
www.poppendieck.com Mary Poppendieck [email protected] [email protected]
ありがとうございました!
詳細は: www.poppendieck.com