Prevent ESP32 watchdog resets by moving heavy AsyncWebServer work

Summary A production incident occurred where the ESP32 Hardware Watchdog Timer (WDT) triggered a system reset during specific HTTP request handling. The issue stemmed from an attempt to perform computationally expensive or blocking synchronous tasks within an asynchronous event handler provided by the ESPAsyncWebServer library. Because the library operates on a non-blocking architecture, long-running tasks … Read more

Fixing GDAL HDF4 driver errors reading MODIS files on macOS

Summary Reading MODIS .hdf files on macOS often fails because the underlying GDAL library bundled with terra does not include the HDF4 driver needed for older MODIS products. The error manifests as “not recognized as a supported file format (GDAL error 4)”. Root Cause terra → GDAL compiled without HDF4 support (only HDF5). macOS homebrew/conda … Read more

Handling Numbered JSON Fields in Kotlinx Serialization for Robust APIs

Summary When consuming APIs that expose numbered fields like strIngredient1 through strIngredient20, the naive loop approach works but is fragile and non-idiomatic. A better pattern uses a custom @Serializable wrapper class with a @Polymorphic or @SerialName-driven iteration strategy, or a single-object mapping + post-processing step that converts the flat keyed structure into a typed list. … Read more

Optimizing Memory Access for Real-Time Performance on Cortex-M4

Summary The ARM Cortex-M4’s memory architecture critically impacts its performance due to wait states, bus contention, and memory hierarchy limitations. Unlike high-end processors, the Cortex-M4 lacks complex caching, making direct memory access a primary bottleneck. Key takeaway: Efficient memory layout and configuration are essential for achieving real-time performance on Cortex-M4 devices. Root Cause The performance … Read more

Fixing False Positive Mask Collisions in Pygame Platformers

Summary A Pygame developer encountered false positive collisions when implementing mask-based collision detection between a character and cave walls. The character was incorrectly flagged as colliding with wall areas even when positioned on the clear pathway. The root cause involved incorrect offset calculation and a misplaced attribute assignment that fundamentally broke the collision detection logic. … Read more

Debugging Array Pattern Data Science Challenge: Lessons Engineers

Summary This postmortem outlines the key findings from a recent data science homework challenge. The main goal was to create a dataset that follows specific arithmetic patterns across arrays. Root Cause Understanding the sequence was critical. We needed to map elements systematically and ensure the logic aligned with the assignment’s expectations. Why This Happens in … Read more

Why pandas Series.update breaks on MultiIndex slices and fix

Update Pandas Series with Multiindex: A Production Postmortem Summary A seemingly straightforward operation—updating a subset of a MultiIndexed Series with another Series containing aligned indices—fails unexpectedly in pandas. The update() method produces incorrect results, forcing developers to choose between slow loops or warnings-flouting workarounds. This subtle behavior reveals fundamental misunderstandings about pandas indexing and alignment … Read more

Spring Boot 4 Test Configuration Failures with @Nested Classes

Summary A Spring Boot 4 application fails to inject a String bean when a JUnit 5 @Nested test class is defined inside an abstract test base. The failure manifests as an UnsatisfiedDependencyException during the creation of the test class bean. The issue disappears when the nested test is removed, inheritance is eliminated, or the project is downgraded … Read more

Preventing Data Corruption by Correctly Handling Empty XML Nodes

Summary During a routine maintenance update to our XML processing engine, we identified a critical failure in the data ingestion pipeline. A logic error in how we validated node existence versus node content caused the system to skip updates for existing but “empty” XML elements. This resulted in corrupted price data being persisted to our … Read more

Implementing Anonymous Identity Tracking with UUIDs in Supabase

Summary The engineering team identified a data visibility gap where non-authenticated (Free) users were completely invisible to our analytics and backend logic. Because our Supabase users table was strictly tied to Google OAuth identities, we lacked a way to track user behavior, device state, or feature usage for the majority of our user base. This … Read more