SlideShare a Scribd company logo
1 of 34
Download to read offline
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/

More Related Content

Similar to Simple Design

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)Danny Preussler
 
Introduction to TDD
Introduction to TDDIntroduction to TDD
Introduction to TDDAhmed Misbah
 
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
 
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.1Steven Grzbielok
 
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 katasRachel M. Carmena
 
Greythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideGreythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideVaco Seattle
 
你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?你真的搞懂了甚麼叫敏捷式開發?
你真的搞懂了甚麼叫敏捷式開發?Jen-Chieh Ko
 
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 2019Paulo Clavijo
 
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)Rachel M. Carmena
 
Eureka English Evening
Eureka English EveningEureka English Evening
Eureka English EveningJames Neve
 
Xp revisited - Agile Cymru 2018
Xp revisited - Agile Cymru 2018Xp revisited - Agile Cymru 2018
Xp revisited - Agile Cymru 2018Eddie Kenny
 
Software Craftsmanship - It's an Imperative
Software Craftsmanship - It's an ImperativeSoftware Craftsmanship - It's an Imperative
Software Craftsmanship - It's an ImperativeFadi Stephan
 
Basic agile namrata-workshop
Basic agile namrata-workshopBasic agile namrata-workshop
Basic agile namrata-workshopNamrata Datta
 
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)Peter Kofler
 
Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?Paul Ellarby - Why do scrum?
Paul Ellarby - Why do scrum?Paul Ellarby
 
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 careerPiotr Horzycki
 
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 2014Yuval Yeret
 

Similar to 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
 

More from Alistair McKinnell

Succeeding with Specification by Example
Succeeding with Specification by ExampleSucceeding with Specification by Example
Succeeding with Specification by ExampleAlistair McKinnell
 
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)Alistair McKinnell
 
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?Alistair McKinnell
 
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 CodeAlistair McKinnell
 
Agile Tour Shanghai December 2011
Agile Tour Shanghai December 2011Agile Tour Shanghai December 2011
Agile Tour Shanghai December 2011Alistair McKinnell
 
Struggling to Create Maintainable Unit Tests?
Struggling to Create Maintainable Unit Tests?Struggling to Create Maintainable Unit Tests?
Struggling to Create Maintainable Unit Tests?Alistair McKinnell
 

More from 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?
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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 RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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 productivityPrincipled Technologies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Simple Design