<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>semikolan</title>
    <link>https://semikolan.me/</link>
    <description>Recent content on semikolan</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 27 Jul 2026 21:19:11 +0530</lastBuildDate>
    <atom:link href="https://semikolan.me/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The Markdown reference</title>
      <link>https://semikolan.me/til/markdown-reference/</link>
      <pubDate>Wed, 22 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/til/markdown-reference/</guid>
      <description>&lt;p class=&#34;grouplabel&#34;&gt;Headings&lt;/p&gt;&#xA;&lt;p style=&#34;font-family:var(--serif); font-size:var(--fs-h2); font-weight:600; margin:0.4rem 0 0.2rem;&#34;&gt;H1 · Heading one&lt;/p&gt;&#xA;&lt;p style=&#34;font-family:var(--serif); font-size:var(--fs-h2); font-weight:600; margin:1rem 0 0.2rem;&#34;&gt;H2 · Heading two&lt;/p&gt;&#xA;&lt;p style=&#34;font-family:var(--serif); font-size:var(--fs-h3); font-weight:600; margin:0.9rem 0 0.2rem;&#34;&gt;H3 · Heading three&lt;/p&gt;&#xA;&lt;p style=&#34;font-family:var(--serif); font-size:var(--fs-h4); font-weight:600; margin:0.9rem 0 0.2rem;&#34;&gt;H4 · Heading four&lt;/p&gt;&#xA;&lt;p style=&#34;font-family:var(--sans); font-size:var(--fs-xs); font-weight:600; text-transform:uppercase; letter-spacing:0.07em; color:var(--ink-soft); margin:0.9rem 0 0.2rem;&#34;&gt;H5 · Heading five&lt;/p&gt;&#xA;&lt;p style=&#34;font-family:var(--sans); font-size:var(--fs-2xs); font-weight:600; text-transform:uppercase; letter-spacing:0.1em; color:var(--muted); margin:0.8rem 0 0.2rem;&#34;&gt;H6 · Heading six&lt;/p&gt;&#xA;&lt;p class=&#34;grouplabel&#34;&gt;Inline formatting&lt;/p&gt;&#xA;&lt;p&gt;Text can be &lt;strong&gt;bold&lt;/strong&gt;, &lt;em&gt;italic&lt;/em&gt;, &lt;strong&gt;&lt;em&gt;bold italic&lt;/em&gt;&lt;/strong&gt;, &lt;del&gt;struck through&lt;/del&gt;, or &lt;ins&gt;inserted&lt;/ins&gt;. You can &lt;mark&gt;highlight a phrase&lt;/mark&gt; to draw the eye, drop in &lt;code&gt;inline code&lt;/code&gt;, and link to &lt;a href=&#34;#&#34;&gt;another post&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>When Big-O Lies</title>
      <link>https://semikolan.me/blog/when-big-o-lies/</link>
      <pubDate>Mon, 20 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/blog/when-big-o-lies/</guid>
      <description>&lt;p&gt;There&amp;rsquo;s a particular kind of confidence that comes from writing &lt;code&gt;O(n log n)&lt;/code&gt; in a design doc. It feels like a proof. And it is one — about a limit you will, in practice, never reach.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; The trouble starts when we treat the asymptote as advice for the machine in front of us.&lt;/p&gt;&#xA;&lt;p&gt;Last week I replaced a &amp;ldquo;slow&amp;rdquo; quadratic scan with a &amp;ldquo;fast&amp;rdquo; sort-then-sweep. The theory was unimpeachable. The result was &lt;em&gt;slower&lt;/em&gt; — for every realistic input we actually saw.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pretty-print JSON in one shell pipe</title>
      <link>https://semikolan.me/til/pretty-print-json/</link>
      <pubDate>Sat, 18 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/til/pretty-print-json/</guid>
      <description>&lt;p&gt;When you just want to &lt;em&gt;read&lt;/em&gt; an API response and don&amp;rsquo;t feel like installing anything:&lt;/p&gt;&#xA;&lt;figure class=&#34;code term&#34;&gt;&#xA;  &lt;figcaption class=&#34;term-bar&#34;&gt;&lt;span class=&#34;dots&#34; aria-hidden=&#34;true&#34;&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;term-title&#34;&gt;bash&lt;/span&gt;&lt;/figcaption&gt;&#xA;  &lt;div class=&#34;chroma&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl -s https://api.example.com/thing &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; python -m json.tool&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&lt;p&gt;&lt;code&gt;python -m json.tool&lt;/code&gt; ships with every Python install and pretty-prints stdin. No &lt;code&gt;jq&lt;/code&gt;, no dependencies. Here&amp;rsquo;s the whole thing, command and output:&lt;/p&gt;&#xA;&lt;figure class=&#34;code term&#34;&gt;&#xA;  &lt;figcaption class=&#34;term-bar&#34;&gt;&lt;span class=&#34;dots&#34; aria-hidden=&#34;true&#34;&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;term-title&#34;&gt;bash&lt;/span&gt;&lt;/figcaption&gt;&#xA;  &lt;div class=&#34;chroma&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gp&#34;&gt;$&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{&amp;#34;name&amp;#34;:&amp;#34;ada&amp;#34;,&amp;#34;langs&amp;#34;:[&amp;#34;go&amp;#34;,&amp;#34;rust&amp;#34;]}&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; python -m json.tool&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;    &amp;#34;name&amp;#34;: &amp;#34;ada&amp;#34;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;    &amp;#34;langs&amp;#34;: [&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;        &amp;#34;go&amp;#34;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;        &amp;#34;rust&amp;#34;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;    ]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;go&#34;&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;/figure&gt;&lt;p&gt;For anything more than eyeballing — filtering, reshaping — reach for &lt;code&gt;jq&lt;/code&gt;. For a quick look, this is already on your machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>git switch beats git checkout</title>
      <link>https://semikolan.me/til/git-switch-vs-checkout/</link>
      <pubDate>Thu, 09 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/til/git-switch-vs-checkout/</guid>
      <description>&lt;p&gt;&lt;code&gt;git checkout&lt;/code&gt; does too much: it moves branches, restores files, detaches HEAD, and creates branches — all under one overloaded verb. That&amp;rsquo;s why it&amp;rsquo;s a classic source of &amp;ldquo;I ran the right command and lost my changes.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;Since Git 2.23 the job is split into two honest commands:&lt;/p&gt;&#xA;&lt;div class=&#34;chroma&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git switch -c new-feature   &lt;span class=&#34;c1&#34;&gt;# create and move to a branch&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git switch main             &lt;span class=&#34;c1&#34;&gt;# move to an existing branch&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git restore path/to/file    &lt;span class=&#34;c1&#34;&gt;# discard changes to a file&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;switch&lt;/code&gt; only changes branches. &lt;code&gt;restore&lt;/code&gt; only touches files. The name tells you the blast radius before you hit enter.&lt;/p&gt;</description>
    </item>
    <item>
      <title>git commit --fixup and autosquash</title>
      <link>https://semikolan.me/til/git-fixup-autosquash/</link>
      <pubDate>Thu, 02 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/til/git-fixup-autosquash/</guid>
      <description>&lt;p&gt;When review feedback belongs in a commit three back, you don&amp;rsquo;t have to hand-edit a rebase todo. Mark the fix, then let Git sort it:&lt;/p&gt;&#xA;&lt;div class=&#34;chroma&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git commit --fixup&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&amp;lt;sha&amp;gt;          &lt;span class=&#34;c1&#34;&gt;# stages a &amp;#34;fixup! &amp;lt;subject&amp;gt;&amp;#34; commit&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git rebase -i --autosquash main   &lt;span class=&#34;c1&#34;&gt;# reorders and squashes it automatically&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;--fixup&lt;/code&gt; writes a specially-named commit; &lt;code&gt;--autosquash&lt;/code&gt; recognizes the name, moves it next to its target, and pre-marks it as &lt;code&gt;fixup&lt;/code&gt; in the todo list. You just confirm. Set &lt;code&gt;git config --global rebase.autosquash true&lt;/code&gt; and the flag is on by default.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Quiet Cost of a Fast Loop</title>
      <link>https://semikolan.me/blog/quiet-cost-of-a-fast-loop/</link>
      <pubDate>Tue, 30 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/blog/quiet-cost-of-a-fast-loop/</guid>
      <description>&lt;p&gt;The first time I saw a sorted array process faster than an identical unsorted one, I assumed I&amp;rsquo;d measured wrong. Same data, same instructions, same count. The only difference was order — and order, I&amp;rsquo;d been taught, doesn&amp;rsquo;t change complexity.&lt;/p&gt;&#xA;&lt;p&gt;It doesn&amp;rsquo;t. It changes the &lt;em&gt;constant&lt;/em&gt;, and the constant is a physical thing living in the branch predictor.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-branch-that-couldnt-guess&#34;&gt;The branch that couldn&amp;rsquo;t guess &lt;a class=&#34;anchor&#34; href=&#34;#the-branch-that-couldnt-guess&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A modern CPU runs ahead of itself. When it hits an &lt;code&gt;if&lt;/code&gt;, it doesn&amp;rsquo;t wait to learn the answer — it bets, and speculatively executes the branch it thinks you&amp;rsquo;ll take. Guess right and the work is already done. Guess wrong and it throws away a dozen in-flight instructions and starts over.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go&#39;s errors.Join</title>
      <link>https://semikolan.me/til/go-errors-join/</link>
      <pubDate>Sat, 27 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/til/go-errors-join/</guid>
      <description>&lt;p&gt;Before Go 1.20, returning &amp;ldquo;here is everything that&amp;rsquo;s wrong&amp;rdquo; meant building your own error slice type. Now the standard library does it:&lt;/p&gt;&#xA;&lt;div class=&#34;chroma&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;func&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;validate&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;u&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;User&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;error&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;errs&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;error&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;u&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Name&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;==&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;errs&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;errors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Join&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;errs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;errors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;New&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;name is required&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;u&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Age&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;errs&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;errors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Join&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;errs&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;errors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;New&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;age must be non-negative&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;errs&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// nil if nothing was joined&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;errors.Join&lt;/code&gt; ignores &lt;code&gt;nil&lt;/code&gt; arguments, so the accumulate-in-a-loop pattern just works. And &lt;code&gt;errors.Is&lt;/code&gt; / &lt;code&gt;errors.As&lt;/code&gt; still see through the joined result to each underlying error.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go&#39;s defer runs in LIFO order</title>
      <link>https://semikolan.me/til/defer-runs-lifo/</link>
      <pubDate>Thu, 18 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/til/defer-runs-lifo/</guid>
      <description>&lt;p&gt;Multiple &lt;code&gt;defer&lt;/code&gt; statements in a function run in reverse order — the last one deferred runs first:&lt;/p&gt;&#xA;&lt;div class=&#34;chroma&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;func&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;process&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;f&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;open&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;defer&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Close&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;      &lt;span class=&#34;c1&#34;&gt;// runs second&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;tx&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;:=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Begin&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;defer&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;tx&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;Rollback&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// runs first&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// ...&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is the right default: teardown happens in the reverse of setup, so inner resources release before the outer ones they depend on. It mirrors how a stack unwinds — which is the whole point.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reading the Standard Library for Fun</title>
      <link>https://semikolan.me/blog/reading-the-standard-library/</link>
      <pubDate>Thu, 11 Jun 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/blog/reading-the-standard-library/</guid>
      <description>&lt;p&gt;The standard library is the best-reviewed code most of us will ever have free access to, and almost nobody reads it. I&amp;rsquo;ve started treating it like a museum you&amp;rsquo;re allowed to touch — pick one function, follow it all the way down, and notice every decision that isn&amp;rsquo;t the obvious one.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sortslice-is-not-quicksort&#34;&gt;sort.Slice is not quicksort &lt;a class=&#34;anchor&#34; href=&#34;#sortslice-is-not-quicksort&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you&amp;rsquo;d asked me to implement &lt;code&gt;sort.Slice&lt;/code&gt;, I&amp;rsquo;d have written quicksort and moved on. Go&amp;rsquo;s implementation is a &lt;em&gt;pattern-defeating&lt;/em&gt; quicksort — &lt;code&gt;pdqsort&lt;/code&gt; — and the difference is a catalogue of the ways plain quicksort betrays you in production.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cache Invalidation, Mostly Naming</title>
      <link>https://semikolan.me/blog/cache-invalidation-mostly-naming/</link>
      <pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/blog/cache-invalidation-mostly-naming/</guid>
      <description>&lt;p&gt;The joke is that there are two hard problems in computer science: cache invalidation and naming things. I&amp;rsquo;ve come to think they&amp;rsquo;re the same problem wearing two hats.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-a-key-really-is&#34;&gt;What a key really is &lt;a class=&#34;anchor&#34; href=&#34;#what-a-key-really-is&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A cache key is a name for a claim: &amp;ldquo;the answer to &lt;em&gt;this question&lt;/em&gt; is &lt;em&gt;that value&lt;/em&gt;.&amp;rdquo; Invalidation is just noticing the claim stopped being true. The reason invalidation is hard is almost never the eviction mechanics — it&amp;rsquo;s that the key doesn&amp;rsquo;t actually name the claim.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Profiler Is Always Right</title>
      <link>https://semikolan.me/blog/the-profiler-is-always-right/</link>
      <pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/blog/the-profiler-is-always-right/</guid>
      <description>&lt;p&gt;I keep a mental list of times I was certain I knew where the time was going, ran a profiler to confirm it, and got humbled. The list is long. The profiler&amp;rsquo;s record against me is perfect.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-bottleneck-was-never-where-i-looked&#34;&gt;The bottleneck was never where I looked &lt;a class=&#34;anchor&#34; href=&#34;#the-bottleneck-was-never-where-i-looked&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I&amp;rsquo;d stare at the gnarly nested loop, the obvious &lt;code&gt;O(n²)&lt;/code&gt;, and optimize it for an afternoon. The profiler would then point, flatly, at a &lt;code&gt;json.Marshal&lt;/code&gt; call in the logging path that ran on every request. The scary algorithm ran twice a day. The boring serialization ran a million times an hour.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tools I Use</title>
      <link>https://semikolan.me/tools-i-use/</link>
      <pubDate>Sun, 01 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/tools-i-use/</guid>
      <description>&lt;p&gt;A snapshot of what I reach for. It changes slowly — I tend to keep tools until they actively get in my way.&lt;/p&gt;&#xA;&lt;h2 id=&#34;editor--terminal&#34;&gt;Editor &amp;amp; terminal &lt;a class=&#34;anchor&#34; href=&#34;#editor--terminal&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Neovim&lt;/strong&gt; with a config I maintain as &lt;a href=&#34;https://semikolan.me/projects/&#34;&gt;kolan.vim&lt;/a&gt;. LSP, Telescope for fuzzy everything, Treesitter.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Ghostty&lt;/strong&gt; as the terminal. Fast, GPU-accelerated, sensible defaults.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;tmux&lt;/strong&gt; for sessions that outlive the terminal window.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;fish&lt;/strong&gt; shell for interactive use, POSIX &lt;code&gt;sh&lt;/code&gt; for anything I&amp;rsquo;d commit.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;languages--build&#34;&gt;Languages &amp;amp; build &lt;a class=&#34;anchor&#34; href=&#34;#languages--build&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Go&lt;/strong&gt; for services and CLIs — fast builds, boring concurrency, one binary out.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Rust&lt;/strong&gt; when I need the guarantees or the last 20% of performance.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;SQLite&lt;/strong&gt; for local tools, &lt;strong&gt;Postgres&lt;/strong&gt; for anything that outlives a process.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;hardware&#34;&gt;Hardware &lt;a class=&#34;anchor&#34; href=&#34;#hardware&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;14&amp;quot; MacBook Pro (M-series) — the fans have never turned on.&lt;/li&gt;&#xA;&lt;li&gt;A mechanical keyboard with tactile switches, because I stare at it all day.&lt;/li&gt;&#xA;&lt;li&gt;One external monitor. Two felt like more context-switching, not less.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;also-on-the-machine&#34;&gt;Also on the machine &lt;a class=&#34;anchor&#34; href=&#34;#also-on-the-machine&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;ripgrep&lt;/strong&gt; and &lt;strong&gt;fd&lt;/strong&gt; — I haven&amp;rsquo;t typed &lt;code&gt;grep&lt;/code&gt; or &lt;code&gt;find&lt;/code&gt; in years.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;jq&lt;/strong&gt; for JSON, &lt;strong&gt;hyperfine&lt;/strong&gt; for benchmarks, &lt;strong&gt;git&lt;/strong&gt; for everything.&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Reading List</title>
      <link>https://semikolan.me/reading-list/</link>
      <pubDate>Thu, 15 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/reading-list/</guid>
      <description>&lt;p&gt;No rating system and no particular order. If a book is here, it earned the time and changed how I think about something.&lt;/p&gt;&#xA;&lt;h2 id=&#34;recently&#34;&gt;Recently &lt;a class=&#34;anchor&#34; href=&#34;#recently&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;The Art of Doing Science and Engineering&lt;/strong&gt; — Richard Hamming. Half technique, half career advice from someone who watched computing get invented. The &amp;ldquo;you and your research&amp;rdquo; chapter is worth the whole book.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;A Philosophy of Software Design&lt;/strong&gt; — John Ousterhout. The clearest argument I&amp;rsquo;ve read that complexity is the enemy and deep modules are the cure. Short, opinionated, correct.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Designing Data-Intensive Applications&lt;/strong&gt; — Martin Kleppmann. The book I wish I&amp;rsquo;d had before I ever touched a distributed system. I re-read a chapter roughly every time I break production.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;older-still-with-me&#34;&gt;Older, still with me &lt;a class=&#34;anchor&#34; href=&#34;#older-still-with-me&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;The Mythical Man-Month&lt;/strong&gt; — Fred Brooks. Fifty years old and still describes every project I&amp;rsquo;ve been on.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Working in Public&lt;/strong&gt; — Nadia Eghbal. Changed how I think about open source maintenance and the cost of &amp;ldquo;free.&amp;rdquo;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>A Year of Reading Postmortems</title>
      <link>https://semikolan.me/blog/a-year-of-reading-postmortems/</link>
      <pubDate>Tue, 02 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/blog/a-year-of-reading-postmortems/</guid>
      <description>&lt;p&gt;I spent last year reading one public postmortem a week — outages from companies large enough to be forced into candor. I expected exotic failures. What I found was the same three or four stories wearing different logos.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-retry-that-became-the-outage&#34;&gt;The retry that became the outage &lt;a class=&#34;anchor&#34; href=&#34;#the-retry-that-became-the-outage&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The single most common shape: a small failure triggers automatic retries, the retries multiply the load, and the load turns a blip into a self-sustaining fire. The system&amp;rsquo;s own recovery mechanism is the accelerant.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Case for Boring Databases</title>
      <link>https://semikolan.me/blog/the-case-for-boring-databases/</link>
      <pubDate>Sun, 14 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/blog/the-case-for-boring-databases/</guid>
      <description>&lt;p&gt;My default database is Postgres, and my second choice is also Postgres. This isn&amp;rsquo;t nostalgia. It&amp;rsquo;s that &amp;ldquo;boring&amp;rdquo; is a technical property, and it&amp;rsquo;s one I want more of as a system gets important.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-boring-buys-you&#34;&gt;What boring buys you &lt;a class=&#34;anchor&#34; href=&#34;#what-boring-buys-you&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A boring database is one whose failure modes are already written down — in blog posts, in Stack Overflow answers, in the scar tissue of every engineer you&amp;rsquo;ll ever hire. When it&amp;rsquo;s 3am and something is wrong, you are not the first person to see this error. That is worth more than almost any feature.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Search</title>
      <link>https://semikolan.me/search/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://semikolan.me/search/</guid>
      <description></description>
    </item>
  </channel>
</rss>
