Microblog

Quick thoughts, learnings, and discoveries.

#contracts#scoping#boundaries

System boundaries become visible only when crossed incorrectly

Well-designed systems hide their internal complexity until you violate an assumption. A service might work flawlessly for months, then suddenly fail when you pass it data that’s technically valid but crosses an undocumented boundary (wrong timezone, unexpected null, edge-case enum value).

The debugging pattern: When a stable system suddenly breaks on “valid” input, you’ve discovered an implicit contract. The fix isn’t just handling the edge case—it’s making the boundary explicit through validation, type constraints, or documentation.

The architectural lesson: Every system has assumptions about its inputs, state, and environment. If those assumptions aren’t codified (through schemas, contracts, or explicit validation), they become landmines. The best architectures make their boundaries impossible to cross incorrectly, not just expensive to cross incorrectly.

#views#data#filtering

Missing data after creation is often a view filtering problem, not a data persistence problem

When a record appears to vanish immediately after creation despite successful database writes, the issue is typically at the presentation layer. The data exists, but view-level filters (status, type, date range, feature flags) are hiding it from the query results.

The debugging pattern: Instead of checking data integrity first, verify the view’s filter state and search by a unique identifier that bypasses all filters. This reveals whether you have a persistence issue or a UX issue.

The architectural lesson: Separation of concerns breaks down when views apply implicit filters that users don’t perceive. “Show me everything” should actually show everything, or at least make filtering state explicit and obvious.

#cli#bash#node

How to recursively delete node_modules folders

I needed to free up disk space by deleting all node_modules folders in a directory and its subdirectories.

This command finds all directories named node_modules and executes rm -rf on them.

find . -name "node_modules" -type d -exec rm -rf {} +

Why it works: This is a quick and effective way to clean up old projects without manually navigating into each one. The + at the end is more efficient than ; because it groups the found paths into a single rm command.