<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sanjeev Mohindra on Medium]]></title>
        <description><![CDATA[Stories by Sanjeev Mohindra on Medium]]></description>
        <link>https://medium.com/@sanjeev.mohindra?source=rss-435b54545c37------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4q7MwlL8ITKfW9-w</url>
            <title>Stories by Sanjeev Mohindra on Medium</title>
            <link>https://medium.com/@sanjeev.mohindra?source=rss-435b54545c37------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 18:57:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanjeev.mohindra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Design Patterns Were Always Second Priority. AI Just Removed the Excuse]]></title>
            <link>https://medium.com/@sanjeev.mohindra/design-patterns-were-always-second-priority-ai-just-removed-the-excuse-99e9c272a27f?source=rss-435b54545c37------2</link>
            <guid isPermaLink="false">https://medium.com/p/99e9c272a27f</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <dc:creator><![CDATA[Sanjeev Mohindra]]></dc:creator>
            <pubDate>Sun, 19 Jul 2026 16:40:24 GMT</pubDate>
            <atom:updated>2026-07-19T16:40:24.042Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Illustration of design patterns in AI coding — human and AI hands drafting a software blueprint together" src="https://cdn-images-1.medium.com/max/1024/1*49AsUmr5J4BPBM1AK6RNcg.jpeg" /><figcaption>Image Generated by AI</figcaption></figure><p>I once shipped a payment module with a switch statement that I knew, even while typing it, should have been the Strategy pattern. The refactor would have taken two more days. The deadline would not move. The switch statement won.</p><p>That is not a confession of bad engineering. That is how most software actually gets built. In all my years of writing code around delivery dates, design patterns were the thing we praised in code reviews and quietly cut when the sprint got tight.</p><p>AI coding tools have changed that math completely, and I don’t think enough people have noticed. When the AI does the typing, the pattern no longer costs you two days. It costs you one sentence in a prompt. So let’s talk about why design patterns should move from “nice to have” to first priority — and how to actually make your AI apply them.</p><h3>What Is a Design Pattern, Really?</h3><p><strong>A design pattern</strong> is a named, reusable solution to a recurring software design problem — a proven structure you adapt to your code, not a library you import. Patterns like Strategy, Adapter, and Observer describe how the parts of a system should relate to each other so the code stays easy to change later.</p><p>The Gang of Four catalogued 23 of them back in 1994. Languages have since absorbed a few (nobody hand-writes an Iterator anymore), and architectural patterns like MVC and Repository joined the family. But the purpose never changed: patterns exist so that the next person who touches the code can understand and extend it without breaking something.</p><p>Notice what patterns were never about — making code run faster or getting features out the door sooner. Which is exactly why they kept losing.</p><h3>Why Patterns Always Lost to the Deadline</h3><figure><img alt="Balance scale showing the old trade-off between deadline pressure and clean code structure" src="https://cdn-images-1.medium.com/max/1024/1*9yYNlnJr8hJR7Um5MuCKOA.jpeg" /><figcaption>Image Generated by AI</figcaption></figure><p>Design patterns were never skipped because they stopped working; they were skipped because they cost extra human hours upfront. The pattern paid off months later, in maintenance, while the deadline was due Friday. Any benefit you can only collect next quarter loses to a cost you must pay this week.</p><p>I have watched this play out on team after team. Everyone agrees the abstraction is right. Everyone also agrees the demo is Thursday. So the “temporary” hard-coded version goes in, a TODO comment goes on top, and three years later that TODO is load-bearing.</p><p>Though here’s the thing — we were not wrong to make that trade. Hand-writing a Strategy pattern genuinely takes longer than a switch statement. Extracting an interface, wiring dependency injection, setting up the factory — that is real effort when a human types every line. The economics honestly favored the shortcut.</p><p>Then the economics changed.</p><h3>AI Flipped the Cost Equation</h3><p>When an AI assistant writes the code, the marginal cost of doing it properly drops to almost nothing. The AI types the interface, the three implementations, and the wiring in the same minute it would have typed the switch statement. This means the old excuse — “the clean version takes too long” — is simply gone.</p><p>But there’s a second half to this, and it’s the part that worries me more. AI doesn’t just make good structure cheap. It makes <em>bad</em> structure cheap too, and at a volume no human team could ever produce by hand.</p><p>Left unguided, an AI assistant will happily generate a 400-line function that works. It compiles, the tests pass, the feature demos fine. Six months later nobody — including the AI — can safely modify it. Researchers have started calling this pile-up <a href="https://arxiv.org/abs/2604.13277">comprehension debt</a>: code that runs in production while the understanding of it exists nowhere. When code was expensive to produce, bad structure accumulated slowly. Now it accumulates at generation speed.</p><p>So the situation is asymmetric. The cost of applying patterns collapsed, and the cost of <em>not</em> applying them exploded. In my mind, that settles the priority question.</p><h3>Patterns Are Now a Prompt Language</h3><p>Here’s the part I find genuinely elegant. Design patterns were invented as a shared vocabulary between humans — say “Observer” and a colleague instantly pictures the whole structure. It turns out that vocabulary works on AI models too, and it works brilliantly.</p><p>A pattern name acts as a compressed instruction to an AI coding assistant. The single word “Strategy” in a prompt replaces a full paragraph describing interfaces, implementations, and injection points. The model has seen thousands of well-formed examples of every classic pattern, so naming one steers it toward proven structure instead of whatever shape falls out of token prediction.</p><p>In practice, the difference is dramatic.</p><p>“Add support for PayPal payments” gets you PayPal logic stuffed wherever the credit card logic lives.</p><p>“Refactor payment handling to the Strategy pattern, then add PayPal as a new strategy” gets you an extension point — and every payment method you add after that is a new file, not a bigger diff.</p><p>You spent twenty years building this vocabulary to talk to other developers. Now use it to talk to the machine.</p><h3>How to Make AI Apply Design Patterns When Vibe Coding</h3><figure><img alt="A prompt turning into well-structured software components, showing pattern names as instructions to AI" src="https://cdn-images-1.medium.com/max/1024/1*OQJV3Jfb4WQU8eQZvFThMQ.jpeg" /><figcaption>Image Generated by AI</figcaption></figure><p>Vibe coding — describing what you want conversationally and letting the AI build it — is where structure dies fastest, because nobody is steering. These are the habits that fixed it for me.</p><h3>1. Ask for a design before any code</h3><p>End your feature request with: “Before writing code, propose a design and name the patterns you’ll use.” This one sentence turns the AI from a typist into a design partner, and you get to veto a bad structure before it exists.</p><h3>2. Name the pattern when you know it</h3><p>Don’t describe the shape you want — name it. “Use the Adapter pattern to wrap this API” beats three sentences of structural description, and the output is far more predictable.</p><h3>3. Make the AI justify its structure</h3><p>When it proposes something, ask “why this pattern and not X?” If the justification is weak, you’ve caught a bad design at the cheapest possible moment. I do this even when I agree, because sometimes the answer surprises me.</p><h3>4. Request the refactor you’d never budget for</h3><p>See a switch statement growing its fourth case? Say “refactor this to Strategy” and review the diff. The two-day refactor from my payment-module story is now a five-minute conversation. That still feels a little unreal to me.</p><h3>5. Make the agent iterate on its own design</h3><p>Working code is a draft, not a destination. Once the feature runs, send one more prompt: “Review this implementation — would a design pattern make it simpler or easier to extend? Propose the refactor.” The agent will often spot the emerging Strategy or Adapter it missed on the first pass, and the second iteration costs minutes.</p><p>This is really the old red-green-refactor loop coming back. We always skipped the refactor step because it was the expensive one. Now it’s the cheapest — so put it back in the loop and let the agent run it.</p><h3>6. Review structure first, lines second</h3><p>When reviewing AI output, check the shape before the syntax. Wrong variable name costs a minute. Wrong structure compounds forever.</p><h3>Baking Patterns into Spec-Driven Development</h3><p>Prompting habits are good, but they depend on you remembering. Spec-driven development — where the AI works from a written specification instead of a chat message — lets you make patterns the default rather than a request.</p><p>Two places to encode them. First, your project instruction file (AGENTS.md, CLAUDE.md, or your tool’s equivalent) should state your architectural rules once so every session inherits them: which patterns the project uses, where new integrations go, what needs an interface. I covered how I structure these files in my post on <a href="https://www.metablogue.com/ai-coding-ground-rules/">AI coding ground rules</a>, and the architecture section has quietly become the most valuable part of mine.</p><p>Second, make the spec itself carry the design. Every spec should define <strong>component boundaries and communication contracts</strong> — which component owns which responsibility, and how they talk to each other: the interfaces, the events, the data shapes crossing each boundary.</p><p>This is the raw material for pattern thinking, because most patterns simply <em>are</em> boundary structure. Adapter, Facade, Strategy, Observer — each one describes how two parts of a system should communicate. Hand the AI explicit boundaries and contracts, and it can reason its way to the right pattern instead of guessing at one.</p><p>Though there’s a gap here I nearly missed. Boundaries and contracts steer structural and behavioral patterns nicely, because both describe how parts talk. They say nothing about how those parts come to exist — the territory of creational patterns. And this is the one area where I would not trust the AI’s defaults, because object creation is cross-cutting: leave it unguided and new calls (or worse, Singletons — AI loves a Singleton) quietly spread through every file the agent touches.</p><p>So give the spec a third input: <strong>lifecycle and ownership rules</strong>. State the lifetimes (what lives for the whole application, what’s per-request, what’s throwaway), who is allowed to construct what, and where the wiring happens — your composition root or DI container.</p><p>With those constraints written down, the selection itself is safe to delegate. Whether the agent reaches for a Factory Method, a Builder, or plain constructor injection is a choice it can make — and justify — inside rules you set. The constraints are yours; the mechanism is negotiable.</p><p>Then add a mandatory <strong>Design Approach</strong> section on top — the patterns to apply, the extension points to preserve. A spec that only lists behavior (“the system shall export reports as PDF”) licenses the AI to bolt PDF logic anywhere. One that adds “export formats follow the existing Strategy pattern; register a new PdfExporter” produces code that belongs to the architecture instead of leaning against it.</p><p>The principle running through all of this is the same: never leave structure to chance. Behavior is what the software does; structure is whether you can change what it does. Specs have always been good at the first and silent on the second — and with AI, silence is a decision.</p><h3>One Honest Caveat: Don’t Let the AI Over-Pattern</h3><figure><img alt="Over-engineered layered abstraction next to a simple solid design, illustrating pattern overuse" src="https://cdn-images-1.medium.com/max/1024/1*3IKVPbHlzskV5G0Awg5xGg.jpeg" /><figcaption>Image Generated by AI</figcaption></figure><p>I need to flag the opposite failure, because AI commits it eagerly. Ask for “proper design patterns” with no context and you may receive an AbstractFactoryProviderManager for a feature with one implementation. AI models can be pattern-happy the way junior developers fresh off the GoF book are pattern-happy.</p><p>The fix is the same discipline as before, pointed the other way. Patterns earn their place by solving a problem you actually have — a second implementation, a genuine need to decouple. When the AI proposes an abstraction, ask what concrete problem it solves. “Flexibility we might need later” is not an answer; that’s speculation with extra files.</p><p>So the goal was never “more patterns.” It’s <em>deliberate structure</em> — chosen by you, produced by the AI.</p><h3>Patterns First Is Finally Affordable</h3><p>For most of my career, design patterns were the right answer we couldn’t afford. The deadline always outranked the abstraction, and honestly, the trade often made sense. AI has ended that era: good structure now costs a sentence, while unstructured code piles up faster than anyone can comprehend it.</p><p>The developers who thrive with AI won’t be the fastest prompters. They’ll be the ones who know which structure to ask for — and never leave it to chance.</p><p>Next time you’re about to accept working-but-shapeless AI code, try one sentence first: “Propose a design and name the patterns.” You’ll rarely go back.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99e9c272a27f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Run My Blog Like a Software Team — Sprints, Backlogs, and All]]></title>
            <link>https://medium.com/@sanjeev.mohindra/i-run-my-blog-like-a-software-team-sprints-backlogs-and-all-93dfee5d0d17?source=rss-435b54545c37------2</link>
            <guid isPermaLink="false">https://medium.com/p/93dfee5d0d17</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[kanban]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[blogging]]></category>
            <dc:creator><![CDATA[Sanjeev Mohindra]]></dc:creator>
            <pubDate>Sun, 12 Jul 2026 05:52:57 GMT</pubDate>
            <atom:updated>2026-07-12T05:52:57.854Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>I Run My Blog Like a Software Team — Sprints, Backlogs, and All</strong></h3><p>At one point I counted eleven unfinished drafts sitting in my blog’s admin panel. Eleven. Each one started with genuine excitement, and each one abandoned the moment a newer, shinier idea showed up.</p><p>My problem was never writing. In ten-plus years of blogging around a day job, I’ve never run out of things to say. My problem was that nothing had a system pushing it toward <em>*done*</em>.</p><figure><img alt="A solo blogger using a Kanban board to manage blog posts like a software team" src="https://cdn-images-1.medium.com/max/1024/1*hWJKZxYrJKndWNzGFhLnOw.jpeg" /><figcaption>Image generated by AI</figcaption></figure><p>Here’s the ironic part. My day job is software development. I spend my working hours inside sprints, backlogs, and standups — the exact machinery that ships messy, half-finished software projects every single day. And one evening, staring at draft number eleven, the obvious question finally landed: if this system gets unfinished code out the door at work, why am I not running my blog on it?</p><p>So I did. Here’s what I brought home from the office, what failed spectacularly, and the one rule that finally fixed my publishing.</p><h3>Naturally, I started with Scrum. It lasted two weeks.</h3><p>Scrum is what I already knew. It’s how my team at work operates: commit to a fixed batch of work — a sprint — over two weeks, then review and repeat. I’ve watched it work for years, so porting it to the blog felt less like an experiment and more like a formality.</p><p>My first sprint: three posts, planned and committed. Then a rough fortnight at work happened, my kid’s school schedule happened, life happened. I shipped one post out of three.</p><p>And here’s the part I should have seen coming. At work, a missed sprint triggers a retro — we sit down, find the blocker, rebalance the load across the team. I’ve been in dozens of those meetings. As a solo blogger, a missed sprint triggers something worse: that quiet “maybe I’m just not consistent enough” voice. There’s no team to absorb the slack and nobody to rebalance with. The system designed to make me productive was manufacturing guilt instead.</p><p>That was the humbling lesson for someone who does this professionally: <strong>Scrum doesn’t work because of the sprints. It works because of the team around them.</strong> Strip away the shared capacity and the ceremonies, and a sprint is just a deadline with extra steps. I didn’t fail the sprint. I’d ported the ritual and left behind the thing that makes it function.</p><h3>The answer was on the other side of the office</h3><p>The fix turned out to be something I’d walked past at work for years. Our support and maintenance folks never run sprints — their work arrives unpredictably, so they run Kanban instead. Unpredictable incoming work, done by whoever has capacity. Sound familiar? That’s a solo blogger’s life, described exactly.</p><p><strong>Kanban is a workflow method where tasks move through visual columns, and you cap how many can be in progress at once.</strong> There are no sprints, no deadlines, and no commitments to a batch of work. You simply pull the next item when you genuinely have capacity.</p><p>That last sentence is the whole difference. Scrum asks, “What will you finish by Friday?” Kanban asks, “What’s the one thing you can move forward right now?”</p><p>For someone whose writing time arrives in unpredictable pockets — a free evening here, a quiet Sunday there — the second question is the only honest one. Both methods grew out of the same movement (the <a href="https://agilemanifesto.org/">Agile Manifesto</a>, written in 2001 by developers fed up with big plans that collapsed on contact with reality). But they make very different assumptions about your calendar.</p><h3>My board, column by column</h3><p>I run the whole blog on one free Trello board. Five columns, left to right:</p><ul><li><strong>Ideas</strong> — every raw idea gets dumped here, no filtering</li><li><strong>Next</strong> — the two or three ideas I’ve validated and would genuinely write</li><li><strong>Writing</strong> — actively drafting. This column has a hard cap</li><li><strong>Polish</strong> — draft done, needs editing and a final pass</li><li><strong>Live</strong> — published</li></ul><p>Every post is a card. Cards only move left to right, and I glance at the board before every writing session instead of asking myself the vague, dangerous question “what should I work on?”</p><p>The board itself isn’t the magic, though. One rule is.</p><h3>The one rule doing all the work: the WIP limit</h3><p><strong>A WIP limit is a hard cap on how many pieces of work you allow “in progress” at the same time.</strong> It works because unfinished work costs you attention even when you’re not touching it, and every open draft quietly taxes the others. For a solo blogger, that means fewer open drafts directly translates into more published posts.</p><p>My cap is two. Never more than two cards in the Writing column. When both slots are full and a brilliant new idea strikes, that idea goes to the Ideas column — not into a fresh draft.</p><p>I won’t pretend this felt natural. The first month, watching exciting ideas sit in a queue felt almost physically wrong. But those eleven abandoned drafts existed precisely because I’d always honoured the exciting new thing over the half-done old thing. The cap removed that choice, and removing the choice is what made it work.</p><h3>Scrum vs Kanban for a solo blogger</h3><p>If you’re deciding where to start, here’s the honest comparison from someone who ran both:</p><p>ScrumKanban<strong>Work rhythm</strong>Fixed sprints (1–2 weeks)Continuous flow<strong>Commitment</strong>Batch of posts by a dateOne post at a time<strong>When life interferes</strong>Sprint “fails”Flow just slows<strong>Overhead</strong>Planning + review each sprintAlmost none<strong>Best for</strong>Teams, predictable schedulesSolo creators, day jobs</p><p>I kept exactly one habit from Scrum: a short review. Every couple of weeks I look at the board and ask what moved, what’s stuck, and why. Ten minutes, no ceremony. Purists would call this hybrid “Scrumban.” I call it Kanban with a conscience.</p><h3>What actually changed</h3><figure><img alt="Kanban board for solo bloggers showing posts flowing to a full published column" src="https://cdn-images-1.medium.com/max/1024/1*EqOE_wwWRocuhEwrKQx-Nw.jpeg" /><figcaption>Image generated by AI</figcaption></figure><p>Three months in, the numbers told the story. In the quarter before the board, I published four posts. In the quarter after, eleven — same job, same family, same available hours.</p><p>Nothing about my writing speed changed. What changed is that finishing became the default path instead of the uphill one. The board decides what I work on, the cap decides when I can start something new, and my energy goes into writing instead of deciding.</p><p>One honest caveat: a Kanban board only works if you keep it truthful. A stale board is worse than none, because it hands you a comforting picture of progress that isn’t happening. The board is a mirror, not a decoration.</p><h3>Steal this today</h3><p>If you want to try it, resist the urge to build something elaborate. Here’s the entire setup:</p><ol><li>Open a free Trello or Notion board — or use sticky notes on a wall.</li><li>Create five columns: Ideas, Next, Writing, Polish, Live.</li><li>Dump every idea and half-draft you have into Ideas. Yes, all eleven.</li><li>Move your two most promising pieces into Writing. That’s your cap.</li><li>Don’t start anything new until one of those two ships.</li></ol><p>That’s it. No app purchase, no methodology course, no certification.</p><p>Bloggers don’t usually have a writing problem. We have a finishing problem — and finishing is exactly the problem my profession has spent twenty years learning to solve. It just took me eleven abandoned drafts to think of bringing the answer home. Your drafts folder will thank you for skipping that part.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93dfee5d0d17" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>