This document discusses simplicity and complexity in software systems. It argues that simple systems that evolve over time to become more complex tend to work better than complex systems designed from scratch. Simple is defined as having one fold or braid, while complex has many folds or braids. The document advocates embracing essential complexity but favoring simplicity overall by using higher level languages, immutable data, references to compose value and time, and avoiding mutable state. Composition is preferred over combining unrelated things. Abstractions should be global and complete rather than local and shallow.
9. A complex system
that works is
invariably found to
have evolved from a
simple system that
worked.
Gall’s Law - 1975
10. A complex system
designed from
scratch never
works and cannot
be patched up to
make it work. You
have to start over
with a working
simple system
A complex system
that works is
invariably found to
have evolved from a
simple system that
worked.
Gall’s Law - 1975
12. Everything should be made
as simple as possible,
but no simpler
Einstein’s Razor
13. It can scarcely be denied that the
supreme goal of all theory is to make
the irreducible basic elements as
simple and as few as possible without
having to surrender the adequate
representation of a single datum of
experience.
On the Method of Theoretical Physics
34. E a s y
Close at hand
S i m p l e
One fold/ braid
35. C o m p l e x C o m p l i c a t e dS i m p l e
E a s y H a r d
36. TheZenof Python(extract)
Explicit is better than implicit.
Simple is better than complex. Complex is
better than complicated. Flat is better than
nested.
55. In mathematics, the notion of number
has been extended over the centuries
to include 0, negative numbers,
rational numbers, real numbers,
complex numbers, which extend the
real numbers by including √-1, and
sometimes additional objects
- wikipedia:
“Number”
68. x = X()
y = x with
fieldA = …
fieldB = …
x = y
class X {
fieldA
fieldB
fieldC
}
b = x.fieldB + x.fieldA
Immutable
69. x = X()
y = x with
fieldA = …
fieldB = …
b = z.fieldB + z.fieldAx = y
z = x
class X {
fieldA
fieldB
fieldC
}
Immutable
70. x = X()
y = x with
fieldA = …
fieldB = … y = x with
fieldB = …
fieldC = …
b = z.fieldB + z.fieldAx = y
z = x
x = y
class X {
fieldA
fieldB
fieldC
}
Immutable
71. x = X()
y = x with
fieldA = …
fieldB = … y = x with
fieldB = …
fieldC = …
b = z.fieldB + z.fieldAx = y
z = x
x = y
class X {
fieldA
fieldB
fieldC
}
Immutable