<?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 anirban on Medium]]></title>
        <description><![CDATA[Stories by anirban on Medium]]></description>
        <link>https://medium.com/@anirbandwrites?source=rss-270fdd857b9e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kM4V7WfP7DuXGDSIUX38FQ.jpeg</url>
            <title>Stories by anirban on Medium</title>
            <link>https://medium.com/@anirbandwrites?source=rss-270fdd857b9e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:21:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anirbandwrites/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[HTTP QUERY Method Made Simple]]></title>
            <link>https://medium.com/@anirbandwrites/http-query-method-made-simple-f0bad8450c5e?source=rss-270fdd857b9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0bad8450c5e</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[https]]></category>
            <dc:creator><![CDATA[anirban]]></dc:creator>
            <pubDate>Thu, 09 Jul 2026 12:21:55 GMT</pubDate>
            <atom:updated>2026-07-10T05:54:40.313Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q357NANEIdaaZ14PsiEF7Q.png" /></figure><p>HTTP finally got a new method after years. But what problem does it actually solve?</p><p>That’s exactly what we’ll answer in this article.</p><p>Don’t worry — we won’t start with RFCs, specifications, or complicated networking diagrams. Instead, we’ll understand the problem using an example we interact with almost every day.</p><p>Why? Because the easiest way to understand a technical concept is to relate it to something familiar. And what could be more familiar than shopping online?</p><p>Suppose we’re looking for a laptop on Amazon. We know exactly what we want to shop, so we start applying filters for our search:</p><ul><li>Laptops</li><li>Under ₹70,000</li><li>16GB RAM</li><li>SSD</li><li>HP or Asus</li><li>Rating above 4★</li><li>Delivery by tomorrow</li></ul><p>That’s already a lot of filters. Now let’s imagine adding hundreds more for specific port types, screen resolutions, and warranty lengths.</p><p>Somehow, all of this information has to reach Amazon’s server. So… how does HTTP typically send it?</p><h3>We all know GET Request…</h3><p>Usually, when we want to retrieve data, we reach for a simple <strong>GET</strong> request:</p><pre>GET /products?category=laptop</pre><p>Here <em>?category=laptop</em> is called <strong>query string</strong>. We added a filter in category of laptop. Okay, everything works. But as we add those filters, it starts looking like this:</p><pre>GET /products?brand=HP&amp;brand=Asus&amp;price_lt=70000&amp;rating_gt=4&amp;delivery=tomorrow&amp;ram=16&amp;storage=SSD</pre><p>Already a lot of filters, still ok. But imagine we add that hundreds or thousands of filters…the URL will look damn ugly.</p><p><strong>Problems:</strong></p><ul><li>URLs have practical length limits in browsers, servers, and proxies.</li><li>Very long URLs are hard to work with.</li><li>The entire query appears in the URL. That URL may appear in browser history, server access logs, analytics, monitoring tools, shared links. Even if sent over HTTPS, many systems still record the URL. Sometimes that’s undesirable.</li></ul><p>Now HTTP already has a place for sending lots of data. The <strong>body — </strong>body is where we can send large amounts of structured data. Bodies can be megabytes if needed. That’s great!</p><p>Can GET have a body?</p><p>Technically…Some HTTP implementations allow it.</p><p>But…</p><p><strong>Most servers, browsers, proxies, caches, frameworks, and libraries either ignore GET bodies or don’t support them consistently.</strong></p><p>So we generally avoid sending request bodies with GET.</p><h3>Why Not Use POST?</h3><p>At this point, every developer has asked this question. Why not just use <strong>POST</strong> and send a nice, clean JSON body?</p><pre>POST /search</pre><p>Body:</p><pre>{<br>  &quot;brand&quot;: [<br>    &quot;HP&quot;,<br>    &quot;Asus&quot;<br>  ],<br>  &quot;price&quot;: {<br>    &quot;max&quot;: 70000<br>  }<br>}</pre><p>Looks much cleaner, right? Great! Problem solved?</p><p>No.</p><h4><strong>POST has a different meaning.</strong></h4><p>POST actually means “I want to change something”. For example:</p><pre>POST /orders</pre><p>Used to place an order. Something changes on the server. Our order count goes from let’s say 9 to 10 orders.</p><p>Searching for products doesn’t change anything. We’re just looking. Using <strong>POST </strong>for a search feels like using a screwdriver as a hammer :) It works... but that&#39;s not what it was made for.</p><h3>Let’s meet the hero — QUERY</h3><p>QUERY method says:</p><blockquote>“I’m sending a body…”</blockquote><p>AND</p><blockquote>“…I’m only reading data.”</blockquote><p>That’s interesting right?</p><p>Strip away all RFC jargon, simply, QUERY lets the client send complex queries (JSON, SQL, XPath, GraphQL) in the body. Means, instead of squeezing everything into the URL, we simply send the query inside the request body and that’s for the purpose of read.</p><p>Let’s see an example:</p><pre>QUERY /products</pre><p>Body:</p><pre>{<br>    &quot;brand&quot;:[&quot;HP&quot;,&quot;Asus&quot;],<br>    &quot;price&quot;:{<br>        &quot;max&quot;:70000<br>    }<br>}</pre><p>And get response as usual manner. That’s it.</p><h3>Safe, Idempotent, and Cacheable</h3><p>If we go through the <a href="https://www.rfc-editor.org/info/rfc10008/">RFC 10008: The HTTP QUERY Method documentation</a>, we’ll encounter these three terms for many times. And these are important points to discuss about. That’s why I thought breaking them down.</p><p>Let’s understand these terms very easily…</p><h4><strong>Safe:</strong></h4><p>Safe simply means: <em>“Nothing on the server changes.”</em></p><p>Let’s imagine creating user or placing order. If there’s 100 users previously, new user will be added, let’s say user incremented by 10 — state changed; or new orders placed, number of orders increased — state changed.</p><p>Same goes with deleting and updating data.</p><p><strong>QUERY </strong>promises that it only reads like <strong>GET</strong>.</p><p><strong>PUT/PATCH/DELETE — </strong>These are unsafe (modify state) and are not replaced by QUERY. We should use these only for changes.</p><h4>Idempotent:</h4><p>Don’t worry if the word idempotent sounds intimidating. It’s much simpler than it looks.</p><p>Let’s imagine pressing an elevator button. We press it once the elevator comes. You press it 20 times… still, only one elevator comes. Nothing extra happens. That’s idempotent.</p><p>Now let’s think of Amazon. If we click “Buy Now” 20 times, we might end up with 20 laptops. That is <em>not</em> idempotent.</p><p>If we send a <strong>QUERY </strong>to &quot;Search Laptop&quot; 20 times, we still just get the same search results. Nothing changes on the server. <strong>Idempotent</strong>.</p><p>So,<strong> GET </strong>request is idempotent, but <strong>POST </strong>is not.</p><h4><strong>Cacheable:</strong></h4><p>Let’s imagine 1000 users perform the exact same search.</p><pre>QUERY /products<br><br>Body<br><br>{<br>    &quot;category&quot;:&quot;Laptop&quot;<br>}</pre><p>The first request reaches the server. Server responds with 120 laptops.</p><p>A cache stores the result.</p><p>The next 999 users can receive the cached response (if the server’s caching policy allows it), instead of making the backend perform the same search again.</p><p>That’s much harder to do with POST because POST is generally treated as potentially modifying state.</p><p>Because <strong>QUERY </strong>it is safe and idempotent, servers and browsers know they can safely cache the results.</p><h3>The Header Trio: Accept-Query, Content-Type, and Vary</h3><p>Because <strong>QUERY</strong> a body passes to fetch data, the client and server need a clear handshake. Three headers make this work:</p><ol><li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Type"><strong>Content-Type</strong></a><strong> (Mandatory for Clients):</strong> Unlike POST , we can&#39;t be lazy here. If we send a JSON query, we <strong>must</strong> declare</li></ol><pre>Content-Type: application/json</pre><p>If it&#39;s missing or wrong, the server will instantly reject the request.</p><p>2. <a href="https://www.rfc-editor.org/info/rfc10008/#name-the-accept-query-header-fie"><strong>Accept-Query</strong></a><strong> (New Server Header):</strong> This is how the server tells the browser its capabilities. It says: <em>&quot;I support the QUERY method, but only if you send the body in these exact formats&quot;. </em>For example:</p><pre>Accept-Query: application/json, application/graphql</pre><p>3. <a href="https://www.rfc-editor.org/info/rfc9110/#name-vary"><strong>Vary </strong></a><strong>(Crucial for Caching):</strong> Since QUERY responses are cached, the server uses Vary to protect data. It tells the cache: <em>&quot;Don&#39;t just look at the URL and body. If a new request has a different language or login token, don&#39;t show them the cached results.&quot;</em></p><pre>Vary: Accept-Query, Content-Encoding, Content-Type</pre><h3>CORS (Cross-Origin Resource Sharing)</h3><p><strong>QUERY </strong>does not introduce fundamentally new threats beyond HTTP; the <a href="https://www.rfc-editor.org/info/rfc10008/#section-4">RFC </a>states it “<em>is subject to the same general security considerations as all HTTP methods</em>”. So, we’ve to concerned about CSRF, CORS, Injection, Authentication/Authorization, Transport Security etc.</p><p>Here I only chose CORS to discuss just in brief, rest of the security preventions I will discuss another day.</p><p>Because QUERY is not one of the three “simple” methods (GET/POST/HEAD) and has a non-standard name, any browser using it cross-origin will trigger a CORS preflight (OPTIONS). We’ve to ensure our CORS policy permits QUERY if needed.</p><p>Here’s how we might configure that in an Express/Node.js app:</p><pre>app.use(cors({<br>    methods: [<br>        &quot;GET&quot;,<br>        &quot;POST&quot;,<br>        &quot;QUERY&quot; // Explicitly allow QUERY<br>    ]<br>}));</pre><h3>Server/Client Support</h3><p>Support for QUERY is still rolling out:</p><ul><li><strong>Browsers/Clients:</strong> All modern clients allow arbitrary method strings. For example, JavaScript <em>fetch()</em> and XHR accept <em>fetch(url, {method: “QUERY”, body:{…}}) </em>(just like any other method). cURL also allow <em>curl -x QUERY</em>.</li><li><strong>Node.js:</strong> The Node.js <em>http/http2</em> library recognizes custom methods. As of Node 26.5.0+, the built-in HTTP parser supports the QUERY token. Thus Node servers can handle QUERY like any other method.</li><li>Also, <strong>Python</strong> and <strong>Java </strong>supports QUERY as even if most web frameworks do not natively support it but they generally accept it as an unknown method if we configure our routes.</li></ul><h3>Node.js Example</h3><p>I love Node.js, so here’s an example:</p><pre>const http = require(&#39;http&#39;);<br><br>const server = http.createServer((req, res) =&gt; {<br>    if (req.method === &quot;QUERY&quot; &amp;&amp; req.url === &quot;/products&quot;) {<br>        let body = &#39;&#39;;<br>        <br>        req.on(&#39;data&#39;, chunk =&gt; {<br>            body += chunk.toString();<br>        });<br>        <br>        req.on(&#39;end&#39;, () =&gt; {<br>            console.log(&quot;Received QUERY body:&quot;, JSON.parse(body));<br>            res.writeHead(200, {<br>                &#39;Content-Type&#39;: &#39;application/json&#39;,<br>                &#39;Accept-Query&#39;: &#39;application/json&#39;<br>            });<br>            res.end(JSON.stringify({ success: true}));<br>        });<br>    }<br>});<br><br>server.listen(3000);</pre><h3>Browser Example</h3><p>Triggering a QUERY from the frontend using the native fetchAPI looks just like a POST request, but with the new method:</p><pre>await fetch(&quot;/products&quot;, {<br>    method: &quot;QUERY&quot;,<br>    body: JSON.stringify({<br>        brand: [&quot;HP&quot;, &quot;Asus&quot;],<br>        price: { max: 70000 }<br>    }),<br>    headers: {<br>       &quot;Content-Type&quot;: &quot;application/json&quot;<br>    }<br>});</pre><h3>How Do I Migrate?</h3><p>Keep it simple.</p><p>If today you have an POST /search endpoint that never changes data on the server... QUERY is a perfect candidate.</p><p>However, I think there is no need to migrate immediately. Support across browsers, proxies, and web frameworks is still catching up.</p><h3>Give it a try…</h3><p>It’s time to try it yourself.</p><pre>const http = require(&quot;node:http&quot;);<br>const fs = require(&quot;node:fs&quot;);<br>const path = require(&quot;node:path&quot;);<br><br>const PORT = process.env.PORT || 3000;<br>const PRODUCTS_PATH = path.join(__dirname, &quot;products.json&quot;);<br><br>function loadProducts() {<br>  const raw = fs.readFileSync(PRODUCTS_PATH, &quot;utf8&quot;);<br>  return JSON.parse(raw);<br>}<br><br>function readBody(req) {<br>  return new Promise((resolve, reject) =&gt; {<br>    const chunks = [];<br>    req.on(&quot;data&quot;, (chunk) =&gt; chunks.push(chunk));<br>    req.on(&quot;end&quot;, () =&gt; resolve(Buffer.concat(chunks).toString(&quot;utf8&quot;)));<br>    req.on(&quot;error&quot;, reject);<br>  });<br>}<br><br>function sendJson(res, statusCode, payload) {<br>  const body = JSON.stringify(payload, null, 2);<br>  res.writeHead(statusCode, {<br>    &quot;Content-Type&quot;: &quot;application/json&quot;,<br>    &quot;Content-Length&quot;: Buffer.byteLength(body),<br>  });<br>  res.end(body);<br>}<br><br>function matchesFilter(product, filter) {<br>  return Object.entries(filter).every(([key, value]) =&gt; {<br>    if (!(key in product)) return false;<br>    return String(product[key]).toLowerCase() === String(value).toLowerCase();<br>  });<br>}<br><br>const server = http.createServer(async (req, res) =&gt; {<br>  const { method, url } = req;<br>  console.log(`[request] ${method} ${url}`);<br><br>  if (url === &quot;/products&quot; &amp;&amp; method === &quot;QUERY&quot;) {<br>    // The whole point of this test: does Node&#39;s http module let a QUERY<br>    // request carry a JSON body, and does req.method report &quot;QUERY&quot;?<br>    let filter = {};<br>    try {<br>      const rawBody = await readBody(req);<br>      if (rawBody.trim().length &gt; 0) {<br>        filter = JSON.parse(rawBody);<br>      }<br>    } catch (err) {<br>      return sendJson(res, 400, {<br>        error: &quot;Invalid JSON body&quot;,<br>        detail: err.message,<br>      });<br>    }<br><br>    const products = loadProducts();<br>    const results =<br>      Object.keys(filter).length &gt; 0<br>        ? products.filter((p) =&gt; matchesFilter(p, filter))<br>        : products;<br><br>    return sendJson(res, 200, {<br>      method: req.method,<br>      receivedFilter: filter,<br>      count: results.length,<br>      results,<br>    });<br>  }<br><br>  if (url === &quot;/products&quot; &amp;&amp; method === &quot;GET&quot;) {<br>    return sendJson(res, 200, loadProducts());<br>  }<br><br>  if (url === &quot;/&quot; &amp;&amp; method === &quot;GET&quot;) {<br>    return sendJson(res, 200, {<br>      message: &quot;Pure Node.js HTTP QUERY method test server&quot;,<br>      nodeVersion: process.version,<br>      try: [<br>        &quot;GET /products&quot;,<br>        &#39;QUERY /products with JSON body, e.g. {&quot;category&quot;:&quot;Laptop&quot;}&#39;,<br>      ],<br>    });<br>  }<br><br>  sendJson(res, 404, { error: &quot;Not found&quot;, method, url });<br>});<br><br>server.on(&quot;clientError&quot;, (err, socket) =&gt; {<br>  console.error(&quot;[clientError]&quot;, err.message);<br>  if (socket.writable) {<br>    socket.end(&quot;HTTP/1.1 400 Bad Request\r\n\r\n&quot;);<br>  }<br>});<br><br>server.listen(PORT, () =&gt; {<br>  console.log(`Server listening on http://localhost:${PORT}`);<br>  console.log(`Node version: ${process.version}`);<br>  console.log(&quot;&quot;);<br>  console.log(&quot;Test the QUERY method with:&quot;);<br>  console.log(<br>    `  curl -i -X QUERY http://localhost:${PORT}/products -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;category&quot;:&quot;Laptop&quot;}&#39;`,<br>  );<br>});</pre><ol><li>Copy the raw Node.js script from above and start the server (<em>node server.js</em>).</li><li>Open your terminal and send a request using <em>curl </em>:</li></ol><pre>curl -i -X QUERY http://localhost:${PORT}/products \<br>-H &quot;Content-Type: application/json&quot; \<br>-d &#39;{&quot;category&quot;:&quot;Laptop&quot;}&#39;</pre><p><em>(Add some dummy data in a products.json file beforehand)</em></p><p>Now, try modifying the script to handle a GET and a POST request to the same endpoint. Compare how your terminal and your server react to each one.</p><p>I guess I have discussed QUERY keeping it as simple as possible :)</p><p>If you’ve made it this far, I highly recommend reading the official <a href="https://www.rfc-editor.org/info/rfc10008/"><strong>RFC</strong></a> as well. It contains many technical details, examples, and edge cases that I couldn’t cover in this beginner-friendly guide.</p><p>Now you can share your feedbacks if you’ve tried QUERY already in your project or just for testing.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0bad8450c5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t Wait for the Ship, Learn to Swim]]></title>
            <link>https://medium.com/@anirbandwrites/dont-wait-for-the-ship-learn-to-swim-d8b25239fb10?source=rss-270fdd857b9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8b25239fb10</guid>
            <category><![CDATA[love]]></category>
            <category><![CDATA[self-dependence]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[patience]]></category>
            <dc:creator><![CDATA[anirban]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 21:46:53 GMT</pubDate>
            <atom:updated>2026-07-06T21:46:53.849Z</atom:updated>
            <content:encoded><![CDATA[<p>Shahrukh was the kind of person who always smiled. He laughed easily, made people around him happy, and believed that good things eventually happened to good people.</p><p>Then came his second heartbreak.</p><p>But to understand that, you need to know about the first one.</p><p>His first relationship was everything he could have asked for. He gave it his full attention, his honesty, and his trust. They barely fought, and from his side, nothing seemed wrong. Yet one day, she left. No explanation that made sense. No closure that felt satisfying.</p><p>It hurt.</p><p>After months of overthinking, he finally accepted one lesson:</p><p><em>“Maybe life is unfair. I gave my everything, and still it ended. Next time, I’ll never get too attached.”</em></p><p>It wasn’t bitterness. It was self-protection.</p><p>A year later, life surprised him.</p><p>He met Kajol.</p><p>This time, Shahrukh decided to be careful. He kept his feelings hidden, convinced that saying them aloud would only complicate things. But the more time they spent together, the stronger their friendship became. Somewhere between late-night conversations and shared laughter, friendship quietly turned into love.</p><p>One day, he finally confessed.</p><p>He wasn’t expecting anything. In fact, he was prepared for rejection. He simply wanted peace of mind instead of carrying the secret forever.</p><p>Then something unexpected happened.</p><p>Kajol smiled and confessed that she loved him too.</p><p>It was one of those movie moments — dramatic, emotional, almost too perfect to be real.</p><p>And just like that, Shahrukh was on cloud nine.</p><p>More than the relationship itself, Kajol helped him heal. The boy who once feared getting attached slowly became emotionally stronger and more mature.</p><p>Life finally seemed to be on his side.</p><p>But life loves changing the script.</p><p>There was no betrayal this time. No third person. No dramatic fight.</p><p>They simply had to move to different cities for their higher studies.</p><p>Kajol went to Delhi.</p><p>Shahrukh stayed in Assam.</p><p>A long-distance relationship wasn’t part of their plan, but neither of them had a choice. They promised to make it work.</p><p>Months turned into a year.</p><p>They didn’t meet even once.</p><p>Shahrukh even tried to get admission in Delhi so they could be closer again, but nothing worked out.</p><p>Another six months passed.</p><p>Slowly, without either of them noticing, the long conversations became shorter. Calls became less frequent. Life became busier.</p><p>Then came an evening just before Bihu.</p><p>Kajol called.</p><p>She sounded tired.</p><p>She told him that she had been dealing with health problems, academic backlogs, and constant stress. Managing everything had become difficult, and somewhere in that chaos, she had started feeling that maybe a relationship couldn’t survive such a long distance.</p><p>She wasn’t saying she had stopped loving him.</p><p>She was saying she had stopped believing she could handle everything at once.</p><p>After a painful conversation, they decided to end the relationship.</p><p>For Shahrukh, it felt like everything had collapsed again. He didn’t insisted her to stay as his brain strikes the lesson he got from the first heartbreak — don’t get attached too much.</p><p>He smiled and bid a bye. But back of his mind, he couldn’t accept it so easily. It felt like something happened in so sudden and in odd manner.</p><p>For months, he waited.</p><p>He kept hoping.</p><p>He kept imagining that maybe one day she’d return.</p><p>Days slowly turned into weeks, and weeks into months.</p><p>The breakup wasn’t the only thing weighing him down. His studies weren’t going the way he wanted. Career uncertainty kept growing. The admission he had hoped for never happened. Every part of life seemed to demand more from him than he had left to give.</p><p>There were evenings when he felt completely alone.</p><p>More than wanting Kajol back as his girlfriend, he missed having someone who simply stood beside him. Someone who listened when life became too heavy. Someone who reminded him that he wasn’t fighting every battle by himself.</p><p>Many nights he wondered, <em>“Why did she leave exactly when I needed her the most?”</em></p><p>The more he thought about it, the more he convinced himself that he couldn’t move forward unless she came back. He believed that only Kajol could bring back the peace he had lost. Without her, every problem looked bigger, every failure felt heavier, and every day seemed harder than the last.</p><p>He didn’t realize that, without intending to, he had made one person the center of his strength. And when she was gone, it felt as if all his strength had disappeared with her.</p><p>One day one of Shahrukh’s closest friends visited him. They met after a long. Went to the riverside they used to hang out in their school days. He sat beside him and said something he would remember for the rest of his life.</p><p>“Imagine you’re drowning in the middle of a river,” his friend said.</p><p>“Would you wait there for a ship to come and save you?”</p><p>Shahrukh shook his head.</p><p>“Of course not.”</p><p>“You would try to swim.”</p><p>His friend continued,</p><p>“And if you’re standing safely on the shore today, don’t spend your time looking at the river and hoping a rescue ship will always be there. Use this time to learn how to swim. Because life won’t stop throwing rivers in front of you.”</p><p>Shahrukh stayed silent.</p><p>His friend wasn’t talking about Kajol anymore.</p><p>He was talking about life.</p><p>We often misunderstand patience.</p><p>Patience doesn’t mean sitting still and hoping that one person, one opportunity, or one miracle will come and fix everything. That’s not patience. That’s waiting with your life on hold.</p><p>Real patience looks different.</p><p>It means waking up every morning and doing your work even when your heart feels heavy. It means studying when your mind wants to overthink. It means taking care of your health, talking to people who care about you, learning new things, and becoming stronger — even when the result is uncertain.</p><p>You’re still waiting.</p><p>But you’re not waiting for someone else.</p><p>You’re waiting for yourself.</p><p>You’re waiting for the day when you wake up and realize that your happiness is no longer hanging by a single thread. You’re waiting for the day when memories don’t hurt as much, when hope doesn’t feel desperate, and when your peace doesn’t depend on someone else’s decision.</p><p>That is a different kind of waiting.</p><p>And that waiting is powerful because every single day, you’re moving.</p><p>Life has never promised a smooth road. It has always been a journey of ups and downs. Sometimes people stay. Sometimes they leave. Sometimes they come back. Sometimes they don’t.</p><p>The only thing you can truly control is the person you’re becoming while all these things are happening.</p><p>That day, Shahrukh made a decision.</p><p>He would stop waiting for life to become easy.</p><p>Instead, he would become stronger.</p><p>He focused on his studies. He looked after his health. He spent time with his family and friends. Slowly, he started building a life that didn’t depend on a single phone call.</p><p>He wasn’t running away from love.</p><p>He was simply refusing to pause his own life for it.</p><p>Then something unexpected happened.</p><p>Exactly after a month or two, his phone rang.</p><p>It was Kajol.</p><p>She admitted she had never stopped loving him. The pressure of her health, her exams, and the distance had made her believe that ending the relationship was the only solution.</p><p>They got back together.</p><p>Shahrukh smiled.</p><p>Not because his waiting had finally been rewarded.</p><p>But because he now understood something much bigger.</p><p>The phone call was never the reward.</p><p>The reward was the person he had started becoming before that phone rang.</p><p>And maybe that’s how life works.</p><p>When you spend all your time waiting for an angel to come and save you, you forget that life is still moving.</p><p>But when you spend that same time becoming stronger, kinder, wiser, and more capable, something beautiful happens.</p><p>One day, you realize you don’t need to wait for that angel anymore.</p><p>You’ve learned how to stand on your own.</p><p>And strangely, that’s often the moment when life surprises you.</p><p>Maybe the angel comes back.</p><p>Maybe a different angel enters your life.</p><p>Or maybe you discover that the strength you were searching for in someone else had quietly grown inside you all along.</p><p>Either way, you don’t lose.</p><p>Because you’ve already learned how to swim.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8b25239fb10" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are you “Astika” or “Nastika”?]]></title>
            <link>https://medium.com/@anirbandwrites/are-you-astika-or-nastika-7e1289cab99f?source=rss-270fdd857b9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e1289cab99f</guid>
            <category><![CDATA[vedas]]></category>
            <category><![CDATA[indian-philosophy]]></category>
            <category><![CDATA[etymology]]></category>
            <category><![CDATA[history]]></category>
            <category><![CDATA[hinduism]]></category>
            <dc:creator><![CDATA[anirban]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 06:16:33 GMT</pubDate>
            <atom:updated>2026-07-06T06:16:33.139Z</atom:updated>
            <content:encoded><![CDATA[<p>In India, and specifically within Hinduism, whenever someone is asked about their belief in God, they are immediately categorized as an “astika” or a “nastika.” The reverse is also true: the moment the words “astika” or “nastika” enter a conversation, the topic of believing in God follows.</p><p>But have you ever wondered where these two words actually originated? What do they mean etymologically?</p><p>Let’s break it down first —</p><h3>The Root of the Matter: “It Exists”</h3><p>Etymologically, these words don’t actually contain the word for “God” at all.</p><p>They stem from the Sanskrit root <strong>asti</strong> (अस्ति), which simply means “it is” or “there exists.”</p><ul><li><strong>Astika (आस्तिक):</strong> Derived from <em>asti</em>. It refers to someone who affirms that “it exists.”</li><li><strong>Nastika (नास्तिक):</strong> Derived from combining <em>na</em> (not) + <em>asti</em> (is). It refers to someone who says “it does not exist.”</li></ul><p>To understand this better, we have to look at the greatest grammarian of ancient India, <strong>Pāṇini</strong>. In his foundational text, the <em>Aṣṭādhyāyī</em> (4.4.60), he laid down a formula for these words:</p><blockquote>“asti nāsti diṣṭam matiḥ”</blockquote><p>Roughly translated, he defined an <em>astika</em> as a person whose <em>mati</em> (belief or mind) is firmly rooted in the concept of <em>asti</em> (“it is”). A <em>nastika</em> is someone whose belief is rooted in <em>nāsti</em> (“it is not”).</p><p>If you look closely you’ll notice that he simply said “it exists.” <strong>He never actually defined what the “it” is.</strong></p><p>Different thinkers filled in that blank over the centuries completely changed the meaning of the word.</p><h3>Filling the Blank: It’s About the Texts, Not the Creator</h3><p>The systems of Indian Philosophy aren’t divided by the debate whether the God exists or not but <strong>epistemological authority</strong> — specifically, the authority of Vedas.</p><p>And this is how Vedas helped to fill the blank —</p><p><strong>The Astika (Orthodox) Schools:</strong> The six classical orthodox schools of Hindu philosophy (<em>Shad Darshanas</em>), namely, Mimamsa, Vedanta, Samkhya, Yoga, Nyaya and Vaisheshika accepted the Vedas as a valid, ultimate source of knowledge, and stamped as Astika, not because they believe in God.</p><p><strong>The Nastika (Heterodox) Schools:</strong> For them, <em>nāsti</em> meant “The authority of the Vedas does not exist.” If a system rejected Vedic authority and rituals, it was classified as Nastika — no matter how deeply spiritual or moral it was. The three most famous Nastika schools are Charvaka (the school of materialists), Buddhism and Jainism.</p><p>Here is where the modern definition truly shatters. If we define “nastika” simply as “atheist,” we mischaracterize massive chunks of Indian history. Buddhists and Jains weren’t rejecting a spiritual life or the concept of liberation; they were rejecting a specific <em>textual authority</em>.</p><h3>The Twist of Atheist Astika</h3><p>The absolute best proof that “astika” originally had nothing to do with a creator God is the <strong>Samkhya</strong> school. It is one of the oldest, most respected orthodox schools. It believes in the authoritativeness of the Vedas but does not believe in God as the creator of the world.</p><p>Also <strong>Mimamsa</strong>, they emphasized the ritualistic aspect of Vedas not believing in God as the supreme creator. They believe in the reality of the physical world.</p><p>See, following the Vedas and not believing in God are existing parallelly.</p><h3>Conclusion: Why the True Meaning Matters</h3><p>By forgetting the original meaning, we lose sight of something profoundly beautiful about our own intellectual heritage. Ancient Indian philosophy was not a rigid. It was vast. It was a culture where you could completely deny the existence of a creator God, yet still be deeply respected as an orthodox thinker.</p><p>So, the next time someone asks you if you are an “astika ”or a “nastika”, you can smile and tell them the truth: it completely depends on which century they are asking about.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e1289cab99f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Why are you still using classes in React?”]]></title>
            <link>https://medium.com/@anirbandwrites/why-are-you-still-using-classes-in-react-270a9b807f47?source=rss-270fdd857b9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/270a9b807f47</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[object-oriented-concepts]]></category>
            <category><![CDATA[class]]></category>
            <dc:creator><![CDATA[anirban]]></dc:creator>
            <pubDate>Sat, 04 Jul 2026 07:06:27 GMT</pubDate>
            <atom:updated>2026-07-04T07:06:27.371Z</atom:updated>
            <content:encoded><![CDATA[<p>A few days ago, one of my friends looked at my code and asked,</p><blockquote><em>“Wait… I thought class components are dead. Why are you still writing classes in React?”</em></blockquote><p>For a second, I smiled because I knew exactly where the confusion was coming from. He wasn’t wrong.</p><p>But he was mixing up <strong>React Class Components</strong> with <strong>normal JavaScript classes</strong>. And trust me, a lot of developers make the same mistake.</p><p>Let’s clear it up once and for all.</p><h3>The biggest misconception</h3><p>When React introduced Hooks, everyone started saying:</p><blockquote><em>“Don’t use classes anymore.”</em></blockquote><p>What React actually meant was:</p><blockquote><strong><em>Don’t use Class Components anymore.</em></strong></blockquote><p>It <strong>didn’t</strong> mean JavaScript classes became obsolete. Those are two completely different things.</p><h3>React Class Components</h3><p>Back then, if you wanted to create a UI component, you’d write something like this:</p><pre>class Counter extends React.Component {<br>  state = { count: 0 };<br><br>  render() {<br>    return (<br>      &lt;button onClick={() =&gt; this.setState({ count: this.state.count + 1 })}&gt;<br>        {this.state.count}<br>      &lt;/button&gt;<br>    );<br>  }<br>}</pre><p>Notice something important?</p><pre>extends React.Component</pre><p>This isn’t just a regular JavaScript class anymore.</p><p>By extending React.Component, your class becomes part of React&#39;s rendering system. React now manages it.</p><p>It knows:</p><ul><li>when to render it</li><li>when to update it</li><li>when to destroy it</li><li>how to manage its state</li><li>how to call lifecycle methods</li></ul><p>Your class isn’t controlling the application anymore.</p><p><strong>React is.</strong></p><h3>Then Hooks arrived</h3><p>Now the exact same component looks like this:</p><pre>function Counter() {<br>  const [count, setCount] = useState(0);<br>  return (<br>    &lt;button onClick={() =&gt; setCount(count + 1)}&gt;<br>      {count}<br>    &lt;/button&gt;<br>  );<br>}</pre><p>No constructor.</p><p>No this.</p><p>No render().</p><p>No lifecycle methods.</p><p>Less code. Easier to read. Easier to reuse logic.</p><p>That’s why modern React recommends <strong>Function Components + Hooks</strong>.</p><h3>But then why do I still write classes?</h3><p>Because <strong>those aren’t React components. </strong>They’re just <strong>normal JavaScript classes</strong>.</p><p>For example:</p><pre>class ApiClient {<br>  async get(url) {}<br>  async post(url, body) {}<br>}</pre><p>Or</p><pre>class WebSocketManager {<br>  connect() {}<br>  disconnect() {}<br>  reconnect() {}<br>}</pre><p>Or</p><pre>class EmailValidator {<br>  validate(email) {}<br>}</pre><p>None of these are UI.</p><p>None of them extend React.Component.</p><p>They’re simply objects that help organize business logic.</p><h3>Analogy time</h3><p>Imagine we’re building a food delivery app. Our React components are responsible for showing the UI.</p><pre>&lt;OrderPage /&gt;<br>&lt;Cart /&gt;<br>&lt;Login /&gt;</pre><p>But somewhere behind the scenes, we still need something that:</p><ul><li>talks to the API</li><li>manages WebSocket connections</li><li>validates data</li><li>parses files</li><li>handles authentication</li><li>caches responses</li></ul><p>These are <strong>services</strong>, not UI.</p><p>And sometimes a class is the perfect way to represent them.</p><h3>Why are normal classes still recommended?</h3><p>Because classes are excellent when you have an object with:</p><ul><li>its own state</li><li>multiple related methods</li><li>a long lifecycle</li><li>clear responsibility</li></ul><p>Take a WebSocket manager (I think I’ve used this example the most :)).</p><pre>class WebSocketManager {<br>  constructor() {<br>    this.socket = null;<br>  }<br>  connect() {}<br>  disconnect() {}<br>  reconnect() {}<br>  send(message) {}<br>}</pre><p>Everything related to the socket <strong>lives in one place</strong>. The data and the behavior stay together. That’s classic <strong>Object-Oriented Programming</strong>, and it still makes perfect sense today.</p><h3>Could I write everything as functions?</h3><p>Absolutely.</p><p>A simple helper like this doesn’t need a class.</p><pre>function add(a, b) {<br>  return a + b;<br>}</pre><p>But imagine managing a WebSocket using only standalone functions. Soon you have shared variables floating around everywhere.</p><p>A class groups the state and the methods that operate on that state into one neat package.</p><p>That’s exactly what classes were designed for.</p><h3>The fundamental difference</h3><p>A <strong>React Class Component</strong> exists to describe and manage <strong>UI</strong>.</p><p>A <strong>normal JavaScript class</strong> exists to model <strong>objects and business logic</strong>.</p><p>One belongs to React. The other belongs to JavaScript. React replaced the first one. It never replaced the second.</p><h3>The takeaway</h3><p>So the next time someone says,</p><blockquote><em>“Why are you still using classes in React?”</em></blockquote><p>You can simply reply,</p><blockquote><em>“I’m not using React Class Components. I’m using JavaScript classes.”</em></blockquote><p>One is a way to build user interfaces. The other is a way to model objects and organize complex logic. React moved away from using classes for UI because Hooks offered a cleaner solution.</p><p>But Object-Oriented Programming didn’t disappear overnight.</p><p>In fact, for services, managers, parsers, SDKs, API clients, caching layers, and many other real-world scenarios, <strong>a well-designed JavaScript class is still one of the cleanest solutions you can write.</strong></p><p>The key isn’t to avoid classes.</p><p>The key is to use the <strong>right abstraction for the right problem.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=270a9b807f47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Those People]]></title>
            <link>https://medium.com/@anirbandwrites/those-people-26b96dc733b8?source=rss-270fdd857b9e------2</link>
            <guid isPermaLink="false">https://medium.com/p/26b96dc733b8</guid>
            <category><![CDATA[self-reflection]]></category>
            <category><![CDATA[conciousness]]></category>
            <category><![CDATA[gratitude]]></category>
            <dc:creator><![CDATA[anirban]]></dc:creator>
            <pubDate>Tue, 16 Jun 2026 22:19:42 GMT</pubDate>
            <atom:updated>2026-06-16T22:19:42.305Z</atom:updated>
            <content:encoded><![CDATA[<p>Swayam sits down to write about the people who have been the greatest supporting pillars throughout his life. Not just supporting pillars — they have been the artisans of the thought processes he carries within him today.</p><p>Swayam has always been an eager observer of people — people around him. He simply loves doing that. But he feels that <em>“those people”</em> have been the catalysts that sharpened his power of observation. In different phases of his life, different people made their perfectly timed heroic entries. He didn’t even know he needed them back then. But they appeared, and how they appeared; they stayed with him, and how they stayed!</p><p>And the most surprising thing Swayam realizes now is that their entries and their presences are becoming more and more connected with each passing day. It’s as if the universe has written their characters to meet another character — Swayam himself — for a bigger purpose, a bigger mission, an ultimate…</p><p>Nope, he is drifting into another dimension again. Let’s bring Swayam back to reality.</p><p>You know Swayam observes people. So he started observing them more closely, as if he wants to discover some hidden pattern within them. But every time he gets close to understanding the pattern, the pattern upgrades itself. Instantly. At the exact same moment for all of them. And the more it happens, the more astonished he becomes.</p><p>Swayam wants to find more people of his age, more people he hangs out with, who have experienced the same thing. Nope. No one has <em>“those people.”</em> Swayam begins to doubt himself. Do they actually exist? Or are they just an illusion that somehow isn’t actually an illusion?</p><p>What rubbish!</p><p>He returns to his normal state of mind. Fine, let him consider them <em>“real”</em> according to the Charvaka philosophy. But then a new question arises in his mind — <em>why him?</em> Why was he chosen to meet <em>“those people”</em>? No way he has accumulated that much <em>punya</em> since childhood, come on! Then why? Is he really that lucky?</p><p>Swayam thinks, and thinks, and thinks…</p><p>But the bigger question about <em>“those people”</em> is yet to be answered: <strong>What should he do for them?</strong> Surely he should do something — not just something, but many things. But what exactly? And if he doesn’t, then what happens?</p><p>He cares about them. He shows concern. He tries to understand them more (actually, the hidden pattern… shhhhh), and what not! But the more he tries, the more he gets surrounded by them; the closer he feels to them, even as the physical distance between them grows longer and longer.</p><p>A damn <em>Inception</em>-level situation!</p><p>Suddenly, a thought crosses his mind. What if he is also considered one of <em>“those people”</em> by them?</p><p>Swayam’s mind just goes <strong>beep beep</strong> at that thought.</p><p>He simply doesn’t know what he can do for <em>“those people”</em> — for their kindness, for their contributions, for being there with him, for helping shape the person he is, and for many, many, many more things that he cannot even put into words. And he has a feeling that there are more people who will join the army of <em>“those people”</em> in the future. And as he thinks about them, they somehow come forward…</p><p>So, in the end, he comes to a conclusion. Perhaps the only thing he can truly do for <em>“those people”</em> is to express his gratitude —</p><p><strong>A lifelong gratitude.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26b96dc733b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>