<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Field Notes</title>
  <link href="https://juicer.build/themes/juicerwiki/demo/feed.xml" rel="self"/>
  <link href="https://juicer.build/themes/juicerwiki/demo/"/>
  <id>https://juicer.build/themes/juicerwiki/demo/feed.xml</id>
  <updated>2024-04-02T00:00:00Z</updated>
  <author><name>ed</name></author>
  <entry>
    <title>Language Design</title>
    <link href="https://juicer.build/themes/juicerwiki/demo/language-design/"/>
    <id>https://juicer.build/themes/juicerwiki/demo/language-design/</id>
    <updated>2024-04-02T00:00:00Z</updated>
    <summary>Notes on what makes a programming language pleasant to use over time.</summary>
    <content type="html">&lt;p&gt;The hardest part of programming language design is what you leave out. Every feature is forever; every feature interacts with every other feature; every feature is a thing the implementer has to maintain and the reader has to learn.&lt;/p&gt;
&lt;h4 id=&quot;the-orthogonality-test&quot;&gt;The orthogonality test&lt;/h4&gt;
&lt;p&gt;Two features are orthogonal if they can be combined without surprise. If feature X breaks when used inside feature Y, the language has a wart that grows over time.&lt;/p&gt;
&lt;p&gt;Most language warts come from features designed in isolation: pattern matching that doesn’t compose with lambdas, generics that don’t compose with subtyping, async/await that doesn’t compose with iterators. The fix is to design every feature against every other feature &lt;em&gt;up front&lt;/em&gt;, before either ships.&lt;/p&gt;
&lt;h4 id=&quot;static-vs-dynamic&quot;&gt;Static vs dynamic&lt;/h4&gt;
&lt;p&gt;A pet division. Static typing pays a cost in expressiveness at the boundary (where types meet user-supplied data) and earns interest in the middle (where types meet other types). Dynamic typing pays its bill in inverse. Pick based on where the program spends most of its time. See &lt;a href=&quot;/themes/juicerwiki/demo/distributed-systems/&quot;&gt;Distributed Systems&lt;/a&gt; for an unrelated note about another classic trade-off.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Consistency Models</title>
    <link href="https://juicer.build/themes/juicerwiki/demo/consistency-models/"/>
    <id>https://juicer.build/themes/juicerwiki/demo/consistency-models/</id>
    <updated>2024-03-12T00:00:00Z</updated>
    <summary>The trade-off between availability, consistency, and partition-tolerance.</summary>
    <content type="html">&lt;p&gt;A &lt;strong&gt;consistency model&lt;/strong&gt; is a contract between a distributed system and its clients about what reads are allowed to see after writes happen.&lt;/p&gt;
&lt;h4 id=&quot;the-big-three&quot;&gt;The big three&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Linearizable&lt;/strong&gt; — every operation appears to take effect at a single instant between its invocation and its response. Hardest to provide; easiest to reason about.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sequential&lt;/strong&gt; — operations from all clients appear in some single total order, but the order doesn’t have to match real time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Eventual&lt;/strong&gt; — reads can see stale data; given enough time without writes, all replicas converge.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;cap-theorem&quot;&gt;CAP theorem&lt;/h4&gt;
&lt;p&gt;Eric Brewer’s &lt;a href=&quot;https://www.glassbeam.com/sites/all/themes/glassbeam/images/blog/10.1.1.67.6951.pdf&quot;&gt;CAP theorem&lt;/a&gt; says: in the face of a network partition, a system must choose between consistency and availability. There is no third option.&lt;/p&gt;
&lt;p&gt;This is why most production systems are tunable: they offer linearizable reads with a latency cost, or fast eventually-consistent reads, and the client picks per request.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&quot;/themes/juicerwiki/demo/distributed-systems/&quot;&gt;Distributed Systems&lt;/a&gt; for the broader context.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Distributed Systems</title>
    <link href="https://juicer.build/themes/juicerwiki/demo/distributed-systems/"/>
    <id>https://juicer.build/themes/juicerwiki/demo/distributed-systems/</id>
    <updated>2024-03-08T00:00:00Z</updated>
    <summary>A grab-bag of notes on building reliable systems out of unreliable parts.</summary>
    <content type="html">&lt;p&gt;The fundamental problem of distributed computing: you have many machines, each of which fails independently, and you need them to agree on something.&lt;/p&gt;
&lt;h4 id=&quot;eight-fallacies&quot;&gt;Eight fallacies&lt;/h4&gt;
&lt;p&gt;Peter Deutsch’s classic list of things you must never assume about a distributed system:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The network is reliable.&lt;/li&gt;
&lt;li&gt;Latency is zero.&lt;/li&gt;
&lt;li&gt;Bandwidth is infinite.&lt;/li&gt;
&lt;li&gt;The network is secure.&lt;/li&gt;
&lt;li&gt;Topology doesn’t change.&lt;/li&gt;
&lt;li&gt;There is one administrator.&lt;/li&gt;
&lt;li&gt;Transport cost is zero.&lt;/li&gt;
&lt;li&gt;The network is homogeneous.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Every distributed-systems failure mode is a corollary of violating one of these. See &lt;a href=&quot;/themes/juicerwiki/demo/consistency-models/&quot;&gt;Consistency Models&lt;/a&gt; for the most important consequence: you can’t have everything.&lt;/p&gt;
&lt;h4 id=&quot;consensus&quot;&gt;Consensus&lt;/h4&gt;
&lt;p&gt;The canonical problem is &lt;strong&gt;consensus&lt;/strong&gt;: all nodes agree on a value despite some subset failing. Paxos and Raft are the standard solutions. The cost is a network round trip per decision.&lt;/p&gt;
&lt;p&gt;The Zettelkasten note (&lt;a href=&quot;/themes/juicerwiki/demo/zettelkasten/&quot;&gt;Zettelkasten&lt;/a&gt;) is unrelated content-wise, but the &lt;em&gt;shape&lt;/em&gt; is the same — a graph of nodes that must converge by exchanging messages.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Backlinks</title>
    <link href="https://juicer.build/themes/juicerwiki/demo/backlinks/"/>
    <id>https://juicer.build/themes/juicerwiki/demo/backlinks/</id>
    <updated>2024-02-12T00:00:00Z</updated>
    <summary>How the inverted link index gets built and rendered.</summary>
    <content type="html">&lt;p&gt;A backlink is a link pointing &lt;em&gt;to&lt;/em&gt; a note, not &lt;em&gt;from&lt;/em&gt; it. Tracking them turns a wiki from a directed tree into an undirected graph: you can follow the conversation in both directions.&lt;/p&gt;
&lt;h4 id=&quot;construction&quot;&gt;Construction&lt;/h4&gt;
&lt;p&gt;A backlinks index is just an inverted-index pass over the corpus. For every page, walk the rendered AST, collect every internal link destination, and append the source page to the destination’s bucket.&lt;/p&gt;
&lt;p&gt;The juicer engine does this during the markdown pass and exposes the result as &lt;code&gt;.page.backlinks&lt;/code&gt; — a thin list of &lt;code&gt;{title, url, summary}&lt;/code&gt; records, sorted by referrer title for deterministic output.&lt;/p&gt;
&lt;p&gt;Tools like Roam, Obsidian, and Logseq made backlinks a first-class UI affordance; juicer just bakes the same idea into a static site generator. The implementation here is the same shape as &lt;a href=&quot;/themes/juicerwiki/demo/zettelkasten/&quot;&gt;Zettelkasten&lt;/a&gt;, just done at build time instead of at edit time.&lt;/p&gt;
&lt;h4 id=&quot;edge-cases&quot;&gt;Edge cases&lt;/h4&gt;
&lt;p&gt;The collector filters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Absolute URLs (&lt;code&gt;https://…&lt;/code&gt;, &lt;code&gt;mailto:&lt;/code&gt;, &lt;code&gt;tel:&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Fragment-only anchors (&lt;code&gt;#section&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Self-links&lt;/li&gt;
&lt;li&gt;Query strings and fragments are stripped before matching, so &lt;code&gt;[X](/target/#section)&lt;/code&gt; and &lt;code&gt;[X](/target/?q=1)&lt;/code&gt; both count as a link to &lt;code&gt;/target/&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See &lt;a href=&quot;/themes/juicerwiki/demo/distributed-systems/&quot;&gt;Distributed Systems&lt;/a&gt; for an aside on graph algorithms generally.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Atomic Notes</title>
    <link href="https://juicer.build/themes/juicerwiki/demo/atomic-notes/"/>
    <id>https://juicer.build/themes/juicerwiki/demo/atomic-notes/</id>
    <updated>2024-02-11T00:00:00Z</updated>
    <summary>Why each note should hold exactly one idea.</summary>
    <content type="html">&lt;p&gt;An &lt;strong&gt;atomic note&lt;/strong&gt; is a note that holds exactly one idea, expressible in a few paragraphs at most. The atom is the smallest unit that can be reused intact in another context.&lt;/p&gt;
&lt;p&gt;The discipline of writing atomic notes is what gives a wiki long-term legs. See &lt;a href=&quot;/themes/juicerwiki/demo/zettelkasten/&quot;&gt;Zettelkasten&lt;/a&gt; for the historical method that put this idea on the map.&lt;/p&gt;
&lt;h4 id=&quot;cues-for-splitting&quot;&gt;Cues for splitting&lt;/h4&gt;
&lt;p&gt;If you can write a new title for a section of a note that doesn’t repeat the parent title, the section probably wants to be its own note. Linking is cheaper than scrolling — and the inbound link will surface in the parent’s backlinks panel automatically.&lt;/p&gt;
&lt;h4 id=&quot;cues-against-splitting&quot;&gt;Cues against splitting&lt;/h4&gt;
&lt;p&gt;Don’t split for the sake of splitting. A two-paragraph note with no neighbours is information, but a two-paragraph note that’s part of a network of five is &lt;em&gt;knowledge&lt;/em&gt;. Aim for the latter; let the former hibernate until something else points to it.&lt;/p&gt;
&lt;p&gt;See also &lt;a href=&quot;/themes/juicerwiki/demo/backlinks/&quot;&gt;Backlinks&lt;/a&gt; for the mechanism that makes the network legible.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Zettelkasten</title>
    <link href="https://juicer.build/themes/juicerwiki/demo/zettelkasten/"/>
    <id>https://juicer.build/themes/juicerwiki/demo/zettelkasten/</id>
    <updated>2024-02-10T00:00:00Z</updated>
    <summary>A note-taking method built around small atomic notes that link to each other.</summary>
    <content type="html">&lt;p&gt;The &lt;strong&gt;Zettelkasten&lt;/strong&gt; (“slip box” in German) is a personal knowledge management method developed by sociologist Niklas Luhmann. The core idea: each note holds one atomic thought, identified by a unique number, and notes link to each other to form a network of ideas rather than a tree.&lt;/p&gt;
&lt;h4 id=&quot;why-atomic-notes&quot;&gt;Why atomic notes&lt;/h4&gt;
&lt;p&gt;A note that does one thing can be reused in many contexts. A note that tries to be a chapter can only be one chapter.&lt;/p&gt;
&lt;p&gt;When a note grows past a few paragraphs, it usually wants to be split. The cue is often that you can write a new title that doesn’t repeat the old one — which is the cue that you’ve drifted into a new topic.&lt;/p&gt;
&lt;h4 id=&quot;linking&quot;&gt;Linking&lt;/h4&gt;
&lt;p&gt;The link is the unit of structure. There’s no folder tree. The wiki is just notes plus their links. See &lt;a href=&quot;/themes/juicerwiki/demo/distributed-systems/&quot;&gt;Distributed Systems&lt;/a&gt; for an unrelated example of the same “everything is a network of nodes” idea.&lt;/p&gt;
&lt;h4 id=&quot;backlinks&quot;&gt;Backlinks&lt;/h4&gt;
&lt;p&gt;A note shows you who &lt;em&gt;links to&lt;/em&gt; it, not just who it links to. That inversion is what makes the wiki feel like a network and not a tree. See &lt;a href=&quot;/themes/juicerwiki/demo/backlinks/&quot;&gt;Backlinks&lt;/a&gt; for the implementation notes.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>About</title>
    <link href="https://juicer.build/themes/juicerwiki/demo/about/"/>
    <id>https://juicer.build/themes/juicerwiki/demo/about/</id>
    <updated>2024-01-01T00:00:00Z</updated>
    <summary>This wiki is built with juicer using the juicerwiki theme. Notes live as flat markdown files under content/; every internal link automatically populates the linked note’s backlinks panel.</summary>
    <content type="html">&lt;p&gt;This wiki is built with &lt;a href=&quot;https://github.com/edadma/juicer&quot;&gt;juicer&lt;/a&gt; using the &lt;code&gt;juicerwiki&lt;/code&gt; theme. Notes live as flat markdown files under &lt;code&gt;content/&lt;/code&gt;; every internal link automatically populates the linked note’s backlinks panel.&lt;/p&gt;
&lt;p&gt;The closest cousin of this layout is the original &lt;a href=&quot;/themes/juicerwiki/demo/zettelkasten/&quot;&gt;Zettelkasten&lt;/a&gt; method as practiced by Niklas Luhmann. The original was a paper card index; this is the digital equivalent without the index cards.&lt;/p&gt;</content>
  </entry>
</feed>
