SlideShare a Scribd company logo
1 of 36
Welcome 
everybody
Code Qualities 
and Practices 
to Achieve Them 
Author: Remus Langu 
Date: 25.07.2013
Who am I? 
Senior Developer 
Family Man | Orthodox Christian
Agenda 
4 
Introduction 
Code Qualities 
Code Quality Practices 
Conclusion
Introduction 
IN YOUR ZONE 
5 
Why Do We 
Think about 
Code Quality?
Code Qualities 
IN YOUR ZONE 
6 
Testability 
No Redundancy 
Encapsulation 
Strong Cohesion 
Correct Coupling 
Readability 
Focus
Write Tests First 
•Best way to ensure Testability 
•Helps avoid Redundancy – redundant test reveal redundant feature 
•Helps you determine what can and cannot be Encapsulated 
•Increases Cohesion - it is easier to write tests for classes with one 
responsibility 
•Promotes Decoupling naturally 
•Tends to improve Readability – code is written with a clear idea of what is 
supposed to do; refactoring 
•Testing all the variations of a concept, they will tend to be Focused, because it 
is easier to test them if they are 
IN YOUR ZONE 7
Code by Intention 
IN YOUR ZONE 
8
Code by Intention 
•Improves Testability - a well-defined intention is easier to test 
•Eliminates Redundancies 
•Promotes Encapsulation – less-complex methods encapsulate their 
local variables from each other 
•Increases Cohesion - if the intention is about one thing 
•Assists Correct Coupling - the calling routine is written only to the 
interface 
•Improves Readability - methods are well-named 
IN YOUR ZONE 9
Write Clearly 
•Ensure that people understand what the method/class does 
•Use intention revealing names 
•Follow coding standards 
•Improves Testability – clearer code is easier to understand and will 
make clearer tests 
IN YOUR ZONE 10
Encapsulate by Convention, 
Reveal by Need 
•Ease Testing – encapsulated code needs no unit tests 
•Encapsulating Construction helps No Redundancy 
•Ensures the greatest level of Encapsulation possible 
•Leads to Correct Coupling – that which is hidden cannot possibly be 
coupled to 
IN YOUR ZONE 11
Encapsulate by Convention, 
Reveal by Need 
IN YOUR ZONE 12
Avoid Redundancy 
•Easier when considering Testability up front 
•Ensures No Redundancy, obviously 
•Keeps Focus from degrading 
IN YOUR ZONE 13
Redundant Relationships 
IN YOUR ZONE 
14
Pull Out Things That Vary 
IN YOUR ZONE 15
Pull Out Things That Vary 
•Promotes Encapsulation of type behind an interface 
•Increases Cohesion by eliminating varying function 
•Helps keep Correct Coupling – eliminates the opportunity to couple to 
state or private functions of the client class 
IN YOUR ZONE 16
Treat Conceptually Similar 
Things the Same Way 
IN YOUR ZONE 17
Treat Conceptually Similar 
Things the Same Way 
•Improves Testability – test individual pieces, how they react and how 
you decide which pieces you have 
•Improves Encapsulation – the different implementations of variations 
•Improves Correct Coupling – client is no longer coupled to the specific 
types 
•Improves Focus – it relates the different implementations together 
with their common interface 
IN YOUR ZONE 18
Favor Composition over 
Class Inheritance 
IN YOUR ZONE 19
Favor Composition over 
Class Inheritance 
IN YOUR ZONE 20
Favor Composition over 
Class Inheritance 
•Improves Testability – separate classes can be tested apart from the 
client classes 
•Helps eliminate Redundancy – allows for reuse of pulled out objects 
•Promotes the Encapsulation of type – variations are hidden 
•Increase class Cohesion 
•Eliminates the possibility of inheritance Coupling 
IN YOUR ZONE 21
Design to Interfaces 
•Helps make code Testable – there will tend to be correct coupling and 
fewer side effects to test for 
•Is inherently Encapsulating 
•Could increase Cohesion – by seeking to design simple interfaces 
•Avoid Identity Coupling – since implementation details are not 
considered 
•Promotes Readability – by promoting intention-revealing names for 
classes and methods 
IN YOUR ZONE 22
Separate Use from 
Construction 
IN YOUR ZONE 23
Separate Use from 
Construction 
•Promotes Testability – factories making all construction decisions can 
return ‘test versions’ of objects 
•Promotes Encapsulation of design 
•Promotes Cohesion – separate users by builders 
•Helps keep clients Decoupled from the specific classes they are using, 
since they do not have to build them 
•Aids Focus – the construction of objects are concentrated in one or 
more related places 
IN YOUR ZONE 24
Refactor Code as Needed 
•It is part of TDD 
•Often results in elimination of Redundancy of state or behavior – ‘Pull 
up Method’, ‘Pull up Field’, ‘Form Template Method’ 
•Often strengthens Encapsulation 
•Improves Cohesion – ‘Extract Method’, ‘Move Method’ 
•Improves Coupling – ‘Replace Conditional with Polymorphism’ 
•Tends to improve Readability – generally simplifies and beautifies code 
IN YOUR ZONE 25
Limit Yourself to One Perspective 
in a Class or Method 
•Have a class/method operate either at the Conceptual level or 
Implementation level helps understandability 
•Aids Testability – one set of tests can focus on implementation while 
another focuses on the way these implementations are used 
•Improves Cohesion – limited to one perspective of a responsibility 
IN YOUR ZONE 26
Other Best Practice 
•Do Not Do More Than You Need: 
• Save time to work on things you do need 
• Smarter to implement at the point in the future when it is needed 
• Allows you to focus on those things you do need to do 
• If do you need it later, more of the system will be built that should 
make writing the function easier 
IN YOUR ZONE 27
Conclusion 
Testability could be achieved with: 
IN YOUR ZONE 
28 
• Write Tests First 
• Code by Intention 
• Write Clearly 
• Encapsulate by Convention, Reveal by Need 
• Avoid Redundancy 
• Treat Conceptually Similar Things the Same Way 
• Favor Composition over Class Inheritance 
• Design to Interfaces 
• Separate Use from Construction 
• Refactor Code as Needed 
• Limit Yourself to One Perspective in a Class or Method
Conclusion 
No Redundancy could be achieved with: 
IN YOUR ZONE 
29 
• Write Tests First 
• Code by Intention 
• Encapsulate by Convention, Reveal by Need 
• Avoid Redundancy 
• Favor Composition over Class Inheritance 
• Refactor Code as Needed
Conclusion 
Encapsulation could be achieved with: 
IN YOUR ZONE 
30 
• Write Tests First 
• Code by Intention 
• Encapsulate by Convention, Reveal by Need 
• Pull Out Things That Vary 
• Treat Conceptually Similar Things the Same Way 
• Favor Composition over Class Inheritance 
• Design to Interfaces 
• Separate Use from Construction 
• Refactor Code as Needed
Conclusion 
Strong Cohesion could be achieved with: 
IN YOUR ZONE 
31 
• Write Tests First 
• Code by Intention 
• Pull Out Things That Vary 
• Favor Composition over Class Inheritance 
• Design to Interfaces 
• Separate Use from Construction 
• Refactor Code as Needed 
• Limit Yourself to One Perspective in a Class or Method
Conclusion 
Correct Coupling could be achieved with: 
IN YOUR ZONE 
32 
• Write Tests First 
• Code by Intention 
• Encapsulate by Convention, Reveal by Need 
• Pull Out Things That Vary 
• Treat Conceptually Similar Things the Same Way 
• Favor Composition over Class Inheritance 
• Design to Interfaces 
• Separate Use from Construction 
• Refactor Code as Needed
Conclusion 
Readability could be achieved with: 
IN YOUR ZONE 
33 
• Write Tests First 
• Code by Intention 
• Write Clearly 
• Design to Interfaces 
• Refactor Code as Needed
Conclusion 
Focus could be achieved with: 
IN YOUR ZONE 
34 
• Write Tests First 
• Encapsulate by Convention, Reveal by Need 
• Avoid Redundancy 
• Treat Conceptually Similar Things the Same Way 
• Separate Use from Construction
Recommendation 
IN YOUR ZONE 
35 
• Essential Skills for the Agile Developer: A Guide to Better Programming and Design (29 Aug 
2011), by Alan Shalloway , Scott Bain, Ken Pugh, Amir Kolsky 
• James Shore: Evolutionary Design Illustrated - 
http://ndc2011.macsimum.no/mp4/Day1%20Wednesday/Track4%201740-1840.mp4
Remus-Constantin Langu | Senior Developer 
Remus.Langu@endava.com 
Skype remus.constantin.langu 
thank you  
IN YOUR ZONE 36

More Related Content

Similar to Code qualities and practices to achieve them

Similar to Code qualities and practices to achieve them (20)

Comfortable code
Comfortable codeComfortable code
Comfortable code
 
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learnedRebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentation
 
Clean code
Clean codeClean code
Clean code
 
Dependency injection via annotations v1.0
Dependency injection via annotations v1.0Dependency injection via annotations v1.0
Dependency injection via annotations v1.0
 
android principle.pptx
android principle.pptxandroid principle.pptx
android principle.pptx
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
Art of refactoring - Code Smells and Microservices Antipatterns
Art of refactoring - Code Smells and Microservices AntipatternsArt of refactoring - Code Smells and Microservices Antipatterns
Art of refactoring - Code Smells and Microservices Antipatterns
 
Introduction to Testing and TDD
Introduction to Testing and TDDIntroduction to Testing and TDD
Introduction to Testing and TDD
 
Handling variations in emerging designs
Handling variations in emerging designsHandling variations in emerging designs
Handling variations in emerging designs
 
Is your code SOLID enough?
 Is your code SOLID enough? Is your code SOLID enough?
Is your code SOLID enough?
 
Using standards for GOOD in DevOps
Using standards for GOOD in DevOpsUsing standards for GOOD in DevOps
Using standards for GOOD in DevOps
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
Ekon20 mORMot Legacy Code Technical Debt Delphi Conference
 
S.O.L.I.D xp
S.O.L.I.D xpS.O.L.I.D xp
S.O.L.I.D xp
 
Writing S.O.L.I.D Code
Writing S.O.L.I.D CodeWriting S.O.L.I.D Code
Writing S.O.L.I.D Code
 
Software development fundamentals
Software development fundamentalsSoftware development fundamentals
Software development fundamentals
 
Writing Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designsWriting Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designs
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Single Responsibility Principle
Single Responsibility PrincipleSingle Responsibility Principle
Single Responsibility Principle
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Code qualities and practices to achieve them

  • 2. Code Qualities and Practices to Achieve Them Author: Remus Langu Date: 25.07.2013
  • 3. Who am I? Senior Developer Family Man | Orthodox Christian
  • 4. Agenda 4 Introduction Code Qualities Code Quality Practices Conclusion
  • 5. Introduction IN YOUR ZONE 5 Why Do We Think about Code Quality?
  • 6. Code Qualities IN YOUR ZONE 6 Testability No Redundancy Encapsulation Strong Cohesion Correct Coupling Readability Focus
  • 7. Write Tests First •Best way to ensure Testability •Helps avoid Redundancy – redundant test reveal redundant feature •Helps you determine what can and cannot be Encapsulated •Increases Cohesion - it is easier to write tests for classes with one responsibility •Promotes Decoupling naturally •Tends to improve Readability – code is written with a clear idea of what is supposed to do; refactoring •Testing all the variations of a concept, they will tend to be Focused, because it is easier to test them if they are IN YOUR ZONE 7
  • 8. Code by Intention IN YOUR ZONE 8
  • 9. Code by Intention •Improves Testability - a well-defined intention is easier to test •Eliminates Redundancies •Promotes Encapsulation – less-complex methods encapsulate their local variables from each other •Increases Cohesion - if the intention is about one thing •Assists Correct Coupling - the calling routine is written only to the interface •Improves Readability - methods are well-named IN YOUR ZONE 9
  • 10. Write Clearly •Ensure that people understand what the method/class does •Use intention revealing names •Follow coding standards •Improves Testability – clearer code is easier to understand and will make clearer tests IN YOUR ZONE 10
  • 11. Encapsulate by Convention, Reveal by Need •Ease Testing – encapsulated code needs no unit tests •Encapsulating Construction helps No Redundancy •Ensures the greatest level of Encapsulation possible •Leads to Correct Coupling – that which is hidden cannot possibly be coupled to IN YOUR ZONE 11
  • 12. Encapsulate by Convention, Reveal by Need IN YOUR ZONE 12
  • 13. Avoid Redundancy •Easier when considering Testability up front •Ensures No Redundancy, obviously •Keeps Focus from degrading IN YOUR ZONE 13
  • 15. Pull Out Things That Vary IN YOUR ZONE 15
  • 16. Pull Out Things That Vary •Promotes Encapsulation of type behind an interface •Increases Cohesion by eliminating varying function •Helps keep Correct Coupling – eliminates the opportunity to couple to state or private functions of the client class IN YOUR ZONE 16
  • 17. Treat Conceptually Similar Things the Same Way IN YOUR ZONE 17
  • 18. Treat Conceptually Similar Things the Same Way •Improves Testability – test individual pieces, how they react and how you decide which pieces you have •Improves Encapsulation – the different implementations of variations •Improves Correct Coupling – client is no longer coupled to the specific types •Improves Focus – it relates the different implementations together with their common interface IN YOUR ZONE 18
  • 19. Favor Composition over Class Inheritance IN YOUR ZONE 19
  • 20. Favor Composition over Class Inheritance IN YOUR ZONE 20
  • 21. Favor Composition over Class Inheritance •Improves Testability – separate classes can be tested apart from the client classes •Helps eliminate Redundancy – allows for reuse of pulled out objects •Promotes the Encapsulation of type – variations are hidden •Increase class Cohesion •Eliminates the possibility of inheritance Coupling IN YOUR ZONE 21
  • 22. Design to Interfaces •Helps make code Testable – there will tend to be correct coupling and fewer side effects to test for •Is inherently Encapsulating •Could increase Cohesion – by seeking to design simple interfaces •Avoid Identity Coupling – since implementation details are not considered •Promotes Readability – by promoting intention-revealing names for classes and methods IN YOUR ZONE 22
  • 23. Separate Use from Construction IN YOUR ZONE 23
  • 24. Separate Use from Construction •Promotes Testability – factories making all construction decisions can return ‘test versions’ of objects •Promotes Encapsulation of design •Promotes Cohesion – separate users by builders •Helps keep clients Decoupled from the specific classes they are using, since they do not have to build them •Aids Focus – the construction of objects are concentrated in one or more related places IN YOUR ZONE 24
  • 25. Refactor Code as Needed •It is part of TDD •Often results in elimination of Redundancy of state or behavior – ‘Pull up Method’, ‘Pull up Field’, ‘Form Template Method’ •Often strengthens Encapsulation •Improves Cohesion – ‘Extract Method’, ‘Move Method’ •Improves Coupling – ‘Replace Conditional with Polymorphism’ •Tends to improve Readability – generally simplifies and beautifies code IN YOUR ZONE 25
  • 26. Limit Yourself to One Perspective in a Class or Method •Have a class/method operate either at the Conceptual level or Implementation level helps understandability •Aids Testability – one set of tests can focus on implementation while another focuses on the way these implementations are used •Improves Cohesion – limited to one perspective of a responsibility IN YOUR ZONE 26
  • 27. Other Best Practice •Do Not Do More Than You Need: • Save time to work on things you do need • Smarter to implement at the point in the future when it is needed • Allows you to focus on those things you do need to do • If do you need it later, more of the system will be built that should make writing the function easier IN YOUR ZONE 27
  • 28. Conclusion Testability could be achieved with: IN YOUR ZONE 28 • Write Tests First • Code by Intention • Write Clearly • Encapsulate by Convention, Reveal by Need • Avoid Redundancy • Treat Conceptually Similar Things the Same Way • Favor Composition over Class Inheritance • Design to Interfaces • Separate Use from Construction • Refactor Code as Needed • Limit Yourself to One Perspective in a Class or Method
  • 29. Conclusion No Redundancy could be achieved with: IN YOUR ZONE 29 • Write Tests First • Code by Intention • Encapsulate by Convention, Reveal by Need • Avoid Redundancy • Favor Composition over Class Inheritance • Refactor Code as Needed
  • 30. Conclusion Encapsulation could be achieved with: IN YOUR ZONE 30 • Write Tests First • Code by Intention • Encapsulate by Convention, Reveal by Need • Pull Out Things That Vary • Treat Conceptually Similar Things the Same Way • Favor Composition over Class Inheritance • Design to Interfaces • Separate Use from Construction • Refactor Code as Needed
  • 31. Conclusion Strong Cohesion could be achieved with: IN YOUR ZONE 31 • Write Tests First • Code by Intention • Pull Out Things That Vary • Favor Composition over Class Inheritance • Design to Interfaces • Separate Use from Construction • Refactor Code as Needed • Limit Yourself to One Perspective in a Class or Method
  • 32. Conclusion Correct Coupling could be achieved with: IN YOUR ZONE 32 • Write Tests First • Code by Intention • Encapsulate by Convention, Reveal by Need • Pull Out Things That Vary • Treat Conceptually Similar Things the Same Way • Favor Composition over Class Inheritance • Design to Interfaces • Separate Use from Construction • Refactor Code as Needed
  • 33. Conclusion Readability could be achieved with: IN YOUR ZONE 33 • Write Tests First • Code by Intention • Write Clearly • Design to Interfaces • Refactor Code as Needed
  • 34. Conclusion Focus could be achieved with: IN YOUR ZONE 34 • Write Tests First • Encapsulate by Convention, Reveal by Need • Avoid Redundancy • Treat Conceptually Similar Things the Same Way • Separate Use from Construction
  • 35. Recommendation IN YOUR ZONE 35 • Essential Skills for the Agile Developer: A Guide to Better Programming and Design (29 Aug 2011), by Alan Shalloway , Scott Bain, Ken Pugh, Amir Kolsky • James Shore: Evolutionary Design Illustrated - http://ndc2011.macsimum.no/mp4/Day1%20Wednesday/Track4%201740-1840.mp4
  • 36. Remus-Constantin Langu | Senior Developer Remus.Langu@endava.com Skype remus.constantin.langu thank you  IN YOUR ZONE 36