SlideShare a Scribd company logo
Models vs Reality
Quest for the roots of complexity
@hundredmondays
Exercise: draw a car
Domain Driven Design
Test Driven Development
SOLID Principles
Functional Programming
Stop coding, learn the above, continue coding
Chapter 1: Models
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
the realest...
Models vs Reality: Quest for the Roots of Complexity
Model Dependent Realism
reality should be interpreted based upon models…
where several models overlap…
multiple, equally valid, realities exist.
Models vs Reality: Quest for the Roots of Complexity
"Today the software comprising the carefully
planned interpretive routines, compilers, and
other aspects of automative programming are
at least as important to the modern electronic
calculator as its hardware of tubes, transistors,
wires, tapes and the like"
John Tuckey - 1958
Models vs Reality: Quest for the Roots of Complexity
Programming constructs you use are not fundamental to computer.
They are models built on top of more primitive paradigms.
They hide irrelevant complexity so you can...
communicate better
Abstraction
Software is an abstract landscape
built of abstract components
Concrete Abstract
Why do we need abstractions?
Pass and move
Give and go
Long through ball
Triangular movement
Swapping the wing men
Strong side overloads
Target man
Envelopment
Wide play
Man-to-man marking
Catenaccio
[page 1 of 100]
Abstractions over abstractions
Star: self-luminous gaseous spheroidal celestial body
Planet: round celestial body which has removed debris and small objects from the
area around its orbit
Asteroid: small rocky body orbiting a star
Comet: celestial object consisting of a nucleus of ice and dust
Orbit: elliptical path of a planet, asteroid, or comet
Perihelion: point in the orbit closest to the star
/inline all
Perihelion: point in the elliptical path of a round celestial body
which has removed debris and small objects from the area
around its path, small rocky celestial body or celestial object
consisting of a nucleus of ice and dust closest to a self-
luminous gaseous spheroidal celestial body.
Is the language I use
really that abstract?
Virtual memory, Floating point arithmetic, Garbage collection,
Concurrency controls, Inter process communication, Platform
independence, Flow control, Process isolation, Device drivers, Streaming,
Lambda abstraction, Object orientation, Exceptions, Nested functions,
Lexical scope, Type inference, Template system, Namespaces...
Models vs Reality: Quest for the Roots of Complexity
V => T
needs null check
can throw exception
can mutate V
can require global state
can modify global state
can take time
(V, Context) -> Future[ Try[ T ] ]
can take time can failno side effects
dependencies
The world of computers is full of things
that should have been strict from the
beginning, and became ridiculously
complex because they weren't.
--Understanding Software by Max Kanat-Alexander
Models vs Reality: Quest for the Roots of Complexity
...the other two drugs might be particularly
effective during cell division. If so, a drug
promoting cancer cell division might be a good
thing to have in combination with the other two.
What abstractions have You provided?
The Ultimate Stack
Business
Software
Hardware
Business
Software
THE
WHAT
THE
HOW
Business
Software
WHAT
THE...
HOW
THE...
Boundary between the
business and the
software is just a model
und das model ist...
The Ultimate Stack
Business
Software
Hardware
End of physics
End of formality
there is no “Turing effective procedure”
to list all the uses of a screwdriver
complexity -> specificity
simplicity -> adaptability
business
engineering
ROI
industry
growth
customer funnel
account
npv
product
user test
deployment
environment
system
protocol class
data
feature
insight
logic
experience
behavior
architecture
Design pattern
function
expression
role
persona
acquisition
margins
ROI
industry
growth
customer funnel
account
npv
product
user test
deployment
environment
system
protocol class
data
feature
insight
logic
experience
behavior
architecture
Design pattern
function
expression
role
persona
acquisition
margins
business
engineeringmetaphors
formalmodels
Chapter 2: Complexity
Delivery speed of a system always decreases
Complexity of a system always increases
Entropy of a system always increases
Software is like entropy.
difficult to grasp, weighs nothing,
and obeys the Second Law of
Thermodynamics;
it always increases.
Norman Ralph Augustine
Law Number XVII
Yea, yea, can we formalize it?
Cyclomatic Complexity
CC = E - N + 2 x P
E = number of edges in the flow graph.
N = number of nodes in the flow graph.
P = number of nodes that have exit points
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
Cyclomatic complexity only indicates complexity at the unit level.
What about the structure of units collaborate?
Do we assume the structure is perfect?
source: http://edmundkirwan.com/general/emergent.html
source: http://structure101.com/
Models vs Reality: Quest for the Roots of Complexity
Component structure analysis only indicates complexity at the system level.
What about how the system expresses the business idea?
Should we assume this expression is perfect?
The Pyramid of Wrong
Wrong idea
Wrong specification
Wrong code
How about writing proper spec?
How about writing proper code?
How about we help each other
Experimentation = testing the business idea
feature v2
feature v1
control
group
experiment
group
How do we turn an idea into architecture?
experimentation
Domain driven design
specification as code
software engineering
Models vs Reality: Quest for the Roots of Complexity
ideal solution
current solution
Euclidean distance
in multidimensional system
between current solution
and an ideal solution
which is unknown
and always changing
moving target, ideal today
is not ideal tomorrow!
not able to define ideal
if we could, we would build it!
ideal solution
current solution
infinite dimensions!
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
It is not the way things ARE
in software that is complex.
It is the language we choose
to SPEAK about them.
We choose that language
with every line of code we
write and every line of code
we decide not to write.
What’s in it for… anyone?
Models vs Reality: Quest for the Roots of Complexity
Models vs Reality: Quest for the Roots of Complexity
You don’t remove complexity
You direct its growth by models
Model is a domain specific language
Language = hierarchy of abstractions
All we do as devs is developing languages
Let’s do it consciously!
Models vs Reality: Quest for the Roots of Complexity
Julian Warszawski
from Łódź
fintech is my battleground
LendUp is my favorite startup
spits sarcasm at @hundredmondays

More Related Content

PPTX
Cognifying model-driven software engineering
PDF
Breathe Life Into Your IDE
PDF
XAI or DIE at Data Science Summit 2019
PPT
Computing with Directed Labeled Graphs
PPT
SE and AI: a two-way street
PPTX
Synergy of Human and Artificial Intelligence in Software Engineering
PPTX
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
PDF
Illogical engineers
Cognifying model-driven software engineering
Breathe Life Into Your IDE
XAI or DIE at Data Science Summit 2019
Computing with Directed Labeled Graphs
SE and AI: a two-way street
Synergy of Human and Artificial Intelligence in Software Engineering
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Illogical engineers

Similar to Models vs Reality: Quest for the Roots of Complexity (20)

PDF
Illogical engineers
PDF
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web Applications
PPT
Evolving as a professional software developer
PPTX
Software Development and Quality
PDF
On being a professional software developer
PPTX
Melbourne Microservices Meetup: Agenda for a new Architecture
PPT
Rapid software evolution
PPTX
Thinking in parallel ab tuladev
PDF
Антон Кириллов, ZeptoLab
PDF
Overview of QP Frameworks and QM Modeling Tools (Notes)
PPT
Software engineering
PPT
Software engineering
PDF
What the cloud has to do with a burning house?
PPTX
Microservices Architecture
PPTX
2015.01.09 - Writing Modern Applications for Mobile and Web
PDF
SCAM 2012 Keynote Slides on Cooperative Testing and Analysis by Tao Xie
PPTX
Software Architectures, Week 1 - Monolithic Architectures
PPT
Parallel Computing 2007: Overview
PPT
1.lecture_07_paradigms.ppt
PPT
HCI_user_interaction_Design_interaction design
Illogical engineers
What Should I Do? Choosing SQL, NoSQL or Both for Scalable Web Applications
Evolving as a professional software developer
Software Development and Quality
On being a professional software developer
Melbourne Microservices Meetup: Agenda for a new Architecture
Rapid software evolution
Thinking in parallel ab tuladev
Антон Кириллов, ZeptoLab
Overview of QP Frameworks and QM Modeling Tools (Notes)
Software engineering
Software engineering
What the cloud has to do with a burning house?
Microservices Architecture
2015.01.09 - Writing Modern Applications for Mobile and Web
SCAM 2012 Keynote Slides on Cooperative Testing and Analysis by Tao Xie
Software Architectures, Week 1 - Monolithic Architectures
Parallel Computing 2007: Overview
1.lecture_07_paradigms.ppt
HCI_user_interaction_Design_interaction design
Ad

Recently uploaded (20)

PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
history of c programming in notes for students .pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Nekopoi APK 2025 free lastest update
PPTX
L1 - Introduction to python Backend.pptx
PDF
Understanding Forklifts - TECH EHS Solution
PDF
System and Network Administraation Chapter 3
PPTX
Essential Infomation Tech presentation.pptx
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Digital Strategies for Manufacturing Companies
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
medical staffing services at VALiNTRY
PPTX
ai tools demonstartion for schools and inter college
PDF
AI in Product Development-omnex systems
PTS Company Brochure 2025 (1).pdf.......
Wondershare Filmora 15 Crack With Activation Key [2025
history of c programming in notes for students .pptx
Design an Analysis of Algorithms II-SECS-1021-03
Operating system designcfffgfgggggggvggggggggg
Odoo POS Development Services by CandidRoot Solutions
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Nekopoi APK 2025 free lastest update
L1 - Introduction to python Backend.pptx
Understanding Forklifts - TECH EHS Solution
System and Network Administraation Chapter 3
Essential Infomation Tech presentation.pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Digital Strategies for Manufacturing Companies
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
medical staffing services at VALiNTRY
ai tools demonstartion for schools and inter college
AI in Product Development-omnex systems
Ad

Models vs Reality: Quest for the Roots of Complexity

Editor's Notes

  • #4: just in case you decided to leave early or fall asleep in 5 mins, here is the message of the day if you are a software engineer and don’t know one of these concepts, learn them immediately notice I mentioned solid rather than OO, cuz there is some confusion in the industry on what OO really means and SOLID is like an essence of OOP principles
  • #6: here is a model of Chevrolet Corvette this model serves a particular purpose what is the purpose? it shows exact proportions, shapes, you could put it into a design software and have a 3d model if dimensions were given, you could basically build the chassis
  • #7: this is also a model but it serves a different purpose it shows less details, emphasizes a few lines it is to generate a certain impression of dynamism probably an early concept to drive further refinements of design it would fail miserably if we wanted to build a car based on it but the other one is too concrete, exposes irrelevant details if we only want to discuss design wireframe vs mockup
  • #8: “For what purpose”
  • #9: The best solution is dependent upon the purpose. Without a purpose it is not possible which model is ‘the simplest’ Elementary particles vs atoms
  • #12: model is not a simplification of reality in its particular bounded context, it is the reality the concept car drawing was drawn before a car was manufactured maybe tht car will never be manufactured, so the drawing itself is the reality give example of model for tooth fairy
  • #13: what is the difference between the first set of terms and the second? the first ones are not physical, you can touch a transistor but cannot touch a compiler
  • #15: does it matter that these concepts don’t exist? what is even the purpose of concepts that are not physical?
  • #17: literally most of the programming concepts we learned are built on top of typical OS layer OS is a model, there are different OS models, but the one we use (UNiX) is most widely adopted
  • #18: Primitive languages were mostly concrete fire, man, woman, spear, tiger Abstractions were built on top of concrete terms and other abstractions family, danger, hunting
  • #19: this guy has 2 minutes to lay out a game plan although he talks english, you wouldn’t understand a word he says because in fact he talks a domain specific language - very effective dsl built on top of English (gpl)
  • #21: This is how programming in assembly would look like
  • #23: Titanous amount of work has been put in over almost a century to deliver these abstractions Given any computer program could theoretically be written without a single one of them, what is the value Again, these concepts are not physical. They model the way we think about execution of a computer program so the cognitive load on us when writing a program is reduced, so we can write more complex programs Computer Science has been overly generous with us providing high grade, very useful abstractions, so we can do more And what have we done with all of this?
  • #25: to be fair there is still more work to do with generic abstractions even worse in dynamic languages
  • #26: we need to use language that allow us to introduce relevant constraints expressive type system is superior to duck typing functional programming is superior to imperative programming, etc.
  • #28: you probably already see that I’m trying to relate the concepts of models and complexity for inspiration I was looking for other contexts where complexity plays an important role a book I can definitely refer to that changed my view of complexity in summary, complexity is not a force to fight with, but you rather direct it complex systems, whether business, life or society, they act a bit like living things they respond to change, they grow, they compete for resources and they cannot be fully controlled or even understood
  • #29: we talk about constraints and strictness, but is there a limit can we overconstrain, so that our code is so specific that it cannot be used effectively?
  • #30: what do you mean? my clients are not programmers give examples: GraphQL, SQL, Sequence Diagram, Workflows, etc.
  • #31: this relies on outdated arbitrary division of labor that is a mix with computer science and civil engineering. someone drew these lines long ago and we stick to them we borrow metaphors because of lack of new ones we dismiss problems of upper layers. thinking like computer scientists. there is a need for the new kind of engineer. one that can communicate through the boundaries, understand the boundaries and change them.
  • #32: typical model with boundary between business and software (engineering) where business provides description of what should be developed and engineering delivering it
  • #33: how it really looks like
  • #35: Spectrum from absolute order to absolute chaos software can’t be touched business can’t be proven or can it?
  • #36: complexity yields specificity simplicity yields adaptability SQL is a screwdriver of software - simple enough to reason about for non programmers powerful enough to for very advanced usage when SQL was developed, it’s all possible usages were not known
  • #38: some of these concepts may even overlap speak about the product, user, account who of you have User object in the domain what about Account what about Product
  • #39: here are some means we use to communicate across the boundary go through each of them stop at DSL and express how it fulfills each of the needs of the other ones but it is still a niche (APIs, executable specifications, BDD, ATDD)
  • #40: but generally this is how we speak Metaphor has higher chance to be understood by a human Metaphor is also a model, very context specific Impossible to codify, but helps trigger some intuition about the problem In those without capacity of understanding it otherwise Formal model is easier to translate into code
  • #44: infinite number of forces acting on the system the system has infinite number of attributes is there self similarity between components as between particles? No how do we even identify elementary components? Impossible metaphors from physics are compelling, because if we formalized them, we would be able to prove them, but it might be based on false assumptions mention a metaphor of a tech debt metaphor is a model, what is it useful for? limited context how I use tech debt
  • #45: let’s go back to the basics here is one definition of complexity by Thomas J. McCabe it is fully formal (you can write a program to calculate it)
  • #47: looked at some academic papers that deal with system complexity the problem seems to still be open there is controversy around if the intuitive understanding of complexity is even possible to describe due to subjective nature of it
  • #50: apparently if one starts reasoning about the system of components as a graph we can develop a plethora of useful metrics derived from graph theory which is scientific (formal) field
  • #51: dependency circle there were suggestions to use this type of diagram to break monoliths into microservices
  • #52: you can notice some recursive self-similarity if we see that, what do we do? build a pyramid
  • #54: the wrong code is the area that we talk about most test automation, formally provable programs, expressive type systems we dismiss problems of upper layers. thinking like computer scientists. like the problem we are solving is well defined mostly it is not what if we are writing the right code for wrong specification or if we have right code, right specification but wrong idea there is a need for the new kind of engineer. one that can communicate through the boundaries, understand the boundaries and change them. the complexity that we focus on has the least roi
  • #57: Experimentation Feature toggles A/B testing Continuous delivery testing in production feedback feedback feedback!
  • #58: 1 crunching knowledge 2 formal Specification (User Stories, Use Cases, UML) Behavior Driven Development Specification as Code Domain Driven Design Ubiquitous Language Change Management Process SDLC
  • #60: dimensions throughput extensibility cost testability scalability experimentation analytics etc.
  • #61: how useful is that?
  • #62: Should the complexity measure include business cost? what if complex solution has little to no cost? Should the complexity express transition cost? descending off local maximum Infinite dimensions of solution space design decisions lay on multiple orthogonal axes are we labelling disparate concepts with single name? business complexity, technical complexity, brittleness, security
  • #63: fog of war two categories of problems one can be proven, other cannot where is the boundary say there are systems that are complex and systems that are simple simple system can be analyzed deterministically meaning that we know exactly how each of its elements behaves complex process can only be analyzed stochastically its internals is just statistics, effectively black box
  • #64: but if what you really need is to calculate the temperature of the container you could either use thermodynamics equations or measure velocity vector of all particles and maybe do some event driven simulation, good luck with that. one is simple, the other one is complex two models describing the same phenomenon two realities, only one is simple
  • #65: that language is not Java, JS or Python folks complain that there are too many programming languages nonsense there should be a lot more programming languages every system that we build should provide a formal language to describe it we should explore more semantic paradigms, syntax experiments not in isolated fashion, languages could be interoperable idea from book that software evolution is not Newtonian process most popular tool on earth - screwdriver one cannot list all use cases of screwdriver exploration and readiness to fill new niches accidental vs business complexity junk dna vs dna good complexity = specificity how specific