<?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 Gaurang on Medium]]></title>
        <description><![CDATA[Stories by Gaurang on Medium]]></description>
        <link>https://medium.com/@gaurang.learn?source=rss-c3b6fb983c43------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*8RJQysp2OyzyvvU3</url>
            <title>Stories by Gaurang on Medium</title>
            <link>https://medium.com/@gaurang.learn?source=rss-c3b6fb983c43------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:23:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gaurang.learn/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[Free PDF toolkit that does all its work on your own device.]]></title>
            <link>https://medium.com/@gaurang.learn/free-pdf-toolkit-that-does-all-its-work-on-your-own-device-833f4163a72b?source=rss-c3b6fb983c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/833f4163a72b</guid>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Gaurang]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 12:14:24 GMT</pubDate>
            <atom:updated>2026-09-27T12:14:24.641Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Free PDF toolkit that does all its work on your own device. Here’s why, and how you can check that it does.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R5rplZbPbb8kVYTwy6wRDA.png" /></figure><p>Here’s a week of perfectly ordinary paperwork:</p><ul><li>Merge three statements for a visa application.</li><li>Compress a scanned doc so it fits under a 2 MB upload limit.</li><li>Take a password off a doc before sending it to your accountant.</li><li>Sign a agreement.</li></ul><p>For most people, each of those means searching “merge PDF free”, clicking the first result, and dropping some of their most sensitive documents onto a stranger’s server.</p><p>Those sites mostly say the same thing: <em>“Files are deleted after one hour.”</em> That may well be true. <strong>But you can’t check it.</strong> Once the file has been uploaded, whatever happens to it next is a matter of trust.</p><p>So I built something where the file never gets uploaded in the first place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqR2Vn4A820IB0Tj1SIumg.png" /></figure><p><a href="https://dokwise.in/"><strong>Dokwise</strong></a> is a free set of 16 document tools that run <strong>entirely inside your web browser</strong>:</p><ul><li><strong>Merge, split and organize</strong> PDFs: reorder, rotate, delete or crop pages</li><li><strong>Compress</strong> PDFs and images</li><li><strong>Convert</strong> images, including iPhone HEIC photos, and Word ↔ PDF</li><li><strong>OCR</strong>: turn a scanned PDF into one you can search and copy text from</li><li><strong>Protect</strong> a PDF with a password (AES-256), or <strong>remove</strong> a password you already know</li><li><strong>Remove metadata</strong> such as the hidden author, software and dates stored inside a PDF</li><li><strong>Compare</strong> two versions of a PDF and see what changed, redline-style</li><li><strong>Repair</strong> a PDF that won’t open</li><li><strong>Scan to PDF</strong> with your phone or laptop camera</li><li><strong>Signature</strong>: turn a photo of your signature into a clean transparent image</li></ul><p>No sign-up, no email, no watermark, no “upgrade to Pro”. Add it to your home screen and it <strong>keeps working with Wi-Fi switched off</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oMzczhPX2hgyL4ru5k9V8A.png" /></figure><h3>“Runs in your browser”. What does that actually mean?</h3><p>When you use a typical online PDF tool, three things happen:</p><ol><li>Your file travels over the internet to the company’s computer.</li><li>Their computer does the work.</li><li>The result travels back to you.</li></ol><p>With Dokwise, <strong>step 1 and step 3 don’t happen.</strong> Your laptop or phone is plenty powerful enough to merge a PDF, so the website hands your browser the instructions and your browser does the work locally. The file stays on your device the whole time.</p><p>Here’s a simple way to think about it. A typical tool is like <strong>mailing your documents to a print shop</strong>. Dokwise is like <strong>the print shop mailing you the photocopier</strong>.</p><h3>Don’t take my word for it</h3><p>Privacy promises are cheap, so I wanted this one to be <em>checkable</em>.</p><p><strong>Test 1: turn off the internet.</strong> Load <a href="https://dokwise.in/">dokwise.in</a> once, switch on airplane mode, and merge or compress a PDF. It still works. A tool that needed to upload your file couldn’t.</p><p><strong>Test 2: watch the traffic.</strong> On a computer, open your browser’s developer tools (F12), go to the <strong>Network</strong> tab and run any tool. You’ll see a lot of activity inside the page and <strong>no upload of your file</strong>.</p><p>There’s also a technical safety net. Dokwise tells the browser, through a security setting called a <em>Content-Security-Policy</em>, which outside addresses the page is ever allowed to contact. Anything not on that list is blocked by the browser itself, even if some piece of code tried. The only outside service on the list is Google Analytics, which counts anonymous page visits. <strong>It never sees your files or their names.</strong> That’s all spelled out on the <a href="https://dokwise.in/privacy">privacy page</a>.</p><h3>A few things I said no to</h3><p>Being private means turning down some features.</p><p><strong>No AI “chat with your PDF”, for now.</strong> Adding it would be easy: send your document to an AI company’s servers and show the answer. But then “your files never leave your device” would only be true <em>except when it isn’t</em>. An AI feature will ship only once it can run fully on your own device.</p><p><strong>No features that only look like they work.</strong> I tried adding “PDF/A” export, the archival format some government portals ask for. My test files claimed to be PDF/A but were missing a required part, so a real validator would have rejected them. I left the feature out rather than hand you a file that would fail at the worst possible moment.</p><p><strong>No bloat.</strong> Dokwise sticks to document tools: no invoice generators and no whiteboards. Just the ones people actually need, done properly.</p><h3>Try it</h3><p>Next time you’re about to upload a bank statement to a site you found thirty seconds ago, try <a href="https://dokwise.in/"><strong>dokwise.in</strong></a> instead.</p><p>If something doesn’t work, or there’s a tool you wish it had, leave a comment. I read every one.</p><p><em>Dokwise is built and maintained by one developer. It’s free, there’s no account, and your files stay on your device.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=833f4163a72b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment Strategies: Blue-Green, Canary & Rolling — discoveringCode]]></title>
            <link>https://medium.com/@gaurang.learn/deployment-strategies-blue-green-canary-rolling-discoveringcode-447b3f42eb2a?source=rss-c3b6fb983c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/447b3f42eb2a</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Gaurang]]></dc:creator>
            <pubDate>Sun, 27 Sep 2026 07:09:09 GMT</pubDate>
            <atom:updated>2026-09-27T07:09:09.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*vNBih621lnugXxAL.png" /></figure><p>“Deploy the new version, replace the old one, hope nothing breaks” is a real deployment strategy — it’s just the riskiest one. Stop all the old instances, start the new ones, and if the new version has a bug, every single user hits it, all at once, the moment the switch happens. Blue-green, canary, and rolling deploys are three different, more deliberate answers to the same question: how do you ship a change without a bad one taking down every user at once?</p><pre>BLUE (live, v1) GREEN (idle, v2 deployed &amp; tested) ████████████ ░░░░░░░░░░░░ all traffic ──────────────▶ switch instantly, all at once ████████████ ░░░░░░░░░░░░ (now idle) Rollback = flip the switch back. Both environments exist the whole time. v1: ████████████████████░░ 95% v2: ██ 5% ← small slice of real traffic first ↓ watch error rate / latency on that slice v1: ████████████░░░░░░░░░░ 50% v2: ████████████░░░░░░░░░░ 50% ← ramp up gradually if it looks healthy v2: ████████████████████████ 100% [v1][v1][v1][v1] → [v2][v1][v1][v1] → [v2][v2][v1][v1] → [v2][v2][v2][v2] instances replaced a few at a time - never a single full second environment</pre><h3>Going deeper</h3><p><strong>The three strategies trade off cost, blast radius, and rollback speed differently, and none of them is a strictly better version of another:</strong></p><p>StrategyInfra cost while deployingBlast radius if brokenRollback speed</p><pre>Blue-Green<br>  BLUE (live, v1)     GREEN (idle, v2 deployed &amp; tested)<br>  ████████████         ░░░░░░░░░░░░<br>        all traffic ──────────────▶ switch instantly, all at once<br>                      ████████████         ░░░░░░░░░░░░ (now idle)<br>  Rollback = flip the switch back. Both environments exist the whole time.<br><br>Canary<br>  v1: ████████████████████░░  95%<br>  v2: ██  5%                       ← small slice of real traffic first<br>       ↓ watch error rate / latency on that slice<br>  v1: ████████████░░░░░░░░░░  50%<br>  v2: ████████████░░░░░░░░░░  50%  ← ramp up gradually if it looks healthy<br>       ↓<br>  v1: ░░  0%<br>  v2: ████████████████████████ 100%<br><br>Rolling<br>  [v1][v1][v1][v1]  →  [v2][v1][v1][v1]  →  [v2][v2][v1][v1]  →  [v2][v2][v2][v2]<br>  instances replaced a few at a time — never a single full second environment</pre><p><strong>Blue-green’s whole value is that rollback is a routing change, not a redeploy.</strong> “Blue” is the live environment; “green” is a full second copy running the new version, fully deployed and smoke-tested <em>before</em> it receives any real traffic. Cutting over is typically a load-balancer or DNS change — seconds, not minutes — and if something’s wrong, flipping back is exactly as fast. The cost is real, though: for the period both environments exist, you’re paying for and running double the infrastructure, which matters more for a large, expensive fleet than for a handful of small instances.</p><p><strong>Canary deploys accept a more gradual blast radius in exchange for catching problems with real production traffic before it’s everyone’s problem.</strong> Rather than an all-or-nothing switch, a small percentage of live traffic (1%, 5%) gets routed to the new version while the rest keeps hitting the old one. If error rates, latency, or business metrics on that slice look healthy, traffic ramps up in stages; if they don’t, traffic shifts back with only a small fraction of users ever having been exposed. This catches an entire category of bug that passes CI cleanly but only shows up under real production load, data, or traffic patterns — the kind of problem no test suite reliably reproduces.</p><p><strong>Rolling deploys are the pragmatic middle ground most teams actually run by default, especially under an orchestrator.</strong> Instead of a second full environment, instances update a few at a time — take one out, deploy the new version to it, health-check it, put it back, repeat. No doubled infrastructure cost, which is exactly what makes it the default strategy in Kubernetes (a later topic in this pillar covers the mechanics). The trade-off is real, though: during the rollout, old and new versions are serving traffic <em>simultaneously</em>, which means both versions need to be compatible with the same downstream systems (most pressingly, the database schema — a complication flagged again, and solved in depth, in this pillar’s later applied topics). And there’s no single instant “flip the switch back” the way blue-green offers — undoing a bad rolling deploy means rolling the same gradual process in reverse.</p><p><strong>None of these strategies is “the right one” in the abstract — the right choice depends on what a team is optimizing for.</strong> A team running lean and cost-sensitive, comfortable with a somewhat slower rollback, often defaults to rolling deploys. A team shipping something where an instant, guaranteed rollback matters more than infrastructure cost (a payments system, a high-traffic launch) leans toward blue-green. A team shipping a genuinely risky or hard-to-test change often reaches for canary specifically <em>because</em> it limits exposure while still testing against real traffic. Many real systems mix these — canary the release first, then roll it out the rest of the way — rather than treating them as three mutually exclusive options.</p><p><em>Originally published at </em><a href="https://discoveringcode.in/notebook/deployment-strategies-blue-green-canary-rolling/"><em>https://discoveringcode.in</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=447b3f42eb2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“How Many Servers Do We Need?” — Back-of-the-Envelope Estimation for System Design]]></title>
            <link>https://medium.com/@gaurang.learn/how-many-servers-do-we-need-back-of-the-envelope-estimation-for-system-design-501aa827ef5e?source=rss-c3b6fb983c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/501aa827ef5e</guid>
            <category><![CDATA[creer]]></category>
            <category><![CDATA[systems-designer]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Gaurang]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 05:08:53 GMT</pubDate>
            <atom:updated>2026-09-20T05:08:53.185Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*z2AwWzh3IPCo5elc.png" /></figure><p>“How many servers do we need?” sounds like a question that needs a research project to answer. It doesn’t — it needs five minutes of napkin math. Back-of-the-envelope estimation is the habit of turning vague requirements (“we’ll have a lot of users”) into concrete numbers (queries per second, gigabytes of storage, megabits of bandwidth) before you design anything, because every real decision downstream — one database or many, a cache or not, which scaling strategy — depends on roughly knowing the size of the problem first.</p><p>The point is never precision. Nobody expects an exact server count from a five-minute calculation. The point is the right <em>order of magnitude</em> — knowing whether you’re building for 100 requests a second or 100,000 completely changes the architecture, and that distinction is visible from rough math alone.</p><pre>A link-sharing app, 10 million daily active users<br><br>users posting a link:        1% of DAU post per day  = 100,000 posts/day<br>average post size:           ~1 KB (link + metadata)<br>daily write volume:          100,000 × 1KB            = ~100 MB/day<br>write QPS (spread evenly):   100,000 / 86,400 sec      ≈ 1.2 writes/sec<br>                                                          (but real traffic<br>                                                           isn&#39;t even — peak<br>                                                           is often 3-5x avg)<br>peak write QPS:               ~1.2 × 4                 ≈ 5 writes/sec<br><br>reads (10:1 read:write ratio, typical for social content):<br>peak read QPS:                 5 × 10                  ≈ 50 reads/sec<br><br>storage for 5 years of posts: 100 MB/day × 365 × 5     ≈ 180 GB<br>                                                          (comfortably fits<br>                                                          on one database)</pre><p>Fifty reads a second and a couple hundred gigabytes of data is a completely different design conversation than fifty <em>thousand</em> reads a second and a couple hundred <em>terabytes</em> — and that difference took one minute of multiplication to surface.</p><h3>Going deeper</h3><p><strong>A handful of reference numbers make this fast, and they’re worth actually memorizing.</strong> A single reasonably-sized application server can typically handle somewhere from a few hundred to a few thousand requests per second, depending heavily on what each request does — simple reads land higher, requests that hit a database or do real computation land lower. A relational database on solid hardware handles thousands of simple queries per second. A network round trip within the same data center costs roughly 0.5–1ms; a round trip across the country or across an ocean costs 50–150ms. None of these need to be exact — knowing “a server handles low thousands of req/sec, not millions” is enough to sanity check any estimate you produce.</p><p><strong>Work in the right units, and convert only at the end.</strong> Traffic is usually easiest to reason about in requests per day (from a DAU number) and then converted to requests per second by dividing by 86,400 (seconds in a day) — but daily active users don’t spread their activity evenly across 24 hours. Real traffic has a peak-to-average ratio, commonly somewhere around 2–5x during a system’s busiest hour, and any capacity plan built only on the <em>average</em> QPS will fall over during the actual peak, which is precisely when it matters most.</p><p><strong>Storage math almost always dominates in surprising ways.</strong> A feature that feels “small” per item — a 280-character post, a single log line — adds up fast at scale: a million events a day, each 1KB, is a gigabyte a day, 365GB a year, without a single image or video involved. This is usually the number that first forces a “do we need object storage for this” or “do we need to shard this table” conversation, well before raw request volume does.</p><p><strong>Round aggressively, and don’t be afraid of clean numbers.</strong> 10 million users, not 9.7 million. 1KB per post, not 847 bytes. The entire value of this exercise is speed and directional correctness — spending ten minutes getting a number precise to three significant figures defeats the purpose, when the actual decision (one database vs. many, cache or no cache) only cares whether you’re closer to a hundred, a hundred thousand, or a hundred million.</p><p><strong>This estimate becomes the shared vocabulary for every trade-off later in this pillar.</strong> “Do we need to shard the database” is unanswerable in the abstract, but very answerable once you know you’re expecting 50,000 writes/sec against a single table. “Do we need a CDN” is unanswerable in the abstract, but obvious once you know 80% of your users are outside the region your one server lives in. Estimation isn’t a standalone skill — it’s the input every later architectural decision in this pillar actually runs on.</p><p><em>Originally published at </em><a href="https://discoveringcode.in/notebook/back-of-the-envelope-estimation/"><em>https://discoveringcode.in</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=501aa827ef5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What an LLM Actually Is (and Isn’t) — discoveringCode]]></title>
            <link>https://medium.com/@gaurang.learn/what-an-llm-actually-is-and-isnt-discoveringcode-79df86f83f2d?source=rss-c3b6fb983c43------2</link>
            <guid isPermaLink="false">https://medium.com/p/79df86f83f2d</guid>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Gaurang]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 06:49:04 GMT</pubDate>
            <atom:updated>2026-09-19T06:49:04.080Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*7f1V_tVFfICoivCb.png" /></figure><p>This pillar picks up where the site’s other five leave off: not building the servers and databases underneath an app, but building <em>on top of</em> a large language model — an AI product that prompts one, retrieves data for it, hands it tools, and has to actually work in production. None of that will make sense if the model itself stays a black box, so this is where the pillar starts.</p><p><strong>Here’s the one sentence that explains almost everything else in this pillar:</strong> a large language model is a function that takes in some text and outputs a probability distribution over what token is most likely to come <em>next</em>. That’s it. It doesn’t “know” that Paris is the capital of France the way a database row knows it — it has seen so much text where “The capital of France is” is followed by “Paris” that “Paris” gets an overwhelmingly high probability in that position. Ask it something its training data genuinely didn’t cover well, and it still has to output <em>something</em> with high probability — which is the actual mechanism behind hallucination, covered in depth a few topics from now.</p><h3>Next-token prediction, made concrete</h3><p>Feed the model a sequence of tokens (words and word-pieces — the next topic covers exactly how text gets chopped into them). The model outputs a probability for <em>every</em> token in its vocabulary being the next one. A sampling step picks one — sometimes always the highest-probability token, sometimes a controlled amount of randomness (that’s what the temperature parameter, covered two topics from now, actually controls) - appends it to the sequence, and the whole thing runs again to predict the token after <em>that</em>. One token at a time, until the model predicts a special &quot;stop&quot; token or hits a length limit.</p><p>Run that and notice something important: nothing in this function <em>checks</em> an answer against reality. Both correct outputs above came from the identical process — “what token has the highest probability given everything before it” — as any hallucinated one would. The model has no separate “is this true” step. That’s not a bug this pillar will teach you to patch; it’s the architecture, and working around its consequences (grounding answers in retrieved data, structuring output, evaluating what comes out) is most of what the rest of this pillar actually covers.</p><h3>What this rules out</h3><p><strong>No understanding, no reasoning “before” answering, in the way those words imply for a person.</strong> The model isn’t silently forming an opinion and then describing it — the text <em>is</em> the computation. This is also why techniques like chain-of-thought prompting (Track C) work at all: forcing the model to generate intermediate reasoning tokens genuinely changes what gets predicted next, because each new token becomes part of what the <em>next</em> prediction conditions on.</p><p><strong>No live knowledge of anything after its training cutoff, and no access to your data, by default.</strong> Ask a base model what today’s date is, or what’s in your company’s internal wiki, and it can’t know — there’s no built-in connection to the present or to your systems. Closing that gap is the entire premise of retrieval (Track B) and tool calling (Track C/D): give the model access to real, current information instead of asking it to predict facts it was never trained on.</p><p><strong>No persistent memory between separate API calls.</strong> Every request is stateless — the model has no idea a previous conversation happened unless that conversation’s text is included again in the current prompt. “Remembering” a conversation is really “re-sending the whole conversation so far,” which is exactly why context windows (next-but-one topic) become a hard, practical constraint the moment a conversation runs long.</p><p>Keep this mental model — text in, next-token probabilities out, sampled and repeated — in mind for everything that follows. Tokenization, context windows, hallucination, prompting techniques, and even why agents can go stuck in a loop all trace back to this one mechanism.</p><p><em>Originally published at </em><a href="https://discoveringcode.in/notebook/what-is-an-llm/"><em>https://discoveringcode.in</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79df86f83f2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>