Elements of Clojure

275 posts

Elements of Clojure banner
Elements of Clojure

Elements of Clojure

@elementsofclj

A book by @ztellman about the philosophy of software, through the lens of Clojure

Katılım Temmuz 2018
1 Takip Edilen937 Takipçiler
Elements of Clojure retweetledi
zach
zach@ztellman·
In the software literature, sometimes "transparent" means transparent, and sometimes it means opaque. This week, I explore the history behind both uses, and try to find a synthesis: explaining.software/archive/transp…
English
0
1
5
1.1K
Elements of Clojure retweetledi
zach
zach@ztellman·
For the next few weeks, we'll be exploring both sides of this coin. To start, we'll look at the simplicity of keeping things apart: explaining.software/archive/the-si…
English
1
1
1
1.8K
Elements of Clojure retweetledi
zach
zach@ztellman·
This intuition arises from our industry's decades-long treatment of coupling as, at best, a necessary evil. And, in my opinion, it's entirely wrong. Cohesive code doesn't have to be understood all at once. Rather, it's best understood incrementally: explaining.software/archive/the-si…
English
0
2
0
734
Elements of Clojure retweetledi
zach
zach@ztellman·
Almost every discussion of simplicity in the software industry builds atop the coupling/cohesion dichotomy introduced by Stevens et al in dl.acm.org/doi/10.1147/sj…. There, they defined relationships inside functions as "cohesion", and every other relationship as "coupling".
English
1
4
15
2.5K
Elements of Clojure retweetledi
zach
zach@ztellman·
For the past few years, I've been working on a book about software design. Lately, I've been feeling the need to ensure that its core ideas resonate with a broader audience. As such, I've started a newsletter: explaining.software/archive/a-brie…
English
4
9
57
5.3K
Elements of Clojure retweetledi
zach
zach@ztellman·
I recently gave a talk on some ideas from my upcoming book on software design: youtu.be/tHThXQr7wwA. There’s a lot I didn’t have time to cover, but I think it conveys the general perspective I’m taking and some of the central themes.
YouTube video
YouTube
zach@ztellman

Earlier this year I went part-time at Microsoft to work on a new book, which will cover many of the same topics as Elements of Clojure, but more clearly and completely articulated, and hopefully accessible to a broader audience.

English
4
13
95
0
Elements of Clojure
Elements of Clojure@elementsofclj·
The tick's model of its environment cannot guarantee a consistent outcome. For any given values of heat and sweat, there are scenarios that lead to success and scenarios that lead to failure. Nevertheless, the tick survives; its simplistic model satisfices.
English
0
0
4
0
Elements of Clojure
Elements of Clojure@elementsofclj·
Consider how the world is seen by a tick.
English
2
0
1
0
Elements of Clojure
Elements of Clojure@elementsofclj·
Self-consistency is necessary, but not sufficient. When evaluating software, we cannot ignore the broader context. We must take advantage of every available perspective. We must be dissatisfied with easy answers. We must be curious.
English
0
0
4
0
Elements of Clojure
Elements of Clojure@elementsofclj·
There are countless resources for creating self-consistent abstractions, but few for creating useful abstractions. This is in part because self-consistency is an objective property, while utility is hopelessly subjective.
English
0
1
7
0
Elements of Clojure
Elements of Clojure@elementsofclj·
In software, we don't have the luxury of ignoring context. We need our models to be self-consistent, but we also need them to be *useful* within our given environment.
English
0
0
6
0
Elements of Clojure
Elements of Clojure@elementsofclj·
Hoare's abstraction function, like the Church numeral, is a mathematical abstraction. It describes a model which has provable qualities and is often described as "correct," which means it is self-consistent. By omission, it deems the context unimportant.
English
0
0
2
0
Elements of Clojure
Elements of Clojure@elementsofclj·
But the cons cell is not timeless; since its invention in the late 1950s, computers have changed. Notably, processor speed has improved more than memory latency, and so the relative cost of following a reference has grown over time.
English
0
0
4
0
Elements of Clojure
Elements of Clojure@elementsofclj·
For a table to be useful, it must avoid conflicts. One way to accomplish this is to keep the table private so it reflects only our vision of how keys map onto behavior. Alternatively, we can extend the table using only private keys so no one else can shadow our behavior.
English
0
0
2
0
Elements of Clojure
Elements of Clojure@elementsofclj·
A reference *conveys* values, and a conditional *decides* based upon values. These are complementary primitives and are present in every modern language. Through their composition, we can create software of arbitrary complexity.
English
0
0
2
0
Elements of Clojure
Elements of Clojure@elementsofclj·
A name is a lexical reference that is dereferenced at compile time. A pointer is a memory reference that is dereferenced at runtime.
English
0
0
4
0
Elements of Clojure
Elements of Clojure@elementsofclj·
Indirection provides separation between *what* and *how*. It exists wherever "how does this work?" is best answered, "it depends."
English
0
2
9
0