<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Java on miti99</title><link>https://miti99.com/en/tags/java/</link><description>Recent content in Java 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/java/index.xml" rel="self" type="application/rss+xml"/><item><title>Newsletter #138</title><link>https://miti99.com/en/post/2026/10/06/</link><pubDate>Tue, 06 Oct 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/10/06/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #138.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="what-i-believe-about-the-future-of-software-development"&gt;&lt;a href="https://thorstenball.com/blog/2026/09/19/what-i-believe-about-the-future-of-software-development/" rel="noopener noreferrer"&gt;What I believe about the future of software development&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Thorsten Ball reposts to his blog a series of predictions that sparked intense debate on X, capturing a snapshot of what he believes in September 2026. In his view, line-by-line human code review is effectively dead: humans will stop hunting for syntax or logic bugs in model-generated diffs and instead review system architecture and how components fit together. Unit tests as we know them may fade too, now that frontier models can one-shot 900 lines of working Arduino C on the first try. The craft of hand-writing code will atrophy much like cobbling shoes by hand, while the craft of &lt;em&gt;building software&lt;/em&gt;—solving real business problems, knowing when to ship, and tightening feedback loops—will matter more than ever. Most future bugs will be specification bugs (&amp;ldquo;you asked for the wrong thing&amp;rdquo;) rather than implementation bugs, and hand-crafted performance optimization by humans will remain a rare specialty.&lt;/p&gt;
&lt;p&gt;His spicier predictions go further: terminals, shells, and CLIs will cease to be human-first interfaces; tokens are the new compute primitive of the &amp;ldquo;post-binary&amp;rdquo; era; the classic PM/Design/Engineering triad alongside Agile and Scrum rituals will dissolve, and engineers who act merely as &amp;ldquo;meat proxies&amp;rdquo; translating Jira tickets into agent prompts will lose their jobs. Even our notion of &amp;ldquo;clean, maintainable code&amp;rdquo; exists primarily to serve human working-memory limits, so it may stop mattering once agents perform the vast majority of edits. Developers priced out of frontier token budgets risk getting left behind, and bespoke UIs will be generated on the fly. Still, Ball acknowledges it will take a full generation for &amp;ldquo;new software&amp;rdquo; to replace &amp;ldquo;old software&amp;rdquo;—ten years from now people will still be hired to write code by hand, though the real question is whether you&amp;rsquo;ll want that job.&lt;/p&gt;
&lt;h2 id="trying-the-software-factory-pattern"&gt;&lt;a href="https://lethain.com/software-factory-experiment/" rel="noopener noreferrer"&gt;Trying the Software Factory pattern.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Will Larson reflects that in 2026, effective AI engineering patterns are emerging faster than he can adopt them. At his company Imprint, the year&amp;rsquo;s progression moved rapidly: in January, getting every engineer using Claude Code daily; in March, expanding Claude Code and Claude Cowork to every non-engineering function; in April, hitting the limits of local &lt;code&gt;git worktree&lt;/code&gt; setups and provisioning ~10 full multi-repo workspace checkouts per developer so agents could open coordinated PRs across monorepos; in June, migrating the entire company off Jira onto Linear so agents had clean, low-friction access to task context without permission headaches; and in July, launching &amp;ldquo;Agent Fleet,&amp;rdquo; an internal cloud orchestration harness inspired by Stripe&amp;rsquo;s Minions for autonomously knocking out small tickets.&lt;/p&gt;
&lt;p&gt;The next frontier Larson is experimenting with is the &lt;strong&gt;Software Factory&lt;/strong&gt; pattern: pointing a long-running harness at a broad multi-week project goal and letting it drive progress continuously. His first prototype, a &lt;code&gt;/linear-project-loop&lt;/code&gt; skill, reads a Linear project and checks whether it has both a Notion RFC (defining goals, metrics, and technical approach) and a Datadog dashboard or Snowflake query tracking those metrics—collaborating with the human to create them if missing. On subsequent runs, the loop checks live metrics and open issues, files missing follow-up tasks, and picks up unblocked work like drafting PRs, nudging reviewers, or posting clarifying questions. Running the loop immediately exposed how much project context Larson had been keeping in his own head rather than writing down, and proved especially valuable &lt;em&gt;after&lt;/em&gt; launch—automatically flagging a spike in passkey error rates and queueing up remediation tasks. His takeaway: these pieces only compound when wired together—Datadog MCP, Snowflake, Linear as a single source of truth, and a cloud harness that keeps running when your laptop closes.&lt;/p&gt;
&lt;h2 id="back-to-coupling-and-cohesion"&gt;&lt;a href="https://bastrich.tech/coupling-and-cohesion/" rel="noopener noreferrer"&gt;Back to Coupling and Cohesion&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Daniil Bastrich argues that junior developers and Clean Code zealots routinely over-apply acronyms like SOLID, GRASP, and KISS, producing labyrinthine codebases that look impressive on a whiteboard but are miserable to maintain. In his view, every one of those principles is really just a specialized corollary of managing &lt;strong&gt;coupling&lt;/strong&gt; and &lt;strong&gt;cohesion&lt;/strong&gt; across different scales. Coupling measures how tightly components are entangled such that changing one forces changes in others; cohesion measures the degree to which everything inside a single component serves one unified purpose. To move past hand-wavy intuition, Bastrich proposes quantifying both directly from real development history: for every task, log the effort spent across each touched component; for each component, log the effort spent across each business concern. Using formulas analogous to the Gini-Simpson diversity index and Herfindahl-Hirschman index, coupling is $1 - \frac{\sum e_i^2}{(\sum e_i)^2}$ across components for a task, while cohesion is $\frac{\sum e_i^2}{(\sum e_i)^2}$ across concerns inside a component.&lt;/p&gt;
&lt;p&gt;For example, if changing a password-length rule requires editing both the registration form (effort 4) and the password-reset form (effort 6), the task&amp;rsquo;s coupling score is &lt;code&gt;0.48&lt;/code&gt;, even though each form has a cohesion of &lt;code&gt;1.0&lt;/code&gt;. Framing design around these two forces maps every classic rule back to first principles: Single Responsibility is simply high cohesion; Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion, DRY, and the Law of Demeter all exist to reduce coupling or raise cohesion; and KISS bounds the working memory required to hold a component in your head. Even so, Bastrich reminds readers that low coupling and high cohesion aren&amp;rsquo;t free—in ultra-low-latency trading systems, embedded firmware, or throwaway scripts, tightly coupled code is often the right engineering trade-off.&lt;/p&gt;
&lt;h2 id="introducing-system-one-models--jev"&gt;&lt;a href="https://typesafe.ai/blog/introducing-system-one-models-and-jev" rel="noopener noreferrer"&gt;Introducing System One Models &amp;amp; Jev&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Diogo Almeida—founder of TypeSafe AI and an early OpenAI researcher who worked on the foundations of ChatGPT—poses a pointed question: LLMs surpassed human-level chat years ago, so why hasn&amp;rsquo;t enterprise automation caught up? Coming out of two years in stealth, TypeSafe AI introduces &lt;strong&gt;System One Models&lt;/strong&gt;, a new class of frontier models purpose-built to make fast, structured, calibrated decisions inside software pipelines rather than chatting with humans. Built on a custom architecture, a parallel sampler, and a training methodology called &lt;em&gt;Reinforcement Learning for Calibrated Decisions&lt;/em&gt; (RLCD), their debut model &lt;strong&gt;Jev&lt;/strong&gt; (now in early access) acts like a &amp;ldquo;frontier-intelligence function call&amp;rdquo;: it ingests unstructured context and returns strongly typed decisions paired with calibrated probabilities. By abandoning token-by-token autoregressive text generation, Jev cannot produce syntax/type errors or free-form hallucinations, evaluates multiple structured questions in parallel in a single pass, responds in 70–500 ms, and costs just &lt;code&gt;$0.042&lt;/code&gt; per million input tokens with &lt;strong&gt;free output&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;To benchmark real-world utility, the team built a code-level workflow evaluation suite comparing Jev against an ensemble consensus of &lt;code&gt;GPT-6 Astra&lt;/code&gt; and &lt;code&gt;Fable 5.1&lt;/code&gt;. Across those workflows, Jev ran &lt;strong&gt;193.6x faster&lt;/strong&gt; and &lt;strong&gt;444.6x cheaper&lt;/strong&gt; at matching accuracy (though the team transparently notes that benchmark figure sits at the upper end of their target distribution). Ideal use cases include acting as a &amp;ldquo;smart &lt;code&gt;if&lt;/code&gt; statement&amp;rdquo; inside application control flow, massive map-reduce classification over unstructured data, real-time interactive agents, and fast guardrail verification over LLM outputs—illustrated by live demos of Jev playing &lt;em&gt;DOOM&lt;/em&gt; at 10 queries per second for ~$7/hour and playing Wikipedia &lt;em&gt;Wikiracing&lt;/em&gt;. The category name nods to Daniel Kahneman&amp;rsquo;s &lt;em&gt;Thinking, Fast and Slow&lt;/em&gt;, while &amp;ldquo;Jev&amp;rdquo; honors economist William Stanley Jevons: make machine intelligence orders of magnitude faster and cheaper, and entirely new software architectures become viable.&lt;/p&gt;
&lt;h2 id="system-one-models--explained"&gt;&lt;a href="https://unzip.dev/0x025-system-one-models/" rel="noopener noreferrer"&gt;System One Models 🚦 Explained&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Agam More breaks down how System One models—led by TypeSafe AI&amp;rsquo;s Jev—work in practice, describing them as a fast, dirt-cheap &lt;code&gt;if&lt;/code&gt; statement that knows exactly how confident it is. Instead of asking a model to generate an essay, you pass unstructured context alongside a typed schema of closed-ended questions, and the model returns a JSON object with calibrated probabilities for every option, like grading a multiple-choice exam in a single forward pass. Jev exposes three primitives: &lt;code&gt;Choice&lt;/code&gt; (picking one option from an enum), &lt;code&gt;Score&lt;/code&gt; (rating along a defined rubric scale), and &lt;code&gt;Noul&lt;/code&gt; (estimating the boolean probability that a proposition is true). Given a support ticket complaining that a Stripe integration has been broken for three days, for instance, Jev routes it to &lt;code&gt;technical&lt;/code&gt; with probability &lt;code&gt;0.85&lt;/code&gt; and flags &lt;code&gt;urgent: true&lt;/code&gt; in under 100 ms. Under the hood, Jev undergoes standard pretraining followed by RLCD post-training on synthetic data that explicitly rewards Brier-score calibration so a &lt;code&gt;0.80&lt;/code&gt; confidence score genuinely means the model is right 80% of the time.&lt;/p&gt;
&lt;p&gt;More advises reaching for a System One model whenever your backend asks an LLM the exact same closed-ended routing, triage, moderation, or extraction question thousands of times a second—letting you auto-execute high-confidence predictions (&lt;code&gt;p &amp;gt; 0.95&lt;/code&gt;) and route low-confidence edge cases to a heavier reasoning model or human queue. On the public &lt;code&gt;JevBench&lt;/code&gt; suite, Jev is 6x to 7x cheaper per decision than &lt;code&gt;GPT-5.6 Luna&lt;/code&gt; or &lt;code&gt;Gemini 3.1 Flash-Lite&lt;/code&gt;. Conversely, don&amp;rsquo;t use it when the answer space isn&amp;rsquo;t known up front, when you need free-form text generation, or when deep multi-step reasoning matters more than latency; also remember to include an explicit &lt;code&gt;&amp;quot;none_of_the_above&amp;quot;&lt;/code&gt; enum variant if inputs can fall outside your categories. Competing approaches in this emerging space include SemIf, Laya, Kev, GLiNER2, and grammar-constrained decoding via Outlines.&lt;/p&gt;
&lt;h2 id="how-data-is-replicated-in-distributed-systems--raft-from-scratch---part-1"&gt;&lt;a href="https://sushantdhiman.dev/blog/raft/" rel="noopener noreferrer"&gt;How Data Is Replicated In Distributed Systems | Raft From Scratch - Part 1&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sushant Dhiman kicks off a two-part hands-on series with a foundational distributed systems problem: when you replicate a stateful service like a database across five machines for fault tolerance, how do the nodes agree on a single leader without split-brain? His answer walks through &lt;strong&gt;Raft&lt;/strong&gt;, the consensus algorithm designed by Diego Ongaro and John Ousterhout specifically to be easier to understand and implement than Paxos. Consensus ensures that a cluster of replicas agrees on a single ordered sequence of operations even in the face of crashes and network partitions, preventing scenarios where one replica commits 10 transactions while another only sees 7. Part 1 focuses entirely on &lt;strong&gt;Leader Election&lt;/strong&gt;. In Raft, every node is in one of three states at any moment: the &lt;em&gt;Leader&lt;/em&gt; handles client writes and coordinates replication, &lt;em&gt;Followers&lt;/em&gt; passively respond to RPCs from the leader, and a &lt;em&gt;Candidate&lt;/em&gt; is a follower that steps up to call an election after its leader heartbeat times out. Two RPCs drive the entire protocol: &lt;code&gt;AppendEntries&lt;/code&gt; (used both to replicate log entries and to send periodic empty heartbeats) and &lt;code&gt;RequestVote&lt;/code&gt; (sent by candidates campaigning for leadership).&lt;/p&gt;
&lt;p&gt;When a leader crashes or gets partitioned away, followers stop receiving heartbeats; once a follower&amp;rsquo;s randomized election timeout (say, between 150 ms and 300 ms) expires, it increments its monotonic &lt;em&gt;election term&lt;/em&gt; (which acts as a Lamport logical clock), transitions to Candidate, votes for itself, and sends &lt;code&gt;RequestVote&lt;/code&gt; RPCs to all peers. Randomized timeouts ensure nodes rarely campaign at the exact same millisecond, preventing endless split votes; within any given term, each node grants its vote to at most one candidate on a first-come, first-served basis, and any node that observes a message carrying a higher term number immediately steps down to Follower. Dhiman concludes with a clean educational implementation in Go and gRPC—wiring up the election timer loop, &lt;code&gt;RequestVote&lt;/code&gt;, heartbeat &lt;code&gt;AppendEntries&lt;/code&gt;, and protobuf definitions across three local nodes on ports &lt;code&gt;5001–5003&lt;/code&gt;—saving log replication and persistence for Part 2.&lt;/p&gt;
&lt;h2 id="jev-means-structured-output-is-interesting-again"&gt;&lt;a href="https://www.seangoedecke.com/jev-means-structured-output-is-interesting-again/" rel="noopener noreferrer"&gt;Jev means structured output is interesting again&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke rarely writes about new model releases, but makes an exception for TypeSafe AI&amp;rsquo;s &lt;strong&gt;Jev&lt;/strong&gt;. Standard LLMs generate text autoregressively one token at a time, which makes them wonderfully general-purpose at the cost of high latency and occasional formatting quirks. Jev accepts arbitrary natural-language prompts but &lt;em&gt;only&lt;/em&gt; emits structured classification/scoring outputs—and leaning completely into that constraint unlocks compelling systems properties. Because Jev doesn&amp;rsquo;t generate tokens sequentially and instead evaluates multiple structured decisions in parallel within a single pass, its latency is tightly bounded between 70 ms and 500 ms—fast enough to play &lt;em&gt;DOOM&lt;/em&gt; in real time from text descriptions of the screen state. To Goedecke, sub-100 ms, dirt-cheap structured intelligence feels like a genuine new computing primitive: once you can sprinkle 100 ms probabilistic judgements directly into standard control flow, you can build software that looks nothing like a chatbot.&lt;/p&gt;
&lt;p&gt;That said, Goedecke offers a sober technical reality check: fast structured output from small models was already possible if you cared to optimize for it. Most structured-output pipelines feel slow only because developers ask frontier chat models to emit massive nested JSON schemas via grammar-constrained decoding. For closed-ended classification, you can simply prefill the assistant response up to &lt;code&gt;&amp;quot;choice&amp;quot;: &amp;quot;&lt;/code&gt; and run a single forward pass constrained to valid option tokens—an experiment Goedecke ran locally with &lt;code&gt;Qwen2.5-1.5B-Instruct&lt;/code&gt; that immediately sped up classification by 2x to 3x. Consequently, Jev&amp;rsquo;s architectural moat may be shallower than advertised (though post-training specifically for calibrated probabilities via RLCD is a real differentiator), it will never match frontier reasoning models on problems that require test-time chain-of-thought compute, and calling wrong answers &amp;ldquo;classification errors&amp;rdquo; instead of &amp;ldquo;hallucinations&amp;rdquo; is mostly semantics. Even so, he hopes Jev succeeds and pressures the major labs to ship dedicated ultra-low-latency structured-output endpoints of their own.&lt;/p&gt;
&lt;h2 id="why-do-we-listen-to-people-with-no-skin-in-the-game"&gt;&lt;a href="https://rednafi.com/zephyr/no-skin-in-the-game/" rel="noopener noreferrer"&gt;Why do we listen to people with no skin in the game?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Writing from the trenches of industrial software engineering, Redowan Delowar argues a simple rule borrowed from Nassim Taleb: if someone doesn&amp;rsquo;t bear the consequences of running the software in production, their opinions about how to build it are probably wrong. Influence does not equal correctness, and talking about code online is a completely different sport from shipping and maintaining production systems under real organizational constraints. A classic culprit is the &amp;ldquo;AI-pilled&amp;rdquo; executive or director who spends a Saturday afternoon vibe-coding a throwaway greenfield app, concludes that software engineering is completely solved, and shows up Monday demanding 10x feature velocity while dismissing compliance, legacy integration, and operational friction as excuses. Delowar uses LLMs heavily every day, which is precisely why he hits their sharp edges far more often than someone who only one-shots toy todo apps. You still have to humor your management chain to keep your paycheck, he notes, but never confuse organizational authority with technical truth—the person with real skin in the game is the one holding the pager when &amp;ldquo;vibe-slop&amp;rdquo; catches fire at 3 a.m.&lt;/p&gt;
&lt;p&gt;The second group with zero skin in the game is software influencers peddling engagement-bait absolutes like &lt;em&gt;&amp;ldquo;rewrite everything in Rust,&amp;rdquo;&lt;/em&gt; &lt;em&gt;&amp;ldquo;TypeScript is dead,&amp;rdquo;&lt;/em&gt; or &lt;em&gt;&amp;ldquo;Kotlin is Temu Java&amp;rdquo;&lt;/em&gt;—because nuanced engineering trade-offs don&amp;rsquo;t please social media algorithms, and selling hot takes and courses is far more lucrative than maintaining a five-year-old billing service. Podcast guests who actually built systems are often worth listening to, while professional hosts and course-sellers—many of whom pivoted seamlessly from JS framework bootcamps to Web3/NFTs and now to &amp;ldquo;AI agent mastery&amp;rdquo;—should be tuned out. Real companies choose tech stacks based on local hiring pools, iteration speed, and what the founding engineers already know, and LLMs haven&amp;rsquo;t changed that fundamental reality. Talk is cheap; always check whether the speaker will be around when the pager goes off.&lt;/p&gt;
&lt;h2 id="you-can-run-git-on-object-storage-if-you-re-make-packfiles"&gt;&lt;a href="https://www.tigrisdata.com/blog/objgit-packfiles/" rel="noopener noreferrer"&gt;You can run git on object storage if you re-make packfiles&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Xe Iaso is building &lt;code&gt;objgit&lt;/code&gt;, an open-source Git server backed directly by Tigris S3-compatible object storage. A naive first prototype that mapped loose Git objects onto an object-storage filesystem hit a brick wall on real-world repositories. At its core, Git is a content-addressable store of millions of tiny objects—the Linux kernel repository alone contains roughly 11 million objects, so fetching them one by one at 10 ms per &lt;code&gt;GetObject&lt;/code&gt; HTTP call would take over 30 hours. Standard Git solves this with &lt;em&gt;packfiles&lt;/em&gt; (&lt;code&gt;.pack&lt;/code&gt; + &lt;code&gt;.idx&lt;/code&gt;), which bundle objects together and delta-compress them, but the Git packfile format was designed around local disks and &lt;code&gt;mmap&lt;/code&gt;, where random seeks cost nanoseconds rather than a 10 ms network round trip. Worse, standard &lt;code&gt;.idx&lt;/code&gt; files record only each object&amp;rsquo;s byte offset and &lt;em&gt;uncompressed&lt;/em&gt; size—not its compressed byte length in the pack—making it impossible to construct an exact HTTP &lt;code&gt;Range: bytes=start-end&lt;/code&gt; request to fetch a single object out of S3 without reading neighboring headers.&lt;/p&gt;
&lt;p&gt;Drawing inspiration from 1990s CD-ROM &lt;code&gt;.bin&lt;/code&gt;/&lt;code&gt;.cue&lt;/code&gt; rip files, Iaso designed a cloud-native packfile format for &lt;code&gt;objgit&lt;/code&gt;: compressed objects are concatenated into &lt;code&gt;.bin&lt;/code&gt; blobs capped at 128 MiB, while a separate binary &amp;ldquo;cue sheet&amp;rdquo; index stores every object&amp;rsquo;s offset alongside &lt;strong&gt;both&lt;/strong&gt; its compressed and uncompressed sizes—effectively turning a Git repository into a columnar store. With the exact compressed byte span in hand, &lt;code&gt;objgit&lt;/code&gt; can fire precise HTTP &lt;code&gt;Range&lt;/code&gt; requests for individual objects at the tail of a packfile while streaming the full packfile in the background until the sequential download catches up, all compressed with &lt;code&gt;zstd&lt;/code&gt;. Reinventing Git&amp;rsquo;s packfile format sounds like violating Chesterton&amp;rsquo;s Fence, Iaso admits, but because Git itself is distributed and content-addressed, if the server&amp;rsquo;s storage format breaks you can simply &lt;code&gt;git push&lt;/code&gt; again from a local clone. The payoff was dramatic: pushing the &lt;code&gt;Xe/x&lt;/code&gt; repository dropped from &lt;strong&gt;3 minutes 29 seconds down to 14.3 seconds&lt;/strong&gt;, and S3 API calls fell from over 9,000 down to 30. (&lt;code&gt;objgit&lt;/code&gt; still lacks authentication and authorization, so don&amp;rsquo;t expose it to the public internet yet.)&lt;/p&gt;
&lt;h2 id="why-cafebabe"&gt;&lt;a href="https://www.artima.com/insidejvm/whyCAFEBABE.html" rel="noopener noreferrer"&gt;Why CAFEBABE?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Back in May 1996, while writing his &lt;em&gt;&amp;ldquo;The Class File Lifestyle&amp;rdquo;&lt;/em&gt; column for &lt;em&gt;JavaWorld&lt;/em&gt;, Bill Venners got curious about the famous magic number sitting at the start of every compiled Java &lt;code&gt;.class&lt;/code&gt; file: why must the first four bytes always be &lt;code&gt;0xCAFEBABE&lt;/code&gt;? Venners posted the question to the &lt;code&gt;comp.lang.java&lt;/code&gt; Usenet newsgroup and archived the entire thread on this page. Readers chimed in with clever theories: a 32-bit magic number is fast to check on 32-bit architectures and unlikely to collide with ASCII text; the Java team wanted a coffee-themed hex constant, and since hexadecimal only gives you the letters &lt;code&gt;A&lt;/code&gt; through &lt;code&gt;F&lt;/code&gt; (no &lt;code&gt;J&lt;/code&gt; or &lt;code&gt;V&lt;/code&gt;), combinations using &lt;code&gt;CAFE&lt;/code&gt; beat out alternatives like &lt;code&gt;0xAFABCAFE&lt;/code&gt;, &lt;code&gt;0xCAFEFACE&lt;/code&gt;, or the ominous &lt;code&gt;0xABADCAFE&lt;/code&gt;—while one reader wished they had picked &lt;code&gt;0x00C0FFEE&lt;/code&gt; (reading the leading zeros as the letters &lt;code&gt;&amp;quot;OO&amp;quot;&lt;/code&gt; for &amp;ldquo;Object-Oriented Coffee&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;The Usenet thread also serves as a charming mini-museum of computing folklore around hex magic numbers: the Burroughs B6700 initialized unused memory to &lt;code&gt;0xBADBADBADBAD&lt;/code&gt;; classic IBM systems and AIX RS/6000s filled uninitialized memory with &lt;code&gt;0xDEADBEEF&lt;/code&gt; so pointer bugs jumped right out in a debugger; classic Mac OS placed &lt;code&gt;0x50FFC001&lt;/code&gt; at address &lt;code&gt;0x0&lt;/code&gt; so dereferencing a &lt;code&gt;NULL&lt;/code&gt; code pointer would immediately trap; SGI IRIX started shared arena files with &lt;code&gt;0xDEADBABE&lt;/code&gt;; and debug builds of Solaris overwrote freed heap blocks with &lt;code&gt;0xCAFEFEED&lt;/code&gt;. Another reader pointed out that NeXTSTEP had already used &lt;code&gt;0xCAFEBABE&lt;/code&gt; as the magic number for multi-architecture &amp;ldquo;fat&amp;rdquo; binaries alongside &lt;code&gt;0xFEEDFACE&lt;/code&gt; for Mach-O object files. Finally, Patrick Naughton—one of the original members of Sun&amp;rsquo;s Green Project that created Oak (later renamed Java)—replied with the authoritative answer: he picked &lt;code&gt;0xCAFEBABE&lt;/code&gt; himself years before the name &amp;ldquo;Java&amp;rdquo; even existed! He simply wanted a fun, memorable 32-bit hex constant for the object file format, and &lt;code&gt;0xcafebabe&lt;/code&gt; beat out the runner-up &lt;code&gt;0xdeadbabe&lt;/code&gt;. Any connection to the baristas at Peet&amp;rsquo;s Coffee or the eventual name &amp;ldquo;Java&amp;rdquo; was pure serendipity.&lt;/p&gt;</description></item><item><title>Newsletter #131</title><link>https://miti99.com/en/post/2026/09/09/</link><pubDate>Wed, 09 Sep 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/09/09/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #131.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-codename-one-javascript-port-is-now-free-and-open-source"&gt;&lt;a href="https://dev.to/codenameone/the-codename-one-javascript-port-is-now-free-and-open-source-2f84" rel="noopener noreferrer"&gt;The Codename One JavaScript Port Is Now Free and Open Source&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Codename One has open-sourced its JavaScript port under GPLv2 with the Classpath Exception. Previously restricted to Enterprise subscribers, the port is now available across all tiers, and developers can build web targets locally without even needing a Codename One account via a single Maven command powered by the bundled ParparVM compiler. ParparVM also replaces TeaVM as the default compiler for both local and cloud builds, though TeaVM remains available via a build hint for comparison. Architecturally, the application&amp;rsquo;s Java code runs inside a background Web Worker while browser interaction lives on the main UI thread, preventing Java code from accidentally coupling to the DOM or browser globals.&lt;/p&gt;
&lt;p&gt;The release also ships major framework additions. A unified Calendar API connects device calendars, Google Calendar, Microsoft 365, CalDAV, and &lt;code&gt;.ics&lt;/code&gt; files with support for recurring events, incremental sync, offline change queues, and conflict resolution. Bluetooth moves into the core framework with BLE, GATT, L2CAP, RFCOMM, and Web Bluetooth support. &lt;code&gt;EditField&lt;/code&gt;, &lt;code&gt;RichTextArea&lt;/code&gt;, and &lt;code&gt;CodeEditor&lt;/code&gt; now render and edit text directly on the canvas instead of overlaying native text inputs, while &lt;code&gt;RichTextComponent&lt;/code&gt; renders HTML, Markdown, AsciiDoc, and RTF without a WebView. A new proxy layer supports Jakarta Servlet, Node.js, PHP, AWS Lambda, Google Cloud Functions, and Cloudflare Workers. Finally, ParparVM adds compressed strings—halving memory usage for ASCII text—and Android API 36 becomes the default target next week.&lt;/p&gt;
&lt;h2 id="hacking-in-the"&gt;&lt;a href="https://committing-crimes.com/articles/2026-08-04-java-nameof/" rel="noopener noreferrer"&gt;Hacking in the &lt;code&gt;nameOf&lt;/code&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Java lacks C#&amp;rsquo;s &lt;code&gt;nameof&lt;/code&gt; expression for obtaining an identifier&amp;rsquo;s name as a compile-time string. That gap is especially annoying in argument validation, where you end up hardcoding parameter names into exception messages like &lt;code&gt;&amp;quot;name must not be blank&amp;quot;&lt;/code&gt;—and if someone renames the variable later without updating the string, the compiler won&amp;rsquo;t say a word. This article experiments with building a pure-Java &lt;code&gt;nameOf&lt;/code&gt; function that recovers variable names at runtime without bytecode instrumentation agents or annotation processors.&lt;/p&gt;
&lt;p&gt;The hack works in three steps. First, &lt;code&gt;StackWalker&lt;/code&gt; locates the caller frame that invoked &lt;code&gt;nameOf&lt;/code&gt;, yielding the class, method name, method descriptor, and exact bytecode index (BCI). Next, the caller class&amp;rsquo;s &lt;code&gt;.class&lt;/code&gt; file is loaded into memory and parsed into a &lt;code&gt;ClassModel&lt;/code&gt; using Java&amp;rsquo;s new Class-File API. Finally, the author simulates the JVM operand stack symbolically: instead of actual runtime values, each stack slot holds a symbolic label—such as a local variable or field name—which is propagated across load, store, field-access, and invocation instructions until the simulator reaches the exact BCI of the &lt;code&gt;nameOf&lt;/code&gt; call and reads the symbolic name sitting on top of the stack. The author strongly advises against using this in production: it breaks on unfamiliar opcodes, relies on optional debug info or the &lt;code&gt;-parameters&lt;/code&gt; compiler flag, may fail on non-&lt;code&gt;javac&lt;/code&gt; bytecode, and is barely tested. It is a delightful over-engineering exercise that doubles as a tour of JVM bytecode and the Class-File API.&lt;/p&gt;
&lt;h2 id="set-it-and-ship-it-how-i-let-ai-agents-build-my-java-services-while-i-sleep"&gt;&lt;a href="https://dev.to/sshenvi/set-it-and-ship-it-how-i-let-ai-agents-build-my-java-services-while-i-sleep-1jhj" rel="noopener noreferrer"&gt;Set It and Ship It: How I Let AI Agents Build My Java Services While I Sleep&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sudarshan Shenvi argues that AI agents are fully capable of building production-grade Java services autonomously over multi-hour runs, provided their work is gated by strict verification controls; without those gates, you just get plausible-sounding slop. He relies on three pillars: machine-verifiable requirements where every item specifies a concrete behavior or performance threshold that grades as pass or fail; a separate critic agent that audits the output item by item, since the builder agent must never grade its own homework; and an always-on execution harness with interactive permission prompts disabled so a five-hour run doesn&amp;rsquo;t stall waiting for a human click, paired with narrowly scoped credentials, sandboxed isolation, and hard spend limits.&lt;/p&gt;
&lt;p&gt;As an example, he walks through a ticket to build a payment reconciliation service. Instead of writing Java code, the engineer writes a 15-line requirements contract specifying REST endpoints, reconciliation logic, JPA entities, p95 latency under 500 ms, 100% test coverage, and security constraints. He kicks off the agent at 9:10 a.m. and walks away; the critic loop catches missing latency proof and a package structure violation, the builder agent fixes both, and by 11:35 a.m. he returns to a 15/15 passing scorecard with measured latency at 410 ms. Shenvi cautions that token consumption can spike unpredictably, so teams should enforce strict budget caps, run agents on isolated branches inside sandboxes, and always keep human code review before merging.&lt;/p&gt;
&lt;h2 id="software-abundance"&gt;&lt;a href="https://nader.substack.com/p/software-abundance" rel="noopener noreferrer"&gt;Software abundance&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Nader Dabit, a 14-year industry veteran currently at Cognition, writes that despite earlier anxieties about AI&amp;rsquo;s impact on software engineering, he has never been more optimistic about the field. He sees a sharp bifurcation in the job market: engineers who actively adopt AI-native workflows and pivot toward AI-driven growth areas are seeing stronger compensation and opportunities, while those who cling rigidly to narrow traditional silos like pure frontend or backend—or stay at slow-moving legacy enterprises—face headwinds and layoffs.&lt;/p&gt;
&lt;p&gt;The centerpiece of his argument is Jevons paradox: when the cost of producing software drops and capacity rises, demand for software doesn&amp;rsquo;t shrink—it expands dramatically. Teams he works with are now shipping 10x to 20x more pull requests than before, and cloud-hosted agents let non-specialists ship changes that previously required senior engineers. Higher velocity leads to more ambitious product roadmaps and a higher bar for polish. In Dabit&amp;rsquo;s view, software engineering isn&amp;rsquo;t disappearing; it is shedding the repetitive toil engineers disliked anyway—bug bashing, dependency upgrades, rote migrations—freeing humans to focus on judgment, curiosity, domain context, and taste, while reclaiming time for the creative experimentation that drew them to programming in the first place.&lt;/p&gt;
&lt;h2 id="the-development-pipeline-is-a-production-system"&gt;&lt;a href="https://sundry.jerryorr.com/2026/07/31/development-pipeline-is-a-production-system" rel="noopener noreferrer"&gt;The development pipeline is a production system&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jerry Orr argues that the software development pipeline is itself a production system, and when it breaks, engineering teams should treat the outage with the same urgency as a customer-facing incident. When the build is broken, developers cannot work; when the QA environment goes down, testers cannot verify releases. For those internal users, it is literally a production outage, and any component blocking the path from code commit to deployment—whether issue trackers, CI/CD runners, or a flaky test suite—represents a critical failure.&lt;/p&gt;
&lt;p&gt;Orr draws a parallel with manufacturing, where factories have long had disciplined processes to minimize assembly-line downtime, whereas software teams routinely neglect their own internal delivery infrastructure. He recommends explicitly cataloging and prioritizing every essential piece of the development pipeline: work and change-management platforms, developer tools like IDEs and build systems, artifact registries and local dev environments, CI/CD pipelines, QA environments, and automated test suites. Applying structured incident management—borrowed from IT service management and manufacturing—to developer infrastructure is essential, because a broken pipeline directly prevents value from reaching customers.&lt;/p&gt;
&lt;h2 id="how-llms-figure-out-what-you-mean---no-math-degree-required"&gt;&lt;a href="https://zarar.dev/how-ai-figures-out-what-you-mean-no-math-required/" rel="noopener noreferrer"&gt;How LLMs Figure Out What You Mean - No Math Degree Required&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article explains how a large language model figures out the meaning of a sentence without requiring any math background, using the question &lt;code&gt;&amp;quot;Do lions roar?&amp;quot;&lt;/code&gt; as a running example. Step one is turning words into numbers: text is split into tokens, each assigned an integer ID. A single ID number carries no semantic meaning on its own—there is no reason token #2 should be &amp;ldquo;similar&amp;rdquo; to token #3—so each token is mapped to an embedding vector, a long list of numbers whose dimensions jointly capture aspects of meaning so that words with similar meanings have similar vectors. You can picture vectors as arrows in space: synonyms point in the same direction, antonyms point in opposite directions, and unrelated words sit at right angles.&lt;/p&gt;
&lt;p&gt;To measure how closely two words align, the model uses the dot product, illustrated as two people pushing a shopping cart: push in the same direction and your forces add up to a high positive score; push at an angle and efficiency drops; push in opposite directions and you cancel each other out with a negative score. Because raw scores only make sense relative to one another, the model passes them through a &lt;code&gt;softmax&lt;/code&gt; function to convert them into percentages—like giving each word a single dollar of attention to slice up like a pizza among the other words in the sentence based on relevance. That is how, in &lt;code&gt;&amp;quot;Do lions roar?&amp;quot;&lt;/code&gt;, the word &lt;code&gt;&amp;quot;roar&amp;quot;&lt;/code&gt; directs most of its attention to &lt;code&gt;&amp;quot;lions&amp;quot;&lt;/code&gt; rather than &lt;code&gt;&amp;quot;Do&amp;quot;&lt;/code&gt;. All these vectors start out completely random and are gradually nudged into place during training via backpropagation over massive amounts of text.&lt;/p&gt;
&lt;h2 id="meet-alice-alice-is-impatient"&gt;&lt;a href="https://brooker.co.za/blog/2026/06/19/waiting.html" rel="noopener noreferrer"&gt;Meet Alice. Alice is impatient.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Marc Brooker opens with two scenarios every service operator recognizes. You measure an average request latency of 100 ms, yet your customer Alice swears she waits a full second on average. You report a mean time to recovery (MTTR) under one minute, yet your customer Alex experiences outages as lasting roughly an hour each. According to Brooker, both sides are telling the truth: operators average over &lt;em&gt;events&lt;/em&gt;, whereas customers sample across &lt;em&gt;time&lt;/em&gt;. This is the inspection paradox: the longer an outage or slow window lasts, the more customer requests (or retries) land inside it, so what customers actually experience is a duration-weighted version of the underlying distribution.&lt;/p&gt;
&lt;p&gt;Mathematically, if operators measure a mean duration of $E[X]$, a customer arriving at a random point in time experiences an expected duration of $\frac{E[X^2]}{2E[X]}$, which simplifies to $\frac{1}{2}\left(E[X] + \frac{\text{Var}(X)}{E[X]}\right)$. The gap between operator metrics and customer perception is proportional to the variance divided by the mean, meaning high variance drives perceived wait times through the roof. Brooker includes an interactive calculator and Python simulation: with a 30-minute median outage and a 600-minute p99, customers experience an average recovery time of roughly 6 hours even though measured MTTR is just 1 hour. Because real-world systems follow heavy-tailed distributions, trimming outliers hides the exact tail events that dominate customer pain. Short blips are already well handled by retries and failovers; long tail outages remain the industry&amp;rsquo;s unsolved problem and where engineering investment belongs.&lt;/p&gt;
&lt;h2 id="harness-engineering-deep-dive-where-the-term-came-from-and-how-to-actually-build-one"&gt;&lt;a href="https://lukasniessen.medium.com/harness-engineering-deep-dive-where-the-term-came-from-and-how-to-actually-build-one-a955bcdf5cce" rel="noopener noreferrer"&gt;Harness Engineering Deep Dive: Where The Term Came From, And How To Actually Build One&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Lukas Niessen starts from the equation that has become standard in 2026: &lt;strong&gt;Agent = Model + Harness&lt;/strong&gt;. The harness is everything around the model: the execution loop, tools, sandboxing, context assembly, permissions, verification suites, durable state, execution traces, cost caps, and approval gates. Because you rent the model but own the harness, whenever an agent fails, instead of waiting for the next model release, you can re-engineer the environment so that class of failure becomes structurally impossible. Coined in early 2026 through posts by Mitchell Hashimoto, Birgitta Böckeler, and an OpenAI report, harness engineering represents the natural progression after prompt engineering and context engineering. The dividing line between a thin wrapper and a true harness is the closed feedback loop: once model outputs become actions executed against real state, whose results feed back into the next turn, every harness engineering concern comes into play.&lt;/p&gt;
&lt;p&gt;The technical deep dive walks through seven failure modes of a naive agent loop: sensors must distill signal rather than dumping raw stdout into the context window; conversation history is merely a cache while an external ledger holds the source of truth; the agent must never be allowed to declare its own work &amp;ldquo;done&amp;rdquo; without an external verifier; action spaces should be constrained via strict tool schemas rather than longer system prompts; budgets need stall detection; tool gates should be tiered by risk reversibility; and full execution traces must be treated as the primary unit of debugging. According to Niessen, harness quality alone can swing token consumption by 10x to 50x on the exact same task.&lt;/p&gt;
&lt;h2 id="how-big-is-a-git-commit"&gt;&lt;a href="https://ratfactor.com/cards/git-commit-size" rel="noopener noreferrer"&gt;How big is a Git commit?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;How much disk space does a Git commit actually take? To find out, Dave Gauer measures the size of the &lt;code&gt;.git&lt;/code&gt; directory with &lt;code&gt;du -sb&lt;/code&gt; across a series of controlled scenarios, using only loose objects (no packfiles) to expose Git&amp;rsquo;s raw storage mechanics. A freshly initialized empty repository takes about 64 KB; committing 250 tiny files across 5 directories adds roughly 47 KB; a tiny edit to a single file inside that tree costs 17 KB, whereas making the exact same three-byte change in a repository containing only one file takes about 8.7 KB.&lt;/p&gt;
&lt;p&gt;The reason lies in Git&amp;rsquo;s object model: when you edit a file inside a subdirectory, Git writes four new zlib-compressed objects—the commit object itself, the updated blob holding the file&amp;rsquo;s full contents, a new tree object for the subdirectory listing all its entries, and a new root tree object. Even for a three-byte edit, that metadata and object overhead adds up to kilobytes and scales with directory depth and breadth. On larger files, zlib compression shines: a 580 KB binary shrinks to 298 KB, and a 16.4 MB source code file compresses down to 1.6 MB—about 10% of its original size. Across these large-file tests, &lt;code&gt;.git&lt;/code&gt; grows by roughly 10–50% of the raw data size depending on content compressibility. Gauer concludes that Git&amp;rsquo;s loose object storage is already remarkably frugal—especially for text—and packfiles make it dramatically smaller still by delta-compressing similar objects.&lt;/p&gt;
&lt;h2 id="how-i-find-problems-to-solve-as-a-staff-engineer"&gt;&lt;a href="https://lalitm.com/post/find-problems-staff-engineer/" rel="noopener noreferrer"&gt;How I Find Problems to Solve as a Staff Engineer&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Lalit Maganti shares how he discovers high-leverage problems to solve as a Staff Engineer. Instead of blocking off calendar time to &amp;ldquo;think strategically,&amp;rdquo; he acts like a sponge: soaking up the daily ambient noise of meetings, chat channels, and email threads to absorb the friction people are experiencing. When something touches his domain, he digs past the surface request to uncover the underlying problem—sometimes sitting with teams to watch their workflow firsthand or debugging an issue himself to separate the real need from the solution the team asked for. He also deliberately resists jumping on the first request that comes in, since the loudest team doesn&amp;rsquo;t necessarily represent org-wide priorities; when the same pain point surfaces independently across multiple teams, that&amp;rsquo;s a strong signal.&lt;/p&gt;
&lt;p&gt;Long walks help him connect the dots across accumulated observations. On Perfetto, teams spent two years requesting disparate UI features—pinned tracks, custom zoom levels, bespoke aggregations—before he realized the underlying need was a general UI extensibility plugin system. Before committing engineering resources, he validates ideas with throwaway prototypes and socializes them with managers and partner teams. Solving the right problems builds trust that gets him invited into conversations earlier, letting him shape the roadmap without having to build everything himself—an approach he notes works best in bottom-up engineering cultures.&lt;/p&gt;
&lt;h2 id="golang-maps-how-swiss-tables-replaced-the-old-bucket-design"&gt;&lt;a href="https://blog.gaborkoos.com/posts/2026-07-24-Golang-Maps-How-Swiss-Tables-Replaced-the-Old-Bucket-Design/" rel="noopener noreferrer"&gt;Golang Maps: How Swiss Tables Replaced the Old Bucket Design&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Maps sit on the hot path of almost every Go program, and Go 1.24 replaced their internal implementation with Swiss Tables. The classic design used an array of buckets, each holding up to 8 key-value pairs plus metadata bytes; when a bucket filled up, the runtime allocated an overflow bucket and chained it via a pointer. While battle-tested, overflow chains forced lookups to chase pointers across non-contiguous memory, causing CPU cache misses, and capped the maximum load factor at roughly 81% before collision overhead degraded performance.&lt;/p&gt;
&lt;p&gt;Swiss Tables split each key&amp;rsquo;s hash into two parts: a prefix that selects the group, and a 7-bit fingerprint stored in a compact control byte array. Data is organized into 8-slot groups consisting of an 8-byte control word alongside key and value slots; during a lookup, the runtime scans all 8 control bytes in parallel using SIMD or bitwise operations, performs full key comparisons only on slots whose 7-bit fingerprint matches, and stops immediately if an empty slot is present. Most non-matching slots are filtered out at the cheap metadata stage, flat probing improves cache locality, and the max load factor rises to 87.5%. Rather than resizing one giant table all at once, Go uses an extendable hashing directory over multiple smaller tables so growth happens incrementally while preserving Go&amp;rsquo;s &lt;code&gt;range&lt;/code&gt; iteration semantics. Benchmarks show 2–3% overall CPU wins and 30–35% speedups on large map operations, with the trade-off that delete-heavy workloads leave tombstones that lengthen probe sequences until a table rehash clears them.&lt;/p&gt;
&lt;h2 id="the-new-rules-of-context-engineering-for-claude-5-models"&gt;&lt;a href="https://x.com/trq212/status/2080710971228918066" rel="noopener noreferrer"&gt;The new rules of context engineering for Claude 5 models&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;When you send a prompt to Claude, your message is only a small fraction of the context window it actually sees; the bulk is assembled from system prompts, skills, &lt;code&gt;CLAUDE.md&lt;/code&gt; files, memory, and tool definitions—and designing that assembly is context engineering. In this post, Anthropic engineer Thariq Shihipar reveals that the team deleted over 80% of Claude Code&amp;rsquo;s system prompt for frontier models like Claude Opus 5 and Claude Fable 5 without losing a single point on their coding evaluations. The reason is that earlier prompts over-constrained the model: within a single request, the system prompt, a skill, and the user&amp;rsquo;s &lt;code&gt;CLAUDE.md&lt;/code&gt; might give conflicting instructions—such as &amp;ldquo;write documentation where appropriate&amp;rdquo; alongside &amp;ldquo;DO NOT add comments&amp;rdquo;—forcing the model to waste reasoning tokens reconciling rules that newer models can navigate using their own judgment.&lt;/p&gt;
&lt;p&gt;The post contrasts old habits with the new playbook. Instead of rigid rules, trust the model&amp;rsquo;s judgment; the new instruction simply says &amp;ldquo;write code that matches the surrounding codebase.&amp;rdquo; Instead of stuffing few-shot tool examples into the prompt—which narrows exploration—design more expressive, self-documenting tool parameter schemas. Instead of front-loading everything into the initial context, use progressive disclosure: verification and code-review instructions are broken out into on-demand skills, and specialized tools are loaded lazily when needed. Memory is now captured automatically, and reference material can live as rich HTML artifacts or executable test suites rather than flat markdown files. Keep &lt;code&gt;CLAUDE.md&lt;/code&gt; lean, reserving it for non-obvious repo gotchas rather than facts Claude can discover by reading the code.&lt;/p&gt;
&lt;h2 id="the-git-history-command-deserves-more-attention"&gt;&lt;a href="https://lalitm.com/post/git-history/" rel="noopener noreferrer"&gt;The git history command deserves more attention&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Juggling multiple stacked changes in Git usually means tedious branch hopping and error-prone interactive rebases, which is why tools like &lt;code&gt;jj&lt;/code&gt; (Jujutsu) have gained a devoted following. Lalit Maganti argues that Git&amp;rsquo;s experimental &lt;code&gt;git history&lt;/code&gt; command—introduced across Git 2.54 (April 2026, adding &lt;code&gt;reword&lt;/code&gt; and &lt;code&gt;split&lt;/code&gt;) and Git 2.55 (June 2026, adding &lt;code&gt;fixup&lt;/code&gt;)—brings many of those same ergonomic benefits straight into stock Git without requiring a workflow overhaul, yet has flown largely under the radar. With &lt;code&gt;fixup&lt;/code&gt;, you stage changes via &lt;code&gt;git add&lt;/code&gt; and run &lt;code&gt;git history fixup &amp;lt;commit&amp;gt;&lt;/code&gt; to fold them directly into an earlier commit; every descendant local branch stacked on top of that commit is automatically rebased in place, going well beyond &lt;code&gt;git rebase --update-refs&lt;/code&gt;. Meanwhile, &lt;code&gt;reword&lt;/code&gt; opens your editor to amend an old commit message and automatically rebases the entire stack of descendant commits and branches, and &lt;code&gt;split&lt;/code&gt; interactively carves a commit into two.&lt;/p&gt;
&lt;p&gt;What unites all three subcommands is atomicity: they never drop your repository into a half-broken interactive rebase state, because they immediately abort any operation that would produce a merge conflict. That is also their biggest limitation compared to &lt;code&gt;jj&lt;/code&gt;, which treats conflicts as first-class objects you can resolve whenever you like; additionally, &lt;code&gt;fixup&lt;/code&gt; cannot cross merge commits, and Git still lacks &lt;code&gt;jj&lt;/code&gt;&amp;rsquo;s operation log for effortless undo. Git&amp;rsquo;s documentation notes that the conflict restriction may be lifted in future releases, but even today &lt;code&gt;git history&lt;/code&gt; is a major quality-of-life leap built right into standard Git.&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 #129</title><link>https://miti99.com/en/post/2026/09/07/</link><pubDate>Mon, 07 Sep 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/09/07/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #129.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="hacking-the-method-name"&gt;&lt;a href="https://maxxedev.github.io/2026/08/05/hacking-the-method-name.html" rel="noopener noreferrer"&gt;Hacking the Method Name&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In Java, when you need a property name as a string—for parsing CSVs, mapping query results, or calling REST APIs—you usually hardcode &lt;code&gt;&amp;quot;title&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;author&amp;quot;&lt;/code&gt; directly into the source, which is prone to typos and invisible to the compiler. This post demonstrates a technique to extract method names directly from method references, such as &lt;code&gt;nameOf(Book::title)&lt;/code&gt;, keeping names refactoring-safe and in sync with your code. The trick relies on &lt;code&gt;SerializedLambda&lt;/code&gt;, introduced in Java 8: the author defines a &lt;code&gt;Getter&amp;lt;T, R&amp;gt;&lt;/code&gt; functional interface that extends both &lt;code&gt;Function&lt;/code&gt; and &lt;code&gt;Serializable&lt;/code&gt;, so when the JVM serializes a method reference of that type, it replaces it with a &lt;code&gt;SerializedLambda&lt;/code&gt; instance containing metadata about the target method. A custom &lt;code&gt;ObjectOutputStream&lt;/code&gt; enables &lt;code&gt;enableReplaceObject(true)&lt;/code&gt;, writes to a no-op stream, overrides &lt;code&gt;replaceObject()&lt;/code&gt; to intercept the replacement object, and reads the method name via &lt;code&gt;getImplMethodName()&lt;/code&gt;. From &lt;code&gt;nameOf()&lt;/code&gt;, it&amp;rsquo;s trivial to build &lt;code&gt;beanNameOf()&lt;/code&gt; to strip the &lt;code&gt;get&lt;/code&gt; prefix.&lt;/p&gt;
&lt;p&gt;The catch is that this stays clean only for zero-argument getters. Supporting multi-parameter methods like &lt;code&gt;save(title, author)&lt;/code&gt; requires manually declaring serializable interfaces like &lt;code&gt;Function2&lt;/code&gt; and &lt;code&gt;Function3&lt;/code&gt; along with corresponding &lt;code&gt;nameOf()&lt;/code&gt; overloads, which gets repetitive fast. To solve that, the author introduces the &lt;code&gt;safety-mirror&lt;/code&gt; library, which handles all the boilerplate out of the box and returns full &lt;code&gt;java.lang.reflect.Method&lt;/code&gt; objects rather than just method name strings.&lt;/p&gt;
&lt;h2 id="control-the-ideas-not-the-code"&gt;&lt;a href="https://antirez.com/news/169" rel="noopener noreferrer"&gt;Control the ideas, not the code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Redis creator antirez argues that in the age of LLMs, programmers should focus on controlling the ideas and design of their software rather than reading every single line of AI-generated code—though that doesn&amp;rsquo;t mean barking &amp;ldquo;build me a product&amp;rdquo; and walking away. He offers three reasons: the sheer volume of code generated daily is too large to review meaningfully (who can earnestly review 5,000 lines a day?); LLMs excel at writing locally optimal code but are weaker at big-picture architecture, so discussing and evaluating design with the model is much higher leverage than inspecting every function; and with only eight hours in a workday, reading code steals time from what matters most—steering the project, conceiving features, finding optimization angles, and testing. His fully AI-written project DwarfStar showed that you still need a deep understanding of how everything works and the taste to pick the right design.&lt;/p&gt;
&lt;p&gt;For Redis, he still reviews AI-generated code out of respect for human maintainers who will edit it by hand, while admitting the ritual feels largely pointless; given free rein, he would spend that time testing and having the LLM maintain a &lt;code&gt;DESIGN.md&lt;/code&gt; file describing the ideas and design of each data structure in plain English. For younger developers who haven&amp;rsquo;t yet built strong mental models, however, he advises writing programs from scratch—such as an interpreter, a small database, or a hash table—by hand.&lt;/p&gt;
&lt;h2 id="good-tools-are-invisible"&gt;&lt;a href="https://www.gingerbill.org/article/2026/07/10/good-tools-are-invisible/" rel="noopener noreferrer"&gt;Good Tools Are Invisible&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Odin creator gingerBill argues that a good tool should be &amp;ldquo;invisible&amp;rdquo;: once mastered, it fades into the background so you only think about the task at hand. He pushes back against the habit of turning a tool&amp;rsquo;s shortcomings into &amp;ldquo;fun puzzles&amp;rdquo; and citing them as proof of the tool&amp;rsquo;s superiority. Take Vim: someone proudly recounts crafting a clever macro for a one-off text edit that gingerBill finished in under a minute using multiple cursors in Sublime Text. Such rationalizations take root when a tool becomes part of someone&amp;rsquo;s personal identity—admitting the tool is flawed feels like admitting a personal flaw. He also distinguishes &lt;em&gt;feeling&lt;/em&gt; productive from &lt;em&gt;being&lt;/em&gt; productive: the honest metric is actual time spent and errors made, not how clever you felt along the way.&lt;/p&gt;
&lt;p&gt;He extends the argument to several perennial debates. If a GUI is hard to navigate by keyboard, that&amp;rsquo;s because its creators didn&amp;rsquo;t implement good keyboard navigation, not because GUIs are inherently mouse-bound; mistaking the current limitations of a tool category for its essence is a common fallacy. Similarly, the culture of endless configuration is part of why desktop Linux hasn&amp;rsquo;t gone mainstream: shipping sensible defaults is the toolmaker&amp;rsquo;s responsibility and a sign of respect for the user&amp;rsquo;s time. A steep learning curve is a cost, not a badge of honor. His takeaway: use whatever tool you like, as long as it disappears from your conscious awareness while you work.&lt;/p&gt;
&lt;h2 id="mysteries-of-telegram-dc"&gt;&lt;a href="https://dev.moe/en/3025" rel="noopener noreferrer"&gt;Mysteries of Telegram DC&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Coxxs investigates Telegram&amp;rsquo;s five data centers (DC1–DC5): DC1 and DC3 in Miami, DC2 and DC4 in Amsterdam, and DC5 in Singapore. Every account is assigned to a home DC upon registration based on phone number prefix, never changes with travel or number changes, and cannot be chosen manually. A popular statistics bot once reported zero users in DC2 and DC3, sparking rumors that they were merely auxiliary or slave DCs. Testing all three common DC-detection methods on a fresh DC2 account—calling &lt;code&gt;auth.sendCode&lt;/code&gt; over MTProto to read the &lt;code&gt;PHONE_MIGRATE_2&lt;/code&gt; error, inspecting the &lt;code&gt;dc_id&lt;/code&gt; field in profile photo metadata, and parsing Web CDN domains—reveals the culprit. The third method fails because DC2 and DC3 &amp;ldquo;borrow&amp;rdquo; the Web CDN domains of co-located DC4 and DC1, causing every DC2 user to be misclassified as DC4—the exact bug in that statistics bot.&lt;/p&gt;
&lt;p&gt;The investigation concludes that DC1, DC2, DC4, and DC5 are actively assigned by phone country code at sign-up (for instance, Germany&amp;rsquo;s +49 maps to DC2) and all host large user populations. DC3, by contrast, is alive but practically empty: the author found only two DC3 accounts in the wild, and their older profile photos on DC3 alongside newer ones on DC1 suggest accounts were migrated from DC3 to DC1 around 2020. Probing over 10,000 phone numbers worldwide via the login flow confirmed that DC3 no longer accepts new registrations. The post includes a country-code-to-DC lookup table, while noting that many conclusions remain informed speculation since Telegram&amp;rsquo;s server code is closed-source.&lt;/p&gt;
&lt;h2 id="how-i-use-htmx-with-go"&gt;&lt;a href="https://www.alexedwards.net/blog/how-i-use-htmx-with-go" rel="noopener noreferrer"&gt;How I use HTMX with Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alex Edwards walks through how he pairs HTMX with Go to add snappy, app-like interactivity with minimal JavaScript while keeping the consistency and safety of server-side HTML rendering via &lt;code&gt;html/template&lt;/code&gt;, illustrated through a small app that filters a user list in real time. The template directory is organized into &lt;code&gt;base.tmpl&lt;/code&gt; for the shared layout, &lt;code&gt;pages/&lt;/code&gt; for individual page content, and &lt;code&gt;partials/&lt;/code&gt; for reusable HTML fragments, all embedded into the binary alongside static assets via &lt;code&gt;//go:embed&lt;/code&gt;. At the heart of the setup is an &lt;code&gt;htmlRenderer&lt;/code&gt; type: it parses the shared templates (base and all partials) once at startup, and its &lt;code&gt;render()&lt;/code&gt; method clones that template set, adds the specific page template, and executes the named template block. By extracting the table rows into a named &lt;code&gt;users:rows&lt;/code&gt; template block, the exact same template file can render either a full HTML page or just the partial fragment for HTMX to swap in.&lt;/p&gt;
&lt;p&gt;The server detects HTMX requests via the &lt;code&gt;HX-Request: true&lt;/code&gt; header and always sets &lt;code&gt;Vary: HX-Request&lt;/code&gt; so intermediate caches don&amp;rsquo;t serve fragments as full pages. To keep the browser&amp;rsquo;s back button working properly, &lt;code&gt;historyRestoreAsHxRequest&lt;/code&gt; must be set to &lt;code&gt;false&lt;/code&gt;; otherwise, navigating back fetches a bare HTML fragment instead of a full page. Redirects can&amp;rsquo;t use standard &lt;code&gt;3xx&lt;/code&gt; responses because &lt;code&gt;fetch()&lt;/code&gt; follows them transparently before HTMX can intervene; instead, the server returns a &lt;code&gt;2xx&lt;/code&gt; status with an &lt;code&gt;HX-Redirect&lt;/code&gt; header for HTMX requests while keeping standard &lt;code&gt;3xx&lt;/code&gt; redirects for normal requests. Finally, configuring &lt;code&gt;responseHandling&lt;/code&gt; lets &lt;code&gt;4xx&lt;/code&gt;/&lt;code&gt;5xx&lt;/code&gt; error pages replace the full document while still allowing &lt;code&gt;422&lt;/code&gt; validation errors to swap into their target form container.&lt;/p&gt;
&lt;h2 id="quadrupling-code-performance-with-a"&gt;&lt;a href="https://purplesyringa.moe/blog/quadrupling-code-performance-with-a-useless-if/" rel="noopener noreferrer"&gt;Quadrupling code performance with a &amp;ldquo;useless&amp;rdquo; if&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;purplesyringa recounts optimizing a specialized string compressor whose hot loop for backtracking the optimal encoding path consisted of a single assignment, &lt;code&gt;j = next_j[i][j]&lt;/code&gt;, compiling down to a single &lt;code&gt;mov&lt;/code&gt; instruction that looked impossible to speed up. The catch is that modern CPUs rely on instruction-level parallelism to execute multiple instructions across loop iterations simultaneously, but they cannot overlap instructions that have data dependencies on one another. Because each iteration needed the &lt;code&gt;j&lt;/code&gt; produced by the previous iteration, execution was bottlenecked by memory latency rather than throughput. Noticing that with small block counts &lt;code&gt;next_j[i][j]&lt;/code&gt; usually equals &lt;code&gt;j&lt;/code&gt; itself, the author exploited branch prediction by wrapping the assignment in &lt;code&gt;if (j != next_j[i][j])&lt;/code&gt;. When the CPU predicts the branch is not taken, the cross-iteration dependency vanishes and speculative execution races ahead; on the rare occasion &lt;code&gt;j&lt;/code&gt; actually changes, branch misprediction recovery flushes the speculative work and resumes with the updated value.&lt;/p&gt;
&lt;p&gt;The hurdle was getting the compiler to emit the branch at all, since &lt;code&gt;if (j != x) j = x;&lt;/code&gt; is a dead-code no-op that optimizers immediately strip out. The author had to cast through a &lt;code&gt;volatile&lt;/code&gt; pointer to make the condition and assignment appear independent to the compiler; readers later pointed out that &lt;code&gt;[[unlikely]]&lt;/code&gt; or &lt;code&gt;__builtin_expect&lt;/code&gt; achieves a similar effect in LLVM, though &lt;code&gt;volatile&lt;/code&gt; produced tighter assembly and worked in GCC as well. The result was a 4x speedup on synthetic benchmarks (dropping from 320 to 80 microseconds) and roughly a 2x speedup in real-world workloads.&lt;/p&gt;
&lt;h2 id="reverse-engineering-chatgpt-web-how-openai-built-for-a-billion-users"&gt;&lt;a href="https://performance.dev/chatgpt" rel="noopener noreferrer"&gt;Reverse Engineering ChatGPT Web: How OpenAI Built for a Billion Users&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dennis Brotzky reverse-engineers the frontend web architecture of ChatGPT, which serves roughly a billion users. What stands out first is how &amp;ldquo;boring&amp;rdquo; the stack is: React 19 with React Router 7, TanStack Query, Tailwind CSS, and Radix UI, with almost no bespoke framework magic. Launched in November 2022 on Next.js, the app migrated to Remix in 2024 and followed Remix&amp;rsquo;s merger into React Router 7. To serve users quickly on every device, the site uses streaming server-side rendering with Suspense boundaries: the logged-out HTML document weighs just 84 KB compressed with a 50–65 ms TTFB, and 556 feature gates, 144 dynamic configs, and 192 experiments are pre-evaluated on the server and embedded straight into the initial payload. It skips custom web fonts in favor of system fonts, splits CSS by feature, and orchestrates its 160 content-hashed startup chunks around a single north-star question: can the user type into the composer yet?—complete with a dedicated &lt;code&gt;deferStartupImportsUntilComposerTTFI&lt;/code&gt; flag.&lt;/p&gt;
&lt;p&gt;The heavy engineering is concentrated where users spend their time: the prompt composer is a ProseMirror editor, code blocks use CodeMirror, and math rendering uses KaTeX paired with a hidden MathML tree for screen readers. Under the hood, Cloudflare proof-of-work challenges and OpenAI&amp;rsquo;s Sentinel anti-abuse system run silently at page load, while logged-out visitors still receive real anonymous identifiers to enforce rate limits without forcing a login wall. Above all, the team instruments time-to-interactive for every user: if you can&amp;rsquo;t measure it, you can&amp;rsquo;t improve it.&lt;/p&gt;
&lt;h2 id="broker-visible-vs-client-local-parallelism"&gt;&lt;a href="https://jack-vanlightly.com/blog/2026/6/3/broker-visible-vs-client-local-parallelism" rel="noopener noreferrer"&gt;Broker-Visible vs Client-Local Parallelism&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In a side note to his series on Kafka Share Groups, Jack Vanlightly reminds readers that share groups were designed to bring queue semantics to a log, not primarily to scale out consumption parallelism. The deeper architectural question is where the unit of parallelism lives. If the consumer instance itself is the unit of parallelism, every unit is visible to the broker as protocol interactions, state to track, and one or more TCP connections. If parallelism happens inside the client application—via virtual threads, async tasks, or OS threads—the broker is completely oblivious to it, requiring far fewer consumers, connections, and broker-side state. This trade-off applies across all messaging systems, not just Kafka.&lt;/p&gt;
&lt;p&gt;To size parallelism, Vanlightly uses Little&amp;rsquo;s Law: required concurrency equals message arrival rate multiplied by average processing duration. Processing 60,000 messages per second when each message takes one second requires 60,000 messages in flight at once; if each unit is a single-threaded consumer, you need 60,000 consumers, and if processing takes ten seconds, that balloons to 600,000 consumers and over a million TCP connections. If the workload is mostly I/O-bound and each client instance can process 1,000 messages concurrently on virtual threads, you only need 60 consumers. Managing virtual threads in user space is orders of magnitude cheaper than managing TCP connections and broker metadata per concurrency unit; the trade-off is higher client-side complexity, though modern client libraries increasingly handle that plumbing for you.&lt;/p&gt;
&lt;h2 id="work-loudly"&gt;&lt;a href="https://ben.balter.com/2026/07/14/work-loudly/" rel="noopener noreferrer"&gt;Work Loudly&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ben Balter observes that in a physical office, a baseline level of visibility comes for free: coworkers see you sketching at a whiteboard or helping a teammate debug over coffee. In remote work, that ambient signal drops to zero; your work doesn&amp;rsquo;t become less valuable, just less visible—to the point where even a supportive manager may struggle to articulate what you accomplished come performance review time. Writing a summary after the fact doesn&amp;rsquo;t fix it either, because the most valuable part—your reasoning, trade-offs, and dead ends—has already vanished. The solution is to &amp;ldquo;work loudly&amp;rdquo;: make your work visible while it is happening by opening an issue before writing code, writing PR descriptions that explain the &lt;em&gt;why&lt;/em&gt; behind your approach, sharing 40%-done drafts, and asking questions in public channels rather than DMs. If it only exists in your head or in private messages, it isn&amp;rsquo;t loud enough.&lt;/p&gt;
&lt;p&gt;Balter compares working loudly to wearing a bear bell on a hike: you don&amp;rsquo;t ring it to show off, you ring it so nobody gets startled—because stakeholders who discover a decision only after it ships tend to react defensively. Early visibility also invites teammates to catch bugs early, point out existing solutions, and rally around hard problems; for managers, it enables evaluating people by their actual artifacts rather than performative online presence. The ultimate litmus test: could your manager write your performance review solely from the public trail of artifacts you left behind?&lt;/p&gt;
&lt;h2 id="building-service-topology-at-scale-architecture-challenges-and-lessons-learned"&gt;&lt;a href="https://netflixtechblog.com/building-service-topology-at-scale-architecture-challenges-and-lessons-learned-f4b792f3f0d8" rel="noopener noreferrer"&gt;Building Service Topology at Scale: Architecture, Challenges, and Lessons Learned&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The Netflix engineering team shares how they built Service Topology, a near-real-time dependency map across Netflix microservices designed to speed up debugging and blast-radius analysis during incidents. They chose stream processing over batch because an hour-old dependency map at 3 a.m. is &amp;ldquo;archaeology,&amp;rdquo; using reactive streams backpressure so that whenever downstream stages slow down, the signal propagates all the way back to the Kafka consumer, buffering data safely in Kafka rather than dropping it. Because raw network flow logs only capture individual hops like App A → Load Balancer → App B, the pipeline runs in three stages: stage one filters and aggregates flows over five-minute windows; stage two repartitions events so hops traversing the same intermediate component land on the same node and stitch together into a direct App A → App B edge; and stage three enriches edges with metadata and writes them to a graph database. Stages communicate over Server-Sent Events instead of CPU-heavy gRPC, using consistent hashing to rebalance automatically as cluster nodes scale.&lt;/p&gt;
&lt;p&gt;The most valuable lessons came from production pain: Kafka consumers falling hours behind, hot nodes receiving 100x the traffic of peers, and garbage collection burning more CPU than business logic—forcing the team to adopt mutable data structures on the hot path against standard Scala idioms. Their takeaway: scale changes everything, fixing one bottleneck immediately exposes the next, and &amp;ldquo;best practices&amp;rdquo; are only a starting point.&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_!lpxK!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff9fb99a2-ec71-476d-a9cb-6c1a43339d90_2484x3002.png" alt="MCP vs A2A vs ACP: How AI Agents Actually Talk to Each Other"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!LZtJ!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6456348c-5d92-4524-8dd6-d75b4dc7feaf_1280x1547.png" alt="LLM vs RAG vs Agent evals"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!ULeT!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81b4572-820e-4790-8861-8efe14f38700_2252x2752.png" alt="How Distributed Tracing Works at the High Level?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!6UyI!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f8ea7bf-2170-4466-92f3-edd7eab11de4_3000x3900.png" alt="The Life of a Redis Query"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #124</title><link>https://miti99.com/en/post/2026/07/12/</link><pubDate>Sun, 12 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/12/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #124.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="riding-technology-waves"&gt;&lt;a href="https://staysaasy.com/strategy/2026/06/22/riding-technology-waves.html" rel="noopener noreferrer"&gt;Riding Technology Waves&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Major technology waves—the internet, cloud computing, mobile, and now AI—arrive faster and hit harder with each cycle, minting massive new winners while wiping out incumbents, even as other hyped waves like 3D printing or VR fizzle out. To orient yourself early without getting swept up in empty hype, Stay SaaSy proposes answering four questions in order: does this technology actually matter (i.e., do real users get sustained value from it)?; how does it work under the hood, at a level you could explain clearly to a smart outsider?; what concrete new capabilities does it unlock, stated as plain facts rather than buzzwords?; and how do those capabilities affect your specific product, cost structure, or customers?&lt;/p&gt;
&lt;p&gt;The two classic failure modes sit at opposite extremes. Complacency leads companies to dismiss real signals as a fad, though that mistake usually forces its own correction once the wave becomes undeniable. Far more common in volatile times is FOMO-driven panic: leaders who don&amp;rsquo;t understand the technology chase the herd, betting the company on unvalidated use cases or blowing up a working roadmap to slap an &amp;ldquo;AI&amp;rdquo; label on the product while customers are asking for basic reliability. Blindly pivoting is the default strategic blunder during a hype cycle. Yet the worst mistake of all is missing an obvious wave and then letting ego keep you in denial; when that happens, leadership must admit the miss, take ownership, put their best people and real resources on catching up, and stay hands-on until the course is corrected.&lt;/p&gt;
&lt;h2 id="find-a-new-role"&gt;&lt;a href="https://larahogan.me/blog/identify-new-role/" rel="noopener noreferrer"&gt;Find a new role&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;When thinking about changing jobs or transitioning into a new role, Lara Hogan recommends filling out a 2×2 grid of four lists: your non-negotiable &amp;ldquo;Must Haves&amp;rdquo;; your &amp;ldquo;Want to Haves&amp;rdquo; that matter a lot, though you&amp;rsquo;d trade off one or two for the right opportunity; things that &amp;ldquo;Don&amp;rsquo;t Matter&amp;rdquo; to you right now, even if they mattered in the past or matter to peers; and a single crisp &amp;ldquo;Optimizing For&amp;rdquo; sentence stating the one thing you are prioritizing above everything else in this chapter. Putting those four boxes on paper turns a murky career decision into concrete criteria for sourcing roles, asking interview questions, and weighing offers.&lt;/p&gt;
&lt;p&gt;Hogan advises leaving job titles off every list entirely, since the same title can mean wildly different things across companies; evaluate the actual day-to-day scope and responsibilities instead. Keep the &amp;ldquo;Must Haves&amp;rdquo; box ruthlessly short: if you would still accept an offer missing a given item, it belongs in &amp;ldquo;Want to Haves,&amp;rdquo; and you will almost certainly have to compromise on at least one want-to-have. Anchor your criteria in what you need &lt;em&gt;today&lt;/em&gt; rather than what you wanted five years ago or might want in the distant future—sometimes top-of-market compensation gives way to great healthcare, or scope gives way to work-life balance. Your single &amp;ldquo;Optimizing For&amp;rdquo; statement is the sharpest tool of all: tape it next to your monitor, share it with trusted friends who can hold you accountable, and use it to ask which opportunity moves you closest to that specific goal. Re-run the exercise whenever your life circumstances shift.&lt;/p&gt;
&lt;h2 id="i-stored-a-website-in-a-favicon"&gt;&lt;a href="https://www.timwehrle.de/blog/i-stored-a-website-in-a-favicon" rel="noopener noreferrer"&gt;I Stored a Website in a Favicon&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After previously hiding two bytes of state inside a custom mouse cursor, Tim Wehrle decided to see if he could pack an entire web page inside a &lt;code&gt;favicon.ico&lt;/code&gt;/PNG image. The encoding is delightfully direct: a favicon is an image, an image is a grid of pixels, and each RGB pixel gives you three color channels—red, green, and blue—worth one byte each. Wehrle encodes an HTML snippet into UTF-8 bytes using &lt;code&gt;TextEncoder&lt;/code&gt;, prepends a 4-byte length header so the decoder knows exactly where the payload ends (ignoring any trailing padding pixels in the grid), and writes three bytes into each pixel&amp;rsquo;s RGB values. A 208-byte HTML payload plus the 4-byte header totals 212 bytes, fitting into 71 pixels inside a tiny 9×9 PNG at 87% capacity—producing an icon that looks like colorful static.&lt;/p&gt;
&lt;p&gt;To reconstruct the page, a tiny bootstrap page loads the favicon onto an HTML &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt;, reads back the pixel array via &lt;code&gt;getImageData()&lt;/code&gt;, extracts the RGB bytes up to the 4-byte length prefix, decodes the UTF-8 string with &lt;code&gt;TextDecoder&lt;/code&gt;, and replaces the current document with the recovered HTML. Crucially, a PNG favicon is inert data and cannot execute itself on its own—you still need that small loader script to unpack and render it. Wehrle readily admits the experiment has zero practical utility given the tiny storage budget and the existence of normal HTTP responses, but it is a fun reminder that every file format is ultimately just bytes that can be repurposed in unexpected ways. He closes by noting alternative steganographic tricks like embedding markup inside an SVG favicon, stuffing text into PNG &lt;code&gt;tEXt&lt;/code&gt; chunks, or packing multiple resolutions into an &lt;code&gt;.ico&lt;/code&gt; container.&lt;/p&gt;
&lt;h2 id="antipatterns-never-left-we-just-stopped-calling-them-by-name"&gt;&lt;a href="https://dev.to/leonpennings/antipatterns-never-left-we-just-stopped-calling-them-by-name-969" rel="noopener noreferrer"&gt;AntiPatterns Never Left, We Just Stopped Calling Them by Name&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Back in 1998, the book &lt;em&gt;AntiPatterns&lt;/em&gt; cataloged recurring software failure modes—giving each one a memorable name, symptoms, root causes, and a refactoring path out. Leon Pennings argues that those exact failure modes are still everywhere today; we just rebranded them as modern best practices and stopped recognizing them because the system still compiles and passes tests. Short-term delivery creates survivorship bias where teams assume their architectural choices succeeded, since nobody builds the simpler alternative alongside it for comparison. Industry popularity doesn&amp;rsquo;t prove an approach fits your context, and naming anti-patterns explicitly helps teams see water they&amp;rsquo;ve been swimming in for years.&lt;/p&gt;
&lt;p&gt;Pennings groups modern anti-patterns into four recurring themes. First is organizing code around technical layers (&lt;code&gt;controllers/&lt;/code&gt;, &lt;code&gt;services/&lt;/code&gt;, &lt;code&gt;repositories/&lt;/code&gt;) instead of business capabilities, scattering domain concepts across folders, producing anemic domain models, and coupling business logic tightly to frameworks. Second is cargo-culting Resume-Driven Development—reaching for Kubernetes or Kafka as a golden hammer regardless of scale. Third is when the cure recreates the disease: turning a monolithic Big Ball of Mud into a distributed microservices ball of mud where complexity simply moves across network boundaries, or standing up a platform team that becomes just another ticket-driven silo. Fourth is separating decision-makers from the consequences of their decisions, such as Scrum intermediaries insulating developers from real users. Sometimes writing fifty lines of plain code is far cheaper over five years than pulling in a massive dependency; the goal isn&amp;rsquo;t rejecting frameworks, microservices, or Scrum wholesale, but evaluating every trade-off against your actual problem.&lt;/p&gt;
&lt;h2 id="5-more-advanced-java-tips-that-senior-engineers-actually-use"&gt;&lt;a href="https://dev.to/cyclopt_dimitrisk/5-more-advanced-java-tips-that-senior-engineers-actually-use-bbp" rel="noopener noreferrer"&gt;5 More Advanced Java Tips That Senior Engineers Actually Use&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article walks through five modern Java capabilities, though it is worth noting upfront that they did not all land as final, stable APIs in Java 21: Record Patterns and Sequenced Collections were finalized in JDK 21, the Foreign Function and Memory (FFM) API was finalized in JDK 22, and Stream Gatherers became final in JDK 24, while Structured Concurrency remains a preview feature in the JDK 24 release referenced by the examples—so check your target JDK version before adopting. Structured Concurrency (&lt;code&gt;StructuredTaskScope&lt;/code&gt;) groups related concurrent subtasks into a single lexical lifetime: using a policy like &lt;code&gt;ShutdownOnFailure&lt;/code&gt;, if one subtask fails the remaining siblings are cancelled automatically (assuming they respect thread interruption), and once the &lt;code&gt;try-with-resources&lt;/code&gt; block exits no orphan threads are left running in the background—a major upgrade over manually juggling independent &lt;code&gt;CompletableFuture&lt;/code&gt; chains. Record Patterns let you destructure nested records directly inside &lt;code&gt;switch&lt;/code&gt; expressions; paired with &lt;code&gt;sealed&lt;/code&gt; interfaces, the compiler enforces exhaustiveness so adding a new subtype immediately flags every unhandled &lt;code&gt;switch&lt;/code&gt; at compile time.&lt;/p&gt;
&lt;p&gt;Sequenced Collections (&lt;code&gt;SequencedCollection&lt;/code&gt;, &lt;code&gt;SequencedSet&lt;/code&gt;, &lt;code&gt;SequencedMap&lt;/code&gt;) unify access to first/last elements and reverse-order iteration across ordered collections; calling &lt;code&gt;.reversed()&lt;/code&gt; returns a lightweight view rather than copying the underlying list, which is handy when scanning chronological event logs backward. The Foreign Function and Memory API (Project Panama) replaces brittle &lt;code&gt;sun.misc.Unsafe&lt;/code&gt; and JNI boilerplate with a pure-Java API for allocating off-heap memory and calling native C libraries, complete with bounds checking and deterministic deallocation via &lt;code&gt;Arena&lt;/code&gt; lifetimes (though the underlying native code itself must still be trusted). Finally, Stream Gatherers (&lt;code&gt;Stream::gather&lt;/code&gt;) fill a long-standing gap in the Stream API: just as &lt;code&gt;Collector&lt;/code&gt; lets you customize terminal operations, &lt;code&gt;Gatherer&lt;/code&gt; lets you write custom stateful intermediate operations—such as fixed batching, sliding windows, deduplicating adjacent elements, or running averages—while keeping pipelines readable.&lt;/p&gt;
&lt;h2 id="go"&gt;&lt;a href="https://dev.to/mihirmohapatra/gos-type-system-structs-interfaces-and-life-without-inheritance-2lb7" rel="noopener noreferrer"&gt;Go&amp;rsquo;s Type System — Structs, Interfaces, and Life Without Inheritance&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Coming to Go after six years of Java and Kotlin, Mihir Mohapatra reflects that the biggest mental shift in Go&amp;rsquo;s type system is the complete absence of class inheritance. A &lt;code&gt;struct&lt;/code&gt; holds only data fields—there are no constructors or &lt;code&gt;implements&lt;/code&gt; keywords; a factory function like &lt;code&gt;NewOrder&lt;/code&gt; is just a naming convention, and callers can still instantiate the zero-valued struct directly unless the type is unexported. Methods are declared separately with explicit value receivers (which operate on a copy) or pointer receivers (which can mutate the caller&amp;rsquo;s struct); reassigning a struct field requires a pointer receiver, though a value copy containing a &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;slice&lt;/code&gt;, or pointer still shares the underlying referenced storage. Instead of inheritance, Go uses struct embedding: fields and methods of an embedded inner struct are promoted to the outer struct, modeling a &amp;ldquo;has-a&amp;rdquo; composition relationship rather than an &amp;ldquo;is-a&amp;rdquo; subtype hierarchy.&lt;/p&gt;
&lt;p&gt;The biggest design departure is that Go interfaces are satisfied implicitly: any type that implements the required method signatures automatically satisfies the interface, even types from third-party packages you don&amp;rsquo;t control. That flips interface design on its head: instead of defining massive upfront contracts in a central package that every implementation must explicitly import and declare, Go interfaces are typically small—often one or two methods like &lt;code&gt;io.Reader&lt;/code&gt; and &lt;code&gt;io.Writer&lt;/code&gt;—and defined by the consumer right where the behavior is needed. Types stay decoupled and brittle base-class hierarchies disappear. Mohapatra also notes the trade-offs newcomers bump into: finding every type that satisfies an interface requires IDE tooling rather than grepping for &lt;code&gt;implements&lt;/code&gt;, struct embedding doesn&amp;rsquo;t give you subclass polymorphism, and Go&amp;rsquo;s zero values mean an uninitialized struct compiles cleanly and can look valid unless you validate required fields explicitly.&lt;/p&gt;
&lt;h2 id="conduit-the-gateway-i-built-to-forget-about"&gt;&lt;a href="https://dev.to/adamthedeveloper/conduit-the-gateway-i-built-to-forget-about-2ann" rel="noopener noreferrer"&gt;Conduit: The Gateway I Built to Forget About&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Adam built an internal Go API gateway sitting in front of three backend services with two authentication schemes: a custom HMAC-signed session token for end-user and chat routes, and JWTs for admin endpoints. While the Go proxy was fast and rock-solid, every new public-route exception or header tweak meant adding another &lt;code&gt;if&lt;/code&gt; branch in Go, recompiling, and redeploying the binary. Conduit solves this by splitting what rarely changes from what changes constantly: a core Go binary handles HTTP ingress, routing, reverse proxying, CORS, and SSRF protection, while an isolated Deno subprocess executes TypeScript policy modules for auth, logging, and request mutation—letting operators edit a &lt;code&gt;.ts&lt;/code&gt; file and reload policies without recompiling Go.&lt;/p&gt;
&lt;p&gt;The two processes communicate over a Unix domain socket using a strict snapshot-and-patch contract. Go sends a serializable JSON snapshot of the incoming request metadata; the TypeScript policy modules return only a minimal patch describing headers to add/remove or whether to short-circuit the request, rather than owning or mutating the live request object directly, while request bodies larger than 64 KiB stay inside Go and are referenced by handle ID. Failure modes are explicitly separated too: if an individual policy module times out, Conduit logs a warning and moves on, whereas if the entire Deno sidecar crashes, each route follows its configured failure policy—either failing closed with &lt;code&gt;503 Service Unavailable&lt;/code&gt; or failing open by proxying directly to the upstream. Simplicity comes from crisp responsibility boundaries rather than raw line count; Conduit isn&amp;rsquo;t trying to replace Envoy or Kong at massive scale, just stay out of the way in front of a handful of services whose edge policies evolve often.&lt;/p&gt;
&lt;h2 id="the-reflect-package"&gt;&lt;a href="https://internals-for-interns.com/posts/go-runtime-reflect" rel="noopener noreferrer"&gt;The Reflect Package&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Go compiles ahead of time to native machine code, yet the standard library&amp;rsquo;s &lt;code&gt;reflect&lt;/code&gt; package can inspect struct field names, types, and struct tags at runtime. This post dives into how the Go compiler embeds static type metadata inside the compiled binary so &lt;code&gt;reflect&lt;/code&gt; can read it (while noting that other &lt;code&gt;reflect&lt;/code&gt; APIs can still allocate or construct types dynamically at runtime). Under the hood, an empty interface value (&lt;code&gt;any&lt;/code&gt; / &lt;code&gt;interface{}&lt;/code&gt;) is a two-word struct holding two pointers: one pointing to the underlying data and one pointing to a runtime type descriptor (&lt;code&gt;abi.Type&lt;/code&gt;), whose address is a compile-time constant known to the linker. Calling &lt;code&gt;reflect.TypeOf&lt;/code&gt; therefore just reads that type pointer—no hash table lookup, no heap allocation.&lt;/p&gt;
&lt;p&gt;During compilation, the compiler&amp;rsquo;s &lt;code&gt;reflectdata&lt;/code&gt; pass serializes a descriptor for every needed type as a linker symbol named &lt;code&gt;type:&amp;lt;typename&amp;gt;&lt;/code&gt;, and the linker packs those symbols into a read-only data section of the binary—which is why running &lt;code&gt;strings&lt;/code&gt; on a Go executable reveals your struct tags in plain text. Every descriptor starts with a fixed 48-byte common header (&lt;code&gt;abi.Type&lt;/code&gt;) recording byte size, alignment, kind (&lt;code&gt;Struct&lt;/code&gt;, &lt;code&gt;Slice&lt;/code&gt;, &lt;code&gt;Int&lt;/code&gt;, etc.), type hash, garbage-collector pointer bitmap, equality function pointer, and name offset; immediately following that header in memory sit kind-specific fields—for a struct (&lt;code&gt;abi.StructType&lt;/code&gt;), a slice of &lt;code&gt;StructField&lt;/code&gt; entries holding each field&amp;rsquo;s name, type pointer, and byte offset within the struct, followed by method table metadata. Field names and tags are deduplicated in a shared read-only string pool to save binary size. When you use &lt;code&gt;reflect.Value&lt;/code&gt;, it pairs the type descriptor with the data pointer and adds the stored byte offset to jump straight to a field&amp;rsquo;s memory address. Reading works fine on a value copy, but mutating via reflection requires passing a pointer into &lt;code&gt;any&lt;/code&gt;—otherwise &lt;code&gt;reflect&lt;/code&gt; is only looking at a copy of your struct.&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 #120</title><link>https://miti99.com/en/post/2026/07/08/</link><pubDate>Wed, 08 Jul 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/07/08/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #120.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="lessons-from-building-claude-code-how-we-use-skills"&gt;&lt;a href="https://claude.com/blog/lessons-from-building-claude-code-how-we-use-skills" rel="noopener noreferrer"&gt;Lessons from building Claude Code: How we use skills&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Thariq Shihipar, a member of the Claude Code team at Anthropic, distills lessons learned from building and using hundreds of internal skills. The central insight is that a skill isn&amp;rsquo;t just a single Markdown file of instructions—it is an entire folder that can bundle scripts, assets, reference data, hooks, and configuration. This structure enables progressive disclosure: the agent reads &lt;code&gt;SKILL.md&lt;/code&gt; first and only loads auxiliary docs or helper scripts when the task actually needs them, keeping the context window lean. Shihipar groups skills into nine practical categories: library/API references, product verification, data analysis, workflow automation, code scaffolding, code review, CI/CD, operational runbooks, and infrastructure management.&lt;/p&gt;
&lt;p&gt;When authoring skills, he advises skipping generic advice Claude already knows and focusing on instructions that nudge the model out of its default habits—especially a living &amp;ldquo;gotchas&amp;rdquo; section capturing recurring pitfalls, repo conventions, and edge cases added whenever the agent makes a mistake in practice. State high-level goals rather than rigid step-by-step micromanagement, give the skill a persistence mechanism (like log or JSON files) to maintain state across sessions, and bundle composable helper scripts so the agent doesn&amp;rsquo;t have to reconstruct boilerplate operations from scratch via token generation. For larger teams, skills can be committed directly to the repo or distributed through an internal plugin marketplace so engineers install only what they need without bloating context, while hooks track usage metrics to prune overly broad or unused skills.&lt;/p&gt;
&lt;h2 id="bulkhead-pattern---go"&gt;&lt;a href="https://dev.to/kamal_namdeo/bulkhead-pattern-go-362c" rel="noopener noreferrer"&gt;Bulkhead Pattern - Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kamal Namdeo walks through implementing the Bulkhead Pattern in Go: isolating resources per downstream dependency so one slow or failing service cannot exhaust goroutines, sockets, and request budgets across your entire application. Instead of letting every outbound HTTP call share &lt;code&gt;http.DefaultTransport&lt;/code&gt;, each downstream dependency gets its own three-layer bulkhead: a semaphore capping concurrent in-flight requests (using &lt;code&gt;TryAcquire&lt;/code&gt; to fail fast when full), a dedicated connection pool via &lt;code&gt;MaxConnsPerHost&lt;/code&gt; so one slow host cannot starve TCP connections to others, and tight timeouts that free resources quickly when an upstream stalls. That way, if the auth service is degraded, billing and S3 calls continue unaffected.&lt;/p&gt;
&lt;p&gt;The post also shows how to size concurrency limits. Little&amp;rsquo;s Law relates average concurrency to throughput and average latency; plugging in p99 latency plus a 30% safety buffer is the author&amp;rsquo;s practical sizing heuristic rather than the law itself, showing why slower dependencies require more slots to sustain the same throughput. Blast radius during outages is contained through layered timeouts: &lt;code&gt;ResponseHeaderTimeout&lt;/code&gt; (roughly 1.2x p99), &lt;code&gt;Client.Timeout&lt;/code&gt; covering the full request lifecycle, a 1–2 second TCP dial/TLS handshake timeout, and a &lt;code&gt;QueueTimeout&lt;/code&gt; derived by subtracting downstream latency from your SLA budget. Namdeo closes with common Go pitfalls: &lt;code&gt;runtime.NumCPU()&lt;/code&gt; is the wrong basis for sizing I/O concurrency because goroutines blocked on network reads don&amp;rsquo;t consume CPU cores, response bodies must be drained before closing so connections can return to the idle pool, and &lt;code&gt;MaxIdleConns&lt;/code&gt; should equal the sum of per-host idle limits so dependencies don&amp;rsquo;t evict each other&amp;rsquo;s pooled connections.&lt;/p&gt;
&lt;h2 id="max-consecutive-ones"&gt;&lt;a href="https://dev.to/jaspreet_singh_86ae1740ac/max-consecutive-ones-13mj" rel="noopener noreferrer"&gt;Max Consecutive Ones&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jaspreet Singh breaks down a foundational LeetCode problem in Java: given a binary array, find the maximum number of consecutive &lt;code&gt;1&lt;/code&gt;s. The brute-force approach starts at every index containing a &lt;code&gt;1&lt;/code&gt;, scans forward to count the streak, and updates the global maximum. While easy to explain in an interview, it repeatedly re-scans the same elements, resulting in &lt;code&gt;O(N²)&lt;/code&gt; time complexity with &lt;code&gt;O(1)&lt;/code&gt; auxiliary space.&lt;/p&gt;
&lt;p&gt;The optimal solution rests on a simple observation: a streak of &lt;code&gt;1&lt;/code&gt;s grows as long as we keep seeing &lt;code&gt;1&lt;/code&gt; and resets the moment we hit a &lt;code&gt;0&lt;/code&gt;, meaning we only ever need to track the length of the current streak. By maintaining two scalar variables—current streak length and maximum streak seen so far—we increment the counter and update the max on &lt;code&gt;1&lt;/code&gt;, and reset the counter to &lt;code&gt;0&lt;/code&gt; on &lt;code&gt;0&lt;/code&gt;. That single pass runs in &lt;code&gt;O(N)&lt;/code&gt; time and &lt;code&gt;O(1)&lt;/code&gt; space without nested loops. Recognizing this &amp;ldquo;maintain running state, update global best, reset when the invariant breaks&amp;rdquo; pattern makes short work of many contiguous-subarray interview questions.&lt;/p&gt;
&lt;h2 id="double-bigdecimal-or-fixed-point"&gt;&lt;a href="https://blog.frankel.ch/bigdecimal-vs-double/" rel="noopener noreferrer"&gt;double, BigDecimal, or Fixed-Point?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stefano Fago pushes back against blanket slogans like &amp;ldquo;always use &lt;code&gt;BigDecimal&lt;/code&gt; for money&amp;rdquo; or &amp;ldquo;&lt;code&gt;double&lt;/code&gt; is broken.&amp;rdquo; Under IEEE 754, &lt;code&gt;double&lt;/code&gt; is a binary floating-point approximation, meaning base-10 fractions like &lt;code&gt;0.1&lt;/code&gt; cannot be represented exact to the last bit—but that is a deliberate engineering trade-off. For domains that are inherently approximate, such as analytics, machine learning, or physics simulations, &lt;code&gt;double&lt;/code&gt; is usually the right choice because it runs directly in hardware at blistering speed; you simply need to compare values using an epsilon tolerance instead of &lt;code&gt;==&lt;/code&gt;, handle &lt;code&gt;NaN&lt;/code&gt; and &lt;code&gt;-0.0&lt;/code&gt; properly, and reach for techniques like Kahan or Neumaier summation, pairwise summation, or &lt;code&gt;Math.fma()&lt;/code&gt; when minimizing accumulated rounding error.&lt;/p&gt;
&lt;p&gt;Conversely, &lt;code&gt;BigDecimal&lt;/code&gt; shines when exact decimal representation, explicit rounding modes, and auditability are mandatory—such as tax calculation, invoicing, and accounting—at the cost of heap allocations and software arbitrary-precision arithmetic. It also has its own footguns: calling &lt;code&gt;new BigDecimal(0.1)&lt;/code&gt; bakes in the binary float inaccuracy (always use &lt;code&gt;new BigDecimal(&amp;quot;0.1&amp;quot;)&lt;/code&gt; or &lt;code&gt;BigDecimal.valueOf(0.1)&lt;/code&gt;), forgetting to reassign results on immutable instances, or calling &lt;code&gt;equals()&lt;/code&gt;—which compares scale (&lt;code&gt;2.0&lt;/code&gt; != &lt;code&gt;2.00&lt;/code&gt;)—instead of &lt;code&gt;compareTo()&lt;/code&gt;. For high-throughput financial engines, fixed-point arithmetic using &lt;code&gt;long&lt;/code&gt; is often the pragmatic sweet spot: store &lt;code&gt;$19.99&lt;/code&gt; as &lt;code&gt;1999&lt;/code&gt; cents, use &lt;code&gt;Math.addExact&lt;/code&gt; and &lt;code&gt;multiplyExact&lt;/code&gt; to catch overflows immediately, and convert to &lt;code&gt;BigDecimal&lt;/code&gt; only at system boundaries. Fago also warns about losing trailing scale during JSON serialization and non-reproducible sums in parallel &lt;code&gt;DoubleStream&lt;/code&gt; pipelines. Choose numeric types based on domain precision rules, rounding semantics, and performance constraints—not slogans.&lt;/p&gt;
&lt;h2 id="can-java-microservices-be-as-fast-as-go-a-2026-benchmark-update"&gt;&lt;a href="https://medium.com/helidon/can-java-microservices-be-as-fast-as-go-a-2026-benchmark-update-e16a2e262fc4" rel="noopener noreferrer"&gt;Can Java Microservices Be As Fast As Go? A 2026 Benchmark Update&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Six years after his original comparison, Mark Nelson revisits the question: can a small Java microservice match Go on raw performance? He benchmarks Go 1.26.3 using &lt;code&gt;net/http&lt;/code&gt; against Helidon SE 4.4.1 (handling requests on virtual threads) running on Oracle JDK 26.0.1, alongside a variant using a Project Leyden AOT cache. The test service is deliberately small and synthetic: an endpoint generates payloads of 7, 128, 2048, or 8192 bytes, performs uppercase, lowercase, string reversal, and CRC32 calculations with &lt;code&gt;WORK_FACTOR=10&lt;/code&gt;, and returns JSON. Each runtime is benchmarked sequentially with dedicated warmup passes and logging disabled. Before recording final numbers, Nelson noticed Helidon exhibiting a puzzling 44–48 ms latency floor on larger responses over reused HTTP/1.1 connections; enabling &lt;code&gt;tcpNoDelay(true)&lt;/code&gt; eliminated the Nagle/delayed-ACK interaction immediately.&lt;/p&gt;
&lt;p&gt;What stands out in the results isn&amp;rsquo;t a simplistic &amp;ldquo;Java beats Go&amp;rdquo; headline, but the shape of the scaling curves. At small payload sizes and low concurrency, all three configurations perform in roughly the same ballpark. As concurrent connections and payload sizes climb, however, the Java setups scale noticeably better: at 2 KB payloads, Go peaks around 17,000 requests/sec, whereas standard JVM reaches ~39,500 and Leyden AOT hits ~41,600. Leyden AOT posts the highest peak throughput across every payload size, while Go doesn&amp;rsquo;t win a single cell despite staying competitive at the smallest sizes. Nelson stresses that teams shouldn&amp;rsquo;t use synthetic microbenchmarks to dictate company-wide language mandates—measure your own workload, as runtime tuning, frameworks, hardware, warmup, logging, and socket options often matter just as much as the language itself.&lt;/p&gt;
&lt;h2 id="stop-using-conventional-commits"&gt;&lt;a href="https://sumnerevans.com/posts/software-engineering/stop-using-conventional-commits/" rel="noopener noreferrer"&gt;Stop Using Conventional Commits&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sumner Evans argues against Conventional Commits because the format puts the emphasis in the wrong place. In his view, the single most valuable piece of information in a commit subject line is the scope—which subsystem, package, module, or service was touched. Developers scanning &lt;code&gt;git log&lt;/code&gt; are usually rebasing, debugging, or triaging an incident, so they need to know immediately which part of the codebase changed. Conventional Commits instead puts a change-type category like &lt;code&gt;fix&lt;/code&gt;, &lt;code&gt;feat&lt;/code&gt;, or &lt;code&gt;chore&lt;/code&gt; up front and makes the scope optional. Worse, the change type is usually obvious from the description anyway, and often ambiguous when a single commit fixes a bug, refactors a helper, and adds a small capability at once.&lt;/p&gt;
&lt;p&gt;Evans then dismantles the usual selling points of Conventional Commits one by one. Auto-generating user-facing changelogs from commit history produces poor results because changelogs are written for end users while commit logs are written for maintainers—two audiences that need completely different levels of detail. Automating SemVer bumps from commit prefixes breaks down around reverts, breaking changes discovered after the fact, or follow-up fixes landed before release. Triggering CI/CD pipelines off commit message prefixes is even a security and reliability hazard, since automation should inspect which files actually changed in the tree rather than trusting human-typed subject lines. Instead, he recommends the scope-first convention used by Linux, FreeBSD, Git, Go, and Node.js—&lt;code&gt;scope: description&lt;/code&gt;, such as &lt;code&gt;net/http/cookiejar: add godoc links&lt;/code&gt;—where scopes mirror the natural structure of the project.&lt;/p&gt;
&lt;h2 id="stop-using-jwts"&gt;&lt;a href="https://gist.github.com/samsch/0d1f3d3b4745d778f78b230cf6061452" rel="noopener noreferrer"&gt;Stop using JWTs!&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sam Schlinkert argues for defaulting to server-side sessions for browser authentication, noting that revocation, logout, and lifecycle management are usually much simpler than rolling a custom stateless JWT scheme. That said, the gist&amp;rsquo;s claim that the JWT specification was designed strictly for short-lived tokens of around five minutes is factually incorrect: RFC 7519 imposes no such lifetime limit. A JWT is simply a signed or encrypted claims format; its security depends on the surrounding protocol, key management, and validation rules rather than every use of JWT being inherently insecure.&lt;/p&gt;
&lt;p&gt;The post rightly warns that storing authentication tokens in &lt;code&gt;localStorage&lt;/code&gt; magnifies the blast radius of any XSS vulnerability. For cookie-based sessions, &lt;code&gt;Secure&lt;/code&gt; and &lt;code&gt;HttpOnly&lt;/code&gt; flags provide important defense-in-depth, though applications still have to address CSRF, XSS, and session expiration at the architectural level. When JWTs are genuinely needed, RFC 8725 (JWT Best Current Practices) requires restricting accepted algorithms, verifying signatures, and validating claims like issuer and audience; alternatives like PASETO eliminate several cryptographic footguns by design, though they still don&amp;rsquo;t solve stateful session revocation on their own. For most web applications, the pragmatic default remains starting with your framework&amp;rsquo;s built-in session middleware backed by &lt;code&gt;Secure&lt;/code&gt;, &lt;code&gt;HttpOnly&lt;/code&gt; cookies and a fast store like Redis or Postgres, reaching for bearer tokens only when cross-service trust boundaries actually call for them.&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_!N2N1!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5edb76e4-d060-48d2-bd73-afe04f1cff5a_1284x1536.jpeg" alt="The AI Agent Stack, Explained"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!wI2g!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F148840a3-d7df-4308-adad-c227f4d280e8_2360x2960.png" alt="Understanding Git Reset Modes"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!CKOS!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8d2521b0-1dd8-4b28-afbd-34f2bb44ee50_2360x2960.png" alt="How NAT Works"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!HMwY!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6af9e24b-9be2-4a45-9f81-14ec6f4330ca_2484x3002.png" alt="SLMs vs. LLMs, Clearly Explained"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!Z5zI!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5233378c-3c59-40b1-9de2-6515b9d3e928_2484x3002.png" alt="Single Agent vs. Multi-Agent Architecture"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!U8C6!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1b849efb-0467-4a5d-b735-f2296b125e9f_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=U8lGbSaCCYI" rel="noopener noreferrer"&gt;Running LLMs Locally for Learning and Privacy&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
 &lt;p&gt;This ByteByteGo video explains why running LLMs on your own machine is great for learning, experimentation, and privacy: sensitive data never leaves your device, you can work offline, and costs stay completely predictable. It also surveys the local LLM ecosystem—from Ollama, LM Studio, and MLX-LM for personal workflows to vLLM and SGLang for high-throughput inference serving.&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>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>Hibernate merge: Getting the Entity ID the Right Way</title><link>https://miti99.com/en/post/2026/04/10/</link><pubDate>Fri, 10 Apr 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/04/10/</guid><description>&lt;p&gt;A small pitfall that once cost me a fair bit of debugging time.&lt;/p&gt;
&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;&lt;p&gt;When using &lt;code&gt;EntityManager.merge()&lt;/code&gt; to save a new entity, many people are in the habit of writing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;entityManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entity&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="n"&gt;Long&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;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;entity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getId&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// null or stale value!&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;And&amp;hellip; &lt;code&gt;id&lt;/code&gt; doesn&amp;rsquo;t have the value you expected.&lt;/p&gt;
&lt;h2 id="cause"&gt;Cause&lt;/h2&gt;&lt;p&gt;&lt;code&gt;merge()&lt;/code&gt; &lt;strong&gt;does not update&lt;/strong&gt; the object you pass in. Instead, it copies the state from that object into a &lt;strong&gt;new managed instance&lt;/strong&gt; and returns that instance. The original object remains detached and is never assigned an ID by Hibernate.&lt;/p&gt;
&lt;h2 id="the-right-way"&gt;The Right Way&lt;/h2&gt;&lt;p&gt;Use the &lt;strong&gt;returned object&lt;/strong&gt; from &lt;code&gt;merge()&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;MyEntity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;managed&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;entityManager&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;entity&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="n"&gt;Long&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;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;managed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getId&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s all there is to it. Unlike &lt;code&gt;persist()&lt;/code&gt; — which mutates the passed-in object directly and therefore doesn&amp;rsquo;t have this issue.&lt;/p&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 #94</title><link>https://miti99.com/en/post/2026/04/02/</link><pubDate>Thu, 02 Apr 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/04/02/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #94.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="inside-the-claude-code-source"&gt;&lt;a href="https://gist.github.com/Haseeb-Qureshi/d0dc36844c19d26303ce09b42e7188c1" rel="noopener noreferrer"&gt;Inside the Claude Code source&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;After the Claude Code CLI source code was inadvertently exposed in late March 2026, Haseeb Qureshi read through its core modules and compared its architecture with OpenAI&amp;rsquo;s Codex CLI. The first surprise is that the terminal UI is actually a React application rendered via Ink, bringing a web mental model to the terminal, whereas Codex&amp;rsquo;s TUI is written entirely in Rust. The entire lifecycle of a request runs through an async generator pipeline: every event flows down a single stream consumed identically by the CLI, SDK, and IDE bridge, which differ only in how they render those events. To survive long coding sessions, Claude Code layers four context-compaction strategies (proactive, reactive, snip, and context collapse), whereas Codex relies on two.&lt;/p&gt;
&lt;p&gt;The system prompt is assembled from roughly 15 functions and split in two by a cache-boundary marker: a static first half (~3,000 tokens of core instructions) cached globally across users, and a dynamic second half holding session-specific context like &lt;code&gt;CLAUDE.md&lt;/code&gt; and MCP instructions. Internal Anthropic engineers even receive different prompt rules than external users—such as a strict 25-word limit between tool calls and an adversarial verification sub-agent. Bun&amp;rsquo;s compile-time feature flags strip dead code from public builds while revealing unreleased internal features like &lt;code&gt;VOICE_MODE&lt;/code&gt; and &lt;code&gt;KAIROS&lt;/code&gt;. The author&amp;rsquo;s takeaway: across ~500,000 lines of TypeScript, actual model API calls take up only a few hundred lines; the underlying model is the easiest part to swap out, while the surrounding &lt;em&gt;harness&lt;/em&gt; encodes years of hard-won operational craft.&lt;/p&gt;
&lt;h2 id="ai-will-accelerate-your-tech-debt"&gt;&lt;del&gt;&lt;a href="https://securosis.com/ai/ai-will-accelerate-your-tech-debt/" rel="noopener noreferrer"&gt;AI Will Accelerate Your Tech Debt&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;Chris Farris compares many engineering organizations to families living paycheck to paycheck: after years of prioritizing feature velocity over sustainable architecture, they are one major outage away from bankruptcy, and every minor incident burns the exact hours that should have gone toward paying down technical debt. Pouring AI coding tools into that environment, he argues, is like passing a tax cut on a structural deficit: it feels great and boosts short-term output, but makes the underlying fiscal problem worse. When the cost of generating code drops near zero, the natural economic friction that used to filter out half-baked features vanishes—leaving the same overstretched team with more code, a wider attack surface, and deeper system complexity.&lt;/p&gt;
&lt;p&gt;On the security side, building on Rich Mogull&amp;rsquo;s &amp;ldquo;Core Collapse&amp;rdquo; scenario, the author warns that AI-equipped attackers will discover and exploit vulnerabilities faster than defenders can patch them, and organizations that don&amp;rsquo;t understand their own environments cannot use AI to defend them either. Unlike Mogull, he argues you cannot outsource technical-debt remediation. Instead, he proposes a &amp;ldquo;Technology Troika&amp;rdquo;—bringing Finance/FinOps, Security, and Platform Engineering together to shore up foundations before opening the AI floodgates. That means investing in unglamorous fundamentals like identity management, data classification, and dependency mapping, alongside having the courage to decommission legacy systems outright rather than endlessly refactoring them. Buying more AI tools won&amp;rsquo;t save a rotting foundation.&lt;/p&gt;
&lt;h2 id="how-slack-rebuilt-notifications-"&gt;&lt;a href="https://slack.engineering/how-slack-rebuilt-notifications/" rel="noopener noreferrer"&gt;How Slack Rebuilt Notifications 📣&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Slack&amp;rsquo;s engineering team recounts rebuilding their notification settings from the ground up to reduce notification fatigue. Notifications consistently ranked among the top three drivers of customer support tickets, and the problem wasn&amp;rsquo;t just volume—it was the architecture itself: desktop and mobile had four conflicting mental models, &lt;em&gt;what&lt;/em&gt; you get notified about was tightly coupled to &lt;em&gt;how&lt;/em&gt; it gets delivered, preferences didn&amp;rsquo;t sync cleanly across devices, and advanced overrides were scattered across hidden menus.&lt;/p&gt;
&lt;p&gt;The redesign consolidated everything into a single unified model: every channel now offers three clear choices—&amp;ldquo;All new posts,&amp;rdquo; &amp;ldquo;Mentions only,&amp;rdquo; or &amp;ldquo;Mute&amp;rdquo;—while push delivery is toggled independently per device category (desktop vs. mobile). The hardest part was migrating millions of existing users safely. To preserve backward compatibility and allow instant rollbacks, the team avoided mutating legacy rows in the database and instead translated old preferences on read—for instance, mapping the old &amp;ldquo;Nothing&amp;rdquo; setting to &amp;ldquo;Mentions only&amp;rdquo; with push notifications turned off. They also removed the explicit &amp;ldquo;Save&amp;rdquo; button so changes apply immediately, shared React components across platforms, and rewrote some of Slack&amp;rsquo;s oldest iOS screens. Post-launch, engagement with notification settings jumped 5x and stayed elevated weeks later.&lt;/p&gt;
&lt;h2 id="better-faster-and-even-more"&gt;&lt;a href="https://randsinrepose.com/archives/better-faster-and-even-more/" rel="noopener noreferrer"&gt;Better, Faster, and (Even) More&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Michael Lopp (Rands) shares the tools and habits he has built over 90 days of working intensively with Claude Code, at a moment when the cost of going from &amp;ldquo;random idea&amp;rdquo; to &amp;ldquo;working software&amp;rdquo; has never been lower. Everything lives under &lt;code&gt;~/Projects/&lt;/code&gt;, with each project in its own Git repository alongside three special repos: &lt;code&gt;dotfiles&lt;/code&gt; for machine configuration symlinked into place, a private &lt;code&gt;credentials&lt;/code&gt; repo for API keys, and &lt;code&gt;scripts&lt;/code&gt; for custom CLI utilities. Every project carries two markdown files: &lt;code&gt;CLAUDE.md&lt;/code&gt; as static instructions on how to build and deploy the project, and &lt;code&gt;WORKLOG.md&lt;/code&gt; as a running session journal recording what was investigated, changed, and decided so the next session can pick right back up.&lt;/p&gt;
&lt;p&gt;Small daily workflow tweaks remove even more friction: having Claude pipe output straight to the macOS clipboard via &lt;code&gt;pbcopy&lt;/code&gt;, capturing a screen region to the clipboard and pasting it directly into Claude instead of describing UI bugs in prose, and running a custom doctor script that verifies 30+ environment checks across his three Macs. He also breaks down how he separates Claude Code&amp;rsquo;s memories, skills, and hooks, configures his status bar to display rate-limit usage, and auto-titles terminal tabs by project name. Going faster, he notes, only makes you want to go faster still—every friction point removed builds momentum for the next.&lt;/p&gt;
&lt;h2 id="java-is-fast-your-code-might-not-be"&gt;&lt;a href="https://jvogel.me/posts/2026/java-is-fast-your-code-might-not-be/" rel="noopener noreferrer"&gt;Java Is Fast. Your Code Might Not Be.&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jonathan Vogel built a Java order-processing service for a DevNexus talk that worked outer-loop fine and passed every test—then fixed eight common performance anti-patterns without changing the architecture or upgrading the JDK. Processing time dropped from 1,198ms to 239ms, throughput jumped from 85,000 to 419,000 orders per second, and heap usage fell from over 1GB to 139MB. What makes these eight anti-patterns dangerous is that they compile cleanly, slip past code review, and only stand out under a profiler.&lt;/p&gt;
&lt;p&gt;The eight culprits: string concatenation with &lt;code&gt;+&lt;/code&gt; inside loops causing O(n²) copying (use &lt;code&gt;StringBuilder&lt;/code&gt;); running a full &lt;code&gt;Stream&lt;/code&gt; scan over a list inside a loop—the single biggest hotspot, eating nearly 71% of CPU samples, replaced by a single-pass accumulation using &lt;code&gt;Map.merge()&lt;/code&gt;; calling &lt;code&gt;String.format()&lt;/code&gt; on hot paths; autoboxing &lt;code&gt;Long&lt;/code&gt; instead of primitive &lt;code&gt;long&lt;/code&gt;, churning ~16MB of heap garbage per million elements; using exceptions for normal control flow; overly coarse &lt;code&gt;synchronized&lt;/code&gt; blocks (replaced with &lt;code&gt;ConcurrentHashMap&lt;/code&gt; and &lt;code&gt;LongAdder&lt;/code&gt;); repeatedly instantiating expensive thread-safe objects like Jackson&amp;rsquo;s &lt;code&gt;ObjectMapper&lt;/code&gt;; and pinning virtual threads on JDK 21–23 by performing blocking I/O inside &lt;code&gt;synchronized&lt;/code&gt; blocks (fixed with &lt;code&gt;ReentrantLock&lt;/code&gt;). Part two of the series will walk through the exact JFR profiler traces.&lt;/p&gt;
&lt;h2 id="go-naming-conventions-a-practical-guide"&gt;&lt;a href="https://www.alexedwards.net/blog/go-naming-conventions" rel="noopener noreferrer"&gt;Go Naming Conventions: A Practical Guide&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alex Edwards puts together a comprehensive, practical guide to naming things in Go, starting from the language&amp;rsquo;s three hard rules for identifiers (only Unicode letters, digits, and underscores; cannot start with a digit; cannot match a reserved keyword) and moving into community conventions. Go uses &lt;code&gt;mixedCaps&lt;/code&gt; (&lt;code&gt;camelCase&lt;/code&gt;) for unexported identifiers and &lt;code&gt;ExportedCaps&lt;/code&gt; (&lt;code&gt;PascalCase&lt;/code&gt;) for exported ones, because the case of the first letter determines package visibility; &lt;code&gt;snake_case&lt;/code&gt; is almost never used. Initialisms and acronyms keep consistent casing across the entire word: &lt;code&gt;apiKey&lt;/code&gt; and &lt;code&gt;APIKey&lt;/code&gt; are idiomatic, whereas &lt;code&gt;ApiKey&lt;/code&gt; is not; likewise, write &lt;code&gt;userID&lt;/code&gt;, never &lt;code&gt;userId&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For identifier length, the guiding principle is that the farther an identifier is used from its declaration, the more descriptive its name needs to be: a loop index over three lines can be &lt;code&gt;i&lt;/code&gt;, while a package-level variable needs a full, self-explanatory name. He advises against encoding types into variable names, shadowing built-in functions or standard-library package names like &lt;code&gt;json&lt;/code&gt; or &lt;code&gt;log&lt;/code&gt;, and exporting identifiers by default—citing &lt;em&gt;The Pragmatic Programmer&lt;/em&gt; that exporting less makes internal refactoring much easier. Package names should be short, all-lowercase single words without underscores (&lt;code&gt;ordermanager&lt;/code&gt;, not &lt;code&gt;order_manager&lt;/code&gt;), avoiding names with special toolchain meaning like &lt;code&gt;vendor&lt;/code&gt;, &lt;code&gt;testdata&lt;/code&gt;, or &lt;code&gt;internal&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="sambercc-skills-golang--a-collection-of-golang-agentic-skills-that-works"&gt;&lt;a href="https://github.com/samber/cc-skills-golang" rel="noopener noreferrer"&gt;samber/cc-skills-golang: 🧑‍🎨 A collection of Golang agentic skills that works&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This open-source repository offers a curated collection of Go-specific agent skills compatible with Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and Antigravity. Each skill is a modular instruction pack loaded only when relevant, keeping the coding agent&amp;rsquo;s context window lean. Bootstrapped with Claude Code from the author&amp;rsquo;s own production Go commits and then heavily edited, tested, and rewritten by hand, the project comes with a blunt warning from the author: purely AI-generated skills are useless.&lt;/p&gt;
&lt;p&gt;The catalog spans code style, naming conventions, data structures, database patterns, design patterns, documentation, error handling, observability, performance, benchmarking, security, and testing. Skills are split into small, cross-referenced units—for instance, rules about logging errors live inside &lt;code&gt;golang-error-handling&lt;/code&gt; rather than &lt;code&gt;golang-observability&lt;/code&gt;. Each skill includes benchmarked error-reduction numbers comparing agent output with and without the skill, such as a ~40% reduction in style violations and a 53% improvement in documentation compliance. Skills can be installed via the &lt;code&gt;skills&lt;/code&gt; CLI, the Claude Code plugin marketplace, or by copying them into your tool&amp;rsquo;s skill discovery directory.&lt;/p&gt;
&lt;h2 id="small-programming-tricks"&gt;&lt;a href="https://will-keleher.com/posts/small-programming-tricks-matter/" rel="noopener noreferrer"&gt;Small Programming Tricks&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Will Keleher argues that a surprising share of day-to-day engineering speed comes from accumulating &amp;ldquo;small programming tricks&amp;rdquo;—bite-sized techniques that don&amp;rsquo;t require deep theoretical study, but pay off immediately every day. His favorites include fuzzy-searching shell history with &lt;code&gt;fzf&lt;/code&gt; on &lt;code&gt;Ctrl+R&lt;/code&gt; (or &lt;code&gt;atuin&lt;/code&gt; for even richer history), running &lt;code&gt;SELECT&lt;/code&gt; without a &lt;code&gt;FROM&lt;/code&gt; clause to quickly test database functions, using &lt;code&gt;EXPLAIN ANALYZE&lt;/code&gt; to tune queries, word-boundary assertions (&lt;code&gt;\b&lt;/code&gt;) in regular expressions, the &amp;ldquo;git pickaxe&amp;rdquo; (&lt;code&gt;git log -S&lt;/code&gt;) to find commits that added or removed a specific string, and &lt;code&gt;git checkout -&lt;/code&gt; to jump back to the previous branch or commit checkout.&lt;/p&gt;
&lt;p&gt;He also calls out modern JavaScript conveniences like &lt;code&gt;Array.flatMap&lt;/code&gt;, &lt;code&gt;Object.entries&lt;/code&gt;, and &lt;code&gt;Promise.withResolvers&lt;/code&gt;, and recommends &lt;code&gt;ripgrep&lt;/code&gt; (&lt;code&gt;rg&lt;/code&gt;) over &lt;code&gt;grep&lt;/code&gt; alongside shell globs like &lt;code&gt;**/*.md&lt;/code&gt; in place of verbose &lt;code&gt;find&lt;/code&gt; invocations. Inside a company, tribal-knowledge tricks—like which internal dashboard actually shows the right logs for a given failure, or who on another team knows a legacy subsystem inside out—are even more valuable. At a previous job, the author posted one small trick a day in Slack; that daily cadence was lightweight enough not to overwhelm anyone while steadily leveling up the whole team.&lt;/p&gt;
&lt;h2 id="shell-tricks-that-actually-make-life-easier-and-save-your-sanity"&gt;&lt;a href="https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/" rel="noopener noreferrer"&gt;Shell Tricks That Actually Make Life Easier (And Save Your Sanity)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Christian Hofstede-Kuhn rounds up terminal shortcuts and shell features that many developers miss once they get comfortable with basic &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;cd&lt;/code&gt;, and &lt;code&gt;grep&lt;/code&gt;. The first half covers Emacs-style line-editing keybindings (depending on your shell configuration): &lt;code&gt;Ctrl+W&lt;/code&gt; deletes the previous word, &lt;code&gt;Ctrl+U&lt;/code&gt; and &lt;code&gt;Ctrl+K&lt;/code&gt; cut to the start or end of the line, &lt;code&gt;Ctrl+Y&lt;/code&gt; yanks the cut text back, and &lt;code&gt;Ctrl+A&lt;/code&gt; / &lt;code&gt;Ctrl+E&lt;/code&gt; jump to the beginning or end of the line; &lt;code&gt;cd -&lt;/code&gt; toggles between your current and previous directory, while &lt;code&gt;pushd&lt;/code&gt; and &lt;code&gt;popd&lt;/code&gt; manage a directory stack. For scripts, &lt;code&gt;set -e&lt;/code&gt; and &lt;code&gt;set -u&lt;/code&gt; help catch errors early (though they have sharp edges and don&amp;rsquo;t replace explicit error handling, and &lt;code&gt;pushd&lt;/code&gt;/&lt;code&gt;popd&lt;/code&gt; aren&amp;rsquo;t part of POSIX &lt;code&gt;sh&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;The second half focuses on Bash and Zsh power tools: reverse history search with &lt;code&gt;Ctrl+R&lt;/code&gt;, pressing &lt;code&gt;Ctrl+X&lt;/code&gt; then &lt;code&gt;Ctrl+E&lt;/code&gt; to open the current command line in your &lt;code&gt;$EDITOR&lt;/code&gt; when crafting a complex multi-line command, brace expansion like &lt;code&gt;cp file{,.bak}&lt;/code&gt; for quick backups or &lt;code&gt;mkdir -p project/{src,tests,docs}&lt;/code&gt; to scaffold directories in one shot, process substitution like &lt;code&gt;diff &amp;lt;(sort file1) &amp;lt;(sort file2)&lt;/code&gt;, and &lt;code&gt;disown&lt;/code&gt; to detach a long-running job from the current shell session. His advice: don&amp;rsquo;t try to memorize the whole list at once—pick one trick, force yourself to use it for a week, and then move on to the next.&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 #89</title><link>https://miti99.com/en/post/2026/03/14/</link><pubDate>Sat, 14 Mar 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/03/14/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #89.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="hybrid-quota-linear-rate-limiter"&gt;&lt;a href="https://dotat.at/@/2026-01-12-hqlr.html" rel="noopener noreferrer"&gt;Hybrid Quota-Linear Rate Limiter&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Tony Finch points out an underappreciated quirk of linear rate limiters like the leaky bucket or GCRA: they are slow to clamp down on clients that exceed the limit only modestly. Given a quota of &lt;code&gt;q&lt;/code&gt; requests per time window &lt;code&gt;w&lt;/code&gt;, a client sending requests at &lt;code&gt;a&lt;/code&gt; times the allowed rate can still get roughly &lt;code&gt;q*a/(a-1)&lt;/code&gt; requests through before being blocked—double the quota when &lt;code&gt;a=2&lt;/code&gt;. The reason is that the bucket starts full of tokens and continuously refills another quota&amp;rsquo;s worth over the first window. Fixed-window quota-reset limiters enforce a stricter cap, but they use more memory and encourage clients to dump traffic in bursts at window boundaries.&lt;/p&gt;
&lt;p&gt;The author proposes a hybrid algorithm with two modes: a bursty mode for low-volume clients, which allows bursts but refills at most one quota per window; and a smooth mode for heavy clients, which starts with an empty bucket (plus a negative penalty) and forces requests to be paced evenly. The limiter switches to smooth mode when a client drains its last token, and returns to bursty mode once the bucket recovers a full quota. The behavior matches running a quota-reset limiter and a linear limiter side by side, while using less memory. Even so, the author advises against actually using it: a linear rate limiter only looks &amp;ldquo;too generous&amp;rdquo; if you ignore the fact that the client was idle during the previous window. It is better to reframe the requirement and stick with a simple linear limiter like GCRA, which naturally rewards steady traffic.&lt;/p&gt;
&lt;h2 id="go-is-the-best-language-for-ai-agents"&gt;&lt;a href="https://getbruin.com/blog/go-is-the-best-language-for-agents/" rel="noopener noreferrer"&gt;Go is the Best Language for AI Agents&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Burak Karakan, who has worked professionally with Go for eight years and is building Bruin—an open-source ETL tool written in Go—argues that Go is the best language for coding with AI agents. First, Go is compiled: agents generate lots of plausible-looking code, and a fast compiler with static types lets the agent iterate in a tight loop until entire classes of type and argument errors are eliminated. Compared with Rust, Go has simpler syntax and concepts, compiles faster for a tighter feedback loop, and has a larger corpus of existing code. That simplicity also makes it easy for humans to review diffs and spot when an agent is heading down a strange design path.&lt;/p&gt;
&lt;p&gt;Go is also strongly opinionated: there is one standard way to run tests, format code, and build binaries, so an agent can just invoke &lt;code&gt;gofmt&lt;/code&gt; instead of wrestling with the toolchain sprawl common in JavaScript. Easy cross-compilation lets agents verify builds across operating systems after every change (even if running the tests still requires the target environment or an emulator)—a major advantage when running background agents inside sandboxes whose environment you don&amp;rsquo;t fully control. In the author&amp;rsquo;s experience, agents write working Go on the first try roughly 95% of the time—not because there is more training data than for Python, but because Go usually has one obvious way to do things. He acknowledges this is anecdotal and may matter less as models improve.&lt;/p&gt;
&lt;h2 id="your-agent-needs-a-harness-not-a-framework"&gt;&lt;a href="https://x.com/djfarrelly/status/2028556984396452250" rel="noopener noreferrer"&gt;Your Agent Needs a Harness, Not a Framework&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Dan Farrelly from Inngest argues that AI agents need a &amp;ldquo;harness,&amp;rdquo; not a framework. Across engineering disciplines, a harness connects, protects, and coordinates components without doing their job for them—like a wiring harness linking an engine to sensors, or a climbing harness catching you when you fall. For an agent, the LLM is the engine, tools are peripherals, and memory is storage; what you need around them is something that handles an LLM timing out on loop iteration five or two user messages colliding. Agent frameworks keep reinventing retries, state persistence, queues, and event routing from scratch, when durable event-driven infrastructure already solves those problems: every LLM or tool call becomes an independently retryable &amp;ldquo;step,&amp;rdquo; so if a process crashes on iteration five, the first four iterations are already checkpointed.&lt;/p&gt;
&lt;p&gt;To prove the point, the team built Utah (Universally Triggered Agent Harness)—a conversational agent over Telegram or Slack with tools, memory, sub-agent delegation via &lt;code&gt;step.invoke()&lt;/code&gt;, and fault tolerance, written in compact TypeScript with no agent framework, just Inngest functions, steps, and events wrapped around a think → act → observe loop. Their biggest lesson: context management is the real challenge, because bloated tool outputs disorient the model and send it into endless tool-calling loops. They solved this with two-tier pruning of old tool outputs, session history compaction, warnings as the step budget runs low, and automatic re-compaction on context-window overflow errors.&lt;/p&gt;
&lt;h2 id="an-interactive-intro-to-quadtrees"&gt;&lt;a href="https://growingswe.com/blog/quadtrees" rel="noopener noreferrer"&gt;An Interactive Intro to Quadtrees&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This interactive guide explains quadtrees—a spatial data structure for fast two-dimensional queries, inspired by seeing Uber use spatial indexing in system design write-ups. In a mapping app with millions of places, the naive approach to finding nearby points is computing the distance from the user to every single location, costing millions of operations per query. A quadtree reorganizes space itself: it splits a rectangular region into four quadrants, and whenever a quadrant exceeds its point capacity, it subdivides again. Dense areas get finely divided while sparse areas stay coarse, so looking up a point simply walks down the tree, eliminating three-quarters of the remaining space at each level—roughly 10 steps for a million points.&lt;/p&gt;
&lt;p&gt;The capacity parameter shapes the tree: a low capacity builds a deeper tree that prunes more aggressively but uses more memory; a high capacity builds a shallower tree where leaf nodes scan more points linearly, with 4 to 16 being a good starting range. Range queries only descend into nodes whose bounding boxes intersect the search region, pruning entire subtrees at once; nearest-neighbor search tracks the best distance found so far to prune increasingly aggressively. Beyond geospatial search, quadtrees power broad-phase collision detection in games—avoiding pairwise checks between distant objects—and region-based image compression, where uniform areas are stored as large blocks and detailed regions are subdivided.&lt;/p&gt;
&lt;h2 id="agentic-engineering-patterns"&gt;&lt;a href="https://simonwillison.net/guides/agentic-engineering-patterns/" rel="noopener noreferrer"&gt;Agentic Engineering Patterns&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Simon Willison has launched a guide to patterns for getting the most out of coding agents like Claude Code and OpenAI Codex. He draws a sharp line between &amp;ldquo;agentic engineering&amp;rdquo; and &amp;ldquo;vibe coding&amp;rdquo;: vibe coding means letting an LLM write code without paying attention to the code itself, whereas agentic engineering is professional engineers using agents to amplify their existing expertise rather than replace it. The guide is organized into sections covering core principles, working with coding agents (how they work, using Git, sub-agents), testing and quality assurance, understanding codebases through linear walkthroughs and interactive explanations, annotated prompts, and an appendix of prompts he uses regularly.&lt;/p&gt;
&lt;p&gt;A few standout patterns: &amp;ldquo;Writing code is cheap now&amp;rdquo;—the cost of generating code has dropped to near zero, but &lt;em&gt;good&lt;/em&gt; code with tests, documentation, and proper error handling still takes discipline, requiring new habits; &amp;ldquo;Hoard things you know how to do&amp;rdquo;—maintain a collection of working examples you can recombine and feed to agents as reference input; and &amp;ldquo;Red/green TDD&amp;rdquo;—have the agent write a failing test first and verify it fails before implementing the fix, along with running the test suite right at the start of every session. The guide also calls out anti-patterns to avoid—most notably filing unreviewed agent-generated pull requests for teammates to review—and continues to grow with new chapters.&lt;/p&gt;
&lt;h2 id="things-i-miss-about-spring-boot-after-switching-to-go"&gt;&lt;del&gt;&lt;a href="https://sushantdhiman.dev/things-i-miss-about-spring-boot-after-switching-to-go/" rel="noopener noreferrer"&gt;Things I Miss About Spring Boot After Switching to Go&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;After spending a year and a half building production Java and Spring Boot systems at a startup and then switching to Go, Sushant Dhiman reflects on what he misses from the Spring ecosystem. First is the &amp;ldquo;batteries included&amp;rdquo; philosophy: Spring Boot ships with nearly everything needed for production out of the box, whereas Go favors minimalism and a collection of small libraries over a monolithic framework. Specifically, he misses declarative dependency injection via annotations like &lt;code&gt;@Service&lt;/code&gt; and &lt;code&gt;@Autowired&lt;/code&gt;; in Go you wire dependencies manually through constructors—explicit, but startup code balloons once a service has hundreds of dependencies. Similarly, declarative validation with &lt;code&gt;@NotNull&lt;/code&gt; or &lt;code&gt;@Email&lt;/code&gt; avoids chains of manual &lt;code&gt;if/else&lt;/code&gt; checks and regexes.&lt;/p&gt;
&lt;p&gt;Spring&amp;rsquo;s mature ecosystem is another big loss: Spring Security handles JWT, OAuth, and form logins out of the box; Spring Data derives queries directly from method names like &lt;code&gt;findByEmail&lt;/code&gt;; Spring Boot Actuator exposes health checks and metrics with a few lines of configuration; and Spring Cloud provides a full toolkit for microservices. Still, the author is fair to Go: it gives you complete control and transparency over SQL queries, which is much easier to debug than complex multi-table ORM joins. Go also wins on operational simplicity—compiling to a single static binary with no JVM or garbage-collector tuning, near-instant startup, and first-class concurrency built right into the language.&lt;/p&gt;
&lt;h2 id="design-first-collaboration-with-ai"&gt;&lt;a href="https://martinfowler.com/articles/reduce-friction-ai/design-first-collaboration.html" rel="noopener noreferrer"&gt;Design-First Collaboration with AI&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Writing on martinfowler.com, Rahul Garg diagnoses the &amp;ldquo;Implementation Trap&amp;rdquo; when working with AI coding assistants: AI generates code so fast that the natural pause between design thinking and coding disappears. The AI still makes design decisions about scope, component boundaries, data flow, and error handling, but buries them quietly inside the implementation. Reviewers have to evaluate too many concerns at once and easily miss flaws, even though fixing a misunderstanding at the design stage is far cheaper than after code is written. Worse, AI assistants routinely slip in unrequested features—what the author calls &amp;ldquo;technical debt injection.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;His solution is to recreate the whiteboard design session across five progressive levels of abstraction: Capabilities (core requirements), Components (building blocks), Interactions (data flow and communication), Contracts (function signatures, types, interfaces), and finally Implementation. The golden rule is no production code until Level 5 is approved. In a notification-service example, reviewing at the Components level let the author scrap an unnecessary &lt;code&gt;RetryQueue&lt;/code&gt; class because BullMQ already handles retries; and once Contracts are agreed upon, the AI can write tests before writing the implementation. Not every task needs all five levels: a simple utility can start at Level 4, while a multi-component feature starts at Level 1. The process takes more upfront time and isn&amp;rsquo;t worth it for throwaway tasks, but pays off handsomely for complex, long-lived features.&lt;/p&gt;
&lt;h2 id="the-two-kinds-of-error"&gt;&lt;a href="https://evanhahn.com/the-two-kinds-of-error/" rel="noopener noreferrer"&gt;The Two Kinds of Error&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Evan Hahn divides software errors into two categories. &lt;em&gt;Expected&lt;/em&gt; errors happen during normal operation and aren&amp;rsquo;t bugs in the program: invalid user input, flaky networks, missing file permissions. These are recoverable—you shouldn&amp;rsquo;t &lt;code&gt;throw&lt;/code&gt;, &lt;code&gt;raise&lt;/code&gt;, or &lt;code&gt;panic&lt;/code&gt;, but instead return an explicit error value (like a &lt;code&gt;Result&lt;/code&gt; type) that forces the caller to handle it, logging at &lt;code&gt;WARN&lt;/code&gt; or &lt;code&gt;INFO&lt;/code&gt; at most. &lt;em&gt;Unexpected&lt;/em&gt; errors should never happen—failed assertions, logic bugs, corrupt data from a database you control—and indicate a bug in the code. Rather than limping along, the program should crash immediately and log at &lt;code&gt;ERROR&lt;/code&gt; or &lt;code&gt;FATAL&lt;/code&gt;; crashing is annoying in the moment, the author argues, but makes software far more reliable over time.&lt;/p&gt;
&lt;p&gt;Where the boundary falls depends on context: in a quick prototype or one-off script, almost every error can be treated as unexpected; in flight software for a 50-year deep-space probe, almost every error—including hardware faults—must be treated as expected. Making software more reliable generally means moving more errors from the unexpected column into the expected one. He also notes that languages like Rust and Zig nudge developers to treat many errors as expected, whereas JavaScript and Python do the opposite, and he prefers stricter compiler enforcement for production systems.&lt;/p&gt;
&lt;h2 id="secure-go-error-handling-best-practices"&gt;&lt;a href="https://blog.jetbrains.com/go/2026/03/02/secure-go-error-handling-best-practices/" rel="noopener noreferrer"&gt;Secure Go Error Handling Best Practices&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post on the JetBrains GoLand blog focuses on the security side of error handling in Go. Because Go errors are plain values rather than exceptions, letting them bubble up and return directly to clients can easily leak file paths, SQL queries, credentials, or stack traces. The first rule is a strict separation between what the system sees and what the user sees: define a custom error type carrying both an internal cause and a public message, where &lt;code&gt;Error()&lt;/code&gt; returns only the safe message while technical details go exclusively to internal logs. Next, instead of logging entire request structs that might contain passwords, use a builder or helper that whitelists safe metadata fields; and when you don&amp;rsquo;t want callers inspecting the underlying cause via &lt;code&gt;errors.Is&lt;/code&gt; or &lt;code&gt;errors.As&lt;/code&gt;, wrap errors opaquely rather than using &lt;code&gt;fmt.Errorf&lt;/code&gt; with &lt;code&gt;%w&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;As errors cross architectural boundaries, control them at three levels: between internal layers, translate raw database errors into domain errors; between microservices, map them to standard status codes like gRPC codes or a uniform JSON error schema; and at the user-facing edge, return only predefined static strings or error codes paired with a request ID—never dynamically concatenated error text. For logging, use structured loggers like &lt;code&gt;log/slog&lt;/code&gt;, zap, or zerolog, project only the fields needed for debugging, and implement a &lt;code&gt;Redactor&lt;/code&gt; interface to mask sensitive fields whenever a full request payload must be logged.&lt;/p&gt;
&lt;h2 id="ai-coding-tools-java--compounding-engineering"&gt;&lt;a href="https://www.the-main-thread.com/p/ai-coding-tools-java-compounding-engineering" rel="noopener noreferrer"&gt;AI Coding Tools, Java &amp;amp; Compounding Engineering&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Markus Eisele distills Aleksander Stensby&amp;rsquo;s talk from NDC Manchester 2025 around a central thesis: if AI is generating bad code for you, it&amp;rsquo;s usually a workflow problem, not a model problem. Stensby calls the fix &lt;em&gt;Compounding Engineering&lt;/em&gt;—investing in your tools over time the way you mentor a junior developer. Context is both precious and scarce: too little and the model hallucinates, too much and it loses focus, so clear the chat frequently and persist architectural decisions, constraints, and rejected alternatives in markdown files so you can reload only what matters. Rule files like &lt;code&gt;CLAUDE.md&lt;/code&gt; serve as a living knowledge base: every time you fix a subtle bug, update the rules so the agent never makes that mistake again.&lt;/p&gt;
&lt;p&gt;Other habits include always planning before coding to catch bad ideas early, breaking work into small single-responsibility tasks, picking models deliberately (fast models for routine edits, deep reasoning models for architecture), automating repetitive flows with slash commands and sub-agents, using MCP so the AI can inspect real systems, and keeping a Git safety net of frequent checkpoints. Background agents still require thorough human review before merging. An engineer&amp;rsquo;s enduring value lies in taste and judgment—spotting that something is wrong even when all the tests pass—which AI still lacks. Invest in your workflow and the gains compound; skip that investment and you just get &amp;ldquo;faster mediocrity.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="yaml-that"&gt;&lt;a href="https://lab174.com/blog/202601-yaml-norway/" rel="noopener noreferrer"&gt;YAML? That&amp;rsquo;s Norway Problem&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This piece digs into YAML&amp;rsquo;s infamous &amp;ldquo;Norway problem&amp;rdquo;: the two-letter country code &lt;code&gt;NO&lt;/code&gt; getting parsed by popular libraries like PyYAML as the boolean &lt;code&gt;false&lt;/code&gt; instead of a string. The root cause is implicit typing for unquoted scalars: the final draft of YAML 1.0 (2004) and YAML 1.1 (2005) treated words like &lt;code&gt;yes/no&lt;/code&gt; and &lt;code&gt;on/off&lt;/code&gt; as booleans. YAML 1.2 (2009) dropped that behavior, yet PyYAML and LibYAML—the two &amp;ldquo;official&amp;rdquo; libraries, with open issues requesting v1.2 support dating back to 2016–2017—still implement v1.1. Because LibYAML sits deep inside the dependency tree of countless tools, changing it is slow and risky.&lt;/p&gt;
&lt;p&gt;Most articles stop at &amp;ldquo;just quote &lt;code&gt;&amp;quot;NO&amp;quot;&lt;/code&gt;,&amp;rdquo; but the author shows the ecosystem reality is messier. In Go, the most downloaded library (&lt;code&gt;gopkg.in/yaml.v3&lt;/code&gt;) is unmaintained and mixes v1.1 and v1.2 behaviors, whereas the most popular actively maintained library defaults to v1.2; the &lt;code&gt;yq&lt;/code&gt; CLI also defaults to v1.2, and in 2025 Kubernetes introduced KYAML, a safer, less ambiguous subset of YAML. Online documentation routinely confuses spec versions while users argue over whether the bug is &amp;ldquo;already fixed.&amp;rdquo; The takeaway: the YAML ecosystem is fragmented but gradually migrating toward stricter specs; new projects will likely pick newer v1.2-compliant libraries free of the Norway problem, while older, more widely deployed libraries remain stuck on v1.1.&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 #85</title><link>https://miti99.com/en/post/2026/02/28/</link><pubDate>Sat, 28 Feb 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/02/28/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #85.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-i-use-claude-code"&gt;&lt;a href="https://boristane.com/blog/how-i-use-claude-code/" rel="noopener noreferrer"&gt;How I Use Claude Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Boris Tane shares the workflow he has used with Claude Code over roughly nine months, built around one rule: never let Claude write code before a written plan has been carefully reviewed and approved. This keeps architectural decisions in the developer&amp;rsquo;s hands and produces far better results. In the research phase, the author instructs Claude to read the relevant codebase &amp;ldquo;deeply&amp;rdquo; and write its understanding to &lt;code&gt;research.md&lt;/code&gt;; without such emphatic wording, Claude tends to skim. This file makes it easy to verify whether Claude actually understands the system, because the costliest AI coding failures are changes that work in isolation but break everything around them.&lt;/p&gt;
&lt;p&gt;Next, Claude writes &lt;code&gt;plan.md&lt;/code&gt;, covering the approach, illustrative code snippets, files to modify, and trade-offs. The most valuable part is the annotation loop: the author adds inline notes directly into the plan to correct faulty assumptions, strip out unnecessary options, or inject domain knowledge, then asks Claude to update the plan with an explicit &amp;ldquo;don&amp;rsquo;t implement yet&amp;rdquo; guard. This loop repeats one to six times, after which a detailed task checklist is added to the plan. Once every decision is settled, a standard prompt tells Claude to execute everything, mark progress right inside the plan, and continuously run type checks. Implementation then becomes &amp;ldquo;boring&amp;rdquo;: just short course corrections, reverting when things drift, and running the entire workflow in a single long session so Claude accumulates context.&lt;/p&gt;
&lt;h2 id="next-generation-db-ingestion-at-pinterest"&gt;&lt;a href="https://medium.com/pinterest-engineering/next-generation-db-ingestion-at-pinterest-66844b7153b7" rel="noopener noreferrer"&gt;Next-Generation DB Ingestion at Pinterest&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Pinterest introduces the first part of a series on its next-generation database ingestion framework, replacing legacy batch pipelines. The old system regularly had latencies exceeding 24 hours, reprocessed entire tables daily even when less than 5% of rows changed, and lacked row-level deletion support. The new framework is built on change data capture (CDC) using Debezium/TiCDC, Kafka, Flink, Spark, and Iceberg, supporting MySQL, TiDB, and KVStore. CDC services publish events to Kafka with sub-second latency, Flink writes them into append-only Iceberg CDC tables on S3 (under 5 minutes of latency), and Spark periodically deduplicates to the latest change per primary key and uses &lt;code&gt;Merge Into&lt;/code&gt; to update the base table—a replica of the online table with 15-minute to one-hour latency.&lt;/p&gt;
&lt;p&gt;The team chose Merge-on-Read over Copy-on-Write because the latter incurred much higher storage costs. The post highlights three optimizations. First, base tables are partitioned by the hash of the primary key via &lt;code&gt;bucket()&lt;/code&gt; so data distributes evenly and Spark can process partitions in parallel. Second, setting &lt;code&gt;WRITE DISTRIBUTED BY PARTITION&lt;/code&gt; groups records from the same partition into a single write, solving the small-files problem. Third, for massive tables, the team stages CDC data into a temporary table with matching partitioning to enable a bucket join, avoiding a full shuffle of the base table before every merge and cutting compute cost by over 40% while significantly reducing latency. Part two will cover automated schema evolution.&lt;/p&gt;
&lt;h2 id="thank-you-ai"&gt;&lt;a href="https://www.kraxel.org/blog/2026/01/thank-you-ai/" rel="noopener noreferrer"&gt;Thank you, AI&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gerd Hoffmann recounts shutting down the self-hosted git server he had run publicly since 2011, and as a CVS server before that. AI scraper bots hammered the cgit web interface with pointless requests until the modest server collapsed, even though the most efficient way to get an entire repository is simply to clone it. Unwilling to spend his free time fighting bots, the author decided not to bring the server back and instead migrated completely to GitLab and GitHub—where most of his repositories were already mirrored—while updating old links to point there.&lt;/p&gt;
&lt;p&gt;The only remaining self-hosted service is the web server running his blog, which moved from WordPress to Jekyll in 2018 and serves static pages that are very hard to overload. Even so, the bots caused another incident: millions of 404 responses weren&amp;rsquo;t enough to convince them that cgit was gone, and the access logs grew so fast that default &lt;code&gt;logrotate&lt;/code&gt; settings couldn&amp;rsquo;t rotate them in time, filling up the disk. He tuned the configuration to fix it. This short story illustrates the very real burden the AI scraping wave places on people running small self-hosted services.&lt;/p&gt;
&lt;h2 id="java-ui-in-2026-the-complete-guide"&gt;&lt;a href="https://robintegg.com/2026/02/08/java-ui-in-2026-the-complete-guide" rel="noopener noreferrer"&gt;Java UI in 2026: The Complete Guide&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Robin Tegg surveys more than 25 Java UI frameworks and libraries as of 2026 across four platforms: web, desktop, mobile, and terminal. His central point is that these aren&amp;rsquo;t legacy relics hanging on for dear life, but production-ready, actively maintained technologies running at major enterprises, banks, and government agencies serving hundreds of millions of users. On the web, Vaadin and Apache Wicket let you write full UIs in Java without JavaScript, PrimeFaces and Jakarta Faces serve the Jakarta EE ecosystem, HTMX paired with Spring Boot follows a hypermedia approach, j2html generates type-safe HTML, Thymeleaf remains the classic template engine choice, and TeaVM compiles Java bytecode to JavaScript or WebAssembly.&lt;/p&gt;
&lt;p&gt;On the desktop, JavaFX is the modern standard, JCEF embeds Chromium for HTML/CSS interfaces, Swing gets a fresh look via FlatLaf, and the NetBeans Platform and Eclipse RCP suit large modular applications with plugin architectures. For mobile, Codename One offers write-once-run-anywhere with cloud iOS builds that don&amp;rsquo;t require a Mac, while Gluon Mobile extends JavaFX with native compilation via GraalVM. In the terminal space, JLine handles command-line input and powers Maven and Gradle, while Lanterna provides a text-GUI toolkit. Each framework comes with a description, code example, getting-started links, and a decision matrix for picking the right tool for each scenario.&lt;/p&gt;
&lt;h2 id="java-full-stack-development-in-2026"&gt;&lt;a href="https://www.ophion.org/2026/02/java-full-stack-development-in-2026/" rel="noopener noreferrer"&gt;Java Full Stack Development in 2026&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author recounts migrating &lt;a href="https://www.scanii.com" rel="noopener noreferrer"&gt;www.scanii.com&lt;/a&gt; from a Spring Boot application using webpack and TypeScript to a leaner architecture where all rendering happens on the server. In his view, React, TypeScript, and split codebases only make sense when you have specialized front-end and back-end teams; for a small team of generalists, simplicity yields much higher productivity. The result is a unified codebase that launches with a single &amp;ldquo;Run&amp;rdquo; button in IntelliJ, zero front-end build time with live reload, partial page updates that still feel like a single-page app, a 100 Lighthouse performance score, and easier debugging with no transpilation step in the way.&lt;/p&gt;
&lt;p&gt;The migration took three steps. First was picking a template engine supported by Spring Boot; the team chose JTE because it gives access to the full JDK right inside templates. Next was dropping the bundler in favor of standard HTML &lt;code&gt;importmaps&lt;/code&gt;, paired with WebJars to serve libraries directly from the app without third-party CDNs. Finally, they added interactivity with Hotwire&amp;rsquo;s Turbo and Stimulus, following the Rails playbook to get partial page updates and a familiar MVC structure for the remaining JavaScript. Two major hurdles were the lack of hot reload—solved by having the browser poll for changes while the server watches the filesystem—and Spring Security&amp;rsquo;s per-form random CSRF tokens, which clashed with Turbo&amp;rsquo;s page caching. The team wrote a custom CSRF filter based on the browser&amp;rsquo;s &lt;code&gt;Sec-Fetch-Site&lt;/code&gt; header.&lt;/p&gt;
&lt;h2 id="sharding-databases-with-spring-boot-patterns-pitfalls-and-failure-modes"&gt;&lt;a href="https://dev.to/adamthedeveloper/sharding-databases-with-spring-boot-patterns-pitfalls-and-failure-modes-4p37" rel="noopener noreferrer"&gt;Sharding Databases with Spring Boot: Patterns, Pitfalls, and Failure Modes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This guide explains database sharding—horizontally partitioning data across multiple smaller databases—and how to implement it with Spring Boot. Sharding becomes necessary when vertical scaling hits a wall, queries degrade with table size, write throughput becomes a bottleneck, or higher availability is required. The most consequential decision is choosing the shard key, such as a user ID or tenant ID: it needs high cardinality, should keep most queries on a single shard, and must rarely change. The article compares four strategies—range-based, hash-based, directory/lookup-based, and geo-based—and shows why simple modulo hashing forces almost every key to move when shards are added or removed, whereas consistent hashing only disturbs roughly 1/N of the keys on average.&lt;/p&gt;
&lt;p&gt;The implementation walkthrough covers configuring multiple data sources, a shard resolution service, and a routing &lt;code&gt;JdbcTemplate&lt;/code&gt;. Queries that include the shard key go straight to one shard, while queries without it must scatter-gather across all shards. Cross-shard joins are the hardest part and can be handled via denormalization, application-level joins, or co-locating related data on the same shard. Because two-phase commit is slow and prone to blocking when the coordinator fails, the author recommends the Saga pattern and embracing eventual consistency. The post also covers monitoring with Actuator, zero-downtime migration via dual writes, and common pitfalls like picking the wrong shard key, hardcoding the shard count, or lacking per-shard backups. Bottom line: only shard when you truly have to.&lt;/p&gt;
&lt;h2 id="go-made-me-fast-rust-made-me-care-aws-made-me-pay"&gt;&lt;a href="https://dev.to/tirixa-hub/go-made-me-fast-rust-made-me-care-aws-made-me-pay-2f82" rel="noopener noreferrer"&gt;Go Made Me Fast, Rust Made Me Care, AWS Made Me Pay&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author reflects that for years of running Go on AWS everything seemed fine—fast deployments, productive teams—until realizing that in the cloud, systems rarely fail loudly; they &amp;ldquo;fail financially.&amp;rdquo; Go earns its place as a default backend language thanks to its simple concurrency model, strong standard library, small binaries, fast startup, and predictable failure modes. The catch is that inefficiency compounds quietly: an extra 10% CPU here, 200MB of memory there, one more instance &amp;ldquo;just to be safe.&amp;rdquo; Go&amp;rsquo;s garbage collector, good as it is, still costs memory headroom, CPU cycles, tail-latency spikes under load, and lower container density—while AWS simply sends the bill.&lt;/p&gt;
&lt;p&gt;Rust entered the picture when high-throughput services and streaming data pipelines started straining Go. The author stresses that Rust isn&amp;rsquo;t magically faster; it forces developers to confront allocations, ownership, memory layout, and cache behavior. The first Rust service took three times longer to write, but in production its memory graph was flat, latency stayed rock-steady, and CPU usage matched expectations. That translated into smaller EC2 instances, higher container density, fewer OOM kills on ECS/EKS, and lower Lambda bills for CPU-heavy workloads. The takeaway is to put each language where it shines: Go for APIs, business logic, and glue code; Rust for data pipelines, latency-sensitive components, and CPU-bound tasks.&lt;/p&gt;
&lt;h2 id="the-cloud-is-not-your-computer-why-go-and-rust-developers-secretly-miss-the-monolith"&gt;&lt;a href="https://dev.to/tirixa-hub/the-cloud-is-not-your-computer-why-go-and-rust-developers-secretly-miss-the-monolith-594c" rel="noopener noreferrer"&gt;The Cloud Is Not Your Computer: Why Go and Rust Developers Secretly Miss the Monolith&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In a companion piece written with a satirical edge, the same author argues that the cloud isn&amp;rsquo;t your computer—it&amp;rsquo;s a negotiation. Writing Go or Rust gives you a sense of determinism and control, yet in the cloud the &amp;ldquo;server&amp;rdquo; is virtual, the &amp;ldquo;disk&amp;rdquo; is over the network, the &amp;ldquo;network&amp;rdquo; is software-defined, and the security boundary is an IAM policy copy-pasted from somewhere, meaning you aren&amp;rsquo;t really running software so much as &amp;ldquo;renting probability.&amp;rdquo; Go assumes everything can fail and calmly returns an &lt;code&gt;error&lt;/code&gt;, while Rust makes you prove memory ownership up front, yet that carefully verified binary still runs behind layers of containers, clusters, VPCs, load balancers, and CDNs. You debug the code while the real culprit is a security group or a missing index.&lt;/p&gt;
&lt;p&gt;The author admits a nostalgia for the monolith because it was predictable, easy to deploy, and straightforward to debug: SSH into one machine, read the logs, and fix the issue, instead of opening CloudWatch, Prometheus, Grafana, and Datadog while still having no idea why a &lt;code&gt;503&lt;/code&gt; happened. Even so, Go and Rust thrive in the cloud because they are honest languages in an dishonest environment: Go treats errors as first-class values, Rust proves memory safety at compile time, and both reduce uncertainty. Consequently, a great cloud engineer today doesn&amp;rsquo;t just write good code—they understand network topology, IAM blast radius, observability strategy, latency budgets, failure domains, and cost models.&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_!V-F7!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F57c857fb-0db2-4701-93f7-343fac614657_2250x2862.png" alt="Must-Know Software Architecture Patterns"&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 #81</title><link>https://miti99.com/en/post/2026/02/18/</link><pubDate>Wed, 18 Feb 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/02/18/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #81.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="java-interview-question---why-you-should-not-use-static-initializers"&gt;&lt;a href="https://javabulletin.substack.com/p/java-interview-question-why-you-should" rel="noopener noreferrer"&gt;Java Interview Question - Why you should not use static initializers?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post explains why you should avoid static initializer blocks (&lt;code&gt;static { ... }&lt;/code&gt;) in Java, even though they look convenient for setting up complex static state. The biggest hazard is that a static block runs when the JVM initializes the class (the first time an instance is created, a static method is called, or a non-constant static field is accessed): if it throws an uncaught exception, the JVM wraps it in an &lt;code&gt;ExceptionInInitializerError&lt;/code&gt; and marks the class as permanently unusable, causing subsequent accesses and dependent classes to fail in a cascade that is notoriously painful to debug. Static blocks also execute implicitly at times developers rarely control, hiding side effects. Worse, when multiple classes have interdependent static blocks, initialization order depends on whichever class happens to be touched first at runtime rather than clear application logic, breeding subtle order-dependent bugs.&lt;/p&gt;
&lt;p&gt;Instead, the author recommends lazy initialization or constructor-based dependency injection so initialization happens explicitly when needed. That allows exceptions to be handled gracefully, prevents the application from crashing at startup over an unused class, makes unit testing much easier, and keeps code clear and maintainable.&lt;/p&gt;
&lt;h2 id="how-to-write-high-performance-code"&gt;&lt;a href="https://blog.bytebytego.com/p/how-to-write-high-performance-code" rel="noopener noreferrer"&gt;How to Write High-Performance Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This ByteByteGo article distills foundational principles for writing high-performance code without requiring deep systems expertise, starting with building intuition for where performance actually matters—typically just ~3% of a codebase. The first skill is back-of-the-envelope cost estimation before writing code: CPU cache accesses take nanoseconds, RAM is roughly 100x slower, SSD reads are 40,000x slower, and network calls are slower still. For example, processing one million records with a separate 50 ms database round-trip per record would take nearly 14 hours, whereas batching 1,000 records per query brings total time down to about 50 seconds. The golden rule is to measure first and optimize second, since human intuition about bottlenecks is frequently wrong; always profile against realistic workloads.&lt;/p&gt;
&lt;p&gt;Algorithmic improvements yield the largest speedups—often 10x to 100x: finding common elements between two 1,000-item lists with nested loops takes a million comparisons (&lt;code&gt;O(N²)&lt;/code&gt;), while loading one list into a hash set takes just ~1,000 lookups (&lt;code&gt;O(N)&lt;/code&gt;). Memory layout matters just as much: data accessed together should sit contiguously in memory, which is why arrays usually outperform linked lists by making full use of CPU cache lines. Finally, the post recommends minimizing memory allocations, pre-allocating container capacity, pooling and reusing objects, adding fast paths for common cases, and eliminating unnecessary work altogether.&lt;/p&gt;
&lt;h2 id="introducing-moltworker-a-self-hosted-personal-ai-agent-minus-the-minis"&gt;&lt;a href="https://blog.cloudflare.com/moltworker-self-hosted-ai-agent/" rel="noopener noreferrer"&gt;Introducing Moltworker: a self-hosted personal AI agent, minus the minis&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cloudflare introduces Moltworker, a way to run Moltbot (the open-source personal AI assistant, renamed OpenClaw in January 2026) entirely on Cloudflare&amp;rsquo;s platform instead of buying a dedicated Mac mini. The architecture consists of an entrypoint Worker acting as an API router and proxy alongside adapted scripts, all protected behind Cloudflare Access. Under the hood, the Sandbox SDK provides isolated containers to run Moltbot&amp;rsquo;s native runtime with a clean API for command execution and lifecycle management; Browser Rendering provides a headless Chromium instance accessed via a thin Chrome DevTools Protocol proxy so the agent can browse the web, fill out forms, and take screenshots; and R2 stores session state and conversation history, mounted as a filesystem volume so data persists across ephemeral container restarts.&lt;/p&gt;
&lt;p&gt;AI Gateway sits between the agent and model providers, supporting Bring Your Own Key (BYOK) or Unified Billing while centralizing cost tracking and logs. Zero Trust Access protects the API and admin UI with custom authentication policies, automatically issuing JWTs validated on every request. Because Cloudflare Workers now offer deep Node.js compatibility (Cloudflare tested the top 1,000 npm packages and found only 15 incompatible after excluding build tools, CLIs, and browser-only packages), most logic can run directly on Workers. The source code is open-sourced on GitHub, and Cloudflare notes that Moltworker is a proof-of-concept demonstrating that their developer platform can host complex, stateful AI agents without dedicated hardware.&lt;/p&gt;
&lt;h2 id="building-a-high-performance-rotating-bloom-filter-in-java"&gt;&lt;a href="https://medium.com/@udaysagar.2177/building-a-high-performance-rotating-bloom-filter-in-java-a9e75de993bf" rel="noopener noreferrer"&gt;Building a High-Performance Rotating Bloom Filter in Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Uday Sagar walks through building a rotating Bloom filter in his open-source Java library to answer &amp;ldquo;have I seen this element recently?&amp;rdquo; over an unbounded data stream while keeping memory usage strictly bounded. Instead of a single fixed-capacity filter whose false-positive rate climbs toward 100% as it fills up, a rotating Bloom filter partitions stream data into time windows and automatically expires old windows (based on first-insertion time rather than LRU), making it ideal for stream deduplication. For lock-free concurrent writes, threads set bits using Compare-And-Swap (&lt;code&gt;CAS&lt;/code&gt;) loops on an &lt;code&gt;AtomicLongArray&lt;/code&gt; and retry on contention; because bits are spread across millions of positions, collisions are rare, yielding 3–4x higher throughput than lock-based synchronization. When a time window expires, the active filter is copied into an immutable &lt;code&gt;long[]&lt;/code&gt; array for faster reads, forming a chain &lt;code&gt;[ReadOnly-1, ReadOnly-2, ReadOnly-3, Active]&lt;/code&gt;: writes go exclusively to &lt;code&gt;Active&lt;/code&gt;, while reads check from newest to oldest.&lt;/p&gt;
&lt;p&gt;To prevent lost writes when a thread is mid-write as a window rotates, the write path acquires the read lock of a &lt;code&gt;ReentrantReadWriteLock&lt;/code&gt; while the rare rotation step acquires the write lock, leaving queries completely lock-free. Across &lt;em&gt;N&lt;/em&gt; independent windows, the cumulative false-positive rate compounds as &lt;code&gt;1 - (1 - p)^N&lt;/code&gt;, so five windows configured at 1% each produce nearly a 5% overall false-positive rate; configuring per-window rates lower balances retention duration against accuracy. Combined with double hashing and &lt;code&gt;xxHash&lt;/code&gt;, the library achieves millions of operations per second.&lt;/p&gt;
&lt;h2 id="what-every-java-developer-should-know-about-thread-pools"&gt;&lt;a href="https://dev.to/realnamehidden1_61/what-every-java-developer-should-know-about-thread-pools-4jam" rel="noopener noreferrer"&gt;What Every Java Developer Should Know About Thread Pools&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article covers the essentials of thread pools in Java. The author compares spawning a brand-new OS thread for every incoming task to hiring, training, and firing a delivery driver for every single pizza order: it wastes memory and CPU and can crash your server under a traffic spike. A thread pool managed via &lt;code&gt;ExecutorService&lt;/code&gt; maintains a steady pool of worker threads for reuse, bounding the maximum thread count, cutting latency because threads are already warm, and providing a clean API for delayed or periodic scheduling. The post reviews four main flavors: &lt;code&gt;FixedThreadPool&lt;/code&gt; for predictable workloads, &lt;code&gt;CachedThreadPool&lt;/code&gt; which spawns threads on demand and reuses them for short-lived tasks, &lt;code&gt;ScheduledThreadPool&lt;/code&gt; for delayed or recurring jobs, and Java 21&amp;rsquo;s Virtual Threads (&lt;code&gt;newVirtualThreadPerTaskExecutor()&lt;/code&gt;), which run millions of concurrent blocking tasks with minimal overhead.&lt;/p&gt;
&lt;p&gt;On best practices, always shut pools down cleanly (using &lt;code&gt;try-with-resources&lt;/code&gt; in Java 19+), as forgetting to shut down an &lt;code&gt;ExecutorService&lt;/code&gt; is a classic source of memory and thread leaks. For CPU-bound workloads, size the pool to the number of CPU cores; for I/O-bound workloads like database or API calls, use virtual threads. Always give threads meaningful names via a custom &lt;code&gt;ThreadFactory&lt;/code&gt; to make stack traces and thread dumps readable, and avoid &lt;code&gt;newCachedThreadPool()&lt;/code&gt; behind public APIs where a sudden traffic burst can spawn unbounded OS threads.&lt;/p&gt;
&lt;h2 id="goodbye-java-hello-go"&gt;&lt;a href="https://wso2.com/library/blogs/goodbye-java-hello-go" rel="noopener noreferrer"&gt;Goodbye Java, Hello Go!&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;WSO2, the 20-year-old enterprise middleware company whose server-side codebase was roughly 95% Java, announced it is moving to Go for its next generation of products. The primary driver is how cloud infrastructure has changed: in the container era, servers no longer run continuously for months—they spin up, handle traffic, and scale down, while middleware is increasingly embedded as a library inside a single process. Java&amp;rsquo;s post-startup JIT warmup model is a poor fit for ephemeral containers, startup times are measured in seconds rather than milliseconds, and its heavy ecosystem bloats memory and CPU footprints, driving up cloud bills. In WSO2&amp;rsquo;s view, GraalVM native images and Project Loom are band-aids on a language and runtime designed for a different era.&lt;/p&gt;
&lt;p&gt;WSO2 also evaluated Rust but concluded they didn&amp;rsquo;t need it: Rust shines for OS kernels, browsers, and low-level systems software, whereas WSO2 builds API gateways and identity platforms much higher up the stack. Go hits the sweet spot with efficient memory management, pragmatic concurrency primitives, and straightforward cross-compilation to native binaries, backed by a proven track record in cloud-native infrastructure (Kubernetes, Docker), rich libraries, and a large talent pool. The company has already used Go for nearly a decade across projects like OpenChoreo, the Ballerina compiler rewrite, and its Thunder identity platform. Existing Java products will continue to be supported indefinitely.&lt;/p&gt;
&lt;h2 id="tbm-399-10-prioritization-traps"&gt;&lt;a href="https://cutlefish.substack.com/p/tbm-399-10-prioritization-traps" rel="noopener noreferrer"&gt;TBM 399: 10 Prioritization Traps&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;John Cutler shares 10 product prioritization traps, each named after a classic song; the goal isn&amp;rsquo;t making perfect decisions, but making &amp;ldquo;good enough&amp;rdquo; decisions while avoiding catastrophic ones. &amp;ldquo;Burning Down the House&amp;rdquo; is constantly chasing urgent, low-value fires; combat it by ring-fencing 10–20% of capacity for preventative work. &amp;ldquo;Too Much Time on My Hands&amp;rdquo; is over-polishing medium-value work instead of finding the 80/20 cut; force yourself to define the smallest version shippable in 2–4 weeks. &amp;ldquo;Everybody Wants to Rule the World&amp;rdquo; is when everything is labeled &amp;ldquo;top priority&amp;rdquo; and nothing gets dropped; explicitly name one effort that is allowed to slip. &amp;ldquo;Just Enough Is Never Enough&amp;rdquo; is shipping fast MVPs that only capture 20% of the value before moving on; pre-approve a follow-on investment tranche up front. &amp;ldquo;Running on Empty&amp;rdquo; is letting long projects drift without kill signals; set explicit re-commitment checkpoints.&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Dreamer&amp;rdquo; is open-ended innovation work with no forcing function; add a hard constraint like a live customer demo or integration deadline. &amp;ldquo;Slow Ride&amp;rdquo; is ignoring internal developer friction; measure wasted time as cost of delay. &amp;ldquo;Someday Never Comes&amp;rdquo; is deferring high-upside bets forever due to low confidence; run cheap, failure-tolerant experiments to buy information. &amp;ldquo;The Logical Song&amp;rdquo; is ignoring the cost of increasing confidence; always ask, &amp;ldquo;What is the cheapest way to raise our confidence?&amp;rdquo; Finally, &amp;ldquo;Takin&amp;rsquo; Care of Business&amp;rdquo; is when blocked teams invent busywork to stay utilized; maintain a small, well-vetted queue of high-value fallback tasks instead.&lt;/p&gt;
&lt;h2 id="assessing-internal-quality-while-coding-with-an-agent"&gt;&lt;a href="https://martinfowler.com/articles/exploring-gen-ai/ccmenu-quality.html" rel="noopener noreferrer"&gt;Assessing internal quality while coding with an agent&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Writing on Martin Fowler&amp;rsquo;s site, Erik Doernenburg recounts using AI coding agents to add GitLab support to CCMenu, a macOS Swift menu-bar app that displays CI/CD build status. He tested Windsurf with Claude Sonnet 3.5 and later Claude Code with Sonnet 4.5, focusing on an under-discussed dimension: the internal code quality of AI-generated code. The most telling issue occurred when the agent declared the API token parameter on wrapper functions as a non-optional &lt;code&gt;String&lt;/code&gt;, even though the underlying &lt;code&gt;makeRequest&lt;/code&gt; helper accepted an optional &lt;code&gt;String?&lt;/code&gt;; when a caller needed to pass an optional token, the agent patched the call site with &lt;code&gt;apiToken ?? &amp;quot;&amp;quot;&lt;/code&gt; instead of fixing the wrapper&amp;rsquo;s signature—unidiomatic Swift that erased the type system&amp;rsquo;s distinction between &amp;ldquo;no token&amp;rdquo; and an empty string. Beyond that, the agent proposed unnecessary caching, failed to notice fundamental API differences between GitHub and GitLab and wrote convoluted logic for a non-existent problem, duplicated URL-building logic instead of reusing an existing helper, and spun its wheels trying to fetch avatar URLs that lived on a separate endpoint.&lt;/p&gt;
&lt;p&gt;Doernenburg concludes that AI agents naturally gravitate toward accumulating technical debt, making future changes harder for both humans and agents alike. With Windsurf and Sonnet 3.5, the constant supervision required made it not worth the trouble; Claude Code with Sonnet 4.5 was a marked improvement, needing far less hand-holding and proving good enough for regular use. Even so, actively guarding internal code quality remains essential for sustainable software development.&lt;/p&gt;
&lt;h2 id="a"&gt;&lt;a href="https://www.jtolio.com/2026/01/tinyemu-go/" rel="noopener noreferrer"&gt;A &amp;ldquo;Pure Go&amp;rdquo; Linux environment, ported by Claude, inspired by Fabrice Bellard&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;JT Olio recounts using Claude to port Fabrice Bellard&amp;rsquo;s TinyEMU RISC-V emulator from C to pure Go. The result is a pure-Go Linux environment complete with VirtIO devices, filesystem mounting, and networking: a simple &lt;code&gt;go run&lt;/code&gt; boots a Linux environment with root access inside the emulator, requiring no host privileges or containers and running anywhere Go compiles. The first 80% was exhilarating as Claude rapidly translated the foundational subsystems, but the final 20% was grueling: Linux booted the kernel yet failed to mount the &lt;code&gt;initrd&lt;/code&gt;, the project stalled for weeks, and the author lacked mental context because he hadn&amp;rsquo;t written the code himself. Claude repeatedly drifted from instructions, inventing &amp;ldquo;better&amp;rdquo; error handling or ignoring directives to preserve exact C behavior, forcing the author to switch to batch-by-batch function audits cross-referenced against the original C source. He also found the popular agent task tracker Beads overly bloated (294k lines of Go, 128 MB repo) and recommends the lightweight &lt;code&gt;ticket&lt;/code&gt; CLI instead.&lt;/p&gt;
&lt;p&gt;His hard-won lessons for agentic coding: break work into the smallest, most concrete tickets possible; enforce strict commit and test-coverage gates; clear the agent&amp;rsquo;s context window frequently; require the agent to file tickets for any follow-up work or behavioral deviations it encounters; and never expect a cohesive architecture or clean internal API to emerge organically across sessions. The project left him simultaneously impressed and more cautious about LLM coding: writing code by hand is less frustrating and yields higher quality, but at lower throughput; succeeding with Claude means treating it like an eager junior developer who needs tight supervision.&lt;/p&gt;
&lt;h3 id="bonus"&gt;Bonus&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Images:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://substackcdn.com/image/fetch/w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36412c2b-8782-476e-9db4-aaf794629b74_2250x2624.png" alt="How to Scale An API"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!4V7B!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9589feb-6f59-4971-9da4-26712d1a2ca1_2360x2960.png" alt="HTTP/2 over TCP vs HTTP/3 over QUIC"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!ihnd!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe954900-e8d8-40d0-a4b1-2f8e14068882_2360x2960.png" alt="How Git Really Stores Your Data"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!5SHy!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcbddfb5f-a652-4749-b0b9-210102774f4f_2360x2960.png" alt="How NAT Works"&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 #77</title><link>https://miti99.com/en/post/2026/01/24/</link><pubDate>Sat, 24 Jan 2026 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2026/01/24/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #77.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="stop-forwarding-errors-start-designing-them"&gt;&lt;a href="https://fast.github.io/blog/stop-forwarding-errors-start-designing-them/" rel="noopener noreferrer"&gt;Stop Forwarding Errors, Start Designing Them&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article argues that most Rust developers merely &amp;ldquo;forward&amp;rdquo; errors rather than truly handling them: catching an error, wrapping it thinly, and propagating it up the call stack as fast as possible. The original low-level message survives intact, but almost all higher-level context is lost. The author points out the limitations of familiar tools: &lt;code&gt;std::error::Error&lt;/code&gt; assumes a linear chain of causes via &lt;code&gt;source()&lt;/code&gt; even though real-world failures often have multiple contributing causes; stack traces are expensive, misleading in async code, and only show where an error originated rather than the logical path execution took. Meanwhile, &lt;code&gt;thiserror&lt;/code&gt; categorizes errors by origin rather than by how callers can react, &lt;code&gt;anyhow&lt;/code&gt; makes adding context optional so it is routinely skipped, and the dynamic &lt;code&gt;Provide&lt;/code&gt;/&lt;code&gt;Request&lt;/code&gt; API makes behavior hard to predict.&lt;/p&gt;
&lt;p&gt;The proposed solution is to design errors for two distinct audiences. For machines, use a flat error struct categorized by error kind (similar to Apache OpenDAL&amp;rsquo;s design) with explicit retryability status—such as permanent, temporary, or persistent—so code can decide whether to retry or abort without walking nested error chains. For humans, use tree-structured context tracking that automatically records call sites via &lt;code&gt;#[track_caller]&lt;/code&gt; at near-zero cost and enforces adding context across module boundaries through the type system (as in the &lt;code&gt;exn&lt;/code&gt; crate). The guiding question when designing errors should be: &amp;ldquo;If the system breaks at 3 a.m., what do you want the logs to say?&amp;rdquo;&lt;/p&gt;
&lt;h2 id="clock-synchronization-is-a-nightmare"&gt;&lt;a href="https://arpitbhayani.me/blogs/clock-sync-nightmare/" rel="noopener noreferrer"&gt;Clock Synchronization Is a Nightmare&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post explains why synchronizing time across distributed systems is far harder than intuition suggests: there simply is no &amp;ldquo;global clock.&amp;rdquo; Every computer keeps time using a quartz crystal oscillating at 32,768 Hz, but manufacturing tolerances and temperature swings cause clocks to drift; two machines started at the exact same instant can drift hundreds of milliseconds apart after a single day. Instantaneous clock skew between two machines leads to subtle bugs: in a distributed &lt;code&gt;make&lt;/code&gt; build, a compiled object file can appear newer than a freshly edited source file and fail to recompile; in banking, a withdrawal timestamped earlier than a preceding deposit can make an account appear overdrawn.&lt;/p&gt;
&lt;p&gt;Physical clock synchronization techniques include Cristian&amp;rsquo;s algorithm (estimating one-way network delay as half the round-trip time), the Berkeley algorithm (averaging time across nodes and sending relative adjustments), hierarchical NTP backed by atomic or GPS clocks (achieving millisecond accuracy over the internet), and PTP using hardware timestamping on network interface cards for sub-microsecond accuracy. Google Spanner&amp;rsquo;s TrueTime returns a bounded uncertainty interval &lt;code&gt;[earliest, latest]&lt;/code&gt; instead of a single point in time. Logical clocks include Lamport Timestamps, Vector Clocks that capture causality rather than wall-clock time, and Hybrid Logical Clocks (used in CockroachDB) that combine both. The takeaway: there is no perfect clock sync, only trade-offs between accuracy, latency, and complexity depending on your system&amp;rsquo;s needs.&lt;/p&gt;
&lt;h2 id="java---learning-roadmap"&gt;&lt;a href="https://nemorize.com/roadmaps/java" rel="noopener noreferrer"&gt;Java - Learning Roadmap&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This is a structured Java learning roadmap on the Nemorize platform that guides learners from foundational setup through enterprise application development. It begins with prerequisites like basic Linux, Git version control, and choosing an IDE, then moves into object-oriented programming (classes, objects, inheritance, polymorphism, encapsulation, abstraction), and covers core language features including the Collections Framework, exception handling, and Streams. Advanced topics include concurrency and multithreading, JVM internals, design patterns, and Dependency Injection.&lt;/p&gt;
&lt;p&gt;The final sections focus on professional engineering skills: testing (unit, integration, contract), build tools like Maven and Gradle, working with databases, Spring Boot for enterprise applications, and principles like Clean Code, SOLID, API design, and system monitoring. Each topic follows a three-step loop: read the lesson, practice with quizzes, and track progress (requires sign-in). At the time of writing, roughly 14 of the 44 topics have full lessons available with the rest being added progressively, making it a useful reference roadmap for beginners wondering what order to learn Java in.&lt;/p&gt;
&lt;h2 id="the-ultimate-guide-to-successfully-adopting-kotlin-in-a-java-dominated-environment"&gt;&lt;a href="https://blog.jetbrains.com/kotlin/2025/12/the-ultimate-guide-to-successfully-adopting-kotlin-in-a-java-dominated-environment/" rel="noopener noreferrer"&gt;The Ultimate Guide to Successfully Adopting Kotlin in a Java-Dominated Environment&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;JetBrains&amp;rsquo; guide frames introducing Kotlin into a predominantly Java organization not as flipping a switch or rewriting everything from scratch, but as a challenge of people, timing, risk management, and trust. The roadmap spans five stages. First, get comfortable with Kotlin in test suites (using Kotest and MockK) where production isn&amp;rsquo;t at risk, answering the question, &amp;ldquo;Is this language genuinely nicer to work with?&amp;rdquo; Next, evaluate Kotlin in real production work by building a small new service or adding a Kotlin module to an existing system while avoiding the trap of &amp;ldquo;writing Java in Kotlin syntax&amp;rdquo;: use extension functions instead of static utility classes, nullable types instead of &lt;code&gt;Optional&lt;/code&gt;, and data classes instead of boilerplate POJOs.&lt;/p&gt;
&lt;p&gt;Stage three is building internal momentum through short demos, starter template repositories, and pair programming. Stage four is making the business case to management: less code to maintain, fewer bugs thanks to null safety, 100% Java interoperability so no big-bang rewrite is required, and predictable ramp-up costs. Finally, when scaling adoption across the organization, treat each system according to its lifecycle: leave sunsetting applications alone, default to Kotlin for greenfield projects, and migrate active systems incrementally with the help of IDE conversion tools, JSpecify nullability annotations, and AI-assisted refactoring.&lt;/p&gt;
&lt;h2 id="rust-vs-go"&gt;&lt;a href="https://bitfieldconsulting.com/posts/rust-vs-go" rel="noopener noreferrer"&gt;Rust vs Go&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;John Arundel compares Rust and Go across performance, simplicity, safety, features, scalability, and concurrency, summing up the trade-off in a single phrase: &amp;ldquo;Rust for high stakes, Go for low cost.&amp;rdquo; Both are compiled languages that produce small, fast native binaries and come with great built-in tooling (&lt;code&gt;gofmt&lt;/code&gt;, &lt;code&gt;rustfmt&lt;/code&gt;). Their difference lies in philosophy: Go is a small, easy-to-learn, fast-compiling garbage-collected language that prioritizes developer velocity and stability, with goroutines and channels making concurrency remarkably approachable. Rust prioritizes correctness, peak performance, and low-level control, using its borrow checker to eliminate memory bugs at compile time without a garbage collector, at the cost of a steeper learning curve.&lt;/p&gt;
&lt;p&gt;For error handling, Go uses explicit &lt;code&gt;if err != nil&lt;/code&gt; checks, while Rust uses &lt;code&gt;Option&lt;/code&gt;/&lt;code&gt;Result&lt;/code&gt; types paired with the &lt;code&gt;?&lt;/code&gt; operator. Go shines when fast onboarding, rapid prototyping, and cost-effective delivery matter most—such as web services, microservices, infrastructure tooling, and business automation. Rust shines when reliability, predictable latency, and resource efficiency are mission-critical—such as automotive, aerospace, medical devices, and industrial systems. He views the two languages as complementary tools rather than rivals, and to the question &amp;ldquo;Should I learn Rust or Go?&amp;rdquo;, his answer is: learn both.&lt;/p&gt;
&lt;h2 id="the-most-popular-go-dependency-is"&gt;&lt;a href="https://blog.thibaut-rousseau.com/blog/the-most-popular-go-dependency-is/" rel="noopener noreferrer"&gt;The most popular Go dependency is…&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Thibaut Rousseau sets out to find the most depended-upon library in the Go ecosystem by tapping into Go&amp;rsquo;s centralized module proxy infrastructure. Instead of cloning individual repositories, he downloaded the full module index from &lt;code&gt;index.golang.org&lt;/code&gt; (listing every module version published since the Go proxy launched in 2019), fetched each module&amp;rsquo;s &lt;code&gt;go.mod&lt;/code&gt; file via &lt;code&gt;proxy.golang.org&lt;/code&gt; to extract its dependencies, and loaded everything into a Neo4j graph database. The resulting graph contains roughly 40 million nodes and 400 million relationships, averaging about 10 direct dependencies per module version node in the dataset.&lt;/p&gt;
&lt;p&gt;Topping the leaderboard is &lt;code&gt;testify&lt;/code&gt; with 259,237 dependent modules, far ahead of the runners-up: &lt;code&gt;google/uuid&lt;/code&gt; (104,877), &lt;code&gt;golang.org/x/crypto&lt;/code&gt; (100,633), &lt;code&gt;grpc&lt;/code&gt; (97,228), &lt;code&gt;cobra&lt;/code&gt; (93,062), &lt;code&gt;pkg/errors&lt;/code&gt; (92,491), &lt;code&gt;golang.org/x/net&lt;/code&gt;, &lt;code&gt;protobuf&lt;/code&gt;, &lt;code&gt;logrus&lt;/code&gt;, and &lt;code&gt;viper&lt;/code&gt;. Testing and utility libraries dominate the list, alongside Go&amp;rsquo;s extended standard library packages (&lt;code&gt;golang.org/x/&lt;/code&gt;). Notably, even though &lt;code&gt;pkg/errors&lt;/code&gt; has been deprecated and archived for years, version &lt;code&gt;v0.9.1&lt;/code&gt; alone still had 16,001 transitive dependents in 2025. The post also demonstrates how to query Neo4j with Cypher to trace direct and transitive dependencies, showing how naturally graph databases fit dependency analysis. He shares the dataset dump via BitTorrent so the community can run their own queries and plans to enrich it with metadata like GitHub stars.&lt;/p&gt;
&lt;h2 id="gosum-is-not-a-lockfile"&gt;&lt;a href="https://words.filippo.io/gosum/" rel="noopener noreferrer"&gt;go.sum Is Not a Lockfile&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Filippo Valsorda clears up a widespread misconception: many developers treat &lt;code&gt;go.sum&lt;/code&gt; as a lockfile analogous to Node&amp;rsquo;s &lt;code&gt;package-lock.json&lt;/code&gt; or Rust&amp;rsquo;s &lt;code&gt;Cargo.lock&lt;/code&gt;, when in reality &lt;code&gt;go.sum&lt;/code&gt; is merely a local cache of the Go Checksum Database—a lookup table mapping module versions to their cryptographic hashes. Versions listed in &lt;code&gt;go.sum&lt;/code&gt; may or may not actually be used in a build, and the file plays zero role in version resolution; in the original Go modules design, it wasn&amp;rsquo;t even enabled by default because it has no effect on build selection. The sole purpose of &lt;code&gt;go.sum&lt;/code&gt; is security: the Checksum Database ensures the entire ecosystem receives identical bytes for a given module version, and &lt;code&gt;go.sum&lt;/code&gt; makes that guarantee work locally and offline.&lt;/p&gt;
&lt;p&gt;The file you actually want to look at is &lt;code&gt;go.mod&lt;/code&gt;, which serves as both manifest and lockfile. Since Go 1.17 (August 2021), &lt;code&gt;go.mod&lt;/code&gt; records every transitive dependency needed to build the main module and run its tests, pinned to exact versions in a single human-readable file. Combined with Minimal Version Selection (MVS), this lets Go avoid diamond dependency conflicts, prevents accidentally relying on features from newer transitive versions than declared, and never silently pulls the latest (potentially compromised) version of a package when adding a new dependency—all while making dependency resolution so fast that nobody even notices it. To analyze a Go dependency graph, parse &lt;code&gt;go.mod&lt;/code&gt; using &lt;code&gt;golang.org/x/mod/modfile&lt;/code&gt; or &lt;code&gt;go mod edit -json&lt;/code&gt;, and never parse &lt;code&gt;go.sum&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="forgejo-actions-notification-development"&gt;&lt;a href="https://chris-besch.com/articles/forgejo_actions_notification/" rel="noopener noreferrer"&gt;Forgejo Actions Notification Development&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Christopher Besch shares his experience contributing to Forgejo, a self-hosted software forge similar to GitHub and GitLab. He needed email and webhook notifications when CI workflows failed—a feature Forgejo lacked—so he built it himself. The post explains how Go projects organize code into modules (via &lt;code&gt;go.mod&lt;/code&gt;) and packages without a central registry like npm, then walks through Forgejo&amp;rsquo;s layered architecture consisting of &lt;code&gt;/routers&lt;/code&gt; (APIs and web UI), &lt;code&gt;/services&lt;/code&gt; (business logic), &lt;code&gt;/models&lt;/code&gt; (database access), and &lt;code&gt;/modules&lt;/code&gt; (self-contained utilities), where lower layers are forbidden from importing higher layers. To avoid circular dependencies, Forgejo uses a publish–subscribe pattern in &lt;code&gt;forgejo.org/services/notify&lt;/code&gt;: packages publish events to a topic, and interested packages subscribe to it.&lt;/p&gt;
&lt;p&gt;He split the feature across four pull requests to keep reviews manageable: PR #7510 moved code from &lt;code&gt;/models/actions&lt;/code&gt; to &lt;code&gt;/services/actions&lt;/code&gt; to respect architectural boundaries, PR #7491 added an &lt;code&gt;ActionRunNowDone&lt;/code&gt; hook to the pub-sub notifier, PR #7509 subscribed the mailer service to send emails when workflows fail or recover, and PR #7508 added webhook delivery. He also recounts having to rename a struct due to a merge conflict with a parallel PR. The final section walks through setting up a local development environment: compiling Forgejo with debug symbols, running the Forgejo Runner, spinning up a MailDev SMTP server in Docker, writing a tiny Node.js webhook receiver script, and running unit tests, integration tests, and the Delve debugger. His takeaway: thorough tests are the key to earning maintainers&amp;rsquo; trust in your contributions.&lt;/p&gt;
&lt;h3 id="bonus"&gt;Bonus&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Images:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://substackcdn.com/image/fetch/w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ec94ed4-46b2-40bd-8d28-a25fdde639c8_2250x2624.png" alt="Message Brokers 101"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!hXRV!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe99863c7-7ab7-4f61-9961-af7e4c6ee64f.png" alt="Cloud Load Balancer Cheat Sheet"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!XvtW!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ded3402-4eb5-4818-861f-7661f1cefe82.tif" alt="How CQRS Works?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!SUjA!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd91a5538-a69e-468c-bf83-058bb78753ca_2360x2770.png" alt="How does Docker Work?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!4qBZ!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0945414-9cea-4e64-8dd4-3abcc404f73e_2360x2960.png" alt="Containerization Explained: From Build to Runtime"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!n8BK!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa51a75cc-09a9-4fed-af8a-c32a64f8ab60_2250x2624.png" alt="Must-Know Message Broker Patterns"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #69</title><link>https://miti99.com/en/post/2025/12/12/</link><pubDate>Fri, 12 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/12/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #69. &lt;del&gt;This post was created using &lt;a href="https://github.com/anthropics/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://github.com/musistudio/claude-code-router" rel="noopener noreferrer"&gt;Claude Code Router&lt;/a&gt;, &lt;a href="https://platform.iflow.cn" rel="noopener noreferrer"&gt;iFlow Open Platform&lt;/a&gt; &amp;amp; GLM-4.6&lt;/del&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-and-why-netflix-built-a-real-time-distributed-graph-part-1--ingesting-and-processing-data-streams-at-internet-scale"&gt;&lt;a href="https://netflixtechblog.com/how-and-why-netflix-built-a-real-time-distributed-graph-part-1-ingesting-and-processing-data-80113e124acc" rel="noopener noreferrer"&gt;How and Why Netflix Built a Real-Time Distributed Graph: Part 1 — Ingesting and Processing Data Streams at Internet Scale&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As Netflix expanded beyond on-demand video streaming into ad-supported tiers, live events, and mobile games, understanding a member&amp;rsquo;s journey across devices and business lines grew increasingly difficult. A microservices architecture with hundreds of services—each managing its own data store—fragmented the data and forced analytics teams to stitch records together manually. In response, Netflix&amp;rsquo;s data engineering team built the Real-Time Distributed Graph (RDG): modeling domain entities as a graph so relationships can be queried via multi-hop traversals across nodes and edges rather than expensive relational &lt;code&gt;JOIN&lt;/code&gt;s, making it easy to onboard new entity types and spot behavioral patterns or anomalies.&lt;/p&gt;
&lt;p&gt;Part 1 focuses on the ingestion and stream-processing pipeline. User interactions flow through the API Gateway into Kafka topics (some handling up to ~1 million messages per second, encoded in Avro and simultaneously archived to Apache Iceberg tables for historical backfills). Apache Flink jobs filter out noise, enrich events with metadata, transform raw events into graph nodes and edges, and batch and deduplicate updates within a short time window before writing over 5 million records per second into Netflix&amp;rsquo;s Data Mesh. A key operational lesson: running a single monolithic Flink job across all topics proved nearly impossible to tune, so the team moved to one Flink job per Kafka topic—accepting higher operational overhead in exchange for isolation and independent tuning.&lt;/p&gt;
&lt;h2 id="start-small-scale-smart-the-real-value-of-incremental-architecture"&gt;&lt;a href="https://newsletter.optimistengineer.com/p/incremental-architecture-what-you" rel="noopener noreferrer"&gt;Start Small, Scale Smart: The Real Value of Incremental Architecture&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Incremental architecture is the practice of designing systems so they can evolve gracefully, grounded in Gall&amp;rsquo;s Law: if you start with a complex system from scratch, you will end up with a complex system that doesn&amp;rsquo;t work. In the author&amp;rsquo;s view, team organization matters more than technology: cross-functional teams that own a business domain end-to-end outperform layer-siloed teams, and if you want microservices, you must first build independent teams. Architects should act as mentors who still write code and steward system coherence rather than handing down mandates from an ivory tower, spreading knowledge through pair and mob programming. Instead of asking &amp;ldquo;how long will this take?&amp;rdquo;, ask &amp;ldquo;how can we make this smaller?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;On the technical side, the post advises applying architectural patterns only when you actually feel the pain they solve, using the Strangler Fig pattern to incrementally extract cleaner modules out of legacy monoliths, and building small, single-responsibility, replaceable components with firm boundaries—which naturally become candidates for future microservices. Event-driven architecture reduces coupling by letting components emit events instead of relying on central orchestration, while Domain-Driven Design and a shared Ubiquitous Language clarify events, consequences, and actors before anyone writes a line of code.&lt;/p&gt;
&lt;h2 id="java-interview-question---why-collection-doesn"&gt;&lt;a href="https://javabulletin.substack.com/p/java-interview-question-why-collection" rel="noopener noreferrer"&gt;Java Interview Question - Why Collection doesn&amp;rsquo;t extend Cloneable and Serializable interfaces?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This interview question explores a classic Java design decision: why the root &lt;code&gt;Collection&lt;/code&gt; interface does not extend &lt;code&gt;Cloneable&lt;/code&gt; or &lt;code&gt;Serializable&lt;/code&gt;. The core reason is that not every collection can—or should—be cloned or serialized, so forcing both interfaces at the top of the hierarchy would impose unrealistic constraints on specialized implementations. For example, &lt;code&gt;Collections.unmodifiableList()&lt;/code&gt; is just a read-only view where deep cloning would break its semantics, &lt;code&gt;WeakHashMap&lt;/code&gt; relies on JVM-managed weak references that don&amp;rsquo;t make sense to serialize, and a &lt;code&gt;TreeMap&lt;/code&gt; configured with a non-serializable &lt;code&gt;Comparator&lt;/code&gt; cannot be serialized either. (Note that &lt;code&gt;ConcurrentSkipListMap&lt;/code&gt; actually &lt;em&gt;does&lt;/em&gt; implement both &lt;code&gt;Cloneable&lt;/code&gt; and &lt;code&gt;Serializable&lt;/code&gt;, so it isn&amp;rsquo;t an example of this restriction.)&lt;/p&gt;
&lt;p&gt;Furthermore, both &lt;code&gt;Cloneable&lt;/code&gt; and &lt;code&gt;Serializable&lt;/code&gt; are flawed marker interfaces from Java 1.0: &lt;code&gt;Cloneable&lt;/code&gt; declares no methods of its own and encourages error-prone shallow copies, while &lt;code&gt;Serializable&lt;/code&gt; creates versioning headaches and security vulnerabilities. When the Collections Framework was introduced in Java 1.2, its designers left it up to concrete classes like &lt;code&gt;ArrayList&lt;/code&gt; or &lt;code&gt;HashMap&lt;/code&gt; to opt in where appropriate, keeping the core abstraction clean. In modern Java, it&amp;rsquo;s better to copy collections via copy constructors like &lt;code&gt;new ArrayList&amp;lt;&amp;gt;(list)&lt;/code&gt; or &lt;code&gt;List.copyOf()&lt;/code&gt;, and use explicit formats like JSON instead of default Java serialization.&lt;/p&gt;
&lt;h2 id="we-stopped-roadmap-work-for-a-week-and-fixed-189-bugs"&gt;&lt;a href="https://lalitm.com/fixits-are-good-for-the-soul/" rel="noopener noreferrer"&gt;We stopped roadmap work for a week and fixed 189 bugs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author shares the story of a quarterly &amp;ldquo;Fixit Week,&amp;rdquo; where an organization of roughly 45 engineers paused all roadmap work for a full week. Across two time zones, 40 participating engineers squashed 189 bugs—averaging more than 4 bugs per person, with the top contributor fixing 12. The ground rules were strict: no single bug could take more than 2 days, work had to focus on small end-user papercuts or developer-productivity improvements, and all regular meetings, design reviews, and roadmap tasks were canceled. The event was gamified with point values scaled by task size, a live leaderboard, daily recaps, and custom t-shirts for awards like &amp;ldquo;first bug fixed&amp;rdquo; and &amp;ldquo;most annoying bug squashed.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Standout wins included closing a four-year-old feature request in a single day and shipping a 25-line GitHub Action that saved frontend engineers repetitive daily toil. Key ingredients for success were prepping a triaged, t-shirt-sized backlog ahead of time, reaching critical mass so the whole team felt the energy, keeping Fixit points strictly separate from performance reviews, and leaning on AI coding tools to lower the context-switching cost of jumping into unfamiliar directories. As the author concludes, Fixit Weeks restore pride in craftsmanship, the joy of shipping immediate improvements, and team camaraderie.&lt;/p&gt;
&lt;h2 id="the-math-of-why-you-can"&gt;&lt;a href="https://justoffbyone.com/posts/math-of-why-you-cant-focus-at-work/" rel="noopener noreferrer"&gt;The Math of Why You Can&amp;rsquo;t Focus at Work&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post models knowledge-worker productivity using three parameters: λ, the rate of interruptions per hour (modeled as a Poisson process); Δ, the number of minutes needed to regain focus after each interruption; and θ, the minimum contiguous block of focused time required to make meaningful progress (typically 30–60 minutes for complex engineering work). Effective work capacity is the number of θ-sized blocks that fit inside the uninterrupted gaps—meaning that the same total number of hours, when chopped into fragments, yields drastically less output than contiguous blocks. Cited workplace studies suggest knowledge workers are interrupted every 2–3 minutes on average and take 10–16 minutes to refocus.&lt;/p&gt;
&lt;p&gt;Plug those typical workplace numbers into the math and deep work becomes nearly impossible—yet small shifts in any of the three parameters produce massive gains. The author points to three practical levers: lower λ by setting communication boundaries and defending calendar blocks, shrink θ to fit your environment by decomposing tasks into smaller self-contained steps, and reduce Δ through better context management, such as leaving yourself breadcrumb notes so you can resume work quickly after an interruption.&lt;/p&gt;
&lt;h2 id="tech-predictions-for-2026-and-beyond"&gt;&lt;a href="https://www.allthingsdistributed.com/2025/11/tech-predictions-for-2026-and-beyond.html" rel="noopener noreferrer"&gt;Tech predictions for 2026 and beyond&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Werner Vogels outlines five technology predictions for 2026 and beyond. First, physical AI will redefine companionship for vulnerable populations: loneliness affects one in six people worldwide and raises mortality risk by 32%, whereas clinical studies with the Paro robotic seal showed positive engagement in 95% of dementia patients. Second is the rise of the &amp;ldquo;renaissance developer&amp;rdquo;: generative AI will elevate rather than replace developers—just as compilers and cloud computing did before—because humans still own business constraints, customer empathy, and systems thinking. Third, quantum-safe security becomes urgent as the estimated qubit count needed to break 2048-bit RSA has dropped below one million, and Vogels predicts quantum computers capable of breaking RSA and elliptic-curve cryptography could arrive within roughly five years.&lt;/p&gt;
&lt;p&gt;Fourth, modern defense tech is being built as dual-use from day one, crossing over into civilian applications far faster than the 10–20-year lag of previous decades, with companies like Anduril reaching $1 billion in revenue in 2024. Finally, AI-powered personalized education will go mainstream: AI tutors cost around $4 a month, Khanmigo reached 1.4 million students in its first year, and teachers using AI tools save roughly 5.9 hours per week to reinvest in direct human teaching.&lt;/p&gt;
&lt;h2 id="why-i-still-love-linux"&gt;&lt;a href="https://it-notes.dragas.net/2025/11/24/why-i-still-love-linux/" rel="noopener noreferrer"&gt;Why I (still) love Linux&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stefano Marinelli reflects on nearly 30 years with Linux, starting in 1996 after his DOS and Commodore 64 days, when Linux gave him his first real taste of Unix and a sense of freedom no prior OS had offered. By 1998 he was actively contributing to the community as a speaker and translator. Even though the fabled &amp;ldquo;Year of the Linux Desktop&amp;rdquo; never quite arrived, Linux conquered mobile via Android, servers, and embedded devices, while Ubuntu helped bring Linux to everyday PCs and drew major enterprises into open source.&lt;/p&gt;
&lt;p&gt;Marinelli doesn&amp;rsquo;t hold back on criticisms either: many modern distributions have drifted away from the Unix philosophy of &amp;ldquo;do one thing and do it well,&amp;rdquo; most notably with &lt;code&gt;systemd&lt;/code&gt;; novelty for its own sake often sacrifices stability; corporate interests sometimes steer development toward their own agendas; and software quality has suffered from &amp;ldquo;vibe coding&amp;rdquo; and fragile dependency chains. Although he prefers BSD and illumos for many server workloads today, he still appreciates distributions like Alpine and openSUSE, notes how much better Linux hardware support has become, remains grateful to Linux for launching his career and lifelong learning, and expects to keep using it for another 30 years.&lt;/p&gt;
&lt;h2 id="why-senior-engineers-struggle-to-build-ai-agents"&gt;&lt;a href="https://www.philschmid.de/why-engineers-struggle-building-agents" rel="noopener noreferrer"&gt;Why (Senior) Engineers Struggle to Build AI Agents&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Phil Schmid explains why senior engineers often struggle more than juniors when building AI agents: traditional software engineering is deterministic, whereas LLM-backed agents are inherently probabilistic. Junior engineers tend to trust the model and ship quickly, while seasoned engineers instinctively try to &amp;ldquo;code away&amp;rdquo; the non-determinism. Schmid highlights five mindset shifts. First, natural language is the new state: a nuance like &amp;ldquo;the plan looks good, but focus on the US market&amp;rdquo; should be kept as rich text rather than squeezed into a rigid boolean or enum schema. Second, hand over control flow: let the model navigate unpredictable multi-turn conversations—like a user asking to cancel a subscription and changing their mind after hearing a retention offer—instead of hardcoding every branch.&lt;/p&gt;
&lt;p&gt;Third, errors are just another input: catch tool failures and feed the error message back into the agent&amp;rsquo;s context so it can self-correct, rather than throwing an unhandled exception. Fourth, move from unit tests to evals: alongside deterministic tests, measure end-to-end reliability, use LLM-as-a-judge for output quality, and inspect intermediate reasoning traces. Fifth, agents evolve while APIs stay fixed: because agents interpret tool schemas literally, APIs need clear docstrings and explicit parameter names like &lt;code&gt;user_email_address&lt;/code&gt; instead of &lt;code&gt;email&lt;/code&gt; to prevent hallucinations. Ultimately, engineers must trade a degree of rigid certainty for semantic flexibility.&lt;/p&gt;
&lt;h2 id="how-java-achieves-zero-copy-file-transfer"&gt;&lt;a href="https://javabulletin.substack.com/p/how-java-achieves-zero-copy-file" rel="noopener noreferrer"&gt;How Java Achieves Zero-Copy File Transfer&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Zero-copy is the technique of transferring file data from disk to a network socket without copying bytes through JVM user-space memory. Traditional file serving reads data from disk into the OS kernel page cache, copies it into a user-space JVM buffer, and copies it right back into a kernel socket buffer before sending it to the NIC; zero-copy lets the kernel move data directly between kernel buffers (from page cache to socket buffer and out via DMA to the network card), cutting CPU usage, context switches, and JVM garbage-collection pressure from temporary &lt;code&gt;byte[]&lt;/code&gt; allocations.&lt;/p&gt;
&lt;p&gt;Java exposes three main mechanisms here. &lt;code&gt;FileChannel.transferTo()&lt;/code&gt; delegates to the OS&amp;rsquo;s &lt;code&gt;sendfile&lt;/code&gt; syscall when the platform and target channel support it (&lt;code&gt;transferFrom()&lt;/code&gt; works in the opposite direction without the same universal syscall guarantee). &lt;code&gt;MappedByteBuffer&lt;/code&gt; maps file pages directly into the process&amp;rsquo;s virtual address space with read-only, read-write, or copy-on-write modes, avoiding user-space read copies though not automatically creating a zero-copy path to a network socket. For high-performance network servers, Netty&amp;rsquo;s &lt;code&gt;DefaultFileRegion&lt;/code&gt; wraps file channels to exploit native transport zero-copy. The technique does have limits: user-space TLS encryption usually breaks the direct kernel path because bytes must be encrypted before transmission, tiny files rarely justify the syscall setup overhead, and any in-flight data transformation like compression requires touching the bytes in memory anyway.&lt;/p&gt;
&lt;h3 id="bonus"&gt;Bonus&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Images:&lt;/strong&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/20ed383c-5900-4f31-9041-afb5581b1ad4_2250x2624.png" alt="Top Strategies to Build High Availability Systems"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!Eyti!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F862d0649-d77b-410f-95a5-6505c9eeb15a_2250x2814.png" alt="Cloudflare vs. AWS vs. Azure"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!52bX!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65613a28-2320-4bb6-a610-5ab96b13240d_800x903.jpeg" alt="Popular Backend Tech Stack"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!JV_9!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa95473e0-5a68-43c6-841e-540a6b198d6d_2360x2960.png" alt="HTTP vs. HTTPS"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!5rGo!,w_550,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fac99f98d-49a7-4933-b06f-8da0901d210e_800x939.gif" alt="Forward Proxy versus Reverse Proxy"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!qtkE!,w_550,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4646c2e2-a6fb-44e7-a091-73fcbd8fa498_800x1040.gif" alt="Things Every Developer Should Know: Concurrency is NOT parallelism"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #64</title><link>https://miti99.com/en/post/2025/12/06/</link><pubDate>Sat, 06 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/06/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #64. &lt;del&gt;This post was created using &lt;a href="https://github.com/anthropics/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://github.com/musistudio/claude-code-router" rel="noopener noreferrer"&gt;Claude Code Router&lt;/a&gt;, &lt;a href="https://platform.iflow.cn" rel="noopener noreferrer"&gt;iFlow Open Platform&lt;/a&gt; &amp;amp; Qwen3-Coder-Plus&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/del&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="caching"&gt;&lt;a href="https://planetscale.com/blog/caching" rel="noopener noreferrer"&gt;Caching&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article explains caching from first principles: pairing a small amount of fast, expensive storage with a large amount of slow, cheap storage so that frequently accessed data lives in the fast tier. The key metric is the hit rate (the percentage of requests served from the cache rather than the backing store); the higher the hit rate, the less often you pay the latency penalty of slow storage. Familiar examples include CPU L1, L2, and L3 caches, RAM acting as a cache for disk, or a social network keeping recent posts in fast memory while pushing older posts to colder storage.&lt;/p&gt;
&lt;p&gt;The author breaks down two forms of locality: temporal locality (data accessed recently is likely to be accessed again soon, such as caching posts from the last 48 hours) and spatial locality (accessing one item makes nearby items likely to be needed next, such as a photo app prefetching adjacent images). CDNs tackle geographic distance by placing cached copies close to end users. When a cache fills up, it needs an eviction policy: FIFO is simple but naive, LRU evicts the least recently used item to better match real-world access patterns, and time-aware LRU expires stale entries automatically. Finally, databases layer caches of their own—PostgreSQL combines &lt;code&gt;shared_buffers&lt;/code&gt; with the OS page cache, while MySQL uses its buffer pool—delivering multi-tier caching while preserving ACID guarantees.&lt;/p&gt;
&lt;h2 id="consistent-hashing"&gt;&lt;a href="https://eli.thegreenplace.net/2025/consistent-hashing/" rel="noopener noreferrer"&gt;Consistent Hashing&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Distributing keys across N nodes with a simple &lt;code&gt;hash % N&lt;/code&gt; formula works fine until the node count changes: adding or removing even a single node remaps nearly every key to a different server, triggering a thundering herd of cache misses right when the system is already under load. Consistent hashing solves this by using the same hash function to map both nodes and keys onto a ring, assigning each key to the next node clockwise on the ring. When a node joins or leaves, only about M/N keys (where M is the total number of keys and N is the number of nodes, assuming an even distribution) need to move instead of nearly all of them.&lt;/p&gt;
&lt;p&gt;For the implementation, the author stores node positions in a sorted array representing a discrete ring, turning key lookup into a fast, cache-friendly binary search. The remaining catch is that random placement leaves uneven gaps between nodes on the ring: with 20 nodes, one node can end up owning roughly 40x as many keys as another. The fix is virtual nodes—mapping each physical node to multiple points around the ring; testing with 10 virtual nodes per physical node smooths out the distribution dramatically. Originally invented at MIT for distributed web caching, consistent hashing became the foundation of Akamai and influenced AWS&amp;rsquo;s Dynamo storage system.&lt;/p&gt;
&lt;h2 id="how-to-stop-linux-threads-cleanly"&gt;&lt;a href="https://mazzo.li/posts/stopping-linux-threads.html" rel="noopener noreferrer"&gt;How to stop Linux threads cleanly&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post tackles a problem far trickier than spawning threads: stopping a Linux thread cleanly while still giving it a chance to run cleanup code. The simplest approach is a quasi-busy loop where the thread checks an atomic flag after each unit of work, assuming each iteration finishes quickly enough. It&amp;rsquo;s easy to reason about, but forces you to structure your code around short work slices. &lt;code&gt;pthread_cancel()&lt;/code&gt; looks tempting at first glance but has serious pitfalls: on &lt;code&gt;glibc&lt;/code&gt;/&lt;code&gt;libstdc++&lt;/code&gt;, cancellation is implemented via forced stack unwinding; if unwinding crosses a &lt;code&gt;noexcept&lt;/code&gt; boundary—such as cancelling inside a destructor—the program terminates immediately, and cancelling mid-operation can corrupt shared application state.&lt;/p&gt;
&lt;p&gt;A signal-based approach using &lt;code&gt;SIGUSR1&lt;/code&gt; and careful signal-mask manipulation can interrupt blocking system calls, but still suffers from a race condition because checking the stop flag and entering the syscall isn&amp;rsquo;t atomic. For syscalls that have signal-mask-aware variants—such as &lt;code&gt;ppoll&lt;/code&gt;, &lt;code&gt;pselect&lt;/code&gt;, and &lt;code&gt;epoll_pwait&lt;/code&gt;—this race is solved cleanly. For all other blocking syscalls, the author demonstrates a clever trick using &lt;code&gt;rseq&lt;/code&gt; (restartable sequences, available since Linux 4.18) to wrap the flag check and the syscall instruction in a single atomic critical section that the kernel aborts and restarts if interrupted mid-way. The takeaway is that no single solution is perfect: polling a flag works for most applications, signals suit I/O-heavy threads, and &lt;code&gt;rseq&lt;/code&gt; requires inline assembly and is best reserved for specialized low-level code.&lt;/p&gt;
&lt;h2 id="advice-for-new-principal-tech-ics-ie-notes-to-myself"&gt;&lt;a href="https://eugeneyan.com/writing/principal/" rel="noopener noreferrer"&gt;Advice for New Principal Tech ICs (i.e., Notes to Myself)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Eugene Yan compiles 31 pieces of advice for newly minted Principal Engineers and Applied Scientists, distilled from observing experienced peers. The starting premise is that what got you promoted to senior levels becomes secondary at Principal: writing code yourself isn&amp;rsquo;t always the highest-leverage use of your time, even though you must stay close enough to the tech to maintain credibility and context. Principals come in different archetypes—some go deep technically, others drive broad cross-org alignment—and the role frequently blends parts of product management, design, and culture-building. Being right isn&amp;rsquo;t enough; you have to persuade others to care and act—one mentor shared that out of every 10 proposal docs they write, only about 3 actually get built.&lt;/p&gt;
&lt;p&gt;Yan advises picking work that wouldn&amp;rsquo;t happen without you, sitting at the intersection of your unique strengths and the organization&amp;rsquo;s gaps, and splitting your portfolio across three modes: leading (roughly 50%), sponsoring (20%), and advising (30%). Scaling your impact means helping others make decisions the way you would and setting aside dedicated weekly time for mentoring, including interns. In meetings, ask questions to create space for others, and explicitly label whether you are stating a known fact or just wondering aloud so a casual remark isn&amp;rsquo;t mistaken for a mandate. Greater autonomy comes with greater accountability: protect time for deep thinking and ultimately aim to make the organization succeed without depending on you.&lt;/p&gt;
&lt;h2 id="how-fast-is-java-teaching-an-old-dog-new-tricks"&gt;&lt;a href="https://dgerrells.com/blog/how-fast-is-java-teaching-an-old-dog-new-tricks" rel="noopener noreferrer"&gt;How fast is java? Teaching an old dog new tricks&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author tests whether modern Java can keep up with Rust by building a particle simulation using Java&amp;rsquo;s new Vector API for SIMD math. The Vector API abstracts CPU-specific vector instructions behind the concept of a &amp;ldquo;species,&amp;rdquo; letting you write SIMD code once that runs across hardware architectures. To squeeze out maximum performance, the author decouples the physics simulation from the UI event thread, manages worker threads manually instead of using parallel streams, and gives each worker thread its own pixel buffer before merging them at the end to avoid cache contention from concurrent writes.&lt;/p&gt;
&lt;p&gt;On an M1 MacBook Air, Rust still runs roughly 2x faster across most particle counts—for instance, simulating 100 million particles takes ~69 ms per frame in Rust versus ~119 ms in Java. Java also carries higher baseline overhead from heap allocations, whereas Rust&amp;rsquo;s memory allocation is much leaner. While the author acknowledges Java has come a long way with lambdas and the Vector API, the surrounding ecosystem remains a pain point: just pulling in a couple of small libraries required frustrating build-system ceremony. His verdict: the old dog can indeed learn new tricks, but it&amp;rsquo;s still weighed down by legacy tooling.&lt;/p&gt;
&lt;h2 id="50-things-i-know"&gt;&lt;a href="https://usefulfictions.substack.com/p/50-things-i-know" rel="noopener noreferrer"&gt;50 things I know&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cate Hall shares 50 lessons she has learned about relationships, decision-making, and personal growth. On people, she notes that you can care deeply for someone who doesn&amp;rsquo;t reciprocate, and that loving without needing anything back is the essence of selflessness; she separates admiration, obsession, and infatuation from real love, and observes that revenge is rarely worth it because difficult people are already their own punishment. Many social dynamics are paradoxical: actions that feel weak from the inside, when done without apology, are perceived by others as strength.&lt;/p&gt;
&lt;p&gt;On decision-making, she pushes back against the idea that effort times time equals results, highlights the importance of spotting asymmetric payoffs where being wrong in one direction is far costlier than the other, and advises doubling both time and budget estimates because you can never fully correct for the planning fallacy. If you want better opinions, start by having fewer of them. Knowing when to quit is an underrated skill, and she avoids totalizing ideologies because no moral framework survives every edge case intact. She closes with reminders that being of service to others is the only reliable way to feel better yourself, and that ten years from now you&amp;rsquo;ll look back and marvel at how great you had it today—so why not see it that way right now?&lt;/p&gt;
&lt;h2 id="programming-languages-that-blew-my-mind"&gt;&lt;a href="https://yoric.github.io/post/programming-languages-that-blew-my-mind/" rel="noopener noreferrer"&gt;Programming Languages That Blew My Mind&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;David Teller looks back at the programming languages that reshaped how he thinks about software. BASIC introduced arrays and &lt;code&gt;GOTO&lt;/code&gt;/&lt;code&gt;GOSUB&lt;/code&gt; control flow; Turbo Pascal brought IDEs, debuggers, structured programming, and modules; x86 assembly taught him memory addressing, registers, and talking directly to hardware. HyperCard introduced visual programming, natural-language-like scripting, and garbage collection. OCaml—with parametric polymorphism, type inference, pattern matching, and higher-order functions—humbled him, while Prolog taught declarative programming, where instead of writing an algorithm you teach the computer how to reason.&lt;/p&gt;
&lt;p&gt;In industry, Java stood out for its batteries-included standard library, thorough documentation, and the JVM; Erlang impressed him with its &amp;ldquo;let it fail&amp;rdquo; philosophy and actor model for distributed systems; Coq turned specifications into types and programs into formally verified proofs. Opalang experimented with multi-tier compilation that automatically split code across client, server, and database, while Rust combined functional-language safety guarantees with systems-programming performance. Teller notes that many ideas from academic languages eventually filter into mainstream software, and says he is still waiting for the next truly mind-expanding programming paradigm.&lt;/p&gt;
&lt;h2 id="bonus-some-cool-visuals-from-bytebytego"&gt;Bonus: Some cool visuals from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/9cfa2d94-1602-47c2-8942-b585c1d8d285_2252x2752.jpeg" alt="Docker vs Kubernetes"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!P-gB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c9090b5-77c7-4f04-88bc-481df27de32d.tif" alt="Batch vs Stream Processing"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!f0s-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6d1ef48-faea-4d57-b2ea-f8411efc8334_2360x2770.png" alt="What are Modular Monoliths?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!MDHC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cf3f3a0-726f-47a3-94e4-755fa9aa8036_2196x2319.jpeg" alt="What is the difference between Process and Thread?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!-jEP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa7885eb0-3b6d-4be3-bbb7-332b3f9fc0e0_2360x2920.jpeg" alt="How to Debug a Slow API?"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!uW-M!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7494e44-82ec-43fc-bd7f-eabea7776dd1_2250x2624.png" alt="Top Service-to-Service Communication Patterns"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Verdict: Overall this is still a fairly solid post. However, the summaries are a bit on the long side and will need further refinement.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;
&lt;div class="footnotes" role="doc-endnotes"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;del&gt;Qwen3-Coder-480B-A35B-Instruct&lt;/del&gt;&amp;#160;&lt;a href="#fnref:1" class="footnote-backref" role="doc-backlink"&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</description></item><item><title>Newsletter #57</title><link>https://miti99.com/en/post/2025/09/30/</link><pubDate>Tue, 30 Sep 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/09/30/</guid><description>&lt;p&gt;&lt;em&gt;&lt;del&gt;This post was created using &lt;a href="https://github.com/musistudio/claude-code-router" rel="noopener noreferrer"&gt;Claude Code Router&lt;/a&gt; with the &lt;code&gt;qwen3-coder&lt;/code&gt; model running on &lt;a href="https://platform.iflow.cn/docs/api-mode" rel="noopener noreferrer"&gt;iFlow Platform&lt;/a&gt;.&lt;/del&gt; Enjoy Newsletter #57.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="agentic-ai-has-changed-my-career"&gt;&lt;a href="https://medium.com/@elliotgraebert/agentic-ai-has-changed-my-career-2c6e3dd29708" rel="noopener noreferrer"&gt;Agentic AI has changed my career&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Elliot Graebert, a director of engineering at Skydio, confesses that for most of his career he barely wrote code because he moved into management too early. About four months ago, he started &amp;ldquo;vibe coding&amp;rdquo; directly in the multi-million-line monorepo that powers the company&amp;rsquo;s drone fleet, and he is now among its top five contributors, sometimes submitting up to ten pull requests per hour. He distinguishes between two approaches: vibe coding is like pair programming with AI (using tools like Windsurf or Cursor), where the loop is measured in seconds and requires constant attention; agentic AI is like delegating to an eager intern, where the loop is measured in minutes and you only check back once the task is done. His journey went from 0.5x speed (fixing small UI bugs in a single editor), to 1.5x by running three environments in parallel with Gemini, Claude, and GPT to &amp;ldquo;swarm&amp;rdquo; a tough bug, and then to 3x thanks to context files (Windsurf Rules) documenting code conventions and test commands, refined iteratively whenever the AI got stuck.&lt;/p&gt;
&lt;p&gt;The jump to 10x came from Coder Tasks—automated environments that go from prompt to pull request—combined with two MCPs: GitHub to read issues and open pull requests (triggering CI and Vercel previews), and Playwright so the AI can launch a browser, reproduce a bug, fix it, and verify the fix itself. The core lesson is that agentic AI succeeds when it has a feedback loop that does not require a human in the middle; at that point, he can run dozens of tasks at once, such as completing an entire data-filter component migration in a single day. He also stresses that AI does not magically solve everything—you have to invest in tooling—and the most exciting result is that designers, product managers, and even the flight test team can now contribute directly to the product.&lt;/p&gt;
&lt;h2 id="the-evolution-of-garbage-collectors-from-javas-cms-to-zgc-and-a-jvm-vs-go-vs-rust-latency-shootout"&gt;&lt;del&gt;&lt;a href="https://codemia.io/blog/path/The-Evolution-of-Garbage-Collectors-From-Javas-CMS-to-ZGC-and-a-JVM-vs-Go-vs-Rust-Latency-Shootout" rel="noopener noreferrer"&gt;The Evolution Of Garbage Collectors From Javas CMS To ZGC And A JVM Vs Go Vs Rust Latency Shootout&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;&lt;del&gt;Memory management is a critical topic in programming, especially in languages like Java, Go, and Rust. This article explores the evolution of garbage collectors (GCs) from Java&amp;rsquo;s traditional Concurrent Mark-Sweep (CMS) to the modern Z Garbage Collector (ZGC).&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;ZGC is a major leap forward in minimizing application pause times, aiming to keep pauses under 10ms regardless of heap size. This makes a dramatic performance difference compared to earlier-generation GCs like CMS.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;The article also compares latency performance across platforms:&lt;/del&gt;
&lt;del&gt;- JVM (with ZGC): Significantly reduced pause times thanks to improvements in GC design&lt;/del&gt;
&lt;del&gt;- Go: Efficient low-latency GC powered by a concurrent algorithm and tri-color marking&lt;/del&gt;
&lt;del&gt;- Rust: Avoids GC entirely through its ownership model, delivering predictable performance without GC overhead&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;Key takeaways:&lt;/strong&gt;&lt;/del&gt;
&lt;del&gt;- ZGC keeps application pause times under 10ms&lt;/del&gt;
&lt;del&gt;- Go uses an efficient marking algorithm to keep latency low&lt;/del&gt;
&lt;del&gt;- Rust eliminates the need for GC altogether through its ownership model&lt;/del&gt;
&lt;del&gt;- Language choice significantly impacts performance and user experience&lt;/del&gt;&lt;/p&gt;
&lt;h2 id="new-in-java25-generational-shenandoah-gc-is-no-longer-experimental"&gt;&lt;del&gt;&lt;a href="https://theperfparlor.com/2025/09/14/new-in-java25-generational-shenandoah-gc-is-no-longer-experimental/" rel="noopener noreferrer"&gt;New in Java25: Generational Shenandoah GC is no longer experimental&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;Java 25 officially graduates Generational Shenandoah from experimental status, making it ready for production use. Shenandoah is a low-pause-time garbage collector introduced in Java 12 that runs mostly concurrently with the application. Its generational mode, introduced experimentally in Java 24, separates heap memory into young and old generations. Because most objects die young, this separation spares the collector from repeatedly scanning long-lived objects unnecessarily, improving performance and reducing memory footprint.&lt;/p&gt;
&lt;p&gt;In Java 25, the feature has been stabilized with numerous bug fixes, lower garbage collection overhead, more efficient memory region management, and improved tooling and logging. According to the article, these improvements make Generational Shenandoah mature enough for real-world applications, and you no longer need the &lt;code&gt;-XX:+UnlockExperimentalVMOptions&lt;/code&gt; flag to enable it. It marks an important milestone in Java&amp;rsquo;s ongoing garbage collection optimization journey.&lt;/p&gt;
&lt;h2 id="if-all-the-world-were-a-monorepo"&gt;&lt;a href="https://jtibs.substack.com/p/if-all-the-world-were-a-monorepo?utm_source=tldrnewsletter" rel="noopener noreferrer"&gt;If all the world were a monorepo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Julie Tibshirani shares her experience with CRAN, the central package repository for R. Before accepting an update, CRAN not only checks the submitted package itself, but also runs checks across every package that depends on it. When she released &lt;code&gt;grf&lt;/code&gt; 2.0 with a breaking API change, CRAN blocked publication until the downstream package &lt;code&gt;policytree&lt;/code&gt; was updated. At first she found this unreasonable: why should she be responsible for someone else&amp;rsquo;s code? Over time, however, she realized this isn&amp;rsquo;t merely a different point on the speed-versus-stability trade-off spectrum, but a form of &amp;ldquo;radical empathy&amp;rdquo; in software maintenance: users&amp;rsquo; code is the library author&amp;rsquo;s responsibility too, much like the mindset inside a monorepo.&lt;/p&gt;
&lt;p&gt;She contrasts this with her time working on Elasticsearch, where leaving individual projects to upgrade on their own left thousands of projects stuck on old versions years later. Watching large-scale migrations at Databricks, she saw that when engineering teams took end-to-end ownership—including fixing downstream dependent code—completion rates rose dramatically. Although R packages tolerate less consistent APIs than ecosystems like npm or PyPI, users enjoy nearly painless dependency upgrades, offering a lesson worth pondering for other ecosystems.&lt;/p&gt;
&lt;h2 id="9-software-architecture-patterns-for-distributed-systems"&gt;&lt;a href="https://dev.to/somadevtoo/9-software-architecture-patterns-for-distributed-systems-2o86?=&amp;amp;aid=recZm2jVus1yqUHWw" rel="noopener noreferrer"&gt;9 Software Architecture Patterns for Distributed Systems&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article introduces nine common architectural patterns in distributed systems that are useful both in real-world design and in system design interviews. The communication patterns include: Peer-to-Peer, where nodes exchange data directly without a central coordinator, used in file sharing and blockchains; API Gateway, a unified entry point for backend services that handles security and load balancing in microservices architectures; Pub-Sub, which decouples message senders and receivers through a broker, well suited for real-time messaging, event-driven systems, and IoT; and Request-Response, where a client sends a request and receives a corresponding response from a server, ubiquitous in REST APIs and web applications (though the pattern does not strictly require synchronous execution).&lt;/p&gt;
&lt;p&gt;The data management and processing patterns include: Event Sourcing, which stores state as an immutable sequence of events for easy auditing and replay, commonly seen in financial systems; ETL (extract, transform, load) to consolidate data from multiple sources into a data warehouse for analytics and data migration; Batching, which groups data into batches to process all at once for higher efficiency; Streaming Processing, which processes continuous data streams in real time for finance, IoT, or cybersecurity; and Orchestration, which uses a central coordinator to manage workflows across services. Understanding the strengths and trade-offs of each pattern helps you build reliable, scalable, and maintainable systems as requirements evolve.&lt;/p&gt;
&lt;h2 id="sort-lines-in-source-code"&gt;&lt;a href="https://testing.googleblog.com/2025/09/sort-lines-in-source-code.html?=&amp;amp;aid=recV8wgDMqTb7Hwko" rel="noopener noreferrer"&gt;Sort Lines in Source Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kyle Freeman&amp;rsquo;s post on the Google Testing Blog, adapted from a &amp;ldquo;Tech on the Toilet&amp;rdquo; episode, opens with a familiar scenario: you enable two-player mode on the last line of a config file, but when you run the game, the feature doesn&amp;rsquo;t show up. The culprit is that the &lt;code&gt;enable_two_players&lt;/code&gt; flag was declared twice with different values—easy to miss when lines are in random order. Simply sorting the lines places the duplicates right next to each other, exposing the bug immediately. The main takeaway is that sorted lists and source lines are easier to read, easier to maintain, and help prevent bugs.&lt;/p&gt;
&lt;p&gt;To automate this, the author introduces &lt;code&gt;keep-sorted&lt;/code&gt; (&lt;a href="http://github.com/google/keep-sorted" rel="noopener noreferrer"&gt;github.com/google/keep-sorted&lt;/a&gt;): you wrap the lines to sort with &lt;code&gt;keep-sorted start&lt;/code&gt; and &lt;code&gt;keep-sorted end&lt;/code&gt; comments, run &lt;code&gt;keep-sorted [file1] [file2] ...&lt;/code&gt;, and optionally hook it into pre-commit so it runs automatically on every commit. The tool also supports case-insensitive sorting, numeric sorting, prefix order, and regular expressions (for example, using &lt;code&gt;by_regex&lt;/code&gt; to sort a Go slice by its end-of-line comments). One important caveat: before sorting, make sure the original order doesn&amp;rsquo;t carry semantic meaning, such as dependency load order.&lt;/p&gt;
&lt;h2 id="rating-26-years-of-java-changes"&gt;&lt;a href="https://neilmadden.blog/2025/09/12/rating-26-years-of-java-changes/" rel="noopener noreferrer"&gt;Rating 26 years of Java changes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Neil Madden looks back on 26 years of working with Java, from Java 1.1.8 in 1999 to Java 25, and gives subjective ratings to language and core library changes (skipping UI, graphics, the JVM, and GC). Top marks go to &lt;code&gt;java.util.concurrent&lt;/code&gt; (10/10), so well designed that people use it in place of the original collection classes; try-with-resources (10/10), which made exception handling far safer; Records (10/10), which he says Java &amp;ldquo;should have had all along&amp;rdquo;; UTF-8 by default (10/10), fixing thousands of character-encoding bugs at a stroke; along with Generics (8/10) and &lt;code&gt;var&lt;/code&gt; type inference (9/10). The Collections Framework gets just 4/10, lambdas 4/10 because of ugly stack traces, and switch expressions 6/10 as a pleasant minor improvement.&lt;/p&gt;
&lt;p&gt;On the flip side, NIO gets 0/10 for its convoluted API, Streams get 1/10 and are called one of modern Java&amp;rsquo;s biggest mistakes due to complexity, overpromised parallelism, and easy resource leaks, while the cryptography APIs get 1/10 for being easy to misuse. Worst of all is Modules at -10/10: massive disruption for very little practical benefit. Virtual threads are deemed promising but not yet battle-tested enough to score. The post also touches on time-based release cadences, pattern matching, and post-quantum cryptography, closing with an invitation for readers to debate his ratings.&lt;/p&gt;
&lt;h2 id="bonus-some-cool-visuals-from-bytebytego"&gt;Bonus: Some cool visuals from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/aa5ea98b-c832-429d-8e48-63f25b7feb5a_3000x3900.jpeg" alt="Python vs Java"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/4863d93c-ca2a-4b5a-b0b4-fe3621a6c184_2250x2920.png" alt="Design Patterns Cheat Sheet"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/d6d04f12-2adc-4d8e-a9ca-2de16399066f_2250x3376.png" alt="Design Patterns Cheat Sheet"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/a370bb6a-82d3-45ad-b6f4-a2a9a4317402_800x1099.jpeg" alt="CI/CD Simplified Visual Guide"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/5d9faeeb-3428-44c8-94fd-4b52fc287da3_3000x3900.png" alt="How Apache Kafka Works?"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/45136e24-79ee-4c6d-a53a-89df6afebef6_3000x3900.png" alt="Load Balancers vs API Gateways vs Reverse Proxy"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!4Uyj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a1213e2-86cb-4fa8-bf72-e37ffe0da44d_2250x2624.heic" alt="Understanding Load Balancers: Traffic Management at Scale"&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Overall, the output is concise and I&amp;rsquo;m fairly satisfied—probably around 80% compared to Claude Code with Claude models, and since it&amp;rsquo;s free I&amp;rsquo;m very happy with it :)))&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 #56</title><link>https://miti99.com/en/post/2025/09/29/</link><pubDate>Mon, 29 Sep 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/09/29/</guid><description>&lt;p&gt;&lt;em&gt;&lt;del&gt;Today I ran another experiment with &lt;a href="https://opencode.ai/" rel="noopener noreferrer"&gt;OpenCode&lt;/a&gt;. The result: as soon as I sent a single URL, it just&amp;hellip; got completely stuck :v. So I switched over to testing GitHub Copilot with OpenRouter. Initial results showed that GitHub Copilot couldn&amp;rsquo;t detect the previous Newsletter number and reset the numbering back to #1. It also wrote tags in lowercase, which didn&amp;rsquo;t match the format I expected. Unhappy with that, I wiped it and tried again with OpenAI Codex—which proceeded to ask me a dozen questions just to fetch a web page, wanted to run Python scripts to scrape the page, and even tried installing packages directly via &lt;code&gt;pip&lt;/code&gt;. I wasn&amp;rsquo;t okay with that either, so I moved on to testing &lt;a href="https://github.com/musistudio/claude-code-router" rel="noopener noreferrer"&gt;Claude Code Router&lt;/a&gt;, running Claude Code backed by the OpenRouter API with the &lt;code&gt;xAI: Grok 4 Fast&lt;/code&gt; model. The first summary came out quite long.&lt;/del&gt; Anyway, please enjoy Newsletter #56.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="i-love-uuid-i-hate-uuid"&gt;&lt;a href="https://blog.epsiolabs.com/i-love-uuid-i-hate-uuid" rel="noopener noreferrer"&gt;I love UUID, I hate UUID&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Epsio builds a streaming SQL engine that constantly inserts and deletes rows in a database, so primary key selection directly impacts performance. They chose UUIDs for their biggest strength: clients can generate unique identifiers locally without round-tripping to the database server. That lets the UI interact immediately with newly created objects before the server confirms the write (&amp;ldquo;optimistic&amp;rdquo; updates) and makes it possible to bulk-load rows using PostgreSQL&amp;rsquo;s &lt;code&gt;COPY&lt;/code&gt; while already knowing every row&amp;rsquo;s primary key ahead of time (auto-incrementing keys still work with &lt;code&gt;COPY&lt;/code&gt;, but &lt;code&gt;COPY&lt;/code&gt; does not return generated keys the way &lt;code&gt;INSERT ... RETURNING&lt;/code&gt; does).&lt;/p&gt;
&lt;p&gt;The problem lies in UUIDv4: its values are completely random across 122 bits, so every insert lands on a different leaf page of the B-Tree index, causing constant buffer-cache misses and page splits that severely degrade write throughput. UUIDv7 places a 48-bit timestamp at the front followed by 74 bits for random data or monotonic counters depending on the generator; this clusters keys by creation time, though it does not automatically guarantee strict monotonicity within the same millisecond. In a benchmark inserting 10 million rows, the UUIDv7 index was 22% smaller (301 MB vs. 389 MB) and insertion time dropped by 31% (37.53 seconds vs. 54.62 seconds). The trade-offs are that the embedded timestamp can leak record creation times if IDs are exposed in public APIs, and intra-millisecond randomness drops to 74 bits—though collision probability remains astronomically low. For most developers, UUIDv7 is a sensible default for distributed primary keys, provided timestamp leakage isn&amp;rsquo;t a privacy concern.&lt;/p&gt;
&lt;h2 id="what"&gt;&lt;a href="https://pvs-studio.com/en/blog/posts/java/1284/" rel="noopener noreferrer"&gt;What&amp;rsquo;s new in Java 25&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article from PVS-Studio tours the JEPs shipping in Java 25, the long-term support release arriving in September 2025. On the API and language side, Scoped Values (JEP 506) offer a safer alternative to &lt;code&gt;ThreadLocal&lt;/code&gt; in suitable scenarios, with bounded lifetimes, immutability, and efficient inheritance across child threads; the Key Derivation Function API (JEP 510) standardizes cryptographic key derivation; Module Import Declarations (JEP 511) let you import all packages exported by a module with a single statement; Compact Source Files and Instance Main Methods (JEP 512) let beginners and script writers create small programs without ceremony; and Flexible Constructor Bodies (JEP 513) allow statements to run before an explicit &lt;code&gt;super()&lt;/code&gt; or &lt;code&gt;this()&lt;/code&gt; call.&lt;/p&gt;
&lt;p&gt;Under the hood, Java 25 removes support for 32-bit x86 ports (JEP 503), allows enabling compact 8-byte object headers instead of 12-byte headers to save heap memory (JEP 519, not yet enabled by default), and makes the generational mode of the Shenandoah garbage collector a product feature (JEP 521). Ahead-of-Time (AOT) enhancements streamline cache creation (JEP 514) and persist method execution profiles so the JIT compiler reaches peak performance faster on warmup (JEP 515), while JDK Flight Recorder gains more accurate cooperative sampling (JEP 518) along with method timing and tracing (JEP 520). Overall, it is a steady LTS release focused on performance, reduced boilerplate, and security while preserving backward compatibility—well worth exploring for Java developers.&lt;/p&gt;
&lt;h2 id="some-best-practices-for-writing-readable-automation-tests"&gt;&lt;del&gt;&lt;a href="https://blog.scottlogic.com/2025/09/04/some-best-practices-for-writing-readable-automation-tests.html" rel="noopener noreferrer"&gt;Some Best Practices for Writing Readable Automation Tests&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;&lt;del&gt;This post from the Scott Logic Blog shares best practices for writing readable automated tests using Playwright with TypeScript. For junior developers, automated testing helps verify applications continuously, but hard-to-read test code quickly becomes unmaintainable, hiding bugs and slowing down team collaboration.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;For assertions, use flexible matchers like &lt;code&gt;expect(response.status()).toBeOK()&lt;/code&gt; to accept any successful HTTP status code (200, 201) without failing prematurely, keeping the focus on the validations that matter. For locators, prefer &lt;code&gt;.getByRole&lt;/code&gt; to support accessibility—easily inspected via browser DevTools and tab navigation—rather than &lt;code&gt;.getByTestId&lt;/code&gt;, which does nothing for screen readers. Always advocate for proper semantic HTML roles when they are missing.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;For naming conventions, use backticks for dynamic test titles—such as &lt;code&gt;test(`should return a 400 when User Information is '${variable}'`)&lt;/code&gt;—to interpolate variables cleanly. For test structure, tag tests with &lt;code&gt;{ tag: 'THW-000' }&lt;/code&gt; to filter test runs by ticket, or attach Playwright annotations linking to detailed documentation, improving traceability and long-term maintainability.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;These practices keep test suites maintainable, accessible, and team-friendly. Junior developers can apply them right away to write clearer tests, cut down debugging time, and strengthen the QA process.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;strong&gt;Key takeaways:&lt;/strong&gt;&lt;/del&gt;
&lt;del&gt;- Flexible assertions: Use &lt;code&gt;toBeOK()&lt;/code&gt; to handle varied HTTP success codes.&lt;/del&gt;
&lt;del&gt;- Accessible locators: Prefer &lt;code&gt;.getByRole&lt;/code&gt; verified through DevTools inspection.&lt;/del&gt;
&lt;del&gt;- Dynamic naming: Use template literals for variable interpolation in test titles.&lt;/del&gt;
&lt;del&gt;- Tagging and annotations: Link tests to tickets for better traceability and collaboration.&lt;/del&gt;&lt;/p&gt;
&lt;h2 id="tech-debt-understanding-its-business-impact---optimism"&gt;&lt;a href="https://www.optimism.io/blog/tech-debt-understanding-its-business-impact" rel="noopener noreferrer"&gt;Tech Debt: Understanding its Business Impact - Optimism&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Adrian Sutton (OP Labs) argues that instead of complaining vaguely about &amp;ldquo;technical debt,&amp;rdquo; engineering teams should articulate the concrete business cost of each specific kind of debt, because not all debt carries the same interest rate: some is a deliberate trade-off to ship faster, while some quietly drains engineering capacity for zero return. He breaks technical debt into seven categories: accidental complexity (best simplified incrementally rather than via big-bang rewrites), deferred routine maintenance like dependency upgrades (which, like skipping oil changes on a car, leads to much costlier breakdowns later), poor usability caused by cutting scope to hit deadlines, bugs and production incidents that constantly interrupt planned work, dead code that still has to be maintained, missing automated tests, and slow feedback loops.&lt;/p&gt;
&lt;p&gt;In the author&amp;rsquo;s experience, lacking automated tests is one of the most expensive forms of debt—especially for consensus-critical systems like blockchains—while slow feedback loops (waiting on builds, tests, and validation) do the most damage to day-to-day developer productivity. As a concrete example from OP Labs, not yet having a chain deployed with a properly configured permissionless fault-proof system ended up costing the team significant engineering time. His recommendations: quantify the business impact of debt, track alert patterns and budget capacity for reliability, establish a process for sunsetting unused features, expand automated test coverage so more people can contribute safely, and ruthlessly shorten feedback loops.&lt;/p&gt;
&lt;h2 id="spec-driven-development-with-ai-a-new-approach-and-a-journey-into-the-past"&gt;&lt;a href="https://foojay.io/today/spec-driven-development-with-ai-a-new-approach-and-a-journey-into-the-past/" rel="noopener noreferrer"&gt;Spec-Driven Development with AI: A New Approach and a Journey into the Past&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Simon Martinelli, a Java Champion with over 30 years of software architecture experience, points out that in traditional development workflows, source code inevitably becomes the single source of truth while requirements documents are abandoned and rot. AI speeds up code generation but does nothing to fix that underlying drift. Drawing inspiration from the Rational Unified Process (RUP) of the early 2000s, he proposes flipping the hierarchy: making business requirements the living foundation for everything downstream.&lt;/p&gt;
&lt;p&gt;His workflow runs through six stages: humans work with stakeholders to define a catalog of business requirements; AI then generates business use-case diagrams, domain entity models, system use-case diagrams, system use-case specifications, and finally the application source code. Every intermediate artifact is reviewed by domain experts or developers before moving to the next step. All specifications live as Markdown and PlantUML files in Git for clean diffing, while tools like Claude Code keep downstream artifacts synchronized when requirements change; the target stack uses Vaadin, Spring Boot, and jOOQ, organized into independent epics to avoid cross-feature coupling. The core message: &amp;ldquo;Writing code is the easy part; getting the requirements right is where the value lies&amp;rdquo;—and AI only shines when fed high-quality specifications.&lt;/p&gt;
&lt;h2 id="on-good-software-engineers"&gt;&lt;a href="https://candost.blog/on-good-software-engineers/" rel="noopener noreferrer"&gt;On Good Software Engineers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Setting clear expectations for software engineers is notoriously hard because every company has different needs and culture. Candost Dagdeviren offers a simple universal definition: a good software engineer is someone a manager or peer can trust to take on a problem and move a project forward, because they collaborate well with the team and consistently deliver quality solutions. That definition holds across every level, from a junior engineer handling a scoped task to a staff engineer leading a multi-team initiative—only the scope changes.&lt;/p&gt;
&lt;p&gt;Specific traits include communicating clearly in both writing and speech, giving and receiving feedback constructively, and listening with empathy; understanding processes like code review, RFCs, ADRs, and Scrum well enough to know when to bend the rules; taking the time to learn an organization&amp;rsquo;s culture, hierarchy, and norms rather than forcing a one-size-fits-all playbook everywhere; weaving quality into daily work naturally through TDD and refactoring without waiting for permission; balancing technical perfectionism against stakeholder timelines; taming complexity through modular design and sensible testing strategies; and taking ownership—stepping up to unfamiliar problems and solving them with the team instead of &amp;ldquo;throwing issues over the wall.&amp;rdquo; Great engineers do all of this proactively, including fixing broken team processes without waiting to be asked. In the author&amp;rsquo;s view, these aren&amp;rsquo;t unreasonable demands; they are the baseline of professional engineering.&lt;/p&gt;
&lt;h2 id="why-i-do-programming"&gt;&lt;a href="https://esafev.com/notes/why-i-do-programming/" rel="noopener noreferrer"&gt;Why I do programming&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author reflects on a lifelong journey into programming sparked by pure curiosity: at three years old, they were already taking a screwdriver to household appliances just to see what was inside. Starting school brought encounters with MS-DOS, Logo, and Pascal; by age ten, with a personal computer and an internet connection, they were teaching themselves HTML, CSS, and JavaScript, and even making pocket money doing classmates&amp;rsquo; homework. Their teenage years revolved around writing PAWN scripts for Grand Theft Auto: San Andreas multiplayer mods (SA-MP and MTA) out of a desire to build virtual worlds, followed by using LSL in Second Life to create clothing, buildings, and scripted objects that brought in real income. Wanting to make an impact outside virtual worlds, at sixteen they launched a digital-goods reselling business to buy their own computer and music gear.&lt;/p&gt;
&lt;p&gt;Studying Innovation Engineering at university exposed them to CAD, cybersecurity, and philosophy. Their first startup, MipoTheBot—a Slack bot for freelancers—taught hard lessons about design, product development, and the critical importance of sales and marketing. After burning out twice, a month-long break traveling across Europe rekindled their love for the craft. For the author, programming is ultimately a medium for exploration, tinkering, and satisfying curiosity across endless frontiers like systems programming, distributed networks, and emerging tech—where the hardest challenge is simply staying focused amid so many possibilities.&lt;/p&gt;
&lt;h2 id="the-unreasonable-effectiveness-of-modern-sort-algorithms"&gt;&lt;a href="https://github.com/Voultapher/sort-research-rs/blob/main/writeup/unreasonable/text.md" rel="noopener noreferrer"&gt;The unreasonable effectiveness of modern sort algorithms&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This research write-up asks a fascinating question: if you know ahead of time that an input array contains at most four distinct &lt;code&gt;u64&lt;/code&gt; values (the &lt;code&gt;random_d4&lt;/code&gt; pattern), how much faster can a custom domain-specific sorting implementation beat a general-purpose standard library sort? The author, a co-developer of the sorting algorithms in Rust&amp;rsquo;s standard library, benchmarks both approaches on an AMD Ryzen 9 5900X using the &lt;code&gt;sort-research-rs&lt;/code&gt; suite across varying input sizes.&lt;/p&gt;
&lt;p&gt;The specialized implementations include counting with a &lt;code&gt;BTreeMap&lt;/code&gt;, counting with a &lt;code&gt;HashMap&lt;/code&gt; and sorting the keys, a hardcoded 4-way &lt;code&gt;match&lt;/code&gt; (bottlenecked by CPU branch mispredictions), a branchless counting variant, and a custom perfect hash function—the fastest of the bunch, reaching roughly 1.7 billion elements per second. On the general-purpose side sit Rust&amp;rsquo;s &lt;code&gt;slice::sort_unstable&lt;/code&gt; (&lt;code&gt;ipnsort&lt;/code&gt;), &lt;code&gt;driftsort&lt;/code&gt;, and C/C++ implementations like &lt;code&gt;pdqsort&lt;/code&gt; and &lt;code&gt;crumsort&lt;/code&gt;. Remarkably, Rust&amp;rsquo;s standard library sort—despite knowing nothing about the input distribution ahead of time—comes surprisingly close to several specialized implementations thanks to its low-cardinality partitioning inherited from &lt;code&gt;pdqsort&lt;/code&gt;, whereas some generic C implementations fall behind due to indirect comparator function calls (which macro-based C sorts like &lt;code&gt;crumsort&lt;/code&gt; avoid). The takeaway: domain-specific optimizations can win big when their assumptions hold, but will panic or corrupt results the moment the data changes. Trust your standard library&amp;rsquo;s sort before rolling your own.&lt;/p&gt;
&lt;h2 id="how-we-made-clickhouse-log-queries-995-faster-with-resource-fingerprinting"&gt;&lt;a href="https://signoz.io/blog/query-performance-improvement/" rel="noopener noreferrer"&gt;How we made ClickHouse log queries 99.5% faster with resource fingerprinting&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The SigNoz engineering team ran into slow log queries where filtering by a single Kubernetes namespace still forced ClickHouse to scan 41,498 out of 41,676 data granules (99.5%). The root cause was that logs from many different pods, services, and environments were interleaved across storage granules, preventing the database from skipping almost any blocks. ClickHouse stores data in columnar format divided into granules of roughly 8,192 rows and relies on a sparse primary index (one index entry per granule rather than per row). Because the table&amp;rsquo;s &lt;code&gt;ORDER BY&lt;/code&gt; clause dictates physical sort order on disk, ClickHouse can skip entire granules only when rows matching the query filter are physically clustered together; secondary skipping indexes like bloom filters help somewhat, but are far less effective than primary-key locality.&lt;/p&gt;
&lt;p&gt;Their solution was to compute a deterministic &amp;ldquo;resource fingerprint&amp;rdquo; by hashing a hierarchical string of log-source attributes—such as &lt;code&gt;cluster;namespace;pod&lt;/code&gt; for Kubernetes, &lt;code&gt;container.name;container.image&lt;/code&gt; for Docker, or environment tags and log streams for AWS CloudWatch. Placing this fingerprint right after the time bucket in the sorting key—&lt;code&gt;ORDER BY (ts_bucket_start, resource_fingerprint, severity_text, timestamp, id)&lt;/code&gt;—physically groups logs from the same resource together on disk. As a result, the same namespace query now reads just 222 out of 26,135 granules (0.85%) while remaining fully schema-compatible. The lesson for developers: align your physical storage sort order with your users&amp;rsquo; most common query predicates to get the most out of sparse indexes.&lt;/p&gt;
&lt;h2 id="ai-coding"&gt;&lt;a href="https://geohot.github.io/blog/jekyll/update/2025/09/12/ai-coding.html" rel="noopener noreferrer"&gt;AI Coding&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;George Hotz (geohot) argues that &amp;ldquo;AI coding&amp;rdquo; is heavily overhyped and that we should think of AI as a compiler rather than an intelligent programmer: you feed in a specification (the prompt) and get back a &amp;ldquo;compiled&amp;rdquo; artifact. If you believe compilers know how to program, then sure, AI knows how to program. Iteratively nudging an AI in chat is rarely much better than editing the prompt directly, much like the limits of traditional IDEs. And English makes a terrible &amp;ldquo;programming language&amp;rdquo; for three reasons: its ambiguity means it only works well for common, well-trodden tasks; it lacks a formal specification so compilation is non-deterministic; and a tiny change in wording can unpredictably alter the entire output.&lt;/p&gt;
&lt;p&gt;He points to the early-2025 METR study of 16 experienced open-source developers—who estimated AI made them 20% faster when in reality their task completion time increased by 19%—and questions the billions of dollars being poured into the space based on subjective vibes. He predicts AI will displace programming jobs the same way compilers and spreadsheets displaced earlier waves of labor: not through general intelligence, but through better tool consolidation. Real progress, he argues, still comes from building better languages, compilers, and libraries. In an update to the post, he clarifies that he is anti-hype rather than anti-AI, advocating for an honest assessment of where the tools actually help and where they fall short.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Initial verdict: this combo is pretty solid—runs stably without pestering me with random permission prompts just to handle WebFetch, though the generated summaries are a bit wordy with minor quirks. I&amp;rsquo;ll test a few more models in upcoming posts to find a combo that is both free and high quality :D&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #52</title><link>https://miti99.com/en/post/2025/09/07/</link><pubDate>Sun, 07 Sep 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/09/07/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #52.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="traps-to-developers"&gt;&lt;a href="https://qouteall.fun/qouteall-blog/2025/Traps%20to%20Developers" rel="noopener noreferrer"&gt;Traps to Developers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This compilation by qouteall is an extensive reference list of programming &amp;ldquo;traps&amp;rdquo;: unintuitive behaviors that are easy to misunderstand and usually only reveal themselves after causing a bug. Organized by topic, it opens with HTML and CSS gotchas such as &lt;code&gt;min-width: auto&lt;/code&gt; in flexbox or grid preventing elements from shrinking, margin collapse, stacking contexts scoping &lt;code&gt;z-index&lt;/code&gt; unexpectedly, and &lt;code&gt;100vh&lt;/code&gt; on mobile browsers exceeding the actual visible viewport. Next come Unicode and text processing, floating-point pitfalls involving &lt;code&gt;NaN&lt;/code&gt;, infinity, and rounding errors, and time-handling traps.&lt;/p&gt;
&lt;p&gt;Later sections cover specific languages and platforms: Java, Go, C/C++, Python, Rust, SQL databases, concurrency and parallelism, transitive dependency conflicts, Linux and bash, backend engineering, React, Git, networking, locales, regular expressions, and the Microsoft ecosystem. Each entry is just a few lines long with reference links, making the post ideal to skim once and bookmark for future debugging sessions. For newer developers, it is a fast way to learn common &amp;ldquo;looks right, but isn&amp;rsquo;t&amp;rdquo; pitfalls without paying for each one in hours of debugging.&lt;/p&gt;
&lt;h2 id="active-record-vs-repository-pattern"&gt;&lt;a href="https://javabulletin.substack.com/p/active-record-vs-repository-pattern" rel="noopener noreferrer"&gt;Active Record vs. Repository Pattern&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Suraj Mishra compares two popular data-access design patterns in object-oriented programming. With Active Record, each class maps directly to a database table, each object corresponds to a row, and the model itself holds CRUD methods like &lt;code&gt;find&lt;/code&gt; or &lt;code&gt;save&lt;/code&gt;, as popularized by Ruby on Rails. This approach is easy to pick up, minimizes boilerplate through &amp;ldquo;convention over configuration,&amp;rdquo; and speeds up development for straightforward applications, but tightly couples domain models to the database schema, violates the Single Responsibility Principle, and easily grows unwieldy as business logic becomes complex.&lt;/p&gt;
&lt;p&gt;The Repository pattern separates data-access logic from business logic behind a collection-like interface; in Spring Data JPA, this typically takes the form of an interface extending &lt;code&gt;JpaRepository&lt;/code&gt; injected into a service class. Unit testing becomes much easier because the repository can be mocked, and swapping out the underlying data store—say, from a relational database to NoSQL—has minimal impact on business logic. The trade-off is an extra layer of abstraction, added ceremony, and slower initial setup. The author concludes that Active Record suits smaller apps with simple domain logic, while the Repository pattern shines when maintainability, scalability, and testability are top priorities.&lt;/p&gt;
&lt;h2 id="threadsleep0-is-not-for-free"&gt;&lt;a href="https://mlangc.github.io/java/performance/2025/08/14/thread-sleep0-is-not-for-free.html" rel="noopener noreferrer"&gt;Thread.sleep(0) is not for free&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This short post debunks a common misconception: calling &lt;code&gt;Thread.sleep(0)&lt;/code&gt; in Java is not &amp;ldquo;free.&amp;rdquo; Although the official specification allows an implementation shortcut that merely checks interrupt status when the sleep duration is zero, HotSpot&amp;rsquo;s actual implementation crosses into native code and calls &lt;code&gt;os::naked_yield()&lt;/code&gt;—which on Linux invokes &lt;code&gt;sched_yield()&lt;/code&gt;, a system call whose own man page warns against unnecessary use because it triggers costly context switches. In the author&amp;rsquo;s JMH benchmarks, each call costs roughly as much as generating 128 random bytes, and performs worst right when the CPU is under heavy contention: with 20 threads, throughput with &lt;code&gt;Thread.sleep(0)&lt;/code&gt; drops below that of a single thread.&lt;/p&gt;
&lt;p&gt;Therefore, if your code uses &lt;code&gt;sleep&lt;/code&gt; to back off on errors or overload, don&amp;rsquo;t pass a delay of &lt;code&gt;0&lt;/code&gt; into &lt;code&gt;Thread.sleep&lt;/code&gt; like the first snippet below; instead, guard the call so it only sleeps when an actual delay is needed, as in the second snippet. The author also points out that &lt;code&gt;TimeUnit.sleep&lt;/code&gt; documents an explicit no-op for zero or negative durations, and if you genuinely want to yield the CPU, calling &lt;code&gt;Thread.yield()&lt;/code&gt; directly states that intent much more clearly.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;delay&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;allGood&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;0&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 class="n"&gt;waitShorty&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="n"&gt;Thread&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/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;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;allGood&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;Thread&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;waitShortly&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="why-do-video-games-use-kernel-mode-anti-cheats"&gt;&lt;a href="https://malwaresourcecode.com/home/my-projects/write-ups/why-do-video-games-use-kernel-mode-anti-cheats" rel="noopener noreferrer"&gt;Why do video games use kernel-mode anti-cheats?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article addresses the widespread fear around kernel-mode anti-cheat software. On Windows, the operating system is split into user mode and kernel mode, with the kernel acting as the &amp;ldquo;manager&amp;rdquo; sitting between software and hardware via drivers. Today, getting a driver into the kernel requires Microsoft vetting and digital signing (Driver Signature Enforcement), while PatchGuard prevents drivers from modifying core kernel structures, and vulnerable drivers can be added to a blocklist. Anti-cheat systems need kernel access because only in kernel mode can they register callbacks—via &lt;code&gt;PsSetCreateProcessNotifyRoutine&lt;/code&gt;—to be notified the moment a process is created, the exact same mechanism used by antivirus and EDR solutions. Newly launched processes are then inspected using static analysis (scanning for known cheat byte signatures) and behavioral analysis such as code-integrity checks, ETW, API hooking, or filesystem minifilters.&lt;/p&gt;
&lt;p&gt;On privacy concerns, the author argues that most fears stem from misconceptions: malicious Microsoft-signed kernel drivers are exceedingly rare, roughly 99.9% of modern malware runs in user mode because attackers need very few privileges to steal user data, and using a kernel driver just to &amp;ldquo;spy&amp;rdquo; on gamers would be massive overkill. Choosing not to trust kernel-mode anti-cheat ultimately comes down to your personal threat model, the author concludes, but that choice shouldn&amp;rsquo;t be based on misinformation.&lt;/p&gt;
&lt;h2 id="why-llms-can"&gt;&lt;a href="https://zed.dev/blog/why-llms-cant-build-software" rel="noopener noreferrer"&gt;Why LLMs Can&amp;rsquo;t Really Build Software&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Conrad Irwin (Zed) draws on his interviewing experience to observe that strong software engineers continuously run a three-part loop: build a mental model of the requirements, write code, build a mental model of what the code actually does, and resolve discrepancies by updating either the code or the requirements. LLMs write code reasonably well and can read files, run tests, and add logging, but they fail to maintain a coherent mental model: they assume the code they just wrote is correct, guess randomly between fixing the code or changing the test when a test fails, and wipe everything to start over when stuck. The root cause is that models are bad at recognizing missing context, heavily bias toward the most recent tokens in the context window, and hallucinate details—whereas humans know how to set outer context aside to debug an isolated subproblem before zooming back out to the big picture.&lt;/p&gt;
&lt;p&gt;Even so, the author acknowledges that LLMs are genuinely useful: they generate code quickly, synthesize requirements and documentation well, and can handle simple tasks end to end. For anything non-trivial, however, they cannot yet hold enough accurate context to iterate their way to a working solution. Engineers remain responsible for ensuring requirements are clear and that the code actually does what it claims; at Zed, humans stay in the driver&amp;rsquo;s seat, and LLMs are simply another tool in their hands.&lt;/p&gt;
&lt;h2 id="the-java-type-system-is-broken"&gt;&lt;a href="https://wouter.coekaerts.be/2018/java-type-system-broken" rel="noopener noreferrer"&gt;The Java Type System is Broken&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this 2018 post, Wouter Coekaerts demonstrates type-system loopholes tested against JDK 10. Some holes in Java&amp;rsquo;s type system are intentional for backward compatibility—such as raw types or unchecked casts, which can cause &amp;ldquo;heap pollution&amp;rdquo; where a parameterized type holds an object of the wrong type—but those always trigger compiler warnings. The author instead hunts for constructs that the compiler accepts as completely type-safe without a single warning, yet still throw a &lt;code&gt;ClassCastException&lt;/code&gt; at runtime on a line with no explicit cast. After introducing wildcards and capture conversion, the post walks through how lambdas, local inner classes, inner classes inside generic classes, type-variable bound checks, and outer type variables used as bounds for inner classes can all subvert type safety, along with two &amp;ldquo;honorable mentions&amp;rdquo; involving unboxing in lambdas and &lt;code&gt;TreeSet&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The author also uncovered several previously reported bugs along the same lines and filed new bug reports against the JDK. In his view, these edge cases pose no security risk and are unlikely to bite developers by accident, but they serve as a reminder that Java&amp;rsquo;s generics are fragile under the hood and compiler warnings should not be ignored. The post wraps up with the motto &amp;ldquo;everything is broken, everything is fine,&amp;rdquo; alongside a call to give the type system some much-needed care after years of strain from backward compatibility and new language features.&lt;/p&gt;
&lt;h2 id="the-pragmatic-engineer-2025-survey-what"&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/the-pragmatic-engineer-2025-survey-part-2" rel="noopener noreferrer"&gt;The Pragmatic Engineer 2025 Survey: What&amp;rsquo;s in your tech stack? Part 2&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Part 2 of The Pragmatic Engineer&amp;rsquo;s April–May 2025 reader survey, drawing on roughly 3,000 responses, examines the tools software engineers use for project management, communication, collaboration, data storage, and backend infrastructure. JIRA still leads project management despite being voted the most disliked tool in Part 1, Linear is rising fast as a serious challenger, and Azure DevOps is surprisingly widespread. In communication, Slack dominates team chat, Microsoft Teams leads video calls, Confluence is the most common documentation tool, and Figma dominates design. PostgreSQL is the most frequently mentioned database out of 35 contenders, followed by MySQL, Redis, and MongoDB, while backend infrastructure centers on AWS services, Docker, Kubernetes, and Terraform.&lt;/p&gt;
&lt;p&gt;The author highlights several practical takeaways: project tracking is an integral part of an engineer&amp;rsquo;s job, with issue trackers mentioned nearly as often as IDEs; it is hard to go wrong choosing PostgreSQL, making the pragmatic question &amp;ldquo;what stops us from using Postgres?&amp;rdquo;; and Kubernetes is worth learning even if you don&amp;rsquo;t use it yet, as a quarter of respondents already run it in production. Finally, Redis and Terraform moving away from open-source licenses appears not to have dented their popularity despite open-source forks, while Amazon-backed OpenSearch has reached roughly 25% of Elasticsearch&amp;rsquo;s adoption.&lt;/p&gt;
&lt;h2 id="why-do-software-developers-love-complexity"&gt;&lt;a href="https://kyrylo.org/software/2025/08/21/why-do-software-developers-love-complexity.html" rel="noopener noreferrer"&gt;Why do software developers love complexity?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kyrylo Silin asks why software developers remain drawn to complexity even though everyone knows the KISS principle (Keep It Simple, Stupid). Part of the answer is marketing: nobody gets excited about a plain replacement for &lt;code&gt;cat&lt;/code&gt;, whereas a feature-packed &amp;ldquo;catzilla&amp;rdquo; promoted everywhere sparks curiosity. Complexity also quietly signals effort, expertise, and exclusivity, turning into a status symbol rather than a response to real needs. Like ancient pyramids, modern software stacks dependencies, frameworks, and layers of abstraction sky-high while sometimes remaining hollow inside; as the author puts it, &amp;ldquo;Complexity screams: &amp;lsquo;Look at me!&amp;rsquo; Simplicity whispers: &amp;lsquo;Did you notice?&amp;rsquo;&amp;rdquo; His favorite example is React versus vanilla JavaScript.&lt;/p&gt;
&lt;p&gt;Beyond marketing, the article identifies four internal drivers: the intellectual thrill of solving a hard puzzle, legacy systems and technical debt that make bolting on patches easier than simplifying, large teams where everyone adds &amp;ldquo;just in case&amp;rdquo; abstractions, and pressure to innovate to stand out. His closing advice: if you must build a pyramid, build it with purpose, on a solid foundation, with real value inside; before writing 500 lines of abstraction for something that takes 50 lines of direct code, ask whether you are solving a real problem for users and maintainers or just indulging yourself.&lt;/p&gt;
&lt;h2 id="the-important-things-in-life"&gt;&lt;a href="https://hamvocke.com/blog/important-things/" rel="noopener noreferrer"&gt;The Important Things in Life&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ham Vocke explains why his blog has been quiet lately: his spring and summer were filled with the things that make life sweet, leaving no time for writing posts or tinkering on side projects—and he wouldn&amp;rsquo;t change a thing. His job at a growing startup still demands hard work and helps him learn and grow, but the day-to-day challenges, frustrations, and wins at work rarely stick in memory for long. What stays with him are the moments away from the screen: attending weddings and milestone celebrations with friends of over 25 years, going to his first music festival in 20 years, weekend barbecues with friends, visiting a brother after years apart, spending time with his parents as they prepare for retirement, and a weekend getaway with his wife taking in the scenery of southern Germany.&lt;/p&gt;
&lt;p&gt;It is a short piece, but a worthwhile reminder for people in tech about work-life balance, closing with simple advice: &amp;ldquo;Hug your friends, call your family, go outside, and make some memories.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="bonus-cool-diagrams-from-bytebytego"&gt;Bonus: Cool diagrams from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/4bf62d5c-e538-4fba-8d4f-aa00d0bd064a_3000x3900.png" alt="How Does SSO Work?"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/e249b1bd-134e-4242-ac16-1d50daf804d3_3000x3900.png" alt="Best Practices in API Design"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/82b8257a-93c3-4861-b211-88d57b12bc93_2250x2624.png" alt="Top Strategies For Reliability and Fault Tolerance"&gt;&lt;/p&gt;
&lt;h2 id="bonus-interesting-videos"&gt;Bonus: Interesting videos&lt;/h2&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=Dc3qOA9WOnE" rel="noopener noreferrer"&gt;Vibes won&amp;rsquo;t cut it — Chris Kelly, Augment Code&lt;/a&gt;
&lt;a href="https://www.youtube.com/watch?v=Z3fwe6AAgaM" rel="noopener noreferrer"&gt;these coding blogs will make you a better programmer&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="bonus-interesting-repositories"&gt;Bonus: Interesting repositories&lt;/h2&gt;&lt;p&gt;&lt;a href="https://github.com/bansalankit92/java-spring-fullstack-interview-question-answers" rel="noopener noreferrer"&gt;Computer science foundation/ Interview preparation/ Junior to Senior Developer&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="bonus-interesting-books"&gt;Bonus: Interesting books&lt;/h2&gt;&lt;p&gt;&lt;a href="https://enos.itcollege.ee/~jpoial/allalaadimised/reading/Java-Interview-Questions.pdf" rel="noopener noreferrer"&gt;Java interview questions and answers - Boosting your java career&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;&lt;a href="https://github.com/shannonasmith/Java_books/blob/main/Java%20Puzzlers%20-%20Traps%2C%20Pitfalls%2C%20and%20Corner%20Cases%20%282005%29.pdf" rel="noopener noreferrer"&gt;Java Puzzlers - Traps, Pitfalls, and Corner Cases&lt;/a&gt;&lt;/del&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 #50</title><link>https://miti99.com/en/post/2025/08/09/</link><pubDate>Sat, 09 Aug 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/08/09/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #50.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="there-is-no-memory-safety-without-thread-safety"&gt;&lt;a href="https://www.ralfj.de/blog/2025/07/24/memory-safety.html" rel="noopener noreferrer"&gt;There is No Memory Safety Without Thread Safety&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ralf Jung, a programming language theory researcher at ETH Zurich, argues that splitting &amp;ldquo;safety&amp;rdquo; into narrow categories like memory safety and thread safety isn&amp;rsquo;t very helpful. The property we actually need is that a program never triggers Undefined Behavior (UB)—meaning it cannot &amp;ldquo;break&amp;rdquo; the language&amp;rsquo;s own invariants. To prove the point, he presents a Go program that uses no &lt;code&gt;unsafe&lt;/code&gt; operations yet still segfaults at address &lt;code&gt;0x2a&lt;/code&gt; (decimal 42): Go represents an interface value as a pair of a data pointer and a vtable pointer written in two separate instructions, so another thread can observe a torn state between the two writes, invoke the wrong method, and reinterpret an integer as a pointer.&lt;/p&gt;
&lt;p&gt;Other languages take one of two paths to prevent this. Java, C#, OCaml, JavaScript, and WebAssembly accept a performance cost so that every program—even one with data races—preserves the language&amp;rsquo;s invariants; Rust and, more recently, Swift use a type system strong enough to rule out data races at compile time. Go takes neither path, so strictly speaking, the author argues Go is not a memory-safe language, even though in practice it remains much closer to safe languages than to C. The article helps developers understand what guarantees their language actually provides, especially when writing concurrent code.&lt;/p&gt;
&lt;h2 id="i-know-when-you"&gt;&lt;a href="https://alexkondov.com/i-know-when-youre-vibe-coding/" rel="noopener noreferrer"&gt;I Know When You&amp;rsquo;re Vibe Coding&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alex Kondov says he doesn&amp;rsquo;t care whether code was written by hand, copied from a forum, or generated by an LLM; what he cares about is whether what gets merged produces the right result, whether teammates can understand it next quarter, and whether it can be modified cleanly. Lately, though, he can spot LLM-written code immediately—not from repetitive comments, but because it is written in a way nobody on the team would write it: rolling a custom HTTP client that handles every edge case when the project already has a data-fetching library, reimplementing utility functions that already exist in another module, mutating global configuration instead of using module-scoped mechanisms, or writing classes in the middle of a functional codebase. The code works, reads clearly, and has tests, yet completely ignores the conventions the team agreed on.&lt;/p&gt;
&lt;p&gt;He compares it to a panicked new barista spilling coffee while the line grows out the door: customers still want a good cup even if they have to wait a moment longer. Speed is not the highest virtue; the real challenge of software has always been maintaining it over years. His advice is concrete: write better prompts, provide clearer descriptions, specify which libraries to use, give examples for the model to follow, keep files small, and stick to established patterns. Don&amp;rsquo;t outsource the maintainability of your codebase to a model&amp;rsquo;s weights.&lt;/p&gt;
&lt;h2 id="the-7-most-influential-papers-in-computer-science-history"&gt;&lt;a href="https://terriblesoftware.org/2025/01/22/the-7-most-influential-papers-in-computer-science-history/" rel="noopener noreferrer"&gt;The 7 Most Influential Papers in Computer Science History&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Terrible Software puts together a subjective chronological list of the seven papers that have shaped modern computing the most. It opens with Alan Turing&amp;rsquo;s &amp;ldquo;On Computable Numbers&amp;rdquo; (1936), which introduced the Turing machine and defined what machines can and cannot compute; next is Claude Shannon&amp;rsquo;s &amp;ldquo;A Mathematical Theory of Communication&amp;rdquo; (1948), which founded information theory and laid the groundwork for data compression and error-correcting codes. In 1970, Edgar F. Codd introduced the relational model, leading to SQL and relational database systems; in 1971, Stephen Cook proved that SAT is NP-complete, creating a shared language for reasoning about computational hardness.&lt;/p&gt;
&lt;p&gt;The remaining three papers underpin the internet: Vinton Cerf and Robert Kahn&amp;rsquo;s TCP protocol (1974), which stitched isolated networks into a global internet; Tim Berners-Lee&amp;rsquo;s &amp;ldquo;Information Management: A Proposal&amp;rdquo; (1989), which laid the foundation for the World Wide Web with hyperlinks, URLs, and HTTP; and Sergey Brin and Larry Page&amp;rsquo;s 1998 paper introducing PageRank, treating links as votes of trust to form the foundation of Google. The author also gives five honorable mentions: John McCarthy&amp;rsquo;s paper on Lisp, Dijkstra&amp;rsquo;s &amp;ldquo;Go To Statement Considered Harmful,&amp;rdquo; Leslie Lamport&amp;rsquo;s paper on logical clocks, Fred Brooks&amp;rsquo;s &amp;ldquo;No Silver Bullet,&amp;rdquo; and &amp;ldquo;Attention Is All You Need.&amp;rdquo; The overarching message: amid waves of new technology, understanding the foundations still matters.&lt;/p&gt;
&lt;h2 id="programming-vehicles-in-games"&gt;&lt;a href="https://wassimulator.com/blog/programming/programming_vehicles_in_games.html" rel="noopener noreferrer"&gt;Programming Vehicles in Games&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Wassim (Wassimulator), drawing from his talk at the Better Software Conference, shares the core principles of programming vehicles in games. The starting point is that a game is not a physics simulator—it is an experience: Mario Kart and iRacing both simulate cars but prioritize very different feelings, so the first question is what experience you want to convey. The author&amp;rsquo;s first game, AV-Racer, relied entirely on hacks and &amp;ldquo;magic numbers&amp;rdquo;; it was fun enough, but broke down on edge cases, teaching him that you cannot bend reality convincingly unless you first understand what reality you are bending.&lt;/p&gt;
&lt;p&gt;The model he proposes consists of three components connected by feedback loops: the engine and transmission, which is essentially a torque calculator driven by RPM; the wheels and tires, where forces between the tire and road are generated; and the chassis, which is just a rigid body in the game&amp;rsquo;s physics engine. Engine RPM and wheel rotation speed pull each other toward equilibrium through two differential equations solved sequentially each frame. Longitudinal tire force depends on slip ratio, lateral force depends on slip angle, and both can be approximated using Hans Pacejka&amp;rsquo;s &amp;ldquo;Magic Formula.&amp;rdquo; Because a tire only has a finite friction budget, a car cannot brake at full force and corner at maximum grip simultaneously. Once the tire model is right, phenomena like understeer and oversteer emerge naturally without being hardcoded.&lt;/p&gt;
&lt;h2 id="periodic-table-of-system-design-principles"&gt;&lt;a href="https://github.com/jarulraj/periodic-table" rel="noopener noreferrer"&gt;Periodic Table of System Design Principles&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Joy Arulraj (Georgia Tech) proposes a &amp;ldquo;periodic table&amp;rdquo; of computer system design principles. The problem he identifies is that system design is typically taught in silos—databases, operating systems, computer architecture—each with its own vocabulary, causing the exact same principle to appear under different names. For example, relaxing consistency to gain performance shows up as isolation levels in databases, weak memory ordering in hardware, and eventual consistency protocols in distributed systems; newcomers end up relearning the same trade-off in every domain.&lt;/p&gt;
&lt;p&gt;From more than 100 influential papers, the author distills over 40 principles that meet two criteria: abstract enough not to be tied to a specific technology, and general enough to recur across multiple domains. The principles are grouped into eight categories such as Structure, Efficiency, Semantics, Distribution, Reliability, and Security, with each principle given a short symbol like &lt;code&gt;Co&lt;/code&gt; for composability or &lt;code&gt;Op&lt;/code&gt; for optimistic design. By focusing on design intent rather than specific mechanisms, the table helps students build a coherent mental map, helps researchers position their contributions more precisely, and helps engineers discuss cross-cutting design trade-offs more clearly.&lt;/p&gt;
&lt;h2 id="curing-your-ai-10x-engineer-imposter-syndrome"&gt;&lt;a href="https://colton.dev/blog/curing-your-ai-10x-engineer-imposter-syndrome/" rel="noopener noreferrer"&gt;Curing Your AI 10x Engineer Imposter Syndrome&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Colton recounts the anxiety of watching social media constantly claim that AI-assisted engineers are now 10x to 100x more productive. After seriously testing Claude Code, Cursor, Roo Code, and Zed, he found AI to be merely &amp;ldquo;fine&amp;rdquo;: good at boilerplate—especially in React—but bad at following project conventions, still prone to hallucinating libraries, and struggling with the context of large codebases. Mathematically, 10x productivity would mean finishing a full quarter&amp;rsquo;s workload in about a week and a half, which would require product ideation, code review, testing, and deployment to also run 10x faster—something that simply doesn&amp;rsquo;t happen. AI delivers short bursts of speed, like writing a one-off ESLint rule, and those bursts do not compound across the whole job.&lt;/p&gt;
&lt;p&gt;According to the author, &amp;ldquo;10x&amp;rdquo; claims come from people measuring the wrong things, people with a financial stake in AI, or executives who want employees to feel replaceable. A true &amp;ldquo;10x&amp;rdquo; engineer, if such a person exists, is someone who prevents unnecessary work from being done in the first place—something AI rarely does, and in fact actively worsens by making overbuilding easy. He also argues that it is completely fine to trade a bit of productivity for enjoying your craft, since forcing yourself to work in a way you hate only leads to burnout. His conclusion: you aren&amp;rsquo;t missing out on anything; trust yourself, you&amp;rsquo;re already doing fine, and spend less time on LinkedIn.&lt;/p&gt;
&lt;h2 id="demystifying-claude-code-hooks"&gt;&lt;a href="https://www.brethorsting.com/blog/2025/08/demystifying-claude-code-hooks/" rel="noopener noreferrer"&gt;Demystifying Claude Code Hooks&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Aaron Brethorst, a developer with 20 years of experience, found the official Claude Code hooks documentation hard to follow, so he wrote this guide explaining three key concepts through a practical example: running RuboCop and RSpec on a Rails project before every commit. First, hook configurations live in &lt;code&gt;~/.claude/settings.json&lt;/code&gt; for global behavior (best used sparingly) or &lt;code&gt;.claude/settings.json&lt;/code&gt; per project, checked into the repository so every team member shares the same automated checks. Second, to catch every file-editing operation, use the regex matcher &lt;code&gt;&amp;quot;Edit|MultiEdit|Write&amp;quot;&lt;/code&gt;. Third, put hook logic into dedicated scripts inside a folder like &lt;code&gt;claude-hooks&lt;/code&gt; rather than cramming unmaintainable one-liners into JSON. The hook below (note that current Claude Code docs describe hooks receiving JSON via stdin) reads the &lt;code&gt;$CLAUDE_TOOL_INPUT&lt;/code&gt; environment variable (a JSON string describing the tool about to run), uses &lt;code&gt;jq&lt;/code&gt; to extract the &lt;code&gt;command&lt;/code&gt; field, and invokes the check script only when the command starts with &lt;code&gt;git commit&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;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;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-json" data-lang="json"&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;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;hooks&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;PreToolUse&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;matcher&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;Bash&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="nt"&gt;&amp;#34;hooks&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="nt"&gt;&amp;#34;type&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;command&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="nt"&gt;&amp;#34;command&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;if echo \&amp;#34;$CLAUDE_TOOL_INPUT\&amp;#34; | jq -r &amp;#39;.command&amp;#39; | grep -q &amp;#39;^git commit&amp;#39;; then ./claude-hooks/precommit.sh; fi&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="nt"&gt;&amp;#34;timeout&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;180&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;span class="line"&gt;&lt;span class="cl"&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="p"&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&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;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;The author also shares debugging tips: create a &lt;code&gt;PostToolUse&lt;/code&gt; hook that dumps the entire input JSON to a file so you can see exactly what data Claude passes, and use the &lt;code&gt;/hooks&lt;/code&gt; command to inspect and edit your configuration. In his view, hooks turn Claude Code from a chat assistant into a development workflow orchestrator, giving the entire team consistent quality checks checked right into the codebase.&lt;/p&gt;
&lt;h2 id="what-the-hell-is-getopaque-in-java"&gt;&lt;a href="https://mlangc.github.io/java/concurrency/2025/08/03/what-the-hell-is-get-opaque.html" rel="noopener noreferrer"&gt;What the Hell is GetOpaque in Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This article demystifies &lt;code&gt;VarHandle&lt;/code&gt;&amp;rsquo;s &lt;code&gt;getOpaque()&lt;/code&gt; and &lt;code&gt;setOpaque()&lt;/code&gt; in Java, an API with notoriously sparse documentation. The Javadoc states only that these operations access a variable &amp;ldquo;in program order, but with no assurance of memory ordering effects with respect to other threads.&amp;rdquo; In plain terms: opaque operations on the same variable cannot be reordered with respect to each other, but operations across different variables can. The author demonstrates this with JCStress tests running on a Google Axion ARM VM: a reader thread can observe the new value of &lt;code&gt;b&lt;/code&gt; before the new value of &lt;code&gt;a&lt;/code&gt; even though &lt;code&gt;a&lt;/code&gt; was written first—something that does not show up on x86 or when upgrading to acquire-release mode. According to Doug Lea&amp;rsquo;s guide, opaque mode corresponds to &lt;code&gt;relaxed&lt;/code&gt; ordering in C++ and Rust.&lt;/p&gt;
&lt;p&gt;Opaque mode is suitable when sharing a single independent value across threads, such as a primitive or a reference to an immutable object; classic examples include signaling worker threads to stop or publishing progress counters. Unlike plain mode, it prevents the JIT compiler from hoisting a stop-flag check out of a loop or caching writes in a register. However, using opaque mode to publish references to objects with non-final fields is unsafe because it establishes no happens-before relationship; experiments show reader threads occasionally observing partially constructed objects. JMH benchmarks also show that opaque reads are barely any faster than &lt;code&gt;volatile&lt;/code&gt;. The conclusion: opaque has valid niche uses but is too weak for most scenarios, and even when it is safe, &lt;code&gt;volatile&lt;/code&gt; is usually the better choice.&lt;/p&gt;
&lt;h2 id="how-far-can-we-push-ai-autonomy-in-code-generation"&gt;&lt;a href="https://martinfowler.com/articles/pushing-ai-autonomy.html" rel="noopener noreferrer"&gt;How Far Can We Push AI Autonomy in Code Generation?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;On Martin Fowler&amp;rsquo;s site, Birgitta Böckeler recounts an experiment testing whether AI can autonomously generate and maintain a working application without human intervention. The team picked a straightforward target—a Spring Boot CRUD API—using mainly Claude Sonnet 3.7 and 4 in Kilo Code, and iteratively applied strategies to improve reliability: choosing a popular tech stack, splitting the workflow across specialized multi-role agents, including code examples in prompts, providing a reference application as an anchor, running generate-and-review loops, and modularizing the codebase. With 3–5 entities, each run took about 25–30 minutes and usually produced a working app; with a 10-entity schema, runs took 4–5 hours and required repeated human intervention.&lt;/p&gt;
&lt;p&gt;Despite improvements, the process still felt like playing whack-a-mole: every run introduced new issues. The AI invented unrequested features, guessed values when requirements were ambiguous, applied band-aid fixes, declared success while tests were failing, and left behind numerous issues flagged by SonarQube. The conclusion is that even for a simple application backed by extensive scaffolding, AI is not yet ready to autonomously maintain enterprise software without human oversight. Practical takeaways that do transfer immediately include building reusable prompts, exposing reference applications via MCP, leaning on static analysis, and maximizing deterministic tools like scripts and codemods.&lt;/p&gt;
&lt;h2 id="onboarding-for-coding-agents"&gt;&lt;a href="https://www.fuzzycomputer.com/posts/onboarding" rel="noopener noreferrer"&gt;Onboarding for Coding Agents&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Matt Holden explains how he trimmed his &lt;code&gt;CLAUDE.md&lt;/code&gt; file from hundreds of lines down to just 13. Because every AI tool looks for context in a different place (&lt;code&gt;.cursor/rules&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, etc.), he moved all project context into README files—a format that has been universal for 50 years and isn&amp;rsquo;t tied to any vendor. Instead of one massive README, he uses a convention of &lt;code&gt;README.md&lt;/code&gt; for the high-level overview and &lt;code&gt;README.&amp;lt;domain&amp;gt;.md&lt;/code&gt; for specific areas like architecture, dev commands, design system, or testing. The mental model is onboarding: every new Cursor or Claude Code session is like a new hire joining the team with zero context, so write down whatever you would want a new engineer to read before their first task, and instruct the agent to read all &lt;code&gt;**/README.md&lt;/code&gt; and &lt;code&gt;**/README.*.md&lt;/code&gt; files at the start of a session.&lt;/p&gt;
&lt;p&gt;The second pillar is &amp;ldquo;Quality Gates&amp;rdquo;: instead of listing formatting rules in a prompt, he encodes constraints into the environment through tooling, instructing the agent not to finish until type checks, formatting, linting, and unit tests all pass. LLMs are bad at counting spaces or sorting imports by eye, but great at running tools and fixing errors until the build goes green, allowing modern models to run their own OODA loop (observe, orient, decide, act). He also sets a strict rule against letting AI &amp;ldquo;vibe code&amp;rdquo; the environment: humans decide the tech stack, libraries, database, and design system, while the AI works inside those guardrails.&lt;/p&gt;
&lt;h2 id="why-java-is-still-worth-learning-in-2025-a-developer"&gt;&lt;a href="https://foojay.io/today/why-java-is-still-worth-learning-in-2025-a-developers-25-year-journey/" rel="noopener noreferrer"&gt;Why Java is Still Worth Learning in 2025: A Developer&amp;rsquo;s 25-Year Journey&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Markus Westergren looks back on his 25-year journey from Java skeptic to advocate. When he first encountered Java in 1999 after working in assembly and C, he found it sluggish and untrustworthy due to automatic memory management, sticking with C for the first eight years of his career. Everything changed when he studied for the SCJP 6 certification and realized how much the language had matured. In his view, Java&amp;rsquo;s greatest strength is evolving to reduce cognitive load: from generics that make collection types explicit, to records, sealed interfaces, pattern matching for &lt;code&gt;switch&lt;/code&gt;, and virtual threads in modern Java. Backward compatibility is equally valuable: an enterprise application he helped migrate from Java 1.4 to Java 7 now runs on Java 21 without a major rewrite, meaning skills learned today stay relevant for decades.&lt;/p&gt;
&lt;p&gt;The Java ecosystem is diverse without being fragmented, offering multiple JDK distributions (Oracle, Azul Zulu, Red Hat, Amazon Corretto), mature frameworks (Spring Boot, Quarkus, Jakarta EE), and build tools (Maven, Gradle). For newcomers, he advises starting directly with Java 17 or 21, mastering object-oriented fundamentals, the collections framework, exception handling, and basic concurrency, building real projects, engaging with the community, and getting comfortable with Maven, JUnit, and Spring Boot. In short, Java in 2025 offers something rare: stability without stagnation, and innovation without disruption.&lt;/p&gt;
&lt;h2 id="why-you-should-rethink-legacy-and-consider-event-driven-architecture"&gt;&lt;a href="https://blog.scottlogic.com/2025/08/06/rethink-legacy-consider-event-driven-architecture.html" rel="noopener noreferrer"&gt;Why You Should Rethink Legacy and Consider Event-Driven Architecture&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;James Moore of Scott Logic argues that we need to redefine &amp;ldquo;legacy&amp;rdquo;: the problem isn&amp;rsquo;t a system&amp;rsquo;s age, but whether it is slowing the business down. Modernization shouldn&amp;rsquo;t be a knee-jerk reflex, but a strategic decision grounded in clear business value; a legacy system that runs reliably and can be modified at a predictable cost doesn&amp;rsquo;t need to be replaced yet. Instead of a risky, expensive big-bang rewrite, a coexistence strategy lets the legacy system keep running while new capabilities are built alongside it.&lt;/p&gt;
&lt;p&gt;Event-Driven Architecture is a practical way to execute that strategy. For example, suppose a legacy user-registration system doesn&amp;rsquo;t send welcome emails; rather than modifying the old codebase, you can use Change Data Capture (CDC) to watch the database, publish a &lt;code&gt;UserSignedUp&lt;/code&gt; event to a broker like Kafka or RabbitMQ, and have a new email service subscribe to that event while the legacy system remains completely untouched. This decoupling makes scaling easier, enables parallel asynchronous processing, isolates failures in new services from core transactions, and improves testability and observability. The approach isn&amp;rsquo;t a silver bullet—it fits poorly with complex stateful workflows or tightly coupled processes, and older databases may require custom CDC solutions—but in many cases it offers a low-risk, cost-effective path to gradually replacing a legacy core via the Strangler Fig pattern.&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 #42</title><link>https://miti99.com/en/post/2025/08/01/</link><pubDate>Fri, 01 Aug 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/08/01/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #42.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="challenging-algorithms-and-data-structures-every-programmer-should-try"&gt;&lt;a href="https://austinhenley.com/blog/challengingalgorithms.html" rel="noopener noreferrer"&gt;Challenging algorithms and data structures every programmer should try&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Austin Z. Henley highlights six algorithms and data structures that are genuinely fun to build, have shown up in interviews, and reshaped how he thinks about software. Topological sort comes up whenever you need to order items with dependencies, such as task execution in a build system or cell evaluation in a spreadsheet. Recursive descent parsing maps each grammar rule directly to a function, letting you put together a working compiler for a small language in a few hours. The Myers diff algorithm is the default algorithm Git uses to compute clean differences between two versions of a file.&lt;/p&gt;
&lt;p&gt;Bloom filters are a gateway into probabilistic data structures: using very little memory, a Bloom filter can tell you with certainty that an element is &lt;em&gt;not&lt;/em&gt; in a set, or that it &lt;em&gt;might&lt;/em&gt; be present—though Henley admits he has never needed one outside an interview. Piece tables represent editable text as a sequence of spans pointing into an immutable original buffer and an append-only add buffer, avoiding repeated full-string copies on every keystroke and making undo and incremental saves straightforward; VS Code uses a battle-tested variant of this design. Finally, Splay trees are self-adjusting binary search trees that move recently accessed nodes to the root without storing extra balance metadata, acting like a tree with a built-in cache that is far simpler to implement than a red-black tree. The post closes with honorable mentions like tries, segment trees, and union-find.&lt;/p&gt;
&lt;h2 id="everything-i-know-about-good-system-design"&gt;&lt;a href="https://www.seangoedecke.com/good-system-design/" rel="noopener noreferrer"&gt;Everything I know about good system design&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke defines system design as how you assemble services like application servers, databases, caches, queues, and event buses—and argues that good system design usually looks boring: it runs quietly for years without anyone having to think about it. The hardest part of any system is state, because stateful components can get into corrupted states, so minimize the number of stateful pieces and make sure only a single service writes to any given database table. On the database side, align indexes with your hot queries, do &lt;code&gt;JOIN&lt;/code&gt;s in the database rather than stitching rows together in application memory, and offload read-heavy traffic to read replicas.&lt;/p&gt;
&lt;p&gt;Slow operations should be split into the minimum synchronous work needed to respond to the user immediately, with the rest handed off to background workers via a queue. Caches are another source of state, so reach for them only after you have tried speeding up the underlying query; event hubs like Kafka are useful when multiple consumers genuinely need the same stream, but shouldn&amp;rsquo;t replace simple direct API calls that are much easier to trace. Goedecke also advises designing around your highest-load hot paths, logging richly on error branches, tracking p95 and p99 latencies, pairing retries with circuit breakers and idempotency keys, and deciding upfront whether a component should fail open or fail closed: rate limiters should usually fail open, while authentication must always fail closed. His takeaway: good design isn&amp;rsquo;t about clever tricks—it&amp;rsquo;s about putting boring, proven components in the right places.&lt;/p&gt;
&lt;h2 id="ai-coding-agents-are-already-commoditized"&gt;&lt;a href="https://www.seangoedecke.com/ai-agents-are-commoditized/" rel="noopener noreferrer"&gt;AI Coding Agents are Already Commoditized&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke argues there is no &amp;ldquo;secret sauce&amp;rdquo; in AI coding agents. Back in 2023, he built an internal agent on GPT-3.5 and GPT-4 that required elaborate scaffolding just to keep the model on track; at the time, many assumed winning agents would need complex multi-agent swarms cross-checking each other or deep AST-level code indexing. In reality, all it took was a slightly smarter base model. Claude Sonnet 3.7 pulled ahead thanks to its ability to stay on task and make sound decisions over long horizons, while the surrounding agent harness is little more than a loop giving the model tools to read and write files.&lt;/p&gt;
&lt;p&gt;That simplicity makes the agent market brutally hard to defend: open-source tools like OpenAI&amp;rsquo;s Codex CLI raise the baseline for everyone, while inference is interchangeable and switching model providers is trivial. Goedecke even wired up a working coding agent on GitHub Actions backed by GitHub Models—both free—in about 50 lines of YAML. In his view, the only durable ways to win are owning distribution, like GitHub&amp;rsquo;s built-in platform advantage, or training a frontier model and locking its best capabilities inside your own first-party agent.&lt;/p&gt;
&lt;h2 id="java-what"&gt;&lt;a href="https://foojay.io/today/java-whats-old-part-i-collections/" rel="noopener noreferrer"&gt;Java, What&amp;rsquo;s Old? Part I: Collections&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Anthony Goubard highlights hidden gems inside the JDK Collections framework—all available since Java 8 or earlier, so you can use them anywhere. Instead of boxing primitives with &lt;code&gt;Optional&amp;lt;Integer&amp;gt;&lt;/code&gt;, Java provides &lt;code&gt;OptionalInt&lt;/code&gt;, &lt;code&gt;OptionalLong&lt;/code&gt;, and &lt;code&gt;OptionalDouble&lt;/code&gt;. &lt;code&gt;IntSummaryStatistics&lt;/code&gt; and &lt;code&gt;DoubleSummaryStatistics&lt;/code&gt; track min, max, sum, count, and average in a single pass and can merge statistics across streams; Goubard discovered them during the One Billion Row Challenge. &lt;code&gt;LinkedHashMap&lt;/code&gt; has a constructor flag that orders entries by access order rather than insertion order; combine that with overriding &lt;code&gt;removeEldestEntry&lt;/code&gt; and you get a compact LRU cache that can be wrapped in &lt;code&gt;Collections.synchronizedMap&lt;/code&gt; for multi-threaded access (though iteration and compound operations still require explicit synchronization).&lt;/p&gt;
&lt;p&gt;&lt;code&gt;WeakHashMap&lt;/code&gt; holds weak references to its keys so the garbage collector can evict entries once no strong references to a key remain; values are still strongly referenced, and because entries can vanish at any moment it isn&amp;rsquo;t suited for iteration or check-then-act patterns. Goubard uses it in his file manager Ant Commander Pro to cache formatted timestamp strings, cutting CPU usage while scrolling large tables. Finally, &lt;code&gt;BitSet&lt;/code&gt; packs boolean flags at roughly one bit per value, grows dynamically, and exposes fast bitwise operations—using a fraction of the memory of &lt;code&gt;boolean[]&lt;/code&gt; or &lt;code&gt;List&amp;lt;Boolean&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="challenging-projects-every-programmer-should-try"&gt;&lt;a href="https://austinhenley.com/blog/challengingprojects.html" rel="noopener noreferrer"&gt;Challenging projects every programmer should try&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Austin Z. Henley shares six challenging projects that taught him the most and that he revisits whenever he wants to learn a new language or framework. Building a text editor forces you to pick a text buffer data structure like a rope, gap buffer, or piece table, figure out how the cursor &amp;ldquo;remembers&amp;rdquo; its column across lines of different lengths, and implement undo/redo with the Command pattern alongside line wrapping. A 2D game like &lt;em&gt;Space Invaders&lt;/em&gt; teaches rendering, the game loop, input handling, and managing entities with the Factory pattern. A compiler for a tiny language like Tiny BASIC—targeting whatever output language you already know—walks you through lexing, recursive descent parsing, abstract syntax trees, semantic analysis, and code generation. A mini operating system demystifies bootloading, memory management, paging, scheduling, and filesystems.&lt;/p&gt;
&lt;p&gt;For an even steeper challenge, Henley suggests a spreadsheet—which combines the tricky parts of a text editor and a compiler with directed acyclic graphs (DAGs) and reactive evaluation—and a video game console emulator, starting with CHIP-8 before tackling the NES or Game Boy. Each project includes a checklist of concepts to learn and recommended reading, rounded out by community suggestions like building a relational database, a ray tracer, or a &lt;code&gt;grep&lt;/code&gt;-style CLI tool.&lt;/p&gt;
&lt;h2 id="autonomous-coding-agents-a-codex-example"&gt;&lt;a href="https://martinfowler.com/articles/exploring-gen-ai/autonomous-agents-codex-example.html" rel="noopener noreferrer"&gt;Autonomous coding agents: A Codex example&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Birgitta Böckeler distinguishes between two flavors of AI coding agents: supervised agents steered interactively inside an IDE (like GitHub Copilot, Cursor, or Claude Code) and autonomous background agents (like OpenAI Codex, Google Jules, or Devin) that work through a task in an isolated cloud environment and open a pull request. She gave OpenAI Codex a small ticket in the Haiven app—formatting the filter label &lt;code&gt;&amp;quot;client-research&amp;quot;&lt;/code&gt; as &lt;code&gt;&amp;quot;Client Research&amp;quot;&lt;/code&gt;—and published the full execution log. The agent read &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;README.md&lt;/code&gt;, then ran repeated &lt;code&gt;grep&lt;/code&gt; searches across keywords, wandering into &lt;code&gt;node_modules&lt;/code&gt; three separate times without learning from the mistake before finally finding an existing &lt;code&gt;toReadableText&lt;/code&gt; helper to extend. However, it failed to run the test suite, and its pull request broke two existing regression tests despite the fix itself being trivial.&lt;/p&gt;
&lt;p&gt;From that experiment, Böckeler draws several observations. Agents increasingly rely on brute-force text search rather than structured code navigation. Pre-configuring the remote execution environment is critical, yet setting up all required runtimes and linters (Node, Python, Semgrep, Gitleaks) for cloud agents remains clunky. Across six runs of the same task on Codex, Jules, and Claude Code, every attempt produced working behavior, but only two reused the existing helper while the other four duplicated code. She closes by asking when a team is better off discarding a flawed agent PR outright rather than falling into the sunk-cost trap of fixing it up.&lt;/p&gt;
&lt;h2 id="implementing-an-undoredo-system-in-a-complex-visual-application"&gt;&lt;a href="https://mlacast.com/projects/undo-redo" rel="noopener noreferrer"&gt;Implementing an Undo/Redo System in a Complex Visual Application&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;mlacast, lead developer of Alkemion Studio—a visual brainstorming and writing tool for tabletop RPGs—breaks down how he built a context-aware undo/redo system. Because users work across multiple distinct views such as the Board, the Editor, and Node panels, the core UX rule is that pressing undo should never silently revert something off-screen that the user cannot currently see. Every mutation is modeled as an &lt;code&gt;Action&lt;/code&gt; class with &lt;code&gt;undo&lt;/code&gt; and &lt;code&gt;redo&lt;/code&gt; methods, while &lt;code&gt;ActionGroup&lt;/code&gt; bundles related steps into a single undoable unit (such as deleting a Node and automatically removing its attached Tokens). A singleton &lt;code&gt;ActionStore&lt;/code&gt; holds actions across two &lt;code&gt;Action Volume&lt;/code&gt;s for performed and undone work, while a configuration file defines which action types are valid in the active view so the system can dynamically filter and sort the local undo/redo stacks by a global index.&lt;/p&gt;
&lt;p&gt;Inspired by Docker, a container abstraction creates an isolated sandbox whenever the user opens a modal dialog: actions performed inside the modal can either be discarded on cancel or committed back into the main store like a database transaction. The trickiest part was preserving chronological order as users switch contexts, requiring the global index to increment and decrement carefully across creation, undo, and redo so the most recently redone action always sits at the top of the stack. The remaining limitation is cross-action dependencies, which the author plans to solve next with a declarative dependency graph.&lt;/p&gt;
&lt;h2 id="the-software-engineering"&gt;&lt;a href="https://newsletter.manager.dev/p/the-software-engineering-squeeze" rel="noopener noreferrer"&gt;The software engineering &amp;lsquo;squeeze&amp;rsquo;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Anton Zaides argues that for the past 10–15 years, software engineering offered the highest return on investment of any career for anyone willing to study hard for a year, with companies hiring almost anyone who could clear an interview bar. In his view, much of the day-to-day work wasn&amp;rsquo;t actually that hard, which produced a massive middle tier of average engineers now getting &amp;ldquo;squeezed&amp;rdquo; between a tighter market and AI automation. He candidly notes that many developers grew used to comfortable workloads and constant complaining, whereas newcomers in most other professions have always had to grind through tough, lower-paid early years to advance.&lt;/p&gt;
&lt;p&gt;Even so, Zaides is optimistic about the long term: many startups launched by &amp;ldquo;vibe-coding&amp;rdquo; founders will find traction and need strong engineers to scale. To thrive, engineers need to add product-management instincts and design taste rather than waiting for detailed tickets to implement—because while the market has an oversupply of average developers, it still has a shortage of great ones. He advises unemployed engineers to experiment with modern AI tools and build solutions to real problems around them, while adding that there is no shame in changing careers: software engineering is once again a field for people who genuinely want to be in it.&lt;/p&gt;
&lt;h2 id="go-is-8020-language"&gt;&lt;a href="https://blog.kowalczyk.info/article/d-2025-06-26/go-is-8020-language.html" rel="noopener noreferrer"&gt;Go is 80/20 language&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Krzysztof Kowalczyk describes Go as an 80/20 language: it delivers 80% of the utility for 20% of the complexity, and most of the hate directed at Go comes from programmers who want 85% or 97%. Paraphrasing Rob Pike, he writes: &amp;ldquo;Nobody denies that 87% is more utility than 80%. The point is that those extra 7% of utility cost 36% more effort.&amp;rdquo; His examples include struct tags that are far simpler than annotations or macros, a standard testing package that fits in a few hundred lines of code while covering the essentials that take tens of thousands of lines in JUnit, goroutines that handle concurrency with a fraction of the complexity of &lt;code&gt;async/await&lt;/code&gt; in C# or Rust, and built-in generic types like slices, maps, and channels that solved most day-to-day needs long before Go added user-defined generics.&lt;/p&gt;
&lt;p&gt;Meanwhile, languages like C#, Swift, Rust, and even JavaScript keep accumulating features endlessly. There is a lower bound, of course: skipping enums is survivable, whereas skipping structs would make a language unusable. Every added feature imposes a tax on users—who must learn not just how a feature works, but when to use it and how to read teammates&amp;rsquo; code that uses it, which is why Google needed a strict C++ style guide—and on compiler writers too: more than a decade in, the Swift compiler can still feel slow and fragile, whereas Go&amp;rsquo;s toolchain has been fast, cross-platform, and rock-solid since version 1.0.&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 #39</title><link>https://miti99.com/en/post/2025/07/29/</link><pubDate>Tue, 29 Jul 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/07/29/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #39.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="100-senior-java-developer-interview-questions-and-answers--2025-edition"&gt;&lt;a href="https://dev.to/haraf/100-senior-java-developer-interview-questions-and-answers-2025-edition-4f6n" rel="noopener noreferrer"&gt;100+ Senior Java Developer Interview Questions and Answers – 2025 Edition&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This DEV Community guide compiles over 100 interview questions and answers aimed at senior Java developer roles in 2025, organized into five tracks. The Core Java section covers 25 questions split evenly across multithreading and concurrency (deadlocks, the &lt;code&gt;volatile&lt;/code&gt; keyword), collections and their internal implementations, object-oriented design principles, memory management (garbage collection, heap layout), and Java 8+ features like functional interfaces, streams, and &lt;code&gt;Optional&lt;/code&gt;. The Spring Boot and microservices section adds another 25 questions covering auto-configuration, bean lifecycles, inter-service communication (REST, gRPC, message queues), security with JWT, OAuth2, and role-based access control, observability tools like Sleuth, Zipkin, and Prometheus, and deployment and fault-tolerance strategies.&lt;/p&gt;
&lt;p&gt;The remaining three sections feature 20 questions on design patterns (Singleton, Factory, Strategy, Builder, Observer, Proxy, Adapter), 15 on algorithms and data structures (complexity analysis, sorting, searching, graph traversal, Tries, LRU caches), and 15 on SQL and databases (&lt;code&gt;JOIN&lt;/code&gt;s, normalization, indexing, ACID properties, and consistency in distributed systems). What makes the list useful is its focus on real-world engineering scenarios rather than trivia syntax. For junior and mid-level developers, it serves as a solid roadmap for spotting knowledge gaps on the way to senior roles.&lt;/p&gt;
&lt;h2 id="the-prompt-engineering-playbook-for-programmers"&gt;&lt;a href="https://addyo.substack.com/p/the-prompt-engineering-playbook-for" rel="noopener noreferrer"&gt;The Prompt Engineering Playbook for Programmers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Addy Osmani (Google) distills practical techniques for prompting AI coding assistants around seven core principles: provide rich context (language, framework, error messages, expected behavior), state specific goals, break large tasks into smaller steps, include input/output examples (few-shot prompting), assign a role such as code reviewer or security specialist, iterate across multiple turns, and keep your own codebase clean and well-named. His baseline rule is to assume the AI knows nothing about your project beyond what you explicitly put in front of it. For debugging, a reliable template is &amp;ldquo;the code is supposed to do X, but instead does Y when given input Z&amp;rdquo;; in the post&amp;rsquo;s example, pairing the error trace with sample data and expected output lets the AI immediately spot an off-by-one loop condition.&lt;/p&gt;
&lt;p&gt;When refactoring, spell out the exact goal—readability, performance, deduplication, or preserving existing error behavior—rather than just saying &amp;ldquo;refactor this.&amp;rdquo; For new features, start from a high-level outline and build incrementally: scaffold the component first, add state management next, and wire up the API last. Common pitfalls include vague prompts, cramming too many requirements into a single turn, and omitting success criteria. Osmani advises treating AI like an eager junior developer: give clear direction, iterate patiently, and ask it to explain its reasoning so you solve the problem and learn at the same time.&lt;/p&gt;
&lt;h2 id="why-your-ai-coding-assistant-keeps-doing-it-wrong-and-how-to-fix-it"&gt;&lt;a href="https://blog.thepete.net/blog/2025/05/22/why-your-ai-coding-assistant-keeps-doing-it-wrong-and-how-to-fix-it/" rel="noopener noreferrer"&gt;Why Your AI Coding Assistant Keeps Doing It Wrong, and How To Fix It&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Pete Hodgson argues that instead of debating whether &amp;ldquo;AI writes good code,&amp;rdquo; we should ask which kinds of tasks AI excels at and which ones to avoid handing it. AI coding assistants have a peculiar skill profile: they write implementation code like a senior engineer but make design decisions like a novice, and they permanently operate like a teammate &amp;ldquo;in their first hour on the job,&amp;rdquo; lacking knowledge of your codebase, team conventions, or domain context. To evaluate whether a task is a good fit, Hodgson proposes a two-axis matrix: solution space (from narrow, where there is only one obvious approach like removing a feature flag, to wide, where many reasonable designs exist like supporting multi-image uploads) and context required (relying on tacit team knowledge vs. information that can be stated explicitly). AI performs best when the solution space is narrow and the context is explicit, because wide solution spaces make it hard for the model to guess the &amp;ldquo;right&amp;rdquo; local convention.&lt;/p&gt;
&lt;p&gt;That framework points to two levers. To narrow the solution space, give specific implementation instructions instead of letting the AI invent the plan, and break larger problems into smaller steps. To supply missing context, state requirements explicitly in the prompt, use memory or rules files, let the agent search the codebase and read docs, and connect MCP servers to database schemas or issue trackers. In short, shape the work to play to AI&amp;rsquo;s strengths rather than expecting the tool to adapt on its own.&lt;/p&gt;
&lt;h2 id="why-ai-agents-need-a-new-protocol"&gt;&lt;a href="https://glama.ai/blog/2025-06-06-mcp-vs-api" rel="noopener noreferrer"&gt;Why AI Agents Need a New Protocol&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This Glama.ai post explains why AI agents benefit from the Model Context Protocol (MCP) rather than relying solely on traditional HTTP APIs. The core premise is that HTTP APIs evolved to serve human developers and browser apps, not autonomous agents. MCP enforces consistency at the protocol layer itself, whereas OpenAPI merely documents existing APIs in all their idiosyncrasies; as the author puts it, you cannot fix structural inconsistency by writing better documentation. From there, the post highlights five practical differences: MCP lets agents query a server&amp;rsquo;s capabilities dynamically at runtime instead of relying on static docs; with raw APIs, models must construct HTTP requests themselves and frequently hallucinate paths or parameters, whereas with MCP the model simply selects a tool and deterministic code handles the underlying call; MCP treats bidirectional communication as a first-class primitive; each MCP tool maps to a complete user intent rather than scattering a workflow across multiple low-level endpoints; and MCP servers can run as local processes over &lt;code&gt;stdio&lt;/code&gt; with no network layer required.&lt;/p&gt;
&lt;p&gt;The author also points to the long-term payoff of standardization: models only need to learn one uniform interaction pattern instead of thousands of bespoke API dialects. The takeaway isn&amp;rsquo;t that MCP replaces HTTP APIs, but that they belong side by side—keeping APIs for developers while adding MCP as a dedicated integration layer for AI agents.&lt;/p&gt;
&lt;h2 id="understanding-logical-replication-in-postgres"&gt;&lt;a href="https://www.springtail.io/blog/postgres-logical-replication" rel="noopener noreferrer"&gt;Understanding logical replication in Postgres&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Garth Goodson, CTO of Springtail, walks through how logical replication works in PostgreSQL—replicating data at the level of logical row changes rather than copying raw physical disk blocks. Its foundation is the Write-Ahead Log (WAL): every modification is written to an append-only log before touching data files, with each record assigned a unique Log Sequence Number (LSN). The source database defines a &lt;code&gt;publication&lt;/code&gt; specifying which tables or schemas to replicate, and the target creates a &lt;code&gt;subscription&lt;/code&gt; to consume them. A replication slot tracks which WAL records have been sent and acknowledged; only WAL segments older than the replica&amp;rsquo;s confirmed flush position can be recycled, preventing data loss at the cost of requiring careful disk-space monitoring if a subscriber falls behind. Finally, logical decoding and output plugins translate raw WAL records into a consumable format; the default &lt;code&gt;pgoutput&lt;/code&gt; plugin emits two message types: &lt;code&gt;XLogData&lt;/code&gt; carrying the actual row changes and &lt;code&gt;KeepAlive&lt;/code&gt; heartbeats to maintain the connection.&lt;/p&gt;
&lt;p&gt;Logical replication is well suited for high availability, scaling out read queries, disaster recovery, and running analytical queries without bogging down the primary database. However, it comes with important caveats: it does not automatically replicate DDL changes such as schema migrations, index builds, or sequence updates; it lags behind physical replication under heavy write throughput; it requires more operational setup; and replicating &lt;code&gt;UPDATE&lt;/code&gt; or &lt;code&gt;DELETE&lt;/code&gt; operations requires tables to have a primary key or an explicit replica identity (with &lt;code&gt;REPLICA IDENTITY FULL&lt;/code&gt; as a fallback).&lt;/p&gt;
&lt;h2 id="one-man-armies"&gt;&lt;a href="https://quarter--mile.com/One-Man-Armies" rel="noopener noreferrer"&gt;One Man Armies&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This short essay on Quarter Mile opens with a striking observation: human productivity varies wildly, and projects many assume would require a full team and $5 million are sometimes built by a single obsessed, hardworking individual. To make the point, the author lists landmark works created (almost) entirely solo: Eric Barone building &lt;em&gt;Stardew Valley&lt;/em&gt; across 70-hour weeks for 4.5 years, Markus Persson writing &lt;em&gt;Minecraft&lt;/em&gt; in 2 years, John Resig creating jQuery, Chris Sawyer writing &lt;em&gt;RollerCoaster Tycoon&lt;/em&gt; in assembly, Chris Hunt spending 12 years on the RPG &lt;em&gt;Kenshi&lt;/em&gt;, Linus Torvalds starting Linux, and Donald Knuth writing &lt;em&gt;The Art of Computer Programming&lt;/em&gt;. The list stretches well beyond software too: Ada Lovelace&amp;rsquo;s first computer program, Einstein&amp;rsquo;s general relativity, Antoni Gaudí&amp;rsquo;s 40+ years on the Sagrada Família, Marie Tharp&amp;rsquo;s first scientific map of the Atlantic ocean floor, and Karlheinz Stockhausen&amp;rsquo;s nearly 30-hour &lt;em&gt;Licht&lt;/em&gt; seven-opera cycle.&lt;/p&gt;
&lt;p&gt;The author leaves readers to draw their own conclusions, offering just one gentle nudge: if general relativity, an entire cathedral, a 29-hour opera cycle, and billion-dollar video games can be brought into the world by one person, your own ambitious, seemingly far-fetched ideas probably aren&amp;rsquo;t too big either—and if you care about them enough, they are worth trying.&lt;/p&gt;
&lt;h2 id="what"&gt;&lt;a href="https://rdel.substack.com/p/rdel-96-whats-the-relationship-between" rel="noopener noreferrer"&gt;What&amp;rsquo;s the relationship between developer seniority and code refactoring?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In the RDEL (Research-Driven Engineering Leadership) newsletter, Lizzie Matusov summarizes a study examining how developer seniority relates to code refactoring. Researchers analyzed 800 open-source Java projects on GitHub, mining over 700,000 refactoring operations across 111,884 commits, measuring seniority via each contributor&amp;rsquo;s Developer Commit Ratio, and using machine learning models to classify the motivation behind each refactoring. They found that the top 5% most senior contributors performed an average of 11.14 refactorings compared to 3.57 among everyone else, and applied a wider variety of refactoring techniques. Most refactorings happened while implementing new features or fixing bugs rather than as standalone cleanup, and that motivation held steady across seniority levels. Notably, the most senior developers were actually &lt;em&gt;less&lt;/em&gt; likely to document their refactorings in commit messages than less experienced contributors.&lt;/p&gt;
&lt;p&gt;From those findings, the post offers three takeaways for engineering leaders. First, encourage engineers at all levels to participate in refactoring through pair programming and shared design principles. Second, make refactoring work visible by recognizing it in retrospectives and promotion criteria. Third, standardize how refactorings are documented using lightweight commit-message prompts and code-review guidelines that apply equally to everyone, regardless of seniority.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #38</title><link>https://miti99.com/en/post/2025/07/28/</link><pubDate>Mon, 28 Jul 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/07/28/</guid><description>&lt;p&gt;&lt;em&gt;Since I still haven&amp;rsquo;t finished my task with &lt;del&gt;Claude Code + Serena MCP&lt;/del&gt; from yesterday&amp;rsquo;s post, today we&amp;rsquo;re back to our boring AI-powered Newsletter series!! Enjoy Newsletter #38 hehe :&amp;gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="9-lessons-from-cursor"&gt;&lt;a href="https://byteatatime.dev/posts/cursor-prompt-analysis/" rel="noopener noreferrer"&gt;9 Lessons From Cursor&amp;rsquo;s System Prompt&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;ByteAtATime pointed Cursor at a custom API endpoint (a local ngrok tunnel) to capture the raw requests the editor sends to the model, dissecting the system prompt for Agent mode running on GPT-4.1 and extracting nine prompt-engineering lessons. First, Cursor defines the persona sharply: the AI is a pair-programming assistant operating inside Cursor as an autonomous agent. Roughly 1,250 tokens of instructions are organized into XML-tagged blocks like &lt;code&gt;&amp;lt;communication&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;tool_calling&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;making_code_changes&amp;gt;&lt;/code&gt; so the model doesn&amp;rsquo;t lose track of directives buried mid-prompt. The prompt repeatedly pushes autonomy: keep going until the user&amp;rsquo;s request is completely resolved, look up information with tools rather than asking the user, and plan before acting. It also tells the model never to mention internal tool names to the user, alongside practical guardrails like not generating long hashes and not attempting to fix linter errors more than three times on the same file.&lt;/p&gt;
&lt;p&gt;Most interestingly, Cursor sends two separate user-role messages: the first carries the user&amp;rsquo;s custom rules, and the second holds the actual query wrapped in rich context including web search results, file contents, and IDE state. As the author sums it up, context is &amp;ldquo;king, queen, and the entire royal court&amp;rdquo;: the more directly relevant information you pack into the prompt, the better the model performs. The final two lessons come from tool design: the file-reading tool returns only 200 to 250 lines per call to protect the context window, while terminal command outputs append stateful metadata like the current working directory so subsequent tool calls stay accurate.&lt;/p&gt;
&lt;h2 id="my-ai-skeptic-friends-are-all-nuts"&gt;&lt;a href="https://fly.io/blog/youre-all-nuts/" rel="noopener noreferrer"&gt;My AI Skeptic Friends Are All Nuts&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Thomas Ptacek (Fly.io) writes a deliberately provocative piece aimed at his AI-skeptic friends: even if LLM progress froze today, it would still be the second most important shift of his career. In his view, most dismissals are anchored in an outdated workflow—asking ChatGPT a question and pasting the snippet into an editor—whereas serious users now work with agents that read project files directly, run Unix tools, interact with Git, run linters, compile, execute tests, and iterate on the output. Because of that feedback loop, he argues, &amp;ldquo;hallucination&amp;rdquo; is largely a solved problem in practice: when an LLM invents a nonexistent function, the agent sees the compiler error and fixes it on the next turn. LLMs can handle the bulk of tedious code, freeing developers to spend their energy on the parts that truly matter.&lt;/p&gt;
&lt;p&gt;Ptacek addresses the remaining objections one by one. You are still responsible for whatever you merge to &lt;code&gt;main&lt;/code&gt;, so review AI-generated code just as you would a colleague&amp;rsquo;s. &amp;ldquo;Mediocre&amp;rdquo; code isn&amp;rsquo;t a dealbreaker because most code doesn&amp;rsquo;t need to be art, and LLMs actually raise the quality floor. LLMs struggling with Rust is mostly a tooling problem today, whereas Go pairs remarkably well with agents. On the craftsmanship argument, he reminds readers that professional developers are paid to solve real problems for people with code, not to act as artisanal woodworkers in their day jobs. He readily concedes that LLMs may shrink software job headcount, and ends by noting that his skeptic friends are sharp engineers—once they actually try coding agents, they&amp;rsquo;ll be even more effective with them than everyone else.&lt;/p&gt;
&lt;h2 id="claude-4-best-practices"&gt;&lt;a href="https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices" rel="noopener noreferrer"&gt;Claude 4 Best Practices&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This is Anthropic&amp;rsquo;s official prompt-engineering guide for Claude models, originally written for Claude 4 and since updated for newer generations. The foundational rule is to write clear, explicit instructions: treat Claude like a brilliant new hire who has zero context on your team&amp;rsquo;s norms. If you want &amp;ldquo;above and beyond&amp;rdquo; output, ask for it explicitly—for example, instead of just saying &amp;ldquo;Create an analytics dashboard,&amp;rdquo; add &amp;ldquo;Include as many relevant features and interactions as possible.&amp;rdquo; Explaining the &lt;em&gt;why&lt;/em&gt; behind a constraint helps Claude generalize toward your real goal; wrap few-shot examples in &lt;code&gt;&amp;lt;example&amp;gt;&lt;/code&gt; tags, and separate instructions, context, and input data with XML tags. For long documents, place the reference material at the top of the prompt and the question at the very end, asking Claude to quote relevant passages before answering.&lt;/p&gt;
&lt;p&gt;To control formatting, tell Claude what to do rather than what &lt;em&gt;not&lt;/em&gt; to do—such as &amp;ldquo;write in smooth, flowing prose paragraphs&amp;rdquo; instead of &amp;ldquo;do not use markdown&amp;rdquo;—and match your prompt&amp;rsquo;s formatting style to the output style you want. The guide also covers leveraging extended thinking to reflect on results after tool calls, encouraging parallel tool execution for independent operations, and tracking state across long-running tasks. For coding specifically, instruct Claude to write general-purpose solutions that work for all valid inputs rather than hardcoding values to pass visible tests, since tests are meant to verify correctness rather than define the implementation.&lt;/p&gt;
&lt;h2 id="stop-over-thinking-ai-subscriptions"&gt;&lt;a href="https://steipete.me/posts/2025/stop-overthinking-ai-subscriptions" rel="noopener noreferrer"&gt;Stop Over-thinking AI Subscriptions&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Peter Steinberger, tired of constantly being asked how much he spends on AI, runs the numbers to show that AI subscriptions are a bargain compared to the time they save. At the time of writing (early June 2025), he calls the $200/month Claude Max 20x plan the best deal in tech: roughly 900 messages per 5-hour window, which translates to virtually unlimited Claude Code usage. Cursor Pro at $20/month includes 500 fast requests and charges $0.04 per extra request, meaning a three-hour live tutorial with over 200 requests cost him only about $8. His biggest variable expense is OpenAI&amp;rsquo;s o3 ($10 per million input tokens, $40 per million output tokens), which makes up roughly half of his total AI bill; developers on a tighter budget can route o3 through a standard ChatGPT subscription using Repo Prompt, or join Anthropic&amp;rsquo;s developer partner program for 30% off API rates. He even built a menu-bar app called Vibe Meter to track spend in real time.&lt;/p&gt;
&lt;p&gt;Addressing fears of future price hikes, Steinberger points out that per-token inference costs have dropped roughly 1,000x over two years and competition continues to drive prices down. For contractors, the math is dead simple: at an $800 day rate, saving a single afternoon a month is worth $200, meaning Claude Max pays for itself in 5 hours and Cursor in 45 minutes. His takeaway: time is the only resource you cannot replenish, and Claude Max was the cheapest way to &amp;ldquo;mint&amp;rdquo; extra working hours.&lt;/p&gt;
&lt;h2 id="tests-should-not-contain-logic"&gt;&lt;del&gt;&lt;a href="https://blog.snork.dev/posts/tests-should-not-contain-logic.html" rel="noopener noreferrer"&gt;Tests Should Not Contain Logic&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;This short post makes a case for keeping logic—especially conditionals and loops—out of unit tests so that when a test fails, you can immediately rule out a bug in the test itself. The author illustrates this with a buggy FizzBuzz implementation: because it checks &lt;code&gt;n % 3&lt;/code&gt; before &lt;code&gt;n % 15&lt;/code&gt;, calling &lt;code&gt;fizzbuzz(15)&lt;/code&gt; returns &lt;code&gt;&amp;quot;fizz&amp;quot;&lt;/code&gt; instead of &lt;code&gt;&amp;quot;fizzbuzz&amp;quot;&lt;/code&gt;. If a developer tries to avoid repetitive assertions by writing a loop that computes the expected value using the exact same &lt;code&gt;if/elif&lt;/code&gt; chain, the test duplicates the production bug and passes anyway. By contrast, &amp;ldquo;obvious&amp;rdquo; flat assertions with literal expected values, like &lt;code&gt;assert fizzbuzz(15) == &amp;quot;fizzbuzz&amp;quot;&lt;/code&gt;, catch the bug immediately.&lt;/p&gt;
&lt;p&gt;To reduce repetition without sneaking logic back into tests, the author recommends parameterized (table-driven) tests: declare a list of explicit &lt;code&gt;(input, expected)&lt;/code&gt; pairs—such as &lt;code&gt;(1, &amp;quot;1&amp;quot;)&lt;/code&gt;, &lt;code&gt;(3, &amp;quot;fizz&amp;quot;)&lt;/code&gt;, &lt;code&gt;(5, &amp;quot;buzz&amp;quot;)&lt;/code&gt;, and &lt;code&gt;(15, &amp;quot;fizzbuzz&amp;quot;)&lt;/code&gt; with &lt;code&gt;@pytest.mark.parametrize&lt;/code&gt; in pytest. That keeps tests concise and readable while verifying each case independently against a concrete literal.&lt;/p&gt;
&lt;h2 id="do-you-really-know-java"&gt;&lt;a href="https://blog.jetbrains.com/idea/2025/05/do-you-really-know-java/" rel="noopener noreferrer"&gt;Do You Really Know Java?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Marking Java&amp;rsquo;s 30th anniversary, this JetBrains retrospective looks back at the language&amp;rsquo;s journey. In 1991, James Gosling&amp;rsquo;s team at Sun Microsystems kicked off the Green Project to build software for consumer electronics, needing a lightweight, safe language that could run across any hardware. Originally named Oak after the tree outside Gosling&amp;rsquo;s office window, the language was renamed Java after a trademark clash—likely inspired by Java coffee. Java debuted publicly in 1995 right as the web exploded. Its standout features for the era included &amp;ldquo;write once, run anywhere&amp;rdquo; portability via the JVM, automatic garbage collection, built-in multithreading (now joined by virtual threads from Project Loom), and a sandbox security model that treated untrusted code as a potential threat.&lt;/p&gt;
&lt;p&gt;The post also traces IntelliJ IDEA&amp;rsquo;s arrival in 2001, bringing context-aware code completion, reliable automated refactorings, and real-time static analysis. In the AI era, Java 24 ships over 20 features—including the Vector API to tap specialized CPU instructions for compute-heavy workloads—alongside Projects Panama, Amber, and Valhalla and ecosystem frameworks like LangChain4j and Spring AI. As the article puts it, Java doesn&amp;rsquo;t chase hype; it quietly gets stronger where it counts. Fun closing trivia: Java&amp;rsquo;s mascot Duke was designed by Joe Palrang, who later worked on animated films like &lt;em&gt;Shrek&lt;/em&gt; and &lt;em&gt;Madagascar&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="machine-code-isn"&gt;&lt;a href="https://jimmyhmiller.com/machine-code-isnt-scary" rel="noopener noreferrer"&gt;Machine Code Isn&amp;rsquo;t Scary&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Jimmy Miller, who started out writing ActionScript in Flash, shares how he got over his fear of working close to the metal. Once he actually dug in, he realized that if you can make sure a JSON payload conforms to a JSON schema, you can write machine code. Machine code isn&amp;rsquo;t a single universal format—it depends on the processor&amp;rsquo;s instruction set architecture (x86-64 on most PCs, ARM on modern Macs, Raspberry Pis, and phones)—but it revolves around just three concepts: instructions, registers, and memory. On AArch64, every instruction is a 32-bit integer; an add-immediate instruction, for instance, is just a packed bit layout combining a 64-bit flag, a 12-bit immediate value, a source register, and a destination register at fixed bit offsets. Assembly like &lt;code&gt;add x1, x0, #0x2a&lt;/code&gt; is simply a human-readable shorthand for that integer, while &lt;code&gt;str&lt;/code&gt; writes a value to memory much like assigning into a giant array.&lt;/p&gt;
&lt;p&gt;x86-64 is messier because instructions have variable lengths and carry decades of &amp;ldquo;historical baggage,&amp;rdquo; yet the building blocks are the same: a REX prefix for 64-bit operations, a ModR/M byte specifying register or memory addressing, and an opcode. Miller puts those bytes together by hand to encode an instruction that loads the number 42 into the &lt;code&gt;RBX&lt;/code&gt; register. He notes there is still plenty more to learn—status flags, calling conventions, the stack—but getting a minimal program running from raw bytes dissolved the mystique and filled in foundational gaps he had previously papered over with other people&amp;rsquo;s libraries.&lt;/p&gt;
&lt;h2 id="the-art-of-sql-query-optimization"&gt;&lt;a href="https://jnidzwetzki.github.io/2025/06/03/art-of-query-optimization.html" rel="noopener noreferrer"&gt;The Art of SQL Query Optimization&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;SQL is declarative: you state &lt;em&gt;what&lt;/em&gt; result you want, and the database engine figures out &lt;em&gt;how&lt;/em&gt; to compute it. The query optimizer enumerates candidate execution plans, estimates their cost, and picks the cheapest one—for example, when a query returns most of a table, a sequential full-table scan is often faster than chasing index pointers. To visualize where PostgreSQL switches plans, Jan Nidzwetzki built Plan Explorer, an open-source tool inspired by the Picasso optimizer visualizer: it runs a parameterized query across a 2D grid of selectivity values and plots the chosen execution plan, estimated cost, actual runtime, estimated row count, and actual row count. It can run entirely in the browser via PGlite (PostgreSQL compiled to WebAssembly) or in server mode against a real PostgreSQL instance using &lt;code&gt;EXPLAIN (ANALYZE)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On a self-join over an indexed 100,000-row table, Plan Explorer reveals PostgreSQL switching between five distinct execution plans depending on the filter bounds. One neat detail: even when the query is written with a &lt;code&gt;LEFT JOIN&lt;/code&gt;, PostgreSQL executes an &lt;code&gt;INNER JOIN&lt;/code&gt; because a filter on the right-hand table eliminates any &lt;code&gt;NULL&lt;/code&gt;-padded rows the left join would have produced. The visualizations also expose a cardinality-estimation bug: PostgreSQL assumes two filter predicates are correlated when they are actually independent, causing estimated row counts to diverge sharply from reality—a case where extended statistics can help. Beyond the striking visual patterns, Plan Explorer is a practical workbench for anyone tuning or developing custom cost models in PostgreSQL.&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 #34</title><link>https://miti99.com/en/post/2025/07/23/</link><pubDate>Wed, 23 Jul 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/07/23/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #34.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="why-tdd-doesn"&gt;&lt;a href="https://tidyfirst.substack.com/p/why-tdd-doesnt-lead-to-dumb-code" rel="noopener noreferrer"&gt;Why TDD Doesn&amp;rsquo;t Lead to Dumb Code&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Kent Beck pushes back against a common critique: that test-driven development (TDD) leads to &amp;ldquo;dumb&amp;rdquo; code because programmers write only the bare minimum to pass each test and never generalize. In his view, the design quality of TDD code is only as good as the design decisions its author makes—no different from code written without TDD. He illustrates this with a factorial function: start with &lt;code&gt;assert factorial(1) == 1&lt;/code&gt; and return &lt;code&gt;1&lt;/code&gt;, then add &lt;code&gt;assert factorial(2) == 2&lt;/code&gt; and temporarily return &lt;code&gt;2&lt;/code&gt;. Rather than piling on &lt;code&gt;if&lt;/code&gt; statements forever, the programmer notices the underlying structure: &lt;code&gt;2&lt;/code&gt; is really &lt;code&gt;2 * 1&lt;/code&gt;, where &lt;code&gt;2&lt;/code&gt; is the parameter &lt;code&gt;n&lt;/code&gt; and &lt;code&gt;1&lt;/code&gt; is the result of a recursive call, arriving at the general &lt;code&gt;n * factorial(n - 1)&lt;/code&gt; in tiny steps.&lt;/p&gt;
&lt;p&gt;The real difficulties lie elsewhere: sometimes you don&amp;rsquo;t yet have enough tests to constrain the code to only the right behavior, and sometimes you don&amp;rsquo;t yet see how to generalize and leave a few special cases in place for years—which is still fine as long as the code handles the cases that matter. What never happens is endless copy-pasting. Finally, Beck points out that a naive implementation is tightly coupled to the test suite, requiring code edits every time an assertion is added, whereas generalizing decouples them so you can add tests without changing code and vice versa.&lt;/p&gt;
&lt;h2 id="how-discord-indexes-trillions-of-messages"&gt;&lt;a href="https://discord.com/blog/how-discord-indexes-trillions-of-messages" rel="noopener noreferrer"&gt;How Discord Indexes Trillions of Messages&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Discord recounts how it re-architected its message search system—originally built on Elasticsearch in 2017—to keep up with trillions of messages. The old setup was showing serious cracks: Redis-backed indexing queues dropped messages when backlogged, bulk indexing wasn&amp;rsquo;t fault-tolerant when an Elasticsearch index or node had trouble, large clusters were expensive to operate and painful to upgrade or rolling-restart, and indexes for massive servers (guilds) grew unwieldy. Their new architecture runs Elasticsearch on Kubernetes via the Elastic Operator, splits storage into many smaller clusters grouped into &amp;ldquo;cells,&amp;rdquo; replaces Redis queues with Google PubSub for durability and replayability, and introduces a Rust router built on Tokio to batch messages by target cluster and index before bulk indexing.&lt;/p&gt;
&lt;p&gt;The cell architecture also unlocked new product capabilities: direct messages (DMs) are sharded by &lt;code&gt;user_id&lt;/code&gt; inside a dedicated cell, enabling cross-DM search for a user. For &amp;ldquo;Big Freaking Guilds&amp;rdquo; that hit Lucene&amp;rsquo;s ~2-billion-document limit, Discord reindexes their messages into indexes with more primary shards inside a dedicated cell. The results: indexing throughput doubled, median query latency dropped from 500 ms to under 100 ms (p99 from 1 second to under 500 ms), the team now runs 40 clusters hosting thousands of indexes, and cluster upgrades happen automatically without user-visible impact.&lt;/p&gt;
&lt;h2 id="data-oriented-programming-dop-in-java"&gt;&lt;a href="https://nejckorasa.github.io/posts/data-oriented-programming-in-java/" rel="noopener noreferrer"&gt;Data Oriented Programming (DOP) in Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Data-Oriented Programming (DOP) flips traditional object-oriented habits on their head: instead of bundling state and behavior together inside a class, you model data with simple passive structures and put logic in standalone functions that operate on that data. The post outlines four principles: model data immutably and transparently, model only the exact data needed, make illegal states unrepresentable, and separate operations from data. Modern Java supports this style cleanly through three features: &lt;code&gt;record&lt;/code&gt;s provide compact data carriers with &lt;code&gt;final&lt;/code&gt; fields (though they don&amp;rsquo;t automatically make referenced objects deeply immutable), &lt;code&gt;sealed&lt;/code&gt; classes restrict subtypes so the compiler knows every case, and pattern-matching &lt;code&gt;switch&lt;/code&gt; expressions enforce exhaustiveness, shifting bugs from runtime to compile time.&lt;/p&gt;
&lt;p&gt;In a &lt;code&gt;Shape&lt;/code&gt; example with &lt;code&gt;Circle&lt;/code&gt;, &lt;code&gt;Rectangle&lt;/code&gt;, and &lt;code&gt;Triangle&lt;/code&gt;, a &lt;code&gt;getCenter&lt;/code&gt; function written as a single &lt;code&gt;switch&lt;/code&gt; expression replaces adding methods across every subclass, removing the need for the Visitor pattern in this case. When a new subtype like &lt;code&gt;Pentagon&lt;/code&gt; is added, the compiler flags every &lt;code&gt;switch&lt;/code&gt; missing that branch—which is why the author advises avoiding &lt;code&gt;default&lt;/code&gt; branches that silence exhaustiveness checks. DOP also fits explicit result handling, such as a &lt;code&gt;Result&lt;/code&gt; type with &lt;code&gt;Ok&lt;/code&gt; and &lt;code&gt;Error&lt;/code&gt; variants that forces callers to handle both outcomes. Overall benefits include code that is easier to read, maintain, test, and refactor safely with lower coupling.&lt;/p&gt;
&lt;h2 id="why-performance-optimization-is-hard-work"&gt;&lt;a href="https://purplesyringa.moe/blog/why-performance-optimization-is-hard-work/" rel="noopener noreferrer"&gt;Why performance optimization is hard work&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author argues that performance optimization is hard not because engineers lack skill or knowledge, but because it is inherently exhaustive work that requires testing a huge number of possibilities. First is combinatorics: some optimizations only pay off when combined, others slow each other down, and ruling out &amp;ldquo;obviously bad&amp;rdquo; ideas upfront is mostly guesswork because a simple algorithm can win via vectorization while clever code loses to branch mispredictions. Second is continuity: algorithms with crossover thresholds, like hybrid sorts or FFTs, require tuning parameters empirically and re-measuring after every change, making an automated benchmark harness invaluable. Third is incompatibility: hardware constraints like two lookup tables that cannot fit in cache together or register pressure force hard trade-offs.&lt;/p&gt;
&lt;p&gt;The post also pushes back on the myth that &amp;ldquo;the compiler is smarter than you&amp;rdquo;: compilers don&amp;rsquo;t reason at the level of your domain abstractions and often allocate registers poorly, so you still have to inspect assembly and profile with tools like &lt;code&gt;perf&lt;/code&gt;. Documentation is another hurdle: x86 has detailed optimization manuals, whereas Apple Silicon has almost none, turning optimization into reverse engineering. In short, optimization means exploring dozens of variants, working around imperfect tooling, and reconciling conflicting wins—yet small improvements compound and are still worth the effort because they save real users&amp;rsquo; time.&lt;/p&gt;
&lt;h2 id="good-vs-great-animations"&gt;&lt;a href="https://emilkowal.ski/ui/good-vs-great-animations" rel="noopener noreferrer"&gt;Good vs Great Animations&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Emil Kowalski shares practical tips for taking UI animations from good to great. First, give animations a clear origin: a dropdown menu should expand from the button that triggered it by setting &lt;code&gt;transform-origin&lt;/code&gt;, and libraries like Radix expose CSS variables you can plug right in. Easing is the single most impactful lever; for an element already on screen that moves to a new position, &lt;code&gt;ease-in-out&lt;/code&gt; mimics natural acceleration and deceleration like a car, while &lt;code&gt;ease-out&lt;/code&gt; should be the default almost everywhere else. Built-in CSS easing curves are often too mild, so Kowalski nearly always reaches for custom curves and recommends easing.dev and easings.co.&lt;/p&gt;
&lt;p&gt;For cursor-driven interactions, tying values directly to mouse coordinates feels robotic; Motion&amp;rsquo;s &lt;code&gt;useSpring&lt;/code&gt; hook interpolates changes with spring physics so movement feels natural, though he advises saving it for decorative motion rather than functional charts like those in a banking app. Knowing your tools matters too: &lt;code&gt;clip-path&lt;/code&gt; makes tab-bar label colors transition cleanly in sync with the active indicator, while 3D transforms open up expressive effects. In Kowalski&amp;rsquo;s view, when baseline software quality is high everywhere, thoughtful motion is one of the clearest ways for a product to stand out.&lt;/p&gt;
&lt;h2 id="senior-engineers-should-make-side-bets"&gt;&lt;a href="https://www.seangoedecke.com/side-bets/" rel="noopener noreferrer"&gt;Senior engineers should make side bets&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke argues that junior engineers should stick closely to assigned work, because their tasks need experienced oversight and the fastest path to promotion is executing their core assignments well. Senior engineers, by contrast, shouldn&amp;rsquo;t just work down a ticket queue—they should spend 10–20% of their time on &amp;ldquo;side bets&amp;rdquo;: projects they believe are valuable to the company that nobody has asked for yet, such as a new feature, a performance optimization, or a developer-velocity improvement, provided the payoff is concrete. Side bets carry real risk: at worst you waste time and look to management like you&amp;rsquo;re working on the wrong things, and most bets will fail—in which case you quietly drop them and move on.&lt;/p&gt;
&lt;p&gt;The reason to make them anyway is that one winning bet pays for all the rest: anyone could have completed your routine ticket work, whereas the value of a successful side bet happened entirely because of you. When a bet pays off, share it proactively via an internal write-up or a chat with your manager; if you feel awkward showing it off, the benefit probably wasn&amp;rsquo;t concrete enough. Goedecke shares examples from GitHub: an &amp;ldquo;open in prompt editor&amp;rdquo; button saw zero adoption, whereas wiring AI inference permissions into GitHub Actions saw real usage. He lands two or three winning bets a year—and notes that if your bets never pan out, it&amp;rsquo;s a sign to stop making them.&lt;/p&gt;
&lt;h2 id="avoiding-skill-atrophy-in-the-age-of-ai"&gt;&lt;a href="https://addyo.substack.com/p/avoiding-skill-atrophy-in-the-age" rel="noopener noreferrer"&gt;Avoiding Skill Atrophy in the Age of AI&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Addy Osmani warns of the paradox of AI coding assistants: productivity goes up, but core skills can atrophy if you aren&amp;rsquo;t careful. A 2025 study by Microsoft and Carnegie Mellon found a correlation between higher trust in AI and lower self-reported critical thinking, though the findings don&amp;rsquo;t prove long-term skill loss. The warning signs creep in gradually: stopping reading documentation, pasting error messages straight into AI instead of debugging, copying code without understanding why it works, shying away from architectural design, and forgetting basic syntax. Osmani worries this erodes both individual learning and team mentorship. While letting go of obsolete skills is normal, the key is distinguishing which tasks can be safely offloaded to machines and which fundamentals must stay sharp.&lt;/p&gt;
&lt;p&gt;His prescription is to treat AI as a collaborator rather than a crutch: always verify and understand its output, actively hunt for bugs and edge cases, and ask AI to explain code line by line; schedule &amp;ldquo;no-AI days&amp;rdquo; to code from scratch and read docs directly; spend 15–30 minutes tackling a problem yourself before prompting; review AI-generated code as rigorously as a teammate&amp;rsquo;s PR; log topics you repeatedly ask AI about so you can fill those knowledge gaps; and use AI in a pair-programming style where you stay in the driver&amp;rsquo;s seat. The core message: use AI to amplify your capability rather than replace it, preserving both the craft and the joy of problem-solving.&lt;/p&gt;
&lt;h2 id="cursor-best-practices"&gt;&lt;a href="https://x.com/paraschopra/status/1917466537637859544" rel="noopener noreferrer"&gt;Cursor best practices&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://pbs.twimg.com/media/Gpw1p1waYAAeAyY?format=jpg" alt="Cursor best practices"&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.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #33</title><link>https://miti99.com/en/post/2025/07/22/</link><pubDate>Tue, 22 Jul 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/07/22/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #33.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-zgc-allocates-memory-for-the-java-heap"&gt;&lt;a href="https://joelsiks.com/posts/zgc-heap-memory-allocation/" rel="noopener noreferrer"&gt;How ZGC allocates memory for the Java heap&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;ZGC is Java&amp;rsquo;s low-latency garbage collector, and this post dives into how it allocates memory for the heap. ZGC divides the heap into logical &amp;ldquo;pages&amp;rdquo; of three sizes: small 2 MB pages for most objects, medium pages dynamically sized between 4 and 32 MB, and large pages that hold a single object each. Crucially, ZGC decouples physical memory from virtual memory and reserves virtual address space up to 16 times the maximum heap size (32 times on NUMA machines) so it can easily find contiguous virtual ranges and minimize fragmentation.&lt;/p&gt;
&lt;p&gt;Free memory is tracked in a mapped cache organized as a red-black tree. When an allocation is needed, ZGC tries in order: grabbing an existing contiguous range from the cache (the fastest path), committing more physical memory, &amp;ldquo;harvesting&amp;rdquo; by remapping multiple discontiguous regions into a single contiguous virtual range, or combining the latter two; only if all of those fail does it trigger garbage collection or throw an &lt;code&gt;OutOfMemoryError&lt;/code&gt;. On NUMA systems, the heap is partitioned evenly across nodes to favor local memory allocation. The post also highlights a practical trade-off: setting minimum heap size equal to maximum heap size pre-allocates all memory at startup, whereas dynamic allocation at runtime adds latency.&lt;/p&gt;
&lt;h2 id="optimizing-the-garbage-collector-when-migrating-cloud-workloads"&gt;&lt;a href="https://foojay.io/today/optimizing-the-garbage-collector-when-migrating-cloud-workloads/" rel="noopener noreferrer"&gt;Optimizing the Garbage Collector when Migrating Cloud Workloads&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Java&amp;rsquo;s &amp;ldquo;write once, run anywhere&amp;rdquo; promise makes moving applications from x86 machines to Arm-based cloud instances like AWS Graviton or Azure Cobalt fairly smooth, but getting peak performance on Arm Neoverse still requires tuning the garbage collector (GC). The post recommends using OpenJDK 11 or newer to pick up optimizations for modern Arm platforms, starting with G1 as a safe default for most server workloads thanks to its balance of throughput and latency, and considering ZGC or Shenandoah (Java 17+) for latency-sensitive applications with large heaps.&lt;/p&gt;
&lt;p&gt;On configuration, the author suggests setting &lt;code&gt;-XX:MaxGCPauseMillis&lt;/code&gt; to define a pause-time target and let the JVM self-tune, enabling &lt;code&gt;-XX:+UseAdaptiveSizePolicy&lt;/code&gt; so the JVM adjusts heap and generation sizes to real traffic, and sizing the heap carefully to balance collection frequency against pause duration. Finally, turn on GC logging with &lt;code&gt;-Xlog:gc&lt;/code&gt; and use Java Flight Recorder to inspect GC behavior, because only testing under realistic production workloads will tell you which settings meet your performance goals.&lt;/p&gt;
&lt;h2 id="how-javascript-works-behind-the-scenes"&gt;&lt;a href="https://www.deepintodev.com/blog/how-javascript-works-behind-the-scenes" rel="noopener noreferrer"&gt;How JavaScript Works Behind the Scenes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;JavaScript is single-threaded, so how does it handle asynchronous work without freezing up? This post explains the internals of a JavaScript engine (such as V8 in Chrome and Node.js), which centers on two components: the heap, where objects and variables live in memory, and the call stack, which tracks program execution and reflects JavaScript&amp;rsquo;s single thread of control. Every function call pushes a new execution context onto the stack containing local variables, arguments, the &lt;code&gt;this&lt;/code&gt; binding, and a reference to the outer scope; because contexts run sequentially, a heavy loop on the stack blocks everything behind it.&lt;/p&gt;
&lt;p&gt;To avoid blocking, slow operations are handed off to browser Web APIs like &lt;code&gt;fetch&lt;/code&gt;, &lt;code&gt;setTimeout&lt;/code&gt;, or geolocation. When they finish, their callbacks land in the task queue, whereas Promise-based continuations (&lt;code&gt;.then&lt;/code&gt;, &lt;code&gt;.catch&lt;/code&gt;, &lt;code&gt;async/await&lt;/code&gt;) go into the microtask queue. The event loop continuously watches the call stack, and whenever the stack is empty it drains the entire microtask queue before pulling the next regular task. That is why Promise callbacks typically run before &lt;code&gt;setTimeout&lt;/code&gt; callbacks, and how JavaScript stays non-blocking without extra execution threads—even though a CPU-heavy loop can still freeze the UI.&lt;/p&gt;
&lt;h2 id="why-embedding-models-should-match--advice-for-starting-a-blog"&gt;&lt;a href="https://foojay.io/today/breaktime-tech-talks-ep39-why-embedding-models-should-match-advice-for-starting-a-blog/" rel="noopener noreferrer"&gt;Why embedding models should match + Advice for starting a blog&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this episode of Breaktime Tech Talks, Jennifer Reif shares a practical lesson on why embedding models have to match. She generated vectors in Pinecone and Neo4j using two different OpenAI models (&lt;code&gt;text-embedding-ada-002&lt;/code&gt; and &lt;code&gt;text-embedding-3-small&lt;/code&gt;), then queried them from her application using a mismatched model. Even within the same provider family, the vector representations differed enough that similarity search returned nonsensical matches or nothing at all. The fix is to use the exact same embedding model for both stored documents and application queries; even then, different vector databases can return slightly different results due to their own similarity-search implementations—something to keep in mind when building RAG systems.&lt;/p&gt;
&lt;p&gt;The second half offers advice for starting a technical blog: write for yourself first, documenting your learning journey and how you solved problems so you can look them up later; keep a natural, conversational tone; let completed projects serve as a ready-made outline and edit just enough without over-polishing; remember that readers will skim for the section they need; and prioritize writing about problems you struggled to find answers for online, since others are likely searching for the exact same thing.&lt;/p&gt;
&lt;h2 id="hula-human-in-the-loop-llm-based-agents-for-software-development"&gt;&lt;a href="https://www.atlassian.com/blog/atlassian-engineering/hula-blog-autodev-paper-human-in-the-loop-software-development-agents" rel="noopener noreferrer"&gt;HULA: Human-in-the-loop LLM-based agents for software development&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Atlassian introduces HULA, a human-in-the-loop LLM agent framework designed to automate routine development tasks while keeping engineers in control. Accepted to the ICSE 2025 SEIP track, the workflow runs in four stages: an engineer selects a Jira issue and adds context; HULA drafts a plan listing the files and changes required for the engineer to approve or revise; HULA generates code, using compiler and linter feedback to iterate until it passes checks before waiting for engineer review; and finally the approved changes are opened as a pull request following the team&amp;rsquo;s normal process. At the time of writing, Atlassian reported that roughly 900 HULA-generated pull requests had been merged.&lt;/p&gt;
&lt;p&gt;In a September 2024 evaluation on SWE-bench Verified, HULA passed unit tests on 31% of issues, and a GPT-based metric judged its patches highly similar to human solutions in 45% of cases. Across 663 real Jira issues over two months, HULA produced a plan for 79% of items (82% of which engineers approved), generated code for 87% of approved plans, reached a pull request on 25%, and saw 59% of those PRs merged. Surveying 109 engineers showed 62% agreed HULA identified the right files to change and 61% found its code easy to understand, though only 33% felt the generated code fully solved the task. Engineers valued the time savings and better documentation, but still had to manually finish functionality and wanted a smoother UX.&lt;/p&gt;
&lt;h2 id="refactoring-gone-wild-avoiding-code-smells-and-cleaning-up-the-mess"&gt;&lt;a href="https://techhub.iodigital.com/articles/refactoring-gone-wild-avoiding-code-smells-and-cleaning-up-the-mess" rel="noopener noreferrer"&gt;Refactoring Gone Wild: Avoiding Code Smells and Cleaning Up the Mess&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Refactoring is a core engineering skill, but doing it well starts with spotting code smells. Using Kotlin examples, this article walks through more than ten common smells: the Pyramid of Doom (deeply nested conditionals), inconsistent naming, mysterious parameters, god functions, forests of null checks, tangled boolean expressions, chaotic error handling, overuse of mutable collections, duplicated validation logic, and misused coroutines. Each smell makes code harder to read, harder to maintain, and more complex than it needs to be.&lt;/p&gt;
&lt;p&gt;For every smell, the author pairs a concrete remedy: flatten nesting with guard clauses, standardize naming conventions, group related parameters into a &lt;code&gt;data class&lt;/code&gt;, split large functions into small testable ones, use safe-call and Elvis operators for nulls, extract named helper functions for complex boolean conditions, centralize error handling and validation, default to immutability, adopt structured concurrency, and lean on standard-library helpers like &lt;code&gt;groupBy&lt;/code&gt;, &lt;code&gt;takeIf&lt;/code&gt;, and &lt;code&gt;runCatching&lt;/code&gt;. The closing message is that &amp;ldquo;small, incremental improvements add up to a big difference&amp;rdquo;: you don&amp;rsquo;t need a massive rewrite—just steady cleanup to keep code readable and maintainable.&lt;/p&gt;
&lt;h2 id="how-to-write-error-messages-that-actually-help-users-rather-than-frustrate-them"&gt;&lt;a href="https://piccalil.li/blog/how-to-write-error-messages-that-actually-help-users-rather-than-frustrate-them/" rel="noopener noreferrer"&gt;How to write error messages that actually help users rather than frustrate them&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Error messages show up at the exact moment a user is already stuck, yet they are often written in robotic jargon. This post lays out a practical approach to writing error messages that genuinely help: start by auditing every place an error can occur—form fields, validation checks, 404 and 500 pages, empty search results, and dropped connections. Then write as if you were sitting next to the person and walking them through it: instead of &amp;ldquo;Invalid input,&amp;rdquo; write &amp;ldquo;Please enter the 6-digit code we emailed you&amp;rdquo;; instead of &amp;ldquo;No WiFi connection detected,&amp;rdquo; write &amp;ldquo;It looks like you&amp;rsquo;re offline—connect to WiFi and try again.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The author advises skipping cute or joking copy, which makes frustrated users feel their problem isn&amp;rsquo;t being taken seriously; the post cites a shopper who abandoned their cart after a typo triggered a message calling them a &amp;ldquo;silly sausage.&amp;rdquo; Use active voice to state clearly what went wrong and why—for example, &amp;ldquo;We couldn&amp;rsquo;t process your application because that file format isn&amp;rsquo;t supported; please re-attach it as a JPEG.&amp;rdquo; When users can fix the issue themselves, tell them the exact step to take; when they can&amp;rsquo;t, offer a clear fallback such as a retry button, support contact details, or reassurance that their work was saved. Finally, document message patterns for common scenarios to keep tone and clarity consistent across the product.&lt;/p&gt;
&lt;h2 id="the-difficulty-in-big-tech"&gt;&lt;a href="https://www.seangoedecke.com/difficulty-in-big-tech/" rel="noopener noreferrer"&gt;The difficulty in big tech&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Many people assume big tech companies move slowly because of bad processes or lazy engineers, but Sean Goedecke argues the real culprit is accumulated feature complexity. Every new feature can interact with every existing feature, causing the number of interactions engineers must reason about to explode as a product matures. Worse are &amp;ldquo;evil&amp;rdquo; cross-cutting features that touch the entire system: adding a new user type, for instance, forces engineers to audit permissions across every existing feature and remember that constraint forever after. The resulting cognitive load is so heavy that &amp;ldquo;getting anything done at all is really, really hard,&amp;rdquo; making it easy for engineers to miss even seemingly obvious edge cases.&lt;/p&gt;
&lt;p&gt;So why do big companies keep shipping features anyway? Because they make money: as Dan Luu has noted, seemingly minor features can each add a few percentage points of revenue, and 1% of revenue on products like Google Ads or AWS S3 is an enormous sum. In Goedecke&amp;rsquo;s view, big-tech slowness isn&amp;rsquo;t a sign of organizational dysfunction—it is a deliberate trade-off that accepts slower development velocity in exchange for the revenue of a densely featured product.&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 #28</title><link>https://miti99.com/en/post/2025/05/15/</link><pubDate>Thu, 15 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/15/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #28.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-airbnb-measures-listing-lifetime-value"&gt;&lt;a href="https://medium.com/airbnb-engineering/how-airbnb-measures-listing-lifetime-value-a603bf05142c" rel="noopener noreferrer"&gt;How Airbnb Measures Listing Lifetime Value&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Airbnb&amp;rsquo;s Data Science team introduces their framework for measuring Listing Lifetime Value (LTV) on a two-sided marketplace where many hosts and guests interact simultaneously. The framework builds on three metrics. &lt;em&gt;Baseline LTV&lt;/em&gt; is the total booking value a listing is expected to generate over the next 365 days, predicted via machine learning from features like calendar availability, nightly price, location, and host tenure, then discounted to present value. &lt;em&gt;Incremental LTV&lt;/em&gt; subtracts marketplace cannibalization from Baseline LTV—accounting for bookings that would have gone to another Airbnb listing if the new listing didn&amp;rsquo;t exist. Finally, &lt;em&gt;Marketing Incremental LTV&lt;/em&gt; isolates the additional value genuinely driven by Airbnb&amp;rsquo;s own host-acquisition campaigns.&lt;/p&gt;
&lt;p&gt;Putting this into production required solving three tough challenges. First, ground-truth labels take a full 365 days to mature, making models vulnerable to sudden market shifts like COVID-19; the team shortened training windows, added fine-grained geospatial features, and migrated to LightGBM. Second, true marketplace incrementality is never directly observable, so they estimate an economic production function modeling how total supply and demand in each local market segment combine to produce bookings—in high-demand, supply-constrained markets, adding a new listing generates far more incremental value. Third, to reduce early prediction uncertainty, the model dynamically updates LTV estimates daily as real booking signals roll in.&lt;/p&gt;
&lt;h2 id="six-jdk-24-features-you-should-know-about"&gt;&lt;a href="https://foojay.io/today/six-jdk-24-features-you-should-know-about/" rel="noopener noreferrer"&gt;Six JDK 24 Features You Should Know About&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Simon Ritter (Azul) highlights six standout features in JDK 24, released on March 18, 2025 with 24 JEPs—the largest feature count of any release since Java switched to its six-month release cadence. JEP 483, from Project Leyden, pre-loads and links application classes at build time on top of Application Class Data Sharing so they are ready immediately on JVM startup, cutting warmup time. JEP 485 (Stream Gatherers) finalizes the &lt;code&gt;Gatherer&lt;/code&gt; interface so developers can build custom intermediate &lt;code&gt;Stream&lt;/code&gt; operations, much like &lt;code&gt;Collector&lt;/code&gt; enables custom terminal operations. JEP 491 removes a major virtual-thread footgun: previously, blocking inside a &lt;code&gt;synchronized&lt;/code&gt; block &amp;ldquo;pinned&amp;rdquo; the underlying platform carrier thread because monitors were owned by carrier threads; now, monitors are associated directly with virtual threads.&lt;/p&gt;
&lt;p&gt;The other three JEPs focus on platform cleanup and security modernization. JEP 486 permanently disables the &lt;code&gt;SecurityManager&lt;/code&gt;, which was deprecated in JDK 17 and is rarely used to protect modern server-side code; any legacy applications still relying on it will need architectural changes before upgrading. JEP 498 causes the JVM to emit a runtime warning the first time any memory-access method in &lt;code&gt;sun.misc.Unsafe&lt;/code&gt; is called, nudging libraries toward &lt;code&gt;VarHandle&lt;/code&gt; and the Foreign Function &amp;amp; Memory API. Finally, JEP 501 deprecates the 32-bit x86 port for removal (Linux was the last remaining 32-bit x86 port after Windows 32-bit was removed in JDK 21). It&amp;rsquo;s a handy checklist as teams prepare for JDK 25, the next LTS release.&lt;/p&gt;
&lt;h2 id="javaone-2025-function-and-memory-access-in-pure-java"&gt;&lt;a href="https://www.infoq.com/news/2025/04/foreign-function-minborg/" rel="noopener noreferrer"&gt;JavaOne 2025: Function and Memory Access in Pure Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This InfoQ report covers Per-Åke Minborg&amp;rsquo;s (Oracle) JavaOne 2025 presentation on the Foreign Function &amp;amp; Memory API (FFM, JEP 454), finalized in JDK 22 under Project Panama as a modern replacement for JNI. As Minborg explained, JNI forces developers to stitch Java and C together in a brittle, high-maintenance workflow with clunky data marshaling, support limited to primitives and Java objects, no deterministic off-heap memory deallocation, and a ~2 GB addressing limit on &lt;code&gt;ByteBuffer&lt;/code&gt;. Community alternatives like JNA, JNR, and JavaCPP tried to bridge the gap over the years, but none became a universal standard.&lt;/p&gt;
&lt;p&gt;On the memory side, &lt;code&gt;MemorySegment&lt;/code&gt; models a contiguous region of 64-bit addressable memory with spatial bounds checks, temporal checks against use-after-free, and thread-confinement enforcement. Memory lifecycles are managed deterministically via &lt;code&gt;Arena&lt;/code&gt; across four flavors: Global, Auto, Confined, and Shared. &lt;code&gt;ValueLayout&lt;/code&gt; and &lt;code&gt;MemoryLayout&lt;/code&gt; describe structured off-heap data so you can derive strongly typed &lt;code&gt;VarHandle&lt;/code&gt; accessors instead of calculating raw byte offsets by hand—and declaring those &lt;code&gt;VarHandle&lt;/code&gt; instances &lt;code&gt;static final&lt;/code&gt; is critical for JIT inlining and peak performance. On the function side, the &lt;code&gt;jextract&lt;/code&gt; tool automatically generates Java bindings directly from native C header files, letting Java code call C functions like &lt;code&gt;qsort&lt;/code&gt; directly. In short, FFM delivers safe, high-performance off-heap memory access and native function calls in pure Java without writing or maintaining a single line of C glue code.&lt;/p&gt;
&lt;h2 id="ultimate-guide-to-project-reactor-thread-locals-and-context-propagation"&gt;&lt;a href="https://4comprehension.com/ultimate-guide-to-project-reactor-thread-locals-and-context-propagation/" rel="noopener noreferrer"&gt;Ultimate Guide to Project Reactor, Thread-Locals and Context Propagation&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Grzegorz Piwowarek explains why context propagation is notoriously tricky in Project Reactor. A &lt;code&gt;ThreadLocal&amp;lt;X&amp;gt;&lt;/code&gt; is conceptually a &lt;code&gt;Map&amp;lt;Thread, X&amp;gt;&lt;/code&gt;, whereas a reactive pipeline can hop across threads at any &lt;code&gt;publishOn()&lt;/code&gt; or &lt;code&gt;subscribeOn()&lt;/code&gt; boundary, leaving thread-local values behind. Reactor&amp;rsquo;s native solution is its immutable &lt;code&gt;Context&lt;/code&gt;: you write values downstream-to-upstream via &lt;code&gt;contextWrite()&lt;/code&gt; and read them inside the pipeline by replacing &lt;code&gt;map()&lt;/code&gt; with &lt;code&gt;flatMap()&lt;/code&gt; + &lt;code&gt;Mono.deferContextual()&lt;/code&gt;. Piwowarek also points out a simple rule of thumb: if you already have the value before assembling the reactive pipeline, just capture it in a normal lexical variable instead of overcomplicating things with &lt;code&gt;Context&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The harder challenge is integrating with third-party libraries that expect classic &lt;code&gt;ThreadLocal&lt;/code&gt; state, such as SLF4J&amp;rsquo;s &lt;code&gt;MDC&lt;/code&gt; for structured logging: you have to restore the value into &lt;code&gt;MDC&lt;/code&gt; right before each operator lambda executes and clear it afterward, which can be wrapped cleanly using the execute-around pattern in a helper like &lt;code&gt;withMDC()&lt;/code&gt;. For side-effect operators like &lt;code&gt;doOnNext()&lt;/code&gt; that don&amp;rsquo;t expose &lt;code&gt;Context&lt;/code&gt; directly, you can switch to &lt;code&gt;doOnEach()&lt;/code&gt;, filter for &lt;code&gt;onNext&lt;/code&gt; signals, and read the context from the &lt;code&gt;Signal&lt;/code&gt; object. Finally, Reactor supports automatic context propagation: by adding &lt;code&gt;io.micrometer:context-propagation&lt;/code&gt;, calling &lt;code&gt;Hooks.enableAutomaticContextPropagation()&lt;/code&gt;, and registering a &lt;code&gt;ThreadLocalAccessor&lt;/code&gt;, Reactor automatically snapshots and restores thread-local values across operator boundaries. While convenient, this global JVM hook adds runtime overhead to every reactive pipeline in the process, so weigh the trade-off carefully.&lt;/p&gt;
&lt;h2 id="jdk-24-g1parallelserial-gc-changes"&gt;&lt;a href="https://tschatzl.github.io/2025/04/01/jdk24-g1-serial-parallel-gc-changes.html" rel="noopener noreferrer"&gt;JDK 24 G1/Parallel/Serial GC Changes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Thomas Schatzl (Oracle) rounds up the improvements to HotSpot&amp;rsquo;s stop-the-world garbage collectors—G1, Parallel, and Serial—in JDK 24. In Parallel GC, redundant synchronization operations inside the object evacuation loop were removed (JDK-8269870), while Serial GC received ongoing code cleanup and refactoring. The most impactful changes landed in G1: to meet pause-time targets, G1 predicts internal operation costs like object copying and reference updating, but its initial default estimates had been calibrated years ago on an old SPARC machine and were overly conservative, causing G1 to take around 30 GC cycles to adapt to modern hardware. With JDK-8343189, the very first real runtime measurement immediately overrides the static default, allowing G1 to adapt dramatically faster at the slight risk of exceeding pause targets during the first couple of collections. Additionally, G1 now manages the remembered set for the entire young generation as a single unified structure (JDK-8336086), reducing duplication and saving native memory.&lt;/p&gt;
&lt;p&gt;Schatzl also previews the JDK 25 roadmap: merging remembered sets across old-generation regions (JDK-8343782) is already integrated, and G1&amp;rsquo;s write barrier has been redesigned from the ground up, promising up to 10% higher throughput, shorter pauses, and cleaner JIT-compiled code in exchange for a static memory overhead of roughly 0.2% of the heap size. Ongoing discussions also include bringing ZGC-style Automatic Heap Sizing to G1/Parallel/Serial with contributions from Microsoft and Google, as well as making G1 the true default collector even on small-memory containers where HotSpot currently falls back to Serial GC.&lt;/p&gt;
&lt;h2 id="making-makefiles-for-fun-and-profit"&gt;&lt;a href="https://dev.to/aws/making-makefiles-for-fun-and-profit-kl6" rel="noopener noreferrer"&gt;Making Makefiles for fun and profit&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Darko Mesaroš (AWS) revisits &lt;code&gt;make&lt;/code&gt;, the 48-year-old build automation tool created by Stuart Feldman so programmers wouldn&amp;rsquo;t keep debugging stale binaries after forgetting to recompile a modified file. Unlike a naive &lt;code&gt;build.sh&lt;/code&gt; script that recompiles everything from scratch, &lt;code&gt;make&lt;/code&gt; tracks file modification timestamps and rebuilds only what changed. Mesaroš dissects a classic C &lt;code&gt;Makefile&lt;/code&gt;: variables (which &lt;code&gt;make&lt;/code&gt; calls macros), the default &lt;code&gt;all&lt;/code&gt; target, link rules using automatic variables like &lt;code&gt;$@&lt;/code&gt; and &lt;code&gt;$^&lt;/code&gt;, pattern rules like &lt;code&gt;%.o: %.c&lt;/code&gt; for compiling individual source files, a &lt;code&gt;clean&lt;/code&gt; target, and &lt;code&gt;.PHONY&lt;/code&gt; declarations so targets still run even if a file of the same name exists in the directory.&lt;/p&gt;
&lt;p&gt;The second half shows how &lt;code&gt;make&lt;/code&gt; shines far beyond C projects: wrapping Terraform workflows with OS detection and interactive confirmation prompts before running &lt;code&gt;terraform destroy&lt;/code&gt;, spinning up local Docker development environments with Postgres and Redis for a Rust service, orchestrating a polyglot TypeScript + Rust AWS CDK project with targets for installing, building, deploying individual stacks, and testing locally against DynamoDB Local, and deploying a Hugo static site to S3 and AWS Amplify. To get past &lt;code&gt;make&lt;/code&gt;&amp;rsquo;s famously arcane syntax, Mesaroš uses the Amazon Q Developer CLI to generate &lt;code&gt;Makefile&lt;/code&gt; rules—even dynamically querying the Amplify App ID via the AWS CLI. It&amp;rsquo;s a fun reminder that battle-tested Unix tools are still worth learning, especially when AI assistants remove the initial syntax friction.&lt;/p&gt;
&lt;h2 id="improving-pinterest-search-relevance-using-large-language-models"&gt;&lt;a href="https://medium.com/pinterest-engineering/improving-pinterest-search-relevance-using-large-language-models-4cd938d4e892" rel="noopener noreferrer"&gt;Improving Pinterest Search Relevance Using Large Language Models&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Pinterest&amp;rsquo;s engineering team shares how they used large language models (LLMs) to improve search relevance—measuring how well a Pin actually satisfies a user&amp;rsquo;s search query rather than relying purely on historical click engagement. Their &amp;ldquo;teacher&amp;rdquo; model is a cross-encoder that takes the search query alongside a rich text representation of a Pin, fine-tuned on human-labeled relevance ratings as a multi-class classification task. Because Pins are primarily visual, the team enriches each Pin&amp;rsquo;s text from multiple sources: title and description, synthetic image captions generated by a BLIP vision-language model, top historically engaged search queries, user board titles where the Pin was saved, and linked web page titles. Offline evaluations showed that a fine-tuned Llama-3-8B model (using QLoRA) outperformed multilingual BERT by 12.5% and the production baseline by 19.7% in accuracy.&lt;/p&gt;
&lt;p&gt;Because serving an 8B-parameter LLM directly on every search request is too slow and expensive, Pinterest uses knowledge distillation: the teacher LLM labels billions of query-Pin pairs offline each day to train a lightweight &amp;ldquo;student&amp;rdquo; model that combines precomputed embeddings (SearchSAGE, PinSAGE, visual embeddings) with lexical match features like BM25. Thanks to the multilingual teacher model, the student generalizes well even to languages and countries with zero human-labeled training data. In online A/B tests, the distilled model improved relevance by 2.18% in nDCG@20 and boosted overall search fulfillment rate by over 1.5%. Future work includes direct real-time LLM serving, native vision-language models, and active learning.&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 #26</title><link>https://miti99.com/en/post/2025/05/13/</link><pubDate>Tue, 13 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/13/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #26.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-philosophy-of-software-design--with-john-ousterhout"&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/the-philosophy-of-software-design" rel="noopener noreferrer"&gt;The Philosophy of Software Design – with John Ousterhout&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this episode of &lt;em&gt;The Pragmatic Engineer&lt;/em&gt; podcast, Stanford professor John Ousterhout (author of &lt;em&gt;A Philosophy of Software Design&lt;/em&gt;) explains why software design matters even more in the age of AI. He compares today&amp;rsquo;s AI code-generation tools to a &amp;ldquo;tactical tornado&amp;rdquo;: they crank out working code at breakneck speed while easily leaving behind a trail of technical debt, meaning high-level architectural thinking remains firmly a human responsibility. At its core, Ousterhout says, software design is the art of decomposition—breaking a complex system into relatively independent modules. He also advocates the principle of &amp;ldquo;design it twice&amp;rdquo;: always force yourself to consider at least two genuinely different approaches before committing, because your second design is almost always better than your first.&lt;/p&gt;
&lt;p&gt;Ousterhout famously disagrees with several tenets of Robert C. Martin&amp;rsquo;s &lt;em&gt;Clean Code&lt;/em&gt; school. He argues that strict TDD encourages developers to fixate on narrow tactical details rather than overall system architecture (though he likes writing tests first when fixing bugs), that splitting code into tiny methods proliferates shallow interfaces instead of the &amp;ldquo;deep modules&amp;rdquo; (simple interfaces hiding rich functionality) we should aim for, and that code comments are essential for capturing abstractions and field invariants that code alone cannot express. At Stanford, he teaches software design through intensive code reviews and comparing student solutions side by side, much like a creative writing workshop. He is currently contributing an implementation of the Homa transport protocol to the Linux kernel. It&amp;rsquo;s a must-listen episode for junior developers.&lt;/p&gt;
&lt;h2 id="20-years-of-git-still-weird-still-wonderful"&gt;&lt;a href="https://blog.gitbutler.com/20-years-of-git" rel="noopener noreferrer"&gt;20 years of Git. Still weird, still wonderful&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Marking Git&amp;rsquo;s 20th anniversary, Scott Chacon (co-founder of GitHub and GitButler) looks back on the history of the tool. In April 2005, Linus Torvalds created Git as &amp;ldquo;the stupid content tracker&amp;rdquo; to replace BitKeeper and improve how the Linux kernel community collaborated via patches and tarballs. The very first commit contained just seven low-level C programs like &lt;code&gt;write-tree&lt;/code&gt; and &lt;code&gt;commit-tree&lt;/code&gt;, with zero concern for user-friendliness. Early on, Git was almost entirely low-level &amp;ldquo;plumbing,&amp;rdquo; while usable &amp;ldquo;porcelain&amp;rdquo; interfaces came from community shell-script wrappers like Cogito. Many familiar commands emerged organically: the original &lt;code&gt;git log&lt;/code&gt; was literally a three-line shell script piping &lt;code&gt;git-rev-list&lt;/code&gt; into &lt;code&gt;LESS&lt;/code&gt;, and &lt;code&gt;git rebase&lt;/code&gt; grew out of mailing-list discussions between Junio Hamano and Linus about patch workflows in 2005.&lt;/p&gt;
&lt;p&gt;Chacon also shares his personal journey: he originally used Git as a content distribution system for digital signage displays—matching Linus&amp;rsquo;s original &amp;ldquo;content tracker&amp;rdquo; philosophy—before writing the &lt;em&gt;Pro Git&lt;/em&gt; book and co-founding GitHub. In a fun bit of trivia, Git&amp;rsquo;s &amp;ldquo;octopus merge&amp;rdquo; strategy directly inspired GitHub&amp;rsquo;s Octocat mascot. Twenty years later, Git dominates software development while remaining as &amp;ldquo;weird and wonderful&amp;rdquo; as ever: an eccentric command-line UI sitting on top of a remarkably elegant data model.&lt;/p&gt;
&lt;h2 id="a-modest-critique-of-optional-handling"&gt;&lt;a href="https://mccue.dev/pages//4-5-25-optional-critique" rel="noopener noreferrer"&gt;A Modest Critique of Optional Handling&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ethan McCue critiques how many Java developers misuse &lt;code&gt;java.util.Optional&lt;/code&gt; when refactoring methods that previously returned &lt;code&gt;null&lt;/code&gt;. In his view, &lt;code&gt;Optional&lt;/code&gt; shines in Stream pipelines and API return types, not as a wholesale replacement for &lt;code&gt;null&lt;/code&gt; inside method bodies. The conventional wisdom to avoid &lt;code&gt;.isPresent()&lt;/code&gt;/&lt;code&gt;.get()&lt;/code&gt; in favor of &lt;code&gt;.map()&lt;/code&gt; or &lt;code&gt;.ifPresent()&lt;/code&gt; quickly falls apart when you need to throw checked exceptions, combine multiple &lt;code&gt;Optional&lt;/code&gt; values, or mutate local variables inside a lambda; nesting &lt;code&gt;.ifPresent()&lt;/code&gt; calls also pushes code into deeply indented arrow anti-patterns.&lt;/p&gt;
&lt;p&gt;McCue&amp;rsquo;s proposed alternative is refreshingly simple: unwrap the &lt;code&gt;Optional&lt;/code&gt; immediately into a nullable local variable using &lt;code&gt;.orElse(null)&lt;/code&gt; and handle it with standard &lt;code&gt;if (x != null)&lt;/code&gt; control flow. Static analysis tools and IDEs already excel at tracking nullability on local variables, checked exceptions work naturally inside regular &lt;code&gt;if&lt;/code&gt; blocks, and the method signature still explicitly forces callers to confront the possibility of a missing value. Backed by concrete before-and-after refactorings, the post is a great reminder for junior developers to favor clear, maintainable code over dogmatically following &amp;ldquo;never call &lt;code&gt;.get()&lt;/code&gt;&amp;rdquo; lint rules.&lt;/p&gt;
&lt;h2 id="project-loom-structured-concurrency-in-java"&gt;&lt;a href="https://rockthejvm.com/articles/structured-concurrency-in-java" rel="noopener noreferrer"&gt;Project Loom: Structured Concurrency in Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Riccardo Cardin at Rock the JVM provides a deep-dive tutorial on structured concurrency—part of Project Loom—running on Java 23 with &lt;code&gt;--enable-preview&lt;/code&gt;. He starts by showing the flaw in traditional unstructured concurrency with &lt;code&gt;ExecutorService&lt;/code&gt;: when a parent task fails or times out, child tasks can keep running in the background, leaking threads and wasting resources. Structured concurrency fixes this by enforcing the principle that the syntactic block structure of your code mirrors the runtime lifetime of its concurrent subtasks—meaning every child thread is guaranteed to finish before execution exits the enclosing lexical scope.&lt;/p&gt;
&lt;p&gt;At the center of the API is &lt;code&gt;StructuredTaskScope&lt;/code&gt;, which implements &lt;code&gt;AutoCloseable&lt;/code&gt; for &lt;code&gt;try-with-resources&lt;/code&gt; blocks and provides &lt;code&gt;fork()&lt;/code&gt; to spawn subtasks on virtual threads, &lt;code&gt;join()&lt;/code&gt; to await completion according to the scope&amp;rsquo;s policy, and &lt;code&gt;shutdown()&lt;/code&gt; to request cancellation of remaining subtasks. Cancellation is cooperative, and closing the scope still waits for all forked threads to terminate cleanly. Cardin illustrates this with a GitHub API client that fetches user profiles and repositories in parallel using the built-in &lt;code&gt;ShutdownOnFailure&lt;/code&gt; and &lt;code&gt;ShutdownOnSuccess&lt;/code&gt; policies. From there, he shows how to build custom policies by subclassing &lt;code&gt;StructuredTaskScope&lt;/code&gt; and overriding &lt;code&gt;handleComplete()&lt;/code&gt;, implementing functional helpers like &lt;code&gt;par()&lt;/code&gt;, &lt;code&gt;race()&lt;/code&gt;, &lt;code&gt;timeout()&lt;/code&gt;, and nested parent-child task trees. It is an excellent hands-on guide to writing safer, easier-to-reason-about concurrent code in modern Java.&lt;/p&gt;
&lt;h2 id="go"&gt;&lt;a href="https://mccue.dev/pages/4-5-25-go-http-server" rel="noopener noreferrer"&gt;Go&amp;rsquo;s HTTP Server Patterns in Java 25&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Ethan McCue demonstrates that modern Java can build HTTP servers in a lightweight, Go-like style by walking through a simple file-backed wiki web app written in Java 25. The application supports creating, viewing, and editing wiki pages stored as plain text files on disk. Its foundation is the JDK&amp;rsquo;s built-in &lt;code&gt;jdk.httpserver&lt;/code&gt; module, paired with McCue&amp;rsquo;s small &lt;code&gt;dev.mccue.jdk.httpserver&lt;/code&gt; helper library (which adds a clean &lt;code&gt;Body&lt;/code&gt; abstraction for writing responses), JMustache for HTML templating, and &lt;code&gt;dev.mccue.urlparameters&lt;/code&gt; for parsing form submissions.&lt;/p&gt;
&lt;p&gt;He models wiki entries with a &lt;code&gt;Page&lt;/code&gt; record exposing &lt;code&gt;save()&lt;/code&gt; and &lt;code&gt;load()&lt;/code&gt; methods, wires up dedicated request handlers for viewing, editing, and saving pages, and returns HTTP 302 redirects when users visit a nonexistent page. The walkthrough proves that with just the standard library and a few tiny, composable dependencies, you can build a clean web application in Java without reaching for a heavyweight framework. For high-traffic production workloads, he still suggests considering battle-tested servers like Jetty—while noting an important distinction in the JDK docs: the &amp;ldquo;testing, development, and debugging only&amp;rdquo; caveat applies specifically to &lt;code&gt;SimpleFileServer&lt;/code&gt; and the &lt;code&gt;jwebserver&lt;/code&gt; CLI tool, not to the underlying &lt;code&gt;jdk.httpserver&lt;/code&gt; HTTP/HTTPS API itself.&lt;/p&gt;
&lt;h2 id="java-is-dying-and-it-paid-off-my-mortgage"&gt;&lt;a href="https://alyosha.net/posts/java-is-dying-and-it-paid-off-my-mortgage/" rel="noopener noreferrer"&gt;Java is dying and it paid off my mortgage&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alyosha looks back on the career anxiety they felt as a junior developer specializing in Java. On Hacker News and YouTube, Java was practically invisible compared to JavaScript and the latest hyped frameworks, making the author worry they were betting their career on a dying language. Once they actually entered the job market, however, they found the exact opposite: Java roles consistently led in pay, benefits, and stability, driven by profitable enterprises quietly running their core systems on the JVM.&lt;/p&gt;
&lt;p&gt;In the author&amp;rsquo;s view, Java is in the sweet spot of a mature technology: nobody talks about it on social media, yet it powers massive economic value—and precisely because it is viewed as &amp;ldquo;uncool,&amp;rdquo; fewer new developers flock to it, keeping compensation high for those who know it well. Java skills bought the author&amp;rsquo;s house and paid off the mortgage. The lesson for junior developers: online hype does not reflect real-world hiring demand, and mastering a boring, rock-solid foundation often builds a far more lucrative and stable career than chasing the trend of the week.&lt;/p&gt;
&lt;h2 id="localhost-domains"&gt;&lt;a href="https://inclouds.space/localhost-domains" rel="noopener noreferrer"&gt;.localhost domains&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Charles Chamberlain shares how he escaped having to memorize arbitrary port numbers like &lt;code&gt;localhost:4333&lt;/code&gt; or &lt;code&gt;localhost:5050&lt;/code&gt; when running multiple web apps locally. Instead, he gives each local project a memorable &lt;code&gt;.localhost&lt;/code&gt; domain such as &lt;code&gt;inclouds.localhost&lt;/code&gt;. His macOS setup has three moving parts: running each web app as a background service via &lt;code&gt;launchd&lt;/code&gt; listening on its own port; adding an entry in &lt;code&gt;/etc/hosts&lt;/code&gt; pointing the &lt;code&gt;.localhost&lt;/code&gt; domain to &lt;code&gt;127.0.0.1&lt;/code&gt;; and running Caddy as a local reverse proxy that routes each domain to its port while automatically handling internal TLS certificates and &lt;code&gt;gzip&lt;/code&gt;/&lt;code&gt;zstd&lt;/code&gt; compression. Here is the minimal config for an app running on port 5050:&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;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# /etc/hosts&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;127.0.0.1 inclouds.localhost
&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="c1"&gt;# Caddyfile&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;inclouds.localhost &lt;span class="o"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; reverse_proxy localhost:5050
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; tls internal
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; encode gzip zstd
&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;Chamberlain admits that manually editing multiple system files is still a bit clunky and hopes to wrap the whole workflow into a single install/uninstall CLI command; a reader also pointed out that &lt;code&gt;dnsmasq&lt;/code&gt; can eliminate the manual &lt;code&gt;/etc/hosts&lt;/code&gt; edits. It&amp;rsquo;s a neat quality-of-life trick for keeping your local development environment organized when juggling several projects at once.&lt;/p&gt;
&lt;h2 id="ai-50-ai-agents-move-beyond-chat"&gt;&lt;a href="https://sequoiacap.com/article/ai-50-2025/" rel="noopener noreferrer"&gt;AI 50: AI Agents Move Beyond Chat&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://sequoiacap.com/wp-content/uploads/sites/6/2025/04/ai-50-2025.png" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Konstantine Buhler at Sequoia Capital analyzes the firm&amp;rsquo;s 2025 AI 50 list and highlights a major shift: AI is moving from answering questions in a chat box to autonomously completing end-to-end work. Powered by agentic workflows and reasoning models, the companies on this year&amp;rsquo;s list don&amp;rsquo;t just handle isolated prompts—they own entire business workflows, turning AI into an &amp;ldquo;engine of action&amp;rdquo; inside the enterprise. Standout examples include Harvey handling end-to-end legal workflows from document review and drafting to case analysis, Sierra automating customer service resolution, and Cursor generating complete software features from natural-language specs.&lt;/p&gt;
&lt;p&gt;The piece also spotlights the rise of physical robotics, where transformer models meet hardware: Figure AI is building humanoid robots powered by its new Helix model, while Skild AI is developing a shared foundation model for general-purpose robotics—a market Nvidia estimates at $50 trillion. Buhler views 2025 as the inflection point where AI agents began taking on high-value enterprise work, and predicts that by 2026 consumer AI agents will take off in earnest, automatically managing calendars, booking travel, and organizing files as enterprise breakthroughs trickle into everyday life.&lt;/p&gt;
&lt;h2 id="interesting-images-from-bytebytego"&gt;Interesting images from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/65279cf0-3266-445d-852b-a45d6ac9afa4_2250x2862.png" alt="A Cheatsheet On OOP Design Patterns"&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 #23</title><link>https://miti99.com/en/post/2025/05/10/</link><pubDate>Sat, 10 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/10/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #23.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="llms-an-operator"&gt;&lt;a href="https://theengineeringmanager.substack.com/p/llms-an-operators-view" rel="noopener noreferrer"&gt;LLMs: An Operator&amp;rsquo;s View&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;James Stanier looks at LLMs from the perspective of someone running an engineering organization. In his view, the baseline productivity floor for developers is rising: even skeptics acknowledge that tools like Copilot and Cursor speed up prototyping, code completion, and unit test generation. Engineering leaders should therefore proactively budget for paid seats and roll them out deliberately—surveying adoption, identifying internal champions to share workflows, and tracking impact over time. As individual output rises, teams can deliver more with fewer people, so before opening new headcount, leaders should first invest in tooling and training for their existing team, which costs a fraction of hiring another senior engineer.&lt;/p&gt;
&lt;p&gt;The flip side is that faster code generation does not automatically mean higher quality. Stanier recommends tightening code review practices—such as requiring multiple reviewers and running regular security refreshers for the team. Hiring is affected too: candidates using LLMs during remote interviews muddy evaluation signals, so companies need an explicit policy—either embracing AI tools and testing critical thinking, or banning them outright—and must communicate those rules upfront to candidates. The bottom line: adopting LLMs is now table-stakes infrastructure investment, paired with the guardrails needed to protect code quality and hiring standards.&lt;/p&gt;
&lt;h2 id="the-reality-of-tech-interviews-in-2025"&gt;&lt;a href="https://newsletter.pragmaticengineer.com/p/the-reality-of-tech-interviews" rel="noopener noreferrer"&gt;The Reality of Tech Interviews in 2025&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gergely Orosz, joined by Evan King (former Staff Engineer at Meta) and Stefan Mai (former Engineering Manager at Amazon and Meta), paints a picture of a tech hiring market that is simultaneously recovering and much tougher. Open roles at Big Tech are up roughly 40% year over year, and total tech job postings have climbed from their 2023 trough of 163,000 to around 230,000, though still far below the 2020–2022 peak. The recovery is highly uneven: AI infrastructure and ML ops roles command top-tier compensation, while new grads face brutal odds—one candidate applied to 100 companies, landed just 4 interviews, and received zero offers after six months. Mid-level loops have stretched out too, with one candidate going through eleven interview rounds before getting an offer.&lt;/p&gt;
&lt;p&gt;The bar for data structures, algorithms, and system design rounds has also risen noticeably: interviewers now expect complete, working solutions with proper error handling and input validation. Two standout trends are &amp;ldquo;downleveling&amp;rdquo;—where staff-level engineers accept senior roles after prolonged job searches—and &amp;ldquo;team matching&amp;rdquo; turning into an extra filtering stage that can stall offers for months. The authors advise preparing thoroughly for both technical and behavioral rounds at every level, especially for specialized roles, and lining up competing offers so you don&amp;rsquo;t get stuck in team-matching limbo.&lt;/p&gt;
&lt;h2 id="senior-developer-skills-in-the-ai-age-leveraging-experience-for-better-results"&gt;&lt;a href="https://manuel.kiessling.net/2025/03/31/how-seasoned-developers-can-achieve-great-results-with-ai-coding-agents/" rel="noopener noreferrer"&gt;Senior Developer Skills in the AI Age: Leveraging Experience for Better Results&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Manuel Kießling argues that AI coding agents like Cursor do not devalue senior engineering experience—they amplify it. While AI models have broad programming knowledge, they have almost no innate understanding of a project&amp;rsquo;s specific architecture, meaning results depend heavily on how a human guides them. Drawing on his team&amp;rsquo;s experience at Joboo, Kießling outlines three practices. First, well-structured requirements: clearly describing data relationships, system architecture, and task boundaries so the AI doesn&amp;rsquo;t wander off track. Second, tool-based guardrails: linters, static analysis, and automated test suites that provide continuous feedback so the agent can self-correct whenever a check fails. Third, file-based &amp;ldquo;keyframing&amp;rdquo;: creating empty skeleton files with the right namespaces and naming conventions upfront so the AI writes code that fits the existing structure instead of inventing random files.&lt;/p&gt;
&lt;p&gt;Using these techniques, his team shipped an entire contract-management feature spanning multiple applications and repositories in minutes rather than hours. Kießling even had the AI build a Python monitoring tool from scratch in a few hours despite having limited Python experience himself, thanks to thorough requirements docs and automated guardrails. The lesson: upfront planning matters more than ever—AI can execute almost anything, and experienced engineers are there to make sure it builds the right thing.&lt;/p&gt;
&lt;h2 id="jep-483-ahead-of-time-class-loading--linking"&gt;&lt;a href="https://www.morling.dev/blog/jep-483-aot-class-loading-linking/" rel="noopener noreferrer"&gt;JEP 483: Ahead-of-Time Class Loading &amp;amp; Linking&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gunnar Morling puts JEP 483—a Java 24 feature from Project Leyden—to the test, showing how it cuts Java application startup time without requiring any source code changes. The idea is shifting class loading and linking from runtime to build time, building on top of existing Application Class Data Sharing (AppCDS) machinery. Creating the AOT cache takes a two-step training run: first recording loaded classes into a configuration file, then generating the cache image from that configuration, with the classpath kept identical between training and production runs.&lt;/p&gt;
&lt;p&gt;On Apache Kafka 4.0, the resulting AOT cache file weighs around 66 MB and drops startup time from 690 ms to 285 ms—a 59% reduction—with most of the savings coming from skipping class reading and parsing. On Apache Flink, time to first message drops from 1.875 seconds to 0.913 seconds, a 51% improvement. Some limitations remain: custom class loaders are not yet supported, JVM startup flags must be adjusted, and integrating the training run into container image builds can add pipeline complexity. Compared with GraalVM native images—which start in milliseconds and use less memory but require code adjustments and a closed-world assumption—Project Leyden aims for a pragmatic middle ground that is immediately useful for cloud-native Java services.&lt;/p&gt;
&lt;h2 id="specifications-in-jakarta-data"&gt;&lt;a href="https://in.relation.to/2025/03/28/repository-specifications/" rel="noopener noreferrer"&gt;Specifications in Jakarta Data&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gavin King (Hibernate) shows how to implement the &amp;ldquo;specifications&amp;rdquo; pattern—familiar from Spring Data—on top of Jakarta Data. Specifications allow dynamic query filtering via the JPA Criteria API without repetitive boilerplate. While Jakarta Data does not yet include built-in specification support, King demonstrates that all it takes is a shared super-interface &lt;code&gt;JpaRepository&amp;lt;T&amp;gt;&lt;/code&gt; exposing two methods: &lt;code&gt;session()&lt;/code&gt; returning Hibernate&amp;rsquo;s &lt;code&gt;StatelessSession&lt;/code&gt; and &lt;code&gt;entityClass()&lt;/code&gt; returning the entity class. Built on top of those, &lt;code&gt;find()&lt;/code&gt; and &lt;code&gt;count()&lt;/code&gt; accept a specification modeled as a &lt;code&gt;BiFunction&amp;lt;CriteriaBuilder, Root&amp;lt;T&amp;gt;, Predicate&amp;gt;&lt;/code&gt; and construct the corresponding Criteria query.&lt;/p&gt;
&lt;p&gt;Paired with the JPA static metamodel, this approach is fully type-safe, catching misspelled attribute names or type mismatches at compile time. King also includes a &lt;code&gt;compose()&lt;/code&gt; helper for combining multiple specifications and hints that Jakarta Data 1.1 is working on a &amp;ldquo;much more interesting&amp;rdquo; native solution. The two snippets below count books matching a title pattern and find books matching both title and author name:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;library&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;like&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Book_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-java" data-lang="java"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;library&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;find&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;and&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;like&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Book_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;#34;%&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;book&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Book_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;authors&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Author_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;equalTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;authorName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="there-is-no-vibe-engineering"&gt;&lt;a href="https://serce.me/posts/2025-03-31-there-is-no-vibe-engineering" rel="noopener noreferrer"&gt;There is no Vibe Engineering&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sergey Tselovalnikov (SerCe) contrasts &amp;ldquo;vibe coding&amp;rdquo;—Andrej Karpathy&amp;rsquo;s term for programming primarily via AI prompts rather than working directly with code—with real software engineering. His central thesis builds on the classic definition that &amp;ldquo;software engineering is programming integrated over time&amp;rdquo;: vibe coding solves for a single point in time, whereas production systems must survive real-world traffic, scale with demand, withstand security threats, migrate live user data, and adapt to changing requirements. AI can spin up prototypes remarkably fast, but these long-term concerns are hard to express in a prompt and impossible to verify just by eyeballing the UI. Good engineering practices push failure modes left, where fixing them is cheap; vibe coding pushes them right, where fixing them is expensive.&lt;/p&gt;
&lt;p&gt;Tselovalnikov imagines a future where &amp;ldquo;vibe engineering&amp;rdquo; could exist: systems assembled from strictly encapsulated AI-generated components surrounded by rigorous automated testing, profiling, tracing, canary deployments, and protocol compatibility checks. In that world, the engineer&amp;rsquo;s role blends software architect and platform engineer—writing less application code by hand while spending far more energy on boundaries and verification. Yet that is still traditional software engineering, just operating with new tools. In his view, the true inflection point will only arrive when engineers feel comfortable going on call for a production service written entirely by AI—something very few would dare do today.&lt;/p&gt;
&lt;h2 id="refining-var-handles-in-valhalla"&gt;&lt;a href="https://cr.openjdk.org/~jrose/values/atomic-value-access-api.html" rel="noopener noreferrer"&gt;Refining Var-Handles in Valhalla&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This technical design note by John Rose (OpenJDK) explores how &lt;code&gt;VarHandle&lt;/code&gt;—Java&amp;rsquo;s API for heap variable access supporting &lt;code&gt;getfield&lt;/code&gt;, &lt;code&gt;putfield&lt;/code&gt;, and atomic operations like CAS—needs to evolve to support value types in Project Valhalla. The core challenge is ensuring the interpreter, JIT compiler, and JNI access memory consistently when a variable can be laid out in multiple physical representations on the heap. The &lt;code&gt;LayoutKind&lt;/code&gt; enum defines six representations: &lt;code&gt;REFERENCE&lt;/code&gt; for traditional nullable managed pointers, &lt;code&gt;ATOMIC_FLAT&lt;/code&gt; for values packed into 64 bits, &lt;code&gt;NON_ATOMIC_FLAT&lt;/code&gt; for multi-field values wider than 64 bits, their nullable counterparts &lt;code&gt;NULLABLE_ATOMIC_FLAT&lt;/code&gt; and &lt;code&gt;NULLABLE_NON_ATOMIC_FLAT&lt;/code&gt; (which include a null indicator), and &lt;code&gt;BUFFERED&lt;/code&gt; for read-only heap-buffered copies.&lt;/p&gt;
&lt;p&gt;Rose proposes retiring the current internal &lt;code&gt;getValue&lt;/code&gt; method as insufficient, replacing it with three metadata queries and one new access primitive: &lt;code&gt;isFlat()&lt;/code&gt; to distinguish flattened values from ordinary references, &lt;code&gt;isConsistent()&lt;/code&gt; to indicate whether reads and writes are strictly atomic (non-tearing), &lt;code&gt;isPortableAtomic()&lt;/code&gt; to indicate support for advanced atomic operations like CAS, and &lt;code&gt;copyConsistentValue()&lt;/code&gt; to atomically copy heap words according to the layout&amp;rsquo;s protocol. The key design insight is splitting responsibilities into two layers: a new low-level intrinsic handles atomic memory copying, while existing &lt;code&gt;Unsafe&lt;/code&gt; methods operate on a thread-local buffer (specifically a one-element array) to pack and unpack value fields. This keeps &lt;code&gt;VarHandle&lt;/code&gt; logic clean and decoupled from complex GC and memory-layout details.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #21</title><link>https://miti99.com/en/post/2025/05/08/</link><pubDate>Thu, 08 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/08/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #21.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="how-to-monitor-jvm"&gt;&lt;a href="https://www.baeldung.com/java-jvm-monitor-non-heap-memory-usage" rel="noopener noreferrer"&gt;How to Monitor JVM&amp;rsquo;s Non-Heap Memory Usage&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This Baeldung article surveys tools for monitoring JVM non-heap memory usage—the memory regions outside the heap such as Metaspace, JIT code cache, GC structures, and direct buffers. The simplest option is &lt;code&gt;jcmd&lt;/code&gt;: once Native Memory Tracking is enabled, running &lt;code&gt;jcmd &amp;lt;pid&amp;gt; VM.native_memory&lt;/code&gt; prints the reserved and committed memory for each region. If you prefer a GUI, &lt;code&gt;jconsole&lt;/code&gt; includes a built-in non-heap chart under the Memory tab, while VisualVM displays Metaspace out of the box and can be extended with the MBeans and Buffer Pools plugins to inspect individual regions and direct buffers.&lt;/p&gt;
&lt;p&gt;For deeper analysis, Java Mission Control (JMC) lets you inspect total non-heap memory via the MBean Browser (note that this figure excludes direct buffers), and starting in Java 20 you can continuously record Native Memory Tracking events via JFR to track consumption by memory category over time. Finally, the JMX Exporter exposes &lt;code&gt;MemoryMXBean&lt;/code&gt; metrics at a Prometheus-compatible &lt;code&gt;/metrics&lt;/code&gt; endpoint, integrating non-heap monitoring into existing observability stacks. The author&amp;rsquo;s rule of thumb: use &lt;code&gt;jcmd&lt;/code&gt; or &lt;code&gt;jconsole&lt;/code&gt; for quick checks, pair JFR with JMC when you need fine-grained detail, and always account for the resource overhead of the monitoring tools themselves.&lt;/p&gt;
&lt;h2 id="unlocking-the-power-of-interfaces-creative-approaches-in-java"&gt;&lt;a href="https://gainjavaknowledge.medium.com/unlocking-the-power-of-interfaces-creative-approaches-in-java-635f390a1e0d" rel="noopener noreferrer"&gt;Unlocking the Power of Interfaces: Creative Approaches in Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This Medium post by Real World Java (Gain Java Knowledge) shows that Java interfaces are more than just contracts for classes to implement—they are powerful tools for decoupling components and making code extensible, reusable, and maintainable. The author walks through eight creative uses of interfaces, starting with the Strategy pattern: defining an interface like &lt;code&gt;PaymentStrategy&lt;/code&gt; for a family of algorithms and swapping concrete implementations (credit card, PayPal, etc.) at runtime. Next are callback interfaces that allow called code to invoke caller-supplied logic, functional interfaces paired with Java 8 lambda expressions, and mixin interfaces—where a class combines behavior from multiple interfaces to achieve multiple inheritance of behavior.&lt;/p&gt;
&lt;p&gt;The remaining sections cover dependency injection through interfaces to reduce tight coupling between classes, the Observer pattern, polymorphism when storing heterogeneous objects in a single collection typed to a shared interface, and default methods that add new functionality to interfaces without breaking existing implementations. For newer Java developers, the post serves as a concise collection of examples showing how interfaces underpin many classic design patterns.&lt;/p&gt;
&lt;h2 id="how-java-manages-thread-synchronization-with-locks-and-monitors"&gt;&lt;a href="https://medium.com/@AlexanderObregon/how-java-manages-thread-synchronization-with-locks-and-monitors-541ce7c7a0b2" rel="noopener noreferrer"&gt;How Java Manages Thread Synchronization with Locks and Monitors&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alexander Obregon explains how Java handles thread synchronization at the JVM level. Every object is associated with an intrinsic lock and a monitor; when a thread enters a &lt;code&gt;synchronized&lt;/code&gt; method or block, it must acquire ownership of the monitor while other contending threads wait (the JVM may spin briefly or park the thread depending on contention). The monitor tracks which thread holds the lock, which threads are waiting in the entry set, and which threads are waiting for a signal via &lt;code&gt;wait()&lt;/code&gt;, &lt;code&gt;notify()&lt;/code&gt;, or &lt;code&gt;notifyAll()&lt;/code&gt;—methods that may only be called while holding the lock, or else an &lt;code&gt;IllegalMonitorStateException&lt;/code&gt; is thrown. Intrinsic locks are reentrant: a thread that already holds a lock can acquire it again thanks to a recursion counter inside the monitor. To reduce overhead, the JVM uses lightweight locking first and only &amp;ldquo;inflates&amp;rdquo; to a full monitor under sustained contention; biased locking was used historically but has been disabled by default since JDK 15.&lt;/p&gt;
&lt;p&gt;The second half introduces &lt;code&gt;ReentrantLock&lt;/code&gt; in &lt;code&gt;java.util.concurrent.locks&lt;/code&gt;, which offers more flexibility than &lt;code&gt;synchronized&lt;/code&gt; via &lt;code&gt;tryLock()&lt;/code&gt; for non-blocking acquisition attempts, &lt;code&gt;lockInterruptibly()&lt;/code&gt; so waiting threads can respond to interrupts, and multiple &lt;code&gt;Condition&lt;/code&gt; objects to maintain separate wait queues per condition, such as in a bounded producer-consumer buffer. Under the hood sits &lt;code&gt;AbstractQueuedSynchronizer&lt;/code&gt; (AQS), which manages waiting threads using a doubly linked FIFO queue and &lt;code&gt;LockSupport.park()&lt;/code&gt;. The article also notes fair locks, which grant access to the longest-waiting thread at the cost of lower throughput, which is why most systems stick with the non-fair default.&lt;/p&gt;
&lt;h2 id="building-a-custom-spring-boot-starter-for-shared-logic"&gt;&lt;a href="https://medium.com/@AlexanderObregon/building-a-custom-spring-boot-starter-for-shared-logic-9be5699aff18" rel="noopener noreferrer"&gt;Building a Custom Spring Boot Starter for Shared Logic&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Alexander Obregon walks through packaging shared cross-cutting logic—such as logging setup, exception handling, or database configuration—into a custom Spring Boot starter instead of copy-pasting it across projects. At the core of a starter is auto-configuration: a class annotated with &lt;code&gt;@AutoConfiguration&lt;/code&gt; declares beans alongside conditional annotations like &lt;code&gt;@ConditionalOnMissingBean&lt;/code&gt; (backing off if the application defines its own bean) or &lt;code&gt;@ConditionalOnClass&lt;/code&gt; (activating only when required classes are on the classpath). Starting in Spring Boot 3, auto-configuration classes are registered in &lt;code&gt;META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports&lt;/code&gt; rather than the legacy &lt;code&gt;spring.factories&lt;/code&gt;, while &lt;code&gt;@ConfigurationProperties&lt;/code&gt; and &lt;code&gt;@EnableConfigurationProperties&lt;/code&gt; let consumers customize behavior via &lt;code&gt;application.properties&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The second half covers packaging and publishing. For third-party starters, Spring&amp;rsquo;s documentation recommends naming modules &lt;code&gt;&amp;lt;name&amp;gt;-spring-boot-starter&lt;/code&gt;, reserving the &lt;code&gt;spring-boot&lt;/code&gt; prefix for official Spring artifacts. The remaining steps include adding &lt;code&gt;spring-boot-autoconfigure&lt;/code&gt; and the configuration metadata annotation processor for IDE autocomplete, running &lt;code&gt;mvn clean install&lt;/code&gt; to test locally, and publishing to an internal or public Maven repository. Obregon also advises keeping starters lean and marking non-essential dependencies as &lt;code&gt;optional&lt;/code&gt; to avoid version conflicts in consuming applications. Once structured properly, Spring Boot automatically wires everything up on startup.&lt;/p&gt;
&lt;h2 id="real-world-garbage-collection-solutions"&gt;&lt;a href="https://dzone.com/articles/real-world-garbage-collection-solutions" rel="noopener noreferrer"&gt;Real-World Garbage Collection Solutions&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This DZone article presents real-world case studies showing how tuning garbage collection (GC) can deliver major performance gains at minimal cost. First, the author outlines the key metrics to watch: throughput (the percentage of time the application spends doing real work, which should be around 99% for critical systems), GC pause latency, CPU time spent in GC, and overall response time. To gather data, enable GC logging with &lt;code&gt;-Xlog:gc*:file=&amp;lt;path&amp;gt;&lt;/code&gt; (Java 9+) or &lt;code&gt;-XX:+PrintGCDetails -Xloggc:&amp;lt;path&amp;gt;&lt;/code&gt; (Java 8 and earlier) and analyze the logs with a tool like GCeasy.&lt;/p&gt;
&lt;p&gt;Three case studies illustrate the impact. An insurance company suffered back-to-back Full GCs during peak hours; adding memory and resizing the heap boosted throughput by 23% and cut GC CPU usage in half. A warehouse robotics control application running CMS on a 126 GB heap experienced occasional pauses lasting up to 5 minutes; switching to G1 brought the worst-case pause down to about 2 seconds with an average of 198 ms. Finally, a cloud service provider running Parallel GC with a 40 GB heap split evenly between young and old generations shrank the young generation to 1 GB, raising throughput to 99% and dropping average pause time from 12 seconds to 139 ms. Takeaway: when a Java application slows down, GC analysis should be your first stop.&lt;/p&gt;
&lt;h2 id="java-naming-conventions"&gt;&lt;a href="https://www.baeldung.com/java-naming-conventions" rel="noopener noreferrer"&gt;Java Naming Conventions&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Baeldung summarizes the foundational Java naming conventions that keep codebases readable, consistent, and easy to collaborate on. Classes use &lt;code&gt;UpperCamelCase&lt;/code&gt; with nouns or noun phrases that clearly describe their role, like &lt;code&gt;CustomerAccount&lt;/code&gt;, avoiding abbreviations or vague names; interfaces also use &lt;code&gt;UpperCamelCase&lt;/code&gt; and express the capability implementing classes commit to, such as &lt;code&gt;Printable&lt;/code&gt;. Variables use &lt;code&gt;lowerCamelCase&lt;/code&gt;, while &lt;code&gt;static final&lt;/code&gt; constants use &lt;code&gt;UPPER_SNAKE_CASE&lt;/code&gt; like &lt;code&gt;MAX_BALANCE&lt;/code&gt;; methods use &lt;code&gt;lowerCamelCase&lt;/code&gt; starting with a verb that describes the action, such as &lt;code&gt;deposit()&lt;/code&gt; or &lt;code&gt;print()&lt;/code&gt;. Variables or methods holding or returning multiple elements should use plural names.&lt;/p&gt;
&lt;p&gt;Packages are written in all lowercase using reverse domain name notation—for example, &lt;code&gt;com.baeldung.namingconventions&lt;/code&gt;—to organize code cleanly and prevent namespace collisions. Enums use &lt;code&gt;UpperCamelCase&lt;/code&gt; for the type name and &lt;code&gt;UPPER_SNAKE_CASE&lt;/code&gt; for their constants (such as &lt;code&gt;DayOfWeek.MONDAY&lt;/code&gt;), and annotations follow &lt;code&gt;UpperCamelCase&lt;/code&gt; just like classes, e.g., &lt;code&gt;@Auditable&lt;/code&gt;. While simple, these conventions are essential habits for new Java developers to build early on.&lt;/p&gt;
&lt;h2 id="vibe-coding-vs-reality"&gt;&lt;a href="https://cendyne.dev/posts/2025-03-19-vibe-coding-vs-reality.html" rel="noopener noreferrer"&gt;Vibe Coding vs Reality&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Cendyne pushes back against the &amp;ldquo;vibe coding&amp;rdquo; hype—the viral idea sparked by Andrej Karpathy of &amp;ldquo;giving in to the vibes&amp;rdquo; and forgetting the code exists while letting LLMs write everything. The author admits that AI coding agents like Cursor or GitHub Copilot in agent mode look magical when scaffolding a greenfield project from an empty folder, but that excitement quickly fades once the codebase grows. Working with Claude 3.7 Sonnet, Cendyne catalogs a long list of recurring blunders: duplicating TypeScript interfaces instead of importing them, recreating components that already exist, putting security-sensitive trust logic on the client side, mutating production code to match broken tests instead of fixing the tests, refactoring only one instance of duplicated code while leaving the rest untouched, and degenerating into gibberish once the context window fills up.&lt;/p&gt;
&lt;p&gt;According to the author, the core limitation is that models cannot genuinely learn new project knowledge on the fly, cannot monitor multiple real-time feedback streams simultaneously (such as server logs alongside end-to-end test output), and lack both short- and long-term organizational memory. The &amp;ldquo;Claude Plays Pokémon&amp;rdquo; experiment illustrates how even with handoff notes across context resets, the model keeps repeating the exact same mistakes. The verdict: vibe coding might get you 80% of the way to a prototype, but building reliable, secure software worth paying for still requires experienced humans.&lt;/p&gt;
&lt;h2 id="sell-yourself-sell-your-work"&gt;&lt;a href="https://www.solipsys.co.uk/new/SellYourselfSellYourWork.html" rel="noopener noreferrer"&gt;Sell Yourself, Sell Your Work&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This short piece on &lt;code&gt;solipsys.co.uk&lt;/code&gt; reminds engineers that doing great technical work is not enough on its own: if you lock yourself in a room, produce brilliant work, and never tell anyone about it, nobody knows, nobody benefits, and the effort is effectively wasted. The author has met many talented engineers who avoid writing reports because they find it boring, difficult, and beside the point. In reality, writing and presenting clearly and concisely—since typos or sloppy prose are enough to lose a chunk of your audience—is how your work saves other people time and builds your own credibility.&lt;/p&gt;
&lt;p&gt;The post quotes Richard Hamming&amp;rsquo;s famous 1986 talk &amp;ldquo;You and Your Research&amp;rdquo;: finishing a piece of work is not enough—you have to &amp;ldquo;sell&amp;rdquo; it, because everyone is busy with their own problems; you must present it well enough that others are willing to set their own work aside to read yours, honing your skills in writing, formal talks, and informal hallway conversations alike. Even if you start your own company, you still have to sell your products and services. The closing message: let the world benefit from the work you do.&lt;/p&gt;
&lt;h2 id="building-resilient-payment-systems-at-ssense-our-journey-towards-asynchronous-processing"&gt;&lt;a href="https://medium.com/ssense-tech/building-resilient-payment-systems-at-ssense-our-journey-towards-asynchronous-processing-56d46dc2b348" rel="noopener noreferrer"&gt;Building Resilient Payment Systems at SSENSE: Our Journey Towards Asynchronous Processing&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The engineering team at fashion e-commerce platform SSENSE shares how they migrated their payment system from synchronous to asynchronous processing. Their legacy architecture tightly coupled payment execution to the order lifecycle: certain payment service providers (PSPs) processed transactions in batches that left payment status unresolved for hours or even days, flash-sale traffic spikes strained the system, and refunds required complex manual intervention. Their solution was decoupling payment confirmation from order placement—moving orders into a pending state so checkout could proceed—while diversifying across multiple PSPs to reduce single-provider risk.&lt;/p&gt;
&lt;p&gt;In the new architecture, the payment service and its cron jobs (written in TypeScript and running on Kubernetes) share a database, receive PSP updates via webhooks, and publish domain events onto an event bus so the order service and financial integration layer can react asynchronously. Every transaction moves through explicit states: &lt;code&gt;Queued&lt;/code&gt;, &lt;code&gt;Pending&lt;/code&gt;, &lt;code&gt;Complete&lt;/code&gt;, &lt;code&gt;Declined&lt;/code&gt;, or &lt;code&gt;Failed&lt;/code&gt;. When an outbound request fails, the system retries immediately a few times before placing the transaction into &lt;code&gt;Queued&lt;/code&gt; for a cron job to replay later, using idempotency keys to prevent duplicate charges. Failed transactions automatically open customer support tickets, and a separate cron job detects transactions stuck in &lt;code&gt;Pending&lt;/code&gt;. The result is a smoother checkout experience, greater resilience during peak sales, and consistent data across downstream systems.&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 #20</title><link>https://miti99.com/en/post/2025/05/07/</link><pubDate>Wed, 07 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/07/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #20.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="performance-improvements-in-jdk-24"&gt;&lt;a href="https://inside.java/2025/03/19/performance-improvements-in-jdk24/" rel="noopener noreferrer"&gt;Performance Improvements in JDK 24&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This Inside.java article rounds up the most notable performance improvements in JDK 24 over JDK 23, organized by JDK bug tracker issue. In the core libraries, bulk operations in the Foreign Function &amp;amp; Memory API such as &lt;code&gt;MemorySegment::fill&lt;/code&gt;, &lt;code&gt;copy&lt;/code&gt;, and &lt;code&gt;mismatch&lt;/code&gt; are now handled in pure Java when memory segments are small enough, avoiding the overhead of transitioning to native code via &lt;code&gt;Unsafe&lt;/code&gt;. String concatenation now uses cacheable, reusable hidden classes instead of constructing chains of intermediate &lt;code&gt;MethodHandle&lt;/code&gt; combinators; SHA3 digests are up to 27% faster by reducing conversions between &lt;code&gt;byte&lt;/code&gt; and &lt;code&gt;long&lt;/code&gt; arrays; and internal migrations to the new Class-File API have been tuned to minimize startup overhead.&lt;/p&gt;
&lt;p&gt;At the runtime layer, JEP 491 allows virtual threads blocked inside a &lt;code&gt;synchronized&lt;/code&gt; block to unmount from their carrier thread rather than pinning it, significantly improving scalability for code that uses &lt;code&gt;synchronized&lt;/code&gt;. &lt;code&gt;String::indexOf&lt;/code&gt; is roughly 1.3x faster on x64 platforms with AVX2. JEP 483 (Ahead-of-Time Class Loading &amp;amp; Linking), the first deliverable from Project Leyden, uses an AOT cache to cut startup time by around 42% in the article&amp;rsquo;s benchmark. JEP 450 introduces experimental 8-byte compact object headers, reducing memory footprint by 10–20% on typical workloads. Finally, the RISC-V port gained several new intrinsics including CRC32, Adler32, string comparison optimizations, and byte-reversal operations.&lt;/p&gt;
&lt;h2 id="clean-your-memory-from-finalize-to-cleaner"&gt;&lt;a href="https://blog.frankel.ch/java-cleaner/" rel="noopener noreferrer"&gt;Clean your Memory: From Finalize to Cleaner&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Stefano Fago explains that Java&amp;rsquo;s garbage collector (GC) only manages heap memory and does not automatically release external resources like sockets or file handles; mismanaging them can lead to resource leaks, gradual slowdowns, or crashes. The old approach was overriding &lt;code&gt;finalize()&lt;/code&gt;, which has been deprecated because its execution timing is unpredictable, objects require at least one extra GC cycle to be reclaimed, accidental object resurrection can cause leaks, and the dedicated Finalizer thread is prone to contention. Its replacement is the &lt;code&gt;Cleaner&lt;/code&gt; API, introduced in Java 9: under the hood, it uses &lt;code&gt;PhantomReference&lt;/code&gt; and a background daemon thread while hiding the complexity of raw reference queues. You register an object alongside a cleanup action, and once the object becomes phantom-reachable, that action is enqueued to run on the background thread.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Cleaner&lt;/code&gt; pairs well with &lt;code&gt;AutoCloseable&lt;/code&gt;: the &lt;code&gt;close()&lt;/code&gt; method invokes &lt;code&gt;clean()&lt;/code&gt; for immediate deterministic cleanup, while the &lt;code&gt;Cleaner&lt;/code&gt; acts as a safety net. Even so, Fago stresses that &lt;code&gt;Cleaner&lt;/code&gt; should only be a fallback when resources cannot be released via &lt;code&gt;try-with-resources&lt;/code&gt; or an explicit &lt;code&gt;close()&lt;/code&gt; call, since cleanup is asynchronous and carries background-thread overhead. When writing a cleanup action, avoid lambdas that capture fields through &lt;code&gt;this&lt;/code&gt;, as doing so accidentally keeps a strong reference to the very object you want collected; cleanup logic should also be short and non-blocking, since multiple actions may share the same &lt;code&gt;Cleaner&lt;/code&gt; thread pool.&lt;/p&gt;
&lt;h2 id="5-hidden-git-tips-for-java-developers"&gt;&lt;a href="https://www.azul.com/blog/5-hidden-git-tips-for-java-developers/" rel="noopener noreferrer"&gt;5 Hidden Git Tips for Java Developers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;On the Azul blog, Luqman Saeed walks through five underappreciated Git features beyond the everyday &lt;code&gt;commit&lt;/code&gt;, &lt;code&gt;push&lt;/code&gt;, and &lt;code&gt;pull&lt;/code&gt; trio, with examples tailored to Java projects. First is &lt;code&gt;git bisect&lt;/code&gt;: when you don&amp;rsquo;t know which commit introduced a bug, you mark the current commit as bad (&lt;code&gt;git bisect bad&lt;/code&gt;) and an older working commit as good (&lt;code&gt;git bisect good &amp;lt;commit-hash&amp;gt;&lt;/code&gt;), and Git performs a binary search by checking out midpoint commits for you to test until the culprit is found, finishing with &lt;code&gt;git bisect reset&lt;/code&gt;. Next, &lt;code&gt;git blame &amp;lt;file&amp;gt;&lt;/code&gt; shows who last modified each line and when (pass &lt;code&gt;-L 50,60&lt;/code&gt; to inspect a specific line range), giving you helpful context before debugging or refactoring. When you need to switch tasks mid-flight, &lt;code&gt;git stash&lt;/code&gt; shelves uncommitted changes and &lt;code&gt;git stash pop&lt;/code&gt; restores them; &lt;code&gt;git stash list&lt;/code&gt; and &lt;code&gt;git stash apply &amp;lt;stash-id&amp;gt;&lt;/code&gt; let you manage multiple stashes.&lt;/p&gt;
&lt;p&gt;For temporary build artifacts generated by Maven or Gradle like &lt;code&gt;.class&lt;/code&gt; files or the &lt;code&gt;target/&lt;/code&gt; directory, &lt;code&gt;git clean -n&lt;/code&gt; previews what would be deleted, &lt;code&gt;-f&lt;/code&gt; removes untracked files, &lt;code&gt;-fd&lt;/code&gt; removes untracked directories as well, and &lt;code&gt;-x&lt;/code&gt; also deletes ignored files such as &lt;code&gt;.idea/&lt;/code&gt;. Finally, Git hooks are scripts that run automatically before or after events like commits, pushes, or merges—for example, a &lt;code&gt;pre-commit&lt;/code&gt; hook in &lt;code&gt;.git/hooks&lt;/code&gt; can run &lt;code&gt;mvn test&lt;/code&gt; and abort the commit if tests fail. As a bonus tip, &lt;code&gt;git checkout -&lt;/code&gt; jumps straight back to the previous branch you were working on without retyping its name, saving time and avoiding typos.&lt;/p&gt;
&lt;h2 id="simplify-your-system-by-challenging-the-status-quo-and-learning-from-other-ecosystems"&gt;&lt;a href="https://www.infoq.com/podcasts/simplify-system-learning-ecosystems/" rel="noopener noreferrer"&gt;Simplify Your System by Challenging the Status-Quo and Learning from Other Ecosystems&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In this InfoQ podcast, Max Rydahl Andersen—Distinguished Engineer at Red Hat and creator of JBang—recounts how taking a year away from Java helped him see upon returning that the ecosystem had accumulated too much accidental complexity, like &amp;ldquo;a thousand paper cuts&amp;rdquo;: each small feature is useful on its own, but together they become a burden. Quarkus, which he works on, flips traditional Java conventions by shifting most framework processing from runtime to build time, enabling near-instant startup. That speed unlocks a much better developer experience: live reload, continuous testing, Dev Services that automatically spin up containers like PostgreSQL or Kafka, and an interactive chat UI for testing AI services via LangChain4j right inside the Dev UI.&lt;/p&gt;
&lt;p&gt;With JBang, he drew inspiration from Python and Node.js to let developers run Java from a single source file—even downloading a JDK automatically if none is installed; he jokes that if you find any development environment easier to set up, that&amp;rsquo;s a bug in JBang. Andersen also argues that AI cannot replace core software engineering fundamentals and systems thinking, and warns that AI will accelerate CVE exploitation, meaning legacy systems will need much more frequent patching. The overarching takeaway: challenge the status quo and borrow good ideas from other ecosystems to keep systems simple.&lt;/p&gt;
&lt;h2 id="about"&gt;&lt;a href="https://tryingthings.wordpress.com/2025/03/24/about-vibe-coding/" rel="noopener noreferrer"&gt;About &amp;ldquo;vibe coding&amp;rdquo;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sorin Costea writes a brief reflection on &amp;ldquo;vibe coding&amp;rdquo;—the trend of letting AI write code in place of the developer. After reading &amp;ldquo;Vibe Coding vs Reality,&amp;rdquo; he was relieved to see he wasn&amp;rsquo;t the only skeptic, recounting his own attempt to use Cursor on a Java Maven project where the tool couldn&amp;rsquo;t even rename a class properly: first it renamed the class declaration without renaming the file, and when asked to fix it, it created an empty file with the new name—twice in a row.&lt;/p&gt;
&lt;p&gt;When he shared the experience on Hacker News, the replies were mostly along the lines of &amp;ldquo;haha Java,&amp;rdquo; leaving him wondering whether Cursor was only trained on trendy frontend frameworks or whether its vocal fans simply don&amp;rsquo;t care about real-world enterprise codebases. He ended up uninstalling Cursor and feeling even more skeptical of &amp;ldquo;magical&amp;rdquo; AI coding tools, though he leaves the door open: &amp;ldquo;Next year though? Next year we&amp;rsquo;ll see.&amp;rdquo;&lt;/p&gt;
&lt;h2 id="visual-focused-algorithms-cheat-sheet"&gt;&lt;a href="https://photonlines.substack.com/p/visual-focused-algorithms-cheat-sheet" rel="noopener noreferrer"&gt;Visual-Focused Algorithms Cheat Sheet&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Nick M compiles a visual-first cheat sheet of essential algorithms used in practice, following up on his earlier data structures cheat sheet; each algorithm is explained through everyday analogies and diagrams. The sorting section progresses from Selection Sort and Insertion Sort—simple but O(n²)—to Heap Sort and Merge Sort at O(n log n), Quick Sort with an O(n log n) average case and O(n²) worst case, and Tim Sort, the hybrid of Insertion Sort and Merge Sort used in Python and Java. Searching covers Binary Search at O(log n) alongside DFS and BFS for depth-first and breadth-first graph traversal. The graph section walks through Prim&amp;rsquo;s and Kruskal&amp;rsquo;s algorithms for minimum spanning trees, Dijkstra&amp;rsquo;s and Bellman-Ford for shortest paths (with Bellman-Ford handling negative edge weights), A* using heuristics, plus Union-Find and Ford-Fulkerson.&lt;/p&gt;
&lt;p&gt;Later sections cover string search, data compression and encoding (Huffman coding, LZ compression, Fourier transforms, JPEG compression), optimization (Simplex, Simulated Annealing), machine learning and data science, and security and cryptography algorithms. The post wraps up with coding interview resources like &amp;ldquo;14 Patterns to Ace Any Coding Interview&amp;rdquo; and &amp;ldquo;5 Simple Steps for Solving Dynamic Programming Problems,&amp;rdquo; making it a handy reference for junior developers preparing for interviews.&lt;/p&gt;
&lt;h2 id="bonus-interesting-images-from-bytebytego"&gt;Bonus: Interesting images from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/81074d22-5821-4aec-bb2d-0a099d06b6ac_1600x840.png" alt="3 Steps to Master Your Software"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/67c39b9a-9a91-4e57-9e24-7714b4f806dd_1280x1349.gif" alt="The Ultimate Software Architect Roadmap"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/fb1b1cd1-eac3-4b66-a391-9ec73f6c37f3_1280x1502.gif" alt="How Two-factor Authentication (2FA) Works?"&gt;
&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/3efae3ad-8c45-4fb2-a79f-6b3387b0751e_1280x1601.gif" alt="How Amazon S3 Works?"&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></channel></rss>