<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on miti99</title><link>https://miti99.com/en/tags/linux/</link><description>Recent content in Linux on miti99</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 16 Nov 2026 17:39:19 +0700</lastBuildDate><atom:link href="https://miti99.com/en/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>My Late-2026 Workspace Setup: DeskMini at Home, code-server in the Cloud</title><link>https://miti99.com/en/post/2026/11/04/</link><pubDate>Wed, 04 Nov 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/11/04/</guid><description>&lt;p&gt;I wanted to be able to open my workspace from any device, let coding agents shoulder more and more of the heavy lifting, and make the most of long-term free tiers. After plenty of rounds of installing, testing, and tearing things down, my late-2026 setup has settled into three parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;In the cloud:&lt;/strong&gt; &lt;code&gt;code-server&lt;/code&gt; running inside a container on OCI Always Free ARM, deployed via Coolify from &lt;a href="https://github.com/tiennm99/composes" rel="noopener noreferrer"&gt;tiennm99/composes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;At home:&lt;/strong&gt; an ASRock DeskMini X600 running Ubuntu, handling heavy builds, containers, and coding agents for remote access.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;On the go:&lt;/strong&gt; a lightweight ThinkPad acting as a thin client to connect to the other two over SSH, Tailscale, or &lt;code&gt;code-server&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Getting here took plenty of trial and error: switching &lt;code&gt;code-server&lt;/code&gt; images, hunting for a good browser-based terminal, and spending two weeks wrestling with remote Linux desktop solutions. Some things stuck; others now live only in my archive folder.&lt;/p&gt;
&lt;p&gt;This post was drafted with AI assistance from my Git history, plans, and notes, and I then filled in the reasoning behind each decision. I didn&amp;rsquo;t check the DeskMini live while writing; anything unverified or where I no longer remember the exact reason is called out explicitly in the relevant section.&lt;/p&gt;
&lt;h2 id="starting-point-code-server-in-a-container"&gt;Starting Point: &lt;code&gt;code-server&lt;/code&gt; in a Container&lt;/h2&gt;&lt;p&gt;I&amp;rsquo;ve been self-hosting Coolify since at least May 2025. On August 14, 2026, while reorganizing my &lt;code&gt;composes&lt;/code&gt; repo, I added &lt;code&gt;code-server&lt;/code&gt; using the LinuxServer.io image (lsio for short). Go, Node, and Python were installed via &lt;code&gt;DOCKER_MODS&lt;/code&gt;, and extra packages via &lt;code&gt;INSTALL_PACKAGES&lt;/code&gt;. The &lt;code&gt;abc&lt;/code&gt; user&amp;rsquo;s home directory lived at &lt;code&gt;/config&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Running that image under Coolify had a few annoyances. Every redeploy recreated the container, re-downloaded the mods, and forced &lt;code&gt;apt&lt;/code&gt; to resolve the entire &lt;code&gt;INSTALL_PACKAGES&lt;/code&gt; list from scratch — enough that I had to trim the package list down. Worse, if a mod failed to install, the error was simply logged and ignored: the editor still opened, just missing tools. Freshly created workspace volumes were also owned by &lt;code&gt;root&lt;/code&gt;, which I had to work around in a Dockerfile.&lt;/p&gt;
&lt;p&gt;Those were the friction points with lsio. The reason I switched to Coder&amp;rsquo;s official image was to stay closer to upstream. I added &lt;code&gt;codercom/code-server&lt;/code&gt; with a custom Dockerfile on October 6, then removed the lsio setup and moved it to the archive on October 12.&lt;/p&gt;
&lt;p&gt;The new Dockerfile bakes in the tools I need right at build time: build-essential, &lt;code&gt;bubblewrap&lt;/code&gt;, networking CLIs, search and linting tools, database clients, plus &lt;code&gt;gh&lt;/code&gt;, Docker CLI, Compose, Buildx, &lt;code&gt;glab&lt;/code&gt;, and &lt;code&gt;gt&lt;/code&gt;. That way, helper commands and shell completions are ready out of the box. I use &lt;code&gt;FROM codercom/code-server:latest&lt;/code&gt; because the official image doesn&amp;rsquo;t publish major-version tags.&lt;/p&gt;
&lt;p&gt;So that &lt;code&gt;agent-browser&lt;/code&gt; can run headlessly on ARM64, the image includes Debian&amp;rsquo;s Chromium package along with the required fonts, and I tuned shared memory so Chromium wouldn&amp;rsquo;t crash. GTK and WebKitGTK are included for headless Tauri builds and tests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Language toolchains, on the other hand, stay in my home directory outside the image:&lt;/strong&gt; &lt;code&gt;fnm&lt;/code&gt;, &lt;code&gt;uv&lt;/code&gt;, &lt;code&gt;rustup&lt;/code&gt;, Go from the official tarball, and SDKMAN. Baking another copy into the image would only bloat the build while getting shadowed by the versions in &lt;code&gt;$HOME&lt;/code&gt; anyway. Keeping them separate also prevents a container redeploy from silently upgrading the compiler or runtime version I&amp;rsquo;m in the middle of using.&lt;/p&gt;
&lt;p&gt;One remaining annoyance is typing Vietnamese inside the browser terminal when using Claude Code. As of my last notes on October 18, I still haven&amp;rsquo;t found an officially supported fix. Backspace events and diacritic composition have to travel through the entire chain of browser → &lt;code&gt;xterm.js&lt;/code&gt; → WebSocket → PTY. For now, I just type longer Vietnamese text outside and paste it in.&lt;/p&gt;
&lt;h2 id="things-i-evaluated-tried-and-removed-on-the-server"&gt;Things I Evaluated, Tried, and Removed on the Server&lt;/h2&gt;&lt;p&gt;Alongside switching the &lt;code&gt;code-server&lt;/code&gt; image, I looked for ways to use a terminal and coding agents directly in the browser. Between September and early November, several tools came and went on the server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OpenHands:&lt;/strong&gt; tried from September 18 to 19 — about a day.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;opencode web:&lt;/strong&gt; tried from September 18 to October 5 for a browser-based shell.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Paseo:&lt;/strong&gt; used from September 16 to November 3 (last tweaked on October 6). This daemon initially seemed like a good fit, but each agent CLI needed around 200 MB installed at startup. I eventually dropped it because Orca and T3 Code offered better features and a smoother experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For OpenHands and opencode web, I didn&amp;rsquo;t write down why I removed them.&lt;/p&gt;
&lt;p&gt;The Zellij web client was the one I really wanted to make work. I ran it in a container from October 21 to November 3, but immediately ran into keyboard shortcut conflicts: the browser reserves &lt;code&gt;Ctrl+T&lt;/code&gt;, &lt;code&gt;Ctrl+W&lt;/code&gt;, &lt;code&gt;Ctrl+N&lt;/code&gt;, and &lt;code&gt;Ctrl+Tab&lt;/code&gt; — the exact combinations I needed for Zellij&amp;rsquo;s modes. With the Unlock-First layout, &lt;code&gt;Ctrl+G&lt;/code&gt; opened Firefox&amp;rsquo;s find bar instead, so I had to rebind it to &lt;code&gt;Alt+G&lt;/code&gt;. On top of that, opening the root URL always spawned a brand-new session that I couldn&amp;rsquo;t clean up from the UI. Ultimately, the shortcut conflicts were what made me drop it.&lt;/p&gt;
&lt;p&gt;While setting it up, I also used &lt;code&gt;socat&lt;/code&gt; as a relay and ran into a quirk where Zellij exited silently if its config file was missing.&lt;/p&gt;
&lt;p&gt;Typing occasionally felt laggy too, though I never proved Zellij was the culprit. The container itself was barely under any load; an incorrect &lt;code&gt;TERM&lt;/code&gt; variable, Vietnamese IME input through the browser, or network latency could all have played a part. I did fix one specific bug where &lt;code&gt;TERM=unknown&lt;/code&gt; caused Backspace to move the cursor to the right.&lt;/p&gt;
&lt;p&gt;An alternative I evaluated on October 24 was &lt;code&gt;tmux&lt;/code&gt; over &lt;code&gt;ttyd&lt;/code&gt;. Because &lt;code&gt;tmux&lt;/code&gt; uses &lt;code&gt;Ctrl+B&lt;/code&gt; as its prefix, its default bindings clash much less with browser shortcuts than Zellij&amp;rsquo;s modal bindings — though it still has to live within whatever keys the browser allows through.&lt;/p&gt;
&lt;p&gt;I added a &lt;code&gt;ttyd&lt;/code&gt; template to the repo but never actually deployed it. Soon after, Orca and T3 Code covered my needs, so I archived the template too. A bare terminal alone still felt too limiting anyway: having to ask Claude just to inspect a single file felt unnecessarily roundabout.&lt;/p&gt;
&lt;p&gt;On November 3, I moved Paseo, Zellij, and the &lt;code&gt;ttyd&lt;/code&gt; template into the archive in a single commit. The Zellij container was removed; the only browser terminals I still use are Cloudflare&amp;rsquo;s browser SSH to the DeskMini and the integrated terminal inside &lt;code&gt;code-server&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="the-deskmini-at-home"&gt;The DeskMini at Home&lt;/h2&gt;&lt;p&gt;The machine sitting at home is an ASRock DeskMini X600: X600M-STX motherboard, Ryzen 7 8700G (8 cores, 16 threads, integrated Radeon 780M graphics), and 32 GB of RAM. It has two 500 GB NVMe drives — one for the OS and one for my workspace. As of my October 21 check, it runs Ubuntu 26.04 Desktop with GNOME on Wayland.&lt;/p&gt;
&lt;p&gt;I picked the DeskMini because it&amp;rsquo;s compact yet powerful and has a capable iGPU, making it a great &lt;strong&gt;always-on home Linux box for heavy workloads and remote access&lt;/strong&gt;. My Windows desktop is even more powerful, but I didn&amp;rsquo;t want to run a Windows rig 24/7 for that role. When I&amp;rsquo;m at home, I still sit at my Windows desktop; when I&amp;rsquo;m at the office and need a beefy homelab, I open Orca on the DeskMini over Tailscale.&lt;/p&gt;
&lt;p&gt;That keeps my ThinkPad light and cool: compiling, running containers, language toolchains, and long-running tasks all happen on the DeskMini or the cloud server. The DeskMini doesn&amp;rsquo;t run Coolify — services there use plain Docker Compose and &lt;code&gt;systemd&lt;/code&gt;, with browser access routed through Cloudflare Tunnel and Access.&lt;/p&gt;
&lt;p&gt;I gradually set up its toolchains starting in late October: Node via &lt;code&gt;fnm&lt;/code&gt;, Python via &lt;code&gt;uv&lt;/code&gt;, Go from the official tarball with &lt;code&gt;GOTOOLCHAIN=auto&lt;/code&gt;, Rust via &lt;code&gt;rustup&lt;/code&gt;, and Java 21 via SDKMAN, alongside &lt;code&gt;gcc&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;gh&lt;/code&gt;, Docker, &lt;code&gt;glab&lt;/code&gt;, and later &lt;code&gt;gt&lt;/code&gt;. One easy-to-forget gotcha when writing automation scripts: &lt;code&gt;fnm&lt;/code&gt; and SDKMAN are loaded in interactive &lt;code&gt;zsh&lt;/code&gt; startup files, so &lt;code&gt;cron&lt;/code&gt; jobs and &lt;code&gt;systemd&lt;/code&gt; services won&amp;rsquo;t see them automatically.&lt;/p&gt;
&lt;p&gt;Since October 22, the DeskMini has had its own dedicated notes in my workspace repo. At that time, its role was also tied to something I really wanted to get working smoothly: opening a full Linux desktop right inside the browser via Apache Guacamole.&lt;/p&gt;
&lt;h2 id="two-weeks-chasing-a-browser-based-linux-desktop"&gt;Two Weeks Chasing a Browser-Based Linux Desktop&lt;/h2&gt;&lt;p&gt;My goal at the time was very specific: open my Linux desktop from anywhere in a browser without installing any client software on the machine in front of me. That meant routing through Cloudflare Tunnel and Access rather than requiring Tailscale on the client machine.&lt;/p&gt;
&lt;p&gt;Among the options I surveyed on October 19, Guacamole stood out as free, self-hosted, clientless, and capable of speaking RDP to both Linux and Windows. Cloudflare&amp;rsquo;s browser RDP ranked lower in my comparison notes, yet I tried it first anyway. On October 21, GNOME Remote Desktop rejected the connection with:&lt;/p&gt;
&lt;blockquote&gt;
 &lt;p&gt;Client did not advertise support for the Graphics Pipeline, closing connection&lt;/p&gt;

&lt;/blockquote&gt;
&lt;p&gt;GNOME requires the RDP Graphics Pipeline extension, and Cloudflare&amp;rsquo;s IronRDP client didn&amp;rsquo;t advertise support for it at the time, causing GNOME to close the connection immediately. Cloudflare&amp;rsquo;s documentation also listed only Windows targets as supported. So that path was a dead end with GNOME in my test.&lt;/p&gt;
&lt;p&gt;VNC was also in my survey notes, though I never installed it. With GNOME on Ubuntu 26.04 in this configuration, everything runs on Wayland with GNOME Remote Desktop speaking RDP. The VNC options I looked into required either X11 or &lt;code&gt;wlroots&lt;/code&gt;, and older guides referencing a VNC toggle in GNOME Settings no longer matched this release.&lt;/p&gt;
&lt;p&gt;So I moved on to Guacamole, deploying &lt;code&gt;guacamole&lt;/code&gt;, &lt;code&gt;guacd&lt;/code&gt;, and PostgreSQL via Docker on the DeskMini over October 21–22. I pinned version &lt;code&gt;1.6.0&lt;/code&gt; because it was the first release supporting the RDP Graphics Pipeline (and the &lt;code&gt;latest&lt;/code&gt; tag at the time pointed to an &lt;code&gt;amd64&lt;/code&gt;-only development build).&lt;/p&gt;
&lt;p&gt;The desktop connected, but sessions kept dropping mid-use. The drops happened over both QUIC and HTTP/2 tunnels, and &lt;code&gt;cloudflared&lt;/code&gt; logged no errors corresponding to the disconnects — so switching the tunnel transport didn&amp;rsquo;t help. In the logs I captured, &lt;code&gt;guacd&lt;/code&gt; reported &lt;code&gt;User is not responding.&lt;/code&gt; after 15 seconds of silence and closed the RDP connection. Those 15-second timeouts are hardcoded at compile time and cannot be changed via configuration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I still haven&amp;rsquo;t pinned down the root cause.&lt;/strong&gt; At first I suspected the browser was throttling timers in background tabs, but sessions dropped even while the tab was focused right in front of me. The most plausible theory at the time was a set of regressions in Guacamole 1.6.0 — specifically &lt;code&gt;GUACAMOLE-2118&lt;/code&gt;, its duplicate reports, and &lt;code&gt;GUACAMOLE-2081&lt;/code&gt;. Those bugs had already been fixed on the &lt;code&gt;1.6.1&lt;/code&gt; branch, which hadn&amp;rsquo;t been released yet when I investigated.&lt;/p&gt;
&lt;p&gt;Even so, I never ran a pure LAN test to rule out the Cloudflare Tunnel completely. There was also one occasion where both SSH and RDP froze simultaneously despite running in separate &lt;code&gt;guacd&lt;/code&gt; processes, which that bug theory doesn&amp;rsquo;t neatly explain either.&lt;/p&gt;
&lt;p&gt;For SSH through Guacamole, disconnects were even more painful: because the shell was tied directly to the browser connection, a single drop could kill a running command and lose unsaved state. That&amp;rsquo;s what pushed me to move terminal workflows out of Guacamole altogether. I had already drafted the Zellij template on October 21 prior to this debugging session, and the Guacamole SSH drops only reinforced how much I needed terminal sessions that outlive a browser tab.&lt;/p&gt;
&lt;p&gt;Initially, I planned to stay on &lt;code&gt;1.6.0&lt;/code&gt; and wait for &lt;code&gt;1.6.1&lt;/code&gt;, falling back to &lt;code&gt;1.5.5&lt;/code&gt; only if the drops became unbearable (downgrading required backing up PostgreSQL and preparing a &lt;code&gt;1.5.5&lt;/code&gt; schema since Guacamole doesn&amp;rsquo;t support reverse migrations).&lt;/p&gt;
&lt;p&gt;By November 3, I stopped using Guacamole and archived its setup because the connection just wasn&amp;rsquo;t reliable enough. Cloudflare&amp;rsquo;s browser-rendered SSH was sufficient for quick terminal access, and whenever I need a full desktop, I use Tailscale with the official Windows RDP app. My original goal was making everything 100% browser-based, but in the end I compromised on using a native RDP client for desktop sessions.&lt;/p&gt;
&lt;h2 id="whats-running-on-the-deskmini-today"&gt;What&amp;rsquo;s Running on the DeskMini Today&lt;/h2&gt;&lt;p&gt;As of the state recorded when writing this post, browser SSH, &lt;code&gt;code-server&lt;/code&gt;, T3 Code, and Orca are all accessible through &lt;strong&gt;Cloudflare Tunnel and Access&lt;/strong&gt;, while Tailscale connects my personal devices directly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;code-server&lt;/code&gt;&lt;/strong&gt; is installed from the official &lt;code&gt;.deb&lt;/code&gt; package, runs via &lt;code&gt;systemd&lt;/code&gt;, and has been in my machine notes since October 22. Since it can&amp;rsquo;t use official VS Code Settings Sync, I plan to keep its configuration and extension list — Claude Code plus a theme — in my dotfiles and apply them via a manual script. I haven&amp;rsquo;t applied those dotfiles to the DeskMini yet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Orca and T3 Code&lt;/strong&gt; were recently migrated from desktop GUI launches to &lt;code&gt;systemd&lt;/code&gt; user services. I installed Orca (&lt;code&gt;stablyai/orca&lt;/code&gt;) from its &lt;code&gt;.deb&lt;/code&gt; package on October 27 (I didn&amp;rsquo;t record the exact date I installed T3 Code). According to my notes, the goal of moving them to user services in early November was having them come up automatically on boot without needing to log into the desktop session first. One quirk with Orca: when run with &lt;code&gt;--supervise&lt;/code&gt;, the service waits if another Orca instance is already serving the same profile, so launching the desktop app first can make the background service wait.&lt;/p&gt;
&lt;p&gt;In my November 2 comparison notes, Orca is described as a desktop workspace built around Git worktrees that runs agent CLIs directly inside terminals, whereas T3 Code organizes work around conversation threads, drives agents through adapters, and offers a lightweight web UI. That comparison was based purely on documentation rather than side-by-side testing, and its conclusion was to keep Orca as my primary tool while trying T3 Code for steering agents from a phone or browser. Today, both run as services, and Orca is the app I use the most.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tailscale and &lt;code&gt;cloudflared&lt;/code&gt;&lt;/strong&gt; split responsibilities cleanly: Cloudflare Tunnel + Access handle remote sign-in and web UIs, while Tailscale handles direct traffic between my own devices. I went with this split because I found it simpler than setting up WARP-to-WARP. For GNOME Remote Desktop, my research notes distinguish between remote login at the GDM login screen and desktop sharing after logging in, though I don&amp;rsquo;t have recorded test results for that part yet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Gitea and &lt;code&gt;gitea-mirror&lt;/code&gt;&lt;/strong&gt; run from my &lt;code&gt;composes&lt;/code&gt; repo as my local GitHub backup on the DeskMini. I already told the story of AI crawlers discovering my Gitea instance in &lt;a href="https://miti99.com/en/post/2026/10/29/"&gt;the October 29, 2026 post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Setting up the mirror had its own hiccups: Gitea&amp;rsquo;s default timeouts cut off multi-gigabyte clones mid-transfer, and Bun&amp;rsquo;s &lt;code&gt;fetch&lt;/code&gt; aborted connections after five minutes without data, leaving half-imported repos behind. Bumping the timeouts fixed that. Health checks polling the GitHub API without a token also hit anonymous rate limits until I lowered their frequency. And in the CLI tooling, I replaced &lt;code&gt;tea&lt;/code&gt; with &lt;code&gt;gt&lt;/code&gt; after &lt;code&gt;tea&lt;/code&gt; was archived upstream and &lt;code&gt;gt&lt;/code&gt; hit &lt;code&gt;1.0.0&lt;/code&gt;. As for why I moved the backup instance from the cloud server to my home DeskMini, I didn&amp;rsquo;t write the reason down, so I won&amp;rsquo;t attribute it to a specific incident.&lt;/p&gt;
&lt;h2 id="remote-power-on-from-rtc-wake-to-a-smart-plug"&gt;Remote Power-On: From RTC Wake to a Smart Plug&lt;/h2&gt;&lt;p&gt;Originally, waking the machine remotely wasn&amp;rsquo;t even in scope. My research notes mentioned using an ESP32 listening to a Telegram bot to send Wake-on-LAN / power signals, though I never built it.&lt;/p&gt;
&lt;p&gt;Starting October 28, I used RTC wake (&lt;code&gt;rtcwake&lt;/code&gt;) via a &lt;code&gt;systemd&lt;/code&gt; unit to schedule the DeskMini to boot itself up. The catch with RTC wake is that a power outage or hard shutdown can cause the machine to miss setting the next wake alarm.&lt;/p&gt;
&lt;p&gt;On November 3, I removed the OS-level RTC wake schedule and switched toward using a smart plug paired with the BIOS &amp;ldquo;restore on AC power loss&amp;rdquo; setting. I didn&amp;rsquo;t record the exact trigger for dropping RTC wake, but the planned workflow is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Shut the OS down cleanly first — never cut power while the PC is running.&lt;/li&gt;
&lt;li&gt;Turn the smart plug off for about 30 seconds, then turn it back on to trigger boot.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;This part isn&amp;rsquo;t finished yet.&lt;/strong&gt; I still need to disable the RTC alarm in the BIOS, set &lt;em&gt;Restore on AC Power Loss&lt;/em&gt; to &lt;em&gt;Power On&lt;/em&gt;, and test the full smart-plug power cycle as well as simulated power outages. So I can&amp;rsquo;t claim remote power-on via smart plug is working in production just yet.&lt;/p&gt;
&lt;h2 id="coolify-and-two-always-free-cloud-servers"&gt;Coolify and Two Always Free Cloud Servers&lt;/h2&gt;&lt;p&gt;On the cloud side, Coolify manages two OCI Always Free ARM servers running Ubuntu 24.04 Minimal, fronted by Traefik v3 and Let&amp;rsquo;s Encrypt. I chose OCI for its generous, non-expiring free tier. Choosing Coolify over Dokploy came down to personal impression — it felt more stable to me in day-to-day use, though I haven&amp;rsquo;t run formal benchmarks comparing the two. In my compose files, I still keep Dokploy-compatible sections ready just in case.&lt;/p&gt;
&lt;p&gt;My shared deployment configs live in the public &lt;code&gt;composes&lt;/code&gt; repo under the Apache 2.0 license. Each service gets its own folder with a &lt;code&gt;compose.yml&lt;/code&gt;, a &lt;code&gt;README.md&lt;/code&gt;, and an &lt;code&gt;.env.example&lt;/code&gt;, wired up to its own Coolify application with path-filtered webhooks so changes to one service don&amp;rsquo;t trigger redeploys of another. Inline comments explain &lt;em&gt;what&lt;/em&gt; the config does, while the &lt;code&gt;README.md&lt;/code&gt; records &lt;em&gt;why&lt;/em&gt; I chose it. Tools I wrote myself keep their &lt;code&gt;compose.yml&lt;/code&gt; inside their own repositories.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;archive/&lt;/code&gt; directory makes it easy to look back at what I tried and when I retired it. What&amp;rsquo;s occasionally missing is the &lt;em&gt;why&lt;/em&gt; — I didn&amp;rsquo;t always write down the reason I dropped a tool at the moment I removed it.&lt;/p&gt;
&lt;h2 id="keeping-everything-consistent-across-machines"&gt;Keeping Everything Consistent Across Machines&lt;/h2&gt;&lt;p&gt;What keeps both me and my coding agents from getting lost across all these machines is a shared workspace repository checked out everywhere. The repo started on July 25 just to hold a few GitHub audit skills and grew organically from there. By late October, I reorganized per-machine notes so agents only load the context relevant to the host they&amp;rsquo;re running on. Claude Code and Codex share the same rule definitions (though I primarily use Claude Code), and my AgentKit CLI installs the kit into each agent&amp;rsquo;s home directory.&lt;/p&gt;
&lt;p&gt;I split context by how it gets consumed: &lt;strong&gt;rules&lt;/strong&gt; are loaded into every session, &lt;strong&gt;skills&lt;/strong&gt; are read on demand per task, and &lt;strong&gt;memory&lt;/strong&gt; has an always-loaded index pointing to topic files. Hooks block costly mistakes; notes and plans track upcoming work; Git history and docs preserve what already happened. Memory is tracked in Git too. One important lesson I have to keep in mind: only rules are guaranteed to be loaded — if you put a behavioral instruction inside memory, the agent might never read it.&lt;/p&gt;
&lt;p&gt;Dotfiles synchronization, meanwhile, &lt;strong&gt;hasn&amp;rsquo;t been rolled out to any machine yet&lt;/strong&gt;. In my October 29 comparison, I picked &lt;code&gt;chezmoi&lt;/code&gt;: it was the only tool in the group that ships as a single native binary on Windows, supports per-machine templates, prompts once for machine variables, integrates with &lt;code&gt;sops&lt;/code&gt; when applying files, and offers a dry-run diff preview. &lt;code&gt;dotter&lt;/code&gt; came in second, while Ansible required WSL on Windows and felt too heavy compared to managing config files directly.&lt;/p&gt;
&lt;p&gt;My toolchain plan evolved too: on October 30, I dropped &lt;code&gt;mise&lt;/code&gt; from the plan in favor of ecosystem-native managers — &lt;code&gt;rustup&lt;/code&gt;, &lt;code&gt;uv&lt;/code&gt;, &lt;code&gt;fnm&lt;/code&gt;, SDKMAN (or Temurin via &lt;code&gt;winget&lt;/code&gt; on Windows), and the official Go binary with &lt;code&gt;GOTOOLCHAIN=auto&lt;/code&gt;. I didn&amp;rsquo;t log any specific bug with &lt;code&gt;mise&lt;/code&gt; when making that switch.&lt;/p&gt;
&lt;p&gt;For the shell, I plan to switch from &lt;code&gt;oh-my-zsh&lt;/code&gt; + &lt;code&gt;powerlevel10k&lt;/code&gt; to &lt;code&gt;zsh&lt;/code&gt; + &lt;code&gt;zimfw&lt;/code&gt; + Starship. Among the frameworks I compared, &lt;code&gt;zimfw&lt;/code&gt; was the most popular actively maintained option and the fastest in recorded benchmarks, with built-in completions covering nearly everything I need — whereas &lt;code&gt;powerlevel10k&lt;/code&gt;&amp;rsquo;s README explicitly notes that project maintenance is now very limited. That switch is still on the to-do list; the servers are still running &lt;code&gt;oh-my-zsh&lt;/code&gt; for now.&lt;/p&gt;
&lt;h2 id="unfinished-tasks-and-lessons-learned"&gt;Unfinished Tasks and Lessons Learned&lt;/h2&gt;&lt;p&gt;As of November 4, 2026, two items are still unfinished:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Updating the DeskMini BIOS settings and testing smart-plug power-on, including recovery after a power cut.&lt;/li&gt;
&lt;li&gt;Rolling out the dotfiles repo across my machines.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Looking back over all these iterations, a few lessons stand out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Record the &lt;em&gt;why&lt;/em&gt;, not just the &lt;em&gt;what&lt;/em&gt;.&lt;/strong&gt; Git history reconstructs &lt;em&gt;what&lt;/em&gt; changed and &lt;em&gt;when&lt;/em&gt;, but it can&amp;rsquo;t tell you your motivation if you didn&amp;rsquo;t write it down. Jotting down the reason at decision time saves you from having to reconstruct it later like I did for this post.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Browser-based remote desktops have to be tested against your exact display stack.&lt;/strong&gt; On my GNOME Wayland setup, the RDP Graphics Pipeline requirement ruled out one browser RDP option right away, and older VNC guides no longer applied.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Terminal sessions should survive closing a browser tab.&lt;/strong&gt; Tying a shell&amp;rsquo;s lifecycle directly to a browser connection means a single hiccup can take down whatever command was running.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Separating language toolchains from the container image keeps version upgrades under your control.&lt;/strong&gt; Redeploying a container shouldn&amp;rsquo;t silently swap out the compiler or runtime version you&amp;rsquo;re actively working with.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Splitting access paths by use case makes daily life much simpler.&lt;/strong&gt; Cloudflare Tunnel + Access handle browser logins and web UIs; Tailscale handles direct device-to-device connections.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This setup will surely keep evolving. Right now, I spend most of my time in Orca, keep &lt;code&gt;code-server&lt;/code&gt; around for opening workspaces in a browser, and let the DeskMini and cloud servers do the heavy lifting. Every tool I tried and retired along the way made it much clearer what I actually need next time.&lt;/p&gt;</description></item><item><title>Newsletter #137</title><link>https://miti99.com/en/post/2026/10/05/</link><pubDate>Mon, 05 Oct 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/10/05/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #137.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-to-name-things"&gt;&lt;a href="https://kolemannix.com/blog/how-to-name-things/" rel="noopener noreferrer"&gt;How to name things&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Koleman Nix argues that naming is one of the most foundational skills in software engineering, because clear language almost always reflects clear thinking. Every time we name a variable, function, API endpoint, or database column, we are communicating with both future human teammates and LLMs. Coding models fly through clean, well-named greenfield codebases, yet gradually bog down as terminology across a repo becomes inconsistent and &amp;ldquo;slop-fried&amp;rdquo;—meaning sustainable velocity with AI agents requires continuously pruning and sharpening your domain vocabulary. Properly understood, DRY means every piece of domain knowledge has a single authoritative representation, not merging two numbers that happen to be equal: a maximum username length of 64 and a work-queue depth of 64 are two completely separate truths that belong in two separate named constants. Nix pushes back against rigid mechanical naming conventions, which often serve as an excuse to avoid thinking; what should be consistent is your naming &lt;em&gt;process&lt;/em&gt;—capturing what a thing &lt;em&gt;is&lt;/em&gt; rather than how it happens to be used today, and respecting symmetry like &lt;code&gt;src&lt;/code&gt; and &lt;code&gt;dst&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Good naming is an act of intellectual empathy, whereas naming something after your immediate caller&amp;rsquo;s need is short-sighted. A &lt;code&gt;created_at&lt;/code&gt; column makes sense for an internal row timestamp, but a scanned birth certificate uploaded in 2023 needs distinct &lt;code&gt;uploaded_at&lt;/code&gt; and &lt;code&gt;record_date&lt;/code&gt; fields. Similarly, a helper named &lt;code&gt;mergeTargetValuesIntoSourceTemplate&lt;/code&gt; obscures the fact that the function is simply a generic map merge (&lt;code&gt;++&lt;/code&gt;). And a vague field like &lt;code&gt;documentDate&lt;/code&gt; invites two different services to interpret it differently, breeding subtle bugs. His rule of thumb: name things for their intrinsic essence, not their momentary use case.&lt;/p&gt;
&lt;h2 id="postgres-locks-explained"&gt;&lt;a href="https://postgreslocksexplained.com/" rel="noopener noreferrer"&gt;Postgres Locks Explained&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;em&gt;Postgres Locks Explained&lt;/em&gt; is an interactive visual guide to PostgreSQL locking—&amp;ldquo;from beginner to expert&amp;rdquo;—created by Brian (&lt;code&gt;@TheOtherBrian1&lt;/code&gt;), a customer reliability engineer specializing in Postgres administration and observability, who built the resource he wished he&amp;rsquo;d had when first learning how Postgres locks work. The &lt;em&gt;Concepts&lt;/em&gt; section uses step-by-step animations to show why locks exist in the first place: without coordination, a &lt;code&gt;SELECT&lt;/code&gt; reading a page mid-&lt;code&gt;DELETE&lt;/code&gt; could observe half-deleted state, or a concurrent &lt;code&gt;DROP TABLE&lt;/code&gt; could pull the rug out from under an active query. &lt;em&gt;Locks by Example&lt;/em&gt; walks through hands-on two-session scenarios you can run locally, such as how an uncommitted &lt;code&gt;ALTER TABLE&lt;/code&gt; holding an &lt;code&gt;ACCESS EXCLUSIVE&lt;/code&gt; lock blocks even simple &lt;code&gt;SELECT&lt;/code&gt; queries behind it, or how &lt;code&gt;SELECT ... FOR UPDATE&lt;/code&gt; preserves application-level uniqueness invariants when two transactions race to update the same logical entity. An interactive &lt;em&gt;Lock Blocking Graph&lt;/em&gt; lets you click any SQL command—from &lt;code&gt;SELECT&lt;/code&gt; and &lt;code&gt;CREATE INDEX CONCURRENTLY&lt;/code&gt; to &lt;code&gt;VACUUM FULL&lt;/code&gt;—to see every lock mode it acquires and which other commands it blocks.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Troubleshooting&lt;/em&gt; section distills lessons from investigating thousands of production databases a year: lock contention is rarer than unindexed queries or connection-pool exhaustion, which is precisely why developers are often caught flat-footed when a lock queue brings production to a halt. It covers deadlocks, exhausting the shared-memory lock table (&lt;code&gt;out of shared memory&lt;/code&gt; requiring higher &lt;code&gt;max_locks_per_transaction&lt;/code&gt;), cascading lock queues behind a waiting DDL statement, and full-table lockouts, recommending enabling &lt;code&gt;log_lock_waits&lt;/code&gt; so any query waiting longer than &lt;code&gt;deadlock_timeout&lt;/code&gt; is logged automatically. Finally, the &lt;em&gt;Monitoring&lt;/em&gt; section shows how to join &lt;code&gt;pg_locks&lt;/code&gt;, &lt;code&gt;pg_stat_activity&lt;/code&gt;, and &lt;code&gt;pg_blocking_pids()&lt;/code&gt; to pinpoint the root blocker at the head of a lock chain, alongside the exact lock-tree queries used by Datadog and pganalyze.&lt;/p&gt;
&lt;h2 id="a-deep-and-fuzzy-dive-into-search"&gt;&lt;a href="https://serenedb.com/blog/fuzzy-search-deep-dive" rel="noopener noreferrer"&gt;A Deep (and Fuzzy) Dive Into Search&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;SereneDB CTO Andrey Abramov revisits and expands his deep dive into fuzzy search, originally written six years ago when his team first built fuzzy matching into the IResearch engine that now powers SereneDB. &amp;ldquo;Fuzzy search&amp;rdquo; is an umbrella term for approximate string-matching algorithms, each built around its own similarity metric. The classic metric is &lt;em&gt;Levenshtein edit distance&lt;/em&gt;: the minimum number of single-character insertions, deletions, and substitutions required to turn one string into another. Computing edit distance via the textbook Wagner–Fischer dynamic programming matrix takes $O(|s_1| \cdot |s_2|)$ time per candidate word, which is far too slow to run against a dictionary of millions of terms. The breakthrough is Schulz and Mihov&amp;rsquo;s (2002) &lt;em&gt;Levenshtein automaton&lt;/em&gt;: given a query word and a maximum edit distance $k$, you construct in linear time a deterministic finite automaton that recognizes &lt;em&gt;every&lt;/em&gt; string within distance $k$, and then intersect that automaton directly with the index&amp;rsquo;s term dictionary trie or Finite State Transducer (FST) to prune non-matching branches in bulk. Because the universal transition tables grow rapidly with $k$, SereneDB caps compiled Levenshtein automata at distance 4 (and distance 3 for Damerau–Levenshtein, which counts adjacent character transpositions as a single edit).&lt;/p&gt;
&lt;p&gt;Because edit distance is sensitive to word length and struggles when multi-word queries have missing or extra words, SereneDB pairs it with &lt;em&gt;n-gram similarity&lt;/em&gt; based on Grzegorz Kondrak&amp;rsquo;s formulation, which computes a longest-common-subsequence-style similarity over character $n$-grams rather than individual letters. Normalizing the score by the query&amp;rsquo;s length rather than the document&amp;rsquo;s length allows short queries to match longer fields naturally. In SereneDB&amp;rsquo;s SQL interface, &lt;code&gt;ts_levenshtein&lt;/code&gt; automatically scales the allowed edit distance by query token length to handle typos, while &lt;code&gt;ts_ngram&lt;/code&gt; defaults to a &lt;code&gt;0.7&lt;/code&gt; similarity threshold—and real-world search pipelines frequently combine both.&lt;/p&gt;
&lt;h2 id="email-encryption"&gt;&lt;a href="https://computer.rip/2026-07-19-email-encryption.html" rel="noopener noreferrer"&gt;email encryption&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In his &lt;em&gt;Computers Are Bad&lt;/em&gt; newsletter, J. B. Crawford traces the long, frustrating history of trying to encrypt email. Born in the high-trust academic networks of the late 1960s and 1970s, internet email (SMTP and RFC 822) was designed with zero built-in confidentiality or sender authentication. The competing OSI protocol suite included X.400, which had structured security extensions, but lost out to simpler internet email and survives today only in specialized closed environments like military and aviation messaging. MIME (&amp;ldquo;email 2.0&amp;rdquo; in the early 1990s) solved 8-bit payloads and attachments, setting the stage for two competing end-to-end encryption standards. Phil Zimmermann&amp;rsquo;s PGP (1991, later standardized as OpenPGP and implemented in GnuPG) decentralized key distribution through a peer-to-peer &amp;ldquo;web of trust,&amp;rdquo; which failed to gain mainstream traction because managing keys and key-signing parties proved too confusing for normal users. S/MIME (1996) instead relied on hierarchical X.509 PKI certificates signed by commercial Certificate Authorities, succeeding inside large enterprises and government agencies thanks to tight integration with Microsoft Exchange and Active Directory, while remaining nearly unusable across organizational boundaries.&lt;/p&gt;
&lt;p&gt;Ironically, the vast majority of email today &lt;em&gt;is&lt;/em&gt; encrypted in transit between mail servers—not end-to-end, but at the transport layer via opportunistic &lt;code&gt;STARTTLS&lt;/code&gt;. Because naive &lt;code&gt;STARTTLS&lt;/code&gt; is vulnerable to active downgrade attacks where a man-in-the-middle strips the &lt;code&gt;250-STARTTLS&lt;/code&gt; advertisement, the industry bolted on additional patches: DANE (binding TLS keys to DNSSEC records), MTA-STS (publishing strict TLS policies over HTTPS), and bilateral TLS enforcement between major providers like Gmail and Microsoft 365. Crawford&amp;rsquo;s takeaway: end-to-end email encryption remains a bolted-on afterthought that lost the usability war, leaving real-world email privacy dependent on hop-by-hop transport encryption managed by major cloud mail providers.&lt;/p&gt;
&lt;h2 id="a-shell-exclamation-mark-is-not-for-yelling-be-lazy"&gt;&lt;a href="https://refp.se/articles/your-shell-and-the-lazy-exclamation-mark" rel="noopener noreferrer"&gt;A shell exclamation mark is not for yelling. Be lazy.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Filip Roséen reintroduces a superpower hiding in Unix shells since &lt;code&gt;csh&lt;/code&gt; in the late 1970s that many developers never use beyond &lt;code&gt;sudo !!&lt;/code&gt;: &lt;strong&gt;history expansion&lt;/strong&gt; (event designators) in &lt;code&gt;bash&lt;/code&gt;, &lt;code&gt;zsh&lt;/code&gt;, &lt;code&gt;csh&lt;/code&gt;, and &lt;code&gt;tcsh&lt;/code&gt;. Programmers preach DRY in source code, yet happily mash the up-arrow key and hold down the left-arrow key to edit previous shell commands by hand. History expansion follows a uniform three-part grammar: &lt;code&gt;![event][:word][:modifier]&lt;/code&gt;. The &lt;em&gt;event&lt;/em&gt; selector picks a command line from history: &lt;code&gt;!!&lt;/code&gt; is the previous command, &lt;code&gt;!-2&lt;/code&gt; is two commands ago, &lt;code&gt;!ssh&lt;/code&gt; is the most recent command starting with &lt;code&gt;&amp;quot;ssh&amp;quot;&lt;/code&gt;, &lt;code&gt;!?needle?&lt;/code&gt; is the most recent command containing &lt;code&gt;&amp;quot;needle&amp;quot;&lt;/code&gt; anywhere, and &lt;code&gt;^old^new^&lt;/code&gt; runs the previous command with the first occurrence of &lt;code&gt;old&lt;/code&gt; replaced by &lt;code&gt;new&lt;/code&gt;. The &lt;em&gt;word&lt;/em&gt; designator selects specific arguments from that command (&lt;code&gt;!:0&lt;/code&gt; is the command name, &lt;code&gt;!:1&lt;/code&gt; is the first argument, &lt;code&gt;!$&lt;/code&gt; is the last argument—as in &lt;code&gt;mkdir /var/mnt/cache&lt;/code&gt; followed by &lt;code&gt;cd !$&lt;/code&gt;, and &lt;code&gt;!*&lt;/code&gt; is all arguments), while &lt;em&gt;modifiers&lt;/em&gt; transform the selected text on the fly: &lt;code&gt;:h&lt;/code&gt; strips a path to its directory head like &lt;code&gt;dirname&lt;/code&gt;, &lt;code&gt;:t&lt;/code&gt; extracts the filename tail like &lt;code&gt;basename&lt;/code&gt;, &lt;code&gt;:r&lt;/code&gt; strips the file extension, &lt;code&gt;:s/a/b/&lt;/code&gt; substitutes text (&lt;code&gt;:gs/a/b/&lt;/code&gt; globally), and &lt;code&gt;:p&lt;/code&gt; prints the expanded command safely without executing it.&lt;/p&gt;
&lt;p&gt;For strict POSIX shells where &lt;code&gt;!&lt;/code&gt; expansion isn&amp;rsquo;t available, the built-in &lt;code&gt;fc&lt;/code&gt; (&lt;em&gt;fix command&lt;/em&gt;) utility lets you open recent commands in &lt;code&gt;$EDITOR&lt;/code&gt; or batch-transform and re-run a range of commands on the fly—such as &lt;code&gt;fc -e 'sed -i s/prod-01/test-01/g' -3 -1&lt;/code&gt; to replay your last three commands against a test host. Roséen recommends mastering a small core toolkit (&lt;code&gt;!!&lt;/code&gt;, &lt;code&gt;!prefix&lt;/code&gt;, &lt;code&gt;!?substr?&lt;/code&gt;, &lt;code&gt;!$&lt;/code&gt;, &lt;code&gt;!:0&lt;/code&gt;, &lt;code&gt;!$:h&lt;/code&gt;, and &lt;code&gt;!$:t&lt;/code&gt;) and turning on &lt;code&gt;shopt -s histverify&lt;/code&gt; in Bash (or &lt;code&gt;setopt HIST_VERIFY&lt;/code&gt; in Zsh), which loads the expanded command onto your prompt line for inspection before you press Enter to run it.&lt;/p&gt;
&lt;h2 id="a-coding-agent-is-six-functions-in-a-trenchcoat"&gt;&lt;a href="https://tidydesign.substack.com/p/a-coding-agent-is-six-functions-in" rel="noopener noreferrer"&gt;A coding agent is six functions in a trenchcoat&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hadley Wickham demystifies what actually sits inside coding agents like Claude Code, Cursor, and Codex. At its core, an agent is an LLM running in a loop with tools that can read and mutate external state, and a coding agent is simply an agent equipped with tools that let it explore and edit a codebase the same way a human developer does. Almost every coding agent boils down to six primitive functions—read a file, write a file, edit a file, list files, search file contents, and run a shell command—paired with a detailed system prompt encoding software engineering best practices. To prove how simple the core mechanism is, Wickham builds a working coding agent from scratch in R using the &lt;code&gt;ellmer&lt;/code&gt; package, starting with just three 5-line functions: &lt;code&gt;read_file&lt;/code&gt;, &lt;code&gt;write_file&lt;/code&gt;, and &lt;code&gt;run_command&lt;/code&gt;. Registering those three tools with clear descriptions and a minimal prompt is already enough for the model to locate a date-parsing function in a repo and write unit tests for it.&lt;/p&gt;
&lt;p&gt;While &lt;code&gt;run_command&lt;/code&gt; is the ultimate &amp;ldquo;escape hatch&amp;rdquo; capable of running &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, or test suites, leaning on raw shell execution for everything is slow, token-heavy, and dangerous because validating whether an arbitrary shell string is safe is notoriously hard. Wickham therefore adds dedicated &lt;code&gt;list_files&lt;/code&gt; and &lt;code&gt;search_files&lt;/code&gt; tools backed by a &lt;code&gt;safe_path()&lt;/code&gt; helper that normalizes paths and rejects any traversal outside the current working directory—while R&amp;rsquo;s default &lt;code&gt;list.files(all.files = FALSE)&lt;/code&gt; automatically hides dotfiles like &lt;code&gt;.Renviron&lt;/code&gt; so secret API keys aren&amp;rsquo;t casually listed. Finally, adding a surgical &lt;code&gt;edit_file(path, old_string, new_string)&lt;/code&gt; tool lets the LLM replace a specific block of lines instead of rewriting an entire 500-line file via &lt;code&gt;write_file&lt;/code&gt;, slashing output token costs and failing loudly if the target context doesn&amp;rsquo;t match rather than silently corrupting the file.&lt;/p&gt;
&lt;h2 id="how-well-do-agents-use-test-and-verification-techniques"&gt;&lt;a href="https://danluu.com/agentic-testing/" rel="noopener noreferrer"&gt;How well do agents use test and verification techniques?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dan Luu investigates a natural question for agentic coding: does instructing a coding agent in its prompt to use specific testing methodologies or formal verification tools actually produce more correct code? Using his &lt;code&gt;zstd&lt;/code&gt;-from-RFC benchmark in Rust, Luu tested Codex with &lt;code&gt;GPT-5.6 Sol&lt;/code&gt; across both &lt;code&gt;medium&lt;/code&gt; and &lt;code&gt;xhigh&lt;/code&gt; reasoning effort settings under 26 different prompt conditions—including a default baseline, TDD, &lt;code&gt;&amp;quot;Make no mistakes&amp;quot;&lt;/code&gt;, self-audit, fuzzing, differential testing, property-based testing, mutation testing, and formal verification tools like TLA+, Kani, Verus, and Lean 4, plus four community testing skills—running roughly 160 trials per condition and plotting pass rates on the hidden test suite against dollar cost.&lt;/p&gt;
&lt;p&gt;The headline result is sobering: &lt;strong&gt;none of the prompted testing or verification methodologies significantly outperformed the unprompted baseline&lt;/strong&gt;, and several actively hurt correctness or blew up token costs. When told to use an advanced tool, agents overwhelmingly went through the motions superficially to satisfy the prompt rather than using the tool to find real bugs in their implementation. Told to use Verus, the agent proved trivial, tautological properties about toy helper structs instead of verifying the actual &lt;code&gt;zstd&lt;/code&gt; decoder; in 159 out of 160 TLA+ runs, the agent wrote a standalone &lt;code&gt;.tla&lt;/code&gt; model file that never informed or changed a single line of the Rust code; and in 135 out of 160 &amp;ldquo;differential testing&amp;rdquo; runs, the agent never even compared two independent implementations. Prompting for strict TDD performed worse than baseline, frequently missing the tricky 4-stream Huffman jump-table edge case. Naive fuzzing mostly generated random invalid byte streams that bounced off the header parser, though in the 10 runs where the agent bothered to build a &lt;em&gt;structure-aware&lt;/em&gt; fuzzer, half of them uncovered real decoder bugs. Luu&amp;rsquo;s takeaway: simply naming a methodology like &amp;ldquo;use property-based testing&amp;rdquo; or &amp;ldquo;use formal verification&amp;rdquo; in a prompt does very little—to get real leverage, you have to wire up the verification harness yourself and iterate on what the agent actually executes.&lt;/p&gt;
&lt;h2 id="how-one-connection-kills-a-database"&gt;&lt;a href="https://planetscale.com/blog/debugging-live-database-connections" rel="noopener noreferrer"&gt;How one connection kills a database&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Simeon Griggs at PlanetScale opens with a classic production murder mystery: every single query to your database is timing out, CPU and disk I/O are practically idle—what happened? He recalls a famous GitHub outage on MySQL where a routine schema change needed an exclusive metadata lock on a hot table, got blocked behind a single long-running open transaction that had touched that table earlier, and subsequently caused every new &lt;code&gt;SELECT&lt;/code&gt; and &lt;code&gt;UPDATE&lt;/code&gt; on the table to queue up behind the waiting DDL statement. There is no deadlock (so the deadlock detector never steps in), and the outage lasts until someone finds and kills the single idle connection sitting at the very front of the queue. Griggs reproduces the exact same failure mode on PostgreSQL: an application worker runs &lt;code&gt;BEGIN;&lt;/code&gt; and &lt;code&gt;SELECT * FROM orders LIMIT 1;&lt;/code&gt;, hits an unhandled exception in application code, and leaks the connection back into limbo without ever issuing &lt;code&gt;COMMIT&lt;/code&gt; or &lt;code&gt;ROLLBACK&lt;/code&gt;. That &lt;code&gt;idle in transaction&lt;/code&gt; session holds only a harmless &lt;code&gt;ACCESS SHARE&lt;/code&gt; lock, until a deployment runs &lt;code&gt;ALTER TABLE orders ADD COLUMN ...&lt;/code&gt;, which requests an &lt;code&gt;ACCESS EXCLUSIVE&lt;/code&gt; lock, waits behind the leaked session, and blocks every subsequent query on &lt;code&gt;orders&lt;/code&gt; behind the pending migration.&lt;/p&gt;
&lt;p&gt;Because PostgreSQL ships with &lt;code&gt;idle_in_transaction_session_timeout&lt;/code&gt; disabled (&lt;code&gt;0&lt;/code&gt;) by default, a single unhandled exception in app code can take down an entire table during a deploy—and when the resulting lock queue exhausts &lt;code&gt;max_connections&lt;/code&gt;, you can&amp;rsquo;t even open a &lt;code&gt;psql&lt;/code&gt; shell to inspect &lt;code&gt;pg_stat_activity&lt;/code&gt;. To make recovering from these pileups effortless, PlanetScale built a live &lt;strong&gt;Connections&lt;/strong&gt; inspector backed by reserved superuser connection slots that visualizes active processes, transaction age, and the exact blocker tree in real time, offering three surgical kill actions: &lt;em&gt;Cancel Query&lt;/em&gt; (&lt;code&gt;pg_cancel_backend&lt;/code&gt;), &lt;em&gt;Terminate Transaction&lt;/em&gt;, or &lt;em&gt;Terminate Connection&lt;/em&gt; (&lt;code&gt;pg_terminate_backend&lt;/code&gt;)—noting that canceling the query does nothing here because the &lt;code&gt;SELECT&lt;/code&gt; already finished inside the open transaction. The same real-time blocker tree is also available in the CLI via &lt;code&gt;pscale branch connections top&lt;/code&gt; and &lt;code&gt;show --format json&lt;/code&gt; for scripts and agents.&lt;/p&gt;
&lt;h2 id="todos-considered-harmful"&gt;&lt;a href="https://frequal.com/java/TodosConsideredHarmful.html" rel="noopener noreferrer"&gt;TODOs Considered Harmful&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Andrew Oliver warns that in an era where autonomous coding agents roam repositories with less and less human supervision, &lt;code&gt;// TODO&lt;/code&gt; comments have turned from harmless reminders into ticking time bombs. Historically, developers jotted down &lt;code&gt;TODO&lt;/code&gt; comments in a hurry as half-baked notes to self—rarely reviewed with the rigor of executable code, never tested, and frequently left to rot as the surrounding architecture evolved. Over the past year, however, engineering teams have moved from using AI as an interactive Stack Overflow replacement to turning agents loose on whole modules with instructions to &amp;ldquo;clean up tech debt&amp;rdquo; or &amp;ldquo;fix outstanding issues.&amp;rdquo; To an eager coding agent, a &lt;code&gt;TODO&lt;/code&gt; comment looks like an explicit, authoritative specification written by a human engineer begging to be implemented.&lt;/p&gt;
&lt;p&gt;The danger is that &lt;code&gt;TODO&lt;/code&gt; comments frequently describe an idea that was wrong when written, became obsolete three refactorings ago, or omitted critical domain constraints that lived only in the original author&amp;rsquo;s head. Because LLMs treat in-repo comments as trusted context and lack the historical context to judge whether a five-year-old &lt;code&gt;TODO: cache this lookup&lt;/code&gt; is actually safe under concurrent writes, an agent will cheerfully turn a bad &lt;code&gt;TODO&lt;/code&gt; into real production code—and Oliver notes he has already watched this exact failure mode cause production incidents. His advice: stop letting new &lt;code&gt;TODO&lt;/code&gt;s slip through code review (if a fix is important enough to mention, either fix it now or file a tracked issue with proper acceptance criteria), audit and purge stale &lt;code&gt;TODO&lt;/code&gt;s across your codebase before unleashing background maintenance agents, and if a note truly must live in the code, write an explanatory comment documenting &lt;em&gt;why&lt;/em&gt; the current code works the way it does rather than an open-ended instruction to change it.&lt;/p&gt;
&lt;h2 id="git-worktree-gotchas"&gt;&lt;a href="https://www.olafalders.com/2026/09/16/git-worktree-gotchas/" rel="noopener noreferrer"&gt;git worktree gotchas&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Olaf Alders notes that &lt;code&gt;git worktree&lt;/code&gt;—once a niche power-user feature—has gone mainstream thanks to developers running multiple coding agents in parallel across separate branches, but it comes with a few sharp edges if your tooling assumes a traditional single-checkout layout. In Git&amp;rsquo;s terminology, your initial &lt;code&gt;git clone&lt;/code&gt; creates the &lt;em&gt;main working tree&lt;/em&gt;, while &lt;code&gt;git worktree add&lt;/code&gt; creates &lt;em&gt;linked working trees&lt;/em&gt;. Almost every worktree gotcha stems from one implementation detail: inside a linked worktree, &lt;code&gt;.git&lt;/code&gt; is &lt;strong&gt;not a directory&lt;/strong&gt;—it is a plain text file containing a &lt;code&gt;gitdir:&lt;/code&gt; pointer back to &lt;code&gt;.git/worktrees/&amp;lt;name&amp;gt;&lt;/code&gt; inside the main working tree. Consequently, any naive script or tool that walks up parent directories looking for a &lt;code&gt;.git/&lt;/code&gt; &lt;em&gt;directory&lt;/em&gt; to find the repository root will walk right past the top of a linked worktree—and if you nested your linked worktrees inside a subdirectory of your main working tree, that script will silently resolve to the main working tree instead, running against the wrong files! Alders keeps his linked worktrees in a sibling directory outside the main checkout and recommends always using &lt;code&gt;git rev-parse --show-toplevel&lt;/code&gt; to find the current worktree root, or &lt;code&gt;dirname &amp;quot;$(git rev-parse --git-common-dir)&amp;quot;&lt;/code&gt; when a script inside a linked worktree needs to locate gitignored files like &lt;code&gt;.env&lt;/code&gt; in the main working tree.&lt;/p&gt;
&lt;p&gt;A third gotcha bites when running coding agents inside filesystem sandboxes like &lt;code&gt;nono&lt;/code&gt;, Docker, Landlock, or macOS Seatbelt. By default, Git hooks live in &lt;code&gt;.git/hooks&lt;/code&gt; inside the main working tree, which is outside the linked worktree&amp;rsquo;s directory tree and therefore blocked by the sandbox when the agent tries to run &lt;code&gt;git commit&lt;/code&gt;. The clean fix is to check your hooks into a tracked &lt;code&gt;.githooks/&lt;/code&gt; directory inside the repo and set &lt;code&gt;git config core.hooksPath .githooks&lt;/code&gt; using a &lt;strong&gt;relative&lt;/strong&gt; path. Because Git always &lt;code&gt;chdir&lt;/code&gt;s to the current worktree&amp;rsquo;s top-level directory before executing a hook, a relative &lt;code&gt;core.hooksPath&lt;/code&gt; resolves cleanly inside every linked worktree and stays completely within the sandbox boundary.&lt;/p&gt;</description></item><item><title>Newsletter #135</title><link>https://miti99.com/en/post/2026/10/03/</link><pubDate>Sat, 03 Oct 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/10/03/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #135.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="git-at-any-scale"&gt;&lt;a href="https://cursor.com/blog/git-at-any-scale" rel="noopener noreferrer"&gt;Git at any scale&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Vicent Martí explains why hosting centralized Git repositories at massive scale is notoriously difficult: Git packfiles are large binary blobs that expect to live on a local POSIX filesystem with fast &lt;code&gt;mmap&lt;/code&gt; random access. Early attempts to ditch packfiles and store loose Git objects in distributed key-value stores made &lt;code&gt;git clone&lt;/code&gt; unusably slow, because walking the commit and tree graph incurred a network round trip at every hop. Shared network filesystems like NFS, GFS, or DRBD proved slow, brittle, and operationally painful. GitHub&amp;rsquo;s Spokes replicates repositories at the application layer using a three-phase commit for reference transactions, but push throughput is bottlenecked by the slowest replica, and fixing every repo at three copies over-provisions cold repos while under-provisioning hot CI monorepos—all while requiring a massive central routing database.&lt;/p&gt;
&lt;p&gt;Cursor&amp;rsquo;s &lt;em&gt;Continuity&lt;/em&gt; engine flips the architecture by making a write-ahead log (WAL) on S3-compatible object storage the single source of truth. Every &lt;code&gt;git push&lt;/code&gt; writes its pack data and ref update to the WAL before acknowledging the client, becoming visible only after the reference transaction succeeds and updates the WAL index—making all pushes strictly linearizable. Standard on-disk Git repositories on local NVMe drives act purely as stateless, disposable caches reconstructed on demand from the WAL, eliminating consensus protocols entirely. Nodes are selected via rendezvous hashing, while write safety relies on S3&amp;rsquo;s conditional compare-and-swap (&lt;code&gt;If-Match&lt;/code&gt; / &lt;code&gt;If-None-Match&lt;/code&gt;). Read replicas receive invalidation hints over UDP gossip and verify freshness via conditional &lt;code&gt;GET&lt;/code&gt; requests with ETags in under 10 ms. Only the primary node runs packfile compaction; replicas simply download compacted packs from S3. Benchmarks on Cursor&amp;rsquo;s own monorepo show linear read scaling up to 100 replicas, ~120 pushes/sec on S3 Standard, and over 300 pushes/sec on S3 Express One Zone—laying the foundation for Origin, Cursor&amp;rsquo;s Git hosting platform built for high-concurrency agent workloads.&lt;/p&gt;
&lt;h2 id="regressive-jpegs"&gt;&lt;a href="https://maurycyz.com/projects/bad_jpeg/" rel="noopener noreferrer"&gt;Regressive JPEGs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Maurycy explores a delightfully cursed trick with progressive JPEGs, a format designed to transmit low-frequency image components first so a partially downloaded photo appears blurry rather than half-blank. Inside a progressive JPEG, compressed image data is divided into multiple &amp;ldquo;scans,&amp;rdquo; each with its own header specifying which color channels (&lt;code&gt;Y&lt;/code&gt;, &lt;code&gt;Cb&lt;/code&gt;, &lt;code&gt;Cr&lt;/code&gt;), which range of DCT frequency bins, and which bit-precision slice it contains. The first scan normally carries the DC (average color) bin for all three channels, while subsequent scans progressively fill in high-frequency AC detail. Because each scan declares its own spectral range, the author realized nothing stops a later scan from &lt;em&gt;overwriting&lt;/em&gt; frequency bins that were already rendered—meaning you can concatenate multiple same-resolution images into a single JPEG file (stripping their intermediate &lt;code&gt;SOI&lt;/code&gt;, &lt;code&gt;SOF&lt;/code&gt;, and &lt;code&gt;EOI&lt;/code&gt; markers) so the image morphs from one picture into another as it loads over a slow connection.&lt;/p&gt;
&lt;p&gt;The catch is that browsers cap the maximum number of scans they will decode before giving up (likely as a defense against decompression bombs), limiting full-detail progressive overwrites to about nine frames. To cram a real animation into a single JPEG, you have to minimize the number of scans per frame. Because the JPEG spec forbids mixing DC and AC coefficients in the same progressive scan, the smallest possible frame is a single DC-only scan—producing a blocky 8×8-pixel-per-block low-res image. Using one DC scan per frame, Chrome renders roughly 90 frames before bailing out, Firefox keeps going even longer, and ghosting artifacts vanish because there are no leftover AC coefficients from earlier frames bleeding through. The result is an entire multi-second video inside a valid &lt;code&gt;.jpg&lt;/code&gt; file—utterly useless in production since playback speed is dictated entirely by network bandwidth, but prime material for a rickroll.&lt;/p&gt;
&lt;h2 id="a-quick-look-at-zero-knowledge-proofs"&gt;&lt;a href="https://bernsteinbear.com/blog/zkp/" rel="noopener noreferrer"&gt;A quick look at zero-knowledge proofs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Max Bernstein and Chris Gregory demystify zero-knowledge proofs (ZKPs) through a classic example that has nothing to do with cryptocurrency: proving a graph is 3-colorable, following Goldreich, Micali, and Wigderson&amp;rsquo;s 1986 paper. In a ZKP, a &lt;em&gt;prover&lt;/em&gt; claims to know a secret solution to a hard problem, and a &lt;em&gt;verifier&lt;/em&gt; wants to be convinced the prover truly knows it without learning a single bit about the solution itself. Graph 3-coloring—assigning one of three colors to every vertex so no two connected vertices share a color—is NP-complete to solve but trivial to check locally along any single edge. Each round of the interactive protocol runs in four steps: the prover randomly permutes the three color names, &amp;ldquo;locks&amp;rdquo; each vertex&amp;rsquo;s permuted color inside a sealed box, and sends all the locked boxes to the verifier; the verifier picks one random edge &lt;code&gt;(u, v)&lt;/code&gt; and challenges the prover; the prover sends back the keys to only boxes &lt;code&gt;u&lt;/code&gt; and &lt;code&gt;v&lt;/code&gt;; and the verifier opens those two boxes to verify that their colors are valid and different.&lt;/p&gt;
&lt;p&gt;In Python code, a &amp;ldquo;locked box&amp;rdquo; is a cryptographic commitment: the hash of the vertex&amp;rsquo;s color concatenated with a random cryptographic nonce (using &lt;code&gt;hashlib.sha256&lt;/code&gt; and &lt;code&gt;secrets&lt;/code&gt;), since hashing the color alone without a random nonce would produce identical hashes for same-colored vertices and leak the coloring structure. Because a cheating prover who doesn&amp;rsquo;t actually have a valid 3-coloring can still get lucky unless the verifier picks the exact edge that violates the rules, a single round catches a cheater with probability at least $1/m$ (where $m$ is the number of edges). Repeating the protocol with fresh random color permutations and nonces for $m^2$ rounds drives the probability of forgery down exponentially: on a 1,000-edge graph, ~4,600 rounds reduce the soundness error below 1%, and 10,000 rounds drop it to 0.0045%. The authors build a working client-server demo and note that because 3-coloring is NP-complete, any NP problem—from Sudoku to integer factorization—can theoretically be reduced to it, even if the resulting circuit graph balloons quickly in size.&lt;/p&gt;
&lt;h2 id="the-pulse-we-need-to-talk-about-migrations-with-ai"&gt;&lt;a href="https://blog.pragmaticengineer.com/the-pulse-we-need-to-talk-about-migrations-with-ai/" rel="noopener noreferrer"&gt;The Pulse: We need to talk about migrations with AI&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this free edition of &lt;em&gt;The Pulse&lt;/em&gt;, Gergely Orosz argues that AI coding tools have fundamentally changed the economics of large-scale code migrations that teams previously put off for years as prohibitively expensive. The headline example comes from Asana: according to an OpenAI case study, Asana used Codex to rip out Enzyme and migrate their test suite to React Testing Library in roughly 1.5 engineer-weeks and ~$12,000 in model and compute costs—a migration previously estimated at $6 million and five years of background effort. Similarly, Airbnb migrated 3,500 Enzyme test files in six weeks (versus a 1.5 engineer-year manual estimate), Uber migrated 600,000 JUnit 4 tests to JUnit 5 in four months with two engineers, and Bun ported 530,000 lines of Zig to Rust in two weeks for $165,000 in API spend. By contrast, back in 2021 Sentry spent 1.5 years and roughly ten engineers migrating 95,000 lines of JavaScript to TypeScript.&lt;/p&gt;
&lt;p&gt;Across these successes, the same engineering patterns recur: automated retry loops when a migrated file fails to build or pass tests, multi-phase per-file pipelines, engineer-designed verification harnesses, starting with leaf files or frequently touched files first, and refactoring the codebase beforehand so patterns are uniform for the LLM. Orosz notes that Asana&amp;rsquo;s &amp;ldquo;$6M saved&amp;rdquo; headline is likely inflated—manual estimates rarely account for humans getting much faster after the first hundred files—and stresses that every single migration still required experienced engineers to design the pipeline, build the verification gates, and handle edge cases. Even so, the cost-benefit curve for paying down massive technical debt has shifted permanently.&lt;/p&gt;
&lt;h2 id="the-accidental-application-runtime"&gt;&lt;a href="https://adventures.michaelfbryan.com/posts/accidental-application-runtime" rel="noopener noreferrer"&gt;The Accidental Application Runtime&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Michael F. Bryan describes how a small Go service managing a 3D-printer farm gradually grew into an tangled mess. It started as a simple dashboard where the HTTP server spawned a single background goroutine to poll printer status. Over time, polling jobs from a cloud backend, persisting state to SQLite, scheduling print jobs, streaming G-code, and reporting telemetry were all bolted onto that same initialization block until &lt;code&gt;NewServer&lt;/code&gt; was spawning five long-running background goroutines. When the team needed to add graceful shutdown on &lt;code&gt;SIGTERM&lt;/code&gt;, figuring out which goroutines were running, in what order they needed to stop, and who owned closing which Go channels required reading the entire startup file line by line. Bryan calls this an &amp;ldquo;accidental application runtime&amp;rdquo;: the service had a real concurrent pub/sub architecture, but nothing in the code&amp;rsquo;s structure made that topology explicit.&lt;/p&gt;
&lt;p&gt;Inspired by the PX4 drone autopilot&amp;rsquo;s uORB messaging layer, Bryan built a lightweight Go library called &lt;code&gt;backplane&lt;/code&gt;. Each subsystem becomes a plain Go function &lt;code&gt;func(ctx, deps...) error&lt;/code&gt; whose typed parameters declare its communication topology: a &lt;code&gt;chan&amp;lt;- T&lt;/code&gt; parameter publishes to topic &lt;code&gt;T&lt;/code&gt;, &lt;code&gt;&amp;lt;-chan T&lt;/code&gt; subscribes to a stream of &lt;code&gt;T&lt;/code&gt;, and &lt;code&gt;*backplane.Latest[T]&lt;/code&gt; polls the latest state snapshot. Topics are keyed by Go types rather than error-prone string names. &lt;code&gt;backplane.New&lt;/code&gt; validates the dependency graph before startup, and &lt;code&gt;Run&lt;/code&gt; supervises the modules like an &lt;code&gt;errgroup&lt;/code&gt; with in-process, backpressured delivery. Rebuilding the printer service as six explicit modules—anchored by a strict &lt;em&gt;commit-then-notify&lt;/em&gt; rule where the scheduler commits job state to SQLite before publishing a wake-up message—even let the team auto-generate accurate Mermaid architecture diagrams straight from the function signatures.&lt;/p&gt;
&lt;h2 id="generic-methods-in-go-127"&gt;&lt;a href="https://dominik.info/blog/go-generic-methods" rel="noopener noreferrer"&gt;Generic Methods in Go 1.27&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;When Go 1.18 introduced generics in 2022, functions and types could declare type parameters, but methods could not declare additional type parameters of their own. Go 1.27 finally lifts that restriction: methods can now introduce their own type parameters without polluting the receiver struct. Dominik Braun illustrates why this matters using a generic graph node &lt;code&gt;Node[T]&lt;/code&gt;. Previously, if you wanted a &lt;code&gt;Map&lt;/code&gt; method that transforms a &lt;code&gt;Node[T]&lt;/code&gt; into a &lt;code&gt;Node[U]&lt;/code&gt;, you either had to pollute the struct definition itself as &lt;code&gt;Node[T, U]&lt;/code&gt;—forcing every unrelated method on &lt;code&gt;Node&lt;/code&gt; to carry &lt;code&gt;U&lt;/code&gt; around—or give up on method syntax and write a standalone package-level function &lt;code&gt;Map[T, U any](n *Node[T], ...)&lt;/code&gt;. Starting in Go 1.27, you can simply write &lt;code&gt;func (n *Node[T]) Map[U any](...) Node[U]&lt;/code&gt;, scoping &lt;code&gt;U&lt;/code&gt; strictly to the &lt;code&gt;Map&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;Why did this take four years to land? The hurdle lay in how Go compiles generics versus how it dispatches interfaces. Go&amp;rsquo;s compiler primarily uses &lt;em&gt;monomorphization&lt;/em&gt; (stenciling specialized machine code for concrete type shapes at compile time), whereas Go interfaces rely on runtime dynamic dispatch via an &lt;code&gt;itable&lt;/code&gt; of function pointers. Those two models collide if an interface is allowed to declare a generic method like &lt;code&gt;type Mapper interface { Map[U any]() Node[U] }&lt;/code&gt;: the compiler cannot pre-populate a fixed-size runtime vtable for an unbounded set of potential type arguments &lt;code&gt;U&lt;/code&gt;, especially when reflection can look up methods dynamically at runtime. Go&amp;rsquo;s pragmatic compromise in 1.27 is to allow generic methods on concrete types while forbidding them in interface definitions—and a generic method cannot be used to satisfy an interface.&lt;/p&gt;
&lt;h2 id="your-executable-is-a-sqlite-database"&gt;&lt;a href="https://fzakaria.com/2026/08/23/your-executable-is-a-sqlite-database" rel="noopener noreferrer"&gt;Your executable is a SQLite database&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Farid Zakaria, author of &lt;code&gt;sqlelf&lt;/code&gt;, takes his previous experiment to its logical conclusion: replacing ELF entirely with SQLite as a native Linux executable format. His prototype, &lt;strong&gt;SELF&lt;/strong&gt; (&lt;em&gt;Structured Executable &amp;amp; Linkable Format&lt;/em&gt;), produces real SQLite database files that you can &lt;code&gt;chmod +x&lt;/code&gt; and run directly from the shell. His core argument is that ELF is already an ad-hoc, bespoke relational database in denial: &lt;code&gt;.strtab&lt;/code&gt; is string interning, &lt;code&gt;.gnu.hash&lt;/code&gt; is a hash index, section headers are a catalog table, and symbol versioning is a foreign-key schema. In SELF, an executable&amp;rsquo;s schema consists of a &lt;code&gt;self_meta&lt;/code&gt; table for the ELF header, a &lt;code&gt;segments&lt;/code&gt; table storing each program header row with its raw machine code/data as a SQLite &lt;code&gt;BLOB&lt;/code&gt;, and a &lt;code&gt;symbols&lt;/code&gt; table indexed by standard SQLite B-trees in place of &lt;code&gt;.dynsym&lt;/code&gt; and &lt;code&gt;.gnu.hash&lt;/code&gt;. Registering the SQLite magic header with Linux&amp;rsquo;s &lt;code&gt;binfmt_misc&lt;/code&gt; lets the kernel hand &lt;code&gt;./my_app&lt;/code&gt; directly to &lt;code&gt;self-exec&lt;/code&gt;, a tiny C loader that queries the segments, maps them into memory, performs relocations, and jumps to the entry point.&lt;/p&gt;
&lt;p&gt;For dynamic linking, SELF supports two modes: keeping glibc&amp;rsquo;s standard &lt;code&gt;ld.so&lt;/code&gt; and using an &lt;code&gt;rtld-audit&lt;/code&gt; hook so a SQL query resolves shared libraries, or using &lt;code&gt;self-ld&lt;/code&gt;, an experimental SQL-native dynamic linker. Even cooler, &lt;code&gt;self closure&lt;/code&gt; bundles a binary and all its transitive shared-library dependencies into a single self-contained SQLite database file—turning &lt;code&gt;ldd&lt;/code&gt; into a simple SQL &lt;code&gt;JOIN&lt;/code&gt;. Packing all 723 executables in &lt;code&gt;/usr/bin&lt;/code&gt; into a single shared SELF database shrank total size from 644.4 MiB (ELF) down to 611.9 MiB thanks to cross-binary library and symbol deduplication, even though individual standalone SELF files are 2.2x to 3.6x larger than their ELF counterparts. While copying segments out of SQLite blobs prevents cross-process &lt;code&gt;mmap&lt;/code&gt; page sharing for &lt;code&gt;.text&lt;/code&gt; segments and slows cold start on massive binaries, being able to inspect, strip, or atomically patch executables with &lt;code&gt;UPDATE&lt;/code&gt; and &lt;code&gt;ROLLBACK&lt;/code&gt; is a fascinating glimpse into an alternate Unix universe.&lt;/p&gt;
&lt;h2 id="what-happens-when-a-gpu-reads-memory"&gt;&lt;a href="https://blog.doubleword.ai/what-happens-when-a-gpu-reads-memory" rel="noopener noreferrer"&gt;What happens when a GPU reads memory&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Doubleword founder Fergus Finn traces the exact hardware journey of a single global memory load instruction (&lt;code&gt;LDG.E&lt;/code&gt;) inside an NVIDIA RTX 4090. Because NVIDIA documents very little of its microarchitectural memory pipeline publicly, Finn reverse-engineered the path using custom cycle-accurate microbenchmarks and hardware performance counters. When a 32-thread warp issues a 4-byte load per thread, the hardware coalescer groups those 32 requests into four 32-byte sectors—one 128-byte cache line. On an L1 miss, the virtual address passes through a 16-entry per-SM L1 TLB (backed by 2 MiB pages) to translate into a physical address, because the L2 cache is physically indexed. From there, the chip-wide crossbar routes the request to one of 36 L2 cache slices selected by an undocumented hash of the physical address bits, which in turn forwards L2 misses to one of 12 memory controllers wired to 12 GDDR6X chips—where the controller must issue an expensive DRAM row &lt;code&gt;ACTIVATE&lt;/code&gt; command to open a 1 KiB row before bursting the four 32-byte sectors back.&lt;/p&gt;
&lt;p&gt;The latency ladder is stark: an L1 hit takes ~15.4 ns, an L2 hit takes ~127 ns, and a full miss down to GDDR6X DRAM takes ~255 ns—roughly 660 GPU clock cycles during which that warp sits stalled. Activating a new DRAM row costs roughly 15x more time than reading from an already-open row, and hammering a single L2 slice caps throughput at 1,957 million loads/sec versus ~68,000 million loads/sec when spread evenly across all 36 slices (a 34.8x difference). GPUs hide that 660-cycle latency through massive warp-level parallelism—switching to other ready warps every cycle—which is why memory-bound kernels live or die by coalesced access patterns that spread traffic evenly across L2 slices and DRAM banks.&lt;/p&gt;
&lt;h2 id="a-faster-way-to-calculate-the-day-of-the-week"&gt;&lt;a href="https://www.benjoffe.com/fast-day-of-week" rel="noopener noreferrer"&gt;A faster way to calculate the day-of-the-week&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ben Joffe tackles a deceptively simple problem: converting a signed 32-bit Unix epoch day count (&lt;code&gt;1970-01-01&lt;/code&gt; = Thursday) into a day of the week (&lt;code&gt;0..6&lt;/code&gt;) as fast as possible across the entire 32-bit integer range. Cassio Neri&amp;rsquo;s 2024 algorithm serves as the state-of-the-art baseline, but requires an extra correction step because 7 is an awkward divisor in binary. Joffe&amp;rsquo;s key insight is to exploit the fact that $7 = 2^3 - 1$ is a Mersenne number, which means $N \bmod 7 = \lfloor N \cdot \frac{8}{7} \rfloor \bmod 8$. Multiplying by $\frac{8}{7}$ can be approximated by a single fixed-point multiplication by a magic constant &lt;code&gt;M&lt;/code&gt;, and taking $\bmod 8$ comes almost for free by masking or shifting to keep only the top three bits of the fractional part. A bounded 32-bit version reduces to a one-liner—&lt;code&gt;((u32(rd) * M + Z) &amp;gt;&amp;gt; 29)&lt;/code&gt;—valid across $\pm 242,000$ years, which sped up weekday calculations in the Rust &lt;code&gt;jiff&lt;/code&gt; datetime crate by ~40%.&lt;/p&gt;
&lt;p&gt;To cover the full signed 32-bit domain without overflow, Joffe presents several variants: widening to a 64-bit multiply (already adopted by WebKit), adding a bit-shifted correction term that executes in parallel with the multiply, using two multiplies for higher instruction throughput, or collapsing the entire calculation into three x86 instructions via &lt;code&gt;LEA&lt;/code&gt;. Switching between Sunday-indexed (&lt;code&gt;0..6&lt;/code&gt;) and ISO Monday-indexed (&lt;code&gt;1..7&lt;/code&gt;) output only requires swapping the additive constant &lt;code&gt;Z&lt;/code&gt;. Better yet, the same Mersenne identity generalizes to any divisor of the form $2^N - 2^K$, including &lt;code&gt;x % 24&lt;/code&gt; and &lt;code&gt;x % 60&lt;/code&gt; for extracting hours, minutes, and seconds. Benchmarks show Joffe&amp;rsquo;s variants taking just 0.17x to 0.39x the runtime of Neri&amp;rsquo;s algorithm on an Apple M4 Pro and 0.27x to 0.59x on a Ryzen 9 9950X3D, with patches already merged into WebKit, Elixir, Rust&amp;rsquo;s &lt;code&gt;jiff&lt;/code&gt;, and Zig&amp;rsquo;s &lt;code&gt;zeit&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="dark-mode-toggles-two-states-are-enough"&gt;&lt;a href="https://lea.verou.me/blog/2026/dark-mode-toggles/" rel="noopener noreferrer"&gt;Dark mode toggles: two states are enough&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Lea Verou argues that website header dark-mode toggles should only expose two visible states to the user, even though the underlying state machine has three (&lt;code&gt;System&lt;/code&gt;, &lt;code&gt;Light&lt;/code&gt;, and &lt;code&gt;Dark&lt;/code&gt;). In her view, exposing a three-way segmented control or dropdown in the navbar solves an imaginary user goal: nobody visits a website thinking &amp;ldquo;my OS is in light mode and this page looks great in light mode, let me proactively pin it to Light just in case my OS switches to dark mode tonight.&amp;rdquo; Users click a theme toggle for one reason: &lt;em&gt;the current appearance is uncomfortable to read right now, make it the opposite&lt;/em&gt;. Exposing all three states in the header is classic &amp;ldquo;implementation-model UI&amp;rdquo; that adds visual clutter, extra clicks, and unnecessary cognitive load. At the same time, a naive two-state toggle is even worse if clicking it once permanently locks &lt;code&gt;localStorage&lt;/code&gt; into an override with no way to return to following the OS theme.&lt;/p&gt;
&lt;p&gt;Verou&amp;rsquo;s solution is a single two-state button that cleanly traverses all three underlying states. By default (when following the OS), the button displays the currently active theme and stores nothing in &lt;code&gt;localStorage&lt;/code&gt;. Clicking it once switches to the opposite theme and saves that explicit override. Clicking it a second time switches back to the theme that matches the user&amp;rsquo;s current OS preference—and instead of saving a hard override, it &lt;em&gt;clears&lt;/em&gt; the stored setting, returning the site to &lt;code&gt;System&lt;/code&gt; mode. Because the override is only re-evaluated when the user clicks the toggle, users whose OS automatically flips between light and dark at sunset can still override a site whenever they want without getting stuck permanently out of sync. Reserve explicit three-way &lt;code&gt;Light / Dark / Auto&lt;/code&gt; selectors for dedicated settings pages—not the top navigation bar.&lt;/p&gt;</description></item><item><title>Newsletter #134</title><link>https://miti99.com/en/post/2026/10/02/</link><pubDate>Fri, 02 Oct 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/10/02/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #134.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-startup"&gt;&lt;a href="https://hatchet.run/blog/postgres-survival-guide" rel="noopener noreferrer"&gt;The startup&amp;rsquo;s Postgres survival guide&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hatchet CEO Alexander Belanger distills roughly two years of running PostgreSQL in production into a pragmatic field guide that&amp;rsquo;s much easier to scan during an incident than the official manual. On schema design: use identity columns or UUIDs for primary keys, always use &lt;code&gt;timestamptz&lt;/code&gt;, and don&amp;rsquo;t hesitate to reach for &lt;code&gt;jsonb&lt;/code&gt; when strict normalization hurts query performance. On reads: join on primary keys, index columns used in &lt;code&gt;ON&lt;/code&gt; clauses just like &lt;code&gt;WHERE&lt;/code&gt; clauses, and put &lt;code&gt;ORDER BY&lt;/code&gt; columns last in compound indexes with matching sort directions. On writes: keep transactions short, never call external services inside a transaction, always use &lt;code&gt;CREATE INDEX CONCURRENTLY&lt;/code&gt; on large tables, keep schema migrations additive, and use &lt;code&gt;NOT VALID&lt;/code&gt; when adding check constraints. Because Postgres connections are heavy, always use a connection pooler—preferably PgBouncer or &lt;code&gt;pgxpool&lt;/code&gt;. Finally, remember that the query planner is a leaky abstraction driven by statistics in &lt;code&gt;pg_stats&lt;/code&gt;: debug slow queries with &lt;code&gt;EXPLAIN (ANALYZE, BUFFERS)&lt;/code&gt;, visualize plans on &lt;code&gt;explain.dalibo.com&lt;/code&gt;, and avoid premature micro-optimization.&lt;/p&gt;
&lt;p&gt;The advanced half covers batching writes (for instance, &lt;code&gt;pgx&lt;/code&gt;&amp;rsquo;s &lt;code&gt;SendBatch&lt;/code&gt;) for roughly 10x higher throughput, monitoring autovacuum via &lt;code&gt;pg_stat_activity&lt;/code&gt;, and guarding against transaction ID wraparound. Fix table bloat with &lt;code&gt;pg_repack&lt;/code&gt; rather than locking tables with &lt;code&gt;VACUUM FULL&lt;/code&gt;, and clear index bloat with &lt;code&gt;REINDEX INDEX CONCURRENTLY&lt;/code&gt;. Hatchet relies heavily on &lt;code&gt;FOR UPDATE SKIP LOCKED&lt;/code&gt; to power job queues and distributed lease management across instances. Table partitioning lets autovacuum work on smaller chunks independently and makes dropping old time-series data nearly instantaneous. When migrating massive tables, dual-write new rows via a trigger, backfill historical rows in batches outside a long-running transaction, and lean on unique constraints for idempotency.&lt;/p&gt;
&lt;h2 id="what-is-orasort-understanding-oracles-sorting-aglorithm-in-simple-terms"&gt;&lt;a href="https://deepsystemstuff.com/how-oracles-secret-column-sorting-technique-became-public-after-its-patent-expired-making-sorting-5x-faster/" rel="noopener noreferrer"&gt;What is Orasort? understanding Oracle’s Sorting Aglorithm In Simple Terms&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Nadeem Shaikh introduces Orasort, a sorting optimization patented by Oracle (credited to Mark Callaghan). According to the post, the 20-year patent expired in 2024, placing the technique in the public domain where it can speed up database sorting by up to 5x. Traditional string sorting compares values byte by byte, so long strings that share a common prefix—such as email addresses or URLs from the same domain—waste many CPU cycles repeating character comparisons. Orasort instead packs an 8-byte slice of each string into a 64-bit integer register and compares all 8 bytes in a single CPU instruction. If those 8 bytes settle the ordering, the comparison finishes immediately; only when they are identical does it advance to the next 8-byte chunk.&lt;/p&gt;
&lt;p&gt;The sorting pipeline pairs this with several other techniques. Rather than moving full table rows around during a sort, the database loads only the sort key and row ID (tuple pointer) into an in-memory sort buffer. When the dataset exceeds available RAM, it spills sorted runs to disk and merges them afterward, writing sorted runs out to disk asynchronously while the CPU continues sorting the next batch in memory. While the author notes that open-source databases like PostgreSQL and MySQL have adopted or experimented with similar abbreviated-key sorting ideas—saving substantial cloud CPU costs—the article doesn&amp;rsquo;t cite primary sources for the 5x figure or the exact patent details, so treat it as an approachable conceptual overview rather than a rigorous historical reference.&lt;/p&gt;
&lt;h2 id="fornax"&gt;&lt;a href="https://docs.pixeldrain.com/posts/2024-03-07_network_optimizations/" rel="noopener noreferrer"&gt;Fornax&amp;rsquo;s Guide To Ridiculously Fast Ethernet&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Fornax, creator of the file-sharing service Pixeldrain, leased a 100 GbE server expecting it to saturate the link out of the box, only to watch the machine crash at around 20 Gbit/s. After more than a year of reading NIC manuals, digging through Linux kernel source code, profiling, and even patching the kernel, Fornax hit the full 100 Gbit/s line rate and wrote up the complete tuning guide. At the &lt;code&gt;sysctl&lt;/code&gt; layer, pair the BBR congestion control algorithm with the &lt;code&gt;fq&lt;/code&gt; packet scheduler so random packet loss doesn&amp;rsquo;t tank throughput. Enabling &lt;code&gt;tcp_shrink_window&lt;/code&gt; (a Cloudflare patch merged in Linux 6.5) cut TCP buffer memory consumption by roughly 80%, curing peak-hour OOM crashes on a server with 1 TB of RAM. Per-connection socket buffers are raised to a 1 GiB ceiling based on the bandwidth-delay product, and &lt;code&gt;tcp_mem&lt;/code&gt; is raised to 40–60% of system RAM instead of the ~5% default.&lt;/p&gt;
&lt;p&gt;On the hardware side, Mellanox/NVIDIA ConnectX-5 and ConnectX-6 NICs with stock in-tree kernel drivers proved rock-solid. Via &lt;code&gt;ethtool&lt;/code&gt;, match the NIC channel count to CPU cores, max out the RX/TX ring buffers, and disable adaptive interrupt coalescing in favor of a fixed 100 µs interval. In the BIOS, set NUMA to NPS1 and disable SMT on 128+ core CPUs. The single most impactful stability fix was disabling the IOMMU (&lt;code&gt;iommu=pt&lt;/code&gt; or off), which stopped the NIC from wedging under heavy load. Fornax also eliminated reverse proxies like nginx and Caddy so packets don&amp;rsquo;t cross the kernel/userspace boundary multiple times, serving traffic directly from Go&amp;rsquo;s standard HTTP server with &lt;code&gt;SO_REUSEPORT&lt;/code&gt; for zero-downtime restarts. HTTP/2 is preferred, while HTTP/3 (QUIC) was dropped because its throughput barely reached half of TCP&amp;rsquo;s. Finally, run a minimal Debian install on the latest mainline kernel, as Linux 6.8 and 6.19 brought major TCP throughput gains.&lt;/p&gt;
&lt;h2 id="parity-before-cutover"&gt;&lt;a href="https://alexocallaghan.com/parity-before-cutover" rel="noopener noreferrer"&gt;Parity before cutover&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alex O&amp;rsquo;Callaghan recounts inheriting a critical internal service that existed in two parallel universes: a legacy Python 2 version running in production on on-prem VMs, and a modernized Python 3 rewrite living on a long-lived feature branch waiting to be deployed to cloud Kubernetes. This classic &amp;ldquo;big-bang cutover&amp;rdquo; approach bundles every possible risk into a single release and delays real-world feedback until the very end. Engineering effort is doubled because every urgent production bugfix has to be written in Python 2 and forward-ported to the Python 3 branch (or worse, forgotten), and subtle behavioral regressions stay hidden until cutover day when too many variables have changed at once to isolate the culprit.&lt;/p&gt;
&lt;p&gt;Instead of marching straight toward the cloud cutover, O&amp;rsquo;Callaghan proposed &amp;ldquo;taking a step backward to move forward&amp;rdquo;: shipping the modernized Python 3 codebase onto the legacy on-prem VMs first. Because the legacy OS only supported up to Python 3.6, the team downgraded the branch from Python 3.7 to 3.6 rather than fighting the OS, and added runtime environment configuration so the exact same codebase could deploy to both on-prem VMs and Kubernetes. From that point on, every commit deployed to both environments simultaneously, surfacing behavioral differences incrementally while the legacy Python 2 service remained an instant rollback away. Once the Python 3 service achieved 100% production parity on-prem, cutting over to Kubernetes became a pure infrastructure switch—changing one variable at a time. The takeaway: if a migration branch has been open for months waiting on another team or platform, it&amp;rsquo;s probably bundling too many changes at once; look for an intermediate state you can ship to production today, even if it feels like a step sideways.&lt;/p&gt;
&lt;h2 id="the-new-go-json-api-twice-as-fast-or-15x-slower"&gt;&lt;a href="https://lemire.me/blog/2026/08/29/the-new-go-json-api-twice-as-fast-or-1-5x-slower/" rel="noopener noreferrer"&gt;The new Go JSON API: twice as fast, or 1.5x slower?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Starting in Go 1.27, the &lt;code&gt;encoding/json/v2&lt;/code&gt; package ships in the standard library by default. While its &lt;code&gt;Marshal&lt;/code&gt; and &lt;code&gt;Unmarshal&lt;/code&gt; functions look almost identical to v1, &lt;code&gt;v2&lt;/code&gt; is not a drop-in replacement due to stricter UTF-8 validation, case-sensitive field matching by default, and other behavioral cleanups. Because the legacy &lt;code&gt;encoding/json&lt;/code&gt; (v1) package was also re-engineered to run on top of the new &lt;code&gt;v2&lt;/code&gt; engine under the hood, Daniel Lemire benchmarks three configurations: the original Go 1.26 &lt;code&gt;encoding/json&lt;/code&gt; engine (built with &lt;code&gt;GOEXPERIMENT=nojsonv2&lt;/code&gt;), the v1 API running on Go 1.27&amp;rsquo;s new v2 backend, and &lt;code&gt;encoding/json/v2&lt;/code&gt; called directly. Benchmarks run single-threaded on an Apple M4 Max and an Intel Xeon Emerald Rapids using three standard &lt;code&gt;simdjson&lt;/code&gt; test files (&lt;code&gt;twitter.json&lt;/code&gt;, &lt;code&gt;canada.json&lt;/code&gt;, and &lt;code&gt;citm_catalog.json&lt;/code&gt;) parsed into generic &lt;code&gt;any&lt;/code&gt; values.&lt;/p&gt;
&lt;p&gt;Simply upgrading to Go 1.27 without touching a line of code makes v1 &lt;code&gt;Marshal&lt;/code&gt; up to 2x faster—for example, &lt;code&gt;twitter.json&lt;/code&gt; jumps from 198 MB/s to 374 MB/s. &lt;code&gt;Unmarshal&lt;/code&gt; via v1 also speeds up on two of the files, though it regresses slightly on float-heavy &lt;code&gt;canada.json&lt;/code&gt; (from 128 MB/s down to 106 MB/s). Calling &lt;code&gt;json/v2&lt;/code&gt; directly makes generic &lt;code&gt;Unmarshal&lt;/code&gt; 1.5x to 2.3x faster and &lt;code&gt;Marshal&lt;/code&gt; 1.2x to 3x faster than the old engine. However, on a round-trip benchmark of 10,000 small strongly typed Go structs, while &lt;code&gt;json/v2&lt;/code&gt; still unmarshals faster, &lt;code&gt;Marshal&lt;/code&gt; is roughly 1.5x &lt;em&gt;slower&lt;/em&gt; than the legacy engine—contrary to the Go 1.27 release notes claiming struct marshaling performance is at parity. Lemire&amp;rsquo;s advice: &lt;code&gt;json/v2&lt;/code&gt; is a clear win for unmarshaling, but benchmark your actual struct workloads before migrating write-heavy serialization paths.&lt;/p&gt;
&lt;h2 id="a-deep-dive-into-deepsec"&gt;&lt;a href="https://flaviocopes.com/deepsec/" rel="noopener noreferrer"&gt;A deep dive into DeepSec&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Flavio Copes explores DeepSec, an open-source (Apache 2.0) AI-powered security scanner from Vercel. Unlike tools that only review incoming pull request diffs, DeepSec audits an entire repository—including legacy code that has never had a security review. Its pipeline starts with a fast, free local pattern-matching pass that combines file-path globs with regular expressions to flag candidate files. Next, Codex or Claude Code reads the flagged files, traces data flows across the codebase, checks for existing sanitization or auth guards, and records findings with severity, confidence, and remediation advice. A second agent pass independently verifies each finding to filter out hallucinations, a cheaper triage pass assigns P0–P2 priorities, and all state is persisted in &lt;code&gt;.deepsec/&lt;/code&gt; so interrupted scans can resume cleanly.&lt;/p&gt;
&lt;p&gt;Running DeepSec against &lt;code&gt;flaviocopes.com&lt;/code&gt; using Codex via a standard ChatGPT subscription scanned 729 files and produced 504 raw findings, including 1 Critical and 16 High. Closer inspection showed that 462 of those findings lived in client-side browser mini-tools on the site. Copes then asked Codex to cluster the findings by root cause and separate real production risks from local helper scripts and code examples, narrowing the actionable list down to payment webhooks, course recovery flows, and public forms. DeepSec cannot prove a codebase is secure, still produces false positives, and sends source code to your chosen model provider, but its workflow highlights an important lesson: raw finding counts are mostly noise—always anchor triage where untrusted input touches authentication, private data, money, or infrastructure.&lt;/p&gt;
&lt;h2 id="imthenachomanhow-to-secure-a-linux-server-an-evolving-how-to-guide-for-securing-a-linux-server"&gt;&lt;a href="https://github.com/imthenachoman/How-To-Secure-A-Linux-Server" rel="noopener noreferrer"&gt;imthenachoman/How-To-Secure-A-Linux-Server: An evolving how-to guide for securing a Linux server.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This popular open-source guide (CC BY-SA 4.0, over 31,000 GitHub stars) compiles practical steps for hardening a Linux server, born out of the author&amp;rsquo;s personal notes while building a home Debian server. Because Linux security advice is scattered across hundreds of blog posts—and most developers don&amp;rsquo;t provision bare-metal Linux servers every day—it is easy to overlook basic hardening steps. The moment a server touches the public internet, automated scanners start probing it, and an unhardened box can quietly have its data exfiltrated or get drafted into a DDoS botnet without the owner noticing. The author recommends reading this guide first to understand the &lt;em&gt;why&lt;/em&gt; behind each control, and then layering official CIS Benchmarks on top.&lt;/p&gt;
&lt;p&gt;The SSH section covers enforcing public/private key authentication, restricting login access via &lt;code&gt;AllowGroups&lt;/code&gt;, locking down &lt;code&gt;sshd_config&lt;/code&gt;, removing weak Diffie-Hellman moduli, and enabling 2FA. System basics cover restricting &lt;code&gt;sudo&lt;/code&gt; and &lt;code&gt;su&lt;/code&gt;, sandboxing applications with Firejail, hiding other users&amp;rsquo; processes in &lt;code&gt;/proc&lt;/code&gt; (&lt;code&gt;hidepid&lt;/code&gt;), enforcing strong password policies with PAM, and enabling &lt;code&gt;unattended-upgrades&lt;/code&gt; for security patches. Networking covers configuring UFW as a firewall (including fixing the notorious gotcha where Docker bypasses UFW rules by manipulating &lt;code&gt;iptables&lt;/code&gt; directly), using PSAD to detect port scans, and running Fail2Ban and CrowdSec to block brute-force and application-layer attacks. Auditing introduces AIDE, ClamAV, rkhunter, Logwatch, Lynis, and OSSEC, followed by a &amp;ldquo;Danger Zone&amp;rdquo; for changes that can lock you out if misconfigured—like kernel &lt;code&gt;sysctl&lt;/code&gt; hardening, GRUB passwords, and disabling root login. A community-maintained Ansible playbook is also available to automate the setup.&lt;/p&gt;
&lt;h2 id="postgres-19-how-our-advice-has-changed-since-we-wrote-it"&gt;&lt;a href="https://www.crunchydata.com/blog/postgres-19-how-our-advice-has-changed-since-we-wrote-it" rel="noopener noreferrer"&gt;Postgres 19: How Our Advice Has Changed Since We Wrote It&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Christopher Winslett at Crunchy Data revisits the company&amp;rsquo;s classic blog posts on bulk loading, storage, indexing, and partitioning—many originally written in the Postgres 10 and 11 era—to see how their advice holds up against Postgres 19 (beta). Asynchronous I/O (introduced in Postgres 18) dramatically speeds up sequential scans, bitmap heap scans, and vacuuming; Postgres 19 builds on it with autoscaling I/O workers, &lt;code&gt;EXPLAIN (ANALYZE, IO)&lt;/code&gt;, parallel autovacuum, and disabling JIT compilation by default. The &lt;code&gt;COPY&lt;/code&gt; command keeps getting better: SIMD-accelerated CSV parsing, &lt;code&gt;ON_ERROR set_null&lt;/code&gt; to survive dirty rows without aborting an entire load, multi-line header skipping, direct &lt;code&gt;COPY ... TO&lt;/code&gt; JSON output, and &lt;code&gt;COPY TO&lt;/code&gt; support directly on partitioned tables. &lt;code&gt;LZ4&lt;/code&gt; is now the default TOAST compression algorithm (existing toasted values keep their original compression), and a built-in &lt;code&gt;REPACK&lt;/code&gt; command (with &lt;code&gt;CONCURRENTLY&lt;/code&gt;) finally brings &lt;code&gt;pg_repack&lt;/code&gt;-style online table compaction into core Postgres as a native replacement for &lt;code&gt;VACUUM FULL&lt;/code&gt; and &lt;code&gt;CLUSTER&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On indexing, BRIN gains &lt;code&gt;minmax_multi&lt;/code&gt; opclasses for imperfectly ordered data and &lt;code&gt;bloom&lt;/code&gt; opclasses for UUID equality lookups. B-tree skip scans (added in 18) allow a multi-column index to serve queries that filter only on trailing columns when the leading column has low cardinality, letting teams drop redundant single-column indexes. Native partitioning adds &lt;code&gt;MERGE PARTITIONS&lt;/code&gt; and &lt;code&gt;SPLIT PARTITION&lt;/code&gt;, though both currently take an &lt;code&gt;ACCESS EXCLUSIVE&lt;/code&gt; lock and belong in maintenance windows. The takeaway: the core fundamentals haven&amp;rsquo;t changed—use &lt;code&gt;COPY&lt;/code&gt; for bulk loads, store JSON in &lt;code&gt;jsonb&lt;/code&gt;, and partition primarily for data lifecycle management—but Postgres 19 makes executing them much smoother. Keep the same mental model, update your commands, and verify with &lt;code&gt;EXPLAIN (ANALYZE, BUFFERS, IO)&lt;/code&gt; after upgrading.&lt;/p&gt;
&lt;h2 id="how-we-saved-100-terabytes-of-memory-by-optimizing-1111s-dns-cache"&gt;&lt;a href="https://blog.cloudflare.com/dns-cache-memory-optimization-1111/" rel="noopener noreferrer"&gt;How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Big Pineapple, the Rust platform powering Cloudflare&amp;rsquo;s &lt;code&gt;1.1.1.1&lt;/code&gt; public resolver and other DNS services, holds over 250 billion cached DNS entries across its global fleet. At that scale, wasting a single byte per cache entry costs more than 250 GB of RAM globally. Although cached DNS entries are completely immutable once inserted, their Rust structs were still using &lt;code&gt;Vec&lt;/code&gt; and &lt;code&gt;String&lt;/code&gt; fields, each carrying an unused 8-byte &lt;code&gt;capacity&lt;/code&gt; field and potential heap over-allocation. Worse, the enum representing DNS record data was sized to its largest variant, padding tiny &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;AAAA&lt;/code&gt; records with dead space. The team built a realistic traffic benchmark paired with a custom tracking allocator to measure exact per-entry heap usage alongside insert throughput and lookup latency.&lt;/p&gt;
&lt;p&gt;They rolled out five progressive optimizations: replacing &lt;code&gt;Vec&amp;lt;T&amp;gt;&lt;/code&gt; and &lt;code&gt;String&lt;/code&gt; with boxed slices (&lt;code&gt;Box&amp;lt;[T]&amp;gt;&lt;/code&gt;) and &lt;code&gt;Box&amp;lt;str&amp;gt;&lt;/code&gt;; flattening three separate record lists (answer, authority, additional) into a single allocation indexed by &lt;code&gt;u16&lt;/code&gt; offsets; omitting the record&amp;rsquo;s owner name when it matches the query name; boxing oversized enum variants like &lt;code&gt;TXT&lt;/code&gt; and &lt;code&gt;NAPTR&lt;/code&gt;; and finally storing records as pre-serialized DNS wire-format bytes packed into a single contiguous allocation. With wire-format storage, common records like &lt;code&gt;A&lt;/code&gt;, &lt;code&gt;AAAA&lt;/code&gt;, and &lt;code&gt;TXT&lt;/code&gt; can be &lt;code&gt;memcpy&lt;/code&gt;&amp;rsquo;d straight into outbound DNS response packets without re-serializing. In benchmarks, per-entry memory dropped by 56% (from 953 bytes down to 420 bytes), insert throughput rose 43%, and lookup latency fell 19%. In production, p99 resident memory per server dropped from 9.3 GB to 5.3 GB—saving roughly 100 TB of RAM across the fleet (the equivalent of ~130 servers), which Cloudflare plans to reinvest into larger caches for higher hit rates.&lt;/p&gt;
&lt;h2 id="agentic-code-quality"&gt;&lt;a href="https://addyo.substack.com/p/agentic-code-quality" rel="noopener noreferrer"&gt;Agentic Code Quality&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Addy Osmani argues that traditional human line-by-line code review cannot keep pace with the volume of code generated by AI agents, so quality control must shift into the harness, environment, and automated verification systems surrounding the agent. His central thesis: in an agentic workflow, software quality is bounded by the quality of the constraints you place around the agent. Those constraints include unit tests, property-based tests, acceptance tests, mutation testing (to verify your tests actually catch injected bugs rather than merely exercising lines), and static complexity metrics like cyclomatic complexity. How much human code reading you can safely skip depends on the blast radius: throwaway prototypes need very little, whereas auth, billing, and core infrastructure demand either human review or exceptionally tight automated invariants. The goal is an environment that gives the agent fast, reliable feedback and makes failures cheap and contained.&lt;/p&gt;
&lt;p&gt;Constraints should operate at three boundaries: up front (via specs, type systems, and architecture rules), continuously during execution (as compiler and test feedback), and at the production gate. Every layer of the verification stack should own a distinct concern—from type safety and lint rules to performance budgets and security scanning—so compilers, failing tests, and CI policies exert early &amp;ldquo;backpressure&amp;rdquo; on the agent long before a human is asked to review a PR. When code generation velocity outstrips a team&amp;rsquo;s verification capacity, you have only three choices: scale up automated verification, slow down generation, or lower your quality bar (the worst option). Because human attention is now the scarcest resource in engineering, save it for high-leverage decisions about product intent, taste, and system architecture, and pull humans into the loop only after the automated guardrails pass.&lt;/p&gt;
&lt;h3 id="bonus"&gt;Bonus&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Videos:&lt;/strong&gt;
&lt;a href="https://www.youtube.com/watch?v=bF28LFPjFsI" rel="noopener noreferrer"&gt;How the JVM Really Works&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
 &lt;p&gt;ByteByteGo&amp;rsquo;s video explains how the Java Virtual Machine works under the hood, from compiling Java source code into bytecode to executing it on the target machine.&lt;/p&gt;

&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Images:&lt;/strong&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!tsAw!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb0fa724e-feb3-4ec6-9c53-50437d9cf884_2484x3002.png" alt="MCP vs RAG vs AI Agents"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!aJjm!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79e409f6-979a-4756-9366-de84824ab9d8_2484x3002.png" alt="9 Distributed Systems Patterns You Should Know"&gt;&lt;/p&gt;</description></item><item><title>Newsletter #121</title><link>https://miti99.com/en/post/2026/07/09/</link><pubDate>Thu, 09 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/09/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #121.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-2004-runescape-fit-a-multiplayer-rpg-into-56k-dial-up"&gt;&lt;a href="https://jkm.dev/posts/how-2004-runescape-fit-a-multiplayer-rpg-into-56k-dialup/" rel="noopener noreferrer"&gt;How 2004 RuneScape fit a multiplayer RPG into 56k dial-up&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post dissects how 2004 RuneScape ran a massively multiplayer world over 56k dial-up modems, where real-world throughput was just a few kilobytes per second and the Java applet client had only a single TCP connection. Rather than sending self-describing messages, the network protocol was co-designed as a shared state machine between client and server: both sides held the exact same collision map, ran the same pathfinding algorithm, and stepped forward on a 600 ms server tick. Thanks to all that shared implicit context never having to cross the wire, walking across the map cost roughly 7 bytes upstream and 9 bytes downstream per observer—the client only sent path waypoints where direction changed, and the server validated and reconstructed the rest.&lt;/p&gt;
&lt;p&gt;The most fascinating takeaway is how saving bytes goes far beyond generic compression. The most common state was made practically free: an idle player in your viewport cost a single bit, meaning standing among twenty stationary players took roughly five bytes per tick to confirm nothing changed. Newly appearing players were encoded using 5-bit relative coordinates offset from the local player rather than 16-bit global world coordinates. Bit-packing was reserved strictly for small, high-frequency movement updates; larger, rarely changing appearance blocks stayed byte-aligned so the server could cache and memcpy pre-built buffers directly. The architectural lesson: the smallest possible wire format comes from tightly coupling client and server assumptions, trading away the self-description, independent deployability, and easy debugging that modern HTTP/JSON APIs prioritize.&lt;/p&gt;
&lt;h2 id="how-does-struct-take-zero-bytes-in-go"&gt;&lt;a href="https://www.bud1m.com/blog/go-empty-struct/" rel="noopener noreferrer"&gt;How does struct{} take zero bytes in Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article explains why Go&amp;rsquo;s empty struct &lt;code&gt;struct{}&lt;/code&gt; occupies zero bytes and how it is idiomatically used to represent presence or signaling rather than data. Inspecting &lt;code&gt;unsafe.Sizeof&lt;/code&gt; confirms that an empty struct takes 0 bytes; used as the value type in &lt;code&gt;map[string]struct{}&lt;/code&gt;, it expresses a pure set where only key existence matters, and on a channel (&lt;code&gt;chan struct{}&lt;/code&gt;) it signals an event without carrying a payload. The author also notes that starting in Go 1.24, Go&amp;rsquo;s built-in maps use Swiss Tables under the hood, leaving almost no meaningful memory difference between &lt;code&gt;map[string]struct{}&lt;/code&gt; and &lt;code&gt;map[string]bool&lt;/code&gt;—so choosing &lt;code&gt;struct{}&lt;/code&gt; today is mainly about expressing intent clearly.&lt;/p&gt;
&lt;p&gt;At the runtime level, whenever a zero-sized value has to be allocated on the heap, &lt;code&gt;mallocgc&lt;/code&gt; checks for &lt;code&gt;size == 0&lt;/code&gt; and returns a pointer to a single global runtime variable named &lt;code&gt;zerobase&lt;/code&gt; instead of allocating heap memory. Whether the value escapes to the heap in the first place is decided by escape analysis: passing it to &lt;code&gt;fmt.Println&lt;/code&gt; (which takes &lt;code&gt;any&lt;/code&gt;) often triggers an escape to &lt;code&gt;zerobase&lt;/code&gt;, whereas built-in &lt;code&gt;println&lt;/code&gt; keeps it on the stack. This design creates two subtle gotchas worth remembering. First, multiple distinct &lt;code&gt;struct{}&lt;/code&gt; variables may share the exact same memory address, and the compiler is free to merge or not merge them, so you should never rely on pointer equality to distinguish zero-sized values. Second, placing a &lt;code&gt;struct{}&lt;/code&gt; as the final field inside a larger non-empty struct causes the compiler to add 1 byte of trailing padding (plus alignment) so that taking the address of that final field doesn&amp;rsquo;t point past the end of the allocation into an adjacent object; if you want zero overhead inside a struct, place the empty struct field anywhere except last.&lt;/p&gt;
&lt;h2 id="is-cloudflare-silently-killing-the-web-hosting-industry"&gt;&lt;a href="https://webhosting.today/2026/06/17/is-cloudflare-silently-killing-the-web-hosting-industry/" rel="noopener noreferrer"&gt;Is Cloudflare silently killing the web hosting industry?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Konrad Keck argues that Cloudflare isn&amp;rsquo;t killing traditional web hosting by becoming a better shared host—it is doing it by moving the starting point of how websites get built and deployed. Historically, a customer bought a domain, signed up for shared hosting, logged into cPanel, installed WordPress, configured SSL and email, and maybe put Cloudflare in front later for CDN and DDoS protection. Today, when a project starts inside Claude Code, Cursor, Lovable, Bolt, or Replit, the question is no longer &amp;ldquo;which hosting plan do I buy?&amp;rdquo; but &amp;ldquo;where do I deploy this?&amp;rdquo;, and Cloudflare, Vercel, and Netlify are built to capture that exact moment. Cloudflare is competing on workflow, not just infrastructure.&lt;/p&gt;
&lt;p&gt;Keck highlights two main levers: near-zero-cost deployment via Pages, Workers, static assets, and usage-priced R2/D1—which hollows out traditional hosting&amp;rsquo;s bread-and-butter market of landing pages, docs sites, frontends, and small APIs—and at-cost domain registration as a top-of-funnel wedge into the ecosystem. Cloudflare&amp;rsquo;s Registrar API closes the loop even further: an AI agent can scaffold a project, suggest available domains, check pricing, register the domain, configure DNS, and deploy to production without the user ever visiting a hosting control panel. Traditional web hosts aren&amp;rsquo;t disappearing overnight—legacy WordPress/WooCommerce and PHP apps, real business email, hands-on migrations, emergency support, local compliance, and non-technical SMBs still rely on human-backed services. The strategic shift is that traditional hosts must evolve into specialized managed service providers, because selling the default starting point of a website is slipping away.&lt;/p&gt;
&lt;h2 id="don"&gt;&lt;a href="https://staysaasy.com/startups/2026/06/16/stacked-weaknesses.html" rel="noopener noreferrer"&gt;Don&amp;rsquo;t Stack Weaknesses&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stay SaaSy writes about an organizational failure mode that often hides in plain sight across leadership chains: stacking the same weakness across multiple layers of management. Almost every leader has at least one real weakness—someone might be a visionary strategist but poor at operational execution, or deeply technical but weak at executive communication—and on its own, that doesn&amp;rsquo;t sink an org. The danger comes when a leader hires or promotes direct reports who share the exact same blind spot. If both a VP and their directors are weak at operations, the odds of the teams underneath them having strong operational processes drop to nearly zero: leadership doesn&amp;rsquo;t know how to do it themselves, doesn&amp;rsquo;t know how to interview for it, and can&amp;rsquo;t accurately judge whether it&amp;rsquo;s being done well.&lt;/p&gt;
&lt;p&gt;Weakness stacking usually happens unconsciously: leaders naturally recognize and reward strengths that mirror their own, labeling that similarity &amp;ldquo;values alignment&amp;rdquo; or &amp;ldquo;culture fit&amp;rdquo; while actually cloning their own skillset and blind spots. Avoiding the trap starts with an honest self-assessment across six core axes—technical/domain depth, people management, process and operations, strategy, communication/presentation, and learning agility—and then deliberately hiring people who are significantly stronger than you in your weakest areas. The post also warns against comforting yourself with &amp;ldquo;I could do operations if I really wanted to,&amp;rdquo; which is almost always an excuse to avoid confronting a gap. An organization without stacked weaknesses is far more resilient to unexpected challenges.&lt;/p&gt;
&lt;h2 id="system-design-cheatsheet"&gt;&lt;a href="https://gist.github.com/SuyashDive2005/be5865a9755ca1dd50523f7aeeae4417" rel="noopener noreferrer"&gt;System Design Cheatsheet&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This gist serves as a compact checklist for system design interviews and architecture reviews, anchored on a core principle: good architecture is about picking the right battles and managing trade-offs. It outlines a familiar five-step loop: clarify scope through use cases and constraints; sketch a high-level design covering core services, storage, caching, and load balancing; dive into component details including APIs and data schemas; identify bottlenecks; and scale vertically or horizontally as needed. For newer engineers, its biggest value is forcing quantitative questions early, before jumping to technology choices: how many requests per second, what is the read-to-write ratio, how fast does data grow, does latency or throughput matter more, and where does the system sit on the consistency-versus-availability spectrum?&lt;/p&gt;
&lt;p&gt;The scaling section reviews foundational building blocks: multi-tier caching, load balancing, replication and sharding, MapReduce for batch data processing, and platform separation so components can scale independently. It also lists six core fundamentals worth mastering: concurrency, networking, abstraction boundaries, real-world hardware performance numbers, back-of-the-envelope estimation to rule out dead ends early, and fault tolerance in distributed environments. While brief and carrying a few older examples, it remains a solid mental checklist: characterize load, data shape, failure modes, and scaling paths before picking tools.&lt;/p&gt;
&lt;h2 id="sqlite-improving-performance-with-pre-sort"&gt;&lt;a href="https://andersmurphy.com/2026/06/07/sqlite-improving-performance-with-pre-sort.html" rel="noopener noreferrer"&gt;SQLite improving performance with pre-sort&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Anders Murphy follows up on his earlier SQLite UUIDv4 vs. UUIDv7 benchmarks with a tougher scenario: what happens when your primary key must be a 160-bit cryptographically random value generated via &lt;code&gt;SecureRandom&lt;/code&gt;—such as a session token—where you cannot switch to time-ordered UUIDv7 because you need maximum entropy and zero timestamp leakage? When batch-inserting one million rows into a &lt;code&gt;WITHOUT ROWID&lt;/code&gt; table keyed by a &lt;code&gt;BLOB PRIMARY KEY&lt;/code&gt;, insert throughput starts around 100,000 rows per second and steadily degrades as the table grows. The bottleneck isn&amp;rsquo;t SQLite being slow; it&amp;rsquo;s the physics of a B+ Tree: because the tree stores keys in sorted order, sequential inserts append cleanly, whereas uniformly random keys scatter writes across leaf pages all over disk, triggering constant page splits and tree rebalancing.&lt;/p&gt;
&lt;p&gt;Murphy&amp;rsquo;s optimization is disarmingly simple: since the application is already inserting in batches, sort each batch in memory by primary key before inserting. Because SQLite compares &lt;code&gt;BLOB&lt;/code&gt; keys using &lt;code&gt;memcmp()&lt;/code&gt;, the application-side comparator just needs to match byte-wise ordering; Murphy grabs the first 8 bytes of each 20-byte token as an unsigned 64-bit integer to make the in-memory sort fast. Even including the CPU cost of sorting each batch, once the table reaches ten million rows, batch insert time drops from 11.1 seconds to 3.8 seconds—roughly a 2–3x speedup. The practical takeaway: batching doesn&amp;rsquo;t just amortize transaction overhead; it also gives you a window to reorder writes into a layout that is far friendlier to the underlying storage engine.&lt;/p&gt;
&lt;h2 id="why-is-meta-destroying-its-engineering-organization"&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/why-is-meta-destroying-its-engineering" rel="noopener noreferrer"&gt;Why is Meta destroying its engineering organization?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gergely Orosz pieces together a tense picture of engineering inside Meta since April 2026, as the company pivots aggressively around AI. Historically, Meta was renowned for its strong bottom-up engineering culture: lightweight process, high individual autonomy, rock-solid internal tooling that let engineers &amp;ldquo;move fast,&amp;rdquo; and engineers treated as the core value creators. Under the direction of Mark Zuckerberg and Alexandr Wang, however, 30–50% of core software engineers across many teams—including infrastructure and security—were reassigned into a new ADO organization (roughly 6,500 people) to do data labeling, model output grading, and RLHF. Meta also rolled out mandatory keystroke and mouse tracking on engineering laptops to harvest training data with no opt-out (later walked back slightly after internal backlash), alongside ongoing layoff pressure and AI token-usage quotas.&lt;/p&gt;
&lt;p&gt;What stands out most isn&amp;rsquo;t just &amp;ldquo;Meta is pushing AI hard,&amp;rdquo; but how badly perverse incentives distort behavior. Once AI token consumption became a performance metric, engineers naturally gamed the metric (burning 60.2 trillion tokens in 30 days) rather than optimizing for software quality. And when AI-generated code reviewed only by AI gets pushed rapidly to production while security teams are gutted and reassigned, operational risk compounds fast: Orosz connects these dynamics to the May 30 Instagram account-takeover incident and the departure of Meta&amp;rsquo;s CISO shortly afterward. The broader lesson is not to confuse fast MTTR with system health: recovering quickly from outages cannot compensate for eroding human comprehension, weakened guardrails, and hollowed-out engineering ownership.&lt;/p&gt;
&lt;h2 id="cs-6120-advanced-compilers-the-self-guided-online-course"&gt;&lt;a href="https://www.cs.cornell.edu/courses/cs6120/2025fa/self-guided/" rel="noopener noreferrer"&gt;CS 6120: Advanced Compilers: The Self-Guided Online Course&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This page hosts the self-guided version of CS 6120, Adrian Sampson&amp;rsquo;s PhD-level course at Cornell on programming language implementation and modern compilers. The curriculum progresses from core compiler foundations—intermediate representations, dataflow analysis, local and global optimizations, SSA form, and LLVM—into research-adjacent topics like dynamic compilers (JITs), garbage collection, parallelism, and fast compilation. Each lesson pairs lecture videos and written notes with classic academic papers and open-ended implementation tasks to turn abstract theory into working code.&lt;/p&gt;
&lt;p&gt;The self-guided track preserves the linear structure of the university course while removing deadlines, grading, and internal class discussion boards. Learners follow a clear rhythm: watch the lecture, read the companion paper, and implement compiler passes using either LLVM or Bril—a small, pedagogical intermediate representation designed to be much easier to hack on than jumping straight into a production compiler—culminating in a final project. It is an outstanding resource for internalizing that a compiler isn&amp;rsquo;t just &amp;ldquo;a parser bolted onto a code generator,&amp;rdquo; but a pipeline of representation choices, program analyses, optimizations, and trade-offs between correctness, compile time, and generated code quality. The best way to use it is writing the small transformation passes yourself as you go, since compiler concepts are notoriously easy to misunderstand if you only read about them.&lt;/p&gt;
&lt;h2 id="epoll-vs-io_"&gt;&lt;a href="https://sibexi.co/posts/epoll-vs-io_uring/" rel="noopener noreferrer"&gt;epoll vs io_uring in Linux&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post compares &lt;code&gt;epoll&lt;/code&gt; and &lt;code&gt;io_uring&lt;/code&gt; through the lens of building TinyGate, a lightweight reverse proxy in C. The first prototype used a simple thread-per-worker model that was easy to reason about but hit a hard performance ceiling; moving to &lt;code&gt;epoll&lt;/code&gt; delivered a major speedup, yet still paid the fundamental tax of a readiness-based model: &lt;code&gt;epoll&lt;/code&gt; only tells you when a file descriptor is ready for I/O, leaving the application to issue its own &lt;code&gt;read()&lt;/code&gt; or &lt;code&gt;write()&lt;/code&gt; syscalls afterward. Every I/O event therefore incurs syscall and context-switch overhead on top of &lt;code&gt;epoll_ctl&lt;/code&gt; registration, which adds up quickly across tens of thousands of active connections.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;io_uring&lt;/code&gt; shifts to a completion-based model: the application writes I/O requests into a submission queue in shared memory, the kernel executes them asynchronously, and results land in a shared completion queue. A single &lt;code&gt;io_uring_enter()&lt;/code&gt; call can submit and harvest an entire batch of operations instead of paying a syscall per &lt;code&gt;read()&lt;/code&gt;/&lt;code&gt;write()&lt;/code&gt;. Enabling &lt;code&gt;IORING_SETUP_SQPOLL&lt;/code&gt; can even eliminate steady-state syscalls almost entirely, at the cost of dedicating a kernel thread that spins and consumes CPU to poll the submission ring. While the author recommends considering &lt;code&gt;io_uring&lt;/code&gt; for new high-performance Linux projects (available since Linux 5.1, though specific opcodes depend on kernel version), he cautions that production use requires care: using rings or registered buffers doesn&amp;rsquo;t automatically guarantee zero-copy I/O, errors arrive asynchronously via completion queue entries, and minimal tutorial examples omit many edge-case checks required in real servers.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #117</title><link>https://miti99.com/en/post/2026/07/05/</link><pubDate>Sun, 05 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/05/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #117.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="should-you-normalize-rgb-values-by-255-or-256"&gt;&lt;a href="https://30fps.net/pages/255-vs-256-division/" rel="noopener noreferrer"&gt;Should you normalize RGB values by 255 or 256?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Pekka Väänänen dissects a deceptively small question that sparks endless debate in image processing: when converting 8-bit RGB color values to floating point, should you divide by 255, or add half a step and divide by 256? The familiar &lt;code&gt;img / 255.0&lt;/code&gt; maps 0 to 0.0 and 255 to 1.0, preserving exact black and exact white, which is convenient for almost all downstream shader and image code. The alternative &lt;code&gt;(img + 0.5) / 256.0&lt;/code&gt; places each sample at the midpoint of a quantization bucket—cleaner from a signal-quantization standpoint and yielding slightly lower theoretical reconstruction error, but only when you control both the encoding and decoding sides of the pipeline.&lt;/p&gt;
&lt;p&gt;The author&amp;rsquo;s pragmatic verdict: for images coming from the outside world, divide by 255. The usual arguments against 255—that the two endpoint buckets are half-width, that floats don&amp;rsquo;t represent thirds or fifths of 255 exact to the last bit, or that a tiny sliver of precision is wasted—are negligible in practice. Conversely, dividing by 256 on images that were quantized under the standard 255 convention introduces bias and hardcodes an 8-bit assumption into your code. The real bug to fear is mixing one convention&amp;rsquo;s encoder with the other&amp;rsquo;s decoder. Only consider dividing by 256 inside a closed system where you control the entire read/write pipeline, don&amp;rsquo;t need 0 to map to 0.0, and every component agrees on the exact same convention.&lt;/p&gt;
&lt;h2 id="jira-is-turing-complete"&gt;&lt;a href="https://seriot.ch/computation/jira.html" rel="noopener noreferrer"&gt;Jira is Turing-Complete&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Nicolas Seriot turns a classic office joke about Jira into a formal proof: Jira Automation can simulate a Minsky register machine, a computational model known to be Turing-complete. In the author&amp;rsquo;s construction, each register is represented by the count of linked issues of a specific type (such as Bug and Task); the instruction pointer is the current status of an Epic; the program table is the set of automation rules; and each clock cycle is a status transition triggered by an automation rule. Using only operations that create, delete, and check linked issues, Jira can express &lt;code&gt;INC&lt;/code&gt;, &lt;code&gt;DEC&lt;/code&gt;, and conditional branching.&lt;/p&gt;
&lt;p&gt;The minimal example is addition: transferring the count of Bugs in register A into Tasks in register B using statuses like &lt;code&gt;TODO&lt;/code&gt;, &lt;code&gt;DEV&lt;/code&gt;, and &lt;code&gt;PROD&lt;/code&gt;. While A still has a Bug, a rule deletes one Bug and transitions to a state that increments B; once A hits zero, it transitions to the halt state. Seriot also uses an issue-type conversion action—which effectively fuses a decrement and an increment into a single step—to compress a Fibonacci program down to three statuses across three registers. The program runs until it hits Jira Cloud&amp;rsquo;s automation chain-depth limit and requires an operator to re-trigger it. Quota limits like that don&amp;rsquo;t invalidate the proof, since every physical computer is finite too. The takeaway isn&amp;rsquo;t that you should write software in Jira, but that complex workflow automations genuinely are programs—complete with state, memory, branches, and loops.&lt;/p&gt;
&lt;h2 id="usb-for-software-developers-an-introduction-to-writing-userspace-usb-drivers"&gt;&lt;a href="https://werwolv.net/posts/usb_for_sw_devs/" rel="noopener noreferrer"&gt;USB for Software Developers: An introduction to writing userspace USB drivers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;WerWolv writes an approachable introduction to USB for software developers who want to talk to hardware devices without diving into electrical signaling or writing kernel modules. The running example is an Android phone in bootloader mode, since the Fastboot protocol is simple, well documented, and typically doesn&amp;rsquo;t have an OS kernel driver claiming the interface automatically. The guide starts with &lt;code&gt;lsusb&lt;/code&gt; to inspect the &lt;code&gt;VID&lt;/code&gt;, &lt;code&gt;PID&lt;/code&gt;, device class, and bound drivers, before moving to &lt;code&gt;libusb&lt;/code&gt; to discover and open the device directly from userspace.&lt;/p&gt;
&lt;p&gt;The most valuable part is how the author connects each USB concept directly to working code. During enumeration, the host uses control endpoint &lt;code&gt;0x00&lt;/code&gt; to send standard requests like &lt;code&gt;GET_STATUS&lt;/code&gt; and &lt;code&gt;GET_DESCRIPTOR&lt;/code&gt;, reading descriptors to learn what configurations, interfaces, and endpoints the device exposes. Endpoints can be thought of like communication ports, except USB is strictly host-driven—a device never sends data unprompted. The post explains the four transfer types (Control, Bulk, Interrupt, Isochronous) and notes that &lt;code&gt;IN&lt;/code&gt; and &lt;code&gt;OUT&lt;/code&gt; directions are always defined from the host&amp;rsquo;s perspective. Finally, the sample program sends a Fastboot &lt;code&gt;getvar:version&lt;/code&gt; command over a Bulk OUT endpoint and reads back &lt;code&gt;OKAY0.4&lt;/code&gt; from the Bulk IN endpoint. The takeaway: for a device with a documented protocol, writing a userspace driver with &lt;code&gt;libusb&lt;/code&gt; feels much closer to socket programming than intimidating kernel development.&lt;/p&gt;
&lt;h2 id="everything-you-need-to-know-about-sourcemaps"&gt;&lt;a href="https://neciudan.dev/everything-you-need-to-know-about-sourcemaps" rel="noopener noreferrer"&gt;Everything you need to know about Sourcemaps&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Neciu Dan examines sourcemaps from both angles: as an indispensable debugging tool and as a source-code exposure risk. After bundling, browsers execute concatenated, minified, and mangled code, making an error like &lt;code&gt;bundle.min.js:1:48211&lt;/code&gt; nearly useless. A sourcemap is a JSON file mapping positions in the minified output back to the original file, line, column, and identifier names so stack traces become readable again. Yet those very fields—&lt;code&gt;sources&lt;/code&gt;, &lt;code&gt;names&lt;/code&gt;, &lt;code&gt;mappings&lt;/code&gt;, and especially &lt;code&gt;sourcesContent&lt;/code&gt;—can expose directory structures, module names, comments, internal API endpoints, and even the entire original source code if &lt;code&gt;.map&lt;/code&gt; files are left publicly accessible.&lt;/p&gt;
&lt;p&gt;The core lesson is that minification is not a security boundary. When a production bundle points to a sourcemap via &lt;code&gt;sourceMappingURL&lt;/code&gt; or the &lt;code&gt;SourceMap&lt;/code&gt; HTTP header, anyone with DevTools or &lt;code&gt;curl&lt;/code&gt; can download it if the server permits access. The author cites real-world incidents—including Apple&amp;rsquo;s web App Store in 2025 and version 2.1.88 of the &lt;code&gt;@anthropic-ai/claude-code&lt;/code&gt; npm package shipping with a nearly 60 MB &lt;code&gt;cli.js.map&lt;/code&gt; file—to show that leaks are usually simple build or packaging misconfigurations rather than sophisticated attacks. Mitigations include disabling sourcemaps in production when unneeded, uploading sourcemaps privately to Sentry (noting that &amp;ldquo;hidden&amp;rdquo; sourcemaps only omit the reference comment without blocking direct URL access), blocking &lt;code&gt;.map&lt;/code&gt; requests at the web server or CDN, stripping &lt;code&gt;.map&lt;/code&gt; files from build artifacts and npm tarballs, and adding CI/CD checks (such as inspecting &lt;code&gt;npm pack&lt;/code&gt; output) to catch accidental sourcemap publishing.&lt;/p&gt;
&lt;h2 id="extended-statistics-in-postgres"&gt;&lt;a href="https://www.valerieparhamthompson.com/posts/extended-statistics-postgres/" rel="noopener noreferrer"&gt;Extended Statistics in Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Valerie Parham-Thompson explains how extended statistics help the Postgres query planner make far more accurate row estimates when columns are correlated in ways default statistics cannot see. The planner relies on internal catalog tables like &lt;code&gt;pg_class&lt;/code&gt; and &lt;code&gt;pg_stats&lt;/code&gt; to estimate row counts, distinct values, histograms, and most common values, but those statistics are collected per column and implicitly assume filter conditions are independent. For instance, &lt;code&gt;zip='91605'&lt;/code&gt; almost entirely implies &lt;code&gt;state='CA'&lt;/code&gt;, yet by default the planner multiplies the two selectivities as if they were independent variables, severely underestimating row counts and picking a poor execution plan.&lt;/p&gt;
&lt;p&gt;The post walks through all three kinds of extended statistics. The &lt;code&gt;dependencies&lt;/code&gt; type captures functional dependencies between columns, such as a ZIP code largely determining the state; after running &lt;code&gt;CREATE STATISTICS ... (dependencies)&lt;/code&gt; and &lt;code&gt;ANALYZE&lt;/code&gt;, the planner&amp;rsquo;s row estimate jumps much closer to reality. The &lt;code&gt;mcv&lt;/code&gt; (most-common values) type tracks frequent value combinations across multiple columns, helping multi-column &lt;code&gt;WHERE&lt;/code&gt; filters like category plus subcategory. The &lt;code&gt;ndistinct&lt;/code&gt; type helps the planner estimate group counts for multi-column &lt;code&gt;GROUP BY&lt;/code&gt; clauses instead of naively multiplying each column&amp;rsquo;s distinct count. The practical takeaway: when you know your schema has correlated columns, teach the planner with extended statistics instead of reflexively reaching for another index.&lt;/p&gt;
&lt;h2 id="finding-a-needle-in-a-4-gb-haystack-from-075-gbs-to-49-gbs-in-go"&gt;&lt;a href="https://segflow.github.io/post/fast-file-search-go/" rel="noopener noreferrer"&gt;Finding a needle in a 4 GB haystack: from 0.75 GB/s to 49 GB/s in Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Assel Meher uses a deliberately trivial problem to dissect file reading and scanning performance in Go: finding a single non-zero &lt;code&gt;int64&lt;/code&gt; near the end of a 4 GiB file filled almost entirely with zeros. With no parsing or complex algorithms in the way, the benchmarks expose the true cost of each layer: the Go runtime, standard library, syscalls, page cache, memory bandwidth, &lt;code&gt;mmap&lt;/code&gt;, &lt;code&gt;pread&lt;/code&gt;, multithreading, and SIMD. The baseline—calling &lt;code&gt;os.ReadFile&lt;/code&gt; and ranging byte by byte—hits just ~0.75 GB/s because it allocates and copies 4 GiB before inspecting one byte at a time; &lt;code&gt;bufio.ReadByte&lt;/code&gt; fares no better due to per-byte function call overhead.&lt;/p&gt;
&lt;p&gt;The first major leap comes from eliminating per-byte work: reading in 1 MiB chunks and scanning as &lt;code&gt;uint64&lt;/code&gt; words immediately crosses 13 GB/s. &lt;code&gt;mmap&lt;/code&gt; doesn&amp;rsquo;t automatically win because, while it avoids copying into userspace buffers, touching every page triggers over a million minor page faults. Parallelism helps further, and parallel &lt;code&gt;pread&lt;/code&gt; handily beats parallel &lt;code&gt;mmap&lt;/code&gt;—which plateaus around 28 GB/s due to page-fault lock contention—because sequential block copies are cheaper than massive concurrent page faults. Adding SIMD via AVX2 or Go 1.26&amp;rsquo;s &lt;code&gt;simd/archsimd&lt;/code&gt; package makes the inner scan loop nearly free, at which point memory bandwidth, read strategy, and concurrency become the real bottlenecks. On a Ryzen 5 9600X under WSL2 with a warm page cache, parallel &lt;code&gt;pread&lt;/code&gt; plus SIMD reaches ~49 GB/s; going any faster requires reading less data or buying faster hardware.&lt;/p&gt;
&lt;h2 id="http-caching-a-refresher"&gt;&lt;a href="https://danburzo.ro/http-caching-refresher/" rel="noopener noreferrer"&gt;HTTP caching, a refresher&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dan Cătălin Burzo revisits RFC 9111 to organize the essential concepts of modern HTTP caching. He reminds readers that &amp;ldquo;the cache&amp;rdquo; isn&amp;rsquo;t just the browser&amp;rsquo;s private cache, but also shared caches like proxies, CDNs, and Varnish sitting between clients and origin servers. At the center is the &lt;code&gt;Cache-Control&lt;/code&gt; header: directives like &lt;code&gt;max-age&lt;/code&gt;, &lt;code&gt;s-maxage&lt;/code&gt;, &lt;code&gt;no-cache&lt;/code&gt;, &lt;code&gt;no-store&lt;/code&gt;, &lt;code&gt;private&lt;/code&gt;, &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;must-revalidate&lt;/code&gt;, &lt;code&gt;stale-while-revalidate&lt;/code&gt;, and &lt;code&gt;stale-if-error&lt;/code&gt; govern not only whether a response may be stored, but also how long it stays &amp;ldquo;fresh&amp;rdquo; (based on age versus &lt;code&gt;max-age&lt;/code&gt;, &lt;code&gt;s-maxage&lt;/code&gt;, &lt;code&gt;Expires&lt;/code&gt;, or heuristics from &lt;code&gt;Last-Modified&lt;/code&gt;), when it must be revalidated with the origin, and whether a shared cache is allowed to store responses to requests carrying an &lt;code&gt;Authorization&lt;/code&gt; header.&lt;/p&gt;
&lt;p&gt;Burzo also clarifies several common points of confusion. A stale response isn&amp;rsquo;t necessarily discarded: a cache can send a conditional request using &lt;code&gt;If-None-Match&lt;/code&gt; (with an &lt;code&gt;ETag&lt;/code&gt;) or &lt;code&gt;If-Modified-Since&lt;/code&gt; (with &lt;code&gt;Last-Modified&lt;/code&gt;) to receive a &lt;code&gt;304 Not Modified&lt;/code&gt; without re-downloading the body. The &lt;code&gt;Vary&lt;/code&gt; header splits the cache key across request headers like &lt;code&gt;Accept-Language&lt;/code&gt;, which can tank hit rates if header values are too diverse, while &lt;code&gt;No-Vary-Search&lt;/code&gt; solves the inverse problem by ignoring query parameters that don&amp;rsquo;t affect response content. The final section compares normal reloads against hard reloads in browsers, explains the role of &lt;code&gt;immutable&lt;/code&gt;, and warns that misusing &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;s-maxage&lt;/code&gt;, or &lt;code&gt;must-revalidate&lt;/code&gt; can trick shared caches into storing authenticated responses—so reach for &lt;code&gt;private&lt;/code&gt; whenever a response belongs strictly to one user.&lt;/p&gt;
&lt;h2 id="how-to-use-ss-as-a-replacement-for-netstat-to-view-ipv4-sockets"&gt;&lt;a href="https://oneuptime.com/blog/post/2026-03-20-ss-replacement-netstat-ipv4-sockets/view" rel="noopener noreferrer"&gt;How to Use ss as a Replacement for netstat to View IPv4 Sockets&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Nawaz Dhandala introduces &lt;code&gt;ss&lt;/code&gt; as the modern replacement for the deprecated &lt;code&gt;netstat&lt;/code&gt; utility when inspecting sockets on Linux. Because &lt;code&gt;ss&lt;/code&gt; queries socket state directly from the kernel via netlink rather than parsing &lt;code&gt;/proc&lt;/code&gt; files, it is significantly faster, especially on busy servers handling thousands of connections. Focusing on IPv4 with the &lt;code&gt;-4&lt;/code&gt; flag, the post walks through everyday command patterns: listing all TCP, UDP, and raw sockets, viewing active TCP connections, checking listening ports, displaying process names and PIDs (when run with privileges), filtering by state such as &lt;code&gt;state established&lt;/code&gt;, filtering by port with expressions like &lt;code&gt;dport = :443&lt;/code&gt;, filtering by address like &lt;code&gt;src 192.168.1.100&lt;/code&gt;, and viewing summary statistics with &lt;code&gt;ss -s&lt;/code&gt;. The flags &lt;code&gt;-t&lt;/code&gt;, &lt;code&gt;-u&lt;/code&gt;, &lt;code&gt;-l&lt;/code&gt;, &lt;code&gt;-n&lt;/code&gt;, and &lt;code&gt;-p&lt;/code&gt; map cleanly to TCP, UDP, listening sockets, numeric output, and process info.&lt;/p&gt;
&lt;p&gt;The handiest section is a side-by-side translation table from &lt;code&gt;netstat&lt;/code&gt; to &lt;code&gt;ss&lt;/code&gt;: muscle-memory commands like &lt;code&gt;netstat -an&lt;/code&gt;, &lt;code&gt;netstat -tnp&lt;/code&gt;, and &lt;code&gt;netstat -tlnp&lt;/code&gt; translate directly to &lt;code&gt;ss -an&lt;/code&gt;, &lt;code&gt;ss -tnp&lt;/code&gt;, and &lt;code&gt;ss -tlnp&lt;/code&gt;. For day-to-day troubleshooting, &lt;code&gt;ss -4tulnp&lt;/code&gt; is the most compact command to see all listening IPv4 TCP and UDP sockets along with their owning processes, while &lt;code&gt;ss -4tn state established&lt;/code&gt; is ideal for inspecting active IPv4 TCP connections. It serves as a concise, practical cheat sheet for Linux operations.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #75</title><link>https://miti99.com/en/post/2025/12/28/</link><pubDate>Sun, 28 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/28/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #75.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="front-end-vs-back-end-vs-system-design--what"&gt;&lt;a href="https://designgurus.substack.com/p/front-end-vs-back-end-vs-system-design" rel="noopener noreferrer"&gt;Front-End vs. Back-End vs. System Design – What&amp;rsquo;s the Difference in Interviews?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Front-end, back-end, and system design interviews evaluate very different skill sets, so each requires its own preparation strategy. Front-end interviews revolve around the client side: HTML, CSS, JavaScript, and usually a framework like React. They place less emphasis on complex algorithms and lean more toward domain knowledge like responsive design, CSS specificity, browser rendering pipelines, asynchronous JavaScript, and load-time optimization. Back-end interviews are more traditional: LeetCode-style data structures and algorithms with complexity analysis, paired with practical knowledge of APIs, databases (SQL and NoSQL, indexing, schema design), caching, and message queues. System design interviews zoom out to the big picture, testing your ability to architect a real-world system from scratch that is scalable, reliable, and maintainable.&lt;/p&gt;
&lt;p&gt;The author uses a house-building analogy: front-end is like interior design (how the rooms look and feel), back-end is like the structure and foundation (whether the house stands firm and utilities work properly), and system design is like the urban architect planning the entire neighborhood, deciding where houses, roads, and utilities go. To prepare for front-end interviews, build a few small projects and brush up on browser fundamentals and HTTP. For back-end, practicing algorithms and mastering database fundamentals remain the core focus.&lt;/p&gt;
&lt;h2 id="why-starting-with-microservices-can-be-your-biggest-architectural-mistake"&gt;&lt;a href="https://designgurus.substack.com/p/why-starting-with-microservices-can" rel="noopener noreferrer"&gt;Why Starting with Microservices Can Be Your Biggest Architectural Mistake&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Microservices are often treated as the industry default, but starting a brand-new project with microservices is a common and costly mistake: what works for a 5,000-engineer organization is usually poison for a five-person team. The core advice is &amp;ldquo;Monolith First.&amp;rdquo; A monolith&amp;rsquo;s superpower is simplicity: all code lives in one place, deploys as a single unit, and function calls happen instantaneously in the same memory space. Microservices introduce three nightmares. First, networks are unreliable, turning simple function calls into distributed systems problems with retries and timeouts. Second, each service owns its own database, so you can no longer &lt;code&gt;JOIN&lt;/code&gt; tables and must stitch data together in application code. Third, 10 services mean 10 build pipelines, 10 servers to monitor, and 10 places to dig through logs.&lt;/p&gt;
&lt;p&gt;At the start of a project, you also don&amp;rsquo;t yet know where the domain boundaries should be. Refactoring a monolith is just moving files between folders, whereas refactoring microservices requires changing API contracts, migrating databases, and coordinating multi-service deployments. A pragmatic middle ground is the Modular Monolith: a single codebase cleanly organized into modules like &lt;code&gt;/src/users&lt;/code&gt; and &lt;code&gt;/src/orders&lt;/code&gt; that still run inside a single runtime. This gives you the organizational clarity of microservices without the operational tax. Only move to microservices when the team outgrows the monolith (around 100 engineers), when individual features have vastly different scaling needs, or when you genuinely need polyglot technology stacks. Don&amp;rsquo;t optimize prematurely; wait until the pain is real.&lt;/p&gt;
&lt;h2 id="the-linux-kernel-is-just-a-program"&gt;&lt;a href="https://serversfor.dev/linux-inside-out/the-linux-kernel-is-just-a-program/" rel="noopener noreferrer"&gt;The Linux kernel is just a program&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article demystifies the Linux kernel—often treated as an impenetrable &amp;ldquo;black box&amp;rdquo;—through hands-on experiments. At its core, the kernel provides an abstraction layer for using hardware conveniently and safely: a unified API for interacting with hardware, managing how programs share CPU, memory, and resources, and enforcing access control. The closest analogy is that the kernel is simply a &amp;ldquo;runtime&amp;rdquo; for your computer. On most distributions, the kernel is just a compressed file of a few megabytes named &lt;code&gt;vmlinuz-…&lt;/code&gt; sitting in &lt;code&gt;/boot&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The author copies that file out and boots it directly with QEMU; the kernel starts up in about two seconds and then panics because it cannot find a root filesystem to hand off execution to an &lt;code&gt;init&lt;/code&gt; program—which is the exact expected behavior. Next, the author writes a tiny &lt;code&gt;init&lt;/code&gt; program in Go, packs it into a minimal &lt;code&gt;initramfs&lt;/code&gt;, and boots again. This time, the kernel runs the Go binary as PID 1. From this experiment, several core concepts click into place: a Linux distribution is just the kernel plus userland programs and configuration files; a process is a running program; a PID is a process identifier; &lt;code&gt;init&lt;/code&gt; is the very first process, responsible for starting other programs; and &lt;code&gt;init&lt;/code&gt; is the first program running in user space, where the kernel hands over control after initialization. This practical approach builds a clear mental model of how Linux actually works.&lt;/p&gt;
&lt;h2 id="why-your-load-balancer-is-the-bottleneck-and-how-to-fix-it"&gt;&lt;a href="https://designgurus.substack.com/p/dont-let-your-load-balancer-crash" rel="noopener noreferrer"&gt;Why Your Load Balancer is the Bottleneck (and How to Fix It)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Distributed systems have an ironic paradox: you add a load balancer to distribute traffic evenly across application servers, but when your product takes off, the load balancer itself becomes the bottleneck. Your application servers are healthy and your database is barely breaking a sweat, yet users complain that the site is slow or unreachable. According to the author, this is what separates junior developers from senior architects: plenty of people know how to put a load balancer in front of a service, but far fewer know what to do when the load balancer itself is the problem. The post explains why this happens and introduces five scaling strategies used by major tech companies.&lt;/p&gt;
&lt;p&gt;Strategies covered include DNS Round Robin to split traffic right at the DNS layer, choosing between Layer 4 and Layer 7 routing to reduce processing overhead, and Direct Server Return (DSR), which lets backend servers send responses straight back to the client without passing back through the load balancer. Each approach comes with trade-offs: DNS Round Robin is simple but slow to propagate changes, Layer 4 is faster than Layer 7 but offers fewer routing features, and DSR saves massive egress bandwidth at the cost of complex network configuration. Mastering these techniques lets your load-balancing tier scale horizontally alongside your application servers instead of becoming a single point of congestion.&lt;/p&gt;
&lt;h2 id="the-high-availability-blueprint-designing-systems-that-never-sleep"&gt;&lt;a href="https://designgurus.substack.com/p/the-high-availability-blueprint-designing" rel="noopener noreferrer"&gt;The High Availability Blueprint: Designing Systems That Never Sleep&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;High Availability (HA) is the art of building systems that &amp;ldquo;never sleep&amp;rdquo; on top of hardware that is guaranteed to fail. HA isn&amp;rsquo;t just about preventing failures—it&amp;rsquo;s about masking them so users never notice. Availability is measured in &amp;ldquo;nines&amp;rdquo;: 99% equates to about 3.65 days of downtime per year, 99.9% is about 8.76 hours, and 99.999% (&amp;ldquo;five nines&amp;rdquo;) is just over 5 minutes; every additional nine is exponentially harder and more expensive to achieve. The core philosophy is &amp;ldquo;assume everything will fail and plan for it.&amp;rdquo; The biggest enemy is a Single Point of Failure (SPOF)—any component whose failure brings down the entire system—and the antidote is redundancy: duplicating critical components.&lt;/p&gt;
&lt;p&gt;Key techniques include load balancers paired with health checks to automatically remove unhealthy servers from rotation; Leader-Follower database replication where a Follower is promoted to Leader upon failure; and failover strategies in two flavors. Active-Passive is simple but wasteful since standby servers sit idle most of the time. Active-Active utilizes all hardware continuously but is more complex, and in a two-node setup each node must be provisioned to handle 100% of the traffic if its peer goes down. Additionally, rate limiting (returning HTTP 429 when thresholds are exceeded) prevents cascading failures during traffic spikes. Achieving five nines requires geographic distribution across multiple regions to survive regional disasters. The guiding mantra: &amp;ldquo;Two is one, and one is none&amp;rdquo;—always have a backup plan.&lt;/p&gt;
&lt;h2 id="bonus"&gt;Bonus&lt;/h2&gt;&lt;h3 id="images"&gt;Images&lt;/h3&gt;&lt;p&gt;&lt;img src="https://substackcdn.com/image/fetch/$s_!ETm5!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2112a03d-cc48-4db5-9740-94adc1a7efbf_2360x2920.png" alt="Common Network Protocols Every Engineer Should Know"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!5bFA!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F722913d5-a10f-44c2-98ed-edc27a92a137_1444x1882.jpeg" alt="8 Popular Network Protocols"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!pen8!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22fdf2d2-5ce5-4c2b-90f9-3bcfcecb5fc1_1370x1536.jpeg" alt="9 best practices for developing microservices"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #69</title><link>https://miti99.com/en/post/2025/12/12/</link><pubDate>Fri, 12 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/12/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #69. &lt;del&gt;This post was created using &lt;a href="https://github.com/anthropics/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://github.com/musistudio/claude-code-router" rel="noopener noreferrer"&gt;Claude Code Router&lt;/a&gt;, &lt;a href="https://platform.iflow.cn" rel="noopener noreferrer"&gt;iFlow Open Platform&lt;/a&gt; &amp;amp; GLM-4.6&lt;/del&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-and-why-netflix-built-a-real-time-distributed-graph-part-1--ingesting-and-processing-data-streams-at-internet-scale"&gt;&lt;a href="https://netflixtechblog.com/how-and-why-netflix-built-a-real-time-distributed-graph-part-1-ingesting-and-processing-data-80113e124acc" rel="noopener noreferrer"&gt;How and Why Netflix Built a Real-Time Distributed Graph: Part 1 — Ingesting and Processing Data Streams at Internet Scale&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As Netflix expanded beyond on-demand video streaming into ad-supported tiers, live events, and mobile games, understanding a member&amp;rsquo;s journey across devices and business lines grew increasingly difficult. A microservices architecture with hundreds of services—each managing its own data store—fragmented the data and forced analytics teams to stitch records together manually. In response, Netflix&amp;rsquo;s data engineering team built the Real-Time Distributed Graph (RDG): modeling domain entities as a graph so relationships can be queried via multi-hop traversals across nodes and edges rather than expensive relational &lt;code&gt;JOIN&lt;/code&gt;s, making it easy to onboard new entity types and spot behavioral patterns or anomalies.&lt;/p&gt;
&lt;p&gt;Part 1 focuses on the ingestion and stream-processing pipeline. User interactions flow through the API Gateway into Kafka topics (some handling up to ~1 million messages per second, encoded in Avro and simultaneously archived to Apache Iceberg tables for historical backfills). Apache Flink jobs filter out noise, enrich events with metadata, transform raw events into graph nodes and edges, and batch and deduplicate updates within a short time window before writing over 5 million records per second into Netflix&amp;rsquo;s Data Mesh. A key operational lesson: running a single monolithic Flink job across all topics proved nearly impossible to tune, so the team moved to one Flink job per Kafka topic—accepting higher operational overhead in exchange for isolation and independent tuning.&lt;/p&gt;
&lt;h2 id="start-small-scale-smart-the-real-value-of-incremental-architecture"&gt;&lt;a href="https://newsletter.optimistengineer.com/p/incremental-architecture-what-you" rel="noopener noreferrer"&gt;Start Small, Scale Smart: The Real Value of Incremental Architecture&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Incremental architecture is the practice of designing systems so they can evolve gracefully, grounded in Gall&amp;rsquo;s Law: if you start with a complex system from scratch, you will end up with a complex system that doesn&amp;rsquo;t work. In the author&amp;rsquo;s view, team organization matters more than technology: cross-functional teams that own a business domain end-to-end outperform layer-siloed teams, and if you want microservices, you must first build independent teams. Architects should act as mentors who still write code and steward system coherence rather than handing down mandates from an ivory tower, spreading knowledge through pair and mob programming. Instead of asking &amp;ldquo;how long will this take?&amp;rdquo;, ask &amp;ldquo;how can we make this smaller?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;On the technical side, the post advises applying architectural patterns only when you actually feel the pain they solve, using the Strangler Fig pattern to incrementally extract cleaner modules out of legacy monoliths, and building small, single-responsibility, replaceable components with firm boundaries—which naturally become candidates for future microservices. Event-driven architecture reduces coupling by letting components emit events instead of relying on central orchestration, while Domain-Driven Design and a shared Ubiquitous Language clarify events, consequences, and actors before anyone writes a line of code.&lt;/p&gt;
&lt;h2 id="java-interview-question---why-collection-doesn"&gt;&lt;a href="https://javabulletin.substack.com/p/java-interview-question-why-collection" rel="noopener noreferrer"&gt;Java Interview Question - Why Collection doesn&amp;rsquo;t extend Cloneable and Serializable interfaces?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This interview question explores a classic Java design decision: why the root &lt;code&gt;Collection&lt;/code&gt; interface does not extend &lt;code&gt;Cloneable&lt;/code&gt; or &lt;code&gt;Serializable&lt;/code&gt;. The core reason is that not every collection can—or should—be cloned or serialized, so forcing both interfaces at the top of the hierarchy would impose unrealistic constraints on specialized implementations. For example, &lt;code&gt;Collections.unmodifiableList()&lt;/code&gt; is just a read-only view where deep cloning would break its semantics, &lt;code&gt;WeakHashMap&lt;/code&gt; relies on JVM-managed weak references that don&amp;rsquo;t make sense to serialize, and a &lt;code&gt;TreeMap&lt;/code&gt; configured with a non-serializable &lt;code&gt;Comparator&lt;/code&gt; cannot be serialized either. (Note that &lt;code&gt;ConcurrentSkipListMap&lt;/code&gt; actually &lt;em&gt;does&lt;/em&gt; implement both &lt;code&gt;Cloneable&lt;/code&gt; and &lt;code&gt;Serializable&lt;/code&gt;, so it isn&amp;rsquo;t an example of this restriction.)&lt;/p&gt;
&lt;p&gt;Furthermore, both &lt;code&gt;Cloneable&lt;/code&gt; and &lt;code&gt;Serializable&lt;/code&gt; are flawed marker interfaces from Java 1.0: &lt;code&gt;Cloneable&lt;/code&gt; declares no methods of its own and encourages error-prone shallow copies, while &lt;code&gt;Serializable&lt;/code&gt; creates versioning headaches and security vulnerabilities. When the Collections Framework was introduced in Java 1.2, its designers left it up to concrete classes like &lt;code&gt;ArrayList&lt;/code&gt; or &lt;code&gt;HashMap&lt;/code&gt; to opt in where appropriate, keeping the core abstraction clean. In modern Java, it&amp;rsquo;s better to copy collections via copy constructors like &lt;code&gt;new ArrayList&amp;lt;&amp;gt;(list)&lt;/code&gt; or &lt;code&gt;List.copyOf()&lt;/code&gt;, and use explicit formats like JSON instead of default Java serialization.&lt;/p&gt;
&lt;h2 id="we-stopped-roadmap-work-for-a-week-and-fixed-189-bugs"&gt;&lt;a href="https://lalitm.com/fixits-are-good-for-the-soul/" rel="noopener noreferrer"&gt;We stopped roadmap work for a week and fixed 189 bugs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author shares the story of a quarterly &amp;ldquo;Fixit Week,&amp;rdquo; where an organization of roughly 45 engineers paused all roadmap work for a full week. Across two time zones, 40 participating engineers squashed 189 bugs—averaging more than 4 bugs per person, with the top contributor fixing 12. The ground rules were strict: no single bug could take more than 2 days, work had to focus on small end-user papercuts or developer-productivity improvements, and all regular meetings, design reviews, and roadmap tasks were canceled. The event was gamified with point values scaled by task size, a live leaderboard, daily recaps, and custom t-shirts for awards like &amp;ldquo;first bug fixed&amp;rdquo; and &amp;ldquo;most annoying bug squashed.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Standout wins included closing a four-year-old feature request in a single day and shipping a 25-line GitHub Action that saved frontend engineers repetitive daily toil. Key ingredients for success were prepping a triaged, t-shirt-sized backlog ahead of time, reaching critical mass so the whole team felt the energy, keeping Fixit points strictly separate from performance reviews, and leaning on AI coding tools to lower the context-switching cost of jumping into unfamiliar directories. As the author concludes, Fixit Weeks restore pride in craftsmanship, the joy of shipping immediate improvements, and team camaraderie.&lt;/p&gt;
&lt;h2 id="the-math-of-why-you-can"&gt;&lt;a href="https://justoffbyone.com/posts/math-of-why-you-cant-focus-at-work/" rel="noopener noreferrer"&gt;The Math of Why You Can&amp;rsquo;t Focus at Work&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post models knowledge-worker productivity using three parameters: λ, the rate of interruptions per hour (modeled as a Poisson process); Δ, the number of minutes needed to regain focus after each interruption; and θ, the minimum contiguous block of focused time required to make meaningful progress (typically 30–60 minutes for complex engineering work). Effective work capacity is the number of θ-sized blocks that fit inside the uninterrupted gaps—meaning that the same total number of hours, when chopped into fragments, yields drastically less output than contiguous blocks. Cited workplace studies suggest knowledge workers are interrupted every 2–3 minutes on average and take 10–16 minutes to refocus.&lt;/p&gt;
&lt;p&gt;Plug those typical workplace numbers into the math and deep work becomes nearly impossible—yet small shifts in any of the three parameters produce massive gains. The author points to three practical levers: lower λ by setting communication boundaries and defending calendar blocks, shrink θ to fit your environment by decomposing tasks into smaller self-contained steps, and reduce Δ through better context management, such as leaving yourself breadcrumb notes so you can resume work quickly after an interruption.&lt;/p&gt;
&lt;h2 id="tech-predictions-for-2026-and-beyond"&gt;&lt;a href="https://www.allthingsdistributed.com/2025/11/tech-predictions-for-2026-and-beyond.html" rel="noopener noreferrer"&gt;Tech predictions for 2026 and beyond&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Werner Vogels outlines five technology predictions for 2026 and beyond. First, physical AI will redefine companionship for vulnerable populations: loneliness affects one in six people worldwide and raises mortality risk by 32%, whereas clinical studies with the Paro robotic seal showed positive engagement in 95% of dementia patients. Second is the rise of the &amp;ldquo;renaissance developer&amp;rdquo;: generative AI will elevate rather than replace developers—just as compilers and cloud computing did before—because humans still own business constraints, customer empathy, and systems thinking. Third, quantum-safe security becomes urgent as the estimated qubit count needed to break 2048-bit RSA has dropped below one million, and Vogels predicts quantum computers capable of breaking RSA and elliptic-curve cryptography could arrive within roughly five years.&lt;/p&gt;
&lt;p&gt;Fourth, modern defense tech is being built as dual-use from day one, crossing over into civilian applications far faster than the 10–20-year lag of previous decades, with companies like Anduril reaching $1 billion in revenue in 2024. Finally, AI-powered personalized education will go mainstream: AI tutors cost around $4 a month, Khanmigo reached 1.4 million students in its first year, and teachers using AI tools save roughly 5.9 hours per week to reinvest in direct human teaching.&lt;/p&gt;
&lt;h2 id="why-i-still-love-linux"&gt;&lt;a href="https://it-notes.dragas.net/2025/11/24/why-i-still-love-linux/" rel="noopener noreferrer"&gt;Why I (still) love Linux&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stefano Marinelli reflects on nearly 30 years with Linux, starting in 1996 after his DOS and Commodore 64 days, when Linux gave him his first real taste of Unix and a sense of freedom no prior OS had offered. By 1998 he was actively contributing to the community as a speaker and translator. Even though the fabled &amp;ldquo;Year of the Linux Desktop&amp;rdquo; never quite arrived, Linux conquered mobile via Android, servers, and embedded devices, while Ubuntu helped bring Linux to everyday PCs and drew major enterprises into open source.&lt;/p&gt;
&lt;p&gt;Marinelli doesn&amp;rsquo;t hold back on criticisms either: many modern distributions have drifted away from the Unix philosophy of &amp;ldquo;do one thing and do it well,&amp;rdquo; most notably with &lt;code&gt;systemd&lt;/code&gt;; novelty for its own sake often sacrifices stability; corporate interests sometimes steer development toward their own agendas; and software quality has suffered from &amp;ldquo;vibe coding&amp;rdquo; and fragile dependency chains. Although he prefers BSD and illumos for many server workloads today, he still appreciates distributions like Alpine and openSUSE, notes how much better Linux hardware support has become, remains grateful to Linux for launching his career and lifelong learning, and expects to keep using it for another 30 years.&lt;/p&gt;
&lt;h2 id="why-senior-engineers-struggle-to-build-ai-agents"&gt;&lt;a href="https://www.philschmid.de/why-engineers-struggle-building-agents" rel="noopener noreferrer"&gt;Why (Senior) Engineers Struggle to Build AI Agents&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Phil Schmid explains why senior engineers often struggle more than juniors when building AI agents: traditional software engineering is deterministic, whereas LLM-backed agents are inherently probabilistic. Junior engineers tend to trust the model and ship quickly, while seasoned engineers instinctively try to &amp;ldquo;code away&amp;rdquo; the non-determinism. Schmid highlights five mindset shifts. First, natural language is the new state: a nuance like &amp;ldquo;the plan looks good, but focus on the US market&amp;rdquo; should be kept as rich text rather than squeezed into a rigid boolean or enum schema. Second, hand over control flow: let the model navigate unpredictable multi-turn conversations—like a user asking to cancel a subscription and changing their mind after hearing a retention offer—instead of hardcoding every branch.&lt;/p&gt;
&lt;p&gt;Third, errors are just another input: catch tool failures and feed the error message back into the agent&amp;rsquo;s context so it can self-correct, rather than throwing an unhandled exception. Fourth, move from unit tests to evals: alongside deterministic tests, measure end-to-end reliability, use LLM-as-a-judge for output quality, and inspect intermediate reasoning traces. Fifth, agents evolve while APIs stay fixed: because agents interpret tool schemas literally, APIs need clear docstrings and explicit parameter names like &lt;code&gt;user_email_address&lt;/code&gt; instead of &lt;code&gt;email&lt;/code&gt; to prevent hallucinations. Ultimately, engineers must trade a degree of rigid certainty for semantic flexibility.&lt;/p&gt;
&lt;h2 id="how-java-achieves-zero-copy-file-transfer"&gt;&lt;a href="https://javabulletin.substack.com/p/how-java-achieves-zero-copy-file" rel="noopener noreferrer"&gt;How Java Achieves Zero-Copy File Transfer&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Zero-copy is the technique of transferring file data from disk to a network socket without copying bytes through JVM user-space memory. Traditional file serving reads data from disk into the OS kernel page cache, copies it into a user-space JVM buffer, and copies it right back into a kernel socket buffer before sending it to the NIC; zero-copy lets the kernel move data directly between kernel buffers (from page cache to socket buffer and out via DMA to the network card), cutting CPU usage, context switches, and JVM garbage-collection pressure from temporary &lt;code&gt;byte[]&lt;/code&gt; allocations.&lt;/p&gt;
&lt;p&gt;Java exposes three main mechanisms here. &lt;code&gt;FileChannel.transferTo()&lt;/code&gt; delegates to the OS&amp;rsquo;s &lt;code&gt;sendfile&lt;/code&gt; syscall when the platform and target channel support it (&lt;code&gt;transferFrom()&lt;/code&gt; works in the opposite direction without the same universal syscall guarantee). &lt;code&gt;MappedByteBuffer&lt;/code&gt; maps file pages directly into the process&amp;rsquo;s virtual address space with read-only, read-write, or copy-on-write modes, avoiding user-space read copies though not automatically creating a zero-copy path to a network socket. For high-performance network servers, Netty&amp;rsquo;s &lt;code&gt;DefaultFileRegion&lt;/code&gt; wraps file channels to exploit native transport zero-copy. The technique does have limits: user-space TLS encryption usually breaks the direct kernel path because bytes must be encrypted before transmission, tiny files rarely justify the syscall setup overhead, and any in-flight data transformation like compression requires touching the bytes in memory anyway.&lt;/p&gt;
&lt;h3 id="bonus"&gt;Bonus&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Images:&lt;/strong&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/20ed383c-5900-4f31-9041-afb5581b1ad4_2250x2624.png" alt="Top Strategies to Build High Availability Systems"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!Eyti!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F862d0649-d77b-410f-95a5-6505c9eeb15a_2250x2814.png" alt="Cloudflare vs. AWS vs. Azure"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!52bX!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65613a28-2320-4bb6-a610-5ab96b13240d_800x903.jpeg" alt="Popular Backend Tech Stack"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!JV_9!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95473e0-5a68-43c6-841e-540a6b198d6d_2360x2960.png" alt="HTTP vs. HTTPS"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!5rGo!,w_550,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac99f98d-49a7-4933-b06f-8da0901d210e_800x939.gif" alt="Forward Proxy versus Reverse Proxy"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!qtkE!,w_550,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4646c2e2-a6fb-44e7-a091-73fcbd8fa498_800x1040.gif" alt="Things Every Developer Should Know: Concurrency is NOT parallelism"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #65</title><link>https://miti99.com/en/post/2025/12/08/</link><pubDate>Mon, 08 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/08/</guid><description>&lt;p&gt;&lt;em&gt;&lt;del&gt;Lately the free models on OpenRouter have been pretty unstable—sometimes they work, sometimes they don&amp;rsquo;t. Since I still had a few dollars of credit left there, I decided to burn through the rest today before switching over to iFlow full-time (until iFlow stops being free :v).&lt;/del&gt; Enjoy Newsletter #65. &lt;del&gt;This post was created using &lt;a href="https://github.com/anthropics/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://github.com/musistudio/claude-code-router" rel="noopener noreferrer"&gt;Claude Code Router&lt;/a&gt;, &lt;a href="https://openrouter.ai" rel="noopener noreferrer"&gt;OpenRouter&lt;/a&gt; &amp;amp; &lt;a href="https://openrouter.ai/anthropic/claude-sonnet-4.5" rel="noopener noreferrer"&gt;Anthropic: Claude Sonnet 4.5&lt;/a&gt; (a &amp;lsquo;premium&amp;rsquo; model hehe)&lt;/del&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="scaling-engineering-teams-lessons-from-google-facebook-and-netflix"&gt;&lt;a href="https://greenido.dev/2025/09/25/scaling-engineering-teams-lessons-from-google-facebook-and-netflix/" rel="noopener noreferrer"&gt;Scaling Engineering Teams: Lessons from Google, Facebook, and Netflix&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ido Green, drawing on more than a decade of engineering leadership at Google, Facebook, and Netflix, argues that when scaling from 10 to over 1,000 engineers, whether an organization thrives or collapses comes down to three pillars: structured goal-setting, an uncompromising focus on code quality, and intentional culture-building. At Google, OKRs are set ambitiously—3–5 objectives per team with 2–4 measurable key results each—where hitting 60–70% is the sweet spot and 100% means the goals weren&amp;rsquo;t ambitious enough. For code quality, Facebook requires every line of code to be reviewed, every part of the codebase to have an owner, and new code to maintain at least 80% test coverage; Netflix proactively injects failures with Chaos Monkey (randomly terminating production instances), runs failure drills, and rolls out canaries to 1% of users first.&lt;/p&gt;
&lt;p&gt;On culture, Google sets aside one afternoon a month for experimentation; Facebook puts new hires through a 6-week Bootcamp where they fix bugs across the stack before choosing a team; and Netflix hires top talent, pays top-of-market compensation, and treats people like adults. Green recommends tracking the four DORA metrics such as deployment frequency and mean time to recovery. The biggest lesson: hero culture, manual processes, and tribal knowledge work at 10 people but become a disaster at 100; what scales are systems, documentation, automation, and clear ownership. Rather than cargo-culting practices, execute consistently and measure what matters.&lt;/p&gt;
&lt;h2 id="the-trap-of-excessive-ai-use"&gt;&lt;a href="https://dpereira.substack.com/p/the-trap-of-excessive-ai-use" rel="noopener noreferrer"&gt;The Trap of Excessive AI Use&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;David Pereira, author of &lt;em&gt;Untrapping Product Teams&lt;/em&gt;, warns that overusing AI makes us mediocre rather than better. He isn&amp;rsquo;t anti-AI, but opposes the &amp;ldquo;automate everything&amp;rdquo; mindset—the assumption that if AI can do something, we no longer need to care about it. AI makes us faster, not wiser. He points to troubling habits: delegating prioritization to AI, having AI write PRDs instead of thinking through what actually matters, summarizing everything instead of learning deeply, and replacing real user research with AI-generated insights. Critical thinking, understanding human behavior, and challenging assumptions must remain ours; paradoxically, the more people rush to outsource everything to AI, the more valuable those who don&amp;rsquo;t become.&lt;/p&gt;
&lt;p&gt;Pereira shares his own &amp;ldquo;old-school&amp;rdquo; habits—reading every message himself, writing his own emails to give himself time to think, reading whole books cover to cover, taking handwritten notes, and single-tasking—viewing them as a competitive edge. Still, AI is great for accelerating low-value work (drafting meeting notes, summarizing competitor features), exploring alternatives and stress-testing assumptions, tailoring messaging for different audiences, and brainstorming experiment ideas to learn faster. His rule of thumb is &amp;ldquo;AI can draft, but I decide&amp;rdquo;: delegate tasks, never ownership, because letting AI decide crosses the line from leveraging a tool to abdicating responsibility.&lt;/p&gt;
&lt;h2 id="how-google-amazon-and-crowdstrike-broke-millions-of-systems"&gt;&lt;a href="https://newsletter.techworld-with-milan.com/p/how-google-amazon-and-crowdstrike" rel="noopener noreferrer"&gt;How Google, Amazon, and CrowdStrike Broke Millions of Systems&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Milan Milanović dissects three massive outages showing how even simple bugs can turn catastrophic at hyperscale. In October 2025, a race condition in DynamoDB&amp;rsquo;s automated DNS management in &lt;code&gt;us-east-1&lt;/code&gt; caused a 15-hour AWS outage across 113 services: a delayed DNS Enactor overwrote Route 53 with a stale plan right as another Enactor cleaned up &amp;ldquo;expired&amp;rdquo; plans, wiping out the DNS records entirely—a classic time-of-check to time-of-use (TOCTOU) bug. DNS was restored after about 3 hours, but cascading failures dragged on for another 12. In June 2025, Google Cloud went down for roughly 7 hours: new code in Service Control, the gateway for every API call, lacked a null check and wasn&amp;rsquo;t gated behind a feature flag; it lay dormant for 14 days until a policy with a blank field was replicated globally via Spanner in seconds.&lt;/p&gt;
&lt;p&gt;The third outage struck in July 2024: Channel File 291 triggered an out-of-bounds array read inside CrowdStrike&amp;rsquo;s kernel-mode interpreter, sending 8.5 million Windows machines into boot loops that had to be fixed manually in Safe Mode one machine at a time. Across all three incidents, speed was prioritized over safety, single points of failure had massive blast radii, and automated recovery mechanisms themselves became failure amplifiers. The takeaways: use atomic state transitions, add circuit breakers and jittered backoff to recovery loops, roll out changes in stages with canaries, validate data before global replication, and test configuration with the same rigor as code.&lt;/p&gt;
&lt;h2 id="the-linux-boot-process-from-power-button-to-kernel"&gt;&lt;a href="https://www.0xkato.xyz/linux-boot/" rel="noopener noreferrer"&gt;The Linux Boot Process: From Power Button to Kernel&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post walks clearly through how Linux boots on x86 hardware, from pressing the power button to the kernel&amp;rsquo;s entry point, focusing primarily on the traditional BIOS flow (UEFI or alternative bootloaders skip some of these steps). When power comes on, the CPU resets into 16-bit real mode—a legacy of the original 8086—and jumps to the reset vector at &lt;code&gt;0xFFFFFFF0&lt;/code&gt;, where firmware places a jump instruction into its own initialization code. Legacy BIOS scans disks for a 512-byte boot sector ending in &lt;code&gt;0x55&lt;/code&gt; &lt;code&gt;0xAA&lt;/code&gt;, whereas modern UEFI understands filesystems and loads larger boot binaries directly. A bootloader like GRUB loads the kernel image into memory, populates the setup header, and hands control to the kernel&amp;rsquo;s setup code. That code establishes a predictable environment: normalizing segment registers, setting up a stack, zeroing the BSS section, and querying firmware for the system memory map via the &lt;code&gt;e820&lt;/code&gt; BIOS interrupt. Next come two mode transitions: into 32-bit protected mode (disabling interrupts, enabling the A20 line, loading minimal GDT and IDT tables, and setting the PE bit in &lt;code&gt;CR0&lt;/code&gt;), and then into 64-bit long mode (enabling PAE in &lt;code&gt;CR4&lt;/code&gt;, building identity-mapped page tables, loading their address into &lt;code&gt;CR3&lt;/code&gt;, and setting the LME bit in &lt;code&gt;EFER&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Once in 64-bit mode, &lt;code&gt;extract_kernel&lt;/code&gt; decompresses the kernel image (&lt;code&gt;gzip&lt;/code&gt;, &lt;code&gt;xz&lt;/code&gt;, &lt;code&gt;zstd&lt;/code&gt;, etc.), parses the ELF header to place code and data sections, applies relocations if the kernel isn&amp;rsquo;t loaded at its default address, and jumps into &lt;code&gt;start_kernel&lt;/code&gt;. The article also explains kASLR: the decompressor picks random physical and virtual base addresses within available memory ranges—carefully avoiding occupied regions like &lt;code&gt;initrd&lt;/code&gt;—making it much harder for attackers to guess where kernel code lives, and falling back to the default address if no suitable slot is found. Complete with a glossary, it&amp;rsquo;s an approachable primer for newcomers.&lt;/p&gt;
&lt;h2 id="build-system-tradeoffs"&gt;&lt;a href="https://jyn.dev/build-system-tradeoffs" rel="noopener noreferrer"&gt;Build System Tradeoffs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;jyn, who works on the build system for the Rust compiler, kicks off a series on build systems with a survey of what complex builds actually have to juggle: running binaries that were just built as part of the build itself (like integration tests invoking &lt;code&gt;cargo build&lt;/code&gt; inside &lt;code&gt;cargo test&lt;/code&gt;), accurate dependency tracking, cross-compilation (requiring compilers, standard libraries, and linkers for both host and target platforms), choosing between dynamic and static linking, and reproducible builds—a prerequisite for safe caching. According to the author, the most common mistake is forcing build configuration into a restrictive custom DSL: purely &amp;ldquo;declarative&amp;rdquo; builds are an illusion, so it&amp;rsquo;s far better to express build logic in a real programming language and serialize the resulting build graph into a minimal format like Ninja.&lt;/p&gt;
&lt;p&gt;For dependency tracking, there are four main approaches. Manual declarations—even with compiler assistance like &lt;code&gt;gcc -M&lt;/code&gt;—are error-prone. Always rebuilding from scratch is guaranteed correct but slow. Hermetic builds like Bazel, Buck2, and Nix restrict steps to explicitly declared inputs, unlocking safe remote caching. Tracing builds like Tup and Ekam discover dependencies automatically by intercepting syscalls, requiring zero manual declarations, but mostly only work on Linux and struggle to scale because the graph isn&amp;rsquo;t known upfront. The author concludes that prioritizing correctness always comes with trade-offs, combining syscall tracing with hermetic sandboxing looks like the sweet spot, and writing build rules in a general-purpose language that compiles down to a serialized graph has surprisingly few downsides.&lt;/p&gt;
&lt;h2 id="how-i-use-every-claude-code-feature"&gt;&lt;a href="https://blog.sshh.io/p/how-i-use-every-claude-code-feature" rel="noopener noreferrer"&gt;How I Use Every Claude Code Feature&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Shrivu Shankar shares how he uses nearly every feature of Claude Code in practice. The most important foundation is the root &lt;code&gt;CLAUDE.md&lt;/code&gt; file—the agent&amp;rsquo;s &amp;ldquo;constitution&amp;rdquo;: at his company, it is capped at 13KB and documents only tools used by at least 30% of engineers. He advises starting with guardrails based on mistakes Claude actually makes rather than writing an exhaustive manual, avoiding &lt;code&gt;@&lt;/code&gt;-mention file embeds because they bloat context, and never writing a negative rule without providing the preferred alternative. Within the 200k-token context window, he avoids &lt;code&gt;/compact&lt;/code&gt; because it&amp;rsquo;s opaque and lossy, preferring &lt;code&gt;/clear&lt;/code&gt; paired with a custom &lt;code&gt;/catchup&lt;/code&gt; command that re-reads changed files, or having Claude dump progress to a &lt;code&gt;.md&lt;/code&gt; file before starting a fresh session. He avoids custom subagents because they hide context and force the agent into rigid human workflows; instead, the main agent uses &lt;code&gt;Task(...)&lt;/code&gt; to spawn clones of itself—a pattern he calls &amp;ldquo;Master-Clone.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Hooks are invaluable in enterprise repos: blocking commits when tests haven&amp;rsquo;t passed, paired with non-blocking suggestion hooks, while avoiding block-at-write hooks that confuse the agent mid-task. Echoing Simon Willison, he argues Skills may matter more than MCP because they formalize the &amp;ldquo;scripting&amp;rdquo; paradigm—the evolutionary step after single prompts and tool calling—leaving MCP as a narrow security gateway for stateful environments like Playwright. Finally, the most underrated feature is the Claude Code GitHub Action: full container control, tight sandboxing, and complete audit logs that can be mined periodically to improve &lt;code&gt;CLAUDE.md&lt;/code&gt; and developer tooling.&lt;/p&gt;
&lt;h2 id="if-you-don"&gt;&lt;a href="https://seated.ro/blog/tinkering-a-lost-art" rel="noopener noreferrer"&gt;If you don&amp;rsquo;t tinker, you don&amp;rsquo;t have taste&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;seatedro writes about &amp;ldquo;tinkering&amp;rdquo;—poking at small things and tweaking them just to see how they can be improved—as a lifelong learning tool. The author tried everything from guitar and art to martial arts, yet didn&amp;rsquo;t start tinkering with programming until relatively late; once it clicked, it became central to how they learn, and they wish they had started sooner. Tinkering means spending hours dialing in mouse sensitivity in a game, losing days configuring a Linux window manager just for fun, or taking apart a mechanical keyboard to swap keycaps and test switches. Some people only do things that serve a concrete goal, while others do things &amp;ldquo;just because&amp;rdquo;; the ideal is combining both. The author quotes &lt;code&gt;@ludwigABAP&lt;/code&gt; that tinkering and throwing the result away is practice, and practice should be ephemeral, exploratory, and frequent.&lt;/p&gt;
&lt;p&gt;In the author&amp;rsquo;s view, using Git from the command line instead of GitHub Desktop or knowing basic Vim motions should be baseline literacy rather than a rarity, though balance still matters: the last time they tweaked their Neovim config was six months ago. In a single week, the author wrote their first GLSL fragment shader, Rust procedural macro, C++ template, and Swift app, and tried out the Helix editor—none of it strictly necessary. The core message is that &amp;ldquo;taste&amp;rdquo;—the ability to tell mediocrity from excellence—only develops when you try lots of things, keep what resonates, and discard what doesn&amp;rsquo;t; so question defaults, experiment, and break things every day.&lt;/p&gt;
&lt;h2 id="bonus-some-cool-visuals-from-bytebytego"&gt;Bonus: Some cool visuals from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substackcdn.com/image/fetch/$s_!Fxka!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F60f07f90-6f22-4b1f-ab2e-d98e8ccc755a_3000x3900.png" alt="10 Key Data Structures We Use Every Day"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!Nizo!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fffa24eaf-4fc7-4278-a0df-faddb41c765f_2048x2662.png" alt="IP Address Cheat Sheet Every Engineer Should Know"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!ZdF6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef416976-ae0f-48f5-86e1-0189c0b9be88_2360x2664.png" alt="Which Protocols Run on TCP and UDP"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; &lt;em&gt;Whoa, it hit the credit limit right while processing the last URL. I started with $2 (around 52k VND) and it only processed 7 URLs, which comes out to ~7.5k VND per article. Pretty steep :v And the output still wasn&amp;rsquo;t quite what I wanted, since it still overused English terms—you can clearly see that in the last summary. It might be an issue with my &lt;code&gt;AGENTS.md&lt;/code&gt; file, so I&amp;rsquo;ll optimize that later. Either way, I achieved my goal of burning through the remaining credit so I can go back to using free tiers :v See you in upcoming posts :D.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #64</title><link>https://miti99.com/en/post/2025/12/06/</link><pubDate>Sat, 06 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/06/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #64. &lt;del&gt;This post was created using &lt;a href="https://github.com/anthropics/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://github.com/musistudio/claude-code-router" rel="noopener noreferrer"&gt;Claude Code Router&lt;/a&gt;, &lt;a href="https://platform.iflow.cn" rel="noopener noreferrer"&gt;iFlow Open Platform&lt;/a&gt; &amp;amp; Qwen3-Coder-Plus&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/del&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="caching"&gt;&lt;a href="https://planetscale.com/blog/caching" rel="noopener noreferrer"&gt;Caching&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article explains caching from first principles: pairing a small amount of fast, expensive storage with a large amount of slow, cheap storage so that frequently accessed data lives in the fast tier. The key metric is the hit rate (the percentage of requests served from the cache rather than the backing store); the higher the hit rate, the less often you pay the latency penalty of slow storage. Familiar examples include CPU L1, L2, and L3 caches, RAM acting as a cache for disk, or a social network keeping recent posts in fast memory while pushing older posts to colder storage.&lt;/p&gt;
&lt;p&gt;The author breaks down two forms of locality: temporal locality (data accessed recently is likely to be accessed again soon, such as caching posts from the last 48 hours) and spatial locality (accessing one item makes nearby items likely to be needed next, such as a photo app prefetching adjacent images). CDNs tackle geographic distance by placing cached copies close to end users. When a cache fills up, it needs an eviction policy: FIFO is simple but naive, LRU evicts the least recently used item to better match real-world access patterns, and time-aware LRU expires stale entries automatically. Finally, databases layer caches of their own—PostgreSQL combines &lt;code&gt;shared_buffers&lt;/code&gt; with the OS page cache, while MySQL uses its buffer pool—delivering multi-tier caching while preserving ACID guarantees.&lt;/p&gt;
&lt;h2 id="consistent-hashing"&gt;&lt;a href="https://eli.thegreenplace.net/2025/consistent-hashing/" rel="noopener noreferrer"&gt;Consistent Hashing&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Distributing keys across N nodes with a simple &lt;code&gt;hash % N&lt;/code&gt; formula works fine until the node count changes: adding or removing even a single node remaps nearly every key to a different server, triggering a thundering herd of cache misses right when the system is already under load. Consistent hashing solves this by using the same hash function to map both nodes and keys onto a ring, assigning each key to the next node clockwise on the ring. When a node joins or leaves, only about M/N keys (where M is the total number of keys and N is the number of nodes, assuming an even distribution) need to move instead of nearly all of them.&lt;/p&gt;
&lt;p&gt;For the implementation, the author stores node positions in a sorted array representing a discrete ring, turning key lookup into a fast, cache-friendly binary search. The remaining catch is that random placement leaves uneven gaps between nodes on the ring: with 20 nodes, one node can end up owning roughly 40x as many keys as another. The fix is virtual nodes—mapping each physical node to multiple points around the ring; testing with 10 virtual nodes per physical node smooths out the distribution dramatically. Originally invented at MIT for distributed web caching, consistent hashing became the foundation of Akamai and influenced AWS&amp;rsquo;s Dynamo storage system.&lt;/p&gt;
&lt;h2 id="how-to-stop-linux-threads-cleanly"&gt;&lt;a href="https://mazzo.li/posts/stopping-linux-threads.html" rel="noopener noreferrer"&gt;How to stop Linux threads cleanly&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post tackles a problem far trickier than spawning threads: stopping a Linux thread cleanly while still giving it a chance to run cleanup code. The simplest approach is a quasi-busy loop where the thread checks an atomic flag after each unit of work, assuming each iteration finishes quickly enough. It&amp;rsquo;s easy to reason about, but forces you to structure your code around short work slices. &lt;code&gt;pthread_cancel()&lt;/code&gt; looks tempting at first glance but has serious pitfalls: on &lt;code&gt;glibc&lt;/code&gt;/&lt;code&gt;libstdc++&lt;/code&gt;, cancellation is implemented via forced stack unwinding; if unwinding crosses a &lt;code&gt;noexcept&lt;/code&gt; boundary—such as cancelling inside a destructor—the program terminates immediately, and cancelling mid-operation can corrupt shared application state.&lt;/p&gt;
&lt;p&gt;A signal-based approach using &lt;code&gt;SIGUSR1&lt;/code&gt; and careful signal-mask manipulation can interrupt blocking system calls, but still suffers from a race condition because checking the stop flag and entering the syscall isn&amp;rsquo;t atomic. For syscalls that have signal-mask-aware variants—such as &lt;code&gt;ppoll&lt;/code&gt;, &lt;code&gt;pselect&lt;/code&gt;, and &lt;code&gt;epoll_pwait&lt;/code&gt;—this race is solved cleanly. For all other blocking syscalls, the author demonstrates a clever trick using &lt;code&gt;rseq&lt;/code&gt; (restartable sequences, available since Linux 4.18) to wrap the flag check and the syscall instruction in a single atomic critical section that the kernel aborts and restarts if interrupted mid-way. The takeaway is that no single solution is perfect: polling a flag works for most applications, signals suit I/O-heavy threads, and &lt;code&gt;rseq&lt;/code&gt; requires inline assembly and is best reserved for specialized low-level code.&lt;/p&gt;
&lt;h2 id="advice-for-new-principal-tech-ics-ie-notes-to-myself"&gt;&lt;a href="https://eugeneyan.com/writing/principal/" rel="noopener noreferrer"&gt;Advice for New Principal Tech ICs (i.e., Notes to Myself)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Eugene Yan compiles 31 pieces of advice for newly minted Principal Engineers and Applied Scientists, distilled from observing experienced peers. The starting premise is that what got you promoted to senior levels becomes secondary at Principal: writing code yourself isn&amp;rsquo;t always the highest-leverage use of your time, even though you must stay close enough to the tech to maintain credibility and context. Principals come in different archetypes—some go deep technically, others drive broad cross-org alignment—and the role frequently blends parts of product management, design, and culture-building. Being right isn&amp;rsquo;t enough; you have to persuade others to care and act—one mentor shared that out of every 10 proposal docs they write, only about 3 actually get built.&lt;/p&gt;
&lt;p&gt;Yan advises picking work that wouldn&amp;rsquo;t happen without you, sitting at the intersection of your unique strengths and the organization&amp;rsquo;s gaps, and splitting your portfolio across three modes: leading (roughly 50%), sponsoring (20%), and advising (30%). Scaling your impact means helping others make decisions the way you would and setting aside dedicated weekly time for mentoring, including interns. In meetings, ask questions to create space for others, and explicitly label whether you are stating a known fact or just wondering aloud so a casual remark isn&amp;rsquo;t mistaken for a mandate. Greater autonomy comes with greater accountability: protect time for deep thinking and ultimately aim to make the organization succeed without depending on you.&lt;/p&gt;
&lt;h2 id="how-fast-is-java-teaching-an-old-dog-new-tricks"&gt;&lt;a href="https://dgerrells.com/blog/how-fast-is-java-teaching-an-old-dog-new-tricks" rel="noopener noreferrer"&gt;How fast is java? Teaching an old dog new tricks&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author tests whether modern Java can keep up with Rust by building a particle simulation using Java&amp;rsquo;s new Vector API for SIMD math. The Vector API abstracts CPU-specific vector instructions behind the concept of a &amp;ldquo;species,&amp;rdquo; letting you write SIMD code once that runs across hardware architectures. To squeeze out maximum performance, the author decouples the physics simulation from the UI event thread, manages worker threads manually instead of using parallel streams, and gives each worker thread its own pixel buffer before merging them at the end to avoid cache contention from concurrent writes.&lt;/p&gt;
&lt;p&gt;On an M1 MacBook Air, Rust still runs roughly 2x faster across most particle counts—for instance, simulating 100 million particles takes ~69 ms per frame in Rust versus ~119 ms in Java. Java also carries higher baseline overhead from heap allocations, whereas Rust&amp;rsquo;s memory allocation is much leaner. While the author acknowledges Java has come a long way with lambdas and the Vector API, the surrounding ecosystem remains a pain point: just pulling in a couple of small libraries required frustrating build-system ceremony. His verdict: the old dog can indeed learn new tricks, but it&amp;rsquo;s still weighed down by legacy tooling.&lt;/p&gt;
&lt;h2 id="50-things-i-know"&gt;&lt;a href="https://usefulfictions.substack.com/p/50-things-i-know" rel="noopener noreferrer"&gt;50 things I know&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cate Hall shares 50 lessons she has learned about relationships, decision-making, and personal growth. On people, she notes that you can care deeply for someone who doesn&amp;rsquo;t reciprocate, and that loving without needing anything back is the essence of selflessness; she separates admiration, obsession, and infatuation from real love, and observes that revenge is rarely worth it because difficult people are already their own punishment. Many social dynamics are paradoxical: actions that feel weak from the inside, when done without apology, are perceived by others as strength.&lt;/p&gt;
&lt;p&gt;On decision-making, she pushes back against the idea that effort times time equals results, highlights the importance of spotting asymmetric payoffs where being wrong in one direction is far costlier than the other, and advises doubling both time and budget estimates because you can never fully correct for the planning fallacy. If you want better opinions, start by having fewer of them. Knowing when to quit is an underrated skill, and she avoids totalizing ideologies because no moral framework survives every edge case intact. She closes with reminders that being of service to others is the only reliable way to feel better yourself, and that ten years from now you&amp;rsquo;ll look back and marvel at how great you had it today—so why not see it that way right now?&lt;/p&gt;
&lt;h2 id="programming-languages-that-blew-my-mind"&gt;&lt;a href="https://yoric.github.io/post/programming-languages-that-blew-my-mind/" rel="noopener noreferrer"&gt;Programming Languages That Blew My Mind&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;David Teller looks back at the programming languages that reshaped how he thinks about software. BASIC introduced arrays and &lt;code&gt;GOTO&lt;/code&gt;/&lt;code&gt;GOSUB&lt;/code&gt; control flow; Turbo Pascal brought IDEs, debuggers, structured programming, and modules; x86 assembly taught him memory addressing, registers, and talking directly to hardware. HyperCard introduced visual programming, natural-language-like scripting, and garbage collection. OCaml—with parametric polymorphism, type inference, pattern matching, and higher-order functions—humbled him, while Prolog taught declarative programming, where instead of writing an algorithm you teach the computer how to reason.&lt;/p&gt;
&lt;p&gt;In industry, Java stood out for its batteries-included standard library, thorough documentation, and the JVM; Erlang impressed him with its &amp;ldquo;let it fail&amp;rdquo; philosophy and actor model for distributed systems; Coq turned specifications into types and programs into formally verified proofs. Opalang experimented with multi-tier compilation that automatically split code across client, server, and database, while Rust combined functional-language safety guarantees with systems-programming performance. Teller notes that many ideas from academic languages eventually filter into mainstream software, and says he is still waiting for the next truly mind-expanding programming paradigm.&lt;/p&gt;
&lt;h2 id="bonus-some-cool-visuals-from-bytebytego"&gt;Bonus: Some cool visuals from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/9cfa2d94-1602-47c2-8942-b585c1d8d285_2252x2752.jpeg" alt="Docker vs Kubernetes"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!P-gB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c9090b5-77c7-4f04-88bc-481df27de32d.tif" alt="Batch vs Stream Processing"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!f0s-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d1ef48-faea-4d57-b2ea-f8411efc8334_2360x2770.png" alt="What are Modular Monoliths?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!MDHC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cf3f3a0-726f-47a3-94e4-755fa9aa8036_2196x2319.jpeg" alt="What is the difference between Process and Thread?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!-jEP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7885eb0-3b6d-4be3-bbb7-332b3f9fc0e0_2360x2920.jpeg" alt="How to Debug a Slow API?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!uW-M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7494e44-82ec-43fc-bd7f-eabea7776dd1_2250x2624.png" alt="Top Service-to-Service Communication Patterns"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Verdict: Overall this is still a fairly solid post. However, the summaries are a bit on the long side and will need further refinement.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;del&gt;Qwen3-Coder-480B-A35B-Instruct&lt;/del&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>How to Expand a Disk Volume in Oracle Cloud Infrastructure (OCI)</title><link>https://miti99.com/en/post/2024/12/01/</link><pubDate>Sun, 01 Dec 2024 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2024/12/01/</guid><description>&lt;p&gt;When running an instance on Oracle Cloud, have you ever chosen a 200GB Boot Volume during setup only to find the OS recognizing just 50GB?&lt;/p&gt;
&lt;p&gt;This happens because the OS hasn&amp;rsquo;t claimed the full volume capacity yet—you need to expand the filesystem to use the full disk space you allocated.&lt;/p&gt;
&lt;h2 id="how-to-do-it"&gt;How to Do It&lt;/h2&gt;&lt;p&gt;Run the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo /usr/libexec/oci-growfs -y
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/resizingavolume.htm" rel="noopener noreferrer"&gt;https://docs.oracle.com/en-us/iaas/Content/Block/Tasks/resizingavolume.htm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.oracle.com/en-us/iaas/oracle-linux/oci-utils/index.htm#oci-growfs" rel="noopener noreferrer"&gt;https://docs.oracle.com/en-us/iaas/oracle-linux/oci-utils/index.htm#oci-growfs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>How to Disable the Firewall on Ubuntu in Oracle Cloud Infrastructure (OCI)</title><link>https://miti99.com/en/post/2024/09/25/</link><pubDate>Wed, 25 Sep 2024 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2024/09/25/</guid><description>&lt;p&gt;When using Ubuntu on Oracle Cloud, you might occasionally run a service only to find it isn&amp;rsquo;t accessible from the internet. This happens because the default firewall configuration blocks certain connections. The following guide will show you how to disable the firewall on Ubuntu in OCI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The instructions below will disable the firewall completely, which may lead to serious security risks. You should consider configuring appropriate firewall rules instead of turning it off entirely.&lt;/p&gt;
&lt;h2 id="how-to-disable-the-firewall"&gt;How to Disable the Firewall&lt;/h2&gt;&lt;p&gt;The firewall on Ubuntu in OCI uses &lt;code&gt;iptables&lt;/code&gt;. To disable it, run the following commands:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Flush all firewall rules:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo iptables -F
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;: The &lt;code&gt;iptables -F&lt;/code&gt; command clears all current rules, allowing all incoming and outgoing connections.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Save the changes:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo netfilter-persistent save
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;: This command saves the current (empty) rule set, ensuring that the old firewall rules are not automatically reapplied after a reboot.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;&lt;p&gt;Disabling the firewall on Ubuntu should always be paired with proper network security settings in Oracle Cloud. Make sure your &lt;code&gt;Security Lists&lt;/code&gt; in your &lt;code&gt;VCN&lt;/code&gt; are configured properly.&lt;/p&gt;</description></item><item><title>Issue with Xfce</title><link>https://miti99.com/en/post/2020/06/29/</link><pubDate>Mon, 29 Jun 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/06/29/</guid><description>&lt;p&gt;Does your Arch install with only Xfce &amp;ldquo;freeze&amp;rdquo; on boot? Or does LightDM stutter when starting up?&lt;/p&gt;
&lt;p&gt;Install the &lt;code&gt;xf86-video-intel&lt;/code&gt; package.&lt;/p&gt;</description></item><item><title>Compositor Issue with Plank in Xfce</title><link>https://miti99.com/en/post/2020/06/28/</link><pubDate>Sun, 28 Jun 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/06/28/</guid><description>&lt;p&gt;Are you using Plank in Xfce and seeing a horizontal line across the screen like below?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://miti99.com/post/2020/06/28/img/1.png" alt="1.png"&gt;&lt;/p&gt;
&lt;p&gt;Go to the &lt;code&gt;Compositor&lt;/code&gt; tab in &lt;code&gt;Windows Manager Tweaks&lt;/code&gt; and uncheck &lt;code&gt;Show shadows under dock windows&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://miti99.com/post/2020/06/28/img/2.png" alt="2.png"&gt;&lt;/p&gt;</description></item><item><title>Things to Do After Installing Ubuntu 20.04</title><link>https://miti99.com/en/post/2020/06/27/</link><pubDate>Sat, 27 Jun 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/06/27/</guid><description>&lt;p&gt;&lt;strong&gt;This post is a roundup of the basic steps I took after reinstalling Ubuntu 20.04&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Update the system&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt upgrade
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start="2"&gt;
&lt;li&gt;Install some essential software&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install gdebi
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The apps I installed using &lt;code&gt;gdebi&lt;/code&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.google.com/chrome/" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.dropbox.com/install" rel="noopener noreferrer"&gt;Dropbox&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some other cool software:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Spotify:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -sS https://download.spotify.com/debian/pubkey.gpg &lt;span class="p"&gt;|&lt;/span&gt; sudo apt-key add -
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;deb http://repository.spotify.com stable non-free&amp;#34;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; sudo tee /etc/apt/sources.list.d/spotify.list
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo apt-get install spotify-client
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start="3"&gt;
&lt;li&gt;Install &lt;code&gt;zsh&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install zsh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;chsh -s /usr/bin/zsh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Install the zsh plugin manager &lt;code&gt;zgen&lt;/code&gt;. Even though &lt;code&gt;zgen&lt;/code&gt; is old, compared to the other tools available in Ubuntu&amp;rsquo;s repository like &lt;code&gt;zplug&lt;/code&gt; and &lt;code&gt;zsh-antigen&lt;/code&gt;, I find &lt;code&gt;zgen&lt;/code&gt; much simpler and lighter.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install zgen
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Edit your &lt;code&gt;.zshrc&lt;/code&gt; file to suit your setup; for example, here is mine:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;span class="lnt"&gt;55
&lt;/span&gt;&lt;span class="lnt"&gt;56
&lt;/span&gt;&lt;span class="lnt"&gt;57
&lt;/span&gt;&lt;span class="lnt"&gt;58
&lt;/span&gt;&lt;span class="lnt"&gt;59
&lt;/span&gt;&lt;span class="lnt"&gt;60
&lt;/span&gt;&lt;span class="lnt"&gt;61
&lt;/span&gt;&lt;span class="lnt"&gt;62
&lt;/span&gt;&lt;span class="lnt"&gt;63
&lt;/span&gt;&lt;span class="lnt"&gt;64
&lt;/span&gt;&lt;span class="lnt"&gt;65
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; -r &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;XDG_CACHE_HOME&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.cache&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/p10k-instant-prompt-&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="p"&gt;(%)&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;%n&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.zsh&amp;#34;&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;XDG_CACHE_HOME&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="p"&gt;/.cache&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/p10k-instant-prompt-&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="p"&gt;(%)&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;%n&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.zsh&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;GTK_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ibus
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;QT_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ibus
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;XMODIFIERS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;@im&lt;span class="o"&gt;=&lt;/span&gt;ibus
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;QT4_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ibus
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;CLUTTER_IM_MODULE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ibus
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="k"&gt;$(&lt;/span&gt;thefuck --alias&lt;span class="k"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;/usr/share/zgen/zgen.zsh&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt; ! zgen saved&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/alias-finder
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/colored-man-pages
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/colorize
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/command-not-found
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/common-aliases
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/extract
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/git
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/git-auto-fetch
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/gitignore
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/golang
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/gpg-agent
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/history
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/node
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/npm
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/python
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/sudo
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/systemd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/thefuck
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/vscode
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/wd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen oh-my-zsh plugins/z
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen loadall &lt;span class="s"&gt;&amp;lt;&amp;lt;EOPLUGINS
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; desyncr/auto-ls
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; djui/alias-tips
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; srijanshetty/node.plugin.zsh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; voronkovich/mysql.plugin.zsh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; zlsun/solarized-man
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; zpm-zsh/ls
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; zpm-zsh/ssh
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; zsh-users/zsh-autosuggestions
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; zsh-users/zsh-syntax-highlighting
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt; zsh-users/zsh-history-substring-search
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s"&gt;EOPLUGINS&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen load zsh-users/zsh-completions src
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen load romkatv/powerlevel10k powerlevel10k
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; zgen save
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;fg=#120299,bg=cyan&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[[&lt;/span&gt; ! -f ~/.p10k.zsh &lt;span class="o"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;source&lt;/span&gt; ~/.p10k.zsh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start="4"&gt;
&lt;li&gt;Install &lt;code&gt;tlp&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install tlp
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo tlp start
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;</description></item><item><title>Back to Ubuntu</title><link>https://miti99.com/en/post/2020/06/26/</link><pubDate>Fri, 26 Jun 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/06/26/</guid><description>&lt;p&gt;After learning quite a lot about Linux during my time with Archlinux, I think it&amp;rsquo;s time for me to head back to Ubuntu. Less tinkering around so my computer doesn&amp;rsquo;t have to stress its&amp;hellip; CPU because of me :)))&lt;/p&gt;
&lt;p&gt;For Linux users, distro-hopping probably doesn&amp;rsquo;t need much explanation anyway, right? :)))&lt;/p&gt;</description></item><item><title>Switching to Void Linux</title><link>https://miti99.com/en/post/2020/06/10/</link><pubDate>Wed, 10 Jun 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/06/10/</guid><description>&lt;p&gt;After spending quite a dedicated stretch of time using &lt;a href="https://www.archlinux.org/" rel="noopener noreferrer"&gt;Archlinux&lt;/a&gt;, I&amp;rsquo;m now switching over to try out &lt;a href="https://voidlinux.org/" rel="noopener noreferrer"&gt;Voidlinux&lt;/a&gt; &lt;em&gt;(Most people test distros in a virtual machine, whereas I do it on bare metal :v)&lt;/em&gt;. Still, with everything I learned during my time on Archlinux, I feel right at home using Voidlinux.&lt;/p&gt;
&lt;p&gt;Honestly, at this point I feel like whichever distro I use doesn&amp;rsquo;t make a huge difference to my tools—as long as I can install them, it&amp;rsquo;s all good :))) So I&amp;rsquo;ll still keep writing posts in the future (even if they&amp;rsquo;ll be a bit sparse, since my university has officially entered &amp;ldquo;major project season&amp;rdquo; :v).&lt;/p&gt;
&lt;h2 id="update-13062020"&gt;Update 13/06/2020:&lt;/h2&gt;&lt;p&gt;I&amp;rsquo;m going back to Archlinux because&amp;hellip; I miss pacman and the AUR :v&lt;/p&gt;</description></item><item><title>Battery Not Charging to Full</title><link>https://miti99.com/en/post/2020/05/20/</link><pubDate>Wed, 20 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/20/</guid><description>&lt;p&gt;First, make sure not to confuse this with battery wear!&lt;/p&gt;
&lt;p&gt;Battery wear is when your battery charges to 100%, but its actual full capacity no longer reaches the manufacturer&amp;rsquo;s original design capacity. You can run the following command to check:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo tlp-stat -b
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For example, here is my current output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;---TLP 1.3.1 --------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;---Battery Features: Charge Thresholds and Recalibrate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;natacpi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; active &lt;span class="o"&gt;(&lt;/span&gt;data, thresholds&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tpacpi-bat &lt;span class="o"&gt;=&lt;/span&gt; active &lt;span class="o"&gt;(&lt;/span&gt;recalibrate&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tp-smapi &lt;span class="o"&gt;=&lt;/span&gt; inactive &lt;span class="o"&gt;(&lt;/span&gt;ThinkPad not supported&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;---ThinkPad Battery Status: BAT0 &lt;span class="o"&gt;(&lt;/span&gt;Main / Internal&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/manufacturer &lt;span class="o"&gt;=&lt;/span&gt; LGC
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/model_name &lt;span class="o"&gt;=&lt;/span&gt; 01AV463
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/cycle_count &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;90&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/energy_full_design &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;45000&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;mWh&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/energy_full &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;38280&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;mWh&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/energy_now &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;38280&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;mWh&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/power_now &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;mW&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/status &lt;span class="o"&gt;=&lt;/span&gt; Full
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/charge_start_threshold &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;96&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;%&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/sys/class/power_supply/BAT0/charge_stop_threshold &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;96&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;%&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;tpacpi-bat.BAT0.forceDischarge &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Charge&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; 100.0 &lt;span class="o"&gt;[&lt;/span&gt;%&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Capacity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; 85.1 &lt;span class="o"&gt;[&lt;/span&gt;%&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Here, my battery&amp;rsquo;s design capacity is 45000 mWh, but right now when it charges to 100%, it only reaches 38280 mWh. At the bottom, &lt;code&gt;tlp-stat&lt;/code&gt; summarizes that my battery has worn down by about 14.9% compared to when it was new (which I think is pretty normal, since I&amp;rsquo;ve been using it for a year and played quite a lot of games, which got the laptop pretty hot).&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s battery wear. In my case, it&amp;rsquo;s still fine, though if it ever wears down by, say, 90%, the only fix is to replace the battery. Then again, batteries are designed to&amp;hellip; eventually wear out anyway :v&lt;/p&gt;
&lt;p&gt;Now here is the actual issue I want to talk about: the battery only charges up to a certain percentage and then stops, refusing to charge any further. If it stops around 90–95%, that&amp;rsquo;s normal, because some laptops are designed to stop charging around that level. However, if it stops around 60% or 80% (in my case, it stopped at 79%), then something is &amp;ldquo;abnormal&amp;rdquo;. I don&amp;rsquo;t know the exact cause, but here is how to fix it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo tlp fullcharge
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Good luck, and may your battery live a long life alongside your laptop :)))&lt;/p&gt;</description></item><item><title>Connecting to HCMUT's HCMUT01 Wi-Fi on Linux</title><link>https://miti99.com/en/post/2020/05/14/</link><pubDate>Thu, 14 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/14/</guid><description>&lt;p&gt;On Windows, when you connect, it immediately gives you a prompt to enter your username and password. Here, I&amp;rsquo;ll show you how to set it up on Linux.&lt;/p&gt;
&lt;p&gt;Select the following options:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Security: WPA &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; WPA Enterprise
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Authentication: Tunneled TLS
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Anonymous identity: &lt;span class="o"&gt;(&lt;/span&gt;your username, the same one you use to log in to myBK&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Domain: hcmut.edu.vn
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;CA cerificate: &lt;span class="o"&gt;(&lt;/span&gt;None&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;CA certificate password: &lt;span class="o"&gt;(&lt;/span&gt;Leave blank&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Show passwords: &lt;span class="o"&gt;(&lt;/span&gt;uncheck&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;No CA certificate is required: &lt;span class="o"&gt;(&lt;/span&gt;check&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Inner authentication: PAP
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Username: &lt;span class="o"&gt;(&lt;/span&gt;your username, same as the identity above&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Password: password
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it—now just hit connect. Good luck!&lt;/p&gt;</description></item><item><title>Running GUI Apps Inside Docker</title><link>https://miti99.com/en/post/2020/05/09/</link><pubDate>Sat, 09 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/09/</guid><description>&lt;p&gt;In my case, I was writing a Python app that uses the &lt;code&gt;matplotlib&lt;/code&gt; library. To get the GUI working, I first installed &lt;code&gt;xhost&lt;/code&gt; on my Arch host:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S xorg-xhost
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Run &lt;code&gt;xhost local:root&lt;/code&gt; or &lt;code&gt;xhost +&lt;/code&gt; (I&amp;rsquo;m not entirely sure about the details here—it grants everything access to the display, and I don&amp;rsquo;t know how to restrict it to specific apps).&lt;/p&gt;
&lt;p&gt;Then run Docker with the extra &lt;code&gt;–env=&amp;quot;DISPLAY&amp;quot;&lt;/code&gt; flag. For example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;docker run -it –rm –net&lt;span class="o"&gt;=&lt;/span&gt;host –env&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;DISPLAY&amp;#34;&lt;/span&gt; –workdir&lt;span class="o"&gt;=&lt;/span&gt;/workspace –volume&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;&lt;span class="s2"&gt;/Dropbox/PP:/workspace:rw&amp;#34;&lt;/span&gt; ubuntu bash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;After that, inside the Docker container, I also installed the &lt;code&gt;python3-pip&lt;/code&gt; package.&lt;/p&gt;
&lt;p&gt;Good luck!!&lt;/p&gt;</description></item><item><title>systemd-swap</title><link>https://miti99.com/en/post/2020/05/08/</link><pubDate>Fri, 08 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/08/</guid><description>&lt;p&gt;This is a service that creates dynamic swap space over time. It starts out at just 512MiB, but grows &lt;strong&gt;automatically&lt;/strong&gt; as you use your system. Install it as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S systemd-swap
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In &lt;code&gt;/etc/systemd/swap.conf&lt;/code&gt;, configure it as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;swapfc_enabled&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then enable the &lt;code&gt;systemd-swap&lt;/code&gt; service:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; systemd-swap
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it!!!&lt;/p&gt;</description></item><item><title>Helping Your Battery 'Live' Longer</title><link>https://miti99.com/en/post/2020/05/07/</link><pubDate>Thu, 07 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/07/</guid><description>&lt;h4 id="install-tlp"&gt;Install TLP&lt;/h4&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S tlp tlp-rdw
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Since I use a ThinkPad laptop—and a newer model at that—I also install the following 2 packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S acpi_call-dkms tpacpi-bat
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Start TLP on boot:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; tlp-sleep.service
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Some other recommended settings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; NetworkManager-dispatcher.service
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl mask systemd-rfkill.service
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl mask systemd-rfkill.socket
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;There are also a few other equally useful tools you should look into, such as &lt;code&gt;cpupower&lt;/code&gt; and &lt;code&gt;thermald&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And that&amp;rsquo;s it. See you next time!&lt;/p&gt;</description></item><item><title>Speeding Up makepkg</title><link>https://miti99.com/en/post/2020/05/06/</link><pubDate>Tue, 05 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/06/</guid><description>&lt;p&gt;In this post, I&amp;rsquo;ll show you how to tweak your setup to make building packages from the AUR faster. However, every benefit comes with its own risks—there&amp;rsquo;s a chance you might run into some random error somewhere in a few edge cases :v&lt;/p&gt;
&lt;p&gt;To keep things quick and to the point, I&amp;rsquo;ll give you the &amp;ldquo;instant noodles&amp;rdquo; version right away!&lt;/p&gt;
&lt;p&gt;Install a few required packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S ccache lzop xz pigz pbzip2 zstd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Next, open &lt;code&gt;/etc/makepkg.conf&lt;/code&gt;, look for the UPPERCASE variables, and update them to match the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;-march=native -O2 -pipe -fstack-protector-strong -fno-plt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;CXXFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CFLAGS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;BUILDDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/tmp/makepkg
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;PKGEXT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;.pkg.tar.lzo&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSXZ&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;xz -c -z - --threads&lt;span class="o"&gt;=&lt;/span&gt;0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSGZ&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;pigz -c -f -n&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSBZ2&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;pbzip2 -c -f&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;COMPRESSZST&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;zstd -c -z -q - --threads&lt;span class="o"&gt;=&lt;/span&gt;0&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;BUILDENV&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;!distcc color ccache check !sign&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;MAKEFLAGS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;-j&lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;nproc&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Reference: &lt;a href="https://wiki.archlinux.org/index.php/Makepkg" rel="noopener noreferrer"&gt;https://wiki.archlinux.org/index.php/Makepkg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;</description></item><item><title>Gaming with Steam on Arch Linux</title><link>https://miti99.com/en/post/2020/05/04/</link><pubDate>Mon, 04 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/04/</guid><description>&lt;p&gt;Steam is one of the rare platforms that truly favors Linux. While most other platforms don&amp;rsquo;t support Linux at all, Steam even has its own Linux-based OS for gamers called SteamOS, plus official support for Ubuntu. On top of that, many of the titles that made Steam famous—like Dota 2, CS:GO, etc.—run on it. Recently, there&amp;rsquo;s also a pretty fun game I tried (and got addicted to) called Dota Underlords (though I&amp;rsquo;m determined to quit now^^). Right now, I only play a chill farming game called Farm Together with my girlfriend :v. In short, setting aside native Linux games (most of which are pretty cheesy and unappealing), Steam is currently the best gaming platform for Linux.&lt;/p&gt;
&lt;h2 id="enable-multi-lib"&gt;Enable multi-lib&lt;/h2&gt;&lt;p&gt;To install Steam, we first need to enable the &lt;code&gt;multi-lib&lt;/code&gt; repo on Arch. This repository contains 32-bit libraries required by platforms like Steam or Wine. To enable it, open &lt;code&gt;/etc/pacman.conf&lt;/code&gt; and uncomment the following 2 lines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;multilib&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;Include&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; /etc/pacman.d/mirrorlist
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then update the system:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay &lt;span class="o"&gt;(&lt;/span&gt;or sudo pacman -Syyu&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="install-steam"&gt;Install Steam&lt;/h2&gt;&lt;p&gt;Now we can go ahead and install Steam:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S steam
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="use-a-dedicated-graphics-card-for-gaming"&gt;Use a dedicated graphics card for gaming&lt;/h2&gt;&lt;p&gt;Normally, when using Linux on a laptop, hardly anyone cares about the dedicated graphics card anymore (though installing Linux to play games already sounds a bit &amp;lsquo;weird&amp;rsquo; :v). Still, you can configure your games on Steam to use your dedicated GPU by setting the game&amp;rsquo;s Launch Options as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;DRI_PRIME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; %command%
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="a-quick-tip-to-improve-gaming-performance"&gt;A quick tip to improve gaming performance&lt;/h2&gt;&lt;p&gt;You can also install &lt;code&gt;gamemode&lt;/code&gt; so the tool automatically tweaks your system settings while gaming:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S gamemode
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then start the &lt;code&gt;gamemoded&lt;/code&gt; service:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl start gamemoded --user
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To use it, set the game&amp;rsquo;s Launch Options as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gamemoderun %command%
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And that&amp;rsquo;s it—now we can fire up the game and play!!!&lt;/p&gt;</description></item><item><title>Splash Screen for Arch Linux</title><link>https://miti99.com/en/post/2020/05/03/</link><pubDate>Sun, 03 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/03/</guid><description>&lt;p&gt;In this post, I&amp;rsquo;ll show you how to install Plymouth as a boot splash screen on Arch Linux—similar to the spinning dots on Windows, the 5 white-and-orange dots on Ubuntu (which changed in 20.04), or the spinning circle on Fedora.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: I&amp;rsquo;m only writing this as a guide; I don&amp;rsquo;t actually use it anymore because I felt it slowed down my boot time.&lt;/p&gt;
&lt;h2 id="first-install-plymouth"&gt;First, Install Plymouth&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S plymouth
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Edit &lt;code&gt;/etc/mkinitcpio.conf&lt;/code&gt;: Add &lt;code&gt;plymouth&lt;/code&gt; right after &lt;code&gt;base&lt;/code&gt; and &lt;code&gt;udev&lt;/code&gt; in the &lt;code&gt;HOOKS&lt;/code&gt; array, like so:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;HOOKS&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;base udev plymouth ...&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;In &lt;code&gt;/etc/default/grub&lt;/code&gt;, update the kernel parameters as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;quiet splash loglevel=3 rd.udev.log_priority=3 vt.global_cursor_default=0&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Then remember to update GRUB!&lt;/p&gt;
&lt;p&gt;The above is just an example; you can read more about Silent Boot here: &lt;a href="https://wiki.archlinux.org/index.php/Silent_boot" rel="noopener noreferrer"&gt;https://wiki.archlinux.org/index.php/Silent_boot&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regenerate the initramfs:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo mkinitcpio -P
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="next-install-a-theme"&gt;Next, Install a Theme&lt;/h2&gt;&lt;p&gt;There are plenty of themes available in the AUR, or you can grab themes from external sources like GitHub and copy them into &lt;code&gt;/usr/share/plymouth/themes&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;List the installed themes on your machine:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;plymouth-set-default-theme -l
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;By default, Plymouth comes with the following themes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;details glow solar spinner tribar fade-in script spinfinity text
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To switch themes—for example, to &lt;code&gt;script&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;plymouth-set-default-theme -R script
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;To make Plymouth appear earlier during boot, edit &lt;code&gt;/etc/plymouth/plymouthd.conf&lt;/code&gt; and change &lt;code&gt;ShowDelay=5&lt;/code&gt; from &lt;code&gt;5&lt;/code&gt; to &lt;code&gt;0&lt;/code&gt;!&lt;/p&gt;
&lt;p&gt;For a smoother transition to your login screen, switch your display manager service to its Plymouth variant—for example, instead of &lt;code&gt;lightdm&lt;/code&gt;, use &lt;code&gt;lightdm-plymouth&lt;/code&gt;!&lt;/p&gt;
&lt;p&gt;There are a few extra tweaks for encrypted setups, but since I don&amp;rsquo;t think many readers here use full-disk encryption, I&amp;rsquo;ll skip them. If you need help with that, feel free to message my fanpage! See you next time.&lt;/p&gt;</description></item><item><title>Enabling Numlock on Boot with LightDM</title><link>https://miti99.com/en/post/2020/05/02/</link><pubDate>Sat, 02 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/02/</guid><description>&lt;p&gt;Install &lt;code&gt;numlockx&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S numlockx
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Open &lt;code&gt;/etc/lightdm/lightdm.conf&lt;/code&gt; and add the following under &lt;code&gt;[Seat:*]&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;[&lt;/span&gt;Seat:*&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;greeter-setup-script&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/numlockx on
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;And you&amp;rsquo;re done!!&lt;/p&gt;</description></item><item><title>Theming GRUB</title><link>https://miti99.com/en/post/2020/05/01/</link><pubDate>Fri, 01 May 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/05/01/</guid><description>&lt;p&gt;Want a nicer-looking GRUB menu? Today I&amp;rsquo;ll share a quick way to spruce up your GRUB interface. Here I&amp;rsquo;ll use the litarvan theme available in the Arch repositories as an example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S grub-theme-vimix
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Next, add the following line to &lt;code&gt;/etc/default/grub&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nv"&gt;GRUB_THEME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;”/usr/share/grub/themes/Vimix/theme.txt”
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Update GRUB and reboot to enjoy the new look! 😀&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;grub-mkconfig -o /boot/grub/grub.cfg
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;If this theme isn&amp;rsquo;t your style, you can download another theme or even create your own. Just make sure to place it in a directory that the system can access at boot without needing user-level permissions—such as under &lt;code&gt;/usr/share&lt;/code&gt; as shown above.&lt;/p&gt;
&lt;p&gt;Enjoy your newly styled GRUB! See you next time.&lt;/p&gt;</description></item><item><title>Making the Login Screen Mouse Cursor Look Better</title><link>https://miti99.com/en/post/2020/04/30/</link><pubDate>Thu, 30 Apr 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/04/30/</guid><description>&lt;p&gt;As the title suggests, to change the mouse cursor on your login screen, edit the &lt;strong&gt;Inherits&lt;/strong&gt; value in &lt;code&gt;/usr/share/icons/default/index.theme&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Typically, if you want the login screen cursor to match your current desktop cursor, you can check &lt;code&gt;~/.icons/default/index.theme&lt;/code&gt; to see the theme name to use!&lt;/p&gt;
&lt;p&gt;Good luck!&lt;/p&gt;</description></item><item><title>YouTube Downloaders for Arch Linux</title><link>https://miti99.com/en/post/2020/04/29/</link><pubDate>Wed, 29 Apr 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/04/29/</guid><description>&lt;p&gt;As the title says, I&amp;rsquo;ll introduce two tools I regularly use to download videos from YouTube.&lt;/p&gt;
&lt;h2 id="youtube-dl"&gt;Youtube-dl&lt;/h2&gt;&lt;p&gt;Very popular across many distros, packed with command-line options, and super &amp;ldquo;professional&amp;rdquo;—though I find its download speed a bit slow, probably because of some overhead in how it processes things. So I mostly use it for downloading entire playlists (where I can just paste the link once, go write some code or watch a movie, and let it finish on its own :v). To install it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S youtube-dl
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="clipgrab"&gt;Clipgrab&lt;/h2&gt;&lt;p&gt;This one is a bit less well-known, so I wanted to give it a mention as well. It comes with a GUI, and in my experience its download speeds are faster than &lt;code&gt;youtube-dl&lt;/code&gt; (at least for me). To install it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yay -S clipgrab
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;See you in the next post!&lt;/p&gt;</description></item><item><title>Auto TRIM SSD</title><link>https://miti99.com/en/post/2020/04/20/</link><pubDate>Mon, 20 Apr 2020 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2020/04/20/</guid><description>&lt;p&gt;The &lt;code&gt;util-linux&lt;/code&gt; package already provides &lt;code&gt;fstrim.service&lt;/code&gt; and &lt;code&gt;fstrim.timer&lt;/code&gt; for &lt;code&gt;systemd&lt;/code&gt;, so all you need to do is enable &lt;code&gt;fstrim.timer&lt;/code&gt;. Run the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; fstrim.timer
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;By default, it runs once a week.&lt;/p&gt;
&lt;p&gt;See you next time!&lt;/p&gt;</description></item></channel></rss>