Write Code That's Easy to Delete: The Art of Impermanent…
    Neura MarketNeura Market/Midjourney
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityMidjourneyMidjourney
    DeepSeekDeepSeekCoPilotCoPilotStable DiffusionStable Diffusion
    View All Directories
    OverviewPromptsBlogVideosGuidesCoursesCommunityStylesTrending
    MidjourneyBlogWrite Code That's Easy to Delete: The Art of Impermanent Software
    Back to Blog
    Write Code That's Easy to Delete: The Art of Impermanent Software
    programming

    Write Code That's Easy to Delete: The Art of Impermanent Software

    Adam - The Developer May 2, 2026
    0 views

    We obsess over making code last. Maybe we should obsess over making it leave gracefully. There's...

    We obsess over making code last. Maybe we should obsess over making it leave gracefully.


    There's a quote that's been living rent-free in my head for years:

    "Write code that is easy to delete, not easy to extend." — Tef, programming is terrible

    The first time I read it, I pushed back. Isn't the whole point to write code that survives? That scales? That you can build on top of?

    Then I spent a weekend trying to rip out a logging library from a three-year-old codebase. It had quietly spread into 40 files. Removing it felt like surgery on a patient who had grown bones around a sponge.


    The Lie We Tell Ourselves

    When we write code, we tell ourselves a flattering story: this will be here in five years, so I should make it robust, reusable, and extensible.

    But the data doesn't support this story. Most features get changed within months. Many get cut entirely. The average production codebase has entire directories that haven't been touched in years — not because they're perfect, but because everyone is too afraid to delete them.

    We write code as if it's load-bearing. Usually, it isn't.

    The irony is that the more we try to make code "permanent" — wrapping it in abstractions, coupling it into shared utilities, weaving it through the system, the harder it becomes to change. We've traded adaptability for the illusion of durability.


    What "Easy to Delete" Actually Means

    It doesn't mean write throwaway code. It doesn't mean skip tests or ignore structure.

    It means: design for reversibility.

    When you write a feature, ask yourself: if this needed to go away tomorrow, what would that look like?

    If the answer is "a 400-line PR touching 20 files," something went wrong at the design stage — not the deletion stage.

    Easy-to-delete code tends to share a few traits:

    1. It lives in one place

    Duplication gets a bad reputation. The DRY principle is good advice, but taken to its extreme, it creates code that's deeply entangled. When the same function is reused in eight different contexts, you can't change it for one context without worrying about all the others.

    Sometimes, a little duplication is the price of independence. Two modules that both have a formatDate function can each evolve or disappear without consequences.

    2. It has a clear boundary

    The hardest code to delete is the code that has leaked everywhere. The database client that got imported into UI components. The config object that got passed twelve layers deep. The utility function that became load-bearing infrastructure.

    Boundaries are what make deletion safe. An isolated module, a clean interface, a service behind a well-defined API... these are things you can remove, replace, or rewrite without holding or thinking through your breath.

    3. It doesn't know too much

    Code that's easy to delete tends to be ignorant but in the best way. It doesn't know about the rest of the system. It takes inputs, does its job, returns outputs. It doesn't reach out and grab global state. It doesn't mutate things it didn't create.

    Ignorant code is also testable code, which is no coincidence ( I actually didn't wanna add this part for some personal reasons )

    4. It's hidden behind a seam

    Feature flags. Adapter layers. Interface abstractions. These aren't just engineering formalism — they're deletion handles. A feature behind a flag can be switched off in seconds. Code behind an interface can be swapped without the callers noticing.

    The strangler fig pattern exists precisely for this reason: wrap the old thing, build the new thing alongside it, then delete the old thing once it's isolated. The seam is what makes that possible.


    A Different Way to Think About Abstraction

    We often reach for abstraction to avoid repetition. But the best reason to abstract something is to isolate it or to give it a name and a box so that you can change or remove it without touching everything else.

    Think about logging. You could scatter console.log calls everywhere. That's easy to write and immediately painful to change. Or you could route all logging through a single logger module. Now if you want to swap logging libraries, or add context, or silence it entirely — you only touch one file. ONE.

    The abstraction isn't there because logging is complex. It's there because logging is a thing that might change or disappear, and you want that to be painless.

    Abstract at the seams, not in the middle.


    Deletability as a Code Review Lens

    Here's something I've started doing in code review: asking not just "does this work?" but "what would it take to remove this?"

    It reframes things in a useful way.

    A PR that adds a new feature and touches 15 files is a warning sign — not necessarily because it's wrong, but because it's announcing a high cost of future change. A PR that adds the same feature through a single, well-bounded module is leaving a cleaner footprint.

    You can extend this to architecture decisions. Before adding a new dependency, ask: "what does removing this look like in two years?" Some dependencies are fine because they're small, stable, or isolated. Others are like introducing an invasive species. They grow into everything and become impossible to root out.


    Impermanence Is Not Defeatism

    There's a Zen concept sometimes translated as impermanence — the idea that things arise, exist for a time, and pass away. This isn't pessimism. It's just an accurate description of how things work.

    Software is the same. Features come and go. Products pivot. Requirements change. The code you're writing today will be partially or wholly replaced. That's not failure — that's how living software works.

    Writing for impermanence means accepting this, and designing accordingly. It means your goal isn't to write code that can never be removed. It's to write code whose removal is cheap.

    The engineers who built systems that are still running 30 years later didn't achieve that by making the code impossible to touch. They achieved it by writing code that was easy to reason about, easy to isolate, and when the time came, it's easy to replace piece by piece.


    In Practice: A Checklist

    Before you commit something, it's worth a quick gut-check:

    • Could I delete this feature with a single PR? If not, why not?
    • How many files does this touch? More isn't always worse, but it should feel intentional.
    • Is this module aware of things it shouldn't be? Imports, globals, side effects.
    • If this dependency disappeared tomorrow, how bad would it be? Could you swap it in an afternoon?
    • Is this abstraction making things easier to change, or just avoiding repetition?

    None of this means paralysis. You don't need to design every microservice like it might vanish. But developing an instinct for deletion cost with the same way you develop an instinct for performance or readability, it'll quietly make your codebases healthier.


    The Code You Don't Have to Write

    There's a final point worth making: the easiest code to delete is the code you never write.

    Every feature is a liability. Every abstraction is a maintenance surface. Every dependency is a relationship you're now in. The code that doesn't exist has no bugs, no coupling, no deletion cost.

    This doesn't mean build nothing. It means be deliberate. When you feel the urge to add a new layer of abstraction, to generalize something that's only been used once, to build for a use case that might never arrive... pause.

    Maybe the right move is to wait. To write the minimal thing. To leave room for deletion.

    Because software that can change easily is software that can survive. And the secret to changeability isn't clever architecture or brilliant abstractions.

    It's knowing that what you built today can be gracefully taken apart tomorrow.

    Tags

    programmingwebdevproductivityarchitecture

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest Midjourney prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for Midjourney and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this Midjourney resource

    • Create Animated Stories Using GP-4.0-mini, Midjourney, Kling, and Creatomate APIn8n · $24.99 · Related topic
    • Automate Software Documentation Queries with Context7 and Google Geminin8n · $14.99 · Related topic
    • Automate Midjourney Image Creation and Upscaling via Telegramn8n · $14.99 · Related topic
    • Automate Graphic Wallpaper Creation with Midjourney and Canvas APIsn8n · $9.99 · Related topic
    Browse all workflows