<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wilhelm Maritz</title><link>https://wjmaritz.dev/</link><description>Recent content on Wilhelm Maritz</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 17 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://wjmaritz.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>The capacity check that let all nine through</title><link>https://wjmaritz.dev/posts/counted-before-the-lock/</link><pubDate>Tue, 17 Nov 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/counted-before-the-lock/</guid><description>&lt;p&gt;Nine writers hit the same limited slot in a stress run, all fired at once, and all nine got on. The capacity check ran for every one of them, and so did the lock.&lt;/p&gt;&#10;&lt;p&gt;The function does one job: take a place on something with a fixed limit. In outline:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;book&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;slot_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;check_room&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;slot_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# wrong: counts and decides before the lock&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;BEGIN IMMEDIATE&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# lock for writing from here&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;INSERT INTO booking (slot_id, user_id) VALUES (?, ?)&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;slot_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;COMMIT&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;booked&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;check_room&lt;/code&gt; counts what&amp;rsquo;s already booked, compares it to the limit and refuses if the slot is full. It sat above the lock on purpose. There was a comment saying the rules ran up front, ahead of the writes, and I get why. Up front is exactly right for a rule that only looks at the input, because a malformed number is malformed whenever you look at it. Room on the slot isn&amp;rsquo;t that kind of rule. It depends on what everyone else is doing at that moment.&lt;/p&gt;</description></item><item><title>The graphs came back, and that proved nothing</title><link>https://wjmaritz.dev/posts/graphs-came-back/</link><pubDate>Mon, 09 Nov 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/graphs-came-back/</guid><description>&lt;p&gt;On 18 October I moved Grafana and Prometheus off my ZimaBoard and onto a new VM. When it came back up, the System row drew every panel, with no &amp;ldquo;No data&amp;rdquo; anywhere. That looks like success. It&amp;rsquo;s also what you&amp;rsquo;d see if most of the history had gone missing on the way, because a graph draws what&amp;rsquo;s there and has no idea what isn&amp;rsquo;t.&lt;/p&gt;&#10;&lt;p&gt;It wasn&amp;rsquo;t much data. One tarball, 483,112,960 bytes, 78 files, about a month of metrics from a homelab. &lt;code&gt;tar&lt;/code&gt; and &lt;code&gt;scp&lt;/code&gt; would&amp;rsquo;ve moved it. Moving it was never going to be the hard part. The hard part was being able to say afterwards that what came out was what went in, and having a way back if it wasn&amp;rsquo;t.&lt;/p&gt;</description></item><item><title>The diagrams carried the argument, and screen readers got none of it</title><link>https://wjmaritz.dev/posts/screen-readers-got-none/</link><pubDate>Sun, 08 Nov 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/screen-readers-got-none/</guid><description>&lt;p&gt;Every post on this site opens with a hero image. Before this one there were 37: 34 drawn as SVG diagrams, three photographs. The diagrams aren&amp;rsquo;t decoration. &lt;a href="https://wjmaritz.dev/posts/pygame-alpha-never-faded/"&gt;The particle post&amp;rsquo;s&lt;/a&gt; hero is two rows of particles, one fading and one stubbornly white, which is the whole bug in one picture. &lt;a href="https://wjmaritz.dev/posts/hugo-mounts-static/"&gt;The mounts post&amp;rsquo;s&lt;/a&gt; hero is two folders, one drawn in dashes because Hugo had quietly stopped publishing it. I draw them so the point survives a skim.&lt;/p&gt;</description></item><item><title>My deploy ran my tests, and my tests ran my deploy</title><link>https://wjmaritz.dev/posts/deploy-ran-my-tests/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/deploy-ran-my-tests/</guid><description>&lt;p&gt;Over two days my desktop ran out of memory five times. Four of those times it took my whole terminal window, with herdr, the Hermes agent running in it, and everything else in that window. From where I sat, Hermes kept crashing. It wasn&amp;rsquo;t Hermes.&lt;/p&gt;&#10;&lt;p&gt;Every one followed the same command by a minute and a half to two minutes: a run of one test file in &lt;a href="https://wjmaritz.dev/posts/railway-request-counter/"&gt;railway-bridge&lt;/a&gt;, my exporter for Railway&amp;rsquo;s metrics. I matched the agent&amp;rsquo;s log of commands against the system journal, and nothing else ran in that window.&lt;/p&gt;</description></item><item><title>A memory limit made Grafana hammer the disk</title><link>https://wjmaritz.dev/posts/grafana-memory-limit/</link><pubDate>Sun, 18 Oct 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/grafana-memory-limit/</guid><description>&lt;p&gt;I wanted one screenshot of a new dashboard row. Taking it stalled Grafana twice, for about four to five minutes each time. Uptime Kuma checks its health endpoint once a minute, and those checks normally answer in a few milliseconds. During the stalls they took up to 37 seconds, and one gave up after 48 and marked Grafana pending. Each time it came back on its own.&lt;/p&gt;&#10;&lt;p&gt;The number I came to suspect was one I&amp;rsquo;d written the night before.&lt;/p&gt;</description></item><item><title>My NAS was doing a server's job, so I bought it a server</title><link>https://wjmaritz.dev/posts/nas-bought-a-server/</link><pubDate>Sun, 18 Oct 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/nas-bought-a-server/</guid><description>&lt;p&gt;My ZimaBoard started as a NAS. By October it was also running Immich and Paperless, Uptime Kuma, Grafana and Prometheus, a Homepage dashboard, two small metrics bridges, and a container full of AI coding agents. All of that on 7.5 GiB of RAM, with &lt;a href="https://wjmaritz.dev/posts/grafana-memory-limit/"&gt;Grafana alone needing a whole gigabyte&lt;/a&gt; of it.&lt;/p&gt;&#10;&lt;p&gt;The board was coping on average. What worried me was the agents&amp;rsquo; container. It wasn&amp;rsquo;t the steady use; it was what happens when an agent runs &lt;code&gt;npm install&lt;/code&gt; or a test suite and that spike lands on the same memory Immich and Paperless are using. So on 16 October a GMKtec K10 went onto the desk beside it, and the board went back to being mostly a NAS.&lt;/p&gt;</description></item><item><title>Railway shows my request counts but won't export them</title><link>https://wjmaritz.dev/posts/railway-request-counter/</link><pubDate>Sun, 11 Oct 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/railway-request-counter/</guid><description>&lt;p&gt;The Flask app I maintain runs on Railway, and the rest of my monitoring lives in Prometheus and Grafana on a ZimaBoard at home. Railway&amp;rsquo;s dashboard shows request counts, latency, CPU and memory, and its GraphQL API will hand you the same figures if you ask. But there&amp;rsquo;s no &lt;code&gt;/metrics&lt;/code&gt; endpoint to point Prometheus at, so the one service I most wanted on the dashboard was the one that wasn&amp;rsquo;t there.&lt;/p&gt;</description></item><item><title>A third of my request was the garbage collector</title><link>https://wjmaritz.dev/posts/garbage-collector-third/</link><pubDate>Fri, 09 Oct 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/garbage-collector-third/</guid><description>&lt;p&gt;A Flask app I maintain has a grid that can show a whole quarter on one page. On live it took 1.1 to 1.5 seconds to load, and the app logs anything over 500 ms as a slow grid, so I spent a morning on it. The obvious suspects were the obvious ones: queries, and the Python that turns rows into cells. Both were guilty. But after a first round of fixes to those, the biggest remaining cost was somewhere I&amp;rsquo;d never have looked.&lt;/p&gt;</description></item><item><title>The 03:37 alert that was never sent</title><link>https://wjmaritz.dev/posts/alert-never-sent/</link><pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/alert-never-sent/</guid><description>&lt;p&gt;At 03:35 on 20 September, the public URLs of both my Railway-hosted apps started returning 522 errors. Uptime Kuma logged &lt;code&gt;Request failed with status code 522&lt;/code&gt; for each of them within a second of each other, held them as pending for one retry, marked both down at 03:37 and saw them back at 03:38. This site, on Cloudflare Pages, never blinked.&lt;/p&gt;&#10;&lt;p&gt;&#10;&lt;a class="img-link" href="https://wjmaritz.dev/posts/alert-never-sent/outage-rows.png"&gt;&lt;img src="https://wjmaritz.dev/posts/alert-never-sent/outage-rows_hu_815ca7287f145f7b.webp" alt="Uptime Kuma’s event list: a monitor group and two monitors going down at 03:37 with status code 522, then back up at 03:38 with the keyword found, the two app names painted out" width="710" height="230" loading="lazy" decoding="async"&gt;&lt;/a&gt;&#10;&lt;em&gt;Both apps down at 03:37 and back at 03:38. Their names are painted out.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>The folder on the RAID that wasn't</title><link>https://wjmaritz.dev/posts/raid-folder-wasnt/</link><pubDate>Sun, 27 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/raid-folder-wasnt/</guid><description>&lt;p&gt;I went looking for what was slowly filling the NVMe in my ZimaBoard, and found something that mattered far more than the growth rate. The entire Immich photo library, 2,774 photos and 37 videos, was on that NVMe. One drive, no mirror. Beside it sat AnchorPoint, a RAID1 pair of 4 TB disks I&amp;rsquo;d built specifically to protect data, and none of the photos were on it.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;readlink -f /DATA/Gallery &lt;span class="c1"&gt;# /media/Dockyard/Gallery, the NVMe&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Nothing was misconfigured. The Immich app from the ZimaOS store keeps its library at &lt;code&gt;/DATA/Gallery/immich&lt;/code&gt;, and ZimaOS keeps its own partition small (17 GB, as I found out &lt;a href="https://wjmaritz.dev/posts/zimaos-update-by-hand/"&gt;updating it by hand&lt;/a&gt;) by symlinking the bulky folders under &lt;code&gt;/DATA&lt;/code&gt;, &lt;code&gt;AppData&lt;/code&gt; and &lt;code&gt;Gallery&lt;/code&gt; among them, out to the NVMe. Immich was writing through that symlink onto the unmirrored drive, and I&amp;rsquo;d never pointed it at the array.&lt;/p&gt;</description></item><item><title>Every site is monitored twice</title><link>https://wjmaritz.dev/posts/monitor-every-site-twice/</link><pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/monitor-every-site-twice/</guid><description>&lt;p&gt;I installed Uptime Kuma on my ZimaBoard to watch my sites and the homelab itself. It went on port 3002 and not its default 3001, because an AdGuard install still claims 3001 in its compose file even though it has been stopped for months.&lt;/p&gt;&#10;&lt;p&gt;The thing I nearly got wrong: every one of my domains sits behind Cloudflare. A plain HTTP check against the domain proves Cloudflare answered, not that my app is alive. A dead origin can still return a Cloudflare error page.&lt;/p&gt;</description></item><item><title>Homepage kept showing My First Group</title><link>https://wjmaritz.dev/posts/homepage-my-first-group/</link><pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/homepage-my-first-group/</guid><description>&lt;p&gt;The Homepage dashboard on &lt;a href="https://wjmaritz.dev/posts/zimaboard-raid1-rebuild/"&gt;my ZimaBoard&lt;/a&gt; had never been set up. It was still running the example config it ships with: three groups called &amp;ldquo;My First Group&amp;rdquo;, &amp;ldquo;My Second Group&amp;rdquo; and &amp;ldquo;My Third Group&amp;rdquo;, each with one placeholder service pointed at &lt;code&gt;http://localhost/&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;&#10;&lt;a class="img-link" href="https://wjmaritz.dev/posts/homepage-my-first-group/dashboard-before.png"&gt;&lt;img src="https://wjmaritz.dev/posts/homepage-my-first-group/dashboard-before_hu_571e3af709126248.webp" alt="A Homepage dashboard in its stock state, with three placeholder groups named My First Group, My Second Group and My Third Group, each holding one example service" width="1360" height="397" loading="lazy" decoding="async"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;I wrote five YAML files to replace the examples, got them onto the board, and checked the page source. It still said &amp;ldquo;My First Group&amp;rdquo;.&lt;/p&gt;</description></item><item><title>One character in /etc/shadow locked me out</title><link>https://wjmaritz.dev/posts/shadow-locked-account/</link><pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/shadow-locked-account/</guid><description>&lt;p&gt;I built a small container to run coding agents on my ZimaBoard, reachable over SSH, key-only, no root login. It is the same box from &lt;a href="https://wjmaritz.dev/posts/tailscale-login-loop/"&gt;the Tailscale login that could never finish&lt;/a&gt;. The first login was refused:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Permission denied (publickey)&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hx hx-2"&gt;&lt;h2 id="narrowing-it-down"&gt;Narrowing it down&lt;/h2&gt;&lt;a class="anchor" href="#narrowing-it-down" aria-label="Link to the section Narrowing it down"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;An &lt;code&gt;ssh -v&lt;/code&gt; trace showed my machine offering the right key and the server rejecting it, so the fault was inside the container. The sshd config was fine: &lt;code&gt;sshd -T&lt;/code&gt; confirmed &lt;code&gt;PasswordAuthentication no&lt;/code&gt;, &lt;code&gt;PermitRootLogin no&lt;/code&gt; and &lt;code&gt;AllowUsers dev&lt;/code&gt;, all as intended.&lt;/p&gt;</description></item><item><title>The Tailscale login that could never finish</title><link>https://wjmaritz.dev/posts/tailscale-login-loop/</link><pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/tailscale-login-loop/</guid><description>&lt;p&gt;&lt;code&gt;zimaboard2&lt;/code&gt; appeared in my tailnet, I approved it, and then it sat there: &lt;code&gt;offline, last seen 19m ago&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;I wanted the agent box on &lt;a href="https://wjmaritz.dev/posts/zimaboard-raid1-rebuild/"&gt;the ZimaBoard I rebuilt in January&lt;/a&gt; reachable from a laptop away from home. Tailscale rather than a forwarded port: it only carries traffic addressed to my own devices, so the rest of the LAN and every machine without it installed are untouched. No exit node, no subnet routing. I installed it on the board as a compose app with host networking, so the tailnet address reaches every port the board already publishes.&lt;/p&gt;</description></item><item><title>The ZimaOS update the updater never offered</title><link>https://wjmaritz.dev/posts/zimaos-update-by-hand/</link><pubDate>Sat, 19 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/zimaos-update-by-hand/</guid><description>&lt;p&gt;The board had been on &lt;code&gt;v1.5.4-alpha2&lt;/code&gt; since the January reinstall. An alpha, eight months old, two minor versions behind, and the first release note for 1.7.1 is a high-risk security fix in file services.&lt;/p&gt;&#10;&lt;p&gt;The built-in updater was never going to offer it. Its &lt;code&gt;release/latest&lt;/code&gt; endpoint answers &lt;code&gt;no release&lt;/code&gt;, and &lt;code&gt;release/current&lt;/code&gt; hangs for two minutes. The board reaches GitHub fine, so this is the alpha&amp;rsquo;s update checker watching a track with nothing newer on it. The documented offline route didn&amp;rsquo;t fire either: the 1.7.1 bundle sat in &lt;code&gt;/DATA/.ota/offline/&lt;/code&gt; at the correct size with its hash verified, and after ten minutes there was still no red dot in the UI.&lt;/p&gt;</description></item><item><title>The date that was yesterday until 3am</title><link>https://wjmaritz.dev/posts/utc-date-names-yesterday/</link><pubDate>Fri, 11 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/utc-date-names-yesterday/</guid><description>&lt;p&gt;This line looks harmless:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;today&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;toISOString&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;toISOString()&lt;/code&gt; gives the UTC date. I live in UTC+3, so from midnight until 03:00 every night that line names &lt;em&gt;yesterday&lt;/em&gt;, and on the first of a month it names the previous &lt;em&gt;month&lt;/em&gt;.&lt;/p&gt;&#10;&lt;p&gt;An app I maintain did it in three places: the today marker on a calendar, and a gate on the admin page that decides whether the month you&amp;rsquo;re editing is already in the past, twice. It looks like a bug nobody would ever hit, because who&amp;rsquo;s in an admin page at 2am? The people who work nights. It surfaced in the review of &lt;a href="https://wjmaritz.dev/posts/csp-without-nonces/"&gt;the change that moved the app&amp;rsquo;s scripts out of its templates&lt;/a&gt;, as an old bug in code that change had only relocated.&lt;/p&gt;</description></item><item><title>Enforcing a Content-Security-Policy without nonces</title><link>https://wjmaritz.dev/posts/csp-without-nonces/</link><pubDate>Thu, 10 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/csp-without-nonces/</guid><description>&lt;p&gt;An app I maintain kept its JavaScript inline. The main page&amp;rsquo;s template was 3,979 lines, and 3,528 of them were one &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; block. Eight other pages were the same shape, around 6,500 lines in all.&lt;/p&gt;&#10;&lt;p&gt;That rules out a strict Content-Security-Policy. A policy that blocks injected scripts has to drop &lt;code&gt;'unsafe-inline'&lt;/code&gt; from &lt;code&gt;script-src&lt;/code&gt;, and then every one of those blocks stops running. The usual answer is a nonce per request on every script tag. I didn&amp;rsquo;t build that.&lt;/p&gt;</description></item><item><title>The badge that said 21 for a count of 1</title><link>https://wjmaritz.dev/posts/badge-that-read-21/</link><pubDate>Mon, 07 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/badge-that-read-21/</guid><description>&lt;p&gt;The competition platform from &lt;a href="https://wjmaritz.dev/posts/newman-cup-case-study/"&gt;the Paul Newman Cup case study&lt;/a&gt; grew a badge this month: a small shield beside each name, with a count of the months that person has beaten the benchmark. A maroon shield, a gold number, a multiplication sign in front of it.&lt;/p&gt;&#10;&lt;p&gt;My profile, with one win to its name, showed &lt;strong&gt;21&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;div class="hx hx-2"&gt;&lt;h2 id="where-the-2-came-from"&gt;Where the 2 came from&lt;/h2&gt;&lt;a class="anchor" href="#where-the-2-came-from" aria-label="Link to the section Where the 2 came from"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;The multiplication sign was written as an HTML entity, &lt;code&gt;&amp;amp;#215;&lt;/code&gt;, and joined to the count, so the text for one win was &lt;code&gt;&amp;amp;#215;1&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>The stale Excel export was Cloudflare, not Excel</title><link>https://wjmaritz.dev/posts/cloudflare-cached-my-export/</link><pubDate>Thu, 03 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/cloudflare-cached-my-export/</guid><description>&lt;p&gt;I edited some data in an app I maintain, downloaded the Excel export again, and the file showed the state before my edit. On another machine the same download showed the current state.&lt;/p&gt;&#10;&lt;p&gt;My first suspect was the change I had made to downloads the day before, when &lt;a href="https://wjmaritz.dev/posts/safari-blob-download/"&gt;Safari refused to save a file&lt;/a&gt;. It wasn&amp;rsquo;t that. The problem predates it.&lt;/p&gt;&#10;&lt;div class="hx hx-2"&gt;&lt;h2 id="same-url-same-edge-same-file"&gt;Same URL, same edge, same file&lt;/h2&gt;&lt;a class="anchor" href="#same-url-same-edge-same-file" aria-label="Link to the section Same URL, same edge, same file"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;The app sits behind Cloudflare. None of its 17 export routes sent a &lt;code&gt;Cache-Control&lt;/code&gt; header, which I had never thought about because every one of them requires a login.&lt;/p&gt;</description></item><item><title>Safari could not download the file</title><link>https://wjmaritz.dev/posts/safari-blob-download/</link><pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/safari-blob-download/</guid><description>&lt;p&gt;A Mac user clicked Export in an app I maintain and got this instead of a spreadsheet:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;WebKitBlobResource error 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="hx hx-2"&gt;&lt;h2 id="the-pattern-that-broke"&gt;The pattern that broke&lt;/h2&gt;&lt;a class="anchor" href="#the-pattern-that-broke" aria-label="Link to the section The pattern that broke"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;The download code was the pattern you find everywhere: fetch the file, turn it into a blob, point an invisible link at it, click the link, tidy up. In outline:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-js" data-lang="js"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;download&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;blob&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kr"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;a&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;blob&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;download&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;click&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;revokeObjectURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The app had four hand-rolled copies of it.&lt;/p&gt;</description></item><item><title>The scanner that was never broken</title><link>https://wjmaritz.dev/posts/scanner-never-broken/</link><pubDate>Sun, 30 Aug 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/scanner-never-broken/</guid><description>&lt;p&gt;&lt;code&gt;pacman -Qq | grep -iE 'sane|scan'&lt;/code&gt; returned exactly one package: &lt;code&gt;hyprwayland-scanner&lt;/code&gt;, which is a Hyprland build tool and nothing to do with scanners. That was the whole diagnosis. The scan half of my HP OfficeJet Pro 8710 had never worked from this machine, I&amp;rsquo;d assumed that meant a driver I hadn&amp;rsquo;t installed, and the truth was that nothing at all had ever been installed to talk to it.&lt;/p&gt;&#10;&lt;p&gt;The printer&amp;rsquo;s side had been ready the entire time. Its IPP record advertises &lt;code&gt;Scan=T&lt;/code&gt; and &lt;code&gt;mopria-certified=1.3&lt;/code&gt;, and &lt;code&gt;http://192.168.1.3/eSCL/ScannerCapabilities&lt;/code&gt; answers 200 with eSCL 2.5, offering the flatbed, the document feeder, and duplex. It had been offering for as long as it had been on the network. Nobody was listening.&lt;/p&gt;</description></item><item><title>The 144 Hz monitor that preferred 60</title><link>https://wjmaritz.dev/posts/monitor-preferred-60/</link><pubDate>Fri, 28 Aug 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/monitor-preferred-60/</guid><description>&lt;p&gt;&lt;code&gt;hyprctl monitors&lt;/code&gt; said &lt;code&gt;2560x1440@59.95&lt;/code&gt;. &lt;code&gt;hyprctl monitors all&lt;/code&gt; listed &lt;code&gt;143.86Hz&lt;/code&gt;, &lt;code&gt;119.88Hz&lt;/code&gt; and &lt;code&gt;69.92Hz&lt;/code&gt; as available on the same output. An HP 27xq on DisplayPort, a 144 Hz panel, running at 60 because that is what it had been asked for. This is the trap I owed a post to when I wrote about &lt;a href="https://wjmaritz.dev/posts/where-the-distro-hopping-stopped/"&gt;where the distro hopping stopped&lt;/a&gt;; it turned out to have two more acts.&lt;/p&gt;&#10;&lt;p&gt;Here is the line that asked for it, as Omarchy shipped it in &lt;code&gt;~/.config/hypr/monitors.lua&lt;/code&gt;:&lt;/p&gt;</description></item><item><title>Where the distro hopping stopped</title><link>https://wjmaritz.dev/posts/where-the-distro-hopping-stopped/</link><pubDate>Mon, 24 Aug 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/where-the-distro-hopping-stopped/</guid><description>&lt;p&gt;I&amp;rsquo;ve been distro hopping for a while now. Ubuntu first, because that&amp;rsquo;s where everyone starts. Zorin when I wanted it to look nicer. CachyOS when I wanted it to go faster. And now Omarchy. Two days in - the fastfetch below still shows an OS age you can count on one finger - and I&amp;rsquo;m calling it early: this is where the hopping stops.&lt;/p&gt;&#10;&lt;p&gt;&#10;&lt;a class="img-link" href="https://wjmaritz.dev/posts/where-the-distro-hopping-stopped/hero.jpg"&gt;&lt;img src="https://wjmaritz.dev/posts/where-the-distro-hopping-stopped/hero_hu_f87afbcfe0d34e59.webp" alt="The Omarchy menu over the Forest 2 theme’s wallpaper - Apps, Learn, Trigger, Style, Setup, Install, Remove, Update, About, System" width="1360" height="765" fetchpriority="high" decoding="async"&gt;&lt;/a&gt;&#10;&lt;em&gt;Wallpaper: &lt;a href="https://store.thaomaoh.com/b/solace"&gt;Solace by thaomaoh&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>I wrote the lesson down. I broke it two days later.</title><link>https://wjmaritz.dev/posts/wrote-the-lesson-down/</link><pubDate>Wed, 05 Aug 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/wrote-the-lesson-down/</guid><description>&lt;p&gt;My competition platform keeps a lessons-learned file. On 31 July I wrote a new entry into it: fix the shape, not the instance - when a bug is a pattern, hunt down every copy instead of patching the one that got reported. On 2 August the profile page went down for every athlete with an approved entry - a handful of people at that point, which is the only reason it wasn&amp;rsquo;t worse. Same bug class I&amp;rsquo;d fixed a week earlier on the leaderboard: a &lt;code&gt;margin &amp;gt; 0&lt;/code&gt; comparison with no guard, sitting in a second hand-written copy of the same formatting logic that nobody remembered existed.&lt;/p&gt;</description></item><item><title>My GitHub recovery codes lived on GitHub</title><link>https://wjmaritz.dev/posts/recovery-codes-on-github/</link><pubDate>Sun, 02 Aug 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/recovery-codes-on-github/</guid><description>&lt;p&gt;Found &lt;code&gt;github-recovery-codes.txt&lt;/code&gt; in my vault this weekend, in a folder called Important Docs. The vault is an Obsidian setup that &lt;a href="https://wjmaritz.dev/posts/onedrive-git-vault/"&gt;auto-commits every ten minutes and pushes to a private GitHub repo&lt;/a&gt;. So the codes for getting back into GitHub were sitting behind the GitHub login.&lt;/p&gt;&#10;&lt;p&gt;Think about the day I actually need them - phone gone, authenticator gone, sessions expired. Can&amp;rsquo;t clone the repo. Can&amp;rsquo;t open the site. The codes might as well not exist.&lt;/p&gt;</description></item><item><title>OneDrive and git fought over my vault. Both lost.</title><link>https://wjmaritz.dev/posts/onedrive-git-vault/</link><pubDate>Fri, 31 Jul 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/onedrive-git-vault/</guid><description>&lt;p&gt;Over two days my Obsidian vault appeared to delete itself, git recorded 146 file deletions that never happened, and OneDrive spawned 120 conflict copies of notes I had just restored. Not one byte of a note was lost. Every failure traces back to a single sentence: two sync systems each believed they owned the same tree, and each interpreted the other&amp;rsquo;s behaviour as changes to sync.&lt;/p&gt;&#10;&lt;p&gt;I have written this shape of post before. &lt;a href="https://wjmaritz.dev/posts/zimaboard-raid1-rebuild/"&gt;RAID1 saved my data but not the state around it&lt;/a&gt;, and &lt;a href="https://wjmaritz.dev/posts/sqlite-trap-epilogue/"&gt;a trap I had published a warning about caught my own app the same day&lt;/a&gt;. This one belongs to both families: the data was never in danger, the state lied about it, and the limit that made it all worse was documented in a workbook I had read and dismissed as something that happens to other people.&lt;/p&gt;</description></item><item><title>Case study: the Paul Newman Cup</title><link>https://wjmaritz.dev/posts/newman-cup-case-study/</link><pubDate>Fri, 24 Jul 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/newman-cup-case-study/</guid><description>&lt;p&gt;The Paul Newman Cup is an annual inter-team fitness and sports competition, and this app is the platform that runs it: scoring, verification, standings, and administration. It is small, deliberately so, and it is in production with over a hundred members. This page is the whole story in one place: what problem it solves, how it is built, what I decided and why, what I planned for going wrong, and what actually did.&lt;/p&gt;</description></item><item><title>Hugo's module.mounts quietly replaced my static directory</title><link>https://wjmaritz.dev/posts/hugo-mounts-static/</link><pubDate>Thu, 23 Jul 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/hugo-mounts-static/</guid><description>&lt;p&gt;This site had a bug that survived several deploys unnoticed: the whole site worked, except that the OpenGraph card, the image that link previews show when you paste a URL into WhatsApp or LinkedIn, returned 404 in production. Browsers never load that file when you visit a page, so nothing looked broken. Every build was green. The file was in the repository. And the URL was dead.&lt;/p&gt;&#10;&lt;p&gt;If you want the ending first: &lt;strong&gt;declaring any entry under &lt;code&gt;module.mounts&lt;/code&gt; for a target root replaces Hugo&amp;rsquo;s default mount for that root.&lt;/strong&gt; I had mounted one subfolder of &lt;code&gt;static&lt;/code&gt;, and in doing so had silently unmounted everything else in it.&lt;/p&gt;</description></item><item><title>The SQLite trap caught me the same day I wrote about it</title><link>https://wjmaritz.dev/posts/sqlite-trap-epilogue/</link><pubDate>Thu, 23 Jul 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/sqlite-trap-epilogue/</guid><description>&lt;p&gt;I recently published &lt;a href="https://wjmaritz.dev/posts/sqlite-in-production/"&gt;a post about running SQLite in production&lt;/a&gt;, and the heart of it was a warning: on a platform with an ephemeral filesystem, a mis-pointed SQLite file means your database quietly ceases to exist on every redeploy. I even described my defence with some pride. The app refuses to accept a raw connection string and builds its own from a &lt;code&gt;SQLITE_DIR&lt;/code&gt; environment variable, so nobody can get the path wrong.&lt;/p&gt;</description></item><item><title>My folder locker never locked anything</title><link>https://wjmaritz.dev/posts/folder-locker-never-locked/</link><pubDate>Wed, 22 Jul 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/folder-locker-never-locked/</guid><description>&lt;p&gt;In February 2025 I wrote a folder locker: a Windows batch script with a password prompt, a folder that vanishes from Explorer, and a README describing it as secure. The password was sitting in the script in plain text. The files were never encrypted. What the script actually did was rename a directory, and it took me three versions across seventeen months before the documentation said so plainly.&lt;/p&gt;&#10;&lt;div class="hx hx-2"&gt;&lt;h2 id="the-entire-lock"&gt;The entire lock&lt;/h2&gt;&lt;a class="anchor" href="#the-entire-lock" aria-label="Link to the section The entire lock"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Here is the mechanism, in full:&lt;/p&gt;</description></item><item><title>Running SQLite in production (yes, really)</title><link>https://wjmaritz.dev/posts/sqlite-in-production/</link><pubDate>Wed, 22 Jul 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/sqlite-in-production/</guid><description>&lt;p&gt;I recently shipped a small Flask app, a scoring platform for a fitness competition, with SQLite as its only database. Not as a stopgap until the real database arrives: the app refuses to start with anything else, because a half-supported second database is worse than none. The conventional advice says this is a mistake. For this class of app, the conventional advice is wrong, but the deployment details will bite you if nobody warns you about them.&lt;/p&gt;</description></item><item><title>When RAID1 saved the data but not the state</title><link>https://wjmaritz.dev/posts/zimaboard-raid1-rebuild/</link><pubDate>Mon, 12 Jan 2026 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/zimaboard-raid1-rebuild/</guid><description>&lt;p&gt;My home server is a ZimaBoard 2 running ZimaOS. The storage that matters is a RAID1 mirror, two 4 TB drives formatted BTRFS, holding a media library, backups, and personal archives, with the Docker application stack running off the same pool. It is a small setup, and for a long time it was a boring one, which is exactly what you want from storage.&lt;/p&gt;&#10;&lt;p&gt;Then a migration went wrong, and it taught me more than a year of everything working ever did.&lt;/p&gt;</description></item><item><title>Twelve things wrong, and the one I fixed first</title><link>https://wjmaritz.dev/posts/twelve-things-one-fix/</link><pubDate>Thu, 16 Oct 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/twelve-things-one-fix/</guid><description>&lt;p&gt;I spent a morning reviewing a low-code automation someone else had built. It worked. Forms came in, notifications went out, the right people got alerted. By the end of the review I had twelve things written down that were wrong with it, and the most useful thing I did that day was not hand over the list of twelve.&lt;/p&gt;&#10;&lt;div class="hx hx-2"&gt;&lt;h2 id="working-and-maintainable-are-different-properties"&gt;Working and maintainable are different properties&lt;/h2&gt;&lt;a class="anchor" href="#working-and-maintainable-are-different-properties" aria-label="Link to the section Working and maintainable are different properties"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;The flow did what it was asked to do, every time. That is not nothing, and it is worth saying out loud before anything else, because a review that opens with a defect list teaches the author that shipping working software counts for nothing.&lt;/p&gt;</description></item><item><title>Low-code is not no-logic: expression thinking in Power Automate</title><link>https://wjmaritz.dev/posts/low-code-expression-thinking/</link><pubDate>Sat, 04 Oct 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/low-code-expression-thinking/</guid><description>&lt;p&gt;Developers tend to dismiss low-code tools, and I understand why: what you see first is boxes connected by arrows, which looks like flowchart software rather than programming. But that visible layer is only half the platform. Underneath every one of those boxes is an expression language, and that is where the actual logic lives.&lt;/p&gt;&#10;&lt;p&gt;The distinction that made this click for me is the old one between &lt;strong&gt;statements&lt;/strong&gt; and &lt;strong&gt;expressions&lt;/strong&gt;. Statements do things. Expressions evaluate to values. In Power Automate the actions are statements, and their fields accept expressions.&lt;/p&gt;</description></item><item><title>Johnny Decimal for the files, Zettelkasten for the thoughts</title><link>https://wjmaritz.dev/posts/johnny-decimal-zettelkasten/</link><pubDate>Mon, 25 Aug 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/johnny-decimal-zettelkasten/</guid><description>&lt;p&gt;Every organisation system dies the same death: you stop trusting it, so you stop filing into it, so it rots, which proves you were right not to trust it. Mine has survived a few years now, and the reason is that it is actually two systems with a clear division of labour. Johnny Decimal answers &amp;ldquo;where does this file go?&amp;rdquo; and Zettelkasten answers &amp;ldquo;where does this thought go?&amp;rdquo;. Neither is asked to do the other&amp;rsquo;s job.&lt;/p&gt;</description></item><item><title>Use secrets, not random, and remember the shuffle</title><link>https://wjmaritz.dev/posts/secrets-not-random/</link><pubDate>Sun, 24 Aug 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/secrets-not-random/</guid><description>&lt;p&gt;Python gives you two ways to pick something at random, and only one of them belongs anywhere near a password.&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;random&lt;/code&gt; is a Mersenne Twister. It is fast, it is reproducible, and that second property is exactly the problem: it is a deterministic algorithm driven by internal state. Observe enough of its output and you can recover that state and predict everything it will produce next. For a dice roll or a shuffled playlist, wonderful. For anything that guards access, disqualifying.&lt;/p&gt;</description></item><item><title>Parsing Markdown by alternating on odd and even</title><link>https://wjmaritz.dev/posts/markdown-parser-odd-even/</link><pubDate>Wed, 05 Mar 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/markdown-parser-odd-even/</guid><description>&lt;p&gt;I worked through &lt;a href="https://www.boot.dev/courses/build-static-site-generator-python"&gt;boot.dev&amp;rsquo;s Build a Static Site Generator&lt;/a&gt;, a guided project that has you write the thing that turns &lt;code&gt;**bold**&lt;/code&gt; into &lt;code&gt;&amp;lt;b&amp;gt;bold&amp;lt;/b&amp;gt;&lt;/code&gt;. The architecture is the course&amp;rsquo;s: a &lt;code&gt;TextNode&lt;/code&gt; type for chunks of formatted text, an &lt;code&gt;HTMLNode&lt;/code&gt; tree to render, and separate passes for block-level and inline parsing.&lt;/p&gt;&#10;&lt;p&gt;This is a write-up of the piece I found most elegant, not something I invented. The inline parser is a genuinely neat idea, and it took me a while to see &lt;em&gt;why&lt;/em&gt; it works, so it seemed worth explaining properly.&lt;/p&gt;</description></item><item><title>The particle fade that never faded</title><link>https://wjmaritz.dev/posts/pygame-alpha-never-faded/</link><pubDate>Sun, 26 Jan 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/pygame-alpha-never-faded/</guid><description>&lt;p&gt;&lt;a href="https://www.boot.dev/courses/build-asteroids-python"&gt;Asteroids on boot.dev&lt;/a&gt; is a guided build. Its chapters cover Pygame setup, the game loop, the player, and the asteroids: enough for a working game. Everything past that is left to you, and that is where I kept going, adding momentum, a start menu, lives, scoring, and explosions.&lt;/p&gt;&#10;&lt;p&gt;The explosions were the fun part. Shoot an asteroid and fifteen white particles fly outward and fade to nothing over half a second.&lt;/p&gt;</description></item><item><title>Installing Hugo on WSL</title><link>https://wjmaritz.dev/posts/hugo-on-wsl/</link><pubDate>Wed, 22 Jan 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/hugo-on-wsl/</guid><description>&lt;p&gt;If you develop on Windows but want a Linux toolchain, Hugo runs happily under WSL. Here is the quick version, plus the one gotcha worth knowing.&lt;/p&gt;&#10;&lt;div class="hx hx-2"&gt;&lt;h2 id="the-quick-way-often-out-of-date"&gt;The quick way (often out of date)&lt;/h2&gt;&lt;a class="anchor" href="#the-quick-way-often-out-of-date" aria-label="Link to the section The quick way (often out of date)"&gt;&lt;span aria-hidden="true"&gt;#&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;Update your package list and install from apt:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install hugo&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This works, but Ubuntu and Debian package a version of Hugo that usually lags well behind the current release. Themes move quickly, and plenty of them need a newer Hugo than apt will give you. If a theme&amp;rsquo;s build complains about your Hugo version, this is why.&lt;/p&gt;</description></item><item><title>Space has no drag, so I added some</title><link>https://wjmaritz.dev/posts/space-has-no-drag/</link><pubDate>Sun, 19 Jan 2025 00:00:00 +0000</pubDate><guid>https://wjmaritz.dev/posts/space-has-no-drag/</guid><description>&lt;p&gt;The &lt;a href="https://www.boot.dev/courses/build-asteroids-python"&gt;boot.dev Asteroids course&lt;/a&gt; gives you a ship that moves while you hold a key and stops when you let go. It works, it is simple, and it feels nothing like being in space. What I wanted was continuous motion: you thrust, and then you &lt;em&gt;keep going&lt;/em&gt;, because nothing out there is slowing you down.&lt;/p&gt;&#10;&lt;p&gt;That is a small change to describe and a surprisingly interesting one to build, because the honest version of it is unplayable.&lt;/p&gt;</description></item></channel></rss>