SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
The First 100 Hours:
   Simple Design

Jason Cheong-Kee-You
  @jpcky www.mightyjupiter.com


   Alistair McKinnell
@amckinnell www.valuablecode.com
The First 100 Hours
The First 100 Hours

1. Learning
2. Test-Driven Development
3. Design
Pair Programming
44            A Rhythm for Success: The
                              TDD Cycle

                                                              R ed




                                                                                  Gre
                                                 tor




                                                                                      en
                                              ac



                                                       R ef

Prepared exclusively for Alistair McKinnell     Copyright ©2011 Pragmatic Programmers
Where DoYou Stand?
Simple Design
Simple Design

1. All tests must pass
2. No code is duplicated
3. Code is self-explanatory
4. No superfluous parts exist
Exercise
Exercise

Why are the four rules of
simple design important?
Simple Design

1. All tests must pass
2. No code is duplicated
3. Code is self-explanatory
4. No superfluous parts exist
Simple Design

1. Passes its tests
2. No code is duplicated
3. Code is self-explanatory
4. No superfluous parts exist
Simple Design

1. Passes its tests
2. Minimizes duplication
3. Code is self-explanatory
4. No superfluous parts exist
Simple Design

1. Passes its tests
2. Minimizes duplication
3. Maximizes clarity
4. No superfluous parts exist
Simple Design

1. Passes its tests
2. Minimizes duplication
3. Maximizes clarity
4. Has fewer elements
Simple Design

1. Passes its tests (given TDD)
2. Minimizes duplication
3. Maximizes clarity
4. Has fewer elements
Simple Design

1. Passes its tests (given TDD)
2. Minimizes duplication
3. Maximizes clarity (fix names)
4. Has fewer elements
Simple Design

1. Passes its tests (given TDD)
2. Minimizes duplication
3. Maximizes clarity (fix names)
4. Has fewer elements
That leaves me with two key elements
of simple design: remove duplication and
fix bad names.
When I remove duplication, I tend to see
an appropriate structure emerge, and when
I fix bad names, I tend to see responsibilities
slide into appropriate parts of the design.


                          J. B. Rainsberger
Simple Design

• Remove duplication
• Fix bad names
Exercise
Exercise

How to choose good names?


         Build a checklist
Choosing Good Names
Choosing Good Names

    Pronounceable Names
    Avoid Encodings
Choosing Good Names

    Intention-Revealing Name
    Role-Suggesting Name
Choosing Good Names


    Ubiquitous Language
Simple Design

1. All tests must pass
2. No code is duplicated
3. Code is self-explanatory
4. No superfluous parts exist
Simple Design

• Remove duplication
• Fix bad names
“The prime directive that was
unanimously agree upon by all
 present was that in the next
tens years Agile leaders must
Demand Technical Excellence”

                Jeff Sutherland
“Failure to do that means
you are not an Agile leader”


               Jeff Sutherland
Photo Credits
http://www.flickr.com/photos/54087404@N00/4638056301/



http://www.flickr.com/photos/49016492@N08/4534101229/



http://www.flickr.com/photos/27558040@N00/4151899795/



http://www.flickr.com/photos/21561428@N03/5520629205/



http://www.flickr.com/photos/flatcat/3555774083/

Weitere ähnliche Inhalte

Ähnlich wie Simple Design

How to get placed in product based companies as a software developer
How to get placed in product based companies as a software developer How to get placed in product based companies as a software developer
How to get placed in product based companies as a software developer
varunbhatt23
 
你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?
Jen-Chieh Ko
 

Ähnlich wie Simple Design (20)

Testing in production
Testing in productionTesting in production
Testing in production
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDD
 
How to get placed in product based companies as a software developer
How to get placed in product based companies as a software developer How to get placed in product based companies as a software developer
How to get placed in product based companies as a software developer
 
Professional UI Design with APEX 5.1
Professional UI Design with APEX 5.1Professional UI Design with APEX 5.1
Professional UI Design with APEX 5.1
 
Talking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katasTalking about craftsmanship with ensaimadas and katas
Talking about craftsmanship with ensaimadas and katas
 
Greythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideGreythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview Guide
 
你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
 
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
Talking about craftsmanship with "ensaimadas" and katas (May, 2018)
 
Eureka English Evening
Eureka English EveningEureka English Evening
Eureka English Evening
 
Make a better with clean code
Make a better with clean codeMake a better with clean code
Make a better with clean code
 
Xp revisited - Agile Cymru 2018
Xp revisited - Agile Cymru 2018Xp revisited - Agile Cymru 2018
Xp revisited - Agile Cymru 2018
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
 
Software Craftsmanship - It's an Imperative
Software Craftsmanship - It's an ImperativeSoftware Craftsmanship - It's an Imperative
Software Craftsmanship - It's an Imperative
 
Basic agile namrata-workshop
Basic agile namrata-workshopBasic agile namrata-workshop
Basic agile namrata-workshop
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?
 
Software development myths that block your career
Software development myths that block your careerSoftware development myths that block your career
Software development myths that block your career
 
Agile Intro and 2014 trends for AgileSparks open day at John-Bryce - March 2014
Agile Intro and 2014 trends for AgileSparks open day at John-Bryce - March 2014Agile Intro and 2014 trends for AgileSparks open day at John-Bryce - March 2014
Agile Intro and 2014 trends for AgileSparks open day at John-Bryce - March 2014
 

Mehr von Alistair McKinnell

Agile Tour Shanghai December 2011
Agile Tour Shanghai December 2011Agile Tour Shanghai December 2011
Agile Tour Shanghai December 2011
Alistair McKinnell
 

Mehr von Alistair McKinnell (10)

Succeeding with Specification by Example
Succeeding with Specification by ExampleSucceeding with Specification by Example
Succeeding with Specification by Example
 
Don't Settle for Poor Names (Or Poor Design)
Don't Settle for Poor Names (Or Poor Design)Don't Settle for Poor Names (Or Poor Design)
Don't Settle for Poor Names (Or Poor Design)
 
Don't Settle for Poor Names
Don't Settle for Poor NamesDon't Settle for Poor Names
Don't Settle for Poor Names
 
The Boy Scout Rule
The Boy Scout RuleThe Boy Scout Rule
The Boy Scout Rule
 
Advanced Developer Testing
Advanced Developer TestingAdvanced Developer Testing
Advanced Developer Testing
 
What Can Journalists Teach Developers About Writing Source Code?
What Can Journalists Teach Developers About Writing Source Code?What Can Journalists Teach Developers About Writing Source Code?
What Can Journalists Teach Developers About Writing Source Code?
 
Ubiquitous Testing
Ubiquitous TestingUbiquitous Testing
Ubiquitous Testing
 
Commonality and Variability Analysis: Avoiding Duplicate Code
Commonality and Variability Analysis: Avoiding Duplicate CodeCommonality and Variability Analysis: Avoiding Duplicate Code
Commonality and Variability Analysis: Avoiding Duplicate Code
 
Agile Tour Shanghai December 2011
Agile Tour Shanghai December 2011Agile Tour Shanghai December 2011
Agile Tour Shanghai December 2011
 
Struggling to Create Maintainable Unit Tests?
Struggling to Create Maintainable Unit Tests?Struggling to Create Maintainable Unit Tests?
Struggling to Create Maintainable Unit Tests?
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Simple Design