<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Blog on semikolan</title>
    <link>https://semikolan.me/blog/</link>
    <description>Recent content in Blog on semikolan</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="https://semikolan.me/blog/index.xml" rel="self" type="application/rss+xml" />
    <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>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>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>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>
  </channel>
</rss>
