SlideShare a Scribd company logo
1 of 16
Download to read offline
Software Design Notes
Diego Pacheco
@diego_pacheco
❏ Cat's Father
❏ Principal Software Architect
❏ Agile Coach
❏ SOA/Microservices Expert
❏ DevOps Practitioner
❏ Speaker
❏ Author
diegopacheco
http://diego-pacheco.blogspot.com.br/
About me...
https://diegopacheco.github.io/
Software Design References (for me)
Software Design References (for me)
Best Software Design Book in long time(2018)
Movement vs Anti-Moviment
❏ SOA
❏ Agile
❏ REST
❏ Docker
❏ Clean Code
❏ ...
Strategic VS Tactical
Deep Modules and Simple Interfaces
Notes
- Modules are Deep
- Classes are modules == Classes are Deep
- Deep Modules are better than shallow modules
- Classitis when you have too many classes disease
- FAT classes hide Information, therefore, creates abstractions
- When an interface is similar to implementation means its shallow thus leaking or poor.
- Decorator Pattern creates shallow modules - Therefore should be avoided.
- Global Context Variable instead of pass-through variables.
- Is more important to have a simple interface than a simple implementation
- Shallow/lots of private methods are also bad
- Exceptions are easy to throw but hard to handle
- Better avoid Exceptions as much as possible.
Notes
- Pull Complexity downward not upward(configuration) avoid exposing configs that won't change
- Comment what is not obvious
- Comments are part of the design
- Comment on interfaces should describe just how to use - this should not have comments of the impl.
- Comments need to be close to the code otherwise they will get outdated
- Long Variable Names VS Short Ones(Go prog Style)
- Obscurity is one of the main causes of complexity.
- Solution to obscurity is always written code that makes it obvious.
- Obvious code means:
- Read quickly without much thought
- Easily guess meaning or what it does
- Guess should be write
Notes
- If the Code is not obvious:
- You spend lots of energy to understand.
- So its hard to understand and its likely to increase misunderstanding, therefore, creating more bugs
- Code Review is the best tool to determine if the code is obvious
- Precise and meaningful names make the code more obvious.
- 2 Effect that's is important is consistency; Same names == Same Patterns easy to recognize things.
- Things that make the code less obvious:
- event-driven code
- generic objects == containers
Notes
- OOP = Composition over inheritance.
- Agile could easily lead to tactical programming.
- TDD focus on getting some specific features working rather than have a better design.
- Great risk of design patterns - over-application.
- More Design Patterns don't mean better design.
- Getters / Setters are shallow and should be avoided as much as possible.
Design Principles
Red Flags
Closing Thoughts
❏ The Book is amazing.
❏ It's great that the book challenge ideas/assumptions.
❏ I'm not 100% into Comments.
❏ The Book don't cover Functional programing in detail :(
❏ The Book don't cover DevOps Engineering :(
❏ Some sample examples are not practical: Text Editor.
Software Design Notes
Diego Pacheco

More Related Content

Similar to Software Design Notes

Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
John Choi
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
michaelag1971
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
Uwe Friedrichsen
 

Similar to Software Design Notes (20)

TDD - Cultivating a Beginner's Mind
TDD -  Cultivating a Beginner's MindTDD -  Cultivating a Beginner's Mind
TDD - Cultivating a Beginner's Mind
 
Software as a craft (February, 2018)
Software as a craft (February, 2018)Software as a craft (February, 2018)
Software as a craft (February, 2018)
 
WordCamp US: Clean Code
WordCamp US: Clean CodeWordCamp US: Clean Code
WordCamp US: Clean Code
 
Diagrams as Code
Diagrams as CodeDiagrams as Code
Diagrams as Code
 
Managing a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandManaging a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days Ireland
 
Writing Readable Code
Writing Readable CodeWriting Readable Code
Writing Readable Code
 
Femmengeeniring_Kateryna Mishchenko.pdf
Femmengeeniring_Kateryna Mishchenko.pdfFemmengeeniring_Kateryna Mishchenko.pdf
Femmengeeniring_Kateryna Mishchenko.pdf
 
Put to the Test
Put to the TestPut to the Test
Put to the Test
 
As a Salesforce Developer I will... 7 Ground Rules for Success, Robert Sösemann
As a Salesforce Developer I will... 7 Ground Rules for Success, Robert SösemannAs a Salesforce Developer I will... 7 Ground Rules for Success, Robert Sösemann
As a Salesforce Developer I will... 7 Ground Rules for Success, Robert Sösemann
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
 
Dealing with dependencies in tests
Dealing  with dependencies in testsDealing  with dependencies in tests
Dealing with dependencies in tests
 
A philosophy of software design
A philosophy of software designA philosophy of software design
A philosophy of software design
 
WordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPressWordCamp Nashville: Clean Code for WordPress
WordCamp Nashville: Clean Code for WordPress
 
Architecting a Large Software Project - Lessons Learned
Architecting a Large Software Project - Lessons LearnedArchitecting a Large Software Project - Lessons Learned
Architecting a Large Software Project - Lessons Learned
 
Scottish Ruby Conference 2014
Scottish Ruby Conference  2014Scottish Ruby Conference  2014
Scottish Ruby Conference 2014
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
 
Development Environment Tips
Development Environment TipsDevelopment Environment Tips
Development Environment Tips
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
Ad505 dev blast
Ad505 dev blastAd505 dev blast
Ad505 dev blast
 

More from Diego Pacheco

More from Diego Pacheco (20)

Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!Naming Things Book : Simple Book Review!
Naming Things Book : Simple Book Review!
 
Continuous Discovery Habits Book Review.pdf
Continuous Discovery Habits  Book Review.pdfContinuous Discovery Habits  Book Review.pdf
Continuous Discovery Habits Book Review.pdf
 
Thoughts about Shape Up
Thoughts about Shape UpThoughts about Shape Up
Thoughts about Shape Up
 
Holacracy
HolacracyHolacracy
Holacracy
 
AWS IAM
AWS IAMAWS IAM
AWS IAM
 
CDKs
CDKsCDKs
CDKs
 
Encryption Deep Dive
Encryption Deep DiveEncryption Deep Dive
Encryption Deep Dive
 
Sec 101
Sec 101Sec 101
Sec 101
 
Reflections on SCM
Reflections on SCMReflections on SCM
Reflections on SCM
 
Management: Doing the non-obvious! III
Management: Doing the non-obvious! IIIManagement: Doing the non-obvious! III
Management: Doing the non-obvious! III
 
Design is not Subjective
Design is not SubjectiveDesign is not Subjective
Design is not Subjective
 
Architecture & Engineering : Doing the non-obvious!
Architecture & Engineering :  Doing the non-obvious!Architecture & Engineering :  Doing the non-obvious!
Architecture & Engineering : Doing the non-obvious!
 
Management doing the non-obvious II
Management doing the non-obvious II Management doing the non-obvious II
Management doing the non-obvious II
 
Testing in production
Testing in productionTesting in production
Testing in production
 
Nine lies about work
Nine lies about workNine lies about work
Nine lies about work
 
Management: doing the nonobvious!
Management: doing the nonobvious!Management: doing the nonobvious!
Management: doing the nonobvious!
 
AI and the Future
AI and the FutureAI and the Future
AI and the Future
 
Dealing with dependencies
Dealing  with dependenciesDealing  with dependencies
Dealing with dependencies
 
Kanban 2020
Kanban 2020Kanban 2020
Kanban 2020
 
Lean 2020
Lean 2020Lean 2020
Lean 2020
 

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
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

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
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
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
 
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
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
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
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Software Design Notes

  • 2. @diego_pacheco ❏ Cat's Father ❏ Principal Software Architect ❏ Agile Coach ❏ SOA/Microservices Expert ❏ DevOps Practitioner ❏ Speaker ❏ Author diegopacheco http://diego-pacheco.blogspot.com.br/ About me... https://diegopacheco.github.io/
  • 5. Best Software Design Book in long time(2018)
  • 6. Movement vs Anti-Moviment ❏ SOA ❏ Agile ❏ REST ❏ Docker ❏ Clean Code ❏ ...
  • 8. Deep Modules and Simple Interfaces
  • 9. Notes - Modules are Deep - Classes are modules == Classes are Deep - Deep Modules are better than shallow modules - Classitis when you have too many classes disease - FAT classes hide Information, therefore, creates abstractions - When an interface is similar to implementation means its shallow thus leaking or poor. - Decorator Pattern creates shallow modules - Therefore should be avoided. - Global Context Variable instead of pass-through variables. - Is more important to have a simple interface than a simple implementation - Shallow/lots of private methods are also bad - Exceptions are easy to throw but hard to handle - Better avoid Exceptions as much as possible.
  • 10. Notes - Pull Complexity downward not upward(configuration) avoid exposing configs that won't change - Comment what is not obvious - Comments are part of the design - Comment on interfaces should describe just how to use - this should not have comments of the impl. - Comments need to be close to the code otherwise they will get outdated - Long Variable Names VS Short Ones(Go prog Style) - Obscurity is one of the main causes of complexity. - Solution to obscurity is always written code that makes it obvious. - Obvious code means: - Read quickly without much thought - Easily guess meaning or what it does - Guess should be write
  • 11. Notes - If the Code is not obvious: - You spend lots of energy to understand. - So its hard to understand and its likely to increase misunderstanding, therefore, creating more bugs - Code Review is the best tool to determine if the code is obvious - Precise and meaningful names make the code more obvious. - 2 Effect that's is important is consistency; Same names == Same Patterns easy to recognize things. - Things that make the code less obvious: - event-driven code - generic objects == containers
  • 12. Notes - OOP = Composition over inheritance. - Agile could easily lead to tactical programming. - TDD focus on getting some specific features working rather than have a better design. - Great risk of design patterns - over-application. - More Design Patterns don't mean better design. - Getters / Setters are shallow and should be avoided as much as possible.
  • 15. Closing Thoughts ❏ The Book is amazing. ❏ It's great that the book challenge ideas/assumptions. ❏ I'm not 100% into Comments. ❏ The Book don't cover Functional programing in detail :( ❏ The Book don't cover DevOps Engineering :( ❏ Some sample examples are not practical: Text Editor.