Newsletter #56
Today I ran another experiment with OpenCode. The result: as soon as I sent a single URL, it just… got completely stuck :v. So I switched over to testing GitHub Copilot with OpenRouter. Initial results showed that GitHub Copilot couldn’t detect the previous Newsletter number and reset the numbering back to #1. It also wrote tags in lowercase, which didn’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 Anyway, please enjoy Newsletter #56.pip. I wasn’t okay with that either, so I moved on to testing Claude Code Router, running Claude Code backed by the OpenRouter API with the xAI: Grok 4 Fast model. The first summary came out quite long.
I love UUID, I hate UUID
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 (“optimistic” updates) and makes it possible to bulk-load rows using PostgreSQL’s COPY while already knowing every row’s primary key ahead of time (auto-incrementing keys still work with COPY, but COPY does not return generated keys the way INSERT ... RETURNING does).
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’t a privacy concern.
What’s new in Java 25
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 ThreadLocal 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 super() or this() call.
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.
Some Best Practices for Writing Readable Automation Tests
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.
For assertions, use flexible matchers like expect(response.status()).toBeOK() to accept any successful HTTP status code (200, 201) without failing prematurely, keeping the focus on the validations that matter. For locators, prefer .getByRole to support accessibility—easily inspected via browser DevTools and tab navigation—rather than .getByTestId, which does nothing for screen readers. Always advocate for proper semantic HTML roles when they are missing.
For naming conventions, use backticks for dynamic test titles—such as test(`should return a 400 when User Information is '${variable}'`)—to interpolate variables cleanly. For test structure, tag tests with { tag: 'THW-000' } to filter test runs by ticket, or attach Playwright annotations linking to detailed documentation, improving traceability and long-term maintainability.
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.
Key takeaways:
- Flexible assertions: Use
toBeOK() to handle varied HTTP success codes.- Accessible locators: Prefer
.getByRole verified through DevTools inspection.- Dynamic naming: Use template literals for variable interpolation in test titles.
- Tagging and annotations: Link tests to tickets for better traceability and collaboration.
Tech Debt: Understanding its Business Impact - Optimism
Adrian Sutton (OP Labs) argues that instead of complaining vaguely about “technical debt,” 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.
In the author’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.
Spec-Driven Development with AI: A New Approach and a Journey into the Past
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.
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: “Writing code is the easy part; getting the requirements right is where the value lies”—and AI only shines when fed high-quality specifications.
On Good Software Engineers
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.
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’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 “throwing issues over the wall.” Great engineers do all of this proactively, including fixing broken team processes without waiting to be asked. In the author’s view, these aren’t unreasonable demands; they are the baseline of professional engineering.
Why I do programming
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’ 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.
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.
The unreasonable effectiveness of modern sort algorithms
This research write-up asks a fascinating question: if you know ahead of time that an input array contains at most four distinct u64 values (the random_d4 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’s standard library, benchmarks both approaches on an AMD Ryzen 9 5900X using the sort-research-rs suite across varying input sizes.
The specialized implementations include counting with a BTreeMap, counting with a HashMap and sorting the keys, a hardcoded 4-way match (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’s slice::sort_unstable (ipnsort), driftsort, and C/C++ implementations like pdqsort and crumsort. Remarkably, Rust’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 pdqsort, whereas some generic C implementations fall behind due to indirect comparator function calls (which macro-based C sorts like crumsort 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’s sort before rolling your own.
How we made ClickHouse log queries 99.5% faster with resource fingerprinting
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’s ORDER BY 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.
Their solution was to compute a deterministic “resource fingerprint” by hashing a hierarchical string of log-source attributes—such as cluster;namespace;pod for Kubernetes, container.name;container.image for Docker, or environment tags and log streams for AWS CloudWatch. Placing this fingerprint right after the time bucket in the sorting key—ORDER BY (ts_bucket_start, resource_fingerprint, severity_text, timestamp, id)—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’ most common query predicates to get the most out of sparse indexes.
AI Coding
George Hotz (geohot) argues that “AI coding” 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 “compiled” 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 “programming language” 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.
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.
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’ll test a few more models in upcoming posts to find a combo that is both free and high quality :D
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.
Comments