SlideShare a Scribd company logo
Agile Principles and
Practices
And how they work together
Vipin Jose
* First Developer usually gets the opportunity to set some of the foundational design and standards
Java Developer since 2006
5 greenfield projects where each > 1 year
First developer* in 4
2 high stakes (most recent)
1 truly agile (current)
Expectations
 Flexible enough to accommodate any change
 Quick turn around time
The source is of high quality if the software development process can achieve these.
Main attributes the business expects from its software development process
Without the right processes in place. Software development is like stacking the
bricks without using mortar.
The bricks are stacked, now don’t touch it!
It is possible…
… but fundamentally flawed
Just use mortar!!
The Right Mix for Mortar
 SOLID Design Principles
 Automated Test Cases First
 Continuous Integration / Continuous Deployment
 Design Only for Requirement
 Short Sprints, Short stories
 Pair Programming
 Constant Code Refactoring
 Constant Culture Building
All are required to make the right mix.
SOLID Design Principles
 Single responsibility principle
 Open/closed principle
 Liskov substitution principle
 Interface segregation principle
 Dependency inversion principle
Single Responsibility
 Might sound too subjective.
E.g.
DAO
Good ways to determine:
- Test Cases
- Cyclomatic Complexity
Responsible for
CRUD operations
Responsible for Creating and
Reading and Updating and
Deleting
Too much responsibility?
Test Cases
 Can you write all possible test cases before implementing the class?
 Can you identify all the scenarios just by reading the test code? How about 6 months
later?
 Can you guarantee that a change you introduced in the class has not broken any of its
prior responsibilities? Even if you are not the one who created it?
Cyclomatic Complexity
Cyclomatic Complexity = Decision Points + 1
Complexity Assessment
1-10 not much risk
11-20 moderate risk
21-50 high risk
51+ untestable, very high risk
Cyclomatic Complexity
If a class is an element and cyclomatic complexity is its atomic number
Be In the Carbon-Nitrogen-Oxygen range
Carbon | Nitrogen | OxygenBoron Fluoride
Hmmm…
OK
Less Stable,
Less Testable 
Cyclomatic Complexity
 Too many classes?
 Use sub-modules and apply SOLID to them (OSGI specification)
 E.g: Netbeans RCP, Java Jigsaw
 Time to break the project into smaller ones
Automated Test Cases
 Types
 Unit Test Cases
 System Test Cases
 Integration Test Cases
 Performance Test Cases
Automated Test Cases
 Result
 Functional Requirements of the System and Responsibilities of the Class are documented and
the developer does not need to remember every minute detail.
 Fearless coding:
“Looks like this code is useless and debt causing. Let me remove it …
… Oh! 5 valid test cases failed. Let me refactor this.
 Advantage
 Project will pass the Lottery (Bus) Test
 Developer can focus on technical tasks and finding the right solution to each micro
requirement
 Knowledge Transfer time decreases and lesser risk of information getting lost in translation
Unit Test Cases
 Write the test cases first
 In most cases, a class can be one of the following two types:
 Manager:
 Orchestrates the flow and delegates responsibility to other classes
 Test by mocking the classes and verifying they are called the right number of times (and with correct
parameters) in different scenarios.
 Worker:
 Holds the data manipulating logic – Calculation, Transformation etc.
 Test by using real data that represents the input and the expected output for each scenario.
Mixing the two usually complicates the test class
System Test Cases
 Behavioral Test Cases
 Black box testing: test code should not share resources with main code.
 Can be run from developer environment
 Gherkin Scenarios And Cucumber: Given/When/Then
 Mock the external services: WireMock
 Embed the database. CassandraUnit.
Gherkin Scenarios or Unit Test Cases or
Both?
Project is really big and many classes are involved in a single flow
 Have both levels of testing
 Ease in maintenance, Quick Turn Around Time
Integration & Performance Test Cases
 Similar to system test cases but with real endpoints
 Probable steps in automation:
Spawn the environment
 Install latest production version of dependent services
 Run tests on subject service
 Destroy the environment
Continuous Integration and
Deployment
 Git
 Virtual Machines running the automated test cases on every merge to develop/master
Design Only for the Requirement
 “No, but we’ll need it, in future” is not enough justification:
 No guarantee that future requirement will directly fit into your design. Your previous effort, of introducing
the design, may be useless.
 Hard to cover it in behavioral testing as there is not requirement right now  Risk.
 Automated test cases allow a design change any time. Even major refactoring.
Q: “Is there a requirement for this design?”
No design document: Needless overheard
Code  Fluid Change Constant
Inline Documentation and self code walkthrough
Short Sprint, Short Stories
 Story Grooming:
 No story commitments per sprint. Does not compromise quality in fear of
deadline.
Feature / Change Request
Use Case 1
Story 1
1 Gherkin
Scenario
Use Case 2
Story 2
1 Gherkin
Scenario
Use Case 3
Story 3
1 Gherkin
Scenario
Pair Programming
 Keeps you alert and focused
 Immediate code review minimizes errors
 Immediate design brainstorming minimizes technical debt
Constant Rotation of Pairs and Stories
Feature 1 Feature 2 Interrupt Pair Story Grooming
Monday
Story 1
Dev1 Dev2
Story 1
Dev3 Dev4 Dev5 Dev6 Dev7 Dev8
Tuesday
Dev1 Dev8 Dev6 Dev4 Dev7 Dev5 Dev3 Dev2
Wednesday
Story 2 Dev1 Dev5 Dev7 Dev4 Dev3 Dev2 Dev6 Dev8
Thursday
Story 3
Dev8 Dev5
Story 2
Dev6 Dev4 Dev1 Dev7 Dev2 Dev3
Friday
Dev1 Dev5 Dev6 Dev2 Dev3 Dev8 Dev7 Dev4
Make it Work. Then, Make it Right.
 Functional Correctness is the only Acceptance Criteria, not design.
 Detailed Gherkin Test Case created in story grooming.
 Test case passed = ready for merge.
 Lead only needs to review correctness of behavioral test code during merge
 Design may not be the best but that’s OK.
 Design eventually gets corrected as opinions are consolidated.
 When different developers work on other scenarios involving the same code.
Proactive reviews by
the whole team
Best design achieved
faster
Lesser effort in
refactoring
Constant Code Refactoring
 Remove Technical Debt
 Remove Spaghetti Code
 Review and Correct the Design in Every Scenario
 Sonar in CI/CD
Constant Culture Building
 Daily standup meetings
The story will be complete by tomorrow.
The code will have maximum test coverage.
We should avoid refactoring the code.
We should write test case for the missed scenario.
 Decide upon the rules of engagement before start.
Rules return the desired results, guidelines do not
 Make this presentation at the beginning of the project.
 Production Support: motivator for code ownership
Ad

More Related Content

What's hot (20)

TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!
Kaizenko
 
Test drive on driven development process
Test drive on driven development processTest drive on driven development process
Test drive on driven development process
Muralidharan Deenathayalan
 
Tdd practices
Tdd practicesTdd practices
Tdd practices
axykim00
 
TDD with RSpec
TDD with RSpecTDD with RSpec
TDD with RSpec
Rachid Calazans
 
tem7
tem7tem7
tem7
guest69032c
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
Gallop Solutions
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
Lim Chanmann
 
Test driven development
Test driven developmentTest driven development
Test driven development
Nascenia IT
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDD
David Rodenas
 
Tdd
TddTdd
Tdd
Cristina Carstea
 
Code quality
Code quality Code quality
Code quality
Sunil Prasad
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven development
Ahmed El-Deeb
 
Test driven development - Zombie proof your code
Test driven development - Zombie proof your codeTest driven development - Zombie proof your code
Test driven development - Zombie proof your code
Pascal Larocque
 
TDD = bra design?
TDD = bra design?TDD = bra design?
TDD = bra design?
Kjetil Klaussen
 
Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)
Fatkul Amri
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
toteb5
 
Impression from Geecon 2014
Impression from Geecon 2014 Impression from Geecon 2014
Impression from Geecon 2014
Adamsus
 
Tdd
TddTdd
Tdd
mahmoud ramadan
 
Test-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsTest-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basics
Oleksii Prohonnyi
 
Loopt unit test experiences
Loopt unit test experiencesLoopt unit test experiences
Loopt unit test experiences
Heine Frifeldt
 
TDD That Was Easy!
TDD   That Was Easy!TDD   That Was Easy!
TDD That Was Easy!
Kaizenko
 
Tdd practices
Tdd practicesTdd practices
Tdd practices
axykim00
 
Test driven development vs Behavior driven development
Test driven development vs Behavior driven developmentTest driven development vs Behavior driven development
Test driven development vs Behavior driven development
Gallop Solutions
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
Lim Chanmann
 
Test driven development
Test driven developmentTest driven development
Test driven development
Nascenia IT
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDD
David Rodenas
 
Agile and test driven development
Agile and test driven developmentAgile and test driven development
Agile and test driven development
Ahmed El-Deeb
 
Test driven development - Zombie proof your code
Test driven development - Zombie proof your codeTest driven development - Zombie proof your code
Test driven development - Zombie proof your code
Pascal Larocque
 
Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)Test Driven Development (TDD) & Continuous Integration (CI)
Test Driven Development (TDD) & Continuous Integration (CI)
Fatkul Amri
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
toteb5
 
Impression from Geecon 2014
Impression from Geecon 2014 Impression from Geecon 2014
Impression from Geecon 2014
Adamsus
 
Test-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basicsTest-driven development & Behavior-driven development basics
Test-driven development & Behavior-driven development basics
Oleksii Prohonnyi
 
Loopt unit test experiences
Loopt unit test experiencesLoopt unit test experiences
Loopt unit test experiences
Heine Frifeldt
 

Viewers also liked (14)

Pintoo gdp
Pintoo gdpPintoo gdp
Pintoo gdp
Vikky s shambhoo
 
Energia eolica en mexico oportunidades carlos a. hdez hdez
Energia eolica en mexico oportunidades carlos a. hdez hdezEnergia eolica en mexico oportunidades carlos a. hdez hdez
Energia eolica en mexico oportunidades carlos a. hdez hdez
CarHdezHS
 
Type of voucher
Type of voucherType of voucher
Type of voucher
punyaprava pradhan
 
Tooth eruption
Tooth eruption  Tooth eruption
Tooth eruption
Ishaelaaa
 
Ku tovalpractica1
Ku tovalpractica1Ku tovalpractica1
Ku tovalpractica1
diegotoval
 
відмінники навчання
відмінники навчаннявідмінники навчання
відмінники навчання
Diana Fedinishinets
 
Creativity and Copywriting - Online
Creativity and Copywriting - OnlineCreativity and Copywriting - Online
Creativity and Copywriting - Online
Margery Lynn
 
Work ethics by baskaran
Work ethics by baskaranWork ethics by baskaran
Work ethics by baskaran
baskaranpaf
 
12 principles for Agile Development
12 principles for Agile Development 12 principles for Agile Development
12 principles for Agile Development
Julien Henzelin
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best Practices
Shiva Narayanaswamy
 
(2017-03-07) Patología ocular en Atención primaria (DOC)
(2017-03-07) Patología ocular en Atención primaria (DOC)(2017-03-07) Patología ocular en Atención primaria (DOC)
(2017-03-07) Patología ocular en Atención primaria (DOC)
UDMAFyC SECTOR ZARAGOZA II
 
High Quality Software Development with Agile and Scrum
High Quality Software Development with Agile and ScrumHigh Quality Software Development with Agile and Scrum
High Quality Software Development with Agile and Scrum
Lemi Orhan Ergin
 
DevOps: A Culture Transformation, More than Technology
DevOps: A Culture Transformation, More than TechnologyDevOps: A Culture Transformation, More than Technology
DevOps: A Culture Transformation, More than Technology
CA Technologies
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
Sonatype
 
Energia eolica en mexico oportunidades carlos a. hdez hdez
Energia eolica en mexico oportunidades carlos a. hdez hdezEnergia eolica en mexico oportunidades carlos a. hdez hdez
Energia eolica en mexico oportunidades carlos a. hdez hdez
CarHdezHS
 
Tooth eruption
Tooth eruption  Tooth eruption
Tooth eruption
Ishaelaaa
 
Ku tovalpractica1
Ku tovalpractica1Ku tovalpractica1
Ku tovalpractica1
diegotoval
 
відмінники навчання
відмінники навчаннявідмінники навчання
відмінники навчання
Diana Fedinishinets
 
Creativity and Copywriting - Online
Creativity and Copywriting - OnlineCreativity and Copywriting - Online
Creativity and Copywriting - Online
Margery Lynn
 
Work ethics by baskaran
Work ethics by baskaranWork ethics by baskaran
Work ethics by baskaran
baskaranpaf
 
12 principles for Agile Development
12 principles for Agile Development 12 principles for Agile Development
12 principles for Agile Development
Julien Henzelin
 
DevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best PracticesDevOps, Common use cases, Architectures, Best Practices
DevOps, Common use cases, Architectures, Best Practices
Shiva Narayanaswamy
 
(2017-03-07) Patología ocular en Atención primaria (DOC)
(2017-03-07) Patología ocular en Atención primaria (DOC)(2017-03-07) Patología ocular en Atención primaria (DOC)
(2017-03-07) Patología ocular en Atención primaria (DOC)
UDMAFyC SECTOR ZARAGOZA II
 
High Quality Software Development with Agile and Scrum
High Quality Software Development with Agile and ScrumHigh Quality Software Development with Agile and Scrum
High Quality Software Development with Agile and Scrum
Lemi Orhan Ergin
 
DevOps: A Culture Transformation, More than Technology
DevOps: A Culture Transformation, More than TechnologyDevOps: A Culture Transformation, More than Technology
DevOps: A Culture Transformation, More than Technology
CA Technologies
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
Sonatype
 
Ad

Similar to Agile principles and practices (20)

xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
Justin Gordon
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
mCloud
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Abdelkrim Boujraf
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
michael.labriola
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
Paul Boos
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
Nalin Goonawardana
 
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
Wee Witthawaskul
 
Agile
AgileAgile
Agile
Komal2525
 
Test Drive Dirven Driver HAHAahhaha.pptx
Test Drive Dirven Driver HAHAahhaha.pptxTest Drive Dirven Driver HAHAahhaha.pptx
Test Drive Dirven Driver HAHAahhaha.pptx
findwaytocom
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
Atish Narlawar
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
Aleks Zinevych
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?
Malinda Kapuruge
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
Kim Herzig
 
Simple testable code
Simple testable codeSimple testable code
Simple testable code
felixtrepanier
 
Magento code testability: Problems and Solutions
Magento code testability: Problems and SolutionsMagento code testability: Problems and Solutions
Magento code testability: Problems and Solutions
Anton Kril
 
TestDrivenDeveloment
TestDrivenDevelomentTestDrivenDeveloment
TestDrivenDeveloment
Antonio Tapper
 
What is Unit Testing
What is Unit TestingWhat is Unit Testing
What is Unit Testing
Sadaaki Emura
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
Abhijeet Vaikar
 
Agile testing
Agile testingAgile testing
Agile testing
Raj Indugula
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012xUnit and TDD: Why and How in Enterprise Software, August 2012
xUnit and TDD: Why and How in Enterprise Software, August 2012
Justin Gordon
 
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
Developers’ mDay u Banjoj Luci - Milan Popović, PHP Srbija – Testimony (about...
mCloud
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Abdelkrim Boujraf
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
michael.labriola
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
Paul Boos
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
Nalin Goonawardana
 
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
Wee Witthawaskul
 
Test Drive Dirven Driver HAHAahhaha.pptx
Test Drive Dirven Driver HAHAahhaha.pptxTest Drive Dirven Driver HAHAahhaha.pptx
Test Drive Dirven Driver HAHAahhaha.pptx
findwaytocom
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
Aleks Zinevych
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?
Malinda Kapuruge
 
Keynote AST 2016
Keynote AST 2016Keynote AST 2016
Keynote AST 2016
Kim Herzig
 
Magento code testability: Problems and Solutions
Magento code testability: Problems and SolutionsMagento code testability: Problems and Solutions
Magento code testability: Problems and Solutions
Anton Kril
 
What is Unit Testing
What is Unit TestingWhat is Unit Testing
What is Unit Testing
Sadaaki Emura
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
Abhijeet Vaikar
 
Ad

Recently uploaded (20)

SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Journal of Soft Computing in Civil Engineering
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 

Agile principles and practices

  • 1. Agile Principles and Practices And how they work together Vipin Jose
  • 2. * First Developer usually gets the opportunity to set some of the foundational design and standards Java Developer since 2006 5 greenfield projects where each > 1 year First developer* in 4 2 high stakes (most recent) 1 truly agile (current)
  • 3. Expectations  Flexible enough to accommodate any change  Quick turn around time The source is of high quality if the software development process can achieve these. Main attributes the business expects from its software development process
  • 4. Without the right processes in place. Software development is like stacking the bricks without using mortar. The bricks are stacked, now don’t touch it! It is possible… … but fundamentally flawed Just use mortar!!
  • 5. The Right Mix for Mortar  SOLID Design Principles  Automated Test Cases First  Continuous Integration / Continuous Deployment  Design Only for Requirement  Short Sprints, Short stories  Pair Programming  Constant Code Refactoring  Constant Culture Building All are required to make the right mix.
  • 6. SOLID Design Principles  Single responsibility principle  Open/closed principle  Liskov substitution principle  Interface segregation principle  Dependency inversion principle
  • 7. Single Responsibility  Might sound too subjective. E.g. DAO Good ways to determine: - Test Cases - Cyclomatic Complexity Responsible for CRUD operations Responsible for Creating and Reading and Updating and Deleting Too much responsibility?
  • 8. Test Cases  Can you write all possible test cases before implementing the class?  Can you identify all the scenarios just by reading the test code? How about 6 months later?  Can you guarantee that a change you introduced in the class has not broken any of its prior responsibilities? Even if you are not the one who created it?
  • 9. Cyclomatic Complexity Cyclomatic Complexity = Decision Points + 1 Complexity Assessment 1-10 not much risk 11-20 moderate risk 21-50 high risk 51+ untestable, very high risk
  • 10. Cyclomatic Complexity If a class is an element and cyclomatic complexity is its atomic number Be In the Carbon-Nitrogen-Oxygen range Carbon | Nitrogen | OxygenBoron Fluoride Hmmm… OK Less Stable, Less Testable 
  • 11. Cyclomatic Complexity  Too many classes?  Use sub-modules and apply SOLID to them (OSGI specification)  E.g: Netbeans RCP, Java Jigsaw  Time to break the project into smaller ones
  • 12. Automated Test Cases  Types  Unit Test Cases  System Test Cases  Integration Test Cases  Performance Test Cases
  • 13. Automated Test Cases  Result  Functional Requirements of the System and Responsibilities of the Class are documented and the developer does not need to remember every minute detail.  Fearless coding: “Looks like this code is useless and debt causing. Let me remove it … … Oh! 5 valid test cases failed. Let me refactor this.  Advantage  Project will pass the Lottery (Bus) Test  Developer can focus on technical tasks and finding the right solution to each micro requirement  Knowledge Transfer time decreases and lesser risk of information getting lost in translation
  • 14. Unit Test Cases  Write the test cases first  In most cases, a class can be one of the following two types:  Manager:  Orchestrates the flow and delegates responsibility to other classes  Test by mocking the classes and verifying they are called the right number of times (and with correct parameters) in different scenarios.  Worker:  Holds the data manipulating logic – Calculation, Transformation etc.  Test by using real data that represents the input and the expected output for each scenario. Mixing the two usually complicates the test class
  • 15. System Test Cases  Behavioral Test Cases  Black box testing: test code should not share resources with main code.  Can be run from developer environment  Gherkin Scenarios And Cucumber: Given/When/Then  Mock the external services: WireMock  Embed the database. CassandraUnit.
  • 16. Gherkin Scenarios or Unit Test Cases or Both? Project is really big and many classes are involved in a single flow  Have both levels of testing  Ease in maintenance, Quick Turn Around Time
  • 17. Integration & Performance Test Cases  Similar to system test cases but with real endpoints  Probable steps in automation: Spawn the environment  Install latest production version of dependent services  Run tests on subject service  Destroy the environment
  • 18. Continuous Integration and Deployment  Git  Virtual Machines running the automated test cases on every merge to develop/master
  • 19. Design Only for the Requirement  “No, but we’ll need it, in future” is not enough justification:  No guarantee that future requirement will directly fit into your design. Your previous effort, of introducing the design, may be useless.  Hard to cover it in behavioral testing as there is not requirement right now  Risk.  Automated test cases allow a design change any time. Even major refactoring. Q: “Is there a requirement for this design?” No design document: Needless overheard Code  Fluid Change Constant Inline Documentation and self code walkthrough
  • 20. Short Sprint, Short Stories  Story Grooming:  No story commitments per sprint. Does not compromise quality in fear of deadline. Feature / Change Request Use Case 1 Story 1 1 Gherkin Scenario Use Case 2 Story 2 1 Gherkin Scenario Use Case 3 Story 3 1 Gherkin Scenario
  • 21. Pair Programming  Keeps you alert and focused  Immediate code review minimizes errors  Immediate design brainstorming minimizes technical debt
  • 22. Constant Rotation of Pairs and Stories Feature 1 Feature 2 Interrupt Pair Story Grooming Monday Story 1 Dev1 Dev2 Story 1 Dev3 Dev4 Dev5 Dev6 Dev7 Dev8 Tuesday Dev1 Dev8 Dev6 Dev4 Dev7 Dev5 Dev3 Dev2 Wednesday Story 2 Dev1 Dev5 Dev7 Dev4 Dev3 Dev2 Dev6 Dev8 Thursday Story 3 Dev8 Dev5 Story 2 Dev6 Dev4 Dev1 Dev7 Dev2 Dev3 Friday Dev1 Dev5 Dev6 Dev2 Dev3 Dev8 Dev7 Dev4
  • 23. Make it Work. Then, Make it Right.  Functional Correctness is the only Acceptance Criteria, not design.  Detailed Gherkin Test Case created in story grooming.  Test case passed = ready for merge.  Lead only needs to review correctness of behavioral test code during merge  Design may not be the best but that’s OK.  Design eventually gets corrected as opinions are consolidated.  When different developers work on other scenarios involving the same code. Proactive reviews by the whole team Best design achieved faster Lesser effort in refactoring
  • 24. Constant Code Refactoring  Remove Technical Debt  Remove Spaghetti Code  Review and Correct the Design in Every Scenario  Sonar in CI/CD
  • 25. Constant Culture Building  Daily standup meetings The story will be complete by tomorrow. The code will have maximum test coverage. We should avoid refactoring the code. We should write test case for the missed scenario.  Decide upon the rules of engagement before start. Rules return the desired results, guidelines do not  Make this presentation at the beginning of the project.  Production Support: motivator for code ownership
  翻译: