SlideShare une entreprise Scribd logo
1  sur  47
Software design
Write SOLID software with the IDEAL CHALK

Company

LOGO
Alejandro Claro Mosqueda
What is all this stuff?!

K.I.S.S
.

Information
hiding
What is software design?

“[...] software design means the
conception, invention, or
contrivance of a scheme for
turning a specification for a
computer program into an
operational program.”
- Steve McConnell,
Code Complete (2004)
Programmer's approach to software engineering

Skip requirements engineering and design phases;

START WRITING CODE!!
●

We need to show something to the customer real quick.

●

We are judged by the amount of LOC/month.

●

We expect or know that the schedule is too tight.

●

Design is a waste of time.
Architect's approach to software engineering

Don't write a single line of code until analysis and design
phases are over;

I WANT TO SEE UML DIAGRAMS FIRST!!
●

Implementation is a peace of cake after UML diagrams are done.

●

We can not fail if complete system design is ready first.
Software development is a “wicked” problem

●

It is nondeterministic (There is no definite formulation).

●

There is no stopping rule.

●

Solutions are not true-or-false, but good or bad.

●

It is a sloppy process.

●

It is a heuristic process (trial-and-error).

●

It is about tradeoffs and priorities.

●

It involves restrictions.

●

It is emergent.
Where is the design?

Technical specifications documents?

UML diagrams document?
Some thing are better done than described

“[...] you should tend to view
requirements gathering, design
and implementation as different
facets of the same process – the
delivery of a quality system.”
- Andrew Hunt,
The pragmatic programmer (2000)
Where is the design?

VS
.
Where is the design?

“Martin’s First Law of
Documentation: Produce no
document unless its need is
immediate and significant.”
- Robert Martin,
Agile Software Development (2002)
Where is the design?

“[...] the design of a
software project is
documented primarily by
its source code.”
- Robert Martin,
Agile Software Development (2002)
Where is the design?

“The source code
IS the design!”
- Jack Reeves,
What is software design? (1992)
Separation of Concerns
“no one’s skull is really big enough to contain a modern
computer program.” - Dijkstra (1972)

Don't let plumbing code pollute your software.
Information hiding
“Primary criteria for system modularization should concern the
hiding of critical design decisions.” - David Parnas (1972)
Levels of design
●

System

●

Modules

●

Classes

●

Functions/Methods
Top-down / Stepwise refinement or bottom-up design?
High Cohesion
“Cohesion is a measure of the strength of association of the
elements inside a module.” - Tom DeMarco (1979)

What about doing just one thing and do it well?!
Low Coupling
“[...]; It is a measure of the strength of interconnection.”

- Structured Design, Edward Yourdon (1979)
Desirable characteristics
Bad smells

Do you really know when your code stinks?
Rigidity

.

Software difficult to change.
Fragility

Tendency to break in many places when a single change is made.
Immobility

Hard to reuse.
Viscosity

Doing thing wrong is easier than doing things right.
Needless complexity

Over-design! or elements not currently useful.
Needless repetition

Copy/Paste is useful text editing, but disastrous for code editing.
Opacity

Difficult to understand!
What is really a design smell?

It is a symptom. A
violation of
principles.
SOLID principles (Classes/Functions)

Software development is not a Jenga game!
Single responsibility principle

Just because you can, doesn't mean you should
Open/Close principle

Open chest surgery is not needed when putting on a coat
Liskov substitution principle

If it looks like a duck, quacks like a duck, but needs batteries
Probably have the wrong abstraction!
Interface segregation principle

You want me to plug this in, where?
Dependency inversion principle

Would you solder a lamp directly to the electrical wiring in a wall?
IDEAL CHALK

Write SOLID software with the IDEAL CHALK
Program to Interface NOT Implementation

Think what to do; no who does it!
DRY principle

Changes shall be made only at one place!
Encapsulate what varies

Don't let tomatoes spoil potatoes!
Depend on abstractions, NOT concrete classes

Be generic not specific!
Least Knowledge Principle

Demeter's Law – Talk to friends not strangers
Favour Composition Over Inheritance

Hang the clock; don't embed in the wall.
Hollywood Principle

Don't call us; We will call you!
Apply Design Pattern wherever possible

Don't reinvent the wheel!
Design patterns

●

Provides solution to a recurring problem.

●

Documents well-prove design experience.

●

Abstraction above the level of a single component.

●

Provides common vocabulary and understanding.

●

Are a means of documentation.

●

Supports construction of software with defined properties.
Strive for Loosely Coupled System

Don't get entangled!
KISS - Keep It Small and Simple

If only there were an easier way!
More principles (System/Modules)

Next time...
Granularity (Modules Cohesion)
●

REP: Reuse-Release equivalence principle.

●

CCP: Common-Closure principle.

●

CRP: Common-Reuse principle.

Stability (Modules Coupling)
●

ADP: Acyclic-Dependencies principle.

●

SDP: Stable-Dependencies principle.

●

SAP: Stable-Abstractions principle.
Lets Talk!

“Simple things should be simple and
complex things should be possible.”

Contenu connexe

Tendances

Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Joseph Yoder
 
Software Development in 21st Century
Software Development in 21st CenturySoftware Development in 21st Century
Software Development in 21st Century
Henry Jacob
 
Don't be too hard for agile; How to go lean with hardware
Don't be too hard for agile; How to go lean with hardwareDon't be too hard for agile; How to go lean with hardware
Don't be too hard for agile; How to go lean with hardware
Moriya Kassis
 

Tendances (19)

Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
 
Tdd 4 everyone full version
Tdd 4 everyone full versionTdd 4 everyone full version
Tdd 4 everyone full version
 
Software Development in 21st Century
Software Development in 21st CenturySoftware Development in 21st Century
Software Development in 21st Century
 
Taming scary production code that nobody wants to touch
Taming scary production code that nobody wants to touchTaming scary production code that nobody wants to touch
Taming scary production code that nobody wants to touch
 
Innoslate the Gateway to SysML 2.0 and Beyond
Innoslate the Gateway to SysML 2.0 and BeyondInnoslate the Gateway to SysML 2.0 and Beyond
Innoslate the Gateway to SysML 2.0 and Beyond
 
Software quality
Software qualitySoftware quality
Software quality
 
The Automated Requirements Engineer: utopia or dystopia
The Automated Requirements Engineer: utopia or dystopiaThe Automated Requirements Engineer: utopia or dystopia
The Automated Requirements Engineer: utopia or dystopia
 
What is open source?
What is open source?What is open source?
What is open source?
 
What's New in Innoslate 4.4?
What's New in Innoslate 4.4?What's New in Innoslate 4.4?
What's New in Innoslate 4.4?
 
Understanding Technical Debt: A Primer for Product Owners and Founders
Understanding Technical Debt: A Primer for Product Owners and FoundersUnderstanding Technical Debt: A Primer for Product Owners and Founders
Understanding Technical Debt: A Primer for Product Owners and Founders
 
The Software Craftsman (2nd edition)
The Software Craftsman (2nd edition)The Software Craftsman (2nd edition)
The Software Craftsman (2nd edition)
 
The Software Craftsman
The Software CraftsmanThe Software Craftsman
The Software Craftsman
 
Nok Final Presentation
Nok Final PresentationNok Final Presentation
Nok Final Presentation
 
Don't be too hard for agile; How to go lean with hardware
Don't be too hard for agile; How to go lean with hardwareDon't be too hard for agile; How to go lean with hardware
Don't be too hard for agile; How to go lean with hardware
 
Prerequisites for evolutionary architecture
Prerequisites for evolutionary architecturePrerequisites for evolutionary architecture
Prerequisites for evolutionary architecture
 
What are Model-Based Reviews
What are Model-Based ReviewsWhat are Model-Based Reviews
What are Model-Based Reviews
 
Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...
Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...
Lean Engineering: Engineering for Learning & Experimentation in the Enterpris...
 
How'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision RecordsHow'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision Records
 
The Latest in DevOps: Elite Performance, Productivity, and Scaling - Google
The Latest in DevOps: Elite Performance, Productivity, and Scaling - GoogleThe Latest in DevOps: Elite Performance, Productivity, and Scaling - Google
The Latest in DevOps: Elite Performance, Productivity, and Scaling - Google
 

En vedette

Argentina unidentified flying objects 2
Argentina unidentified flying objects 2Argentina unidentified flying objects 2
Argentina unidentified flying objects 2
Clifford Stone
 

En vedette (20)

Resourceslab fixed
Resourceslab fixedResourceslab fixed
Resourceslab fixed
 
2013 lean supplier chain_4_asq
2013 lean supplier chain_4_asq2013 lean supplier chain_4_asq
2013 lean supplier chain_4_asq
 
Lean Benchmarking and value chain optimisation
Lean Benchmarking and value chain optimisationLean Benchmarking and value chain optimisation
Lean Benchmarking and value chain optimisation
 
2012 Lean Toolbox 20120322 4 Asqn Nsec1
2012 Lean Toolbox 20120322 4 Asqn Nsec12012 Lean Toolbox 20120322 4 Asqn Nsec1
2012 Lean Toolbox 20120322 4 Asqn Nsec1
 
Clase3 herramientas
Clase3 herramientasClase3 herramientas
Clase3 herramientas
 
Clase 1 herramientas
Clase 1  herramientasClase 1  herramientas
Clase 1 herramientas
 
virus informatico
virus informaticovirus informatico
virus informatico
 
Andy Park
Andy ParkAndy Park
Andy Park
 
Argentina unidentified flying objects 2
Argentina unidentified flying objects 2Argentina unidentified flying objects 2
Argentina unidentified flying objects 2
 
BLOG ESTUDIANTIL PRODUCTOS ADIDAS
BLOG ESTUDIANTIL PRODUCTOS ADIDASBLOG ESTUDIANTIL PRODUCTOS ADIDAS
BLOG ESTUDIANTIL PRODUCTOS ADIDAS
 
Presentation_NEW.PPTX
Presentation_NEW.PPTXPresentation_NEW.PPTX
Presentation_NEW.PPTX
 
Survivor Afia
Survivor AfiaSurvivor Afia
Survivor Afia
 
Presentacion derecho adminsitrativo 2 concetto corindia saia a
Presentacion derecho adminsitrativo 2 concetto corindia saia aPresentacion derecho adminsitrativo 2 concetto corindia saia a
Presentacion derecho adminsitrativo 2 concetto corindia saia a
 
English
EnglishEnglish
English
 
Presentacion desarrollo turistico playa lipe
Presentacion  desarrollo turistico playa lipePresentacion  desarrollo turistico playa lipe
Presentacion desarrollo turistico playa lipe
 
PR
PRPR
PR
 
Assistant engineer jobs Indian oil ltd
Assistant engineer jobs Indian oil ltdAssistant engineer jobs Indian oil ltd
Assistant engineer jobs Indian oil ltd
 
Social Media for Small Business
Social Media for Small BusinessSocial Media for Small Business
Social Media for Small Business
 
How To Get Results From Maintenance Systems Montreal2012
How To Get Results From Maintenance Systems   Montreal2012How To Get Results From Maintenance Systems   Montreal2012
How To Get Results From Maintenance Systems Montreal2012
 
Derecho civil obligaciones
Derecho civil obligacionesDerecho civil obligaciones
Derecho civil obligaciones
 

Similaire à Software design - Write solid software with the ideal chalk

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
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
John Choi
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
Igor Moochnick
 
2015.01.09 - Writing Modern Applications for Mobile and Web
2015.01.09 - Writing Modern Applications for Mobile and Web2015.01.09 - Writing Modern Applications for Mobile and Web
2015.01.09 - Writing Modern Applications for Mobile and Web
Marco Parenzan
 
Contemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseContemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With Enterprise
Kenan Sevindik
 
Best practices for agile design
Best practices for agile designBest practices for agile design
Best practices for agile design
Igor Moochnick
 

Similaire à Software design - Write solid software with the ideal chalk (20)

The Fundamentals of Continuous Software Design
The Fundamentals of Continuous Software DesignThe Fundamentals of Continuous Software Design
The Fundamentals of Continuous Software Design
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
Agile Architecture
Agile ArchitectureAgile Architecture
Agile Architecture
 
Software Development Essential Skills
Software Development Essential SkillsSoftware Development Essential Skills
Software Development Essential Skills
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
It is a sunny day
It is a sunny dayIt is a sunny day
It is a sunny day
 
Friday final test
Friday final testFriday final test
Friday final test
 
Object Oriented Design Principles
Object Oriented Design PrinciplesObject Oriented Design Principles
Object Oriented Design Principles
 
2015.01.09 - Writing Modern Applications for Mobile and Web
2015.01.09 - Writing Modern Applications for Mobile and Web2015.01.09 - Writing Modern Applications for Mobile and Web
2015.01.09 - Writing Modern Applications for Mobile and Web
 
TDD - Cultivating a Beginner's Mind
TDD -  Cultivating a Beginner's MindTDD -  Cultivating a Beginner's Mind
TDD - Cultivating a Beginner's Mind
 
L21 Architecture and Agile
L21 Architecture and AgileL21 Architecture and Agile
L21 Architecture and Agile
 
Code detox
Code detoxCode detox
Code detox
 
Contemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseContemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With Enterprise
 
Agile Architecture and Modeling - Where are we Today
Agile Architecture and Modeling - Where are we TodayAgile Architecture and Modeling - Where are we Today
Agile Architecture and Modeling - Where are we Today
 
Best practices for agile design
Best practices for agile designBest practices for agile design
Best practices for agile design
 
Create first android app with MVVM Architecture
Create first android app with MVVM ArchitectureCreate first android app with MVVM Architecture
Create first android app with MVVM Architecture
 
From dev to ops and beyond - getting it done
From dev to ops and beyond - getting it doneFrom dev to ops and beyond - getting it done
From dev to ops and beyond - getting it done
 
The OO Design Principles
The OO Design PrinciplesThe OO Design Principles
The OO Design Principles
 
Go Best Practices – Interfaces, Packages and APIs
Go Best Practices – Interfaces, Packages and APIsGo Best Practices – Interfaces, Packages and APIs
Go Best Practices – Interfaces, Packages and APIs
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme Programming
 

Plus de Alejandro Claro Mosqueda (6)

Metodos de monte carlo en mecánica estadistica
Metodos de monte carlo en mecánica estadisticaMetodos de monte carlo en mecánica estadistica
Metodos de monte carlo en mecánica estadistica
 
Introducción a los solitones - Presentación de algunas soluciones solitónicas
Introducción a los solitones - Presentación de algunas soluciones solitónicasIntroducción a los solitones - Presentación de algunas soluciones solitónicas
Introducción a los solitones - Presentación de algunas soluciones solitónicas
 
Tunelaje de solitones
Tunelaje de solitonesTunelaje de solitones
Tunelaje de solitones
 
Algoritmos aproximados - El problema de la mochila 0-1
Algoritmos aproximados - El problema de la mochila 0-1Algoritmos aproximados - El problema de la mochila 0-1
Algoritmos aproximados - El problema de la mochila 0-1
 
Unit testing - An introduction
Unit testing - An introductionUnit testing - An introduction
Unit testing - An introduction
 
Lean thinking and the agile culture
Lean thinking and the agile cultureLean thinking and the agile culture
Lean thinking and the agile culture
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Software design - Write solid software with the ideal chalk