<?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"><channel><title><![CDATA[Software engineering in AI age]]></title><description><![CDATA[Software engineering in AI age]]></description><link>https://prepd.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Nov 2026 10:09:46 GMT</lastBuildDate><atom:link href="https://prepd.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Review and Push Back on AI-Generated Code and System Designs]]></title><description><![CDATA[AI assistants now write a large share of first drafts: functions, tests, even whole architecture proposals. That changes what makes an engineer valuable…]]></description><link>https://prepd.hashnode.dev/how-to-review-and-push-back-on-ai-generated-code-and-system-designs</link><guid isPermaLink="true">https://prepd.hashnode.dev/how-to-review-and-push-back-on-ai-generated-code-and-system-designs</guid><category><![CDATA[AI]]></category><category><![CDATA[code review]]></category><category><![CDATA[System Design]]></category><dc:creator><![CDATA[Amitabh]]></dc:creator><pubDate>Sun, 08 Nov 2026 13:02:18 GMT</pubDate><content:encoded><![CDATA[<p>AI assistants now write a large share of first drafts: functions, tests, even whole architecture proposals. That changes what makes an engineer valuable. Producing code is cheap. <strong>Knowing when the AI's answer is wrong, and saying so clearly, is the skill teams and interviewers are looking for.</strong></p>
<p>It shows up in two places:</p>
<ul>
<li><strong>AI-assisted interview rounds.</strong> You get a codebase and an assistant. Accepting its first suggestion without checking is one of the most common ways to fail, because the round is designed to see whether you review its output.</li>
<li><strong>Everyday work.</strong> Design reviews and code reviews increasingly start from an AI draft. The engineer who can say "this won't hold under load, here's why" is the one whose judgement gets trusted.</li>
</ul>
<p>This guide gives you a checklist for both, the words to use when you push back, and two worked examples.</p>
<h2>Why AI output needs a reviewer</h2>
<p>Assistants are good at producing something that <em>looks</em> right. They are weaker at the parts that need context they don't have:</p>
<ul>
<li><strong>Your real constraints.</strong> Traffic, budget, team size and existing systems are rarely in the prompt, so the answer is generic.</li>
<li><strong>Edge cases.</strong> Empty inputs, boundaries, concurrent calls and failures are where generated code most often breaks.</li>
<li><strong>Trade-offs.</strong> An assistant will happily recommend a queue, a cache and five microservices without saying what each one costs.</li>
<li><strong>Confidence.</strong> Wrong answers come in the same confident tone as right ones, including calls to library functions that don't exist.</li>
</ul>
<p>None of this means "don't use AI". It means the human in the loop is doing the senior part of the job.</p>
<h2>Checklist: reviewing AI-generated code</h2>
<p>Run through these before you accept a suggestion:</p>
<ol>
<li><strong>Does it solve the stated problem?</strong> Re-read the task, then the code. Assistants often solve a nearby, easier problem.</li>
<li><strong>Boundaries.</strong> What happens at 0, 1, the maximum, an empty list, a null, a duplicate? Off-by-one errors are the classic miss.</li>
<li><strong>Concurrency.</strong> Is shared state read and written without a lock or atomic operation? Two requests at once is the test case it didn't consider.</li>
<li><strong>Failure paths.</strong> What if the network call times out, the file is missing or the database rejects the write? Is the error swallowed?</li>
<li><strong>Does every API exist?</strong> Check unfamiliar methods and parameters against the docs. Invented functions compile in the AI's head, not in yours.</li>
<li><strong>Security.</strong> String-built SQL, unescaped user input, secrets in code, missing permission checks.</li>
<li><strong>Tests.</strong> Run them. If the AI wrote the tests too, check they assert the right thing and would actually fail on the bug you're worried about.</li>
<li><strong>Can you explain it?</strong> If you can't walk an interviewer or a teammate through it line by line, you haven't reviewed it.</li>
</ol>
<h2>Checklist: reviewing an AI-suggested system design</h2>
<p>When an assistant proposes an architecture, ask:</p>
<ol>
<li><strong>Which requirement does each component serve?</strong> Any box you can't tie to a requirement is a cost with no benefit.</li>
<li><strong>Where are the numbers?</strong> A design without rough traffic and storage estimates can't justify sharding, caching or a queue. Do a 2-minute estimate and see what survives.</li>
<li><strong>What's the consistency story?</strong> Is it fine for this data to be stale for a few seconds (likes, feeds) or not (payments, inventory)? Generic designs rarely say.</li>
<li><strong>What's the single point of failure?</strong> Load balancer, primary database, a single queue broker, one region.</li>
<li><strong>What happens under the hot case?</strong> A celebrity post, a flash sale, a viral link. Averages hide hot keys.</li>
<li><strong>What does it cost to run and operate?</strong> Five services and a streaming platform for a few hundred writes a second is a maintenance bill, not a scalability win.</li>
<li><strong>What's the simplest version that works?</strong> Start there, then add complexity only where a number or a requirement forces it.</li>
</ol>
<h2>How to push back without sounding difficult</h2>
<p>The goal is to be specific, not contrarian. Name the risk, give the reason, offer an alternative:</p>
<ul>
<li>"This works for the happy path. What happens if two requests update the same counter at once? I'd use an atomic increment here."</li>
<li>"Before we add Kafka, let's check the numbers: about 50 writes a second fits in one database with room to spare. I'd start with a simple table and a background job."</li>
<li>"This cache makes reads fast, but the price can be stale for up to an hour. For checkout I'd read from the database and cache only the product page."</li>
<li>"I don't think <code>retryWithBackoff</code> exists in this client. Let me check the docs before we rely on it."</li>
</ul>
<p>In an interview, saying this out loud is exactly the signal: you used the assistant, and you stayed in charge.</p>
<h2>Worked example 1: a rate limiter the AI got almost right</h2>
<p>You ask for a token bucket rate limiter. The assistant returns clean code that refills tokens on every request based on elapsed time. Review it with the checklist:</p>
<ul>
<li><strong>Boundaries:</strong> it refills <em>before</em> checking the cap, so after a long idle period the bucket briefly holds more tokens than its capacity and allows a burst. Clamp after refilling.</li>
<li><strong>Concurrency:</strong> the read-modify-write of the token count isn't atomic, so two simultaneous requests can both take the last token. Use a lock, or an atomic operation in the shared store.</li>
<li><strong>Units:</strong> elapsed time is in milliseconds, the refill rate is per second. A factor of 1,000 hides in one line.</li>
</ul>
<p>Three real bugs in code that looked finished. That's the review an interviewer wants to watch.</p>
<h2>Worked example 2: an over-built design</h2>
<p>Prompt: "Design the backend for a small team's internal polling app." The assistant proposes microservices for users, polls and votes, Kafka between them, Redis, and a NoSQL store.</p>
<p>Push back with numbers: a few hundred users, a few thousand votes a day, which is well under one write a second. One service and one relational database handle that easily, and a unique constraint on (poll, user) prevents double voting more reliably than any of the proposed parts. Keep the design simple and say what would make you add each component later (for example, a cache only if read latency becomes a problem).</p>
<h2>How to practise</h2>
<ol>
<li><strong>Build the scaling intuition.</strong> Know what each common step fixes and what it breaks: load balancer, read replicas, cache. That's what lets you spot an over-built or under-built design quickly.</li>
<li><strong>Practise reviewing, not just writing.</strong> Take generated code and hunt for the bugs on purpose: boundaries, concurrency, units, failure paths.</li>
<li><strong>Say your reasoning out loud.</strong> Pushing back is a communication skill as much as a technical one.</li>
</ol>
<h2>Practise it</h2>
<ul>
<li><a href="https://prepd.tech/learning/single-to-multi-server">What each scaling step fixes and breaks</a>: a free, animated learning path, so you can spot over-built and under-built designs.</li>
<li><a href="https://prepd.tech/ai-coding/exercises">AI-Assisted Coding drills</a>: AI-written code with planted bugs to find and fix, with written feedback.</li>
<li><a href="https://prepd.tech/system-design/exercises/like-button-1">Free system design drill: Design a Like Button</a>, with feedback on your trade-offs.</li>
</ul>
<p><em>Originally published at <a href="https://prepd.tech/guides/reviewing-ai-generated-code-and-designs">prepd.tech</a>. Disclosure: I'm building Prepd.</em></p>
]]></content:encoded></item><item><title><![CDATA[From One Server to Many: What Each Scaling Step Fixes, and What It Breaks]]></title><description><![CDATA[Most system design answers jump straight to the final architecture. Interviewers are more interested in the path: what broke at each stage, which change…]]></description><link>https://prepd.hashnode.dev/from-one-server-to-many-what-each-scaling-step-fixes-and-what-it-breaks</link><guid isPermaLink="true">https://prepd.hashnode.dev/from-one-server-to-many-what-each-scaling-step-fixes-and-what-it-breaks</guid><category><![CDATA[System Design]]></category><category><![CDATA[interview]]></category><category><![CDATA[distributed systems]]></category><dc:creator><![CDATA[Amitabh]]></dc:creator><pubDate>Sun, 08 Nov 2026 12:47:14 GMT</pubDate><content:encoded><![CDATA[<p>Most system design answers jump straight to the final architecture. Interviewers are more interested in the path: what broke at each stage, which change fixed it, and what that change made harder. Here is that path for the most common starting point, scaling a web app from one server to many.</p>
<h2>1. One server</h2>
<p>Web server, application code and database on one machine. DNS points your domain at its IP. It's the right design for a launch: simple to deploy and simple to reason about.</p>
<p><strong>What breaks:</strong> everything is a single point of failure, and the only way to grow is a bigger machine. When the database and the web server compete for the same CPU and memory, both get slower.</p>
<h2>2. Add a load balancer and more app servers</h2>
<p>Users now connect to a load balancer, which forwards each request to one of several identical app servers and skips any that fail health checks. You can grow by adding servers instead of buying a bigger one.</p>
<p><strong>What it fixes:</strong> app-server failures and app-server capacity.</p>
<p><strong>What it breaks:</strong> the load balancer is now a single point of failure, so in a real design you run more than one. Servers must be stateless, so sessions move out of memory. And the choice of algorithm matters: round robin ignores how busy each server is, so long requests can pile up on one box.</p>
<h2>3. Split the database: one primary, read replicas</h2>
<p>All writes go to the primary database. Copies of it, the replicas, serve reads. Most products read far more than they write, so this multiplies the read capacity.</p>
<p><strong>What it fixes:</strong> read throughput.</p>
<p><strong>What it breaks:</strong> replication is usually asynchronous, so a replica can be slightly behind. A user who updates their profile and immediately reloads it may see the old value. The common fix is to read your own recent writes from the primary. Replicas also do nothing for a write-heavy workload; that needs partitioning.</p>
<h2>4. Add a cache</h2>
<p>Expensive results, such as a product page or a feed, are stored in memory and served from there instead of hitting the database every time.</p>
<p><strong>What it fixes:</strong> latency and database load for repeated reads.</p>
<p><strong>What it breaks:</strong> you now have a second copy of the data that can be stale, empty after a restart, or overwhelmed when a popular key expires and every request misses at once. You need an invalidation plan, sensible expiry times and protection against stampedes.</p>
<h2>How to use this in an interview</h2>
<p>Don't draw step 4 first. Say what the current design can't handle, make one change, and name the new problem it introduces before moving on. That sequence, problem then change then trade-off, is what separates a senior answer from a list of components.</p>
<h2>See it step by step</h2>
<p>I put this path into an animated learning section on <a href="https://prepd.tech/learning/single-to-multi-server">Prepd</a>: each concept is a diagram you step through, showing where requests go as you add the load balancer, the replicas and the cache, with key points and interview questions for each. This first topic is free to read, no sign-up needed.</p>
<p><em>Disclosure: I'm building Prepd.</em></p>
]]></content:encoded></item><item><title><![CDATA[Why I kept failing system design interviews even after reading Alex Xu — and what actually fixed it]]></title><description><![CDATA[I want to tell you something nobody told me before my system design interviews. I spent three months preparing. Read Alex Xu's book cover to cover. Watched…]]></description><link>https://prepd.hashnode.dev/why-i-kept-failing-system-design-interviews-even-after-reading-alex-xu-and-what-actually-fixed-it</link><guid isPermaLink="true">https://prepd.hashnode.dev/why-i-kept-failing-system-design-interviews-even-after-reading-alex-xu-and-what-actually-fixed-it</guid><dc:creator><![CDATA[Amitabh]]></dc:creator><pubDate>Wed, 08 Apr 2026 15:21:52 GMT</pubDate><content:encoded><![CDATA[<p>I want to tell you something nobody told me before my system design interviews.</p>
<p>I spent three months preparing. Read Alex Xu's book cover to cover. Watched every Gaurav Sen video. Studied consistent hashing, CAP theorem, database sharding, cache invalidation strategies, load balancing — all of it.</p>
<p>I walked into my first FAANG system design round feeling ready.</p>
<p>I failed it.</p>
<p>Then I failed the second one.</p>
<p>Not because I didn't know the material. I knew it well. The problem was something nobody had warned me about — and something almost no prep resource is actually built to fix.</p>
<hr />
<h2>The gap nobody talks about</h2>
<p>There's a massive difference between <strong>knowing</strong> system design concepts and <strong>performing</strong> them in a real interview.</p>
<p>In an actual system design interview, you don't just recite what you know. You have to:</p>
<ul>
<li><p>Explain your reasoning out loud while someone watches you think</p>
</li>
<li><p>Make architectural decisions under time pressure</p>
</li>
<li><p>Defend your choices when the interviewer pushes back</p>
</li>
<li><p>Respond to follow-up questions you didn't prepare for — in real time</p>
</li>
</ul>
<p>That last one is what kills most candidates.</p>
<p>You can explain what eventual consistency is. But can you answer this on the spot:</p>
<blockquote>
<p><em>"You chose eventual consistency for your social feed. A user just posted a photo and refreshed their feed — they can't see it. Your PM is escalating. How do you handle this without sacrificing availability?"</em></p>
</blockquote>
<p>Or this:</p>
<blockquote>
<p><em>"Your Redis cache is handling 800k writes per second. You're seeing hot key contention on trending content. What's your mitigation strategy and what are the tradeoffs?"</em></p>
</blockquote>
<p>These aren't trick questions. They're the normal follow-ups that every senior interviewer asks. And if you've only ever studied concepts passively — reading, watching, highlighting — your brain freezes when they come.</p>
<p>I know because mine did. Twice.</p>
<hr />
<h2>Why passive prep doesn't work for system design</h2>
<p>Think about how you actually prepared.</p>
<p>You read a book. You watched a video. Maybe you drew some architecture diagrams on paper. You felt like you understood the material — because you did understand it, in a passive sense.</p>
<p>But understanding something while reading about it is completely different from explaining it under pressure while someone probes every decision you make.</p>
<p>This is why athletes don't just watch game footage. Musicians don't just listen to recordings. You have to perform the skill repeatedly, under conditions that mimic the real thing, to build the muscle memory that holds up when the pressure is on.</p>
<p>System design interviews are no different. And yet almost every prep resource treats it like a knowledge problem instead of a performance problem.</p>
<hr />
<h2>What actually works: reps under simulated pressure</h2>
<p>After my second failed loop, I stopped studying and started practicing differently.</p>
<p>The only thing that moved the needle was doing actual interview simulations — getting a real scenario, articulating my approach out loud, and then having someone push back with follow-up questions until I could defend every decision.</p>
<p>The problem: real mock interviews with experienced engineers cost ₹5,000–₹12,000 per session on platforms like Interviewing.io. And your friends can only do so many mock interviews before they run out of patience.</p>
<p>So I built something to fill this gap.</p>
<hr />
<h2>What I built: Prepd</h2>
<p><a href="https://prepd.tech"><strong>Prepd</strong></a> is an AI-powered interview simulator built specifically for system design practice.</p>
<p>Here's how it works:</p>
<ol>
<li><p>You pick a scenario — URL shortener, rate limiter, distributed cache, real-time chat, LLM chatbot at scale, and more</p>
</li>
<li><p>You write out your approach — components, databases, scaling strategy, tradeoffs</p>
</li>
<li><p>The AI interviewer follows up — with real probing questions based on what you said</p>
</li>
<li><p>You respond and defend your decisions</p>
</li>
<li><p>You get a score (0–100) and detailed feedback on your strengths and gaps</p>
</li>
</ol>
<p>The follow-up questions are the entire point. Anyone can give you a scenario. Prepd gives you the conversation — the back-and-forth that actually trains your brain to perform under pressure, not just recall information.</p>
<p><strong>Three tracks:</strong></p>
<p>→ <strong>System Design (HLD)</strong> — distributed systems, caching strategies, database sharding, load balancing, CAP theorem, scalability patterns</p>
<p>→ <strong>Low Level Design (LLD)</strong> — object-oriented design, SOLID principles, design patterns (Singleton, Strategy, Observer), concurrency, entity modeling</p>
<p>→ <strong>AI Systems Design</strong> — RAG architectures, LLM deployment, vector databases, real-time ML inference, model serving — this is now a real interview category at senior roles and almost nothing else covers it</p>
<p><strong>Two modes:</strong></p>
<p>→ <strong>Learning mode</strong> (15–30 min) — low pressure, daily practice, ideal for building fundamentals</p>
<p>→ <strong>Interview simulation</strong> (45–60 min) — timed, full pressure, mimics the real thing</p>
<p>There's also a <strong>BYOQ feature</strong> (Bring Your Own Question) — paste any question from your actual interviews or Glassdoor and practice it with a full AI interviewer.</p>
<hr />
<h2>What a session actually looks like</h2>
<p>Here's a real example from a session on the platform:</p>
<p><strong>Scenario:</strong> Your API is receiving 2 million read requests per second. Database latency is 50ms. Design an architecture to handle this load.</p>
<p><strong>You explain:</strong> Multi-tier caching with Redis, CDN for static assets, read replicas for database scaling, connection pooling...</p>
<p><strong>AI follow-up:</strong> <em>"Good. Now your Redis cluster is showing uneven load distribution — some nodes are getting 10x the traffic of others. What's causing this and how do you fix it?"</em></p>
<p><strong>You respond:</strong> Hot key problem — certain keys (trending content, popular users) are getting disproportionate traffic. Solutions: local in-memory caching at the application layer, key sharding by adding a random suffix, consistent hashing...</p>
<p><strong>AI follow-up:</strong> <em>"If you add a random suffix to hot keys, how do you handle cache invalidation when that content is updated?"</em></p>
<p>This is the conversation that teaches you. Not the initial answer — the follow-ups.</p>
<hr />
<h2>Who this is built for</h2>
<ul>
<li><p>Software engineers with 2–6 years experience preparing for senior roles</p>
</li>
<li><p>Anyone interviewing at FAANG or FAANG-adjacent companies</p>
</li>
<li><p>Engineers who've failed system design rounds despite "knowing" the material</p>
</li>
<li><p>ML engineers preparing for AI systems design rounds</p>
</li>
<li><p>Anyone who wants to go from passive knowledge to active performance</p>
</li>
</ul>
<hr />
<h2>Try it</h2>
<p><a href="https://prepd.tech"><strong>prepd.tech</strong></a> — free to explore, $18/mo for full access.</p>
<p>If you're preparing for a system design interview in the next 30–90 days, one session will show you exactly where your thinking breaks down. That's more valuable than another week of reading.</p>
<hr />
<p>If this resonated — or if you've been through the same experience — drop a comment below. What's the hardest system design follow-up question you've ever faced in a real interview?</p>
]]></content:encoded></item></channel></rss>