SlideShare a Scribd company logo
Start with a simple Kata
Writing New code
4 Rules of Simple Design
Code Smells
Refactoring techniques
Mikado Method
Text Test
The Transformation Priority Premise (maybe)
The Romans used letters to represent numbers:
Specifically the letters "I, V, X, L, C, D, and M.“
Each letter has a value:
Numeral Number
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
There were certain rules that the numerals followed:
The symbols 'I', 'X', 'C', and 'M' can be repeated at most 3 times in a row. 'V', 'L',
and 'D' can never be repeated.
As Arabic numbers can be split into their constituent parts (1066 becomes 1 0 6
6), so too can Roman numerals, just without the zero (1066 becomes MLXVI, or
M (1000) LX (60) and VI (6)).
The '1' symbols ('I', 'X', and 'C') can only be subtracted from the 2 next highest
values ('IV' and 'IX', 'XL' and 'XC', 'CD' and 'CM'). The '5' symbols ('V', 'L', and 'D')
can never be subtracted.
Only one subtraction can be made per numeral ('XC' is allowed, 'XXC' is not).
As a games designer
I want to pass in an Arabic number and get a Roman numeral
back
So that I can correctly label my game releases using Roman
numerals
When an arabic number is passed, the correct Roman numeral is
returned.
Make sure all Roman numerals between 1 and 3000 are returned
correctly.
As a customer
I want to be able to convert a Roman numeral to a number,
So that I can buy the correct version of the game
When a Roman numeral is passed, the correct Arabic number is
returned.
Make sure all Roman numerals between I and MMM are returned
correctly.
Runs all the tests
Contains no duplicate code
Expresses all the ideas the author wants to express
Minimizes classes and methods
Runs all the tests
Follows once, and only once rule
Has high cohesion
Has loose coupling
The practice of pretending a piece of function you need is
there in the form you need it
Helps in:
Testability
Cohesion
Encapsulation
Correct coupling
Readability
Title
Summary
Detail
Title
Summary
Details
Hi and welcome to team Gilded Rose. As you know, we are a
small inn with a prime location in a prominent city ran by a
friendly innkeeper named Allison. We also buy and sell only
the finest goods. Unfortunately, our goods are constantly
degrading in quality as they approach their sell by date.
First an introduction to our system:
All items have a SellIn value which denotes the number of
days we have to sell the item
All items have a Quality value which denotes how valuable
the item is
At the end of each day our system lowers both values for
every item
Pretty simple, right? Well this is where it gets interesting:
The Quality of an item is never negative
“Aged Brie” actually increases in Quality the older it gets
The Quality of an item is never more than 50
“Sulfuras”, being a legendary item, never has to be sold or decreases
in Quality
“Backstage passes”, like aged brie, increases in Quality as it’s SellIn
value approaches; Quality increases by 2 when there are 10 days or
less and by 3 when there are 5 days or less but Quality drops to 0
after the concert
Check out the requirements file
Start writing according to the 4 rules of simple design
Use Coding by intentions
We’ll do a review at the end
Start from scratch
Start writing the most beautiful code in the world
If we spot a smell, we’ll direct you to its number
Until you show us the smell has been fixed, you’re blocked
We’ll do a review at the end
1. Duplicate code
2. God method
3. God class
4. Uncommunicative name
5. Comments
6. Premature generalization
7. Arrow code
8. Embedded constants
9. Too many parameters
10. Feature envy
11. Primitive obsession
12. Middleman
13. Inappropriate intimacy
14. Data class
15. Refused bequest
16. Indecent exposure
A technique to enable multiple programmers to share and
work on the same code base
Good for
Sharing and collaboration
To replace branch and merge based strategies
To achieve true continuous integration
We start with a goal
We draw a dependency graph to help us locate a path to reach
that goals
The graph is build as we progress
The graph is neither the only way, or even the best way
The goal
Prerequisites
Leaves
Dependency Arrows
The tick
Expand Prerequisite
Revert
Tick a Leaf
Commit Changes
We start by writing the goal
We Expand Prerequisite for the goal
What do we need to do to reach the goal
We pick a single prerequisite and try to implement it
If we succeeds – than it’s a leaf and we can tick a leaf
Which is followed by commit changes
If we fail – this is not a leaf
We revert
And Expand Prerequisite of this node
Repeat until finish
We need to add a new type of Item – “Conjured”
“Conjured” items degrade in Quality twice as fast as normal items
For that to work we need to update the update quality
mechanism.
Use the Mikado method.
For now there is no need to change the general architecture of
the code.
Open source tool for acceptance tests
Used for refactoring
Create a Gold Standard
Start refactoring with small steps
Run the installer
Make sure you install to a non-space based folder
Create a new app
Point the program at the exe
Run it once, and approve it.
Start from the current code
Refactor in small steps
We’ll do a review at the end
TDD Process is great tool for producing high quality code.
Some answers are missing:
Where do we start?
What’s the next step?
When do we stop?
The Transformations are a set of rules that helps us pick a next
step.
A complimentary technique to refactoring
They are a set of rules that helps us change the code behavior
Follows the - from specific to generic path
“As the tests get more specific, the code gets more generic.”
1. ({}–>nil) no code at all->code that employs nil
2. (nil->constant)
3. (constant->constant+) a simple constant to a more complex constant
4. (constant->scalar) replacing a constant with a variable or an argument
5. (statement->statements) adding more unconditional statements.
6. (unconditional->if) splitting the execution path
7. (scalar->array)
8. (array->container)
9. (statement->recursion)
10. (if->while)
11. (expression->function) replacing an expression with a function or algorithm
12. (variable->assignment) replacing the value of a variable.
There are probably more
The Transformations are prioritized
We prefer to use those which are higher on the list
When you write a test you aim for simpler transformation
Used correctly they should help you avoid “rabbit holes”
TDD sometime throws you on a wrong direction
Takes a lot of time and effort to get out of
(with experience you recognize those earlier)
Advanced Agile Programming Workshop
Advanced Agile Programming Workshop

More Related Content

Similar to Advanced Agile Programming Workshop

TDD Walkthrough - Encryption
TDD Walkthrough - EncryptionTDD Walkthrough - Encryption
TDD Walkthrough - Encryption
PeterKha2
 
A sweet taste of clean code and software design
A sweet taste of clean code and software designA sweet taste of clean code and software design
A sweet taste of clean code and software design
Kfir Bloch
 
[Php vigo][talk] unit testing sucks ( and it's your fault )
[Php vigo][talk] unit testing sucks ( and it's your fault )[Php vigo][talk] unit testing sucks ( and it's your fault )
[Php vigo][talk] unit testing sucks ( and it's your fault )
PHP Vigo
 
Simple Design
Simple DesignSimple Design
Simple Design
Declan Whelan
 
高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU
Su Jan
 
Raya code quality guidelines - enhancing readability
Raya code quality guidelines - enhancing readabilityRaya code quality guidelines - enhancing readability
Raya code quality guidelines - enhancing readability
Abdel Hady Muhammad
 
Clean Code summary
Clean Code summaryClean Code summary
Clean Code summary
Jan de Vries
 
Test-Driven Development
 Test-Driven Development  Test-Driven Development
Test-Driven Development
Amir Assad
 
BDD style Unit Testing
BDD style Unit TestingBDD style Unit Testing
BDD style Unit Testing
Wen-Tien Chang
 
Code quality
Code quality Code quality
Code quality
Sunil Prasad
 
Clean code
Clean codeClean code
Clean code
Henrique Smoco
 
Clean code and code smells
Clean code and code smellsClean code and code smells
Clean code and code smells
Md. Aftab Uddin Kajal
 
Writing testable code
Writing testable code Writing testable code
Writing testable code
Martin Hlaváč
 
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove
 
高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHU高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHU
Su Jan
 
Coding Checkpoints
Coding CheckpointsCoding Checkpoints
Coding Checkpoints
George Orhewere
 
Javascript breakdown-workbook
Javascript breakdown-workbookJavascript breakdown-workbook
Javascript breakdown-workbook
HARUN PEHLIVAN
 
Introduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmellsIntroduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmells
Claudio Bernasconi
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
mtoppa
 
Advanced java script essentials v1
Advanced java script essentials v1Advanced java script essentials v1
Advanced java script essentials v1
ASHUTOSHPATKAR1
 

Similar to Advanced Agile Programming Workshop (20)

TDD Walkthrough - Encryption
TDD Walkthrough - EncryptionTDD Walkthrough - Encryption
TDD Walkthrough - Encryption
 
A sweet taste of clean code and software design
A sweet taste of clean code and software designA sweet taste of clean code and software design
A sweet taste of clean code and software design
 
[Php vigo][talk] unit testing sucks ( and it's your fault )
[Php vigo][talk] unit testing sucks ( and it's your fault )[Php vigo][talk] unit testing sucks ( and it's your fault )
[Php vigo][talk] unit testing sucks ( and it's your fault )
 
Simple Design
Simple DesignSimple Design
Simple Design
 
高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU
 
Raya code quality guidelines - enhancing readability
Raya code quality guidelines - enhancing readabilityRaya code quality guidelines - enhancing readability
Raya code quality guidelines - enhancing readability
 
Clean Code summary
Clean Code summaryClean Code summary
Clean Code summary
 
Test-Driven Development
 Test-Driven Development  Test-Driven Development
Test-Driven Development
 
BDD style Unit Testing
BDD style Unit TestingBDD style Unit Testing
BDD style Unit Testing
 
Code quality
Code quality Code quality
Code quality
 
Clean code
Clean codeClean code
Clean code
 
Clean code and code smells
Clean code and code smellsClean code and code smells
Clean code and code smells
 
Writing testable code
Writing testable code Writing testable code
Writing testable code
 
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
 
高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHU高品質軟體的基本動作 101 for NTHU
高品質軟體的基本動作 101 for NTHU
 
Coding Checkpoints
Coding CheckpointsCoding Checkpoints
Coding Checkpoints
 
Javascript breakdown-workbook
Javascript breakdown-workbookJavascript breakdown-workbook
Javascript breakdown-workbook
 
Introduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmellsIntroduction to AntiPatterns & CodeSmells
Introduction to AntiPatterns & CodeSmells
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
 
Advanced java script essentials v1
Advanced java script essentials v1Advanced java script essentials v1
Advanced java script essentials v1
 

More from AgilePractitionersIL

Violating Scrum
Violating Scrum Violating Scrum
Violating Scrum
AgilePractitionersIL
 
Innovation through visualisation
Innovation through visualisationInnovation through visualisation
Innovation through visualisation
AgilePractitionersIL
 
Let's be a better manager by playing!
Let's be a better manager by playing!Let's be a better manager by playing!
Let's be a better manager by playing!
AgilePractitionersIL
 
NLP - tool to drive change
NLP -  tool to drive changeNLP -  tool to drive change
NLP - tool to drive change
AgilePractitionersIL
 
Balloon driven development
Balloon driven developmentBalloon driven development
Balloon driven development
AgilePractitionersIL
 
Agile Performance Reviews
Agile Performance Reviews Agile Performance Reviews
Agile Performance Reviews
AgilePractitionersIL
 
Agile Anywhere
Agile Anywhere Agile Anywhere
Agile Anywhere
AgilePractitionersIL
 
AdvanScrum: To Scrum and Beyond
AdvanScrum: To Scrum and BeyondAdvanScrum: To Scrum and Beyond
AdvanScrum: To Scrum and Beyond
AgilePractitionersIL
 
Starting up and improving on the way
Starting up and improving on the wayStarting up and improving on the way
Starting up and improving on the way
AgilePractitionersIL
 
Evolve & Disrupt
Evolve & DisruptEvolve & Disrupt
Evolve & Disrupt
AgilePractitionersIL
 
AQA flyer
AQA flyerAQA flyer
Practicing Agile and still being able to gain added value in social contribution
Practicing Agile and still being able to gain added value in social contributionPracticing Agile and still being able to gain added value in social contribution
Practicing Agile and still being able to gain added value in social contribution
AgilePractitionersIL
 
Technical debt in cyber ark [agile practitioners-2015]
Technical debt in cyber ark [agile practitioners-2015]Technical debt in cyber ark [agile practitioners-2015]
Technical debt in cyber ark [agile practitioners-2015]
AgilePractitionersIL
 
The 10 commandments of an agile tester in a legacy world
The 10 commandments of an agile tester in a legacy worldThe 10 commandments of an agile tester in a legacy world
The 10 commandments of an agile tester in a legacy world
AgilePractitionersIL
 
Engineering your culture how to keep your engineers happy
Engineering your culture   how to keep your engineers happyEngineering your culture   how to keep your engineers happy
Engineering your culture how to keep your engineers happy
AgilePractitionersIL
 

More from AgilePractitionersIL (15)

Violating Scrum
Violating Scrum Violating Scrum
Violating Scrum
 
Innovation through visualisation
Innovation through visualisationInnovation through visualisation
Innovation through visualisation
 
Let's be a better manager by playing!
Let's be a better manager by playing!Let's be a better manager by playing!
Let's be a better manager by playing!
 
NLP - tool to drive change
NLP -  tool to drive changeNLP -  tool to drive change
NLP - tool to drive change
 
Balloon driven development
Balloon driven developmentBalloon driven development
Balloon driven development
 
Agile Performance Reviews
Agile Performance Reviews Agile Performance Reviews
Agile Performance Reviews
 
Agile Anywhere
Agile Anywhere Agile Anywhere
Agile Anywhere
 
AdvanScrum: To Scrum and Beyond
AdvanScrum: To Scrum and BeyondAdvanScrum: To Scrum and Beyond
AdvanScrum: To Scrum and Beyond
 
Starting up and improving on the way
Starting up and improving on the wayStarting up and improving on the way
Starting up and improving on the way
 
Evolve & Disrupt
Evolve & DisruptEvolve & Disrupt
Evolve & Disrupt
 
AQA flyer
AQA flyerAQA flyer
AQA flyer
 
Practicing Agile and still being able to gain added value in social contribution
Practicing Agile and still being able to gain added value in social contributionPracticing Agile and still being able to gain added value in social contribution
Practicing Agile and still being able to gain added value in social contribution
 
Technical debt in cyber ark [agile practitioners-2015]
Technical debt in cyber ark [agile practitioners-2015]Technical debt in cyber ark [agile practitioners-2015]
Technical debt in cyber ark [agile practitioners-2015]
 
The 10 commandments of an agile tester in a legacy world
The 10 commandments of an agile tester in a legacy worldThe 10 commandments of an agile tester in a legacy world
The 10 commandments of an agile tester in a legacy world
 
Engineering your culture how to keep your engineers happy
Engineering your culture   how to keep your engineers happyEngineering your culture   how to keep your engineers happy
Engineering your culture how to keep your engineers happy
 

Recently uploaded

fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
AnkitaPandya11
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
Alina Yurenko
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 

Recently uploaded (20)

fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.fiscal year variant fiscal year variant.
fiscal year variant fiscal year variant.
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
All you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVMAll you need to know about Spring Boot and GraalVM
All you need to know about Spring Boot and GraalVM
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 

Advanced Agile Programming Workshop

  • 1.
  • 2. Start with a simple Kata Writing New code 4 Rules of Simple Design Code Smells Refactoring techniques Mikado Method Text Test The Transformation Priority Premise (maybe)
  • 3.
  • 4. The Romans used letters to represent numbers: Specifically the letters "I, V, X, L, C, D, and M.“ Each letter has a value: Numeral Number I 1 V 5 X 10 L 50 C 100 D 500 M 1000
  • 5. There were certain rules that the numerals followed: The symbols 'I', 'X', 'C', and 'M' can be repeated at most 3 times in a row. 'V', 'L', and 'D' can never be repeated. As Arabic numbers can be split into their constituent parts (1066 becomes 1 0 6 6), so too can Roman numerals, just without the zero (1066 becomes MLXVI, or M (1000) LX (60) and VI (6)). The '1' symbols ('I', 'X', and 'C') can only be subtracted from the 2 next highest values ('IV' and 'IX', 'XL' and 'XC', 'CD' and 'CM'). The '5' symbols ('V', 'L', and 'D') can never be subtracted. Only one subtraction can be made per numeral ('XC' is allowed, 'XXC' is not).
  • 6. As a games designer I want to pass in an Arabic number and get a Roman numeral back So that I can correctly label my game releases using Roman numerals When an arabic number is passed, the correct Roman numeral is returned. Make sure all Roman numerals between 1 and 3000 are returned correctly.
  • 7. As a customer I want to be able to convert a Roman numeral to a number, So that I can buy the correct version of the game When a Roman numeral is passed, the correct Arabic number is returned. Make sure all Roman numerals between I and MMM are returned correctly.
  • 8.
  • 9.
  • 10. Runs all the tests Contains no duplicate code Expresses all the ideas the author wants to express Minimizes classes and methods
  • 11. Runs all the tests Follows once, and only once rule Has high cohesion Has loose coupling
  • 12. The practice of pretending a piece of function you need is there in the form you need it Helps in: Testability Cohesion Encapsulation Correct coupling Readability
  • 15.
  • 16. Hi and welcome to team Gilded Rose. As you know, we are a small inn with a prime location in a prominent city ran by a friendly innkeeper named Allison. We also buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date.
  • 17. First an introduction to our system: All items have a SellIn value which denotes the number of days we have to sell the item All items have a Quality value which denotes how valuable the item is At the end of each day our system lowers both values for every item
  • 18. Pretty simple, right? Well this is where it gets interesting: The Quality of an item is never negative “Aged Brie” actually increases in Quality the older it gets The Quality of an item is never more than 50 “Sulfuras”, being a legendary item, never has to be sold or decreases in Quality “Backstage passes”, like aged brie, increases in Quality as it’s SellIn value approaches; Quality increases by 2 when there are 10 days or less and by 3 when there are 5 days or less but Quality drops to 0 after the concert
  • 19. Check out the requirements file Start writing according to the 4 rules of simple design Use Coding by intentions We’ll do a review at the end
  • 20.
  • 21.
  • 22. Start from scratch Start writing the most beautiful code in the world If we spot a smell, we’ll direct you to its number Until you show us the smell has been fixed, you’re blocked We’ll do a review at the end
  • 23. 1. Duplicate code 2. God method 3. God class 4. Uncommunicative name 5. Comments 6. Premature generalization 7. Arrow code 8. Embedded constants 9. Too many parameters 10. Feature envy 11. Primitive obsession 12. Middleman 13. Inappropriate intimacy 14. Data class 15. Refused bequest 16. Indecent exposure
  • 24.
  • 25.
  • 26.
  • 27. A technique to enable multiple programmers to share and work on the same code base Good for Sharing and collaboration To replace branch and merge based strategies To achieve true continuous integration
  • 28. We start with a goal We draw a dependency graph to help us locate a path to reach that goals The graph is build as we progress The graph is neither the only way, or even the best way
  • 30. Expand Prerequisite Revert Tick a Leaf Commit Changes
  • 31. We start by writing the goal We Expand Prerequisite for the goal What do we need to do to reach the goal We pick a single prerequisite and try to implement it If we succeeds – than it’s a leaf and we can tick a leaf Which is followed by commit changes If we fail – this is not a leaf We revert And Expand Prerequisite of this node Repeat until finish
  • 32.
  • 33. We need to add a new type of Item – “Conjured” “Conjured” items degrade in Quality twice as fast as normal items For that to work we need to update the update quality mechanism. Use the Mikado method. For now there is no need to change the general architecture of the code.
  • 34.
  • 35.
  • 36. Open source tool for acceptance tests Used for refactoring Create a Gold Standard Start refactoring with small steps
  • 37. Run the installer Make sure you install to a non-space based folder Create a new app Point the program at the exe Run it once, and approve it.
  • 38. Start from the current code Refactor in small steps We’ll do a review at the end
  • 39.
  • 40.
  • 41. TDD Process is great tool for producing high quality code. Some answers are missing: Where do we start? What’s the next step? When do we stop?
  • 42. The Transformations are a set of rules that helps us pick a next step. A complimentary technique to refactoring They are a set of rules that helps us change the code behavior Follows the - from specific to generic path “As the tests get more specific, the code gets more generic.”
  • 43. 1. ({}–>nil) no code at all->code that employs nil 2. (nil->constant) 3. (constant->constant+) a simple constant to a more complex constant 4. (constant->scalar) replacing a constant with a variable or an argument 5. (statement->statements) adding more unconditional statements. 6. (unconditional->if) splitting the execution path 7. (scalar->array) 8. (array->container) 9. (statement->recursion) 10. (if->while) 11. (expression->function) replacing an expression with a function or algorithm 12. (variable->assignment) replacing the value of a variable. There are probably more
  • 44. The Transformations are prioritized We prefer to use those which are higher on the list When you write a test you aim for simpler transformation Used correctly they should help you avoid “rabbit holes” TDD sometime throws you on a wrong direction Takes a lot of time and effort to get out of (with experience you recognize those earlier)