theboreddev.com

Menu
  • Home
  • Career
  • Code Habits
  • Debugging
  • Side Projects
  • Tooling
  • About Us
  • Contact Us
  • Disclaimer
Menu

Month: May 2026

How to debug a race between two workers.

Two Workers Took the Same Job

Posted on May 31, 2026 by Tomasz Wierzbicki

I’ve lost count of how many times I’ve seen a “senior” engineer suggest throwing more distributed tracing or a massive observability suite at a concurrency bug. It’s a common trap. People think they can buy their way out of a race condition with more expensive tooling, but when you’re staring at a corrupted database record at 2 AM, a fancy dashboard just gives you a prettier view of the disaster. Learning how to debug a race between two workers isn’t about having the most expensive stack; it’s about developing the patience to actually trace the logic in your head before you start clicking buttons in a UI.

I’m not here to sell you on a specific framework or a magical new debugging tool. Instead, I want to walk you through the messy, unglamorous reality of what I’ve learned from my own production failures. I’ll show you how to isolate the state, why your logs are probably lying to you, and how to reproduce the chaos in a controlled environment. This isn’t a theoretical lecture; it’s a collection of the hard-won patterns I use when the system starts behaving like it has a mind of its own.

Table of Contents

  • Why Concurrency Issues in Distributed Systems Keep You Awake
  • Tracing the Ghost in the Machine Through Logs
  • Five things I learned from losing sleep to race conditions
  • What I've learned from the wreckage
  • The Hard Truth About Race Conditions
  • Frequently Asked Questions

Why Concurrency Issues in Distributed Systems Keep You Awake

Why Concurrency Issues in Distributed Systems Keep You Awake

The thing about concurrency issues in distributed systems is that they don’t usually fail when you’re looking at them. They don’t show up in your local dev environment, and they certainly don’t trigger during a happy-path integration test. Instead, they wait for that specific, perfect storm: a spike in traffic, a slight network hiccup, and a precise sequence of events that allows two processes to think they both own the same piece of data at the exact same millisecond. It’s a ghost in the machine that only appears when the system is under enough pressure to actually matter.

I’ve learned the hard way that you can’t just throw more hardware at this. You can scale your worker pool to a hundred nodes, but if you haven’t accounted for idempotency in worker tasks, you’re just increasing the frequency of the collision. I remember a stint at a logistics firm where we thought we had a solid locking mechanism, only to realize we were essentially just inviting the workers to a brawl. We weren’t just dealing with simple race conditions; we were seeing the fallout of improper state management that turned a minor delay into a massive data corruption event. It’s not just about the code being “fast”—it’s about ensuring that when two things happen at once, they don’t break the world.

Tracing the Ghost in the Machine Through Logs

Tracing the Ghost in the Machine Through Logs

When you’re staring at a pile of logs trying to figure out why two processes just shredded a database record, the first thing you realize is that standard logging is often too shallow. Most people log that a task started and that it finished, but they forget to log the state of the world at that exact millisecond. If you want to catch these ghosts, you need to stop looking at logs as a timeline of events and start looking at them as a map of contention. I’ve learned the hard way that if you aren’t logging unique request IDs or correlation IDs across your entire stack, you aren’t debugging; you’re just guessing.

The real trick is identifying the overlap. I usually look for the “interleaving” pattern—where Worker A logs a “start” and then, before it logs a “complete,” Worker B jumps in and performs the exact same operation. This is where idempotency in worker tasks becomes your best friend rather than just a theoretical concept. If your logs show two workers hitting the same resource within a few milliseconds of each other, you’ve found your collision point. You aren’t looking for a single error message; you’re looking for the absence of a lock or a sequence that proves two threads were operating on the same data without a proper gatekeeper.

Five things I learned from losing sleep to race conditions

  • Stop looking at the code in isolation and start looking at the clock. If you aren’t correlating your logs with microsecond-precision timestamps across different machines, you’re just guessing. You need to see exactly when Worker A touched the row versus when Worker B tried to claim it.
  • If you can’t reproduce it in staging, you’re probably because your staging environment is too polite. Real production is messy and high-latency. I’ve had to write scripts that intentionally inject jitter and network delays just to force these ghosts to show themselves before they hit the live database.
  • Check your database isolation levels. I once spent a whole weekend chasing a bug that turned out to be a “Read Committed” setting that allowed two processes to see the same stale state. Sometimes the fix isn’t more code; it’s just telling the database to be more strict about what it shows you.
  • Don’t trust your “it works on my machine” local setup. Local environments usually have zero contention. If you aren’t running multiple instances of your worker locally—ideally with a tool that simulates a slow disk or a flaky network—you aren’t actually testing for a race.
  • Look for the “invisible” state. Usually, the race isn’t happening in your business logic, but in the side effects—a cache update, a message queue acknowledgment, or a file system write. If you aren’t logging the state of those external dependencies, you’re only seeing half the fight.

What I've learned from the wreckage

Stop looking for a single “error” in the logs; race conditions usually look like a perfectly normal sequence of events that just happened in the wrong order.

If you can’t reproduce the bug in staging, it’s because your staging environment is too polite—you need to simulate the latency and the messiness of real-world network jitter.

The best fix isn’t a clever bit of code, but a design change that makes the collision impossible, like moving from shared state to an idempotent message queue.

The Hard Truth About Race Conditions

The Hard Truth About Race Conditions.

At the end of the day, debugging a race condition isn’t about finding a magic line of code; it’s about accepting that your mental model of the system was too simple. We looked at how logs can lie to you when timing is everything, why distributed locks are a necessity rather than an academic luxury, and how to use idempotency to make sure that even if two workers step on each other’s toes, the result is still correct. You can’t just patch the symptom and walk away. If you don’t address the underlying state contention, you’re just setting a timer for the next 2 AM incident.

I’ve spent enough nights in front of a terminal to know that these bugs feel personal, like the system is actively trying to spite you. But they aren’t personal; they are just the natural consequence of scale and speed. Don’t let the frustration burn you out. Instead, treat every race condition as a free lesson in system design. Write down what happened, fix the architecture rather than the code, and then go get some sleep. The goal isn’t to write perfect, race-free code—that’s a fantasy—the goal is to build systems that are resilient enough to handle the chaos when it inevitably arrives.

Frequently Asked Questions

How do I actually reproduce these race conditions in a local dev environment if they only seem to happen under heavy production load?

The short answer is: you probably won’t, at least not by just running `npm start` or whatever your local setup is. Production load isn’t just “more users”; it’s the specific, messy interleaving of network latency and disk I/O that creates the gap. To fake it, I usually lean on chaos engineering tools or just write a “stressor” script that hammers the same resource with dozens of concurrent requests. If that fails, I start injecting artificial `sleep()` calls into the critical sections to widen the window of opportunity for the race.

At what point do I stop trying to fix the existing logic and just admit we need a proper distributed lock or a different architectural approach?

You stop when the “fixes” start looking like more patches on a sinking ship. If you’re adding more sleeps, more retries, or more complex conditional checks just to dodge a collision, you aren’t solving the problem—you’re just hiding it. I’ve spent too many weekends trying to outsmart a race condition with clever logic. If the root cause is two processes needing to own the same resource, stop tweaking the code and just implement a proper distributed lock.

If I add more granular logging to catch the race, am I just going to create a new performance bottleneck or mess up the timing even further?

It’s a valid fear. If you start dumping massive JSON blobs into your logs every time a worker touches a row, you’ll absolutely shift the timing and potentially mask the race—or worse, kill your throughput. I call it the “Heisenbug effect.” Instead of spraying everything, I prefer targeted, lightweight breadcrumbs. Log just the IDs and a timestamp. If you need more, use a trace ID. Keep the payload small so you aren’t debugging the logger instead of the race.

How can I tell if the issue is actually a race condition in my code versus something deeper in the database isolation levels or the message broker?

The easiest way to tell is to isolate the variables. If you can reproduce the error by running two local instances of your worker against a local database and it still happens, it’s your code. If it only happens under load in staging, start looking at your isolation levels—you might be assuming “Read Committed” protects you when it actually doesn’t. If the messages themselves are arriving out of order or twice, that’s a broker configuration issue, not a logic bug.

How to export user data before you shut down.

Let People Take Their Data With Them

Posted on May 29, 2026October 31, 2026 by Tomasz Wierzbicki

I still remember the silence in the office at 3:14 AM during my time at that logistics startup—a silence that felt heavy because our main database was halfway through a botched migration and we realized we had no clean way to salvage the customer records. It wasn’t a dramatic explosion; it was just a slow, quiet realization that we were about to lose years of history because we hadn’t figured out how to export user data before you shut down the service. We spent the next six hours frantically running scripts that we knew were suboptimal, just trying to scrape together enough JSON to keep the stakeholders from breathing down our necks.

I’m not here to sell you on some expensive, enterprise-grade ETL tool or a complex microservice architecture that you’ll spend three months configuring. I’ve been the guy in the trenches, and I know that when a project is dying or a service is being decommissioned, you need something that actually works without adding more technical debt to a sinking ship. I’m going to show you the practical, unglamorous ways to get your data out intact, focusing on the trade-offs between speed and integrity so you don’t end up staring at a blank terminal in the middle of the night.

Table of Contents

  • The Cost of Being Wrong About Gdpr Data Portability Requirements
  • Preserving User Privacy During Shutdown Without Losing Your Mind
  • Five things I’ve learned from watching data disappear into the void
  • The "Don't Get Paged" Checklist
  • The Last Commit
  • Frequently Asked Questions

The Cost of Being Wrong About Gdpr Data Portability Requirements

The Cost of Being Wrong About Gdpr Data Portability Requirements

I learned this lesson at the insurance firm. We weren’t shutting down, but we were migrating a legacy module, and we treated the data like it was just bits in a vacuum. We forgot that under GDPR data portability requirements, that data belongs to the person, not the company. If you treat a service sunset as just a “cleanup task,” you’re walking into a legal minefield. I’ve seen teams think they can just dump a SQL file and call it a day, only to realize later that they’ve either stripped away necessary metadata or, worse, left sensitive identifiers in a format that violates compliance with data protection laws.

The real headache isn’t just the fine from a regulator; it’s the technical debt of a messy exit. If your user data migration strategies are an afterthought, you end up with a “data graveyard”—a collection of unreadable, unstructured blobs that no one can actually use. I’ve spent far too many hours trying to reconstruct schema mappings for a service that was supposed to be dead six months ago. You want to leave a clean trail, not a pile of digital scrap metal that makes it impossible to verify if you actually preserved user privacy during shutdown.

Preserving User Privacy During Shutdown Without Losing Your Mind

Preserving User Privacy During Shutdown Without Losing Your Mind

The tricky part isn’t just moving the bits; it’s making sure you don’t accidentally hand over someone’s private life to the wrong person in the process. When I was at that insurance firm, we had a strict protocol for decommissioning legacy modules, and it wasn’t just about bureaucracy—it was about the fact that once a service is dead, your ability to audit who touched what goes with it. If you’re building your user data migration strategies, you need to treat the export process as a high-security event. I’ve seen cases where engineers, in a rush to meet a sunset deadline, accidentally bundled sensitive metadata into a public-facing S3 bucket. That’s a one-way ticket to a regulatory nightmare.

You also have to balance the technical debt of building custom scrapers against the necessity of ethical data handling during sunsetting. If you’re doing this manually, you’re going to miss something, and if you automate it poorly, you might leak data at scale. My rule of thumb is to build a dedicated, isolated extraction pipeline that follows the same strict access controls as your production environment. Don’t just dump everything into a massive CSV and call it a day; ensure you are preserving user privacy during shutdown by scrubbing any telemetry or internal logs that shouldn’t be part of the user’s personal portable record.

Five things I’ve learned from watching data disappear into the void

  • Don’t just dump the SQL; verify the schema. I’ve seen teams export a massive CSV only to realize three weeks later that they missed the relational mapping for user permissions, making the entire dataset a pile of useless, disconnected rows.
  • Test your export script on a subset of production data before the actual shutdown date. Running a “dry run” with 1% of your users will tell you if your export process is going to time out or eat all your disk space when it actually matters.
  • Automate the checksums. If you’re moving terabytes of data to an S3 bucket or an external drive, you need a way to prove the data you landed is exactly what you left. I don’t trust “it looks fine” when I’m trying to sleep.
  • Define the “Minimum Viable Data” early. You don’t need every single log line or transient session state; you need the stuff that actually matters to the user and the regulators. Trying to export everything usually results in exporting nothing useful.
  • Hand over the keys with a manual, not just a zip file. If you’re handing this data to a client or a successor, write down exactly how to reconstruct the state from the files you provided. A pile of JSON files without a data dictionary is just digital junk.

The "Don't Get Paged" Checklist

Don’t treat data export as a final task; treat it as a decommissioning milestone. If you wait until the last week of the service’s life to figure out how to dump the production DB into a portable format, you’re going to find out the hard way that your schema is too messy for a clean export.

Automate the “Right to Portability” before you actually need it. I’ve seen too many teams scramble to manually scrape JSON blobs from a dying database because they didn’t realize their data was too fragmented to satisfy a GDPR request on short notice.

Have a clear, documented “Kill Switch” protocol for PII. Once the data is exported and the users are notified, you need a verifiable way to wipe the actual production instances. Leaving “ghost data” sitting in an unmonitored S3 bucket because you were too tired to finish the shutdown is a massive liability.

The Last Commit

Digital decommissioning and The Last Commit.

At the end of the day, shutting down a service isn’t just about turning off the instances and letting the billing cycle end. It’s about the messy, unglamorous work of cleaning up the digital footprint you left behind. You need to ensure your GDPR obligations are met, your data exports are actually usable by the people who provided them, and your privacy protocols remain intact even when the team is gone. I’ve seen too many “graceful sunsets” turn into legal headaches because someone thought they could just dump a raw SQL file into an S3 bucket and call it a day. Don’t mistake a successful deletion for a successful decommissioning.

We spend most of our careers building things to last, so it feels a bit strange to write documentation on how to dismantle them. But there is a certain professional dignity in knowing when to pull the plug and doing it properly. If you treat the shutdown with the same rigor as a major feature launch, you’re doing right by your users and your future self. It’s about leaving the campsite better than you found it, even if the campsite is a collection of microservices that no longer need to exist. Build things to scale, but learn how to let them go.

Frequently Asked Questions

How do I handle the actual transfer of large datasets without the process timing out or corrupting halfway through?

Don’t try to wrap a massive dataset into a single, monolithic API request. I’ve seen enough 504 Gateway Timeouts to know that’s a recipe for a corrupted mess. Instead, treat it like a background job. Chunk your data into manageable pieces—maybe 500 records at a time—and use a task queue to track progress. If a chunk fails, you only retry that specific bit, not the whole damn thing.

What's the best way to verify that the exported data is actually usable and not just a collection of broken JSON files?

Don’t just trust a `ls -lh` command and call it a day. I’ve seen plenty of “successful” exports that were actually just empty directories or truncated JSON files. You need to run a schema validation script against a sample of the export immediately. Better yet, try to ingest a subset of that data into a fresh, isolated instance of your database. If you can’t reconstruct a single user profile from the dump, your export is garbage.

If I’m dealing with encrypted fields, how do I hand over the keys to the users without creating a massive security hole?

The mistake I see most often is trying to be a hero and managing the decryption yourself. Don’t. If the data is encrypted at rest with keys the user doesn’t have, you’re essentially handing them a locked box they can’t open. My approach is to provide the raw, encrypted blobs along with the specific key-wrapping parameters used. If they want the plaintext, they can run the decryption script on their own hardware. It shifts the security burden to them and keeps our liability clean.

At what point do I stop keeping backups of the exported files to avoid becoming a permanent data hoarder?

The rule of thumb I follow is simple: once the service is officially decommissioned and the legal retention period (whatever your local regulator says that is) has passed, you delete the backups. Don’t keep them “just in case” someone asks for a file three years later; if they do, you’re just holding a liability. I treat data like a hot potato—once you’ve fulfilled your obligations, drop it and move on.

How to debug a cache that serves stale data.

The Cache Is Right and the Data Is Old

Posted on May 26, 2026 by Tomasz Wierzbicki

I remember sitting in my home office at 2:15 AM, the only light coming from a monitor that felt far too bright, staring at a dashboard that insisted everything was fine while our users were screaming about incorrect balances. The database was updated, the logs showed a successful write, yet the frontend was stubbornly clinging to old values like a child with a security blanket. If you’ve ever been stuck in that loop, you know that the standard documentation rarely tells you how to debug a cache that serves stale data when the race conditions are subtle and the TTLs look perfect on paper. It’s never a simple “the cache is broken” situation; it’s usually a much more annoying mismatch between what you think is happening and what the network is actually doing.

I’m not going to waste your time with high-level architectural theory or a lecture on why distributed systems are hard. Instead, I want to walk through the specific, messy steps I took to find the leak in my own logic. We’ll look at how to trace the data path, identify where the invalidation signal actually died, and—most importantly—how to write tests so you don’t have to relearn this lesson during your next midnight outage.

Table of Contents

  • Identifying Stale Cache Keys Before the System Collapses
  • Why Ttl Expiration Issues Are Actually Human Errors
  • Five ways to stop chasing ghosts in your cache layer
  • Lessons from the post-mortem
  • The post-mortem reality
  • Frequently Asked Questions

Identifying Stale Cache Keys Before the System Collapses

Identifying Stale Cache Keys Before the System Collapses

When the alerts start firing, your first instinct is usually to check the database. Don’t. If the data in the source of truth looks correct but the API is spitting out garbage, you aren’t looking at a data corruption issue; you’re looking at a synchronization failure. I’ve learned the hard way that you can’t just guess which keys are poisoned. I usually start by pulling a sample of the “wrong” data and running it through a side-by-side comparison with the raw DB record. If the discrepancy is consistent, you’re likely dealing with TTL expiration issues where the time-to-live is set too high for the volatility of the data, or worse, your invalidation logic is simply skipping certain edge cases.

Once you’ve confirmed the data is actually stale, you have to map the blast radius. Is this happening everywhere, or just for specific users? If it’s localized, it’s likely a problem with your cache consistency models—perhaps a write-through operation failed silently. If it’s global, you might be fighting a battle between browser vs server side caching, where a client-side header is telling the user’s machine to hold onto a resource long after you’ve updated it on the backend. I try to treat it like a forensic investigation: find the delta, find the scope, and then find the logic that allowed the lie to persist.

Why Ttl Expiration Issues Are Actually Human Errors

Why Ttl Expiration Issues Are Actually Human Errors

We like to blame the distributed systems or the eventual consistency models, but most TTL expiration issues I’ve encountered boil down to someone making a guess about how long a piece of data would live. I remember a project at the logistics startup where we set a six-hour TTL on shipment statuses because “that seemed reasonable.” It wasn’t. We didn’t account for the fact that a driver could update a status, and the customer would be staring at a stale screen for half a shift. It wasn’t a technical failure of the cache; it was a failure to realize that human expectations of real-time data rarely align with a static timer.

The real danger is when we treat TTL as a “set it and forget it” configuration. I’ve seen engineers treat cache invalidation strategies like a magic wand, assuming that if the timer is long, the load is low, and if the timer is short, the data is fresh. This ignores the messy reality of browser vs server side caching and the layers of complexity in between. When you set a TTL, you aren’t just configuring a memory limit; you are making a silent contract with your users about how much they can trust what they see on their screens. If you haven’t defined what happens when that contract is broken, you’re just waiting for a 2:00 AM incident.

Five ways to stop chasing ghosts in your cache layer

  • Stop trusting your local environment. I’ve wasted entire afternoons debugging “stale data” only to realize my local Redis instance was running a completely different configuration than staging. Always verify the actual connection string and the specific node your application is talking to; if you aren’t certain which instance is holding the key, you’re just guessing.
  • Audit your write-through logic, not just your reads. Most people focus on why the data isn’t updating, but the real culprit is usually a silent failure in the service responsible for the invalidation. If your database update succeeds but your cache eviction call fails due to a network hiccup or a poorly handled exception, you’ve just created a permanent lie in your cache.
  • Watch out for the “phantom update” race condition. I learned this the hard way during a high-traffic sale: a read request fetches old data, a write request updates the DB and clears the cache, and then the slow read request finally finishes and writes that old data back into the cache. If you don’t have versioning or a way to ensure “last write wins,” your cache will stay stale indefinitely.
  • Check your serialization settings. It sounds trivial, but I once spent a Sunday morning realizing that a change in a DTO’s field type meant the cache was successfully deserializing an old version of an object into a new structure, masking the fact that the data itself was outdated. If the schema evolves, your invalidation strategy better evolve with it.
  • Log the “Why,” not just the “What.” Don’t just log that a cache miss occurred; log the TTL and the source of the data. When you’re staring at a dashboard at 2 AM, knowing that a key was fetched from the DB with a 300-second TTL is much more useful than a generic “Cache updated” message. You need to see the intent to find the error.

Lessons from the post-mortem

Stop trusting your TTLs as a safety net; if your application logic depends on a cache being perfectly fresh, you haven’t built a cache, you’ve built a ticking time bomb.

Always instrument the “age” of the data being served; when a customer complains about old info, the first thing I want to see is a metric showing exactly how many seconds old that specific cache entry actually was.

If you can’t manually invalidate a specific key in under thirty seconds during an incident, your invalidation strategy is a liability, not a feature.

The post-mortem reality

The post-mortem reality of stale data.

At the end of the day, debugging stale data isn’t about mastering a specific Redis command or learning the nuances of a new caching library. It’s about admitting that our mental models of how data flows through a system are almost always incomplete. We’ve looked at how TTLs fail when they aren’t aligned with the underlying source of truth, how race conditions turn a simple update into a ghost in the machine, and why we can’t just “assume” the invalidation logic is working. If you can’t trace the path from the write to the cache eviction, you don’t actually have a system you can trust; you just have a collection of assumptions waiting to break in production.

I’ve spent enough late nights staring at logs to know that you won’t solve this by chasing every single outlier. Instead, focus on building visibility. Write the tests that intentionally try to break your invalidation logic, and document the “why” behind your eviction strategies so the next person—or the version of you six months from now—doesn’t have to guess. Systems are inherently messy, and caches are designed to hide that messiness until they don’t. Don’t aim for a perfect, zero-latency architecture; aim for a system where, when the data eventually goes stale, you actually know exactly why it happened.

Frequently Asked Questions

How do I actually verify if the data in the cache matches the database without manually querying both every single time?

I don’t have the patience to manually diff JSON blobs between Redis and Postgres every time I suspect a drift. I usually write a quick, throwaway script—something I’d call a “sanity checker”—that pulls a sample of keys and compares their checksums against the source of truth. It’s not a formal testing suite; it’s just a way to stop guessing. If the hashes don’t match, I know I’m chasing a ghost in the invalidation logic.

Is there a way to catch these race conditions in a staging environment before they hit production at 2 AM?

The short answer is: yes, but you have to stop treating staging like a polite playground. Most race conditions hide in staging because the traffic is too clean and the latency is too low. To catch them, you need to inject chaos. I use tools to artificially spike network latency or simulate database locks during load tests. If your staging environment doesn’t feel a little bit broken, you aren’t actually testing for the 2 AM reality.

At what point does adding more complex invalidation logic become more dangerous than just lowering the TTL?

You’ve hit the point of diminishing returns when your invalidation logic requires its own monitoring and unit tests just to feel safe. If you’re writing complex event-driven triggers to clear the cache, you’ve just traded a “stale data” problem for a “distributed systems consistency” problem. Personally, I’d rather deal with a slightly outdated value for 60 seconds than spend my weekend debugging a race condition in a custom invalidation worker. Lower the TTL. Keep it boring.

How do I handle stale data when the invalidation signal itself gets lost in the message queue?

This is the nightmare scenario: the “eventual” in eventual consistency becomes “never.” I’ve been there. When your invalidation signal vanishes into a black hole in RabbitMQ or Kafka, you’re essentially flying blind.

Learn how to write a function with one job.

One Function, One Reason to Change

Posted on May 25, 2026October 31, 2026 by Tomasz Wierzbicki

I remember sitting in a dark apartment during my time at that logistics startup, staring at a single 400-line function that was supposed to “just process an order.” It wasn’t just processing an order; it was validating tax codes, pinging a third-party shipping API, updating a database, and sending a Slack notification. When the shipping API timed out, the whole thing collapsed like a house of cards, leaving me to trace a ghost in the machine for six hours. Most textbooks will give you some high-minded lecture about the Single Responsibility Principle, but they rarely tell you that learning how to write a function with one job is actually about preventing your own sleep deprivation.

I’m not here to sell you on some architectural purity or a new design pattern you can put on your resume. I want to talk about the practical, slightly messy reality of keeping your code predictable so that when things inevitably break, you can actually find the source of the fire. I’ll share what I’ve learned from years of production incidents about splitting logic effectively without over-engineering everything into a thousand tiny, unreadable files. No hype, just the trade-offs.

Table of Contents

  • Lessons Learned From Refactoring Complex Functions
  • How Separation of Concerns in Software Design Saves Sleep
  • Five ways to keep your functions from becoming monsters
  • The Cost of Doing Too Much
  • The Long View
  • Frequently Asked Questions

Lessons Learned From Refactoring Complex Functions

Lessons Learned From Refactoring Complex Functions.

During my time at the insurance firm, I spent a lot of energy untangling what I call “God Functions”—those massive blocks of code that seem to handle everything from database connections to email notifications. I used to think I was being efficient by keeping everything in one place, but I was actually just building a house of cards. When I finally sat down to start refactoring complex functions, I realized that the real cost wasn’t the time spent writing them, but the time lost later trying to understand them. Every time I touched a line of code to fix a minor bug, something unrelated would break in a completely different module.

The breakthrough came when I stopped viewing separation of concerns in software design as an academic concept and started seeing it as a survival tactic. I began breaking these monsters down into smaller, predictable pieces. I learned that if a function requires five different arguments just to get started, it’s already trying to do too much. By reducing function complexity, I wasn’t just making the code look prettier; I was making it testable. It’s much easier to write a unit test for a function that calculates a tax rate than for one that calculates the tax, saves it to a ledger, and then pings a Slack webhook.

How Separation of Concerns in Software Design Saves Sleep

How Separation of Concerns in Software Design Saves Sleep

When I was at the insurance firm, we had this one massive settlement calculation engine. It was a thousand-line monster that handled database lookups, tax logic, currency conversion, and email notifications all in one go. On paper, it worked. In reality, whenever the tax laws changed, we spent three days terrified that a tiny tweak to a math formula would somehow break the SMTP connection or corrupt a database row. That’s the cost of ignoring separation of concerns in software design. You aren’t just writing code; you are building a web of invisible dependencies that wait for the worst possible moment to tangle.

By focusing on reducing function complexity, you’re essentially building firewalls between different parts of your logic. If the part of your code that talks to the database fails, it shouldn’t take down the part that calculates the user’s discount. I’ve found that when I break these things apart, testing becomes a trivial task rather than a weekend-long ordeal. You can test the math in isolation without needing to mock an entire network stack. It turns out that modular programming best practices aren’t just academic ideals—they are practical tools for ensuring that when something inevitably breaks, you can find the culprit in five minutes instead of five hours.

Five ways to keep your functions from becoming monsters

  • Name the function for what it actually does, not what it might do later. If I find myself using the word “and” in a function name—like `validateAndSaveUser`—it’s a red flag that I’ve actually written two functions and I’m just being lazy.
  • If you can’t describe the function’s purpose in a single, short sentence without using the word “process,” it’s probably doing too much. “ProcessOrder” is a trap; it’s a black hole that eventually swallows validation, inventory checks, and email triggers.
  • Watch out for the “Side Effect Creep.” A function that is supposed to just calculate a discount shouldn’t also be updating a database row or incrementing a counter in a global variable. I learned this when a simple price calculation bug ended up corrupting our entire audit log.
  • Use the “Extract Method” reflex. If you’re staring at a block of code that’s more than ten lines long and it feels heavy, don’t try to optimize the logic—just pull that chunk out into its own named function. It makes the main flow readable and the logic testable.
  • Test for one outcome, not five. If writing a unit test for a function requires a massive setup of mocks and complex state just to check one boolean, your function is trying to live too many lives at once. A single-purpose function should be easy to break and even easier to fix.

The Cost of Doing Too Much

If a function requires more than two or three different types of arguments—especially if it’s mixing domain logic with database calls—it’s probably doing too much. I’ve learned that “convenience” functions are usually just debt in disguise.

Testability is the ultimate litmus test; if you can’t write a unit test for a function without mocking half your infrastructure, the function isn’t focused enough. It’s much easier to fix a small, broken piece than a large, broken system.

Documentation isn’t a substitute for simplicity. If you find yourself writing a paragraph to explain what a function does, stop writing documentation and start splitting the function into two smaller ones that explain themselves.

The Long View

The Long View of clean code architecture.

At the end of the day, writing single-purpose functions isn’t about following some academic rulebook or pleasing a linter. It’s about reducing the cognitive load required to understand what your code is actually doing when things go sideways. I’ve spent enough hours staring at a 200-line function in a production log to know that complexity is a debt that always collects interest, usually at the worst possible time. By breaking things down into discrete, predictable steps, you aren’t just making the code cleaner; you are building a safety net for your future self. You’re making sure that when the next incident occurs, you can isolate the failure in minutes rather than hours.

I used to think that “clever” code was the hallmark of a good engineer, but fifteen years of production incidents have taught me otherwise. The best code I’ve ever written is the kind that looks almost boringly simple to a junior developer. We don’t write these functions to show off our mastery of complex logic; we write them so that the system remains predictable even when we aren’t there to watch it. Aim for clarity over cleverness, and you’ll find that you spend much less time fighting your own abstractions and much more time actually building things that last.

Frequently Asked Questions

How do I decide where one function ends and the next one should actually begin without over-engineering everything into a thousand tiny pieces?

I used to fall into the trap of splitting everything into micro-functions until my codebase looked like a jigsaw puzzle. Now, I use the “context switch” rule. If I have to stop thinking about what the logic is doing to focus on how it’s being transported—like suddenly worrying about a database connection or a specific JSON schema—that’s where the boundary lives. If the function’s purpose shifts from “calculating a discount” to “logging the result,” split it. Otherwise, leave it alone.

At what point does breaking things down too much start hurting performance or making the code harder to actually follow?

There’s a point where you’re no longer engineering, you’re just playing with Legos. If I have to jump through five different files just to trace a single variable’s lifecycle, I’ve gone too far. It’s a trade-off: you gain theoretical purity but lose the mental model of how the data actually flows. If the abstraction layer becomes more complex than the logic it’s supposed to hide, you’ve just traded one kind of technical debt for another.

How do you handle functions that naturally need to touch multiple layers, like a service that needs to both calculate something and log it to a database?

I used to think this was a violation of the rule, but the reality is more nuanced. You don’t want a single function doing the math and the database IO, but you do need a way to coordinate them. I usually handle this by keeping the “brain” (the calculation) pure and stateless, then using a thin orchestrator—a service layer—to call the logic and then pass the result to the logger. It keeps the math testable and the side effects predictable.

When I'm staring at a massive legacy function that's already broken, what's the safest way to start splitting it up without breaking the whole production flow?

Don’t try to be a hero and rewrite the whole thing in one PR. That’s how you end up on a bridge call at 3 AM. Start by extracting a single, pure calculation—something that takes an input and returns an output without touching a database or a global variable. Wrap it in a unit test. Once you’ve proven that tiny piece works in isolation, you can slowly pull the rest of the logic out, one thread at a time.

How to disagree with a senior engineer.

Bringing Evidence to an Argument You Might Lose

Posted on May 23, 2026 by Tomasz Wierzbicki

I spent most of my twenties thinking that knowing how to disagree with a senior engineer meant mastering some complex, corporate-approved “communication framework” or learning how to wrap my critiques in enough polite, professional layers to make them palatable. I used to sit in design reviews, watching a veteran architect propose a solution that I knew would cause a massive bottleneck under load, and I’d stay silent because I didn’t want to seem disrespectful. That was a mistake. Most of the time, when you’re staring at a flawed architectural decision, it isn’t about ego or hierarchy; it’s about the fact that the system is eventually going to break, and you’re the one who will be getting the page at 2 AM to fix it.

I’m not going to give you a lecture on “soft skills” or how to manage up. Instead, I want to talk about how to move the conversation away from who is right and toward what the system actually needs. I’ll share what I’ve learned from years of being wrong in production and how to use concrete data to challenge seniority without turning a code review into a battlefield. This isn’t about winning an argument; it’s about making sure we don’t build something that we’ll regret six months from now.

Table of Contents

  • Moving Past Ego Toward Data Driven Decision Making
  • Using Technical Debate Etiquette to Avoid Production Disasters
  • Five ways to disagree without getting yourself sidelined
  • The TL;DR for when you're too tired to read the whole post
  • The Goal Isn't to Win
  • Frequently Asked Questions

Moving Past Ego Toward Data Driven Decision Making

Moving Past Ego Toward Data Driven Decision Making

The problem with most technical disagreements isn’t the logic; it’s that we treat our architectural preferences like our personality. When a senior dev pushes a pattern you know is a bottleneck, your brain treats it as a personal attack. I learned this the hard way at that logistics startup—I spent three days arguing about microservices when I should have been looking at the latency numbers. To get anywhere, you have to shift the focus from “who is right” to “what the telemetry says.” This is where data-driven decision making becomes your best friend. It’s much harder for someone to dismiss a graph showing a memory leak than it is for them to dismiss your “gut feeling.”

If you want to practice effective managing upward in software engineering, you have to stop treating the debate like a courtroom drama. Instead of saying, “I think this approach is wrong,” try saying, “I’m worried about how this will scale when we hit 10k concurrent users; can we look at the load test results together?” You aren’t challenging their authority; you’re inviting them to help you solve a puzzle. It changes the entire dynamic from a confrontation to a shared investigation. It’s less about winning the argument and more about protecting the system from a mistake that will eventually wake us both up at 3 AM.

Using Technical Debate Etiquette to Avoid Production Disasters

Using Technical Debate Etiquette to Avoid Production Disasters

When things get heated in a design review, it’s easy to let the conversation turn into a contest of who has more years on their CV. I’ve seen it happen: a senior dev suggests a pattern they’ve used for a decade, and the room goes quiet because nobody wants to be the one to say it won’t scale for our current throughput. That’s where proper technical debate etiquette comes in. It isn’t about being polite for the sake of it; it’s about keeping the focus on the architecture rather than the person. If you’re going to push back, don’t make it a character judgment. Instead of saying “Your approach is outdated,” try “I’m worried about how this specific implementation handles our retry logic during a network partition.”

This shift in language is a huge part of maintaining psychological safety in engineering teams. If people are afraid to point out a flaw because they don’t want to bruise a senior’s ego, the flaw will eventually find its way into the production logs at 3 AM. My rule of thumb is to treat every disagreement as a shared investigation. You aren’t fighting the senior engineer; you are both fighting the potential for a system outage. When you frame your dissent as a way to protect the service, you stop being a contrarian and start being a teammate.

Five ways to disagree without getting yourself sidelined

  • Stop making it about “right” vs “wrong” and start making it about the trade-offs. If you tell a senior dev their architecture is bad, you’ve already lost. If you say, “I’m worried this approach increases our latency by 50ms during peak load, even if it’s easier to write,” you’re just talking about the system.
  • Bring the logs, not your feelings. I’ve learned the hard way that an opinion is just noise until it’s backed by a metric. If you think a certain pattern is causing a bottleneck, don’t guess—show them the Grafana dashboard or the trace that proves it. It’s much harder to argue with a spike in 5xx errors than it is to argue with a junior’s intuition.
  • Ask “How would we handle X?” instead of saying “X will break.” This is a subtle shift, but it works. Instead of accusing them of missing a race condition, ask how the proposed implementation handles concurrent writes to the same shard. You aren’t attacking their intelligence; you’re inviting them to solve a problem with you.
  • Know when to pick your battles. I have a few half-finished side projects sitting on my hard drive because I spent too much time arguing about linting rules instead of shipping. If the disagreement is about something that won’t cause a 2 AM page or a data integrity issue, sometimes you just have to document your concern, let it go, and move on.
  • Propose a way to fail small. If the debate is at a stalemate, suggest a spike or a small POC (Proof of Concept). “Let’s try your way in a staging environment with a load test first” is a much more productive path than a three-hour meeting where everyone just gets frustrated. It turns a theoretical argument into an empirical test.

The TL;DR for when you're too tired to read the whole post

Stop making it about who is right and start making it about what the telemetry says; if you can’t prove your point with a trace or a log, you’re just participating in a loud opinion contest.

Frame your disagreement as a risk assessment rather than a critique of their design; seniors are much more willing to listen to “this might cause a deadlock under high load” than “your approach is outdated.”

Document the decision and the specific trade-offs you both agreed on, because six months from now, when the system behaves exactly as predicted, you’ll want a paper trail that isn’t just “we argued about it.”

The Goal Isn't to Win

The Goal Isn't to Win, focus data.

At the end of the day, none of this is about being the smartest person in the room or proving a senior dev wrong just for the sake of it. It’s about the system. If you can move the conversation away from “I think” and toward “the telemetry shows,” you’ve already won half the battle. Whether you are using data to de-escalate an ego-driven argument or simply applying a bit of etiquette to keep a code review from turning into a fight, the objective remains the same: preventing the 2 AM outage. Keep your focus on the trade-offs and the technical reality, and you’ll find that most seniors are actually quite willing to listen if you aren’t just shouting opinions into the void.

I’ve spent enough years in the trenches to know that the best engineers aren’t the ones who are always right; they are the ones who are the most willing to be proven wrong. If you approach these disagreements with a sense of curiosity rather than a desire for dominance, you’ll build something much more valuable than a perfect architecture—you’ll build professional trust. Don’t worry about winning the debate. Just focus on leaving the codebase in a better state than you found it, and write it down so the next person doesn’t have to learn the hard way.

Frequently Asked Questions

What do I do if the senior engineer is objectively right about the architecture but wrong about the specific implementation details?

This is actually the best-case scenario, even if it feels frustrating. If they’ve got the architecture right, they’ve solved the high-level problem—don’t fight the foundation. Instead, pivot the conversation to the implementation. Use a “Yes, and…” approach: “I agree the event-driven model is the right way to handle this scale, but I’m worried this specific library will choke on our retry logic.” Treat it like a code review, not a power struggle.

How do I handle a situation where I have the data, but the senior engineer is relying on "intuition" or "years of experience" to shut down the conversation?

I’ve been there. It’s frustrating when “I’ve seen this before” is used to bypass a metric. My approach is to stop fighting the person and start fighting the risk. I don’t tell them they’re wrong; I ask how we’ll validate their intuition if the telemetry shows something else. Frame it as a safety net: “If your intuition is right, great. But if the dashboard shows X, what’s our rollback plan?” It shifts the focus from ego to incident prevention.

At what point does pushing back on a technical decision stop being "rigorous" and start becoming a liability to the team's velocity?

It stops being rigor the moment you stop proposing an alternative. If you’re just pointing out why a design is suboptimal without offering a path forward that respects our current sprint capacity, you’re just noise. Rigor is about finding the right solution; liability is about stalling the engine because you want the “perfect” architecture. If your pushback doesn’t include a trade-off analysis or a way to mitigate the risk you’ve identified, you’re just slowing us down.

If I challenge a decision and it eventually breaks in production, how do I navigate the fallout without looking like I'm saying "I told you so"?

If it breaks, don’t celebrate. I’ve been there, staring at a Grafana dashboard knowing exactly why the latency spiked, while feeling that petty urge to say, “I told you so.” Resist it. Instead, focus entirely on the post-mortem. If you shift the conversation from “who was right” to “how do we patch this and add a regression test,” you’re not a nuisance—you’re a senior engineer in training. Focus on the fix, not the ego.

How to debug a container that will not start.

The Container Exits Immediately: Why

Posted on May 22, 2026 by Tomasz Wierzbicki

I once spent an entire Saturday afternoon trying to fix a deployment by adding more observability tools, more sidecars, and more complex telemetry, convinced that I just didn’t have enough data. It turns out the problem wasn’t a lack of sophisticated metrics; it was a single, missing semicolon in a config file that made the entrypoint script fail silently. If you’ve ever found yourself spiraling down a rabbit hole of expensive monitoring suites just to figure out how to debug a container that will not start, you’ve been where I was. Most tutorials will tell you to check your orchestration layer or your cloud provider’s status page, but that’s usually just expensive noise that ignores the actual point of failure.

I’m not here to teach you how to build a complex dashboard or how to lecture your team on Kubernetes best practices. Instead, I want to walk through the actual, unglamorous steps I take when a service goes into a CrashLoopBackOff and I just want to go back to my bike ride. We’re going to focus on the primitive, high-leverage commands that actually reveal what’s happening inside the runtime. My goal is to give you a mental checklist so that the next time this happens, you can solve it in five minutes instead of five hours.

Table of Contents

  • Decoding the Silence of Docker Container Exit Code Analysis
  • Inspecting Container Runtime Errors Before You Lose Your Mind
  • Five things I’ve learned from staring at a blank terminal
  • What I’ve learned from the crash loops
  • The Post-Mortem Mindset
  • Frequently Asked Questions

Decoding the Silence of Docker Container Exit Code Analysis

Decoding the Silence of Docker Container Exit Code Analysis

When a container dies instantly, the first thing you usually do is run `docker ps -a`. You see that dreaded `Exited (1)` or `Exited (137)` and feel that familiar spike of annoyance. Most people treat these numbers like magic spells, but docker container exit code analysis is actually quite literal if you know what to look for. An exit code of 1 is the generic “something went wrong in the application” catch-all, which is frustratingly vague. But if you see 137, you don’t need to dig through your code; that’s the kernel’s way of telling you the OOM Killer stepped in because your process tried to grab more memory than the limit allowed.

The real trick, though, is realizing that the exit code is often a symptom, not the cause. I’ve spent far too many hours inspecting container runtime errors only to find that the application actually crashed because it couldn’t find a specific config file or a missing secret. Before you start rewriting your entrypoint script, check if the process is even reaching your code. Sometimes the failure happens during the shell execution phase, long before your main binary even loads. It’s a subtle distinction, but it saves you from chasing ghosts in your application logic when the problem is actually sitting in your deployment manifest.

Inspecting Container Runtime Errors Before You Lose Your Mind

Inspecting Container Runtime Errors Before You Lose Your Mind

Once you’ve parsed the exit codes and realized you aren’t looking at a simple syntax error, the next step is actually looking at what happened inside the box. I’ve learned the hard way that `docker logs` is your first line of defense, but it isn’t a silver bullet. If the process crashes so early that the logging driver doesn’t even catch the stdout, you’re left staring at a void. This is where inspecting container runtime errors becomes a bit more surgical. You need to stop guessing and start looking at the metadata. I usually jump straight to `docker inspect` to see if the container even reached a “running” state or if it died during the initial handshake with the runtime.

If the logs are empty, your focus should shift toward checking container environment variables and the entrypoint script. Half the time, the container isn’t “broken”—it’s just waiting for a secret or a database URL that was never passed through the orchestration layer. I once spent an entire afternoon chasing a phantom connection timeout, only to find a typo in a `.env` file that had been swallowed by a shell script. Before you start tearing apart your orchestration logic, verify that the environment the application thinks it has actually matches what you intended to deploy. It’s tedious, but it beats a wild goose chase.

Five things I’ve learned from staring at a blank terminal

  • Stop assuming the entrypoint is fine; I’ve lost hours to a simple typo in a shell script that only fails when the container actually tries to execute, not when it builds.
  • Run the container with an interactive shell instead of your application command—if you can’t `exec` into it because it crashes too fast, override the entrypoint to `/bin/sh` or `/bin/bash` so you can actually look around.
  • Check your volume permissions because nothing kills a startup faster than a process running as a non-root user trying to write to a mount owned by root.
  • Don’t trust your local environment; if it works on your machine but fails in the cluster, it’s almost always a missing environment variable or a subtle difference in the network stack.
  • Keep your logs out of the container’s ephemeral storage; if the container dies before the logging agent can grab the buffer, you’re left debugging a ghost.

What I’ve learned from the crash loops

Stop guessing based on the container name; the exit code is the only thing that isn’t lying to you, so learn to read the difference between a 1 and a 137 before you start changing code.

If the logs are empty, the problem isn’t your application—it’s the environment or the entrypoint failing before your code even has a chance to boot up.

Always keep a copy of your last working configuration; most of my “mysterious” failures turned out to be a single environment variable that someone changed during a routine deployment.

The Post-Mortem Mindset

Debugging containers using The Post-Mortem Mindset.

At the end of the day, debugging a container that refuses to stay alive isn’t about mastering a specific tool; it’s about a systematic approach to the evidence. You start by looking at the exit codes to see if the process actually finished or just died, then you dig into the runtime logs to see if the environment itself is the culprit. If the logs are empty, you move to the infrastructure layer to check for resource constraints or misconfigured mounts. It’s a process of eliminating the obvious until you are left with the actual problem. I’ve learned that most “mysterious” failures are just misconfigured environment variables or missing dependencies hiding in plain sight.

I don’t expect you to get it right on the first try. I’ve spent more nights than I care to admit staring at a blinking cursor, wondering why a perfectly valid image won’t boot. But there is a certain quiet satisfaction in finally finding that one missing semicolon or the incorrect port mapping. Don’t just fix the bug and move on; write down what happened so you don’t have to learn this lesson a second time. The goal isn’t to be a hero who fixes everything in five minutes, but to be the engineer who builds systems that are predictable enough to stay running while everyone else is sleeping.

Frequently Asked Questions

What if the container crashes so fast that `docker logs` doesn't even show anything?

When `docker logs` returns nothing, it usually means the process died before the logging driver could even initialize. I’ve been there. Instead of guessing, I skip the logs and go straight to `docker inspect`. I look at the `State` object—specifically the `Error` field and the exact exit code. If that’s still silent, I run the container with an entrypoint override like `tail -f /dev/null`. It keeps the container alive long enough for me to `exec` in and poke around.

How do I figure out if the issue is my code or if the underlying host is just out of resources?

To figure out if your code is the culprit or if the host is just gasping for air, stop looking at your application logs and start looking at the metrics. If you see OOMKills in the kernel logs or your CPU usage is flatlining at the limit while your app is unresponsive, it’s a resource problem. If the app is throwing stack traces or connection timeouts while the host looks bored, the issue is in your logic.

Is there a way to run a "broken" container interactively without it immediately hitting a crash loop?

The short answer is yes, and it’s probably the first thing I try when a service refuses to stay up. You can’t “fix” the broken process, so you bypass it.

How can I tell if a networking misconfiguration is causing the startup failure versus a literal application error?

The quickest way to tell is to look at the logs versus the network connectivity. If your app logs show a stack trace or a “database connection refused” error, it’s a configuration or code issue. But if the container just exits silently or hangs indefinitely without a single line of output, I start looking at the network. I’ll exec into a sidecar or a temporary debug container on the same network to see if I can even reach the service’s port. If the network is fine but the app is silent, the problem is likely a failed health check or a missing environment variable that’s killing the process before it can even start logging.

How to shut down a side project kindly.

Giving People Six Months and Their Data

Posted on May 21, 2026November 7, 2026 by Tomasz Wierzbicki

I have a graveyard of half-finished side projects sitting on my GitHub, most of them gathering digital dust while I still pay $12 a month for a database instance I haven’t touched since 2021. There is this weird, unspoken pressure in the dev community to “pivot” or “scale” every single thing you touch, as if admitting a project is dead is a personal failure. But let’s be honest: sometimes the most professional thing you can do is figure out how to shut down a side project kindly instead of letting it become a zombie service that haunts your credit card statement and your mental headspace.

I’m not here to give you a motivational speech about “failing forward” or some high-level strategy for resource optimization. I’ve spent enough time in production to know that unmanaged complexity is what actually kills you. Instead, I want to walk through the practical, slightly messy process of sunsetting something—from notifying the three users you actually have, to ensuring you don’t leave a security hole wide open. This is about closing the loop so you can actually focus on the next thing without the guilt of the old one.

Table of Contents

  • Managing Community Expectations During Shutdown Before the Lights Go Out
  • Writing a Sunset Announcement Email That Doesnt Sound Like a Lie
  • The technical and emotional debt cleanup
  • The hard lessons from the wreckage
  • The Final Commit
  • Frequently Asked Questions

Managing Community Expectations During Shutdown Before the Lights Go Out

Managing Community Expectations During Shutdown Before the Lights Go Out.

The mistake I see most often—and one I’ve certainly made—is the “ghosting” approach. You just stop pushing commits, the server eventually fails, and the users are left staring at a 500 error. If you want to avoid being that person, you need to start communicating product end of life well before the actual deadline. It’s not about a grand farewell; it’s about giving people enough lead time to feel like they weren’t cheated. Whether it’s a banner in the UI or a simple post in your Discord, the goal is to remove the element of surprise.

When it comes to the actual logistics, you have to be specific. People don’t just care that the service is dying; they care about what happens to their stuff. This is where you need to lay out clear user data migration strategies. If you can provide a simple JSON export or a way to move their data elsewhere, you’ve already done more than 90% of side-project owners. It’s about preserving user trust during an exit by treating their data with the same respect you would if you were still paying the AWS bills. If you can’t offer a migration path, at least be honest about it.

Writing a Sunset Announcement Email That Doesnt Sound Like a Lie

Writing a Sunset Announcement Email That Doesnt Sound Like a Lie

The biggest mistake I see when people start communicating product end of life is trying to wrap the news in layers of corporate-speak. If you tell your users that you are “pivoting focus toward new strategic initiatives” when the real reason is that you’re burnt out and your bank account is bleeding, they can smell the lie from a mile away. People don’t need a polished press release; they need honesty. If the project is dying because you no longer have the bandwidth to maintain it, just say that. You don’t have to be overly dramatic, but being transparent is the only way of preserving user trust during exit.

When you actually sit down to start writing a sunset announcement email, focus on the “what” and the “when” before the “why.” The “why” is secondary to the fact that their data might disappear. Don’t bury the lead. Tell them exactly when the servers go dark and, more importantly, what they need to do before that happens. If you’ve thought about user data migration strategies—like providing a simple JSON export or a way to port their settings—mention it immediately. It turns a frustrating moment into a manageable one. It’s not about being a hero; it’s about leaving the campsite cleaner than you found it.

The technical and emotional debt cleanup

  • Don’t just flip the switch. If you’re hosting data or providing a service, give people a way to get their stuff out before the database goes dark. There is nothing more frustrating than a “service discontinued” message that is actually just a 404 error.
  • Write a clean README for the final state of the repo. Even if the project is dead, someone might fork it or stumble upon it in three years. Tell them exactly why it stopped working so they don’t spend their weekend trying to fix a ghost.
  • Be honest about the “why.” You don’t need to give a corporate lecture on strategic pivots. If you simply lost interest or the maintenance overhead started eating into your sleep, just say that. People respect a developer who ran out of steam more than a developer who hides behind vague excuses.
  • Archive the codebase properly. I’ve learned the hard way that “deleting” a project is a mistake. Archive it on GitHub, tag it with a ‘deprecated’ label, and let it sit. It’s a record of what you learned, even if the code itself is now a mess of half-finished ideas.
  • Close the feedback loops. If you have an open Discord, a mailing list, or a GitHub issue tracker, don’t just vanish. Post one last message saying you’re stepping away and then actually close the gates. Leaving a graveyard of unanswered questions is a bad look for your professional reputation.

The hard lessons from the wreckage

Don’t ghost your users; a blunt, honest email is always better than a silent 404 error that leaves people wondering if they’ve been hacked.

Document the “how” and “why” of the shutdown for your future self, because in two years, you’ll likely forget why you even started this mess in the first place.

Cut the cord decisively; trying to keep a dying project on life support is just a slow way to burn out the one thing you have left—your time.

The Final Commit

Closing a project loop: The Final Commit.

At the end of the day, shutting down a project is less about the technical debt you’re leaving behind and more about the human debt you owe to the people who actually used it. It’s about being honest with your community, providing a clear timeline so nobody gets blindsided, and writing an announcement that actually sounds like it came from a person rather than a legal department. If you manage the expectations early and communicate the “why” with some degree of transparency, you aren’t failing; you’re just closing a loop. It’s much better to end things with a clean break than to let a project slowly rot into a buggy, unmaintained ghost town that frustrates everyone involved.

I’ve spent enough time in production incidents to know that nothing lasts forever, and that includes our side projects. Some of my best code came from things I eventually deleted, and that’s perfectly fine. Don’t let the guilt of a “failed” project stop you from starting the next one, or from simply reclaiming your time for something else—like a long bike ride or a project that actually has a chance of surviving. The goal isn’t to build an eternal empire; it’s to build things that matter, even if they only matter for a season. Sometimes, the most professional thing you can do is know when to let go.

Frequently Asked Questions

How do I decide whether to open-source the code or just let it die in a private repo?

I usually ask myself: “Is this code actually useful, or is it just a collection of my own specific mistakes?” If the logic is sound and someone else could actually build on it, open-source it. But if it’s a tangled mess of bespoke integrations and half-baked ideas, just let it die in a private repo. Don’t dump technical debt on the community just because you feel guilty about quitting.

What’s the best way to handle users who are actually paying for a service I can no longer support?

This is the part where it stops being a hobby and starts being a liability. If people are paying you, you have a contractual obligation, not just a social one. Don’t hide behind a generic “service update.” Be blunt: tell them exactly when the billing stops and how they can export their data. If you can’t provide a self-service export tool, you owe them a manual one. Refund the pro-rated difference immediately. It’s better to lose the cash than your reputation.

At what point does "pausing" a project become a lie that I need to stop telling?

You’re lying to yourself the moment you stop planning a comeback. “Pausing” is a strategic move; it implies a temporary halt with a defined return path. If you aren’t actively setting a milestone or allocating even an hour a week to it, you aren’t pausing—you’re just avoiding the discomfort of a real goodbye. Stop using “pause” as a way to soften the blow for your users. It’s better to be honest than to leave them waiting for a ghost.

How much of my personal data or "brand" should I scrub from the project once the servers are down?

Don’t go scorched earth. If you’ve built something with a distinct voice, keep the brand assets—logos, color palettes, even the domain—in a folder somewhere. You might want to repurpose them for a different project in two years. As for your personal data, wipe the sensitive stuff from the public repos, but leave your name in the git history. It’s not vanity; it’s a paper trail of what you actually built.

Learn how to debug a CORS error.

The Browser Is Blocking You for a Reason

Posted on May 20, 2026 by Tomasz Wierzbicki

I can still hear the low hum of my laptop fan from that Tuesday night three years ago, sitting in a dark apartment while a single red error message mocked me from the DevTools console. I had just pushed a “simple” configuration change to the gateway, only to watch our frontend integration go dark because of a single missing header. Most tutorials online will try to sell you on complex middleware wrappers or fancy security libraries, but they miss the point of how to debug a cors error when you’re actually in the middle of a deployment. It isn’t about learning a new framework; it’s about understanding the unspoken handshake between the browser and your server that you just accidentally interrupted.

I’m not here to give you a theoretical lecture on the Same-Origin Policy or a list of academic definitions. Instead, I want to walk you through the actual, messy process of tracing a failed preflight request and identifying exactly where the communication broke down. I’ll show you the specific headers to watch, the common mistakes I’ve made in production, and how to isolate the culprit without wasting four hours of your life.

Table of Contents

  • Why Your Fetch Api Suddenly Stopped Working
  • Tracing the Ghost in the Access Control Allow Origin Header
  • Five ways to stop chasing your tail
  • What I’m actually walking away with
  • The Post-Mortem Mindset
  • Frequently Asked Questions

Why Your Fetch Api Suddenly Stopped Working

Why Your Fetch Api Suddenly Stopped Working

Usually, when my `fetch` calls start failing, it isn’t because the network is down or the endpoint is returning a 500. It’s because the browser decided to step in as a chaperone. I’ve seen this happen most often when we add a new custom header to a request or switch from a simple GET to a more complex POST. The browser suddenly decides the request is “non-simple” and triggers an options request preflight failure. It sends a little probe to the server to ask permission before sending the actual data, and if your server isn’t expecting that probe, it just stays silent or returns a 404.

The real headache comes from the fact that the error message in the console is notoriously unhelpful. It’ll tell you something is wrong, but it won’t tell you why. Most of the time, I’m looking for a missing or malformed access-control-allow-origin header. If the server doesn’t explicitly shout back that your origin is allowed, the browser will kill the connection to protect the user. It feels like fighting a ghost because the code looks perfect on my machine, but the server-side CORS configuration is silently rejecting the handshake. It’s a classic case of the security policy doing exactly what it was designed to do, even if it’s currently making my life miserable.

Tracing the Ghost in the Access Control Allow Origin Header

Tracing the Ghost in the Access Control Allow Origin Header.

Once you’ve ruled out a basic network hiccup, you usually end up staring at the Network tab in your DevTools, hunting for the specific culprit: the `access-control-allow-origin` header. I’ve lost count of how many times I’ve assumed the server was sending the right thing, only to find it was returning a wildcard `*` when my frontend required specific credentials. It’s a classic trap. If you’re sending cookies or authorization headers, a simple wildcard won’t cut it; the browser’s security policy will kill the request before it even touches your application logic.

Usually, the real headache isn’t the actual GET or POST request, but the options request preflight failure that happens right before it. This is where the browser sends a little “scout” request to see if the server is willing to play ball. If your server-side CORS configuration isn’t explicitly set up to handle these `OPTIONS` methods, the preflight fails, and the actual data request never even leaves your machine. I once spent an entire afternoon debugging a “broken” API, only to realize my load balancer was stripping out the headers during the preflight phase. It’s rarely a code bug; it’s almost always a misunderstanding of the handshake.

Five ways to stop chasing your tail

  • Stop looking at the JavaScript console first. The browser’s dev tools tell you that it failed, but they are terrible at telling you why. Go straight to the Network tab, find the failed preflight OPTIONS request, and look at the actual response headers. If the OPTIONS request doesn’t return a 200 or 204, your actual GET or POST request isn’t even happening.
  • Beware the “double header” trap. I once spent a whole afternoon debugging a production issue where our load balancer was adding an `Access-Control-Allow-Origin` header and our application was adding another one. The browser sees two values, panics, and blocks everything. Check if your infra and your code are fighting over the same responsibility.
  • Don’t use wildcards in production just to make the error go away. Setting `Access-Control-Allow-Origin: *` is the quickest way to fix a bug, but it’s also the quickest way to create a security hole, especially if you need to support credentials (cookies/auth headers). If `Allow-Credentials` is true, the wildcard is a hard no; you have to be explicit with the origin.
  • Check your custom headers. If you’re sending something non-standard like `X-My-Custom-App-Header`, the browser will trigger a preflight. You can’t just allow the origin; you also have to explicitly list that custom header in the `Access-Control-Allow-Headers` response. If it’s missing from that list, the preflight fails, and you’re back to square one.
  • Remember that CORS is a browser security feature, not a server error. If you try to test your API using `curl` or Postman and it works perfectly, but fails in Chrome, it isn’t a broken endpoint—it’s a CORS configuration issue. Don’t waste time debugging your database or your business logic when the problem is actually just the handshake between the client and the server.

What I’m actually walking away with

Stop guessing at the browser console; if the error looks vague, open the Network tab and look at the actual preflight OPTIONS request. The browser is usually telling you exactly what it’s missing, but it won’t shout it at you in the main error log.

Don’t treat `Access-Control-Allow-Origin: *` as a permanent fix. It’s a band-aid that works until you need to send a cookie or an authorization header, at which point it fails and you’re right back where you started.

Most CORS headaches aren’t actually code bugs—they’re configuration mismatches between what your client expects and what your load balancer or API gateway is actually allowing through. Check the infrastructure, not just your Express middleware.

The Post-Mortem Mindset

Debugging CORS with The Post-Mortem Mindset.

At the end of the day, debugging CORS isn’t about mastering a specific library; it’s about understanding the invisible handshake between the browser and your server. You have to look past the generic red text in the console and actually examine the preflight OPTIONS request to see where the negotiation failed. Whether it was a missing header, a mismatch in the allowed methods, or a credential issue that only appeared in production, the fix is always found in the details of that exchange. I’ve learned that if you can’t see the exact header being sent, you aren’t actually debugging—you’re just guessing. Trust the network tab, not your assumptions.

I used to view these errors as personal failures or just annoying hurdles in my sprint. Now, I see them as necessary friction that forces us to actually understand how the web works. Every time I spend an hour untangling a header mismatch, I’m building a mental map that will save me from a much worse outage down the road. Don’t let the frustration of a broken fetch request get to you. Instead, treat every production error as a free lesson in distributed systems. Write down the fix, commit the configuration change, and move on to the next problem. That’s how we actually get better.

Frequently Asked Questions

If I see a CORS error in the console, how do I know if the problem is actually my frontend code or if the backend is just refusing to play nice?

The quickest way to stop guessing is to look at the Network tab, not the Console. If the request shows a status of `(failed)` or `CORS error` without even hitting a 4xx or 5xx code, the browser likely killed the preflight `OPTIONS` request before it even reached your application logic. If you see a 200 OK but the console still screams, your backend is technically responding, but it’s lying about which origins it trusts.

Why does it work perfectly fine on my local machine but immediately blow up the second I push to the staging environment?

It’s almost always the environment configuration. On localhost, you’re usually playing by different rules—either everything is on the same port, or you’ve got a proxy masking the origin. The second you push to staging, you’re hitting real DNS, real HTTPS, and real load balancers. Your staging server is likely seeing a different `Origin` header than your local machine ever did, and it’s rightfully refusing to play ball.

Is it actually safe to just use a wildcard `*` for my origin in production, or am I just asking for a security incident?

Look, I’ve seen the “just use a wildcard” fix in a dozen PRs, usually by someone who was tired of fighting the browser. It works, but it’s a lazy shortcut. If you use `*`, you’re essentially telling the browser, “I don’t care who calls this API.” This means you can’t use credentials like cookies or Authorization headers. If your data is public, fine. If it’s sensitive, you’re just waiting for a security audit to go sideways.

How do I debug this when the error message is totally useless and doesn't even tell me which specific header is missing?

When the browser gives you that generic “CORS error” without specifics, stop looking at the console and start looking at the Network tab. Click the failed request and check the “Headers” sub-tab. If the request didn’t even reach the server, you’re looking at a preflight (OPTIONS) failure. If it did, compare the request headers against the response headers. Usually, the culprit is a missing `Access-Control-Allow-Headers` entry for a custom header you just added.

Learning how to hand over a side project.

Finding Someone Who Cares as Much

Posted on May 17, 2026 by Tomasz Wierzbicki

I once spent three days of my life—and a significant amount of my sanity—trying to figure out why a legacy service I’d built for a logistics startup was eating its own tail. I didn’t need a 50-page architectural diagram or a fancy Confluence page with color-coded diagrams; I needed to know why the cron job was failing every third Tuesday and which environment variable was secretly overriding the production config. Most people think learning how to hand over a side project means writing a formal manual, but in reality, most documentation is just expensive noise that nobody reads when the pager goes off.

I’m not here to sell you on some high-level management framework or tell you to invest in expensive documentation tools. Instead, I want to show you how to document the actual reality of your code: the weird edge cases, the “temporary” hacks that became permanent, and the specific reasons why the database might choke under load. I’ll share the practical, unglamorous steps for how to hand over a side project so that your successor can actually run the thing without needing to call you at midnight to ask where the secrets are stored.

Table of Contents

  • The Project Transition Checklist for Avoiding Midnight Emergencies
  • Transferring Ownership of Digital Assets Without Losing Access
  • Five things I wish I’d written down before the pager went off
  • The TL;DR for your successor
  • The Final Handshake
  • Frequently Asked Questions

The Project Transition Checklist for Avoiding Midnight Emergencies

The Project Transition Checklist for Avoiding Midnight Emergencies

I’ve learned that a vague “it’s all in the README” is essentially a lie. When I’m handing over a repository, I don’t just want to pass over the code; I want to pass over the context. My personal project transition checklist starts with the “why” rather than the “how.” I make sure to document the architectural decisions that felt like a good idea at 11 PM on a Tuesday but actually turned out to be a massive technical debt trap. If I don’t explain why we chose a specific queue pattern or why that one microservice is behaving erratically under load, the person taking over will spend their first month just trying to replicate my mistakes.

The second part is about the plumbing. You need to move beyond the source code and focus on transferring ownership of digital assets—the stuff that actually keeps the lights on. This means more than just sharing a GitHub repo; it’s about the DNS settings, the SSL certificate renewal cycles, and the specific API keys that are tucked away in some obscure vault. I try to create a set of standard operating procedures for the most common failure modes. If the database connection pool hits its limit, I want the next person to know exactly which metric to check and which knob to turn, rather than forcing them to rediscover the entire stack from scratch while they’re still drinking their first coffee.

Transferring Ownership of Digital Assets Without Losing Access

Transferring Ownership of Digital Assets Without Losing Access

The part that usually trips people up isn’t the code—it’s the credentials. I’ve seen too many “successful” handovers turn into a frantic scavenger hunt because the original dev had the AWS root account tied to a personal email they no longer check, or the Stripe keys are locked behind a two-factor authentication prompt on a phone that was traded in three years ago. When you’re transferring ownership of digital assets, you need to treat access like a controlled demolition. Don’t just hand over a list of passwords; you need to systematically migrate the billing, the domain registrars, and the service accounts to a shared organizational identity.

If you leave a project with everything tied to your personal identity, you aren’t handing over a project; you’re handing over a liability. Part of maintaining project continuity is ensuring that the new lead doesn’t have to call you on your day off because a renewal failed or a certificate expired. My rule of thumb is simple: if I can’t log in to the production environment using a generic team identity, the handover isn’t finished. Get the billing updated, move the DNS to a shared workspace, and make sure the recovery codes are stored somewhere else besides your own password manager.

Five things I wish I’d written down before the pager went off

  • Document the “Why,” not just the “How.” Anyone can read a function signature and see that it takes an integer, but they won’t know that the integer has to be a prime number because of a weird quirk in the legacy payment gateway we’re still stuck using. If you don’t explain the reasoning, they’ll “refactor” it into a bug.
  • Map out the invisible dependencies. A side project usually lives on a fragile web of cron jobs, specific environment variables, and maybe a single AWS Lambda function you forgot you even wrote. If they don’t have the full map, they’ll spend three days wondering why the database isn’t syncing.
  • Write a “Failure Log” for the common headaches. I keep a running list of the three or four things that consistently break when the load spikes. Telling your successor “the cache tends to bloat if you don’t clear it every Sunday” is worth more than ten pages of pristine, theoretical architecture diagrams.
  • Provide a “First Hour” guide. Give them a single, copy-pasteable command or a script that spins up the entire local development environment. If it takes them half a day just to get the project running on their machine, they’ve already lost the momentum needed to actually maintain it.
  • Be honest about the technical debt. Don’t hand over a polished lie. If you hacked a solution together in a weekend because you were tired and just wanted it to work, say so. It’s much better to admit “this part is held together by duct tape and prayers” than to have them discover it during a production outage.

The TL;DR for your successor

Document the “why,” not just the “how.” Knowing a function uses a specific timeout is useless if the person taking over doesn’t know that the timeout exists because the third-party API we use is notoriously flaky on Friday afternoons.

Centralize your secrets and access points before you lose the context. There is nothing more frustrating than inheriting a running service only to realize you can’t actually deploy a fix because the deployment keys are sitting in a dead person’s private 1Password vault.

Be honest about the technical debt and the “ugly” parts. If you hid a hacky workaround in the middleware to stop a race condition, tell them now; otherwise, they’ll spend three days debugging a “ghost in the machine” that you already solved six months ago.

The Final Handshake

The Final Handshake of seamless project handover.

At the end of the day, handing over a project isn’t about checking off a list of technical requirements; it’s about reducing the cognitive load for whoever comes next. You’ve documented the architecture, secured the credentials, and laid out the “why” behind those questionable architectural decisions you made during a caffeine-fueled sprint three months ago. If you’ve done this right, the person stepping into your shoes won’t need to hunt through stale Slack threads or guess which environment variable is currently causing the service to flap. You aren’t just passing over code; you are transferring the context that prevents a minor bug from turning into a full-scale production outage.

I’ve spent enough time on call rotations to know that the most expensive thing in engineering isn’t cloud spend or licensing fees—it’s the time lost to unnecessary discovery. When you walk away from a project, do it with the intention of leaving it better than you found it, even if that just means leaving a clear map of the minefields. It’s a quiet kind of professional respect. You might never see the person who maintains your work, but if they can sleep through the night because your documentation actually holds up, you’ve done your job well.

Frequently Asked Questions

What do I do if the project is so messy that I'm actually embarrassed to show the code to whoever is taking it over?

Own it. Don’t try to polish the code or hide the technical debt; you’ll just end up lying to your successor. Instead, write a “Debt Registry.” List exactly where the shortcuts are, why you took them (usually because of a deadline), and which parts of the codebase are currently held together by duct tape and prayers. It’s much better to admit the mess upfront than to let them discover a landmine while they’re trying to fix a production outage.

How do I handle "tribal knowledge" that I haven't actually written down yet?

The “I just know it works because of X” phase is where projects go to die. If you haven’t written it down, you’re currently sitting on a pile of technical debt. Don’t try to document the whole architecture; just start with the “why” behind the weirdest parts. Record a quick Loom video of you navigating the codebase or jot down the three most frequent ways the build fails. If it’s in your head, it’s a liability.

At what point does a "handover" stop being a friendly chat and start being a formal legal or professional responsibility?

It stops being a friendly chat the second you sign a contract or a Statement of Work that mentions “deliverables” or “acceptance criteria.” Once there’s a formal sign-off process, you aren’t just helping a friend; you’re fulfilling a professional obligation. If you’re getting paid by a company rather than a buddy, treat every handoff like a deployment. Document the edge cases now, or you’ll be answering for them in a legal deposition later.

If the project is basically a collection of half-finished side ideas, is it even worth doing a proper handover, or should I just let it die?

If it’s just a graveyard of half-finished ideas, don’t waste time on a formal handover. But don’t just delete the repo either. Spend twenty minutes writing a single `README.md` that explains the “why”—why you started it and where you hit a wall. If you ever decide to resurrect it in two years, you’ll thank yourself for not having to re-learn your own logic from scratch. Otherwise, just let it rest.

How to run a technical discussion effectively.

End the Meeting With a Decision

Posted on May 17, 2026 by Tomasz Wierzbicki

I once sat through a three-hour meeting where four senior engineers argued about whether to use a graph database or a relational one, while the actual service they were supposed to be building was currently dropping 15% of all incoming requests. We weren’t solving a problem; we were just performing intellectual gymnastics to see who could cite the most obscure white paper. Most people think learning how to run a technical discussion means mastering the art of the formal presentation or learning how to facilitate a complex workshop. It doesn’t. It’s actually about preventing your team from spinning its wheels in a room while the production environment is on fire.

I’m not going to give you a lecture on “collaborative synergy” or any other corporate nonsense. Instead, I want to share the practical, somewhat bruised patterns I’ve picked up from fifteen years of seeing meetings go sideways. I’ll show you how to steer a conversation toward actual trade-offs rather than theoretical perfection, so you can actually reach a decision and get back to writing code. This isn’t about being the loudest person in the room; it’s about making sure the right technical truth survives the meeting.

Table of Contents

  • Effective Technical Communication Over Theoretical Perfection
  • Facilitating Design Reviews That Actually Prevent Outages
  • Five ways to stop a meeting from becoming a circular debate
  • The Lessons I’m Writing Down So I Don't Forget Them
  • The Goal Isn't Consensus, It's Clarity
  • Frequently Asked Questions

Effective Technical Communication Over Theoretical Perfection

Effective Technical Communication Over Theoretical Perfection.

I’ve sat through enough meetings where senior engineers spend forty minutes debating the merits of a specific library only to realize they haven’t actually defined the problem they’re trying to solve. It’s a common trap. We get so caught up in the elegance of a theoretical solution that we lose sight of the messy reality of our existing codebase. In my experience, effective technical communication isn’t about having the smartest person in the room win an argument; it’s about moving the group toward a decision that we can actually defend when things go sideways.

If you want to avoid the endless loop of “what-if” scenarios, you have to shift the focus from perfection to pragmatism. I’ve found that the best way to steer a room away from a circular debate is to lean heavily on architectural decision records (ADRs). Instead of letting a discussion float in the ether, I try to force us to document the why—the specific trade-offs we are making and the constraints we are accepting. It turns a subjective argument into a recorded piece of history. It’s much harder to argue about a “feeling” when there is a written document stating that we chose Option A because Option B would have doubled our latency during peak traffic.

Facilitating Design Reviews That Actually Prevent Outages

Facilitating Design Reviews That Actually Prevent Outages

The biggest mistake I see in design reviews is treating them like a formal lecture where someone presents a polished slide deck and everyone nods politely. That’s not a review; that’s a ceremony. If you want to actually catch a race condition or a scaling bottleneck before it hits production, you need to stop focusing on the “happy path.” I’ve learned that facilitating design reviews effectively means intentionally playing the role of the skeptic. Instead of asking “Does this look good?”, I start asking “How does this fail when the network latency spikes to 500ms?” or “What happens to our data consistency if this specific service restarts mid-transaction?”

To keep these sessions from devolving into a circular debate about syntax or minor implementation details, I rely heavily on architectural decision records (ADRs). I make it a rule that the core design must be documented in a lightweight ADR before the meeting even starts. This shifts the conversation from “What are we doing?” to “Why are we doing it this way, and what are we giving up?” It forces the team to confront the trade-offs upfront. When you focus on the why—the constraints, the known unknowns, and the specific risks—you stop wasting time on aesthetics and start building systems that don’t wake you up at 2 AM.

Five ways to stop a meeting from becoming a circular debate

  • Define the “Decision Type” before you open the Zoom link. I’ve wasted hours in meetings where half the room thought we were brainstorming and the other half thought we were voting on a production migration. State clearly if this is a “seek input” session or a “make a choice” session. If it’s the latter, someone needs to be named the tie-breaker before the first slide is even shown.
  • Ban the “What if” rabbit holes. We’ve all been there: a discussion about a simple API change turns into a three-hour philosophical debate about distributed systems theory. If someone brings up a scenario that is 0.1% likely and requires a complete rewrite of our current architecture, acknowledge it, write it down in a “future considerations” doc, and move back to the problem at hand. We are solving for today’s load, not a hypothetical apocalypse.
  • Use a shared scratchpad, not just a slide deck. Slides are for presentations; they are too rigid for discussions. I prefer a messy, live-updated document or a digital whiteboard where we can actually map out the data flow as we talk. If we can’t draw the logic, we don’t actually understand the problem we’re trying to solve.
  • Force the “Trade-off Statement.” If someone proposes a solution, don’t let them stop until they can tell you what they are giving up to get it. Every architectural choice is a trade-off. If they say “this is just better,” push back. Is it better because it’s faster? Or because it’s easier to maintain? If we don’t name the cost upfront, we’ll just end up paying for it in a post-mortem six months from now.
  • Capture the “Why,” not just the “What.” When the discussion ends, the meeting notes shouldn’t just be a list of decisions. They need to include the discarded alternatives. I need to know why we didn’t choose the NoSQL approach so that when a junior engineer asks me about it in a year, I don’t have to spend twenty minutes re-litigating a decision we already made.

The Lessons I’m Writing Down So I Don't Forget Them

Stop optimizing for the “perfect” architecture and start optimizing for observability; a design is only as good as your ability to debug it when it inevitably fails in production.

If a technical discussion doesn’t result in a clear decision or a documented trade-off, it wasn’t a meeting—it was just a group of people talking in circles.

Use design reviews to hunt for failure modes, not to validate your own ego; the goal is to find the single point of failure before the pager goes off at 2 AM.

The Goal Isn't Consensus, It's Clarity

The Goal Isn't Consensus, It's Clarity.

At the end of the day, a technical discussion shouldn’t be a contest to see who can cite the most white papers or defend their favorite library. It’s about moving from “I think this works” to “I know exactly how this will fail.” We’ve talked about cutting through the theoretical noise, focusing on the actual edge cases that trigger on-call alerts, and structuring design reviews so they act as a safety net rather than a formality. If you walk away from a meeting knowing the trade-offs and, more importantly, knowing exactly what you are choosing to sacrifice, then the discussion was a success.

I’ve spent too many nights staring at a terminal, trying to reverse-engineer a decision that was made in a vacuum without any documented reasoning. Don’t let your team be that team. Use these discussions to build a shared mental model of the system, one that survives even after the person who wrote the code has moved on to a different company. Aim to leave behind a trail of clear, actionable decisions that make the next person’s life easier. After all, we aren’t just writing code; we are building the context that keeps the whole thing from falling apart when we aren’t looking.

Frequently Asked Questions

How do I stop a discussion from spiraling into a "bikeshedding" session where we spend an hour debating indentation instead of architecture?

I’ve seen it happen: a design review for a critical payment gateway turns into a forty-minute debate over trailing commas. It’s exhausting. To kill it, you need a “parking lot.” The moment the conversation drifts from “how this scales” to “how this looks,” I step in. I say, “That’s a linter issue, not an architecture issue. Let’s park it in a ticket and get back to the data model.” If it doesn’t affect the runtime or the failure modes, it doesn’t belong in the meeting.

What do I do when a senior engineer with ten years more experience than me refuses to acknowledge a flaw in their proposed design?

Don’t make it a battle of egos; make it a battle of edge cases. If I’m up against a veteran, I stop arguing about “better” designs and start asking about specific failure modes. I’ll pull up a sequence diagram and ask, “What happens to the state if this specific network call times out here?” It shifts the focus from their seniority to the actual mechanics of the system. If the data shows the flaw, it’s no longer your opinion against theirs.

How do you keep these discussions from becoming infinite loops that never actually result in a decision or a ticket?

I’ve seen this happen: three engineers debating the merits of a library for two hours while the actual problem sits untouched. To break the loop, you need a tie-breaker. I usually push for a “Decision Log” approach. If we can’t reach a consensus in twenty minutes, we pick the path with the lowest cost of reversal. We document the choice, the trade-off, and—crucially—the date we’ll revisit it. Then, we turn the decision into a ticket immediately.

At what point do I stop the meeting and say, "We aren't solving this here; we need to go write a formal RFC"?

You stop the meeting the moment you notice the same three people circling the same architectural drain for more than fifteen minutes. If the discussion has shifted from “how do we implement this” to “should we even use this paradigm,” you’ve lost the room. Don’t let it bleed into an hour of polite circularity. Cut it off, tell them the decision is too heavy for a chat, and tell them to go write an RFC.

  • 1
  • 2
  • 3
  • Next

Recent Posts

  • The Signs You Will Ignore Until You Cannot
  • Crash Early Rather Than Corrupt Quietly
  • A Deadline Needs a Witness
  • Where the Evenings Actually Went
  • Teaching Yourself Without a Syllabus
  • Read Both Sides Before You Pick One

Categories

  • Career (44)
  • Code Habits (45)
  • Debugging (43)
  • Side Projects (45)
  • Tooling (43)

Archives

  • November 2026
  • October 2026
  • September 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
© 2026 theboreddev.com | Powered by Minimalist Blog WordPress Theme