<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Alejandro AR (kinduff)</title>
  <id>https://kinduff.com/</id>
  <link href="https://kinduff.com/feed.xml" rel="self" type="application/atom+xml" />
  <link href="https://kinduff.com/" rel="alternate" type="text/html" />
  <updated>2026-10-21T07:30:00+00:00</updated>
  <author>
    <name>Alejandro AR (kinduff)</name>
    
    <uri>https://kinduff.com</uri>
  </author>
  <rights>© 2008-2025 Alejandro AR (kinduff.com)</rights>
  <subtitle>Alejandro AR (kinduff) website with blog posts, projects, videos, and more.</subtitle>

  
    <entry>
      <id>https://kinduff.com/2026/10/21/recompiling-the-lion-king-with-an-agent/</id>
      <title type="html">Recompiling The Lion King With an Agent</title>
      <link href="https://kinduff.com/2026/10/21/recompiling-the-lion-king-with-an-agent/" rel="alternate" type="text/html" />
      <published>2026-10-21T07:30:00+00:00</published>
      <updated>2026-10-21T07:30:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            How a 1994 SNES cartridge became a native PC program in ten days, one loop at a time.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p><img src="/assets/images/posts/tlkrecomp/hero.png" alt="I Just Can't Wait to Be King in widescreen: young Simba leaps between twisting branches, monkeys hanging from them, red blossoms against an orange sky" />
<em>I Just Can’t Wait to Be King in 16:9, running as native code.</em></p>

<p><a href="https://github.com/kinduff/TLKRecomp">TLKRecomp</a> is <em>The Lion King</em> for the Super Nintendo, rebuilt as a native PC program. It runs on Linux, Windows and Mac, plays from the Westwood logo to the final fight with Scar, and can widen the picture to 16:9.</p>

<p>It took ten days, and AI agents wrote the code. They worked in a loop: try something, compare it frame by frame with the original game, find the first thing that differs, fix it, and go again.</p>

<p>This post explains what a recompilation is, how that loop ran, what the first broken tries looked like, what came out of it, and a detour into Donkey Kong Country.</p>

<h2 id="what-recompiling-means">What “recompiling” means</h2>

<p>A SNES game is machine code for the console’s own processor. Normally an emulator runs it: a program that pretends to be that processor, one instruction at a time.</p>

<p>A <strong>static recompilation</strong> translates the game’s machine code into C ahead of time. A tool (<a href="https://github.com/RetroPortingToolKit/snesrecomp">snesrecomp</a>) does the translating, and the C gets compiled for your computer like any other program. The chips that draw the picture and play the sound stay emulated, so the game still looks and sounds like the cartridge.</p>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 250" width="100%" role="img" aria-label="The cartridge's game code is translated to C and compiled into a native program; the picture and sound chips are still emulated next to it">
  <style>
    .rc-t { fill: var(--font-color, #0e0e0b); font-size: 14px; }
    .rc-s { fill: var(--font-color, #0e0e0b); font-size: 12px; opacity: .75; }
    .rc-l { stroke: var(--font-color, #0e0e0b); stroke-width: 1.5; fill: none; }
    .rc-a { fill: var(--font-color, #0e0e0b); }
    .rc-1 { fill: var(--header-h3-bg-color, #F1C40F); }
    .rc-2 { fill: var(--header-h1-bg-color, #AFD2E9); }
    .rc-3 { fill: var(--header-h4-bg-color, #D4E6B5); }
    .rc-4 { fill: var(--header-h2-bg-color, #C09FE4); }
  </style>
  <defs>
    <marker id="rc-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M0,0 L10,5 L0,10 z" class="rc-a" />
    </marker>
  </defs>
  <rect x="10" y="30" width="140" height="70" rx="8" class="rc-1" />
  <text x="80" y="60" text-anchor="middle" class="rc-t">The cartridge</text>
  <text x="80" y="80" text-anchor="middle" class="rc-s">1994 machine code</text>
  <rect x="190" y="30" width="140" height="70" rx="8" class="rc-2" />
  <text x="260" y="60" text-anchor="middle" class="rc-t">Translator</text>
  <text x="260" y="80" text-anchor="middle" class="rc-s">snesrecomp</text>
  <rect x="370" y="30" width="140" height="70" rx="8" class="rc-2" />
  <text x="440" y="60" text-anchor="middle" class="rc-t">C code</text>
  <text x="440" y="80" text-anchor="middle" class="rc-s">readable, moddable</text>
  <rect x="550" y="30" width="140" height="70" rx="8" class="rc-3" />
  <text x="620" y="60" text-anchor="middle" class="rc-t">A real PC program</text>
  <text x="620" y="80" text-anchor="middle" class="rc-s">Linux, Windows, Mac</text>
  <line x1="150" y1="65" x2="188" y2="65" class="rc-l" marker-end="url(#rc-arrow)" />
  <line x1="330" y1="65" x2="368" y2="65" class="rc-l" marker-end="url(#rc-arrow)" />
  <line x1="510" y1="65" x2="548" y2="65" class="rc-l" marker-end="url(#rc-arrow)" />
  <rect x="550" y="160" width="140" height="70" rx="8" class="rc-4" />
  <text x="620" y="190" text-anchor="middle" class="rc-t">Picture + sound</text>
  <text x="620" y="210" text-anchor="middle" class="rc-s">still emulated chips</text>
  <line x1="620" y1="158" x2="620" y2="102" class="rc-l" marker-start="url(#rc-arrow)" marker-end="url(#rc-arrow)" />
  <text x="10" y="180" class="rc-t">The game's brain becomes C and runs at full speed.</text>
  <text x="10" y="202" class="rc-t">Its eyes and ears stay emulated, so it looks and</text>
  <text x="10" y="224" class="rc-t">sounds like the cartridge.</text>
</svg>

<p>Once the game is C, it can be read and changed: a settings menu, a practice mode, widescreen, another game’s characters.</p>

<p>No game data lives in the repository. You bring your own dump of your own cartridge, and the build generates the C on your machine.</p>

<h2 id="the-hard-part-finding-the-code">The hard part: finding the code</h2>

<p>The translator can’t translate code it doesn’t know about. A cartridge is just bytes; nothing marks which bytes are code, where each routine starts, or what mode the processor is in when it gets there. Popular games come with a community disassembly that answers those questions. The Lion King had none.</p>

<p>The first run of the translator found <strong>24 routines</strong> and stopped. The game has well over a thousand.</p>

<p>The way out came from speedrunners. TASVideos hosts tool-assisted speedruns of this exact ROM: every button press, frame by frame, from power-on to THE END. Played back in an emulator, a speedrun is a ghost holding the controller, and it walks the game through most of its routines. Log every routine the game enters, hand the new ones to the translator, recompile, and check the result. Then do it again with the next tape.</p>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 330" width="100%" role="img" aria-label="The coverage loop: speedrun tapes drive the game in the emulator, every routine the game enters is logged, new entry points go to the translator, the game is recompiled, and the compiled build is compared frame by frame with the emulator. Each turn grew the compiled routines, from 24 to 1,305.">
  <style>
    .cv-t { fill: var(--font-color, #0e0e0b); font-size: 14px; }
    .cv-s { fill: var(--font-color, #0e0e0b); font-size: 12px; opacity: .75; }
    .cv-n { fill: var(--font-color, #0e0e0b); font-size: 22px; font-weight: bold; }
    .cv-l { stroke: var(--font-color, #0e0e0b); stroke-width: 1.5; fill: none; }
    .cv-a { fill: var(--font-color, #0e0e0b); }
    .cv-1 { fill: var(--header-h3-bg-color, #F1C40F); }
    .cv-2 { fill: var(--header-h1-bg-color, #AFD2E9); }
    .cv-3 { fill: var(--header-h4-bg-color, #D4E6B5); }
    .cv-4 { fill: var(--header-h2-bg-color, #C09FE4); }
  </style>
  <defs>
    <marker id="cv-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
      <path d="M0,0 L10,5 L0,10 z" class="cv-a" />
    </marker>
  </defs>
  <rect x="20" y="20" width="200" height="74" rx="8" class="cv-1" />
  <text x="120" y="48" text-anchor="middle" class="cv-t">Speedrun tapes</text>
  <text x="120" y="70" text-anchor="middle" class="cv-s">a ghost holding the controller</text>
  <rect x="250" y="20" width="200" height="74" rx="8" class="cv-4" />
  <text x="350" y="48" text-anchor="middle" class="cv-t">Run in the emulator</text>
  <text x="350" y="70" text-anchor="middle" class="cv-s">log every routine entered</text>
  <rect x="480" y="20" width="200" height="74" rx="8" class="cv-2" />
  <text x="580" y="48" text-anchor="middle" class="cv-t">New entry points</text>
  <text x="580" y="70" text-anchor="middle" class="cv-s">handed to the translator</text>
  <rect x="480" y="170" width="200" height="74" rx="8" class="cv-2" />
  <text x="580" y="198" text-anchor="middle" class="cv-t">Recompile</text>
  <text x="580" y="220" text-anchor="middle" class="cv-s">more of the game becomes C</text>
  <rect x="250" y="170" width="200" height="74" rx="8" class="cv-3" />
  <text x="350" y="198" text-anchor="middle" class="cv-t">Compare</text>
  <text x="350" y="220" text-anchor="middle" class="cv-s">compiled vs. emulated</text>
  <line x1="222" y1="57" x2="246" y2="57" class="cv-l" marker-end="url(#cv-arrow)" />
  <line x1="452" y1="57" x2="476" y2="57" class="cv-l" marker-end="url(#cv-arrow)" />
  <line x1="580" y1="96" x2="580" y2="166" class="cv-l" marker-end="url(#cv-arrow)" />
  <line x1="478" y1="207" x2="454" y2="207" class="cv-l" marker-end="url(#cv-arrow)" />
  <path d="M248,207 L120,207 L120,98" class="cv-l" marker-end="url(#cv-arrow)" />
  <text x="128" y="160" class="cv-s">same? next tape</text>
  <text x="20" y="290" class="cv-n">24</text>
  <text x="58" y="290" class="cv-s">routines on the first try</text>
  <text x="250" y="290" class="cv-n">1,305</text>
  <text x="318" y="290" class="cv-s">routines compiled at the end</text>
  <text x="20" y="316" class="cv-s">94.5% of the instructions a whole-game run executes now run as compiled C.</text>
</svg>

<p>The speedruns did a second job too: they became the answer key. If the compiled build plays a ten-minute speedrun to the last frame with the same memory as a reference emulator (BizHawk, bsnes core), the game is right. A single wrong instruction makes Simba miss a jump and the run falls apart.</p>

<h2 id="how-the-agents-iterated">How the agents iterated</h2>

<p>One agent session acted as coordinator. It held the plan, split the work into tasks, and handed each one to a worker agent in its own copy of the project. The tasks got letters (task C, task M, task FF) and later names (WIN, TURBO, WIDE), about forty in total. The workers were a mix of Claude, Gemini and Codex sessions.</p>

<p>Nothing was merged on a worker’s word. Every change had to pass the <strong>gates</strong>: run the game compiled and fully emulated, feed both the same button presses, and compare every frame and every byte of memory. Three speedruns, a 60,000-frame run that collects every bug in the game, and 71 hand-made input tapes, all compared every time.</p>

<p>When something differed, the routine was always the same: find the first frame that differs, then the first hardware access that differs inside that frame, then the routine that caused it. Fix it in the translator or in the emulated hardware, never with a special case for one address. Run every gate again.</p>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 430" width="100%" role="img" aria-label="The working loop: a goal is picked, a coordinator agent splits it into tasks, workers do them in their own copies, gates compare the result against the original game, the coordinator merges, and a person plays it. Anything that differs goes back to the workers.">
  <style>
    .lp-t { fill: var(--font-color, #0e0e0b); font-size: 14px; }
    .lp-s { fill: var(--font-color, #0e0e0b); font-size: 12px; opacity: .75; }
    .lp-l { stroke: var(--font-color, #0e0e0b); stroke-width: 1.5; fill: none; }
    .lp-d { stroke: var(--site-title-color, #B72D2D); stroke-width: 1.5; fill: none; stroke-dasharray: 5 4; }
    .lp-dt { fill: var(--site-title-color, #B72D2D); font-size: 12px; }
    .lp-a { fill: var(--font-color, #0e0e0b); }
    .lp-ar { fill: var(--site-title-color, #B72D2D); }
    .lp-me { fill: var(--header-h3-bg-color, #F1C40F); }
    .lp-ag { fill: var(--header-h1-bg-color, #AFD2E9); }
    .lp-ch { fill: var(--header-h4-bg-color, #D4E6B5); }
    .lp-w { fill: var(--header-h2-bg-color, #C09FE4); }
  </style>
  <defs>
    <marker id="lp-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
      <path d="M0,0 L10,5 L0,10 z" class="lp-a" />
    </marker>
    <marker id="lp-arrow-r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto">
      <path d="M0,0 L10,5 L0,10 z" class="lp-ar" />
    </marker>
  </defs>
  <rect x="20" y="20" width="200" height="74" rx="8" class="lp-me" />
  <text x="120" y="48" text-anchor="middle" class="lp-t">Start</text>
  <text x="120" y="70" text-anchor="middle" class="lp-s">pick the next goal</text>
  <rect x="480" y="20" width="200" height="74" rx="8" class="lp-ag" />
  <text x="580" y="48" text-anchor="middle" class="lp-t">Coordinator agent</text>
  <text x="580" y="70" text-anchor="middle" class="lp-s">splits it into lettered tasks</text>
  <rect x="480" y="170" width="200" height="74" rx="8" class="lp-w" />
  <text x="580" y="198" text-anchor="middle" class="lp-t">Worker agents</text>
  <text x="580" y="220" text-anchor="middle" class="lp-s">each in its own copy</text>
  <rect x="250" y="170" width="200" height="74" rx="8" class="lp-ch" />
  <text x="350" y="198" text-anchor="middle" class="lp-t">Gates</text>
  <text x="350" y="220" text-anchor="middle" class="lp-s">same frames as the original?</text>
  <rect x="20" y="170" width="200" height="74" rx="8" class="lp-ag" />
  <text x="120" y="198" text-anchor="middle" class="lp-t">Merge + rerun gates</text>
  <text x="120" y="220" text-anchor="middle" class="lp-s">by the coordinator</text>
  <rect x="20" y="320" width="200" height="74" rx="8" class="lp-me" />
  <text x="120" y="348" text-anchor="middle" class="lp-t">Play test</text>
  <text x="120" y="370" text-anchor="middle" class="lp-s">real window, controller, ears</text>
  <line x1="222" y1="57" x2="476" y2="57" class="lp-l" marker-end="url(#lp-arrow)" />
  <line x1="580" y1="96" x2="580" y2="166" class="lp-l" marker-end="url(#lp-arrow)" />
  <line x1="478" y1="207" x2="454" y2="207" class="lp-l" marker-end="url(#lp-arrow)" />
  <line x1="248" y1="207" x2="224" y2="207" class="lp-l" marker-end="url(#lp-arrow)" />
  <line x1="120" y1="246" x2="120" y2="316" class="lp-l" marker-end="url(#lp-arrow)" />
  <path d="M18,357 L4,357 L4,57 L16,57" class="lp-l" marker-end="url(#lp-arrow)" />
  <path d="M350,246 L350,290 L560,290 L560,248" class="lp-d" marker-end="url(#lp-arrow-r)" />
  <text x="356" y="308" class="lp-dt">differs: find the first different frame, fix, again</text>
  <path d="M222,357 L660,357 L660,248" class="lp-d" marker-end="url(#lp-arrow-r)" />
  <text x="440" y="378" text-anchor="middle" class="lp-dt">anything wrong on screen goes straight back</text>
</svg>

<p>The last step is a person playing it. That step caught things no gate could, as the first tries showed.</p>

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 300" width="100%" role="img" aria-label="Timeline, October 11 to 21: levels decoded and first recompile on the 11th; boots, black window and playable on the 12th; speedruns in sync and the repo on the 13th; practice mode and Dixie Kong on the 14th; shaders and menu on the 17th; releases for three systems on the 18th; widescreen from the 19th to the 21st">
  <style>
    .tl-t { fill: var(--font-color, #0e0e0b); font-size: 12px; }
    .tl-d { fill: var(--font-color, #0e0e0b); font-size: 12px; font-weight: bold; }
    .tl-l { stroke: var(--font-color, #0e0e0b); stroke-width: 2; }
    .tl-k { stroke: var(--font-color, #0e0e0b); stroke-width: 1; opacity: .4; }
    .tl-on { fill: var(--header-h3-bg-color, #F1C40F); stroke: var(--font-color, #0e0e0b); stroke-width: 1.5; }
    .tl-rel { fill: var(--header-h4-bg-color, #D4E6B5); stroke: var(--font-color, #0e0e0b); stroke-width: 1.5; }
  </style>
  <line x1="30" y1="150" x2="670" y2="150" class="tl-l" />
  <circle cx="40" cy="150" r="8" class="tl-on" />
  <text x="40" y="175" text-anchor="middle" class="tl-d">11</text>
  <line x1="40" y1="140" x2="40" y2="70" class="tl-k" />
  <text x="34" y="30" class="tl-t">levels decoded</text>
  <text x="34" y="46" class="tl-t">first recompile:</text>
  <text x="34" y="62" class="tl-t">24 functions, stuck</text>
  <circle cx="118.8" cy="150" r="8" class="tl-on" />
  <text x="118.8" y="175" text-anchor="middle" class="tl-d">12</text>
  <line x1="118.8" y1="185" x2="118.8" y2="215" class="tl-k" />
  <text x="112.8" y="232" class="tl-t">agents swarm</text>
  <text x="112.8" y="248" class="tl-t">black window</text>
  <text x="112.8" y="264" class="tl-t">first playable build</text>
  <circle cx="197.5" cy="150" r="8" class="tl-on" />
  <text x="197.5" y="175" text-anchor="middle" class="tl-d">13</text>
  <line x1="197.5" y1="140" x2="197.5" y2="110" class="tl-k" />
  <text x="191.5" y="86" class="tl-t">speedruns in sync</text>
  <text x="191.5" y="102" class="tl-t">the repo exists</text>
  <circle cx="276.2" cy="150" r="8" class="tl-on" />
  <text x="276.2" y="175" text-anchor="middle" class="tl-d">14</text>
  <line x1="276.2" y1="185" x2="276.2" y2="275" class="tl-k" />
  <text x="270.2" y="288" class="tl-t">practice mode &#xB7; Dixie Kong</text>
  <circle cx="355" cy="150" r="8" class="tl-on" />
  <text x="355" y="175" text-anchor="middle" class="tl-d">17</text>
  <line x1="355" y1="140" x2="355" y2="70" class="tl-k" />
  <text x="349" y="46" class="tl-t">shaders, turbo,</text>
  <text x="349" y="62" class="tl-t">settings menu</text>
  <circle cx="433.8" cy="150" r="9" class="tl-rel" />
  <text x="433.8" y="175" text-anchor="middle" class="tl-d">18</text>
  <line x1="433.8" y1="185" x2="433.8" y2="215" class="tl-k" />
  <text x="427.8" y="232" class="tl-t">intro song fixed</text>
  <text x="427.8" y="248" class="tl-t">v0.1.0: Linux,</text>
  <text x="427.8" y="264" class="tl-t">Windows, Mac</text>
  <circle cx="512.5" cy="150" r="8" class="tl-on" />
  <circle cx="591.2" cy="150" r="9" class="tl-rel" />
  <circle cx="670" cy="150" r="9" class="tl-rel" />
  <text x="512.5" y="175" text-anchor="middle" class="tl-d">19</text>
  <text x="591.2" y="175" text-anchor="middle" class="tl-d">20</text>
  <text x="670" y="175" text-anchor="middle" class="tl-d">21</text>
  <line x1="512.5" y1="140" x2="512.5" y2="110" class="tl-k" />
  <text x="506.5" y="86" class="tl-t">widescreen,</text>
  <text x="506.5" y="102" class="tl-t">v0.3.0, v0.3.1</text>
</svg>

<h2 id="the-first-tries">The first tries</h2>

<p>Before recompiling anything, the agent learned how the game stores its levels by reading the raw cartridge bytes: a custom compression format, a map of 16x16 cells, a table of blocks, tiles and palettes. The first proof it understood something was this: Pride Lands, drawn straight from the ROM’s data with no emulator involved. No background yet, but the rocks are where they belong.</p>

<p><img src="/assets/images/posts/tlkrecomp/first-map.png" alt="Pride Lands rendered from the ROM data alone, foreground only, on a plain cream background" />
<em>Day one: the first level, decoded from the cartridge.</em></p>

<p>It tried the same with character sprites, assembling them from the ROM without the game’s help. Some came out right. Some didn’t.</p>

<p><img src="/assets/images/posts/tlkrecomp/first-sprites.png" alt="Rows of sprites from the ROM: hyena, Scar, Timon, ostrich, gorilla and vulture, each correct on top and oddly assembled below" />
<em>Top row: right. Bottom row: the same characters, assembled wrong.</em></p>

<p>The first pictures from compiled code were worse. A few hand-written hints about how certain routines start were wrong, and one wrong guess early in the boot scrambles everything after it. The middle frame is the emulator; the sides are the compiled build.</p>

<p><img src="/assets/images/posts/tlkrecomp/first-garbled.png" alt="Three frames side by side: a garbled mess of orange tiles, the correct first level with young Simba, and a field of green noise" />
<em>Compiled, emulated, compiled.</em></p>

<p>Then the compiled build matched the emulator: same frames, same memory, every gate green. The first real launch showed a black window.</p>

<p><img src="/assets/images/posts/tlkrecomp/first-black-window.png" alt="On the left a black rectangle, on the right the Lion King title screen with START and OPTIONS" />
<em>What the window showed, and what the tests saw.</em></p>

<p>The tests read the picture from memory, and the picture in memory was perfect. The window drew every pixel fully transparent. It was a small fix, and minutes later the game was playable with sound. From then on, no change counted as done until someone had looked at the real window.</p>

<p>A few more surprises along the way:</p>

<ul>
  <li><strong>An interrupt arrived 34 clock ticks late.</strong> Invisible on screen, but enough to shift a lag frame, and enough for a speedrun to drift out of sync thousands of frames later.</li>
  <li><strong>A blue sky after drowning</strong> in <em>I Just Can’t Wait to Be King</em> looked like a bug. The agent replayed the same death in BizHawk frame by frame: the original game does it too.</li>
  <li><strong>A missing part of the intro song.</strong> Every gate passed, because the compiled and emulated builds were wrong in exactly the same way. A listen against a reference recording found a long held note being cut short: the emulated sound chip forgot to reset a “note finished” flag, so the game’s music code reused that note’s channel early. One small patch to the emulated chip.</li>
</ul>

<h2 id="the-features">The features</h2>

<p>Once the game ran, each feature started as one short request and went through the same loop:</p>

<ul>
  <li><strong>The whole game</strong>, start to finish, bonus stages included, keyboard or gamepad.</li>
  <li><strong>Checked against real emulation</strong>: three published speedruns and the All Bugs run play back in sync, memory checked against BizHawk.</li>
  <li><strong>A settings menu in the game</strong> (Tab or Esc), shared with other recomp projects.</li>
  <li><strong>Shaders</strong>: CRT, LCD grid, sharpen, composite. 8:7, 4:3 or square pixels.</li>
  <li><strong>Practice mode</strong> for speedrunners: level timer, splits, lag counter, input display, one-key restart.</li>
  <li><strong>Level select</strong> with the debug menu’s invulnerability.</li>
  <li><strong>Save states</strong>, and a <strong>turbo</strong> key that runs the game up to 16x.</li>
  <li><strong>Widescreen</strong> (experimental): scenery, parallax and enemies keep going past the original edges.</li>
  <li><strong>Releases</strong> for Linux (AppImage), Windows (one .exe) and Mac (.dmg).</li>
</ul>

<p><img src="/assets/images/posts/tlkrecomp/feature-gallery.png" alt="Six scenes from the game: the ostrich ride, the stampede, Hakuna Matata, Simba's Destiny, Be Prepared and the fight with Scar" /></p>

<p><img src="/assets/images/posts/tlkrecomp/feature-menu.png" alt="The settings menu drawn over the game, Display section selected" />
<em>The settings menu.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/feature-practice.png" alt="Practice mode: a level timer, TAS split and input display over Can't Wait to Be King" />
<em>Practice mode.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/feature-crt.png" alt="The stampede with the CRT shader at 4:3" />
<em>CRT shader, 4:3.</em></p>

<p>Progress is reported as a card in the colors of the game’s HUD, and every number on it names the command that measured it.</p>

<p><img src="/assets/images/posts/tlkrecomp/feature-status.png" alt="Status card in the colors of the game's HUD: routines compiled 100%, game code run compiled 94.5%, functions found 93.9%, speedruns in sync 100%" /></p>

<h2 id="showcase">Showcase</h2>

<p>All from the recompiled build. Widescreen first. The game only knows about a 256-pixel-wide screen; the extra picture comes from the level data it already keeps in memory.</p>

<p><video poster="/assets/images/posts/tlkrecomp/widescreen-levels-poster.jpg" controls="" autoplay="" loop="" muted="" playsinline="" width="100%" aria-label="Each level of the game in turn, starting in the original 4:3 picture and opening up to 16:9 widescreen"><source src="/assets/images/posts/tlkrecomp/widescreen-levels.mp4" type="video/mp4" /><source src="/assets/images/posts/tlkrecomp/widescreen-levels.webm" type="video/webm" /></video>
<em>Every level, opening up from the original 4:3 to 16:9. Unmute for the music.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/wide-pridelands.png" alt="Pride Lands in widescreen: Simba on the grass under the rocks" />
<em>The Pride Lands, 16:9.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/wide-king.png" alt="Can't Wait to Be King in widescreen: Simba leaping under a hanging monkey above the river, giraffe heads below" />
<em>I Just Can’t Wait to Be King.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/feature-widescreen.png" alt="The Elephant Graveyard in widescreen with hyenas coming from beyond the original screen" />
<em>The Elephant Graveyard. Those hyenas used to be off-screen.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/wide-hakuna.png" alt="Hakuna Matata in widescreen: Simba swinging from a vine between waterfalls" />
<em>Hakuna Matata.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/wide-prepared.png" alt="Be Prepared in widescreen: adult Simba on a ledge between lava falls" />
<em>Be Prepared.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/wide-return.png" alt="Simba's Return in widescreen: Simba leaping through a stone arch" />
<em>Simba’s Return.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/wide-bughunt.png" alt="Bug Hunt bonus stage in widescreen, Timon in the trees with bugs around him" />
<em>Bug Hunt III.</em></p>

<p>From the cartridge itself: the game has a hidden developer menu that fans documented years ago, and the retail cartridge still calls itself version .99.</p>

<p><img src="/assets/images/posts/tlkrecomp/debug-menu.png" alt="The hidden debug menu over the title screen: CPU and PPU versions, INVUL OFF, LEVEL THE ELEPHANT GRAVEYARD, VERSION .99" />
<em>The debug menu. Version .99.</em></p>

<p>A whole level, laid out from the data the way no one sees it while playing:</p>

<p><img src="/assets/images/posts/tlkrecomp/map-hakuna.png" alt="The full Hakuna Matata map: layers of jungle platforms around a tall waterfall" />
<em>Hakuna Matata, all of it.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/stampede.png" alt="Six frames from the stampede sequence, the herd coming at the camera" />
<em>The Stampede.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/bonus-bug-hunt.png" alt="A Bug Hunt bonus stage: Timon in the trees, bugs everywhere" />
<em>Timon’s bonus stage.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/journey.png" alt="A contact sheet of the whole game: logos, title screen, every level, and THE END" />
<em>The whole journey, boot to THE END.</em></p>

<h2 id="the-donkey-kong-mashup">The Donkey Kong mashup</h2>

<p>The project started with a different idea: Donkey Kong characters in The Lion King. A finished recomp of Donkey Kong Country 3 already existed (<a href="https://github.com/elliotttate/DKC3Recomp">DKC3Recomp</a>), so once both games were C code on the same toolkit, the two could borrow from each other.</p>

<p>Three agents worked on it in parallel, each on its own branch:</p>

<ul>
  <li><strong>Kongs in The Lion King.</strong> Dixie or Kiddy Kong replaces Simba. Their graphics are read straight from the DKC3 cartridge, drawn into Simba’s spot in video memory with their own colors, and put back after each frame is drawn.</li>
  <li><strong>Simba in DKC3.</strong> The reverse: adult Simba stands in for Dixie, cub Simba for Kiddy, inside Donkey Kong Country 3.</li>
  <li><strong>DKC3’s music in The Lion King.</strong> A second sound chip plays the Donkey Kong soundtrack while The Lion King keeps its own sound effects.</li>
</ul>

<p>One rule held for all three: the skin is paint, nothing more. With the option on, the game’s memory stays byte for byte the same as with it off. Only the picture or the sound changes, so the gates still apply and the speedruns still finish.</p>

<p><img src="/assets/images/posts/tlkrecomp/mashup-dixie.png" alt="Two frames of the Pride Lands: on the left Simba leaps toward the rocks, on the right Dixie Kong in the same spot" />
<em>Same frame, two skins: Simba and Dixie Kong.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/mashup-kiddy.png" alt="Kiddy Kong hanging from a vine under the SIMBA'S DESTINY title, in the night jungle" />
<em>Kiddy Kong in Simba’s Destiny.</em></p>

<p><img src="/assets/images/posts/tlkrecomp/mashup-simba-dkc3.png" alt="Three pairs from DKC3's demo, Kongs on the left and Simba on the right: in the mill, in the forest next to a barrel, and hanging from a rope over water" />
<em>The other way round: Simba in Donkey Kong Country 3. The Kongs on the left, Simba on the right.</em></p>

<p>It’s rough. The game still runs the Kongs, so Simba moves with their physics and their hitboxes, and poses DKC3 has but The Lion King doesn’t (rolling, swimming, getting hurt) fall back to standing still. On the rope, adult Simba hangs like a stretched rug. All three live on branches, not in the release.</p>

<h2 id="thanks">Thanks</h2>

<p>To the speedrunners EZGames69, SBDWolf, Akiteru and ShgofcTAS: your runs were the map and the answer key. Your names are in the README next to your runs. And to <a href="https://tasvideos.org">TASVideos</a>, which publishes those runs under <a href="https://creativecommons.org/licenses/by/2.0/">CC BY 2.0</a>.</p>

<p>To <a href="https://github.com/TASEmulators/BizHawk">BizHawk</a> and its bsnes core, the reference every byte was checked against.</p>

<p>To <a href="https://github.com/RetroPortingToolKit/snesrecomp">snesrecomp</a>, and to its author, <a href="https://github.com/mstan">Matthew Stanley</a>, for the advice and for welcoming me to the community. And to the ports that showed the way: <a href="https://github.com/elliotttate/DKC3Recomp">DKC3Recomp</a> by <a href="https://github.com/elliotttate">elliotttate</a> and <a href="https://github.com/mstan/MegaManXSNESRecomp">MegaManXSNESRecomp</a>.</p>

<p>And to my family, for their patience with glitchy builds and gameplay videos recorded on my phone.</p>

<p>The code is at <a href="https://github.com/kinduff/TLKRecomp">github.com/kinduff/TLKRecomp</a>, and downloads are on the <a href="https://github.com/kinduff/TLKRecomp/releases/latest">releases page</a>. Bring your own cartridge: the repository holds no ROM and no game data, and the project is never sold. snesrecomp’s license allows noncommercial use only.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2026/10/15/the-pink-elephant-in-your-prompt/</id>
      <title type="html">The Pink Elephant in Your Prompt</title>
      <link href="https://kinduff.com/2026/10/15/the-pink-elephant-in-your-prompt/" rel="alternate" type="text/html" />
      <published>2026-10-15T00:00:00+00:00</published>
      <updated>2026-10-15T00:00:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Telling an agent to ignore your code still puts that code in charge.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<blockquote>
  <p><strong>Cross-posted.</strong> This post was first published on the <a href="https://bonsai.io/blog/pink-elephant-in-your-prompt/">Bonsai blog</a>.</p>
</blockquote>

<p>I’ve been playing with this idea in my head that we can get better results if we blind our agent to certain things.</p>

<p>You know the drill. You already have something and you want a fresh take on it, so you paste the old one in and write “don’t base it on this”. But to disregard the existing result, the agent needs to know about the existing result, which defeats the purpose of the ask. It’s the old pink elephant problem: tell someone not to think of a pink elephant, and now that’s all they can think about.</p>

<p>I wanted proof, at least for agents, so I ran 720 trials against Claude Haiku 5.5 and Claude Sonnet 5.5.</p>

<h2 id="the-experiment">The experiment</h2>

<p>I asked for the same thing every time: a Python <code class="language-plaintext highlighter-rouge">RateLimiter</code> class with an <code class="language-plaintext highlighter-rouge">allow(key)</code> method. There are about five standard ways to build one, so it’s easy to count what the model picked. With no existing code in the prompt, both models go for the same one, a sliding window log, 88% of the time. That’s its usual answer.</p>

<p>Then I put an existing <code class="language-plaintext highlighter-rouge">throttle.py</code> in front of the task and changed one sentence at a time. Sometimes the existing code was a weak fixed window counter. Sometimes it was the model’s own usual answer. The question every time: did it still give its usual answer?</p>

<h2 id="dont-makes-the-old-code-the-reference-point">“Don’t” makes the old code the reference point</h2>

<iframe class="bya-chart" src="/assets/images/posts/pink-elephant/charts.html#dont" title="Shown a weak existing file, how often Claude still gave its usual answer" loading="lazy" scrolling="no" style="width:100%;height:330px;border:0;display:block;overflow:hidden;"></iframe>

<p>Showing the weak file and asking for something new barely changed anything, 75% to 88% of runs still gave the usual answer. Adding “don’t base it on this” dropped that to 25%. Most of those runs switched to a token bucket, an algorithm that never showed up when the models had no code to look at.</p>

<p>None of them copied the old code. They went looking for whatever looked least like it. The old file decided the answer, just in reverse.</p>

<h2 id="show-it-its-own-first-choice-and-it-walks-away">Show it its own first choice and it walks away</h2>

<p>This is the case that worried me, because it’s the common one: you ask for a fresh take on something you’re already happy with. The closest stand-in I had: make the existing file the model’s own usual answer.</p>

<iframe class="bya-chart" src="/assets/images/posts/pink-elephant/charts.html#good" title="Shown its own usual answer as existing code, how often Claude kept it" loading="lazy" scrolling="no" style="width:100%;height:330px;border:0;display:block;overflow:hidden;"></iframe>

<p>Just putting the file in the prompt, with the same plain task, dropped the usual answer to 37%. “Write a new one” took it to 13%, and “don’t” to 5%. Sonnet picked a token bucket in all 30 runs.</p>

<p>My guess, which I didn’t test, is that when you show a model working code and ask for the same thing, it assumes you want something else. Which is a reasonable thing to assume when a person asks you.</p>

<h2 id="blind-doesnt-mean-original">Blind doesn’t mean original</h2>

<p>This one surprised me. My plan was to remove the old solution and get novel ideas. What I got was the model’s usual answer, over and over. Haiku picked the exact same algorithm in 30 out of 30 blind runs.</p>

<p>So I asked it to “consider three substantially different rate limiting algorithms” first. All 60 runs listed the same three:</p>

<iframe class="bya-chart" src="/assets/images/posts/pink-elephant/charts.html#options" title="Algorithms Claude listed when asked to consider three different ones" loading="lazy" scrolling="no" style="width:100%;height:380px;border:0;display:block;overflow:hidden;"></iframe>

<p>Asking for options gets you the textbook options. Anything outside the textbook probably has to come from outside the prompt: a different framing, a different model, or a person with a weird idea.</p>

<h2 id="blind-first-constrain-second">Blind first, constrain second</h2>

<p>So what about the opposite order? Generate first, then apply the real constraints. Both models had to write a drop-in replacement for the existing class, same name and same methods.</p>

<iframe class="bya-chart" src="/assets/images/posts/pink-elephant/charts.html#upgrade" title="How often Claude patched up the old fixed window instead of replacing it" loading="lazy" scrolling="no" style="width:100%;height:400px;border:0;display:block;overflow:hidden;"></iframe>

<p>Starting from one of their blind designs, 60 out of 60 kept the blind idea and adapted it to fit. Starting from the old code, Haiku mostly upgraded the old code: its most common pick, 19 of 30, was a sliding window counter, which is a fixed window with a patch on top. Sonnet’s picks were spread out, so I can’t say the same for it.</p>

<h2 id="what-didnt-work">What didn’t work</h2>

<p>I expected agents to anchor on code they find on their own while exploring a repo. They didn’t, at least here.</p>

<iframe class="bya-chart" src="/assets/images/posts/pink-elephant/charts.html#agent" title="Agents with the old file sitting in the repo" loading="lazy" scrolling="no" style="width:100%;height:380px;border:0;display:block;overflow:hidden;"></iframe>

<p>Haiku opened the old file in 29 of 30 runs and wrote its usual answer every time. Sonnet never even looked. But I planted the weak file and told the agent exactly where to write, so this test was too easy to pass. A fair version is the next experiment.</p>

<h2 id="what-i-do-now">What I do now</h2>

<ul>
  <li>When I want options, I take the existing solution out of the context. Describing it and asking the agent to ignore it does the opposite of what the sentence says.</li>
  <li>I get variety from outside the model: a different framing, a different model, or seeds from people.</li>
  <li>I apply the constraints, the interface, the AWS account, the existing data, as a separate step on top of those options.</li>
</ul>

<p>Context still matters. An answer that ignores your constraints is useless. What changes is the order: come up with options with the old solution out of the room, then narrow down with everything you know.</p>

<h2 id="are-we-doing-this-to-ourselves">Are we doing this to ourselves?</h2>

<p>This whole experiment felt familiar. If you’re building a product, or pivoting one, the product you already have is always in the room. Nobody decides to only make incremental changes. The existing thing just becomes the frame for every idea.</p>

<p>So are our solutions biased because we keep telling our own LLM brains “let’s do something new with this”?</p>

<p>Look at the prompts again. Every planning session starts with the product on the table. That’s the “nothing, just the task” bar, where the prompt only asked for a rate limiter and the model still moved off its usual answer. Then we say “let’s do something new with this”, or “let’s not just iterate on what we have”. Those are the “write a new one” and “don’t” prompts, almost word for word, and they made the answer react to the existing code instead of starting from the problem. A pivot is the same prompt at company scale: the whole point is to move away from what you have, which keeps it at the center of every conversation. And when the first requirement is “it has to fit what we already have”, Haiku mostly patched up the old thing.</p>

<p>People aren’t language models, and nothing here measures people. But if our heads work anything like this, the fix looks the same. Start from the problem with the product out of the room. Bring in ideas from people outside the team, because a team that just sets the product aside will still come up with the obvious answers. Only then check what fits. If we constrain too fast, we lose the good stuff, and with it the possibility to outgrow ourselves.</p>

<h2 id="how-i-ran-it">How I ran it</h2>

<ul>
  <li>720 runs through headless Claude Code in bare mode (<code class="language-plaintext highlighter-rouge">claude -p --bare</code>), 30 per prompt and model, with no settings, hooks, skills, MCP servers, <code class="language-plaintext highlighter-rouge">CLAUDE.md</code> or organization instructions.</li>
  <li>Each answer labeled its own algorithm in a docstring line, which I checked against the code with regexes (719 of 720 matched).</li>
  <li>I measured whether the answer changed, not whether it got better or worse. A token bucket is a fine rate limiter.</li>
  <li>One task, two models, default temperature. Big gaps like 88% against 25% hold up. I wouldn’t read anything into a few percentage points.</li>
  <li>About $7.60 in total, as reported by the CLI.</li>
</ul>

<h2 id="related-research">Related research</h2>

<ul>
  <li><a href="https://arxiv.org/abs/2412.06593">Anchoring Bias in Large Language Models</a> (Lou, 2024): telling GPT-4 models to ignore an anchor in the prompt is “not sufficient”.</li>
  <li><a href="https://arxiv.org/abs/2402.07896">Suppressing Pink Elephants with Direct Principle Feedback</a> (Castricato et al., 2024): getting a model to avoid a topic on request took fine-tuning, prompting alone did worse.</li>
  <li>Anthropic’s <a href="https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices">prompting best practices</a>: “Tell Claude what to do instead of what not to do.”</li>
</ul>

<p>Have you seen this with your own agents? I’m especially curious if anyone has a reliable way to get options that aren’t the textbook three.</p>

<p><em>Thanks to <a href="https://bonsai.io/authors/luis-cesar/">Luis</a> and <a href="https://bonsai.io/authors/bradford-fults/">Bradford</a> for pushing my creativity during work hours.</em></p>

<script>
(function () {
  window.addEventListener('message', function (e) {
    if (!e.data || e.data.type !<mark> 'bya-chart-height') return;
    document.querySelectorAll('iframe.bya-chart').forEach(function (f) {
      if (e.source </mark> f.contentWindow) f.style.height = e.data.height + 'px';
    });
  });
})();
</script>

]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2026/09/25/active-search-meet-bonsai/</id>
      <title type="html">Active Search, Meet Bonsai</title>
      <link href="https://kinduff.com/2026/09/25/active-search-meet-bonsai/" rel="alternate" type="text/html" />
      <published>2026-09-25T00:00:00+00:00</published>
      <updated>2026-09-25T00:00:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Running Rails' new search framework on Bonsai.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<blockquote>
  <p><strong>Cross-posted.</strong> This post was first published on the <a href="https://bonsai.io/blog/active-search-ruby-on-rails-bonsai/">Bonsai blog</a>.</p>
</blockquote>

<p><a href="https://rubyonrails.org">Ruby on Rails</a> has a search framework of its own now. At <a href="https://rubyonrails.org/world">Rails World 2026</a>, Donal McBreen from <a href="https://37signals.com">37signals</a>, the company behind <a href="https://basecamp.com">Basecamp</a> and Rails itself, introduced <a href="https://github.com/basecamp/rails-active_search">Active Search</a>. It gives you one chainable, <a href="https://guides.rubyonrails.org/active_record_basics.html">Active Record</a> style interface for full-text search across <a href="https://opensearch.org">OpenSearch</a>, <a href="https://www.elastic.co/elasticsearch">Elasticsearch</a>, Solr, Meilisearch, Typesense and friends, as well as the full-text search built into PostgreSQL, MySQL and SQLite.</p>

<p>If you’ve written search in Rails before, you know the drill: pick a gem, learn its DSL, marry it forever. Active Search changes that. Start on your database today, move to a managed search cluster when your app outgrows it, and your models and controllers stay the same. It’s alpha software (<a href="https://rubygems.org/gems/rails-active_search"><code class="language-plaintext highlighter-rouge">0.1.0</code> on RubyGems</a> as I write this), but it already runs against OpenSearch, which means it runs against Bonsai.</p>

<h2 id="active-search-vs-searchkick-and-chewy">Active Search vs Searchkick and Chewy</h2>

<p><a href="https://bonsai.io/docs/connecting/ruby-on-rails-searchkick/">Searchkick</a> and <a href="https://bonsai.io/docs/connecting/ruby-on-rails-chewy/">Chewy</a> are built for Elasticsearch and OpenSearch, and expose a lot of what those engines can do (we <a href="https://bonsai.io/blog/comparison-of-elasticsearch-ruby-gems/">compared the Ruby gems</a> a while back). Active Search is a common interface instead, the way Active Record is for databases, so the same <code class="language-plaintext highlighter-rouge">Article.search("rails")</code> works on SQLite in development and OpenSearch in production. The trade-off: no aggregations, nested documents or autocomplete yet. If you need those today, Searchkick is still a great fit.</p>

<h2 id="step-1-add-active-search-to-your-rails-app">Step 1: Add Active Search to your Rails app</h2>

<p>Active Search doesn’t bundle a search client. Bonsai clusters run OpenSearch, so bring <a href="https://github.com/opensearch-project/opensearch-ruby"><code class="language-plaintext highlighter-rouge">opensearch-ruby</code></a>:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Gemfile</span>
<span class="n">gem</span> <span class="s2">"rails-active_search"</span>
<span class="n">gem</span> <span class="s2">"opensearch-ruby"</span>
</code></pre></div></div>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bundle <span class="nb">install
</span>bin/rails active_search:install
</code></pre></div></div>

<blockquote>
  <p><strong>Running Elasticsearch instead of OpenSearch?</strong> Use <code class="language-plaintext highlighter-rouge">adapter: elasticsearch</code> with the official client pinned to 7.13. Starting with 7.14, <a href="https://bonsai.io/docs/connecting/ruby-on-rails-searchkick/">the gem refuses to talk to open-source Elasticsearch 7.x</a>:</p>

  <div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">gem</span> <span class="s2">"elasticsearch"</span><span class="p">,</span> <span class="s2">"7.13.3"</span>
</code></pre></div>  </div>
</blockquote>

<h2 id="step-2-connect-active-search-to-your-bonsai-cluster">Step 2: Connect Active Search to your Bonsai cluster</h2>

<p>Grab your cluster URL from the <a href="https://bonsai.io/docs/features/credential-management/">Access</a> section of your cluster dashboard. <a href="https://bonsai.io/docs/heroku/add-bonsai-to-your-heroku-app/">Heroku users</a> already have it in <code class="language-plaintext highlighter-rouge">BONSAI_URL</code>.</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># config/search.yml</span>
<span class="na">development</span><span class="pi">:</span>
  <span class="na">adapter</span><span class="pi">:</span> <span class="s">sqlite</span>

<span class="na">production</span><span class="pi">:</span>
  <span class="na">adapter</span><span class="pi">:</span> <span class="s">opensearch</span>
  <span class="na">hosts</span><span class="pi">:</span>
    <span class="pi">-</span> <span class="s">&lt;%= ENV["BONSAI_URL"] %&gt;</span>
</code></pre></div></div>

<p>The client reads the host, port and credentials straight out of the URL (our <a href="https://bonsai.io/docs/connecting/ruby-on-rails-active-search/">Active Search docs</a> cover the full setup). Development runs on SQLite, production runs on Bonsai, and your app doesn’t know the difference.</p>

<h2 id="step-3-define-a-search-index-and-connect-your-model">Step 3: Define a search index and connect your model</h2>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># config/search.rb</span>
<span class="no">ActiveSearch</span><span class="p">.</span><span class="nf">define_index</span><span class="p">(</span><span class="ss">:articles</span><span class="p">)</span> <span class="k">do</span>
  <span class="n">text</span> <span class="ss">:title</span>
  <span class="n">text</span> <span class="ss">:body</span>
  <span class="n">string</span> <span class="ss">:status</span>
<span class="k">end</span>
</code></pre></div></div>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># app/models/article.rb</span>
<span class="k">class</span> <span class="nc">Article</span> <span class="o">&lt;</span> <span class="no">ApplicationRecord</span>
  <span class="n">has_search</span>
<span class="k">end</span>
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">text</code> fields are searched, the rest are for filtering and sorting. <code class="language-plaintext highlighter-rouge">has_search</code> adds callbacks that reindex a record on every save and remove it on destroy, through <a href="https://guides.rubyonrails.org/active_job_basics.html">Active Job</a>.</p>

<h2 id="step-4-create-the-index-and-load-your-data">Step 4: Create the index and load your data</h2>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>bin/rails active_search:index:create <span class="nv">INDEX</span><span class="o">=</span>articles
</code></pre></div></div>

<p>The callbacks only fire on new writes, so batch your existing records in from a console:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">ActiveSearch</span><span class="p">.</span><span class="nf">index</span><span class="p">(</span><span class="ss">:articles</span><span class="p">).</span><span class="nf">batch</span><span class="p">(</span><span class="ss">max_size: </span><span class="mi">500</span><span class="p">)</span> <span class="k">do</span> <span class="o">|</span><span class="n">batch</span><span class="o">|</span>
  <span class="no">Article</span><span class="p">.</span><span class="nf">find_each</span> <span class="p">{</span> <span class="o">|</span><span class="n">article</span><span class="o">|</span> <span class="n">batch</span><span class="p">.</span><span class="nf">add</span><span class="p">(</span><span class="n">article</span><span class="p">)</span> <span class="p">}</span>
<span class="k">end</span>
</code></pre></div></div>

<h2 id="step-5-search-from-your-rails-controller">Step 5: Search from your Rails controller</h2>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># app/controllers/articles_controller.rb</span>
<span class="k">def</span> <span class="nf">index</span>
  <span class="vi">@page</span> <span class="o">=</span> <span class="no">Article</span><span class="p">.</span><span class="nf">search</span><span class="p">(</span><span class="n">params</span><span class="p">[</span><span class="ss">:q</span><span class="p">])</span>
    <span class="p">.</span><span class="nf">filter</span><span class="p">(</span><span class="ss">status: </span><span class="s2">"published"</span><span class="p">)</span>
    <span class="p">.</span><span class="nf">page</span><span class="p">(</span><span class="n">params</span><span class="p">[</span><span class="ss">:page</span><span class="p">],</span> <span class="ss">per_page: </span><span class="mi">20</span><span class="p">)</span>
<span class="k">end</span>
</code></pre></div></div>

<p>It chains like the Active Record queries you already write, and pagination is built in. Loop over <code class="language-plaintext highlighter-rouge">@page.results</code> in your view and each result is the record itself.</p>

<h2 id="see-what-your-rails-search-is-doing-in-the-bonsai-dashboard">See what your Rails search is doing in the Bonsai dashboard</h2>

<p>Active Search writes the queries for you. That’s the whole point, but it’s also why it’s worth having somewhere to see them land.</p>

<h3 id="documents-did-the-load-actually-work">Documents: did the load actually work?</h3>

<p>Run <code class="language-plaintext highlighter-rouge">bin/rails active_search:status COUNT=1</code>, then compare it with the Usage panel on your cluster’s Overview:</p>

<p><img src="/assets/images/posts/active-search/usage-component.png" alt="Usage panel showing document, data and shard counts" /></p>

<p>If your database says 5,000 articles and Bonsai says 5K docs, you’re done. If not, you know before your users do.</p>

<h3 id="performance-your-traffic-at-a-glance">Performance: your traffic, at a glance</h3>

<p><img src="/assets/images/posts/active-search/performance-heatmap.png" alt="Performance heat map" /></p>

<p>Each column in the <a href="https://bonsai.io/docs/features/cluster-overview/">Overview</a> heat map is a slice of time, each row a bucket of request duration, and hotter colors mean more requests. A cool, tight band at the bottom? Happy cluster. Heat creeping upward right after a deploy? You just found your slow query, and you know exactly when it started.</p>

<h3 id="query-logs-what-your-users-are-really-asking">Query Logs: what your users are really asking</h3>

<p><img src="/assets/images/posts/active-search/query-logs-dashboard.jpg" alt="Query Logs panel on the cluster overview" /></p>

<p><a href="https://bonsai.io/docs/features/query-logs/">Query Logs</a> ranks the search terms your users type by volume, with duration and hit count for each. High volume with low hits is a relevancy problem, and zero-hit queries are the first thing to fix. To tell Bonsai exactly what the user typed, add it to the request with <code class="language-plaintext highlighter-rouge">native</code>:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="no">Article</span><span class="p">.</span><span class="nf">search</span><span class="p">(</span><span class="n">params</span><span class="p">[</span><span class="ss">:q</span><span class="p">]).</span><span class="nf">native</span> <span class="p">{</span> <span class="o">|</span><span class="n">request</span><span class="o">|</span>
  <span class="n">request</span><span class="p">.</span><span class="nf">merge</span><span class="p">(</span><span class="ss">ext: </span><span class="p">{</span> <span class="ss">bonsai: </span><span class="p">{</span> <span class="ss">user_query: </span><span class="n">params</span><span class="p">[</span><span class="ss">:q</span><span class="p">]</span> <span class="p">}</span> <span class="p">})</span>
<span class="p">}.</span><span class="nf">page</span><span class="p">(</span><span class="n">params</span><span class="p">[</span><span class="ss">:page</span><span class="p">])</span>
</code></pre></div></div>

<h3 id="the-console-talk-to-your-cluster-directly">The Console: talk to your cluster directly</h3>

<p><img src="/assets/images/posts/active-search/bonsai-console.png" alt="Bonsai Console running the Active Search query" /></p>

<p>Want to see what Active Search is sending? <code class="language-plaintext highlighter-rouge">Article.search("hotwire").to_native_query</code> returns the request body. Paste it into the <a href="https://bonsai.io/docs/features/console/">Console</a> as a <code class="language-plaintext highlighter-rouge">POST</code> to <code class="language-plaintext highlighter-rouge">/articles/_search</code> and tweak it until the results look right. No curl, no credentials on your clipboard.</p>

<h2 id="why-active-search-and-bonsai-work-well-together">Why Active Search and Bonsai work well together</h2>

<p>Active Search makes the engine swappable. Bonsai makes the engine visible. Together you get Rails-native search code and a cluster you can actually see into, without running a single node yourself.</p>

<p>Spin up a free <a href="https://app.bonsai.io/signup?utm_source=bonsai-static&amp;utm_campaign=%2Fblog%2Factive-search-ruby-on-rails-bonsai%2F">Sandbox cluster</a>, add the gem, and watch your first queries light up the heat map. The <a href="https://github.com/basecamp/rails-active_search#readme">Active Search README</a> covers everything this post skipped, and we’d love to hear how you’re using it at <a href="mailto:support@bonsai.io">support@bonsai.io</a>.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2026/09/10/can-you-proof-read-this-post/</id>
      <title type="html">Can you proof read this post?</title>
      <link href="https://kinduff.com/2026/09/10/can-you-proof-read-this-post/" rel="alternate" type="text/html" />
      <published>2026-09-10T05:53:00+00:00</published>
      <updated>2026-09-10T05:53:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Writing in this era is difficult.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>First post of the year. Sigh. Writing in this era is difficult. If you know me in person enough or you’ve been around the web with me, you would know that I love to write. I’ve done it since I was little. Little notes. Little phrases. Structured sentences. I love to rap. I love the beats of course, but I love how word sounds can synchronize with a rhythm while riding a beat of its own. But I’ve seen all my relatives, friends, people I admire, people that I like and people that I don’t like write less. Or write with AI. And I admit I do the same. My latest posts from last year were proofread by AI. I used to use Grammarly sometimes. I used to send my friends my posts. I used to thank them for reading me. Today it’s hard to convey value through sentences because sentences became cheap. My words became cheap even though I think they have value. And nowadays you can find people that still write and still read. But they changed. We all did. This short form of sentences I am writing are either bad english grammer or just me accustomed to writing short sentences. I haven’t found the right place to start a new paragraph. But anyways, let’s force that now. I will try to write more. This little rant was supposed to be the introduction to a post about a reflection between social clusters within a city and a small town, number of NPCs that populate them, and how product releases should feel on the internet: instead of being strays, they could replicate the social behaviours that already exist offline. Anyways, catch y’all later. PS: Claude said: <em>“Paragraph breaks you said you couldn’t find. Natural ones: after ‘riding a beat of its own.’ and after ‘We all did.’ Third at ‘But anyways, let’s force that now.’ already does the work.”</em></p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2026/09/04/claude-code-release-pulse/</id>
      <title type="html">Claude Code Release Pulse</title>
      <link href="https://kinduff.com/2026/09/04/claude-code-release-pulse/" rel="alternate" type="text/html" />
      <published>2026-09-04T00:00:00+00:00</published>
      <updated>2026-09-04T00:00:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            I graphed 385 releases of Claude Code's changelog.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<blockquote>
  <p><strong>Cross-posted.</strong> This post was first published on the <a href="https://bonsai.io/blog/claude-code-pulse/">Bonsai blog</a>.</p>
</blockquote>

<p>I was checking out <a href="https://code.claude.com/docs/en/changelog">Claude Code’s changelog</a> because of this change:</p>

<blockquote>
  <p>Added a diff panel that opens beside the conversation in fullscreen mode and shows your uncommitted changes as Claude edits; toggle it with <code class="language-plaintext highlighter-rouge">/diff</code>.</p>
</blockquote>

<p>But then I started scrolling and checking the amount and the dates, and had the urge to graph this. And so I did. Every release on that page, from <code class="language-plaintext highlighter-rouge">0.2.21</code> on April 2nd 2025 to <code class="language-plaintext highlighter-rouge">2.1.260</code> on September 3rd 2026. That’s 385 versions and 5,132 bullets. Then I inspected the data and classified their lines by the verb they start with:</p>

<iframe id="ccp-pulse" src="/assets/images/posts/claude-code-pulse/pulse.html" title="Claude Code Release Pulse — interactive charts of the changelog" loading="lazy" scrolling="no" style="width:100%;height:1600px;border:0;display:block;overflow:hidden;"></iframe>

<script>
(function () {
  var f = document.getElementById('ccp-pulse');
  window.addEventListener('message', function (e) {
    if (f && e.source <mark> f.contentWindow && e.data && e.data.type </mark> 'ccp-pulse-height') {
      f.style.height = e.data.height + 'px';
    }
  });
})();
</script>

<p>I think it tells a very interesting story about the Claude Code team. They are closed source, so this is our only visibility.</p>

<ul>
  <li>The volume grew a lot. April 2025 was 56 bullets across 27 versions. August 2026 was 735 across 28. Same amount of releases, thirteen times the content.</li>
  <li>Their allocation is mostly fixes now, and it wasn’t always. In July 2025, 41% of the bullets started with “added”. By mid 2026 that’s between 6% and 10%, while “fixed” hasn’t gone under 56% since February.</li>
  <li>They ship on 258 days out of the eighteen months, and only 6 of those are Sundays. Saturdays get 27.</li>
  <li>They are very consistent, and that consistency is the part I keep looking at. The releases per month barely move while the content inside them goes up thirteen times. Claude Code is built with Claude Code, so a good chunk of this is agents doing the work and a human pressing the button.</li>
</ul>

<p>Two things to keep in mind if you go poking at the graphs. April 2nd 2025 has 17 releases in one day, which is the changelog being seeded and not a real day of work. And the “Other” bucket isn’t a category, it’s my classifier giving up on bullets that don’t start with added, fixed or improved. I’d love to say those are the human written ones, but I can’t check that from out here.</p>

<p>What else do you think these graphs tell us?</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2025/11/30/the-doorman/</id>
      <title type="html">The Doorman</title>
      <link href="https://kinduff.com/2025/11/30/the-doorman/" rel="alternate" type="text/html" />
      <published>2025-11-30T20:30:00+00:00</published>
      <updated>2025-11-30T20:30:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Carding the CEO is the ultimate unit test.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>I don’t remember where I heard this story, but it stuck in my mind to this day. It goes something like this:</p>

<blockquote>
  <p>A doorman is guarding the entrance of a very important corporate building. He lets people in and out based on their badges.</p>

  <p>One day, the owner of the company arrives. As she approaches the door, the doorman asks for her ID.</p>

  <p>The owner’s secretary says, “Don’t you know who she is? Let her in!”</p>

  <p>The owner of the company hands him her ID, and he lets her in.</p>

  <p>The doorman’s boss was baffled and said he would reprimand the doorman.</p>

  <p>However, the owner of the building stopped the boss and asked him to promote the doorman instead.</p>

  <p>When the boss asked why, she said, “He did his job exactly as he should.”</p>
</blockquote>

<p>I like this little story because sometimes we forget what our actual job is. When you and your peers have clear expectations regarding your roles, no action taken to fulfill those roles should come as a surprise.</p>

<p>We get paid to execute tasks and transform the time we invest into “proof of work.”</p>

<p>It doesn’t matter what you do for a living; you will produce something. It could be a set of documents, code, or even maintaining specific metrics.</p>

<p>The secret, as mentioned before, is having clear expectations. Without these, your job becomes like a plastic bag in the wind, lacking true goals or proof of work.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2025/08/30/the-piano-melody/</id>
      <title type="html">The Piano Melody</title>
      <link href="https://kinduff.com/2025/08/30/the-piano-melody/" rel="alternate" type="text/html" />
      <published>2025-08-30T05:37:00+00:00</published>
      <updated>2025-08-30T05:37:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Spent hours trying to identify my neighbor's piano song through apps.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>I was staying at my mom’s house for the first time since she recently moved. I was surprised to learn that the neighbor played the piano. I could hear her play every other day in the afternoon.</p>

<p>One day, I was working from the kitchen, the part of the house closest to where she plays the piano, when I heard the song.</p>

<p>Oh, this song.</p>

<p>It had some kind of mysterious rhythm, some kind of march. Then a playful melody that jumped around, only to become very serious, trying to say a lot of things at the same time. Then it had a calm approach to reintroduce the melody, while increasingly becoming louder, with more strength. To march again.</p>

<p>This captivated me so much that I jumped from the table and tried to record it with my phone. I couldn’t hear a thing when playing it back. The clock was ticking because I knew the song was about to end. So I grabbed a glass and held it against the wall like they did in the cartoons, and it worked.</p>

<p>I had the recording. So I jumped to the laptop and opened it in Audacity. I increased the volume and tried to Shazam it.</p>

<p>Nothing.</p>

<p>I moved some levels, making it sound better.</p>

<p>Nothing.</p>

<p>I tried a bunch of services online. Trimmed the clip a bunch of times.</p>

<p>Nothing.</p>

<p>Sidenote: I didn’t try to convert it to MIDI and then search for the pattern. It could work, but I don’t know.</p>

<p>Anyway, I also sent it to a couple of friends (thanks y’all), but no dice.</p>

<p>Then it hit me. I was trying to solve this problem using technology. All my efforts were done on the laptop. So I got up from the chair and asked my mom to send her a message asking for the song name—and SoundCloud! Just kidding. Asking her what song she was playing.</p>

<p>She was grateful for the message and told us it made her day. She is a very sweet grandma and she was feeling down.</p>

<p>From that day, she would give us concerts. Only a couple of songs, but she would play at night around 10 PM—something that she didn’t do before. She would play a set and she would play it well.</p>

<p>A couple of weeks later I came back to visit. And today, she played at 10 PM again. Mom told me she hadn’t played at this time since I left.</p>

<p>And she played the song I loved first, followed by new pieces that I really liked. I have no idea how to play the piano, but I just love it. Gonna sign up for lessons soon.</p>

<p>PS: Here is the song.</p>

<div class="youtube-container"><iframe src="https://www.youtube.com/embed/p6WgblaynQg" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe></div>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2025/05/28/when-ai-sells-you-what-you-want/</id>
      <title type="html">When AI Sells You What You Want</title>
      <link href="https://kinduff.com/2025/05/28/when-ai-sells-you-what-you-want/" rel="alternate" type="text/html" />
      <published>2025-05-28T03:37:00+00:00</published>
      <updated>2025-05-28T03:37:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Any product you can think of, Crafty can build.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>Posts that could be tweets, but you’re already here, so let’s begin.</p>

<p>Imagine you go to an Amazon-like shop where you can buy whatever you want, through prompts instead of search. Vendors, instead of selling their products, sell their craft. Let’s call it <strong>“Crafty”</strong> for now.</p>

<p>The user prompts for the product they’re looking for, and Crafty’s AI creates instructions for the vendors about how and what to build, then handles the delivery.</p>

<p>Any product you can think of, Crafty can build. For example, the user writes in the search bar:</p>

<blockquote>
  <p>Universal remote that controls my TV, sound bar, and Philips Hue lights, with a small OLED screen showing what device I’m controlling, matte black finish, and only the 8 buttons I actually use</p>
</blockquote>

<p><img src="/assets/images/posts/20250527212506.jpg" alt="Crafty AI Example" /></p>

<p>A vendor that specializes in electronics will receive this job (I can see a bidding system in place). The Crafty AI will include all the designs, 3D models, instructions, schematics, etc. needed to build this, and it will also handle the delivery.</p>

<p>You could even extend the idea to a network of crafters or shops with a supply chain system. Not ideal for shipping time, though.</p>

<p>Imagine sending this to multiple vendors where each produces their part. One prints the 3D shell in the color you chose. Another crafts a green board and adds the little squares, etc.</p>

<p>The user receives the item in parts with assembly instructions.</p>

<p>Or maybe Crafty wants to increase profits and starts teaching people how cool it is to print at home. It makes “Thing Printers” accessible to the public so people can create anything, even control remotes.</p>

<p>Crafty will optimize the network and allow Thing Printers to be interconnected to minimize delivery times on your favorite products.</p>

<p>But without going too far, and just sticking to the first part of the idea, we can see how simple buying things could be, especially for products that can be built in a straightforward way.</p>

<p>The recommendation systems will change too: instead of pushing the products they sell, companies will push the products they can build. Instead of recommending similar products, they’ll recommend variants and customizations.</p>

<p>Anyway, I’m pretty sure a company like this will pop up eventually, and it will be interesting to see the new economies this will bring. AI will rule, but humans will enjoy it.</p>

<p>Back to code. Thanks for reading.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2025/05/22/question-driven-development/</id>
      <title type="html">Question Driven Development</title>
      <link href="https://kinduff.com/2025/05/22/question-driven-development/" rel="alternate" type="text/html" />
      <published>2025-05-22T01:31:00+00:00</published>
      <updated>2025-05-22T01:31:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            A reflection on the importance of asking the right questions in software development.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>I have this memory from when I was a kid of asking the following question during a biology presentation about the human body and its parts: <mark>"Why do we die when our blood stops moving?"</mark></p>

<p>Everybody laughed. I felt shame. But I also didn’t get an answer from my mocking peers because they couldn’t understand it either, but didn’t want to accept it. Today, years later, I understand why but don’t fully grasp it. I’m not a biologist or anything similar.</p>

<p>What my teacher said to me and the group after I asked that question is what I remembered a minute ago: <mark>"There are no stupid questions, only stupid people who don't ask."</mark> And she proceeded to explain why.</p>

<p>I like to ask questions before and after implementing a feature to make them complete and avoid having to implement those when something goes wrong. We usually do this when coding by using our brains and interpreting and predicting how the data will flow in a script, a method, or collection of classes:</p>

<p><mark>"When this string is compared and is exactly what I'm looking for, I will call this method that returns if its valid according to these other things [...]"</mark></p>

<p>So let’s talk about that. How asking questions and documenting them can make your feature complete.</p>

<p>And yes, I just tied a personal story to an engineering article on how the idea of asking questions can be transposed across multiple areas of a feature implementation. Sue me!</p>

<p>The first thing to pay attention to when asking a question is <mark>to know to whom or what we are asking the question</mark>. The idea of just throwing an idea out of the blue seems preposterous.</p>

<p>For example, let’s play pretend and take the following task from our backlog:</p>

<blockquote>
  <p><strong>Move webhook processing to a background job</strong></p>

  <p>In our application route, we are executing and waiting inline for our service to resolve to respond to the incoming webhook. We want is to move the processing to a background job and respond to the webhook immediately with a 204.</p>
</blockquote>

<p>And here is part of the code we care about for now. If you don’t know Ruby on Rails or Ruby, I’m really sorry. You should, its really nice.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">WebhooksController</span> <span class="o">&lt;</span> <span class="no">ApplicationController</span>
  <span class="k">def</span> <span class="nf">receive</span>
    <span class="n">event_params</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="ss">:event</span><span class="p">]</span> <span class="c1"># get params</span>
    <span class="no">SweetLittleService</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">event_params</span><span class="p">).</span><span class="nf">call</span> <span class="c1"># call service</span>
    <span class="n">head</span> <span class="mi">200</span> <span class="c1"># give response</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>

<p>I can think of a couple of questions already by reading this description and seeing the code.</p>

<p>For example, to the <strong>Product Owner/Manager</strong> we can ask:</p>
<ol>
  <li>What happens if the background job fails?</li>
  <li>Do we need to track the webhook processing status?</li>
  <li>What’s the expected volume of webhooks?</li>
</ol>

<p>To the <strong>System/Architecture</strong>:</p>
<ol>
  <li>What happens if we lose the job before processing?</li>
  <li>Should the job be idempotent?</li>
  <li>What’s our error handling strategy?</li>
</ol>

<p>To the <strong>Implementation</strong>:</p>
<ol>
  <li>Why do we want to process in the background?</li>
  <li>How much time does our service take to execute?</li>
  <li>Why return a 204 HTTP code and not 200?</li>
</ol>

<p>To <strong>Ourselves</strong>:</p>
<ol>
  <li>Why do I keep working on software engineering?</li>
  <li>How much wood could a woodchuck chuck if a woodchuck could chuck wood?</li>
  <li>Did I just lost <a href="https://en.wikipedia.org/wiki/The_Game_(mind_game)">The Game</a>?</li>
</ol>

<p>With these questions in mind, we could potentially modify our controller and create our background job like this. And please, this is just an example!</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">WebhooksController</span> <span class="o">&lt;</span> <span class="no">ApplicationController</span>
  <span class="k">def</span> <span class="nf">receive</span>
    <span class="n">event_params</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="ss">:event</span><span class="p">]</span>

    <span class="c1"># Create a job with retries and error handling</span>
    <span class="no">WebhookProcessingJob</span><span class="p">.</span><span class="nf">perform_later</span><span class="p">(</span>
      <span class="n">event_params</span><span class="p">,</span>
      <span class="ss">webhook_id: </span><span class="no">SecureRandom</span><span class="p">.</span><span class="nf">uuid</span><span class="p">,</span> <span class="c1"># for idempotency</span>
      <span class="ss">received_at: </span><span class="no">Time</span><span class="p">.</span><span class="nf">current</span>
    <span class="p">)</span>

    <span class="n">head</span> <span class="mi">204</span> <span class="c1"># respond immediately</span>
  <span class="k">end</span>
<span class="k">end</span>

<span class="k">class</span> <span class="nc">WebhookProcessingJob</span> <span class="o">&lt;</span> <span class="no">ApplicationJob</span>
  <span class="n">queue_as</span> <span class="ss">:webhooks</span>
  <span class="n">retry_on</span> <span class="no">StandardError</span><span class="p">,</span> <span class="ss">wait: </span><span class="mi">5</span><span class="p">.</span><span class="nf">seconds</span><span class="p">,</span> <span class="ss">attempts: </span><span class="mi">3</span>

  <span class="k">def</span> <span class="nf">perform</span><span class="p">(</span><span class="n">event_params</span><span class="p">,</span> <span class="n">webhook_id</span><span class="p">:,</span> <span class="n">received_at</span><span class="p">:)</span>
    <span class="c1"># Check if we already processed this webhook</span>
    <span class="k">return</span> <span class="k">if</span> <span class="no">WebhookLog</span><span class="p">.</span><span class="nf">exists?</span><span class="p">(</span><span class="ss">webhook_id: </span><span class="n">webhook_id</span><span class="p">,</span> <span class="ss">status: </span><span class="s1">'completed'</span><span class="p">)</span>

    <span class="no">WebhookLog</span><span class="p">.</span><span class="nf">create!</span><span class="p">(</span>
      <span class="ss">webhook_id: </span><span class="n">webhook_id</span><span class="p">,</span>
      <span class="ss">status: </span><span class="s1">'processing'</span><span class="p">,</span>
      <span class="ss">received_at: </span><span class="n">received_at</span><span class="p">,</span>
      <span class="ss">event_params: </span><span class="n">event_params</span>
    <span class="p">)</span>

    <span class="k">begin</span>
      <span class="no">SweetLittleService</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">event_params</span><span class="p">).</span><span class="nf">call</span>
      <span class="no">WebhookLog</span><span class="p">.</span><span class="nf">find_by</span><span class="p">(</span><span class="ss">webhook_id: </span><span class="n">webhook_id</span><span class="p">).</span><span class="nf">update!</span><span class="p">(</span><span class="ss">status: </span><span class="s1">'completed'</span><span class="p">)</span>
    <span class="k">rescue</span> <span class="o">=&gt;</span> <span class="n">e</span>
      <span class="no">WebhookLog</span><span class="p">.</span><span class="nf">find_by</span><span class="p">(</span><span class="ss">webhook_id: </span><span class="n">webhook_id</span><span class="p">).</span><span class="nf">update!</span><span class="p">(</span>
        <span class="ss">status: </span><span class="s1">'failed'</span><span class="p">,</span>
        <span class="ss">error_message: </span><span class="n">e</span><span class="p">.</span><span class="nf">message</span>
      <span class="p">)</span>
      <span class="k">raise</span> <span class="c1"># re-raise for retry logic</span>
    <span class="k">end</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>

<p>And then we can ask more questions to the <strong>Implementation</strong>:</p>

<ol>
  <li>What if the database is down when the job runs?</li>
  <li>What if we receive malformed webhook data?</li>
  <li>What if the same webhook is sent multiple times?</li>
  <li>What if we need to replay failed webhooks?</li>
</ol>

<p><mark>Each question reveals a potential edge case that could break the feature or making the implementation break out of the scope</mark>, successfully achieving one of those eternal PRs with changes across 40 files.</p>

<p>But these questions are not only to know what we want to build, how, and their edge cases. They can also be used as an aid for our future selves or our peers in the form of code documentation. For example:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># WebhookProcessingJob</span>
<span class="c1">#</span>
<span class="c1"># Handles webhook processing in the background to avoid blocking the HTTP response.</span>
<span class="c1">#</span>
<span class="c1"># Key decisions made:</span>
<span class="c1"># - Uses unique webhook_id for idempotency (handles duplicate webhooks)</span>
<span class="c1"># - Logs processing status for debugging and monitoring</span>
<span class="c1"># - Retries failed jobs up to 3 times with exponential backoff</span>
<span class="c1"># - Preserves original received_at timestamp for audit purposes</span>
<span class="k">class</span> <span class="nc">WebhookProcessingJob</span> <span class="o">&lt;</span> <span class="no">ApplicationJob</span>
  <span class="c1"># ...</span>
<span class="k">end</span>
</code></pre></div></div>

<p>The best engineers I know have developed a habit of asking questions at every stage and to the stage itself (remember, to whom we are asking):</p>

<ul>
  <li>To <strong>Planning</strong>: What are we actually trying to solve here?</li>
  <li>To <strong>Design</strong>: What could go wrong with this approach?</li>
  <li>To <strong>Implementation</strong>: What assumptions am I making?</li>
  <li>To <strong>Review</strong>: What scenarios haven’t we tested?</li>
  <li>To <strong>Deployment</strong>: What will we do if this breaks?</li>
</ul>

<p>Sometimes the questions reveal uncomfortable truths about our original plan. Maybe the “simple” background job migration actually requires database migrations, monitoring setup, and error handling workflows. Maybe it’s not as straightforward as we thought.</p>

<p>But that’s okay. <mark>It's better to discover complexity early than to be surprised by it in production</mark>.</p>

<p>But there should be a balance here. <mark>Not every question needs to be answered with code</mark>. Some questions are answered with “we’ll handle that when it becomes a problem” or “that’s out of scope for this iteration.”</p>

<p><mark>The key is to ask the questions</mark>, document the decisions, and make trade-offs rather than accidentally ignoring important scenarios.</p>

<h2 id="closing-thoughts">Closing thoughts</h2>

<p>That biology question I asked as a kid wasn’t stupid, it was fundamental. Understanding how blood circulation works is crucial to understanding human life.</p>

<p>Similarly, the questions we ask about our code aren’t stupid, they’re fundamental to building robust systems. The difference between a junior and senior engineer often isn’t technical knowledge, it’s the quality and depth of questions they ask.</p>

<p>So next time you’re implementing a feature, channel your inner curious kid. Ask the obvious questions. Ask the uncomfortable questions. Ask the “what if” questions.</p>

<p>Your future self (and your on-call rotation) will thank you.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2025/04/15/the-shore/</id>
      <title type="html">The Shore</title>
      <link href="https://kinduff.com/2025/04/15/the-shore/" rel="alternate" type="text/html" />
      <published>2025-04-15T23:10:00+00:00</published>
      <updated>2025-04-15T23:10:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            A brief reflection on why I write and the intention behind my words.

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<blockquote>
  <p>I want to feel alive, create waves on the internet’s shore,</p>

  <p>I want to poke the mesh with a needle, let ripples explore,</p>

  <p>I want eternity in this light, my code to emphasize,</p>

  <p>I want to be eternal, but I know I wouldn’t realize.</p>
</blockquote>

<p>I’ve been writing for my past self for most of my life. I’ve written phrases, poems, and essays about what I have felt, experienced, and known. I write to learn, like formatted personal notes, about a topic to make it easier for me to give it structure.</p>

<p>I’ve been writing for my future self too, trying to capture what I’m currently feeling and experiencing so I can reflect in the future and realize that time has passed, that I’ve grown up, and that I have come a long way.</p>

<p>I remember when I was in my twenties, and I found some of my blog posts that I used to have in a blog called Dislexias when I was 13 years old. This was the blog I used to write everything I thought, even my darkest thoughts. When I read it, I was pretty surprised, in my opinion, I felt like I was pretty depressed, but now I felt different when I read it back.</p>

<p>This same feeling has occurred multiple times during my adulthood, since I’ve never stopped writing. I jot down small fragments in my Google Keep, I write in infinite notebooks, and on empty pieces of paper whenever I think of something. I even have multiple Obsidian vaults.</p>

<p>I want to be old and remember that everything I’ve lived has been written. It’s out there for someone else to discover in case they find it and it resonates with their thoughts.</p>

<p>Its the ultimate time travel experience: being able to communicate from the past to the future through echoes of text. Where the person reading can identify and connect with me, even when I’m gone, and simply feel more alive than before.</p>

<p>At least just for a second.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2025/03/04/enterprise-software-sales-lessons/</id>
      <title type="html">Enterprise Software Sales Lessons</title>
      <link href="https://kinduff.com/2025/03/04/enterprise-software-sales-lessons/" rel="alternate" type="text/html" />
      <published>2025-03-04T20:40:00+00:00</published>
      <updated>2025-03-04T20:40:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Some insights from my experience in sales and software development that might help you turn interactions into successful collaborations

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>Throughout my career, I worked alongside a team of highly skilled professionals to build enterprise software from scratch while also handling sales.</p>

<p>This experience refined my abilities in sales, opportunity identification, and software development, providing me with valuable perspectives and lessons learned through both successes and failures.</p>

<p>Here are some of them:</p>

<ul>
  <li>
    <p><strong><mark>A contract can be secured when you address the right points.</mark></strong> By anticipating ideas or projects from casual hallway conversations, or by identifying solvable problems, you can transform routine interactions into meaningful discussions that create genuine interest in collaboration.</p>
  </li>
  <li>
    <p><strong><mark>Secure that follow-up meeting</mark></strong>—exchange business cards, phone numbers, or whatever works. Don’t squander good ideas by discussing them prematurely. Instead, gather contact information and give it a day to settle.</p>
  </li>
  <li>
    <p><strong><mark>People respond better to tangible concepts they can visualize and modify.</mark></strong> Whether it’s a Google Docs document, a few slides with key points, or a conversation script covering essential topics, keep it straightforward and practical. During the conversations, guide it toward your idea and present it as an option, maintaining a human touch rather than a corporate approach.</p>
  </li>
  <li>
    <p><strong><mark>The goal isn't to convince clients about your unique idea,</mark></strong> make an immediate sale, or showcase your intelligence. Rather, through conversation, the idea should evolve into something they will look good with and reflect their values—a weird find. This process might lead to involvement in existing projects or the development of something entirely new.</p>
  </li>
  <li>
    <p><strong><mark>Iteration improves everything.</mark></strong> Review documents, slides, and ideas with the client, enhancing them in subsequent meetings. Two minds think better than one, and if other stakeholders need to be involved, bring them in and align them for productive discussions.</p>
  </li>
  <li>
    <p><strong><mark>The follow up and the delivery is just as important as the initial presentation.</mark></strong> Have a plan to follow up and make the delivery look as a success. They will want to experience the process again if they liked it.</p>
  </li>
</ul>

<p>That’s what I have for now. Hope they are useful to you.</p>

<p><strong>Good luck and have fun!</strong></p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2025/03/04/dont-name-your-projects/</id>
      <title type="html">Don&apos;t name your projects</title>
      <link href="https://kinduff.com/2025/03/04/dont-name-your-projects/" rel="alternate" type="text/html" />
      <published>2025-03-04T04:40:00+00:00</published>
      <updated>2025-03-04T04:40:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            I've switched to using fun, temporary code names for projects instead of domain names

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>Only the <a href="https://en.wikipedia.org/wiki/Flying_Spaghetti_Monster">FSM</a> knows how much money I’ve spent on domain names when I’m excited about an idea.</p>

<p>I must own around 10 domain names that I’ve parked, and every year I receive that pesky email from my registrar urging me to renew. That’s when I consider whether I should renew for another year or just let them go.</p>

<p>It’s always the same story. I come up with an idea that I want to develop. I think of an amazing name, and <strong>oh my goodness, the .com is available!</strong> Maybe I should buy it since I’m going to build it anyway. It’s only $10. Alright, let’s do it. Then it’s time to start the project. I quickly set up the scaffolding, but then I hit a wall. I get distracted. I stop working on it. A year goes by, and I get reminded of it.</p>

<p>I’ve also realized that when I name the project or idea ahead of time, <mark>the idea becomes entangled with the name.</mark> This doesn’t make sense at this stage because <strong>the name should adapt to the idea, not the other way around.</strong></p>

<p>Now, I’ve started using code names for my projects. Instead of jumping the gun, I use a generator until something feels right and fun. Examples include: <strong>European Toad</strong>, <strong>Quick Whale</strong>, <strong>Long Giraffe</strong>.</p>

<p>A couple of months ago, I named a project “Long Giraffe.” Once I was satisfied with the product, I then started to think about its name.</p>

<p>This approach gave me so many ideas for the name since I was finally able to adapt it to the product. I was able to research, play with options, and I even thought of creating a <a href="https://en.wikipedia.org/wiki/Recursive_acronym">Recursive Acronym</a>, which I love. I asked around to see how it sounded.</p>

<p>In the end, I found a name and I am very happy with it. I managed to name the product I created by detaching the name from the idea at the beginning.</p>

<p><strong>Ideas change. They evolve.</strong> Let them do their thing instead of chaining them to something that just sounds right.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2024/12/13/my-deleted-review-of-this-restaurant/</id>
      <title type="html">My deleted review of this restaurant</title>
      <link href="https://kinduff.com/2024/12/13/my-deleted-review-of-this-restaurant/" rel="alternate" type="text/html" />
      <published>2024-12-13T21:41:00+00:00</published>
      <updated>2024-12-13T21:41:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Guess my review didn't pass the community rules of Google Maps

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<blockquote>
  <p>Translated from Spanish. Original version is below this translation.</p>
</blockquote>

<p>⭐ 1 star</p>

<p>If you’ve had the chance to visit Retiro Park, you’ll know how beautiful the plants are. If you sit on a bench and observe one of them, you would have to wait a long time to see them grow.</p>

<p>That is the experience I’ve had at “A Mano,” where the food takes longer to arrive than watching a plant grow. In fact, the waiter had to come water the decorative pot on our table because the flowers were drying out, despite being plastic.</p>

<p>“A Mano” the food is very good, but surely the person who makes it uses only one hand (one mano), because if they used both, it would surely take less time.</p>

<p>I think they named it “A Mano” because you eat with your hand, and now that we have COVID, they don’t bring you the next dish until you use hand sanitizer. Maybe the food was already made, ready in the kitchen, but it didn’t get to us because of social distancing.</p>

<p>What honestly surprised me was the speed of the bill; when I asked for it, it took less than 15 seconds. According to my calculations and what I ordered, it cost me approximately 1 euro per minute.</p>

<p>In the end, the waiter asks if the wait was worth it. It was worth stretching before sitting for an hour and a half to finish my meal in 5 minutes. Tasty? Yes. Worth the wait? Maybe.</p>

<p>P.S. I wrote this review while waiting.</p>

<hr />

<p>⭐ 1 estrella</p>

<p>Si han tenido oportunidad de visitar el Parque de Retiro, sabrán lo bellas que son las plantas. Si se sientan en una banca, y observan una de ellas, tendrían que esperar mucho para poderlas verlas crecer.</p>

<p>Esa es la experiencia que he tenido en “A Mano”, en donde la comida tarda más en llegar que ver a una planta crecer, es más, el mesero tuvo que venir a regar la maceta decorativa de nuestra mesa, pues se estaban secando las flores, a pesar de ser de plástico.</p>

<p>“A Mano”, muy buena la comida, pero seguro el que la hace utiliza solo una mano, pues si lo hiciera con las dos, seguramente tardarían menos.</p>

<p>Yo creo que le pusieron el nombre “A Mano” porque se come con la mano, y ahora que tenemos el COVID encima, no te traen el siguente plato hasta que utilices alcohol en gel. Quizás la comida ya estaba hecha, lista en la cocina, pero no llegó a nosotros por aquello de la sana distancia.</p>

<p>Lo que me sorprendió honestamente fue la velocidad de la cuenta, pues al pedirla, no tardó ni 15 segundos. Según nuestros cálculos y lo que hemos pedido, nos costó aproximadamente 1 euro el minuto.</p>

<p>En fin, el mesero al final pregunta si valió la pena la espera. Valió la pena estirarme antes de sentarme por hora y media para acabarme la comida en 5 minutos. Rica? Si. Valió la espera? Quizás.</p>

<p>P.D. Está reseña la escribí mientras esperaba.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2024/11/19/power-to-the-power-users/</id>
      <title type="html">Power to the power users</title>
      <link href="https://kinduff.com/2024/11/19/power-to-the-power-users/" rel="alternate" type="text/html" />
      <published>2024-11-19T18:38:00+00:00</published>
      <updated>2024-11-19T18:38:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            How the creative uses of data structures by power users are transforming and inspiring new features in my product

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>Things I love to see in my product include how certain users make use of the data structures, forms, tables, etc., to perform actions that aren’t originally possible within the product itself.</p>

<p>For example, imagine I have a data structure for categories, where there is a table of categories and a form to create a new category. These categories can be associated with products, where a product belongs to a category, and a category can have many products. This data structure can also be used for other purposes, such as saving the physical location of a store’s products.</p>

<p>I have multiple users who have used certain features of my product to do something else entirely, with its own layers of complexity.</p>

<p>When this type of innovative use occurs, I usually proceed as follows:</p>

<ol>
  <li><strong>Assess</strong> whether a feature is worth implementing, such as taking the workflow and turning it into a feature with its own menu entry.</li>
  <li><strong>Contact</strong> the user to thank them for their innovation and let them know that I am considering adjustments to accommodate it.</li>
  <li><strong>Acknowledge</strong> myself for <em>“catching the feature”</em> for a sweet dopamine boost.</li>
</ol>

<blockquote>
  <p>“ACA,” ergo “acá,” means “here” in Spanish, and I think that’s beautiful.</p>
</blockquote>

<p>I’ve noticed that when I consider these features:</p>

<ul>
  <li>The rest of my users will benefit from this change or feature. It enables me to provide direct value.</li>
  <li>The user who provided the feedback will feel like a part of the product because they indeed are.</li>
  <li>It reinforces my belief that staying in contact with users is beneficial.</li>
</ul>

<p>Although I don’t have many users right now, I feel like I’m building something alongside them. On the other hand, they understand that I’m building a product for them, but also include them in the process.</p>

<p>This is crucial, as we are often not considered in the products that we use. Even if there is community involvement — a trend I’ve seen many companies adopt — there’s often too much noise to reach clear decisions.</p>

<p>While I’m aware that maintaining direct contact and influence with all clients may become challenging as the product grows, I’m also optimistic that I will find a way to make the user always feel considered and heard.</p>

<h2 id="an-up-to-date-example">An Up-to-Date Example</h2>

<p>I published the link to this post on my <a href="https://bsky.app/profile/did:plc:jmy2qsr3sq3l6m3i4levwxuq/post/3lbdy5lntjc2x">Bluesky account</a> and subsequently discovered another interesting post in my feed.</p>

<p><img src="/assets/images/posts/blueskypoweruser.jpg" alt="A Bluesky post illustrating how to use the report feature to send messages through the application" />
<em><a href="https://bsky.app/profile/deadpoolian.bsky.social/post/3lb65cduwm224">Source at bsky.app</a></em></p>

<p>This Bluesky post walks through a method for implementing bookmarks in Bluesky - a feature that, at the time of writing, is not officially supported.</p>

<p>The account, which acts as a moderator, creates a list for a user based on the reports received. This list compiles the posts that the user has “bookmarked” in one location.</p>

<p>This innovation happened because the fastest way for a user to send a post to another user is, surprisingly, by reporting it to their account, rather than mentioning them in a reply (which can be considered spam) or copying the link and sending it via direct message.</p>

<p>This is a very good example of what to watch for from a power user.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2024/01/27/a-unified-front-for-your-team/</id>
      <title type="html">A unified front for your team</title>
      <link href="https://kinduff.com/2024/01/27/a-unified-front-for-your-team/" rel="alternate" type="text/html" />
      <published>2024-01-27T18:38:00+00:00</published>
      <updated>2024-01-27T18:38:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            The impact of a unified team in customer interactions

          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>Imagine you’re on the hunt for a new sweater and decide to visit a local clothing store. Upon arrival, you engage with Tom, an enthusiastic new employee who began working there last week. You inquire about the sweater selection, and he’s eager to help, providing prompt responses.</p>

<p>As this unfolds, Clarice, the store owner, approaches. With genuine concern, she inquires if everything is okay. You affirm that it is, expressing interest in a sweater that Tom has recommended.</p>

<p>There’s a subtle change in her attitude as she questions Tom’s recommendation. A mild debate ensues between them, revealing that Tom might lack proper training, but also highlighting Clarice’s own deficiencies in organization and communication skills.</p>

<p>Now, let’s reimagine this scenario. When Clarice joins in and realizes that Tom has provided some incorrect information, she smoothly rectifies the situation with grace. “I apologize for the oversight,” she says. “Tom is one of our newest team members and he’s adapting well. Perhaps this alternative sweater might suit your tastes?”</p>

<p>This approach leaves you with a positive impression—instead of sensing tension, you observe Clarice’s empathetic leadership, keeping the focus squarely on your needs.</p>

<p>When such moments are handled skillfully, it doesn’t go unnoticed. We all recognize when there’s a breakdown in organization and communication.</p>

<p>The same principle applies to meetings with clients or other businesses. Your team should present a unified front. By steering clear of public disputes, condescending corrections, or any semblance of disarray, you ensure that stakeholders concentrate on what truly matters, rather than getting distracted by your team dynamics.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2024/01/12/humble-leadership-for-team-success/</id>
      <title type="html">Humble Leadership for Team Success</title>
      <link href="https://kinduff.com/2024/01/12/humble-leadership-for-team-success/" rel="alternate" type="text/html" />
      <published>2024-01-12T11:42:00+00:00</published>
      <updated>2024-01-12T11:42:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Consequences of ego-driven management and the benefits of adopting a more self-reflective approach
          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>Professionals often ascend or get promoted into new roles, from junior positions to intermediate roles, or even into leadership or management positions.</p>

<p>In the past, I’ve been promoted multiple times. Surprisingly, despite being considered a good coder, I always end up in leadership or management positions.</p>

<p>During my early experiences as a manager, I made mistakes and became more cautious. Human nature is fascinating; there is this feeling of repeating past errors or stress that pushed me against things I didn’t like or thought were a waste of time.</p>

<p>I would be dismissive, radical, and even irrational, despite contrary advice. I was convinced I would prove my point sooner rather than later.</p>

<p>I constantly questioned existing processes, meetings, and work methodologies. Over time, I developed my own approach by combining what I learned with industry standards.</p>

<p>Communication is the most important skill in both life and business for success. Clear communication is required to get your point across, regardless of how you view others.</p>

<p>At our job, we are expected to provide proof of our work, as it demonstrates that we are fulfilling the role for which we were hired.</p>

<p>When I tried to lead without previous training and with an inflated ego, I found myself mired in chaos of my own creation. My experience was lacking, my proof of work was not clear, and talking my way out was no longer an option.</p>

<p>Mentorship and feedback can guide you, but ultimately, it’s your own effort that matters. If you find yourself repeatedly resisting feedback, try reflecting on why you directly dismiss it rather than attempting to accept and develop from constructive criticism.</p>

<p>As a manager, your primary proof of work lies in ensuring your team performs effectively. You’re responsible for the team’s well-being, the quality of their work, and how your team is perceived by the rest of the company.</p>

<p>Being able to answer questions about both work scope and team progress is crucial. You cannot act as a boss all the time; you must also be a peer, as your team is your ally and you are part of it.</p>

<p>Both employees and managers have different proofs of work and value, but they both depend on each other to be successful. Clear expectations, timely delegation, involving the team in decision-making, and trusting them are all essential components to being successful.</p>

<p>Constant learning, seeking inspiration from other managers or peers, addressing team concerns, distinguishing between jokes and serious matters, and building trust can go a long way in fostering loyalty. After all, loyalty cannot be assumed simply because someone is being paid.</p>

<p>If this text resonates with you, I advise slowing down, taking a step back, and seeking help, feedback, or advice. Identify your proof of work, align expectations with your manager and team, organize yourself, so that your team too, and last but not least delegate tasks you can’t do and let them go.</p>

<p>Ego-driven management kills teams and even entire companies. Embrace your ignorance, question everything, understand the reasons and results, and ask yourself why things exist as they do. Without processes or meetings, something may be lost—even if it seems insignificant, it can come back to haunt you in the long run.</p>

<p>If you think there’s nothing to improve upon or that you’ve mastered management, my advice remains the same: take a step back and strive for improvement.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2023/10/03/the-10-001-magic-number/</id>
      <title type="html">The 10_001 magic number</title>
      <link href="https://kinduff.com/2023/10/03/the-10-001-magic-number/" rel="alternate" type="text/html" />
      <published>2023-10-03T11:43:00+00:00</published>
      <updated>2023-10-03T11:43:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            Unraveling the story behind a magic number in code
          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>Read this line of code today:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">redirect_to</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="ss">alert: </span><span class="s2">"CSV is too big, please use maximum 10_000 lines per import"</span><span class="p">)</span>
<span class="o">&amp;&amp;</span> <span class="k">return</span> <span class="k">if</span> <span class="no">File</span><span class="p">.</span><span class="nf">open</span><span class="p">(</span><span class="n">file</span><span class="p">).</span><span class="nf">readlines</span><span class="p">.</span><span class="nf">size</span> <span class="o">&gt;</span> <span class="mi">10_001</span>
</code></pre></div></div>

<p>I spotted the <code class="language-plaintext highlighter-rouge">10_001</code> magic number and it grabbed my attention. I wondered why this number and not the one stated in the error message. It sure seems like a mistake. If you really want that constraint, then you would use <code class="language-plaintext highlighter-rouge">&gt; 10_000</code>, otherwise the user will be allowed to upload <code class="language-plaintext highlighter-rouge">10_001</code> lines.</p>

<p>Wait a minute! That’s taking the header into consideration. So if the system only allows <code class="language-plaintext highlighter-rouge">10_000</code> rows of data, it should also allow the header.</p>

<p>This is good UX for the user because this magic number should not be taken into consideration. I’m pretty sure there was a conversation about this.</p>

<ul>
  <li><strong>(dev)</strong> Oops, the server crashed.</li>
  <li><strong>(usr)</strong> Hey Dev, the website isn’t working.</li>
  <li><strong>(dev)</strong> Yes, hold on a minute. Were you using the import feature?</li>
  <li><strong>(usr)</strong> Yeah.</li>
  <li><strong>(dev)</strong> Okay. For now, the server cannot tolerate processing more than <code class="language-plaintext highlighter-rouge">10_000</code> records; please split the files.</li>
  <li><strong>(usr)</strong> Hey, there’s an error when I try to upload the file.</li>
  <li><strong>(dev)</strong> (Dev pushes a fix, adding the <code class="language-plaintext highlighter-rouge">10_001</code> magic number). Okay, try now.</li>
  <li><strong>(usr)</strong> It works, thanks!</li>
</ul>

<p>Behind the code, there are conversations. Either direct conversations about modifications that needed to be made and pastafarize the code—since it’s on the edge of the conventions and abstractions—or hidden fixes to provide a better user experience. I think this is one of the latter.</p>

<p>This is why I love reading legacy code (not really, but bear with me) because behind every line of code, there’s an echo of a conversation that happened via chat, video, or in person, and tells a story. The depth behind the simple <code class="language-plaintext highlighter-rouge">10_001</code> magic number.</p>

<p>PS: Please use comments instead of triggering me to write a blog post and daydream about why numbers tell stories.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2023/08/14/the-double-it-and-pass-it-on-license/</id>
      <title type="html">The Double It and Pass It On License</title>
      <link href="https://kinduff.com/2023/08/14/the-double-it-and-pass-it-on-license/" rel="alternate" type="text/html" />
      <published>2023-08-14T00:00:00+00:00</published>
      <updated>2023-08-14T00:00:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            The Double It and Pass It On License (DIPOL), Version 1.0
          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>The Double It and Pass It On License (DIPOL), Version 1.0

Copyright (c) [Year] [Full Name]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

1. Upon distribution or sublicensing of the Software, the recipient must be given the option to either:
  a) Accept the Software as is, OR
  b) Double the number of features the Software has and pass the enhanced version on to another recipient.
2. If the user chooses to double the features and pass it on, they must also provide the new recipients with the same two options detailed above.
3. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
</code></pre></div></div>

<style>
  pre {
    white-space: pre-wrap;
  }
</style>

]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2023/08/02/lonely-nights-are-coding-nights/</id>
      <title type="html">Lonely nights are coding nights</title>
      <link href="https://kinduff.com/2023/08/02/lonely-nights-are-coding-nights/" rel="alternate" type="text/html" />
      <published>2023-08-02T00:00:00+00:00</published>
      <updated>2023-08-02T00:00:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            An ode to lonely nights and coding nights.
          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>In that balance where all feels just right, when the PC is kind, and posture’s in sight,</p>

<p>Where keyboard and hand unite with the brain, as eyes meet the screen, thoughts coded as gain.</p>

<p>The mood feels so calm, the chair has your back, weather is gentle, sound settles intact,</p>

<p>With music or stillness, wind’s soft embrace, the mind answers call, ready to race.</p>

<p>Yet soon comes the need - an itch, a request, for food or a break, a message no less,</p>

<p>You fall from the zone, longing to return, to find that sweet balance, once more to discern.</p>
]]>
      </content>
    </entry>
  
    <entry>
      <id>https://kinduff.com/2023/07/07/startup-friday/</id>
      <title type="html">Startup Friday</title>
      <link href="https://kinduff.com/2023/07/07/startup-friday/" rel="alternate" type="text/html" />
      <published>2023-07-07T00:00:00+00:00</published>
      <updated>2023-07-07T00:00:00+00:00</updated>

      
      <summary type="html">
        <![CDATA[
          
            A couple of years ago, I came up with this concept and have tried to keep it in mind at all times.
          
        ]]>
      </summary>
      

      <content type="html">
        <![CDATA[<p>A couple of years ago, I came up with this concept and have tried to keep it in mind at all times; I’ve introduced it to a few companies I’ve been involved with, and it’s been well-received.</p>

<p>The idea for this practice was born when I developed <a href="/2016/08/14/googleflog-the-parody-that-turned-great">Googleflog</a> on a Friday afternoon. Most of the projects I have under <a href="/projects">projects and experiments</a> have started in a Friday afternoon.</p>

<p>The premise is simple:</p>

<blockquote>
  <p>Use Fridays, either entirely or at least for a good couple of hours, to develop an idea, experiment, or proof of concept on any topic.</p>
</blockquote>

<p>I have been amazed by the results that this practice can yield in various areas, as it fits well with the famous <em>“Don’t push to production on Fridays”</em> rule, and it’s an excellent opportunity to diversify the week’s work.</p>

<p>The idea of creating, innovating, experimenting, or just trying can promote a creative variable in your weekly work or the work your colleagues or employees do. We dedicate little time to creative freedom, and Startup Friday can give you that time you’re looking for.</p>

<p>And you, have you set aside free time to create on a Friday?</p>

<hr />

<p>Originally posted in Spanish: <a href="/2019/11/08/viernes-de-startup/">Viernes de Startup</a>.</p>
]]>
      </content>
    </entry>
  
</feed>