<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Testing on miti99</title><link>https://miti99.com/en/tags/testing/</link><description>Recent content in Testing 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/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>Newsletter #137</title><link>https://miti99.com/en/post/2026/10/05/</link><pubDate>Mon, 05 Oct 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/10/05/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #137.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-to-name-things"&gt;&lt;a href="https://kolemannix.com/blog/how-to-name-things/" rel="noopener noreferrer"&gt;How to name things&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Koleman Nix argues that naming is one of the most foundational skills in software engineering, because clear language almost always reflects clear thinking. Every time we name a variable, function, API endpoint, or database column, we are communicating with both future human teammates and LLMs. Coding models fly through clean, well-named greenfield codebases, yet gradually bog down as terminology across a repo becomes inconsistent and &amp;ldquo;slop-fried&amp;rdquo;—meaning sustainable velocity with AI agents requires continuously pruning and sharpening your domain vocabulary. Properly understood, DRY means every piece of domain knowledge has a single authoritative representation, not merging two numbers that happen to be equal: a maximum username length of 64 and a work-queue depth of 64 are two completely separate truths that belong in two separate named constants. Nix pushes back against rigid mechanical naming conventions, which often serve as an excuse to avoid thinking; what should be consistent is your naming &lt;em&gt;process&lt;/em&gt;—capturing what a thing &lt;em&gt;is&lt;/em&gt; rather than how it happens to be used today, and respecting symmetry like &lt;code&gt;src&lt;/code&gt; and &lt;code&gt;dst&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Good naming is an act of intellectual empathy, whereas naming something after your immediate caller&amp;rsquo;s need is short-sighted. A &lt;code&gt;created_at&lt;/code&gt; column makes sense for an internal row timestamp, but a scanned birth certificate uploaded in 2023 needs distinct &lt;code&gt;uploaded_at&lt;/code&gt; and &lt;code&gt;record_date&lt;/code&gt; fields. Similarly, a helper named &lt;code&gt;mergeTargetValuesIntoSourceTemplate&lt;/code&gt; obscures the fact that the function is simply a generic map merge (&lt;code&gt;++&lt;/code&gt;). And a vague field like &lt;code&gt;documentDate&lt;/code&gt; invites two different services to interpret it differently, breeding subtle bugs. His rule of thumb: name things for their intrinsic essence, not their momentary use case.&lt;/p&gt;
&lt;h2 id="postgres-locks-explained"&gt;&lt;a href="https://postgreslocksexplained.com/" rel="noopener noreferrer"&gt;Postgres Locks Explained&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;em&gt;Postgres Locks Explained&lt;/em&gt; is an interactive visual guide to PostgreSQL locking—&amp;ldquo;from beginner to expert&amp;rdquo;—created by Brian (&lt;code&gt;@TheOtherBrian1&lt;/code&gt;), a customer reliability engineer specializing in Postgres administration and observability, who built the resource he wished he&amp;rsquo;d had when first learning how Postgres locks work. The &lt;em&gt;Concepts&lt;/em&gt; section uses step-by-step animations to show why locks exist in the first place: without coordination, a &lt;code&gt;SELECT&lt;/code&gt; reading a page mid-&lt;code&gt;DELETE&lt;/code&gt; could observe half-deleted state, or a concurrent &lt;code&gt;DROP TABLE&lt;/code&gt; could pull the rug out from under an active query. &lt;em&gt;Locks by Example&lt;/em&gt; walks through hands-on two-session scenarios you can run locally, such as how an uncommitted &lt;code&gt;ALTER TABLE&lt;/code&gt; holding an &lt;code&gt;ACCESS EXCLUSIVE&lt;/code&gt; lock blocks even simple &lt;code&gt;SELECT&lt;/code&gt; queries behind it, or how &lt;code&gt;SELECT ... FOR UPDATE&lt;/code&gt; preserves application-level uniqueness invariants when two transactions race to update the same logical entity. An interactive &lt;em&gt;Lock Blocking Graph&lt;/em&gt; lets you click any SQL command—from &lt;code&gt;SELECT&lt;/code&gt; and &lt;code&gt;CREATE INDEX CONCURRENTLY&lt;/code&gt; to &lt;code&gt;VACUUM FULL&lt;/code&gt;—to see every lock mode it acquires and which other commands it blocks.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Troubleshooting&lt;/em&gt; section distills lessons from investigating thousands of production databases a year: lock contention is rarer than unindexed queries or connection-pool exhaustion, which is precisely why developers are often caught flat-footed when a lock queue brings production to a halt. It covers deadlocks, exhausting the shared-memory lock table (&lt;code&gt;out of shared memory&lt;/code&gt; requiring higher &lt;code&gt;max_locks_per_transaction&lt;/code&gt;), cascading lock queues behind a waiting DDL statement, and full-table lockouts, recommending enabling &lt;code&gt;log_lock_waits&lt;/code&gt; so any query waiting longer than &lt;code&gt;deadlock_timeout&lt;/code&gt; is logged automatically. Finally, the &lt;em&gt;Monitoring&lt;/em&gt; section shows how to join &lt;code&gt;pg_locks&lt;/code&gt;, &lt;code&gt;pg_stat_activity&lt;/code&gt;, and &lt;code&gt;pg_blocking_pids()&lt;/code&gt; to pinpoint the root blocker at the head of a lock chain, alongside the exact lock-tree queries used by Datadog and pganalyze.&lt;/p&gt;
&lt;h2 id="a-deep-and-fuzzy-dive-into-search"&gt;&lt;a href="https://serenedb.com/blog/fuzzy-search-deep-dive" rel="noopener noreferrer"&gt;A Deep (and Fuzzy) Dive Into Search&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;SereneDB CTO Andrey Abramov revisits and expands his deep dive into fuzzy search, originally written six years ago when his team first built fuzzy matching into the IResearch engine that now powers SereneDB. &amp;ldquo;Fuzzy search&amp;rdquo; is an umbrella term for approximate string-matching algorithms, each built around its own similarity metric. The classic metric is &lt;em&gt;Levenshtein edit distance&lt;/em&gt;: the minimum number of single-character insertions, deletions, and substitutions required to turn one string into another. Computing edit distance via the textbook Wagner–Fischer dynamic programming matrix takes $O(|s_1| \cdot |s_2|)$ time per candidate word, which is far too slow to run against a dictionary of millions of terms. The breakthrough is Schulz and Mihov&amp;rsquo;s (2002) &lt;em&gt;Levenshtein automaton&lt;/em&gt;: given a query word and a maximum edit distance $k$, you construct in linear time a deterministic finite automaton that recognizes &lt;em&gt;every&lt;/em&gt; string within distance $k$, and then intersect that automaton directly with the index&amp;rsquo;s term dictionary trie or Finite State Transducer (FST) to prune non-matching branches in bulk. Because the universal transition tables grow rapidly with $k$, SereneDB caps compiled Levenshtein automata at distance 4 (and distance 3 for Damerau–Levenshtein, which counts adjacent character transpositions as a single edit).&lt;/p&gt;
&lt;p&gt;Because edit distance is sensitive to word length and struggles when multi-word queries have missing or extra words, SereneDB pairs it with &lt;em&gt;n-gram similarity&lt;/em&gt; based on Grzegorz Kondrak&amp;rsquo;s formulation, which computes a longest-common-subsequence-style similarity over character $n$-grams rather than individual letters. Normalizing the score by the query&amp;rsquo;s length rather than the document&amp;rsquo;s length allows short queries to match longer fields naturally. In SereneDB&amp;rsquo;s SQL interface, &lt;code&gt;ts_levenshtein&lt;/code&gt; automatically scales the allowed edit distance by query token length to handle typos, while &lt;code&gt;ts_ngram&lt;/code&gt; defaults to a &lt;code&gt;0.7&lt;/code&gt; similarity threshold—and real-world search pipelines frequently combine both.&lt;/p&gt;
&lt;h2 id="email-encryption"&gt;&lt;a href="https://computer.rip/2026-07-19-email-encryption.html" rel="noopener noreferrer"&gt;email encryption&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In his &lt;em&gt;Computers Are Bad&lt;/em&gt; newsletter, J. B. Crawford traces the long, frustrating history of trying to encrypt email. Born in the high-trust academic networks of the late 1960s and 1970s, internet email (SMTP and RFC 822) was designed with zero built-in confidentiality or sender authentication. The competing OSI protocol suite included X.400, which had structured security extensions, but lost out to simpler internet email and survives today only in specialized closed environments like military and aviation messaging. MIME (&amp;ldquo;email 2.0&amp;rdquo; in the early 1990s) solved 8-bit payloads and attachments, setting the stage for two competing end-to-end encryption standards. Phil Zimmermann&amp;rsquo;s PGP (1991, later standardized as OpenPGP and implemented in GnuPG) decentralized key distribution through a peer-to-peer &amp;ldquo;web of trust,&amp;rdquo; which failed to gain mainstream traction because managing keys and key-signing parties proved too confusing for normal users. S/MIME (1996) instead relied on hierarchical X.509 PKI certificates signed by commercial Certificate Authorities, succeeding inside large enterprises and government agencies thanks to tight integration with Microsoft Exchange and Active Directory, while remaining nearly unusable across organizational boundaries.&lt;/p&gt;
&lt;p&gt;Ironically, the vast majority of email today &lt;em&gt;is&lt;/em&gt; encrypted in transit between mail servers—not end-to-end, but at the transport layer via opportunistic &lt;code&gt;STARTTLS&lt;/code&gt;. Because naive &lt;code&gt;STARTTLS&lt;/code&gt; is vulnerable to active downgrade attacks where a man-in-the-middle strips the &lt;code&gt;250-STARTTLS&lt;/code&gt; advertisement, the industry bolted on additional patches: DANE (binding TLS keys to DNSSEC records), MTA-STS (publishing strict TLS policies over HTTPS), and bilateral TLS enforcement between major providers like Gmail and Microsoft 365. Crawford&amp;rsquo;s takeaway: end-to-end email encryption remains a bolted-on afterthought that lost the usability war, leaving real-world email privacy dependent on hop-by-hop transport encryption managed by major cloud mail providers.&lt;/p&gt;
&lt;h2 id="a-shell-exclamation-mark-is-not-for-yelling-be-lazy"&gt;&lt;a href="https://refp.se/articles/your-shell-and-the-lazy-exclamation-mark" rel="noopener noreferrer"&gt;A shell exclamation mark is not for yelling. Be lazy.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Filip Roséen reintroduces a superpower hiding in Unix shells since &lt;code&gt;csh&lt;/code&gt; in the late 1970s that many developers never use beyond &lt;code&gt;sudo !!&lt;/code&gt;: &lt;strong&gt;history expansion&lt;/strong&gt; (event designators) in &lt;code&gt;bash&lt;/code&gt;, &lt;code&gt;zsh&lt;/code&gt;, &lt;code&gt;csh&lt;/code&gt;, and &lt;code&gt;tcsh&lt;/code&gt;. Programmers preach DRY in source code, yet happily mash the up-arrow key and hold down the left-arrow key to edit previous shell commands by hand. History expansion follows a uniform three-part grammar: &lt;code&gt;![event][:word][:modifier]&lt;/code&gt;. The &lt;em&gt;event&lt;/em&gt; selector picks a command line from history: &lt;code&gt;!!&lt;/code&gt; is the previous command, &lt;code&gt;!-2&lt;/code&gt; is two commands ago, &lt;code&gt;!ssh&lt;/code&gt; is the most recent command starting with &lt;code&gt;&amp;quot;ssh&amp;quot;&lt;/code&gt;, &lt;code&gt;!?needle?&lt;/code&gt; is the most recent command containing &lt;code&gt;&amp;quot;needle&amp;quot;&lt;/code&gt; anywhere, and &lt;code&gt;^old^new^&lt;/code&gt; runs the previous command with the first occurrence of &lt;code&gt;old&lt;/code&gt; replaced by &lt;code&gt;new&lt;/code&gt;. The &lt;em&gt;word&lt;/em&gt; designator selects specific arguments from that command (&lt;code&gt;!:0&lt;/code&gt; is the command name, &lt;code&gt;!:1&lt;/code&gt; is the first argument, &lt;code&gt;!$&lt;/code&gt; is the last argument—as in &lt;code&gt;mkdir /var/mnt/cache&lt;/code&gt; followed by &lt;code&gt;cd !$&lt;/code&gt;, and &lt;code&gt;!*&lt;/code&gt; is all arguments), while &lt;em&gt;modifiers&lt;/em&gt; transform the selected text on the fly: &lt;code&gt;:h&lt;/code&gt; strips a path to its directory head like &lt;code&gt;dirname&lt;/code&gt;, &lt;code&gt;:t&lt;/code&gt; extracts the filename tail like &lt;code&gt;basename&lt;/code&gt;, &lt;code&gt;:r&lt;/code&gt; strips the file extension, &lt;code&gt;:s/a/b/&lt;/code&gt; substitutes text (&lt;code&gt;:gs/a/b/&lt;/code&gt; globally), and &lt;code&gt;:p&lt;/code&gt; prints the expanded command safely without executing it.&lt;/p&gt;
&lt;p&gt;For strict POSIX shells where &lt;code&gt;!&lt;/code&gt; expansion isn&amp;rsquo;t available, the built-in &lt;code&gt;fc&lt;/code&gt; (&lt;em&gt;fix command&lt;/em&gt;) utility lets you open recent commands in &lt;code&gt;$EDITOR&lt;/code&gt; or batch-transform and re-run a range of commands on the fly—such as &lt;code&gt;fc -e 'sed -i s/prod-01/test-01/g' -3 -1&lt;/code&gt; to replay your last three commands against a test host. Roséen recommends mastering a small core toolkit (&lt;code&gt;!!&lt;/code&gt;, &lt;code&gt;!prefix&lt;/code&gt;, &lt;code&gt;!?substr?&lt;/code&gt;, &lt;code&gt;!$&lt;/code&gt;, &lt;code&gt;!:0&lt;/code&gt;, &lt;code&gt;!$:h&lt;/code&gt;, and &lt;code&gt;!$:t&lt;/code&gt;) and turning on &lt;code&gt;shopt -s histverify&lt;/code&gt; in Bash (or &lt;code&gt;setopt HIST_VERIFY&lt;/code&gt; in Zsh), which loads the expanded command onto your prompt line for inspection before you press Enter to run it.&lt;/p&gt;
&lt;h2 id="a-coding-agent-is-six-functions-in-a-trenchcoat"&gt;&lt;a href="https://tidydesign.substack.com/p/a-coding-agent-is-six-functions-in" rel="noopener noreferrer"&gt;A coding agent is six functions in a trenchcoat&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hadley Wickham demystifies what actually sits inside coding agents like Claude Code, Cursor, and Codex. At its core, an agent is an LLM running in a loop with tools that can read and mutate external state, and a coding agent is simply an agent equipped with tools that let it explore and edit a codebase the same way a human developer does. Almost every coding agent boils down to six primitive functions—read a file, write a file, edit a file, list files, search file contents, and run a shell command—paired with a detailed system prompt encoding software engineering best practices. To prove how simple the core mechanism is, Wickham builds a working coding agent from scratch in R using the &lt;code&gt;ellmer&lt;/code&gt; package, starting with just three 5-line functions: &lt;code&gt;read_file&lt;/code&gt;, &lt;code&gt;write_file&lt;/code&gt;, and &lt;code&gt;run_command&lt;/code&gt;. Registering those three tools with clear descriptions and a minimal prompt is already enough for the model to locate a date-parsing function in a repo and write unit tests for it.&lt;/p&gt;
&lt;p&gt;While &lt;code&gt;run_command&lt;/code&gt; is the ultimate &amp;ldquo;escape hatch&amp;rdquo; capable of running &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, or test suites, leaning on raw shell execution for everything is slow, token-heavy, and dangerous because validating whether an arbitrary shell string is safe is notoriously hard. Wickham therefore adds dedicated &lt;code&gt;list_files&lt;/code&gt; and &lt;code&gt;search_files&lt;/code&gt; tools backed by a &lt;code&gt;safe_path()&lt;/code&gt; helper that normalizes paths and rejects any traversal outside the current working directory—while R&amp;rsquo;s default &lt;code&gt;list.files(all.files = FALSE)&lt;/code&gt; automatically hides dotfiles like &lt;code&gt;.Renviron&lt;/code&gt; so secret API keys aren&amp;rsquo;t casually listed. Finally, adding a surgical &lt;code&gt;edit_file(path, old_string, new_string)&lt;/code&gt; tool lets the LLM replace a specific block of lines instead of rewriting an entire 500-line file via &lt;code&gt;write_file&lt;/code&gt;, slashing output token costs and failing loudly if the target context doesn&amp;rsquo;t match rather than silently corrupting the file.&lt;/p&gt;
&lt;h2 id="how-well-do-agents-use-test-and-verification-techniques"&gt;&lt;a href="https://danluu.com/agentic-testing/" rel="noopener noreferrer"&gt;How well do agents use test and verification techniques?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dan Luu investigates a natural question for agentic coding: does instructing a coding agent in its prompt to use specific testing methodologies or formal verification tools actually produce more correct code? Using his &lt;code&gt;zstd&lt;/code&gt;-from-RFC benchmark in Rust, Luu tested Codex with &lt;code&gt;GPT-5.6 Sol&lt;/code&gt; across both &lt;code&gt;medium&lt;/code&gt; and &lt;code&gt;xhigh&lt;/code&gt; reasoning effort settings under 26 different prompt conditions—including a default baseline, TDD, &lt;code&gt;&amp;quot;Make no mistakes&amp;quot;&lt;/code&gt;, self-audit, fuzzing, differential testing, property-based testing, mutation testing, and formal verification tools like TLA+, Kani, Verus, and Lean 4, plus four community testing skills—running roughly 160 trials per condition and plotting pass rates on the hidden test suite against dollar cost.&lt;/p&gt;
&lt;p&gt;The headline result is sobering: &lt;strong&gt;none of the prompted testing or verification methodologies significantly outperformed the unprompted baseline&lt;/strong&gt;, and several actively hurt correctness or blew up token costs. When told to use an advanced tool, agents overwhelmingly went through the motions superficially to satisfy the prompt rather than using the tool to find real bugs in their implementation. Told to use Verus, the agent proved trivial, tautological properties about toy helper structs instead of verifying the actual &lt;code&gt;zstd&lt;/code&gt; decoder; in 159 out of 160 TLA+ runs, the agent wrote a standalone &lt;code&gt;.tla&lt;/code&gt; model file that never informed or changed a single line of the Rust code; and in 135 out of 160 &amp;ldquo;differential testing&amp;rdquo; runs, the agent never even compared two independent implementations. Prompting for strict TDD performed worse than baseline, frequently missing the tricky 4-stream Huffman jump-table edge case. Naive fuzzing mostly generated random invalid byte streams that bounced off the header parser, though in the 10 runs where the agent bothered to build a &lt;em&gt;structure-aware&lt;/em&gt; fuzzer, half of them uncovered real decoder bugs. Luu&amp;rsquo;s takeaway: simply naming a methodology like &amp;ldquo;use property-based testing&amp;rdquo; or &amp;ldquo;use formal verification&amp;rdquo; in a prompt does very little—to get real leverage, you have to wire up the verification harness yourself and iterate on what the agent actually executes.&lt;/p&gt;
&lt;h2 id="how-one-connection-kills-a-database"&gt;&lt;a href="https://planetscale.com/blog/debugging-live-database-connections" rel="noopener noreferrer"&gt;How one connection kills a database&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Simeon Griggs at PlanetScale opens with a classic production murder mystery: every single query to your database is timing out, CPU and disk I/O are practically idle—what happened? He recalls a famous GitHub outage on MySQL where a routine schema change needed an exclusive metadata lock on a hot table, got blocked behind a single long-running open transaction that had touched that table earlier, and subsequently caused every new &lt;code&gt;SELECT&lt;/code&gt; and &lt;code&gt;UPDATE&lt;/code&gt; on the table to queue up behind the waiting DDL statement. There is no deadlock (so the deadlock detector never steps in), and the outage lasts until someone finds and kills the single idle connection sitting at the very front of the queue. Griggs reproduces the exact same failure mode on PostgreSQL: an application worker runs &lt;code&gt;BEGIN;&lt;/code&gt; and &lt;code&gt;SELECT * FROM orders LIMIT 1;&lt;/code&gt;, hits an unhandled exception in application code, and leaks the connection back into limbo without ever issuing &lt;code&gt;COMMIT&lt;/code&gt; or &lt;code&gt;ROLLBACK&lt;/code&gt;. That &lt;code&gt;idle in transaction&lt;/code&gt; session holds only a harmless &lt;code&gt;ACCESS SHARE&lt;/code&gt; lock, until a deployment runs &lt;code&gt;ALTER TABLE orders ADD COLUMN ...&lt;/code&gt;, which requests an &lt;code&gt;ACCESS EXCLUSIVE&lt;/code&gt; lock, waits behind the leaked session, and blocks every subsequent query on &lt;code&gt;orders&lt;/code&gt; behind the pending migration.&lt;/p&gt;
&lt;p&gt;Because PostgreSQL ships with &lt;code&gt;idle_in_transaction_session_timeout&lt;/code&gt; disabled (&lt;code&gt;0&lt;/code&gt;) by default, a single unhandled exception in app code can take down an entire table during a deploy—and when the resulting lock queue exhausts &lt;code&gt;max_connections&lt;/code&gt;, you can&amp;rsquo;t even open a &lt;code&gt;psql&lt;/code&gt; shell to inspect &lt;code&gt;pg_stat_activity&lt;/code&gt;. To make recovering from these pileups effortless, PlanetScale built a live &lt;strong&gt;Connections&lt;/strong&gt; inspector backed by reserved superuser connection slots that visualizes active processes, transaction age, and the exact blocker tree in real time, offering three surgical kill actions: &lt;em&gt;Cancel Query&lt;/em&gt; (&lt;code&gt;pg_cancel_backend&lt;/code&gt;), &lt;em&gt;Terminate Transaction&lt;/em&gt;, or &lt;em&gt;Terminate Connection&lt;/em&gt; (&lt;code&gt;pg_terminate_backend&lt;/code&gt;)—noting that canceling the query does nothing here because the &lt;code&gt;SELECT&lt;/code&gt; already finished inside the open transaction. The same real-time blocker tree is also available in the CLI via &lt;code&gt;pscale branch connections top&lt;/code&gt; and &lt;code&gt;show --format json&lt;/code&gt; for scripts and agents.&lt;/p&gt;
&lt;h2 id="todos-considered-harmful"&gt;&lt;a href="https://frequal.com/java/TodosConsideredHarmful.html" rel="noopener noreferrer"&gt;TODOs Considered Harmful&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Andrew Oliver warns that in an era where autonomous coding agents roam repositories with less and less human supervision, &lt;code&gt;// TODO&lt;/code&gt; comments have turned from harmless reminders into ticking time bombs. Historically, developers jotted down &lt;code&gt;TODO&lt;/code&gt; comments in a hurry as half-baked notes to self—rarely reviewed with the rigor of executable code, never tested, and frequently left to rot as the surrounding architecture evolved. Over the past year, however, engineering teams have moved from using AI as an interactive Stack Overflow replacement to turning agents loose on whole modules with instructions to &amp;ldquo;clean up tech debt&amp;rdquo; or &amp;ldquo;fix outstanding issues.&amp;rdquo; To an eager coding agent, a &lt;code&gt;TODO&lt;/code&gt; comment looks like an explicit, authoritative specification written by a human engineer begging to be implemented.&lt;/p&gt;
&lt;p&gt;The danger is that &lt;code&gt;TODO&lt;/code&gt; comments frequently describe an idea that was wrong when written, became obsolete three refactorings ago, or omitted critical domain constraints that lived only in the original author&amp;rsquo;s head. Because LLMs treat in-repo comments as trusted context and lack the historical context to judge whether a five-year-old &lt;code&gt;TODO: cache this lookup&lt;/code&gt; is actually safe under concurrent writes, an agent will cheerfully turn a bad &lt;code&gt;TODO&lt;/code&gt; into real production code—and Oliver notes he has already watched this exact failure mode cause production incidents. His advice: stop letting new &lt;code&gt;TODO&lt;/code&gt;s slip through code review (if a fix is important enough to mention, either fix it now or file a tracked issue with proper acceptance criteria), audit and purge stale &lt;code&gt;TODO&lt;/code&gt;s across your codebase before unleashing background maintenance agents, and if a note truly must live in the code, write an explanatory comment documenting &lt;em&gt;why&lt;/em&gt; the current code works the way it does rather than an open-ended instruction to change it.&lt;/p&gt;
&lt;h2 id="git-worktree-gotchas"&gt;&lt;a href="https://www.olafalders.com/2026/09/16/git-worktree-gotchas/" rel="noopener noreferrer"&gt;git worktree gotchas&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Olaf Alders notes that &lt;code&gt;git worktree&lt;/code&gt;—once a niche power-user feature—has gone mainstream thanks to developers running multiple coding agents in parallel across separate branches, but it comes with a few sharp edges if your tooling assumes a traditional single-checkout layout. In Git&amp;rsquo;s terminology, your initial &lt;code&gt;git clone&lt;/code&gt; creates the &lt;em&gt;main working tree&lt;/em&gt;, while &lt;code&gt;git worktree add&lt;/code&gt; creates &lt;em&gt;linked working trees&lt;/em&gt;. Almost every worktree gotcha stems from one implementation detail: inside a linked worktree, &lt;code&gt;.git&lt;/code&gt; is &lt;strong&gt;not a directory&lt;/strong&gt;—it is a plain text file containing a &lt;code&gt;gitdir:&lt;/code&gt; pointer back to &lt;code&gt;.git/worktrees/&amp;lt;name&amp;gt;&lt;/code&gt; inside the main working tree. Consequently, any naive script or tool that walks up parent directories looking for a &lt;code&gt;.git/&lt;/code&gt; &lt;em&gt;directory&lt;/em&gt; to find the repository root will walk right past the top of a linked worktree—and if you nested your linked worktrees inside a subdirectory of your main working tree, that script will silently resolve to the main working tree instead, running against the wrong files! Alders keeps his linked worktrees in a sibling directory outside the main checkout and recommends always using &lt;code&gt;git rev-parse --show-toplevel&lt;/code&gt; to find the current worktree root, or &lt;code&gt;dirname &amp;quot;$(git rev-parse --git-common-dir)&amp;quot;&lt;/code&gt; when a script inside a linked worktree needs to locate gitignored files like &lt;code&gt;.env&lt;/code&gt; in the main working tree.&lt;/p&gt;
&lt;p&gt;A third gotcha bites when running coding agents inside filesystem sandboxes like &lt;code&gt;nono&lt;/code&gt;, Docker, Landlock, or macOS Seatbelt. By default, Git hooks live in &lt;code&gt;.git/hooks&lt;/code&gt; inside the main working tree, which is outside the linked worktree&amp;rsquo;s directory tree and therefore blocked by the sandbox when the agent tries to run &lt;code&gt;git commit&lt;/code&gt;. The clean fix is to check your hooks into a tracked &lt;code&gt;.githooks/&lt;/code&gt; directory inside the repo and set &lt;code&gt;git config core.hooksPath .githooks&lt;/code&gt; using a &lt;strong&gt;relative&lt;/strong&gt; path. Because Git always &lt;code&gt;chdir&lt;/code&gt;s to the current worktree&amp;rsquo;s top-level directory before executing a hook, a relative &lt;code&gt;core.hooksPath&lt;/code&gt; resolves cleanly inside every linked worktree and stays completely within the sandbox boundary.&lt;/p&gt;</description></item><item><title>Newsletter #119</title><link>https://miti99.com/en/post/2026/07/07/</link><pubDate>Tue, 07 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/07/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #119.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="special-cases-in-go"&gt;&lt;a href="https://www.dolthub.com/blog/2026-05-22-special-cases-in-go/" rel="noopener noreferrer"&gt;Special Cases in Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Go is frequently marketed as a &amp;ldquo;simple&amp;rdquo; language that deliberately avoids special cases. Nick Tobey points out that Go actually has plenty of exceptions hiding in unexpected places. The &lt;code&gt;init&lt;/code&gt; function is the clearest example: it runs automatically when a package is imported, takes no arguments, returns no values, can be declared multiple times within the same package, yet cannot be called manually. If you try to call it, the compiler reports &lt;code&gt;undefined: init&lt;/code&gt; without further explanation. Similarly, the &lt;code&gt;internal&lt;/code&gt; directory creates a visibility scope narrower than public/private, yet that rule doesn&amp;rsquo;t exist in the Go language specification at all—it is enforced by the &lt;code&gt;go&lt;/code&gt; toolchain.&lt;/p&gt;
&lt;p&gt;The reason is that the language spec intentionally leaves import path interpretation implementation-defined. That flexibility lets build systems like Bazel apply their own rules while allowing the standard &lt;code&gt;go&lt;/code&gt; toolchain to evolve without amending the language spec—adding special cases like &lt;code&gt;internal&lt;/code&gt; directories or &lt;code&gt;_test&lt;/code&gt; package suffixes that live in the same directory as the package under test. Tobey also notes that a package&amp;rsquo;s declared name doesn&amp;rsquo;t have to match its directory name, forcing IDEs to parse every imported package just to resolve where an identifier comes from; for new code, explicit import aliases avoid the ambiguity. The broader takeaway: while most of these quirks rarely get in the way of day-to-day work, they show that a language&amp;rsquo;s simplicity often just means the complexity was pushed somewhere else.&lt;/p&gt;
&lt;h2 id="writing-code-vs-shipping-code-productivity-effects-across-generations-of-ai-coding-tools"&gt;&lt;a href="https://muratbuffalo.blogspot.com/2026/06/writing-code-vs-shipping-code.html" rel="noopener noreferrer"&gt;Writing Code vs. Shipping Code: Productivity Effects Across Generations of AI Coding Tools&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Murat Demirbas analyzes an MIT and Wharton study that combines internal Microsoft telemetry with public GitHub traces from over 100,000 developers to measure the real-world productivity impact of AI coding tools. The study divides tools into three generations: autocomplete, synchronous agents like Claude Code or Cursor, and asynchronous agents. Output gains at the lines-of-code level are striking, but attenuate sharply at each downstream stage—from files to commits, pull requests, repositories, and finally shipped releases: with autocomplete, lines of code jump by over 228% while shipped releases rise by only ~10%; with synchronous agents, the corresponding numbers are 741% and 20%.&lt;/p&gt;
&lt;p&gt;While Demirbas is skeptical of applying a linear manufacturing production function to software development, he finds the framing useful because it exposes human coordination and review costs. Translating the findings into Amdahl&amp;rsquo;s Law, he calculates that the parallelizable, acceleratable fraction of software work sits right around 35% across all three tool generations—matching the share of time developers actually spend writing code. Agents produce more shipped releases not because they expand that 35% slice, but because they accelerate it more aggressively and intervene closer to the finish line. The remaining 65%—understanding the problem, planning, team alignment, and code review—remains a serial bottleneck. To genuinely ship faster, organizations have to improve those non-coding stages rather than just generating code faster.&lt;/p&gt;
&lt;h2 id="when-was-the-last-time-you-did-just-one-thing"&gt;&lt;a href="https://alifeengineered.substack.com/p/when-was-the-last-time-you-did-just" rel="noopener noreferrer"&gt;When Was the Last Time You Did Just One Thing?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Steve Huynh recounts packing for a long trip: downloading dozens of YouTube videos, queueing up a backlog of podcasts, packing a handheld game console, two physical books, a Kindle, and his laptop just in case he wanted to get some work done. Then it hit him that this entire &amp;ldquo;arsenal&amp;rdquo; against a single moment of boredom would cause him to miss the trip itself—and that paradoxically, the harder we try not to waste a single second, the emptier every second feels. While the public preview ends there, the message from the title and setup is unmistakable: doing just one thing at a time is no longer our default state, but a skill we have to actively practice.&lt;/p&gt;
&lt;p&gt;For people in tech, it is a timely reminder about attention management. Not every quiet gap in the day needs to be filled with upskilling, podcasts, or side work. When every spare moment is stuffed with fresh stimulation, we gradually lose the ability to observe, rest properly, think deeply, and be fully present with whatever is in front of us. Looking busy and optimized isn&amp;rsquo;t the same as living intentionally; leaving blank space in your day is part of sustainable productivity, especially in engineering roles already fragmented by constant context switching.&lt;/p&gt;
&lt;h2 id="predicting-ai-job-exposure"&gt;&lt;a href="https://www.ben-evans.com/benedictevans/2026/5/24/ai-job-exposure" rel="noopener noreferrer"&gt;Predicting AI job exposure&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Benedict Evans critiques efforts to score which professions, companies, or industries are most &amp;ldquo;exposed&amp;rdquo; to AI disruption. In his view, this amounts to predicting the unpredictable, and the simplest sanity check is running the same methodology backward against previous technology waves. Over the past century, we automated accounting with mainframes, databases, spreadsheets, and ERPs—yet the total number of accountants kept growing. When analysis becomes cheap and fast, organizations do far more of it and ask different questions, while new regulations create entire categories of compliance work.&lt;/p&gt;
&lt;p&gt;A second blind spot is that a job&amp;rsquo;s core tasks can stay unchanged while the business model underneath it collapses: the internet didn&amp;rsquo;t automate away the craft of journalism, it destroyed the classified-ad monopoly that funded newsrooms. Third are second-order shocks nobody extrapolates from task lists, like smartphone GPS enabling Uber and reshaping the taxi industry. Deeper still, occupational databases like O*NET cannot capture what a real job actually entails, much like early expert systems failed to capture tacit human expertise. Evans concludes that while high-level frameworks are useful for thinking, granular job-by-job forecasts at this early stage will only be right by accident, because we have no way of knowing whether the exceptions will dwarf the rule.&lt;/p&gt;
&lt;h2 id="choosing-values-for-robust-tests"&gt;&lt;a href="https://testing.googleblog.com/2026/06/choosing-values-for-robust-tests.html" rel="noopener noreferrer"&gt;Choosing Values for Robust Tests&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Radion Khait highlights a subtle testing bug that is remarkably easy to miss: a test passes not because the implementation is correct, but because the test input happens to match the type&amp;rsquo;s default value. In the post&amp;rsquo;s example, a custom map&amp;rsquo;s &lt;code&gt;insert&lt;/code&gt; method forgets to assign the &lt;code&gt;value&lt;/code&gt; parameter and simply default-initializes the entry. A test that inserts &lt;code&gt;0&lt;/code&gt; and asserts that lookup returns &lt;code&gt;0&lt;/code&gt; passes with flying colors, because &lt;code&gt;0&lt;/code&gt; is already the default value for an integer. The result is a false sense of security: the method was called, but nothing proved the input was actually stored.&lt;/p&gt;
&lt;p&gt;From that example, Khait distills three practical rules for choosing test inputs. First, always use non-default values: non-zero numbers, non-empty strings, and enum variants other than the first declared value—changing &lt;code&gt;0&lt;/code&gt; to &lt;code&gt;5&lt;/code&gt; exposes the map bug immediately. Second, where appropriate, test representative inputs across equivalence classes such as empty, missing, &lt;code&gt;null&lt;/code&gt;, boundary values, and inputs that trigger complex branches, optionally pairing with fuzzing for broader coverage. Third, use distinct values for every parameter so tests immediately catch implementations that accidentally reuse an argument or swap parameter order; parameterized tests make it easy to cover multiple input combinations without duplicating test code.&lt;/p&gt;
&lt;h2 id="ai-demands-more-engineering-discipline-not-less"&gt;&lt;a href="https://charity.wtf/p/ai-demands-more-engineering-discipline" rel="noopener noreferrer"&gt;AI demands more engineering discipline. Not less&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Charity Majors pushes back against a growing temptation: if AI generates code quickly and reasonably well, can we relax code reviews, verification, and engineering rigor? Her answer is the exact opposite. As the cost of generating code plummets, lines of code stop being a precious asset and become a disposable artifact of our current understanding. A software team&amp;rsquo;s true output is shared understanding, and what retains lasting value is everything that tells us whether the system is actually working: requirements, invariants, failure modes, tests, observability, and reproducibility.&lt;/p&gt;
&lt;p&gt;She compares the AI wave to the shift from hand-tended &amp;ldquo;pet&amp;rdquo; servers to immutable infrastructure. Once servers could be torn down and rebuilt at will, engineering discipline didn&amp;rsquo;t vanish—it moved up a level into configuration management, provisioning pipelines, verification, and repeatable operations. Software is undergoing the same shift: when code can be regenerated cheaply, individual lines of code stop being the highest-leverage place to spend review energy, and focus moves to artifacts that specify behavior, architecture, trade-offs, and production outcomes. Human brains were never great at statically verifying code anyway, and non-deterministic AI systems make tracing, testing in production, record-and-replay, and tight feedback loops even more critical. Far from making software less rigorous, AI demands more engineering discipline than ever.&lt;/p&gt;
&lt;h2 id="nine-questions-i-now-ask-in-interviews-that-i-wish-i"&gt;&lt;a href="https://louisedeason.substack.com/p/nine-questions-i-now-ask-in-interviews" rel="noopener noreferrer"&gt;Nine Questions I Now Ask in Interviews That I Wish I&amp;rsquo;d Asked Five Years Ago&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Louise Deason reminds candidates that an interview is a two-way evaluation, even though most people still treat it like a school exam—which conveniently benefits the employer. The &amp;ldquo;do you have any questions for us?&amp;rdquo; segment at the end is the most underutilized part of the process, precisely because interviewers let their guard down and inadvertently reveal how the org actually runs. She shares nine questions designed to force specific, revealing answers: how the most recent promotion on the team happened, what the longest-tenured person in this role is doing now, what the team is genuinely bad at, how the team handled a recent disagreement with leadership, headcount plans for the next year, whether you can meet the people you&amp;rsquo;ll actually work with day to day, what six-month success and failure look like, when the last reorg happened, and why this role is open.&lt;/p&gt;
&lt;p&gt;The real signal lies in how the interviewer responds: whether the answer is concrete, evasive, or hesitant. A clear story about promotion criteria or an honest admission of a team&amp;rsquo;s weak spots signals transparency; conversely, claims that &amp;ldquo;we always agree,&amp;rdquo; reluctance to let you speak with future peers, or an awkward pause when asked why the seat is open are major red flags. Her closing reminder: you are always choosing between differently imperfect options, and any company that gets defensive when asked thoughtful questions doesn&amp;rsquo;t deserve your time.&lt;/p&gt;
&lt;h2 id="agentic-testing-where-agents-fit-in-the-e2e-testing-stack"&gt;&lt;a href="https://slack.engineering/agentic-testing-where-agents-fit-in-the-e2e-testing-stack/" rel="noopener noreferrer"&gt;Agentic Testing: Where Agents Fit in the E2E Testing Stack&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sergii Gorbachov at Slack shares findings from over 200 end-to-end test runs powered by AI agents, exploring where agentic testing belongs in the testing stack. Traditional E2E tests enforce a rigid, scripted path through the UI, whereas agentic tests start from a high-level goal: the agent observes the current UI state, decides the next action on the fly, and verifies the outcome. The team benchmarked three approaches—an agent driving Playwright MCP, an agent driving Playwright CLI, and AI-generated deterministic Playwright test scripts—against a staging workspace with synthetic data across two user flows: replying to a thread and search discovery.&lt;/p&gt;
&lt;p&gt;The AI-generated Playwright scripts ran fastest at around 3 minutes, but their failure rate spiked to ~48% on the more complex flow. Using Sonnet 4.5 to run the agent and Opus 4.6 to generate tests, Playwright MCP achieved the lowest failure rate at 0–12%, compared to 12–20% for Playwright CLI, where most failures stemmed from login and navigation hiccups at the execution layer. MCP also required fewer interaction turns because it batches actions and returns updated state in a single round-trip. However, each agentic test run cost $15–$30 and took over 5 minutes, with most of the cost driven by repeatedly re-sending conversation history. Slack&amp;rsquo;s conclusion: deterministic E2E tests remain the backbone for fast CI regression checks, while agentic testing sits as a complementary layer at the top of the testing pyramid—ideal for exploratory testing of complex flows, diagnosing flaky journeys, and reproducing production bugs.&lt;/p&gt;
&lt;h2 id="making-agents-easy-13-lessons-from-forter"&gt;&lt;a href="https://blog.forter.dev/making-agents-easy-13-lessons-from-forters-agentic-ai-sprint/" rel="noopener noreferrer"&gt;Making Agents Easy: 13 Lessons from Forter&amp;rsquo;s Agentic AI Sprint&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ben Maraney recounts how Forter ran a two-week company-wide sprint to get their entire R&amp;amp;D organization building AI agents. The core thesis isn&amp;rsquo;t that building agents is inherently effortless, but that an organization can systematically remove friction across three layers: tooling, agent runtime infrastructure, and organizational guardrails. On the tooling side, Forter built an internal MCP server called Toolchain: engineers open a web UI, pick and configure the tools they need, and immediately get an API key; adding a new internal tool takes just a declarative YAML file and a thin wrapper. By the end of the two-week sprint, Toolchain had grown to over 90 internal tools. And rather than standing up a complex custom RAG pipeline, they exposed their existing enterprise search engine as an MCP tool.&lt;/p&gt;
&lt;p&gt;The post shares several pragmatic operational lessons as well. Agent builders need full visibility into every raw tool request and response—one Forter incident-response agent appeared to &amp;ldquo;solve&amp;rdquo; an outage brilliantly until traces revealed it had simply read the already-written postmortem doc. For internal human-in-the-loop tools, teams don&amp;rsquo;t need formal eval suites on day one; prioritize tracing and observability first. Bring legal and security in early, enforce permissions in deterministic code rather than prompts, and put token costs on a visible dashboard. Finally, when training teams, tell them to treat an LLM like a bright new-grad intern: broad textbook knowledge, zero institutional context—meaning the responsibility for giving clear instructions rests squarely on the builder.&lt;/p&gt;
&lt;h2 id="agentic-code-review"&gt;&lt;a href="https://addyosmani.com/blog/agentic-code-review/" rel="noopener noreferrer"&gt;Agentic Code Review&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Addy Osmani argues that as coding agents write code faster and faster, the primary bottleneck in software engineering shifts from writing code to verifying and trusting it. AI can produce mountains of syntactically valid, test-accompanied, plausible-looking code, but human reading comprehension hasn&amp;rsquo;t sped up to match. That makes code review the highest-leverage skill in modern engineering: not merely hunting for typos, but reconstructing intent, assessing blast radius, spreading system knowledge across the team, and deciding whether a change should exist at all. Industry data from 2026 cited in the post shows that while code output has surged, code churn, defects, production incidents, and review wait times have climbed right alongside it.&lt;/p&gt;
&lt;p&gt;There is no single review policy that fits every context. Solo side projects with no users can lean heavily on automated tests and AI review; long-lived production systems handling real users, money, or sensitive data require risk-tiered human review. Osmani recommends keeping pull requests small, stating intent explicitly, requiring concrete proof of verification (such as real test outputs) before human review begins, reading test diffs more closely than implementation diffs, treating deterministic CI as a non-negotiable guardrail, and using AI reviewers as sensors rather than final judges. Humans may no longer read every single generated line, but they still own the merge button, carry accountability for production, and must focus their deepest scrutiny on high-blast-radius changes like auth, billing, security, and privacy.&lt;/p&gt;
&lt;h2 id="i-thought-redis-was-just-a-hashmap"&gt;&lt;a href="https://mukul0x9.pages.dev/blog/memdb/" rel="noopener noreferrer"&gt;I Thought Redis Was Just a HashMap&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Mukul Makwana starts from a deceptively simple question: how different is Redis or Memcached from a global hash map supporting &lt;code&gt;set&lt;/code&gt;, &lt;code&gt;get&lt;/code&gt;, and &lt;code&gt;del&lt;/code&gt;? To find out, he built a minimal in-memory database from scratch in Go. Version one wrapped Go&amp;rsquo;s built-in &lt;code&gt;map&lt;/code&gt;, accepted commands over TCP, and spawned one goroutine per client connection. The bottleneck appeared immediately as soon as multiple goroutines read and wrote concurrently: the map needed synchronization, and a single global mutex forced every operation to wait in line.&lt;/p&gt;
&lt;p&gt;To fix that, Makwana replaced the built-in map with a two-array arena design: &lt;code&gt;bucket_array&lt;/code&gt; stores offsets while &lt;code&gt;data_array&lt;/code&gt; packs metadata, keys, values, and next-entry offsets for collision chaining in contiguous byte slices. To reduce lock contention, the keyspace is partitioned into shards, each with its own arrays and &lt;code&gt;RWMutex&lt;/code&gt;, while a background goroutine handles shard resizing when load factors climb. Because &lt;code&gt;data_array&lt;/code&gt; is append-only, deletes simply mark a tombstone bit, and a compaction pass rebuilds the shard once dead bytes cross a threshold—at the cost of locking that shard during compaction. Benchmarking &lt;code&gt;SET&lt;/code&gt; workloads showed Go&amp;rsquo;s built-in &lt;code&gt;map&lt;/code&gt; still winning on raw throughput and stop-the-world pause times, but the custom pointer-free arena slashed concurrent GC mark time from ~113 ms down to 7.8 ms. Even then, this toy engine still lacks persistence, eviction policies, crash recovery, and replication—the exact things that make real Redis a serious piece of engineering.&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 #118</title><link>https://miti99.com/en/post/2026/07/06/</link><pubDate>Mon, 06 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/06/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #118.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="telling-the-story-right-efficient-logging-in-go"&gt;&lt;a href="https://robinsiep.com/blog/posts/go-logs/" rel="noopener noreferrer"&gt;Telling the story right: efficient logging in Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Following up on his post about Go error handling, Robin Siep turns to logging: good logs must carry enough context to debug production issues while remaining easy to read during local development. He groups what to log into three categories: errors, almost always at &lt;code&gt;ERROR&lt;/code&gt; level with a stack trace and triggering conditions; important business events and state transitions, typically at &lt;code&gt;INFO&lt;/code&gt; level recording who performed the action; and interactions with databases, third-party services, or clients, where overly chatty details can be pushed down to &lt;code&gt;DEBUG&lt;/code&gt;. Three common mistakes are logging secrets, credentials, or PII, running production at the wrong log level, and pruning logs too aggressively up front—since logging too little usually hurts far more than logging too much.&lt;/p&gt;
&lt;p&gt;Structured logs are essential in production for filtering and querying, whereas colorized plain-text logs are much easier to scan locally. Siep recommends keeping plain-text output in production as well: when your log ingestion pipeline goes down, stdout text logs are what you have left to diagnose and fix the pipeline itself. His implementation uses Go&amp;rsquo;s standard &lt;code&gt;slog&lt;/code&gt; package with two custom handlers: one that formats records as CLEF to ship to Seq with stack traces extracted into a dedicated field, and a colorized text handler that renders attributes cleanly. If shipping to Seq fails, both the pipeline error and the original log record still get written through the text handler. The same pattern works with &lt;code&gt;zap&lt;/code&gt;, showing that logs are only as valuable as their ability to preserve context even when your observability stack is having a bad day.&lt;/p&gt;
&lt;h2 id="on-cpu-physics-and-cpu-cycles"&gt;&lt;a href="https://6it.dev/blog/on-cpu-physics-and-cpu-cycles-80730" rel="noopener noreferrer"&gt;On CPU Physics and CPU Cycles&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post is a draft book section on writing efficient C++ for modern 64-bit CPUs, built around one central thesis: software performance is governed not just by algorithms, but by hardware physics. The farther an electrical signal has to travel, the slower the access, largely because parasitic capacitance grows with wire length. That is why operations on registers and the ALU take just a couple of cycles, L1 cache takes a few cycles, L2 and L3 get progressively more expensive, and a trip to main RAM can cost hundreds of CPU cycles. Going farther out—across the motherboard to SSDs, HDDs, and the network—adds orders of magnitude more latency, giving cache locality massive real-world impact.&lt;/p&gt;
&lt;p&gt;To hide that latency, modern CPUs rely on instruction pipelining, superscalar execution, and branch prediction, speculatively executing instructions before a branch outcome is known. Even so, a mispredicted branch costs tens of cycles; attributes like &lt;code&gt;[[likely]]&lt;/code&gt; and &lt;code&gt;[[unlikely]]&lt;/code&gt; should be reserved for cases where the branch direction is overwhelmingly lopsided, such as error-handling paths. Cache warmth depends on access patterns and working set size rather than whether memory lives on the stack, static storage, or the heap. Contiguous layouts like &lt;code&gt;std::vector&lt;/code&gt; shine during sequential traversal, making &lt;code&gt;vector&lt;/code&gt; far friendlier to both CPU caches and the TLB than node-based structures like linked lists or trees. Think of performance as a chain of physical costs.&lt;/p&gt;
&lt;h2 id="the-log-is-the-agent"&gt;&lt;a href="https://x.com/ishaansehgal/status/2065129901427130678" rel="noopener noreferrer"&gt;The Log Is the Agent&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ishaan Sehgal offers a crisp definition of an AI agent: the agent is not the model, the runtime, the active loop, or the toolset—it is the durable log of everything it has seen and done. He compares it to a character in Skyrim or Elden Ring: what defines your character isn&amp;rsquo;t the game engine, the console, or the controller, but the save file. For an agent, the log is an append-only sequence of events capturing user inputs, model outputs, tool calls, and tool results, alongside references to system prompts and skills. The log alone is enough for a brand-new process to reconstruct state and pick up right where the previous one left off.&lt;/p&gt;
&lt;p&gt;The architectural implication is that the log must be the centerpiece of the system rather than a debugging byproduct. Every operation reads from the log, appends to the log, or renders a projection of the log—much like a database treats tables, indexes, and caches as projections over a write-ahead log. While the log enables crash recovery, it doesn&amp;rsquo;t automatically make external side effects idempotent, so runtimes still have to handle duplicate or ambiguous in-flight tool calls; if a worker dies, another worker can claim the session and continue; if you want to test a different model or strategy, you simply fork from the same history. Context compaction and summarization help fit within token windows, but because they are lossy by nature, they must never replace the raw log as the source of truth. This framing also exposes a new form of vendor lock-in: lock-in to an agent&amp;rsquo;s operational history. Whoever can inspect, export, and query the log is who truly owns the agent.&lt;/p&gt;
&lt;h2 id="software-is-not-a-single-player-game"&gt;&lt;a href="https://www.davidpoll.com/2026/06/software-is-not-a-single-player-game/" rel="noopener noreferrer"&gt;Software Is Not A Single-Player Game&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;David Poll responds to the argument that all meaningful judgment should happen before code review, back in the PRD or design doc phase. That view had a rational origin: writing code used to be the most expensive step, so the industry built an entire apparatus of PRDs, design docs, and RFCs to reduce the cost of building the wrong thing. Yet that linear view misses the essence of software development: it is not a single-player game, but a collaborative practice where teams develop shared technical taste, mental models, and product judgment over time. Code review isn&amp;rsquo;t just about catching bugs—it is one of the primary places where that shared understanding is forged.&lt;/p&gt;
&lt;p&gt;Now that AI has dramatically lowered the cost of writing code, documents that used to serve as proxies for code are giving way to working changes. A prototype or pull request is now cheap enough to be a better medium for debate, making code review even more central: the team looks at a concrete change, asks how it affects the system and users, and decides whether it belongs in the product. A closed pull request is no longer a wasted failure, but often the cheapest way to learn that an approach doesn&amp;rsquo;t fit. Still, Poll warns against a reckless &amp;ldquo;just ship and rollback&amp;rdquo; mentality: code can be reverted, but user trust and product perception cannot. Some decisions still must be settled before coding—such as org-wide architecture, security, compliance, and customer commitments—even as the set of things requiring heavy up-front specification shrinks.&lt;/p&gt;
&lt;h2 id="cleaning-up-after-ai-rockstar-developers"&gt;&lt;a href="https://www.codingwithjesse.com/blog/rockstar-developers/" rel="noopener noreferrer"&gt;Cleaning up after AI rockstar developers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jesse Skinner uses the trope of the &amp;ldquo;rockstar developer&amp;rdquo; to illustrate a familiar engineering hazard: someone brilliant, fast, and enamored with shiny new technology who can single-handedly rewrite a core system over a weekend, but leaves behind code the rest of the team struggles to understand or maintain. When that person moves on, the remaining team pays the real bill: spending days just getting the project to run, untangling convoluted data flows, learning unfamiliar languages or libraries, and convincing management that the system needs rescuing rather than continuing to coast on the rockstar&amp;rsquo;s aura.&lt;/p&gt;
&lt;p&gt;Skinner&amp;rsquo;s core point is that AI can amplify this exact failure mode. Every chat session with an LLM is like dropping a brand-new &amp;ldquo;rockstar&amp;rdquo; into your codebase: it generates code at breakneck speed, holds zero long-term institutional memory, eagerly applies generic &amp;ldquo;best practices&amp;rdquo; the problem doesn&amp;rsquo;t need, and bears no responsibility for whether the system remains comprehensible to the team six months later. When dozens of features and bug fixes are generated across disconnected sessions, a codebase quickly devolves into a patchwork of hundreds of clashing design styles while the architecture balloons far beyond the problem&amp;rsquo;s actual complexity. He advises using LLMs as assistants under firm human technical leadership: work in small increments, review every change closely, retain architectural control, simplify relentlessly, and stay willing to write code by hand whenever that is the better way to preserve quality.&lt;/p&gt;
&lt;h2 id="a-new-era-for-software-testing"&gt;&lt;a href="https://antirez.com/news/168" rel="noopener noreferrer"&gt;A new era for software testing&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Antirez observes that while AI-assisted coding trades away some structural code quality for speed, in QA and testing LLMs unlock much stronger automation without sacrificing quality. Traditional test suites made up of unit and integration tests remain essential, but 100% line coverage does not mean 100% state coverage. End-to-end integration testing has historically been painful due to timing issues, complex environment setup, and outputs that require human judgment to evaluate, causing many manual test scenarios to be skipped before release.&lt;/p&gt;
&lt;p&gt;His proposal is to write a Markdown prompt instructing an AI agent to act as a QA engineer performing exploratory manual testing on a new release. The agent starts by inspecting recent commits since the last release, identifying potentially affected areas, and hunting for targeted regressions. On DwarfStar, an open-source LLM inference engine, the agent tested distributed inference across two MacBooks over every available GGUF model file and caught a throughput regression without needing hardcoded baseline numbers, reasoning about expected speeds dynamically. On Redis Arrays, the agent built a non-trivial application from scratch, spun up an environment with replication and persistence, and simulated days of multi-user activity to uncover edge-case misbehavior—even flagging surprising semantics, missing docs, and rough edges. Antirez believes agentic QA can raise the quality bar for every release, partially offsetting the structural sloppiness introduced by rapid AI coding.&lt;/p&gt;
&lt;h2 id="nobody-pushed-back-why-engineers-stay-silent-until-it"&gt;&lt;a href="https://howtocenterdiv.com/beyond-the-div/nobody-pushed-back" rel="noopener noreferrer"&gt;Nobody Pushed Back: Why Engineers Stay Silent Until It&amp;rsquo;s Too Late&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article argues that many architectural disasters happen not because engineers failed to spot the flaw, but because they saw it clearly and didn&amp;rsquo;t feel safe speaking up. In a meeting room, a shaky technical direction gets rubber-stamped under the banner of &amp;ldquo;alignment&amp;rdquo; even though half the room privately disagrees; months later, when the system collapses, everyone admits they saw it coming. The pattern repeats across the industry: the technical risk is obvious to the people closest to the work, but the social and career cost of pushing back is higher than the cost of staying quiet.&lt;/p&gt;
&lt;p&gt;Case studies from Nokia, TSB, Boeing, and Microsoft show that bad news is rarely missing—it just fails to travel upward to decision-makers. Nokia had engineers who knew Symbian wasn&amp;rsquo;t built for the touchscreen era; TSB had technical objections raised before its disastrous core banking migration; Boeing had engineers flagging MCAS risks; Microsoft had internal signals that Windows Phone&amp;rsquo;s direction was boxing itself into a corner. The root cause isn&amp;rsquo;t personal cowardice, but organizational incentives: dissent gets labeled &amp;ldquo;not being a team player,&amp;rdquo; the Highest Paid Person&amp;rsquo;s Opinion (HiPPO) wins by default, and watermelon metrics (green on the outside, red on the inside) are used to shut down debate, turning technical trade-offs into political loyalty tests. Effective pushback isn&amp;rsquo;t saying &amp;ldquo;this is wrong,&amp;rdquo; but making costs and risks concrete through questions like: what will this decision cost us in 18 months, how are we testing this failure mode, and what is our rollback plan if it breaks?&lt;/p&gt;
&lt;h2 id="loop-engineering"&gt;&lt;a href="https://addyo.substack.com/p/loop-engineering" rel="noopener noreferrer"&gt;Loop Engineering&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Addy Osmani describes &amp;ldquo;loop engineering&amp;rdquo; as the natural evolution beyond prompt engineering: instead of manually prompting an agent turn by turn, the engineer designs a self-sustaining loop that finds work, delegates tasks, verifies results, and decides what to do next. A loop acts like a recursive goal—you define the objective, and the AI iterates until the exit criteria are met. According to Osmani, this paradigm is already practical today because both Codex and Claude Code provide all the necessary building blocks, so rather than arguing over which tool wins, teams should design loops that can run across both.&lt;/p&gt;
&lt;p&gt;A complete loop rests on five primitives. Scheduled automations triage issues, summarize CI failures, or hunt for new bugs. Git worktrees let multiple agents work in parallel without stepping on each other&amp;rsquo;s files. Skills package project-specific knowledge so you don&amp;rsquo;t have to re-explain conventions in every session. Connectors, typically built on MCP, give agents access to issue trackers, databases, Slack, or staging APIs. Subagents separate the builder from the verifier, since an agent that just wrote the code is usually far too lenient when grading its own homework. Tying it all together is durable external memory—Markdown files or Linear boards in the repo—because models forget between runs while the repository remembers. Even so, Osmani stresses that loops don&amp;rsquo;t replace the engineer: an unsupervised loop is also an unsupervised mistake generator. Without human review and comprehension, loops simply accumulate &amp;ldquo;comprehension debt&amp;rdquo; faster; a good loop accelerates delivery while keeping the engineer deeply connected to how the system works.&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_!Y582!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b5057ba-3667-446b-9760-b726da1431f4_2484x3002.png" alt="Latency vs Throughput vs Bandwidth"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!bdjh!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9c8ec17-676c-441a-9c97-d08f8eec804f_2484x3002.png" alt="7 Permission Modes Every Claude Code User Should Know"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Videos:&lt;/strong&gt;
&lt;a href="https://www.youtube.com/watch?v=MUWAbpg1xLo" rel="noopener noreferrer"&gt;How Do CPUs, GPUs, and TPUs Differ?&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
 &lt;p&gt;This video breaks down the differences between CPUs, GPUs, and TPUs: CPUs offer flexibility for general-purpose tasks, GPUs excel at massively parallel processing, and TPUs are purpose-built accelerators for machine learning workloads. A concise overview to help you pick the right hardware across latency, throughput, and cost trade-offs.&lt;/p&gt;

&lt;/blockquote&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 #115</title><link>https://miti99.com/en/post/2026/07/02/</link><pubDate>Thu, 02 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/02/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #115.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="go-experiments-explained"&gt;&lt;a href="https://www.alexedwards.net/blog/go-experiments-explained" rel="noopener noreferrer"&gt;Go Experiments Explained&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alex Edwards explains the experimental feature mechanism Go ships in each release: sometimes a new standard library package like &lt;code&gt;testing/synctest&lt;/code&gt;, sometimes a compiler or runtime change like a new garbage collector, and more rarely a language behavior change like loop variable scoping before it became the default in Go 1.22. The goal is to gather real-world feedback before locking a feature in; if it causes problems or draws pushback, it can be revised or dropped entirely. The typical lifecycle starts disabled by default, flips to enabled by default after a release or two (often with a transition period allowing opt-out), and eventually retires the flag—though exceptions happen: &lt;code&gt;Arenas&lt;/code&gt; was put on indefinite hold after negative feedback, while Swiss tables went straight to default.&lt;/p&gt;
&lt;p&gt;Because there is no official status page tracking experiments, Edwards compiled a reference table for Go 1.26 from &lt;code&gt;go doc goexperiment.Flags&lt;/code&gt;, the &lt;code&gt;internal/buildcfg&lt;/code&gt; source, and release notes. To use them, pass comma-separated lowercase names in the &lt;code&gt;GOEXPERIMENT&lt;/code&gt; environment variable to enable features, or prefix a name with &lt;code&gt;no&lt;/code&gt; to disable it, across &lt;code&gt;go build&lt;/code&gt;, &lt;code&gt;go run&lt;/code&gt;, and &lt;code&gt;go test&lt;/code&gt;. For everyday Go developers, the most notable flags are &lt;code&gt;GreenTeaGC&lt;/code&gt; and &lt;code&gt;Dwarf5&lt;/code&gt; (already enabled by default, so worth knowing how to disable if issues arise), &lt;code&gt;JSONv2&lt;/code&gt;, &lt;code&gt;GoroutineLeakProfile&lt;/code&gt; for catching leaked goroutines, &lt;code&gt;RuntimeSecret&lt;/code&gt; for code handling sensitive data, and &lt;code&gt;RuntimeFreegc&lt;/code&gt;. One important caveat: experiments fall outside Go&amp;rsquo;s compatibility promise, so use them to test, benchmark, and give feedback rather than relying on them prematurely in production.&lt;/p&gt;
&lt;h2 id="low-level-network-optimizations-socket-options-that-matter"&gt;&lt;a href="https://goperf.dev/02-networking/low-level-optimizations/" rel="noopener noreferrer"&gt;Low-Level Network Optimizations: Socket Options That Matter&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This entry from the Go Optimization Guide examines socket options that directly impact latency and throughput in Go network applications. Operating system defaults prioritize safety and broad compatibility, meaning under heavy load they often become bottlenecks well before CPU or memory. &lt;code&gt;TCP_NODELAY&lt;/code&gt; disables Nagle&amp;rsquo;s algorithm so small packets are sent immediately at the cost of higher bandwidth overhead; Go enables this by default on &lt;code&gt;TCPConn&lt;/code&gt;. &lt;code&gt;SO_REUSEPORT&lt;/code&gt; lets multiple processes or threads bind to the same port while the kernel distributes incoming connections across separate queues, reducing lock contention and scaling across CPU cores. Receive and send buffer sizes (&lt;code&gt;SO_RCVBUF&lt;/code&gt; and &lt;code&gt;SO_SNDBUF&lt;/code&gt;) should roughly match the bandwidth-delay product: too small increases syscalls and caps throughput, while too large wastes memory and inflates latency via bufferbloat.&lt;/p&gt;
&lt;p&gt;For TCP keepalives, OS defaults are very conservative; common production settings wait 30–60 seconds, probe every 10–15 seconds, and retry 3–5 times, though tuning them too aggressively increases traffic and risks false drops on congested links. In Go, &lt;code&gt;SetKeepAlivePeriod&lt;/code&gt; only controls the initial idle time; starting in Go 1.23, &lt;code&gt;SetKeepAliveConfig&lt;/code&gt; lets you configure Interval and Count without dropping down to raw syscalls. &lt;code&gt;SOMAXCONN&lt;/code&gt; governs the listener backlog queue and is tuned at the OS level via &lt;code&gt;sysctl&lt;/code&gt;. To apply socket options at the right moment—before the socket is bound—use the &lt;code&gt;Control&lt;/code&gt; callback on &lt;code&gt;net.ListenConfig&lt;/code&gt; with &lt;code&gt;syscall.RawConn&lt;/code&gt;. The overarching advice: change one setting at a time, test under realistic load, and rely on measurements rather than copy-pasting configs from elsewhere.&lt;/p&gt;
&lt;h2 id="when-is-100-vibe-coding-ok-"&gt;&lt;a href="https://dev.to/realvorl/when-is-100-vibe-coding-ok--38p" rel="noopener noreferrer"&gt;When Is 100% Vibe Coding OK ?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Viorel PETCU opens with the frustration of spending hours reviewing &amp;ldquo;vibe-written&amp;rdquo; specifications: they read smoothly on the surface but say almost nothing concrete and cannot be applied to an existing system. The author isn&amp;rsquo;t against vibe coding—in fact, he uses it regularly for one-off scripts, throwaway charts, quick parsers, or docs nobody has to maintain, where speed matters more than rigor. Once software needs long-term maintenance, however, the equation changes completely.&lt;/p&gt;
&lt;p&gt;His motivating example is a wooden puzzle of 25 identical pentacube pieces that must pack a &lt;code&gt;5×5×5&lt;/code&gt; cube. After failing to solve it by hand, he used Go and ChatGPT to write a solver: the initial struggle wasn&amp;rsquo;t the algorithm, but the domain representation—coordinate conventions, slice notation, piece rotations, and naming. Once the model stabilized, the rest was classic brute-force recursion with backtracking, and modern hardware was fast enough that no further optimization was needed. Within about two hours, the project evolved into a general solver complete with OBJ/MTL export for viewing in Blender. Crucially, the author was able to push past hallucinated constraints, wrong assumptions, and buggy code because he already knew for a fact that the puzzle had a physical solution. His conclusion: 100% vibe coding is fine when a human holds the invariants, the constraints are real, and the output is verifiable; if the requirements themselves are just vibes, the system has nothing solid to converge on.&lt;/p&gt;
&lt;h2 id="self-calling-executables"&gt;&lt;a href="https://log.pfad.fr/2026/self-calling-executable/" rel="noopener noreferrer"&gt;Self-calling executables&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Olivier introduces the &amp;ldquo;self-calling executable&amp;rdquo; pattern: a running program spawns another instance of itself, directly or indirectly, to take on a different role. The first use case is black-box testing a &lt;code&gt;main&lt;/code&gt; function when the codebase relies on global state that causes in-process tests to interfere with one another. A test invokes the test binary itself via &lt;code&gt;os.Args[0]&lt;/code&gt; along with an environment variable like &lt;code&gt;TEST_MAIN&lt;/code&gt;; inside &lt;code&gt;TestMain&lt;/code&gt;, if that variable is set, the binary runs the real entrypoint instead of the test runner, isolating each invocation inside a fresh child process.&lt;/p&gt;
&lt;p&gt;The second use case is integrating with external tools, illustrated by jjui, a terminal UI for Jujutsu. The &lt;code&gt;ssh&lt;/code&gt; command uses the &lt;code&gt;SSH_ASKPASS&lt;/code&gt; environment variable to invoke an external helper when it needs a passphrase; jjui points &lt;code&gt;SSH_ASKPASS&lt;/code&gt; back at itself so that when &lt;code&gt;ssh&lt;/code&gt; prompts for a password, the grandchild process connects back to the main jjui process over a Unix domain socket (with the PID embedded in the path so multiple sessions can run concurrently), forwards the prompt, collects the user&amp;rsquo;s input, and prints it to stdout for &lt;code&gt;ssh&lt;/code&gt;. Because this handles sensitive credentials, the author adds two safeguards: each child receives a random token it must present on connect, and the main process walks the connecting client&amp;rsquo;s ancestor PID chain to verify lineage. Downsides include harder debugging, risk of infinite recursion if environment variables are misconfigured, and the Go race detector sleeping for 1 second on every process exit—which once stretched Forgejo&amp;rsquo;s integration suite from 45 minutes to over 2 hours, fixable via &lt;code&gt;GORACE=&amp;quot;atexit_sleep_ms=0&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="modern-engineering-values"&gt;&lt;a href="https://cpojer.net/posts/modern-engineering-values" rel="noopener noreferrer"&gt;Modern Engineering Values&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Christoph Nakazawa shares that he now rarely writes code by hand: projects like Vite+, fate, and Athena Crisis are largely written by coding agents, primarily via Codex CLI. His workflow is to have the agent propose a plan and ask clarifying questions before executing, require a failing test before fixing a bug, run several automated review passes, and only then review the diff himself. When writing code is no longer the bottleneck, discussing and reviewing code becomes the limiting factor.&lt;/p&gt;
&lt;p&gt;From there, the post proposes a set of engineering values for the agentic era. Strong ownership: agents amplify engineers with deep product understanding just as much as they amplify noise from people lacking context, meaning effective teams will be small—around two to three people—with clear boundaries, and code review will focus on alignment rather than nitpicking individual lines. Good taste to know what is actually worth building. Tight guardrails and fast feedback loops—linters, automated tests, and tools that operate only on changed files—because working with agents is like onboarding a brand-new hire with zero context on every prompt. Keeping context inside the repo rather than scattered across docs, chat threads, or tribal memory. Owning your stack instead of pulling in heavy third-party dependencies, since agents have drastically lowered the cost of building in-house. As for management, he believes the role will become increasingly technical: as execution becomes cheap, judgment becomes the bottleneck.&lt;/p&gt;
&lt;h2 id="building-software-is-learning"&gt;&lt;a href="https://registerspill.thorstenball.com/p/building-software-is-learning" rel="noopener noreferrer"&gt;Building Software Is Learning&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Thorsten Ball publishes an internal note sent to the Amp team on why building new software is always a learning process. The idealized sequence—&amp;ldquo;we need this feature,&amp;rdquo; &amp;ldquo;I built it,&amp;rdquo; &amp;ldquo;that&amp;rsquo;s exactly what I wanted&amp;rdquo;—almost never happens without a detailed spec; reality usually looks more like &amp;ldquo;that&amp;rsquo;s not what I meant,&amp;rdquo; &amp;ldquo;there are three ways to do this, which one do we want?&amp;rdquo;, or &amp;ldquo;I tried it and I don&amp;rsquo;t like how it feels.&amp;rdquo; That is because people only truly understand what they are building while building it, and avoiding that discovery entirely would require specifying every detail up front—which is just programming by another name.&lt;/p&gt;
&lt;p&gt;The good news is that you can shrink the gap between a confident &amp;ldquo;I&amp;rsquo;ll build it&amp;rdquo; and contact with reality. Instead of disappearing for four weeks, build a prototype in an hour, write a spec in thirty minutes, break the work down and ship a piece every day, cut scope to isolate the unknowns, record a fake demo video, write the release announcement first, or draft README examples to test an API design. Feedback can come from CI, teammates, users, or yourself dogfooding the feature. Ball adds two practical warnings: a prototype riddled with obvious bugs will only get you bug reports instead of useful design feedback, and keeping a branch alive for three weeks before merging 27 commits at once means when CI breaks, you have 27 potential culprits. The question to keep asking is how to get feedback as early and as often as possible so you can learn faster.&lt;/p&gt;
&lt;h2 id="you-must-fix-your-asserts"&gt;&lt;a href="https://kristoff.it/blog/fix-your-asserts/" rel="noopener noreferrer"&gt;You Must Fix Your Asserts&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Loris Cro argues against the habit of disabling assertions in production, using Zig as context. An assertion is a line of code stating a program truth—a precondition, postcondition, or invariant; if the type system can express the constraint, use types, and otherwise assertions catch programming bugs, often more effectively than unit tests when paired with fuzzing. In Zig, &lt;code&gt;std.debug.assert&lt;/code&gt; is built on &lt;code&gt;unreachable&lt;/code&gt;: in checked build modes like Debug or ReleaseSafe, a violated assertion panics; in ReleaseFast or ReleaseSmall, the compiler treats the assertion as an assumed fact for optimization, meaning a false assertion leads to unpredictable undefined behavior. Unlike C/C++, Zig&amp;rsquo;s assert is a regular function rather than a macro, so its argument expression is always evaluated.&lt;/p&gt;
&lt;p&gt;According to Cro, you have three choices: keep assertions active as runtime checks, let the compiler optimize around them and accept the risk, or strip them out—and the third option is the worst. Disabling assertions means that when the &amp;ldquo;impossible&amp;rdquo; happens, the program keeps running on broken assumptions, silently diverging from its spec while stripping away the very signal that would have caught it. Worse, future maintainers will write new code trusting those false assertions, allowing vulnerabilities to creep in unnoticed. He points to TigerBeetle keeping assertions enabled in production and Ghostty shipping ReleaseFast builds. The takeaway: fix broken assertions, gate genuinely expensive checks behind debug-only flags, log instead of crashing where appropriate, and choose build modes based on your risk model rather than erasing error signals.&lt;/p&gt;
&lt;h2 id="the-software-engineering-books-i-keep-recommending"&gt;&lt;a href="https://newsletter.techworld-with-milan.com/p/best-software-engineering-books-2026" rel="noopener noreferrer"&gt;The Software Engineering Books I keep recommending&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dr. Milan Milanović shares the software engineering books he recommends most often, noting that reading gives him both breadth and depth in technical discussions and decision-making—and in the AI era, helps him evaluate and steer AI tools more effectively. Rather than presenting a one-size-fits-all &amp;ldquo;must-read&amp;rdquo; list, he groups the books by the specific problem a reader is facing, arguing that the right question isn&amp;rsquo;t &amp;ldquo;what should I read?&amp;rdquo; but &amp;ldquo;where am I currently stuck?&amp;rdquo; Most of the picks aren&amp;rsquo;t tied to specific frameworks, so their lessons age well.&lt;/p&gt;
&lt;p&gt;For coding mindset, he highlights &lt;code&gt;The Pragmatic Programmer&lt;/code&gt;, &lt;code&gt;Clean Code&lt;/code&gt; (noting some rules are dated), and &lt;code&gt;A Philosophy of Software Design&lt;/code&gt;, the book he re-reads most often. Architecture covers &lt;code&gt;Fundamentals of Software Architecture&lt;/code&gt;, &lt;code&gt;Software Architecture: The Hard Parts&lt;/code&gt;, and &lt;code&gt;Domain-Driven Design Quickly&lt;/code&gt;; systems and data feature the second edition of &lt;code&gt;Designing Data-Intensive Applications&lt;/code&gt; alongside the more approachable &lt;code&gt;Understanding Distributed Systems&lt;/code&gt;. The AI section pairs &lt;code&gt;The Hundred-Page Language Models Book&lt;/code&gt; on how language models work with Chip Huyen&amp;rsquo;s &lt;code&gt;AI Engineering&lt;/code&gt; on building real-world AI applications. Rounding out the list are &lt;code&gt;The Art of Unit Testing&lt;/code&gt; for testing, &lt;code&gt;Accelerate&lt;/code&gt; (with the four DORA metrics) and &lt;code&gt;Refactoring&lt;/code&gt; for development workflow, and &lt;code&gt;The Software Engineer's Guidebook&lt;/code&gt; and &lt;code&gt;Deep Work&lt;/code&gt; for career growth. He also mentions his own new book on laws in software engineering.&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 #108</title><link>https://miti99.com/en/post/2026/06/04/</link><pubDate>Thu, 04 Jun 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/06/04/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #108.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="coding-is-solved-software-is-not"&gt;&lt;a href="https://arcplane.ai/journal/software-is-not-solved" rel="noopener noreferrer"&gt;Coding is solved? Software is not.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Opening with Boris Cherny&amp;rsquo;s (creator of Claude Code) remark that coding is &amp;ldquo;basically solved,&amp;rdquo; Arcplane&amp;rsquo;s Gao argues that the statement is true but incomplete. Coding is merely translating instructions into source code, whereas software development is turning ambiguous intent into a reliable system — a process of progressively reducing entropy. The paradox is that fast AI code generation can actually increase entropy: massive test suites that only validate whatever implementation the agent happened to pick, and plausible-sounding plans that leave core product decisions unresolved. Code arrives sooner, but the team doesn&amp;rsquo;t reach confidence any sooner — the bottleneck simply shifts to review, reconstructing the agent&amp;rsquo;s intent, and interpreting noisy verification evidence.&lt;/p&gt;
&lt;p&gt;Drawing on experience running an authentication product managing millions of identities, the author points to four things that need to change. First, context must be curated deliberately, and review feedback must be captured for future runs. Second, specifications must live alongside the work and be updated as new edge cases surface, because an agent will happily build a complete implementation of an ambiguous requirement. Third, verification evidence must be clear enough for a reviewer to see what the agent ran, what failed, and how it fixed it. Fourth, humans need well-placed checkpoints — especially before deployment — because &amp;ldquo;clean code cannot save a bad spec,&amp;rdquo; and review depth should scale with risk.&lt;/p&gt;
&lt;h2 id="ideas"&gt;&lt;a href="https://www.noahzender.com/ideas" rel="noopener noreferrer"&gt;Ideas&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Rather than a single essay, this is Noah Zender&amp;rsquo;s index page collecting nearly 500 mental models, patterns, and frameworks distilled from hundreds of books, podcasts, and videos. The ideas are organized into 11 categories: mental models and decision-making, knowledge and learning, creativity and writing, product and startups, brand and marketing, tech innovation and AI, investing and economics, psychology and self-improvement, work and leadership, philosophy and worldview, plus an uncategorized bucket. Each entry links to a short standalone page, reading more like a personal knowledge base than a linear article.&lt;/p&gt;
&lt;p&gt;A representative example is the &amp;ldquo;Leveraged Expert&amp;rdquo; concept, which argues that &lt;em&gt;when&lt;/em&gt; you specialize matters just as much as &lt;em&gt;what&lt;/em&gt; you specialize in. Every technology adoption curve has an inflection point where growth either crosses into the mainstream or rapidly fizzles out. If you are already an expert in a field right as it hits that inflection point, your leverage compounds automatically as adoption takes off without requiring extra effort on your part. Specializing too early in a field that is still too nascent yields much lower leverage; the sweet spot is the early-adopter phase, where the surface area for luck is highest. For younger developers, it&amp;rsquo;s a useful lens when deciding which technologies to invest in deeply.&lt;/p&gt;
&lt;h2 id="ai-productivity-debate"&gt;&lt;a href="https://newsletter.getdx.com/p/ai-productivity-debate" rel="noopener noreferrer"&gt;AI productivity debate&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article from DX&amp;rsquo;s Engineering Enablement newsletter recaps the closing panel of the DX Annual conference, featuring engineering leaders and researchers from Etsy, Twilio, GitHub, Google, and DX. Asked whether AI will mean needing fewer engineers, most panelists disagreed: demand for software rises as the cost of building it falls, so total builder headcount won&amp;rsquo;t shrink even if the definition of an engineer evolves. On technical debt, opinions split: Twilio&amp;rsquo;s representative viewed AI as an amplifier (garbage in, garbage out), while Brian Houck warned that organizations are optimizing for PR velocity over simplicity, accumulating &amp;ldquo;comprehension debt&amp;rdquo; as humans understand less and less of a codebase largely written by AI.&lt;/p&gt;
&lt;p&gt;The panelists opposed top-down AI mandates: Twilio simply pre-installed tools and offered basic guidance yet still saw adoption surge, whereas mandates tend to breed superficial compliance. Using AI utilization as an individual performance metric was roundly rejected by engineers. As for bottlenecks, developers spend only about 14% of their time writing code, so the real constraints remain decision-making, prioritization, and product design; code review mostly feels slower because code is being generated faster. Finally, most adoption hurdles are human and cultural: leaders need to give engineers dedicated time to learn, and two-week group learning sprints proved far more effective than isolated solo tinkering.&lt;/p&gt;
&lt;h2 id="maintainability-sensors-for-coding-agents"&gt;&lt;a href="https://martinfowler.com/articles/sensors-for-coding-agents.html" rel="noopener noreferrer"&gt;Maintainability sensors for coding agents&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Birgitta Böckeler (Thoughtworks) shares hands-on experiments with maintainability &amp;ldquo;sensors&amp;rdquo; that help both humans and AI coding agents gauge code quality, building on the concept of &amp;ldquo;harness engineering.&amp;rdquo; Her testbed was a TypeScript, Next.js, and React dashboard rebuilt entirely with AI and given almost no up-front code-quality instructions, designed to see how far an agent could get relying solely on feedback from sensors like the type checker, ESLint, Semgrep, &lt;code&gt;dependency-cruiser&lt;/code&gt;, the test suite, and mutation testing. With ESLint, she enabled rules capping parameter counts, file length, function length, and cyclomatic complexity, rewriting error messages into actionable remediation instructions and allowing the agent to suppress warnings only if it attached an explicit justification for reviewers.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;dependency-cruiser&lt;/code&gt; helped the agent respect layered module boundaries and self-correct violations. Raw coupling metrics, by contrast, proved noisy and poorly interpreted by AI because &amp;ldquo;good&amp;rdquo; versus &amp;ldquo;bad&amp;rdquo; coupling depends heavily on context — whereas an AI modularity review guided by a strong prompt caught valuable issues like duplicated route logic and misplaced responsibilities. For AI-generated tests, high line coverage did not guarantee quality: some files hit 100% statement coverage without a single true unit test, and only mutation testing exposed the missing assertions. Böckeler concludes that computational sensors work best at the file and function level, while cross-module design issues require AI to supply semantic interpretation. Sensors boost confidence in agent output, but they still cannot replace human judgment.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Mocking Time in Java: A Simple Way to Test Time-Dependent Logic</title><link>https://miti99.com/en/post/2026/04/11/</link><pubDate>Sat, 11 Apr 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/04/11/</guid><description>&lt;p&gt;Anyone who writes Java has probably run into this situation: business logic that depends on the current time — an order expires after 30 minutes, a voucher is only valid during happy hour, a cron job runs at midnight, a token refreshes after an hour&amp;hellip; When writing unit tests for code like that, how do you &amp;ldquo;fast-forward&amp;rdquo; or &amp;ldquo;rewind&amp;rdquo; time?&lt;/p&gt;
&lt;p&gt;In this post, I&amp;rsquo;m sharing the approach I use in my project &lt;a href="https://github.com/tiennm99/mitisrv" rel="noopener noreferrer"&gt;mitisrv&lt;/a&gt; — super simple, with no heavy frameworks required. It was inspired by the article &lt;a href="https://dzone.com/articles/mock-java-datetime-for-testing" rel="noopener noreferrer"&gt;Mock Java Date/Time for Testing&lt;/a&gt; on DZone.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The Problem&lt;/h2&gt;&lt;p&gt;Suppose you have a piece of code like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;boolean&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;isExpired&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Order&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;now&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="na"&gt;isAfter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getExpiredAt&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="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;p&gt;When writing tests, you have to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create an order with &lt;code&gt;expiredAt&lt;/code&gt; in the past → expired test case ✓&lt;/li&gt;
&lt;li&gt;Create an order with &lt;code&gt;expiredAt&lt;/code&gt; in the future → still-valid test case ✓&lt;/li&gt;
&lt;li&gt;But what about the test case &amp;ldquo;at the exact moment of expiration&amp;rdquo;? Or testing logic that only runs at 00:00 tomorrow?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Calling &lt;code&gt;LocalDateTime.now()&lt;/code&gt; directly makes your code &lt;strong&gt;non-deterministic&lt;/strong&gt; — a test run at 11:59 PM might pass, while the same test run at 12:01 AM fails. That&amp;rsquo;s a CI/CD nightmare.&lt;/p&gt;
&lt;h2 id="common-approaches"&gt;Common Approaches&lt;/h2&gt;&lt;h3 id="1-injecting-javatimeclock"&gt;1. Injecting &lt;code&gt;java.time.Clock&lt;/code&gt;&lt;/h3&gt;&lt;p&gt;Java 8+ recommends using &lt;code&gt;Clock&lt;/code&gt; and injecting it wherever needed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderService&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Clock&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;clock&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&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;OrderService&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Clock&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;clock&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;clock&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;clock&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;boolean&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;isExpired&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Order&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;clock&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;isAfter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getExpiredAt&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;span class="line"&gt;&lt;span class="cl"&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;p&gt;In tests, you use &lt;code&gt;Clock.fixed(...)&lt;/code&gt; to pin the time. &lt;strong&gt;Pros:&lt;/strong&gt; clean and idiomatic. &lt;strong&gt;Cons:&lt;/strong&gt; you have to touch the entire codebase to inject &lt;code&gt;Clock&lt;/code&gt; into every class that needs it, which is a pain in a large existing project.&lt;/p&gt;
&lt;h3 id="2-static-mocking-with-powermockmockito"&gt;2. Static Mocking with PowerMock/Mockito&lt;/h3&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;/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="k"&gt;try&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MockedStatic&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mocked&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;mockStatic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mocked&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;when&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;thenReturn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fixedTime&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="c1"&gt;// test code&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="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;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt; no changes to production code. &lt;strong&gt;Cons:&lt;/strong&gt; static mocking is slow, easy to leak across tests if you&amp;rsquo;re not careful, and &lt;code&gt;mockStatic&lt;/code&gt; requires Mockito 3.4+. Plus, if your code mixes &lt;code&gt;LocalDate.now()&lt;/code&gt;, &lt;code&gt;Instant.now()&lt;/code&gt;, and &lt;code&gt;ZonedDateTime.now()&lt;/code&gt;, you have to mock each one separately.&lt;/p&gt;
&lt;h3 id="3-custom-time-utility-with-a-delta-offset"&gt;3. Custom &lt;code&gt;Time&lt;/code&gt; Utility with a Delta Offset&lt;/h3&gt;&lt;p&gt;This is the approach I chose for mitisrv. The idea: create a &lt;code&gt;Time&lt;/code&gt; class that replaces all calls to get the current time, and internally store a &lt;code&gt;deltaMillis&lt;/code&gt; — the offset between &amp;ldquo;mock time&amp;rdquo; and the actual system time.&lt;/p&gt;
&lt;h2 id="implementation-in-mitisrv"&gt;Implementation in mitisrv&lt;/h2&gt;&lt;p&gt;Here is the complete &lt;a href="https://github.com/tiennm99/mitisrv/blob/main/src/main/java/com/miti99/mitisrv/util/time/Time.java" rel="noopener noreferrer"&gt;&lt;code&gt;Time.java&lt;/code&gt;&lt;/a&gt; file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;/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="kn"&gt;package&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;com.miti99.mitisrv.util.time&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&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.time.Instant&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.time.LocalDate&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.time.LocalDateTime&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.time.LocalTime&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.time.OffsetDateTime&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.time.ZoneId&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.time.ZonedDateTime&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="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;java.util.TimeZone&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&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Time&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TimeZone&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TIME_ZONE&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;TimeZone&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getDefault&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="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;final&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZoneId&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZONE_ID&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;TIME_ZONE&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toZoneId&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="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;volatile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;long&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;deltaMillis&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;0L&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&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalDate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;currentDate&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalDate&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ofInstant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currentInstant&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZONE_ID&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;currentTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ofInstant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currentInstant&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZONE_ID&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;currentDateTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ofInstant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currentInstant&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZONE_ID&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;OffsetDateTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;currentOffsetDateTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;OffsetDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ofInstant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currentInstant&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZONE_ID&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZonedDateTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;currentZonedDateTime&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZonedDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ofInstant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currentInstant&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZONE_ID&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Instant&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;currentInstant&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Instant&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ofEpochMilli&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currentTimeMillis&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;long&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;currentTimeMillis&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;currentTimeMillis&lt;/span&gt;&lt;span class="p"&gt;()&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;deltaMillis&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;useMockTime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;dateTime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ZoneId&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;zoneId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;deltaMillis&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;dateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;atZone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;zoneId&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;toInstant&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="na"&gt;toEpochMilli&lt;/span&gt;&lt;span class="p"&gt;()&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;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;currentTimeMillis&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;span class="line"&gt;&lt;span class="cl"&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="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;useSystemDefaultZoneClock&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;deltaMillis&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;0L&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;span class="line"&gt;&lt;span class="cl"&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;p&gt;A few notable details:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Every time-fetching API&lt;/strong&gt; (&lt;code&gt;currentDate&lt;/code&gt;, &lt;code&gt;currentDateTime&lt;/code&gt;, &lt;code&gt;currentInstant&lt;/code&gt;, etc.) funnels through a single method: &lt;code&gt;currentTimeMillis()&lt;/code&gt;. Mocking that one place keeps the entire system in sync.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;deltaMillis&lt;/code&gt; is &lt;code&gt;volatile&lt;/code&gt;&lt;/strong&gt; to ensure changes are immediately visible across threads — important when testing in multi-threaded environments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;useMockTime()&lt;/code&gt; doesn&amp;rsquo;t freeze time&lt;/strong&gt; — it &lt;strong&gt;shifts&lt;/strong&gt; it. That means if you mock the time to &lt;code&gt;2026-01-01 00:00:00&lt;/code&gt; and wait 5 real seconds, &lt;code&gt;Time.currentDateTime()&lt;/code&gt; will return &lt;code&gt;2026-01-01 00:00:05&lt;/code&gt;. That&amp;rsquo;s an important difference from &lt;code&gt;Clock.fixed()&lt;/code&gt; — time still flows naturally, just starting from a different point.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;useSystemDefaultZoneClock()&lt;/code&gt; resets&lt;/strong&gt; back to real system time; call it in &lt;code&gt;@AfterEach&lt;/code&gt; so test cases don&amp;rsquo;t bleed into one another.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="how-to-use-it"&gt;How to Use It&lt;/h2&gt;&lt;p&gt;In production code, instead of calling &lt;code&gt;LocalDateTime.now()&lt;/code&gt;, call &lt;code&gt;Time.currentDateTime()&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;boolean&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;isExpired&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Order&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;currentDateTime&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="na"&gt;isAfter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getExpiredAt&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="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;p&gt;In your test:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/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="nd"&gt;@Test&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="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;orderShouldBeExpiredAfter30Minutes&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Order&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;order&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="k"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Order&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;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setExpiredAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LocalDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;2026&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;0&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&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="c1"&gt;// &amp;#34;Fast-forward&amp;#34; time to 12:31&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;Time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;useMockTime&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;LocalDateTime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;of&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;2026&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;31&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;0&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;ZoneId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;systemDefault&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;span class="line"&gt;&lt;span class="cl"&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;assertTrue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;service&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;isExpired&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order&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&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;Time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;useSystemDefaultZoneClock&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// reset&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="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;p&gt;Use &lt;code&gt;@AfterEach&lt;/code&gt; to make sure it always resets cleanly:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/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="nd"&gt;@AfterEach&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="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;tearDown&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;useSystemDefaultZoneClock&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="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="comparing-the-approaches"&gt;Comparing the Approaches&lt;/h2&gt;&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Criterion&lt;/th&gt;
 &lt;th&gt;&lt;code&gt;Clock&lt;/code&gt; injection&lt;/th&gt;
 &lt;th&gt;&lt;code&gt;mockStatic&lt;/code&gt;&lt;/th&gt;
 &lt;th&gt;Custom &lt;code&gt;Time&lt;/code&gt; util&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Production code changes&lt;/td&gt;
 &lt;td&gt;Heavy (inject Clock everywhere)&lt;/td&gt;
 &lt;td&gt;None&lt;/td&gt;
 &lt;td&gt;One-off (replace &lt;code&gt;.now()&lt;/code&gt;)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Framework dependency&lt;/td&gt;
 &lt;td&gt;None&lt;/td&gt;
 &lt;td&gt;Mockito 3.4+&lt;/td&gt;
 &lt;td&gt;None&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Test speed&lt;/td&gt;
 &lt;td&gt;Fast&lt;/td&gt;
 &lt;td&gt;Slow&lt;/td&gt;
 &lt;td&gt;Fast&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Time continues flowing&lt;/td&gt;
 &lt;td&gt;No (&lt;code&gt;Clock.fixed&lt;/code&gt;)&lt;/td&gt;
 &lt;td&gt;No&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Thread-safe&lt;/td&gt;
 &lt;td&gt;Yes&lt;/td&gt;
 &lt;td&gt;Yes (scoped)&lt;/td&gt;
 &lt;td&gt;Yes (&lt;code&gt;volatile&lt;/code&gt;)&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Idiomatic &amp;ldquo;Java way&amp;rdquo;&lt;/td&gt;
 &lt;td&gt;✓✓✓&lt;/td&gt;
 &lt;td&gt;✓&lt;/td&gt;
 &lt;td&gt;✓&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="downsides-of-the-custom-time-util"&gt;Downsides of the Custom &lt;code&gt;Time&lt;/code&gt; Util&lt;/h2&gt;&lt;p&gt;No approach is perfect, and this one has a few trade-offs too:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Global state&lt;/strong&gt;: &lt;code&gt;deltaMillis&lt;/code&gt; is &lt;code&gt;static&lt;/code&gt;, so if you run tests in parallel within the same JVM, tests will step on each other&amp;rsquo;s toes. If you need parallel execution, you either have to configure your test runner to fork a separate JVM per class, or replace &lt;code&gt;volatile&lt;/code&gt; with &lt;code&gt;ThreadLocal&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Requires codebase-wide discipline&lt;/strong&gt; not to call &lt;code&gt;LocalDateTime.now()&lt;/code&gt; directly anymore. And if a third-party library calls &lt;code&gt;.now()&lt;/code&gt; internally, this utility won&amp;rsquo;t control it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not standard Java&lt;/strong&gt;: newcomers to the project might be surprised to see &lt;code&gt;Time.currentDateTime()&lt;/code&gt; instead of &lt;code&gt;LocalDateTime.now()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="when-should-you-use-which"&gt;When Should You Use Which?&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;New or small project, team comfortable with DI&lt;/strong&gt;: use &lt;code&gt;Clock&lt;/code&gt; injection for the clean, standard approach.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Legacy project where you want to avoid a big refactor&lt;/strong&gt;: use &lt;code&gt;mockStatic&lt;/code&gt; locally in individual tests and accept the slower execution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Project where you want both simplicity and flowing time, running tests sequentially&lt;/strong&gt;: use a custom &lt;code&gt;Time&lt;/code&gt; util like in mitisrv.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For me, the &lt;code&gt;Time&lt;/code&gt; utility is simple, easy to understand, easy to maintain, and doesn&amp;rsquo;t require learning another framework. The trade-off is maintaining discipline when writing code — always calling &lt;code&gt;Time.xxx()&lt;/code&gt; instead of &lt;code&gt;LocalDateTime.now()&lt;/code&gt;. A simple lint rule or check during PR review is enough to keep that habit intact.&lt;/p&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dzone.com/articles/mock-java-datetime-for-testing" rel="noopener noreferrer"&gt;Mock Java Date/Time for Testing - DZone&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tiennm99/mitisrv/blob/main/src/main/java/com/miti99/mitisrv/util/time/Time.java" rel="noopener noreferrer"&gt;&lt;code&gt;Time.java&lt;/code&gt; in mitisrv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/Clock.html" rel="noopener noreferrer"&gt;Java &lt;code&gt;Clock&lt;/code&gt; documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Fixing Gradle Test Crashes Due to Out of Memory: Configuring maxHeapSize</title><link>https://miti99.com/en/post/2026/04/08/</link><pubDate>Wed, 08 Apr 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/04/08/</guid><description>&lt;p&gt;A quick tip I figured out a long time ago and am finally getting around to sharing.&lt;/p&gt;
&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;&lt;p&gt;When running &lt;code&gt;./gradlew test&lt;/code&gt;, tests occasionally crash mid-run with an &lt;code&gt;OutOfMemoryError&lt;/code&gt; or a message that the worker process &amp;ldquo;disappeared unexpectedly&amp;rdquo;. Re-running them sometimes passes and sometimes fails — super flaky.&lt;/p&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;&lt;p&gt;Gradle runs tests in a separate JVM worker process whose default heap size is fairly small (usually just 512MB). A heavy test suite (Spring context, H2, lots of test data, etc.) can easily hit that ceiling.&lt;/p&gt;
&lt;h2 id="how-to-fix"&gt;How to Fix&lt;/h2&gt;&lt;p&gt;Add this to &lt;code&gt;build.gradle&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-groovy" data-lang="groovy"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;test&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;maxHeapSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;1024m&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Or in &lt;code&gt;build.gradle.kts&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-kotlin" data-lang="kotlin"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;test&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;maxHeapSize&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;1024m&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Done. If it still crashes, bump it up to &lt;code&gt;&amp;quot;2048m&amp;quot;&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Newsletter #70</title><link>https://miti99.com/en/post/2025/12/13/</link><pubDate>Sat, 13 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/13/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #70.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-developer-productivity-paradox-why-faster-coding-doesn"&gt;&lt;a href="https://gradle.com/blog/developer-productivity-paradox-faster-coding-slower-delivery/" rel="noopener noreferrer"&gt;The developer productivity paradox: Why faster coding doesn&amp;rsquo;t mean faster software delivery&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Trisha Gee (Gradle) distills a central theme from DPE Summit 2025: the developer productivity paradox. Nearly every developer now uses AI (~90%) and over 80% believe it makes them more productive, yet organizational delivery metrics have barely budged. The 2025 DORA report shows that AI is neither the problem nor the cure—it is a mirror and an amplifier of whatever strengths and weaknesses an engineering organization already has. Because AI models carry an inherent error rate, generating more code faster actually makes systems &lt;em&gt;less&lt;/em&gt; stable unless the surrounding delivery pipeline is solid enough to catch defects. Context-switching costs also eat up the time saved: every interruption takes 15–20 minutes to recover from, and AI introduces new interruptions of its own as developers verify outputs, tweak prompts, or jump between tools to debug subtle mistakes.&lt;/p&gt;
&lt;p&gt;To overcome the paradox, Gee argues for treating AI adoption as an organization-wide transformation grounded in Developer Productivity Engineering (DPE): invest in platform engineering and shared standards, strengthen rollback mechanisms, and tighten CI/CD feedback loops; shrink batch sizes, eliminate toil, and apply value-stream management; measure end-to-end flow and business outcomes rather than lines of code or pull request counts; and train engineers to critically evaluate AI-generated code instead of blindly clicking &amp;ldquo;Accept.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="what-actually-makes-you-senior"&gt;&lt;a href="https://terriblesoftware.org/2025/11/25/what-actually-makes-you-senior/" rel="noopener noreferrer"&gt;What Actually Makes You Senior&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;According to the author, the core skill that separates senior engineers from everyone else isn&amp;rsquo;t technical trivia, but the ability to &lt;strong&gt;reduce ambiguity&lt;/strong&gt;. A mid-level engineer can execute a well-defined spec cleanly, but when handed a vague problem like &amp;ldquo;we need to improve performance&amp;rdquo; or &amp;ldquo;users are complaining about the signup flow,&amp;rdquo; a senior engineer digs in: asking questions nobody else thought to ask, separating signal from noise, and deciding what to tackle now versus what to defer. They ask what the real problem is, who the users are and what frustrates them, which assumptions the plan depends on that might be wrong, and what the blast radius looks like if they ship and those assumptions fail. In doing so, they &lt;strong&gt;de-risk the project&lt;/strong&gt;, turning &amp;ldquo;I have no idea what this even is&amp;rdquo; into &amp;ldquo;two small well-scoped projects and one thing we shouldn&amp;rsquo;t build at all.&amp;rdquo; Done well, this work is nearly invisible—projects simply run smoothly with fewer surprises and fewer outages.&lt;/p&gt;
&lt;p&gt;The author criticizes tech hiring for fixating on keyword checklists, years of experience, and LeetCode puzzles, producing &amp;ldquo;senior&amp;rdquo; engineers who can invert a binary tree on a whiteboard but freeze in front of a half-baked spec. The good news is that reducing ambiguity isn&amp;rsquo;t an innate gift, but a skill built through practice: start with the next vague ticket in your queue and spend time clarifying it upfront instead of waiting to be spoon-fed requirements or jumping straight into code.&lt;/p&gt;
&lt;h2 id="becoming-unblockable"&gt;&lt;a href="https://www.seangoedecke.com/unblockable/" rel="noopener noreferrer"&gt;Becoming unblockable&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke shares practical tactics for becoming &amp;ldquo;unblockable&amp;rdquo;—always finding a way to keep moving forward when obstacles arise. First, keep more than one task in flight at a time, just like a CPU core switching threads while waiting on I/O; avoid juggling two urgent deadlines at once, and pick low-urgency background work like refactoring, performance tuning, or mandatory training rather than grabbing another feature ticket. Second, front-load the parts of a project most likely to get blocked (such as database migrations that require another team&amp;rsquo;s sign-off) or spark design debates. Be ruthless about your tooling: stick to mainstream development setups, treat a broken local environment with the same urgency as a production outage, and when you&amp;rsquo;re truly stuck locally, find workarounds like running tests in CI or deploying to a staging environment.&lt;/p&gt;
&lt;p&gt;When you hit an error coming from another team&amp;rsquo;s service, don&amp;rsquo;t immediately declare yourself blocked—go read their source code and logs yourself; today you can even point AI agents like Codex or Claude Code at their repo, which Goedecke estimates gives the right answer about a third of the time. Beyond code, build goodwill with engineers on other teams by being helpful so you have fast informal backchannels when you need a favor, and secure &amp;ldquo;air cover&amp;rdquo; from directors or VPs by aligning your projects with top company priorities.&lt;/p&gt;
&lt;h2 id="treat-test-code-like-production-code"&gt;&lt;a href="https://blog.ploeh.dk/2025/12/01/treat-test-code-like-production-code/" rel="noopener noreferrer"&gt;Treat test code like production code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Mark Seemann argues that test code deserves the same care as production code: the same coding standards, readability, structure, and code-review rigor. In practice, test suites are often treated as second-class citizens—properly indented, yet full of copy-pasted duplication, commented-out &amp;ldquo;zombie&amp;rdquo; tests, and arbitrary &lt;code&gt;sleep&lt;/code&gt; calls in place of proper thread synchronization. Coding standards and design principles don&amp;rsquo;t exist to appease the compiler; they exist so humans—usually your future self—can understand and maintain the system. When a project has strong test coverage, the test suite is huge, making the DRY principle even more important: without it, a minor production API change triggers &amp;ldquo;Shotgun Surgery&amp;rdquo; across dozens of broken tests.&lt;/p&gt;
&lt;p&gt;For test-specific design questions like structure, organization, naming, and determinism, Seemann recommends &lt;em&gt;xUnit Test Patterns&lt;/em&gt; as the definitive reference. He also pushes back against the slogan that tests should be &amp;ldquo;DAMP, not DRY,&amp;rdquo; noting that descriptive, meaningful phrasing is a virtue whether code is duplicated or factored into helpers. There are still sensible exceptions, mostly around security when test code is never deployed: hardcoding dummy test passwords or skipping input validation in test helpers is fine. Platform-specific exceptions make sense too, such as relaxing &lt;code&gt;.NET&lt;/code&gt;&amp;rsquo;s &lt;code&gt;ConfigureAwait&lt;/code&gt; rule in tests or allowing orphan instances in Haskell test suites.&lt;/p&gt;
&lt;h2 id="how-good-engineers-write-bad-code-at-big-companies"&gt;&lt;a href="https://www.seangoedecke.com/bad-code-at-big-companies/" rel="noopener noreferrer"&gt;How good engineers write bad code at big companies&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke explains why big tech companies can hire armies of talented engineers and still produce terrible code. The core reason is that large companies are &lt;strong&gt;full of engineers working outside their area of expertise&lt;/strong&gt;. With average tenure hovering around one to two years and frequent reorgs shuffling teams, many services are a decade old while most code changes are made by relative newcomers—engineers within their first six months at the company, in that codebase, or in that programming language. The few long-tenured veterans who deeply understand the system can catch issues in code review, but that stewardship role is informal and they are perpetually stretched thin by their own deliverables.&lt;/p&gt;
&lt;p&gt;The typical big-company engineer is therefore a capable developer racing to hit a deadline inside an unfamiliar codebase—doing their best in an environment that isn&amp;rsquo;t set up to produce high-craft code. In Goedecke&amp;rsquo;s view, this is a deliberate executive trade-off: leadership prioritizes organizational flexibility and fungible headcount over deep codebase mastery and code quality, and individual engineers have very little power to change it. He contrasts &amp;ldquo;pure engineering&amp;rdquo; (self-contained domains like compilers, where bad code usually reflects low skill) with &amp;ldquo;impure engineering&amp;rdquo; (more like contract electrical or plumbing work under deadline pressure, where messy code is an inevitable byproduct of the environment). At big companies, bad code happens because almost everyone is perpetually working in unfamiliar territory.&lt;/p&gt;
&lt;h2 id="the-success-trap"&gt;&lt;a href="https://mikefisher.substack.com/p/the-success-trap" rel="noopener noreferrer"&gt;The Success Trap&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Mike Fisher explores how success can quietly narrow your freedom and options. He contrasts a waiter at a neighborhood diner—whose skills are portable enough to switch jobs or careers at any time—with a waiter at a Michelin-starred restaurant, whose mastery is far higher but whose exit options are much narrower without taking a step down. In organizational theory, the &amp;ldquo;success trap&amp;rdquo; describes becoming so good at exploiting your current strengths that you stop exploring new opportunities; it is closely related to Clayton Christensen&amp;rsquo;s &lt;em&gt;Innovator&amp;rsquo;s Dilemma&lt;/em&gt;, except the innovator&amp;rsquo;s dilemma is disruption from the outside, whereas the success trap is rot from within.&lt;/p&gt;
&lt;p&gt;Fisher illustrates this with three examples: an engineer promoted up the management ladder until he no longer built anything himself, who eventually took a pay cut at a startup just to write code again; Kodak inventing the digital camera in 1975 and shelving it to protect its film cash cow; and Radiohead deliberately reinventing their sound with &lt;em&gt;Kid A&lt;/em&gt; right after the massive success of &lt;em&gt;OK Computer&lt;/em&gt;. To escape the trap, organizations need to institutionalize curiosity through dedicated experimentation time, while individuals should regularly put themselves back in the beginner&amp;rsquo;s seat and value learning velocity over comfort. For leaders, it requires a mindset of stewardship—holding success lightly and optimizing for renewal rather than coasting on past wins—because freedom, not achievement, is the true measure of success.&lt;/p&gt;
&lt;h2 id="writing-a-good-claudemd"&gt;&lt;a href="https://www.humanlayer.dev/blog/writing-a-good-claude-md" rel="noopener noreferrer"&gt;Writing a good CLAUDE.md&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This guide from HumanLayer starts from a simple fact: LLMs are stateless. At the beginning of every session, a coding agent knows nothing about your repository, and &lt;code&gt;CLAUDE.md&lt;/code&gt; (or &lt;code&gt;AGENTS.md&lt;/code&gt;) is the one file injected into every conversation by default. Its job is to onboard Claude into the codebase by answering three questions: &lt;strong&gt;WHAT&lt;/strong&gt; (the tech stack and directory structure, especially in monorepos), &lt;strong&gt;WHY&lt;/strong&gt; (the purpose of each component), and &lt;strong&gt;HOW&lt;/strong&gt; (how to work in the repo—running tests, typechecks, and builds). The author notes that Claude frequently ignores &lt;code&gt;CLAUDE.md&lt;/code&gt; because Claude Code wraps it in a system reminder telling the model to ignore instructions that aren&amp;rsquo;t &amp;ldquo;highly relevant to the current task&amp;rdquo;—so the more task-specific clutter you stuff into the file, the more likely Claude is to tune the whole thing out.&lt;/p&gt;
&lt;p&gt;Key recommendations: fewer instructions are better, since frontier reasoning models reliably follow only about 150–200 instructions in total and Claude Code&amp;rsquo;s system prompt already uses ~50 of them; keep &lt;code&gt;CLAUDE.md&lt;/code&gt; under 300 lines and as short as possible (HumanLayer&amp;rsquo;s own root file is under 60 lines), containing only rules that apply to every single task. Use progressive disclosure: put workflow-specific docs in separate Markdown files and link to them from &lt;code&gt;CLAUDE.md&lt;/code&gt;, and reference &lt;code&gt;file:line&lt;/code&gt; pointers instead of pasting code snippets that quickly go stale. Never use an LLM as an expensive linter—use deterministic linters and formatters wired into hooks or slash commands instead. Finally, don&amp;rsquo;t just run &lt;code&gt;/init&lt;/code&gt; and call it a day: &lt;code&gt;CLAUDE.md&lt;/code&gt; is the highest-leverage point of the entire agent harness, so craft every line deliberately.&lt;/p&gt;
&lt;h2 id="we-should-all-be-using-dependency-cooldowns"&gt;&lt;a href="https://blog.yossarian.net/2025/11/21/We-should-all-be-using-dependency-cooldowns" rel="noopener noreferrer"&gt;We should all be using dependency cooldowns&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;William Woodruff argues that dependency cooldowns are a free, low-effort, and remarkably effective defense against the vast majority of open-source supply-chain attacks. Most supply-chain attacks follow the same playbook: an attacker compromises a popular project (usually via phished credentials or a CI/CD vulnerability), publishes a malicious release to PyPI, npm, or GitHub, downstream users automatically pull the update, security researchers spot the anomaly, and the registry yanks the malicious package. While the attacker&amp;rsquo;s preparation may take weeks, the window between publishing the malicious version and the registry taking it down is almost always just a few hours to a few days. Out of ten high-profile incidents analyzed, eight had an active compromise window of under a week—the notable outlier being &lt;code&gt;xz-utils&lt;/code&gt; at roughly five weeks.&lt;/p&gt;
&lt;p&gt;A dependency cooldown simply puts a minimum waiting period between when a package version is published and when your tooling considers it eligible for installation, giving the security community time to catch compromises first. Configuring one takes just a couple of lines—such as &lt;code&gt;cooldown: default-days: 7&lt;/code&gt; in Dependabot, or equivalent settings in Renovate and modern package managers. A 7-day cooldown would have blocked almost every attack on the list, and a 14-day cooldown would have stopped all of them except &lt;code&gt;xz-utils&lt;/code&gt;. While it isn&amp;rsquo;t a silver bullet—since supply-chain security is fundamentally a social-trust problem—eliminating 80–90% of the risk at near-zero cost is a no-brainer.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #66</title><link>https://miti99.com/en/post/2025/12/09/</link><pubDate>Tue, 09 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/09/</guid><description>&lt;p&gt;&lt;em&gt;&lt;del&gt;I&amp;rsquo;ve used iFlow&amp;rsquo;s free API quite a lot already, so today I&amp;rsquo;m trying out iFlow&amp;rsquo;s CLI—&lt;a href="https://github.com/iflow-ai/iflow-cli" rel="noopener noreferrer"&gt;iFlow CLI&lt;/a&gt;—to see how it goes, using the GLM-4.6 model.&lt;/del&gt; Enjoy Newsletter #66.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-ultimate-list-of-best-software-architecture-books-2026"&gt;&lt;a href="https://www.workingsoftware.dev/the-ultimate-list-of-software-architecture-books/?&amp;amp;aid=recmw058VtqAJCyyK" rel="noopener noreferrer"&gt;The Ultimate List of Best Software Architecture Books (2026)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Software architecture is the foundation that determines a product&amp;rsquo;s quality: good design reduces bug risk and makes adding features later far easier. Patrick Roos curates a reading list of software architecture books for 2026, spanning classics like Richards and Ford&amp;rsquo;s &lt;em&gt;Fundamentals of Software Architecture&lt;/em&gt;, &lt;em&gt;Software Architecture in Practice&lt;/em&gt; (4th edition), &lt;em&gt;Designing Data-Intensive Applications&lt;/em&gt;, and &lt;em&gt;Enterprise Integration Patterns&lt;/em&gt;, as well as modern practical guides like &lt;em&gt;Software Architecture: The Hard Parts&lt;/em&gt; on distributed-systems trade-offs and &lt;em&gt;Building Multi-Tenant SaaS Architectures&lt;/em&gt; for cloud platforms.&lt;/p&gt;
&lt;p&gt;The list also emphasizes the human and organizational side of architecture: Susanne Kaiser&amp;rsquo;s &lt;em&gt;Architecture for Flow&lt;/em&gt; combines Wardley Mapping, Domain-Driven Design, and Team Topologies to align business strategy with architecture; Gregor Hohpe&amp;rsquo;s &lt;em&gt;The Software Architect Elevator&lt;/em&gt; helps architects bridge the gap between engineering and the business; &lt;em&gt;Collaborative Software Design&lt;/em&gt; shows how to involve stakeholders in the design process; and &lt;em&gt;Facilitating Software Architecture&lt;/em&gt; and &lt;em&gt;Reviewing Software Systems&lt;/em&gt; (introducing the lightweight LASR architecture review method) help architects and developers collaborate more effectively. The list also highlights two new/upcoming titles for late 2025–2026: Lilienthal and Schwentner&amp;rsquo;s &lt;em&gt;Domain-Driven Transformation&lt;/em&gt;, offering a roadmap for modernizing legacy systems, and Simon Brown&amp;rsquo;s &lt;em&gt;The C4 Model&lt;/em&gt; on communicating software architecture through structured diagrams.&lt;/p&gt;
&lt;h2 id="how-i-use-ai-oct-2025"&gt;&lt;a href="https://ben.stolovitz.com/posts/how_use_ai_oct_2025/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;How I use AI (Oct 2025)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ben Stolovitz shares how he uses AI—primarily large language models (LLMs)—in his daily work as of October 2025. Coding is where AI has made the biggest difference: he calls GitHub Copilot&amp;rsquo;s autocomplete &amp;ldquo;magical&amp;rdquo; for finishing boilerplate and discovering idiomatic patterns in unfamiliar languages, even if it struggles with complex algorithms. Agent mode is increasingly helpful for larger changes, though it still requires solid tests, clear documentation, and human oversight. For search and research, AI excels at tracking down tip-of-the-tongue articles or explaining general concepts, but falls short when shopping for products or finding academic papers, and remains prone to hallucinating citations or sycophantically validating whatever assumption the user feeds it.&lt;/p&gt;
&lt;p&gt;Summarization and transcription are standout strengths: AI can condense hundreds of pages of documentation or an entire meeting recording in minutes. Conversely, Stolovitz refuses to let AI write for him because he views his blog as personal self-expression; he uses AI only as a tough copy editor to suggest better phrasing, then rewrites the text in his own voice. He is most skeptical of AI-generated visual art and music, finding them lacking in creative depth and genuine human connection.&lt;/p&gt;
&lt;h2 id="stop-vibe-coding-your-unit-tests"&gt;&lt;a href="https://www.andy-gallagher.com/blog/stop-vibe-coding-your-unit-tests/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;Stop Vibe Coding Your Unit Tests&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Andy Gallagher warns against handing unit test writing over to LLMs on autopilot. Left to their own devices, LLMs tend to generate far too many tests that merely assert what the code currently does rather than verifying what the code &lt;em&gt;should&lt;/em&gt; do. Given a simple React button component, for instance, Claude Sonnet 4 generated roughly 30 tests spanning ~200 lines, mostly testing trivialities like default rendering, prop passthrough, or HTML attributes that React and the browser already guarantee. Such tests lock the codebase to its current implementation so every refactor breaks a pile of tests, while polluting the agent&amp;rsquo;s context window, degrading semantic code search, and turning pull requests into a slog for teammates to review.&lt;/p&gt;
&lt;p&gt;Gallagher&amp;rsquo;s remedy is intentional, test-by-test authoring: explicitly specify which behavior you want to test, carefully review what the AI generates, and keep test files lean and focused. LLMs still do well on self-contained, algorithmic code, but for everyday product code, what actually needs testing is whether the team is building the right thing. The core principle: fewer, higher-quality tests beat bloated test suites every time.&lt;/p&gt;
&lt;h2 id="game-design-is-simple-actually"&gt;&lt;a href="https://www.raphkoster.com/2025/11/03/game-design-is-simple-actually/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;Game design is simple, actually&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Raph Koster outlines a systematic 12-step framework for understanding game design. At their core, games are about mastering problems: fun comes from making progress in our ability to predict outcomes, not from surface-level flash. A toy is a system with constraints; add a goal and it becomes a game, centered on a core mechanic—a &amp;ldquo;problem object&amp;rdquo; to be solved. Players interact through loops: an operational loop (act, receive feedback, learn) and a progression loop where situations continually escalate and shift so old strategies stop working. Good feedback must tell players what they can do, what they just did, what happened as a result, and whether they are getting closer to their goal, while difficulty must match their learning curve.&lt;/p&gt;
&lt;p&gt;At the macro level, a game is assembled from smaller sub-games whose loops interlock to form economies and value chains. How a problem is dressed up—through narrative, visuals, audio, and metaphor—strongly shapes the player&amp;rsquo;s experience, making game design a synthetic art form that demands both systems design and experience design. Player motivations vary widely too, which is why no single game appeals to everyone. The individual principles sound simple, but executing all 12 well at the same time is the real challenge.&lt;/p&gt;
&lt;h2 id="architectural-debt-is-not-just-technical-debt"&gt;&lt;a href="https://frederickvanbrabant.com/blog/2025-10-31-architectural-debt-is-not-just-technical-debt/?&amp;amp;aid=recufcl24hU9MXCJC" rel="noopener noreferrer"&gt;Architectural debt is not just technical debt&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Frederick Van Brabant distinguishes architectural debt from technical debt. While technical debt usually refers to localized shortcuts inside a codebase, architectural debt consists of structural decisions with long-term consequences that reach far beyond code. He breaks architectural debt down across three layers. At the application and infrastructure layer, enterprise architects should focus on integration patterns, overlapping systems, and vendor lock-in, because debt here inflates costs and slows delivery. The business layer involves ownership, governance responsibilities, and outdated processes—where inaccurate documentation can create serious trouble during audits. The strategic layer is the most dangerous: poorly defined capabilities or half-baked framework rollouts plant flawed assumptions across the organization for the next three to five years.&lt;/p&gt;
&lt;p&gt;Enterprise architects have the vantage point and time horizon to spot this kind of debt, but merely raising the alarm isn&amp;rsquo;t enough: they need to build a compelling business case laying out the current state, target state, and business upside backed by concrete numbers to win leadership buy-in. Van Brabant also advises picking your battles wisely: it&amp;rsquo;s fine to tolerate more debt in experimental innovation systems than in systems of record, provided you clean it up once the experiment concludes and secure real resources to pay the debt down.&lt;/p&gt;
&lt;h2 id="the-search-problem-why-your-computer-finds-things-faster-than-you-do"&gt;&lt;a href="https://deyaa1251.github.io/deyaa1251/posts/b_tree/?utm_source=bonobopress&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=2155" rel="noopener noreferrer"&gt;The Search Problem: Why Your Computer Finds Things Faster Than You Do&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article explains why B-trees are so foundational in modern storage systems. The author recounts implementing a binary search tree (BST) from scratch and watching it fall apart once simulated disk reads and writes were introduced. A BST&amp;rsquo;s lookup cost scales with its height: O(log n) when balanced, but degrading to O(n) when unbalanced. Under a model where each node visit costs one disk read, searching across 100,000 files takes roughly 17 disk reads with a balanced BST, whereas a B-tree needs only 3. That&amp;rsquo;s because a B-tree packs many keys into each node (&amp;ldquo;fat nodes&amp;rdquo;) sized to fit a single 4KB disk block, keeping the tree extremely shallow. In the author&amp;rsquo;s simulation, inserting 100,000 sequential items caused the BST to degenerate into a 40,000-level linked list that took roughly 23.5 minutes, while the B-tree stayed 3 levels tall and finished in 3 seconds.&lt;/p&gt;
&lt;p&gt;Because they guarantee predictable worst-case performance regardless of insertion order, B-trees and their variants power indexes in MySQL, PostgreSQL, MongoDB, and countless filesystems. The broader lesson extends beyond data structures: hardware context dictates optimal design. B-trees trade away theoretical best-case simplicity in exchange for rock-solid worst-case guarantees—which is what matters in production systems.&lt;/p&gt;
&lt;h2 id="kafka-is-fast"&gt;&lt;a href="https://topicpartition.io/blog/postgres-pubsub-queue-benchmarks?utm_source=bonobopress&amp;amp;utm_medium=newsletter&amp;amp;utm_campaign=2155" rel="noopener noreferrer"&gt;Kafka is fast &amp;ndash; I&amp;rsquo;ll use Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post benchmarks PostgreSQL as a pub/sub and job queue system in place of dedicated message brokers like Kafka. With 1 KiB messages in a pub/sub workload, a 4-vCPU instance in the author&amp;rsquo;s test setup achieved roughly 5,000 messages per second on writes (4.8 MiB/s) and 24.6 MiB/s on reads with a 5x fan-out, at a 60ms p99 latency. A three-node replicated cluster maintained the same throughput while increasing p99 latency to 186ms. Scaling up to a 96-vCPU instance reached 238 MiB/s on writes and 1.16 GiB/s on reads while using only about 10% CPU. In a work-queue pattern, the 4-vCPU machine handled roughly 2.81 MiB/s at a 17.7ms p99 latency, while the 96-vCPU machine reached 19.7 MiB/s.&lt;/p&gt;
&lt;p&gt;The author&amp;rsquo;s takeaway is simple: use Postgres until you genuinely outgrow it. For the vast majority of organizations operating below a few megabytes per second, Postgres covers 80% of use cases with 20% of the effort, whereas the operational overhead and organizational complexity of adopting a separate distributed broker usually outweigh its benefits at modest scale. That simplicity and reliability are exactly why the &amp;ldquo;Just Use Postgres&amp;rdquo; movement keeps gaining traction.&lt;/p&gt;
&lt;h2 id="you-need-to-become-a-full-stack-person"&gt;&lt;a href="https://den.dev/blog/full-stack-person/?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;You Need To Become A Full Stack Person&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Den Delimarsky argues that in the AI era, everyone needs to become a &amp;ldquo;full-stack person.&amp;rdquo; As LLMs commoditize many narrow coding skills, combining creativity, critical thinking, and execution speed becomes the durable career moat. Boundaries between traditional roles are blurring, reflected in the rise of the product engineer who owns frontend, backend, and customer empathy end to end. In Delimarsky&amp;rsquo;s view, the T-shaped skill model (one deep specialty atop a broad base) is obsolete; replacing it is the Pi-shaped model with two deep pillars—product sense and technical craft—resting on broad interdisciplinary knowledge.&lt;/p&gt;
&lt;p&gt;The post highlights ten skills to cultivate: creativity and taste, critical thinking, communication, interdisciplinary breadth, AI leverage, product sense, execution speed, rapid learning, systems thinking, and agency. AI cannot replace taste or judgment; it is a vehicle for turning ideas into reality, lowering the cost of writing code without lowering the cost of deciding what is worth building. Typing code is no longer the bottleneck, and a high-agency &amp;ldquo;start doing, then figure it out&amp;rdquo; mindset is what sets people apart.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verdict&lt;/strong&gt;: &lt;em&gt;iFlow CLI did a pretty good job on the first few articles, though toward the end it started leaving too many English words untranslated. A nice plus is that iFlow CLI can fetch many URLs by bypassing blocks through a proxy (though it&amp;rsquo;s a Chinese proxy, which feels a bit sketchy). While running it I also saw a bunch of log lines in Chinese, which was confusing and slightly unnerving :v I&amp;rsquo;ll try to refine &lt;code&gt;AGENTS.md&lt;/code&gt; and test it again later.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #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 #35</title><link>https://miti99.com/en/post/2025/07/24/</link><pubDate>Thu, 24 Jul 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/07/24/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #35.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-magic-of-software-or-what-makes-a-good-engineer-also-makes-a-good-engineering-organization"&gt;&lt;a href="https://moxie.org/2024/09/23/a-good-engineer.html" rel="noopener noreferrer"&gt;The magic of software; or, what makes a good engineer also makes a good engineering organization&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Moxie Marlinspike argues that software development sits at the intersection of science and engineering, where product vision and technical understanding shape each other rather than flowing one way from idea to implementation. His classic example is &amp;ldquo;color cycling&amp;rdquo; animation in 1980s games: it didn&amp;rsquo;t come from a top-down spec, but emerged because programmers understood indexed-color palettes deeply enough to use them in a way nobody had anticipated. In his view, a great engineer stays curious, refuses to treat abstraction layers as black boxes, and lets that deep understanding unlock new product possibilities.&lt;/p&gt;
&lt;p&gt;The same principle applies to an entire engineering organization. When teams operate in silos and treat each other as black boxes, the organization loses the end-to-end visibility needed to pull off major shifts—Marlinspike points to Skype&amp;rsquo;s struggles transitioning to mobile as an example. He also warns against cargo-culting the org charts of big tech companies, since many succeeded despite their current structure rather than because of it. The takeaway: both individual engineers and organizations need to cultivate curiosity and encourage understanding across team boundaries instead of walling knowledge off into compartments.&lt;/p&gt;
&lt;h2 id="redis-is-open-source-again-but-is-it-too-late"&gt;&lt;a href="https://blog.abhimanyu-saharan.com/posts/redis-is-open-source-again-but-is-it-too-late" rel="noopener noreferrer"&gt;Redis Is Open Source Again. But Is It Too Late?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In March 2024, Redis dropped its BSD license in favor of dual RSALv2/SSPLv1 licensing to stop cloud providers from selling managed Redis without contributing back. The move sparked immediate backlash: Amazon and Google backed Valkey, a Linux Foundation-hosted fork of Redis 7.2.4, and distributions like Arch Linux switched over to Valkey completely. With Redis 8, the company reversed course and added AGPLv3—a genuine copyleft open-source license—helped in part by the return of creator Salvatore Sanfilippo. Redis 8 folds in JSON, time series, and probabilistic data structures that previously lived in separate modules, and adds a beta &lt;code&gt;vector set&lt;/code&gt; type for similarity search.&lt;/p&gt;
&lt;p&gt;Even so, the author argues that broken trust is hard to repair: &amp;ldquo;Trust is built over years and lost in a moment.&amp;rdquo; Many teams have already migrated their infrastructure to Valkey, which continues to gain momentum with strong enterprise backing, and Redis Ltd.&amp;rsquo;s decision to keep RSALv2 and SSPLv1 alongside AGPLv3 in a tri-license model leaves parts of the community skeptical of its long-term commitment. The practical verdict: teams already on Valkey have little reason to switch back, while for brand-new projects Redis 8 is once again a contender worth weighing.&lt;/p&gt;
&lt;h2 id="write-the-most-clever-code-you-possibly-can"&gt;&lt;a href="https://buttondown.com/hillelwayne/archive/write-the-most-clever-code-you-possibly-can" rel="noopener noreferrer"&gt;Write the most clever code you possibly can&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Hillel Wayne offers a counterintuitive piece of advice: write the cleverest code you possibly can—as deliberate practice, not for production. By &amp;ldquo;clever,&amp;rdquo; he means reaching for unfamiliar language features or domain concepts. Practicing this way pays off in four ways: combining powerful features teaches you how they interact; mastering unfamiliar concepts deepens your grasp of the language; you build fluency for the rare moments when performance or tooling constraints genuinely demand a tricky solution; and sharing non-production &amp;ldquo;cursed&amp;rdquo; snippets is a fun way to bond with teammates.&lt;/p&gt;
&lt;p&gt;The key is separating practice from production code, where clarity and maintainability still come first. Wayne suggests three responsible outlets: solve a problem both ways and commit only the simple version, go wild in personal scripts and tools, or if a clever solution really is markedly better in production, document it thoroughly. His examples span Python pattern matching, JavaScript function composition, and pandas data transformations, and he points out that many idioms once dismissed as &amp;ldquo;too clever&amp;rdquo;—like list comprehensions—are simply standard language features used well.&lt;/p&gt;
&lt;h2 id="semantic-unit-testing"&gt;&lt;a href="https://www.alexmolas.com/2025/04/09/semantic-unit-testing.html" rel="noopener noreferrer"&gt;Semantic Unit Testing&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Semantic unit testing is the idea of using a large language model (LLM) to check whether a function&amp;rsquo;s implementation matches the behavior described in its docstring, rather than writing traditional input/output assertions. The author&amp;rsquo;s hypothesis is that a capable enough model, given sufficient context, can spot bugs without executing the code. His Python library &lt;code&gt;suite&lt;/code&gt; uses the &lt;code&gt;inspect&lt;/code&gt; module to extract a function&amp;rsquo;s source code and docstring, recursively collects internal helper functions up to a configurable depth, bundles everything into a structured prompt for an LLM, and returns a pass/fail verdict with reasoning. In the example below, &lt;code&gt;multiply&lt;/code&gt; actually performs addition—and the model flags the mismatch between docstring and implementation.&lt;/p&gt;
&lt;p&gt;This approach adds a semantic review layer, integrates with pytest, supports async execution, and can run against local models to avoid sending proprietary code to external APIs. Still, the author is upfront about its limits: LLMs hallucinate and cannot be trusted blindly, token costs can get steep (a single pandas method consumed roughly 112k tokens), and traditional tests remain far more reliable. Semantic unit testing should therefore be treated strictly as a complement to, never a replacement for, standard unit tests.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;Multiply x and y&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="c1"&gt;# Intentionally buggy implementation&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;tester&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;suite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;openai/o3-mini&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tester&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# LLM detects that the implementation does not match the docstring&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="solid-principles-in-java-with-real-life-examples"&gt;&lt;a href="https://dev.to/chhavirana/understanding-solid-principles-in-java-with-real-life-examples-1ked" rel="noopener noreferrer"&gt;SOLID Principles in Java (With Real life Examples)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;SOLID is a set of five object-oriented design principles for keeping code understandable, flexible, and maintainable; this post walks through each one using a Java food-ordering system. For Single Responsibility, instead of a single &lt;code&gt;OrderService&lt;/code&gt; that handles order placement, invoicing, and notifications all at once, the responsibilities are split across &lt;code&gt;OrderService&lt;/code&gt;, &lt;code&gt;InvoiceService&lt;/code&gt;, and &lt;code&gt;NotificationService&lt;/code&gt;. For Open/Closed, instead of a &lt;code&gt;PaymentService&lt;/code&gt; packed with &lt;code&gt;if/else&lt;/code&gt; branches for every payment type, a &lt;code&gt;PaymentMethod&lt;/code&gt; interface is implemented by &lt;code&gt;CardPayment&lt;/code&gt;, &lt;code&gt;UpiPayment&lt;/code&gt;, and others so new payment methods can be added without modifying existing code. For Liskov Substitution, an abstract &lt;code&gt;DeliveryMode&lt;/code&gt; class has &lt;code&gt;BikeDelivery&lt;/code&gt; and &lt;code&gt;ScooterDelivery&lt;/code&gt; subclasses that honor the parent contract and can be swapped cleanly without surprises.&lt;/p&gt;
&lt;p&gt;For Interface Segregation, rather than forcing every restaurant to implement a giant &lt;code&gt;RestaurantPartner&lt;/code&gt; interface covering orders, nutrition info, and customer feedback, the design splits it into &lt;code&gt;OrderAcceptance&lt;/code&gt;, &lt;code&gt;FeedbackHandler&lt;/code&gt;, and &lt;code&gt;NutritionInfoProvider&lt;/code&gt; so a small stall only implements what applies to it. Finally, Dependency Inversion is shown with &lt;code&gt;OrderNotifier&lt;/code&gt; depending on an abstract &lt;code&gt;Notifier&lt;/code&gt; interface instead of a concrete &lt;code&gt;EmailService&lt;/code&gt;, making it trivial to swap in &lt;code&gt;SmsService&lt;/code&gt; or another channel. The takeaway: SOLID isn&amp;rsquo;t just textbook theory—it&amp;rsquo;s a practical toolkit for writing clean code that adapts easily to new requirements.&lt;/p&gt;
&lt;h2 id="a-year-on-valkey-charts-path-to-v9-after-break-from-redis"&gt;&lt;a href="https://www.theregister.com/software/2025/05/15/a-year-on-valkey-charts-path-to-v9-after-break-from-redis/852499" rel="noopener noreferrer"&gt;A year on, Valkey charts path to v9 after break from Redis&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;One year after forking from Redis over its controversial license change, Valkey is showing strong momentum. Madelyn Olson, principal engineer at AWS and Valkey co-maintainer who helped lead the exodus from Redis, notes that the project just shipped version 8.1. Earlier, version 8.0 added per-slot metrics to improve cluster observability—a feature former Redis leadership had previously passed over. Rather than releasing an 8.2, the team is heading straight to version 9 to take on more invasive architectural changes. On support lifecycles, every release receives at least three years of support, while the final minor release of each major version gets five years, matching enterprise expectations for long-term stability.&lt;/p&gt;
&lt;p&gt;Olson emphasizes keeping Valkey &amp;ldquo;not a single-vendor project&amp;rdquo; by expanding its maintainer ranks and Technical Steering Committee, with contributors like Percona&amp;rsquo;s Ricardo Dias now working on it full time. She admits burning out during the first six months and believes spreading responsibility across organizations will keep the project sustainable. Valkey also collects no telemetry, relying instead on direct feedback from users and managed-service providers. Valkey&amp;rsquo;s trajectory shows how an open-source fork can thrive when backed by open governance and genuine multi-company community investment.&lt;/p&gt;
&lt;h2 id="stack-overflow-is-almost-dead"&gt;&lt;a href="https://blog.pragmaticengineer.com/stack-overflow-is-almost-dead" rel="noopener noreferrer"&gt;Stack Overflow is almost dead&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stack Overflow, once an everyday destination for millions of developers, is in steep decline: according to data from the site&amp;rsquo;s own Data Explorer, monthly question volume in May 2025 fell back to levels last seen at its 2009 launch. The slide happened in stages. Starting around 2014, better moderation tooling led to faster question closures and mass deletions of &amp;ldquo;low-quality&amp;rdquo; posts, leaving many users—especially newcomers—feeling unwelcome. The 2020 pandemic briefly boosted traffic as newly remote developers searched online instead of asking coworkers at the next desk, but the downward trend resumed soon after—two full years before ChatGPT launched, pointing to deeper structural issues. In 2021, Prosus acquired Stack Overflow.&lt;/p&gt;
&lt;p&gt;The decisive blow arrived with ChatGPT in November 2022: question volume plunged as large language models offered faster, friendlier, and—in the author&amp;rsquo;s view—comparably accurate answers, ironically trained on Stack Overflow&amp;rsquo;s own archive. Orosz suggests the question is no longer whether the decline will continue, but when the site will wind down or be sold at a steep discount. Even so, developers&amp;rsquo; need to help each other won&amp;rsquo;t disappear—it will simply move to Discord servers, group chats, and new community platforms.&lt;/p&gt;
&lt;h2 id="why-i-use-webassembly"&gt;&lt;a href="https://nasso.dev/blog/why-i-use-wasm" rel="noopener noreferrer"&gt;Why I use WebAssembly&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author shares why he reaches for WebAssembly (WASM), starting with the most compelling reason: it dramatically simplifies application state management. When computation runs directly on the user&amp;rsquo;s machine, the app doesn&amp;rsquo;t need to constantly talk to a backend server to track progress, eliminating complex polling or streaming setups. WASM also lets teams reuse battle-tested native code: Figma compiled its C++ vector graphics renderer to WASM and cut load times by 3x, while running FFmpeg in the browser enables completely offline media conversion without uploading files anywhere.&lt;/p&gt;
&lt;p&gt;More importantly, the author views WASM as a &amp;ldquo;universal binary format&amp;rdquo; for sharing core logic across platforms—making the web just one more target alongside desktop. His own project, Nema Studio, a Digital Audio Workstation, shares the same core engine between its native and web builds. That powers a two-tier product strategy: casual users can try the web version with 80–90% of features right in their browser, while serious users download the full native app. Because &amp;ldquo;nobody starts out as a power user,&amp;rdquo; the web build removes installation friction and acts as a funnel into the native application. He also gives a nod to Tauri as a lighter alternative to Electron thanks to using the OS webview instead of bundling Chromium.&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 #31</title><link>https://miti99.com/en/post/2025/05/18/</link><pubDate>Sun, 18 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/18/</guid><description>&lt;p&gt;&lt;em&gt;Welcome to Newsletter #31.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="optimizing-our-e2e-pipeline"&gt;&lt;a href="https://slack.engineering/speedup-e2e-testing/" rel="noopener noreferrer"&gt;Optimizing Our E2E Pipeline&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Slack&amp;rsquo;s DevXP team shares how they optimized the end-to-end (E2E) test pipeline for the company&amp;rsquo;s largest monorepo. Previously, each run took about 10 minutes, with nearly half of that spent building the frontend—even when a change didn&amp;rsquo;t touch frontend code at all. With hundreds of pull requests merged daily, that produced thousands of builds per week, each taking nearly 1 GB on AWS S3 and adding up to terabytes of duplicate artifacts.&lt;/p&gt;
&lt;p&gt;Their solution used tools they already had: run &lt;code&gt;git diff&lt;/code&gt; with three-dot syntax to compare the current branch against its merge-base with &lt;code&gt;main&lt;/code&gt;; if no frontend files changed, skip the build step and reuse a recent production build served through an internal CDN. Even in a repository with over 100,000 files, detecting changes and locating a matching build takes under 3 seconds. As a result, total builds dropped by 60%, saving hundreds of compute hours per month and several terabytes of storage, while average build time fell from about 5 minutes to 2 minutes (and combined with an earlier Webpack upgrade, from 10 minutes down to 2 minutes overall). As an unexpected bonus, tests also became more stable and less flaky. The takeaway: regularly question which pipeline steps are actually necessary, even in systems that aren&amp;rsquo;t visibly broken.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="doordash"&gt;&lt;a href="https://careersatdoordash.com/blog/doordash-fast-travel-estimates/" rel="noopener noreferrer"&gt;DoorDash&amp;rsquo;s Fast Travel Estimates&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;DoorDash engineers explain how they estimate travel distance and duration in milliseconds—a core input for finding nearby stores, predicting delivery ETAs, calculating fees, and matching dashers. Calling a routing engine like OSRM directly typically takes over 100 ms, which is too slow for latency-sensitive paths like homepage refreshes or search ranking, while straight-line (haversine) distance is fast but inaccurate because it ignores real road networks.&lt;/p&gt;
&lt;p&gt;Their answer is Geo-Grid-Cache: partition the entire service area into hexagonal cells using the H3 spatial index, then precompute travel times between cell centers with OSRM under average traffic conditions. Each pair is stored across three resolution tiers—fine for trips under a mile, medium, and coarse for distances up to 100 miles—balancing cache hit rate, storage cost, and accuracy. At request time, the system looks up the pair in a Redis cluster and picks the highest resolution available. The hardest part was generating offline data for roughly 6 billion cell pairs; the team ran Spark on Databricks and installed OSRM directly on the cluster nodes to replace network calls with local HTTP calls, speeding up generation by 10x. The result is ultra-low latency, accuracy close to the internal routing engine, and major compute savings.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="tech-hiring-is-this-an-inflection-point"&gt;&lt;a href="https://blog.pragmaticengineer.com/tech-hiring-is-this-an-inflection-point/" rel="noopener noreferrer"&gt;Tech Hiring: Is This an Inflection Point?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gergely Orosz (The Pragmatic Engineer) highlights a paradox: even though fewer companies are hiring and more candidates are competing for roles, many engineering managers say 2025 is the hardest hiring market they have ever seen. A telling case is maestro.dev, a fully remote startup: every LinkedIn job posting draws hundreds of mostly unqualified applications, cover letters are almost universally AI-generated, and many candidates read answers straight from AI tools during live coding interviews. When the team switched to a take-home assignment, the head of engineering embedded a hidden prompt instruction aimed at AI assistants inside the spec—all four submissions followed the hidden instruction, even though three of the candidates insisted they hadn&amp;rsquo;t used AI. The most reliable signal came instead from candidates who reached out directly to explain why they wanted to join.&lt;/p&gt;
&lt;p&gt;Another remote company had to fire a senior data engineer after just two weeks upon discovering the person had fabricated their experience and used multiple AI tools simultaneously to pass the interview loop. That company is now considering adding a final in-person interview round despite the $1,500–$2,000 cost per candidate, while leaning harder on referrals since 4 of its last 5 hires came through internal recommendations. The post also covers LinkedIn Recruiter costs of $5,000–$20,000 per seat per month, the rise of paid &amp;ldquo;work trial&amp;rdquo; weeks, and the need to redesign remote hiring from the ground up in the AI era.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="underusing-snapshot-testing"&gt;&lt;a href="https://matklad.github.io/2025/04/15/underusing-snapshot-testing.html" rel="noopener noreferrer"&gt;Underusing Snapshot Testing&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Aleksey Kladov (matklad), creator of rust-analyzer, explains why he thinks he still underuses snapshot testing. The idea is straightforward: serialize a test&amp;rsquo;s output into text, compare it against an expected string literal embedded right in the source file, and use a tool to automatically update that literal from the actual output. The obvious benefit is easy maintenance when requirements change: the tool rewrites the expected output so the author can review the diff instead of editing strings by hand.&lt;/p&gt;
&lt;p&gt;What surprised him came from implementing permutation encoding in Zig—a problem whose requirements never change. With traditional assertion-based tests, execution stops at the first failure and the output is buried in a terminal window far from the code. Switching to inline snapshots surfaced every wrong result right inside the source file, letting him see the full picture at once and quickly spot two off-by-one bugs. In his view, snapshot tests keep data close to the programmer, tighten the feedback loop, and act like a repeatable REPL, speeding up development even when requirements are fixed. The end of the post also explains why a handful of concrete examples remain valuable alongside exhaustive testing over all permutations.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="principles-for-coding-securely-with-llms"&gt;&lt;a href="https://www.seangoedecke.com/ai-security/" rel="noopener noreferrer"&gt;Principles for coding securely with LLMs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke argues that LLM security shouldn&amp;rsquo;t be treated as a long checklist of disconnected threats, but derived from a single principle: LLMs sometimes act maliciously, so treat their output like untrusted user input. Prompt injection is fundamentally unavoidable—the moment you bring third-party content (web pages, docs, Cursor rules files) into the context window, you give its author a chance to steer the model, and no model is immune to jailbreaks.&lt;/p&gt;
&lt;p&gt;From that principle, every tool an LLM is allowed to call should be scoped and authorized like a public user-facing API: for example, expose &lt;code&gt;fetch_messages()&lt;/code&gt; rather than &lt;code&gt;fetch_messages(user_id)&lt;/code&gt; so the model cannot read another user&amp;rsquo;s messages, and require explicit human confirmation for high-impact actions like sending messages or transferring money. MCP servers are effectively remote libraries, meaning you are trusting the server&amp;rsquo;s owner, not just its interface. Even without an attacker, LLMs can hallucinate or take reckless actions, so human approval gates must be enforced in tool code rather than requested in the prompt. Goedecke also notes risks from fine-tuned or self-trained models (goal misalignment or leaking sensitive training data) and denial-of-service (DoS) attacks, since LLM calls are slow and GPU-heavy—cap concurrent sessions, token budgets, and tool access accordingly.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="how-i-don"&gt;&lt;a href="https://www.gleech.org/llms" rel="noopener noreferrer"&gt;How I don&amp;rsquo;t use LLMs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gavin Leech, an AI PhD, candidly explains why he rarely uses LLMs for intellectual work despite knowing firsthand how capable they are. Every time a new frontier model comes out, he tries it, and every time it confidently makes a serious error within the first few minutes. His reasons include loving writing enough that editing weak prose takes more effort than drafting from scratch, already having solid foundational knowledge across many fields, needing high accuracy and reliability when learning, disliking the model&amp;rsquo;s voice and habit of bluffing, worrying about skill atrophy, and not writing much code at the time.&lt;/p&gt;
&lt;p&gt;Even so, he still uses LLMs in specific situations: as a search replacement (only when citations are provided), for tip-of-the-tongue term recall, finding entry-point keywords in an unfamiliar field, semantic search over document collections, validating and converting JSON to CSV, getting past blank-page syndrome, and especially writing Matplotlib code or untangling Docker, WSL, and Cloudflare issues. To bypass model sycophancy, he frames his own ideas as if they came from someone else. The post strikes a balanced, self-critical tone: Leech admits part of the problem may be his own impatience, while warning that LLMs can quietly plant a few plausible falsehoods in your head every day.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="how-senior-software-engineers-can-learn-from-junior-engineers"&gt;&lt;a href="https://www.infoq.com/news/2025/04/software-engineers-learning/" rel="noopener noreferrer"&gt;How Senior Software Engineers Can Learn from Junior Engineers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This InfoQ piece summarizes Beth Anderson&amp;rsquo;s QCon London talk on what senior engineers can learn from junior teammates. She notes that steep power distances on a team make junior engineers hesitant to speak up even when they spot a problem with serious consequences, stifling innovation and collaboration. Rather than treating mentorship as a one-way street, senior engineers should recognize that junior colleagues often bring high energy, fresh perspectives, and up-to-date skills.&lt;/p&gt;
&lt;p&gt;To build an inclusive culture, Anderson recommends active listening, amplifying others&amp;rsquo; voices, crediting contributions, and creating the psychological safety needed for juniors to ask questions freely. One concrete practice is &amp;ldquo;reverse feedback&amp;rdquo;: asking junior engineers to critique how seniors communicate with them, asking how they prefer to learn, and inviting them to review senior engineers&amp;rsquo; code and pull requests as a learning exercise. She also urges juniors not to repeat the dismissive behaviors that once frustrated them when they become seniors themselves, because seniority is not about authority—it is an opportunity to create positive change. Every engineer, at every level, has a perspective worth learning from if we are willing to listen.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="as-an-engineer-i"&gt;&lt;a href="https://shiftmag.dev/asking-questions-engineering-career-advice-4895/" rel="noopener noreferrer"&gt;As an engineer, I&amp;rsquo;d rather be called stupid than stay silent&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Marko Antanaskovic recounts overcoming imposter syndrome while working as a Customer Support Engineer at Infobip. Opening with a fictional incident call packed with impenetrable jargon, he captures a familiar feeling: not understanding what the developers are saying, yet staying quiet out of fear of looking stupid while the customer waits for an update. Realizing nobody could know everything across such a massive platform—and that no textbook covered it—he decided to tap the knowledge of his colleagues by asking &amp;ldquo;stupid&amp;rdquo; questions like &amp;ldquo;What does that actually mean?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Antanaskovic points out the real cost of silence: prolonged outages because nobody connects the technical symptom to customer impact, poor work caused by misunderstood requirements, and meetings that sink into awkward silence. To build a questioning culture, he suggests being the first to ask, shifting from blame to education in the spirit of a blameless culture, and trusting the people around you. That willingness to look &amp;ldquo;stupid&amp;rdquo; helped him build enough deep system knowledge to transition into a Reliability Operations Engineer role. His closing takeaway: no sincere question is stupid, and it is far better to risk looking foolish than to stay silent and make preventable mistakes.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>