How does `reverseLazy` defined as `for (value of iter) { yield* reverseLazy(iter); yield value; }` manage to reverse an iterable?

Summary The generator appears to “reverse” an iterable, but the behavior is actually an artifact of iterator exhaustion, recursive delegation, and JavaScript’s iteration semantics. The function does not truly reverse anything; instead, it repeatedly drains the same iterator until only the last value remains available, producing an output that looks reversed. Root Cause The core … Read more

Creating a figure with matplotlib imshow with native resolution of the array

Summary This incident centers on a common frustration in scientific visualization: getting a Matplotlib imshow figure to render at the array’s native pixel resolution. The engineer expected a straightforward one‑to‑one mapping between array elements and displayed pixels, but Matplotlib’s figure‑layout system introduced padding, DPI scaling, and axes adjustments that distorted the intended output. Root Cause … Read more

Practical alternatives to write() for terminal output in Linux userspace

Summary This postmortem analyzes a common performance pitfall: assuming that write(), writev(), or even splice() represent the full set of practical terminal‑output strategies in Linux userspace. The incident stemmed from benchmarking a lightweight libc and overlooking several kernel‑supported mechanisms that reduce syscall overhead for small writes. The result was misleading performance data and incorrect architectural … Read more

How to keep AWS accounts tidy?

Summary Managing multiple AWS accounts across teams often leads to resource sprawl, including orphaned volumes, unused Elastic IPs, and forgotten infrastructure. Manual audits are reactive and inefficient, and third-party governance tools often involve billing intermediaries or percentage-based models, which we aim to avoid. This post explores best practices for automated AWS resource hygiene and cost … Read more

Float value changes when rounded

Summary This incident centers on a classic floating‑point precision problem in SQL Server: a value stored as a float appears as 10000 when selected normally, but becomes 9999 when cast to int. The discrepancy is caused by hidden binary rounding errors inherent to floating‑point storage. Root Cause The root cause is the inexact binary representation … Read more

How to send a stomp error frame from a channel iterceptor in case of invalid subscribe requests (Spring WebSocket)

Summary Issue: Unable to send a STOMP ERROR frame from a ChannelInterceptor in Spring WebSocket when invalid SUBSCRIBE requests are detected. Root cause: Misunderstanding of Spring WebSocket message flow and improper use of ChannelInterceptor for sending ERROR frames. Impact: Clients do not receive error notifications, leading to confusion and potential security risks. Root Cause Incorrect … Read more

ESP32-C3 ESP-IDF v5.4.2 driver for CMT2300A / VG3411 RF module (3-wire SPI, IRQ, RX+TX)

Summary The CMT2300A RF module (VG3411) integration with ESP32-C3 using ESP-IDF v5.4.2 failed due to non-functional IRQ interrupts, preventing reliable TX/RX operations. Root cause: incorrect SPI turnaround timing and misconfigured IRQ polarity. Root Cause SPI Turnaround Delay Miscalculation: The bit-banged SPI implementation lacked precise timing for SDIO direction switching, causing data corruption. IRQ Polarity Mismatch: … Read more

Why do Quarkus tests fail in Eclipse after upgrade to new LTS version?

Summary Quarkus tests fail in Eclipse after upgrading because Quarkus 3.22+ introduced a rewritten test classloading system, and Eclipse’s built‑in JUnit launcher is not yet fully compatible with the new QuarkusClassLoader expectations. Root Cause Quarkus 3.22 introduced a major rewrite of the test classloading internals, specifically affecting @QuarkusTest. Eclipse still launches tests using the standard … Read more

How do I configure VSCode IntelliSense to actually use my GCC version?

Summary This incident examines why VSCode IntelliSense refused to recognize C++26 reflection features (e.g., std::meta::is_type, the ^^ operator) even though the project successfully compiled with a custom GCC trunk build. The failure stemmed from IntelliSense not actually using the custom GCC toolchain, despite configuration attempts. Root Cause The root cause was that VSCode IntelliSense does … Read more