<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PostgreSQL on miti99</title><link>https://miti99.com/en/tags/postgresql/</link><description>Recent content in PostgreSQL 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/postgresql/index.xml" rel="self" type="application/rss+xml"/><item><title>Newsletter #139</title><link>https://miti99.com/en/post/2026/10/07/</link><pubDate>Wed, 07 Oct 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/10/07/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #139.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="what-go-taught-us-about-java-garbage-collection"&gt;&lt;a href="https://dev.to/codenameone/what-go-taught-us-about-java-garbage-collection-25ha" rel="noopener noreferrer"&gt;What Go Taught Us About Java Garbage Collection&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Comparing ParparVM (Codename One&amp;rsquo;s ahead-of-time Java-to-C virtual machine) against Go&amp;rsquo;s runtime, the author initially assumed Go&amp;rsquo;s low memory footprint and snappy pauses came down to escape analysis and stack allocation—only to discover how much came from &lt;em&gt;when&lt;/em&gt; Go triggers a GC cycle and how it shares marking work across threads. ParparVM&amp;rsquo;s first win was lowering its hardcoded 24 MB minimum allocation floor before triggering a GC: throughput and p99 latency barely budged, while resident memory (RSS) dropped from 98 MB down to 38 MB. An attempt to pace GC dynamically against the live heap size failed because internal counters missed objects in partial pages, thread-local mutator pages, and large-object allocations, so the team exposed the allocation floor as a build-time tunable instead. On their &lt;code&gt;GcPause&lt;/code&gt; benchmark, scaling parallel mark threads from one to four cut worst-case pause times from 2.2–3.3 seconds down to 0.3–0.9 seconds (compared to ~20 ms in Go), and adding Go-style &lt;em&gt;mutator assist&lt;/em&gt;—where an allocating thread that outruns the background collector pitches in to mark a small batch of objects itself—smoothed out allocation spikes further.&lt;/p&gt;
&lt;p&gt;The second half tackles image caching and reference types. Previously, ParparVM implemented &lt;code&gt;WeakReference&lt;/code&gt; by storing the referent as a normal struct field that the GC traced as a strong reference, while iOS apps relied on a separate strong-reference cache table that simply dumped everything on an OS memory warning. A new PR moves the referent pointer into &lt;code&gt;java.lang.ref.Reference&lt;/code&gt; directly, teaches the C translator to register reference discovery hooks instead of tracing referents strongly, and lets the collector decide whether to preserve or clear soft references based on memory pressure. The trickiest concurrency hazard occurs when a mutator thread calls &lt;code&gt;ref.get()&lt;/code&gt; mid-mark phase and resurrects a pointer the GC is about to sweep; logging &lt;code&gt;get()&lt;/code&gt; reads through a snapshot-at-the-beginning (SATB) read barrier and filtering already-marked objects dropped mark-termination passes from 32 down to 1. Updating a recency timestamp on each &lt;code&gt;get()&lt;/code&gt; so frequently used images survive longer boosted cache hit rates under a 160 MB cap from 87.99% to 97.44% while simultaneously shrinking memory footprint from 91 MB to 82.1 MB.&lt;/p&gt;
&lt;h2 id="how-we-built-a-real-time-stock-pricing-system-at-scale"&gt;&lt;a href="https://itnext.io/how-we-built-real-time-stock-pricing-at-mofid-brokerage-031015ce1301" rel="noopener noreferrer"&gt;How We Built a Real-Time Stock Pricing System at Scale&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Mofid Securities, Iran&amp;rsquo;s largest stock brokerage, needed to stream real-time stock and fund price ticks to tens of thousands of concurrent traders. Market ticks from the exchange core are ingested in C++ and published to Kafka as Protobuf messages at roughly 1,900 messages per second—spiking to 3x that during volatile market opens. For fan-out distribution, the team chose Redis Pub/Sub over heavier durable brokers: stock prices are ephemeral state where a missed tick is immediately superseded by the next tick a moment later, making &lt;code&gt;at-most-once&lt;/code&gt; delivery semantics ideal, and Redpanda Connect pipes messages from Kafka into Redis without writing custom glue services. On the browser side, they picked Server-Sent Events (SSE) over WebSockets because price streaming is strictly unidirectional, runs over standard HTTP, and handles reconnection natively; they used the &lt;code&gt;eventsource&lt;/code&gt; package to attach auth headers, batched UI updates on the client to avoid layout thrashing, closed streams when tabs navigated away, and fetched an initial REST snapshot before applying the live delta stream.&lt;/p&gt;
&lt;p&gt;Inside the .NET backend, a single hosted background service per Redis channel writes incoming ticks into a bounded &lt;code&gt;System.Threading.Channels&lt;/code&gt; ring buffer (capacity 100,000, configured with &lt;code&gt;DropOldest&lt;/code&gt; backpressure), while a connection coordinator spins up lightweight per-user channels that filter and forward only the specific ticker symbols currently visible on that user&amp;rsquo;s screen. Rolled out gradually from 30% to 100% of traffic behind an Unleash feature flag, the production cluster serves tens of thousands of concurrent streams across just &lt;strong&gt;six pods&lt;/strong&gt;, each using ~55 MB of RAM and ~20% CPU at peak market hours with maximum queue depth never exceeding 15 messages. Key operational lessons: disable reverse-proxy response buffering via &lt;code&gt;X-Accel-Buffering: no&lt;/code&gt;, dispose per-client channels immediately on disconnect to prevent memory leaks, and send a lightweight heartbeat comment every 20 seconds so intermediate load balancers don&amp;rsquo;t drop idle connections.&lt;/p&gt;
&lt;h2 id="saving-another-100tb-of-ram-with-math-and-rust"&gt;&lt;a href="https://blog.cloudflare.com/saving-100-tb-of-ram-with-math/" rel="noopener noreferrer"&gt;Saving another 100TB of RAM with math (and Rust)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cloudflare freed up another 100+ TB of RAM across its global edge fleet by shrinking &lt;code&gt;pingora-ketama&lt;/code&gt;, the consistent hashing library that Pingora Backend Router uses to route requests to cache servers by URL. Because compliance rules and tiered caching configurations require maintaining a separate consistent hash ring for every unique combination of cache features, some router processes were burning up to 6 GB of RAM just holding Ketama rings in memory. Step one was shrinking each point on the ring in Rust. The original &lt;code&gt;Point&lt;/code&gt; struct stored &lt;code&gt;hash: u32&lt;/code&gt; and &lt;code&gt;index: u32&lt;/code&gt; (8 bytes per point). Simply changing &lt;code&gt;index&lt;/code&gt; from &lt;code&gt;u32&lt;/code&gt; to &lt;code&gt;u16&lt;/code&gt; saved zero bytes because Rust aligns the struct to a multiple of its largest field (&lt;code&gt;u32&lt;/code&gt;, 4-byte alignment), adding 2 bytes of tail padding; packing each entry into a byte array &lt;code&gt;[u8; 6]&lt;/code&gt; with helper accessors bypassed the alignment padding and immediately cut ring memory by 25%.&lt;/p&gt;
&lt;p&gt;Step two used probability theory to slash the &lt;em&gt;number&lt;/em&gt; of virtual nodes (points) placed on the ring per server. Deriving the exact closed-form formula for load variance across $n$ servers with $k$ points each revealed steeply diminishing returns: for 100 servers, NGINX&amp;rsquo;s default of 160 points per server already drops load standard deviation from ~99% down to ~8%, whereas scaling all the way to 100,000 points per server spends the last 90,000 points buying just a 0.7% reduction in variance—and at extreme point counts, 32-bit hash collisions actually cause load imbalance to &lt;em&gt;worsen&lt;/em&gt; again. Dropping the point count by 90% left load distribution virtually unchanged. Because changing hash rings in place would invalidate cached assets and trigger a thundering herd to origin servers, Cloudflare held both the old and new rings in memory temporarily—saving 65% net RAM even while dual-running—and shifted traffic gradually by hashing requests into rollout buckets across data center tiers.&lt;/p&gt;
&lt;h2 id="postgres-delete-can-actualy-scale"&gt;&lt;a href="https://www.dbos.dev/blog/scaling-deletions-in-postgres" rel="noopener noreferrer"&gt;Postgres DELETE Can Actualy Scale&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In high-throughput PostgreSQL systems, &lt;code&gt;DELETE&lt;/code&gt; has a reputation for being so slow that conventional wisdom says to avoid it altogether in favor of &lt;code&gt;TRUNCATE&lt;/code&gt; or dropping time-partitioned tables. The team at DBOS, however, needed row-level &lt;code&gt;DELETE&lt;/code&gt; for their Postgres-backed durable workflow engine, which executes tens of thousands of workflows and steps per second while enforcing granular, per-workflow retention policies. What makes &lt;code&gt;DELETE&lt;/code&gt; expensive in Postgres is MVCC: deleting a row doesn&amp;rsquo;t free space immediately—it merely stamps the tuple&amp;rsquo;s &lt;code&gt;xmax&lt;/code&gt; header with the deleting transaction ID, leaving a &amp;ldquo;dead tuple&amp;rdquo; behind for &lt;code&gt;autovacuum&lt;/code&gt; to clean up later, and because Postgres indexes don&amp;rsquo;t store visibility metadata, every index scan still has to visit heap pages to check whether matching rows are dead.&lt;/p&gt;
&lt;p&gt;DBOS&amp;rsquo;s initial schema relied on foreign keys with &lt;code&gt;ON DELETE CASCADE&lt;/code&gt; from the parent &lt;code&gt;workflow_status&lt;/code&gt; table to child tables like &lt;code&gt;operation_outputs&lt;/code&gt;. While convenient, cascading deletes scattered random I/O across thousands of heap pages because a long-running workflow&amp;rsquo;s steps are spread out over time—to the point where deleting expired workflows took longer than executing them! The team dropped the foreign keys and rewrote retention as a two-step batch job: first delete expired rows from &lt;code&gt;workflow_status&lt;/code&gt;, then batch-delete orphaned rows from each child table ordered by creation time (maximizing page cache locality) using a &lt;code&gt;NOT EXISTS&lt;/code&gt; anti-join against &lt;code&gt;workflow_status&lt;/code&gt; so active long-running workflows are never touched. When they hit a second wall—finding the retention cutoff timestamp on the &lt;code&gt;created_at&lt;/code&gt; B-tree index occasionally stalled for 20 minutes scanning millions of unvacuumed dead tuples piled up at the front of the index—running an explicit &lt;code&gt;VACUUM&lt;/code&gt; right before and after each deletion batch eliminated the stall completely, speeding up retention deletes by &lt;strong&gt;10x&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="where-postgresql-stores-row-locks"&gt;&lt;a href="https://boringsql.com/posts/row-locks-on-the-page/" rel="noopener noreferrer"&gt;Where PostgreSQL stores row locks&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Unlike many databases that maintain an in-memory lock table for row-level locks, PostgreSQL stores row locks &lt;strong&gt;directly inside the tuple header on the data page itself&lt;/strong&gt;. Specifically, the &lt;code&gt;t_xmax&lt;/code&gt; field—which normally records the transaction ID that deleted or updated a tuple—does double duty by storing the XID of the transaction currently locking the row, while bit flags in &lt;code&gt;t_infomask&lt;/code&gt; indicate the lock strength and clarify that &lt;code&gt;t_xmax&lt;/code&gt; is a lock rather than a deletion. That design means PostgreSQL can lock millions of rows without exhausting shared RAM, at the cost of dirtying the data page (and generating WAL) even on a read-only &lt;code&gt;SELECT ... FOR SHARE&lt;/code&gt;. When the locking transaction commits, Postgres doesn&amp;rsquo;t go back to clear &lt;code&gt;t_xmax&lt;/code&gt;; future readers simply check the commit log, see the transaction has finished, and ignore the expired lock marker until &lt;code&gt;VACUUM&lt;/code&gt; or a subsequent locker overwrites it. Postgres supports four row-lock modes so foreign-key checks don&amp;rsquo;t stall updates: inserting a child row takes the weakest &lt;code&gt;FOR KEY SHARE&lt;/code&gt; lock on the parent row, a normal &lt;code&gt;UPDATE&lt;/code&gt; that doesn&amp;rsquo;t touch key columns takes &lt;code&gt;FOR NO KEY UPDATE&lt;/code&gt;, while &lt;code&gt;DELETE&lt;/code&gt; and key-modifying updates take &lt;code&gt;FOR UPDATE&lt;/code&gt; (which conflicts with everything—meaning developers who reflexively write &lt;code&gt;SELECT ... FOR UPDATE&lt;/code&gt; on parent rows unnecessarily block concurrent child inserts that &lt;code&gt;FOR NO KEY UPDATE&lt;/code&gt; would allow).&lt;/p&gt;
&lt;p&gt;When a second transaction tries to lock an already-locked row, it waits on the holder&amp;rsquo;s &lt;code&gt;transactionid&lt;/code&gt; lock in &lt;code&gt;pg_locks&lt;/code&gt; and acquires a heavyweight &lt;code&gt;tuple&lt;/code&gt; lock solely to establish fair queue ordering—which is why &lt;code&gt;pg_locks&lt;/code&gt; only shows &lt;em&gt;waiting&lt;/em&gt; row lockers, never the session actively holding an uncontended row lock. And when multiple transactions concurrently hold shared locks (&lt;code&gt;FOR KEY SHARE&lt;/code&gt; or &lt;code&gt;FOR SHARE&lt;/code&gt;) on the same tuple, &lt;code&gt;t_xmax&lt;/code&gt; stores a &lt;code&gt;MultiXactId&lt;/code&gt; pointing to an on-disk member list in &lt;code&gt;pg_multixact/&lt;/code&gt;. The post demonstrates how a single long-running transaction holding &lt;code&gt;FOR NO KEY UPDATE&lt;/code&gt; on parent rows while 5,000 autocommit transactions insert child rows creates 5,000 distinct multixacts; at ~5 bytes per member and a hard $2^{32}$ member offset limit (~20 GB), runaway multixact creation can trigger &lt;code&gt;multixact &amp;quot;members&amp;quot; limit exceeded&lt;/code&gt; outages or emergency anti-wraparound vacuums even when a table has zero dead tuples—making &lt;code&gt;mxid_age()&lt;/code&gt;, &lt;code&gt;relminmxid&lt;/code&gt;, and &lt;code&gt;next_multi_offset&lt;/code&gt; critical production metrics to monitor.&lt;/p&gt;
&lt;h2 id="a-40ms-go-gc-pause-caused-by-swap"&gt;&lt;a href="https://frn.sh/go-gc/" rel="noopener noreferrer"&gt;A 40ms Go GC pause caused by swap&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After enabling Linux swap on production nodes to absorb brief memory spikes gracefully, the author noticed something alarming in their Go service metrics: stop-the-world (STW) garbage collection pauses were occasionally spiking to &lt;strong&gt;40 ms&lt;/strong&gt;—roughly 800x slower than the normal 51 µs median pause. The container cgroup hosted two processes: the latency-sensitive Go service (which read request payloads via &lt;code&gt;io.ReadAll&lt;/code&gt; and decoded them with &lt;code&gt;proto.Unmarshal&lt;/code&gt;) and a nearly idle helper HTTP server. Initially, the author assumed that because the Linux kernel tracks memory pressure per cgroup, cold pages from the idle helper process would be swapped out first, or that if the Go process itself got swapped out, normal mutator threads would fault those pages back in during everyday execution rather than inside a sub-millisecond STW window. Both assumptions turned out to be wrong.&lt;/p&gt;
&lt;p&gt;Attaching a custom eBPF probe between the Go runtime&amp;rsquo;s STW start and stop tracepoints to count major page faults while all goroutines were frozen revealed the smoking gun: the worst 39,902 µs STW pause suffered &lt;strong&gt;228 major page faults&lt;/strong&gt;, which alone accounted for 39,013 µs (97.8%) of the pause! Resolving the faulting instruction pointers with &lt;code&gt;addr2line&lt;/code&gt; pointed straight to &lt;code&gt;runtime.(*spanSet).reset&lt;/code&gt; and &lt;code&gt;runtime.nextMarkBitArenaEpoch&lt;/code&gt; inside &lt;code&gt;sweepTerm&lt;/code&gt;—the brief STW phase at the start of a new GC cycle. Because the Go runtime stores off-heap GC bookkeeping metadata (like span sets and mark-bit arenas) in memory regions that are reused across cycles but touched &lt;em&gt;only&lt;/em&gt; during GC transitions, the Linux kernel&amp;rsquo;s LRU page reclaimer saw those pages sitting untouched between GC cycles, classified them as cold, and paged them out to disk. The moment the next GC cycle froze every goroutine to reset those metadata structures, the STW thread had to page-fault 228 pages back in from disk sequentially while the entire program sat frozen. Swap also degraded normal heap allocations (&lt;code&gt;io.ReadAll&lt;/code&gt; on a 511 KiB payload jumped from 3–5 ms to 105 ms on local NVMe swap and 903 ms on network block storage). The takeaway: swap and garbage-collected runtimes with off-heap metadata are a dangerous mix for latency-sensitive services.&lt;/p&gt;
&lt;h2 id="how-to-optimize-when-you-cant-do-anything"&gt;&lt;a href="https://hdombrovskaya.wordpress.com/2026/08/25/how-to-optimize-when-you-cant-do-anything/" rel="noopener noreferrer"&gt;How to optimize when you can’t do anything!&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Database veteran Hettie Dombrovskaya shares a real-world PostgreSQL war story where every textbook optimization was off the table. The culprit was an unpartitioned &lt;strong&gt;750 GB table holding 16 billion rows&lt;/strong&gt;. A critical production query that found all records whose &lt;code&gt;[start_date, end_date]&lt;/code&gt; interval covered a given target date alongside three equality filters (&lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;c&lt;/code&gt;) had started timing out, taking anywhere from several seconds to several minutes. The textbook fix—a GiST range index on &lt;code&gt;(a, b, c, daterange(start_date, end_date))&lt;/code&gt;—was impossible during an active incident because building a new index on 16 billion rows would take well over 24 hours. Meanwhile, the best existing B-tree index was on &lt;code&gt;(a, start_date, end_date)&lt;/code&gt;, where &lt;code&gt;a&lt;/code&gt; had terrible selectivity and filtering &lt;code&gt;start_date &amp;lt;= target_date&lt;/code&gt; for a recent target date matched nearly the entire 16-billion-row history.&lt;/p&gt;
&lt;p&gt;Every standard SQL rewrite hit a wall: adding an arbitrary lower bound like &lt;code&gt;start_date &amp;gt;= target_date - interval '1 year'&lt;/code&gt; wasn&amp;rsquo;t allowed because the customer genuinely needed long-lived historical records; computing &lt;code&gt;MIN(start_date)&lt;/code&gt; grouped by &lt;code&gt;a&lt;/code&gt; didn&amp;rsquo;t help because each &lt;code&gt;a&lt;/code&gt; bucket contained ancient rows; and creating a partial index covering only the customer&amp;rsquo;s specific &lt;code&gt;(a, b, c)&lt;/code&gt; combinations brought execution under 100 ms in staging, but only helped that single customer. The breakthrough came from looking closely at a spreadsheet the customer had sent over: it happened to list the exact date each of their ~2,000 &lt;code&gt;(a, b, c)&lt;/code&gt; combinations was first created! Loading those ~2,000 rows into a tiny lookup table (and in production, exposing the table from another database via a read-only &lt;code&gt;postgres_fdw&lt;/code&gt; foreign table since DDL on the primary database was restricted) allowed the query to join against the lookup table and pass that exact per-combination inception date as a tight lower bound &lt;code&gt;start_date &amp;gt;= lookup.first_seen_date&lt;/code&gt; into the existing &lt;code&gt;(a, start_date, end_date)&lt;/code&gt; index. Query runtime immediately dropped from minutes to &lt;strong&gt;under 100 ms&lt;/strong&gt;. Her takeaway: when you can&amp;rsquo;t build an index on a massive table, a tiny auxiliary lookup table encoding domain knowledge can act as your &amp;ldquo;index.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="four-ways-to-do-super-fast-packet-processing-in-go"&gt;&lt;a href="https://toonk.io/packetio/" rel="noopener noreferrer"&gt;Four ways to do super fast packet processing in Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Andree Toonk notes that parsing network packets in Go is easy—the hard part is moving tens of millions of packets per second between the physical NIC and your Go userspace process without the Linux kernel network stack melting your CPU. Because each high-speed packet I/O mechanism has a completely different C API and memory model, Toonk built &lt;strong&gt;&lt;code&gt;packetio&lt;/code&gt;&lt;/strong&gt;, a unified Go library that puts four backends behind a single clean interface. &lt;strong&gt;AF_PACKET&lt;/strong&gt; (the standard raw socket used by &lt;code&gt;tcpdump&lt;/code&gt;) works everywhere out of the box, but traverses most of the kernel networking stack. &lt;strong&gt;AF_XDP&lt;/strong&gt; hooks an eBPF program into the NIC driver early to redirect frames straight into a shared userspace/kernel ring buffer (&lt;code&gt;UMEM&lt;/code&gt;) while leaving normal kernel networking (like SSH and ARP) intact. &lt;strong&gt;DPDK&lt;/strong&gt; bypasses the kernel entirely via poll-mode drivers in userspace at the cost of taking over the whole NIC and a steep learning curve, while &lt;strong&gt;mlx5 Direct Verbs&lt;/strong&gt; talks directly to the hardware queues of NVIDIA/Mellanox ConnectX NICs via &lt;code&gt;rdma-core&lt;/code&gt; without needing the massive DPDK runtime. Switching backends in &lt;code&gt;packetio&lt;/code&gt; is practically a one-line change to &lt;code&gt;Open()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Toonk benchmarked all four backends in Go across two AMD EPYC servers wired back-to-back with 100 GbE NVIDIA ConnectX-6 Dx NICs blasting minimum-size 64-byte UDP packets at full line rate (&lt;strong&gt;148.8 million packets per second&lt;/strong&gt;), carefully measuring &lt;em&gt;system-wide&lt;/em&gt; CPU utilization including kernel &lt;code&gt;softirq&lt;/code&gt; cores. On receive (RX), &lt;code&gt;AF_PACKET&lt;/code&gt; topped out at just 2.3 Mpps while burning 52.8 CPU cores; &lt;code&gt;AF_XDP&lt;/code&gt; hit 146.5 Mpps using 11.4 cores; and both &lt;code&gt;Direct Verbs&lt;/code&gt; and &lt;code&gt;DPDK&lt;/code&gt; saturated the full 100 GbE line rate at &lt;strong&gt;148.6 Mpps&lt;/strong&gt; using just 10 and 8 cores respectively. On transmit (TX), &lt;code&gt;DPDK&lt;/code&gt; hit line rate using only 3 cores while &lt;code&gt;AF_XDP&lt;/code&gt; needed 20 cores. On full L2 packet forwarding (RX + TX), &lt;code&gt;Direct Verbs&lt;/code&gt; took first place at &lt;strong&gt;147.4 Mpps across 12 cores&lt;/strong&gt;. Notably, measuring only the Go process&amp;rsquo;s CPU hides the fact that &lt;code&gt;AF_XDP&lt;/code&gt; spends over half its CPU budget inside kernel &lt;code&gt;softirq&lt;/code&gt; handlers driving the NIC ring. Toonk&amp;rsquo;s rule of thumb: use &lt;code&gt;Direct Verbs&lt;/code&gt; on Mellanox/NVIDIA ConnectX hardware, &lt;code&gt;AF_XDP&lt;/code&gt; on general Linux NICs when you still need kernel coexistence, &lt;code&gt;DPDK&lt;/code&gt; when you need broad multi-vendor poll-mode driver support, and &lt;code&gt;AF_PACKET&lt;/code&gt; only for low-rate packet capture.&lt;/p&gt;
&lt;h2 id="how-uber-protects-against-retry-storms"&gt;&lt;a href="https://www.uber.com/us/en/blog/protecting-against-retry-storms/" rel="noopener noreferrer"&gt;How Uber Protects Against Retry Storms&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;At Uber&amp;rsquo;s microservice scale, naive retries are a recipe for self-inflicted outages: when a caller service receives an error from a downstream dependency, it typically has no idea whether that downstream service failed on its own or is merely forwarding an error from five hops deeper in the call graph. Retrying transient network blips works fine in isolation, but when a deep leaf service is overloaded, independent retries at every layer of a 7-hop call chain multiply exponentially: if each of the 6 upstream layers retries just once (&lt;code&gt;2x&lt;/code&gt;), load on the struggling leaf service amplifies by &lt;strong&gt;$2^6 = 64\times$&lt;/strong&gt; (or $8\times$ across a 4-hop chain). Even enforcing a standard per-client 10% retry budget still compounds across hops ($1.1^3 \approx 1.33\times$ or higher during partial brownouts) because each caller evaluates its budget locally without realizing upstream callers are &lt;em&gt;also&lt;/em&gt; retrying the exact same failed request.&lt;/p&gt;
&lt;p&gt;Uber solved this cascading amplification by introducing &lt;strong&gt;Error Ownership&lt;/strong&gt; (&lt;code&gt;x-uber-error-claim&lt;/code&gt;). The core insight is simple: any given failure in a call tree has exactly one &lt;em&gt;originating&lt;/em&gt; service, and only the immediate parent of that originating service should ever be allowed to retry it. A background control-plane component called &lt;em&gt;Service Dependency Analysis&lt;/em&gt; correlates inbound and outbound error rates across Uber&amp;rsquo;s service mesh to determine whether a service is generating errors internally or passively propagating downstream failures; when a service is the true origin of an error, the shared RPC middleware attaches an &lt;code&gt;x-uber-error-claim&lt;/code&gt; header to its error response. Its immediate caller sees the claim, performs its configured retries, and—if all retries still fail—&lt;strong&gt;strips the claim header&lt;/strong&gt; before propagating the error further upstream, signaling every ancestor in the call chain not to retry again. Because the logic lives inside Uber&amp;rsquo;s standard Go/Java RPC middleware, services got protection automatically without application code changes. During a major production incident on November 18, 2025, when a core leaf service sitting 5+ hops deep began failing, retry budgets alone would have amplified its traffic by 46–135%; Error Ownership blocked &lt;strong&gt;9.5 million redundant retry requests&lt;/strong&gt;, shrinking the maximum retry-storm blast radius from 25 hops down to 3 (and the average from 20 down to 2).&lt;/p&gt;
&lt;h2 id="the-real-cost-of-a-single-insert-in-postgres"&gt;&lt;a href="https://www.tigerdata.com/blog/real-cost-of-single-insert-in-postgres" rel="noopener noreferrer"&gt;The Real Cost of a Single Insert in Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;How many bytes does PostgreSQL actually write to disk when you insert a single 40-byte row? Tiger Data (the creators of TimescaleDB) measures the exact &lt;strong&gt;write amplification factor&lt;/strong&gt; of single-row &lt;code&gt;INSERT&lt;/code&gt; statements in PostgreSQL 16 on a realistic table with three B-tree indexes. First comes storage layout overhead: every heap tuple carries a 23-byte MVCC header (&lt;code&gt;t_xmin&lt;/code&gt;, &lt;code&gt;t_xmax&lt;/code&gt;, &lt;code&gt;t_cid&lt;/code&gt;, &lt;code&gt;t_ctid&lt;/code&gt;, infomasks) padded to 24 bytes, plus a 4-byte line pointer (&lt;code&gt;ItemIdData&lt;/code&gt;) in the page header—turning a 40-byte payload into 68 bytes on the heap (1.7x amplification before touching an index). Next, PostgreSQL updates every index synchronously inside the same transaction: three indexes mean three B-tree traversals and three modified 8 KiB index leaf pages. While a monotonically increasing timestamp index concentrates inserts into the rightmost leaf page sitting hot in shared buffers, a high-cardinality index (like a random UUID or device ID) scatters writes across the entire B-tree, dirtying cold pages all over the buffer pool. And for durability, inserting into the heap plus three indexes emits &lt;strong&gt;four separate WAL records&lt;/strong&gt; per row, each carrying its own 24-byte WAL record header and block reference metadata.&lt;/p&gt;
&lt;p&gt;Running a controlled benchmark of 100,000 single-row &lt;code&gt;INSERT&lt;/code&gt; transactions and measuring exact WAL generation via &lt;code&gt;pg_current_wal_lsn()&lt;/code&gt; and &lt;code&gt;pg_stat_wal&lt;/code&gt; reveals the true multiplier. Immediately after a &lt;code&gt;CHECKPOINT&lt;/code&gt;, write amplification hits &lt;strong&gt;10.74x&lt;/strong&gt; because the first modification to any 8 KiB heap or index page after a checkpoint must write a &lt;em&gt;Full Page Image&lt;/em&gt; (FPI) into the WAL to guard against torn pages. Even in a warm steady state with zero checkpoints, write amplification is &lt;strong&gt;8.73x&lt;/strong&gt; (~345 bytes of WAL per 40-byte row—meaning 50,000 inserts/sec generates ~17 MB/s of raw WAL stream alone, before counting dirty 8 KiB buffer flushes by the checkpointer). Dropping all three indexes drops steady-state WAL amplification down to &lt;strong&gt;2.44x&lt;/strong&gt;, proving that roughly &lt;strong&gt;70% of write volume comes from index maintenance&lt;/strong&gt;. To tame write amplification, the author recommends a prioritized playbook: batch inserts via &lt;code&gt;COPY&lt;/code&gt; or multi-row &lt;code&gt;INSERT ... VALUES (), ()&lt;/code&gt; so multiple rows share page locks and WAL overhead; drop unused indexes (check &lt;code&gt;pg_stat_user_indexes.idx_scan&lt;/code&gt;); enable &lt;code&gt;wal_compression = lz4&lt;/code&gt; or &lt;code&gt;zstd&lt;/code&gt; to shrink full-page writes; and tune &lt;code&gt;max_wal_size&lt;/code&gt; and &lt;code&gt;checkpoint_timeout&lt;/code&gt; to spread checkpoints further apart.&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 #136</title><link>https://miti99.com/en/post/2026/10/04/</link><pubDate>Sun, 04 Oct 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/10/04/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #136.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="fast-and-hard-code"&gt;&lt;a href="https://lucumr.pocoo.org/2026/8/22/fast-hard-code/" rel="noopener noreferrer"&gt;Fast and Hard Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Armin Ronacher observes that regardless of how far you buy into the &amp;ldquo;coding is solved&amp;rdquo; meme, the human learning curve of a programming language no longer acts as the gatekeeper it once did—because human syntax friction doesn&amp;rsquo;t slow down an AI agent. As a result, LLMs make initial language choice simultaneously less permanent (if you don&amp;rsquo;t like a codebase, you can port it to another language over a weekend, even one you barely know) and more driven by a language&amp;rsquo;s runtime characteristics and cultural aspirations. He sees developers shipping Rust today who would never have invested the months required to wrestle with the borrow checker by hand. Two trends reinforce this shift: a renewed appreciation for fast, resource-frugal software, and the realization that LLMs are exceptionally good at low-level performance optimization when given a benchmark and a test suite to keep behavior identical.&lt;/p&gt;
&lt;p&gt;Performance-obsessed builders like Mitchell Hashimoto, Charlie Marsh, Jarred Sumner, and Daniel Lemire have all embraced agentic workflows, and automated optimization loops let anyone hand a hot function to an agent and ask it to hill-climb on throughput. Consequently, new projects that care about speed and binary size increasingly reach for &amp;ldquo;hard&amp;rdquo; systems languages. Even Zig is benefiting—despite its core community&amp;rsquo;s skepticism toward AI: Cloudflare&amp;rsquo;s Artifacts service runs a full Git protocol engine written in Zig and compiled to a ~100 KB WebAssembly module, and Vercel recently shipped &lt;code&gt;fx&lt;/code&gt;, a coding agent written in Zig. Developers are also tackling intimidating domains like DWARF debug info, eBPF, custom network drivers, cryptography, and retro hardware that used to feel out of reach. The AI era may produce plenty of slop, Ronacher concludes, but it is also empowering a wave of fast, uncompromising systems software.&lt;/p&gt;
&lt;h2 id="shipping-video-calling-on-facebook"&gt;&lt;a href="https://molochinations.substack.com/p/shipping-video-calling-on-facebook" rel="noopener noreferrer"&gt;Shipping Video Calling on Facebook&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Philip Su looks back 16 years to when he joined Facebook&amp;rsquo;s fledgling Seattle office as its second engineer after twelve years at Microsoft. At the time, Facebook had only around 500 engineers in total, and Su signed up as the sole full-time engineer building Facebook&amp;rsquo;s very first video calling product—later joined by teammates like Denise Noyes and Vijaye Raji—small enough that the team reviewed product iterations directly with Mark Zuckerberg. Because WebRTC didn&amp;rsquo;t exist yet, Facebook partnered with Skype to embed a downloadable native Skype client binary that users installed before placing a call. Su pulls no punches about the quality of Skype&amp;rsquo;s codebase at the time: call setup succeeded only 82% of the time, and when he asked Skype&amp;rsquo;s engineers what their own baseline call-setup success rate was, they replied, &amp;ldquo;We don&amp;rsquo;t track that metric&amp;rdquo;—relying solely on post-call user star ratings. Ironically, routing call-signaling packets over Facebook Messenger&amp;rsquo;s infrastructure exposed that Messenger itself was silently dropping messages at a surprising rate, forcing Facebook to harden its own real-time messaging backbone.&lt;/p&gt;
&lt;p&gt;The six weeks following launch were the most grueling crunch of Su&amp;rsquo;s career: shipping hotfix after hotfix from 8 a.m. to midnight seven days a week, subsisting on office junk food, and somehow still losing over 10 pounds from the stress. One fun Easter egg: the outgoing ringtone melody was literally the musical notes &lt;strong&gt;F–A–C–E&lt;/strong&gt;. By the end of that six-week blitz, call reliability was solid, and Su used the feature to have his very first video call with his parents—a technology that COVID and WebRTC have since made as mundane as a phone call.&lt;/p&gt;
&lt;h2 id="ai-is-removing-the-middle-class-of-software-engineering"&gt;&lt;a href="https://blog.florianherrengt.com/ai-removing-middle-class-software-engineering.html" rel="noopener noreferrer"&gt;AI is removing the middle class of software engineering&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Florian Herrengt opens with a scene that has become all too familiar in 2026: a senior engineer logs in on Monday morning to find seven pull requests waiting for review, the first of which is a 24,000-line diff accompanied by an AI-generated summary. When a subtle bug crops up for the fourth time, the developer who opened the PR can&amp;rsquo;t explain where the data originates—their only move is to paste the stack trace back into Claude. In Herrengt&amp;rsquo;s view, AI has removed the natural speed limit of software development: teams with weak engineering culture now drive off a cliff ten times faster, and the tragedy is that to an inexperienced eye, the app still looks like it works. Undoing a bad architectural decision is much harder than generating it—an LLM can add three unnecessary database tables in ten minutes, but untangling them once real customer data lands in production requires a painful, high-risk migration.&lt;/p&gt;
&lt;p&gt;Weak code has always existed, Herrengt notes, but the difference today is velocity—like crashing a car at 200 km/h instead of 30 km/h. Code review, tests, and CI pipelines still exist, but they were designed for a world where human typing speed naturally throttled the volume of changes entering the pipe. A developer churning out ten massive AI-generated PRs a day isn&amp;rsquo;t necessarily creating value; they are often just shifting the cognitive burden onto the team&amp;rsquo;s most senior, hardest-to-replace engineers. He predicts AI will hollow out the middle of the engineering market and widen compensation gaps: strong engineers with deep system judgment become exponentially more valuable, while developers who use AI as a substitute for understanding rather than an amplifier of it will struggle to stay employable.&lt;/p&gt;
&lt;h2 id="the-fastest-double-to-string-algorithm-youve-never-heard-of"&gt;&lt;a href="https://vitaut.net/posts/2026/yy-dtoa/" rel="noopener noreferrer"&gt;The fastest double-to-string algorithm you’ve never heard of&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Victor Zverovich, author of &lt;code&gt;{fmt}&lt;/code&gt; and the &lt;code&gt;zmij&lt;/code&gt; floating-point formatting library, spotlights one of the fastest &lt;code&gt;dtoa&lt;/code&gt; (double-to-string) algorithms in existence—one that almost nobody has heard of. It lives quietly inside &lt;code&gt;yy_double.c&lt;/code&gt; in &lt;code&gt;ibireme&lt;/code&gt;&amp;rsquo;s &lt;code&gt;yyjson&lt;/code&gt; C library, has no accompanying academic paper, and has no formal name beyond its filename prefix, so Zverovich simply calls it &lt;strong&gt;&amp;ldquo;yy&amp;rdquo;&lt;/strong&gt;. In fact, Zverovich&amp;rsquo;s own &lt;code&gt;zmij&lt;/code&gt; library started out as an optimized port of the Schubfach algorithm before he swapped its core over to &lt;code&gt;yy&lt;/code&gt;. Like Ryū, Dragonbox, and Schubfach, &lt;code&gt;yy&lt;/code&gt; solves the shortest-roundtrip formatting problem: finding the shortest decimal representation that parses back to the exact same IEEE 754 binary floating-point number by picking the coarsest decimal grid that lands inside the value&amp;rsquo;s rounding interval.&lt;/p&gt;
&lt;p&gt;What makes &lt;code&gt;yy&lt;/code&gt; remarkably fast is that it needs only a &lt;em&gt;single&lt;/em&gt; 128-bit multiplication by a precomputed power of 10 in the common case, whereas classic Schubfach requires two or three 192-bit multiplications. For a given &lt;code&gt;double&lt;/code&gt;, &lt;code&gt;yy&lt;/code&gt; estimates the decimal exponent via a fixed-point approximation of $\log_{10}(2)$, scales the significand once, and evaluates four candidate decimal values—two on the fine grid and two on the coarse (multiples of 10) grid. Three simple predicates select the winner, preferring a shorter coarse-grid candidate whenever it falls inside the rounding interval. Half-ULP interval bounds are derived via cheap bit shifts rather than extra multiplications, and round-half-to-even ties are resolved by checking the least significant bit of the original significand. Zverovich includes an interactive visualization on 8-bit &lt;code&gt;E4M3&lt;/code&gt; floats to show how edge cases like &lt;code&gt;192&lt;/code&gt; format cleanly as &lt;code&gt;&amp;quot;2e2&amp;quot;&lt;/code&gt; instead of &lt;code&gt;&amp;quot;19e1&amp;quot;&lt;/code&gt;, concluding that brilliant algorithms buried inside practical open-source libraries deserve the same recognition as those published in academic venues.&lt;/p&gt;
&lt;h2 id="quake-shareware-a-cd-rom-just-a-little-too-full"&gt;&lt;a href="https://fabiensanglard.net/quake_shareware_cd/index.html" rel="noopener noreferrer"&gt;Quake Shareware, a CD-ROM just a little too full&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Fabien Sanglard tells the story of id Software&amp;rsquo;s infamous 1996 &lt;em&gt;Quake&lt;/em&gt; shareware CD-ROM. In the mid-1990s, a 640 MiB CD-ROM held vastly more space than a typical game needed. Because the &lt;em&gt;Quake&lt;/em&gt; shareware episode took up only 22 MiB, id Software decided to fill the remaining ~600 MiB with encrypted full retail versions of &lt;em&gt;Quake&lt;/em&gt; and their entire back catalog (&lt;em&gt;DOOM&lt;/em&gt;, &lt;em&gt;DOOM II&lt;/em&gt;, &lt;em&gt;Final DOOM&lt;/em&gt;, &lt;em&gt;Heretic&lt;/em&gt;, &lt;em&gt;Hexen&lt;/em&gt;). Players could buy the disc at retail for $9.95, play the shareware episode, call &lt;code&gt;1-800-ID-GAMES&lt;/code&gt;, read a dynamic &lt;code&gt;CHALLENGE&lt;/code&gt; code over the phone, pay by credit card, and receive an unlock &lt;code&gt;SERIAL&lt;/code&gt; code—with the challenge changing on every run to prevent customers from sharing a single unlock code with friends. The DRM wrapper, provided by TestDrive Corporation, &amp;ldquo;denatured&amp;rdquo; each game&amp;rsquo;s &lt;code&gt;.EXE&lt;/code&gt; by overwriting its first 32 KiB and storing the encrypted original header in a companion file. Yet just 39 days after the CD hit store shelves, the cracking group GNOMON released &lt;code&gt;QCRACK.EXE&lt;/code&gt;, a tiny keygen that computed valid &lt;code&gt;SERIAL&lt;/code&gt; codes from any &lt;code&gt;CHALLENGE&lt;/code&gt; for every game on the disc—leaving id Software stuck with nearly 150,000 unsold CDs in a warehouse.&lt;/p&gt;
&lt;p&gt;Reverse-engineering the installer executable &lt;code&gt;FLOW.EXE&lt;/code&gt; reveals why the scheme collapsed instantly: the unlock &lt;code&gt;SERIAL&lt;/code&gt; didn&amp;rsquo;t actually contain the decryption key! The symmetric decryption key was already sitting right inside &lt;code&gt;FLOW.EXE&lt;/code&gt; on the disc; the installer simply ran the exact same hash function on the &lt;code&gt;CHALLENGE&lt;/code&gt; string to generate the expected &lt;code&gt;SERIAL&lt;/code&gt; locally and compared it against what the user typed—pure security by obscurity. Worse still, Sanglard discovered that &lt;em&gt;Final DOOM&lt;/em&gt; couldn&amp;rsquo;t even be unlocked legitimately via the phone center because of a capitalization typo (&lt;code&gt;&amp;quot;Final&amp;quot;&lt;/code&gt; vs &lt;code&gt;&amp;quot;FINAL&amp;quot;&lt;/code&gt;) in the encrypted catalog metadata file &lt;code&gt;SKU.17&lt;/code&gt;—which itself was accompanied by an unencrypted plain-text copy, &lt;code&gt;SKU.TXT&lt;/code&gt;, left right on the mastered CD by mistake. Sanglard attributes the blunders to &amp;ldquo;Fab&amp;rsquo;s Razor&amp;rdquo;: never attribute to stupidity what can be adequately explained by crunch-time deadline pressure.&lt;/p&gt;
&lt;h2 id="how-instacart-built-a-modern-search-infrastructure-on-postgres"&gt;&lt;a href="https://tech.instacart.com/how-instacart-built-a-modern-search-infrastructure-on-postgres-c528fa601d54" rel="noopener noreferrer"&gt;How Instacart Built a Modern Search Infrastructure on Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Instacart&amp;rsquo;s search engineering team recounts migrating their core product search infrastructure—spanning billions of grocery items across thousands of retailers, millions of daily searches, and billions of daily price, inventory, and promotion updates—off Elasticsearch and onto PostgreSQL. Originally, full-text search ran on Elasticsearch, but its denormalized document model meant every inventory or price change triggered massive partial-document re-indexing across the cluster, overwhelming write capacity and making data-repair backfills take days. By moving to a sharded, highly normalized PostgreSQL architecture using &lt;code&gt;GIN&lt;/code&gt; indexes and a custom C extension for &lt;code&gt;ts_rank&lt;/code&gt;, Instacart cut write amplification by 10x, gained the ability to index hundreds of gigabytes of ML ranking features in separate tables joined at query time via SQL, and cut search latency in half by pushing scoring computation down next to NVMe storage rather than hauling large document payloads up to the application tier.&lt;/p&gt;
&lt;p&gt;In 2021, the team added semantic vector search via a standalone FAISS approximate-nearest-neighbor (ANN) service using MiniLM embeddings, blending lexical and vector results in the application tier. However, splitting retrieval across two systems forced the FAISS service to overfetch thousands of candidates before filtering out out-of-stock items, complicated relevance tuning, and required maintaining two distributed data pipelines in sync. Their final evolution unified both lexical and vector retrieval inside PostgreSQL using &lt;code&gt;pgvector&lt;/code&gt;, allowing real-time inventory availability to act as a native SQL filter alongside vector similarity. By consolidating hundreds of per-retailer HNSW indexes into cohort indexes grouped by retailer size, tuning parallel query workers, and storing quantized embeddings &lt;code&gt;PLAIN&lt;/code&gt; (inline) rather than in &lt;code&gt;TOAST&lt;/code&gt; tables, &lt;code&gt;pgvector&lt;/code&gt; delivered superior recall at comparable latency—cutting zero-result searches by 6% in A/B tests and driving a major lift in gross transaction value.&lt;/p&gt;
&lt;h2 id="curl-performance"&gt;&lt;a href="https://daniel.haxx.se/blog/2026/08/14/curl-performance-2/" rel="noopener noreferrer"&gt;curl performance&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;code&gt;curl&lt;/code&gt; creator Daniel Stenberg shares how the project finally launched a public continuous performance dashboard at &lt;code&gt;curl.se/perf&lt;/code&gt; after years of the idea sitting on the wishlist because nobody had time to build an elaborate benchmarking platform. After finding Grafana too heavy for what he wanted, Stenberg decided not to let perfection be the enemy of good and built the entire pipeline using tools he already knew inside out. Because shared cloud CI runners are too noisy for repeatable performance measurements, the benchmarks run on a dedicated multi-core machine sitting in his own office. Every twenty minutes, a &lt;code&gt;cron&lt;/code&gt; job triggers a shell script that pulls the latest &lt;code&gt;git&lt;/code&gt; commits, compiles &lt;code&gt;curl&lt;/code&gt;, and runs 24 microbenchmarks—measuring metrics like throughput when transferring 100 GB over &lt;code&gt;localhost&lt;/code&gt; and the exact count and byte total of &lt;code&gt;malloc&lt;/code&gt;/&lt;code&gt;calloc&lt;/code&gt;/&lt;code&gt;strdup&lt;/code&gt; heap allocations during an HTTP download. A second script parses the logs and generates static SVG graphs with &lt;code&gt;gnuplot&lt;/code&gt;, pushing the updated dashboard straight to the website. Within hours of the page going live, contributors were already submitting patches to shave allocations and speed up hot paths.&lt;/p&gt;
&lt;p&gt;Each commit is tested across multiple runs, plotting minimum, median, and maximum values. Because OS packages, kernel versions, and third-party TLS libraries inevitably shift over months, raw timings are most useful in the short term for catching accidental regressions immediately. To guard against slow &amp;ldquo;boiling frog&amp;rdquo; bloat over the long term, Stenberg added manually configured threshold &amp;ldquo;stakes&amp;rdquo; for key metrics, paired with Largest-Triangle-Three-Buckets (LTTB) downsampling for long-range charts and Mann-Kendall / Sen&amp;rsquo;s Slope statistical tests to flag gradual upward trends automatically. Even early on, the dashboard surfaced an instructive trade-off: a PR that reduced the &lt;em&gt;number&lt;/em&gt; of heap allocations had accidentally bloated the size of &lt;code&gt;curl&lt;/code&gt;&amp;rsquo;s main session struct.&lt;/p&gt;
&lt;h2 id="compression-is-prediction"&gt;&lt;a href="https://ngrok.com/blog/compression-is-prediction" rel="noopener noreferrer"&gt;Compression is prediction&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Annie Sexton at ngrok takes readers on an interactive visual tour of information theory to explain a profound equivalence: &lt;strong&gt;data compression is prediction, and large language models are data compressors&lt;/strong&gt;. Compression works by exploiting statistical redundancy—from simple run-length encoding (&lt;code&gt;AAAAAB&lt;/code&gt; → &lt;code&gt;5A1B&lt;/code&gt;) to modern codecs composed of three stages: a &lt;em&gt;transform&lt;/em&gt; that exposes patterns, a &lt;em&gt;model&lt;/em&gt; that predicts a probability distribution for the next symbol, and an &lt;em&gt;entropy coder&lt;/em&gt; that turns those probabilities into bits. While Huffman coding (used in &lt;code&gt;gzip&lt;/code&gt; and Brotli) assigns shorter bitstrings to more frequent symbols, it can never use fewer than 1 bit per symbol; &lt;em&gt;arithmetic coding&lt;/em&gt; overcomes that limit by subdividing the interval $[0, 1)$ proportionally to each symbol&amp;rsquo;s predicted probability, encoding an entire message as a single high-precision binary fraction that approaches Shannon&amp;rsquo;s theoretical entropy limit ($-\log_2 P$).&lt;/p&gt;
&lt;p&gt;The better your model predicts the next symbol given prior context, the fewer bits the entropy coder needs: the letter &lt;code&gt;U&lt;/code&gt; is relatively rare in English overall, yet nearly 100% certain right after &lt;code&gt;Q&lt;/code&gt;, costing almost zero bits to encode when the model knows that context. That is the exact objective an LLM is trained on: predicting a probability distribution over the next token, where the cross-entropy loss function literally measures how many bits an arithmetic coder would need to encode the true next token using the model&amp;rsquo;s predictions. On a passage from Charles Dickens, a simple first-order Markov model compresses the text to 24% of its original size, whereas pairing &lt;code&gt;GPT-2&lt;/code&gt; with an arithmetic coder shrinks it to 10%. We don&amp;rsquo;t replace &lt;code&gt;zstd&lt;/code&gt; with LLMs for everyday file archiving only because both sender and receiver would need gigabytes of model weights and heavy GPU compute—but mathematically, training a better predictor and building a tighter compressor are the exact same problem.&lt;/p&gt;
&lt;h2 id="how-anthropic-builds-and-how-engineering-will-change-soon"&gt;&lt;a href="https://www.developing.dev/p/how-anthropic-builds-and-how-engineering" rel="noopener noreferrer"&gt;How Anthropic Builds And How Engineering Will Change Soon&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ryan Peterman interviews Thariq Shihipar, an engineer on Anthropic&amp;rsquo;s Claude Code team, about how engineers inside Anthropic work with frontier models every day. Shihipar&amp;rsquo;s first piece of advice for new hires is to treat Claude as a thought partner, feed it rich context, and constantly look to step up one level of abstraction: instead of just using the model to write a feature, build the system or skill that enables the model to build that whole class of features reliably. He argues that &lt;em&gt;harnesses&lt;/em&gt; are becoming more important, not less: the smarter a model gets and the longer it runs autonomously, the more sophisticated the surrounding software—like Auto mode, sandboxes, and interactive Artifacts—needs to be so the agent can act safely and present its work clearly to humans. In his own daily workflow, he pairs Claude Fable for open-ended planning, brainstorming, and spec writing with Claude Opus 5 for disciplined implementation, and uses &amp;ldquo;loop engineering&amp;rdquo; (automated systems that prompt Claude on a schedule or trigger) to stay on top of bug queues and maintenance work that teams previously lacked bandwidth to touch.&lt;/p&gt;
&lt;p&gt;On writing internal docs, his personal rule is simple: never send AI-generated text unless you would be completely comfortable sharing the exact prompt that produced it; let Claude draft data-heavy status reports, but write strategy memos and opinionated essays yourself. For codebase hygiene, nitpicking variable names and style conventions matters less in an agentic world than investing in automated simplification skills and writing roughly 100x more automated tests—especially request-replay harnesses and chaos testing—to keep incident rates down as commit velocity climbs. Learning how to code remains as valuable as ever: only someone who deeply understands systems can judge whether software is actually good, and &amp;ldquo;coding is solved&amp;rdquo; simply means translating a clear spec into working syntax is no longer the unpredictable bottleneck it used to be.&lt;/p&gt;
&lt;h2 id="a-faster-way-to-convert-a-timestamp--hour-min-sec"&gt;&lt;a href="https://www.benjoffe.com/fast-time-of-day" rel="noopener noreferrer"&gt;A faster way to convert a timestamp ➜ Hour, Min, Sec&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Following up on his fast day-of-the-week algorithm, Ben Joffe tackles splitting an integer number of seconds in a day (&lt;code&gt;0..86399&lt;/code&gt;) into hours, minutes, and seconds. Most standard datetime libraries take around 16 CPU cycles for this conversion because the textbook approach—dividing by &lt;code&gt;3600&lt;/code&gt; to get the hour, taking the remainder, and dividing by &lt;code&gt;60&lt;/code&gt; to get the minute—creates a long serial instruction dependency chain. A second family of algorithms (used in V8, Boost, and &lt;code&gt;musl&lt;/code&gt;) computes each field independently, while Cassio Neri&amp;rsquo;s 2020 algorithm uses a single 64-bit magic multiplication and extracts minutes and seconds from the lower bits, serving as Joffe&amp;rsquo;s benchmark baseline. Joffe&amp;rsquo;s first variant (&lt;strong&gt;V1&lt;/strong&gt;) breaks the serial dependency chain by computing &lt;code&gt;time / 60&lt;/code&gt; and &lt;code&gt;time / 3600&lt;/code&gt; in parallel so the CPU&amp;rsquo;s out-of-order execution engine can overlap both divisions, then derives seconds and minutes via simple multiplications and subtractions.&lt;/p&gt;
&lt;p&gt;His &lt;strong&gt;V2&lt;/strong&gt; variant uses fixed-point arithmetic in 64 bits: multiplying &lt;code&gt;time&lt;/code&gt; by $\lfloor 2^{32}/3600 \rfloor + 1$ puts the hour directly in the upper 32 bits and the fractional remainder of the hour in the lower 32 bits; multiplying that lower 32-bit fraction by &lt;code&gt;60&lt;/code&gt; yields the minute in the upper 32 bits, and multiplying the new lower 32-bit fraction by &lt;code&gt;60&lt;/code&gt; again yields the second. &lt;strong&gt;V3&lt;/strong&gt; applies the Mersenne-like modulo trick from his previous post, computing seconds via &lt;code&gt;((time + 4 * tmin) % 64)&lt;/code&gt; since $60 = 64 - 4$. The post also covers variants for millisecond timestamps, leap seconds, ARM NEON SIMD, and SWAR (SIMD Within A Register). On an Apple M4 Pro, V1, V2, and V3 run in 0.65x, 0.64x, and 0.60x the time of Neri&amp;rsquo;s baseline respectively—and down to 0.49x on a Ryzen 9 9950X3D with Clang—with patches already adopted in Elixir and Java&amp;rsquo;s &lt;code&gt;ITU&lt;/code&gt; library. Because these fast fixed-point multipliers are only exact over bounded input ranges (&lt;code&gt;0..86399&lt;/code&gt; or slightly higher), Joffe recommends &lt;strong&gt;V2&lt;/strong&gt; as the best all-around choice for standard library implementations.&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=WvSVSbGo0wI" rel="noopener noreferrer"&gt;HTTP vs HTTPS Explained&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
 &lt;p&gt;ByteByteGo&amp;rsquo;s video compares HTTP and HTTPS, explaining how HTTPS uses TLS to encrypt data in transit and authenticate the server, keeping connections between browsers and websites secure.&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_!6j7M!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2d0d1c6c-a864-4b20-b1fc-2d86c8ad2fab_2484x3002.png" alt="Top 12 Agent Skills You Should Know"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!m1c9!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8b053abe-404e-4bca-8e49-52a47392ab83_2484x3002.png" alt="9 Types of API Testing"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!4xag!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac1ed471-18f6-45dd-ad5f-02bc6d96d375_2484x3002.png" alt="Forward Proxy, Reverse Proxy, and API Gateway Explained"&gt;&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 #122</title><link>https://miti99.com/en/post/2026/07/10/</link><pubDate>Fri, 10 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/10/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #122.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-worst-take-in-tech-new-grad-hiring"&gt;&lt;a href="https://www.scottkennedy.us/new-grads" rel="noopener noreferrer"&gt;The worst take in tech: new grad hiring&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Scott Kennedy pushes back hard against the spreading narrative that companies should stop hiring new grads because AI can automate entry-level work. According to that argument, junior engineers historically learned the craft by doing simple tasks; now that AI handles those tasks, juniors won&amp;rsquo;t develop engineering judgment while budgets get spent on tokens instead. Kennedy calls this dead wrong: over the past year, he has seen the strongest new-grad talent pool in more than a decade of recruiting, and Replit doubled its new-grad hiring target to capitalize on it. Driven, curious, high-slope graduates can outperform many experienced hires within a couple of years when given strong mentorship and hard problems; writing them off because of AI is short-sighted.&lt;/p&gt;
&lt;p&gt;He also points out a distinct advantage of &amp;ldquo;AI-native&amp;rdquo; graduates: having grown up alongside modern AI tools, they have no legacy habits to unlearn and use AI coding workflows with natural fluency—something he sees repeatedly in interviews. Even so, the formula for succeeding as a junior engineer hasn&amp;rsquo;t changed: curiosity to dig beneath the surface and debug deeply, resilience to learn from failed attempts, humility to ask for help when stuck, and seeking out high-challenge environments. AI changes how the work gets done, but it doesn&amp;rsquo;t diminish the value of learning speed, grit, and judgment.&lt;/p&gt;
&lt;h2 id="parsing-gigabytes-of-json-per-second"&gt;&lt;a href="https://arxiv.org/pdf/1902.08318" rel="noopener noreferrer"&gt;Parsing Gigabytes of JSON per Second&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This paper introduces &lt;code&gt;simdjson&lt;/code&gt;, the first standard-compliant JSON parser capable of parsing gigabytes of JSON per second on a single core of a commodity CPU. The motivation is straightforward: JSON is ubiquitous across the web and distributed systems, and when applications ingest massive volumes of JSON documents, parsing easily becomes a primary CPU bottleneck despite decades of parser research.&lt;/p&gt;
&lt;p&gt;What sets &lt;code&gt;simdjson&lt;/code&gt; apart from prior validating parsers is its pervasive use of SIMD vector instructions, allowing the processor to inspect and classify dozens of bytes in parallel within a single instruction. As a result, &lt;code&gt;simdjson&lt;/code&gt; executes roughly one-quarter or fewer CPU instructions than RapidJSON—the fastest traditional parser benchmarked—while still performing full UTF-8 and structural validation. The authors released the library under a permissive open-source license, making the results easy to reproduce and enabling widespread adoption across the industry.&lt;/p&gt;
&lt;h2 id="six-sql-patterns-i-use-to-catch-transaction-fraud"&gt;&lt;a href="https://analytics.fixelsmith.com/posts/sql-fraud-patterns/" rel="noopener noreferrer"&gt;Six SQL patterns I use to catch transaction fraud&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post presents six practical SQL patterns as a first line of defense for catching anomalous transaction behavior across credit cards, e-commerce, and healthcare billing. The velocity pattern groups transactions into rolling time windows to spot rapid bursts of activity from a single cardholder; combining multiple window sizes catches both automated card-testing scripts firing in seconds and slower fraud sprees spread over hours. The impossible-travel pattern uses &lt;code&gt;LAG&lt;/code&gt; window functions paired with geographic distance formulas to flag a card used in two distant cities within an unrealistic timeframe. The suspicious-amount pattern hunts for small round test charges or transactions clustered just below reporting thresholds, while the merchant-anomaly pattern compares each merchant&amp;rsquo;s activity against its own historical baseline to spot compromised terminals.&lt;/p&gt;
&lt;p&gt;The off-hours pattern compares transaction timestamps against a cardholder&amp;rsquo;s normal spending hours, making it reliable only once an account has built up sufficient history. Finally, a feature-engineering pattern pre-computes derived window columns—such as seconds since previous transaction or trailing 24-hour spend—so combining multiple fraud signals becomes a simple &lt;code&gt;WHERE&lt;/code&gt; filter. No single rule is accurate enough in isolation, whereas a transaction tripping three or four patterns at once is almost certainly fraudulent. In production, queries still need careful &lt;code&gt;NULL&lt;/code&gt; handling, human review for false positives, and date-range partitioning before running window functions to keep warehouse costs in check.&lt;/p&gt;
&lt;h2 id="we-replaced-redis-with-mysql-for-inventory-reservationsand-it-scaled-2026"&gt;&lt;a href="https://shopify.engineering/scaling-inventory-reservations" rel="noopener noreferrer"&gt;We replaced Redis with MySQL for inventory reservations—and it scaled (2026)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Shopify migrated its flash-sale inventory reservation system from Redis to MySQL so that temporary checkout reservations and the canonical inventory ledger live inside the exact same ACID transaction. Updating two separate stores without atomicity risks overselling or leaked reservations when failures happen mid-flight. Instead of storing a single quantity counter row per SKU—which would serialize every concurrent buyer behind a single row lock—the new schema represents each individual unit of inventory as its own row, capped at a pool of 1,000 rows per SKU-location pair so tables stay compact while queries remain fast even for massive stock counts. MySQL 8&amp;rsquo;s &lt;code&gt;SELECT ... FOR UPDATE SKIP LOCKED&lt;/code&gt; lets concurrent checkouts skip rows currently locked by other buyers instead of waiting in line, drastically cutting lock contention during flash sales. A composite primary key minimizes per-row lock overhead, &lt;code&gt;READ COMMITTED&lt;/code&gt; isolation prevents gap locks from blocking concurrent inventory restocks, and deterministic lock ordering prevents deadlocks.&lt;/p&gt;
&lt;p&gt;During rollout, however, the real bottleneck turned out to be connection pool exhaustion: database CPU sat low while requests queued up waiting for connections. Tagging queries with business workflow metadata and measuring at the proxy layer revealed unrelated checkout operations holding database connections open far too long. After cleaning up connection lifetimes and tuning configs, primary database reads dropped by 50%, total transactions fell by 33%, and writer CPU stayed below 50% even during peak flash sales. To migrate safely, Shopify dual-wrote to both Redis and MySQL while Redis remained primary, shadowed and compared results against live traffic, and shifted primary reads incrementally by cohort with instant rollback ready at every step.&lt;/p&gt;
&lt;h2 id="cell-based-architecture-for-resilient-payment-systems"&gt;&lt;a href="https://americanexpress.io/cell-based-architecture-for-resilient-payment-systems/" rel="noopener noreferrer"&gt;Cell-Based Architecture for Resilient Payment Systems&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;American Express structures its core payment processing platform into self-contained cells, where each cell bundles its own services, databases, and supporting infrastructure. A cell is defined as a fault-isolation boundary rather than a specific deployment technology: an entire cell can fail, undergo maintenance, or be drained of traffic without impacting neighboring cells. Slowly changing reference data like currency exchange rates is replicated into every cell ahead of time to avoid synchronous cross-cell lookups, while stateful transactions are routed deterministically to the cell holding the authoritative state. A Global Transaction Router governs all ingress traffic and strictly forbids services inside one cell from calling directly into another; while this sometimes requires duplicating services across cells, it preserves hard fault isolation and keeps latency low.&lt;/p&gt;
&lt;p&gt;When a cell fails mid-transaction, in-flight requests aren&amp;rsquo;t resumed halfway through on another cell—they are replayed from the beginning on a healthy cell using the original request payload. That retry is safe because a globally unique transaction ID enforces end-to-end idempotency, allowing downstream systems to detect and deduplicate repeated work. Traffic shifts across cells gradually by percentage rather than flipping all at once. The platform also minimizes non-essential dependencies on the critical path by making audit logging and config refreshes asynchronous, gracefully degrading auxiliary features so payment authorization never stalls. True resilience comes from strict blast-radius boundaries and architectural discipline, not just monitoring and retries.&lt;/p&gt;
&lt;h2 id="when-failover-isnt-safe-building-high-availability-postgresql-on-kubernetes"&gt;&lt;a href="https://www.datadoghq.com/blog/engineering/postgresql-ha-kubernetes/" rel="noopener noreferrer"&gt;When failover isn’t safe: Building high-availability PostgreSQL on Kubernetes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;During a simulated availability-zone failure game day, Datadog discovered that their high-availability PostgreSQL clusters on Kubernetes could not fail over safely. When network latency spiked during the drill, the primary kept accepting writes and replicating asynchronously while standby replicas fell further and further behind. When the primary was terminated, Patroni rightly refused to promote any standby because their replication lag exceeded &lt;code&gt;maximum_lag_on_failover&lt;/code&gt;—preventing silent data loss, but leaving the cluster wedged and unable to accept writes until human operators intervened. The first lesson: nominal high availability means nothing if no replica is actually safe to promote when disaster strikes.&lt;/p&gt;
&lt;p&gt;Datadog moved to a hybrid replication topology: standby instances eligible for failover use synchronous replication, while read-only replicas stay asynchronous to avoid unnecessary latency penalties. In Patroni, they enabled &lt;code&gt;synchronous_mode&lt;/code&gt;, &lt;code&gt;synchronous_mode_strict&lt;/code&gt;, and &lt;code&gt;synchronous_commit = remote_apply&lt;/code&gt;, guaranteeing a transaction is acknowledged only after its WAL records have been replayed and applied on the synchronous standby. Synthetic benchmarks at this highest durability setting showed average write latency increasing by 53% and throughput dropping by 34%, but rolling the change out gradually across datacenters with soak periods confirmed that real-world application impact remained well within acceptable bounds. If all synchronous standbys become unavailable, the primary halts writes rather than silently risking data loss, turning an invisible durability hazard into an explicit error that callers can retry or queue. Balancing durability and performance requires actively monitoring &lt;code&gt;SyncRep&lt;/code&gt; wait events alongside standby health.&lt;/p&gt;
&lt;h2 id="from-christmas-outage-to-1-app-store-ranking-an-aura-frames-postgres-scaling-retrospective"&gt;&lt;a href="https://andyatkinson.com/postgresql-rds-scaling-aws-christmas-day-peak" rel="noopener noreferrer"&gt;From Christmas Outage to #1 App Store Ranking: An Aura Frames Postgres Scaling Retrospective&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;On Christmas Day 2024—the biggest traffic day of the year for digital photo frames—Aura Frames suffered a three-hour PostgreSQL outage when unbounded WAL growth filled their dedicated WAL volume. The culprit was an RDS PostgreSQL 14.1 default that attached replication slots to read replicas: a replication slot forces the primary to retain WAL segments until every replica has consumed them, so when a replica fell behind under holiday load, WAL piled up until the primary ran out of disk space and crashed. The team immediately capped slot retention using &lt;code&gt;max_slot_wal_keep_size&lt;/code&gt; (noting that &lt;code&gt;wal_keep_size&lt;/code&gt; sets a minimum floor, not a ceiling), choosing to invalidate a lagging replica rather than let the primary go down.&lt;/p&gt;
&lt;p&gt;To prepare for Christmas 2025, instead of vertically scaling a single massive primary again, Aura partitioned at the table level (functional sharding): the ten highest-write tables were split out onto seven new primaries, creating eight databases in total. This proved a pragmatic middle ground before needing horizontal row sharding on their largest table. The Ruby on Rails monolith stayed intact, routing queries cleanly via Active Record Multiple Databases, while physical replication moved data over with just 5–10 minutes of cutover downtime. Total provisioned CPU and memory increased roughly 4.7x, and on Christmas Day 2025 the system peaked at 226,000 transactions per second—sustaining over 100,000 TPS for ten straight hours at an average query latency of 25 microseconds. Continuous testing, canary rollouts, and load testing de-risked the data-access changes; temporarily over-provisioning for a predictable annual peak made complete sense, and AWS Blue/Green deployments let them scale the fleet back down afterward to restore cost efficiency.&lt;/p&gt;
&lt;h2 id="gitignore-isnt-the-only-way-to-ignore-files-in-git"&gt;&lt;a href="https://nelson.cloud/.gitignore-isnt-the-only-way-to-ignore-files-in-git/" rel="noopener noreferrer"&gt;.gitignore Isn’t the Only Way To Ignore Files in Git&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Git supports three distinct scopes for ignoring files, each suited to a different job. &lt;code&gt;.gitignore&lt;/code&gt; is committed into the repository, making it the right place for project-wide rules shared by every contributor, like build outputs and dependency folders. &lt;code&gt;.git/info/exclude&lt;/code&gt; lives inside your local &lt;code&gt;.git&lt;/code&gt; directory and is never tracked or pushed, applying only to your local clone—ideal for personal scratch files, local scripts, or project-specific tool configs that don&amp;rsquo;t belong in the team&amp;rsquo;s shared &lt;code&gt;.gitignore&lt;/code&gt;. Finally, &lt;code&gt;~/.config/git/ignore&lt;/code&gt; acts as your user-wide global ignore file across every repository on your machine, perfect for OS- or editor-generated noise like macOS &lt;code&gt;.DS_Store&lt;/code&gt; files or editor swap files.&lt;/p&gt;
&lt;p&gt;You can customize the location of the global ignore file via &lt;code&gt;git config --global core.excludesFile ~/.gitignore_global&lt;/code&gt; and reset it to the default with &lt;code&gt;git config --global --unset core.excludesFile&lt;/code&gt;. And whenever you aren&amp;rsquo;t sure which rule across those three layers is causing a file to be ignored, &lt;code&gt;git check-ignore -v &amp;lt;path&amp;gt;&lt;/code&gt; is the fastest way to debug it: the command prints the exact ignore file, line number, and pattern that matched—or outputs nothing if the file isn&amp;rsquo;t ignored.&lt;/p&gt;
&lt;h2 id="the-only-scalable-delete-in-postgres-is-drop-table"&gt;&lt;a href="https://planetscale.com/blog/the-only-scalable-delete" rel="noopener noreferrer"&gt;The only scalable delete in Postgres is DROP TABLE&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In PostgreSQL, running a large &lt;code&gt;DELETE&lt;/code&gt; doesn&amp;rsquo;t immediately free disk space—it creates a mountain of follow-up work for the database. Under MVCC, deleted rows remain on disk as dead tuples so concurrent transactions can still see a consistent snapshot; autovacuum eventually marks that space reusable internally, but rarely shrinks the underlying data files on disk (except when completely empty pages sit at the very end of a relation), and indexes and sequential scans still pay the cost of skipping over dead tuples in the meantime. Mass deletes also generate heavy WAL volume that must be replicated downstream, inflating write latency, vacuum debt, and replica lag—while cascading foreign-key deletes can unexpectedly amplify a small delete into gigabytes of churn. &lt;code&gt;VACUUM FULL&lt;/code&gt; reclaims OS disk space, but only by taking an expensive exclusive table lock and rewriting the entire table.&lt;/p&gt;
&lt;p&gt;By contrast, &lt;code&gt;DROP TABLE&lt;/code&gt; and &lt;code&gt;TRUNCATE&lt;/code&gt; acquire an &lt;code&gt;AccessExclusiveLock&lt;/code&gt; but execute in nearly constant time regardless of row count: they unlink the underlying physical files directly without generating per-row dead tuples or vacuum debt. Consequently, schemas that need regular bulk purges should be designed so large deletes become table drops. For time-series or retention-bound data, time-based table partitioning turns recurring deletes into instantly dropping the oldest partition. For a one-off cleanup where most rows are being deleted, copying the surviving rows into a temporary table, running &lt;code&gt;TRUNCATE&lt;/code&gt; on the original, and inserting them back avoids per-row delete WAL (though structural and re-insert WAL still applies); if you cannot afford a long lock, you can dual-write and backfill into a fresh table before swapping names in a brief transaction, taking care to handle foreign keys, sequences, and concurrent writes. When the rows to delete are a small fraction of the table, batched deletes in small transactions remain the practical choice so autovacuum can keep up between batches.&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 #111</title><link>https://miti99.com/en/post/2026/06/11/</link><pubDate>Thu, 11 Jun 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/06/11/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #111.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="learnings-from-100k-lines-of-rust-with-ai"&gt;&lt;a href="https://zfhuang99.github.io/rust/claude%20code/codex/contracts/spec-driven%20development/2025/12/01/rust-with-ai.html" rel="noopener noreferrer"&gt;Learnings from 100K Lines of Rust with AI&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cheng Huang recounts using AI agents like Claude Code, Codex CLI, and Copilot to modernize Azure&amp;rsquo;s Replicated State Library (RSL) — a multi-Paxos consensus engine — in Rust. The resulting codebase reached roughly 130k lines of code and over 1,300 tests. To get AI to correctly implement such a complex distributed system, the author relied heavily on &amp;ldquo;code contracts&amp;rdquo;: having the AI write preconditions, postconditions, and invariants for critical functions, enforcing them as runtime &lt;code&gt;assert&lt;/code&gt;s during testing, and using them to drive both targeted unit tests and property-based tests. That approach caught a subtle Paxos safety violation before the code ever reached production.&lt;/p&gt;
&lt;p&gt;The second technique was lightweight spec-driven development: instead of maintaining rigid, heavyweight requirements and design docs, the author used &lt;code&gt;spec-kit&lt;/code&gt;&amp;rsquo;s &lt;code&gt;/specify&lt;/code&gt; command to generate user stories with acceptance criteria, followed by &lt;code&gt;/clarify&lt;/code&gt; so the AI could critique and refine them; each user story then became a right-sized unit of work for an agent. The third technique was AI-driven performance optimization: over roughly three weeks, the AI added latency instrumentation, ran benchmarks, analyzed bottlenecks, and proposed improvements like reducing allocations, zero-copy parsing, and cutting lock contention — pushing throughput from ~23k to 300k operations per second while Rust preserved memory safety. The author closes with the hope that agents will soon execute entire user stories end to end, automate the contract workflow, and optimize performance across even larger codebases, while humans retain architectural oversight.&lt;/p&gt;
&lt;h2 id="always-be-blaming"&gt;&lt;a href="https://matklad.github.io/2026/05/18/always-be-blaming.html" rel="noopener noreferrer"&gt;Always Be Blaming&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;matklad proposes reading code across multiple &amp;ldquo;dimensions.&amp;rdquo; 2D reading means forming your own mental sketch of how a solution should look first, then comparing it against the actual code to spot surprises; 3D reading means tracing how the code evolved over time, because most production code is Markovian — its shape today depends on its shape yesterday, not just on the problem it solves. The fourth dimension, and the highest goal, is reconstructing the original author&amp;rsquo;s reasoning and train of thought — applying &amp;ldquo;theory of mind&amp;rdquo; to reading code.&lt;/p&gt;
&lt;p&gt;To do that, matklad treats &lt;code&gt;git&lt;/code&gt; history as a first-class investigative tool. On GitHub, press &lt;code&gt;y&lt;/code&gt; to pin the URL to a specific commit SHA, open the blame view, and repeatedly click &amp;ldquo;blame prior to change,&amp;rdquo; opening relevant commits in new tabs and browsing surrounding files at that exact point in time. Locally, he uses custom keybindings: &lt;code&gt;,b l&lt;/code&gt; to check out the commit that last touched the current line, &lt;code&gt;,b p&lt;/code&gt; to step back to the parent commit, &lt;code&gt;,b u&lt;/code&gt; to jump back to the previous inspection point, and &lt;code&gt;,b w&lt;/code&gt; to copy the GitHub link. This &amp;ldquo;in-place blame&amp;rdquo; workflow keeps the LSP, test runner, and search tools like &lt;code&gt;rg&lt;/code&gt; working normally as you travel through time. He also laments that code review comments — an invaluable source of context — remain locked inside third-party hosting databases rather than living inside the Git repository itself.&lt;/p&gt;
&lt;h2 id="scaling-postgresql-to-power-800-million-chatgpt-users"&gt;&lt;a href="https://openai.com/index/scaling-postgresql/" rel="noopener noreferrer"&gt;Scaling PostgreSQL to power 800 million ChatGPT users&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Bohan Zhang shares how OpenAI scaled PostgreSQL to serve ChatGPT and its API across roughly 800 million users. In just one year, PostgreSQL load grew more than 10x, yet the system still relies on a single Azure primary for all writes paired with nearly 50 read replicas spread across multiple regions. The biggest pressure point is write amplification: PostgreSQL&amp;rsquo;s MVCC copies an entire row on every update, amplifying both writes and reads while bloating tables and indexes. To protect the primary, OpenAI offloaded write-heavy, easily partitionable workloads to Azure Cosmos DB, banned adding new tables to the existing PostgreSQL cluster, and held off on sharding because it would require rewriting hundreds of application endpoints.&lt;/p&gt;
&lt;p&gt;Most overload incidents followed the exact same cascade: an upstream trigger — a wave of cache misses, an expensive join, or a write spike from a feature launch — pushed latency up, requests timed out, and client retries amplified the load into a death spiral. To break that chain, OpenAI optimized expensive queries, deployed PgBouncer for connection pooling, added cache locking to prevent cache-miss stampedes, isolated workloads by priority tier, enforced multi-layer rate limiting, capped schema migrations at a 5-second timeout, and throttled backfills. They are also testing cascading replication with Azure to add more read replicas without making the primary ship WAL to all of them directly. As a result, PostgreSQL handles millions of queries per second while keeping client-side p99 latency in the tens of milliseconds and maintaining five-nines availability.&lt;/p&gt;
&lt;h2 id="scaling-managed-agents-decoupling-the-brain-from-the-hands"&gt;&lt;a href="https://www.anthropic.com/engineering/managed-agents" rel="noopener noreferrer"&gt;Scaling Managed Agents: Decoupling the brain from the hands&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Anthropic explains the architecture behind Claude Managed Agents, their hosted service for running long-lived AI agents. The starting observation is that agent harnesses often bake in workarounds for whatever current models struggle with, and those assumptions quickly go stale as models improve. Rather than bundling the model, harness, sandbox, and session state inside a single container, Anthropic decoupled them into three components behind stable interfaces — much like an operating system virtualizes hardware: the session is an append-only event log, the harness is the control loop coordinating Claude and tool calls, and the sandbox is the code execution environment. The pieces communicate through clean primitives like &lt;code&gt;execute()&lt;/code&gt;, &lt;code&gt;emitEvent()&lt;/code&gt;, &lt;code&gt;getSession()&lt;/code&gt;, and &lt;code&gt;getEvents()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This decoupling turns containers from &amp;ldquo;pets&amp;rdquo; that must be kept alive into disposable &amp;ldquo;cattle&amp;rdquo;: a crashed sandbox is just a failed tool call that can be spun up fresh, while the stateless harness can restart at any time and resume from the session event log. A single harness can also coordinate multiple sandboxes, including reaching into a customer&amp;rsquo;s VPC without requiring network peering. On security, credentials never live inside the sandbox where untrusted code runs; tokens are either bound to resources at provisioning time or held in a vault behind an authenticating proxy, making them much harder for prompt injections to steal. Latency improved dramatically too, because inference starts immediately without waiting for a container to boot — cutting time-to-first-token by roughly 60% at p50 and over 90% at p95.&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://substackcdn.com/image/fetch/$s_!fap_!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc111a2c6-71bd-45a7-8938-e8bb4f772cbc_1378x1390.png" alt="How does Claude Code keep long sessions from running out of context?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!VfjL!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F38f19060-e838-440a-971d-bdc1f2d3a167_1280x1546.jpeg" alt="How does a request actually travel through Claude Code?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!cqW0!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e0de719-d0ac-497e-8f9c-b9c841422db8_2484x3002.png" alt="Forward Proxy, Reverse Proxy, and API Gateway Explained"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!eLEi!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52ccd4c2-dc53-4b9a-95b9-d87d6c353f88_2484x3002.png" alt="RAGs vs Agents"&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.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #93</title><link>https://miti99.com/en/post/2026/03/28/</link><pubDate>Sat, 28 Mar 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/03/28/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #93.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="lessons-from-building-claude-code-how-we-use-skills"&gt;&lt;a href="https://x.com/trq212/status/2033949937936085378" rel="noopener noreferrer"&gt;Lessons from Building Claude Code: How We Use Skills&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Thariq Shihipar, an engineer at Anthropic, distills lessons from running hundreds of internal skills in Claude Code. The first misconception he corrects is that skills are &amp;ldquo;just markdown files&amp;rdquo;: each skill is actually a directory that can bundle scripts, reference assets, and data for the agent to discover and execute, along with configuration options like dynamic hook registration. Surveying their internal catalog, the team found that effective skills fall into nine recurring categories: library and API references, product verification, data fetching and analysis, team workflow automation, code scaffolding, code quality enforcement, CI/CD and deployment, incident runbooks, and infrastructure operations. Great skills fit cleanly into one category; confusing ones straddle several.&lt;/p&gt;
&lt;p&gt;When authoring skills, he advises skipping obvious instructions and focusing on where you need to nudge Claude away from its default habits—a &amp;ldquo;Gotchas&amp;rdquo; section built up from real failure modes is consistently the highest-leverage part. The frontmatter &lt;code&gt;description&lt;/code&gt; isn&amp;rsquo;t a human summary; it tells the model &lt;em&gt;when&lt;/em&gt; to trigger the skill. Skills can persist per-user settings in &lt;code&gt;config.json&lt;/code&gt; (prompting via &lt;code&gt;AskUserQuestion&lt;/code&gt; when missing), keep lightweight &amp;ldquo;memory&amp;rdquo; in append-only logs or JSON files inside a stable data directory, and ship helper scripts so Claude spends turns composing tools rather than regenerating boilerplate. Finally, skills can reference one another by name, and the team tracks skill invocations via a &lt;code&gt;PreToolUse&lt;/code&gt; hook to spot popular skills and prune dead ones.&lt;/p&gt;
&lt;h2 id="the-future-of-software-engineering-with-anthropic"&gt;&lt;a href="https://www.akashbajwa.co/p/the-future-of-software-engineering" rel="noopener noreferrer"&gt;The Future Of Software Engineering with Anthropic&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Akash Bajwa summarizes a roundtable with Anthropic&amp;rsquo;s Ash Prabaker and engineering leaders from Stripe, NVIDIA, Microsoft, Google DeepMind, xAI, Apple, Scale AI, and OpenAI on how AI is reshaping software development. Claude Code started in late 2024 as a humble CLI built not for the models of the day, but for where model capabilities would be six to twelve months later—and spread organically through bottom-up utility rather than top-down mandates. A recurring theme is the recursive improvement loop: better coding tools help build better models, which in turn improve the tools; several companies already run pipelines that autonomously triage production bugs, cross-check against eval suites, and open fix PRs with minimal human intervention.&lt;/p&gt;
&lt;p&gt;Across engineering workflows, test-first development has become the default, human code review increasingly feels more like a bottleneck than a safety net, and inline code comments are making a comeback because future agent sessions rely on them. Human-written architectural context remains invaluable, whereas stale or auto-generated documentation actively misleads agents. In hiring, several leaders now prize engineers who experiment relentlessly at the frontier of tool capabilities over raw hand-coding speed. Open challenges include multi-hour autonomous agent runs that still preserve meaningful human oversight, large-scale context management, and the paradox that when AI makes building almost anything feasible, ruthless prioritization becomes harder than ever.&lt;/p&gt;
&lt;h2 id="rob-pike"&gt;&lt;a href="https://www.cs.unc.edu/~stotts/COMP590-059-f24/robsrules.html" rel="noopener noreferrer"&gt;Rob Pike&amp;rsquo;s 5 Rules of Programming&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Rob Pike, co-creator of Go and veteran of Bell Labs, distilled five pithy rules of programming included here in the course readings for COMP590 at UNC. Rules 1 and 2 address optimization: you cannot tell in advance where a program will spend its time because bottlenecks show up in surprising places, so don&amp;rsquo;t put in speed hacks until you&amp;rsquo;ve measured and proven that one part of the code overwhelms the rest. Together, they restate Tony Hoare&amp;rsquo;s famous maxim that &amp;ldquo;premature optimization is the root of all evil.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Rules 3 and 4 warn that fancy algorithms have big constant factors that make them slow when &lt;code&gt;n&lt;/code&gt; is small—and &lt;code&gt;n&lt;/code&gt; is usually small—and they are much buggier and harder to implement, so stick to simple algorithms and simple data structures; as Ken Thompson put it, &amp;ldquo;when in doubt, use brute force.&amp;rdquo; Rule 5 is the heart of the list: data dominates. Once you&amp;rsquo;ve chosen the right data structures and organized things well, the algorithms will almost always be self-evident; data structures, not algorithms, are central to programming.&lt;/p&gt;
&lt;h2 id="introduction-to-postgresql-indexes"&gt;&lt;a href="https://dlt.github.io/blog/posts/introduction-to-postgresql-indexes/" rel="noopener noreferrer"&gt;Introduction to PostgreSQL Indexes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dalto Curvelano explains the internals of PostgreSQL indexes for developers who have an intuitive grasp of indexes but want to understand how they work under the hood. The article starts with how rows live inside 8KB heap pages and why indexes cut down page reads: in a benchmark on a million-row table, a sequential scan takes ~265ms while an index lookup takes just 0.077ms. As a rule of thumb, an index only pays off when a query returns less than roughly 15–20% of the table; beyond that, the query planner usually prefers a sequential scan. Nor are indexes free: they consume disk space, slow down &lt;code&gt;INSERT&lt;/code&gt;/&lt;code&gt;UPDATE&lt;/code&gt;/&lt;code&gt;DELETE&lt;/code&gt; operations, occupy buffer cache memory, and give the query planner more paths to evaluate, so they shouldn&amp;rsquo;t be sprinkled everywhere.&lt;/p&gt;
&lt;p&gt;Most of the guide surveys PostgreSQL&amp;rsquo;s index types. B-Tree is the versatile default; starting in PostgreSQL 18, B-Tree skip scan allows composite indexes to be used even when a query omits the leading column. Hash indexes only support equality checks, but are more compact than B-Trees on wide values like UUIDs or URLs; BRIN indexes are tiny and shine on append-only, naturally ordered time-series tables; GIN handles full-text search, arrays, and &lt;code&gt;JSONB&lt;/code&gt;; and GiST/SP-GiST cover geometric and range data. The post also walks through partial indexes (indexing only a filtered subset of rows), covering indexes with &lt;code&gt;INCLUDE&lt;/code&gt; (enabling index-only scans when the visibility map allows skipping heap fetches), and expression indexes over computed values.&lt;/p&gt;
&lt;h2 id="using-rust-and-postgres-for-everything-patterns-learned-over-the-years"&gt;&lt;a href="https://kerkour.com/rust-postgres-everything" rel="noopener noreferrer"&gt;Using Rust and Postgres for everything: patterns learned over the years&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sylvain Kerkour shares the architectural patterns he has refined from running Rust and PostgreSQL as the backbone for nearly every backend project—guided by a philosophy of picking boring, dependable tools to minimize operational cost and complexity. He opens with a real-world rewrite of a data-processing service from Go to Rust paired with a high-performance memory allocator: batch processing time dropped from roughly 30 minutes to under 5 minutes, RAM usage fell from 4GB to 512MB, and nil-pointer panics disappeared entirely.&lt;/p&gt;
&lt;p&gt;On the application side, he favors &lt;code&gt;sqlx&lt;/code&gt; over heavy ORMs for its simplicity, performance, and compile-time SQL verification macros, and batches writes in chunks of up to 10,000 rows using &lt;code&gt;UNNEST&lt;/code&gt; to avoid overwhelming the database. Even better, PostgreSQL replaces a sprawl of auxiliary infrastructure: &lt;code&gt;pg_try_advisory_lock()&lt;/code&gt; handles leader election (for instance, coordinating distributed CRON schedulers) without ZooKeeper or Redis; &lt;code&gt;UNLOGGED&lt;/code&gt; tables replace Redis for ephemeral caches by skipping the WAL for much faster writes at the cost of crash durability; and PostgreSQL serves as a rock-solid job queue when combining UUIDv7 primary keys (to avoid B-tree index fragmentation) with &lt;code&gt;FOR UPDATE SKIP LOCKED&lt;/code&gt; for worker polling.&lt;/p&gt;
&lt;h2 id="air-traffic-control-the-ibm-9020"&gt;&lt;a href="https://computer.rip/2026-01-17-air-traffic-control-9020.html" rel="noopener noreferrer"&gt;air traffic control: the IBM 9020&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;J. B. Crawford tells the story of the IBM 9020—the custom multiprocessor mainframe built for the US Federal Aviation Administration (FAA) to automate en-route air traffic control, with the first full system installed in 1967. Earlier, the military&amp;rsquo;s SAGE air-defense computer had been considered for civilian traffic control, but it couldn&amp;rsquo;t verify whether assigned altitudes were unique or detect loss of safe separation between aircraft at a time when mid-air collisions were an urgent political crisis.&lt;/p&gt;
&lt;p&gt;Under the hood, an IBM 9020 tied together six or seven modified System/360 compute elements sharing memory through dedicated Storage Elements, orchestrated by a real-time control program managing hundreds of radar and display peripherals. Its standout engineering achievement was fault tolerance: when a hardware fault occurred, the Operational Error Analysis Program (OEAP) automatically diagnosed the failure, ignored transient glitches, or rewrote configuration registers on the fly to isolate a failed compute or storage element so air traffic control could continue uninterrupted. The 9020 stayed in service into the mid-1980s—with display subsystems lasting into the 1990s—proving that commercial-grade computer architectures could handle life-critical workloads when paired with disciplined redundancy and fault-recovery software.&lt;/p&gt;
&lt;h2 id="sfq-simple-stateless-stochastic-fairness"&gt;&lt;a href="https://brooker.co.za/blog/2026/02/25/sfq.html" rel="noopener noreferrer"&gt;SFQ: Simple, Stateless, Stochastic Fairness&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Marc Brooker highlights Stochastic Fairness Queuing (SFQ), an algorithm from a 1990 paper by Paul McKenney and one of his favorite compact building blocks for distributed systems. Classic fair queuing maintains a separate queue per tenant, requiring O(tenants) queues and matching scheduling overhead—impractical at cloud scale. SFQ instead allocates a fixed O(1) array of queues and hashes each tenant ID to a queue. Because two tenants that hash to the same bucket would stay stuck together if one is a &amp;ldquo;noisy neighbor,&amp;rdquo; SFQ periodically rotates the hash seed so tenants that collide in one epoch are overwhelmingly unlikely to collide in the next.&lt;/p&gt;
&lt;p&gt;Brooker then describes a modern variant combining SFQ with shuffle sharding and the power of two choices: each tenant is hashed to a small subset of queues (often just two), each incoming request is placed into whichever of those queues is shorter, and the hash seed rotates periodically. The result keeps queue count, enqueue cost, and dequeue cost at O(1) while strongly isolating noisy neighbors from well-behaved tenants—as long as noisy tenants are a small fraction of the population. The pattern works both inside a single multi-tenant server and across a fleet of backend workers.&lt;/p&gt;
&lt;h2 id="how-many-branches-can-your-cpu-predict"&gt;&lt;a href="https://lemire.me/blog/2026/03/18/how-many-branches-can-your-cpu-predict/" rel="noopener noreferrer"&gt;How many branches can your CPU predict?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Daniel Lemire measures how many conditional branches a modern CPU&amp;rsquo;s branch predictor can &amp;ldquo;memorize.&amp;rdquo; His benchmark loops over an array of random integers and conditionally writes to a buffer only when a value is odd—so on fresh random data, the CPU mispredicts roughly 50% of the time. However, if you repeatedly loop over the &lt;em&gt;exact same&lt;/em&gt; random sequence, the branch predictor learns the pattern; increasing the sequence length reveals the capacity threshold where the predictor overflows and performance drops back to random guessing. The results: AMD Zen 5 perfectly predicts sequences of roughly 30,000 branches, Apple&amp;rsquo;s M4 handles around 10,000, and Intel&amp;rsquo;s Emerald Rapids manages only about 5,000—six times fewer than Zen 5.&lt;/p&gt;
&lt;p&gt;The practical lesson is a warning for microbenchmarking: if your test input is small enough to fit inside the CPU&amp;rsquo;s branch history tables, the processor will memorize the exact branch pattern and report numbers far faster than what you will ever see on real production traffic. Reliable benchmarks require input datasets large and varied enough to defeat branch memorization.&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://substackcdn.com/image/fetch/$s_!tS1T!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F958d36d9-6b19-4949-b6a6-6aa614ede834_2508x2960.jpeg" alt="Different Types of Tests"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!c4WE!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd86cd367-494f-4031-9793-f27e6142e54b_2508x3000.png" alt="How Single Sign-On (SSO) Works"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!em-f!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7e7e23e9-2a5a-4b06-a3fa-ccb6c5493f1d_2508x3000.png" alt="How LLMs Use AI Agents with Deep Research"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!kRPi!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d3b2bb9-fc09-48d9-89b7-52bc37098af9_2360x2960.png" alt="How hackers steal passwords"&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 #83</title><link>https://miti99.com/en/post/2026/02/24/</link><pubDate>Tue, 24 Feb 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/02/24/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #83.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-uber-scaled-data-replication-to-move-petabytes-every-day"&gt;&lt;a href="https://www.uber.com/en-IN/blog/scaled-data-replication/" rel="noopener noreferrer"&gt;How Uber Scaled Data Replication to Move Petabytes Every Day&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Uber shares how its engineering team scaled HiveSync—its cross-region data replication service built on Apache Hadoop DistCp—to keep pace with a data lake exceeding 350 PB. In Q3 2022 alone, daily replicated data volume jumped from 250 TB to 1 PB, the number of datasets managed by HiveSync grew from 30,000 to 144,000, and daily replication jobs surged from 10,000 to 374,000. This growth was driven by an active-passive architecture that concentrated ~90% of writes in the primary region, onboarding all Hive datasets into HiveSync, and an upcoming cloud migration. Under that load, replication latency SLAs (P100 under 4 hours, P99.9 under 20 minutes) were slipping.&lt;/p&gt;
&lt;p&gt;To fix this, Uber made four targeted improvements to DistCp. First, they offloaded two resource-intensive phases—Copy Listing and Input Splitting—from the central HiveSync server to the YARN Application Master, cutting job submission latency by 90%. Second, they parallelized Copy Listing across a thread pool making concurrent &lt;code&gt;namenode&lt;/code&gt; RPCs, reducing p99 latency by 60% and max latency by 75%. Third, they parallelized file concatenation inside the Copy Committer, slashing merge time by 97.29%. Finally, they enabled &amp;ldquo;Uber jobs&amp;rdquo; to run single-mapper replication tasks (which accounted for 52% of all jobs) directly inside the Application Master JVM, eliminating roughly 268,000 YARN container launches per day. Together, these optimizations increased incremental replication throughput 5x within a year and enabled Uber to migrate over 306 PB of data to the cloud.&lt;/p&gt;
&lt;h2 id="how-to-write-a-good-spec-for-ai-agents"&gt;&lt;a href="https://addyosmani.com/blog/good-spec/" rel="noopener noreferrer"&gt;How to write a good spec for AI agents&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Addy Osmani lays out a practical framework for writing specifications for AI coding agents, addressing a classic tension: a spec needs enough detail to steer the agent accurately without bloating the prompt and overwhelming the context window. Principle one is to start with a high-level vision—provide a concise objective and let the agent expand it into a detailed plan that you review and refine. Principle two is to structure the spec like a Product Requirements Document (PRD) covering six essential areas: executable commands, testing conventions, project structure, code style examples, Git workflow, and explicit boundaries. An analysis by GitHub of over 2,500 agent configuration files found that vague, high-level instructions were the single most common failure mode.&lt;/p&gt;
&lt;p&gt;Principle three is to break work into modular prompts or sub-agent tasks rather than one massive monolith, since the &amp;ldquo;curse of instructions&amp;rdquo; causes model adherence to drop sharply when too many rules compete at once. Principle four is building in quality gates: a three-tier boundary system (&amp;ldquo;Always do,&amp;rdquo; &amp;ldquo;Ask first,&amp;rdquo; and &amp;ldquo;Never do&amp;rdquo;) paired with self-verification hooks. Finally, treat the spec as a living document that gets tested and updated as the codebase evolves. The article also warns against common pitfalls like vague prompts (&amp;ldquo;build something cool&amp;rdquo;), dumping raw context without summarization, skipping human code review, and moving faster than your ability to verify.&lt;/p&gt;
&lt;h2 id="unconventional-postgresql-optimizations"&gt;&lt;a href="https://hakibenita.com/postgresql-unconventional-optimizations" rel="noopener noreferrer"&gt;Unconventional PostgreSQL Optimizations&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Haki Benita walks through three unconventional PostgreSQL optimization techniques. First is enabling &lt;code&gt;constraint_exclusion = on&lt;/code&gt; so the query planner uses table &lt;code&gt;CHECK&lt;/code&gt; constraints to skip full table scans altogether. When a user accidentally queries a value that violates a check constraint—for example, &lt;code&gt;WHERE plan = 'Pro'&lt;/code&gt; when the constraint only allows lowercase &lt;code&gt;'free'&lt;/code&gt; or &lt;code&gt;'pro'&lt;/code&gt;—PostgreSQL&amp;rsquo;s default &lt;code&gt;partition&lt;/code&gt; setting still scans the entire table (taking ~7.4 ms in the benchmark), whereas turning &lt;code&gt;constraint_exclusion&lt;/code&gt; on lets the planner prove the query cannot match any rows and return instantaneously. Because checking constraints adds planning overhead, PostgreSQL defaults to only checking them on inherited partitions and &lt;code&gt;UNION ALL&lt;/code&gt; queries, making &lt;code&gt;on&lt;/code&gt; best suited for analytics or reporting databases where users write ad-hoc queries.&lt;/p&gt;
&lt;p&gt;The second technique is indexing a lower-cardinality expression: instead of building a B-Tree index on a raw &lt;code&gt;timestamptz&lt;/code&gt; column (214 MB), indexing the truncated date via &lt;code&gt;date_trunc('day', ...)&lt;/code&gt; shrinks the index to 66 MB—over 3x smaller—and speeds up queries through page-level deduplication. Because expression indexes only kick in when queries write the exact same expression, he suggests pairing them with PostgreSQL 18&amp;rsquo;s virtual generated columns for ergonomics. The third technique enforces uniqueness on large text values like URLs using a hash index: PostgreSQL doesn&amp;rsquo;t support &lt;code&gt;UNIQUE&lt;/code&gt; hash indexes directly, but you can create an &lt;code&gt;EXCLUDE USING hash (url WITH =)&lt;/code&gt; exclusion constraint, shrinking the index from 154 MB (B-Tree) down to 32 MB—nearly 5x smaller. The trade-offs are that exclusion constraints cannot be referenced by foreign keys and do not support &lt;code&gt;ON CONFLICT (url) DO UPDATE&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="software-engineering-when-machine-writes-the-code"&gt;&lt;a href="https://www.shayon.dev/post/2026/19/software-engineering-when-the-machine-writes-code/" rel="noopener noreferrer"&gt;Software engineering when machine writes the code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Shayon Mukherjee reflects on what happens to software engineering when machines write the bulk of the code. He isn&amp;rsquo;t anti-AI, but worries that in chasing raw velocity we are trading away deep system comprehension. By Jevons paradox, making a resource more efficient increases total consumption; similarly, AI won&amp;rsquo;t lead us to write less software—it will lead us to build sprawling, complex systems faster than humans can mentally absorb them. He contrasts writing code by hand—where you build a rich mental model through hundreds of micro-decisions—with reviewing AI-generated PRs, where you try to reconstruct understanding after the fact. Accepting working code without truly understanding why it works creates dangerous blind spots during 3 a.m. incidents and long-term maintenance.&lt;/p&gt;
&lt;p&gt;He is especially concerned for junior engineers: if they skip the formative struggle of implementing things from scratch, making mistakes, and debugging for hours, they may never develop the pattern recognition and architectural intuition that only come from friction. His suggested remedy is using AI as a Socratic tutor to explain concepts and trade-offs while still writing the implementation yourself. He also proposes a zoned approach to codebases: core domain logic demands deep human ownership with minimal AI generation, standard application code can lean on AI with thorough review, and pure boilerplate can be delegated almost entirely to AI.&lt;/p&gt;
&lt;h2 id="a-guide-to-effective-prompt-engineering"&gt;&lt;a href="https://blog.bytebytego.com/p/a-guide-to-effective-prompt-engineering" rel="noopener noreferrer"&gt;A Guide to Effective Prompt Engineering&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;ByteByteGo presents a practical guide to prompt engineering—crafting instructions that reliably elicit the right output from large language models. Anyone can type a prompt, but getting consistent, high-quality results is a distinct engineering skill. A well-structured prompt typically combines four elements: task description, background context, illustrative examples, and specific output constraints. Modern LLM APIs also split instructions into a system prompt (defining role, tone, and guardrails) and a user prompt (the actual task). Clarity is paramount: state exactly what you want, define the output format explicitly, and never assume the model can read your mind; supplying sufficient context also dramatically reduces hallucinations. The post notes how models use in-context learning from examples in the prompt, and points out the &amp;ldquo;lost in the middle&amp;rdquo; effect where models pay closer attention to instructions at the very beginning and end of a long prompt.&lt;/p&gt;
&lt;p&gt;Five core prompting techniques are covered: zero-shot prompting (direct instructions with no examples, suited for simple tasks); few-shot prompting (providing two to five input–output examples to demonstrate the exact pattern and format); chain-of-thought prompting (asking the model to reason step by step before answering complex logic or math problems); role prompting (assigning a persona to anchor perspective and depth); and prompt chaining (breaking a complex workflow into a sequence of focused prompts). On best practices, iterate systematically, version-control your prompts, and test against diverse inputs and edge cases while avoiding vague phrasing, bloated walls of text, and unspecified output formats.&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 #66</title><link>https://miti99.com/en/post/2025/12/09/</link><pubDate>Tue, 09 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/09/</guid><description>&lt;p&gt;&lt;em&gt;&lt;del&gt;I&amp;rsquo;ve used iFlow&amp;rsquo;s free API quite a lot already, so today I&amp;rsquo;m trying out iFlow&amp;rsquo;s CLI—&lt;a href="https://github.com/iflow-ai/iflow-cli" rel="noopener noreferrer"&gt;iFlow CLI&lt;/a&gt;—to see how it goes, using the GLM-4.6 model.&lt;/del&gt; Enjoy Newsletter #66.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-ultimate-list-of-best-software-architecture-books-2026"&gt;&lt;a href="https://www.workingsoftware.dev/the-ultimate-list-of-software-architecture-books/?&amp;amp;aid=recmw058VtqAJCyyK" rel="noopener noreferrer"&gt;The Ultimate List of Best Software Architecture Books (2026)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Software architecture is the foundation that determines a product&amp;rsquo;s quality: good design reduces bug risk and makes adding features later far easier. Patrick Roos curates a reading list of software architecture books for 2026, spanning classics like Richards and Ford&amp;rsquo;s &lt;em&gt;Fundamentals of Software Architecture&lt;/em&gt;, &lt;em&gt;Software Architecture in Practice&lt;/em&gt; (4th edition), &lt;em&gt;Designing Data-Intensive Applications&lt;/em&gt;, and &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;, as well as modern practical guides like &lt;em&gt;Software Architecture: The Hard Parts&lt;/em&gt; on distributed-systems trade-offs and &lt;em&gt;Building Multi-Tenant SaaS Architectures&lt;/em&gt; for cloud platforms.&lt;/p&gt;
&lt;p&gt;The list also emphasizes the human and organizational side of architecture: Susanne Kaiser&amp;rsquo;s &lt;em&gt;Architecture for Flow&lt;/em&gt; combines Wardley Mapping, Domain-Driven Design, and Team Topologies to align business strategy with architecture; Gregor Hohpe&amp;rsquo;s &lt;em&gt;The Software Architect Elevator&lt;/em&gt; helps architects bridge the gap between engineering and the business; &lt;em&gt;Collaborative Software Design&lt;/em&gt; shows how to involve stakeholders in the design process; and &lt;em&gt;Facilitating Software Architecture&lt;/em&gt; and &lt;em&gt;Reviewing Software Systems&lt;/em&gt; (introducing the lightweight LASR architecture review method) help architects and developers collaborate more effectively. The list also highlights two new/upcoming titles for late 2025–2026: Lilienthal and Schwentner&amp;rsquo;s &lt;em&gt;Domain-Driven Transformation&lt;/em&gt;, offering a roadmap for modernizing legacy systems, and Simon Brown&amp;rsquo;s &lt;em&gt;The C4 Model&lt;/em&gt; on communicating software architecture through structured diagrams.&lt;/p&gt;
&lt;h2 id="how-i-use-ai-oct-2025"&gt;&lt;a href="https://ben.stolovitz.com/posts/how_use_ai_oct_2025/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;How I use AI (Oct 2025)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ben Stolovitz shares how he uses AI—primarily large language models (LLMs)—in his daily work as of October 2025. Coding is where AI has made the biggest difference: he calls GitHub Copilot&amp;rsquo;s autocomplete &amp;ldquo;magical&amp;rdquo; for finishing boilerplate and discovering idiomatic patterns in unfamiliar languages, even if it struggles with complex algorithms. Agent mode is increasingly helpful for larger changes, though it still requires solid tests, clear documentation, and human oversight. For search and research, AI excels at tracking down tip-of-the-tongue articles or explaining general concepts, but falls short when shopping for products or finding academic papers, and remains prone to hallucinating citations or sycophantically validating whatever assumption the user feeds it.&lt;/p&gt;
&lt;p&gt;Summarization and transcription are standout strengths: AI can condense hundreds of pages of documentation or an entire meeting recording in minutes. Conversely, Stolovitz refuses to let AI write for him because he views his blog as personal self-expression; he uses AI only as a tough copy editor to suggest better phrasing, then rewrites the text in his own voice. He is most skeptical of AI-generated visual art and music, finding them lacking in creative depth and genuine human connection.&lt;/p&gt;
&lt;h2 id="stop-vibe-coding-your-unit-tests"&gt;&lt;a href="https://www.andy-gallagher.com/blog/stop-vibe-coding-your-unit-tests/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;Stop Vibe Coding Your Unit Tests&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Andy Gallagher warns against handing unit test writing over to LLMs on autopilot. Left to their own devices, LLMs tend to generate far too many tests that merely assert what the code currently does rather than verifying what the code &lt;em&gt;should&lt;/em&gt; do. Given a simple React button component, for instance, Claude Sonnet 4 generated roughly 30 tests spanning ~200 lines, mostly testing trivialities like default rendering, prop passthrough, or HTML attributes that React and the browser already guarantee. Such tests lock the codebase to its current implementation so every refactor breaks a pile of tests, while polluting the agent&amp;rsquo;s context window, degrading semantic code search, and turning pull requests into a slog for teammates to review.&lt;/p&gt;
&lt;p&gt;Gallagher&amp;rsquo;s remedy is intentional, test-by-test authoring: explicitly specify which behavior you want to test, carefully review what the AI generates, and keep test files lean and focused. LLMs still do well on self-contained, algorithmic code, but for everyday product code, what actually needs testing is whether the team is building the right thing. The core principle: fewer, higher-quality tests beat bloated test suites every time.&lt;/p&gt;
&lt;h2 id="game-design-is-simple-actually"&gt;&lt;a href="https://www.raphkoster.com/2025/11/03/game-design-is-simple-actually/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;Game design is simple, actually&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Raph Koster outlines a systematic 12-step framework for understanding game design. At their core, games are about mastering problems: fun comes from making progress in our ability to predict outcomes, not from surface-level flash. A toy is a system with constraints; add a goal and it becomes a game, centered on a core mechanic—a &amp;ldquo;problem object&amp;rdquo; to be solved. Players interact through loops: an operational loop (act, receive feedback, learn) and a progression loop where situations continually escalate and shift so old strategies stop working. Good feedback must tell players what they can do, what they just did, what happened as a result, and whether they are getting closer to their goal, while difficulty must match their learning curve.&lt;/p&gt;
&lt;p&gt;At the macro level, a game is assembled from smaller sub-games whose loops interlock to form economies and value chains. How a problem is dressed up—through narrative, visuals, audio, and metaphor—strongly shapes the player&amp;rsquo;s experience, making game design a synthetic art form that demands both systems design and experience design. Player motivations vary widely too, which is why no single game appeals to everyone. The individual principles sound simple, but executing all 12 well at the same time is the real challenge.&lt;/p&gt;
&lt;h2 id="architectural-debt-is-not-just-technical-debt"&gt;&lt;a href="https://frederickvanbrabant.com/blog/2025-10-31-architectural-debt-is-not-just-technical-debt/?&amp;amp;aid=recufcl24hU9MXCJC" rel="noopener noreferrer"&gt;Architectural debt is not just technical debt&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Frederick Van Brabant distinguishes architectural debt from technical debt. While technical debt usually refers to localized shortcuts inside a codebase, architectural debt consists of structural decisions with long-term consequences that reach far beyond code. He breaks architectural debt down across three layers. At the application and infrastructure layer, enterprise architects should focus on integration patterns, overlapping systems, and vendor lock-in, because debt here inflates costs and slows delivery. The business layer involves ownership, governance responsibilities, and outdated processes—where inaccurate documentation can create serious trouble during audits. The strategic layer is the most dangerous: poorly defined capabilities or half-baked framework rollouts plant flawed assumptions across the organization for the next three to five years.&lt;/p&gt;
&lt;p&gt;Enterprise architects have the vantage point and time horizon to spot this kind of debt, but merely raising the alarm isn&amp;rsquo;t enough: they need to build a compelling business case laying out the current state, target state, and business upside backed by concrete numbers to win leadership buy-in. Van Brabant also advises picking your battles wisely: it&amp;rsquo;s fine to tolerate more debt in experimental innovation systems than in systems of record, provided you clean it up once the experiment concludes and secure real resources to pay the debt down.&lt;/p&gt;
&lt;h2 id="the-search-problem-why-your-computer-finds-things-faster-than-you-do"&gt;&lt;a href="https://deyaa1251.github.io/deyaa1251/posts/b_tree/?utm_source=bonobopress&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=2155" rel="noopener noreferrer"&gt;The Search Problem: Why Your Computer Finds Things Faster Than You Do&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article explains why B-trees are so foundational in modern storage systems. The author recounts implementing a binary search tree (BST) from scratch and watching it fall apart once simulated disk reads and writes were introduced. A BST&amp;rsquo;s lookup cost scales with its height: O(log n) when balanced, but degrading to O(n) when unbalanced. Under a model where each node visit costs one disk read, searching across 100,000 files takes roughly 17 disk reads with a balanced BST, whereas a B-tree needs only 3. That&amp;rsquo;s because a B-tree packs many keys into each node (&amp;ldquo;fat nodes&amp;rdquo;) sized to fit a single 4KB disk block, keeping the tree extremely shallow. In the author&amp;rsquo;s simulation, inserting 100,000 sequential items caused the BST to degenerate into a 40,000-level linked list that took roughly 23.5 minutes, while the B-tree stayed 3 levels tall and finished in 3 seconds.&lt;/p&gt;
&lt;p&gt;Because they guarantee predictable worst-case performance regardless of insertion order, B-trees and their variants power indexes in MySQL, PostgreSQL, MongoDB, and countless filesystems. The broader lesson extends beyond data structures: hardware context dictates optimal design. B-trees trade away theoretical best-case simplicity in exchange for rock-solid worst-case guarantees—which is what matters in production systems.&lt;/p&gt;
&lt;h2 id="kafka-is-fast"&gt;&lt;a href="https://topicpartition.io/blog/postgres-pubsub-queue-benchmarks?utm_source=bonobopress&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=2155" rel="noopener noreferrer"&gt;Kafka is fast &amp;ndash; I&amp;rsquo;ll use Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post benchmarks PostgreSQL as a pub/sub and job queue system in place of dedicated message brokers like Kafka. With 1 KiB messages in a pub/sub workload, a 4-vCPU instance in the author&amp;rsquo;s test setup achieved roughly 5,000 messages per second on writes (4.8 MiB/s) and 24.6 MiB/s on reads with a 5x fan-out, at a 60ms p99 latency. A three-node replicated cluster maintained the same throughput while increasing p99 latency to 186ms. Scaling up to a 96-vCPU instance reached 238 MiB/s on writes and 1.16 GiB/s on reads while using only about 10% CPU. In a work-queue pattern, the 4-vCPU machine handled roughly 2.81 MiB/s at a 17.7ms p99 latency, while the 96-vCPU machine reached 19.7 MiB/s.&lt;/p&gt;
&lt;p&gt;The author&amp;rsquo;s takeaway is simple: use Postgres until you genuinely outgrow it. For the vast majority of organizations operating below a few megabytes per second, Postgres covers 80% of use cases with 20% of the effort, whereas the operational overhead and organizational complexity of adopting a separate distributed broker usually outweigh its benefits at modest scale. That simplicity and reliability are exactly why the &amp;ldquo;Just Use Postgres&amp;rdquo; movement keeps gaining traction.&lt;/p&gt;
&lt;h2 id="you-need-to-become-a-full-stack-person"&gt;&lt;a href="https://den.dev/blog/full-stack-person/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;You Need To Become A Full Stack Person&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Den Delimarsky argues that in the AI era, everyone needs to become a &amp;ldquo;full-stack person.&amp;rdquo; As LLMs commoditize many narrow coding skills, combining creativity, critical thinking, and execution speed becomes the durable career moat. Boundaries between traditional roles are blurring, reflected in the rise of the product engineer who owns frontend, backend, and customer empathy end to end. In Delimarsky&amp;rsquo;s view, the T-shaped skill model (one deep specialty atop a broad base) is obsolete; replacing it is the Pi-shaped model with two deep pillars—product sense and technical craft—resting on broad interdisciplinary knowledge.&lt;/p&gt;
&lt;p&gt;The post highlights ten skills to cultivate: creativity and taste, critical thinking, communication, interdisciplinary breadth, AI leverage, product sense, execution speed, rapid learning, systems thinking, and agency. AI cannot replace taste or judgment; it is a vehicle for turning ideas into reality, lowering the cost of writing code without lowering the cost of deciding what is worth building. Typing code is no longer the bottleneck, and a high-agency &amp;ldquo;start doing, then figure it out&amp;rdquo; mindset is what sets people apart.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verdict&lt;/strong&gt;: &lt;em&gt;iFlow CLI did a pretty good job on the first few articles, though toward the end it started leaving too many English words untranslated. A nice plus is that iFlow CLI can fetch many URLs by bypassing blocks through a proxy (though it&amp;rsquo;s a Chinese proxy, which feels a bit sketchy). While running it I also saw a bunch of log lines in Chinese, which was confusing and slightly unnerving :v I&amp;rsquo;ll try to refine &lt;code&gt;AGENTS.md&lt;/code&gt; and test it again later.&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 #61</title><link>https://miti99.com/en/post/2025/11/25/</link><pubDate>Tue, 25 Nov 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/11/25/</guid><description>&lt;p&gt;&lt;em&gt;Been &amp;lsquo;offline&amp;rsquo; for quite a while, finally resurfacing today. Enjoy Newsletter #61.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="beyond-indexes-how-open-table-formats-optimize-query-performance"&gt;&lt;a href="https://jack-vanlightly.com/blog/2025/10/8/beyond-indexes-how-open-table-formats-optimize-query-performance/" rel="noopener noreferrer"&gt;Beyond Indexes: How Open Table Formats Optimize Query Performance&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jack Vanlightly, who previously worked on SQL Server performance tuning and now specializes in data systems, pushes back against the idea that open table formats (OTFs) like Apache Iceberg or Delta Lake should add secondary indexes like relational databases. In an OLTP RDBMS, B-tree clustered indexes and secondary indexes quickly locate one or a few rows in exchange for higher write overhead. Analytical queries are fundamentally different: they scan millions of rows of immutable, columnar data stored on object storage like S3, so chasing secondary-index pointers offers almost no benefit.&lt;/p&gt;
&lt;p&gt;Instead, OTFs speed up queries through data skipping: pruning entire irrelevant files before reading them. Data skipping relies on physical layout (partitioning, sorting, compaction), min/max statistics in manifests and data files, and file- or row-group-level Bloom filters where supported, alongside complementary tools like materialized views. The author sums it up as &amp;ldquo;layout is king&amp;rdquo;: performance comes from organizing data so partitions match filter predicates and similar values sit close together. Materialized views are the closest equivalent to a secondary index, and the path forward is letting query engines build their own optimizations on top of standard table specs rather than cramming complex index structures into the OTF specification itself.&lt;/p&gt;
&lt;h2 id="what"&gt;&lt;a href="https://den.dev/blog/github-spec-kit/" rel="noopener noreferrer"&gt;What&amp;rsquo;s The Deal With GitHub Spec Kit&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Den Delimarsky observes that while LLMs are useful for coding, their output varies wildly: for the same requirement, different prompts produce very different code. His proposed solution is Spec-Driven Development (SDD), where a specification clearly defines the &amp;ldquo;what&amp;rdquo; and &amp;ldquo;why&amp;rdquo; of a feature while deliberately leaving out technical implementation details. GitHub Spec Kit is an experimental open-source toolkit that puts this workflow into practice through a sequence of slash commands: &lt;code&gt;/constitution&lt;/code&gt; sets core principles, &lt;code&gt;/specify&lt;/code&gt; writes the spec, &lt;code&gt;/clarify&lt;/code&gt; resolves ambiguities, &lt;code&gt;/plan&lt;/code&gt; creates the technical plan, &lt;code&gt;/tasks&lt;/code&gt; breaks down the work, and &lt;code&gt;/analyze&lt;/code&gt; checks consistency before implementation.&lt;/p&gt;
&lt;p&gt;In the author&amp;rsquo;s view, an LLM is like an over-eager junior engineer who needs clear requirements and guidance. With SDD, the specification becomes an executable document while the source code becomes disposable—something that can be regenerated and verified on demand; decoupling the spec from a specific tech stack also makes it easy to compare multiple implementations. He illustrates this by building a tool that aggregates webcam images from Mauna Kea in under two hours, while stressing that specs are no silver bullet: humans still have to supervise and iterate continually. As models grow more capable, the bottleneck shifts to accurately communicating developer intent, and a solid spec is how you solve it.&lt;/p&gt;
&lt;h2 id="just-talk-to-it---the-no-bs-way-of-agentic-engineering"&gt;&lt;a href="https://steipete.me/posts/just-talk-to-it" rel="noopener noreferrer"&gt;Just Talk To It - the no-bs Way of Agentic Engineering&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Peter Steinberger shares his agentic engineering workflow for projects where nearly all the code is written by AI. His central message is &amp;ldquo;just talk to it&amp;rdquo;: instead of chasing elaborate frameworks, work directly with a capable model, use it enough to build intuition, and keep your workflow dead simple. He prefers &lt;code&gt;GPT-5-Codex&lt;/code&gt; over Claude Code because it uses context more efficiently, runs faster, supports message queueing, and reads more files before acting. His prompts are often just one or two sentences paired with a screenshot pointing out what needs fixing. A key concept is &amp;ldquo;blast radius&amp;rdquo;: estimating how many files a change will touch so you can slice work sensibly, run multiple agents in parallel across terminal panes, and commit in small increments.&lt;/p&gt;
&lt;p&gt;He favors CLIs over MCPs to avoid wasting context, writes tests right after each feature in the same session, and spends roughly 20% of his time having the agent refactor code. Conversely, RAG, subagents, &amp;ldquo;plan mode,&amp;rdquo; and convoluted agent instructions aren&amp;rsquo;t worth much in his experience. His toolkit consists of Codex CLI, Wispr Flow for voice input, &lt;code&gt;tmux&lt;/code&gt; for background tasks, and &lt;code&gt;ast-grep&lt;/code&gt; for code checks, backed by an ~800-line &lt;code&gt;Agents.md&lt;/code&gt; file. His takeaway: building great software is still hard, the required skillset resembles managing senior engineers, and the bar for architecture and user experience is higher than ever.&lt;/p&gt;
&lt;h2 id="jit-so-you-want-to-be-faster-than-an-interpreter-on-modern-cpus"&gt;&lt;a href="https://www.pinaraf.info/2025/10/jit-so-you-want-to-be-faster-than-an-interpreter-on-modern-cpus/" rel="noopener noreferrer"&gt;JIT: so you want to be faster than an interpreter on modern CPUs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Pinaraf, who is developing a JIT compiler for PostgreSQL, explains why a JIT isn&amp;rsquo;t automatically faster than an interpreter on modern CPUs. Today&amp;rsquo;s CPUs are superscalar, out-of-order machines with sophisticated branch predictors capable of executing multiple instructions in parallel and hiding latency remarkably well. Traditional interpreters use a &lt;code&gt;switch&lt;/code&gt; statement to dispatch opcodes, creating hard-to-predict branches; PostgreSQL replaces this with computed gotos that jump directly to each opcode handler, allowing the CPU to predict branches much more accurately. As a result, a well-written interpreter is surprisingly competitive with compiled code.&lt;/p&gt;
&lt;p&gt;The author analyzes the query &lt;code&gt;SELECT a FROM table WHERE a = 42&lt;/code&gt; over a 10-million-row table, which compiles into an opcode sequence of &lt;code&gt;SCAN_FETCHSOME&lt;/code&gt;, &lt;code&gt;SCAN_VAR&lt;/code&gt;, &lt;code&gt;FUNCEXPR_STRICT_2&lt;/code&gt; (null checks followed by &lt;code&gt;int4eq&lt;/code&gt;), &lt;code&gt;QUAL&lt;/code&gt;, and &lt;code&gt;DONE_RETURN&lt;/code&gt;. Removing redundant null checks on constants yields a 7.9% speedup, dropping all null checks gives 9.5%, inlining &lt;code&gt;int4eq&lt;/code&gt; reaches 10.3%, and his experimental JIT achieves 23%—cutting instructions by 11%, cycles by 20%, and branches by 13%. Notably, those first optimizations apply just as well to the interpreter as to the JIT, narrowing the JIT&amp;rsquo;s traditional edge; truly beating the interpreter requires deeper optimizations that the author promises to cover in follow-up posts.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;For this post I used CCR with the &lt;code&gt;x-ai/grok-4.1-fast:free&lt;/code&gt; model. It doesn&amp;rsquo;t seem great yet—a lot of rough untranslated English remained. I&amp;rsquo;ll try to improve it further.&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 #49</title><link>https://miti99.com/en/post/2025/08/08/</link><pubDate>Fri, 08 Aug 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/08/08/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #49.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="postgresql-at-scale-database-schema-changes-without-downtime"&gt;&lt;a href="https://medium.com/paypal-tech/postgresql-at-scale-database-schema-changes-without-downtime-20d3749ed680" rel="noopener noreferrer"&gt;PostgreSQL at Scale: Database Schema Changes Without Downtime&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;James Coleman&amp;rsquo;s article on the PayPal Engineering blog (originating from the Braintree Payments team) distills lessons from running PostgreSQL schema migrations on a payment system where scheduled downtime is not an option. The foundational rule is that application code and database schemas must be both forward- and backward-compatible so deployments can roll out gradually and roll back safely; any exclusive lock on a table or index may be held for at most about 2 seconds. The team never wraps multiple DDL statements in a single transaction to avoid deadlocks, nor do they define schema rollback operations: dropping a newly added column can lose data, and re-adding a constraint can fail, so when something goes wrong they write a new migration and &amp;ldquo;roll forward&amp;rdquo; instead of rolling back.&lt;/p&gt;
&lt;p&gt;Most of the article walks through specific operations. Rather than letting PostgreSQL acquire locks blindly, they explicitly acquire locks with a &lt;code&gt;lock_timeout&lt;/code&gt;, check &lt;code&gt;pg_locks&lt;/code&gt; beforehand to avoid queuing behind long-running queries, and sleep between retries so blocked queries can drain. Indexes are created and dropped with &lt;code&gt;CREATE INDEX CONCURRENTLY&lt;/code&gt; and &lt;code&gt;DROP INDEX CONCURRENTLY&lt;/code&gt;; foreign keys and &lt;code&gt;CHECK&lt;/code&gt; constraints are added as &lt;code&gt;NOT VALID&lt;/code&gt; and validated separately with &lt;code&gt;VALIDATE CONSTRAINT&lt;/code&gt; to avoid scanning the entire table under a heavy lock; to enforce non-null values, they use &lt;code&gt;CHECK (column IS NOT NULL)&lt;/code&gt; instead of directly adding &lt;code&gt;NOT NULL&lt;/code&gt;; and adding a column with a default value required multiple steps prior to PostgreSQL 11. At the end, the team introduces their open-source Ruby on Rails gem &lt;code&gt;pg_ha_migrations&lt;/code&gt;, which codifies these rules.&lt;/p&gt;
&lt;h2 id="the-big-llm-architecture-comparison-from-deepseek-v3-to-kimi-k2"&gt;&lt;a href="https://magazine.sebastianraschka.com/p/the-big-llm-architecture-comparison" rel="noopener noreferrer"&gt;The Big LLM Architecture Comparison: From DeepSeek-V3 to Kimi K2&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Researcher Sebastian Raschka places prominent open-weight large language models side by side to answer a key question: years after the original GPT, how much has the underlying architecture actually changed? The answer is that the Transformer backbone remains largely the same; the differences lie in targeted refinements. DeepSeek V3/R1 uses Multi-Head Latent Attention (MLA) to compress the KV cache and Mixture-of-Experts (MoE) with 256 routed experts plus one shared expert, activating 8 selected experts alongside the shared expert per token—so out of 671 billion total parameters, only about 37 billion are active during inference. OLMo 2 places RMSNorm in a Post-Norm arrangement and adds QK-Norm for training stability; Gemma 3 uses sliding window attention to shrink KV cache memory; Mistral Small 3.1 optimizes for inference speed; Llama 4 interleaves MoE blocks with dense blocks; Qwen3 offers both dense and MoE variants; SmolLM3 drops positional encoding on every fourth layer (NoPE); and Kimi K2, at roughly 1 trillion parameters, builds on the DeepSeek V3 architecture while scaling up the number of experts and reducing the number of attention heads in MLA.&lt;/p&gt;
&lt;p&gt;The broader trend is clear: MoE is increasingly standard for scaling capacity while keeping inference costs low, more efficient attention variants like Grouped-Query Attention, MLA, and sliding window attention are replacing classic Multi-Head Attention, and teams prioritize performance optimization over inventing radically new architectures. The article explains why equal parameter counts do not translate to equal operating costs.&lt;/p&gt;
&lt;h2 id="from-asyncawait-to-virtual-threads"&gt;&lt;a href="https://lucumr.pocoo.org/2025/7/26/virtual-threads/" rel="noopener noreferrer"&gt;From Async/Await to Virtual Threads&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Armin Ronacher, creator of Flask and Jinja, argues that Python&amp;rsquo;s &lt;code&gt;async&lt;/code&gt;/&lt;code&gt;await&lt;/code&gt; model pushes too much internal complexity onto users. The most visible symptom is &amp;ldquo;colored functions&amp;rdquo;: async functions and synchronous functions cannot call each other directly, splitting the library ecosystem in two. Task cancellation is also hard to get right—for instance, &lt;code&gt;aiofiles&lt;/code&gt; does not support proper cancellation and can hang under structured concurrency. As Python introduces free-threading, developers now have to worry about the pitfalls of both async and traditional multithreading at the same time.&lt;/p&gt;
&lt;p&gt;His proposal is virtual threads: lightweight threads managed by the runtime rather than the operating system, making blocking operations non-blocking transparently and eliminating the need for &lt;code&gt;async&lt;/code&gt;/&lt;code&gt;await&lt;/code&gt; keywords. Threads are organized into thread groups in the spirit of structured concurrency: child threads cannot outlive their parent, context variables are inherited automatically from parent to child, if one child thread fails the remaining siblings are cancelled, and the group finishes only when all child threads complete. The author stresses that this is a thought experiment to spark discussion, with many open questions around syntax and variable scoping in Python still unresolved; the snippet below illustrates downloading multiple URLs with at most 8 concurrent threads.&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;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;download_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;ThreadGroup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_concurrency&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;partial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;download_and_store&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;results&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="six-principles-for-production-ai-agents"&gt;&lt;del&gt;&lt;a href="https://www.app.build/blog/six-principles-production-ai-agents" rel="noopener noreferrer"&gt;Six Principles for Production AI Agents&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;&lt;del&gt;With the rapid rise of AI agents in real-world applications, taking them to production demands solid design principles. This article presents 6 core principles for building reliable AI agents in production environments:&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;1. Invest in the System Prompt&lt;/strong&gt;: Focus on clear, direct instructions. Modern models need detailed, non-contradictory context rather than clever prompt hacks.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;2. Separate Context&lt;/strong&gt;: Provide minimal initial knowledge and let tools fetch additional context on demand. Use &amp;ldquo;context compression&amp;rdquo; to manage complexity.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;3. Design Tools Carefully&lt;/strong&gt;: Build focused, thoroughly tested tools. Limit the number of tools, keep parameters explicit, and ensure idempotency.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;4. Design Feedback Loops&lt;/strong&gt;: Use an actor-critic approach that allows creative generation backed by strict verification, including domain-specific checks.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;5. Analyze Failures with LLMs&lt;/strong&gt;: Use multiple agents to analyze logs and execution trajectories, leveraging LLMs to pinpoint areas for improvement.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;6. Treat Frustrating Behavior as System Bugs&lt;/strong&gt;: Understand that agents may &amp;ldquo;hack&amp;rdquo; instructions. Debug the system design before blaming the model.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;Key takeaway: &amp;ldquo;Building effective AI agents isn&amp;rsquo;t about finding a silver bullet&amp;hellip; it&amp;rsquo;s about sound system design and software engineering.&amp;quot;&lt;/del&gt;&lt;/p&gt;
&lt;h2 id="working-effectively-with-ai-coding-tools-like-claude-code"&gt;&lt;a href="https://sajalsharma.com/posts/effective-ai-coding/" rel="noopener noreferrer"&gt;Working Effectively with AI Coding Tools like Claude Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sajal Sharma distills best practices for working effectively with AI coding tools like Claude Code, starting from a clear premise: AI excels at implementation, while humans must own architecture, judgment, and strategy. The center of gravity therefore shifts from writing code to writing specifications: settle architectural questions first, check detailed specs into version control, and only then let AI implement them. Treat AI like a talented pair programmer who lacks business context—read every line of code it generates and watch out for shortcuts like overusing TypeScript&amp;rsquo;s &lt;code&gt;any&lt;/code&gt; or patching symptoms instead of root causes, because AI generates code faster than humans can review it.&lt;/p&gt;
&lt;p&gt;On workflow, the author recommends writing highly specific prompts, always asking the AI why it chose a given approach, and using a second model to cross-check complex decisions. Have the AI draft a plan first, review it carefully, save it as a markdown file to track progress, and start a fresh chat for each feature since long conversations degrade consistency. With Claude Code, &lt;code&gt;CLAUDE.md&lt;/code&gt; serves as a map pointing to architecture docs, API specs, and active plans; shared slash commands in &lt;code&gt;.claude/commands/&lt;/code&gt; standardize workflows across the team; and specialized subagents for planning, implementation, review, and research keep each agent&amp;rsquo;s context lean. The productivity gains are real, but only when quality is guarded through constant vigilance.&lt;/p&gt;
&lt;h2 id="when-software-engineers-think-they-need-more-focus-time"&gt;&lt;a href="https://jola.dev/posts/enough-focus-time" rel="noopener noreferrer"&gt;When Software Engineers Think They Need More Focus Time&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jola&amp;rsquo;s article challenges the common belief that software engineers always need more uninterrupted focus time to write code. In the author&amp;rsquo;s view, an engineer&amp;rsquo;s job is to create impact, solve problems, and deliver real value—and the highest-value work often happens outside the code editor: catching a flawed assumption in a product meeting before the whole project veers off course, asking a clarifying question that saves the team weeks of effort, pairing with a stuck junior teammate, or reviewing a design doc before implementation begins. Engineers who block off their calendars to code in isolation easily miss these exact opportunities for leverage.&lt;/p&gt;
&lt;p&gt;The author doesn&amp;rsquo;t dismiss focus time, but advises using it intentionally: measure productivity by value delivered rather than hours spent coding, communicate your schedule clearly (for instance, deep work in the morning, available to help in the afternoon), continually ask whether you are solving the right problem, and remember that an engineer&amp;rsquo;s impact extends beyond source code. The core spirit of the piece can be summed up in one sentence: the goal is not to write code; the goal is to solve problems.&lt;/p&gt;
&lt;h2 id="making-postgres-42000x-slower-because-i-am-unemployed"&gt;&lt;a href="https://byteofdev.com/posts/making-postgres-slow/" rel="noopener noreferrer"&gt;Making Postgres 42,000x slower because I am unemployed&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;A hilarious yet educational experiment: the author sets a rule that only &lt;code&gt;postgresql.conf&lt;/code&gt; may be modified and the database must still complete at least one transaction within a reasonable time, then tries to make PostgreSQL as slow as humanly possible. The benchmark is TPC-C with 128 warehouses run via BenchBase across 100 connections on a Ryzen 7950X with 32GB of RAM. Starting from a baseline of roughly 7,082 transactions per second, shrinking &lt;code&gt;shared_buffers&lt;/code&gt; down to a few megabytes forces constant reads through the OS and drops throughput to a few hundred TPS; configuring autovacuum to run continuously with ultra-low thresholds pushes it down to about 293; forcing constant WAL checkpoints with full sync brings it down to around 98.&lt;/p&gt;
&lt;p&gt;The final two steps hit hardest: tweaking planner cost parameters like &lt;code&gt;random_page_cost&lt;/code&gt; so the query planner virtually refuses to use indexes drops throughput below 1 TPS; then setting &lt;code&gt;io_method&lt;/code&gt; and &lt;code&gt;io_workers = 1&lt;/code&gt; in a new development build of PostgreSQL funnels all I/O through a single worker, bringing reported throughput down to 0.016 TPS. Compared to 7,082, that is a slowdown of roughly 440,000x. Read in reverse, the post is a hands-on lesson in what each setting actually does: buffer pools, autovacuum, WAL, planner cost constants, and parallel I/O all have massive performance impacts and should be tuned to real workloads rather than tweaked blindly.&lt;/p&gt;
&lt;h2 id="stack-overflow-developer-survey-2025"&gt;&lt;a href="https://survey.stackoverflow.co/2025/" rel="noopener noreferrer"&gt;Stack Overflow Developer Survey 2025&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stack Overflow&amp;rsquo;s 15th annual Developer Survey gathered over 49,000 responses from 177 countries, covering 62 questions across 314 technologies. The standout finding is the gap between AI adoption and trust: 84% of respondents use or plan to use AI tools, and 47% use them daily, yet only about a third trust their accuracy while 46% actively distrust them. The biggest frustration (66%) is solutions that are &amp;ldquo;almost right, but not quite,&amp;rdquo; followed by the difficulty of debugging AI-generated code; most developers are also not using AI agents yet.&lt;/p&gt;
&lt;p&gt;On the technology front, Python jumped 7 percentage points to 57.9%, a rise the report links to AI and data science; JavaScript remains on top, and Visual Studio Code continues as the most popular IDE; OpenAI&amp;rsquo;s GPT models are the most used while Claude Sonnet is the most admired, and Rust&amp;rsquo;s Cargo is the most admired infrastructure tool. On the career side, only about 24% of developers report being happy at work (up from the previous year), roughly a third work fully remote, and &amp;ldquo;architect&amp;rdquo; entered the top four most common roles for the first time. For junior developers, this offers a useful compass: AI has become an everyday tool, but the ability to verify its output is what sets engineers apart.&lt;/p&gt;
&lt;h2 id="choose-boring-technology-revisited"&gt;&lt;a href="https://www.brethorsting.com/blog/2025/07/choose-boring-technology,-revisited/" rel="noopener noreferrer"&gt;Choose Boring Technology, Revisited&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Aaron Brethorst revisits Dan McKinley&amp;rsquo;s 2015 classic &amp;ldquo;Choose Boring Technology&amp;rdquo; and argues that the principle matters even more in the age of AI. The original idea is that every organization has a limited budget of &amp;ldquo;innovation tokens&amp;rdquo; to spend intentionally: use familiar tools when solving novel business problems, and accept only one new unknown at a time when learning. &amp;ldquo;Boring&amp;rdquo; technology has the advantage of well-understood failure modes, known capabilities, and proven operational reliability.&lt;/p&gt;
&lt;p&gt;The new twist is that AI assistants can generate professional-looking code for any tech stack imaginable, creating a false sense of confidence. When you combine multiple unfamiliar technologies with AI-written code, you lose the ability to verify the output: you don&amp;rsquo;t know whether the framework choice makes sense, nor what failure modes to watch out for. Therefore, before introducing a new technology into a project, ask yourself whether you are qualified to review AI-generated code in that stack; invest the time to understand a new tool deeply enough to audit AI&amp;rsquo;s suggestions; and don&amp;rsquo;t use AI as an excuse to adopt several unfamiliar technologies at once. As the author puts it, AI should be a force multiplier for technologies you already understand, not a crutch for ones you don&amp;rsquo;t.&lt;/p&gt;
&lt;h2 id="agentic-coding-things-that-didn"&gt;&lt;a href="https://lucumr.pocoo.org/2025/7/30/things-that-didnt-work/" rel="noopener noreferrer"&gt;Agentic Coding Things That Didn&amp;rsquo;t Work&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In contrast to typical success stories, Armin Ronacher shares the AI agent automations he tried and ultimately abandoned. None of his custom slash commands survived: &lt;code&gt;/fix-bug&lt;/code&gt; was no better than pasting a GitHub issue link with his own thoughts, &lt;code&gt;/commit&lt;/code&gt; never matched his commit message style, &lt;code&gt;/add-tests&lt;/code&gt; and &lt;code&gt;/fix-nits&lt;/code&gt; were worse or redundant compared to plain prompts, and &lt;code&gt;/next-todo&lt;/code&gt; went practically unused. Hooks proved awkward to control and ran formatters after every edit rather than at the end of a session, so he switched to intercepting commands via &lt;code&gt;PATH&lt;/code&gt; for simplicity; print mode (90% deterministic code, 10% inference) looks promising but remains slow and hard to debug; subagents help parallelize work but create messes when reading and writing simultaneously, so he usually opens separate sessions or shares context via markdown files instead.&lt;/p&gt;
&lt;p&gt;What actually worked turned out to be remarkably simple: talking to the machine via speech-to-text to convey richer context, manually copying and pasting curated context, and letting the agent read &lt;code&gt;git status&lt;/code&gt; to figure out which files need attention. The most important warning in the article is that automating through LLMs easily tempts users to stop thinking like engineers—at which point quality drops, time is wasted, and you neither understand the system nor learn anything. His rules of thumb: only automate tasks you do constantly, delete unused automations immediately, and evaluate outputs critically before trusting them.&lt;/p&gt;
&lt;h2 id="vibe-code-is-legacy-code"&gt;&lt;a href="https://blog.val.town/vibe-code" rel="noopener noreferrer"&gt;Vibe Code is Legacy Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Steve Krouse of Val Town reminds readers that Andrej Karpathy coined &amp;ldquo;vibe coding&amp;rdquo; to describe a style of coding with AI where you &amp;ldquo;forget that the code even exists.&amp;rdquo; And code that nobody understands already has a name: legacy code. Programming is fundamentally theory-building rather than line-of-code production, so when you vibe code, you accumulate technical debt at the exact speed the LLM generates tokens. That makes vibe coding a great fit for prototypes and throwaway projects—like small apps the author built to calculate growth rates or propose to his partner—because code only becomes a burden when you have to maintain it. Vibe coding is also a spectrum: the better you understand the code, the less you are &amp;ldquo;vibing.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The worst-case scenario is a non-programmer vibe-coding a large project meant to be maintained long-term, which is like handing a credit card to a child without explaining debt: exciting at first, until the bill arrives a month later, and asking AI to fix the bugs at that point is like paying off one credit card with another. For serious projects, the author agrees with Karpathy: keep AI on a tight leash like an overeager intern, move deliberately, and use every opportunity to learn. Val Town uses its assistant Townie both ways—sometimes to vibe code, sometimes to make surgical edits in production projects—and the author believes theory-building will remain at the heart of complex software development.&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 #39</title><link>https://miti99.com/en/post/2025/07/29/</link><pubDate>Tue, 29 Jul 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/07/29/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #39.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="100-senior-java-developer-interview-questions-and-answers--2025-edition"&gt;&lt;a href="https://dev.to/haraf/100-senior-java-developer-interview-questions-and-answers-2025-edition-4f6n" rel="noopener noreferrer"&gt;100+ Senior Java Developer Interview Questions and Answers – 2025 Edition&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This DEV Community guide compiles over 100 interview questions and answers aimed at senior Java developer roles in 2025, organized into five tracks. The Core Java section covers 25 questions split evenly across multithreading and concurrency (deadlocks, the &lt;code&gt;volatile&lt;/code&gt; keyword), collections and their internal implementations, object-oriented design principles, memory management (garbage collection, heap layout), and Java 8+ features like functional interfaces, streams, and &lt;code&gt;Optional&lt;/code&gt;. The Spring Boot and microservices section adds another 25 questions covering auto-configuration, bean lifecycles, inter-service communication (REST, gRPC, message queues), security with JWT, OAuth2, and role-based access control, observability tools like Sleuth, Zipkin, and Prometheus, and deployment and fault-tolerance strategies.&lt;/p&gt;
&lt;p&gt;The remaining three sections feature 20 questions on design patterns (Singleton, Factory, Strategy, Builder, Observer, Proxy, Adapter), 15 on algorithms and data structures (complexity analysis, sorting, searching, graph traversal, Tries, LRU caches), and 15 on SQL and databases (&lt;code&gt;JOIN&lt;/code&gt;s, normalization, indexing, ACID properties, and consistency in distributed systems). What makes the list useful is its focus on real-world engineering scenarios rather than trivia syntax. For junior and mid-level developers, it serves as a solid roadmap for spotting knowledge gaps on the way to senior roles.&lt;/p&gt;
&lt;h2 id="the-prompt-engineering-playbook-for-programmers"&gt;&lt;a href="https://addyo.substack.com/p/the-prompt-engineering-playbook-for" rel="noopener noreferrer"&gt;The Prompt Engineering Playbook for Programmers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Addy Osmani (Google) distills practical techniques for prompting AI coding assistants around seven core principles: provide rich context (language, framework, error messages, expected behavior), state specific goals, break large tasks into smaller steps, include input/output examples (few-shot prompting), assign a role such as code reviewer or security specialist, iterate across multiple turns, and keep your own codebase clean and well-named. His baseline rule is to assume the AI knows nothing about your project beyond what you explicitly put in front of it. For debugging, a reliable template is &amp;ldquo;the code is supposed to do X, but instead does Y when given input Z&amp;rdquo;; in the post&amp;rsquo;s example, pairing the error trace with sample data and expected output lets the AI immediately spot an off-by-one loop condition.&lt;/p&gt;
&lt;p&gt;When refactoring, spell out the exact goal—readability, performance, deduplication, or preserving existing error behavior—rather than just saying &amp;ldquo;refactor this.&amp;rdquo; For new features, start from a high-level outline and build incrementally: scaffold the component first, add state management next, and wire up the API last. Common pitfalls include vague prompts, cramming too many requirements into a single turn, and omitting success criteria. Osmani advises treating AI like an eager junior developer: give clear direction, iterate patiently, and ask it to explain its reasoning so you solve the problem and learn at the same time.&lt;/p&gt;
&lt;h2 id="why-your-ai-coding-assistant-keeps-doing-it-wrong-and-how-to-fix-it"&gt;&lt;a href="https://blog.thepete.net/blog/2025/05/22/why-your-ai-coding-assistant-keeps-doing-it-wrong-and-how-to-fix-it/" rel="noopener noreferrer"&gt;Why Your AI Coding Assistant Keeps Doing It Wrong, and How To Fix It&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Pete Hodgson argues that instead of debating whether &amp;ldquo;AI writes good code,&amp;rdquo; we should ask which kinds of tasks AI excels at and which ones to avoid handing it. AI coding assistants have a peculiar skill profile: they write implementation code like a senior engineer but make design decisions like a novice, and they permanently operate like a teammate &amp;ldquo;in their first hour on the job,&amp;rdquo; lacking knowledge of your codebase, team conventions, or domain context. To evaluate whether a task is a good fit, Hodgson proposes a two-axis matrix: solution space (from narrow, where there is only one obvious approach like removing a feature flag, to wide, where many reasonable designs exist like supporting multi-image uploads) and context required (relying on tacit team knowledge vs. information that can be stated explicitly). AI performs best when the solution space is narrow and the context is explicit, because wide solution spaces make it hard for the model to guess the &amp;ldquo;right&amp;rdquo; local convention.&lt;/p&gt;
&lt;p&gt;That framework points to two levers. To narrow the solution space, give specific implementation instructions instead of letting the AI invent the plan, and break larger problems into smaller steps. To supply missing context, state requirements explicitly in the prompt, use memory or rules files, let the agent search the codebase and read docs, and connect MCP servers to database schemas or issue trackers. In short, shape the work to play to AI&amp;rsquo;s strengths rather than expecting the tool to adapt on its own.&lt;/p&gt;
&lt;h2 id="why-ai-agents-need-a-new-protocol"&gt;&lt;a href="https://glama.ai/blog/2025-06-06-mcp-vs-api" rel="noopener noreferrer"&gt;Why AI Agents Need a New Protocol&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This Glama.ai post explains why AI agents benefit from the Model Context Protocol (MCP) rather than relying solely on traditional HTTP APIs. The core premise is that HTTP APIs evolved to serve human developers and browser apps, not autonomous agents. MCP enforces consistency at the protocol layer itself, whereas OpenAPI merely documents existing APIs in all their idiosyncrasies; as the author puts it, you cannot fix structural inconsistency by writing better documentation. From there, the post highlights five practical differences: MCP lets agents query a server&amp;rsquo;s capabilities dynamically at runtime instead of relying on static docs; with raw APIs, models must construct HTTP requests themselves and frequently hallucinate paths or parameters, whereas with MCP the model simply selects a tool and deterministic code handles the underlying call; MCP treats bidirectional communication as a first-class primitive; each MCP tool maps to a complete user intent rather than scattering a workflow across multiple low-level endpoints; and MCP servers can run as local processes over &lt;code&gt;stdio&lt;/code&gt; with no network layer required.&lt;/p&gt;
&lt;p&gt;The author also points to the long-term payoff of standardization: models only need to learn one uniform interaction pattern instead of thousands of bespoke API dialects. The takeaway isn&amp;rsquo;t that MCP replaces HTTP APIs, but that they belong side by side—keeping APIs for developers while adding MCP as a dedicated integration layer for AI agents.&lt;/p&gt;
&lt;h2 id="understanding-logical-replication-in-postgres"&gt;&lt;a href="https://www.springtail.io/blog/postgres-logical-replication" rel="noopener noreferrer"&gt;Understanding logical replication in Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Garth Goodson, CTO of Springtail, walks through how logical replication works in PostgreSQL—replicating data at the level of logical row changes rather than copying raw physical disk blocks. Its foundation is the Write-Ahead Log (WAL): every modification is written to an append-only log before touching data files, with each record assigned a unique Log Sequence Number (LSN). The source database defines a &lt;code&gt;publication&lt;/code&gt; specifying which tables or schemas to replicate, and the target creates a &lt;code&gt;subscription&lt;/code&gt; to consume them. A replication slot tracks which WAL records have been sent and acknowledged; only WAL segments older than the replica&amp;rsquo;s confirmed flush position can be recycled, preventing data loss at the cost of requiring careful disk-space monitoring if a subscriber falls behind. Finally, logical decoding and output plugins translate raw WAL records into a consumable format; the default &lt;code&gt;pgoutput&lt;/code&gt; plugin emits two message types: &lt;code&gt;XLogData&lt;/code&gt; carrying the actual row changes and &lt;code&gt;KeepAlive&lt;/code&gt; heartbeats to maintain the connection.&lt;/p&gt;
&lt;p&gt;Logical replication is well suited for high availability, scaling out read queries, disaster recovery, and running analytical queries without bogging down the primary database. However, it comes with important caveats: it does not automatically replicate DDL changes such as schema migrations, index builds, or sequence updates; it lags behind physical replication under heavy write throughput; it requires more operational setup; and replicating &lt;code&gt;UPDATE&lt;/code&gt; or &lt;code&gt;DELETE&lt;/code&gt; operations requires tables to have a primary key or an explicit replica identity (with &lt;code&gt;REPLICA IDENTITY FULL&lt;/code&gt; as a fallback).&lt;/p&gt;
&lt;h2 id="one-man-armies"&gt;&lt;a href="https://quarter--mile.com/One-Man-Armies" rel="noopener noreferrer"&gt;One Man Armies&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This short essay on Quarter Mile opens with a striking observation: human productivity varies wildly, and projects many assume would require a full team and $5 million are sometimes built by a single obsessed, hardworking individual. To make the point, the author lists landmark works created (almost) entirely solo: Eric Barone building &lt;em&gt;Stardew Valley&lt;/em&gt; across 70-hour weeks for 4.5 years, Markus Persson writing &lt;em&gt;Minecraft&lt;/em&gt; in 2 years, John Resig creating jQuery, Chris Sawyer writing &lt;em&gt;RollerCoaster Tycoon&lt;/em&gt; in assembly, Chris Hunt spending 12 years on the RPG &lt;em&gt;Kenshi&lt;/em&gt;, Linus Torvalds starting Linux, and Donald Knuth writing &lt;em&gt;The Art of Computer Programming&lt;/em&gt;. The list stretches well beyond software too: Ada Lovelace&amp;rsquo;s first computer program, Einstein&amp;rsquo;s general relativity, Antoni Gaudí&amp;rsquo;s 40+ years on the Sagrada Família, Marie Tharp&amp;rsquo;s first scientific map of the Atlantic ocean floor, and Karlheinz Stockhausen&amp;rsquo;s nearly 30-hour &lt;em&gt;Licht&lt;/em&gt; seven-opera cycle.&lt;/p&gt;
&lt;p&gt;The author leaves readers to draw their own conclusions, offering just one gentle nudge: if general relativity, an entire cathedral, a 29-hour opera cycle, and billion-dollar video games can be brought into the world by one person, your own ambitious, seemingly far-fetched ideas probably aren&amp;rsquo;t too big either—and if you care about them enough, they are worth trying.&lt;/p&gt;
&lt;h2 id="what"&gt;&lt;a href="https://rdel.substack.com/p/rdel-96-whats-the-relationship-between" rel="noopener noreferrer"&gt;What&amp;rsquo;s the relationship between developer seniority and code refactoring?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In the RDEL (Research-Driven Engineering Leadership) newsletter, Lizzie Matusov summarizes a study examining how developer seniority relates to code refactoring. Researchers analyzed 800 open-source Java projects on GitHub, mining over 700,000 refactoring operations across 111,884 commits, measuring seniority via each contributor&amp;rsquo;s Developer Commit Ratio, and using machine learning models to classify the motivation behind each refactoring. They found that the top 5% most senior contributors performed an average of 11.14 refactorings compared to 3.57 among everyone else, and applied a wider variety of refactoring techniques. Most refactorings happened while implementing new features or fixing bugs rather than as standalone cleanup, and that motivation held steady across seniority levels. Notably, the most senior developers were actually &lt;em&gt;less&lt;/em&gt; likely to document their refactorings in commit messages than less experienced contributors.&lt;/p&gt;
&lt;p&gt;From those findings, the post offers three takeaways for engineering leaders. First, encourage engineers at all levels to participate in refactoring through pair programming and shared design principles. Second, make refactoring work visible by recognizing it in retrospectives and promotion criteria. Third, standardize how refactorings are documented using lightweight commit-message prompts and code-review guidelines that apply equally to everyone, regardless of seniority.&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 #30</title><link>https://miti99.com/en/post/2025/05/17/</link><pubDate>Sat, 17 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/17/</guid><description>&lt;p&gt;&lt;em&gt;Welcome to Newsletter #30 - Today&amp;rsquo;s tech news roundup.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="what-i"&gt;&lt;a href="https://muratbuffalo.blogspot.com/2025/04/what-id-do-as-college-freshman.html" rel="noopener noreferrer"&gt;What I&amp;rsquo;d do as a College Freshman in 2025&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Computer science professor Murat Demirbas asks what he would do if he were starting college over as a freshman in 2025, and his first answer is still to study Computer Science. Against the claim that &amp;ldquo;nobody needs to learn programming anymore,&amp;rdquo; he argues that AI tools cannot replace real mastery: debugging skills, abstract thinking, and fast adaptability have to be forged firsthand. He advises building a strong foundation in both computer science and AI, then pairing AI with a deep domain such as systems, databases, or programming languages—aiming to become &amp;ldquo;π-shaped,&amp;rdquo; with depth in two areas and broad literacy across many others.&lt;/p&gt;
&lt;p&gt;Beyond technical depth, soft skills are indispensable: clear communication powers remote work, learning in public, and even working with LLMs, while management starts with managing yourself. Demirbas still views the US as the best launchpad for a tech career and university as the best place to meet talented peers and build projects together. Borrowing a friend&amp;rsquo;s metaphor, he says you should either be an all-terrain Jeep with an entrepreneurial mindset, or a specialized, high-speed Ferrari when a paved track exists—just don&amp;rsquo;t be an easily replaceable Corolla, because in the AI era that is what gets automated away. Finally, play the long game, compounding skills and relationships rather than chasing trends.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="llms-are-weird-computers"&gt;&lt;a href="https://www.phillipcarter.dev/posts/llms-computers" rel="noopener noreferrer"&gt;LLMs Are Weird Computers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Phillip Carter proposes a useful mental model for large language models (LLMs): treat them as a &amp;ldquo;weird&amp;rdquo; or &amp;ldquo;inverted&amp;rdquo; kind of computer alongside the &amp;ldquo;normal&amp;rdquo; computers we already know. Traditional computers execute with exact precision but struggle with ambiguity, whereas LLMs do the opposite: they excel at handling ambiguity but struggle when absolute precision is required.&lt;/p&gt;
&lt;p&gt;Viewing LLMs as a new class of computer with its own distinct properties helps developers better understand their strengths and limits, making it clearer which tasks to hand to an LLM and when traditional computation is still the right tool.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="every-caching-strategy-explained-in-5-minutes"&gt;&lt;a href="https://www.swequiz.com/blog/every-caching-strategy-explained-in-5-minutes" rel="noopener noreferrer"&gt;Every Caching Strategy Explained in 5 Minutes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This SWE Quiz post gives a quick tour of common caching strategies, a foundational topic for optimizing application performance. With Cache-Aside (also called lazy loading), the application manages the cache directly: it checks the cache first and queries the database only on a miss, which fits read-heavy systems that can tolerate briefly stale data. Read-Through instead has the application talk only to the cache while the cache itself loads missing data from the database, keeping application code cleaner.&lt;/p&gt;
&lt;p&gt;On the write side, Write-Through writes synchronously to both the cache and the database, guaranteeing consistency at the cost of slower writes. Write-Behind (Write-Back) writes only to the cache and flushes to the database asynchronously later, speeding up writes but risking data loss if the cache fails before syncing. Write-Around bypasses the cache on writes and uses it only for reads, which suits data that is rarely re-read immediately after being written. Choosing the right strategy depends on an application&amp;rsquo;s specific trade-offs across performance, consistency, and fault tolerance.&lt;/p&gt;
&lt;h2 id="some-features-that-every-javascript-developer-should-know-in-2025"&gt;&lt;a href="https://waspdev.com/articles/2025-04-06/features-that-every-js-developer-must-know-in-2025" rel="noopener noreferrer"&gt;Some features that every JavaScript developer should know in 2025&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This WaspDev article rounds up modern JavaScript features every developer should know to write cleaner, more efficient code. Standouts include iterator helper methods like &lt;code&gt;drop()&lt;/code&gt;, &lt;code&gt;take()&lt;/code&gt;, and &lt;code&gt;filter()&lt;/code&gt;, which process large datasets lazily one element at a time without allocating memory-hungry intermediate arrays. The &lt;code&gt;at()&lt;/code&gt; method supports negative indexing on arrays, such as &lt;code&gt;arr.at(-1)&lt;/code&gt; to grab the last element, while &lt;code&gt;Promise.withResolvers()&lt;/code&gt; cleanly exposes &lt;code&gt;resolve&lt;/code&gt; and &lt;code&gt;reject&lt;/code&gt; alongside a newly created Promise.&lt;/p&gt;
&lt;p&gt;The post also highlights underused techniques: passing a callback function to &lt;code&gt;replace()&lt;/code&gt; and &lt;code&gt;replaceAll()&lt;/code&gt; for complex string substitutions, swapping two variables via &lt;code&gt;[a, b] = [b, a]&lt;/code&gt; instead of a temporary variable, and deep-cloning objects with &lt;code&gt;structuredClone()&lt;/code&gt; rather than &lt;code&gt;JSON.parse(JSON.stringify())&lt;/code&gt;. Rounding out the list are tagged templates for flexible template-literal processing, &lt;code&gt;WeakMap&lt;/code&gt;/&lt;code&gt;WeakSet&lt;/code&gt; for attaching metadata to objects without preventing garbage collection, and new &lt;code&gt;Set&lt;/code&gt; operations like &lt;code&gt;union()&lt;/code&gt;, &lt;code&gt;intersection()&lt;/code&gt;, and &lt;code&gt;difference()&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="what-makes-a-great-developer-experience"&gt;&lt;a href="https://www.codesimplicity.com/post/what-makes-a-great-developer-experience/" rel="noopener noreferrer"&gt;What Makes a Great Developer Experience?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Max Kanat-Alexander, who has spent over 20 years working on developer experience (DX) and helped design key parts of DX at Google and LinkedIn, distills the field&amp;rsquo;s core principles. In his view, a great DX optimizes three things: cycle time, the elapsed time from when a developer forms an intent to when that intent is fulfilled; focus, the ability to work in uninterrupted flow; and cognitive load, the amount of knowledge required and the number of decisions a developer must make to get something done.&lt;/p&gt;
&lt;p&gt;Most of the post focuses on the practical challenges of improving DX: understanding the real problem through data and developer feedback, managing change through gradual rollouts and driving adoption, building high-leverage tools that save human time rather than just machine resources, saying &amp;ldquo;no&amp;rdquo; or &amp;ldquo;not yet&amp;rdquo; kindly to requests that don&amp;rsquo;t fit, and placing the burden on the party actually causing the problem. The overarching lesson is that the hardest part of DX is usually human rather than technical.&lt;/p&gt;
&lt;h2 id="when-life-gives-you-java"&gt;&lt;a href="https://oblac.rs/when-life-gives-you-java/" rel="noopener noreferrer"&gt;When Life Gives You Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Igor Spasić shares how he writes Java when he has to use the language but still wants clean code, borrowing ideas from more expressive functional languages. He makes classes package-private by default and exposes them publicly only when strictly necessary, treating each package as a module. Roughly 95% of references are marked &lt;code&gt;final&lt;/code&gt; to embrace immutability, which makes &lt;code&gt;null&lt;/code&gt; nearly disappear outside very narrow boundaries. He no longer uses inheritance in his own code, favoring object composition instead, while still accepting inheritance where external libraries require it.&lt;/p&gt;
&lt;p&gt;Spasić thinks in terms of &amp;ldquo;input, process, output&amp;rdquo; functions: because Java lacks true first-class functions, each class typically wraps a single function or a small group of closely related ones. Algebraic data types (ADTs) are modeled as &lt;code&gt;record&lt;/code&gt;s implementing a &lt;code&gt;sealed interface&lt;/code&gt;, and domain errors are returned as part of the result via dedicated ADTs, reserving exceptions for genuine runtime failures like out-of-memory errors, I/O failures, or lost database connections. That produces more small classes, which he considers a worthwhile trade-off for more modular code with fewer surprises.&lt;/p&gt;
&lt;h2 id="just-throw-it-into-postgres"&gt;&lt;a href="https://simonsafar.com/2025/throw_it_into_postgres/" rel="noopener noreferrer"&gt;Just Throw It Into Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Simon Safar argues that between the two extremes of forcing all data into a strictly normalized relational schema and dumping raw data into countless files in a directory tree, there is a practical middle ground: just throw the data straight into PostgreSQL without overthinking upfront organization. Thanks to &lt;code&gt;JSONB&lt;/code&gt;, PostgreSQL can query fields inside JSON documents directly, while indexes and dedicated columns can be added later once the data is already there.&lt;/p&gt;
&lt;p&gt;He illustrates this with three examples. First, he built a custom Java code-navigation tool for Emacs: it parsed compiled class files to record relationships like &amp;ldquo;function A calls function B,&amp;rdquo; then loaded hundreds of thousands of records into PostgreSQL via &lt;code&gt;COPY&lt;/code&gt; in a few dozen seconds—fast enough to invoke &lt;code&gt;psql&lt;/code&gt; multiple times per second for autocomplete. Second, he loaded tens of thousands of Chinese character SVGs from the Make Me a Hanzi project into a table with a &lt;code&gt;JSONB&lt;/code&gt; column and joined it against a dictionary table for fast lookups. Third, he stored temperature sensor readings arriving over MQTT so Grafana could chart them. The takeaway: get the data stored first and organize it later, rather than trying to design the perfect schema on day one.&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></channel></rss>