<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Blog – Philip Mallegol-Hansen</title>
        <link>https://philip.mallegolhansen.com/blog</link>
        <description>Philip Mallegol-Hansen's Blog</description>
        <language>en</language>
        <generator>My own two hands</generator>
        <atom:link href="https://philip.mallegolhansen.com/blog/feed.xml" rel="self" type="application/rss+xml" />
        <docs>https://www.rssboard.org/rss-specification</docs>
        <item>
            <guid isPermaLink="true">https://philip.mallegolhansen.com/blog/2026-05-17-a-win-for-distributed-version-control.html</guid>
            <pubDate>17 May 2026 16:40 PDT</pubDate>
            <title>A Win for Distributed Version Control</title>
            <link>https://philip.mallegolhansen.com/blog/2026-05-17-a-win-for-distributed-version-control.html</link>
            <description>
                <![CDATA[
                    <article>
                        <p>
                            The company that hosts this very website recently had a catastrophic outage.
                            The webserver was lost, and it turned out the backups weren't being written off-server as they should have.
                            That is, of course, a huge bummer, but these sorts of things happen.
                        </p>
                        <p>
                            I'm noting this context, not to berate my hosting provider, a small, local, company whom I continue to be glad to support, rather than hosting my website with one of the tech giants. But instead to set the stage for the true moral of the story.
                        </p>
                        <p>
                            <strong>Thanks to distributed version control, I didn't lose anything.</strong>
                        </p>
                        <p>
                            If you read the official documentation at <a href="https://git-scm.com" hreflang="en">https://git-scm.com</a>, you'll see Git described as:
                        </p>
                        <blockquote>
                            [...] a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
                        </blockquote>
                        <p>
                            Yet day to day, I find that the vast majority use Git as something that is rather explicitly a <em>centralized</em> version control system.
                        </p>
                        <p>
                            One central system, be it GitHub, GitLab, Bitbucket, or for that matter, <a href="https://codeberg.org" hreflang="en">Codeberg</a>, serves as the canonical source of truth for our data.
                            We check out the state so we can make changes, and merge them back in.
                            Treating our local copy as a rather ephemeral mirror of the Source Of Truth&trade;, and nothing more.
                        </p>
                        <p>
                            But part of the very beauty of Git, is that <em>everything</em> is distributed. When you check out a local copy, you get all of the data. All the history, all the deleted version, everything.
                            Unless you actively choose not to anyway.
                        </p>
                        <p>
                            So although I had configured my web server as the git remote, storing a full copy of my website and all its history. My computer had the exact same data as well. And when I was notified the provider had to replace the server, all I had to do was call <code>git remote set-url origin [new server]</code>, and I was all set.
                        </p>
                        <p>
                            As basic as that is, it sure beats the reliability many SaaS platforms offer these days.
                        </p>
                    </article>
                ]]>
            </description>
        </item>
        <item>
            <guid isPermaLink="true">https://philip.mallegolhansen.com/blog/2026-04-20-adding-rss.html</guid>
            <pubDate>20 Apr 2026 21:25 PDT</pubDate>
            <title>Adding RSS</title>
            <link>https://philip.mallegolhansen.com/blog/2026-04-20-adding-rss.html</link>
            <description>
                <![CDATA[
                    <article>
                        <p>
                            What's the first thing you do after writing a blog? Adding an RSS feed of course.
                        </p>
                        <p>
                            Well, maybe that's not as obvious as I make it out to be.
                            But I truly believe RSS is a wonderful idea, I've written about that in the past.
                            And I got a <a href="https://pdx.social/@courtney/116428200080113901" hreflang="en">helpful nudge</a> from a friend.
                        </p>
                        <p>
                            So in the end I set off on a mission &mdash; to add a feed to this site, by hand of course.
                        </p>
                        <section>
                            <h2>RSS or Atom?</h2>
                            <p>
                                If, like me, you start diving into the world of figuring out the relevant specs, you'll quickly come across the fact that there are actually two competing ways you can add a feed to your website that someone can subscribe to.
                                <a href="https://en.wikipedia.org/wiki/RSS" hreflang="en">RSS</a> and <a href="https://en.wikipedia.org/wiki/Atom_(web_standard)" hreflang="en">Atom</a>.
                            </p>
                            <p>
                                Which do you choose? On one hand, I <em>like</em> Atom better, it's clearly intended to address specific shortcomings of RSS in a way that I prefer.
                                On the other, RSS seems to have a more mature body of documentation.
                            </p>
                            <p>
                                Though both enjoy relatively widespread adoption, I get the sense that of the two, the more likely to be dropped one day would be Atom. So I set out to stick with RSS.
                            </p>
                        </section>
                        <section>
                            <h2>Well Write an RSS Feed Then</h2>
                            <p>
                                Decision made, now all that's left is writing the feed. Easy peasy. Ish.
                            </p>
                            <p>
                                RSS feeds are <a href="https://en.wikipedia.org/wiki/XML" hreflang="en">XML</a> documents.
                                Though largely dunked on in the Software Developer community today, I don't have any particular dislike for XML.
                                I mean, I <em>am</em> literally sitting here writing out HTML tag for tag. XML is about the same really.
                            </p>
                            <p>
                                The first part is simple, you start the document with the appropriate doctype header, open a <code>&lt;rss&gt;</code> tag, and fill in the body (See also: Draw a circle, draw the rest of the owl).
                            </p>
                            <p>
                                The body is composed of two things (Well they're really one thing, you'll see). A <code>&lt;channel&gt;</code> element, containing metadata about your “channel” (A concept presumably born out of the idea that RSS would be used for news services). And nested inside of it, an arbitrary number of <code>&lt;item&gt;</code>'s each describing a... well... item? in your channel.
                                To get a bit more concrete in this case, each post on my blog.
                            </p>
                            <p>
                                The <a href="https://www.rssboard.org/rss-specification" hreflang="en">RSS Specification</a> is surprisingly good at spelling out what you need to fill in.
                            </p>
                        </section>
                        <section>
                            <h2>The Two Wrinkles</h2>
                            <p>
                                It's a bit of a norm these days, that you might want the “item” to contain the full text of a blog post, especially if it's fairly short. The spec sets you up by default to send out descriptions, with the presumed intent that the reader then clicks through to your site for the full story.
                            </p>
                            <p>
                                I wanted to offer full text though, easy right? You just paste the full post into the <code>&lt;description&gt;</code> and off you go!
                            </p>
                            <p>
                                Not quite. You see, my HTML markup contains tags that aren't valid in RSS. I imagine this is because RSS predates HTML5, which added a number of the tags I use.
                            </p>
                            <p>
                                But there is a way. XML offers <a href="https://en.wikipedia.org/wiki/CDATA" hreflang="en">a way to annotate the embedded HTML as text</a>, so that it isn't parsed as part of the actual XML of the feed.
                                With that in place, we can paste the full text of my webpage into the RSS item description, rendering the full post in an RSS reader without having to click through to my site.
                            </p>
                            <p>
                                The second wrinkle?
                                It's considered good practice for the feed document to point to itself, so that anyone who happens to have a copy of the document, can load the authoritative source. RSS doesn't have a built-in mechanism to do this. So they <a href="https://www.rssboard.org/rss-profile#namespace-elements-atom-link" hreflang="en">recommend you use Atom for that part</a>. I just thought that was cute.
                            </p>
                        </section>
                        <p>
                            If you're curious, you can check out the full document at <a href="feed.xml" type="application/rss+xml">feed.xml</a>.
                        </p>
                    </article>
                ]]>
            </description>
        </item>
        <item>
            <guid isPermaLink="true">https://philip.mallegolhansen.com/blog/2026-04-18-a-stupidly-simple-page.html</guid>
            <pubDate>18 Apr 2026 15:00 PDT</pubDate>
            <title>A Stupidly Simple Page</title>
            <link>https://philip.mallegolhansen.com/blog/2026-04-18-a-stupidly-simple-page.html</link>
            <description>
                <![CDATA[
                    <article>
                        <p>
                            I have a complicated relationship with the web.
                        </p>
                        <p>
                            I'm not alone in that boat of course.
                        </p>
                        <p>
                            As a person of a certain vintage, I grew up alongside the web.
                            And as a life-long nerd, there were many times in my youth where the computer,
                            and later the web in particular, were my escape into a world that made sense, when the people around me did not. 
                        </p>
                        <p>
                            I watched the web transform from a thing you could only reasonably use after <time datetime="20:00">8 PM</time>
                            (The phone company changed less by the MB at night) to load someone's blog. And you'd hope it didn't contain too many pictures, or you might be cut off from internet for the rest of the month for having spent too much, to... well. <em>This.</em>
                        </p>
                        <p>
                            <em>All of this.</em>
                        </p>
                        <p>
                            All the tracking, all the exploitative scraping, the political manipulation, the <em>mother fucking wars</em>, all just to grab some eyeball time to sell to advertisers, to &mdash; by sheer luck, certainly not genius &mdash; become the richest men humanity has ever known.
                        </p>
                        <p>
                            The situation is further complicated by the fact that the very salary that pays for my home, is directly derived from the same forces of exploitative capitalism that are ruining the things I love.
                        </p>
                        <p>
                            What are you to do under these circumstances?
                        </p>
                        <p>
                            Frankly, I don't have a <em>fucking</em> clue. So I'm starting here, here where it all started for me in the first place.
                        </p>
                        <p>
                            With a stupidly simple page.
                        </p>
                    </article>
                ]]>
            </description>
        </item>
    </channel>
</rss>
