SlideShare a Scribd company logo
1 of 51
Object Oriented Design SOLID principles [email_address]
Why?
Why I still program?
NO hacking NO nerds NO bit-twiddling
Literate programming
 
Why design?
maintenance less bugs reuse?
peace of mind satisfaction fun
principles != rules
Single Responsibility   Principle
Portfolio Book Instrument Position value: double
 
 
 
Main Service Client 2: new  3: use 1: new 4: use
Main Service Client Context 2: use 3: use 1.2: new 1.1: new 1: new
Open/Closed   Principle
TG <<interface>> BPCListener <<interface>> BPCManager <<interface>> SnapshotProvider uses supply notify requests create
 
 
 
 
 
OCP is emergent
Liskov Substitution   Principle
 
 
 
 
@IViolateLSP
Interface Segregation   Principle
 
BookPositionNode <<interface>> ResubscribingNode AbsPosNode StateMachine NodeUser uses uses
<<interface>> BigService <<interface>> Service1 <<interface>> Service2 <<interface>> Service3 Client1 Client2 Client3
Dependency Inversion   Principle
Client Service
Client <<interface>> Service ServiceImpl
Client <<interface>> Service ServiceImpl client service
Client <<interface>> Service ServiceImpl client service
Client <<interface>> Service ServiceImpl client service api
 
SRP OCP LSP ISP DIP
REP CRP CCP ADP SDP SAP
What else?
idea code
F**k Design
Zen Coding
not scalable totally art
 
Thanks!

More Related Content

What's hot

Action Jackson! Effective JSON processing in Spring Boot Applications
Action Jackson! Effective JSON processing in Spring Boot ApplicationsAction Jackson! Effective JSON processing in Spring Boot Applications
Action Jackson! Effective JSON processing in Spring Boot ApplicationsJoris Kuipers
 
SOLID Design Principles applied in Java
SOLID Design Principles applied in JavaSOLID Design Principles applied in Java
SOLID Design Principles applied in JavaIonut Bilica
 
Unit tests in node.js
Unit tests in node.jsUnit tests in node.js
Unit tests in node.jsRotem Tamir
 
Software development best practices & coding guidelines
Software development best practices & coding guidelinesSoftware development best practices & coding guidelines
Software development best practices & coding guidelinesAnkur Goyal
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript FundamentalsSunny Sharma
 
Solid principles
Solid principlesSolid principles
Solid principlesToan Nguyen
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practicesfelixbillon
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageAniruddha Chakrabarti
 
How to go about testing in React?
How to go about testing in React? How to go about testing in React?
How to go about testing in React? Lisa Gagarina
 
Object Oriented Design Principles
Object Oriented Design PrinciplesObject Oriented Design Principles
Object Oriented Design PrinciplesThang Tran Duc
 
S.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software ArchitectsS.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software ArchitectsRicardo Wilkins
 

What's hot (20)

Action Jackson! Effective JSON processing in Spring Boot Applications
Action Jackson! Effective JSON processing in Spring Boot ApplicationsAction Jackson! Effective JSON processing in Spring Boot Applications
Action Jackson! Effective JSON processing in Spring Boot Applications
 
SOLID Design Principles applied in Java
SOLID Design Principles applied in JavaSOLID Design Principles applied in Java
SOLID Design Principles applied in Java
 
Unit tests in node.js
Unit tests in node.jsUnit tests in node.js
Unit tests in node.js
 
Software development best practices & coding guidelines
Software development best practices & coding guidelinesSoftware development best practices & coding guidelines
Software development best practices & coding guidelines
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
TypeScript Presentation
TypeScript PresentationTypeScript Presentation
TypeScript Presentation
 
SOLID
SOLIDSOLID
SOLID
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Clean code
Clean code Clean code
Clean code
 
TypeScript Best Practices
TypeScript Best PracticesTypeScript Best Practices
TypeScript Best Practices
 
Clean coding-practices
Clean coding-practicesClean coding-practices
Clean coding-practices
 
SOLID Principles
SOLID PrinciplesSOLID Principles
SOLID Principles
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Solid Principle
Solid PrincipleSolid Principle
Solid Principle
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
How to go about testing in React?
How to go about testing in React? How to go about testing in React?
How to go about testing in React?
 
Object Oriented Design Principles
Object Oriented Design PrinciplesObject Oriented Design Principles
Object Oriented Design Principles
 
S.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software ArchitectsS.O.L.I.D. Principles for Software Architects
S.O.L.I.D. Principles for Software Architects
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Clean Code
Clean CodeClean Code
Clean Code
 

Viewers also liked

Do we need SOLID principles during software development?
Do we need SOLID principles during software development?Do we need SOLID principles during software development?
Do we need SOLID principles during software development?Anna Shymchenko
 
Refactoring to SOLID Code
Refactoring to SOLID CodeRefactoring to SOLID Code
Refactoring to SOLID CodeAdil Mughal
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesSteven Smith
 
A Checklist for Design Reviews
A Checklist for Design ReviewsA Checklist for Design Reviews
A Checklist for Design ReviewsTushar Sharma
 
Applying Design Principles in Practice
Applying Design Principles in PracticeApplying Design Principles in Practice
Applying Design Principles in PracticeTushar Sharma
 
Mother’S Will
Mother’S WillMother’S Will
Mother’S Willdmashurova
 
Nsp Company Profile And Capbilities Presentation
Nsp Company Profile And Capbilities PresentationNsp Company Profile And Capbilities Presentation
Nsp Company Profile And Capbilities Presentationniemer4
 
Israel (Actualizada) Sct
Israel (Actualizada) SctIsrael (Actualizada) Sct
Israel (Actualizada) Sctpenderyn
 
Yum Sandwich Concepts 6 25 07
Yum Sandwich Concepts 6 25 07Yum Sandwich Concepts 6 25 07
Yum Sandwich Concepts 6 25 07niemer4
 
Pomodoro Technique. How not to be distracted at work. (In Russian)
Pomodoro Technique. How not to be distracted at work. (In Russian)Pomodoro Technique. How not to be distracted at work. (In Russian)
Pomodoro Technique. How not to be distracted at work. (In Russian)Dmitry Kandalov
 
Ufone prepaid
Ufone prepaidUfone prepaid
Ufone prepaidUfone
 
诺亚方舟的启示
诺亚方舟的启示诺亚方舟的启示
诺亚方舟的启示Tan Seng Ⓥ
 

Viewers also liked (20)

SOLID PRINCIPLES
SOLID PRINCIPLESSOLID PRINCIPLES
SOLID PRINCIPLES
 
SOLID principles
SOLID principlesSOLID principles
SOLID principles
 
Do we need SOLID principles during software development?
Do we need SOLID principles during software development?Do we need SOLID principles during software development?
Do we need SOLID principles during software development?
 
Refactoring to SOLID Code
Refactoring to SOLID CodeRefactoring to SOLID Code
Refactoring to SOLID Code
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID Principles
 
A Checklist for Design Reviews
A Checklist for Design ReviewsA Checklist for Design Reviews
A Checklist for Design Reviews
 
Applying Design Principles in Practice
Applying Design Principles in PracticeApplying Design Principles in Practice
Applying Design Principles in Practice
 
SOLID Principles part 2
SOLID Principles part 2SOLID Principles part 2
SOLID Principles part 2
 
Mother’S Will
Mother’S WillMother’S Will
Mother’S Will
 
Engage! V6
Engage! V6Engage! V6
Engage! V6
 
Nsp Company Profile And Capbilities Presentation
Nsp Company Profile And Capbilities PresentationNsp Company Profile And Capbilities Presentation
Nsp Company Profile And Capbilities Presentation
 
Israel (Actualizada) Sct
Israel (Actualizada) SctIsrael (Actualizada) Sct
Israel (Actualizada) Sct
 
Yum Sandwich Concepts 6 25 07
Yum Sandwich Concepts 6 25 07Yum Sandwich Concepts 6 25 07
Yum Sandwich Concepts 6 25 07
 
Biblioteca CERCA
Biblioteca CERCABiblioteca CERCA
Biblioteca CERCA
 
04whatdo
04whatdo04whatdo
04whatdo
 
Pomodoro Technique. How not to be distracted at work. (In Russian)
Pomodoro Technique. How not to be distracted at work. (In Russian)Pomodoro Technique. How not to be distracted at work. (In Russian)
Pomodoro Technique. How not to be distracted at work. (In Russian)
 
06dating
06dating06dating
06dating
 
Ufone prepaid
Ufone prepaidUfone prepaid
Ufone prepaid
 
诺亚方舟的启示
诺亚方舟的启示诺亚方舟的启示
诺亚方舟的启示
 
Bto130 Outcomes
Bto130 OutcomesBto130 Outcomes
Bto130 Outcomes
 

Similar to Solid principles

On component interface
On component interfaceOn component interface
On component interfaceLaurence Chen
 
Siebel best practices
Siebel best practicesSiebel best practices
Siebel best practicesSatish Vemula
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing SoftwareSteven Smith
 
Dhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro PresentationDhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro PresentationDhanasekaran Nagarajan
 
First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorialtjdhans
 
QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.Jaya Priya
 
PHP South Coast - Don't code bake, an introduction to CakePHP 3
PHP South Coast - Don't code bake, an introduction to CakePHP 3PHP South Coast - Don't code bake, an introduction to CakePHP 3
PHP South Coast - Don't code bake, an introduction to CakePHP 3David Yell
 
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...Datacratic
 
Predicting Startup Market Trends based on the news and social media - Albert ...
Predicting Startup Market Trends based on the news and social media - Albert ...Predicting Startup Market Trends based on the news and social media - Albert ...
Predicting Startup Market Trends based on the news and social media - Albert ...GetInData
 
Frameworkless CLI app in PHP
Frameworkless CLI app in PHPFrameworkless CLI app in PHP
Frameworkless CLI app in PHPMax Bodnar
 
RESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanJexia
 
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupBala Subra
 
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014David Yell
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleAmbassador Labs
 
Practical C++ Generative Programming
Practical C++ Generative ProgrammingPractical C++ Generative Programming
Practical C++ Generative ProgrammingSchalk Cronjé
 
jBPM5 - Bringing more power to your business processes
jBPM5 - Bringing more power to your business processesjBPM5 - Bringing more power to your business processes
jBPM5 - Bringing more power to your business processesKris Verlaenen
 
The Secret of Flow - My AgileIL11 Talk
The Secret of Flow - My AgileIL11 TalkThe Secret of Flow - My AgileIL11 Talk
The Secret of Flow - My AgileIL11 TalkYuval Yeret
 
Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...GetInData
 
PHP Berkshire October 2015
PHP Berkshire October 2015PHP Berkshire October 2015
PHP Berkshire October 2015David Yell
 

Similar to Solid principles (20)

On component interface
On component interfaceOn component interface
On component interface
 
Siebel best practices
Siebel best practicesSiebel best practices
Siebel best practices
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing Software
 
Dhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro PresentationDhanasekaran 2008-2009 Quick Test Pro Presentation
Dhanasekaran 2008-2009 Quick Test Pro Presentation
 
First QTP Tutorial
First QTP TutorialFirst QTP Tutorial
First QTP Tutorial
 
QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.QTP Tutorial Slides Presentation.
QTP Tutorial Slides Presentation.
 
PHP South Coast - Don't code bake, an introduction to CakePHP 3
PHP South Coast - Don't code bake, an introduction to CakePHP 3PHP South Coast - Don't code bake, an introduction to CakePHP 3
PHP South Coast - Don't code bake, an introduction to CakePHP 3
 
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
 
Predicting Startup Market Trends based on the news and social media - Albert ...
Predicting Startup Market Trends based on the news and social media - Albert ...Predicting Startup Market Trends based on the news and social media - Albert ...
Predicting Startup Market Trends based on the news and social media - Albert ...
 
Frameworkless CLI app in PHP
Frameworkless CLI app in PHPFrameworkless CLI app in PHP
Frameworkless CLI app in PHP
 
RESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel MardjanRESTful applications: The why and how by Maikel Mardjan
RESTful applications: The why and how by Maikel Mardjan
 
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check Tuneup
 
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
 
Practical C++ Generative Programming
Practical C++ Generative ProgrammingPractical C++ Generative Programming
Practical C++ Generative Programming
 
jBPM5 - Bringing more power to your business processes
jBPM5 - Bringing more power to your business processesjBPM5 - Bringing more power to your business processes
jBPM5 - Bringing more power to your business processes
 
JavaMicroBenchmarkpptm
JavaMicroBenchmarkpptmJavaMicroBenchmarkpptm
JavaMicroBenchmarkpptm
 
The Secret of Flow - My AgileIL11 Talk
The Secret of Flow - My AgileIL11 TalkThe Secret of Flow - My AgileIL11 Talk
The Secret of Flow - My AgileIL11 Talk
 
Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...Kubernetes and real-time analytics - how to connect these two worlds with Apa...
Kubernetes and real-time analytics - how to connect these two worlds with Apa...
 
PHP Berkshire October 2015
PHP Berkshire October 2015PHP Berkshire October 2015
PHP Berkshire October 2015
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 

Solid principles

Editor's Notes

  1. Hi For those who haven&apos;t heard about it, SOLID is acronym composed from principles names. (There are 5 of them.) SOLID doesn&apos;t have any particular meaning. It&apos;s just a good way to remember list of principles. These principles are about low-level design and partly interpretation of OOP basics.
  2. Before doing anything it&apos;s good to know “why” you&apos;re going to do it. In other words operating without context you&apos;re becoming coding monkey or a screwdriver.
  3. I began programming at school because it was fun (before anyone actually taught me). Turbo Pascal, asm for DOS (for cool things). Then Delphi, C++. Of course we were told at school that OOP not only “Организация Освобождения Палестины”(Palestine Liberation Organization, in Russian sounds like OOP) but also encapsulation, polymorphism, inheritance © Nice words which I&apos;ve known for quite a long time. What I did at the time was kind of “goal-oriented programming” . You don&apos;t really care how the work is done (almost), it&apos;s works today – fine! I knew some techniques like using inheritance but never bothered to understand why they exist. After (four?) years I got tired of “fighting the mess” and vision of programming as “low-level activity” so I programmed only for some “code for labs”. Some time later for some reason I though it would be nice to make sense of objects anyway. That way I came across patterns, UML, java, junit, refactoring and OOP (this time for real) . Nice java IDEs were also very attractive, but not more than the following “promises”.
  4. No Nerds: paraphrasing Victor Shtern from C++ book “ I wrote a program, guess what it does ” story. I&apos;m so clever, I know how it works, but I won&apos;t bother to explain it or explain it well. By explanation mean explaining it personally or in your code (i.e. making your code easy to read). Nerdiness can also be subconscious. IT is full of nerds. No Hacking : “Give me a minute, I&apos;ll fix it.” If I can come up with one way to do a task , I&apos;ll do it right now no matters whether it fits with design, adds to the system accidental complexity or creates implicit assumptions (for example *MarketDataHandler in importer) . In other words, if something compiles and works, you don&apos;t bother finding solutions which make more sense in terms of understanding your code and your intentions. (Hacking is overloaded term. Here it&apos;s used in negative meaning.) No Bit-twiddling : Design is more creative (more like art) compared to arcane algorithms, ins and outs of hardware and so on. That is why imho it&apos;s less geeky activity.
  5. For me all of the points have background assumption of “literate programming” . Martin Fowler quote: “Any fool can write code that a computer can understand. Good programmers write code that humans can understand” Literate programming is Donald Knuth&apos;s term. He meant that “code should read like a book”. What I mean by it is that code is written: 1) for person who&apos;s going to read it (and it&apos;s likely to happen); 2) for computer to execute. (it&apos;s also MF or KB quote)
  6. One of the books which inspired me to change my views on programming is this one. This is also one of the most interesting books about OOP. This is the book where SOLID principles are described . The author is Robert Martin (the same guy who gather Agile Manifesto meeting). Published in 2002. UB was some C++ magazine editor and wrote these principles in the mid-90s. He didn&apos;t invented principles, but mostly interpreted from others. Because it was C++ some of them probably made a lot of sense for C++ development (with long compilation time, for example). I bought it accidentally and at the time I had no idea what agile is (in Russian “agile” was translated as “rapid”) Agile in title is misleading . (Tell story from UB forum.)
  7. The next (and last) “why” is “why you should bother to design anything”. Once I read a Alcoa book about project management. And mentioned 5 whys technique (from TPS or Lean?). In my understanding it means “if you a have production problem, you should ask 5 whys to find the root cause and solve the root problem, otherwise you are dealing with symptoms”. If used a bit out of context , applied to what software developers do it boils down to “ we are to make profit ”. We create programs that make profit. And one of the parts of it is writing code.
  8. From this (economic) point of view good design allows us reduce cost and increase quality of code. Maintenance cost – do you know how much money your project costs? How much money since first release? It takes less time to understand and modify a program that has good design. (Doesn&apos;t maintenance start after the 1 st month of a project?) Good design is more likely to suit your needs or at least make obvious that it doesn&apos;t suit and you have to change it. There is also “Broken window effect” (elaborate on it&apos;s origins) . That is when people work with bad code, they tend to write more of it. And the more bad code you have, the more costly maintenance becomes. Errors – good design is less fragile (it&apos;s harder to do the wrong thing), less viscous (you don&apos;t need to write a lot of code to make simple change). Good understanding – less errors . (Error in production costs way more than error fixed in code editor.) Reuse – agility, mobility, simplicity and care(!) make code reusable. It has a question mark because often it&apos;s hard to use something well only once . It&apos;s even harder to have “ reuse by design ” (when you intentionally create reusable code). And it&apos;s even less likely to have “ emergent reuse ”. Probably, reuse is one of the “broken promises” of OOP and partly it&apos;s because of bad designs. It all doesn&apos;t mean that you shouldn&apos;t strive to achieve reuse.
  9. After having a lunch, sitting in front of display do you think about how much money you make for your employer ? I do :) When depressed. People use more egoistic things as motivation. From this point of view good design can bring you: Peace of mind – when you feel comfortable because you know you don&apos;t have to fight with design, crawl through hideous code in debugger after waiting for event from external system (and all that in multi-threaded system) and be aware all along that your efforts are half-doomed. Satisfaction – when feel you&apos;ve really accomplished something (in reasonable time) and did it well. May be you can even be proud of it. Fun – when you really like what you do. To the point that you don&apos;t mind doing it at home and on weekends. Whether people are motivated by designing or coding is personal. Some may really enjoy hacking in a mess. These points are still relevant from economic point of view. They increase team morale and productivity. They support creativity. Hopefully this was convincing, so here are principles.
  10. Principle in this context means heuristic that can help you make code better . They are by no means rules. If they help you write better code, do it. If they don&apos;t, don&apos;t use them. I don&apos;t like retelling other people ideas making it sound like they are mine, so I won&apos;t repeat book content but will relay my understanding . Because it&apos;s about low-level design, I will use code and UML-like diagrams. I tried to use TG positions “framework” code where possible. (Sorry no IDE, just screenshots :( )
  11. Story about Curley . (Meaning of life – just one thing.) Not a bad piece of advice. There is similar theme in success books about having concrete thing you want to achieve (and writing it down). Principle : “A class should have only one reason to change.” UB reasoning for it is that if class have many reasons to change, you put at risk all other concepts every time you modify the class . The more responsibilities it has, the more invariants they are and the harder it is to understand them. Basically this is cohesion for OOP . (retell Joel podcast with UB on principles and SRP) To me the most valuable thing about this principle is readability of classes that follow SRP. If it does one thing, it&apos;s easier to mentally map class name to its behavior. It kind of supports good names . (quote “The most powerful refactoring I know is rename”). To make it more concrete here is a real-life example.
  12. So that examples would make more sense here is some domain background . Instrument is some kind of asset. Instruments can be grouped into Books. Books can be grouped into Portfolios. Position is a value for an instrument (in this context it doesn&apos;t matter what this value means). What we want to do is to receive Positions from remote system. Here is the code...
  13. Knowing this you can see this class almost the same way I&apos;ve seen it for the first time. (Epos3 is the name of a system.) Let&apos;s try to guess what this class does and count its responsibilities . Guess meaning from the class name (Node – pipelines analogy. It collects and redistributes something, in this case positions.) AbstractPositionNode (too big hierarchy for a screenshot) deals with grouping positions and here we add code to actually receive something (for this purpose there is Subscriber, SnapshotProvider, HeartbeatMonitor and StateMachine for resubscription logic). This is responsibility of “Node” . Ok. Then you see executor and queue (it&apos;s also Executor). This means this class deals with multi-threading. Probably(!), second responsibility. After that there is TibrvDelegate (tibrv is messaging system). Weird... why it&apos;s not enough to have Subscriber and SnapshotProvider? Seems this class receives messages from tibrv by itself. Third responsibility. Then there is SnapshotLock, snapshotTimeout and stopper which deal with snapshots. So there is some logic for receiving snapshots. Forth responsibility. Finally there is a bunch of variables about resubscription. (Note there is misplaced constant which should be above in the collapsed block and a variable named as a constant. Kind of small broken windows.) So this class also deals with resubscribing. Fifth responsibility. I missed newSubjectStyle and location fields. Seem to be some kind of hacks. Let&apos;s not count them. SRP would certainly make this class better. It makes sense to: - move resubscription logic to StateMachine or separate class - move snapshot handling logic to SnapshotProvider or separate class - don&apos;t use networking in this class Beware of increasing conceptual weight of program by introducing more classes).
  14. It&apos;s virtually always possible to find several responsibilities in real-world classes. But I like this example even more :) Guess where it violates SRP? It violates SRP by creating Service . One of the points of this example is that SRP is always a judgment call . This class is really simple, so moving creation responsibility won&apos;t improve code. As an experiment let&apos;s move this responsibility anyway.
  15. Done. Now it&apos;s fully SRP-compatible :) If you know about dependency injection, this may look like constructor-based injection of Service.
  16. This is how the previous example works. (Describe sequence.)
  17. Taken one step further to use dependency injection container, the example looks like this. (Describe sequence.) The point is that using dependency injection is a way to extract responsibility of object creation . Although creation of objects can be as simple as using “new” keyword, there are some problems like : - creating objects in a sequence because some of them needs the other; - you find that you need reference to an already created instance, but you don&apos;t have reference to it. Now you have to either pass reference around or use singleton pattern . Passing reference might be ok unless there is a lot of them or some objects are needed in the half of all classes. Using singleton might also be ok, but its usage is less explicit than passing a reference (there will an example in the next principle).
  18. Principle: Software entities (classes, modules, functions, etc.) should be open for extension but closed for modification. (Author is Bertrand Meyer (creator of Eifel)). The motivation is that every time you change code you risk breaking it . Therefore, you should strive to extend code without modification (with as little modification as possible). This is what frameworks supposed to do. They should be open to certain changes without modifying code. ( Convention over configuration in RoR as an example of easy extending taken to extreme?) Being able to add functionality is “open”, not changing source code is “closed”.
  19. Here is an example of framework I used to work with. The idea is that system receives positions from outside world grouping them by instrument or portfolio. You implement several interfaces, plug them in and you have another source of positions. Main interface you have to implement is BookPositionChangeManager (BPCManager for short). Framework will register BPCListeners in BPCManager. When there is position update for instrument from some book, BPCManager should notify listeners for this book. Framework can also ask BPCManager for SnapshotProvider, which can tell positions for all instruments. You have to implement SnapshotProvider too. Here is how all these interface look like in reality.
  20. Listener. Pretty good. SubsriptionListener is just a bunch of constants (old-style, no static imports).
  21. Manager probably is a bit ugly name for this class, Provider could be better. (Why don&apos;t use @GodObject annotation if you cannot come up with good name?) There is also inconsistency that Book PositionChangeManager has Portfolio SnapshotProvider. Otherwise, good.
  22. Also quite sane. getSnapshot() methods are similar. initialize...() methods don&apos;t matter in this case..
  23. Say, we&apos;ve implemented BPCManager and SnapshotProvider interfaces. Now we have to tell framework that there is our implementation. This is the only code we need to modify. So this framework is pretty much closed against adding new positions sources. We can add more position sources and this will be the only place we&apos;ll have to modify. Say we make this modification, try to run it and guess what? (sorry no unit testing in this project, I suspect developers in this project are too qualified to use them :))
  24. It doesn&apos;t work. There are two problems: First problem is that we have to call completeBookPositionChange() after adding a listener. There is nothing about it in javadocs. This is the case when Java interface do not fully describe conceptual interface . (Like in the case of notnull/nullable return value, whether implementations should be thread-safe or we don&apos;t care, which thread callback are going to be called, what will happen if callback throws exception, order of method calls, etc... Design by contract can probably solve it, at least partially (?)) Another problem is that we have to invoke raisePositionAlert() on singleton object for “unmapped positions”. (Unmapped positions are positions for instruments which we couldn&apos;t find. That is remote system can send position for instrument, we don&apos;t know about.) It&apos;s a really nasty thing because it doesn&apos;t fit with the rest of framework. Probably, singleton was added after designing framework interfaces as a consequence of framework being not open for this kind of change . He had to modify server side code anyway, but he didn&apos;t have to create singleton, though. What author could do instead? Add another callback to interfaces? Then he would have to modify all other implementations. This would be more consistent, but on the other hand he would have to make more changes than with singleton. He would have to modify all the other implementations risking to break them, so in a sense adding singleton might be a safer solution. (In this case it&apos;s also likely that author just didn&apos;t have rights to modify all the clients because of lack of rights to commit changes for all clients. Really strict VCS rules.) To summarize this framework is open-closed in terms of adding new position source. But it doesn&apos;t conform to OCP when you think of handling unmapped instruments.
  25. Basically OCP means that we should have “ right” abstractions . Obviously, we cannot have abstractions for any change , but having them for some and making change easy to do is important. Compared to SRP it&apos;s difficult to say what you should to do to make you conform to OCP. It&apos;s depends very much on context. Paraphrasing Michael Feathers “ OCP is what you can observe if system is designed well” .
  26. This principle is named after Barbara Liskov. Basically it says that subclasses should be substitutable to super classes. Preconditions can be weaker, postconditions stronger. Funnel metaphor (this is mine metaphor, some use Russian dolls metaphor). Motivation for it is to have higher possibility of reuse (because you can freely use subclasses anywhere you have a superclass), to decrease conceptual weight of program (because if abstractions are good, every time you come across a class from hierarchy you can think of it as “some implementation of this concept”). This is basics of using inheritance. Probably it&apos;s really important for creating core classes and less of a problem if you have just one weird subclass which is used once only.
  27. Simple example. 1 st code snippet shows violation of parent precondition . 2 nd code snipper violates postcondition with exception (luckily Java knows about it), note that 1 st one doesn&apos;t violate by using subclass of IOException. (this is how inheritance with exceptions works in java)
  28. Here is more complicated example. This “classic” Ellipse-Circle (Rectangle-Square) OOP problem. (See http://en.wikipedia.org/wiki/Circle-ellipse_problem for details.) This class represents an ellipse. Besides storing ellipse size, it can calculate its area. Note that this class is not immutable (actually mutability creates the problem).
  29. Here is Circle class which is made Ellipse subclass. Since circles have same sizes in both directions, setters are modified to change both sides.
  30. And here is test code which shows how Circle breaks Ellipse contract . We set width and height for Ellipse and then check its area. Since Circle&apos;s setters change both width and height, area for circle is calculated as for circle with 4x4 sides. There is also tricky stuff with equals() contract when adding value-field to subclass class. See Item 8 in Effective Java (page 40 in 2 nd ed) for more details.
  31. Most common LSP violation I&apos;ve seen was in UI components when “it does almost what I need, if only I could change this and this”. In this case you&apos;re at risk of your code being dependent on superclass implementation details and breaking when superclass implementation changes . In ideal world you should use delegation . More evil example of violating LSP is when you do “copy-paste through inheritance”. Don&apos;t do it :) Sometimes you may have to violate LSP. Be aware when you do it. It may be a good idea to document it. What about @IViolateLSP annotation?
  32. There is no definition of this principle in the book. Mine definition is “each collaboration of a class which violates SRP should be articulated through separate interface”. This is about clearly defining class contract. Kind of SRP moved to interfaces . (“Interface” here doesn&apos;t necessarily means ”java interface”, it can also be abstract class.) In other words it&apos;s kind of “ program to interfaces ” adage. Motivation from UB is that when classes using part of interface depend on its other parts, they will “ have to be recompiled, retested every time it changes” (good for java, but probably makes even more sense for C++). For me most value of this principle is having clarity in code. When using just one of interfaces in client code, you can tell for sure which part of object contract is used. (There is also a danger that if you have several fine grained interfaces, it&apos;s may happen that as program evolves client code needs more and more features from several interfaces. So you will have to constantly change or merge interfaces.)
  33. Here is another example from positions framework. This is the same Epos3BookPositionNode we&apos;ve seen in SRP. Methods in this class can be roughly divided into three categories: - overridden methods from superclass - methods called from position framework - methods called only from StateMachine class (these methods are highlighted) (The last two categories have small intersection.) If we were going to apply ISP here, I would choose to extract interface for collaboration between Node and StateMachine (third category).
  34. This is how it would look. StateMachine uses special ResubscribingNode interface. The rest of framework uses superclass of BookPositionNode. The benefit here is that StateMachine doesn&apos;t have to know anything about node. In fact I tried doing it. IMO it hasn&apos;t really improved BookPositionNode.
  35. This is visualization of what ISP is like in more general form. Each client uses only one interface (or interfaces) it needs.
  36. Next principle is about higher-level design than above principles, since it is about layering application . Dependency Inversion Principle says: 1) High-level modules should not depend on low-level modules. Both should depend on abstractions. 2) Abstractions should not depend upon details. Details should depend upon abstractions. Motivation is that if high-level code depends on low-level code, you&apos;ll have to recompile, retest whole project every time low-level code changes. There is an implication that low-level code changes often. For example, it&apos;s totally ok to depend on java.lang.String class since its interface won&apos;t be broken in next JDK. But if you&apos;re in progress of writing your own library for communication with hardware (for example), it&apos;s better not to depend on its low-level details.
  37. Here is a simple example. Client class uses Service. Assuming it&apos;s likely that Service will change, we don&apos;t want high-level code to depend on it.
  38. So we extract an interface. Now Client and ServiceImpl depend on abstraction which conforms to the 1 st point of DIP which says “ High-level modules should not depend on low-level modules. Both should depend on abstractions .” . (Note that Service is now interface . Not using name like IService for interfaces is kind of encapsulation of naming.)
  39. Now let&apos;s look at these classes from packaging point of view. The first attempt to package classes may look like this. This is kind of most “natural” way to package classes. We put client classes into “client” package and service classes into “service” package. This is service-centric approach, which implies that we have one service and several clients. Clients adapt to Service. However, there is a subtle problem with it. Since Service interface is packaged as a part of “service” package, it is authors of “service” package who “owns” this interface and decide how to change it. (It may be that you work on your own on the whole project, but there is still difference in your thinking when you have Service interface in “service” package.)
  40. What you can is move Service interface into “client” package. With this packaging Service is part of client. In a sense it&apos;s application of programming outside-in on package level . This is client-centric approach, which implies that we have one client and several implementation of services . Services adapt to Client needs. (This kind of packaging is also more likely to yield readable code, since client code is written using client terms, it doesn&apos;t have to adapt to Service terms.) Such packaging can also be a consequence of TDD when you write high-level tests first mocking lower-level classes. (TDD is not just about testing, it&apos;s can also be design tool.) This packaging satisfies 2 nd point of DIP which says “Abstractions should not depend upon details. Details should depend upon abstractions”. This is the reason principle is has “inversion” in its name.
  41. We can take a step further and extract Service interface into its own package. Now you can think of it as an API specification. This packaging implies there are several clients and several service implementations . This is the hardest way to go, since with several clients and services you&apos;ll have to find common ground which satisfies them all. Reusability is hard.
  42. Zooming out to layers, this is how DIP can be applied on application level. Each low-level layer depends on its client layer. As usual there are problems. Abstractions are leaky ( http://en.wikipedia.org/wiki/Leaky_abstraction ). Be aware that “every problem can be solved by adding abstraction layer, except the problem of too many abstraction layers” © :) In other words, keep it stupid simple (KISS).
  43. These are the SOLID principles. Besides their impact on code, they can also be used as a common vocabulary to discuss code. Don&apos;t underestimate their value. From geeky technical point of view OOP is just: - additional scope (object scope); - “if”s moved into virtual tables; - “copy-paste” through inheritance. But OOP is not only technical tool, it&apos;s very much mental tool . Consider subtlety of patterns when read them the first time. It&apos;s all the same when you think about these principles . I&apos;ve known them for ~4 years and I&apos;m still figuring out when and how use(don&apos;t use) them. (Nice way to say “I suck at it”.) No silver bullets, of course!
  44. 5 SOLID principles is kind of a lot :) But there are even more principles and even scarier acronyms. You can find them in the Uncle Bob book. (story from basketball with luxsoft - don&apos;t program if you do it because you couldn&apos;t get job as economist)
  45. If someone is telling you about benefits and never mentions problems, be sure you&apos;re not getting full picture. What I&apos;ve be saying is basically that designing is good and worthwhile activity. But there are alternative “schools of thought”. (I heard “school of though” term on Uncle Bob blog.)
  46. When you program, you normally are not doing it just for fun. You&apos;re solving a problem. As you know there are problem and solution domains. The above techniques are focused on solution domain. It doesn&apos;t mean they imply you shouldn&apos;t care about problem domain, but rather emphasize that you can do better in solution domain. These techniques imply that solution domain matters , that you should constantly improve. But there is opinion that technology is not an obstacle. (All technological problems are solved, can be solved or can be replaced with technological problems solvable by scaling, that is having more people working on this). This opinion implies that problem domain is much more important and difficult to get right so it&apos;s pointless to care about programming after a certain level. (It depends on application domain, these points are generalization.)
  47. Why should I care about design? Technical debt? Isn&apos;t it a geek-term to justify activities they like to do instead of doing real work ? You know your code will never be perfect, so why don&apos;t you make it just work and then stop (sounds a lot like XP ;))? If you have problems understanding/modifying program, it&apos;s problem with you not with bad code. If program regularly fails, it&apos;s you not bad design. Don&apos;t trick yourself that TDD, automated testing, Refactoring or Design are investments cloudless future. You don&apos;t know whether your code is ever going to be useful, if something doesn&apos;t work today, now, it&apos;s a waste. Acknowledging that these techniques may help, how do you know when they help, how much money will they safe and who will benefit from it? Will you benefit if in a year some other programmer adds feature 50% faster than he would without your refactoring? But you much more about how you will benefit if you deliver feature 50% faster than your “good designing” mates. (Hint: better position, higher salary.) (“Design” on the slide is umbrella term for all code-improving activities.)
  48. Most of existing code is messy inside. Why don&apos;t accept it? Enter Zen Programming. Never think “why”, think only “how” . Everything is beautiful as it&apos;s, don&apos;t improve anything, unless there is a business need. You live in your code and you know it&apos;s won&apos;t be what you consider perfect. If you write a piece of code, you know how it works and it doesn&apos;t matter how clear and robust it is. You always know how to fix things. You develop in debugger. Good software costs a lot. The trick is that you don&apos;t necessarily need it to be that good. Right-brain experience with code matters much more than left-brain logical structures. Dive into code instead of looking at useless diagrams. … Basically what I mean by that is just “hacking” (in a good sense of this word).
  49. There are problems with this approach. It&apos;s hard to rely knowledge like this one (for example, compared to SOLID principles). Therefore, it&apos;s not scalable. It&apos;s hard to find Zen developers who deliver and don&apos;t get into total mess. Ideally you should be able to do both styles and know when to use each one. I&apos;m inclined to designing :)
  50. Learning is not push process. It&apos;s pull process. You can only learn on your own by reading and trying hard. The best thing presentations can do for you is to inspire. Read the book, practice and write good code.