<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Refactoring on miti99</title><link>https://miti99.com/en/tags/refactoring/</link><description>Recent content in Refactoring 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/refactoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Newsletter #67</title><link>https://miti99.com/en/post/2025/12/10/</link><pubDate>Wed, 10 Dec 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/12/10/</guid><description>&lt;p&gt;&lt;em&gt;&lt;del&gt;For this post I tried refining my &lt;code&gt;AGENTS.md&lt;/code&gt; file. I&amp;rsquo;ll share my self-assessment at the end of the post.&lt;/del&gt; Enjoy Newsletter #67.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="build-better-software-to-build-software-better"&gt;&lt;a href="https://slack.engineering/build-better-software-to-build-software-better/" rel="noopener noreferrer"&gt;Build better software to build software better&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Slack&amp;rsquo;s engineering team recounts how they cut Quip and Canvas build times from 60 minutes down to 10–30 minutes, built around a central thesis: core software engineering principles apply just as much to build systems as they do to application code. Just like optimizing runtime performance, speeding up builds relies on two levers: caching (doing less work) and parallelism (spreading the load). Bazel supports both out of the box, automatically reusing build outputs when inputs haven&amp;rsquo;t changed and distributing build actions across CPU cores. Even the best build tool, however, cannot save a tangled dependency graph.&lt;/p&gt;
&lt;p&gt;The root problem was that the frontend build depended on the entire compiled backend, so any Python change invalidated the cache and forced a full frontend rebuild, costing an average of 35 minutes each time. The team painstakingly untangled the true inputs of each build step—decoupling backend from frontend, Python infrastructure from TypeScript, and build tooling from application source code—while splitting targets into fine-grained units so individual JS bundles and CSS files could be cached independently. They also fixed a layering violation: frontend bundlers should focus strictly on bundling logic while leaving orchestration and parallelism to Bazel. The result was an up to 6x speedup: 10 minutes in the best case, ~12 minutes on average, and 30 minutes in the worst case.&lt;/p&gt;
&lt;h2 id="things-i-don"&gt;&lt;del&gt;&lt;a href="https://medv.io/blog/things-i-dont-like-in-configuration-languages/" rel="noopener noreferrer"&gt;Things I Don&amp;rsquo;t Like in Configuration Languages&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;&lt;del&gt;Anton Medvedev analyzes the pain points of various configuration languages and explains why he decided to create his own language, MAML (Minimal And Markup Language). The article offers an insightful look into the pros and cons of configuration formats ranging from YAML and JSON to newer alternatives.&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;- YAML has an overly complex specification with too many unnecessary features&lt;/del&gt;
&lt;del&gt;- JSON has won as a universal data-interchange format, but has a few small rough edges worth improving&lt;/del&gt;
&lt;del&gt;- TOML lacks a null value and has confusing array-of-tables syntax&lt;/del&gt;
&lt;del&gt;- Languages like Pkl, CUE, and Dhall are full programming languages rather than simple markup languages&lt;/del&gt;
&lt;del&gt;- The author created MAML based on JSON with a strict specification and a distinctive name&lt;/del&gt;
&lt;del&gt;- MAML keeps JSON&amp;rsquo;s readability while adding comments and multiline strings&lt;/del&gt;&lt;/p&gt;
&lt;h2 id="here"&gt;&lt;a href="https://seconds0.substack.com/p/heres-whats-next-in-agentic-coding/" rel="noopener noreferrer"&gt;Here&amp;rsquo;s What&amp;rsquo;s Next in Agentic Coding&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This post predicts the next wave of developments in agentic coding, centered on a single thesis: context management is king. A great agent harness must feed the model the exact information it needs while keeping noise out of the context window. According to the author, Plan Mode will become far more sophisticated, flipping the effort ratio between planning and execution from 20:80 to 80:20 so an agent can one-shot an entire feature in a single run. Codebase search will blend &lt;code&gt;grep&lt;/code&gt; with semantic embeddings, external reference docs (such as via Context7 MCP) will be fetched just in time, and rules and skills will load conditionally so they don&amp;rsquo;t pollute context.&lt;/p&gt;
&lt;p&gt;At the multi-agent orchestration layer, the author expects techniques like Best-of-N sampling, pairing an expensive frontier model for planning with a cheaper model for execution, and delegating to subagents for parallel, context-isolated tasks coordinated by a lead agent that shields the user from micromanagement. Output quality will climb through self-critique and evaluation loops, harnesses that proactively suggest improvements to their own configuration, and persistent memory systems that retain knowledge about the user and codebase across sessions. As the author notes, the current pace of iteration in this space is unprecedented.&lt;/p&gt;
&lt;h2 id="why-agents-do-not-write-most-of-our-code---a-reality-check"&gt;&lt;del&gt;&lt;a href="https://octomind.dev/blog/why-agents-do-not-write-most-of-our-code-a-reality-check/" rel="noopener noreferrer"&gt;Why agents DO NOT write most of our code - a reality check&lt;/a&gt;&lt;/del&gt;&lt;/h2&gt;&lt;p&gt;Even though Octomind builds AI agents for a living, their team reports that most of their own production code is still written by humans. After months of using Cursor, Claude Code, and Windsurf, no one on the team saw a transformative productivity boost (20% or more). To test the limits, two engineers spent a week trying to build a real feature—branch-specific copies of test cases—entirely with AI. On the first attempt, despite detailed specs and an updated rules file, the agent stumbled on basics: forgetting to regenerate the Prisma client after schema changes, creating UI components without wiring them up, writing inefficient queries, and confidently declaring the job done. The result was a 2,000-line PR that needed fixes on nearly every screen. A second attempt with smaller, incremental tasks still produced a 1,200-line PR for just a fraction of the feature, complete with broken database transaction handling.&lt;/p&gt;
&lt;p&gt;In the author&amp;rsquo;s view, the most dangerous failure mode is developers losing their mental model of the codebase as AI dumps thousands of lines of changes in at a time, making every tough debugging session feel like your first day at a new job. The second issue is that AI doesn&amp;rsquo;t know its own limits and always acts confident, whereas a human intern knows how to say &amp;ldquo;I&amp;rsquo;ve never done this before.&amp;rdquo; Still, AI remains genuinely useful for brainstorming, debugging, autocomplete, writing unit tests, and small localized refactors, and narrowly scoped specialist agents continue to deliver real value.&lt;/p&gt;
&lt;h2 id="clarifying-the-rule-of-three-in-refactoring"&gt;&lt;a href="https://blog.jbrains.ca/permalink/clarifying-the-rule-of-three-in-refactoring/" rel="noopener noreferrer"&gt;Clarifying the Rule of Three in Refactoring&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;J.B. Rainsberger clarifies the &amp;ldquo;Rule of Three&amp;rdquo; in refactoring—the heuristic that you should wait until duplication appears three times before extracting a shared abstraction—which often sparks debate. In Rainsberger&amp;rsquo;s view, the rule is primarily aimed at Advanced Beginners to keep them from mechanically deduplicating everything on sight. He distinguishes between two contexts: when you are practicing design through refactoring, aggressively removing duplication and occasionally regretting it is how you sharpen your design judgment; when you are focused on shipping under a deadline, waiting helps avoid rework in case future changes force you to reintroduce the duplication. The Rule of Three is therefore a teaching aid for balancing learning and delivery, not an ironclad law.&lt;/p&gt;
&lt;p&gt;Personally, Rainsberger prefers removing duplication early because he is comfortable inlining code back again as soon as an extraction turns out to be wrong, viewing that reversal as a natural part of learning. Removing duplication early also helps surface useful abstractions hiding in the design. His advice to developers is to get comfortable undoing a refactoring, and if you invoke the Rule of Three, make sure it rests on clear reasoning rather than vague fear.&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_!9vpY!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5f41f86-4bf2-4b21-85aa-69659c039111_2250x2624.png" alt="Top Strategies to Share Data Between Services"&gt;
&lt;img src="https://substackcdn.com/image/fetch/$s_!aRQC!,w_1100,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa760cf81-6245-4051-be41-f867616e0faf_2250x2862.png" alt="Scalability Patterns for Modern Distributed Systems"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Videos:&lt;/strong&gt;
&lt;a href="https://www.youtube.com/watch?v=6u25GckPhLU" rel="noopener noreferrer"&gt;Design a Web Crawler: FAANG Interview Question&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; &lt;em&gt;URL processing worked reasonably well—it used less untranslated English this time, though a bit of&amp;hellip; Chinese slipped in :| The bonus section was pretty rough, mainly because when you only pass raw image URLs to the AI, it struggles to find the right title and sometimes hallucinates completely unrelated labels.&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.&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 #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></channel></rss>