SlideShare a Scribd company logo
simplicity 0.3
Osvaldas Grigas
o.grigas@gmail.com
complexity 0.3
Osvaldas Grigas
o.grigas@gmail.com
inspired by
Dan
North
Rich
Hickey
J.B.
Rainsberger
Michael
Feathers
Edsger Dijkstra
(1980)
Computing's central challenge,
"How not to make a mess of it",
has not been met.
agile
agile
continuous improvement
based on frequent feedback
iterative development
incremental development
DONE
embrace the transient nature
of your code
Russ Miles
Complexity is the silent killer of
delivering change at the right time.
simplicity is prerequisite for agility
what is simplicity ?
Nothing is more simple
than a single giant button
MacBook Wheel
what "simple" isn’t ...
what "simple" isn’t ...
familiar / convenient
what "simple" isn’t ...
familiar / convenient
small / concise
what "simple" isn’t ...
familiar / convenient
small / concise
beautiful / elegant
“Simplicity -- the art of maximizing the
amount of work not done -- is essential.”
from the agile principles
YAGNI
from the agile principles
“Simplicity -- the art of maximizing the
amount of work not done -- is essential.”
“Technical excellence and
good design enhances agility.”
from the agile principles
Martin Fowler
Design is there to enable you to
keep changing the software easily.
when it comes to design ...
COMPLEXITY SUCKS
SIMPLICITY RULES
COMPLEXITY SUCKS ...
COMPLEXITY SUCKS ...
… your brain power
COMPLEXITY SUCKS ...
… your brain power
Rich Hickey
Once your software is of a
certain size, complexity is gonna
dominate what you can do.
essential
complexity
essential
complexity
your code
essential
complexity
your codelibraries
frameworks
essential
complexity
language
runtime
your codelibraries
frameworks
accidental
complexity
essential
complexity
SIMPLICITY RULES ...
SIMPLICITY RULES ...
… are …
SIMPLICITY RULES ...
… are …
The 4 Rules of Simple Design
SIMPLICITY RULES ...
… are …
The 4 Rules of Simple Design
1) passes all tests
SIMPLICITY RULES ...
… are …
The 4 Rules of Simple Design
1) passes all tests
2) clear, expressive names
SIMPLICITY RULES ...
… are …
The 4 Rules of Simple Design
1) passes all tests
2) clear, expressive names
3) no duplication
SIMPLICITY RULES ...
… are …
The 4 Rules of Simple Design
1) passes all tests
2) clear, expressive names
3) no duplication
4) minimal
rule #4: minimal
the less code,
the better
code folding
code
generators
dependency
managers
stop typing.
think!
test-first
(TDD / BDD)
rule #3: no duplication
primitive obsession
duplication in behavior
data clump
duplication in structure
refactoring
rule #2: clear, expressive names
small, focused methods
reduce cyclomatic complexity
small, focused classes
single responsibility
AccountService
AccountManager
AccountHandler
AccountUtils
AccountHelper
AccountImpl
AccountData
AccountDTO
AccountInfo
AccountDetails
AccountObject
AbstractAccount
BaseAccount
CustomAccount
SimpleAccount
refactoring
rule #1: passes all tests
unit testing
testability & good design
testability & good design
(but not integration tests)
inheritance-based design
wget -qO- http://c2.com/ | tr -cs '[:alpha:]' 'n' | sort | uniq
composition
dependencies
auto-import
refactoring
tools
A
G
F
D
C
introduce indirection
A
B
E G
F
D
C
introduce indirection
A
B
E G
F
D
C
follow
the law of Demeter
introduce indirection
modularity
coupling
add an interface?
layered architectures
add remoting?
SOAP
enterprise grade decoupling?
ESB
enterprise grade decoupling?
ESB
assumptions
assumptions
interface segregation
tell, don’t ask
high cohesion
dependency inversion
role
anti-corruption layer
adapter
role
notify
Payment
Order
Auditor
Financial
Event
Listener
Mongo
Audit
Trail
log
Audit
Trail
Mongo
Audit
Records
insert
Payment
Order
Audit
DAO
Audit
DAO
Impl
insert
further decoupling
queue
publish subscribe
use cases
& business rules
framework
persistence
framework
web
DB
infrastructure
messaging
QUEUE
task
scheduler
WS
Domain
Logic
Framework
Framework
Domain
Logic
Domain
Logic
Framework
Framework
accidental
complexity
complexity
leak
@Entity
@Table(name = "orders", schema = "com"})
public class Order implements Serializable {
@Id
@GeneratedValue(strategy = SEQUENCE, generator = "order_seq")
@Column(name = "ID", unique = true, nullable = false)
private Integer id;
@Column(name = "NUMBER", nullable = false, length = 8)
private String number;
@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinTable(name = "order_items", catalog = "com",
joinColumns = {@JoinColumn(name = "ORDER_ID",
updatable = false, nullable = false)},
inverseJoinColumns = {@JoinColumn(name = "ITEM_ID",
updatable = false, nullable = false)})
private Set<Item> items = new HashSet<Item>();
}
the law of leaky abstractions
home-grown
frameworks
libraries
state
& side effects
values
& pure functions
functional style imperative style
functional style
expressions
imperative style
statements
functional style
expressions
immutable values
imperative style
statements
mutable state
functional style
expressions
immutable values
data transformations
imperative style
statements
mutable state
side effects
functional style
expressions
immutable values
data transformations
recursion &
polymorphism
imperative style
statements
mutable state
side effects
looping &
branching
stepping out of
comfort zone
Edsger Dijkstra
(1980)
Computing's central challenge,
"How not to make a mess of it",
has not been met.
I‘m
done

More Related Content

Similar to Simplicity

CQRS recepies
CQRS recepiesCQRS recepies
CQRS recepies
Francesco Garavaglia
 
Clean Code - Writing code for human
Clean Code - Writing code for humanClean Code - Writing code for human
Clean Code - Writing code for human
NETKO Solution
 
Managing Complexity in Salesforce, David Felkel
Managing Complexity in Salesforce, David FelkelManaging Complexity in Salesforce, David Felkel
Managing Complexity in Salesforce, David Felkel
CzechDreamin
 
Growing Software and Growing Ourselves
Growing Software and Growing OurselvesGrowing Software and Growing Ourselves
Growing Software and Growing Ourselves
Daniel Parkin
 
Quick & Easy SQL Tips
Quick & Easy SQL TipsQuick & Easy SQL Tips
Quick & Easy SQL Tips
Ike Ellis
 
The View - The top 30 Development tips
The View - The top 30 Development tipsThe View - The top 30 Development tips
The View - The top 30 Development tips
Bill Buchan
 
Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)
David Benjamin
 
Quick & Easy SQL Tips
Quick & Easy SQL TipsQuick & Easy SQL Tips
Quick & Easy SQL Tips
Ike Ellis
 
Sea spin5 2013-notes
Sea spin5 2013-notesSea spin5 2013-notes
Sea spin5 2013-notes
Jeff Smith
 
Software design - Write solid software with the ideal chalk
Software design - Write solid software with the  ideal chalkSoftware design - Write solid software with the  ideal chalk
Software design - Write solid software with the ideal chalk
Alejandro Claro Mosqueda
 
Dev buchan 30 proven tips
Dev buchan 30 proven tipsDev buchan 30 proven tips
Dev buchan 30 proven tips
Bill Buchan
 
Simplicty Appreciation 101
Simplicty Appreciation 101Simplicty Appreciation 101
Simplicty Appreciation 101
Craig Jones
 
Essential Complexity in Systems Architecture
Essential Complexity in Systems ArchitectureEssential Complexity in Systems Architecture
Essential Complexity in Systems Architecture
Mark Mishaev
 
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
 
Concepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposter
Concepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposterConcepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposter
Concepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposter
myposter GmbH
 
How to Achieve Scale with MongoDB
How to Achieve Scale with MongoDBHow to Achieve Scale with MongoDB
How to Achieve Scale with MongoDB
MongoDB
 
YAGNI Principle and Clean Code
YAGNI Principle and Clean CodeYAGNI Principle and Clean Code
YAGNI Principle and Clean Code
Luan Reffatti
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you down
Daniel Irvine
 
Code Excellence for the Average Programmer
Code Excellence for the Average ProgrammerCode Excellence for the Average Programmer
Code Excellence for the Average Programmer
Llewellyn Falco
 
Clean code & design patterns
Clean code & design patternsClean code & design patterns
Clean code & design patterns
Pascal Larocque
 

Similar to Simplicity (20)

CQRS recepies
CQRS recepiesCQRS recepies
CQRS recepies
 
Clean Code - Writing code for human
Clean Code - Writing code for humanClean Code - Writing code for human
Clean Code - Writing code for human
 
Managing Complexity in Salesforce, David Felkel
Managing Complexity in Salesforce, David FelkelManaging Complexity in Salesforce, David Felkel
Managing Complexity in Salesforce, David Felkel
 
Growing Software and Growing Ourselves
Growing Software and Growing OurselvesGrowing Software and Growing Ourselves
Growing Software and Growing Ourselves
 
Quick & Easy SQL Tips
Quick & Easy SQL TipsQuick & Easy SQL Tips
Quick & Easy SQL Tips
 
The View - The top 30 Development tips
The View - The top 30 Development tipsThe View - The top 30 Development tips
The View - The top 30 Development tips
 
Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)Agile Development Overview (with a bit about builds)
Agile Development Overview (with a bit about builds)
 
Quick & Easy SQL Tips
Quick & Easy SQL TipsQuick & Easy SQL Tips
Quick & Easy SQL Tips
 
Sea spin5 2013-notes
Sea spin5 2013-notesSea spin5 2013-notes
Sea spin5 2013-notes
 
Software design - Write solid software with the ideal chalk
Software design - Write solid software with the  ideal chalkSoftware design - Write solid software with the  ideal chalk
Software design - Write solid software with the ideal chalk
 
Dev buchan 30 proven tips
Dev buchan 30 proven tipsDev buchan 30 proven tips
Dev buchan 30 proven tips
 
Simplicty Appreciation 101
Simplicty Appreciation 101Simplicty Appreciation 101
Simplicty Appreciation 101
 
Essential Complexity in Systems Architecture
Essential Complexity in Systems ArchitectureEssential Complexity in Systems Architecture
Essential Complexity in Systems Architecture
 
Excavating the knowledge of our ancestors
Excavating the knowledge of our ancestorsExcavating the knowledge of our ancestors
Excavating the knowledge of our ancestors
 
Concepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposter
Concepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposterConcepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposter
Concepts of Clean Code adapted for JavaScript - Tech'n'Drinks @myposter
 
How to Achieve Scale with MongoDB
How to Achieve Scale with MongoDBHow to Achieve Scale with MongoDB
How to Achieve Scale with MongoDB
 
YAGNI Principle and Clean Code
YAGNI Principle and Clean CodeYAGNI Principle and Clean Code
YAGNI Principle and Clean Code
 
Don't let your tests slow you down
Don't let your tests slow you downDon't let your tests slow you down
Don't let your tests slow you down
 
Code Excellence for the Average Programmer
Code Excellence for the Average ProgrammerCode Excellence for the Average Programmer
Code Excellence for the Average Programmer
 
Clean code & design patterns
Clean code & design patternsClean code & design patterns
Clean code & design patterns
 

Recently uploaded

Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
Massimo Artizzu
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
kalichargn70th171
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
Peter Muessig
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 

Recently uploaded (20)

Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsUI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
UI5con 2024 - Boost Your Development Experience with UI5 Tooling Extensions
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 

Simplicity