theboreddev.com

Menu
  • Home
  • Career
  • Code Habits
  • Debugging
  • Side Projects
  • Tooling
  • About Us
  • Contact Us
  • Disclaimer
Menu
How to rebase without losing work guide.

Rebase With a Backup Branch

Posted on October 23, 2026 by Tomasz Wierzbicki

I still remember the exact feeling of my stomach dropping in a dimly lit office back at the logistics startup—that cold, hollow sensation when you realize the terminal prompt is staring back at you, but your code is just gone. I had tried to clean up my history before a big merge, and instead of a tidy commit graph, I had managed to delete three days of logic. Most tutorials on how to rebase without losing work focus on the “correct” way to use the command, but they never talk about the panic that sets in when the reflog feels like a foreign language.

I’m not here to give you a lecture on Git theory or explain why rebasing is “cleaner” than merging. I’ve already spent enough hours in production incidents to know that “clean” doesn’t matter if your progress is nuked. Instead, I want to show you the practical, slightly paranoid workflows I use to ensure that even if I mess up the command, I can always get my stuff back. This is about building a safety net so you can move fast without the fear of a 2:00 AM recovery mission.

Table of Contents

  • Why I Always Git Stash Before Rebasing Now
  • Preventing Data Loss in Git Before the Panic Sets in
  • Five ways to keep your sanity (and your code) during a rebase
  • The TL;DR for when you're too tired to read the full post
  • The Bottom Line
  • Frequently Asked Questions

Why I Always Git Stash Before Rebasing Now

Why I Always Git Stash Before Rebasing Now

It used to be that I thought I was too experienced to mess up a standard rebase. I’d jump straight in, confident that I could navigate the conflict markers without breaking a sweat. Then came the Tuesday night when a particularly messy series of conflicts left my working directory in a state that looked less like code and more like a crime scene. I tried to back out, but I had already staged some changes, and suddenly the line between my current work and the upstream history was blurred. I ended up having to rely on the git reflog for recovering commits just to find the version of my files that actually made sense.

Now, my workflow is much more boring, which is exactly how I like it. Before I even touch the rebase command, I run a `git stash`. It’s a simple, five-second habit, but it provides a clean slate. By using git stash before rebasing, I ensure that my uncommitted experimental changes are tucked away safely in a separate pile. If the rebase goes sideways—and let’s be honest, if you’re dealing with a long-lived feature branch, it eventually will—I don’t have to worry about losing the work I hadn’t even committed yet. I can just use the `git rebase –abort` command, clear the air, and pop my stash back when the dust settles. It’s not the most elegant way to work, but it’s the way that lets me sleep.

Preventing Data Loss in Git Before the Panic Sets in

Preventing Data Loss in Git Before the Panic Sets in

The most effective way to stop a disaster is to ensure you have a way out before you even start. I’ve learned the hard way that if you’re feeling a sense of dread while resolving merge conflicts during rebase, you are already in the danger zone. My personal rule is to never start an interactive session on a “dirty” working directory. If you have uncommitted changes, just move them out of the way. Whether you use a temporary branch or a simple `git stash before rebasing`, the goal is the same: create a clean state where your only responsibility is managing the history, not worrying about losing half-finished logic from a different task.

If things do go sideways—and they will—don’t start frantically deleting files. Most people panic and try to manually fix the mess, which is how you actually lose data. Instead, get comfortable with the git rebase –abort command. It is your “undo” button for the entire operation. If you’ve gone even deeper into the woods and the abort command isn’t enough, remember that `git reflog` is your best friend. It tracks every time your `HEAD` moves, meaning even if a commit seems to have vanished into the ether, it’s usually still sitting there in the reflog, just waiting to be pointed at again.

Five ways to keep your sanity (and your code) during a rebase

  • Use `git reflog` as your emergency brake. When you inevitably realize you’ve rebased onto the wrong branch or somehow deleted a commit that actually worked, don’t panic. The reflog is a recording of everywhere your HEAD has been; it’s the closest thing Git has to a time machine, and it’s how I’ve recovered most of my “lost” work.
  • Create a “safety branch” before you start. If the rebase looks even slightly hairy, just run `git branch backup-before-rebase`. It’s a zero-cost way to have a pointer sitting exactly where you are right now. If the rebase goes sideways, you don’t have to perform surgery on your current branch; you just delete the mess and go back to the backup.
  • Learn to love `git rebase –abort`. I used to try and “fix” a messy rebase mid-conflict, thinking I could power through. That’s how you end up with a Frankenstein state where half your changes are applied and the other half are missing. If the conflicts look like a nightmare, just abort and start fresh from a clean state.
  • Check your status frequently. It sounds basic, but during a complex rebase, it’s easy to lose track of whether you’re actually in the middle of a conflict resolution or if you’ve already finished. Run `git status` more often than you think you need to. It’s the only way to be sure what the current state of the world actually is.
  • Don’t rebase shared history. This is the golden rule I learned the hard way at the logistics startup. If you’ve already pushed a branch to the remote and others are building on top of it, rebasing that branch is an invitation to a production incident. Rebase your local work to clean it up, but once it’s public, leave the history alone.

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

Treat your local state like it’s volatile; if it isn’t committed or stashed, it doesn’t exist once the rebase starts.

Use `git reflog` as your emergency exit; it’s the only way to find your way back once you’ve realized you’ve nuked a branch.

Don’t rebase shared branches; if someone else has already pulled your work, you’re just inviting a synchronization nightmare for the rest of the team.

The Bottom Line

The Bottom Line: Git rebase tips.

At the end of the day, rebasing isn’t a dark art; it’s just a series of state changes that you need to manage with intention. If you remember nothing else from this, remember to stash your local changes first, verify your branch state with `git status`, and for the love of sanity, create a temporary backup branch before you start the process. I’ve learned the hard way that the five seconds it takes to run `git branch backup-before-rebase` is the difference between a minor hiccup and a two-hour recovery mission involving `git reflog` and a lot of self-loathing.

We all want to be the engineer who can manipulate the git tree with surgical precision, but the real skill is knowing when to slow down. There is no prize for being the fastest person to break the build or the person who loses three hours of work because they were too impatient to follow a simple workflow. Don’t let the tools intimidate you, but don’t let your own ego make you skip the safety checks. Build your habits around preventing the disaster, not just fixing it after the damage is done. That’s how you actually get to sleep through the night.

Frequently Asked Questions

What do I do if I realize I've already botched the rebase and the reflog isn't helping?

If the reflog looks like a mess and you can’t find your commit hash, stop typing. Every new command potentially overwrites the very pointers you’re looking for. My move is to go find the raw objects. Use `git fsck –lost-found`. It’s ugly, and it’ll dump a bunch of dangling commits into your `.git/lost-found/commit` directory, but it’s the nuclear option for when the high-level history has completely betrayed you. It’s tedious, but it works.

Is there a point where a rebase becomes too complex and I should just switch to a merge to save my sanity?

Yes. There is absolutely a point where you stop being “clean” and start being “reckless.” If you find yourself resolving the same conflict five times because your branch has drifted too far, or if the commit history is becoming a labyrinth of “fixup” messages just to keep the rebase alive, stop. Just merge. A messy merge commit is a small price to pay for preserving your sanity and actually getting home for sleep.

How do I handle conflicts in a large rebase without losing my mind (or my place in the commit history)?

I’ve learned the hard way that trying to resolve fifty conflicts in one go is a recipe for madness. My rule is simple: break it down. If the rebase is massive, I stop trying to be a hero and use `git rebase –abort` to reset. Instead, I’ll rebase smaller chunks of commits or use `git rerere` to automate repetitive conflict resolution. It’s slower, but it keeps the history clean and my blood pressure down.

When is it actually safer to use `git rebase –onto` instead of a standard rebase?

I usually stick to a standard rebase for simple feature branches, but `git rebase –onto` is my go-to when the history gets messy—specifically when you’re trying to transplant a slice of a branch onto a new base. If you’ve branched `feature-B` off `feature-A`, and you want to move `feature-B` directly to `main` without dragging all of `feature-A`’s commits along for the ride, `–onto` is the only way to do it cleanly.

How to learn a language you will actually use.

A Language Sticks When You Ship Something

Posted on October 23, 2026 by Tomasz Wierzbicki

I spent three years in a high-end language institute thinking I was making progress because I could conjugate irregular verbs in a vacuum. It felt productive, like refactoring a piece of code that isn’t even running in production. But the moment I actually landed in a small town in southern Italy, all that textbook theory evaporated. I stood in a grocery store, staring at a shelf of pasta, and realized I couldn’t even ask where the salt was without my brain completely seizing up. That’s when I realized the massive gap between academic fluency and knowing how to learn a language you will actually use when the stakes are real and you’re feeling slightly embarrassed.

I’m not here to sell you on a subscription to some gamified app that rewards you with digital stickers for doing repetitive drills. I don’t care about your streak. Instead, I want to talk about the messy, inefficient, and often frustrating process of building a functional toolkit. I’ve spent a lot of time figuring out how to strip away the academic fluff and focus on the high-leverage patterns that actually allow you to navigate a conversation. This is about building a system that works in the real world, not just on a final exam.

Table of Contents

  • Stop Memorizing Syntax and Start Learning Languages Through Implementation
  • Why Project Based Learning Techniques Beat Every Grammar Course
  • Five ways to stop studying and start actually using the thing
  • The TL;DR for when you're too busy to read the whole thing
  • The Post-Mortem
  • Frequently Asked Questions

Stop Memorizing Syntax and Start Learning Languages Through Implementation

Stop Memorizing Syntax and Start Learning Languages Through Implementation.

I spent way too many months in my early twenties treating programming languages like a biology textbook. I’d sit there, highlighting syntax rules and memorizing the nuances of memory management, thinking I was “learning.” But when I actually sat down to build something, I’d stare at a blank IDE like it was a foreign language I’d never even seen. It turns out, knowing how a hammer works doesn’t mean you can build a house; you only learn when you realize you’re missing a specific type of nail.

The shift for me happened when I stopped treating study sessions as passive reading and started treating them as learning languages through implementation. Instead of running “Hello World” for the tenth time, I started trying to solve a specific, annoying problem—like a script to automate my bike maintenance logs. You quickly realize that syntax is just a tool, and the real meat is in the logic. This is where skill retention through practice actually happens. You don’t remember the syntax because you read it; you remember it because you spent forty-five minutes debugging a type error at midnight and finally felt the dopamine hit when the code actually ran.

Why Project Based Learning Techniques Beat Every Grammar Course

Why Project Based Learning Techniques Beat Every Grammar Course.

I’ve spent enough time in lecture halls and structured bootcamps to know that there is a massive gap between knowing a rule and knowing how to use it when the pressure is on. A grammar course is like reading a manual on how an engine works without ever getting grease under your fingernails. You can memorize every conjugation or syntax rule in the book, but the moment you have to actually communicate in a high-stakes environment, your brain tends to freeze. This is why I lean so heavily on project-based learning techniques; they force you to bridge that gap by moving from theoretical knowledge to functional utility immediately.

When I’m building something, I’m not just “studying”—I’m solving problems. If I’m trying to build a small CLI tool or a scrapable web page, I don’t care about the nuances of a specific library until I hit a wall that requires it. That’s where the real magic happens. This approach mirrors how we develop practical coding skills for developers: you don’t learn to handle concurrency by reading a whitepaper; you learn it when your service crashes because you didn’t account for a race condition. By focusing on the output rather than the instruction, you ensure that what you’re learning actually sticks because it has a reason to exist.

Five ways to stop studying and start actually using the thing

  • Build a “Minimum Viable Vocabulary.” Don’t waste time learning the names of exotic animals or colors you’ll never need. Figure out the 500 words that actually appear in the documentation or conversations you care about, and ignore the rest until they become a blocker.
  • Embrace the “Broken Code” phase. You’re going to sound like a toddler for a while. That’s fine. In production, we don’t wait for a perfect deployment; we ship, we see the errors, and we patch. Treat your speech the same way—get the meaning across, let the grammar be messy, and fix the bugs later.
  • Context is your debugger. Learning a word in isolation is a waste of memory. If you’re learning a phrase, learn it inside a sentence that you actually might say. If you can’t visualize yourself using it in a real-world scenario, it’s just dead weight in your brain.
  • Stop using translation apps as a crutch. When I’m stuck on a bug, I don’t just copy-paste a solution from StackOverflow; I try to understand why it works. When learning, stop translating every word back to English. Try to map the new word directly to the object or the concept. It’s slower at first, but it prevents that mental lag when you’re actually talking.
  • Set up a feedback loop that actually matters. A textbook telling you “you are wrong” is useless. You need high-fidelity feedback. Whether it’s a language exchange partner or a specialized AI tool, you need to know exactly where the communication broke down so you can iterate on your approach.

The TL;DR for when you're too busy to read the whole thing

Stop treating language learning like a textbook to be mastered; treat it like a codebase you need to deploy. If you can’t use the words to actually accomplish a task, you haven’t learned them yet.

Prioritize high-frequency utility over theoretical perfection. I don’t care if your conjugation is technically incorrect if you successfully ordered a coffee and didn’t cause a scene; focus on the vocabulary that prevents “production outages” in real-world conversations.

Build a feedback loop through immediate application. The gap between “knowing” a rule and “using” a rule is where most people fail. Close that gap by forcing yourself into situations where the language is a tool for a specific outcome, not just a subject of study.

The Post-Mortem

Analyzing errors during The Post-Mortem.

At the end of the day, learning a language is a lot like managing a distributed system: you can study the documentation all you want, but you won’t truly understand how it behaves until you see it fail under load. We’ve talked about why memorizing conjugation tables is a poor substitute for building something real, and why implementation-driven learning is the only way to bridge the gap between theory and utility. If you spend your time chasing perfect grammar, you’ll end up with a textbook-perfect understanding that breaks the moment you actually try to use it in a conversation. Focus on the projects, embrace the errors, and treat every linguistic mistake as a bug report that tells you exactly where your mental model is lacking.

I’ve spent far too many hours debugging code that worked perfectly in my local environment but crashed the moment it touched production. Language learning is the same. You can simulate fluency in a classroom, but the real test happens when you’re forced to navigate a real-world situation where the stakes are actually high. Don’t wait until you feel “ready” to start building or speaking; that feeling is a myth. Just start shipping your broken sentences and let the friction of real interaction teach you what the textbooks won’t. It’s messy, it’s inefficient, and it’s the only way to build something that actually lasts.

Frequently Asked Questions

How do I actually pick a project that isn't so massive that I just give up after three days?

The mistake is thinking you need to build a house when you just need to fix a leaky faucet. I call this “scope creep of the soul.” If your project requires a database, an auth provider, and a frontend framework just to say “hello,” you’ve already lost. Pick something that solves one specific, annoying problem. If it takes less than a week to reach a “working” state, you’re in the sweet spot. Anything bigger is just a way to procrastinate.

What do I do when I hit a wall and realize I don't even have the vocabulary to search for the solution?

This is where most people quit, and it’s a frustrating spot to be in. When you hit that wall, stop trying to translate your thoughts and start using “bridge languages.” Use English to find the technical concepts, then use those concepts to find the target language. If you can’t find the word for “asynchronous loop,” search for the logic itself. Build a small, crude glossary of the specific terms that keep failing you. It’s tedious, but it’s better than staring at a blank screen.

Is there a way to balance this "learning by doing" approach without leaving massive, gaping holes in my fundamental understanding?

It’s a fair concern. If you only learn what you need to finish a specific task, you end up with “knowledge silos”—you can build a web scraper but have no idea how memory management works.

How much "fake" implementation is too much—at what point am I just playing around instead of actually building something functional?

If you’re just building “Hello World” variations or tweaking CSS colors for three hours, you’re procrastinating, not learning. I call this “sandbox rot.” You know you’ve crossed the line when you aren’t encountering errors that actually frustrate you. Real learning happens when you hit a wall—a bug that makes you want to close your laptop. If there’s no friction, there’s no growth. Stop polishing the tools and start trying to build something that actually breaks.

How to debug a login that works for some users.

It Works for Everyone Except Four People

Posted on October 22, 2026 by Tomasz Wierzbicki

I remember sitting in a dark office three years ago, staring at a dashboard that looked perfectly green, while a Slack channel was absolutely melting down with reports of login failures. The weirdest part wasn’t the error itself, but the inconsistency; half the users were fine, and the other half were stuck in a loop. Most people will tell you that you need a more expensive observability suite or a fancy AI-driven log analyzer to figure out how to debug a login that works for some users, but that’s usually just expensive noise. In reality, these intermittent ghosts are rarely about the code being “broken” in a general sense—they are almost always about unseen environmental variables or edge cases in the data that we were too lazy to account for during design.

I’m not going to give you a lecture on theoretical distributed systems or suggest you buy a new SaaS tool. Instead, I want to walk through the actual mental model I use when I’m staring at a broken authentication flow that refuses to fail predictably. I’ll share the specific, boring checks—from session cookie attributes to subtle differences in database shards—that actually move the needle. My goal is to give you a practical checklist so that the next time you’re stuck, you don’t have to rediscover the solution from scratch.

Table of Contents

  • Hunting Through Authentication Logs for the Silent Killers
  • Why Debugging Intermittent Login Issues Is Never Simple
  • Five things I've learned from chasing ghosts in the auth flow
  • What I learned from the wreckage
  • Lessons from the Trenches
  • Frequently Asked Questions

Hunting Through Authentication Logs for the Silent Killers

Hunting Through Authentication Logs for the Silent Killers

When I first started analyzing authentication logs during these kinds of outages, I used to look for the big, screaming errors—the 500s or the obvious stack traces. But when a login issue is selective, the logs are usually polite. They don’t crash; they just return a 401 or a 403 as if everything is perfectly normal. This is where the real headache begins. You have to stop looking for what broke and start looking for the subtle deviations in the request metadata. I’ve found that the culprit is rarely a total system failure and almost always a specific combination of a stale cookie, a weirdly formatted header, or a timestamp mismatch that only triggers under specific conditions.

The trick to debugging intermittent login issues is to stop treating the log stream as a monolith. If you just grep for “error,” you’ll find nothing. You need to pivot your search around the specific identifiers of the users who are complaining. I started grouping my log queries by user agent and session ID to see if a pattern emerged. Often, you’ll find that the “silent killers” are hiding in the noise of successful requests. It’s usually something like a slight database consistency lag where the session record hasn’t propagated to the read replica by the time the next request hits, or a specific browser version mishandling a cookie attribute. You aren’t looking for a broken gear; you’re looking for a grain of sand.

Why Debugging Intermittent Login Issues Is Never Simple

Why Debugging Intermittent Login Issues Is Never Simple

The problem with intermittent issues is that they are rarely a total system failure. If the auth service goes down, everyone screams. If it only fails for 2% of the population, it’s much harder to build a case for a fix. You end up in this frustrating loop of debugging intermittent login issues where the telemetry says everything is green, but the support tickets say otherwise. It’s usually not a crash; it’s a subtle deviation in state that only triggers under specific, messy conditions.

Most of the time, I’ve found that the culprit isn’t the code itself, but the environment surrounding the request. You might be looking for a logic error when the real problem is database consistency in authentication—perhaps a replica lag is serving a stale session record to a user who just updated their credentials. Or, it’s something as mundane as a specific browser version handling a cookie attribute slightly differently than your staging environment. You aren’t just looking for a broken line of code; you are trying to reconstruct a specific, fleeting moment in time where the user’s state, the network, and your infrastructure all decided to disagree.

Five things I've learned from chasing ghosts in the auth flow

  • Stop looking at the code and start looking at the environment. If it works for User A but fails for User B, the problem usually isn’t your logic; it’s something external like a specific load balancer configuration, a regional CDN edge case, or a weirdly aggressive firewall rule that only triggers on certain IP ranges.
  • Check the clock. I’ve lost entire weekends to NTP drift issues where a single server in a cluster had a clock offset of just a few seconds. If your tokens rely on strict timestamps, that tiny discrepancy will make logins work perfectly on one node and fail silently on another.
  • Look for the “invisible” payload differences. Sometimes a user’s metadata—like an unusually long surname or a specific character in their email address—hits a database column limit or a regex constraint that you didn’t account for. It’s not a “login bug,” it’s a data validation edge case that only shows up when the data is messy.
  • Trace the session lifecycle, not just the initial hit. A login might “work,” but if the subsequent session cookie is being flagged as `SameSite=Lax` when it needs to be `None` for a specific browser or redirect flow, the user will be stuck in a loop that looks like a failed login attempt.
  • Don’t ignore the client-side state. I once spent hours debugging a backend issue that turned out to be a stale piece of local storage from a previous version of the frontend. If the client is sending an old, malformed header because it hasn’t cleared its cache, your backend logs will show a failure, but the culprit is actually sitting in the user’s browser.

What I learned from the wreckage

Stop looking for a single “broken” line of code; intermittent login failures are almost always a collision of two things working correctly in isolation, like a race condition between a session refresh and a database replica lag.

If your logs are silent during a failure, you don’t have a debugging problem, you have a visibility problem—you can’t fix what you haven’t instrumented to report.

Always check the environmental variables of the specific user session, because “it works on my machine” usually means you’re testing in a clean environment while the user is hitting a specific, misconfigured edge case in a stale cache or a specific regional cluster.

Lessons from the Trenches

Debugging authentication: Lessons from the Trenches.

At the end of the day, debugging these “ghost” login issues isn’t about finding a magic tool; it’s about being methodical when everything feels chaotic. We’ve looked at how to sift through the noise of authentication logs, why distributed systems make intermittent failures so much harder to pin down, and why you can’t just trust your local environment. Whether it’s a race condition in a session store, a misconfigured load balancer, or an edge case in a specific user’s metadata, the answer is always hiding in the delta between what you expect to happen and what the logs actually show. If you don’t document the specific conditions that caused the failure, you’re just waiting to solve the same problem again in another eighteen months.

I’ve spent more hours than I care to admit chasing bugs that felt like they were mocking me, but that’s usually where the real learning happens. These incidents are frustrating, sure, but they are also the most effective way to build a resilient system and a more disciplined engineering mindset. Don’t get discouraged when the fix isn’t obvious right away. Just keep digging, keep writing things down, and remember that every production incident is just a very expensive, very loud lesson in how your software actually behaves when nobody is watching.

Frequently Asked Questions

How do I tell if the issue is actually in my code or if it's just some weird interaction with a specific browser's cookie policy?

I usually start by isolating the environment. If I can reproduce it in a headless browser or a clean Chrome incognito window, it’s likely my logic. But if it only happens on Safari or certain mobile browsers, I start looking at the `Set-Cookie` headers. I’ve lost hours to `SameSite` attribute mismatches and the way modern browsers handle third-party context. If the cookie isn’t even hitting the client, it’s a policy issue, not a code bug.

Is there a way to reproduce these "intermittent" failures in a staging environment without waiting for a real user to complain?

The short answer is: rarely, not without a lot of pain. If the bug is tied to specific user state or a weird race condition in the production database, your clean staging environment won’t show it. I’ve tried synthetic load testing to trigger these, but it usually just breaks the staging DB instead of mimicking the real issue. My rule of thumb: if you can’t reproduce it, stop trying to “fix” it and start instrumenting it better.

At what point do I stop looking at the application logs and start blaming the load balancer or the network layer?

I usually make the jump when I see a pattern of “connection reset by peer” or 502/504 errors that don’t leave a trace in the application’s own logs. If my code thinks it never received the request, but the client says they sent it, the problem isn’t in my logic—it’s in the plumbing. I stop looking at the code once I realize the request is dying in the gaps between services.

If the logs aren't showing any obvious errors, how do I track down a silent failure that's happening on the client side?

If the server logs are clean, the failure is happening in the gap between the user clicking “login” and the request actually hitting our infrastructure. I usually start by looking at the browser’s network tab—if the request never even leaves the client, it’s likely a client-side validation error or a malformed interceptor in their frontend code. I’ve also seen cases where a stale service worker intercepts the fetch and returns a cached, failed response without ever touching the network.

How to write a makefile people use.

Make Is a Menu for Your Project

Posted on October 20, 2026 by Tomasz Wierzbicki

I once spent an entire Saturday at a logistics startup trying to figure out why our CI pipeline was failing, only to realize the “sophisticated” build script was just a 400-line shell script masquerading as a build tool. It was brittle, undocumented, and frankly, a nightmare for anyone trying to onboard. Most people think the answer is to reach for a heavy-duty task runner or a complex CI configuration, but if you want to know how to write a makefile people use, you have to stop trying to be clever. A Makefile shouldn’t be a black box that requires a PhD to debug; it should be the simplest possible interface between a developer and the codebase.

I’m not going to give you a lecture on the theoretical elegance of dependency graphs. Instead, I’m going to show you how I structure them to survive real-world chaos. I’ll share the specific patterns I use to keep commands predictable, how to avoid the dreaded “it works on my machine” trap, and why explicit is always better than clever. This isn’t about following a textbook; it’s about writing something that won’t make your teammates want to quit when they have to run a build at midnight.

Table of Contents

  • Why Common Makefile Targets and Commands Save Your Sanity
  • Implementing Maintainable Build Automation Before Everything Explodes
  • Five ways to stop making your teammates hate your build scripts
  • The things I actually learned the hard way
  • The Bottom Line
  • Frequently Asked Questions

Why Common Makefile Targets and Commands Save Your Sanity

Why Common Makefile Targets and Commands Save Your Sanity

The reason I push for certain patterns isn’t because I’m a purist; it’s because I’ve been the person staring at a terminal at 2 AM, trying to figure out if `make build` actually compiles the binary or just runs a bunch of linter checks. When you stick to standard makefile conventions, you’re essentially providing a map for whoever touches the code next—which, given my track record, is usually me six months later. If I use `make help` to list what’s possible, I don’t have to go hunting through a hundred lines of shell scripts to find the one command that actually runs the integration tests.

By focusing on improving build system discoverability, you turn the Makefile from a cryptic script into a piece of documentation. I like to treat my targets as a predictable API. If `make test` runs the suite and `make clean` actually wipes the slate, people will actually use the tool instead of writing their own bespoke bash aliases. It’s about maintainable build automation that doesn’t require a mental manual to operate. When the targets are intuitive, the friction of jumping into a new repo drops to near zero, and that’s when a build system actually starts doing its job.

Implementing Maintainable Build Automation Before Everything Explodes

Implementing Maintainable Build Automation Before Everything Explodes.

The problem with most build scripts I’ve encountered isn’t that they don’t work; it’s that they are opaque. I once joined a team where the only way to run the test suite was to ask a senior dev which specific, undocumented flag needed to be passed to a custom script. That is the opposite of maintainable build automation. If a new engineer can’t figure out how to build the project within ten minutes of cloning the repo, you haven’t built a tool; you’ve built a gatekeeping mechanism.

To avoid this, I lean heavily on standard makefile conventions. I treat the Makefile as the primary interface for the entire repository. This means using `make help` as a mandatory target. By implementing self-documenting makefiles—where each command prints a brief description of what it actually does—you stop the cycle of “trial and error” debugging that eats up everyone’s afternoon.

I also make it a rule to keep the logic thin. If a command requires more than a few lines of shell script, I move that logic into a dedicated script file in a `scripts/` directory and just call it from the Makefile. This keeps the build system readable and ensures that when a build fails, you aren’t squinting at a massive, unreadable blob of escaped characters and nested loops.

Five ways to stop making your teammates hate your build scripts

  • Stop using magic strings. If your build depends on a specific version of a tool or a weirdly named directory, define it as a variable at the top of the file. I’ve wasted too many afternoons hunting through a hundred lines of code just to find where a path was hardcoded.
  • Always include a `help` target. If a new engineer joins the team and has to run `make –help` or, worse, grep the file just to figure out how to run the tests, you’ve failed. A simple, clean help command that lists available targets is the difference between a helpful tool and a mystery box.
  • Use `.PHONY` for everything that isn’t an actual file. I once spent an hour debugging a “build” command that wouldn’t run because there happened to be a folder named `build` in the root directory. If it’s a command and not a file being generated, mark it phony.
  • Keep your commands short and delegate the heavy lifting. Don’t cram a twenty-line bash script into a single Makefile target. It’s unreadable and impossible to debug. If a step is complex, move it into a separate script and have the Makefile just call that script.
  • Make sure `make clean` actually cleans. A “clean” target that leaves behind stale binaries or hidden configuration files is a trap. I’ve seen entire production deployments fail because a developer thought they were starting from a blank slate, but they were actually building on top of artifacts from three weeks ago.

The things I actually learned the hard way

Stop reinventing the wheel with custom command names; if a new dev has to ask what `make build-stuff-final-v2` does, you’ve already lost.

A Makefile isn’t a script for your eyes only—it’s a contract that needs to work identically on a local MacBook and a stripped-down CI runner.

Always use `.PHONY` for your targets, because nothing ruins a Friday afternoon faster than a build failing because someone happened to name a folder `build`.

The Bottom Line

The Bottom Line: predictable Makefile patterns.

At the end of the day, a Makefile isn’t a piece of academic computer science; it is a piece of operational infrastructure. If you follow the patterns we discussed—standardizing your targets, avoiding hardcoded paths, and making sure your `make clean` actually cleans everything—you are essentially writing a manual for your future self. I’ve spent far too many nights staring at a terminal, trying to remember if the build required a specific environment variable or a hidden flag, only to realize that a well-documented, predictable Makefile would have solved the problem in ten seconds. Don’t build a black box; build a predictable interface.

I know it feels like extra work to sit down and structure these commands properly when you could just be writing the actual feature code. But I’ve learned the hard way that technical debt in your tooling is often more expensive than the debt in your application logic. A good Makefile is a quiet teammate; it does its job, it doesn’t surprise you, and it stays out of the way until you need it. Write your Makefiles with the assumption that the person using them is tired, stressed, and just wants to get the build running so they can go home. If you do that, you’ve already won.

Frequently Asked Questions

How do I handle environment-specific variables without making the Makefile a mess of if-else statements?

I used to try and handle environment logic with nested shell scripts inside my Makefiles. It was a nightmare to debug. Now, I treat the Makefile as a pure runner. I keep all the environment-specific mess in `.env` files or a `config/` directory. The Makefile just loads the right file based on a single `ENV` variable. It keeps the logic flat, predictable, and—most importantly—easy to audit when a deployment fails.

When does a Makefile become too complex, and at what point should I just move to something like Bazel or Task?

You’ve crossed the line when you start writing shell scripts inside your Makefile targets just to handle basic logic. If I’m looking at a rule and thinking, “Wait, I need to parse a JSON file just to figure out the build path,” the Makefile has failed. If you’re fighting the syntax more than you’re building the project, move to Task for simplicity or Bazel if you actually need a hermetic, distributed build system.

How do I prevent people from accidentally running destructive commands like `make clean` in a production environment?

I once watched a junior dev accidentally wipe a staging database because `make clean` was aliased to a script that didn’t check its environment. Now, I never trust a command. I add a guard clause to destructive targets that checks an `ENV` variable. If `ENV` isn’t explicitly set to `development` or `local`, the command exits with an error. It’s a small friction point, but it’s better than a 3 AM recovery effort.

What’s the best way to document these targets so a new dev doesn't have to grep the whole file just to run the tests?

I’ve learned the hard way that if a new hire has to `grep` your Makefile to find out how to run the linter, you’ve already failed them. I usually just add a `help` target at the very top. It’s a simple loop that parses comments starting with `##` next to each command. It’s not fancy, but it means `make help` gives them a clean menu of everything they actually need to know.

How to choose what technology to learn next.

Learn the Thing Your Next Job Uses

Posted on October 18, 2026 by Tomasz Wierzbicki

I spent most of last Tuesday staring at a half-finished Rust project and a pile of “Roadmap 2024” bookmarks, wondering why I felt so behind. We’ve been conditioned to treat our careers like a frantic game of Whac-A-Mole, where the moment you master one tool, three more “game-changers” appear on your Twitter feed. Most of the advice out there regarding how to choose what technology to learn next is just noise designed to sell you a bootcamp or a subscription. They tell you to follow the hype or chase the highest salary, but they never mention that learning the wrong thing is exactly how you end up stuck maintaining a legacy codebase that no one actually wants to touch.

I’m not here to give you a curated list of trending languages or a way to optimize your LinkedIn profile. Instead, I want to talk about building a toolkit that actually survives a production outage. I’ll share the mental framework I use to filter through the chaos, focusing on durability and utility rather than what’s currently trending on Hacker News. My goal is to help you pick technologies that solve real problems, so you can spend less time chasing ghosts and more time actually building things that stay upright.

Table of Contents

  • Why Most Emerging Technology Trends Fail Under Pressure
  • Building a Skill Acquisition Framework That Survives Real World Chaos
  • Five filters for avoiding the "shiny object" trap
  • The triage list for your next skill
  • The Long Game
  • Frequently Asked Questions

Why Most Emerging Technology Trends Fail Under Pressure

Why Most Emerging Technology Trends Fail Under Pressure

Most emerging technology trends fail under pressure because they are built to solve problems that only exist in a controlled, high-resource environment. I’ve seen this play out repeatedly: a new tool arrives with massive hype, promising to simplify orchestration or data processing, but the moment it hits a real-world production environment with messy, unvalidated data and strict latency requirements, it falls apart. These tools often prioritize developer ergonomics or “magic” abstractions over the boring, necessary stuff like observability, error handling, and predictable resource consumption.

When you are looking at a learning roadmap for programmers, you have to distinguish between a tool that makes writing code faster and a tool that makes a system more resilient. A lot of the noise in the industry is just people building shiny wrappers around existing concepts. If a technology doesn’t have a clear answer for what happens when the network partitions or when a database connection pool exhausts, it isn’t a foundation; it’s a hobby.

The real way to evaluate future-proof tech skills isn’t by looking at GitHub star counts, but by asking if the underlying principles of the tech hold up when things go wrong. If the tool’s primary selling point is that it “handles everything for you,” that’s usually a red flag. In my experience, the most valuable skills are the ones that help you understand the mechanics of failure, not just the mechanics of implementation.

Building a Skill Acquisition Framework That Survives Real World Chaos

Building a Skill Acquisition Framework That Survives Real World Chaos

Instead of scanning LinkedIn for whatever buzzword is currently trending, I’ve started using a more boring, but effective, skill acquisition framework based on how much friction a technology actually removes from a system. I don’t care if a tool is “revolutionary” if it just adds another layer of complexity that my team can’t debug when the database connection pool hits its limit. When I’m looking at a new language or a distributed system pattern, I ask one question: does this solve a problem I’ve actually seen in production, or am I just chasing a shiny object?

A decent learning roadmap for programmers shouldn’t be a list of tools, but a list of capabilities. If you focus on learning how to manage state in a distributed environment, you can jump between almost any framework that comes along. This is how you actually build future-proof tech skills—by focusing on the underlying mechanics rather than the syntax. It’s a bit slower, and it’s definitely less exciting than jumping into a new AI wrapper, but it’s the difference between being a person who knows a library and being a person who knows how to keep the lights on.

Five filters for avoiding the "shiny object" trap

  • Look for the boring stuff that works. I don’t care how many stars a repository has on GitHub; I care if the documentation actually explains how to handle a connection timeout or a partial write. If the “revolutionary” tool doesn’t have a clear way to handle failure, it’s not a tool, it’s a liability.
  • Follow the data, not the influencers. If you see everyone on social media talking about a new language, it’s probably too late to learn it for “edge.” Instead, look at what’s actually being used in the post-mortems of the companies you respect. If they are all standardizing on a specific database or messaging queue, there’s usually a very expensive reason for it.
  • Prioritize “transferable fundamentals” over syntax. Learning a new framework is easy; learning how that framework manages state, concurrency, or memory is hard. If you spend your time learning the specific quirks of a library, you’ll be obsolete in two years. If you learn the underlying patterns, you can pick up the next thing in a weekend.
  • Check the “Day 2” operations. Anyone can get a “Hello World” running in a new technology in ten minutes. The real test is: how hard is it to monitor? How do you debug it when it’s behaving strangely in a distributed system? If the technology doesn’t have good observability or tooling, you’re just signing up for more 2:00 AM pages.
  • Solve a problem you actually have. I’ve wasted way too many weekends building side projects with tech stacks I’ll never use at work. The best way to learn is to pick something that addresses a friction point in your current workflow—even if it’s just a small script to automate a tedious deployment step. That way, the learning has immediate, practical stakes.

The triage list for your next skill

Stop looking at GitHub stars or trending lists to decide what’s next; instead, look at the specific technical debt or architectural bottlenecks that actually keep you awake during an incident.

Prioritize “low-level” fundamentals—like networking, concurrency models, or database internals—because while frameworks go obsolete every three years, the physics of how data moves across a wire stays the same.

Aim for “boring” stability over “cutting-edge” novelty; if a technology hasn’t been battle-tested by a company with more scale than yours, you aren’t learning a tool, you’re volunteering to be its unpaid QA engineer.

The Long Game

Building a career with The Long Game.

At the end of the day, choosing your next skill shouldn’t feel like gambling on a crypto coin. It’s about looking past the marketing gloss and asking if a tool solves a problem you actually encounter when the load balancer is screaming. If you focus on the underlying principles—concurrency models, data consistency, or network protocols—rather than just the latest syntax, you’ll find that most “new” technologies are just old ideas in a shiny new wrapper. Don’t build a career on a stack of hype; build it on foundational stability that remains useful even when the startup that created the framework goes belly up.

I’ve spent too many nights fixing things that should have been simple if only I had understood the basics better. My advice is to stop trying to learn everything and start trying to learn the right things deeply. You don’t need to be a wizard in every library, but you do need to be the person who understands why the system is behaving the way it is. Pick something that challenges your mental model, write it down, and then apply it to something real. That is how you move from just writing code to actually engineering systems that last.

Frequently Asked Questions

How do I tell the difference between a legitimate paradigm shift and just another library that's going to be dead in eighteen months?

Look for the “why,” not the “what.” A new library usually just solves a specific, narrow annoyance—like a prettier way to handle state or a faster syntax for something we already do. A paradigm shift, though, changes how you think about the underlying problem. If it’s just a new way to write the same logic, it’s a tool. If it forces you to rethink how data flows through your entire system, pay attention.

If I focus on the "boring" fundamentals to avoid production outages, am I actually making myself obsolete in the job market?

Actually, it’s the opposite. Anyone can learn the syntax of a new framework in a weekend, but very few people understand how a distributed lock works or why a database connection pool is exhausting under load. Hype dies; fundamentals don’t. When the “shiny” new tool inevitably breaks at 2:00 AM, the company isn’t looking for the person who knows the latest API—they’re looking for the person who understands the underlying system. That’s where the job security is.

At what point does "learning the fundamentals" become an excuse for avoiding the hard work of actually picking up a new tool?

It becomes an excuse the moment you stop using “fundamentals” to navigate a new tool and start using them to avoid the friction of its syntax. Understanding how a B-tree works is great, but it won’t help you configure a broken Kubernetes ingress at midnight. If you’ve spent three weeks reading about distributed systems theory instead of actually deploying a single service, you aren’t “mastering the basics”—you’re just procrastinating.

How much time should I realistically spend on a new technology before I decide it's either worth mastering or a complete waste of my life?

I usually follow the “two-week rule,” but not for mastery. I spend two weeks trying to break it. If I can’t find a way to make it fail—or if I can’t find a coherent way to handle a basic failure state—I stop. Don’t aim for proficiency; aim for understanding its limitations. If you can’t see where the seams are after fourteen days of actual implementation, it’s probably just more hype you don’t need.

Learning how to keep a branch short lived.

A Branch Older Than a Week Is a Problem

Posted on October 16, 2026November 7, 2026 by Tomasz Wierzbicki

I’ve sat through enough “agile transformation” workshops to know that most people treat git workflows like a religious ritual rather than a tool. They’ll spend three weeks debating the perfect branching strategy or investing in expensive tooling, completely ignoring the actual problem: the sheer, agonizing friction of a massive merge conflict. I learned this the hard way at a logistics startup that didn’t survive its own technical debt; we had engineers sitting on massive feature branches for a month, treating them like personal sandboxes. By the time they tried to merge, the codebase had moved so far underneath them that it felt like trying to reconstruct a car engine while it was still running. If you want to stop the bleeding, you need to stop overcomplicating the theory and actually learn how to keep a branch short lived through practical, boring discipline.

I’m not here to sell you on a specific framework or a new DevOps suite. I just want to share the few things that actually worked when I was the one staring at a broken build at 2:00 AM. I’ll walk through the specific, slightly unglamorous habits I use to break down tasks and keep my pull requests small enough that they don’t scare my reviewers away. No hype, just the trade-offs.

Table of Contents

  • The High Cost of Reducing Merge Debt Too Late
  • Why Your Git Workflow Optimization Failed Under Pressure
  • Five ways to stop hoarding code like it's a survivalist bunker
  • The Lessons I Learned the Hard Way
  • The Long Game of Small Commits
  • Frequently Asked Questions

The High Cost of Reducing Merge Debt Too Late

The High Cost of Reducing Merge Debt Too Late.

The problem with waiting until the end of a sprint to merge isn’t just the extra work; it’s the psychological tax of “merge debt.” I’ve seen teams treat their feature branches like private bunkers, building up weeks of logic in isolation, only to realize during the final merge that the underlying platform has shifted under their feet. By the time you start reducing merge debt, you aren’t just fixing code; you’re performing surgery on a moving target. You end up spending more time untangling logic than actually shipping features, which is a terrible way to spend a Tuesday.

When you delay integration, you lose the safety net that continuous integration best practices are supposed to provide. Instead of catching a breaking change ten minutes after it happens, you catch it ten days later, after three other developers have built their own work on top of your flawed assumptions. This is where the real damage happens. You aren’t just fighting a simple conflict; you’re fighting a cascade of architectural drift. I’ve learned the hard way that minimizing merge conflicts isn’t about being tidy—it’s about ensuring that the version of the system you’re coding against actually exists in production.

Why Your Git Workflow Optimization Failed Under Pressure

Why Your Git Workflow Optimization Failed Under Pressure

The problem usually isn’t that your team lacks a process; it’s that the process is designed for a sunny Tuesday afternoon when everything is working perfectly. Most teams adopt a version of git workflow optimization that looks great on a whiteboard—lots of linting, plenty of automated tests, and a clean Jira board. But these systems are brittle. The moment a critical production bug hits or a high-priority feature gets pushed into a sprint, the discipline evaporates. Suddenly, that “temporary” feature branch is three days old, and nobody has the mental bandwidth to pull the latest from main because they’re too busy firefighting.

I’ve seen this happen repeatedly: a team follows all the standard continuous integration best practices in theory, but they fail the moment the pressure rises. They stop making small atomic commits and start bundling massive, sweeping changes into single, terrifying PRs just to “get it over with.” This is where the real damage happens. You think you’re being efficient by batching work, but you’re actually just building a mountain of technical debt that will inevitably collapse during your next deployment. When you skip the small, frequent integrations, you aren’t saving time; you’re just deferring the pain to a much more expensive hour of the day.

Five ways to stop hoarding code like it's a survivalist bunker

  • Stop trying to build the whole feature at once. If you’re working on a massive overhaul, break it into tiny, non-breaking pieces. I’ve learned that pushing a single, small refactor or a new interface definition every day is much easier than trying to merge a three-week-old monolith that has already drifted away from the main branch.
  • Use feature flags to decouple deployment from release. This is the biggest one. If you can wrap your half-finished logic in a toggle, you can merge it into the main branch immediately without actually exposing it to users. It lets you get the code out of your local environment and into the shared reality of the repo before it becomes a massive integration headache.
  • Treat your pull request like a series of small, digestible snacks rather than a seven-course meal. If your PR has more than 300 lines of code, you’re probably doing too much. Small PRs get reviewed faster, they get caught sooner, and they don’t turn into the kind of psychological burden that makes you want to avoid the repo entirely.
  • Pull from main every single morning. I know, it feels like extra work, but it’s much cheaper to resolve a small conflict at 9:00 AM over coffee than it is to face a catastrophic merge conflict at 4:00 PM on a Friday. If you aren’t rebasing or merging main into your branch daily, you aren’t actually working on the project; you’re working in a parallel universe.
  • Define your “done” before you even write the first line of code. I usually write my commit messages as a spec before I start, and if I see that the list of commits required to finish the task is getting too long, I stop and re-evaluate. If the task is too big to be finished in two days, it’s not a task; it’s a project, and it needs to be broken down.

The Lessons I Learned the Hard Way

Stop treating “merging” as a scheduled event; if a branch exists for more than two days without hitting main, it’s already accruing interest you can’t afford to pay back during a deployment window.

Small, atomic commits aren’t about being a purist—they are about making the inevitable conflict manageable so you aren’t staring at 400 lines of diff at midnight trying to remember why you changed that specific logic.

Automate the boring stuff, like linting and basic test suites, before the PR even reaches a human; I’ve learned that nothing kills a developer’s momentum—or a team’s sanity—faster than a “fix typo” cycle during a critical release.

The Long Game of Small Commits

The Long Game of Small Commits.

At the end of the day, keeping branches short-lived isn’t about following a specific GitFlow manual or satisfying some arbitrary DevOps metric. It’s about reducing the cognitive load required to ship code. We’ve talked about why massive feature branches turn into merge nightmares and why your current workflow likely collapses the moment a real production incident hits. The goal is to move away from the “big bang” integration model and toward a rhythm of continuous, incremental updates. If you can’t describe what your branch does in a single, concise commit message, it’s probably already too big. Stop treating your branches like long-term storage for ideas and start treating them like transient vehicles for specific changes.

I’ve learned the hard way that the most “productive” developer isn’t the one who writes the most code in a week, but the one who integrates it without breaking the world. It’s easy to feel like you’re being slow by breaking a feature into five tiny, manageable PRs instead of one giant masterpiece, but that’s a false economy. You’re trading a little bit of upfront discipline for a massive amount of peace of mind later. When you finally close your laptop at the end of the day, you want to know that your code is actually in the main branch and tested, rather than sitting in a stale, diverging branch waiting for a collision that’s inevitable. Write small, merge often, and sleep better.

Frequently Asked Questions

How do I handle a situation where a feature is too large to be finished in a single day without breaking the build?

You don’t finish the feature; you finish the interface. I’ve learned the hard way that if a task is too big for a single day, you need to stop thinking about “features” and start thinking about “deployable increments.” Use feature flags to hide the unfinished logic, or extract the new database schema and API contracts into a tiny, separate PR first. Get the plumbing in place while it’s still safe, then layer the actual logic on top.

At what point does frequent merging start to actually hurt productivity instead of helping it?

It’s when you start merging “work in progress” that isn’t actually ready for a code review. If you’re merging every twenty minutes just to keep the delta small, but your teammates are spending their entire morning untangling half-baked logic or fixing broken builds you pushed, you haven’t optimized anything. You’ve just traded merge conflicts for constant context switching. High frequency is good; high noise is a productivity killer.

Should I be using feature flags to hide incomplete code, or is that just adding more complexity to the debt?

It’s a trade-off. If you use feature flags to decouple deployment from release, you’re effectively buying insurance against massive, terrifying merges. It keeps your branches small and your CI green. But if you aren’t disciplined about cleaning them up, you’re just trading merge debt for conditional logic debt—which is much harder to debug at 2:00 AM. Use them to move fast, but treat every flag like a temporary loan that needs immediate repayment.

How do we stop the "just one more small change" cycle that turns a two-hour task into a three-day branch?

I call this “scope creep by increments.” It starts with a tiny fix, then you notice a typo in a related file, then you think, “while I’m here, I might as well refactor this helper function.” Suddenly, you’re three days deep into a branch that has nothing to do with the original ticket. My rule is simple: if the change isn’t in the original commit message, it doesn’t belong in that branch. Open a new one.

How to reuse a side project in the next one.

Keep the Parts, Throw Away the Product

Posted on October 15, 2026 by Tomasz Wierzbicki

I’ve spent enough time in production incidents to know that most “architectural advice” is just expensive noise designed to make engineers feel important. People love to talk about microservices, event-driven choreography, or building some massive, generic internal library as if that’s the secret to scalability. But when you’re sitting there at midnight trying to figure out how to reuse a side project in the next one without dragging a mountain of technical debt behind you, none of that high-level theory matters. In reality, most of my “reusable” code from three years ago ended up being a liability because I tried to make it too smart, too early.

I’m not going to give you a lecture on design patterns or tell you to build a private NPM registry. Instead, I want to talk about the messy, practical reality of extracting the bits that actually work—the logic that survived a real-world deployment—and moving them into a new context without breaking everything. I’ll show you how I approach decoupling my core logic from the boilerplate so that my next project starts with a head start, rather than a pile of legacy baggage I’m too tired to fix.

Table of Contents

  • The Pain of Re Writing Software Development Boilerplate
  • Why Modular Code Architecture Is Your Only Real Insurance Policy
  • Five ways to stop treating every new repo like a blank slate
  • The Lessons I Learned While Rebuilding the Same Wheel
  • The Long Game
  • Frequently Asked Questions

The Pain of Re Writing Software Development Boilerplate

The Pain of Re Writing Software Development Boilerplate

There is a specific kind of exhaustion that sets in around hour three of setting up a new repository. You’ve already decided on the tech stack, you know exactly what the data model looks like, and yet you find yourself staring at a blank screen, manually configuring auth middleware, setting up database connections, and wrestling with environment variable loaders. It’s the endless cycle of software development boilerplate that kills momentum before you’ve even written a single line of actual business logic. I’ve spent more weekends than I care to admit doing this exact same dance, feeling like I was spinning my wheels in the mud.

The problem isn’t that the work is hard; it’s that it’s repetitive. When I was at the logistics startup, we treated every new service like a blank slate, which meant we were constantly reinventing the wheel for things like logging and retry logic. We weren’t building features; we were building the same scaffolding over and over. If you don’t find a way to stop this, you’ll eventually stop starting side projects altogether because the “setup tax” becomes too expensive. You don’t need a complex microservices setup, but you do need to stop treating your setup process as a disposable ritual.

Why Modular Code Architecture Is Your Only Real Insurance Policy

Why Modular Code Architecture Is Your Only Real Insurance Policy

If you treat your side projects like a single, monolithic block of granite, you aren’t actually building anything you can use later; you’re just building a monument to your past self’s temporary interests. When I started out, I’d finish a project, feel a sense of accomplishment, and then bury the entire repository in a digital graveyard. The problem is that when I needed that same authentication flow or that specific Stripe integration six months later, I couldn’t find the “part” I needed because it was welded to a dozen other dependencies.

This is where modular code architecture stops being a theoretical concept from a textbook and starts being a survival mechanism. You need to treat your code like a set of Lego bricks rather than a single molded plastic toy. If you spend even a little extra time building reusable component libraries—even if it’s just a private npm package or a well-organized folder of Go modules—you’re essentially pre-paying for your future productivity. It’s about drawing hard lines around your logic. If you can’t lift a piece of your code out and drop it into a fresh, empty repository without bringing half the internet along with it, you haven’t actually written a module; you’ve just written a very complicated script.

Five ways to stop treating every new repo like a blank slate

  • Write the “Why” before the “How.” I’ve started writing my commit messages as a spec before I even touch the code. If you document the reasoning behind a weird architectural choice while the context is fresh, you won’t spend three weeks staring at your own code six months later wondering why you used a queue instead of a direct API call.
  • Treat your “utility” folder like a liability. Most side projects end up with a `utils/` directory that is a graveyard of unorganized, highly coupled functions. If a piece of logic—like a specific auth wrapper or a payment validator—is actually useful, pull it out into its own tiny, independent package or a local submodule. If it can’t live without the rest of the app, it isn’t reusable; it’s just clutter.
  • Standardize your environment, not your language. I don’t care if you use Go, Python, or Node, but if your Dockerfiles and CI pipelines are a mess, you’ll never move fast. Build a “base” configuration for your deployment scaffolding. The goal is to make the “boring stuff”—setting up linting, testing, and containerization—a copy-paste operation rather than a week-long chore.
  • Embrace the “Good Enough” interface. Don’t over-engineer a generic component to handle every possible edge case in your head. Just make sure the interface is clean. If you build a logging module, don’t try to make it work for every hypothetical scenario; just make sure it takes a standard input and doesn’t crash the main thread. You can always wrap it later.
  • Keep a “Lessons Learned” markdown file in every repo. It sounds tedious until you realize you’re halfway through a new project and you’ve hit the exact same database deadlock that killed your last one. A simple list of “what I got wrong” is worth more than any library you’ll ever import.

The Lessons I Learned While Rebuilding the Same Wheel

Stop writing “one-off” scripts. If you find yourself copy-pasting a database connection string or a specific authentication wrapper from an old repo, you’ve already failed. Treat your side projects as a library of pre-tested components, not just a graveyard of abandoned ideas.

Documentation is your future self’s only hope. I’ve spent way too many hours staring at my own code from two years ago, wondering why I chose a specific, convoluted way to handle error retries. Write down the “why” behind your weirdest architectural decisions while the context is still fresh, or you’ll just be debugging a stranger’s logic next time.

Aim for “boring” portability. Don’t tie your core logic to a specific framework version or a niche library that might be dead by next year. The more decoupled your business logic is from the surrounding plumbing, the easier it is to pluck a working module out of a dead project and drop it into a live one without bringing the whole mess along with it.

The Long Game

Building software assets for The Long Game.

At the end of the day, reusing a side project isn’t about being lazy or hoarding code snippets; it’s about reducing the cognitive load of your next big idea. If you spend the first three weeks of a new project fighting with authentication flows or database connection pools that you already solved six months ago, you’ve already lost the momentum that keeps side projects alive. By focusing on modularity and writing those “specification-first” commit messages, you aren’t just building software—you are building a library of solved problems. When you treat your past failures and boilerplate as assets rather than discarded experiments, you stop starting from zero every single time.

I’ve spent enough time in production environments to know that the most expensive thing you can do is solve the same problem twice. Your side projects are often where you take the risks you can’t take at your day job, and those hard-won lessons are your only real competitive advantage. Don’t let your previous work die in a forgotten GitHub repository. Instead, build it with the intention that it will eventually become the foundation for something even better. After all, the goal isn’t just to ship code; it’s to build a system that makes your future self a lot less stressed when the next idea inevitably hits.

Frequently Asked Questions

How do I separate the actual logic from the specific dependencies of my old project so I'm not dragging a heavy, outdated framework into a clean repo?

The trick is to stop letting your business logic touch the outside world. I call it the “dependency wall.” Keep your core domain logic in pure functions or classes that don’t know anything about your database, your web framework, or your specific message queue. If you need to save a user, don’t pass a database connection into your service; pass an interface. That way, when you start the next project, you’re just moving logic, not a heavy, outdated pile of dependencies.

At what point does "reusable module" actually just become "over-engineered abstraction" that makes the new project harder to understand?

It becomes over-engineered the moment you start coding for a “what if” that hasn’t happened yet. If you’re adding interfaces, dependency injection, and complex configuration layers just to make a simple database wrapper “generic,” you’ve lost. I’ve seen it happen: you spend three days building a perfect abstraction only to realize the new project needs something fundamentally different. If the code is harder to trace than the problem it solves, delete it and start simple.

Should I be maintaining a private package registry for these bits, or is it just easier to copy-paste the core logic and fix it as I go?

Look, I’ve been down the rabbit hole of maintaining a private NPM registry, and honestly? It’s usually overkill for one person. Unless you’re managing three different services that all need the same auth logic, the overhead of versioning and publishing will kill your momentum. Just keep your core logic in a well-documented folder or a separate Git submodule. Copy-paste is fine if you treat the “paste” as a starting point for refactoring, not a permanent debt.

How do I document the "why" behind a component so that six months from now, I actually remember how to use it instead of treating it like a black box?

Stop writing “how” it works; the code already tells you that. Write down why you chose the specific trade-off that probably feels wrong now. I always add a `// DECISION:` comment right above the weird logic. I explain what I didn’t do and why. If I don’t document that I picked a slower, consistent database over a fast, eventual-consistency one, six months from now I’ll just think I’m a bad engineer and try to “fix” it.

How to debug a payment that half succeeded.

Charged but Not Recorded

Posted on October 15, 2026 by Tomasz Wierzbicki

I remember sitting in a dark apartment three years ago, the only light coming from a terminal window, trying to figure out why a customer had been charged but their order remained “pending.” There is no specific kind of dread quite like the one you feel when you realize you’re staring at a distributed system that has entered a state of partial failure. Most people will tell you to just add more logging or implement a fancy distributed tracing tool, but when you’re actually trying to figure out how to debug a payment that half succeeded, those tools often just give you more noise to sift through. You don’t need more data; you need to understand the exact moment the atomicity broke.

I’m not here to pitch you a new observability platform or lecture you on microservices theory. Instead, I want to walk through the messy, unglamorous reality of tracing a transaction through a broken state machine. I’ll share the specific mental model I use to isolate where the side effects diverged from the intent, and the practical steps I take to reconcile the books without losing my mind. This isn’t a guide on how to build a perfect system—because we both know that’s impossible—it’s about how to fix things when they inevitably break.

Table of Contents

  • Chasing Ghosts in Distributed Systems Failure Modes
  • Why Distributed Transactions Atomicity Failed Your Production Environment
  • My survival kit for when the state doesn't match the reality
  • The Lessons I Learned the Hard Way
  • The Long View on Partial Success
  • Frequently Asked Questions

Chasing Ghosts in Distributed Systems Failure Modes

Chasing Ghosts in Distributed Systems Failure Modes

The problem with distributed systems is that they don’t just fail; they fail in ways that feel personal. You expect a binary outcome—either the money moved or it didn’t—but in reality, you’re often stuck in a gray zone where the database says one thing and the bank says another. This is the essence of distributed systems failure modes: the network disappears exactly at the moment the gateway sends a 200 OK, or your worker process dies right after committing the local transaction but before updating the external provider.

I’ve learned the hard way that chasing these ghosts usually means realizing you were assuming atomicity where none actually existed. In a monolith, you have the luxury of a single database transaction to wrap everything up. In a fintech environment, you’re orchestrating a dance between your API, a message queue, and a third-party provider. When that dance breaks mid-step, you aren’t just looking for a bug; you’re trying to figure out which part of the distributed transaction atomicity was violated. You aren’t just debugging code anymore; you’re debugging the gaps between services.

Why Distributed Transactions Atomicity Failed Your Production Environment

Why Distributed Transactions Atomicity Failed Your Production Environment

We like to pretend that our services are a single, cohesive unit, but in reality, they are a collection of strangers constantly shouting at each other over a network. When I was at the insurance firm, we relied heavily on the idea of distributed transactions atomicity—the comforting belief that either everything happens or nothing happens. It’s a lovely theory. In production, however, that theory dies the moment a network partition occurs or a third-party API decides to time out halfway through a handshake. You end up in that purgatory where the money has left the user’s account, but your internal ledger hasn’t heard a word about it.

The problem usually isn’t that the code is “broken” in a traditional sense; it’s that we fail to account for the gray area between a success and a failure. Most of our logic handles the happy path or a hard crash, but it struggles with handling inconsistent payment states during a partial timeout. You send a request to the gateway, the gateway processes it, but the connection snaps before you get the 200 OK. To your system, that looks like a failure, but to the bank, it’s a completed transaction. If you haven’t built your logic to be idempotent, you aren’t just debugging a bug; you’re managing a financial discrepancy.

My survival kit for when the state doesn't match the reality

  • Stop looking at the logs and start looking at the database timestamps. When a payment “half-succeeds,” you aren’t looking for a missing error message; you’re looking for the gap between when the gateway said “yes” and when your local ledger said “maybe.” If those two timestamps are drifting, your reconciliation logic is already dead in the water.
  • Trace the idempotency key like it’s your life depends on it. I’ve seen too many “half-successes” that were actually just a client retrying a request that had already partially executed. If your idempotency layer isn’t locking the record before the external API call starts, you’re just inviting race conditions to dinner.
  • Audit your “zombie” states. If your state machine has a status called `PENDING` that stays there for more than ten minutes, you don’t have a state machine—you have a graveyard. You need a way to programmatically identify these stuck transitions so you aren’t manually querying SQL at 3 AM to see if a user actually paid.
  • Check the “silent killers”—the timeouts. A common reason for a partial success is a network timeout occurring after the third-party provider processed the money but before they sent the ACK. If your code treats a timeout as a failure instead of an “unknown,” you will end up with a customer who is charged but has no order.
  • Build a “reconciliation script” before you build the feature. It sounds backwards, but if you can’t write a script that compares your internal database against the provider’s API export to find mismatches, you have no way of knowing how much money you’re losing until the accounting department calls you.

The Lessons I Learned the Hard Way

Stop assuming “success” is a binary state; in a distributed system, “partially done” is a much more common reality that your code needs to treat as a first-class citizen.

If your recovery logic relies on the same network path that just failed, you haven’t built a safety net, you’ve just built a delay.

Idempotency isn’t a “nice to have” feature for your API; it is the only thing that prevents a retry from turning a minor hiccup into a massive financial discrepancy.

The Long View on Partial Success

The Long View on Partial Success.

At the end of the day, debugging a half-succeeded payment isn’t about finding a single missing line of code; it’s about acknowledging that distributed systems are fundamentally messy. We’ve looked at how the lack of true atomicity leaves us with these awkward, intermediate states, and how chasing ghosts in the network often leads us down the wrong path. If you want to stop these 2:00 AM calls, you have to stop assuming the happy path is the only path. You need to design for the inevitable failure of the middle step, whether that means implementing robust idempotency keys or building out a reconciliation worker that doesn’t sleep. It is better to spend the extra engineering hours now than to spend them later trying to figure out why a customer was charged but their order never shipped.

I’ve learned through enough production incidents that perfection is a myth we tell ourselves during office hours. Your system will fail, and it will likely fail in a way that looks like a contradiction. The goal isn’t to build a system that never breaks, but to build one that is observable enough to fix when it inevitably does. Don’t get discouraged when the logs don’t immediately tell the story; that’s just part of the job. Write down what you find, fix the underlying pattern rather than just the symptom, and build something that can survive its own mistakes. That is the only way to actually sleep through the night.

Frequently Asked Questions

If I can't rely on distributed transactions to be atomic, what's the actual, practical way to ensure a user isn't charged twice when the system retries a failed request?

You use idempotency keys. It’s not magic, just a unique identifier—usually a UUID generated by the client—that you store in your database alongside the transaction record. Before you even touch the payment gateway, you check if that key has already been processed. If it has, you return the existing result instead of hitting the API again. It turns a “retry” from a potential double-charge into a simple, safe lookup.

How do I distinguish between a network timeout that actually failed and one where the payment went through but the acknowledgment just never reached my service?

This is the classic “did it actually happen?” problem. You can’t trust the timeout. If you get a 504 or a socket hang-up, you have to assume the worst: the money moved, but the confirmation got lost in the ether. I stopped trying to guess and started building for idempotency. Every request needs a unique idempotency key. Instead of asking “did it fail?”, I ask the downstream provider, “did you ever see transaction X?”

At what point does a "half-succeeded" state become too expensive to fix manually, and how do I build the tooling to automate the reconciliation instead?

It becomes too expensive the moment your engineers start spending their Monday mornings manually querying databases to find missing rows. If you’re running a single script a week to patch things, you’re fine. If you’re getting paged for it, you’re failing. I stop manual intervention when the “fix” takes longer than the incident itself. You need an idempotent reconciliation worker—something that polls your source of truth and re-drives the missing state without duplicating the actual money movement.

What kind of specific idempotency keys should I be using to make sure my retry logic doesn't just turn a partial failure into a total mess?

Don’t just use a random UUID for the whole request. If your process has multiple steps—say, charging a card and then updating a ledger—you need keys that map to the specific intent of each step. I’ve seen too many “retry loops” accidentally double-charge because the top-level ID was reused for a sub-operation. Use a composite key: `request_id + operation_type`. It ensures that even if your retry logic gets aggressive, you’re only ever re-running the exact same discrete action.

How to keep skills current while employed.

Staying Employable on Company Time

Posted on October 14, 2026 by Tomasz Wierzbicki

I’ve lost count of how many “career growth” influencers try to sell you a $500 course on the latest JavaScript framework or a grueling 6-month bootcamp to stay relevant. It’s exhausting, and frankly, it’s a distraction. Most of that stuff is just noise designed to make you feel like you’re falling behind. If you’re looking for a roadmap on how to keep skills current while employed without burning out or spending your entire weekend watching tutorials, you won’t find it in a polished marketing brochure. Real technical growth doesn’t happen by chasing every shiny new library; it happens when you’re staring at a broken deployment and realizing you don’t actually understand the underlying network layer.

In this post, I’m not going to give you a list of “must-read” books or a schedule for learning Rust on your lunch break. Instead, I want to talk about building a practical feedback loop using the work you are already doing. I’ll share how I use my current production tickets and my own documentation habits to bridge the gap between being a “coder” and being an engineer who actually understands the system. This is about sustainable, high-signal learning that survives the reality of a full-time job.

Table of Contents

  • Performing a Brutal Skill Gap Analysis for Employees
  • Maintaining a Competitive Edge Before the System Fails
  • Five ways to stay useful without burning out
  • The Bottom Line
  • The Long Game
  • Frequently Asked Questions

Performing a Brutal Skill Gap Analysis for Employees

Performing a Brutal Skill Gap Analysis for Employees.

Most people approach a skill gap analysis like a corporate HR exercise—a long, soul-crushing spreadsheet of competencies that nobody actually looks at again. That’s not what I mean. If you want to actually improve, you need to perform a skill gap analysis for employees (and yourself) that is based on reality, not a job description from three years ago. I start by looking at the last three times a system failed or a deployment went sideways. What was the specific piece of knowledge I lacked in that moment? Was it a misunderstanding of how the database handles locking, or did I just not realize how the new load balancer configuration would affect latency?

Don’t bother with broad, sweeping goals like “learning more about cloud computing.” It’s too vague to be useful. Instead, map your gaps against the actual tools that are currently causing you friction. I look for the intersection between what I think I know and what the production logs are telling me. This is where true professional growth while working full time happens—not by chasing every shiny new library on GitHub, but by identifying the precise technical blind spots that make your workday harder than it needs to be. If you can’t name the specific thing that would have saved you an hour of debugging yesterday, you haven’t found your gap yet.

Maintaining a Competitive Edge Before the System Fails

Maintaining a Competitive Edge Before the System Fails.

The mistake most people make is treating professional growth like a semester-long course. If you wait until you have a free month to “study,” you’ve already lost. In my experience, the most effective upskilling strategies for working professionals aren’t found in massive, expensive certifications that gather digital dust. Instead, they happen in the margins. I look for the friction in my daily workflow—the part of the deployment pipeline that feels “magic” or the database query that everyone is too afraid to touch. If you can’t explain how it works, you don’t actually know it. That’s where the real learning starts.

I’ve found that microlearning for busy employees is the only way to actually make things stick without burning out. This isn’t about watching three-hour tutorials on YouTube after a ten-hour shift. It’s about spending twenty minutes reading a single RFC or digging through a specific post-mortem from a company like Cloudflare or AWS. You want to find the patterns in how things break. By focusing on these small, targeted bursts of investigation, you aren’t just collecting facts; you are building a mental model of failure. That is how you actually maintain a competitive edge in your career—by knowing what’s going to break before the pager goes off.

Five ways to stay useful without burning out

  • Stop collecting certificates and start collecting post-mortems. I don’t care if you finished a Coursera course on Kubernetes; I care if you can explain why a specific configuration caused a cascading failure in your current stack. Real skill is knowing how things break, not just how they are supposed to work.
  • Treat your side projects like actual production environments. I have a dozen half-finished repos sitting on my GitHub, but the ones that actually taught me anything were the ones where I forced myself to implement observability or a proper deployment pipeline. If you aren’t breaking your own local environment, you aren’t learning.
  • Build a “Personal Knowledge Base” that is actually searchable. I’ve spent way too much time re-solving the same database deadlock because I didn’t document the fix the first time. If you can’t find your own notes from six months ago, you haven’t actually mastered the concept; you’ve just temporarily memorized it.
  • Learn the “boring” stuff that stays constant. Frameworks change every eighteen months, but TCP/IP, database indexing strategies, and concurrency models haven’t changed much since I was in school. If you master the fundamentals, you can pick up any new tool in a weekend because you’ll understand what it’s actually doing under the hood.
  • Audit your “shadow” work. Most of our growth happens in the undocumented tasks—the weird bug fix in the legacy module or the manual scaling you had to do because the automation failed. Don’t just fix it and move on; take twenty minutes to figure out the underlying pattern. That’s where the real seniority is earned.

The Bottom Line

Stop chasing every new library that hits GitHub; instead, focus on the architectural patterns that actually prevent the system from collapsing when load spikes.

Treat your professional development like a post-mortem—identify exactly where your knowledge failed during a real incident and bridge that specific gap.

Documentation is a skill, not a chore; being able to explain why a decision was made is often more valuable to your career than being able to write the code itself.

The Long Game

Mastering technical growth with The Long Game.

At the end of the day, staying relevant isn’t about chasing every shiny new JavaScript library or spending your weekends grinding LeetCode. It’s about the work we did above: being honest about where your knowledge actually ends and building a defensive moat around your expertise. You need to identify those gaps before they become a liability during a high-stakes deployment, and you need to find ways to experiment with new tools in a way that actually makes sense for your current stack. If you aren’t periodically stepping back to look at your own technical debt—both in your code and in your brain—you’re just waiting for the next unforeseen outage to prove you’ve plateaued.

I’ve spent enough time in the trenches to know that the most dangerous state for an engineer isn’t being “outdated,” it’s being comfortable. Comfort leads to autopilot, and autopilot is how we miss the subtle signals that a system is drifting toward failure. Don’t aim for perfection or try to know everything; that’s a losing battle that leads to burnout. Instead, aim to be the person who understands the underlying mechanics well enough to fix things when they inevitably break. Keep your notes sharp, keep your curiosity practical, and just make sure that when the next 2 AM call comes, you actually know what you’re looking at.

Frequently Asked Questions

How do I find time to actually learn this stuff when my sprint backlog is already overflowing?

You don’t “find” time; you steal it from the things that don’t matter. If your backlog is a constant deluge, you aren’t learning—you’re just surviving. I stopped trying to carve out four-hour blocks for courses. Now, I treat learning like a refactor. If I’m fixing a bug in a legacy service, I spend an extra thirty minutes understanding the underlying pattern instead of just patching the symptom. It’s slow, but it’s sustainable.

If I start getting too good at my current stack, how do I avoid being pigeonholed into doing the same thing for the next five years?

The trap is thinking that being the “expert” in your current stack is job security. It isn’t; it’s a gilded cage. If you’re the only one who knows how the legacy payment gateway works, you aren’t a specialist—you’re a hostage. Start looking for the “adjacent” problems. If you know the backend, start digging into the observability side or how the infrastructure actually deploys. Don’t just master the tool; master the system it lives in.

How much of my "learning" should be theoretical versus actually breaking things in a local environment?

If you’re just reading documentation, you aren’t learning; you’re just collecting trivia. I’ve spent too many hours reading about distributed systems only to realize I didn’t actually understand how they fail until I manually killed a node in my local Docker setup. Aim for a 20/80 split. Spend 20% on the theory to understand the “why,” then spend the other 80% trying to break what you just read. If it doesn’t crash, you haven’t learned it yet.

Is it worth spending time on niche technologies that my current company will never use, just to keep my options open?

It’s a trade-off. If you spend all your time on a niche language that’s only used by one specific startup, you’re building a specialized tool for a job you don’t have. I prefer spending that time on “adjacent” skills. Instead of learning a niche framework, learn the underlying principle—like how a specific distributed consensus algorithm works. That way, when the next big thing hits, you aren’t starting from zero; you’re just applying what you already know.

How to handle a schema change with live traffic.

Changing the Table While People Use It

Posted on October 14, 2026 by Tomasz Wierzbicki

I still remember the specific, hollow sound of a Slack notification at 2:14 AM during my time at that logistics startup. It wasn’t a loud alarm, just that quiet ping that tells you the database has decided to stop cooperating. We had tried to run a simple migration on a massive table, thinking we could just “fix it in production,” and instead, we watched as the entire system locked up. Most tutorials make it sound like a trivial task, but if you don’t actually understand how to handle a schema change with live traffic, you aren’t just running a script—you’re playing Russian roulette with your uptime.

I’m not here to sell you on some expensive, over-engineered orchestration layer or a complex new framework. I’ve spent enough years cleaning up after “perfect” migrations to know that the real solution is usually much more boring and incremental than the hype suggests. In this note, I’m going to walk through the actual patterns I use to roll out changes without locking tables or killing the site, focusing on the trade-offs you’ll actually face when the load is high and the margin for error is zero.

Table of Contents

  • Why Your Migration Failed and How to Fix It
  • Avoiding Database Locks During Migration While Users Are Active
  • My survival checklist for schema changes
  • The Post-Mortem Checklist
  • The Bottom Line
  • Frequently Asked Questions

Why Your Migration Failed and How to Fix It

Why Your Migration Failed and How to Fix It

Most of my mistakes in this area come down to treating a database migration like a single, atomic event. In a local dev environment, running `ALTER TABLE` feels instant. In production, with millions of rows, that same command can trigger a metadata lock that hangs every incoming request, effectively turning your high-availability system into a very expensive brick. I once sat through a two-hour outage at a logistics firm simply because we tried to add a `NOT NULL` constraint to a massive table without a default value, and the database spent the entire time re-writing every single page on disk.

The fix isn’t a better tool; it’s a change in mindset. You have to move away from “one-and-done” scripts and toward the expand and contract pattern. This means you never actually rename or delete a column in a single step. Instead, you add the new column, start a dual writing strategy for schema updates where your application writes to both the old and new locations, and only once you’ve verified the data integrity do you finally drop the old field. It’s more work and more code to maintain temporarily, but it’s the only way to ensure you aren’t the person getting paged at 2 AM because a table lock decided to stay for breakfast.

Avoiding Database Locks During Migration While Users Are Active

Avoiding Database Locks During Migration While Users Are Active

The biggest mistake I see is treating a migration like a single, atomic event. You run one script, it hits a massive table, and suddenly your connection pool is exhausted because every other query is stuck waiting for a metadata lock. To avoid this, you have to stop thinking in terms of “renaming a column” and start thinking in terms of the expand and contract pattern. You don’t change the existing field; you add a new one, let the data flow into both, and only once you’re sure everything is stable do you retire the old one. It feels like more work—and it is—but it’s the only way to ensure you aren’t holding the entire system hostage while a single transaction runs.

When you’re dealing with high-traffic tables, you also need to be wary of how your migration tool handles the actual DDL statements. Even a simple `ALTER TABLE` can trigger a full table rewrite in some engines, which is a death sentence for availability. I’ve found that implementing a dual writing strategy for schema updates at the application level is often safer than relying on the database to do everything at once. You write to the old schema and the new schema simultaneously, slowly backfilling the historical data in small, manageable batches. It keeps the transaction sizes tiny and, more importantly, keeps your CPU usage from spiking into the red while your users are trying to actually use the product.

My survival checklist for schema changes

  • Always write the code for the new column before you actually add it to the database. If the application doesn’t know the column exists yet, it won’t freak out when the database suddenly shows up with a new field.
  • Never, ever use `SELECT *` in your application code. It feels lazy and efficient until you add a column and suddenly your ORM or your data mapper starts throwing errors because the result set doesn’t match what it expected.
  • Treat every migration like it’s going to fail halfway through. I’ve learned that if you don’t have a verified rollback plan—and a way to test that rollback in a staging environment that actually looks like production—you’re just gambling.
  • Run your migrations during the lowest traffic window you can find, but don’t assume that’s enough. A “quiet” period in a logistics startup is still a lot of background jobs running, so monitor your CPU and IOPS like a hawk the moment you hit ‘apply’.
  • Use a multi-phase rollout: add the column, deploy code that writes to both old and new columns, migrate the old data in small batches, and finally, deploy code that only uses the new column. It’s more work, but it’s the difference between a boring Tuesday and a 2 AM incident report.

The Post-Mortem Checklist

Never assume a migration is “safe” just because it worked on your local machine or a small staging environment; if the table has millions of rows, the locking behavior changes entirely.

Always favor additive changes—adding a new column or a new table is almost always safer than trying to rename or delete an existing one while the application is still trying to use it.

If you can’t roll back the schema change without losing data, you haven’t designed a migration; you’ve designed a trap.

The Bottom Line

The Bottom Line: Decouple code and schema.

At the end of the day, handling live schema changes isn’t about finding a magic tool or a perfect framework; it’s about managing the reality of state. You have to move away from the idea of “all-at-once” deployments and embrace a workflow where your application code and your database schema are decoupled. This means writing code that can handle both the old and the new column simultaneously, rolling out changes in small, reversible increments, and—most importantly—testing your migration scripts against a production-sized dataset before you ever touch the live environment. If you don’t plan for the rollback before you hit enter, you aren’t performing a migration; you’re playing Russian roulette with your uptime.

I know it feels like extra overhead. It feels like you’re writing three times the amount of code for a single feature. But I’ve spent enough nights staring at a spinning terminal while a database lock brings a platform to its knees to know that this “extra” work is actually the only work that matters. We don’t build systems just to ship features; we build them to stay running. Write your migrations with the assumption that they will fail, and you’ll eventually reach a point where a failed migration is just a minor telemetry blip rather than a 2 AM emergency call.

Frequently Asked Questions

What happens if the migration succeeds but the application code rollback fails halfway through?

This is the nightmare scenario. You’ve successfully migrated the schema, but the new code is throwing 500s, and your rollback script just hung on a deployment step. Now you’re stuck in a “split-brain” state: the database is living in the future, but your application is stuck in the past.

How do I actually test these migrations against a realistic dataset without just guessing if it'll lock up?

You can’t guess your way out of a production outage. I used to think a local Docker container with a few hundred rows was “testing,” until a migration hit a 50-million-row table and froze everything. Now, I pull a sanitized snapshot of production data into a staging environment that mirrors our actual hardware specs. If the migration takes ten minutes on a subset, it’ll likely crawl on the real thing. Run it, time it, and watch the locks.

At what point do I decide that a migration is taking too long and just pull the plug?

The moment you see your application’s connection pool hitting its limit and latency spiking across the board, you’ve already crossed the line. If the migration is holding locks that are queuing up requests, don’t wait for a total outage to act. I usually set a “kill timer” based on my error rate thresholds. If it’s not moving and the site is slowing down, kill the migration, roll back, and figure out a smaller batch size tomorrow.

Is there a specific way to handle adding a NOT NULL constraint to a massive table that already has millions of rows?

Adding a NOT NULL constraint to a massive table is a classic “trap” because most databases will try to rewrite the entire table to validate the constraint. On a table with millions of rows, that’s a long-running transaction that’ll likely lock your writes and kill your latency.

  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 22
  • 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