<?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 Arya on Medium]]></title>
        <description><![CDATA[Stories by Arya on Medium]]></description>
        <link>https://medium.com/@arvita-writes?source=rss-3eb95d2ded0d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bzOV-zaDMMANDeVNIn9OCg.png</url>
            <title>Stories by Arya on Medium</title>
            <link>https://medium.com/@arvita-writes?source=rss-3eb95d2ded0d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 05:57:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arvita-writes/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[Why Cookies Are Slowly Disappearing]]></title>
            <link>https://arvita-writes.medium.com/why-cookies-are-slowly-disappearing-246c48b7a887?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/246c48b7a887</guid>
            <category><![CDATA[http-cookie]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[browsers]]></category>
            <category><![CDATA[cookies]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 09:43:31 GMT</pubDate>
            <atom:updated>2026-07-16T09:43:31.937Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uV3TUMCr4_-nptc6ljRJew.png" /></figure><h4>The Story Behind Third-Party Cookies, Privacy Sandbox, and the Future of Web Tracking</h4><p>If you’ve been browsing the web over the last few months, you may have noticed websites asking you to “Accept Cookies” more often than ever.</p><p>Some browsers proudly advertise:</p><blockquote><em>“We block third-party cookies.”</em></blockquote><p>Others talk about something called the <strong>Privacy Sandbox</strong>. <br>And suddenly, developers everywhere are discussing a “cookieless future.”<br>But here’s the interesting part…</p><p><strong>Cookies aren’t actually disappearing.</strong></p><p>Only a certain kind of cookie is. Let’s understand why.</p><h3>Every Website Remembers You Somehow</h3><p>Imagine opening Amazon. <br>You log in.<br>You add a laptop to your cart.<br>Close the browser.<br>Come back tomorrow.<br>The laptop is still there.<br>How?</p><p>Did Amazon memorize your computer?<br>Not exactly.</p><p>It remembered <strong>you</strong> using a tiny piece of data called a <strong>cookie</strong>.<br>A cookie is simply a small text file stored by your browser.<br>It usually contains information like:</p><ul><li>A session ID</li><li>Your login state</li><li>Language preference</li><li>Theme preference</li><li>Shopping cart identifier</li></ul><p>Cookies don’t usually store your password or personal information directly.<br>Instead, they store a unique identifier that helps the website recognize you.</p><p>Without cookies, you’d probably have to log in again every time you refreshed the page.</p><h3>Cookies Aren’t the Villain</h3><p>In fact, cookies make the web much more convenient.</p><p>They help websites:</p><ul><li>Keep you logged in</li><li>Remember your shopping cart</li><li>Save your language preference</li><li>Store dark mode settings</li><li>Remember your location</li><li>Maintain your session while browsing</li></ul><p>Without them, today’s web would feel frustrating.<br>So why are browsers trying to get rid of them?<br>Because of <strong>third-party cookies</strong>.</p><h3>First-Party vs Third-Party Cookies</h3><p>This is where things become interesting. <br>Suppose you visit:</p><pre>https://newsworld.com</pre><p>The website stores a cookie. <br>Later, when you revisit the same site, your browser sends that cookie back.</p><p>This is called a <strong>first-party cookie</strong>.<br>The website you visited stores data for itself. Simple!</p><p>Now imagine the page also loads advertisements from:</p><pre>ads.example.com</pre><p>That advertising network can also store its own cookie.<br>You then visit:</p><ul><li>shoppingworld.com</li><li>sportsdaily.com</li><li>cookingblog.com</li></ul><p>Each of those websites loads advertisements from the same ad network.</p><p>Since the browser keeps sending the same cookie to the advertising company, it can recognize you across completely different websites.</p><p>This is called a <strong>third-party cookie</strong>.</p><p>The websites may be different. But the tracking company is the same.</p><h3>The Invisible Tracker</h3><p>Let’s see what actually happens.</p><p>You open:</p><pre>travelblog.com</pre><p>The page loads.</p><p>Along with the content, it also loads:</p><ul><li>Ads</li><li>Analytics</li><li>Social media widgets</li><li>Tracking pixels</li></ul><p>Many of these belong to completely different companies. <br>Those companies quietly place cookies inside your browser.</p><p>Later you visit:</p><pre>shopping.com</pre><p>The same advertising company appears again.</p><p>It already knows:</p><ul><li>Which travel destinations you searched</li><li>Which products you viewed yesterday</li><li>Which articles you read</li><li>Which ads you clicked</li></ul><p>That’s why after searching for running shoes once, it suddenly feels like every website knows you want to buy running shoes.</p><p>It’s not magic. It’s tracking!</p><h3>Why Browsers Finally Said “Enough”</h3><p>Over the years, people became increasingly uncomfortable with being tracked everywhere.</p><p>Governments also stepped in. Regulations like:</p><ul><li>GDPR (Europe)</li><li>CCPA (California)</li></ul><p>required websites to become much more transparent about data collection.</p><p>At the same time, browsers started competing on privacy. <br>Safari blocked most third-party cookies years ago. <br>Firefox followed.</p><p>Other privacy-focused browsers went even further. The message became clear:</p><blockquote><em>Users should not be silently tracked across the entire internet.</em></blockquote><h3>But Doesn’t Advertising Need Cookies?</h3><p>Yes.</p><p>And that’s exactly why replacing third-party cookies is so difficult. <br>Online advertising funds a huge portion of the internet. <br>News websites.<br>Blogs.<br>Video platforms.<br>Forums.<br>Free tools.</p><p>Removing third-party cookies overnight would break many advertising systems. Instead of simply removing them, browser vendors started looking for privacy-preserving alternatives.</p><p>This led to one of the biggest changes in modern web standards.</p><h3>Enter Privacy Sandbox</h3><p>Google introduced the <strong>Privacy Sandbox</strong> as a collection of technologies designed to reduce cross-site tracking while still supporting useful web experiences.</p><p>The idea is simple.</p><p>Instead of letting advertisers track individuals across websites, the browser performs more of the work locally and exposes only limited, privacy-preserving information.</p><p>Rather than sharing your entire browsing history, websites receive only the minimum information needed for specific tasks.</p><p>The goal is to balance two competing needs:</p><ul><li>Protect user privacy.</li><li>Keep the web economically sustainable.</li></ul><p>It’s not a perfect solution, but it’s an attempt to move beyond unrestricted third-party tracking.</p><h3>What About CHIPS?</h3><p>One interesting addition is <strong>CHIPS</strong>, which stands for <strong>Cookies Having Independent Partitioned State</strong>.</p><p>Imagine a customer support chat widget embedded on hundreds of websites. <br>Previously, it might have used the same third-party cookie everywhere.<br>With CHIPS, that cookie is <strong>partitioned</strong>.</p><p>The chat service still works, but the cookie is isolated for each top-level website instead of being shared across unrelated sites.</p><p>The result?</p><p>Useful embedded services can continue functioning without enabling broad cross-site tracking.</p><h3>And What Is FedCM?</h3><p>Logging in with Google, Microsoft, or GitHub has traditionally relied on mechanisms that could be affected by the decline of third-party cookies.</p><p>To address this, browsers introduced <strong>FedCM (Federated Credential Management)</strong>.</p><p>Instead of exposing identity information through cross-site tracking techniques, browsers now provide a dedicated API for secure federated sign-in.</p><p>For users, the experience feels familiar.<br>For developers, it offers a more privacy-conscious approach to social login.</p><h3>What Changes for Developers?</h3><p>The shift away from third-party cookies means developers need to rethink several aspects of web applications.</p><p>Some common changes include:</p><ul><li>Relying more on first-party data.</li><li>Using privacy-friendly analytics.</li><li>Adopting modern authentication APIs like FedCM.</li><li>Avoiding assumptions that users can be tracked across websites.</li><li>Designing applications with privacy as a core requirement instead of an afterthought.</li></ul><p>Privacy is becoming part of system design, not just legal compliance.</p><h3>Are Cookies Going Away Completely?</h3><p>No. <br>This is probably the biggest misconception.</p><p><strong>First-party cookies are here to stay.</strong></p><p>They’re essential for:</p><ul><li>Authentication</li><li>Shopping carts</li><li>User preferences</li><li>Sessions</li><li>Personalization within a website</li></ul><p>The biggest change is the gradual disappearance of <strong>third-party tracking cookies</strong>.</p><p>In other words:</p><p>Your bank can still remember that you’ve logged in.<br>A shopping website can still remember your cart.</p><p>But an unrelated advertising network shouldn’t automatically know every website you’ve visited.</p><p>That’s the direction modern browsers are moving toward.</p><h3>Looking Ahead</h3><p>The web has changed dramatically over the last three decades.</p><p>At one point, unrestricted tracking became the norm because it powered advertising and personalization.</p><p>Today, expectations are different. <br>Users want more control over their data.<br>Governments demand stronger privacy protections.<br>Browsers are redesigning long-standing web technologies to reflect those expectations.</p><p>The future of the web isn’t cookie-free.</p><p>It’s <strong>privacy-first!</strong></p><p>And understanding that distinction helps explain one of the biggest shifts happening in modern web development today.</p><h3>Final Thoughts</h3><p>For years, cookies quietly worked behind the scenes, keeping us logged in, remembering our preferences, and making the web feel seamless. The problem was never cookies themselves; it was how third-party cookies evolved into a powerful mechanism for tracking users across the internet.</p><p>As browsers, regulators, and developers rethink the balance between personalization and privacy, we’re entering a new era where user trust becomes just as important as user experience.</p><p>The next time you see a “This website uses cookies” banner, you’ll know there’s a much bigger story behind that tiny piece of data than most people realize.</p><p><strong>The web isn’t forgetting you. It’s simply learning to respect your privacy a little more!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=246c48b7a887" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTTP QUERY: The Missing Piece Between GET and POST]]></title>
            <link>https://arvita-writes.medium.com/http-query-the-missing-piece-between-get-and-post-af2c3a847d5b?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/af2c3a847d5b</guid>
            <category><![CDATA[http-methods]]></category>
            <category><![CDATA[query]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[http-request]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Sat, 04 Jul 2026 04:31:03 GMT</pubDate>
            <atom:updated>2026-07-04T04:31:03.610Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lu-9nq3g7wY8zznFqnsksw.png" /></figure><p>When you first learn HTTP, the methods seem pretty straightforward.</p><ul><li><strong>GET</strong> retrieves data.</li><li><strong>POST</strong> creates data.</li><li><strong>PUT</strong> updates data.</li><li><strong>DELETE</strong> removes data.</li></ul><p>For years, these methods have powered almost every API on the internet. <br>But there has always been one awkward problem…</p><p><strong>How do you perform a complex search?</strong></p><p>Surprisingly, HTTP never had a perfect answer. <br>That is finally changing with the introduction of the new <strong>QUERY</strong> HTTP method.</p><p>Let’s understand why it was needed and what problem it solves.</p><h3>A Simple Search Is Easy</h3><p>Suppose you’re building an e-commerce application. <br>A user wants to see all laptops.<br>A GET request works perfectly.</p><pre>GET /products?category=laptop</pre><p>Now the user adds a few more filters.</p><ul><li>Brand = Dell</li><li>RAM = 16 GB</li><li>SSD = 512 GB</li><li>Price between ₹70,000 and ₹1,20,000</li><li>Sort by price</li><li>Page 3</li></ul><p>The request becomes:</p><pre>GET /products?category=laptop&amp;brand=Dell&amp;ram=16&amp;ssd=512&amp;minPrice=70000&amp;maxPrice=120000&amp;sort=price&amp;page=3</pre><p>Still manageable.</p><h3>Then Reality Hits..</h3><p>Real-world applications rarely stop at five filters. <br>Think about searching employees inside a company.<br>You may want to filter by:</p><ul><li>Department</li><li>Experience</li><li>Skills</li><li>Salary range</li><li>Location</li><li>Employment type</li><li>Manager</li><li>Joining date</li><li>Certifications</li><li>Availability</li></ul><p>Or imagine searching documents using AI. <br>Instead of simple filters, you might send:</p><ul><li>Natural language queries</li><li>Semantic search parameters</li><li>Embedding options</li><li>Ranking preferences</li><li>Similarity thresholds</li></ul><p>Trying to squeeze all of this into a URL quickly becomes difficult. <br>Some URLs become hundreds or even thousands of characters long.<br>Some browsers, proxies, and servers also impose URL length limits.</p><p>Clearly, GET starts showing its limitations.</p><h3>So Why Not Just Use POST?</h3><p>This is what most developers have been doing for years.</p><p>Instead of sending everything in the URL, they send the search criteria in the request body.</p><pre>POST /products/search<br>Content-Type: application/json</pre><pre>{<br>    &quot;category&quot;: &quot;Laptop&quot;,<br>    &quot;brand&quot;: &quot;Dell&quot;,<br>    &quot;price&quot;: {<br>        &quot;min&quot;: 70000,<br>        &quot;max&quot;: 120000<br>    }<br>}</pre><p>It works. <br>In fact, countless APIs use this approach today. But there is one problem.</p><p><strong>POST is meant for creating or processing resources.</strong></p><p>A search operation doesn’t create anything. <br>It simply returns matching results.</p><p>Using POST for searches has always been more of a workaround than a perfect fit.</p><h3>Why Not Send a Body with GET?</h3><p>This question naturally comes up. <br>Why couldn’t HTTP simply allow this?</p><pre>GET /products</pre><pre>{<br>    &quot;brand&quot;: &quot;Dell&quot;<br>}</pre><p>Although the HTTP specification doesn’t explicitly forbid a body on GET requests, it never defined what such a body should mean.</p><p>Because of that:</p><ul><li>Many HTTP clients don’t send GET request bodies.</li><li>Many servers ignore them.</li><li>Some proxies remove them.</li><li>Cache implementations behave inconsistently.</li></ul><p>In other words, relying on GET with a request body isn’t portable or reliable.</p><h3>Enter HTTP QUERY</h3><p>To solve this long-standing gap, the HTTP Working Group introduced a new method called <strong>QUERY</strong>.</p><p>Think of it as:</p><blockquote><em>A request that behaves like GET but accepts a request body like POST.</em></blockquote><p>For example:</p><pre>QUERY /products<br>Content-Type: application/json</pre><pre>{<br>    &quot;category&quot;: &quot;Laptop&quot;,<br>    &quot;brand&quot;: &quot;Dell&quot;,<br>    &quot;price&quot;: {<br>        &quot;min&quot;: 70000,<br>        &quot;max&quot;: 120000<br>    },<br>    &quot;sort&quot;: &quot;price&quot;<br>}</pre><p>The intent is immediately clear. <br>You’re not creating anything.<br>You’re simply querying the resource.</p><h4>Why QUERY Is Better</h4><p>The new method provides several advantages.</p><h4>Readable Requests</h4><p>Large JSON payloads are much easier to understand than extremely long URLs.</p><h4>Complex Filtering</h4><p>Nested objects, arrays, logical conditions, and advanced search parameters fit naturally into a request body.</p><h4>Correct HTTP Semantics</h4><p>GET is for simple retrieval. <br>POST is for creating or processing.<br>QUERY clearly represents a read-only query.</p><h3>AI-Friendly APIs</h3><p>Modern applications increasingly use semantic search, vector search, and natural-language queries.</p><p>These requests often contain rich JSON structures that are difficult to express in query parameters.</p><p>QUERY is designed with these use cases in mind.</p><h3>Is QUERY Safe?</h3><p>Yes. <br>Like GET, QUERY is intended to be a <strong>safe</strong> method!</p><p>That means it should <strong>not</strong> modify server-side data. <br>Running the same QUERY request multiple times should simply return matching results, assuming the underlying data hasn’t changed.</p><h3>Where Could You Use QUERY?</h3><p>The method is useful in many scenarios.</p><ul><li>Product search</li><li>Employee directories</li><li>Document management systems</li><li>AI-powered semantic search</li><li>Log analytics</li><li>Business reporting dashboards</li><li>Healthcare record searches</li><li>Financial reporting</li><li>Data analytics platforms</li></ul><p>Anywhere users perform complex read-only searches, QUERY can be a good fit.</p><h3>Is Everyone Using It Today?</h3><p>Not yet.</p><p>Although QUERY has now been standardized, it is still very new. <br>Most frameworks, API gateways, reverse proxies, and HTTP clients are only beginning to add support.</p><p>As a result, many APIs will continue using endpoints like:</p><pre>POST /search</pre><p>or</p><pre>POST /products/search</pre><p>for some time.</p><p>Over the coming years, we can expect ecosystem support to grow as servers, libraries, and developer tools adopt the new standard.</p><h3>A Quick Timeline</h3><ul><li><strong>2008</strong> — HTTP SEARCH was standardized for WebDAV.</li><li><strong>2020</strong> — A proposal introduced a general-purpose search method, initially named SEARCH.</li><li><strong>2021–2025</strong> — The proposal evolved through several drafts.</li><li><strong>2026</strong> — The specification was finalized as the new <strong>QUERY</strong> HTTP method.</li></ul><h3>Final Thoughts</h3><p>For more than two decades, developers had to choose between two imperfect options:</p><ul><li>Use <strong>GET</strong> and struggle with increasingly complex URLs.</li><li>Use <strong>POST</strong> even though the request wasn’t actually creating anything.</li></ul><p>QUERY finally fills that gap.</p><p>It preserves the read-only nature of GET while allowing the expressive request bodies that modern applications need.</p><p>You may not start using it tomorrow as tooling and framework support will take time; but understanding QUERY today will help you design APIs that align with where HTTP is heading next.</p><p>Sometimes, the most interesting additions to the web aren’t entirely new ideas!</p><p>They’re solutions to problems developers have quietly worked around for years! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af2c3a847d5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Ride-Hailing Apps Decide Which Driver Gets Your Ride]]></title>
            <link>https://arvita-writes.medium.com/how-ride-hailing-apps-decide-which-driver-gets-your-ride-d70746001f89?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d70746001f89</guid>
            <category><![CDATA[logic]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[ride-hailing-apps]]></category>
            <category><![CDATA[interesting-facts]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Fri, 03 Jul 2026 16:13:53 GMT</pubDate>
            <atom:updated>2026-07-03T16:13:53.119Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-aqjdiJuYzYoRxLSr6qPzQ.png" /></figure><h4>Why the Nearest Driver Isn’t Always Chosen??</h4><p>You book a cab. <br>The app says:</p><blockquote><strong><em>“Finding your ride…”</em></strong></blockquote><p>Within a few seconds, a driver is assigned. <br>Sometimes they’re just around the corner.</p><p>Sometimes they’re 5 minutes away — even though you can clearly see another cab parked much closer.</p><p>So what happened?</p><blockquote><strong><em>Why didn’t the nearest driver get your ride?</em></strong></blockquote><p>Let’s look at the logic that powers ride-hailing platforms like Uber, Ola, Lyft and others.</p><h3>The Real Problem</h3><p>When you request a ride, the system isn’t trying to answer:</p><blockquote><em>“Who’s closest?”</em></blockquote><p>Instead, it’s trying to answer:</p><blockquote><strong><em>“Which driver can complete this trip most efficiently for everyone involved?”</em></strong></blockquote><p>That’s a much harder problem.</p><h3>Step 1: Your Ride Request Is Created</h3><p>When you tap <strong>Book Ride</strong>, your app sends information like:</p><ul><li>Pickup location</li><li>Destination</li><li>Ride type (Mini, Sedan, XL, etc.)</li><li>Timestamp</li><li>Estimated distance</li></ul><p>At this point… <br>No driver has been selected yet.</p><p>The platform first needs to search for suitable candidates.</p><h3>Step 2: Finding Eligible Drivers</h3><p>The platform immediately filters drivers.</p><p>For example: <br>Not eligible:</p><ul><li>Offline</li><li>Already on another trip</li><li>Taking a break</li><li>Wrong vehicle type</li><li>Outside the service area</li></ul><p>Remaining drivers become the candidate pool. <br>Maybe:</p><pre>Nearby Drivers: 142</pre><pre>Eligible Drivers: 27</pre><p>Now the real decision begins.</p><h3>Step 3: Distance Is Only One Factor</h3><p>Most people assume:</p><pre>Nearest Driver = Best Driver</pre><p>Not true. <br>The platform also considers:</p><ul><li>Current traffic</li><li>Road direction</li><li>One-way streets</li><li>U-turn availability</li><li>Pickup difficulty</li></ul><p>Imagine:</p><p>Driver A:</p><ul><li>300 meters away</li><li>Opposite side of a divided highway</li></ul><p>Driver B:</p><ul><li>700 meters away</li><li>Already driving toward you</li></ul><p>Driver B may actually arrive first.</p><p>The system predicts <strong>arrival time</strong>, not straight-line distance.</p><h3>Step 4: Estimated Time of Arrival (ETA)</h3><p>One of the biggest calculations is:</p><blockquote><em>“Who can reach the passenger the fastest?”</em></blockquote><p>The app estimates:</p><ul><li>Current speed</li><li>Traffic</li><li>Signals</li><li>Road restrictions</li><li>GPS history</li></ul><p>Sometimes a farther driver has a lower ETA than a closer one. <br>That’s why they get the trip.</p><h3>Step 5: Driver Acceptance Probability</h3><p>Here’s something most users never think about. <br>Drivers can reject rides.</p><p>Suppose:</p><p>Driver A usually declines long trips.<br>Driver B accepts almost every request.</p><p>Who should receive the request first?<br>Probably Driver B.</p><p>Modern systems don’t just predict travel.</p><p>They also predict <strong>human behavior</strong>.</p><h3>Step 6: Driver Efficiency</h3><p>The platform wants to reduce:</p><ul><li>Empty driving</li><li>Fuel waste</li><li>Idle time</li></ul><p>Imagine:</p><p>Driver A finishes a trip near a busy railway station.</p><p>Another passenger requests a ride nearby.</p><p>Assigning Driver A keeps:</p><ul><li>waiting time low</li><li>driver utilization high</li></ul><p>The system is optimizing the whole network — not just one ride.</p><h3>Step 7: Demand vs Supply</h3><p>Now imagine it’s raining.</p><p>Suddenly:</p><ul><li>2,000 new ride requests</li><li>Only 600 available drivers</li></ul><p>The platform now has to decide:</p><p>Which passengers get drivers first?</p><p>It may prioritize:</p><ul><li>Nearby drivers</li><li>Higher ETA confidence</li><li>Premium rides</li><li>Airport pickups</li><li>Business priorities</li></ul><p>This is also when surge pricing may begin.</p><h3>Why Drivers Sometimes Seem to Drive Away</h3><p>You’ve probably experienced this. <br>A driver accepts.</p><p>Then starts driving in the opposite direction. <br>Usually one of these happened:</p><ul><li>Finishing another trip</li><li>Taking a legal U-turn</li><li>Following navigation</li><li>GPS lag</li><li>Temporary traffic diversion</li></ul><p>The map often looks stranger than reality.</p><h3>Step 8: Continuous Recalculation</h3><p>The assignment doesn’t stop after matching.</p><p>The platform keeps checking:</p><ul><li>Has traffic changed?</li><li>Has the driver stopped?</li><li>Is the pickup still possible?</li></ul><p>If something goes wrong:</p><ul><li>another driver may be assigned</li><li>ETA updates</li><li>route changes</li></ul><p>Everything remains dynamic.</p><h3>Why the App Sometimes Searches for Several Seconds</h3><p>Finding a driver isn’t simply:</p><pre>Find nearest.<br>Done.</pre><p>The system may:</p><ul><li>evaluate dozens of drivers</li><li>predict ETAs</li><li>estimate acceptance probability</li><li>check pricing</li><li>verify vehicle availability</li></ul><p>All of this happens in just a few seconds.</p><h3>The Hidden Goal</h3><p>The platform isn’t optimizing one ride.</p><p>It’s optimizing:</p><ul><li>thousands of drivers</li><li>thousands of passengers</li><li>traffic conditions</li><li>future demand</li><li>overall marketplace efficiency</li></ul><p>Sometimes giving you the nearest driver would make the entire city perform worse.</p><h3>The Big Takeaway</h3><p>Ride-hailing apps don’t ask:</p><blockquote><em>“Who’s closest?”</em></blockquote><p>They ask:</p><ul><li>Who can reach the passenger fastest?</li><li>Who is likely to accept?</li><li>Who keeps the system efficient?</li><li>Who minimizes total waiting time?</li></ul><p>It’s a city-wide optimization problem happening every second.</p><h3>Final Thought</h3><p>The next time a driver gets assigned who isn’t the closest, remember:</p><p>The app isn’t making a random choice.</p><p>It’s solving thousands of tiny logistics problems simultaneously, trying to create the best outcome — not just for you, but for every passenger and driver currently using the platform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d70746001f89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Just Another Thursday… Until It Wasn’t..]]></title>
            <link>https://arvita-writes.medium.com/just-another-thursday-until-it-wasnt-3b067dc1f5df?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b067dc1f5df</guid>
            <category><![CDATA[happiness]]></category>
            <category><![CDATA[nature]]></category>
            <category><![CDATA[childhood]]></category>
            <category><![CDATA[little-things-in-life]]></category>
            <category><![CDATA[finding-peace-in-chaos]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 13:43:50 GMT</pubDate>
            <atom:updated>2026-06-25T13:51:58.567Z</atom:updated>
            <content:encoded><![CDATA[<p>Just another Thursday for me, with no evening calls scheduled yet. So I decided to go for a 30–40 minute walk. I quickly checked my emails to make sure no calls had come up, and then stepped out of the house.</p><p>Being new to this area, I wasn’t aware of many nearby parks or walking spots except for a few that were a little far away. So I started wandering through the nearby streets, trying to find a proper place to walk despite the traffic.</p><p>I decided to take a different route and began exploring new streets, as I usually do. I’ve done this many times before, and often end up discovering something interesting that makes me want to go there again. Coming to the point — I was walking around, looking here and there, when I came across a park/ground. I knew about it, but it had never been open at the times I had passed by that street before. But today it was open, so I went in along with a few fellow walkers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*rCkJ2lpODHnLxy0IlUSDMw.png" /></figure><p>Bangalore’s weather was setting the perfect mood — it had rained a little while ago, and now the sun was peeking through the clouds, creating beautiful views in the sky that fascinate me every single time. The ground itself was a small play area for children from the nearby societies.</p><p>As soon as I entered, I saw a few kids trying to find their ball. Poor kids — they were searching for it in the grass with their bats, but couldn’t spot it because the ball was almost the same color as the grass. I helped them find it, and the cute smile on one little boy’s face, along with his small “thank you,” made my day.</p><p>And that was the moment something clicked in my mind.</p><p>When I had entered the park, all I was thinking about was my raised PR and what comments I might get on it after a senior reviewed it. But suddenly, I forgot all of that. I started noticing the kids playing around, people enjoying their evening walks, a mother-daughter duo sitting on a bench and discussing life, and so much more. I could feel peace in that chaos — kids shouting, arguing, making noise — and I realized that this was the whole point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jonnEkLoDln4tzDZX6EMCw.png" /></figure><p>We get so busy in our daily lives. We stress, we think about work, and we keep worrying about chores and responsibilities all the time. Sometimes, one should simply spend time in nature for a change.</p><p>As I kept walking, I noticed a little girl playing in the sand with her Barbie doll, and it instantly took me back to my childhood when we used to play with dolls. On the other side, around five or six kids were arguing — in a completely childish way, of course — over who would get a turn on the duck-shaped seesaw. They were shouting at the top of their voices, and it made me smile, remembering how I used to fight with my cousins over the smallest things.</p><p>Another group of children was busy playing cricket on the other side of the ground, with their own rules and their own little field setup. One little boy was playing all by himself with a football, showing off his skills to his father, who was sitting nearby on a bench. On another side, there were new parents with their tiny babies — most of them probably one or two years old — simply enjoying their little world together. One man was sitting on a bench with his newborn, trying to make the baby laugh. A few parents and grandparents were walking around with baby strollers, taking slow evening rounds.</p><p>And it wasn’t just Gen Z or millennials there. I also noticed two senior citizens deep in conversation — maybe talking about life after retirement, maybe simply sharing playful gossip and laughing over old memories.</p><p>What made it even more beautiful was the mix of languages floating all around me. Amid all the chaos, laughter, and conversations, I could recognize a few — Marathi, Hindi, and Kannada — and I’m sure there were many more I couldn’t identify. But the one thing common in all of them was that they sounded happy. No matter the language, most of those conversations carried the same warmth, lightness, and joy.</p><p>The one thing common among all these people was joy. They were all happy in that moment. I’m sure each one of them had their own problems, issues, and challenges waiting outside that ground. But for that little while, in that small park, they had forgotten everything and were simply enjoying their own sweet time.</p><p>And of course, after completing four rounds of the track, I had become one of them too — without even realizing it! ❤</p><p>The cool breeze, the fresh air, and the sunlight after the rain made the evening even more beautiful. I was able to truly enjoy the view, the happiness around me, and the peace within the chaos because, for once, I hadn’t brought my earphones with me.</p><p>And it was worth it! :)</p><p>Otherwise, with my playlist on and my mind elsewhere, I probably wouldn’t have noticed any of these little moments. I would have simply walked around and come back home.</p><p>I couldn’t capture many good pictures, of course — the whole point was to stay away from my phone for a while. Still, I managed to click a couple of them, just enough to bring a piece of that evening into this blog! :)</p><p>Just then, a notification popped up on my phone — some discussion had started in the team space. That was my cue to head back home, since it was getting late. But by then, one more to-do had already been added to my list: to write about this evening!.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b067dc1f5df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How E-commerce Sites Know an Item Is About to Go Out of Stock]]></title>
            <link>https://arvita-writes.medium.com/how-e-commerce-sites-know-an-item-is-about-to-go-out-of-stock-c2f82d5a1470?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2f82d5a1470</guid>
            <category><![CDATA[online-shopping-sites]]></category>
            <category><![CDATA[logic]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[stock-management]]></category>
            <category><![CDATA[ecommerce]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 13:08:18 GMT</pubDate>
            <atom:updated>2026-06-25T13:08:18.541Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UuMr6gDElF11ysooJ9oqEg.png" /></figure><h3>The Hidden Logic Behind “Only 2 Left” and “Selling Fast”</h3><p>You open an e-commerce app. A product page says:</p><ul><li><strong>Only 3 left in stock</strong></li><li><strong>Selling fast</strong></li><li><strong>12 people have this in their cart</strong></li><li><strong>Order soon before it’s gone</strong></li></ul><p>Sometimes it feels like a sales trick. <br>Sometimes it’s real.<br>So the question is:</p><blockquote><strong><em>How does an e-commerce platform actually know an item is about to go out of stock?</em></strong></blockquote><p>And even more interesting:</p><blockquote><strong><em>How does it keep inventory accurate when thousands of people are browsing, adding to cart, cancelling, returning, and buying at the same time?</em></strong></blockquote><p>Let’s break down the logic behind it.</p><h3>First: “Stock” Is Not Just a Number</h3><p>Most people imagine inventory like this:</p><pre>Laptop Stand = 27 units</pre><p>Simple, right? <br>But real e-commerce inventory is much more complicated.</p><p>A platform may track:</p><ul><li><strong>Total physical stock in warehouse</strong></li><li><strong>Reserved stock</strong> (someone is already checking out)</li><li><strong>Damaged stock</strong></li><li><strong>Returned stock under inspection</strong></li><li><strong>In-transit stock</strong></li><li><strong>Blocked stock</strong> for warehouse issues</li><li><strong>Marketplace seller stock</strong> if third-party sellers are involved</li></ul><p>So the actual question isn’t:</p><blockquote><em>“How many exist?”</em></blockquote><p>It’s:</p><blockquote><strong><em>“How many can be safely sold </em>right now<em>?”</em></strong></blockquote><h3>Step 1: Inventory Starts at the Warehouse</h3><p>Every product has a stock count somewhere in the system.<br>Example:</p><pre>Wireless Mouse<br>Warehouse A: 120<br>Warehouse B: 45<br>Warehouse C: 10</pre><p>But that’s only the raw physical count. <br>The system now has to subtract units that are no longer truly available.</p><h3>Step 2: “Available Stock” Is Different from “Physical Stock”</h3><p>Suppose a warehouse has <strong>10 units</strong> of a product. <br>But:</p><ul><li>2 are already reserved by users in checkout</li><li>1 is damaged</li><li>1 is being returned and not yet approved for resale</li></ul><p>Then actual sellable stock may be:</p><pre>10 total<br>- 2 reserved<br>- 1 damaged<br>- 1 under return inspection<br>= 6 sellable units</pre><p>That number is what the website cares about.</p><h3>Step 3: Adding to Cart Does Not Always Reduce Stock</h3><p>This is one of the biggest misconceptions. <br>On many platforms:</p><ul><li><strong>adding to cart does not reserve inventory</strong></li><li>only <strong>checkout or payment initiation</strong> does</li></ul><p>Why? <br>Because carts are noisy.</p><p>What poeple do? They:</p><ul><li>add items and disappear</li><li>compare products</li><li>abandon carts</li><li>keep things in cart for days</li></ul><p>If every cart reduced inventory, stock would look fake all day long. <br>So most systems wait until a stronger signal appears.</p><h3>Step 4: Temporary Reservation During Checkout</h3><p>Now the logic changes.</p><p>When a user enters checkout or payment flow, the platform may create a <strong>temporary reservation</strong>.</p><p>Example:</p><pre>Product: Sneakers<br>Available before checkout: 5<br>User enters payment → reserve 1<br>Available shown to others: 4</pre><p>This prevents two people from buying the same last unit. <br>But the reservation is usually <strong>time-limited</strong>.</p><h4>Why Reservations Expire?</h4><p>Imagine someone reaches payment and then:</p><ul><li>closes the app</li><li>loses internet</li><li>changes their mind</li><li>never completes the order</li></ul><p>If the system held that item forever, inventory would be blocked unfairly. <br>So platforms use an expiry like:</p><ul><li>5 minutes</li><li>10 minutes</li><li>15 minutes</li></ul><p>If payment isn’t completed in time:</p><blockquote><em>reservation is released<br> stock becomes available again</em></blockquote><h3>Step 5: Inventory Changes From Many Directions at Once</h3><p>A product’s stock can change because of:</p><h4>Orders</h4><p>Someone buys it.</p><h4>Cancellations</h4><p>An order is cancelled before shipping.</p><h4>Returns</h4><p>A customer sends it back.</p><h4>Warehouse updates</h4><p>Damage, counting corrections, misplaced units.</p><h4>Seller updates</h4><p>Marketplace sellers change their stock.</p><h4>Transfers</h4><p>Stock is moved between warehouses.</p><p>So inventory is not static. <br>It’s a <strong>live stream of changes</strong>.</p><h3>Step 6: The System Watches Inventory Velocity, Not Just Inventory Count</h3><p>Now we reach the interesting part:</p><p>How does the app know an item is <strong>about to</strong> go out of stock? <br>Not just “low now” — but likely to become unavailable soon.</p><p>It looks at <strong>inventory velocity</strong>.<br>Meaning:</p><blockquote><strong><em>How fast is stock being consumed?</em></strong></blockquote><p>Example:</p><pre>Product A:<br>20 units left<br>1 order every 2 days</pre><pre>Product B:<br>20 units left<br>40 orders in the last hour</pre><p>Both have the same stock count. <br>But Product B is in danger.</p><p>So the platform may label Product B as:</p><ul><li><strong>Selling fast</strong></li><li><strong>Only a few left</strong></li><li><strong>High demand</strong></li></ul><h3>Step 7: “Only X Left” Usually Uses a Threshold Rule</h3><p>Platforms often define thresholds like:</p><ul><li>If available stock &lt; 5 → show “Only a few left”</li><li>If stock &lt; 10 and sales velocity high → show “Selling fast”</li><li>If reservations spike → warn users earlier</li></ul><p>So these messages are not always manually written. <br>They’re generated from logic like:</p><pre>if available_stock &lt;= threshold:<br>    show_low_stock_warning = true</pre><p>But in advanced systems, the logic also includes demand rate.</p><h3>Step 8: Why Inventory Can Still Look “Wrong” Sometimes</h3><p>You may see:</p><ul><li>product shown as available</li><li>but at checkout it says out of stock</li></ul><p>Why? <br>Because inventory updates are happening in parallel.</p><p>Example:</p><ul><li>3 units left</li><li>5 people begin checkout at nearly the same time</li><li>reservations happen quickly</li><li>page you opened a few seconds earlier is now outdated</li></ul><p>This is a classic <strong>real-time consistency problem</strong>. <br>The product page may lag slightly behind the checkout system.</p><h3>Step 9: Multi-Warehouse Logic Makes It Even Harder</h3><p>If a platform has stock in multiple warehouses, availability depends on:</p><ul><li>your delivery location</li><li>shipping cost</li><li>delivery promise</li><li>warehouse capacity</li></ul><p>So a product may be:</p><ul><li><strong>in stock for one city</strong></li><li><strong>out of stock for another</strong></li></ul><p>That’s why two users can see different availability for the same item.</p><h3>Step 10: Prediction Helps Before Stock Actually Runs Out</h3><p>Large e-commerce systems don’t just monitor current stock. <br>They also forecast near-future stock risk.</p><p>They ask:</p><ul><li>Is demand rising sharply?</li><li>Is a sale campaign running?</li><li>Is this product trending?</li><li>Are return rates low?</li><li>Is replenishment delayed?</li></ul><p>This allows the system to warn users <strong>before</strong> actual stock hits zero.</p><p>That’s how “selling fast” can appear even when the count is not yet critically low.</p><h3>Why This Matters for the Business</h3><p>Inventory accuracy affects:</p><ul><li>user trust</li><li>conversion rates</li><li>cancellations</li><li>refunds</li><li>warehouse planning</li><li>customer support load</li></ul><p>If the platform oversells:</p><ul><li>users get cancelled orders</li><li>trust drops</li></ul><p>If the platform is too conservative:</p><ul><li>it hides sellable stock</li><li>sales are lost</li></ul><p>So inventory systems try to balance:</p><blockquote><strong><em>aggressive selling</em></strong><em><br> with<br> </em><strong><em>safe fulfillment</em></strong></blockquote><h3>The Big Takeaway</h3><p>E-commerce sites don’t just track stock.</p><p>They track:</p><ul><li>what physically exists</li><li>what’s reserved</li><li>what’s sellable</li><li>how fast it’s selling</li><li>how likely it is to run out soon</li></ul><p>So when you see: “<strong><em>Only 2 left”</em></strong></p><p>that message may come from a surprisingly complex system trying to answer one question:</p><blockquote><strong><em>“Can we still promise this item safely to the next customer?”</em></strong></blockquote><h3>Final Thought</h3><p>Inventory in e-commerce isn’t a shelf count. <br>It’s a live coordination problem between:</p><ul><li>users</li><li>payments</li><li>warehouses</li><li>returns</li><li>cancellations</li><li>forecasts</li></ul><p>And that’s why “out of stock” is often much more dynamic than it looks!<br>Follow more such interesting break downs! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2f82d5a1470" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Food Delivery Apps Know Exactly Where Your Order Is]]></title>
            <link>https://arvita-writes.medium.com/how-food-delivery-apps-know-exactly-where-your-order-is-293f10c20b64?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/293f10c20b64</guid>
            <category><![CDATA[delivery-management]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[logic]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[food-delivery]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Thu, 11 Jun 2026 07:31:00 GMT</pubDate>
            <atom:updated>2026-06-11T07:31:00.706Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iyhUYjzErA-kiCyBZMS6PA.png" /></figure><h3>The Logic Behind Those Surprisingly Accurate Delivery Timelines</h3><p>You place an order.</p><p>Immediately, the app says:</p><blockquote><em>“Arriving in 32–37 minutes.”</em></blockquote><p>A few minutes later:</p><ul><li>Restaurant is preparing your order</li><li>Delivery partner has been assigned</li><li>Order picked up</li><li>Rider is 8 minutes away</li></ul><p>And somehow, the estimate is often surprisingly close. <br>So the question is:</p><blockquote><strong><em>How do food delivery apps know where your order is and predict when it will arrive?</em></strong></blockquote><p>Let’s break down the systems behind those delivery timelines.</p><h3>The Real Problem</h3><p>From a user’s perspective:</p><pre>Order Food<br>↓<br>Receive Food</pre><p>Simple.</p><p>But the app has to coordinate:</p><ul><li>Restaurant</li><li>Kitchen staff</li><li>Delivery partner</li><li>Traffic conditions</li><li>Weather</li><li>Customer location</li></ul><p>And all of these can change in real time.</p><h3>Step 1: Estimating Restaurant Preparation Time</h3><p>Before a rider is even assigned, the system estimates:</p><blockquote><em>“How long will this restaurant take to prepare this order?”</em></blockquote><p>This isn’t a fixed number. <br>The platform considers:</p><ul><li>Time of day</li><li>Current restaurant load</li><li>Number of items ordered</li><li>Historical preparation times</li><li>Special events</li></ul><p>Example:</p><pre>Burger Restaurant<br>Lunch Time: 25 min average</pre><pre>Late Night: 12 min average</pre><p>The same order may get different estimates depending on when you place it.</p><h3>Step 2: Finding the Best Delivery Partner</h3><p>Many people assume:</p><blockquote><em>“The closest rider gets the order.”</em></blockquote><p>Not necessarily.</p><p>The platform evaluates:</p><ul><li>Current rider location</li><li>Number of active deliveries</li><li>Vehicle type</li><li>Traffic conditions</li><li>Expected pickup time</li></ul><p>The goal is:</p><blockquote><em>Minimize total delivery time, not pickup distance.</em></blockquote><h3>Why the Closest Rider Isn’t Always Chosen</h3><p>Imagine:</p><h4>Rider A</h4><ul><li>500m away</li><li>Stuck in traffic</li></ul><h4>Rider B</h4><ul><li>1.5 km away</li><li>On an open road</li></ul><p>The system may choose Rider B.</p><p>Because arrival time matters more than distance.</p><h3>Step 3: Real-Time GPS Tracking</h3><p>Once a rider accepts the order: <br>The app receives periodic GPS updates.</p><p>Something like:</p><pre>Location Update<br>↓<br>Speed<br>↓<br>Direction<br>↓<br>Timestamp</pre><pre>This creates a live picture of:</pre><ul><li>Current position</li><li>Route progress</li><li>Estimated arrival</li></ul><p>The map isn’t watching continuously.</p><p>It’s reconstructing movement from frequent updates.</p><h3>Step 4: Predicting Travel Time</h3><p>This is where the real intelligence appears.</p><p>The platform combines:</p><h4>Historical Data</h4><ul><li>Typical traffic patterns</li><li>Average speeds</li><li>Busy intersections</li></ul><h4>Live Data</h4><ul><li>Current traffic</li><li>Road closures</li><li>Weather conditions</li><li>Congestion levels</li></ul><p>The system constantly recalculates:</p><blockquote><em>“If the rider continues at this pace, when will they arrive?”</em></blockquote><h3>Why Delivery Times Keep Changing</h3><p>You’ve probably seen:</p><pre>35 minutes<br>↓<br>31 minutes<br>↓<br>27 minutes<br>↓<br>30 minutes</pre><p>That’s not a bug. <br>The estimate is being updated as new information arrives.</p><p>Examples:</p><ul><li>Rider finds a shortcut</li><li>Traffic clears</li><li>Traffic worsens</li><li>Restaurant delays pickup</li></ul><p>Every update changes the prediction.</p><h3>Step 5: Tracking Order Status</h3><p>Those status updates aren’t manually entered.</p><p>They’re generated by events:</p><h4>Order Received</h4><p>Restaurant accepts order.</p><h4>Preparing</h4><p>Kitchen begins processing.</p><h4>Ready for Pickup</h4><p>Preparation completed.</p><h4>Picked Up</h4><p>Rider confirms collection.</p><h4>Near You</h4><p>GPS enters a predefined delivery zone. <br>Each event moves the order through a workflow.</p><h3>Why Apps Sometimes Predict Delays Before They Happen</h3><p>Modern systems don’t just react. They predict.</p><p>For example:<br>The platform notices:</p><ul><li>Restaurant running slower than usual</li><li>Rider speed dropping</li><li>Heavy rain starting nearby</li></ul><p>Before users complain, the system updates:</p><blockquote><em>“Delivery delayed by 8 minutes.”</em></blockquote><p>This is predictive estimation, not reactive estimation.</p><h3>The Hidden Challenge: Stacked Deliveries</h3><p>Sometimes a rider carries:</p><ul><li>Your order</li><li>Another customer’s order</li></ul><p>The system must calculate:</p><ul><li>Pickup sequence</li><li>Drop-off sequence</li><li>Additional delays</li></ul><p>And ensure both deliveries remain acceptable.</p><p>This becomes a complex routing problem.</p><h3>Why ETA Prediction Is So Hard</h3><p>Because the system is predicting the future using incomplete information.</p><p>It doesn’t know:</p><ul><li>Whether traffic will suddenly worsen</li><li>Whether the restaurant will face delays</li><li>Whether the rider will encounter issues</li></ul><p>Instead it calculates:</p><blockquote><em>The most probable outcome based on available data.</em></blockquote><h3>The Big Takeaway</h3><p>Food delivery apps don’t know the future.</p><p>They continuously combine:</p><ul><li>Historical behavior</li><li>Real-time GPS data</li><li>Restaurant performance</li><li>Traffic conditions</li><li>Delivery partner availability</li></ul><p>To make the best prediction possible at that moment.</p><h3>Final Thought</h3><p>That little ETA timer isn’t just a countdown.</p><p>It’s a constantly evolving prediction generated by dozens of systems working together.</p><p>Every minute it updates, it’s effectively asking:</p><blockquote><em>“Given everything we know right now, what’s the most likely time this food reaches your door?”</em></blockquote><p>And then recalculating the answer over and over again until the delivery is complete.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=293f10c20b64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Online Payments Actually Move Money]]></title>
            <link>https://arvita-writes.medium.com/how-online-payments-actually-move-money-51c40c8165e0?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/51c40c8165e0</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[online-payments]]></category>
            <category><![CDATA[logic]]></category>
            <category><![CDATA[payment-gateway]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 08:35:24 GMT</pubDate>
            <atom:updated>2026-06-04T08:35:24.115Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8plOIgM7KKWmqAOnNNIwEw.png" /></figure><p>Why Your Payment Succeeds in Seconds but the Money Doesn’t Arrive Instantly?</p><p>You buy something online. You tap <strong>Pay Now</strong>.</p><p>A few seconds later:</p><blockquote><em>✅ Payment Successful</em></blockquote><p>The merchant receives an order. <br>You receive a confirmation message.<br>Everything seems complete.</p><p>But here’s the surprising part:</p><blockquote><strong><em>In many cases, the money hasn’t actually reached the merchant yet.</em></strong></blockquote><p>So what happened?</p><p>Let’s break down the hidden journey of an online payment and understand why payments feel instant even when the actual movement of money takes much longer.</p><h3>The Biggest Misconception About Payments</h3><p>Most people imagine payments like this:</p><pre>Your Bank Account<br>        ↓<br>Merchant Bank Account</pre><p>Money leaves one account and immediately enters another.<br>Simple. But modern payment systems don’t work that way. <br>Instead, there are multiple players involved:</p><ul><li>Customer</li><li>Merchant</li><li>Payment Gateway</li><li>Payment Processor</li><li>Issuing Bank</li><li>Acquiring Bank</li><li>Card Network / Payment Network</li></ul><p>Each has a specific role.</p><h3>Step 1: You Click “Pay Now”</h3><p>Let’s say you’re buying movie tickets. <br>When you click Pay:</p><ul><li>payment details are collected</li><li>transaction request is created</li><li>request is sent securely</li></ul><p>At this point:</p><blockquote><em>No money has moved yet.</em></blockquote><p>The system is simply asking:</p><blockquote><em>“Can this payment be approved?”</em></blockquote><h3>Step 2: Authorization Begins</h3><p>The payment request travels through multiple systems. <br>A simplified flow:</p><pre>Customer<br>    ↓<br>Payment Gateway<br>    ↓<br>Payment Network<br>    ↓<br>Bank</pre><p>Your bank checks:</p><ul><li>Is the account active?</li><li>Is there enough balance?</li><li>Is the card valid?</li><li>Does this transaction look suspicious?</li></ul><p>If everything looks good:</p><blockquote><em>The bank authorizes the payment.</em></blockquote><h3>Step 3: Funds Are Reserved</h3><p>This is the part most users never realize. <br>When authorization succeeds:</p><blockquote><em>Money is often reserved, not transferred.</em></blockquote><p>Your bank effectively says:</p><blockquote><em>“Don’t let this money be spent elsewhere.”</em></blockquote><p>This is why:</p><ul><li>your balance decreases</li><li>the merchant sees a successful payment</li></ul><p>Even though settlement hasn’t happened yet.</p><h3>Why Authorization Is Important</h3><p>Imagine:</p><ul><li>Merchant ships the product</li><li>Customer spends the same money elsewhere</li></ul><p>Chaos.</p><p>Authorization prevents double spending by temporarily locking the amount.</p><h3>Step 4: Merchant Receives Success Signal</h3><p>Once authorization succeeds:</p><pre>Bank<br> ↓<br>Payment Network<br> ↓<br>Gateway<br> ↓<br>Merchant</pre><p>Merchant receives:</p><blockquote><em>Payment Approved</em></blockquote><p>This usually happens in a few seconds.</p><p>That’s why:</p><ul><li>tickets get booked</li><li>food orders start preparing</li><li>subscriptions activate</li></ul><p>The merchant trusts the authorization.</p><h3>Step 5: Settlement Happens Later</h3><p>Now comes the actual money movement. <br>This process is called:</p><blockquote><em>Settlement</em></blockquote><p>Depending on the payment method, settlement may happen:</p><ul><li>later that day</li><li>next day</li><li>after several business days</li></ul><p>Only during settlement does the money officially move between financial institutions.</p><h3>Why Settlement Is Delayed</h3><p>Because banks must:</p><ul><li>reconcile records</li><li>validate transactions</li><li>process batches</li><li>handle disputes</li></ul><p>Moving money securely is more important than moving it instantly.</p><h3>What Happens During a Refund?</h3><p>Refunds are not simply:</p><pre>Merchant → Customer</pre><p>Instead:</p><ol><li>Merchant initiates refund</li><li>Payment networks process reversal</li><li>Banks update balances</li><li>Settlement systems adjust records</li></ol><p>This is why refunds often take:</p><ul><li>2 days</li><li>5 days</li><li>sometimes longer</li></ul><p>The system is unwinding multiple financial records.</p><h3>Why Payments Sometimes Fail Even After Success</h3><p>You’ve probably seen this:</p><ul><li>Money deducted</li><li>Order not confirmed</li></ul><p>What happened?</p><p>Usually:</p><h4>Scenario 1</h4><p>Authorization succeeded<br>But:</p><h4>Scenario 2</h4><p>Merchant never received confirmation <br>Maybe because:</p><ul><li>network failed</li><li>server timed out</li><li>application crashed</li></ul><p>Now reconciliation systems step in.</p><h3>The Hidden Heroes: Reconciliation Systems</h3><p>Every payment platform constantly checks:</p><pre>Bank Records<br>     vs<br>Merchant Records</pre><p>If something doesn’t match:</p><ul><li>transaction is investigated</li><li>refund may be initiated</li><li>settlement may be corrected</li></ul><p>Without reconciliation:</p><blockquote><em>Modern payments would become unreliable very quickly.</em></blockquote><h3>Why Fraud Detection Runs in Real Time</h3><p>Before approving payments, systems also evaluate:</p><ul><li>location</li><li>device fingerprint</li><li>spending history</li><li>unusual behavior</li><li>risk patterns</li></ul><p>For example:</p><pre>Normal Spending:<br>Mumbai<br><br>Sudden Transaction:<br>Brazil</pre><p>The system may:</p><ul><li>decline</li><li>challenge</li><li>request verification</li></ul><p>All within milliseconds.</p><h3>Why Payments Feel Instant</h3><p>The secret is:</p><blockquote><em>Authorization is fast.</em></blockquote><p>The actual movement of money can happen later. <br>Most of the time, users only care about:</p><blockquote><em>“Can I proceed?”</em></blockquote><p>So systems optimize for rapid authorization while settlement happens behind the scenes.</p><h3>The Big Takeaway</h3><p>When you see:</p><blockquote><em>Payment Successful</em></blockquote><p>It usually means:</p><ul><li>authorization succeeded</li><li>funds are reserved</li><li>merchant has approval</li></ul><p>Not necessarily that money has already completed its journey. <br>The real movement of money continues quietly in the background.</p><h3>Final Thought</h3><p>Modern payment systems are built on trust, verification, and coordination.</p><p>What feels like a simple button press is actually dozens of systems working together to answer one question:</p><blockquote><strong><em>Can this transaction be trusted?</em></strong></blockquote><p>Once that answer is “yes,” everything else can happen behind the scenes.</p><p>And that’s why online payments feel almost instant — even when the actual financial settlement is still underway!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51c40c8165e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Recommendation Systems Learn From What You Ignore]]></title>
            <link>https://arvita-writes.medium.com/how-recommendation-systems-learn-from-what-you-ignore-dd2cd1e180b7?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd2cd1e180b7</guid>
            <category><![CDATA[logic]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <category><![CDATA[recommendations]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Wed, 27 May 2026 13:50:45 GMT</pubDate>
            <atom:updated>2026-05-27T13:50:45.218Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5MnzR4K_7ubcNdODTCgYw.png" /></figure><h3>Your Silence Is Also Data</h3><p>Most people think recommendation systems learn from:</p><ul><li>likes ❤️</li><li>shares 🔁</li><li>comments 💬</li><li>follows ➕</li></ul><p>And yes — they do.</p><p>But here’s the surprising part:</p><blockquote><strong><em>What you ignore is often just as important as what you engage with.</em></strong></blockquote><p>Every time you:</p><ul><li>scroll past a post</li><li>skip a Reel</li><li>abandon a video halfway</li><li>pause for 1 second instead of 10</li></ul><p>…the system learns something.</p><p>Quietly.</p><p>Let’s break down how recommendation systems use your <em>non-actions</em> to shape your feed.</p><h3>First: Recommendation Systems Are Prediction Engines</h3><p>Platforms like:</p><ul><li>Instagram</li><li>YouTube</li><li>TikTok</li><li>Netflix</li><li>Spotify</li></ul><p>…all try to answer one question:</p><blockquote><em>“What content is this user most likely to engage with next?”</em></blockquote><p>To do that, they study:</p><ul><li>positive signals</li><li>negative signals</li><li>behavioral patterns</li></ul><p>And negative signals are everywhere.</p><h3>The Big Misunderstanding</h3><p>Most users think:</p><blockquote><em>“I didn’t dislike it, so the system shouldn’t care.”</em></blockquote><p>But recommendation systems don’t think emotionally.</p><p>They think statistically.</p><p>If you consistently:</p><ul><li>skip cooking videos</li><li>ignore cricket posts</li><li>avoid finance content</li></ul><p>…the system notices a pattern.</p><p>No dislike button required.</p><h3>Step 1: Measuring Dwell Time</h3><p>One of the strongest signals is:</p><blockquote><strong><em>How long you stay on something</em></strong></blockquote><p>This is called <strong>dwell time</strong>.</p><p>Examples:</p><ul><li>scroll away instantly → weak interest</li><li>pause briefly → mild interest</li><li>watch till end → strong interest</li><li>replay → very strong interest</li></ul><p>Even hesitation matters.</p><h3>Why Fast Scrolling Is Important</h3><p>Imagine:</p><ul><li>100 users see a Reel</li><li>90 instantly scroll away</li></ul><p>The system concludes:</p><blockquote><em>“This content is not compelling for this audience.”</em></blockquote><p>Fast skips are negative feedback.</p><p>Not dramatic feedback.<br> But useful feedback.</p><h3>Step 2: Building Preference Patterns</h3><p>Recommendation systems don’t evaluate one action alone.</p><p>They look for:</p><ul><li>repeated behavior</li><li>clusters of actions</li><li>long-term patterns</li></ul><p>Example:</p><pre>User skips:<br>- political content<br>- celebrity gossip<br>- long videos</pre><pre>But watches:<br>- tech explainers<br>- productivity clips<br>- short educational content</pre><p>Now the system builds a profile:</p><blockquote><em>“This user prefers concise informational content.”</em></blockquote><h3>Step 3: Negative Signals Reduce Future Distribution</h3><p>Over time:</p><ul><li>ignored topics appear less</li><li>skipped creators lose visibility</li><li>low-engagement formats are deprioritized</li></ul><p>This happens gradually.</p><p>The system continuously adjusts:</p><pre>More engagement → increase probability<br>Less engagement → decrease probability</pre><p>Your feed evolves silently.</p><h3>Why “Not Interested” Is So Powerful</h3><p>When you explicitly tap:</p><blockquote><em>“Not Interested”</em></blockquote><p>…the signal becomes extremely strong.</p><p>Because now the system doesn’t have to infer.</p><p>It knows directly:</p><ul><li>avoid this topic</li><li>reduce similar content</li><li>suppress related recommendations</li></ul><p>Explicit feedback overrides weak assumptions.</p><h3>Step 4: Context Matters Too</h3><p>Ignoring content doesn’t always mean dislike.</p><p>Example:</p><ul><li>You skip travel videos during work hours</li><li>But watch them at night</li></ul><p>The system may learn:</p><blockquote><em>“Wrong timing, not wrong topic.”</em></blockquote><p>Modern recommendation systems include:</p><ul><li>time of day</li><li>device type</li><li>session length</li><li>current viewing mood</li></ul><p>Context changes interpretation.</p><h3>Why Platforms Care So Much About Ignored Content</h3><p>Because attention is limited.</p><p>Every bad recommendation:</p><ul><li>reduces session quality</li><li>increases app exits</li><li>weakens trust in the feed</li></ul><p>So platforms aggressively optimize:</p><blockquote><em>not just for engagement<br> but for </em>avoiding disengagement</blockquote><h3>The Hidden Goal of Recommendation Systems</h3><p>Recommendation systems are not trying to:</p><ul><li>show everything</li><li>be perfectly fair</li><li>maximize diversity</li></ul><p>Their main goal is usually:</p><blockquote><strong><em>maximize sustained engagement</em></strong></blockquote><p>That means:</p><ul><li>less irrelevant content</li><li>more predicted interest</li><li>fewer reasons to leave the app</li></ul><h3>Why Feeds Become “Too Accurate”</h3><p>Because systems learn from:</p><ul><li>what you watch</li><li>what you skip</li><li>what you pause on</li><li>what you return to</li><li>what you abandon quickly</li></ul><p>Over time, the system narrows uncertainty.</p><p>That’s why feeds often feel:</p><blockquote><em>“scarily personalized.”</em></blockquote><h3>The Big Takeaway</h3><p>Recommendation systems don’t just study your actions.</p><p>They study:</p><ul><li>hesitation</li><li>avoidance</li><li>silence</li><li>indifference</li></ul><p>Because:</p><blockquote><em>ignoring something is still behavior.</em></blockquote><p>And behavior is data.</p><h3>Final Thought</h3><p>Every scroll teaches the algorithm something.</p><p>Not just:</p><blockquote><em>“I like this.”</em></blockquote><p>But also:</p><blockquote><em>“I don’t care about that.”</em></blockquote><p>And modern recommendation systems are built to learn from both.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd2cd1e180b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Social Media Knows a Post Is Going Viral?]]></title>
            <link>https://arvita-writes.medium.com/how-social-media-knows-a-post-is-going-viral-0ccc2a8cd25b?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ccc2a8cd25b</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[viral]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[logic]]></category>
            <category><![CDATA[system-design-concepts]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Wed, 20 May 2026 14:25:48 GMT</pubDate>
            <atom:updated>2026-05-20T14:25:48.436Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kux0l5rog93EB31YeCuyzg.png" /></figure><h3>Platforms Often Detect Virality Before Humans Do</h3><p>You open Instagram, X, LinkedIn, or TikTok.</p><p>A post suddenly appears <em>everywhere</em>:</p><ul><li>everyone is sharing it</li><li>engagement explodes</li><li>comments keep rising every second</li></ul><p>And somehow… the platform seemed to know this would happen <em>before you did</em>.</p><p>So how?</p><blockquote><strong><em>How do social media platforms detect that a post is “going viral”?</em></strong></blockquote><p>It’s not based on likes alone.<br>And it’s definitely not random.</p><p>Let’s break down the logic behind virality detection.</p><h3>First: Viral Doesn’t Mean “High Likes”</h3><p>A post with:</p><ul><li>1 million views</li><li>but slow growth</li></ul><p>…may be <em>less viral</em> than a post with:</p><ul><li>20,000 views</li><li>exploding growth in 10 minutes</li></ul><p>Platforms care less about total numbers.</p><p>They care about:</p><blockquote><strong><em>speed + intensity of engagement</em></strong></blockquote><p>Virality is about acceleration.</p><h3>The Core Question Platforms Ask</h3><p>Every platform constantly evaluates:</p><blockquote><em>“Is this post performing significantly better than expected right now?”</em></blockquote><p>Not globally. Relative to:</p><ul><li>the creator’s usual performance</li><li>similar posts</li><li>posts shown to similar audiences</li></ul><h3>Step 1: Small Initial Distribution</h3><p>Most platforms don’t show a new post to everyone immediately.</p><p>Instead:</p><ul><li>a small batch of users sees it first</li><li>this acts like a live experiment</li></ul><p>Example:</p><pre>New Post<br>↓<br>Shown to small audience<br>↓<br>Measure reactions</pre><p>This phase is critical.</p><h3>Step 2: Measuring Early Signals</h3><p>The system tracks:</p><ul><li>likes</li><li>comments</li><li>shares</li><li>saves</li><li>watch time</li><li>rewatches</li><li>profile clicks</li><li>follows after viewing</li></ul><p>But raw numbers aren’t enough.</p><p>The platform also measures:</p><ul><li><em>how quickly</em> these happen</li><li><em>how deeply</em> users engage</li></ul><h3>Why Shares Matter More Than Likes</h3><p>Likes are cheap. Shares are powerful.</p><p>Why?</p><p>Because sharing means:</p><blockquote><em>“This content is worth showing someone else.”</em></blockquote><p>That’s a much stronger signal.</p><p>Similarly:</p><ul><li>saves</li><li>rewatches</li><li>long comments</li></ul><p>…often carry more weight than quick likes.</p><h3>Step 3: Comparing Against Expected Behavior</h3><p>This is where the intelligence appears.</p><p>Platforms ask:</p><blockquote><em>“For this type of post, is engagement unusually high?”</em></blockquote><p>Example:</p><ul><li>A creator usually gets: 2% engagement in 1 hour</li><li>New post gets: 12% engagement in 10 minutes</li></ul><p>The system notices:</p><blockquote><em>“This is outperforming expectations.”</em></blockquote><p>That triggers amplification.</p><h3>Step 4: Expansion Waves (The Viral Loop)</h3><p>If performance is strong:</p><ul><li>platform shows the post to a larger audience</li><li>then measures again</li></ul><p>Pattern:</p><pre>100 users<br>↓<br>1,000 users<br>↓<br>10,000 users<br>↓<br>100,000 users</pre><p>Each stage is conditional.</p><p>If engagement drops:</p><ul><li>expansion slows</li><li>virality fades</li></ul><p>If engagement rises:</p><ul><li>distribution accelerates</li></ul><h3>Step 5: Audience Matching</h3><p>Virality is not purely global.</p><p>A post may go viral:</p><ul><li>within tech communities</li><li>within fitness audiences</li><li>within a geographic region</li></ul><p>Platforms first identify:</p><blockquote><em>“Who reacts strongly to this content?”</em></blockquote><p>Then they aggressively distribute within similar groups.</p><h3>Watch Time Is a Massive Signal</h3><p>Especially for:</p><ul><li>Reels</li><li>TikTok</li><li>Shorts</li></ul><p>Platforms track:</p><ul><li>Did users finish the video?</li><li>Did they replay it?</li><li>Did they stop scrolling?</li></ul><p>A 15-second video watched fully is often stronger than:</p><ul><li>a longer video skipped halfway</li></ul><p>Attention quality matters.</p><h3>Negative Signals Also Matter</h3><p>The system also watches:</p><ul><li>instant scrolling away</li><li>“Not Interested”</li><li>muting</li><li>fast exits</li></ul><p>Virality requires:</p><blockquote><em>strong positive signals </em>and<em> low negative signals</em></blockquote><h3>Why Some Posts Suddenly Explode Hours Later</h3><p>Sometimes:</p><ul><li>early engagement is average</li><li>then a key audience reacts strongly</li><li>resharing begins</li><li>engagement compounds</li></ul><p>Virality can be delayed because systems continuously re-evaluate posts.</p><p>A post isn’t judged once.</p><p>It’s monitored constantly.</p><h3>Why Platforms Love Viral Content</h3><p>Viral posts increase:</p><ul><li>session duration</li><li>user engagement</li><li>ad impressions</li><li>return visits</li></ul><p>Platforms are optimized to:</p><blockquote><em>find engaging content as early as possible</em></blockquote><p>Virality is good business.</p><h3>The Big Takeaway</h3><p>Social media platforms don’t “know” a post will go viral.</p><p>They:</p><ul><li>detect unusual engagement patterns</li><li>compare against expectations</li><li>test progressively larger audiences</li><li>amplify based on performance</li></ul><p>Virality is essentially:</p><blockquote><strong><em>real-time probability scoring at massive scale.</em></strong></blockquote><h3>Final Thought</h3><p>The moment a post starts outperforming expectations, the platform notices.</p><p>Sometimes before humans even realize it.<br>Because modern social media isn’t just showing content. <br>It’s constantly asking:</p><blockquote><em>“What deserves more attention right now?”</em></blockquote><p>And then scaling it instantly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ccc2a8cd25b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Is Planning in AI Agents? (And Why It Breaks)]]></title>
            <link>https://arvita-writes.medium.com/what-is-planning-in-ai-agents-and-why-it-breaks-01b00eda2b6e?source=rss-3eb95d2ded0d------2</link>
            <guid isPermaLink="false">https://medium.com/p/01b00eda2b6e</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai-agent-development]]></category>
            <category><![CDATA[ai-agents-in-action]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Arya]]></dc:creator>
            <pubDate>Wed, 13 May 2026 07:31:00 GMT</pubDate>
            <atom:updated>2026-05-13T07:31:00.693Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fIqiCe9KGuEgd9g0JwJNA.png" /></figure><p>One of the most interesting things about AI agents is that they don’t just react.</p><p>Sometimes, they try to <strong>plan ahead</strong>.</p><p>This is where agents begin to feel less like chatbots and more like systems working toward a goal over time.</p><p>But planning is also where many agents fail.</p><p>Let’s understand why.</p><h3>What “Planning” Actually Means</h3><p>Planning is the process of:</p><ul><li>Breaking a goal into smaller steps</li><li>Deciding an order</li><li>Predicting what should happen next</li></ul><p>Instead of:</p><blockquote><em>“What do I do right now?”</em></blockquote><p>The agent asks:</p><blockquote><em>“What sequence of actions will achieve the goal?”</em></blockquote><p>That’s a huge difference.</p><h3>A Simple Example</h3><p>Goal:</p><blockquote><em>“Create and publish a blog post.”</em></blockquote><p>A planning agent might decide to:</p><ol><li>Research the topic</li><li>Generate an outline</li><li>Write a draft</li><li>Review the content</li><li>Publish it</li></ol><p>The task becomes a structured workflow instead of one giant action.</p><h3>Why Planning Matters</h3><p>Without planning, agents become reactive.</p><p>They:</p><ul><li>Respond step-by-step</li><li>But don’t think ahead</li><li>Often repeat work</li><li>Get stuck easily</li></ul><p>Planning gives agents:</p><ul><li>Direction</li><li>Structure</li><li>Efficiency</li></ul><p>It helps them move intentionally instead of randomly.</p><h3>Planning Is Usually Not Perfect</h3><p>This is important.</p><p>AI agents rarely create perfect plans upfront.</p><p>Real-world tasks change constantly:</p><ul><li>APIs fail</li><li>Data changes</li><li>Goals shift</li><li>New information appears</li></ul><p>So planning is often:</p><ul><li>Partial</li><li>Flexible</li><li>Continuously updated</li></ul><p>Good agents don’t just plan.<br> They <strong>replan</strong>.</p><h3>How Agents Typically Plan</h3><p>At a high level, agents:</p><ol><li>Understand the goal</li><li>Predict useful sub-tasks</li><li>Estimate dependencies</li><li>Execute step-by-step</li><li>Adjust when things change</li></ol><p>This creates a cycle of:</p><blockquote><em>Plan → Act → Observe → Replan</em></blockquote><h3>Why Planning Breaks So Often</h3><p>Planning sounds smart in theory.<br>But it’s surprisingly fragile.</p><p>Common problems include:</p><ul><li>Wrong assumptions</li><li>Missing information</li><li>Overly ambitious plans</li><li>Unexpected tool failures</li></ul><p>An agent may create a beautiful plan… that collapses after step two.</p><h3>The Hidden Difficulty</h3><p>Planning requires predicting the future.</p><p>That’s hard even for humans.</p><p>The agent must estimate:</p><ul><li>What actions will succeed</li><li>What tools will return</li><li>What conditions may change</li></ul><p>And it must do this with incomplete information.</p><h3>Reactive vs Planning Agents</h3><h3>Reactive Agent</h3><ul><li>Decides one step at a time</li><li>Simpler</li><li>More adaptable</li><li>Less organized</li></ul><h3>Planning Agent</h3><ul><li>Thinks ahead</li><li>More structured</li><li>More efficient sometimes</li><li>Easier to derail</li></ul><p>Most modern agents combine both approaches.</p><h3>Why Replanning Is More Important Than Planning</h3><p>This is the key insight.</p><p>The best agents are not the ones with perfect plans.</p><p>They’re the ones that:</p><ul><li>Notice failure quickly</li><li>Adapt intelligently</li><li>Recover gracefully</li></ul><p>Rigid planning breaks.<br>Adaptive planning survives.</p><h3>A Simple Analogy</h3><p>Think about GPS navigation.</p><p>It:</p><ul><li>Creates a route</li><li>Watches traffic</li><li>Detects problems</li><li>Recalculates continuously</li></ul><p>That recalculation loop is exactly how many AI agents work.</p><h3>One Sentence to Remember</h3><blockquote><strong><em>Planning makes agents efficient. Replanning makes them reliable.</em></strong></blockquote><h3>What’s Next</h3><p>Next up:</p><p><strong>“Why AI Agents Need Rules Even When They’re Smart”</strong></p><p>Because intelligence without constraints creates very unpredictable systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01b00eda2b6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>