korrents

korrents · piece

Semantic Compression

Casey Muratori · 28 May 2014

Others here said this too

Duplication is cheaper than the wrong abstraction, so code should not be made reusable before there are real examples of what the reuse has to do.

Like a good compressor, I don't reuse anything until I have at least two instances of it occurring.

Also said by Sandi Metz

Read the piece on caseymuratori.com ↗

4 korrents from this piece ↓

Casey Muratori did not write this page.

Every claim below was made in this piece, quoted word for word and numbered in the order the piece makes them, so you can read it there rather than take our word for it. The sentence above each quote is our reading of the claim, not their wording. Each quote was checked against a stored copy of the page at build time; where the two differ, the quote is the fact.

  1. the landscape of educational materials out there still overwhelmingly falls into the "objectively bad" category
  2. Like a good compressor, I don't reuse anything until I have at least two instances of it occurring.
  3. This is crucial for efficiency, because if you only have one example, or worse, no examples (in the case of code written preemptively), then you are very likely to make mistakes in the way you write it and end up with code that isn't conveniently reusable.
  4. Code is procedurally oriented, and the "objects" are simply constructs that arise that allow procedures to be reused.

Keep reading

The other pieces are the ones whose claims are worded most like this one's. That measures language, not agreement: they may argue the opposite.