<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>
            garrit.xyz
        </title>
        <link>
            https://garrit.xyz
        </link>
        <description>
            Garrit Franke
        </description>
        <language>
            en
        </language>
        <lastBuildDate>
            Fri, 29 May 2026 00:00:00 +0000
        </lastBuildDate>
        <item>
            <title>
                Fixing corrupted Home Assistant energy statistics
            </title>
            <guid>
                https://garrit.xyz/posts/2026-05-29-fixing-corrupted-home-assistant-energy-statistics
            </guid>
            <link>
                https://garrit.xyz/posts/2026-05-29-fixing-corrupted-home-assistant-energy-statistics?utm_source=rss
            </link>
            <pubDate>
                Fri, 29 May 2026 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<blockquote><p><strong>TL;DR:</strong> My meter dropped offline for ~13 days. Home Assistant&#39;s long-term stats came back wrong — a -4,500 kWh bar, a phantom 862 kWh solar spike. The dashboard is a <em>view</em>. The truth is in the <code>statistics</code> table. You fix it with one <code>SELECT</code> to find the damage and one <code>UPDATE</code> to undo it.</p></blockquote>

<p>For a while now, my <a href="https://www.home-assistant.io/docs/energy/">energy dashboard in Home Assistant</a> reports that my house had produced <strong>negative 4,500 kWh</strong> in April. It was finally time to fix that.</p>

<p>&lt;img width=&quot;1080&quot; height=&quot;1527&quot; alt=&quot;Image&quot; src=&quot;https://github.com/user-attachments/assets/01335840-93b5-4d80-ae45-1bb972650269&quot; /&gt;</p>

<p>Each sensor stores two values per hour in the <code>statistics</code> table. <code>state</code> is the raw meter reading. <code>sum</code> is HA&#39;s cumulative total, computed from the deltas between readings. When a <code>total_increasing</code> sensor blinks out and back, <code>sum</code> gets corrupted — but <code>state</code> is almost always still fine. So you trust <code>state</code> and rebuild <code>sum</code> to match.</p>

<p>Stop HA and back up the DB first — you&#39;re editing prod. Then: find the broken row, read its numbers, plug them into the fix.</p>

<h3>1. Find it</h3>

<p>Get the <code>metadata_id</code>, then dump the rows around the glitch. Select <code>start_ts</code> too — those raw unix timestamps are what you&#39;ll paste into the fix:</p>

<p><code></code>`sql
SELECT id, statistic<em>id FROM statistics</em>meta WHERE statistic_id LIKE &#39;%balkonkraftwerk%&#39;;
-- -&gt; 142</p>

<p>SELECT id, start<em>ts, datetime(start</em>ts,&#39;unixepoch&#39;,&#39;localtime&#39;) AS t, state, sum
FROM statistics
WHERE metadata<em>id = 142
  AND start</em>ts BETWEEN strftime(&#39;%s&#39;,&#39;2026-05-04&#39;) AND strftime(&#39;%s&#39;,&#39;2026-05-05&#39;)
ORDER BY start_ts;
<code></code>`</p>

<p>You&#39;re hunting for the row where the story breaks. There are two shapes it takes, and they want different fixes.</p>

<h3>Fix A — phantom spike (<code>state</code> flat, <code>sum</code> jumps)</h3>

<p>The output:</p>

<p><code>
id        start_ts     t                     state     sum
...
2643324   1777917600   2026-05-04 20:00:00   862.271   1031.552   &lt;- last sane row
2643402   1777921200   2026-05-04 21:00:00   862.271   1893.823   &lt;- sum leapt, state didn&#39;t
</code></p>

<p><code>state</code> is identical across both rows, so no energy was actually produced. The damage is the jump in <code>sum</code>:</p>

<p><code>
phantom = 1893.823 - 1031.552 = 862.271   (the bad delta)
from id = 2643402                          (first row carrying it)
</code></p>

<p><code>sum</code> is cumulative, so that 862.271 rides along in <em>every</em> later row too. Subtract it once, from the bad row onward:</p>

<p><code>sql
UPDATE statistics SET sum = sum - 862.271
WHERE metadata_id = 142 AND id &gt;= 2643402;
</code></p>

<h3>Fix B — gap + reset (<code>state</code> advanced, <code>sum</code> restarted at 0)</h3>

<p>Same <code>SELECT</code>, different sensor (155, the grid meter), around the outage:</p>

<p><code>
start_ts     t                     state      sum
1775044800   2026-04-01 14:00:00   4922.912   4792.995   &lt;- last reading before the gap
1776171600   2026-04-14 15:00:00   5127.167   0.382      &lt;- meter&#39;s back, sum reset to ~0
</code></p>

<p>Two things broke: <code>sum</code> fell off a cliff to 0.382, and the 13 days between are simply missing. But <code>state</code> kept counting through the outage, so it tells you the truth. Derive everything from those two rows:</p>

<p><code>
real consumption during gap = state_after - state_before = 5127.167 - 4922.912 = 204.255
where sum SHOULD be at 14.04 = sum_before + that      = 4792.995 + 204.255 = 4997.250
offset to re-base later rows  = should_be - actual     = 4997.250 - 0.382  = 4996.868
</code></p>

<p>Step one, lift every post-reset row back onto the real baseline (using the gap&#39;s <em>end</em> timestamp, <code>1776171600</code>):</p>

<p><code>sql
UPDATE statistics SET sum = sum + 4996.868
WHERE metadata_id = 155 AND start_ts &gt;= 1776171600;
</code></p>

<p>Step two, draw a straight line across the empty gap. The CTE just holds the two endpoints — start (<code>t0=1775044800</code>, <code>s0=4792.995</code>) and the now-corrected end (<code>t1=1776171600</code>, <code>s1=4997.250</code>) — and fills an hourly row for each step between:</p>

<p><code>sql
WITH RECURSIVE v(t0,t1,s0,s1) AS (SELECT 1775044800,1776171600,4792.995,4997.250),
hours(ts) AS (SELECT t0+3600 FROM v
  UNION ALL SELECT ts+3600 FROM hours,v WHERE ts+3600 &lt; v.t1)
INSERT INTO statistics (metadata_id, created_ts, start_ts, sum)
SELECT 155, h.ts, h.ts, v.s0 + (v.s1-v.s0)*(h.ts-v.t0)*1.0/(v.t1-v.t0)
FROM hours h, v;
</code></p>

<p>Restart, re-run the <code>SELECT</code>, confirm the line is boring again.</p>

<p>&lt;img width=&quot;3422&quot; height=&quot;1786&quot; alt=&quot;Image&quot; src=&quot;https://github.com/user-attachments/assets/12775462-3ed8-4399-885c-f26e6ea24af8&quot; /&gt;</p>

<h3>UPDATE, some hours later</h3>

<p>I told you it was one <code>UPDATE</code>. I was wrong, and the next morning the dashboard told me so. The -4,500 bar was back. The 862 kWh spike was back. Same size, new date: today.</p>

<p>Nothing new had broken. My own fix had bounced back.</p>

<p>Here&#39;s what I&#39;d missed. <code>statistics</code> isn&#39;t the only table. There&#39;s a second one — <code>statistics_short_term</code>, five-minute rows that HA rolls up into the hourly <code>statistics</code> table once an hour. And it still held the <em>old</em>, pre-fix cumulative sums. So every hour, HA dutifully re-aggregated the garbage and clobbered my correction, dumping the difference straight into the current hour. I wasn&#39;t fixing the data. I was fixing a cache while the source of truth quietly overwrote me.</p>

<p>Worse: HA was <em>running</em> the whole time. The recorder keeps short-term state in memory and flushes it on shutdown — so even my careful edits got stomped the moment it wrote back. Editing a database underneath a live application is like editing a file in <code>vim</code> while another process truncates it. Whoever writes last wins, and it isn&#39;t you.</p>

<p>So the boring line I buried up top — <em>stop HA first</em> — turned out to be the whole game. Not a footnote. The rule.</p>

<p>Stop the core properly. On HAOS that&#39;s <code>ha core stop</code> — and do it over real SSH, not the browser terminal, which is served through the frontend, dies with it, and locks you out. (Ask me how I know.) Then fix <em>both</em> tables:</p>

<p><code>sql
UPDATE statistics            SET sum = sum - 862.271 WHERE metadata_id = 142 AND id &gt;= 2643402;
UPDATE statistics_short_term SET sum = sum - 862.271 WHERE metadata_id = 142;
</code></p>

<p>Before you start HA back up, check the seam: the highest <code>sum</code> in short-term should land right where your latest <code>statistics</code> row sits, with no cliff between them.</p>

<p><code>sql
SELECT MIN(sum), MAX(sum) FROM statistics_short_term WHERE metadata_id = 142;
</code></p>

<p>One nuance that explains why the first pass <em>looked</em> fine: short-term only keeps the recent stuff, ~10 days. If the hour you&#39;re editing is older than that, it&#39;s already purged and <code>statistics</code> is all you need. My April gap was ancient enough to ignore it. The recent spikes weren&#39;t — and that&#39;s exactly what came back to bite me.</p>]]>
            </description>
        </item>
        <item>
            <title>
                Don&apos;t trust large context windows
            </title>
            <guid>
                https://garrit.xyz/posts/2026-05-06-dont-trust-large-context-windows
            </guid>
            <link>
                https://garrit.xyz/posts/2026-05-06-dont-trust-large-context-windows?utm_source=rss
            </link>
            <pubDate>
                Wed, 06 May 2026 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p>I recently watched <a href="https://youtu.be/-QFHIoCo-Ko">a video</a> that put a name on something I&#39;d been feeling. The author splits an LLM&#39;s context window into two zones. There&#39;s the <strong>smart zone</strong>, where the model is sharp, and the <strong>dumb zone</strong>, where attention drops off and the model starts forgetting what you told it five minutes ago. The cutoff sits somewhere around 100k tokens. It doesn&#39;t matter how big the advertised context window is.</p>

<p>This matters because coding agents will happily walk you straight into the dumb zone. A modern agent burns through tokens fast. A few file reads, a long debug session, a sprawling test run, and you&#39;re at 100k before lunch. Meanwhile vendors keep advertising windows of 200k, 1M, even 2M, as if those numbers represented a usable working set. They don&#39;t. Studies like <a href="https://arxiv.org/abs/2404.06654">RULER</a> and <a href="https://research.trychroma.com/context-rot">Chroma&#39;s report on context rot</a> show that effective context is a fraction of the advertised number, and that performance degrades gradually as you fill the window.</p>

<p>Large context windows are mostly a marketing number. The architectures behind them work, but they paper over a problem the underlying attention mechanism doesn&#39;t really solve. The number on the box gets bigger every release. The usable part doesn&#39;t keep up.</p>

<p>Modern agents are getting smart about this. Tools like Claude Code now auto-compact: when the session gets long, the agent summarizes the history and starts fresh. That helps. But auto-compaction kicks in after you&#39;ve already spent time in the dumb zone, and the summary is itself produced by a model that&#39;s already degraded. Better than nothing, but I&#39;d rather avoid the situation altogether.</p>

<p>What I do is open a new session and pass it a spec I wrote myself. That&#39;s a much higher signal handoff than any automated summary, because I get to decide what matters going forward. It&#39;s the <a href="https://garrit.xyz/posts/2025-05-20-no-matter-what-you-do-always-leave-a-breadcrumb">breadcrumb</a> approach applied to agents. Leave an artifact that the next session, or the next person, can pick up cleanly.</p>

<p>You can take this further. Projects like <a href="https://github.com/obra/superpowers">obra/superpowers</a> and <a href="https://github.com/mattpocock/skills">mattpocock/skills</a> structure entire agent workflows around small, named artifacts. PRDs, plans, skills, sub-agent handoffs. Each one is a way to keep the working session in the smart zone by deliberately moving information out of the session into something the next session can read.</p>

<p>So I treat my context window like a budget. I assume only the first chunk is really working for me, and everything I can move out of the live session and into a written artifact is one less thing for attention to fight over.</p>]]>
            </description>
        </item>
        <item>
            <title>
                n8n-nodes-open5e: n8n community node that lets you access D&amp;D 5th edition SRD content
            </title>
            <guid>
                https://garrit.xyz/posts/2026-02-13-n8n-nodes-open5e-n8n-community-node-that-lets-you-access-d-d-5th-edition-srd-content
            </guid>
            <link>
                https://garrit.xyz/posts/2026-02-13-n8n-nodes-open5e-n8n-community-node-that-lets-you-access-d-d-5th-edition-srd-content?utm_source=rss
            </link>
            <pubDate>
                Fri, 13 Feb 2026 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p><a href="https://github.com/garritfra/n8n-nodes-open5e">n8n-nodes-open5e</a> is an n8n community node that lets you access <a href="https://www.dndbeyond.com/srd">D&amp;D 5th edition SRD content</a> from the <a href="https://api.open5e.com">Open5e API</a> in your n8n workflows.</p>

<p>The Open5e node provides access to 12 different D&amp;D 5e resources through the Open5e API. Each resource supports three operations:</p>

<ul><li><strong>Get Many</strong>: Retrieve multiple items with optional filters and pagination</li><li><strong>Get</strong>: Retrieve a single item by its identifier (slug or key)</li><li><strong>Search</strong>: Search for items by name or description</li></ul>

<h2>Example Workflows</h2>

<h3>1. Random Encounter Generator</h3>

<p>Create random encounters by fetching monsters filtered by challenge rating:</p>

<ol><li>Add an Open5e node to your workflow</li><li>Select Resource: <strong>Monster</strong></li><li>Select Operation: <strong>Get Many</strong></li><li>In <strong>Filters</strong>, add:<ul><li>Challenge Rating: <code>5</code></li><li>Document Source: <code>wotc-srd</code></li></ul></li><li>Toggle <strong>Return All</strong> ON to get all matching monsters</li><li>Connect to a Function node to randomly select 3-5 monsters</li><li>Format the output as needed (Discord message, email, etc.)</li></ol>

<h3>2. Spell Lookup Bot</h3>

<p>Build a Discord bot that looks up spell information:</p>

<ol><li>Use a Discord Trigger node to listen for commands</li><li>Add a Function node to extract the spell name from the command</li><li>Add an Open5e node:<ul><li>Resource: <strong>Spell</strong></li><li>Operation: <strong>Search</strong></li><li>Search Term: <code>={{ $json.spellName }}</code></li></ul></li><li>Add a Function node to format the spell details</li><li>Send the formatted spell info back to Discord</li></ol>

<h3>3. Item Database Search</h3>

<p>Search for magic items and weapons by name:</p>

<ol><li>Add an HTTP Request trigger or Form trigger to accept search queries</li><li>Add an Open5e node:<ul><li>Resource: <strong>Magic Item</strong> (or <strong>Weapon</strong>)</li><li>Operation: <strong>Search</strong></li><li>Search Term: <code>={{ $json.query }}</code></li><li>Limit: <code>10</code></li></ul></li><li>Format and return the results</li></ol>

<h2>Contributing</h2>

<p>This is my first n8n community node. Contributions are welcome! Please feel free to submit a Pull Request or <a href="https://github.com/garritfra/n8n-nodes-open5e/issues">open an issue</a> if you encounter any issues.</p>]]>
            </description>
        </item>
        <item>
            <title>
                On Seeking Order in Chaos
            </title>
            <guid>
                https://garrit.xyz/posts/2026-02-11-on-seeking-order-in-chaos
            </guid>
            <link>
                https://garrit.xyz/posts/2026-02-11-on-seeking-order-in-chaos?utm_source=rss
            </link>
            <pubDate>
                Wed, 11 Feb 2026 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p>From my <a href="https://garrit.xyz/posts/2023-09-09-everyday-carry-notebooks">notebook</a>:</p>

<blockquote><p>Brains are pattern recognition machines.</p><p>I seek structure, sometimes meta-structure.</p><p>I try to structure how I structure things.</p><p>Projects, stories and adventures often only become apparent when they are in the past.</p><p>They evolve naturally, organically. Starting a project can result in something completely different. Is there a structure in that?</p><p>I am trying to find structure again.</p><p>Life is chaotic, and that&#39;s okay.</p></blockquote>

<p>I had this on my mind for quite some time. I&#39;m trying to cope with chaos in my life. I <em>like</em> chaos, and I like turning chaos into order. But often, that does not work and I get frustrated.</p>

<p>Projects - no matter if programming, writing, planning an event or woodworking - are inherently chaotic. There is no structure in the concept of a &quot;project&quot;. I want to think of a project as the sum of threads of actions towards a goal, and life is the sum of every project you ever started. I try to find a way to capture and grasp these &quot;threads&quot; - like commits on different branches of a code repository. On projects other than programming, this utterly fails.</p>

<p>I have to keep telling myself to be fine with the fact that life does not follow a structure. My personal takeaway is learning to recognize when I am seeking structure as a response to anxiety vs. when I&#39;m doing it because it&#39;s actually useful.</p>

<p>Am I alone with this? Does this resonate with anyone out there? I&#39;d love to hear from you.</p>]]>
            </description>
        </item>
        <item>
            <title>
                A fix for long-pressing movement keys in VSCode with Vim-Mode
            </title>
            <guid>
                https://garrit.xyz/posts/2026-02-04-a-fix-for-long-pressing-movement-keys-in-vscode-with-vim-mode
            </guid>
            <link>
                https://garrit.xyz/posts/2026-02-04-a-fix-for-long-pressing-movement-keys-in-vscode-with-vim-mode?utm_source=rss
            </link>
            <pubDate>
                Wed, 04 Feb 2026 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<h2>The Setup</h2>

<ul><li>MacOS</li><li>VSCode</li><li>Vim Extension</li></ul>

<h2>The Issue</h2>

<p>Long-pressing <code>j</code> or <code>k</code> (think &quot;down&quot; or &quot;up&quot; in Vim) only results in one down or up action, instead of continuous scrolling.</p>

<h2>The Fix</h2>

<p>In a terminal, run the following command:</p>

<p><code>
defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
</code></p>

<p>Original post: https://stackoverflow.com/a/44010683</p>

<h2>Additional tip</h2>

<p>In the MacOS settings, set &quot;Key Repeat Rate&quot; and &quot;Delay Until Repeat&quot; to the highest setting to be able to scroll much faster.</p>

<p>&lt;img width=&quot;478&quot; height=&quot;92&quot; alt=&quot;Image&quot; src=&quot;https://github.com/user-attachments/assets/7bf85853-377d-4727-a5c8-2766f2794e8a&quot; /&gt;</p>]]>
            </description>
        </item>
        <item>
            <title>
                The Scientific Method
            </title>
            <guid>
                https://garrit.xyz/posts/2026-02-03-the-scientific-method
            </guid>
            <link>
                https://garrit.xyz/posts/2026-02-03-the-scientific-method?utm_source=rss
            </link>
            <pubDate>
                Tue, 03 Feb 2026 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p><a href="https://en.wikipedia.org/wiki/Scientific_method">The Scientific Method</a> is widely accepted among researchers and academics to be the de facto standard of establishing truth.</p>

<p>Lately, I was wandering if parts of the scientific method could more often be applied to every day life. There are <a href="https://www.sciencebuddies.org/science-fair-projects/science-fair/steps-of-the-scientific-method">many</a> <a href="https://www.khanacademy.org/science/biology/intro-to-biology/science-of-biology/a/the-science-of-biology">different</a> <a href="https://extension.unr.edu/publication.aspx?PubID=4239">resources</a> out there explaining the scientific method, often with examples of how to apply it outside of an academic environment. The core method is always the same (in this case, taken from <a href="https://www.sciencebuddies.org/science-fair-projects/science-fair/steps-of-the-scientific-method">sciencebuddies.org</a>):</p>

<blockquote><ol><li>Ask a Question</li><li>Do Background Research</li><li>Construct a Hypothesis</li><li>Test Your Hypothesis by Doing an Experiment</li><li>Analyze Your Data and Draw a Conclusion</li><li>Communicate Your Results</li></ol></blockquote>

<p>Related: <a href="https://garrit.xyz/posts/2024-01-30-to-prove-something-is-true-try-disproving-it-first">To prove something is true, try disproving it first</a></p>]]>
            </description>
        </item>
        <item>
            <title>
                The Cult of Done Manifesto
            </title>
            <guid>
                https://garrit.xyz/posts/2026-02-02-the-cult-of-done-manifesto
            </guid>
            <link>
                https://garrit.xyz/posts/2026-02-02-the-cult-of-done-manifesto?utm_source=rss
            </link>
            <pubDate>
                Mon, 02 Feb 2026 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p><a href="https://medium.com/@bre/the-cult-of-done-manifesto-724ca1c2ff13">The Cult of Done Manifesto</a> is a fascinating way of embracing a chaotic mind. I copied the 13 golden rules into my very first <a href="https://garrit.xyz/posts/2023-09-09-everyday-carry-notebooks">pocket notebook</a> and stumble upon them from time to time.</p>

<blockquote><ol><li>There are three states of being. Not knowing, action and completion.</li><li>Accept that everything is a draft. It helps to get it done.</li><li>There is no editing stage.</li><li>Pretending you know what you’re doing is almost the same as knowing what you are doing, so just accept that you know what you’re doing even if you don’t and do it.</li><li>Banish procrastination. If you wait more than a week to get an idea done, abandon it.</li><li>The point of being done is not to finish but to get other things done.</li><li>Once you’re done you can throw it away.</li><li>Laugh at perfection. It’s boring and keeps you from being done.</li><li>People without dirty hands are wrong. Doing something makes you right.</li><li>Failure counts as done. So do mistakes.</li><li>Destruction is a variant of done.</li><li>If you have an idea and publish it on the internet, that counts as a ghost of done.</li><li>Done is the engine of more.</li></ol></blockquote>]]>
            </description>
        </item>
        <item>
            <title>
                Custom Entities in Home Assistant
            </title>
            <guid>
                https://garrit.xyz/posts/2025-12-11-custom-entities-in-home-assistant
            </guid>
            <link>
                https://garrit.xyz/posts/2025-12-11-custom-entities-in-home-assistant?utm_source=rss
            </link>
            <pubDate>
                Thu, 11 Dec 2025 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p>My local gym has a gauge on their website that shows an approximation of how many people are currently there. Being an avid <a href="https://www.home-assistant.io/">Home Assistant</a> user, of course I had to pipe that data into my dashboard somehow. For that, I created a simple <a href="https://n8n.io/">n8n</a> workflow that scrapes the data off the gym&#39;s site and dumps it into a custom entity.</p>

<p>Because creating a custom entity was not quite so straight forward as I&#39;d hoped, I wanted to share how I did it.</p>

<p>I ended up using the <code>input_number</code> integration (which seems to come with Home Assistant) and defined an entity that I could reference through the API:</p>

<p><code></code>`yaml</p>

<h1>configuration.yaml</h1>

<p>input<em>number:
  easyfitness</em>auslastung:
    name: EasyFitness Auslastung
    initial: 0
    min: 0
    max: 100
    step: 1
<code></code>`</p>

<p>After reloading the configuration, the entity was ready to be written to.</p>

<p>As mentioned, I&#39;m using a self-hosted instance of n8n on a Raspberry Pi to automate this. Using their <a href="https://n8n.io/integrations/home-assistant/">Home Assistant Integration</a>, you can simply address the new entity and update its state. And just like that, I was able to add a new Gauge to my dashboard!</p>]]>
            </description>
        </item>
        <item>
            <title>
                Making family IT support effortless (and free)
            </title>
            <guid>
                https://garrit.xyz/posts/2025-09-15-making-family-it-support-effortless-and-free
            </guid>
            <link>
                https://garrit.xyz/posts/2025-09-15-making-family-it-support-effortless-and-free?utm_source=rss
            </link>
            <pubDate>
                Mon, 15 Sep 2025 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p>Yesterday was one of those days where a family member had an issue with their computer. &quot;It doesn&#39;t open when I click it&quot; was all the information I had going into it. Debugging that through the telephone is just not happening.</p>

<p>I always stayed away from TeamViewer, because I was never really sure if that had a free plan, and the possibility of finding out mid-session that they don&#39;t have one was reason enough to save the hassle of yelling the installation instructions through the phone.</p>

<p>I remember hearing about <a href="https://rustdesk.com/">RustDesk</a> in a podcast a couple of years ago. The host claimed it to be a hassle-free open source replacement for TeamViewer, but by the time the next IT-support session arrived, I already forgot about it. Until yesterday!</p>

<p>Yesterday, I just didn&#39;t get enough information to be useful. I just needed a way to remotely access the computer, and that&#39;s then I remembered the promise of RustDesk. Going in blind, I quickly installed the client on my laptop and sent a mail with the instructions to my family member:</p>

<ol><li>Click here (a download link to the executable file)</li><li>Press the windows key</li><li>Type &quot;rust&quot; (to search for the file)</li><li>Press enter</li><li>Tell me the ID and the onetime password on the screen</li></ol>

<p>These instructions are fool-proof! And sure enough, they worked. I logged in and debugged the issue. No paywall, no corporate bullsh**, just a simple client that just works as intended out of the box. I was delighted to see that the plan has worked out. Going forward, Rustdesk will be my primary choice for remote IT support.</p>

<p>If you&#39;re interested: for some reason the browser window on their screen was resized to a tiny box near the edge of the screen, so whenever they clicked a bookmarked link on their desktop, instead of &quot;nothing happening&quot;, they just didn&#39;t see the page opening in the browser.</p>

<h2>TL;DR</h2>

<p>Use <a href="https://rustdesk.com/">RustDesk</a> instead of TeamViewer for a free and easy way to access your family&#39;s computer remotely.</p>]]>
            </description>
        </item>
        <item>
            <title>
                git diff --ignore-all-space makes code review way easier
            </title>
            <guid>
                https://garrit.xyz/posts/2025-06-11-git-diff-ignore-all-space-makes-code-reviews-way-easier
            </guid>
            <link>
                https://garrit.xyz/posts/2025-06-11-git-diff-ignore-all-space-makes-code-reviews-way-easier?utm_source=rss
            </link>
            <pubDate>
                Wed, 11 Jun 2025 00:00:00 +0000
            </pubDate>
            <description>
                <![CDATA[<p>I just learned a cool trick that I want to share. Let&#39;s review the diff of a file using <code>git diff</code>. I redacted most of it, but you probably found yourself in the situation of extremely long changes before:</p>

<p><code></code>`
diff --git a/lib/ui/screens/detail/components/body/event<em>body.dart b/lib/ui/screens/detail/components/body/event</em>body.dart
index d19d70a..1a61380 100644
--- a/lib/ui/screens/detail/components/body/event<em>body.dart
+++ b/lib/ui/screens/detail/components/body/event</em>body.dart
@@ -3,6 +3,7 @@
 class EventBody extends StatelessWidget {
   final EventDetails details;
@@ -18,35 +19,43 @@ class EventBody extends StatelessWidget {</p>

<p>   @override
   Widget build(BuildContext context) =&gt; Column(
-        crossAxisAlignment: CrossAxisAlignment.stretch,
-        children: [
-          EventInfoView(
-            location: details.location,
-            start: details.start,
-            end: details.end,
-            certified: details.certified,
-            paid: details.paid,
-            points: null, // Already shown in app bar
+    crossAxisAlignment: CrossAxisAlignment.stretch,
+    children: [
+      EventInfoView(
+        location: details.location,
+        start: details.start,
+        end: details.end,
+        certified: details.certified,
+        paid: details.paid,
+        points: null, // Already shown in app bar
+      ),
+      const SizedBox(height: 24),
+      Html(
+        data: details.description,
+        style: {
+          &#39;body&#39;: Style(
+            margin: Margins.zero,
...
 }
<code></code>`</p>

<p>But do you spot what has ACTUALLY been changed? In a real world scenario, it probably took you a while before you realised that it&#39;s the result of formatting the entire file. Nobody cares about whitespace when reviewing code. Or rather, your brain should not take the burden of having to care about that. That&#39;s what linters are for!</p>

<p>Let&#39;s look at the same diff with the <code>--ignore-all-space</code> (shorthand <code>-w</code>) flag activated:</p>

<p><code>
diff --git a/lib/ui/screens/detail/components/body/event_body.dart b/lib/ui/screens/detail/components/body/event_body.dart
index d19d70a..1a61380 100644
--- a/lib/ui/screens/detail/components/body/event_body.dart
+++ b/lib/ui/screens/detail/components/body/event_body.dart
@@ -3,6 +3,7 @@
 class EventBody extends StatelessWidget {
   final EventDetails details;
@@ -29,6 +30,14 @@ class EventBody extends StatelessWidget {
         points: null, // Already shown in app bar
       ),
       const SizedBox(height: 24),
+      Html(
+        data: details.description,
+        style: {
+          &#39;body&#39;: Style(
+            margin: Margins.zero,
+          ),
+        },
+      ),
       Text(details.description, style: context.theme.textTheme.body2Regular),
       if (details.registrationUrl != null || details.programUrl != null) const SizedBox(height: 16),
       if (details.registrationUrl != null) ...[
</code></p>

<p>Huh, so it&#39;s NOT just a formatted file. All whitespace changes have been stripped out, and you only see the changes that are relevant for the review. Neat!</p>

<p>Many tools also support ignoring whitespace. GitLab let&#39;s you disable <code>Show whitespace changes</code> in the merge request diff viewer. VSCode has the <code>diffEditor.ignoreTrimWhitespace</code> setting. So, if you want to make this the default in your tools, chances are there&#39;s an option for only showing relevant changes.</p>

<p>A bit of a sloppy post, but I hope this is useful to someone. Happy code reviewing!</p>]]>
            </description>
        </item>
    </channel>
</rss>