<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>posts on Shallow Brook Software</title><link>https://shallowbrooksoftware.com/posts/</link><description>Recent content in posts on Shallow Brook Software</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 23 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://shallowbrooksoftware.com/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>A Positive Experience with GPT-5.6 Luna</title><link>https://shallowbrooksoftware.com/posts/a-positive-experience-with-gpt-5.6-luna/</link><pubDate>Sun, 23 Aug 2026 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/a-positive-experience-with-gpt-5.6-luna/</guid><description>&lt;p&gt;The other day, I was looking at &lt;a href="https://www.helmet.beam.vt.edu/bicycle-helmet-ratings.html" class="external-link" target="_blank" rel="noopener"&gt;Virginia Tech&amp;rsquo;s bicycle helmet ratings&lt;/a&gt;.&#10;The data here is quite interesting: a breakdown of over 300 helmets including info about price, impact score (lower is better), and an overall star rating.&#10;They recommend picking a helmet that is has a 4 or 5 star rating.&#10;Clicking on a individual helmet gives you some extra details: how its price ranks among &lt;strong&gt;all&lt;/strong&gt; helmets and how its score compares to the average of &lt;strong&gt;only the helmets with the same number of stars&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>ARCHITECTURE.md</title><link>https://shallowbrooksoftware.com/posts/architecture-md/</link><pubDate>Fri, 22 May 2026 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/architecture-md/</guid><description>&lt;p&gt;I&amp;rsquo;m not the first person to write about having an ARCHITECTURE.md file.&#10;The first blog post I read about it was probably &lt;a href="https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html" class="external-link" target="_blank" rel="noopener"&gt;Alex Kladov&amp;rsquo;s&lt;/a&gt;.&#10;In short, this is a file that lives at the root of a software project and describes how the code is structured: both logically and physically.&#10;In recent pursuits to explore and understand &lt;a href="https://en.wikipedia.org/wiki/Domain-driven_design" class="external-link" target="_blank" rel="noopener"&gt;domain-driven design (DDD)&lt;/a&gt;, I finally got around to writing my own and I thought it&amp;rsquo;d be cool to share it here for visibility.&lt;/p&gt;</description></item><item><title>Automating Deployments with mfd</title><link>https://shallowbrooksoftware.com/posts/automating-deployments-with-mfd/</link><pubDate>Fri, 28 Nov 2025 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/automating-deployments-with-mfd/</guid><description>&lt;p&gt;In a &lt;a href="https://shallowbrooksoftware.com/posts/deploying-multi-file-web-applications/" &gt;recent post&lt;/a&gt;, I wrote about an idea for how to deploy multi-file web applications.&#10;Given my background in Go, I was spoiled by the &amp;ldquo;trivially bundle everything into a single binary&amp;rdquo; deployment strategy.&#10;Life was simple: build the binary, copy it out to the server, and restart the service.&#10;Other language ecosystems don&amp;rsquo;t have it quite as easy, however.&lt;/p&gt;&#10;&lt;p&gt;In &lt;a href="https://www.python.org/" class="external-link" target="_blank" rel="noopener"&gt;Python&lt;/a&gt; or &lt;a href="https://nodejs.org" class="external-link" target="_blank" rel="noopener"&gt;Node.js&lt;/a&gt;, for example, you can&amp;rsquo;t really &amp;ldquo;build&amp;rdquo; the app into a single binary.&#10;Tools like &lt;a href="https://shiv.readthedocs.io/en/latest/" class="external-link" target="_blank" rel="noopener"&gt;shiv&lt;/a&gt; exist, however, than can emulate this deployment simplicity by zipping your app&amp;rsquo;s files together and then extracting them at first run.&#10;This strategy glosses over another problem, though: what do you do about &amp;ldquo;native&amp;rdquo; dependencies?&#10;Some Python / Node.js packages require native code to be built as part of the install.&#10;Given that I develop on an ARM64 Mac and my servers are x86-64 Linux, I would need a way to both cross-compile native dependencies AND bundle everything together.&lt;/p&gt;</description></item><item><title>Pull Request of the Year 2024</title><link>https://shallowbrooksoftware.com/posts/pull-request-of-the-year-2024/</link><pubDate>Sat, 24 May 2025 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/pull-request-of-the-year-2024/</guid><description>&lt;p&gt;I know, I know.&#10;It&amp;rsquo;s already 2025 and I only came across &lt;a href="https://github.com/sveltejs/kit/pull/11653" class="external-link" target="_blank" rel="noopener"&gt;this PR&lt;/a&gt; a few weeks ago.&#10;That being said, it was merged in 2024 and I can&amp;rsquo;t recall seeing any other PRs from last year that had me stomping and hollering so hard.&#10;Finding this feature (and the PR) came at a time of frustration: realizing that I wouldn&amp;rsquo;t be able to use &lt;a href="https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html" class="external-link" target="_blank" rel="noopener"&gt;systemd socket activation&lt;/a&gt; for &lt;a href="https://nextjs.org/" class="external-link" target="_blank" rel="noopener"&gt;NextJS&lt;/a&gt; (or &lt;a href="https://remix.run/" class="external-link" target="_blank" rel="noopener"&gt;RemixJS&lt;/a&gt;, for that matter) without having to jump through hoops.&lt;/p&gt;</description></item><item><title>Deploying Multi-File Web Applications</title><link>https://shallowbrooksoftware.com/posts/deploying-multi-file-web-applications/</link><pubDate>Sat, 10 May 2025 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/deploying-multi-file-web-applications/</guid><description>&lt;p&gt;For quite a long time, I&amp;rsquo;ve had a question: what is the best way to deploy multi-file web applications?&#10;When I say &amp;ldquo;multi-file&amp;rdquo;, I mean any application that doesn&amp;rsquo;t easily build into a single binary.&#10;In general, web apps have many files to worry about: HTML templates, static assets, migrations, etc.&#10;For ecosystems where the build output contains multiple directories and files, how we can safely deploy a new version of the app without any disruptions?&lt;/p&gt;</description></item><item><title>A Parallel ForEach Implementation in Go</title><link>https://shallowbrooksoftware.com/posts/a-parallel-foreach-implementation-in-go/</link><pubDate>Sun, 27 Apr 2025 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/a-parallel-foreach-implementation-in-go/</guid><description>&lt;p&gt;Go&amp;rsquo;s concurrency makes it very easy to fun multiple pieces of code in parallel.&#10;As I&amp;rsquo;ve &lt;a href="https://shallowbrooksoftware.com/posts/limiting-concurrency-with-semaphores/" &gt;written about&lt;/a&gt; before, running many tasks at the same time (and waiting for them all to finish) is achievable using little more than the &lt;code&gt;go&lt;/code&gt; keyword and a &lt;a href="https://pkg.go.dev/sync#WaitGroup" class="external-link" target="_blank" rel="noopener"&gt;sync.WaitGroup&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;However, a problem that you can run into is actually being &lt;em&gt;too&lt;/em&gt; parallel.&#10;For example, if you needed to download hundreds or thousands of files, initiating the requests for all of them at once could overwhelm the server.&#10;Instead, it&amp;rsquo;d be nice if we could say something like: &amp;ldquo;download these files concurrently but only up to N at once&amp;rdquo;.&lt;/p&gt;</description></item><item><title>Embracing Functional Simplicity</title><link>https://shallowbrooksoftware.com/posts/embracing-functional-simplicity/</link><pubDate>Mon, 14 Apr 2025 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/embracing-functional-simplicity/</guid><description>&lt;p&gt;I’ve been thinking a lot recently about software design and how to write better code.&#10;Here, &amp;ldquo;better&amp;rdquo; means more correct, more readable, easier to follow, and easier to test.&#10;Two books have been of exceptional influence as of late: &lt;a href="https://grokkingsimplicity.com/" class="external-link" target="_blank" rel="noopener"&gt;Grokking Simplicity&lt;/a&gt; by Eric Normand and &lt;a href="https://www.cosmicpython.com/" class="external-link" target="_blank" rel="noopener"&gt;Architecture Patterns with Python&lt;/a&gt; by Harry Percival and Bob Gregory.&lt;/p&gt;&#10;&lt;p&gt;The former focuses on functional design: emboldening pure, &amp;ldquo;data in, data out&amp;rdquo; functions.&#10;The latter zooms out a bit and considers overall application architecture: how to write code that best represents the domain of your problem.&#10;More content in the same vein includes Brandon Rhodes&amp;rsquo; &lt;a href="https://www.youtube.com/watch?v=PBQN62oUnN8" class="external-link" target="_blank" rel="noopener"&gt;Hoist Your I/O&lt;/a&gt; talk and Gary Bernhardt&amp;rsquo;s &lt;a href="https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell" class="external-link" target="_blank" rel="noopener"&gt;Functional Core, Imperative Shell&lt;/a&gt; screencast.&lt;/p&gt;</description></item><item><title>An Intro to The Mars Volta</title><link>https://shallowbrooksoftware.com/posts/an-intro-to-the-mars-volta/</link><pubDate>Sat, 15 Mar 2025 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/an-intro-to-the-mars-volta/</guid><description>&lt;p&gt;At work the other day, I coworker and I were chatting about music.&#10;He is a self-described &amp;ldquo;Deadhead&amp;rdquo;: a hardcore fan of the &lt;a href="https://en.wikipedia.org/wiki/Grateful_Dead" class="external-link" target="_blank" rel="noopener"&gt;Grateful Dead&lt;/a&gt;.&#10;After he shared some songs with me, I wanted to return the favor and recommend some tracks from one of &lt;em&gt;my&lt;/em&gt; favorite bands: &lt;a href="https://en.wikipedia.org/wiki/The_Mars_Volta" class="external-link" target="_blank" rel="noopener"&gt;The Mars Volta&lt;/a&gt;.&#10;They are a prog-rock band from El Paso, Texas who came into the spotlight in the early 2000s.&#10;I offered up a variety of suggestions ranging from &amp;ldquo;mild&amp;rdquo; to &amp;ldquo;wild&amp;rdquo; and figured I might as well share my thoughts with a wider audience.&#10;Plus, this gives me a good reason to get back into blogging here in 2025!&lt;/p&gt;</description></item><item><title>2024 Wrapped</title><link>https://shallowbrooksoftware.com/posts/2024-wrapped/</link><pubDate>Sun, 29 Dec 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/2024-wrapped/</guid><description>&lt;p&gt;This year, 2024, was one of great accomplishment: both personal and professional.&#10;From new friends to new skills, much has changed and I&amp;rsquo;ve experienced a huge amount of growth!&#10;2024 was also the &amp;ldquo;Year of Balance&amp;rdquo;: balancing the nuances of both work and life.&#10;Within work, I balanced regular development work with tech leadership and project planning.&#10;Within life, I balanced relationships and welcomed new friends who all come with unique and exciting interests, experiences, and perspectives.&lt;/p&gt;</description></item><item><title>DerzPlates: My First WoW Addon</title><link>https://shallowbrooksoftware.com/posts/derzplates-my-first-wow-addon/</link><pubDate>Sun, 22 Dec 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/derzplates-my-first-wow-addon/</guid><description>&lt;p&gt;I&amp;rsquo;ve played World of Warcraft off and on since 2007.&#10;I spent months as a true n00b but eventually found myself a guild and a raiding spot as a balance druid (sometimes known as the &amp;ldquo;OOMkin&amp;rdquo;).&#10;As I learned more about the game, I quickly discovered addons: additional, community-built software that runs inside of the game client.&#10;Addons can do so many things: track DPS (damage per second) numbers, show what loot a boss drops, or completely redesign the user interface.&lt;/p&gt;</description></item><item><title>Prepared Statement Caching: An Easy Win?</title><link>https://shallowbrooksoftware.com/posts/prepared-statement-caching-an-easy-win/</link><pubDate>Sun, 15 Dec 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/prepared-statement-caching-an-easy-win/</guid><description>&lt;p&gt;In PostgreSQL, &lt;a href="https://www.postgresql.org/docs/current/sql-prepare.html" class="external-link" target="_blank" rel="noopener"&gt;prepared statements&lt;/a&gt; are a means of optimization for executing SQL queries.&#10;Normally, SQL queries go through &lt;a href="https://www.postgresql.org/docs/current/query-path.html" class="external-link" target="_blank" rel="noopener"&gt;multiple phases&lt;/a&gt; of processing before being executed: parsing, rewriting, and planning.&#10;If your program executes the same query multiple times (as applications often do), then rerunning all of these steps each time is a bit redundant.&#10;By &amp;ldquo;preparing&amp;rdquo; the statement ahead of time, you can parse and rewrite the query once and then reuse the result.&#10;This means that a prepared statement only needs to be planned (and not parsed or rewritten) before execution.&lt;/p&gt;</description></item><item><title>Uploading 50GB of Music to S3</title><link>https://shallowbrooksoftware.com/posts/uploading-50gb-of-music-to-s3/</link><pubDate>Sun, 08 Dec 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/uploading-50gb-of-music-to-s3/</guid><description>&lt;p&gt;One of my upcoming projects for the &lt;a href="https://shallowbrooksoftware.com/posts/2025-the-year-of-clojure/" &gt;Year of Clojure&lt;/a&gt; is to create a web-based, iTunes-style user interface for listening to my personal music collection.&#10;I&amp;rsquo;m thinking something with an &lt;a href="https://www.versionmuseum.com/history-of/itunes-app" class="external-link" target="_blank" rel="noopener"&gt;old school aesthetic&lt;/a&gt; based on iTunes 6 or iTunes 7.&#10;Part of this project involves hosting my ~50GB of music (~7500 files) somewhere that is easily accessed by the app.&#10;To me, there was one obvious choice: S3-compatible object storage.&#10;Since I use &lt;a href="https://www.digitalocean.com/" class="external-link" target="_blank" rel="noopener"&gt;Digital Ocean&lt;/a&gt; for infrastructure, this means utilizing &lt;a href="https://www.digitalocean.com/products/spaces" class="external-link" target="_blank" rel="noopener"&gt;Spaces Object Storage&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>PubGrub in Clojure: More Than I Can Chew?</title><link>https://shallowbrooksoftware.com/posts/pubgrub-in-clojure-more-than-i-can-chew/</link><pubDate>Sun, 01 Dec 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/pubgrub-in-clojure-more-than-i-can-chew/</guid><description>&lt;p&gt;One of my recent &lt;a href="https://github.com/theandrew168/pubgrub" class="external-link" target="_blank" rel="noopener"&gt;side projects&lt;/a&gt; has been to study, understand, and implement the &lt;a href="https://nex3.medium.com/pubgrub-2fb6470504f" class="external-link" target="_blank" rel="noopener"&gt;PubGrub&lt;/a&gt; version solving algorithm.&#10;I&amp;rsquo;m not building any particular application or product with it, I simply find it interesting!&#10;I also thought to myself: maybe this would also be a good reason to explore &lt;a href="https://clojure.org/" class="external-link" target="_blank" rel="noopener"&gt;Clojure&lt;/a&gt; (since 2025 is the &lt;a href="https://shallowbrooksoftware.com/posts/2025-the-year-of-clojure/" &gt;Year of Clojure&lt;/a&gt;, after all).&lt;/p&gt;&#10;&lt;p&gt;However, after making steady early progress (the easy parts), I found myself somewhat stuck when implementing the algorithm’s main loop.&#10;How do I even do a straightforward “while true” loop in a functional and immutable language?&#10;Realizing that I didn&amp;rsquo;t yet understand how to translate even simple constructs into Clojure&amp;rsquo;s terms, I started to feel like I&amp;rsquo;d bitten off more than I can chew.&lt;/p&gt;</description></item><item><title>My Digimon TCG Collection</title><link>https://shallowbrooksoftware.com/posts/my-digimon-tcg-collection/</link><pubDate>Sun, 24 Nov 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/my-digimon-tcg-collection/</guid><description>&lt;p&gt;Back on July 5, 2022, I had the urge to play a different trading card some: something new but nostalgic.&#10;I&amp;rsquo;d been playing &lt;a href="https://en.wikipedia.org/wiki/Magic:_The_Gathering" class="external-link" target="_blank" rel="noopener"&gt;Magic: The Gathering&lt;/a&gt; since high school and wanted to things up and experience something unfamiliar.&#10;I came up with a simple idea: I&amp;rsquo;ll run to target and pick up a couple &lt;a href="https://en.wikipedia.org/wiki/Yu-Gi-Oh!_Trading_Card_Game" class="external-link" target="_blank" rel="noopener"&gt;Yu-Gi-Oh&lt;/a&gt; starter decks!&#10;I vaguely remember playing Yu-Gi-Oh back in elementary school but had no idea what the game is like today.&#10;However, my local Target only had one starter deck in stock.&lt;/p&gt;</description></item><item><title>Morrowind; or, Life in the Woods</title><link>https://shallowbrooksoftware.com/posts/morrowind-or-life-in-the-woods/</link><pubDate>Sun, 17 Nov 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/morrowind-or-life-in-the-woods/</guid><description>&lt;p&gt;I&amp;rsquo;ve always thought that &lt;a href="https://en.wikipedia.org/wiki/The_Elder_Scrolls_III:_Morrowind" class="external-link" target="_blank" rel="noopener"&gt;Morrowind&lt;/a&gt; seems like an amazing game&amp;hellip; but I&amp;rsquo;ve never truly played it.&#10;I&amp;rsquo;ve tried to get into the setting, themes, and gameplay, but it could never hook me.&#10;Am I too impatient?&#10;Does the game give the player &lt;em&gt;too much&lt;/em&gt; freedom and not enough direction?&#10;It must be a “me” problem.&#10;The game is critically acclaimed but I can&amp;rsquo;t seem to enjoy it: more importantly, I &lt;em&gt;want&lt;/em&gt; to enjoy it but haven&amp;rsquo;t been able to.&#10;If I had tried to play it when I was much younger, I&amp;rsquo;m sure it would&amp;rsquo;ve completely blown my mind.&lt;/p&gt;</description></item><item><title>Simple Database Migrations in Go</title><link>https://shallowbrooksoftware.com/posts/simple-database-migrations-in-go/</link><pubDate>Sun, 10 Nov 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/simple-database-migrations-in-go/</guid><description>&lt;p&gt;Historically, database migrations were a facet of web development that&amp;rsquo;d cause me to reach for a third-party library.&#10;I eventually discovered, however, that handing migrations is actually quite simple if you don&amp;rsquo;t need many features.&#10;At a high level, the process is as follows: list out the migration files, check which ones are missing, then apply them in order (each within a transaction).&#10;This whole workflow can be implemented in as few as ~100 lines of readable code!&lt;/p&gt;</description></item><item><title>Migrating Numeric IDs to UUIDs</title><link>https://shallowbrooksoftware.com/posts/migrating-numeric-ids-to-uuids/</link><pubDate>Sun, 03 Nov 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/migrating-numeric-ids-to-uuids/</guid><description>&lt;p&gt;There are a few ways to represent primary keys within a database.&#10;The most common way (in my experience) to use auto-incrementing integers.&#10;This means that first row&amp;rsquo;s key will be 1, the second&amp;rsquo;s will be 2, and so on.&#10;When it comes to my preferred style of software development, however, this approach has a major downside: new domain objects must first consult the database to determine their ID.&lt;/p&gt;&#10;&lt;p&gt;While I&amp;rsquo;m far from a &lt;a href="https://en.wikipedia.org/wiki/Domain-driven_design" class="external-link" target="_blank" rel="noopener"&gt;domain-driven design&lt;/a&gt; (DDD) purist, I like the idea of being able to represent the core domain objects and business logic of an application in complete isolation from the outside world.&#10;Having domain objects depend on the database for IDs makes this impossible (or at least very difficult).&#10;If only there existed a different kind of unique ID that could be generated by the domain objects themselves without requiring any coordination with an external system&amp;hellip;&lt;/p&gt;</description></item><item><title>OAuth Auth Only</title><link>https://shallowbrooksoftware.com/posts/oauth-auth-only/</link><pubDate>Sun, 27 Oct 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/oauth-auth-only/</guid><description>&lt;p&gt;I recently made a decision around how Bloggulus handles authentication.&#10;In short, it now only supports signing in with OAuth (via GitHub or Google).&#10;Users can no longer sign up with an arbitrary username and password.&#10;Is this a terrible idea or big brain play?&#10;I think the jury is still out but, personally, I&amp;rsquo;m feeling pretty good about it!&#10;This approach, like everything in software development, comes with tradeoffs.&lt;/p&gt;</description></item><item><title>Bull in a Learning Shop</title><link>https://shallowbrooksoftware.com/posts/bull-in-a-learning-shop/</link><pubDate>Sun, 20 Oct 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/bull-in-a-learning-shop/</guid><description>&lt;p&gt;While out on a long walk the other day, I was thinking about World of Warcraft and &amp;ldquo;Mythic+&amp;rdquo; dungeons.&#10;Specifically, I was trying to figure out how best to prepare: should I read more about how to optimize my Resto Druid, watch more videos about dungeon routes, maybe something else?&#10;Given that this season contains eight unique dungeons, all that research is going to take a while.&#10;Eventually I thought: maybe I just need to queue up, dive in, and figure it out like a &amp;ldquo;bull in a learning shop&amp;rdquo;.&#10;I laughed out loud when that phrase came to me.&#10;Despite sounding so silly, it represents a very real and applicable concept.&lt;/p&gt;</description></item><item><title>CSS Abstraction vs Duplication</title><link>https://shallowbrooksoftware.com/posts/css-abstraction-vs-duplication/</link><pubDate>Sun, 13 Oct 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/css-abstraction-vs-duplication/</guid><description>&lt;p&gt;CSS allows you get all the benefits of abstraction but without the commitment.&#10;By applying the same style to multiple classes (via comma-separated &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Selector_list" class="external-link" target="_blank" rel="noopener"&gt;selector lists&lt;/a&gt;), you can get the best of both worlds: the convenience of abstraction with the flexibility of duplication.&#10;You don&amp;rsquo;t actually have to repeat the CSS &lt;em&gt;and&lt;/em&gt; you don&amp;rsquo;t have to commit to multiple designs always being identical.&#10;If and when one design changes, you only need to split the selectors (a simple copy and paste) and update the modified one.&lt;/p&gt;</description></item><item><title>Bloggulus Supports Personalization!</title><link>https://shallowbrooksoftware.com/posts/bloggulus-supports-personalization/</link><pubDate>Sun, 06 Oct 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/bloggulus-supports-personalization/</guid><description>&lt;p&gt;&lt;a href="https://bloggulus.com/" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; is my primary &amp;ldquo;for fun&amp;rdquo; passion project.&#10;Any frequent readers of my blog (are you out there?) will surely have heard of it before.&#10;In short, it is a &lt;a href="https://github.com/theandrew168/bloggulus" class="external-link" target="_blank" rel="noopener"&gt;custom-built&lt;/a&gt; RSS feed aggregator combined with a context index powered by PostgreSQL&amp;rsquo;s &lt;a href="https://www.postgresql.org/docs/current/textsearch.html" class="external-link" target="_blank" rel="noopener"&gt;full text search&lt;/a&gt; feature.&#10;I use it as a playground for exploring development strategies, software architecture, and even programming languages.&lt;/p&gt;&#10;&lt;p&gt;What originally started out as a simple server-side rendered Go application has since taken on many forms.&#10;For a while it was a full-stack &lt;a href="https://kit.svelte.dev/" class="external-link" target="_blank" rel="noopener"&gt;SvelteKit&lt;/a&gt; app, then a REST API backend with a &lt;a href="https://svelte.dev/" class="external-link" target="_blank" rel="noopener"&gt;Svelte&lt;/a&gt; frontend, then with a &lt;a href="https://react.dev/" class="external-link" target="_blank" rel="noopener"&gt;React&lt;/a&gt; frontend, and eventually back to server-side rendered Go.&#10;It has really come full circle!&#10;I wouldn&amp;rsquo;t trade the experience and learning for anything, though.&#10;I feel much more well-rounded as a programmer having built the same application in so many different ways.&lt;/p&gt;</description></item><item><title>2025: The Year of Clojure?</title><link>https://shallowbrooksoftware.com/posts/2025-the-year-of-clojure/</link><pubDate>Sun, 29 Sep 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/2025-the-year-of-clojure/</guid><description>&lt;p&gt;I’ve been thinking about &lt;a href="https://clojure.org/" class="external-link" target="_blank" rel="noopener"&gt;Clojure&lt;/a&gt; a lot lately.&#10;Something about this “immutable, data-driven lisp on the JVM” has always fascinated me… but has never “clicked”.&#10;I love its core ideas: immutable data, simple syntax, emphasis on pure functions, great interop with Java, etc.&#10;In fact, my &lt;a href="https://shallowbrooksoftware.com/posts/a-better-pattern-for-go-http-handlers/" &gt;modern patterns&lt;/a&gt; for writing web apps in Go are slowly converging on a more functional design (using higher-order function to close around dependencies).&#10;I’d like to write more Clojure in 2025 and see if I can finally connect deeply with its philosophy.&lt;/p&gt;</description></item><item><title>Bloggulus: Seems Fine</title><link>https://shallowbrooksoftware.com/posts/bloggulus-seems-fine/</link><pubDate>Sun, 22 Sep 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/bloggulus-seems-fine/</guid><description>&lt;p&gt;A few weeks ago, &lt;a href="https://rachelbythebay.com" class="external-link" target="_blank" rel="noopener"&gt;Rachel by the Bay&lt;/a&gt; made another &lt;a href="https://rachelbythebay.com/w/2024/09/13/fs/" class="external-link" target="_blank" rel="noopener"&gt;update post&lt;/a&gt; regarding the RSS correctness system that she&amp;rsquo;s been running.&#10;In these posts, she&amp;rsquo;ll enumerate various feed readers and call out their behavior: for better or for worse.&#10;For the first time, &lt;a href="https://bloggulus.com/" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; made it onto the list without any noticeable issues!&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://shallowbrooksoftware.com/images/20240922/seems-fine.webp" alt="Bloggulus mentioned on Rachel by the Bay"&gt;&lt;/p&gt;&#10;&lt;p&gt;To many, &amp;ldquo;seems fine&amp;rdquo; might feel like an underwhelming statement.&#10;But to me, it means everything.&#10;It feels good to know that Bloggulus properly respects caching headers, provides a distinct user agent, and polls at an acceptable rate.&#10;I&amp;rsquo;ve put a &lt;a href="https://shallowbrooksoftware.com/posts/bloggulus-a-responsible-rss-reader/" &gt;decent&lt;/a&gt; &lt;a href="https://shallowbrooksoftware.com/posts/more-bloggulus-rss-improvements/" &gt;amount&lt;/a&gt; of effort into ensuring that Bloggulus follows the rules and is a respectful actor in the context of the greater internet.&lt;/p&gt;</description></item><item><title>Simple Cookies in Go</title><link>https://shallowbrooksoftware.com/posts/simple-cookies-in-go/</link><pubDate>Sun, 15 Sep 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/simple-cookies-in-go/</guid><description>&lt;p&gt;Today&amp;rsquo;s blog post is about cookies!&#10;Not the chocolate chip kind, but the web application state managemant kind.&#10;In short, &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies" class="external-link" target="_blank" rel="noopener"&gt;cookies&lt;/a&gt;! are bits of data (represented as name-value pairs) that web servers can request clients (mostly browsers) to store.&#10;Since HTTP is a stateless protocol, it is useful to have a way to remember pieces of information between requests.&#10;Often, cookies are used for identification and tracking purposes (like those obnoxious pop-ups you see on many sites).&#10;For my projects, however, cookies are primarly used for session management and determining if a user is authenticated.&lt;/p&gt;</description></item><item><title>Simple Middleware in Go</title><link>https://shallowbrooksoftware.com/posts/simple-middleware-in-go/</link><pubDate>Sun, 08 Sep 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/simple-middleware-in-go/</guid><description>&lt;p&gt;Since Go released its &lt;a href="https://go.dev/blog/routing-enhancements" class="external-link" target="_blank" rel="noopener"&gt;HTTP routing enhancements&lt;/a&gt; in version 1.22, I&amp;rsquo;ve been quick to migrate.&#10;If you want to learn more about these changes, Eli Bendersky wrote up a &lt;a href="https://eli.thegreenplace.net/2023/better-http-server-routing-in-go-122" class="external-link" target="_blank" rel="noopener"&gt;great article&lt;/a&gt; on the subject.&#10;While Alex Edwards&amp;rsquo; &lt;a href="https://github.com/alexedwards/flow" class="external-link" target="_blank" rel="noopener"&gt;Flow&lt;/a&gt; router has served me well (pun intended) for years, I tend to prefer using the standard library whenever possible.&#10;However, one feature that Go&amp;rsquo;s &lt;a href="https://pkg.go.dev/net/http#ServeMux" class="external-link" target="_blank" rel="noopener"&gt;http.ServeMux&lt;/a&gt; lacks is convenient support for middleware.&lt;/p&gt;&#10;&lt;h2 id="middleware"&gt;&#10; Middleware&#10; &lt;a class="heading-link" href="#middleware"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Middleware is code that runs between incoming (or outgoing) HTTP requests and your handlers.&lt;/strong&gt;&#10;It can be used for all sorts of things: handling panics, adding headers, compressing files, or verifying authenication.&#10;Writing these chunks of logic as middleware allows for great flexibility and readability (as we&amp;rsquo;ll soon see).&#10;As far as the code goes, middleware is typically written as a function that both accepts and returns Go&amp;rsquo;s most important HTTP interface: the &lt;a href="https://pkg.go.dev/net/http#Handler" class="external-link" target="_blank" rel="noopener"&gt;http.Handler&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>An Infinite io.Reader in Go</title><link>https://shallowbrooksoftware.com/posts/an-infinite-io-reader-in-go/</link><pubDate>Sun, 01 Sep 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/an-infinite-io-reader-in-go/</guid><description>&lt;p&gt;I recently wrote some middleware to ensure that incoming requests to a web server have an explicit size limit.&#10;Until I determine this to be too small, I chose to limit request bodies to 4KB.&#10;Go&amp;rsquo;s &lt;a href="https://pkg.go.dev/net/http" class="external-link" target="_blank" rel="noopener"&gt;net/http&lt;/a&gt; package already includes a utility for this (called &lt;a href="https://pkg.go.dev/net/http#MaxBytesReader" class="external-link" target="_blank" rel="noopener"&gt;MaxBytesReader&lt;/a&gt;) which makes writing the middleware quite simple.&#10;Note that the way I write middleware is heavily inspired by Mat Ryer&amp;rsquo;s &lt;a href="https://medium.com/@matryer/writing-middleware-in-golang-and-how-go-makes-it-so-much-fun-4375c1246e81" class="external-link" target="_blank" rel="noopener"&gt;adapter pattern&lt;/a&gt;.&#10;Here&amp;rsquo;s the code:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Represents a piece of HTTP middleware.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;type&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Middleware&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;func&lt;/span&gt;(&lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Handler&lt;/span&gt;) &lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Handler&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Limit the size of the request body to 4KB.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;MaxRequestBodySize&lt;/span&gt; = &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1024&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Places an upper limit on the size of every request body.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;func&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;LimitRequestBodySize&lt;/span&gt;() &lt;span style="color:#a6e22e"&gt;Middleware&lt;/span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;&lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;func&lt;/span&gt;(&lt;span style="color:#a6e22e"&gt;next&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Handler&lt;/span&gt;) &lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Handler&lt;/span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;&#9;&lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;HandlerFunc&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;func&lt;/span&gt;(&lt;span style="color:#a6e22e"&gt;w&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;ResponseWriter&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;r&lt;/span&gt; &lt;span style="color:#f92672"&gt;*&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Request&lt;/span&gt;) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;&#9;&#9;&lt;span style="color:#a6e22e"&gt;r&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Body&lt;/span&gt; = &lt;span style="color:#a6e22e"&gt;http&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;MaxBytesReader&lt;/span&gt;(&lt;span style="color:#a6e22e"&gt;w&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;r&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;Body&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;MaxRequestBodySize&lt;/span&gt;)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;&#9;&#9;&lt;span style="color:#a6e22e"&gt;next&lt;/span&gt;.&lt;span style="color:#a6e22e"&gt;ServeHTTP&lt;/span&gt;(&lt;span style="color:#a6e22e"&gt;w&lt;/span&gt;, &lt;span style="color:#a6e22e"&gt;r&lt;/span&gt;)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;&#9;})&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pretty simple!&#10;The next question was obvious: how do I test this?&#10;I need to create an &lt;code&gt;http.Request&lt;/code&gt; with a body that is larger than 4KB.&#10;I could probably do this by creating a &lt;a href="https://pkg.go.dev/bytes#Buffer" class="external-link" target="_blank" rel="noopener"&gt;bytes.Buffer&lt;/a&gt; that is bigger than the limit.&#10;That being said, perhaps there is a more creative way to solve this problem using Go&amp;rsquo;s &lt;a href="https://pkg.go.dev/io#Reader" class="external-link" target="_blank" rel="noopener"&gt;io.Reader&lt;/a&gt; interface.&lt;/p&gt;</description></item><item><title>Has Science Gone Too Far?</title><link>https://shallowbrooksoftware.com/posts/has-science-gone-too-far/</link><pubDate>Sun, 25 Aug 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/has-science-gone-too-far/</guid><description>&lt;p&gt;I recently &lt;a href="https://shallowbrooksoftware.com/posts/brain-dump-bffs-and-api-calls/" &gt;wrote an article&lt;/a&gt; explaining my difficulty with trying to reconcile “traditional API design” with BFFs (backend for frontend) and N+1 API calls.&#10;It seemed tough to arrive at a &amp;ldquo;best&amp;rdquo; solution (and maybe one doesn&amp;rsquo;t even really exist).&#10;Do I build my API for general consumption (granular and resource-based) or specifically for my web frontend (coarse with multiple resources joined together)?&#10;I settled for a middleground: use intentional frontend techniques to load secondary data &lt;em&gt;after&lt;/em&gt; rendering the initial, primary data.&#10;Then, if that was too cumbersome, create a BFF endpoint to power heavier pages.&lt;/p&gt;</description></item><item><title>Brain Dump: BFFs and N+1 API Calls</title><link>https://shallowbrooksoftware.com/posts/brain-dump-bffs-and-api-calls/</link><pubDate>Sun, 18 Aug 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/brain-dump-bffs-and-api-calls/</guid><description>&lt;p&gt;Writing software is hard.&#10;Sometimes, I&amp;rsquo;ll find myself stuck on a problem for days or even weeks.&#10;When that happens, I find it useful to write out everything I know about the problem: the nuances, possible solutions, external references, etc.&#10;My most recent head-scratcher has been about balancing &amp;ldquo;purist&amp;rdquo; REST API design with the needs of a web frontend.&#10;I&amp;rsquo;m beginning to realize a truth: &lt;strong&gt;they are different&lt;/strong&gt;.&#10;As always, I&amp;rsquo;m talking about &lt;a href="https://bloggulus.com" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>More Bloggulus RSS Improvements</title><link>https://shallowbrooksoftware.com/posts/more-bloggulus-rss-improvements/</link><pubDate>Sun, 11 Aug 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/more-bloggulus-rss-improvements/</guid><description>&lt;p&gt;Thanks to &lt;a href="https://rachelbythebay.com/w/" class="external-link" target="_blank" rel="noopener"&gt;Rachel by the Bay&lt;/a&gt; and her posts about RSS correctness / etiquette, I’ve been able to more deeply understand the relationship between feeds and readers.&#10;A few months ago, I decided to use &lt;a href="https://bloggulus.com" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; to participate in her feed reader scoring program.&#10;I &lt;a href="https://shallowbrooksoftware.com/posts/bloggulus-a-responsible-rss-reader/" &gt;wrote about it&lt;/a&gt; at the time and noted how Bloggulus&amp;rsquo; performance as a responsible RSS reader was &amp;ldquo;good but not great&amp;rdquo;.&lt;/p&gt;&#10;&lt;p&gt;Recently, while on vacation, I decided to fix the remaining three issues with Bloggulus:&lt;/p&gt;</description></item><item><title>Programming on Vacation</title><link>https://shallowbrooksoftware.com/posts/programming-on-vacation/</link><pubDate>Sun, 04 Aug 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/programming-on-vacation/</guid><description>&lt;p&gt;I&amp;rsquo;m going to be on vacation this week!&#10;My wife and I (and some friends) are headed down to the Lake of the Ozarks to swim, boat around, and chill.&#10;That being said, I genuinely enjoy programming and vacations give me time to &amp;ldquo;switch gears&amp;rdquo; and adapt a different development schedule.&#10;See, while we are here, people are always around: chatting and having a good time.&#10;We also tend to change plans on the fly which makes committing to long blocks of uninterruped time difficult.&#10;I love these aspects of vacation but they make deep work somewhat difficult.&lt;/p&gt;</description></item><item><title>Errors as Lists, Not Maps</title><link>https://shallowbrooksoftware.com/posts/errors-as-lists-not-maps/</link><pubDate>Sun, 28 Jul 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/errors-as-lists-not-maps/</guid><description>&lt;p&gt;All REST APIs must decide how to handle and represent errors.&#10;There are many ways to accomplish this task and they all come with varying pros and cons.&#10;This post starts by describing the strategy I&amp;rsquo;ve historically used when dealing with errors.&#10;After examining some limitations with that pattern, I present an alternative.&lt;/p&gt;&#10;&lt;h2 id="errors-as-maps"&gt;&#10; Errors as Maps&#10; &lt;a class="heading-link" href="#errors-as-maps"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Errors come in many shapes and sizes.&#10;Since errors often arise in response to input validation, it can be useful to include what specific &amp;ldquo;field&amp;rdquo; caused the problem.&#10;Until recently, I&amp;rsquo;ve represented these errors as a map: the key is the problematic field and the value is the error message for that field.&#10;This enables the frontend to display the errors right next to the invalid input which is great for user experience.&lt;/p&gt;</description></item><item><title>Simple Server Swap Space</title><link>https://shallowbrooksoftware.com/posts/simple-server-swap-space/</link><pubDate>Sun, 21 Jul 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/simple-server-swap-space/</guid><description>&lt;p&gt;Since the recent &lt;a href="https://shallowbrooksoftware.com/posts/bloggulus-outage-postmortem/" &gt;Bloggulus outage&lt;/a&gt;, I&amp;rsquo;ve been keeping a close eye on things.&#10;While the server has mostly been stable, I still noticed the occasional OOM kill after creating backups via &lt;a href="https://github.com/theandrew168/pg2s3" class="external-link" target="_blank" rel="noopener"&gt;pg2s3&lt;/a&gt;.&#10;Here is an example from &lt;code&gt;journalctl -u pg2s3&lt;/code&gt; logs (notice that this was happening nearly a month after the most-outage memory increase):&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;Jul 01 09:00:03 bloggulus pg2s3[32400]: created bloggulus_2024-07-01T09:00:00Z.backup.age&#10;Jul 01 09:00:04 bloggulus pg2s3[32400]: deleted bloggulus_2024-05-04T09:00:00Z.backup.age&#10;Jul 02 09:00:05 bloggulus systemd[1]: pg2s3.service: A process of this unit has been killed by the OOM killer.&#10;Jul 02 09:00:05 bloggulus systemd[1]: pg2s3.service: Main process exited, code=killed, status=9/KILL&#10;Jul 02 09:00:05 bloggulus systemd[1]: pg2s3.service: Failed with result &amp;#39;oom-kill&amp;#39;.&#10;Jul 02 09:00:05 bloggulus systemd[1]: pg2s3.service: Consumed 9.452s CPU time.&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Okay, so it seems like the 1GB of RAM isn&amp;rsquo;t quite enough when backups are taking place.&#10;The server works just fine under normal operation, however, but backups push it over the edge.&#10;If only there was a way to &amp;ldquo;download more RAM&amp;rdquo; and give the server a bit more breathing room&amp;hellip;&lt;/p&gt;</description></item><item><title>Is SvelteKit a Poor Choice for SPAs?</title><link>https://shallowbrooksoftware.com/posts/is-sveltekit-a-poor-choice-for-spas/</link><pubDate>Sun, 14 Jul 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/is-sveltekit-a-poor-choice-for-spas/</guid><description>&lt;p&gt;Recently, I&amp;rsquo;ve been working on the frontend for my &lt;a href="https://bloggulus.com/" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; project.&#10;Back in the day, the frontend was implemented via server-rendered HTML pages.&#10;This worked reasonably well, but I always felt like Go&amp;rsquo;s HTML templates were a bit painful to work with.&#10;I also wanted to transition the application&amp;rsquo;s backend to a REST API so that I could use it as a foundation for learning how to build native apps (someday&amp;hellip;).&lt;/p&gt;</description></item><item><title>A Better Pattern for Go HTTP Handlers</title><link>https://shallowbrooksoftware.com/posts/a-better-pattern-for-go-http-handlers/</link><pubDate>Sun, 07 Jul 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/a-better-pattern-for-go-http-handlers/</guid><description>&lt;p&gt;In most web applications, handlers have dependencies.&#10;These could be things like database connection pools, queue clients, or loggers.&#10;For most of my Go-based web development projects, I&amp;rsquo;ve embraced the &amp;ldquo;application struct&amp;rdquo; pattern as described by Alex Edwards in his &amp;ldquo;Let&amp;rsquo;s Go&amp;rdquo; &lt;a href="https://lets-go.alexedwards.net/" class="external-link" target="_blank" rel="noopener"&gt;book series&lt;/a&gt; (and a &lt;a href="https://www.alexedwards.net/blog/organising-database-access" class="external-link" target="_blank" rel="noopener"&gt;blog post&lt;/a&gt;) to manage these dependencies.&#10;Despite serving my quite well over the past few years, I recently found myself wanting something a bit more flexible.&#10;This post describes the original pattern, its limitations, and how I iterated on it to arrive at something even better (in my opinion, of course).&lt;/p&gt;</description></item><item><title>Two Go + PostgreSQL Timestamp Gotchas</title><link>https://shallowbrooksoftware.com/posts/two-go-plus-postgresql-timestamp-gotchas/</link><pubDate>Sun, 30 Jun 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/two-go-plus-postgresql-timestamp-gotchas/</guid><description>&lt;p&gt;This week I added some additional tests to my &lt;a href="https://github.com/theandrew168/bloggulus" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; project.&#10;In the process of doing so, I discovered a couple places where timestamp values weren&amp;rsquo;t matching what was expected.&#10;For some background, I generate, process, and store all timestamps in the &lt;a href="https://en.wikipedia.org/wiki/Coordinated_Universal_Time" class="external-link" target="_blank" rel="noopener"&gt;UTC time standard&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;The two gotchas were:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Unexpected conversion of UTC timestamps to local time&lt;/li&gt;&#10;&lt;li&gt;Mismatched precision between Go and PostgreSQL timestamps&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="unexpected-conversion"&gt;&#10; Unexpected Conversion&#10; &lt;a class="heading-link" href="#unexpected-conversion"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;I store timestamps in the database using PostgreSQL&amp;rsquo;s &lt;code&gt;timestamptz&lt;/code&gt; &lt;a href="https://www.postgresql.org/docs/current/datatype-datetime.html" class="external-link" target="_blank" rel="noopener"&gt;data type&lt;/a&gt;.&#10;The problem I ran into was that even when I was inserting proper UTC timestamps (generated by Go&amp;rsquo;s &lt;a href="https://pkg.go.dev/time" class="external-link" target="_blank" rel="noopener"&gt;time&lt;/a&gt; package), they were being returned from the database in my local time zone.&#10;What&amp;rsquo;s going on?&#10;Why are these UTC timestamps being converted to Central Standard Time when selected from the database?&lt;/p&gt;</description></item><item><title>Digimon Cards and Database Indexes</title><link>https://shallowbrooksoftware.com/posts/digimon-cards-and-database-indexes/</link><pubDate>Sun, 23 Jun 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/digimon-cards-and-database-indexes/</guid><description>&lt;p&gt;I&amp;rsquo;m a big fan of the &lt;a href="https://world.digimoncard.com/" class="external-link" target="_blank" rel="noopener"&gt;Digimon Card Game&lt;/a&gt; (the one released in 2020).&#10;The games are quick, the mechanics are engaging, and the community is friendly.&#10;Plus, I was a big fan of the Digimon anime as a kid so I have a lot of nostalgia for the characters.&#10;When I first got into the game, I realized that only a few sets had been released so far.&#10;I set my eyes on building and maintaining a complete collection: four copies of each card.&#10;With enough spreadsheets and time, this would allow me build any deck that I wanted.&#10;This was honestly a breath of fresh air coming from &lt;a href="https://magic.wizards.com/en" class="external-link" target="_blank" rel="noopener"&gt;Magic: The Gathering&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Reinforcing Indirect Joins</title><link>https://shallowbrooksoftware.com/posts/reinforcing-indirect-joins/</link><pubDate>Sun, 16 Jun 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/reinforcing-indirect-joins/</guid><description>&lt;p&gt;Recently, I ran into an issue where a very large PostgreSQL query (involving roughly 30 tables) was taking much longer to plan than to execute.&#10;At its worst, it was taking multiple &lt;em&gt;seconds&lt;/em&gt; to plan and a few hundred milliseconds to execute.&#10;My problem wasn&amp;rsquo;t really about standard query optimization: I was already past that.&#10;This was a problem of query complexity and trying to get the PostgreSQL &lt;a href="https://www.postgresql.org/docs/current/planner-optimizer.html" class="external-link" target="_blank" rel="noopener"&gt;planner/optimizer&lt;/a&gt; to more quickly arrive at an ideal query.&lt;/p&gt;</description></item><item><title>Bloggulus Outage Postmortem</title><link>https://shallowbrooksoftware.com/posts/bloggulus-outage-postmortem/</link><pubDate>Sun, 09 Jun 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/bloggulus-outage-postmortem/</guid><description>&lt;p&gt;On June 4, 2024, &lt;a href="https://bloggulus.com" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; was down for just under 7 hours.&#10;Despite being offline for so long, the immediate fix only took only ~30 minutes to find and apply once I became aware of the issue.&#10;This post details how I went about fixing the problem and then digs deeper into what actually happened.&#10;I also discuss a few gaps in server monitoring and notification delivery.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://shallowbrooksoftware.com/images/20240609/downtime.webp" alt="Downtime of roughly seven hours"&gt;&lt;/p&gt;</description></item><item><title>Bloggulus: A Responsible RSS Reader</title><link>https://shallowbrooksoftware.com/posts/bloggulus-a-responsible-rss-reader/</link><pubDate>Sun, 02 Jun 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/bloggulus-a-responsible-rss-reader/</guid><description>&lt;p&gt;Recently, Rachel by the Bay &lt;a href="https://rachelbythebay.com/w/2024/05/29/score/" class="external-link" target="_blank" rel="noopener"&gt;wrote about an idea&lt;/a&gt; for &amp;ldquo;scoring&amp;rdquo; RSS feed readers.&#10;Criteria would be things like: how often do they check, do they respect &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match" class="external-link" target="_blank" rel="noopener"&gt;caching headers&lt;/a&gt;, etc.&#10;Since I maintain my own RSS reader / aggregator called &lt;a href="https://bloggulus.com" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt;, I was curious to see how responsible my own program was.&#10;Her previous posts have directly influenced my ability to make Bloggulus more efficient and more correct.&#10;I messaged Rachel with interest in participating and she promptly replied with instructions on how to set things up.&lt;/p&gt;</description></item><item><title>The Court of Public Opinion</title><link>https://shallowbrooksoftware.com/posts/the-court-of-public-opinion/</link><pubDate>Sun, 26 May 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/the-court-of-public-opinion/</guid><description>&lt;p&gt;Over the past few weeks, I posted a couple of my Go-related blog posts to the &lt;a href="https://old.reddit.com/r/golang/" class="external-link" target="_blank" rel="noopener"&gt;r/golang&lt;/a&gt; subreddit.&#10;I don&amp;rsquo;t usually do this but have been asked the question numerous times: why don&amp;rsquo;t you share your writing anywhere?&#10;Honestly, I don&amp;rsquo;t know the true answer.&#10;Anxiety?&#10;Fear of criticism?&#10;Worried about wasting people&amp;rsquo;s time?&#10;Regardless of the reason, I did end up posting a few and I think it went okay!&lt;/p&gt;</description></item><item><title>Parsing Recursive Polymorphic JSON in Go</title><link>https://shallowbrooksoftware.com/posts/parsing-recursive-polymorphic-json-in-go/</link><pubDate>Sun, 19 May 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/parsing-recursive-polymorphic-json-in-go/</guid><description>&lt;p&gt;Recently, I was helping a friend design a system for matching text against a flexible system of rules.&#10;For example, I might want to know if a piece text contains the word &amp;ldquo;foo&amp;rdquo; or the word &amp;ldquo;bar&amp;rdquo;.&#10;A rule can either be a single regex pattern or a series of patterns combined with a logical operation (&lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;, or &lt;code&gt;NOT&lt;/code&gt;).&#10;We&amp;rsquo;ll call this first rule &lt;code&gt;Basic&lt;/code&gt; and the second one &lt;code&gt;Composite&lt;/code&gt;.&#10;Since the composite rule can contain both basic and other composite rules, we need a third type to represent &amp;ldquo;can be either basic or composite&amp;rdquo;.&#10;We&amp;rsquo;ll call this type &lt;code&gt;Rule&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Two Ways to Build a Pyramid</title><link>https://shallowbrooksoftware.com/posts/two-ways-to-build-a-pyramid/</link><pubDate>Sun, 12 May 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/two-ways-to-build-a-pyramid/</guid><description>&lt;p&gt;Recently at work, I&amp;rsquo;ve been overseeing my first project as a tech lead / project manager.&#10;Myself and two other developers are working together to rewrite and revamp a section of the application&amp;rsquo;s frontend.&#10;In preparation, I needed to break down a set of requirements and design mocks into small, actionable tasks.&lt;/p&gt;&#10;&lt;p&gt;Originally, I tried to plan the entire project upfront (we have roughly eight weeks of runway to complete it).&#10;This required a huge amount of time!&#10;The further into the future I planned, the harder it became to carve off specific tasks.&#10;This was due to the uncertainty surrounding how the project would look at that point in time.&#10;As another downside, this approach would&amp;rsquo;ve deferred delivering a usable frontend until the last few weeks of the project.&#10;I eventually discovered that there was a better way to go about all of this.&lt;/p&gt;</description></item><item><title>Using Newer PostgreSQL Client Tools in GitHub Actions</title><link>https://shallowbrooksoftware.com/posts/using-newer-postgres-client-tools-in-github-actions/</link><pubDate>Sun, 05 May 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/using-newer-postgres-client-tools-in-github-actions/</guid><description>&lt;p&gt;Recently, while updating my &lt;a href="https://github.com/theandrew168/pg2s3" class="external-link" target="_blank" rel="noopener"&gt;pg2s3 utility&lt;/a&gt;, I noticed that the project&amp;rsquo;s &lt;code&gt;docker-compose.yml&lt;/code&gt; file was pinning PostgreSQL to version 14.&#10;I couldn&amp;rsquo;t remember why I did that, so I went ahead and removed it (what could go wrong?).&#10;Unfortunately, this led to some automated tests failing in GitHub Actions!&lt;/p&gt;&#10;&lt;h2 id="the-problem"&gt;&#10; The Problem&#10; &lt;a class="heading-link" href="#the-problem"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;Thankfully, the error was very clear:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;pg_dump: error: server version: 16.2 (Debian 16.2-1.pgdg120+2); pg_dump version: 14.11 (Ubuntu 14.11-1.pgdg22.04+1)&#10;pg_dump: error: aborting because of server version mismatch&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Classic version mismatch.&#10;The PostgreSQL 16 server (running in a container) was not compatible with the PostgreSQL 14 client tools (installed on the GitHub Actions runner).&#10;For some context, pg2s3 uses &lt;code&gt;pg_dump&lt;/code&gt; and &lt;code&gt;pg_restore&lt;/code&gt; to quickly export and import data.&lt;/p&gt;</description></item><item><title>Mario Kart and the Maker's Schedule</title><link>https://shallowbrooksoftware.com/posts/mario-kart-and-the-makers-schedule/</link><pubDate>Sun, 28 Apr 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/mario-kart-and-the-makers-schedule/</guid><description>&lt;p&gt;Many years ago, I stumbled onto Paul Graham&amp;rsquo;s book &lt;a href="https://paulgraham.com/hp.html" class="external-link" target="_blank" rel="noopener"&gt;Hackers and Painters&lt;/a&gt;.&#10;It is a series of essays regarding software development, startup life, and spam filters.&#10;Reading that book led me to Paul&amp;rsquo;s other writings and, more specifically, &lt;a href="https://www.paulgraham.com/articles.html" class="external-link" target="_blank" rel="noopener"&gt;his blog&lt;/a&gt;.&#10;One of the posts that I remember clearly and think about often is titled &lt;a href="https://www.paulgraham.com/makersschedule.html" class="external-link" target="_blank" rel="noopener"&gt;Maker&amp;rsquo;s Schedule, Manager&amp;rsquo;s Schedule&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;In this essay, Paul contrasts the high-level schedules that power many makers (programmers) and managers.&#10;Makers tend to find their maximum productivity within long spans of uninterrupted time (often four hours or more).&#10;Writing software frequently requires sustained focus and the ability to juggle multiple complex ideas at the same time (this &lt;a href="https://imgur.com/3uyRWGJ" class="external-link" target="_blank" rel="noopener"&gt;classic comic&lt;/a&gt; summarizes things quite well).&#10;Managers, on the other hand, tend to have days that revolve around communication and coordination.&#10;These exchanges often take the form of many short meetings speckled throughout the day.&lt;/p&gt;</description></item><item><title>Limiting Concurrency with Semaphores</title><link>https://shallowbrooksoftware.com/posts/limiting-concurrency-with-semaphores/</link><pubDate>Sun, 21 Apr 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/limiting-concurrency-with-semaphores/</guid><description>&lt;blockquote&gt;&#10;&lt;p&gt;EDIT (4/27/25): I&amp;rsquo;ve since found an even better approach to solving this problem that both encapsulates the logic into a generic helper function and propagates errors back to the caller.&#10;Feel free to give it a read &lt;a href="https://shallowbrooksoftware.com/posts/a-parallel-foreach-implementation-in-go/" &gt;here&lt;/a&gt;!&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;I recently encountered some slowness while executing a bunch of tasks within a program.&#10;Specifically, I was working on how &lt;a href="https://bloggulus.com/" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; syncs all of the blogs that it tracks (there are only 40 or so right now but I expect the number to grow).&#10;Instead of naively syncing each blog serially, maybe concurrency can help.&#10;Let&amp;rsquo;s find some ways to speed it up!&lt;/p&gt;</description></item><item><title>Simple REST API Pagination</title><link>https://shallowbrooksoftware.com/posts/simple-rest-api-pagination/</link><pubDate>Sun, 14 Apr 2024 22:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/simple-rest-api-pagination/</guid><description>&lt;p&gt;Recently, I&amp;rsquo;ve been working on revamping my &lt;a href="https://github.com/theandrew168/bloggulus" class="external-link" target="_blank" rel="noopener"&gt;Bloggulus&lt;/a&gt; project to a split &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/REST" class="external-link" target="_blank" rel="noopener"&gt;REST API&lt;/a&gt; + &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/SPA" class="external-link" target="_blank" rel="noopener"&gt;SPA&lt;/a&gt; architecture (for fun and as an excuse to learn &lt;a href="https://kit.svelte.dev/" class="external-link" target="_blank" rel="noopener"&gt;SvelteKit&lt;/a&gt;).&#10;As a part of this effort, I took a moment to research and revisit how the API handles pagination.&#10;Since the system holds hundreds of blogs and thousands of posts, returning &lt;em&gt;all&lt;/em&gt; items from a request would be slow and unwieldy.&#10;Instead, the user (or web frontend) should be allowed to specify which set of items they want to view.&#10;This is where pagination comes into play.&lt;/p&gt;</description></item><item><title>Instrumenting Go Web Apps</title><link>https://shallowbrooksoftware.com/posts/instrumenting-go-web-apps/</link><pubDate>Sun, 07 Apr 2024 23:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/instrumenting-go-web-apps/</guid><description>&lt;p&gt;&lt;a href="https://prometheus.io/" class="external-link" target="_blank" rel="noopener"&gt;Prometheus&lt;/a&gt; is an incredible open-source system for collecting, storing, and analyzing system metrics.&#10;In addition to the server program, numerous &lt;a href="https://prometheus.io/docs/instrumenting/clientlibs/" class="external-link" target="_blank" rel="noopener"&gt;client libraries&lt;/a&gt; have been written to simplify the process of exposing metrics in your own projects.&#10;When writing Go-based web apps, I always include &lt;a href="https://github.com/prometheus/client_golang" class="external-link" target="_blank" rel="noopener"&gt;Go&amp;rsquo;s client library&lt;/a&gt; so that information about the program can be collected, visualized, and monitored.&#10;As outlined in the &lt;a href="https://prometheus.io/docs/guides/go-application/" class="external-link" target="_blank" rel="noopener"&gt;official guide&lt;/a&gt;, it is very easy to get these basic metrics up and running:&lt;/p&gt;</description></item><item><title>A Multi-Platform Modern WebGL Demo</title><link>https://shallowbrooksoftware.com/posts/a-multi-platform-modern-webgl-demo/</link><pubDate>Sun, 31 Mar 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/a-multi-platform-modern-webgl-demo/</guid><description>&lt;p&gt;Nearly four years ago I wrote a &lt;a href="https://shallowbrooksoftware.com/posts/a-multi-platform-modern-opengl-demo-with-sdl2/" &gt;blog post&lt;/a&gt; about a native, cross-platform OpenGL demo that I&amp;rsquo;d written.&#10;That post (which was only my second ever) was actually a response to &lt;em&gt;another&lt;/em&gt; &lt;a href="https://nullprogram.com/blog/2015/06/06/" class="external-link" target="_blank" rel="noopener"&gt;blog post&lt;/a&gt; written by Chris Wellons (aka &lt;a href="https://nullprogram.com/" class="external-link" target="_blank" rel="noopener"&gt;null program&lt;/a&gt;) on the same topic.&#10;Back then, I spent &lt;strong&gt;hours and hours&lt;/strong&gt; just trying to figure out how I could write (and compile) a single C program that would run on all three major platforms: Windows, macOS, and Linux.&#10;Chris used &lt;a href="https://www.glfw.org/" class="external-link" target="_blank" rel="noopener"&gt;GLFW3&lt;/a&gt; to solve this problem while mine used &lt;a href="https://www.libsdl.org/" class="external-link" target="_blank" rel="noopener"&gt;SDL2&lt;/a&gt; (both are valid options).&#10;Here is a screenshot of the demo for reference:&lt;/p&gt;</description></item><item><title>Testing with Transactions</title><link>https://shallowbrooksoftware.com/posts/testing-with-transactions/</link><pubDate>Sun, 24 Mar 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/testing-with-transactions/</guid><description>&lt;p&gt;Most web applications eventually end up with tests that need to interact with a database.&#10;Perhaps your business logic is tightly coupled to the database or maybe you are wanting to test a clearly-defined storage layer.&#10;Either way, a common problem arises: how do you clean up the data used during testing? What should you do with all those scattered rows?&lt;/p&gt;&#10;&lt;p&gt;Most of the time, developers will resort to a few common strategies:&lt;/p&gt;</description></item><item><title>How to Reset Grafana's Admin Password</title><link>https://shallowbrooksoftware.com/posts/how-to-reset-grafanas-admin-password/</link><pubDate>Sun, 17 Mar 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/how-to-reset-grafanas-admin-password/</guid><description>&lt;p&gt;The other day, I went to log into my self-hosted &lt;a href="https://grafana.com/oss/grafana/" class="external-link" target="_blank" rel="noopener"&gt;Grafana dashboard&lt;/a&gt; (to confirm that my metrics server wasn&amp;rsquo;t running out of storage) and realized that I didn&amp;rsquo;t remember the password!&#10;I usually save credentials to Firefox&amp;rsquo;s builtin password manager but I must&amp;rsquo;ve skipped that step when I initially configured Grafana.&lt;/p&gt;&#10;&lt;p&gt;Either way, I needed to figure out if there was a way to reset the password without having any SMTP settings configured (meaning I couldn&amp;rsquo;t use the regular &amp;ldquo;Forget your password?&amp;rdquo; email link).&#10;I do, however, have access to the physical server that hosts Grafana.&#10;Perhaps it ships with some sort of password reset command line utility?&lt;/p&gt;</description></item><item><title>Conditional Embedding in Go</title><link>https://shallowbrooksoftware.com/posts/conditional-embedding-in-go/</link><pubDate>Sun, 10 Mar 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/conditional-embedding-in-go/</guid><description>&lt;p&gt;I was recently working on &lt;a href="https://github.com/theandrew168/bloggulus" class="external-link" target="_blank" rel="noopener"&gt;a project&lt;/a&gt; where the frontend is a &lt;a href="https://kit.svelte.dev/" class="external-link" target="_blank" rel="noopener"&gt;Svelte&lt;/a&gt; SPA and the backend is a &lt;a href="https://go.dev/" class="external-link" target="_blank" rel="noopener"&gt;Go&lt;/a&gt; REST API.&#10;At a high level, this is how my project is structured:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;main&lt;span style="color:#f92672"&gt;.&lt;/span&gt;go&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;backend&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# source files for Go REST API&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;frontend&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; package&lt;span style="color:#f92672"&gt;.&lt;/span&gt;json&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; src&lt;span style="color:#f92672"&gt;/&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# source files for Svelte SPA&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Since Go is awesome, I&amp;rsquo;ve been using its &lt;a href="https://pkg.go.dev/embed" class="external-link" target="_blank" rel="noopener"&gt;embed&lt;/a&gt; feature to bake all of the compiled frontend files into the single output binary.&#10;This works great when building for production: compile the frontend, build the backend, done!&#10;This snapshots the frontend and backend code into a single, static binary.&#10;For iterative local development, however, I &lt;em&gt;don&amp;rsquo;t&lt;/em&gt; want this behavior.&#10;I instead want the frontend changes to be reflected without needing to rebuild and restart the backend.&#10;In short, I want to say:&lt;/p&gt;</description></item><item><title>Behavioral Abstractions in TypeScript</title><link>https://shallowbrooksoftware.com/posts/behavioral-abstractions-in-typescript/</link><pubDate>Sun, 03 Mar 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/behavioral-abstractions-in-typescript/</guid><description>&lt;p&gt;Almost every application needs to communicate with the outside world in one form or another.&#10;It could be by scraping a web page, hitting a REST API, or simply talking to a database.&#10;If an application depends on the specific details of any of these communications, however, then it becomes much more difficult to test.&#10;Instead, a program&amp;rsquo;s domain logic should depend on &lt;em&gt;abstract behaviors&lt;/em&gt; instead of concrete implementations.&#10;I think that this is one of the most important facets of system design.&lt;/p&gt;</description></item><item><title>My Ideal Vacation</title><link>https://shallowbrooksoftware.com/posts/my-ideal-vacation/</link><pubDate>Sun, 25 Feb 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/my-ideal-vacation/</guid><description>&lt;p&gt;I recently returned from a short vacation to Kauai, Hawaii.&#10;Kauai is a beautiful island complete with lush greenery, soothing waves, and breathtaking cliffs.&#10;That being said, most things on the island were quite expensive (especially food) and we found ourselves spending more time in the car than I would&amp;rsquo;ve liked (there was so much to see).&#10;One day, while sitting on the beach, I asked myself: &amp;ldquo;What would my ideal vacation look like?&amp;rdquo;.&#10;I started jotting down some ideas.&lt;/p&gt;</description></item><item><title>My Current Opinions on Hosting Web Apps</title><link>https://shallowbrooksoftware.com/posts/my-current-opinions-on-hosting-web-apps/</link><pubDate>Sun, 18 Feb 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/my-current-opinions-on-hosting-web-apps/</guid><description>&lt;p&gt;A little while back, I was chatting with some tech friends about my experience using &lt;a href="https://fly.io/" class="external-link" target="_blank" rel="noopener"&gt;Fly&lt;/a&gt; and &lt;a href="https://neon.tech/" class="external-link" target="_blank" rel="noopener"&gt;Neon&lt;/a&gt; for hosting web apps that are under active development.&#10;Between these two services and their low pricing for small projects, my total bill for the month was only $0.01 (Fly doesn&amp;rsquo;t even collect invoices below $5.00).&#10;I shared how Fly and Neon seemed like a great fit for projects that are a work in progress but that I&amp;rsquo;m not sure if I&amp;rsquo;d use them for production services.&#10;I&amp;rsquo;d have to do more pricing estimations and stability testing before having the trust and confidence needed to rely on these tools for anything that had users or was generating income.&lt;/p&gt;</description></item><item><title>Managing IP Allowlists with Ansible and UFW</title><link>https://shallowbrooksoftware.com/posts/managing-ip-allowlists-with-ansible-and-ufw/</link><pubDate>Sun, 11 Feb 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/managing-ip-allowlists-with-ansible-and-ufw/</guid><description>&lt;p&gt;I recently stood up a &amp;ldquo;Golden Age&amp;rdquo; minecraft server for my friends and me.&#10;We&amp;rsquo;ve been having a great time so far building houses, cave bases, and clifftop observation decks.&#10;Despite the initial fun, I&amp;rsquo;ve known that the server&amp;rsquo;s security posture was a bit&amp;hellip; shaky.&#10;The server only allows a specific set of usernames to login, but, since the old authentication servers aren&amp;rsquo;t online anymore, the server has no choice but to trust the client.&lt;/p&gt;</description></item><item><title>Automating a Golden Age Minecraft Server</title><link>https://shallowbrooksoftware.com/posts/automating-a-golden-age-minecraft-server/</link><pubDate>Sun, 04 Feb 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/automating-a-golden-age-minecraft-server/</guid><description>&lt;p&gt;Lately, I&amp;rsquo;ve noticed a growing interest in what people like to call &amp;ldquo;Golden Age Minecraft&amp;rdquo; (&lt;a href="https://reddit.com/r/GoldenAgeMinecraft/" class="external-link" target="_blank" rel="noopener"&gt;reddit&lt;/a&gt;).&#10;This term typically refers to versions of Minecraft prior to Beta 1.8 / Release 1.0.0: &lt;a href="https://minecraft.wiki/w/Adventure_Update" class="external-link" target="_blank" rel="noopener"&gt;The Adventure Update&lt;/a&gt;.&#10;This update added a bunch of new features and, for better or for worse, introduced a true &amp;ldquo;goal&amp;rdquo; into the game: build up supplies, reach &lt;a href="https://minecraft.wiki/w/The_End" class="external-link" target="_blank" rel="noopener"&gt;The End&lt;/a&gt;, and defeat the &lt;a href="https://minecraft.wiki/w/Ender_Dragon" class="external-link" target="_blank" rel="noopener"&gt;Ender Dragon&lt;/a&gt;.&#10;Prior to this update, Minecraft had no explicit goals and was truly a sandbox.&#10;The only things to do were explore, build stuff, and find diamonds.&#10;It was a simple loop that generated hundreds of hours of fun for my friends and I back in high school.&lt;/p&gt;</description></item><item><title>Utilizing All Cores in a NodeJS Web Application</title><link>https://shallowbrooksoftware.com/posts/utilizing-all-cores-in-a-nodejs-web-application/</link><pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/utilizing-all-cores-in-a-nodejs-web-application/</guid><description>&lt;p&gt;Coming from Go-based web development to NodeJS, one big thing surpised me: my web server only ever uses one core.&#10;This is because NodeJS is a single-threaded runtime environment.&#10;That being said, NodeJS is still highly concurrent: it uses &lt;a href="https://libuv.org/" class="external-link" target="_blank" rel="noopener"&gt;modern event loop technology&lt;/a&gt; to implement non-blocking, IO-based concurrency.&#10;NodeJS might not be truly parallel, but it is certainly concurrent.&#10;Knowing this, how is it that NodeJS performs reasonably well in server-side environments?&#10;Is it only ever using a fraction of its available multi-core CPU power?&#10;In some ways, yes, but in practice this isn&amp;rsquo;t usually a bottleneck.&lt;/p&gt;</description></item><item><title>Using Make to Run Concurrent Dev Services</title><link>https://shallowbrooksoftware.com/posts/using-make-to-run-concurrent-dev-services/</link><pubDate>Sun, 21 Jan 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/using-make-to-run-concurrent-dev-services/</guid><description>&lt;p&gt;This short post explains a useful trick for using &lt;a href="https://en.wikipedia.org/wiki/Make_%28software%29" class="external-link" target="_blank" rel="noopener"&gt;Make&lt;/a&gt; to run multiple development services at the same time.&#10;For example, one of my recent web projects required three active services in order to develop locally:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Running the &lt;a href="https://go.dev/" class="external-link" target="_blank" rel="noopener"&gt;Go&lt;/a&gt; backend&lt;/li&gt;&#10;&lt;li&gt;Running &lt;a href="https://esbuild.github.io/" class="external-link" target="_blank" rel="noopener"&gt;esbuild&lt;/a&gt; to (re)build the React + TypeScript frontend&lt;/li&gt;&#10;&lt;li&gt;Running the &lt;a href="https://tailwindcss.com/blog/standalone-cli" class="external-link" target="_blank" rel="noopener"&gt;Tailwind CSS CLI&lt;/a&gt; to re(build) the Tailwind CSS styles&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Historically, I&amp;rsquo;d run each of these programs in a separate terminal window (or use something fancy like &lt;a href="https://github.com/tmux/tmux/wiki" class="external-link" target="_blank" rel="noopener"&gt;tmux&lt;/a&gt;).&#10;This is a fairly straightforward solution but I always found it somewhat clunky: alt-tabbing between terminals to restart or stop the services.&lt;/p&gt;</description></item><item><title>Implementing Make in Go</title><link>https://shallowbrooksoftware.com/posts/implementing-make-in-go/</link><pubDate>Sun, 14 Jan 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/implementing-make-in-go/</guid><description>&lt;p&gt;A while back, my buddy &lt;a href="https://brue.land/" class="external-link" target="_blank" rel="noopener"&gt;Wes&lt;/a&gt; and I took a weekend trip to a remote cabin in eastern Iowa.&#10;We try to do this once a year with plans of fishing, hiking, and simply enjoying the quietness of nature.&#10;Not to mention the bliss of having no responsibilities for a few days!&#10;Despite being an outdoorsy trip, I still brought my laptop because programming is my favorite hobby.&#10;The internet in such remote locations is typically unreliable so I still consider it to be a nice disconnect.&lt;/p&gt;</description></item><item><title>Why Write?</title><link>https://shallowbrooksoftware.com/posts/why-write/</link><pubDate>Sun, 07 Jan 2024 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/why-write/</guid><description>&lt;p&gt;How long has it been since my last post?&#10;Let&amp;rsquo;s see&amp;hellip; about a week shy of 3 years!&#10;Blogging is one of those &amp;ldquo;things I&amp;rsquo;d like to do more of&amp;rdquo; but never make time for.&#10;I&amp;rsquo;ve still been writing code since my last post but I haven&amp;rsquo;t written about any of it.&#10;I ran my own software company for a while, got a new job at a Silicon Valley startup, and even got married!&#10;There are so many moments of progress and happiness that only exist in my memories (and photos, of course).&#10;I&amp;rsquo;d like to fix this.&lt;/p&gt;</description></item><item><title>Learning From geohot's minikeyvalue Project</title><link>https://shallowbrooksoftware.com/posts/learning-from-geohots-minikeyvalue-project/</link><pubDate>Thu, 14 Jan 2021 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/learning-from-geohots-minikeyvalue-project/</guid><description>&lt;p&gt;I first became aware of &lt;a href="https://github.com/geohot/minikeyvalue" class="external-link" target="_blank" rel="noopener"&gt;minikeyvalue&lt;/a&gt; while watching a &lt;a href="https://www.youtube.com/watch?v=cAFjZ1gXBxc" class="external-link" target="_blank" rel="noopener"&gt;recording&lt;/a&gt; of George&amp;rsquo;s programming livestream.&#10;This project was written in &lt;a href="https://www.python.org/" class="external-link" target="_blank" rel="noopener"&gt;Python&lt;/a&gt; and the design was simple: an HTTP-based interface for storing, getting, and deleting arbitrary content.&#10;Many folks call this type of thing a &amp;ldquo;distributed key-value store&amp;rdquo;.&#10;The project was originally inspired by &lt;a href="https://github.com/chrislusf/seaweedfs" class="external-link" target="_blank" rel="noopener"&gt;SeaweedFS&lt;/a&gt; but had the goal of being much, much simpler (ideally less than 1000 lines of code).&lt;/p&gt;&#10;&lt;p&gt;The architecture of the program is straightforward: a single &amp;ldquo;index server&amp;rdquo; distributes and organizes data between any number of &amp;ldquo;volume servers&amp;rdquo;.&#10;The actual data could be anything: text, images, &lt;a href="https://www.sqlite.org/index.html" class="external-link" target="_blank" rel="noopener"&gt;SQLite&lt;/a&gt; databases.&#10;It doesn&amp;rsquo;t matter!&#10;Everything is just bytes at the end of the day.&lt;/p&gt;</description></item><item><title>Ideas for Maximizing RISC-V's Potential</title><link>https://shallowbrooksoftware.com/posts/ideas-for-maximizing-riscvs-potential/</link><pubDate>Wed, 11 Nov 2020 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/ideas-for-maximizing-riscvs-potential/</guid><description>&lt;p&gt;There has been a lot of buzz surrounding the slowness, instability, and complexity of modern software systems.&#10;It seems as though more and more people are feeling and observing bloat and bugginess in their day-to-day usage of computers.&#10;In many situations, the mediocrity of today&amp;rsquo;s technology has become so common that it isn&amp;rsquo;t even seen as an issue.&lt;/p&gt;&#10;&lt;p&gt;During my few years spent in industry, these sort of quotes were heard almost daily:&lt;/p&gt;</description></item><item><title>Designing Python Web Servers</title><link>https://shallowbrooksoftware.com/posts/designing-python-web-servers/</link><pubDate>Wed, 02 Sep 2020 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/designing-python-web-servers/</guid><description>&lt;p&gt;I&amp;rsquo;ve spent the last few days designing and benchmarking extremely minimal pure-Python web servers.&#10;There is a tech myth / superstition that exposing python web servers to the internet is a bad idea but I&amp;rsquo;ve seen little to no evidence as to why this is supposedly the case.&#10;Are they too slow?&#10;Are they too insecure for some reason?&#10;One thing is for sure: performance must always be measured, not guessed.&lt;/p&gt;</description></item><item><title>Wrapping Up Squeaky</title><link>https://shallowbrooksoftware.com/posts/wrapping-up-squeaky/</link><pubDate>Tue, 25 Aug 2020 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/wrapping-up-squeaky/</guid><description>&lt;p&gt;My primary project for the last month or so has a been a proof of concept programming language called &lt;a href="https://github.com/theandrew168/squeaky" class="external-link" target="_blank" rel="noopener"&gt;Squeaky&lt;/a&gt;.&#10;I&amp;rsquo;ve had this idea in my head for a few years: build a functional language in C with a focus on game development.&#10;I wanted window creation, OpenGL graphics, and input events to all be first class citizens of the language and not optional libraries to be pulled in later.&#10;Cross-platform portability was important, too.&#10;If you write a game that utilizes the language&amp;rsquo;s builtin capabilities for graphics and keyboard input, it should work the same on all major platforms: Windows, macOS, and Linux.&lt;/p&gt;</description></item><item><title>Revamping My Old CHIP-8 Emulator</title><link>https://shallowbrooksoftware.com/posts/revamping-my-old-chip8-emulator/</link><pubDate>Thu, 09 Jul 2020 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/revamping-my-old-chip8-emulator/</guid><description>&lt;p&gt;Back in 2017 I was really interested in emulator development.&#10;I read that &lt;a href="https://en.wikipedia.org/wiki/CHIP-8" class="external-link" target="_blank" rel="noopener"&gt;CHIP-8&lt;/a&gt; was a great introductory system and decided to write my own emulator for it.&#10;I was a C programming novice at the time but figured it&amp;rsquo;d still be a good choice for a project that dealt with a lot of low-level details and mechanics.&#10;After a few weeks of work I was able to successfully emulate CHIP-8 games but knew that there were some lingering bugs.&#10;Once I cleaned them up and got the finished the project, I moved on and never touched the codebase again.&#10;You can find this old version at &lt;a href="https://github.com/theandrew168/skylark/tree/a24585b48de2923fd016f379c7b0ad8cbb0a9d75" class="external-link" target="_blank" rel="noopener"&gt;this commit&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Loading OpenGL Functions for Fun and Profit</title><link>https://shallowbrooksoftware.com/posts/loading-opengl-functions-for-fun-and-profit/</link><pubDate>Wed, 17 Jun 2020 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/loading-opengl-functions-for-fun-and-profit/</guid><description>&lt;p&gt;While writing my &lt;a href="https://shallowbrooksoftware.com/posts/a-multi-platform-modern-opengl-demo-with-sdl2/" &gt;previous blog post&lt;/a&gt;, I realized that there is a general information gap around dynamically loading OpenGL functions.&#10;When developers encounter this task on new OpenGL-related projects, they tend to reach for a premade loader such as &lt;a href="http://glew.sourceforge.net/" class="external-link" target="_blank" rel="noopener"&gt;glew&lt;/a&gt;, &lt;a href="https://github.com/skaslev/gl3w" class="external-link" target="_blank" rel="noopener"&gt;gl3w&lt;/a&gt;, &lt;a href="https://bitbucket.org/alfonse/glloadgen/wiki/Home" class="external-link" target="_blank" rel="noopener"&gt;glLoadGen&lt;/a&gt;, or &lt;a href="https://github.com/Dav1dde/glad" class="external-link" target="_blank" rel="noopener"&gt;GLAD&lt;/a&gt;.&#10;A more detailed list along with an overview of what all these libraries do can be found &lt;a href="https://www.khronos.org/opengl/wiki/OpenGL_Loading_Library" class="external-link" target="_blank" rel="noopener"&gt;here&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;&amp;ldquo;An OpenGL Loading Library is a library that loads pointers to OpenGL functions at runtime, core as well as extensions. This is required to access functions from OpenGL versions above 1.1 on most platforms. Extension loading libraries also abstracts away the difference between the loading mechanisms on different platforms.&amp;rdquo;&lt;/strong&gt; - &lt;a href="https://www.khronos.org/opengl/wiki/OpenGL_Loading_Library" class="external-link" target="_blank" rel="noopener"&gt;Khronos Docs&lt;/a&gt;&lt;/p&gt;</description></item><item><title>A Multi-Platform Modern OpenGL Demo with SDL2</title><link>https://shallowbrooksoftware.com/posts/a-multi-platform-modern-opengl-demo-with-sdl2/</link><pubDate>Sun, 07 Jun 2020 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/a-multi-platform-modern-opengl-demo-with-sdl2/</guid><description>&lt;p&gt;This post is largely inspired by &lt;a href="https://nullprogram.com/" class="external-link" target="_blank" rel="noopener"&gt;Chris Wellons&amp;rsquo;&lt;/a&gt; 2015 blog post about writing a &lt;a href="https://nullprogram.com/blog/2015/06/06/" class="external-link" target="_blank" rel="noopener"&gt;modern OpenGL demo&lt;/a&gt; that works on all three major desktop platforms (Windows, macOS, and Linux).&#10;I have come back to his post countless times over the years when looking for guidance on how to build any cross-platform C program.&lt;/p&gt;&#10;&lt;p&gt;In Chris&amp;rsquo; version of this demo he makes use of &lt;a href="https://www.glfw.org/" class="external-link" target="_blank" rel="noopener"&gt;GLFW3&lt;/a&gt; for the window and input handling and uses &lt;a href="https://github.com/skaslev/gl3w" class="external-link" target="_blank" rel="noopener"&gt;gl3w&lt;/a&gt; for loading &lt;a href="https://www.opengl.org/" class="external-link" target="_blank" rel="noopener"&gt;OpenGL&lt;/a&gt; functions.&#10;I have used GLFW3 in the past, but tend to prefer &lt;a href="https://www.libsdl.org/" class="external-link" target="_blank" rel="noopener"&gt;SDL2&lt;/a&gt; for its &lt;a href="https://wiki.libsdl.org/Introduction" class="external-link" target="_blank" rel="noopener"&gt;wealth of features&lt;/a&gt; and &lt;a href="https://wiki.libsdl.org/SDL_PollEvent" class="external-link" target="_blank" rel="noopener"&gt;polling-based event model&lt;/a&gt;.&#10;Therefore, in my version, I wanted to use SDL2 for the window and input handling and load the OpenGL functions myself.&#10;Loading OpenGL functions is a fiddly, quirky topic that deserves its own &lt;a href="https://shallowbrooksoftware.com/posts/loading-opengl-fuctions-for-fun-and-profit/" &gt;blog post&lt;/a&gt;.&#10;However, it doesn&amp;rsquo;t require too much code once the nuances are understood.&lt;/p&gt;</description></item><item><title>Bare-Metal Assembly on the Longan Nano</title><link>https://shallowbrooksoftware.com/posts/bare-metal-assembly-on-the-longan-nano/</link><pubDate>Fri, 24 Apr 2020 00:00:00 +0000</pubDate><guid>https://shallowbrooksoftware.com/posts/bare-metal-assembly-on-the-longan-nano/</guid><description>&lt;p&gt;The &lt;a href="https://www.seeedstudio.com/Sipeed-Longan-Nano-RISC-V-GD32VF103CBT6-Development-Board-p-4205.html" class="external-link" target="_blank" rel="noopener"&gt;Sipeed Longan Nano&lt;/a&gt; is a small, affordable, 32-bit &lt;a href="https://en.wikipedia.org/wiki/RISC-V" class="external-link" target="_blank" rel="noopener"&gt;RISC-V&lt;/a&gt; chip.&#10;Despite its minimalism, the Longan Nano provides enough power and peripherals to learn RISC-V assembly and build exciting programs along the way.&lt;/p&gt;&#10;&lt;p&gt;The Longan Nano comes with the following components:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;GigaDevice GD32VF103[CBT6] 32-bit CPU&lt;/li&gt;&#10;&lt;li&gt;8 MHz default clock speed (IRC8M)&lt;/li&gt;&#10;&lt;li&gt;108 MHz maximum clock speed&lt;/li&gt;&#10;&lt;li&gt;128 KB flash storage&lt;/li&gt;&#10;&lt;li&gt;32 KB sram memory&lt;/li&gt;&#10;&lt;li&gt;3 LEDs (red, green, and blue)&lt;/li&gt;&#10;&lt;li&gt;1 USB Type-C port&lt;/li&gt;&#10;&lt;li&gt;1 microSD card slot&lt;/li&gt;&#10;&lt;li&gt;160x80 pixel LCD (0.96 inches)&lt;/li&gt;&#10;&lt;li&gt;2 Buttons (RESET and BOOT)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;With the specs out of the way, we can begin the journey of figuring out how to go from a blank text file to controlling all aspects of our hardware.&#10;Get ready to discuss registers, design clean programs, and dive into some datasheets.&lt;/p&gt;</description></item></channel></rss>