<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Database on miti99</title><link>https://miti99.com/en/tags/database/</link><description>Recent content in Database 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/database/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 #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 #113</title><link>https://miti99.com/en/post/2026/06/24/</link><pubDate>Wed, 24 Jun 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/06/24/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #113.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="migrating-from-go-to-rust"&gt;&lt;a href="https://corrode.dev/learn/migration-guides/go-to-rust/" rel="noopener noreferrer"&gt;Migrating from Go to Rust&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Matthias Endler writes a comprehensive guide for backend teams considering migrating services from Go to Rust. The central message isn&amp;rsquo;t &amp;ldquo;Rust is always faster than Go,&amp;rdquo; but that Rust pushes many classes of risk into the type system so the compiler catches them before production: &lt;code&gt;nil&lt;/code&gt; values, error handling, data races, resource lifetimes, and ownership. Go optimizes for team velocity—fast compile times, a strong standard library, and easy-to-use goroutines. Rust trades that for a stricter compiler, no GC, &lt;code&gt;Result&lt;/code&gt;, &lt;code&gt;Option&lt;/code&gt;, traits, and &lt;code&gt;Send&lt;/code&gt;/&lt;code&gt;Sync&lt;/code&gt; checks. Familiar Go habits have to be remapped: &lt;code&gt;if err != nil&lt;/code&gt; becomes &lt;code&gt;Result&lt;/code&gt; with &lt;code&gt;?&lt;/code&gt;, &lt;code&gt;nil&lt;/code&gt; becomes &lt;code&gt;Option&lt;/code&gt;, interfaces become traits, and goroutines become tasks when genuinely needed.&lt;/p&gt;
&lt;p&gt;The most practical section covers migration strategy: don&amp;rsquo;t rewrite everything at once. Start with a hot path, worker, or clearly bounded service, keep the existing API contract, and shift traffic gradually endpoint by endpoint through a gateway using the strangler pattern. While &lt;code&gt;cgo&lt;/code&gt; works, it is often more complex than splitting the Rust portion into a separate service. The author is also candid about the costs: the borrow checker makes the first month rough, compile times are slower, async function coloring is annoying, and parts of the ecosystem are smaller. There is no need to abandon Go entirely: Go remains a great fit for Kubernetes tooling, CLIs, and &amp;ldquo;boring&amp;rdquo; glue services, while Rust is worth the investment for foundational services where reliability, P99 latency, and bugs like nil dereferences or data races carry higher operational costs than the learning and build overhead.&lt;/p&gt;
&lt;h2 id="ai-engineering-for-developers"&gt;&lt;a href="https://www.lucavallin.com/blog/ai-engineering-for-developers" rel="noopener noreferrer"&gt;AI Engineering for Developers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Luca Cavallin writes a deep-dive guide to AI engineering for developers already comfortable with backends, HTTP, queues, Kubernetes, and production operations. His main argument: when bringing LLMs into a product, the model is not the whole product; what actually creates value is the system around it—prompts, RAG, evals, agents, inference, observability, security, and cost controls. That makes the discipline much closer to backend engineering than model training. Because AI outputs are non-deterministic and can shift across models, prompts, or data, a working demo isn&amp;rsquo;t enough to ship: you need eval datasets, regression checks on every prompt or model change, canary rollouts, and monitoring from day one.&lt;/p&gt;
&lt;p&gt;The article progresses from fundamentals to practical execution: selecting models by task, cost, and latency; exhausting prompt engineering before reaching for RAG; treating RAG primarily as a search problem where hybrid search, rerankers, chunking strategy, and source citations matter more than stuffing more context; fine-tuning only after prompting and RAG hit their ceiling; and optimizing inference through caching, batching, and model routing. Agents are framed as tool-calling loops that require strict schemas, narrow permissions, end-to-end tracing, and human approval gates for risky actions. The production section emphasizes guardrails, dedicated CI/CD pipelines for prompt and model changes, per-feature cost attribution, and treating every agent as a service with its own identity, least-privilege access, and audit logs.&lt;/p&gt;
&lt;h2 id="the-invisible-engineering-behind-lambdas-network"&gt;&lt;a href="https://www.allthingsdistributed.com/2026/04/the-invisible-engineering-behind-lambdas-network.html" rel="noopener noreferrer"&gt;The invisible engineering behind Lambda’s network&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post on All Things Distributed recounts nearly a decade of networking optimizations behind AWS Lambda—the kind of &amp;ldquo;invisible&amp;rdquo; engineering customers only notice because functions start faster and more reliably. The original bottleneck was cold starts when Lambda connected to a customer VPC: beyond spinning up a Firecracker microVM and initializing the runtime, the system had to establish a private network path into the customer&amp;rsquo;s VPC, with Geneve tunnel creation sitting right on the hot path. Rather than maintaining custom kernel patches, the Lambda team turned to eBPF: pre-creating tunnels with a dummy VNI and overwriting the packet header once the real VNI arrived, cutting tunnel setup latency from ~150ms to 200 microseconds.&lt;/p&gt;
&lt;p&gt;Even more instructive is how they scaled to 4,000 networks per worker. Instead of creating tap devices, veth pairs, namespaces, and routing rules on every function invocation, they pre-allocated everything at worker startup, turning a load-variable cost into a one-time fixed cost. They replaced stateful NAT with stateless eBPF packet rewriting, cutting NAT setup latency 100x; collapsed over 125,000 iptables rules in the root namespace down to 144 static rules by moving per-slot rules into their respective namespaces; and reduced RTNL lock contention by reordering network creation and attaching eBPF programs in batches. At scale, iptables rules, conntrack, or a single kernel lock can all become bottlenecks. The result is a unified topology serving both traditional workloads and SnapStart, boosting snapshot network throughput 20x and getting repackaged for reuse in Aurora DSQL.&lt;/p&gt;
&lt;h2 id="selective-test-execution-at-stripe-fast-ci-for-a-50m-line-ruby-monorepo"&gt;&lt;a href="https://stripe.dev/blog/selective-test-execution-at-stripe-fast-ci-for-a-50m-line-ruby-monorepo" rel="noopener noreferrer"&gt;Selective Test Execution at Stripe: Fast CI for a 50M-line Ruby monorepo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Aditya Anchuri describes how Stripe keeps CI fast for a ~50-million-line Ruby monorepo containing nearly 100,000 test files and 1.2 million test targets. Running the entire suite sequentially would take roughly four months, while Stripe runs around 50,000 builds per week. Their Selective Test Execution (STE) system solves this by running an average of just ~5% of the test suite per build (with a median under 0.5%), consuming less than 10% of the compute required by a run-everything strategy.&lt;/p&gt;
&lt;p&gt;What makes Stripe&amp;rsquo;s approach clever is that they don&amp;rsquo;t attempt static dependency analysis for Ruby, where metaprogramming, dynamic dispatch, configuration files, and code generation make static analysis either miss dependencies or become overly conservative. Instead, they observe runtime behavior: an internal C++ library injected via &lt;code&gt;LD_PRELOAD&lt;/code&gt; intercepts every file open, associates read files with the currently executing test, and propagates tracking across child processes. The &lt;code&gt;open&lt;/code&gt; path writes only minimal logs, keeping aggregation and indexing off the hot path. Those logs are compiled into a roaring bitmap index mapping changed files to required tests, storing roughly three billion data points while remaining fast to query. File changes are detected using &lt;code&gt;hashdeep&lt;/code&gt; so generated files are covered alongside git-tracked files. STE also relies on reproducible baseline data and practical CI safety nets: always re-running currently failing tests, always running tests that glob the filesystem, handling linters via changed-file lists, and storing metadata in MongoDB with Monotonic Revision IDs to quickly select baselines in commit order.&lt;/p&gt;
&lt;h2 id="being-oncall-taught-me-everything"&gt;&lt;a href="https://yaoyue.org/blog/2026-oncall/" rel="noopener noreferrer"&gt;Being oncall taught me everything&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Yao Yue looks back on 7.5 years of being on call for Twitter&amp;rsquo;s distributed caching layer—the highest-throughput service and the one involved in the most severe site-wide outages. The post doesn&amp;rsquo;t romanticize on-call life, but argues that living alongside production is what shaped the author&amp;rsquo;s mindset as an infrastructure engineer. On-call teaches you that at scale, predictability matters more than being fast in the average case, tail latency matters more than the median, simple and clear architecture is a lifeline during a crisis, and operational excellence (deep observability, consistent configuration, automation readiness, sensible defaults) comes from up-front design rather than frantic patching two weeks before launch.&lt;/p&gt;
&lt;p&gt;Even more memorable are the human lessons. Periodically restarting Memcached to prevent site-wide cascading failures sometimes triggered incidents of its own, teaching the author to pick low-risk windows, give advance notice, and—most importantly—own mistakes immediately, since that is the fastest way to earn back teammates&amp;rsquo; trust. Many outages were resolved only through doggedly narrowing down possibilities and leaning on colleagues across every layer of the stack: site ops, kernel engineers, upstream service owners, managers, and fellow on-call engineers. The conclusion is blunt: engineers don&amp;rsquo;t truly understand software until they see it run and break in production, and people who write software shouldn&amp;rsquo;t consider themselves above deploying, monitoring, or debugging what they build.&lt;/p&gt;
&lt;h2 id="claude-as-your-performance-analysis-partner"&gt;&lt;a href="https://developers.redhat.com/articles/2026/05/29/claude-your-performance-analysis-partner" rel="noopener noreferrer"&gt;Claude as your performance analysis partner&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Archana Ravindar experiments with using Claude as a partner for Go performance analysis across CPU profiles and execution traces, focusing on the Green Tea garbage collector on POWER10 using the &lt;code&gt;sweet&lt;/code&gt; benchmark suite. Claude&amp;rsquo;s value doesn&amp;rsquo;t lie in immediately generating a working optimization patch, but in rapidly digesting massive, dense artifacts like &lt;code&gt;pprof&lt;/code&gt; outputs, assembly dumps, and trace timelines. For example, Claude pinpointed a hot path in &lt;code&gt;runtime.tryDeferToSpanScan&lt;/code&gt;, spotted an atomic &lt;code&gt;Load8&lt;/code&gt; followed by &lt;code&gt;Or8&lt;/code&gt; pattern, and suggested fusing them into a single &lt;code&gt;Or32&lt;/code&gt; instruction. That experiment actually ran slower, and Claude then helped explain why: false sharing and contention across GC workers—a clear illustration that fewer atomic instructions doesn&amp;rsquo;t automatically mean faster code.&lt;/p&gt;
&lt;p&gt;Claude also proved useful for low-level analysis: cross-referencing assembly to see that the compiler wasn&amp;rsquo;t caching &lt;code&gt;q.class.sizeclass&lt;/code&gt;, ranking GC TODO comments by profile heat, and suggesting patterns to look for in traces such as idle processors during GC, mark assist gaps, overly frequent GC cycles, or prolonged &lt;code&gt;gcMarkDone&lt;/code&gt; phases. The author draws a clear distinction: profiles tell you where cost lives, while traces explain why the system is stalling, especially around GC and scheduling. Still, every hypothesis must be benchmarked, because optimizations tied to hardware architecture, cache lines, instruction sets, or register pressure are easy to get wrong without full context; the best use of AI here is narrowing the search space and building an investigation checklist, not replacing benchmarks.&lt;/p&gt;
&lt;h2 id="things-you-didn"&gt;&lt;a href="https://jon.chrt.dev/2026/04/15/things-you-didnt-know-about-indexes.html" rel="noopener noreferrer"&gt;Things you didn&amp;rsquo;t know about indexes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jon Charter explains Postgres indexes with an approachable analogy: an index is like the index at the back of a book, letting the database locate rows through a sorted structure instead of scanning the entire table. That speed comes with a fundamental trade-off: faster reads mean slower writes. Data modifications (&lt;code&gt;INSERT&lt;/code&gt;, &lt;code&gt;UPDATE&lt;/code&gt;, &lt;code&gt;DELETE&lt;/code&gt;) usually have to update indexes as well and incur cleanup overhead; indexes also consume disk space, compete for cache memory, and give the query planner more paths to evaluate. Consequently, &amp;ldquo;index everything&amp;rdquo; is rarely a good strategy.&lt;/p&gt;
&lt;p&gt;The most useful section covers common pitfalls that prevent an index from being used. Composite indexes depend on column order, so the order must match real query patterns: &lt;code&gt;(type_1, type_2)&lt;/code&gt; helps queries filtering on &lt;code&gt;type_1&lt;/code&gt; or both columns, but is generally ineffective when filtering only on &lt;code&gt;type_2&lt;/code&gt; (though PostgreSQL 18&amp;rsquo;s skip scan helps in some cases). Wrapping a column in a function like &lt;code&gt;lower(name)&lt;/code&gt; causes a plain index on &lt;code&gt;name&lt;/code&gt; to be ignored because the database needs a structure sorted by the exact expression &lt;code&gt;lower(name)&lt;/code&gt;; implicit type casts cause the same issue. The right way to verify index usage is running &lt;code&gt;EXPLAIN&lt;/code&gt; or &lt;code&gt;EXPLAIN ANALYZE&lt;/code&gt; to confirm what the planner actually chooses rather than guessing. Finally, the post introduces functional indexes, partial indexes for small slices of data like soft-deleted rows or &lt;code&gt;is_legendary = true&lt;/code&gt;, and covering indexes with &lt;code&gt;INCLUDE&lt;/code&gt; to enable &lt;code&gt;Index Only Scan&lt;/code&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 #109</title><link>https://miti99.com/en/post/2026/06/06/</link><pubDate>Sat, 06 Jun 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/06/06/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #109.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="a-history-of-ides-at-google"&gt;&lt;a href="https://laurent.le-brun.eu/blog/a-history-of-ides-at-google" rel="noopener noreferrer"&gt;A History of IDEs at Google&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Laurent Le Brun, who spent 12 years working on developer tooling at Google, recounts the journey from a fragmented ecosystem of editors to a single IDE used by nearly the entire company. Back in 2011, when someone asked whether Google should standardize on one IDE, the near-unanimous answer was &amp;ldquo;no&amp;rdquo; — Jeff Dean argued that forcing a whole team onto a single editor was a recipe for misery. The price of that freedom was that every useful integration — Bazel, code search, formatters — had to be rebuilt for every editor. Around 2013, Cider launched as a web-based editor initially meant for quick doc edits, but thanks to a backend capable of indexing Google&amp;rsquo;s massive monorepo, it gradually won over Go and then Java developers.&lt;/p&gt;
&lt;p&gt;In 2020, the team decided to replace Cider&amp;rsquo;s custom frontend with the VS Code core while keeping Google&amp;rsquo;s proprietary backend; Cider V opened to 5,000 engineers in 2021 and accounted for roughly 80% of main-repo development by 2023. Once most engineers shared a single platform, teams had strong incentives to build internal extensions — roughly 100 within two years — and AI features like code completion and automated review-comment resolution could be rolled out company-wide far faster. The takeaway: standardizing tooling creates massive leverage, even if the up-front investment is high and not every company can pull it off.&lt;/p&gt;
&lt;h2 id="finding-zombies-in-our-systems-a-real-world-story-of-cpu-bottlenecks"&gt;&lt;a href="https://medium.com/pinterest-engineering/finding-zombies-in-our-systems-a-real-world-story-of-cpu-bottlenecks-ea4722e552eb" rel="noopener noreferrer"&gt;Finding zombies in our systems: A real-world story of CPU bottlenecks&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In early 2025, Pinterest&amp;rsquo;s Ray ML training jobs kept crashing due to flaky network connections, and it took the Kubernetes platform team over three months to track down the culprit. The first clue was that the EC2 ENA network driver reset itself whenever its transmit queue stalled for more than 5 seconds, a classic symptom of CPU starvation; weirdly, the resets only happened in a single availability zone even though cluster configs looked identical, and rebooting nodes only bought about a week of relief. On 96-vCPU GPU instances, aggregate &lt;code&gt;perf&lt;/code&gt; profiles looked completely normal; only per-core, per-second &lt;code&gt;mpstat&lt;/code&gt; monitoring revealed a single CPU core pinned at 100% system time for several seconds right when each reset occurred. The team set up automated 2-minute &lt;code&gt;perf record&lt;/code&gt; captures and used Netflix&amp;rsquo;s Flamescope to scrub to the exact second of the spike.&lt;/p&gt;
&lt;p&gt;The culprit: right before every reset, &lt;code&gt;kubelet&lt;/code&gt; spiked to ~6.5% total CPU (normally under 1%), spending nearly all of that time inside the kernel&amp;rsquo;s &lt;code&gt;mem_cgroup_nr_lru_pages&lt;/code&gt; function. The kernel was tracking nearly 70,000 memory cgroups even though only 240 were actually active — &amp;ldquo;zombie memcgs&amp;rdquo; — and walking that list pinned a single core long enough to starve the network driver thread sharing it. The root cause traced back to the AWS Deep Learning AMI (Ubuntu 20.04) base image, which shipped with the Amazon ECS agent enabled by default; unable to join an ECS cluster, the agent crashed in a tight loop, leaking a zombie cgroup on every restart. The fix was simple: disable the ECS agent systemd unit and reboot the fleet. As for why the &amp;ldquo;healthy&amp;rdquo; availability zone never broke? Another bug there prevented the ECS agent from ever starting in the first place.&lt;/p&gt;
&lt;h2 id="programming-still-sucks"&gt;&lt;a href="https://www.stvn.sh/writing/programming-still-sucks-fqffhyp" rel="noopener noreferrer"&gt;Programming Still Sucks.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Steven Langbroek wrote this essay to answer the familiar question &amp;ldquo;Will AI take programmers&amp;rsquo; jobs?&amp;rdquo;, and his answer is no: the real culprit is greed, merely dressed up in a new coat called &amp;ldquo;automation.&amp;rdquo; Starting from a casual question at a birthday party, he paints software engineering as a burning ship: no map, no crew, sails mounted backward, useless navigation instruments, and a predecessor who abandoned ship after leaving behind half-baked &amp;ldquo;initiatives.&amp;rdquo; Layoffs, he argues, are signed off by people who know the consequences full well but bow to spreadsheets and quarterly targets, telling themselves they&amp;rsquo;ll &amp;ldquo;fix it later&amp;rdquo; — a &amp;ldquo;later&amp;rdquo; that never comes.&lt;/p&gt;
&lt;p&gt;The sharpest pain point is what happens to junior developers. A junior&amp;rsquo;s value isn&amp;rsquo;t the code they write today, but the fact that one day they become the senior who understands every dark corner of the system; eliminate apprenticeships to optimize short-term output, and a few years later there is nobody left to take the helm. The emotional heart of the piece is Sara, an older infrastructure specialist who inherited her knowledge from Ben and keeps the company alive via a mysterious cron job nobody else understands. When Sara retires, the company will desperately need a replacement after having dismantled the very pipeline that could have trained one. The disaster, Langbroek concludes, isn&amp;rsquo;t technological — it&amp;rsquo;s organizations actively sabotaging themselves.&lt;/p&gt;
&lt;h2 id="how-container-filesystem-works-building-a-docker-like-container-from-scratch"&gt;&lt;a href="https://labs.iximiuz.com/tutorials/container-filesystem-from-scratch" rel="noopener noreferrer"&gt;How Container Filesystem Works: Building a Docker-like Container From Scratch&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ivan Velichko&amp;rsquo;s tutorial on iximiuz Labs builds a container by hand using nothing but standard Linux tools like &lt;code&gt;unshare&lt;/code&gt;, &lt;code&gt;mount&lt;/code&gt;, and &lt;code&gt;pivot_root&lt;/code&gt; — not to replace Docker, but to give readers a clear mental model of what happens under the hood of &lt;code&gt;docker run&lt;/code&gt;. The foundation is the mount namespace: it isolates the mount table — the list of mounted filesystems visible to a process — rather than the underlying physical filesystem itself, something you can verify with &lt;code&gt;findmnt&lt;/code&gt; across two namespaces. Velichko emphasizes mount propagation across &lt;code&gt;private&lt;/code&gt;, &lt;code&gt;shared&lt;/code&gt;, and &lt;code&gt;slave&lt;/code&gt; modes: if ignored, mounts created inside a container can leak out to the host, and &lt;code&gt;pivot_root&lt;/code&gt; — the safer alternative to &lt;code&gt;chroot&lt;/code&gt; — requires that the parent mount not be marked &lt;code&gt;shared&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The hands-on walkthrough mirrors what &lt;code&gt;runc&lt;/code&gt; actually does: prepare a rootfs directory from an Alpine image; create mount, pid, cgroup, uts, and net namespaces; mount the &lt;code&gt;/proc&lt;/code&gt;, &lt;code&gt;/dev&lt;/code&gt;, and &lt;code&gt;/sys&lt;/code&gt; pseudo-filesystems with appropriate restrictions; bind-mount container-specific &lt;code&gt;/etc/hosts&lt;/code&gt;, &lt;code&gt;/etc/hostname&lt;/code&gt;, and &lt;code&gt;/etc/resolv.conf&lt;/code&gt; files; swap the root filesystem via &lt;code&gt;pivot_root&lt;/code&gt;; and harden the container by remounting sensitive &lt;code&gt;/proc&lt;/code&gt; paths read-only and masking others with &lt;code&gt;tmpfs&lt;/code&gt; or &lt;code&gt;/dev/null&lt;/code&gt;. On the security side, an untrusted rootfs can contain symlinks pointing outside the container, so production runtimes use &lt;code&gt;openat2()&lt;/code&gt; with &lt;code&gt;RESOLVE_NO_SYMLINKS&lt;/code&gt; and operate via file descriptors to prevent TOCTTOU race conditions. Finally, bind mounts are the exact same mechanism powering Docker&amp;rsquo;s &lt;code&gt;-v&lt;/code&gt; flag when sharing host volumes with a container.&lt;/p&gt;
&lt;h2 id="using-ai-to-write-better-code-more-slowly"&gt;&lt;a href="https://nolanlawson.com/2026/05/25/using-ai-to-write-better-code-more-slowly/" rel="noopener noreferrer"&gt;Using AI to write better code more slowly&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Amid the &amp;ldquo;vibe coding&amp;rdquo; frenzy, Nolan Lawson asks the opposite question: if so many people are using LLMs to crank out sloppy code as fast as possible, can we use the exact same tools to write better code more slowly? His answer is yes. His workflow centers on multi-model code review: having Claude, Codex, and Cursor Bugbot independently review a pull request, rank issues as critical, high, medium, or low, and then manually synthesizing and verifying their findings to filter out false positives. Using distinct models and wiping context between rounds reduces the chance that all of them hallucinate the same nonexistent bug. He then has the agent fix the critical and high issues, repeats the review loop until none remain, weighs whether the minor issues are worth addressing, and throws out the entire pull request if the process exposes a fundamental architectural flaw.&lt;/p&gt;
&lt;p&gt;Interestingly, his overall delivery speed hasn&amp;rsquo;t increased at all: the review process routinely uncovers pre-existing bugs in surrounding code, turning every new feature into a side quest of writing tests and cleaning up legacy debt. For anyone letting agents open hundred-line pull requests they don&amp;rsquo;t fully grasp, Lawson advises slowing down: ask the agent how the code works and where it could break, have it generate documentation with Mermaid diagrams, or use Matt Pocock&amp;rsquo;s &lt;code&gt;/grill-me&lt;/code&gt; skill until you understand every detail. This approach burns more tokens, but pays off in a deep understanding of failure modes and a much healthier codebase.&lt;/p&gt;
&lt;h2 id="how-cockroachdb-built-vector-indexing-at-scale"&gt;&lt;a href="https://blog.bytebytego.com/p/how-cockroachdb-built-vector-indexing" rel="noopener noreferrer"&gt;How CockroachDB Built Vector Indexing at Scale&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;ByteByteGo breaks down C-SPANN, the vector indexing algorithm CockroachDB designed in-house because no off-the-shelf approach fit a distributed transactional database. Vectors have no natural total ordering, rendering B-trees useless, so every vector index trades exactness for speed via approximate nearest neighbor (ANN) search. CockroachDB set six hard constraints: no central coordinator node, no reliance on massive in-memory structures, minimal network hops, shardable across nodes, no hot spots, and real-time incremental updates — ruling out both traditional HNSW and IVF. C-SPANN instead uses a wide, shallow hierarchical K-means tree: with a branching factor around 100, a million vectors need just three levels and ten billion vectors need five.&lt;/p&gt;
&lt;p&gt;The key architectural decision is storing each partition as ordinary key-value rows inside CockroachDB, allowing the index to automatically inherit range splitting, load balancing, replication, and multi-region placement without a separate infrastructure stack. To cut storage overhead, RaBitQ compresses 1,536-dimensional vectors from ~3 KB down to 200 bytes (a 94% reduction), then uses the full-precision vectors to rerank a small candidate set. For multi-tenancy, prefix columns like &lt;code&gt;(user_id, embedding)&lt;/code&gt; create isolated per-tenant trees, combining with &lt;code&gt;REGIONAL BY ROW&lt;/code&gt; to satisfy data-residency rules. The trade-offs are stated plainly: C-SPANN trails dedicated vector databases on raw tail latency and currently only supports Euclidean distance in preview, but it is a great fit for workloads where vectors need to live alongside transactional data.&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 #102</title><link>https://miti99.com/en/post/2026/05/05/</link><pubDate>Tue, 05 May 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/05/05/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #102.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="a-github-agentic-workflow"&gt;&lt;a href="https://blog.frankel.ch/agentic-github-workflows/" rel="noopener noreferrer"&gt;A GitHub agentic workflow&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Nicolas Fränkel shares his hands-on experience with GitHub agentic workflows — workflows whose defining feature is running an AI agent inside them. He works on a long-lived product with many versions, accompanied by an analysis tool that warns customers ahead of time about upgrade issues. The tool&amp;rsquo;s configuration file used to be compiled manually by a colleague from release notes. Some deprecation info exists in source code via annotations like &lt;code&gt;@Deprecated&lt;/code&gt;, but plugin deprecations only appear in release notes — unstructured prose that traditional deterministic automation cannot parse. That is exactly where an agent shines.&lt;/p&gt;
&lt;p&gt;The workflow has four steps: initialize with &lt;code&gt;gh aw init&lt;/code&gt; or via the GitHub UI; write the workflow in Markdown (the author used Copilot CLI to help); &amp;ldquo;compile&amp;rdquo; it to YAML with &lt;code&gt;gh aw compile&lt;/code&gt;; and run it like a normal workflow using a fine-grained &lt;code&gt;GITHUB_COPILOT_TOKEN&lt;/code&gt; with &amp;ldquo;Copilot requests&amp;rdquo; permission. Along the way, the author hit several snags: forgetting to compile and pushing only the Markdown file; trying to create an auto-compile workflow before hitting permission walls and realizing it was a security risk anyway; and finally settling on a verification workflow that recompiles and fails if the output differs from the committed YAML, paired with &lt;code&gt;.gitattributes&lt;/code&gt; to handle line-ending differences between Windows and Ubuntu. Agentic workflows also disallowed actions from the GitHub Marketplace in his setup. In his view, they don&amp;rsquo;t replace deterministic workflows, but they unlock new use cases like parsing release notes that regexes can&amp;rsquo;t easily handle.&lt;/p&gt;
&lt;h2 id="the-20-software-engineering-laws"&gt;&lt;a href="https://newsletter.techworld-with-milan.com/p/the-20-software-engineering-laws" rel="noopener noreferrer"&gt;The 20 Software Engineering Laws&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dr Milan Milanović rounds up the 20 software engineering laws he references most often to explain why projects fail, systems degrade, and teams slow down. Many of these decades-old principles remain useful because they are about humans building products together under time pressure rather than any specific technology. They aren&amp;rsquo;t rigid rules: they describe what tends to happen, while the decisions still belong to the engineer.&lt;/p&gt;
&lt;p&gt;The laws are grouped into several themes: how systems are built (Gall&amp;rsquo;s Law, KISS, Conway&amp;rsquo;s Law, Hyrum&amp;rsquo;s Law, CAP Theorem, Zawinski&amp;rsquo;s Law), team dynamics (Brooks&amp;rsquo;s Law, Ringelmann Effect, Price&amp;rsquo;s Law), planning and estimation (Dunning-Kruger Effect, Hofstadter&amp;rsquo;s Law, Parkinson&amp;rsquo;s Law), measurement (Goodhart&amp;rsquo;s Law, Gilb&amp;rsquo;s Law), performance and reliability (Knuth&amp;rsquo;s Optimization Principle, Amdahl&amp;rsquo;s Law, Murphy&amp;rsquo;s Law), and design philosophy (Postel&amp;rsquo;s Law, Sturgeon&amp;rsquo;s Law, Cunningham&amp;rsquo;s Law). Illustrative examples include Instagram succeeding after stripping Burbn down to just photo sharing while feature-packed Google Wave vanished after 15 months, and the 2024 CrowdStrike outage that crashed 8.5 million Windows machines (Murphy&amp;rsquo;s Law). Understanding these laws before trouble strikes helps avoid costly mistakes; because they sometimes contradict one another, engineers need judgment to pick the right lens and build their own catalog of observed patterns.&lt;/p&gt;
&lt;h2 id="databases-were-not-designed-for-this"&gt;&lt;a href="https://arpitbhayani.me/blogs/defensive-databases/" rel="noopener noreferrer"&gt;Databases Were Not Designed For This&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Arpit Bhayani points out that every database design rests on an &amp;ldquo;implicit contract&amp;rdquo;: the caller is a human-written application running deterministic code, queries are reviewed before deployment, writes are intentional, and connections are short-lived. That contract held for forty years, but AI agents break it at every layer. Agents hallucinate novel queries on the fly, write data autonomously, duplicate writes on retries, hold connections open while waiting on LLM inference, and fan out into parallel sub-agents. A classic failure mode: an API returns HTTP 200 with an empty result because the backend connection pool is exhausted, and the agent interprets &amp;ldquo;no data&amp;rdquo; as &amp;ldquo;no problem,&amp;rdquo; proceeding to approve 500 transactions without triggering a single alert.&lt;/p&gt;
&lt;p&gt;The fix is defensive database design: set role-level statement timeouts (e.g., 5 seconds); use soft deletes with a &lt;code&gt;deleted_by&lt;/code&gt; column to audit which agent deleted what; use append-only event log tables for sensitive data; enforce idempotency keys derived from task ID, operation type, and target entity so retries don&amp;rsquo;t create duplicate records; and isolate agent traffic into a dedicated connection pool with short wait timeouts so it fails fast. The article also covers PgBouncer transaction pooling, attaching SQL comments with agent and task IDs for observability, and giving each agent type its own least-privilege database role. The core message: none of these are new tools — they are established best practices that become mandatory infrastructure once agents talk to your database.&lt;/p&gt;
&lt;h2 id="finishing-things"&gt;&lt;a href="https://ratfactor.com/finishing-things" rel="noopener noreferrer"&gt;Finishing Things&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This is a personal essay by the author of the ratfactor blog about finishing personal projects amid life&amp;rsquo;s upheavals. He used to set grand annual themes like &amp;ldquo;The Year of the Microcontroller&amp;rdquo; (2023) or &amp;ldquo;The Year of Try It&amp;rdquo; (2024), but personal hardships and external events kept derailing them, so he decided to stop making big plans. What actually works is a &amp;ldquo;project stack&amp;rdquo;: every idea gets written on a small Post-It note and placed into a display frame, usually near the top, and he only works on the topmost item. This stack turns a sprawling maze of side quests into a single linear track that&amp;rsquo;s easy to follow instead of a tangled to-do list.&lt;/p&gt;
&lt;p&gt;He compares maintaining habits and projects to plate spinning: when a crisis hits, multiple plates come crashing down at once. His advice is to keep at least one plate spinning, because maintaining momentum is much easier than starting over from scratch; skills also need regular practice so they don&amp;rsquo;t rust. The essay introduces the &amp;ldquo;sphere of control,&amp;rdquo; a boundary that expands and contracts with life&amp;rsquo;s circumstances: as long as you do well within that sphere, there&amp;rsquo;s no need to beat yourself up, and some obstacles are really just minor discomforts, like dreading a phone call to book an appointment. He also touches on the creeping nihilism of watching AI companies scrape up human creativity, and chooses to ignore it and keep creating anyway. Conclusion: slow, steady progress is what actually gets things done, so instead of specific goals, he declares a &amp;ldquo;year of slow, steady progress.&amp;rdquo;&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_!9kS2!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F71595c9b-f94f-4ae8-851e-ea4f07342c29_2484x3002.png" alt="Data Warehouse vs Data Lake vs Data Mesh"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!U4gw!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e8297aa-f856-4b2b-af5d-986023db89e7_2508x3000.png" alt="API Concepts Every Software Engineer Should Know"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!SAsk!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7616a6b1-8eb6-4dc3-9456-b0e57bc9b0ee_2484x3002.png" alt="Polling vs Long Polling vs Webhooks vs SSE"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!SJN6!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47ce48f1-06e7-4663-b822-96cc7d1307d0_2484x3002.png" alt="SLA vs SLO vs SLI"&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 #63</title><link>https://miti99.com/en/post/2025/12/03/</link><pubDate>Wed, 03 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/03/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #63.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="simplify-your-code-with-functional-core-imperative-shell"&gt;&lt;a href="https://testing.googleblog.com/2025/10/simplify-your-code-functional-core.html" rel="noopener noreferrer"&gt;Simplify your code with functional core, imperative shell&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This entry in the &amp;ldquo;Tech on the Toilet&amp;rdquo; series on the Google Testing Blog, written by Arham Jain, introduces the &lt;strong&gt;Functional Core, Imperative Shell&lt;/strong&gt; design pattern. A common problem in software is mixing business logic with side effects like database queries, network requests, or sending emails, which makes code hard to test, reuse, and reason about. The solution is to split code into two layers: a functional core made up solely of pure functions with no I/O and no external state mutation that operate strictly on their inputs; and an imperative shell that handles all side effects and delegates decision-making to the core.&lt;/p&gt;
&lt;p&gt;The article&amp;rsquo;s example starts with a &lt;code&gt;sendUserExpiryEmail&lt;/code&gt; function that loops over database users, filters expired accounts, and sends emails all in one place. After refactoring, the core contains two pure functions—&lt;code&gt;getExpiredUsers&lt;/code&gt; (filtering expired, non-free-trial users) and &lt;code&gt;generateExpiryEmails&lt;/code&gt; (producing the list of recipients and email bodies)—while the shell shrinks to a single &lt;code&gt;email.bulkSend(...)&lt;/code&gt; call. Now the core can be unit-tested in isolation without mocks, the shell is easy to swap out, and adding a feature like a five-day advance reminder only requires writing one new pure function and reusing &lt;code&gt;getExpiredUsers&lt;/code&gt;. The post also links to Gary Bernhardt&amp;rsquo;s original talk on the pattern.&lt;/p&gt;
&lt;h2 id="rdel-94-how-do-experienced-engineers-actually-review-code"&gt;&lt;a href="https://rdel.substack.com/p/rdel-94-how-do-experienced-engineers" rel="noopener noreferrer"&gt;RDEL #94: How do experienced engineers actually review code?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This issue of RDEL summarizes a qualitative study that observed 10 experienced engineers performing 25 real-world code reviews across open-source and internal projects, paired with semi-structured interviews. The findings show that reviewers work through three phases: building context from the PR title and description (observed in 84% of reviews), inspecting details by reading, running code, or asking questions, and finally reaching a decision. Throughout a review, engineers simultaneously hold three mental models in their heads: the actual code in the PR, the expected change, and an ideal implementation; gaps between these three models are what trigger questions or change requests. Rather than trying to understand every line equally, they actively scope their attention based on complexity and risk, sometimes asking the author for a live walkthrough when a change is especially intricate.&lt;/p&gt;
&lt;p&gt;Beyond the PR diff itself, reviewers consult issue trackers (44%), prior discussions (40%), external tools, and their own institutional knowledge of the system and team conventions. Understanding is built collaboratively over time rather than by reading code in isolation. Based on these findings, the post recommends that engineering managers support reviewing by commit, file, or feature, require high-quality PR descriptions explaining the &amp;ldquo;what&amp;rdquo; and &amp;ldquo;why,&amp;rdquo; and automate low-value checks like formatting via linters and CI so human reviewers can focus on architecture and logic.&lt;/p&gt;
&lt;h2 id="the-great-software-quality-collapse-how-we-normalized-catastrophe"&gt;&lt;a href="https://techtrenches.dev/p/the-great-software-quality-collapse" rel="noopener noreferrer"&gt;The Great Software Quality Collapse: How We Normalized Catastrophe&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Writing on Tech Trenches, Denis Stetskov warns that software quality is in severe decline and extreme resource bloat has been normalized: Apple&amp;rsquo;s Calculator leaking 32GB of RAM, VS Code leaking 96GB over SSH, Microsoft Teams pinning 100% CPU on a 32GB machine, Discord eating 32GB during screen sharing, and Spotify consuming 79GB on macOS. The July 2024 CrowdStrike outage is the costliest example: a missing array bounds check in a configuration parser crashed 8.5 million Windows machines, causing an estimated $10 billion in damages. AI coding tools are amplifying the problem, exemplified by Replit&amp;rsquo;s AI assistant ignoring explicit instructions, wiping a production database, and fabricating fake data to cover it up; cited research found AI-generated code contains 322% more security vulnerabilities.&lt;/p&gt;
&lt;p&gt;The author argues that software is hitting physical limits: stacked abstraction layers (React, Electron, Chromium, Docker, Kubernetes…) multiply overhead 2–6x, and data centers consume 200 TWh per year while power grids struggle to keep up. Big tech companies spend $364 billion on infrastructure rather than fixing root causes. The most worrying long-term consequence is slashing junior roles: without juniors today, there are no seniors tomorrow. His prescription is to prioritize quality over velocity, measure actual resource consumption, strip away redundant abstraction layers, and return to fundamentals like bounds checking and memory management.&lt;/p&gt;
&lt;h2 id="building-an-agent-that-leverages-throwaway-code"&gt;&lt;a href="https://lucumr.pocoo.org/2025/10/17/code/" rel="noopener noreferrer"&gt;Building an Agent That Leverages Throwaway Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Armin Ronacher (creator of Flask) proposes building agents that solve even non-programming tasks by having the AI write &lt;strong&gt;throwaway code&lt;/strong&gt; instead of relying on a fixed set of predefined tools. The key building block is &lt;strong&gt;Pyodide&lt;/strong&gt;, a Python interpreter compiled to WebAssembly that can install compatible packages via &lt;code&gt;micropip&lt;/code&gt;—including pure-Python packages or Pyodide builds—to process documents and images; Ronacher recommends running Pyodide inside a Web Worker so execution can be interrupted if needed. For safe resource access, the agent interacts with a &lt;strong&gt;virtual filesystem&lt;/strong&gt;: file reads and writes are intercepted and translated into external API calls, so the sandbox never needs direct network access.&lt;/p&gt;
&lt;p&gt;Because an agent run can span many steps, he uses a simple &lt;strong&gt;durable execution&lt;/strong&gt; mechanism: snapshotting state into a key-value store after every step so retries can resume from where they left off without recomputing earlier work. Alongside the Python interpreter, the agent gets a &lt;code&gt;Describe&lt;/code&gt; tool to reason over artifacts produced by its code and a &lt;code&gt;Help&lt;/code&gt; tool to look up documentation or query a RAG index. His &lt;a href="https://github.com/mitsuhiko/mini-agent" rel="noopener noreferrer"&gt;mini-agent&lt;/a&gt; repo demonstrates the idea: the agent reads an IP address from a virtual network drive and renders an illustration. In Ronacher&amp;rsquo;s view, this approach is simpler than wiring MCP servers into an interpreter, and similar patterns are emerging in Anthropic&amp;rsquo;s Claude Skills and Cloudflare&amp;rsquo;s Code Mode.&lt;/p&gt;
&lt;h2 id="measuring-engineering-productivity"&gt;&lt;a href="https://justoffbyone.com/posts/measuring-engineering-productivity/" rel="noopener noreferrer"&gt;Measuring Engineering Productivity&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Can Duruk shares the engineering productivity measurement system he built at Felt, a SaaS company that grew from 2 to 25 engineers and ships up to 25 deployments a day. The core principle is that managers absorb most of the &amp;ldquo;paperwork&amp;rdquo; rather than pushing it onto engineers. Daily, engineers post an async standup in &lt;code&gt;#standups&lt;/code&gt; on Slack covering yesterday, today, and blockers, taking just 5–10 minutes. Weekly, managers compile a changelog from GitHub, categorizing PRs by engineer and into product features, bug fixes, or developer experience; 1:1s center on people, product, and process with shared notes in Notion; and each team gets a few minutes to demo weekly wins at All-Hands. In real time, merged PRs automatically post to Slack, and engineers verify their own changes in production and sign off with an emoji reaction.&lt;/p&gt;
&lt;p&gt;Duruk advises starting small (the full system took two years to evolve), tailoring practices to your organization&amp;rsquo;s context, setting clear expectations with concrete examples, and continuously gathering feedback through 1:1s and retros. He rejects vanity metrics like lines of code or commit counts, while emphasizing that measurement itself isn&amp;rsquo;t the enemy—bad measurement is. Numbers serve as a diagnostic tool to sanity-check a manager&amp;rsquo;s intuition and ground tough conversations, not as a weapon to grade individuals.&lt;/p&gt;
&lt;h2 id="scripts-i-wrote-that-i-use-all-the-time"&gt;&lt;a href="https://evanhahn.com/scripts-i-wrote-that-i-use-all-the-time/" rel="noopener noreferrer"&gt;Scripts I wrote that I use all the time&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Evan Hahn tours the collection of personal shell scripts he has accumulated over more than a decade in his dotfiles, hosted publicly on Codeberg. The scripts fall into several categories: clipboard utilities (&lt;code&gt;copy&lt;/code&gt; and &lt;code&gt;pasta&lt;/code&gt; wrapping clipboard operations, &lt;code&gt;pastas&lt;/code&gt; watching clipboard history, &lt;code&gt;cpwd&lt;/code&gt; copying the current directory path); file operations (&lt;code&gt;mkcd&lt;/code&gt; to create and enter a directory, &lt;code&gt;tempe&lt;/code&gt; to open a temporary directory, &lt;code&gt;trash&lt;/code&gt; to move files to the trash instead of permanently deleting them, &lt;code&gt;mksh&lt;/code&gt; to scaffold a new shell script); internet utilities (&lt;code&gt;serveit&lt;/code&gt; to spin up a local web server, &lt;code&gt;getsong&lt;/code&gt;, &lt;code&gt;getpod&lt;/code&gt;, and &lt;code&gt;getsubs&lt;/code&gt; wrapping &lt;code&gt;yt-dlp&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt; to parse URL components); and text processing (&lt;code&gt;scratch&lt;/code&gt; to open a scratch buffer, &lt;code&gt;straightquote&lt;/code&gt; to normalize curly quotes, &lt;code&gt;markdownquote&lt;/code&gt; to format blockquotes).&lt;/p&gt;
&lt;p&gt;He also shares media scripts like &lt;code&gt;tunes&lt;/code&gt;, &lt;code&gt;pix&lt;/code&gt;, &lt;code&gt;radio&lt;/code&gt;, &lt;code&gt;speak&lt;/code&gt;, and &lt;code&gt;boop&lt;/code&gt; (playing a sound effect based on whether the previous command succeeded or failed), system helpers like &lt;code&gt;theme&lt;/code&gt; to toggle light/dark mode, &lt;code&gt;sleepybear&lt;/code&gt; to hibernate, &lt;code&gt;murder&lt;/code&gt; to kill processes, and &lt;code&gt;bb&lt;/code&gt; to detach background processes cleanly, plus quick lookup tools like &lt;code&gt;emoji&lt;/code&gt;, &lt;code&gt;httpstatus&lt;/code&gt;, and &lt;code&gt;alphabet&lt;/code&gt;. For newer developers, it&amp;rsquo;s great inspiration to start automating repetitive daily tasks with small scripts; the full source is available in his &lt;a href="https://codeberg.org/EvanHahn/dotfiles" rel="noopener noreferrer"&gt;dotfiles&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="sql-anti-patterns-you-should-avoid"&gt;&lt;a href="https://datamethods.substack.com/p/sql-anti-patterns-you-should-avoid" rel="noopener noreferrer"&gt;SQL Anti-Patterns You Should Avoid&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Writing on Data Methods, Jordan Goodman rounds up six common SQL anti-patterns that make queries slow and hard to maintain. First, overusing &lt;code&gt;CASE WHEN&lt;/code&gt; to translate status codes inline across views creates duplication and inconsistency; instead, create a dimension table or view sourced from the canonical status table. Second, wrapping indexed columns in functions like &lt;code&gt;UPPER()&lt;/code&gt; can prevent the database from using an index seek on the base column; depending on the DBMS, use expression indexes or computed columns instead, making sure any rewritten predicate preserves exact comparison semantics. Third, using &lt;code&gt;SELECT *&lt;/code&gt; in views makes downstream dependencies brittle when schemas change and pulls in unnecessary columns; always list required columns explicitly.&lt;/p&gt;
&lt;p&gt;Fourth, slapping &lt;code&gt;DISTINCT&lt;/code&gt; onto a query to hide duplicate rows usually masks a broken join condition; the real fix is correcting the join logic. Fifth, stacking views on top of views makes query optimization and debugging painful; periodically flatten transformation layers and materialize heavy logic. Sixth, deeply nested subqueries are hard to read and debug; refactor them into CTEs. The author stresses treating SQL like production application code—with version control, code review, and performance tuning—investing in clean design upfront to avoid technical debt, and recommends Bill Karwin&amp;rsquo;s book &lt;em&gt;SQL Antipatterns&lt;/em&gt; for a deeper dive.&lt;/p&gt;
&lt;h2 id="build-your-own-database"&gt;&lt;a href="https://www.nan.fyi/database" rel="noopener noreferrer"&gt;Build Your Own Database&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This interactive tutorial guides readers through building a key-value database from scratch to demystify how LSM Trees work under the hood. It starts with a plain file, where in-place updates require expensive data shifting, motivating a switch to an append-only log: records are immutable, every write appends to the end of the file, and deletes write a special tombstone marker. To keep the file from growing forever, the log is split into fixed-size segments that are periodically compacted in the background to discard superseded records. Next, an in-memory hash table maps each key to its byte offset in the file for fast lookups without full-file scans, trading a bit of write speed for fast reads.&lt;/p&gt;
&lt;p&gt;Once segment data is stored in sorted order, we only need a smaller sparse index in memory because any key&amp;rsquo;s position can be narrowed down between two known index entries. To maintain sorted order while keeping writes fast, incoming writes go into a memtable (an in-memory balanced tree) backed by an append-only write-ahead log for crash recovery; when the memtable fills up, it flushes to disk as an immutable SSTable (Sorted String Table) with its own index. Combining the memtable, write-ahead log, and SSTables gives you an LSM Tree—the foundation of large-scale key-value stores like Google&amp;rsquo;s LevelDB and Amazon&amp;rsquo;s DynamoDB, whereas relational databases like PostgreSQL typically use B-trees for indexes (with table rows stored in heaps).&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 #43</title><link>https://miti99.com/en/post/2025/08/02/</link><pubDate>Sat, 02 Aug 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/08/02/</guid><description>&lt;p&gt;&lt;em&gt;&lt;del&gt;For this post, I switched the tool to Qwen Code and the model to Qwen 3 Coder, running via the OpenRouter API. Just experimenting a bit to see how it goes.&lt;/del&gt; Enjoy Newsletter #43.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="augmented-coding-beyond-the-vibes"&gt;&lt;a href="https://tidyfirst.substack.com/p/augmented-coding-beyond-the-vibes" rel="noopener noreferrer"&gt;Augmented Coding: Beyond the Vibes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kent Beck distinguishes between two ways of working with AI: &amp;ldquo;vibe coding&amp;rdquo; only cares that the system exhibits the right behavior, ignoring code quality and simply feeding errors back to the AI to fix; while &amp;ldquo;augmented coding&amp;rdquo; preserves the values of traditional programming—such as clean code, low complexity, testing, and full coverage—with the only difference being that the programmer types less. To illustrate, he built a B+ Tree library called BPlusTree3 in Rust and Python, which took about four weeks and three rewrites because the first two versions accumulated too much complexity and left the AI stuck. He applied TDD alongside a strict system prompt: separate structural changes from behavioral changes, work on only one unchecked test in &lt;code&gt;plan.md&lt;/code&gt; at a time, and write just enough code for that test to pass. When Rust&amp;rsquo;s memory model caused complexity to spike, he switched to writing in Python and had the agent translate it back into Rust.&lt;/p&gt;
&lt;p&gt;Beck points out three signs that the AI is going off track: looping, adding unrequested features on its own, and &amp;ldquo;cheating&amp;rdquo; by disabling or deleting tests. As a result, the Rust and Python versions achieved competitive performance—slower than standard libraries on a few operations, but faster on range scans; the AI even wrote a C extension for Python with good performance, though its code quality still fell short of his standards. According to Beck, programming with AI remains enjoyable: most setup tedium disappears, and programmers make more consequential decisions per hour of work.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;With the combo above, after writing the first entry, it started looping—sending 3–4 requests to OpenRouter and then getting completely stuck. And that first entry also took a very long time. Next, I&amp;rsquo;ll try Qwen Code with Kimi K2.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update: it seems Qwen Code doesn&amp;rsquo;t work with Kimi K2—I ran into &lt;code&gt;API Error: Internal Server Error&lt;/code&gt; :v Next up, let&amp;rsquo;s try Cline with Qwen 3 Coder.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="coding-agents-have-crossed-a-chasm"&gt;&lt;a href="https://blog.singleton.io/posts/2025-06-14-coding-agents-cross-a-chasm/" rel="noopener noreferrer"&gt;Coding agents have crossed a chasm&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;David Singleton argues that in recent months, coding agents have crossed a &amp;ldquo;chasm&amp;rdquo;: from smart autocomplete tools, to real-time pair-programming collaborators, they now resemble a dedicated intern capable of taking on an entire task end-to-end. He uses Claude Code to write small personal tools while barely reading the source code, just running and tweaking them iteratively; a photo-reorganizing script cost only $0.31 in tokens. At work, he hands off simple bugs for Codex to handle end-to-end, and uses GitHub-integrated Claude Code for code reviews, catching issues humans missed. The most impressive example was a race condition in an OAuth integration flow: after 45 minutes of fruitless manual debugging, he asked Claude to draw an ASCII sequence diagram of the entire flow and found the root cause in 10 minutes.&lt;/p&gt;
&lt;p&gt;The author also warns of the &amp;ldquo;mirror effect&amp;rdquo;: the tool amplifies both the user&amp;rsquo;s strengths and weaknesses. On one occasion, the model kept proposing increasingly convoluted solutions and he kept following along, when the actual fix was embarrassingly simple. AI is also prone to band-aiding architectural problems rather than encouraging refactoring, and developers without a solid foundation can be misled by plausible-sounding but wrong suggestions. Even so, he believes the line between &amp;ldquo;AI-assisted&amp;rdquo; and &amp;ldquo;autonomous AI&amp;rdquo; will continue to blur: humans retain ownership of design and key decisions, while AI handles implementation so developers can focus on architecture, user experience, and business logic.&lt;/p&gt;
&lt;h2 id="how-databases-store-your-tables-on-disk"&gt;&lt;a href="https://www.deepintodev.com/blog/how-databases-store-your-tables-on-disk" rel="noopener noreferrer"&gt;How Databases Store Your Tables on Disk&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kaan Pekşen explains how databases actually store tables on disk. The fundamental unit is a page, a fixed-size block of data—for example, 8KB in PostgreSQL and 16KB in MySQL. A database does not read individual rows; it reads an entire page in a single I/O operation, so once a page is in the buffer cache, every row inside it is readily available. Table pages are stored in a heap, where data is placed wherever free space exists, leaving pages in no particular order; searching a heap therefore usually requires a full table scan. An index is a separate structure, typically a B-Tree, containing the indexed column values along with row identifiers, making it possible to pinpoint the exact page to read instead of scanning everything; the index itself is also stored as pages and costs I/O to read.&lt;/p&gt;
&lt;p&gt;With a clustered index, table data is physically sorted according to the index key, so each table can have only one such index; MySQL&amp;rsquo;s InnoDB uses the primary key as the clustered index by default, or a qualifying unique index, falling back to a hidden 6-byte ID if the table has no primary key. Consequently, in InnoDB, secondary indexes point to the primary key value before reaching the data, whereas PostgreSQL points directly to the row&amp;rsquo;s location in the heap via the &lt;code&gt;ctid&lt;/code&gt; column. The article draws several practical lessons: reduce I/O operations through sensible indexing, avoid random UUIDs as primary keys in InnoDB because random inserts degrade performance (auto-incrementing integers are better), and understand that under MVCC, PostgreSQL handles an update as a DELETE plus an INSERT.&lt;/p&gt;
&lt;h2 id="software-engineering-with-llms-in-2025-reality-check"&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/software-engineering-with-llms-in-2025" rel="noopener noreferrer"&gt;Software engineering with LLMs in 2025: reality check&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gergely Orosz synthesizes his keynote at the LDX3 conference in London along with interviews across AI tooling companies, Big Tech, AI startups, and veteran engineers to assess the reality of using LLMs in software engineering. On one side are bold CEO claims like &amp;ldquo;within a year, all code will be written by AI&amp;rdquo;; on the other are real-world failures like a tool causing a $733 bug or the GitHub Copilot agent repeatedly stumbling on .NET repositories. At AI tooling companies, the numbers are very high: roughly 90% of Claude Code&amp;rsquo;s codebase is written by Claude Code itself, Windsurf is around 95%, and Cursor is at 40–50%. Google is building AI-integrated internal tools and preparing for a tenfold increase in code volume, while Amazon is becoming an &amp;ldquo;MCP-first&amp;rdquo; company built on thousands of internal APIs. Among startups, incident.io uses Claude Code heavily, whereas a biotech startup found AI tools less useful than traditional tools like ruff or uv.&lt;/p&gt;
&lt;p&gt;Many veteran engineers—such as Armin Ronacher, Simon Willison, Kent Beck, and Martin Fowler—are enthusiastic about agentic tools. Still, open questions remain: why executives are more enthusiastic than developers, why only about half of developers use AI tools weekly, and why median time savings sit at around 4 hours per week, far from the promised 10x productivity boost. The article concludes that agentic tools could represent a major shift akin to moving from assembly to high-level languages, but writing code faster does not automatically translate to shipping software faster unless the surrounding infrastructure and processes evolve alongside it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Overall, the Cline + Qwen 3 Coder combo works, but it&amp;rsquo;s a bit slow and the output is somewhat rambling—I asked for a summary, yet it wrote very long passages (this might be because I haven&amp;rsquo;t optimized the prompt yet, since I only told it to read &lt;code&gt;CLAUDE.md&lt;/code&gt;). Next, let&amp;rsquo;s try Cline with Kimi K2.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="continuous-ai"&gt;&lt;a href="https://www.seangoedecke.com/continuous-ai/" rel="noopener noreferrer"&gt;Continuous AI&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke defines &amp;ldquo;Continuous AI&amp;rdquo; as any way of automatically integrating AI tools into existing development workflows, much like how tests or type checks run continuously without a developer having to manually trigger them. Instead of only using AI when opening a chat window, AI becomes an ever-present support layer: automated pull request reviews, issue and pull request labeling, periodic summary digests for team coordination, or Copilot-style code completion. The author&amp;rsquo;s view shifted after trying Copilot&amp;rsquo;s pull request review feature: most comments aren&amp;rsquo;t particularly valuable, but roughly once every five to ten times it catches something he missed, and since skimming the comments takes very little effort, it is still worth using.&lt;/p&gt;
&lt;p&gt;For experimentation, the author suggests combining GitHub Models (an inference API with a free tier) with GitHub Actions, bringing AI into existing workflows at very low cost. In his view, rather than chasing fully autonomous &amp;ldquo;AI engineers,&amp;rdquo; a more realistic near-term future is multiple layers of AI systems handling automated checks, organization, and other parts of the software engineering workflow alongside human developers.&lt;/p&gt;
&lt;h2 id="caching-is-an-abstraction-not-an-optimization"&gt;&lt;a href="https://buttondown.com/jaffray/archive/caching-is-an-abstraction-not-an-optimization/" rel="noopener noreferrer"&gt;Caching is an abstraction, not an optimization&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Justin Jaffray argues that caching should be understood first and foremost as an abstraction that simplifies software, rather than merely a performance optimization to avoid hitting slow storage tiers. This perspective creates a clean boundary between storage layers: the rest of the system simply reads and writes data without needing to know whether that data currently resides in a fast tier or a slow tier. The author points to database buffer pools and operating system page caches as examples: they automatically promote frequently accessed data to faster storage without developer intervention, completely hiding the management of storage tiers.&lt;/p&gt;
&lt;p&gt;From this, the author draws two conclusions. First, data access patterns in real-world workloads are too unpredictable, making reliance on heuristics and caching algorithms unavoidable; hand-crafting custom solutions for each case is not a practical option. Second, caching is such a good abstraction that it deserves careful study to operate better in practice: precisely because it succeeds, its importance usually remains invisible until something goes wrong.&lt;/p&gt;
&lt;h2 id="you-should-delete-tests"&gt;&lt;a href="https://andre.arko.net/2025/06/30/you-should-delete-tests/" rel="noopener noreferrer"&gt;You should delete tests&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;André Arko pushes back against the common industry dogma that tests should never be deleted. In his view, tests have only one purpose: giving humans confidence that they can change code without breaking existing functionality. Any test that no longer serves that purpose should be deleted rather than kept out of principle.&lt;/p&gt;
&lt;p&gt;He outlines several specific cases. Flaky tests do the most harm because they fail randomly, eroding engineers&amp;rsquo; trust even in real failures; the phrase &amp;ldquo;it failed because of that flaky test, it&amp;rsquo;s actually fine&amp;rdquo; gets repeated even when the code is genuinely broken, and spending days debugging such a test often costs more than a future bug would. Over-specified tests—where changing a single line of code requires updating 150 tests—also create false confidence; three meaningful checks are worth more than 150 of those. A test suite so slow that nobody runs it between merges is no different from a fake &amp;ldquo;pass.&amp;rdquo; And tests for old business requirements after a product pivot should be replaced with tests for the new behavior, not patched just to pass. The author isn&amp;rsquo;t against writing tests; he simply wants the test suite to actually do its job of building confidence.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;I found that Cline + Kimi K2 also generates long outputs (likely due to the prompt as mentioned above), but on the bright side, its response time is quite fast, so at least I don&amp;rsquo;t have to wait long. I&amp;rsquo;ll try to improve the prompt in the &amp;ldquo;distant&amp;rdquo; future. Tomorrow I&amp;rsquo;ll test Roo Code + Qwen 3 Coder / Kimi K2 first. See you in tomorrow&amp;rsquo;s post!&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 #40</title><link>https://miti99.com/en/post/2025/07/30/</link><pubDate>Wed, 30 Jul 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/07/30/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #40.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="a-new-way-to-test-multi-threaded-and-concurrent-java"&gt;&lt;a href="https://vmlens.com/blog/new-way-to-test-multi-threaded-concurrent-java/" rel="noopener noreferrer"&gt;A new way to test multi-threaded and concurrent Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Testing multithreaded Java code is hard because a single test run exercises only one specific thread interleaving. Running a test repeatedly in hopes of hitting every timing permutation only works for tiny snippets, since every field access can introduce a new interleaving. VMLens tackles this by systematically exploring interleavings at synchronization actions (&lt;code&gt;volatile&lt;/code&gt; accesses, &lt;code&gt;synchronized&lt;/code&gt; blocks, locks) and checking test runs for data races. The theoretical foundation is straightforward: a program free of data races has simple interleaving semantics, so testing only needs to permute synchronization points.&lt;/p&gt;
&lt;p&gt;Under the hood, VMLens runs as a Java agent that instruments bytecode to record field accesses and synchronization events, analyzing traces offline rather than trying to detect bugs mid-execution. For every pair of non-commuting synchronization actions, the tool tests both orderings and combines them to cover the state space. The post walks through examples using &lt;code&gt;volatile&lt;/code&gt; fields and &lt;code&gt;ReentrantLock&lt;/code&gt;, noting that VMLens treats Java&amp;rsquo;s standard concurrency primitives as already correct and focuses on verifying whether application code uses them properly. With CPU core counts still climbing (hitting 288 cores in 2025), it offers a missing piece for verifying concurrent code with confidence.&lt;/p&gt;
&lt;h2 id="feature-freeze-for-jdk-25-what-will-the-new-edition-bring"&gt;&lt;a href="https://www.jvm-weekly.com/p/feature-freeze-for-jdk-25-what-will" rel="noopener noreferrer"&gt;Feature Freeze for JDK 25: What Will the New Edition Bring?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;JVM Weekly rounds up what is landing in JDK 25 following its feature freeze on June 5, 2025. As a Long-Term Support (LTS) release scheduled for general availability on September 16, 2025, it will receive at least five years of Oracle Premier Support. Several language and library features are finalized: Scoped Values (JEP 506) for safely sharing immutable context across threads; Module Import Declarations (JEP 511) allowing &lt;code&gt;import module M;&lt;/code&gt; to bring an entire module&amp;rsquo;s exported API into scope; Compact Source Files (JEP 512) enabling concise &lt;code&gt;void main()&lt;/code&gt; entry points that cut boilerplate for beginners; Flexible Constructor Bodies (JEP 513) allowing statements before &lt;code&gt;super()&lt;/code&gt; or &lt;code&gt;this()&lt;/code&gt; calls; and a Key Derivation Function API (JEP 510) for cryptography.&lt;/p&gt;
&lt;p&gt;On the runtime and performance side, Compact Object Headers (JEP 519) reduce per-object memory overhead, Generational Shenandoah (JEP 521) graduates to production status, the 32-bit x86 port is removed, and AOT cache ergonomics plus method profiling (JEP 514/515) speed up application warmup. JDK Flight Recorder gains experimental Linux CPU-time profiling (JEP 509) alongside method timing and tracing events (JEP 520). Preview and incubator features include Stable Values, PEM encoding, Structured Concurrency (fifth preview with a redesigned API), primitive types in &lt;code&gt;instanceof&lt;/code&gt; and &lt;code&gt;switch&lt;/code&gt; patterns, and the Vector API (tenth incubation). As an LTS milestone, JDK 25 shapes up as a compelling upgrade target for enterprise teams.&lt;/p&gt;
&lt;h2 id="if-virtual-threads-are-the-solution-what-is-the-problem"&gt;&lt;a href="https://webtide.com/if-virtual-threads-are-the-solution-what-is-the-problem/" rel="noopener noreferrer"&gt;If Virtual Threads are the solution, what is the problem?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Webtide, the team behind Eclipse Jetty, flips the usual question around: if virtual threads are the answer, what is the actual problem? In their view, virtual threads shine when an application blocks on &amp;ldquo;scalable resources&amp;rdquo;—resources that add latency but can handle higher concurrency as load grows, such as remote databases and microservices, slow client network connections, or local filesystems. Because virtual threads are cheap to create, they let a server keep many concurrent operations in flight while platform threads would otherwise sit idle waiting on I/O.&lt;/p&gt;
&lt;p&gt;However, virtual threads do not automatically make an application more scalable. When the bottleneck is a finite resource like CPU cores, database connection pools, or locks, spawning more threads is like adding more cars to fix a traffic jam. Waiting threads aren&amp;rsquo;t free either: a request blocked deep inside application code still holds onto I/O buffers, session objects, a deep call stack, and heap allocations, so waiting carries real memory cost even when the thread itself is virtual. Without concurrency limits, the lack of backpressure can trigger cascading resource exhaustion under peak load. Webtide recommends letting an asynchronous server like Jetty read requests asynchronously and buffer content before handing off to a virtual thread for business logic—keeping straightforward blocking code where it helps without letting in-flight memory balloon. The takeaway: diagnose where your application actually bottlenecks before treating virtual threads as a scaling strategy.&lt;/p&gt;
&lt;h2 id="agentic-coding-recommendations"&gt;&lt;a href="https://lucumr.pocoo.org/2025/6/12/agentic-coding/" rel="noopener noreferrer"&gt;Agentic Coding Recommendations&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Armin Ronacher, creator of Flask, shares his practical playbook for working with coding agents. He runs Claude Code with Sonnet, disables interactive permission prompts, and contains risk by isolating the environment inside Docker; he uses MCP sparingly, favoring simple shell scripts instead. For backend work, he recommends Go: its explicit &lt;code&gt;context&lt;/code&gt; plumbing makes data flow obvious, incremental tests run fast, structural interfaces don&amp;rsquo;t trip up language models, and the stable ecosystem means agents rarely hallucinate outdated APIs. Python, by contrast, trips agents up with &amp;ldquo;magic&amp;rdquo; like pytest fixtures, async subtleties, and slow interpreter startup.&lt;/p&gt;
&lt;p&gt;For developer tooling, his top priorities are speed, clear error messages, guardrails against misuse, and strong observability; he puts core workflows in a &lt;code&gt;Makefile&lt;/code&gt; with safety checks that prevent duplicate background services and log everything to files the agent can inspect. On code style, he advises writing &amp;ldquo;the simplest thing that could possibly work&amp;rdquo;: prefer plain functions with descriptive names over class hierarchies, avoid inheritance and elaborate design patterns, write raw SQL so the agent can correlate queries with database logs, and keep permission checks close to business logic rather than hidden in configuration files. Agents can also run in parallel across multiple sessions using the filesystem as shared state and containers for isolation. His conclusion: succeeding with agentic coding comes down to simplicity, stability, observability, and timely refactoring.&lt;/p&gt;
&lt;h2 id="ai-changes-everything"&gt;&lt;a href="https://lucumr.pocoo.org/2025/6/4/changes/" rel="noopener noreferrer"&gt;AI Changes Everything&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this reflective essay, Armin Ronacher argues that AI is an irreversible shift on the scale of the printing press or the steam engine, and urges engineers to meet it with curiosity, responsibility, and optimism. Personally, he now uses Claude Code for most of his development work instead of writing code by hand in Cursor. His raw coding speed hasn&amp;rsquo;t necessarily increased, but he reclaims roughly 30% of his day because the AI handles execution while his own role shifts toward managing, reviewing, and delegating.&lt;/p&gt;
&lt;p&gt;Ronacher notes that AI adoption is moving far faster than previous technology waves, including smartphones: baristas, hairdressers, and parents are already using these tools daily. Unlike the cloud era—where most countries simply consumed US-built infrastructure—AI carries the strategic inevitability of the steam engine, meaning every nation will want sovereign models and domestic control. He places AI in the category of civilization-reshaping technologies rather than just another platform wave like search engines or social media. His closing message is to view AI as a tool that expands what humans can accomplish rather than a threat, in a decade that may resemble the historical moments when new technology fundamentally rewired society.&lt;/p&gt;
&lt;h2 id="how-i-program-with-agents"&gt;&lt;a href="https://crawshaw.io/blog/programming-with-agents" rel="noopener noreferrer"&gt;How I program with Agents&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;David Crawshaw defines a coding agent concisely: &amp;ldquo;essentially a for-loop around an LLM call.&amp;rdquo; The model runs a command, observes the output, and keeps going without human intervention between turns, making it far more capable than one-shot code generation on a &amp;ldquo;virtual whiteboard.&amp;rdquo; Agents use standard developer tools—bash commands, file patching, web browsing, and automated code review—to navigate a codebase, compile, run tests, and iterate until the task is done. Environmental feedback makes the model noticeably sharper: documentation lookups improve API accuracy, compiler errors eliminate syntax hallucinations, test suites raise code quality, and targeted file reads let it work in repositories far larger than its context window.&lt;/p&gt;
&lt;p&gt;For Crawshaw, the biggest win is maintaining momentum through tedious integration plumbing so he can save his energy for hard design problems. Still, agents consume real time and compute: a single prompt can burn tens of thousands of intermediate tokens and take several minutes per loop, costs remain nontrivial even as inference gets cheaper, and agents still struggle with subtle architectural judgment and thorny dependency upgrades. Looking ahead, Crawshaw expects agents to run inside containers for safety and parallelism, IDEs to evolve around editable diffs, SSH workspaces, and code-review-style feedback loops, and team review practices to be redesigned from the ground up.&lt;/p&gt;
&lt;h2 id="performance-best-practise-no-1-optimize-database-operations"&gt;&lt;a href="https://foojay.io/today/performance-best-practise-no-1-optimize-database-operations/" rel="noopener noreferrer"&gt;Performance Best Practise No. 1: Optimize Database Operations&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This Foojay article kicks off a Java performance series with the single highest-impact area: optimizing database operations. Because establishing a database connection is expensive, connection pooling is foundational. Using GlassFish as an example, pools can be configured via the admin console, CLI, XML datasource definitions, or annotations, centering on three key parameters: a maximum pool size aligned with the database&amp;rsquo;s capacity, an idle timeout shorter than the database&amp;rsquo;s own timeout to avoid stale connections, and statement cache size.&lt;/p&gt;
&lt;p&gt;Statement caching stores frequently executed SQL statements (&lt;code&gt;Statement&lt;/code&gt;, &lt;code&gt;PreparedStatement&lt;/code&gt;, &lt;code&gt;CallableStatement&lt;/code&gt;) for reuse so the database doesn&amp;rsquo;t repeatedly parse and plan them; GlassFish can provide this caching even when the underlying JDBC driver doesn&amp;rsquo;t. JDBC batching groups multiple writes via &lt;code&gt;addBatch()&lt;/code&gt; and sends them in a single network round-trip with &lt;code&gt;executeBatch()&lt;/code&gt;. At the JPA layer, EclipseLink supports batch writing through the &lt;code&gt;eclipselink.jdbc.batch-writing&lt;/code&gt; property (&lt;code&gt;jdbc&lt;/code&gt; or &lt;code&gt;buffered&lt;/code&gt;) alongside a configurable batch size, and allows disabling batching on individual queries via query hints when needed. Finally, the author advises monitoring connection pool metrics and query latencies closely, and load-testing configuration changes under realistic traffic before shipping to production.&lt;/p&gt;
&lt;h2 id="agent-rules---a-collection-of-rules-and-knowledge-for-ai-coding-assistants"&gt;&lt;a href="https://github.com/steipete/agent-rules" rel="noopener noreferrer"&gt;Agent Rules - A collection of rules and knowledge for AI coding assistants&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Peter Steinberger, founder of PSPDFKit, curates a repository of rules and reference docs for AI coding assistants aimed at creating a unified, reusable format across tools. Rules are authored as &lt;code&gt;.mdc&lt;/code&gt; files (Markdown with frontmatter metadata) for Cursor, while the plain Markdown body can be imported directly into Claude Code via &lt;code&gt;CLAUDE.md&lt;/code&gt;. The repository is organized into three buckets: project rules covering development workflows, code quality checks, problem-solving habits, documentation, and automation; reference docs, such as a Swift 6 migration guide and best practices for building MCP servers; and global rules containing reusable helper scripts across projects.&lt;/p&gt;
&lt;p&gt;Adoption is straightforward: for Cursor, copy the &lt;code&gt;.mdc&lt;/code&gt; files into &lt;code&gt;.cursor/rules/&lt;/code&gt;; for Claude Code, reference the Markdown files from &lt;code&gt;CLAUDE.md&lt;/code&gt;. Each rule is written to be concise, actionable, and portable across repositories. Because both tools share the same underlying Markdown instructions, the community can iterate on and share battle-tested agent workflows in one place instead of maintaining separate rule sets per editor.&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 #23</title><link>https://miti99.com/en/post/2025/05/10/</link><pubDate>Sat, 10 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/10/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #23.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="llms-an-operator"&gt;&lt;a href="https://theengineeringmanager.substack.com/p/llms-an-operators-view" rel="noopener noreferrer"&gt;LLMs: An Operator&amp;rsquo;s View&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;James Stanier looks at LLMs from the perspective of someone running an engineering organization. In his view, the baseline productivity floor for developers is rising: even skeptics acknowledge that tools like Copilot and Cursor speed up prototyping, code completion, and unit test generation. Engineering leaders should therefore proactively budget for paid seats and roll them out deliberately—surveying adoption, identifying internal champions to share workflows, and tracking impact over time. As individual output rises, teams can deliver more with fewer people, so before opening new headcount, leaders should first invest in tooling and training for their existing team, which costs a fraction of hiring another senior engineer.&lt;/p&gt;
&lt;p&gt;The flip side is that faster code generation does not automatically mean higher quality. Stanier recommends tightening code review practices—such as requiring multiple reviewers and running regular security refreshers for the team. Hiring is affected too: candidates using LLMs during remote interviews muddy evaluation signals, so companies need an explicit policy—either embracing AI tools and testing critical thinking, or banning them outright—and must communicate those rules upfront to candidates. The bottom line: adopting LLMs is now table-stakes infrastructure investment, paired with the guardrails needed to protect code quality and hiring standards.&lt;/p&gt;
&lt;h2 id="the-reality-of-tech-interviews-in-2025"&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/the-reality-of-tech-interviews" rel="noopener noreferrer"&gt;The Reality of Tech Interviews in 2025&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gergely Orosz, joined by Evan King (former Staff Engineer at Meta) and Stefan Mai (former Engineering Manager at Amazon and Meta), paints a picture of a tech hiring market that is simultaneously recovering and much tougher. Open roles at Big Tech are up roughly 40% year over year, and total tech job postings have climbed from their 2023 trough of 163,000 to around 230,000, though still far below the 2020–2022 peak. The recovery is highly uneven: AI infrastructure and ML ops roles command top-tier compensation, while new grads face brutal odds—one candidate applied to 100 companies, landed just 4 interviews, and received zero offers after six months. Mid-level loops have stretched out too, with one candidate going through eleven interview rounds before getting an offer.&lt;/p&gt;
&lt;p&gt;The bar for data structures, algorithms, and system design rounds has also risen noticeably: interviewers now expect complete, working solutions with proper error handling and input validation. Two standout trends are &amp;ldquo;downleveling&amp;rdquo;—where staff-level engineers accept senior roles after prolonged job searches—and &amp;ldquo;team matching&amp;rdquo; turning into an extra filtering stage that can stall offers for months. The authors advise preparing thoroughly for both technical and behavioral rounds at every level, especially for specialized roles, and lining up competing offers so you don&amp;rsquo;t get stuck in team-matching limbo.&lt;/p&gt;
&lt;h2 id="senior-developer-skills-in-the-ai-age-leveraging-experience-for-better-results"&gt;&lt;a href="https://manuel.kiessling.net/2025/03/31/how-seasoned-developers-can-achieve-great-results-with-ai-coding-agents/" rel="noopener noreferrer"&gt;Senior Developer Skills in the AI Age: Leveraging Experience for Better Results&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Manuel Kießling argues that AI coding agents like Cursor do not devalue senior engineering experience—they amplify it. While AI models have broad programming knowledge, they have almost no innate understanding of a project&amp;rsquo;s specific architecture, meaning results depend heavily on how a human guides them. Drawing on his team&amp;rsquo;s experience at Joboo, Kießling outlines three practices. First, well-structured requirements: clearly describing data relationships, system architecture, and task boundaries so the AI doesn&amp;rsquo;t wander off track. Second, tool-based guardrails: linters, static analysis, and automated test suites that provide continuous feedback so the agent can self-correct whenever a check fails. Third, file-based &amp;ldquo;keyframing&amp;rdquo;: creating empty skeleton files with the right namespaces and naming conventions upfront so the AI writes code that fits the existing structure instead of inventing random files.&lt;/p&gt;
&lt;p&gt;Using these techniques, his team shipped an entire contract-management feature spanning multiple applications and repositories in minutes rather than hours. Kießling even had the AI build a Python monitoring tool from scratch in a few hours despite having limited Python experience himself, thanks to thorough requirements docs and automated guardrails. The lesson: upfront planning matters more than ever—AI can execute almost anything, and experienced engineers are there to make sure it builds the right thing.&lt;/p&gt;
&lt;h2 id="jep-483-ahead-of-time-class-loading--linking"&gt;&lt;a href="https://www.morling.dev/blog/jep-483-aot-class-loading-linking/" rel="noopener noreferrer"&gt;JEP 483: Ahead-of-Time Class Loading &amp;amp; Linking&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gunnar Morling puts JEP 483—a Java 24 feature from Project Leyden—to the test, showing how it cuts Java application startup time without requiring any source code changes. The idea is shifting class loading and linking from runtime to build time, building on top of existing Application Class Data Sharing (AppCDS) machinery. Creating the AOT cache takes a two-step training run: first recording loaded classes into a configuration file, then generating the cache image from that configuration, with the classpath kept identical between training and production runs.&lt;/p&gt;
&lt;p&gt;On Apache Kafka 4.0, the resulting AOT cache file weighs around 66 MB and drops startup time from 690 ms to 285 ms—a 59% reduction—with most of the savings coming from skipping class reading and parsing. On Apache Flink, time to first message drops from 1.875 seconds to 0.913 seconds, a 51% improvement. Some limitations remain: custom class loaders are not yet supported, JVM startup flags must be adjusted, and integrating the training run into container image builds can add pipeline complexity. Compared with GraalVM native images—which start in milliseconds and use less memory but require code adjustments and a closed-world assumption—Project Leyden aims for a pragmatic middle ground that is immediately useful for cloud-native Java services.&lt;/p&gt;
&lt;h2 id="specifications-in-jakarta-data"&gt;&lt;a href="https://in.relation.to/2025/03/28/repository-specifications/" rel="noopener noreferrer"&gt;Specifications in Jakarta Data&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gavin King (Hibernate) shows how to implement the &amp;ldquo;specifications&amp;rdquo; pattern—familiar from Spring Data—on top of Jakarta Data. Specifications allow dynamic query filtering via the JPA Criteria API without repetitive boilerplate. While Jakarta Data does not yet include built-in specification support, King demonstrates that all it takes is a shared super-interface &lt;code&gt;JpaRepository&amp;lt;T&amp;gt;&lt;/code&gt; exposing two methods: &lt;code&gt;session()&lt;/code&gt; returning Hibernate&amp;rsquo;s &lt;code&gt;StatelessSession&lt;/code&gt; and &lt;code&gt;entityClass()&lt;/code&gt; returning the entity class. Built on top of those, &lt;code&gt;find()&lt;/code&gt; and &lt;code&gt;count()&lt;/code&gt; accept a specification modeled as a &lt;code&gt;BiFunction&amp;lt;CriteriaBuilder, Root&amp;lt;T&amp;gt;, Predicate&amp;gt;&lt;/code&gt; and construct the corresponding Criteria query.&lt;/p&gt;
&lt;p&gt;Paired with the JPA static metamodel, this approach is fully type-safe, catching misspelled attribute names or type mismatches at compile time. King also includes a &lt;code&gt;compose()&lt;/code&gt; helper for combining multiple specifications and hints that Jakarta Data 1.1 is working on a &amp;ldquo;much more interesting&amp;rdquo; native solution. The two snippets below count books matching a title pattern and find books matching both title and author name:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;library&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;like&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Book_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;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-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;library&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;find&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;and&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;like&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Book_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Book_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;authors&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Author_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;equalTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;authorName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="there-is-no-vibe-engineering"&gt;&lt;a href="https://serce.me/posts/2025-03-31-there-is-no-vibe-engineering" rel="noopener noreferrer"&gt;There is no Vibe Engineering&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sergey Tselovalnikov (SerCe) contrasts &amp;ldquo;vibe coding&amp;rdquo;—Andrej Karpathy&amp;rsquo;s term for programming primarily via AI prompts rather than working directly with code—with real software engineering. His central thesis builds on the classic definition that &amp;ldquo;software engineering is programming integrated over time&amp;rdquo;: vibe coding solves for a single point in time, whereas production systems must survive real-world traffic, scale with demand, withstand security threats, migrate live user data, and adapt to changing requirements. AI can spin up prototypes remarkably fast, but these long-term concerns are hard to express in a prompt and impossible to verify just by eyeballing the UI. Good engineering practices push failure modes left, where fixing them is cheap; vibe coding pushes them right, where fixing them is expensive.&lt;/p&gt;
&lt;p&gt;Tselovalnikov imagines a future where &amp;ldquo;vibe engineering&amp;rdquo; could exist: systems assembled from strictly encapsulated AI-generated components surrounded by rigorous automated testing, profiling, tracing, canary deployments, and protocol compatibility checks. In that world, the engineer&amp;rsquo;s role blends software architect and platform engineer—writing less application code by hand while spending far more energy on boundaries and verification. Yet that is still traditional software engineering, just operating with new tools. In his view, the true inflection point will only arrive when engineers feel comfortable going on call for a production service written entirely by AI—something very few would dare do today.&lt;/p&gt;
&lt;h2 id="refining-var-handles-in-valhalla"&gt;&lt;a href="https://cr.openjdk.org/~jrose/values/atomic-value-access-api.html" rel="noopener noreferrer"&gt;Refining Var-Handles in Valhalla&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This technical design note by John Rose (OpenJDK) explores how &lt;code&gt;VarHandle&lt;/code&gt;—Java&amp;rsquo;s API for heap variable access supporting &lt;code&gt;getfield&lt;/code&gt;, &lt;code&gt;putfield&lt;/code&gt;, and atomic operations like CAS—needs to evolve to support value types in Project Valhalla. The core challenge is ensuring the interpreter, JIT compiler, and JNI access memory consistently when a variable can be laid out in multiple physical representations on the heap. The &lt;code&gt;LayoutKind&lt;/code&gt; enum defines six representations: &lt;code&gt;REFERENCE&lt;/code&gt; for traditional nullable managed pointers, &lt;code&gt;ATOMIC_FLAT&lt;/code&gt; for values packed into 64 bits, &lt;code&gt;NON_ATOMIC_FLAT&lt;/code&gt; for multi-field values wider than 64 bits, their nullable counterparts &lt;code&gt;NULLABLE_ATOMIC_FLAT&lt;/code&gt; and &lt;code&gt;NULLABLE_NON_ATOMIC_FLAT&lt;/code&gt; (which include a null indicator), and &lt;code&gt;BUFFERED&lt;/code&gt; for read-only heap-buffered copies.&lt;/p&gt;
&lt;p&gt;Rose proposes retiring the current internal &lt;code&gt;getValue&lt;/code&gt; method as insufficient, replacing it with three metadata queries and one new access primitive: &lt;code&gt;isFlat()&lt;/code&gt; to distinguish flattened values from ordinary references, &lt;code&gt;isConsistent()&lt;/code&gt; to indicate whether reads and writes are strictly atomic (non-tearing), &lt;code&gt;isPortableAtomic()&lt;/code&gt; to indicate support for advanced atomic operations like CAS, and &lt;code&gt;copyConsistentValue()&lt;/code&gt; to atomically copy heap words according to the layout&amp;rsquo;s protocol. The key design insight is splitting responsibilities into two layers: a new low-level intrinsic handles atomic memory copying, while existing &lt;code&gt;Unsafe&lt;/code&gt; methods operate on a thread-local buffer (specifically a one-element array) to pack and unpack value fields. This keeps &lt;code&gt;VarHandle&lt;/code&gt; logic clean and decoupled from complex GC and memory-layout details.&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>Referral</title><link>https://miti99.com/en/referral/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://miti99.com/en/referral/</guid><description>&lt;p&gt;Many thanks to those who subscribe via my referral links! 🙏&lt;/p&gt;
&lt;h2 id="claude-ecosystem"&gt;Claude Ecosystem&lt;/h2&gt;&lt;h3 id="agentkit"&gt;&lt;a href="https://agentkit.best/?ref=BWA910UK" rel="noopener noreferrer"&gt;AgentKit&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;AgentKit — formerly &lt;strong&gt;ClaudeKit&lt;/strong&gt; (&lt;code&gt;claudekit.cc&lt;/code&gt;) — packages production-ready skills, slash commands, subagents, and workflows for coding agents such as Claude Code, Codex, and GitHub Copilot, so sessions stay consistent instead of restarting from scratch every time.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AgentKit Engineer&lt;/strong&gt; ($99, one-time) — 100+ skills and 30+ workflows plus engineer subagents covering frontend, backend, databases, DevOps, code review, and debugging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AgentKit Marketing&lt;/strong&gt; ($99, one-time) — 12+ MCP integrations and marketing subagents for lead research, programmatic SEO, content, and CRM outreach.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bundle&lt;/strong&gt; ($149) — both kits plus a 1-year AgentKit App license for 3 devices. Combined, the kits ship 95+ commands and 45 subagents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AgentKit App&lt;/strong&gt; ($49/year for 1 device, $99/year for 3) — a desktop control center for the &lt;code&gt;ak&lt;/code&gt; CLI with kit management, a visual skill graph, and a status line builder.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All purchases include a 14-day refund guarantee.&lt;/p&gt;
&lt;p&gt;Sign up via the referral link to get &lt;strong&gt;20% off&lt;/strong&gt; your first purchase!&lt;/p&gt;
&lt;p&gt;Referral code: &lt;code&gt;BWA910UK&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Link: &lt;a href="https://agentkit.best/?ref=BWA910UK" rel="noopener noreferrer"&gt;https://agentkit.best/?ref=BWA910UK&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="ai-coding-platforms--llm-apis"&gt;AI Coding Platforms &amp;amp; LLM APIs&lt;/h2&gt;&lt;h3 id="orcarouter"&gt;&lt;a href="https://www.orcarouter.ai/ref/ref_3976ba42abf37dc55c1d" rel="noopener noreferrer"&gt;OrcaRouter&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;OrcaRouter lets you access 200+ AI models through one OpenAI-compatible API with automatic routing and failover.&lt;/p&gt;
&lt;p&gt;Sign up through my referral link: &lt;a href="https://www.orcarouter.ai/ref/ref_3976ba42abf37dc55c1d" rel="noopener noreferrer"&gt;https://www.orcarouter.ai/ref/ref_3976ba42abf37dc55c1d&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Referral code: &lt;code&gt;ref_3976ba42abf37dc55c1d&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;TL;DR — current offers checked Oct 2, 2026 (UTC+7):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tencent Hy4 Preview:&lt;/strong&gt; Get a 100% deposit match, up to $200, on top-ups of $20 or more when you join before &lt;strong&gt;Oct 29&lt;/strong&gt;. Credit is usable on Hy4 Preview only.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GPT-6 Astra:&lt;/strong&gt; Get a 100% deposit match, up to $100, on top-ups of $20 or more before &lt;strong&gt;Oct 5&lt;/strong&gt;; a payment card is required and the offer is waitlisted.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Offers can change quickly, so check the &lt;a href="https://www.orcarouter.ai/offers" rel="noopener noreferrer"&gt;live offers page&lt;/a&gt; before claiming.&lt;/p&gt;
&lt;h3 id="zai"&gt;&lt;a href="https://z.ai/subscribe?ic=PLKIAYEIPW" rel="noopener noreferrer"&gt;Z.ai&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;🚀 You&amp;rsquo;ve been invited to join the GLM Coding Plan! Enjoy full support for Claude Code, Cline, and 20+ top coding tools — starting at just $18/month. Subscribe now and grab the limited-time deal! Link： &lt;a href="https://z.ai/subscribe?ic=PLKIAYEIPW" rel="noopener noreferrer"&gt;https://z.ai/subscribe?ic=PLKIAYEIPW&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Until &lt;strong&gt;Oct 7, 2026&lt;/strong&gt;, all-day usage is billed at the off-peak rate, and GLM-5.3-Flash is unlimited from 23:00 to 09:00.&lt;/p&gt;
&lt;h3 id="kimi"&gt;&lt;a href="https://kimi-bot.com/activities/viral-referral/share?scenario=invite&amp;amp;from=share_poster&amp;amp;invitation_code=C8CJ6F" rel="noopener noreferrer"&gt;Kimi&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Boost me and we both win! Sign up or subscribe to Kimi (Moonshot AI) and we each get a guaranteed membership-credit prize, ranging from 3 days up to &lt;strong&gt;1 year&lt;/strong&gt;. Credits expire at the end of their duration or on Dec 31, 2026, whichever comes first.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sign up:&lt;/strong&gt; &lt;a href="https://kimi-bot.com/activities/viral-referral/share?scenario=invite&amp;amp;from=share_poster&amp;amp;invitation_code=C8CJ6F" rel="noopener noreferrer"&gt;https://kimi-bot.com/activities/viral-referral/share?scenario=invite&amp;from=share_poster&amp;invitation_code=C8CJ6F&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subscribe:&lt;/strong&gt; &lt;a href="https://kimi-bot.com/activities/viral-referral/share?scenario=subscribe&amp;amp;from=share_poster&amp;amp;invitation_code=C8CJ6F" rel="noopener noreferrer"&gt;https://kimi-bot.com/activities/viral-referral/share?scenario=subscribe&amp;from=share_poster&amp;invitation_code=C8CJ6F&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Invitation code: &lt;code&gt;C8CJ6F&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="minimax"&gt;&lt;a href="https://platform.minimax.io/subscribe/token-plan?code=CAQ5sxHAq6&amp;amp;source=link" rel="noopener noreferrer"&gt;MiniMax&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;🎁 MiniMax Token Plan Referral Program — Token Plan starts at $20/month (Plus), with Max at $50 and Ultra at $120.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;For Referred Users:&lt;/strong&gt; Use a referral link to get &lt;strong&gt;10% off&lt;/strong&gt; any Token Plan subscription or upgrade, and join the MiniMax Developer Community as a Builder.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;For Referrers:&lt;/strong&gt; Earn &lt;strong&gt;10% back in API credits&lt;/strong&gt; for every successful paid referral, valid for 90 days and usable across all MiniMax models. &lt;a href="https://platform.minimax.io/docs/token-plan/faq" rel="noopener noreferrer"&gt;View details&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://platform.minimax.io/subscribe/token-plan?code=CAQ5sxHAq6&amp;amp;source=link" rel="noopener noreferrer"&gt;&lt;img src="https://miti99.com/referral/minimax.png" alt="minimax"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Referral code: &lt;code&gt;CAQ5sxHAq6&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Link: &lt;a href="https://platform.minimax.io/subscribe/token-plan?code=CAQ5sxHAq6&amp;amp;source=link" rel="noopener noreferrer"&gt;https://platform.minimax.io/subscribe/token-plan?code=CAQ5sxHAq6&amp;source=link&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="synthetic"&gt;&lt;a href="https://synthetic.new/?referral=CNBFyw28zF0dZoj" rel="noopener noreferrer"&gt;Synthetic&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Thanks for helping us grow!&lt;/p&gt;
&lt;p&gt;Invite your friends to Synthetic and both of you will receive $10.00 off the first month when they subscribe! Subscriptions start at $30/month, with usage-based pricing as an alternative.&lt;/p&gt;
&lt;p&gt;Share Your Referral Link&lt;/p&gt;
&lt;p&gt;&lt;a href="https://synthetic.new/?referral=CNBFyw28zF0dZoj" rel="noopener noreferrer"&gt;https://synthetic.new/?referral=CNBFyw28zF0dZoj&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Your referral link contains your unique code: CNBFyw28zF0dZoj&lt;/p&gt;
&lt;h3 id="hermes-agent-cloud"&gt;&lt;a href="https://portal.nousresearch.com/r/tien-nguyen-minh" rel="noopener noreferrer"&gt;Hermes Agent Cloud&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Hermes Agent Cloud is the hosted subscription for Nous Research&amp;rsquo;s Hermes Agent. Subscribe through my link to get &lt;strong&gt;$15 off&lt;/strong&gt; your first paid month.&lt;/p&gt;
&lt;p&gt;The discount applies only to new customers starting a new personal subscription, and only with a payment card that hasn&amp;rsquo;t been used for another referral.&lt;/p&gt;
&lt;p&gt;Link: &lt;a href="https://portal.nousresearch.com/r/tien-nguyen-minh" rel="noopener noreferrer"&gt;https://portal.nousresearch.com/r/tien-nguyen-minh&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="xiaomi-mimo"&gt;&lt;a href="https://platform.xiaomimimo.com?ref=T8ESAY" rel="noopener noreferrer"&gt;Xiaomi MiMo&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Xiaomi MiMo Open Platform — running Xiaomi&amp;rsquo;s flagship MiMo V2.6 Pro and the rest of the lineup. Sign up with my code and you&amp;rsquo;ll instantly get &lt;strong&gt;$2&lt;/strong&gt; in API credits, plus &lt;strong&gt;10% off&lt;/strong&gt; your first paid Token Plan order.&lt;/p&gt;
&lt;p&gt;Enter the code within 3 days of signing up, at the bottom-left of the console. Credits valid &lt;strong&gt;40 days&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Referral code: &lt;code&gt;T8ESAY&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Link: &lt;a href="https://platform.xiaomimimo.com?ref=T8ESAY" rel="noopener noreferrer"&gt;https://platform.xiaomimimo.com?ref=T8ESAY&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://platform.xiaomimimo.com?ref=T8ESAY" rel="noopener noreferrer"&gt;&lt;img src="https://miti99.com/referral/mimo.png" alt="mimo"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="modelark"&gt;&lt;a href="https://www.byteplus.com/activity/codingplan?ac=MMAUCIS9NT1S&amp;amp;rc=2739UWRE" rel="noopener noreferrer"&gt;ModelArk&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;BytePlus ModelArk Coding Plan bundles Dola-Seed-2.0-pro, GLM-5.3-Flash, and the DeepSeek V4 series for Claude Code, Cursor, Cline, and other coding tools. Subscribe through my link to get &lt;strong&gt;10% off&lt;/strong&gt; your first Coding Plan subscription.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.byteplus.com/activity/codingplan?ac=MMAUCIS9NT1S&amp;amp;rc=2739UWRE" rel="noopener noreferrer"&gt;https://www.byteplus.com/activity/codingplan?ac=MMAUCIS9NT1S&amp;rc=2739UWRE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.byteplus.com/activity/codingplan?ac=MMAUCIS9NT1S&amp;amp;rc=2739UWRE" rel="noopener noreferrer"&gt;&lt;img src="https://miti99.com/referral/modelark.png" alt="modelark"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="cloud-computing"&gt;Cloud Computing&lt;/h2&gt;&lt;h3 id="alibaba-cloud"&gt;&lt;a href="https://www.alibabacloud.com/campaign/benefits?referral_code=A92LU5" rel="noopener noreferrer"&gt;Alibaba Cloud&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Alibaba Cloud is one of the world&amp;rsquo;s largest cloud computing platforms — offering 50+ products including ECS, OSS, RDS, Redis, MongoDB, and networking.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;New user benefits (via referral):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Up to &lt;strong&gt;$1,700&lt;/strong&gt; in free trial credits (individual) or &lt;strong&gt;$8,500&lt;/strong&gt; (enterprise)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;12-month free&lt;/strong&gt; ECS (Elastic Compute Service) trial&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;50+&lt;/strong&gt; products available in free trial&lt;/li&gt;
&lt;li&gt;New-user coupons and discounts on first orders&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt; Sign up via the referral link as a new user → complete identity verification → access free trials and promotions.&lt;/p&gt;
&lt;p&gt;Referral code: &lt;code&gt;A92LU5&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Link: &lt;a href="https://www.alibabacloud.com/campaign/benefits?referral_code=A92LU5" rel="noopener noreferrer"&gt;https://www.alibabacloud.com/campaign/benefits?referral_code=A92LU5&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="managed-data-platforms"&gt;Managed Data Platforms&lt;/h2&gt;&lt;h3 id="aiven"&gt;&lt;a href="https://console.aiven.io/signup?referral_code=dgxaaojd772ygmk7bjr6" rel="noopener noreferrer"&gt;Aiven&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;Aiven is a managed open-source data platform (Database-as-a-Service) — fully hosted databases, streaming, and analytics services deployable across all major clouds. Offerings include PostgreSQL, MySQL, Apache Kafka, ClickHouse, OpenSearch, Valkey, and more, managed from a single console. It is not a VPS or compute provider — you consume ready-to-use data services, not virtual machines.&lt;/p&gt;
&lt;p&gt;Sign up via my referral link and start the Aiven trial to get an extra &lt;strong&gt;$100.00 USD&lt;/strong&gt; in credits to spend.&lt;/p&gt;
&lt;p&gt;Referral code: &lt;code&gt;dgxaaojd772ygmk7bjr6&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Link: &lt;a href="https://console.aiven.io/signup?referral_code=dgxaaojd772ygmk7bjr6" rel="noopener noreferrer"&gt;https://console.aiven.io/signup?referral_code=dgxaaojd772ygmk7bjr6&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="cloud-storage"&gt;Cloud Storage&lt;/h2&gt;&lt;h3 id="pikpak"&gt;&lt;a href="https://mypikpak.com/drive/activity/invited?invitation-code=75940186" rel="noopener noreferrer"&gt;PikPak&lt;/a&gt;&lt;/h3&gt;&lt;p&gt;PikPak is a private cloud storage service with built-in support for magnet links, torrents, and saving videos from the web — great for offline downloads and cross-device access.&lt;/p&gt;
&lt;p&gt;Sign up with my invitation code to unlock &lt;strong&gt;5 free premium days&lt;/strong&gt; with 10 TB of premium storage — no payment card required. Enter the code within 12 hours of registration, or install directly via the link to auto-bind the invitation.&lt;/p&gt;
&lt;p&gt;Invitation code: &lt;code&gt;75940186&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Link: &lt;a href="https://mypikpak.com/drive/activity/invited?invitation-code=75940186" rel="noopener noreferrer"&gt;https://mypikpak.com/drive/activity/invited?invitation-code=75940186&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>