<?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 Sriraksha on Medium]]></title>
        <description><![CDATA[Stories by Sriraksha on Medium]]></description>
        <link>https://medium.com/@sriraksha3337?source=rss-fd9947d3ae14------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FxIxKF8ObtQIcrU_hPqV0A.png</url>
            <title>Stories by Sriraksha on Medium</title>
            <link>https://medium.com/@sriraksha3337?source=rss-fd9947d3ae14------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 08:42:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sriraksha3337/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[CRA + Tailwind v4 Doesn’t Work. So I Stopped Supporting It.]]></title>
            <link>https://medium.com/@sriraksha3337/cra-tailwind-v4-doesnt-work-so-i-stopped-supporting-it-31ebef5a7acd?source=rss-fd9947d3ae14------2</link>
            <guid isPermaLink="false">https://medium.com/p/31ebef5a7acd</guid>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Sriraksha]]></dc:creator>
            <pubDate>Fri, 07 Aug 2026 18:51:35 GMT</pubDate>
            <atom:updated>2026-08-07T18:51:35.189Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Sometimes the smartest thing you can do is stop trying to fix something that’s broken.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UCx0lORyXeOp1lX6XNSXFw.jpeg" /></figure><p>This week I set out to add Tailwind support to <a href="https://github.com/sri443/react-clean-start"><strong>react-clean-start</strong></a>, my React project generator. The goal of the CLI is simple: generate a clean React project without all the boilerplate that usually gets deleted five minutes later anyway.</p><p>I expected Tailwind support to be a small feature.</p><p>For Vite, it was.</p><p>Everything worked in about an hour.</p><p>Then I moved on to Create React App.</p><p>That’s where I lost the rest of my week.</p><p>I started with Tailwind v4 using @tailwindcss/postcss, but couldn&#39;t get it working. So I dropped back to Tailwind 3, added a tailwind.config.js, and switched back to the classic @tailwind directives.</p><p>That somehow made it work…</p><p>Sometimes.</p><p>Most of the time it still didn’t.</p><p>The weirdest part was that reinstalling the exact same packages would randomly make it work. Then I’d do the exact same thing later and it’d be broken again.</p><p>I compared the generated project against one I’d built by hand, copied files between them, and checked everything I could think of. As far as I could tell, they were effectively identical.</p><p>The application always loaded.</p><p>Tailwind didn’t.</p><p>After a week of chasing it, I stopped trying to explain it and made a different decision.</p><p>I removed CRA + Tailwind support from <a href="https://github.com/sri443/react-clean-start"><strong>react-clean-start</strong></a> entirely and shipped Vite support only.</p><p>I also added a warning so anyone selecting CRA with Tailwind knows upfront: <em>“Don’t waste your time. I already tried.”</em></p><h3>What I Learned</h3><p>At first, removing support felt like admitting defeat.</p><p>Looking back, I think it was the right decision.</p><p>Create React App is effectively deprecated, and the React ecosystem has largely moved on to Vite and other modern bundlers. As the ecosystem moves on, fewer people test those older combinations, fewer issues get fixed, and compatibility problems become much harder to reason about.</p><p>That was the biggest takeaway for me. <em>Supporting modern tooling is often less work than supporting legacy tooling.</em></p><p><strong>Sometimes the most responsible release is the one that removes something broken.</strong></p><h3>🔗 Links</h3><ul><li><strong>GitHub:</strong> <a href="https://github.com/sri443/react-clean-start">github.com/sri443/react-clean-start</a></li><li><strong>npm:</strong> <a href="https://npmjs.com/package/react-clean-start">npmjs.com/package/react-clean-start</a></li></ul><p><em>Have you hit this too? Drop a comment. I need to know I’m not the only one who wasted a week on this.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31ebef5a7acd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turns Out Python Is Secretly Compiling Your Code… Under The Guise Of Interpretation]]></title>
            <link>https://medium.com/@sriraksha3337/turns-out-that-pycache-folder-python-keeps-making-thats-your-compiled-code-ddd6050a74c9?source=rss-fd9947d3ae14------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddd6050a74c9</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-internals]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Sriraksha]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 18:40:13 GMT</pubDate>
            <atom:updated>2026-04-14T19:16:01.736Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Python compiles your source before running it. It just never mentions this, and most people never notice.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFYiBfIkPbmHTYLaiCrYKQ.jpeg" /><figcaption>Photo by James Harrison on Unsplash</figcaption></figure><p>If you’ve been writing Python for a while, you’ve probably heard it called an interpreted language. It gets repeated in tutorials, interviews, language comparisons. The implication is that Python reads your source code line by line and runs it directly — no compilation involved.</p><p>That’s not quite what happens.</p><p>Python does compile your code. It just does it automatically, silently, before execution, without making it obvious. What it compiles to isn’t machine code — it’s something called bytecode. And once you understand what that is and where it goes, a lot of Python’s behaviour that seemed arbitrary starts making sense.</p><h3>The step that happens before your code runs</h3><p>When you run a Python script, the first thing Python does — and this is the part most people never realise is happening — is compile your source code into bytecode. Every time. Even for a one-liner.</p><p>If you’ve ever seen a __pycache__ folder appear in your project and ignored it, that&#39;s where this compiled bytecode ends up.<strong> Python stores the compiled </strong><strong>.pyc files there so it doesn&#39;t have to recompile unchanged files</strong> on the next run. That folder isn&#39;t clutter. It&#39;s evidence of the compilation step.</p><p>The compilation translates your .py source into a sequence of instructions for the <em>Python Virtual Machine</em>. These instructions are simpler and more uniform than source code. They&#39;re what actually gets executed. <strong>Your source file never runs directly.</strong></p><blockquote>The VM only ever sees bytecode. Execution never touches your source.</blockquote><h3>So what does this bytecode actually look like?</h3><p>Python ships with a module called <a href="https://docs.python.org/3/library/dis.html">dis</a> — short for disassembler — that lets you inspect the bytecode for any function. Here&#39;s a simple example:</p><pre>import dis<br><br>def add(a, b):<br>    return a + b<br><br>dis.dis(add)</pre><p>Running that produces something like this:</p><pre>2           0 RESUME                   0<br>3           2 LOAD_FAST                0 (a)<br>              4 LOAD_FAST                1 (b)<br>              6 BINARY_OP               0 (+)<br>             10 RETURN_VALUE</pre><p>Each line is one bytecode instruction. LOAD_FAST pushes a local variable onto an internal stack. BINARY_OP pops two values off, adds them, pushes the result back. RETURN_VALUE returns whatever is on top of the stack.</p><p>This is a stack-based virtual machine — like a very literal machine following a checklist. Every operation follows the same pattern: load some values, do something with them, put the result somewhere. Your Python source code — with its loops, comprehensions, class definitions, all of it — gets flattened into sequences of these instructions.</p><blockquote>Bytecode is the compiled intermediate form of your Python program. It’s not machine code — your CPU can’t run it directly. It runs on the Python VM, which is itself a C program (in <a href="https://github.com/python/cpython">CPython</a>).</blockquote><h3>So where does “interpreted” fit in?</h3><p>The Python VM interprets the bytecode. That’s where the interpretation actually happens. It reads each instruction one at a time and executes it. So the full picture is: Python <em>compiles</em> source to bytecode, then <em>interprets</em> the bytecode.</p><p>Calling Python “interpreted” isn’t completely wrong — there is an interpretation step. But saying it’s “not compiled” misses half the story. The distinction that actually matters for performance isn’t compiled vs interpreted anyway. It’s what the target is. C compiles to native machine code your CPU runs directly. Python compiles to bytecode that runs on a VM. The VM is the extra layer, and that’s where the overhead comes from.</p><blockquote>Calling Python “interpreted” isn’t completely wrong — But saying it’s “not compiled” misses half the story.</blockquote><h3>Why this matters in practice</h3><p>Once you have this mental model, a few things that seemed arbitrary start clicking.</p><p><strong>The </strong><strong>__pycache__ folder</strong> — Python caches compiled bytecode there. If the source file hasn&#39;t changed, Python loads the .pyc directly and skips recompilation. You can delete the folder freely; Python just regenerates it. It&#39;s a cache, not something you manage.</p><p><strong>Import times</strong> — when you import a module, Python compiles it to bytecode if needed, then runs the module-level code. Large modules feel slow on first import because of this. Subsequent imports are faster because the .pyc is reused.</p><p><strong>Why Python is slower than compiled languages</strong> — every bytecode instruction passes through the VM, which adds overhead that native machine code doesn’t have. This is the actual reason, not “because it’s interpreted.” The VM layer is the cost.</p><p><strong>Tools like</strong><a href="https://github.com/python/cpython"><strong> Cython</strong></a><strong>, </strong><a href="https://github.com/numba/numba"><strong>Numba</strong></a><strong>, and </strong><a href="https://github.com/pypy/pypy"><strong>PyPy</strong></a> all make more sense now. Cython translates Python to C, which compiles to machine code. Numba JIT-compiles numerical Python to native code at runtime. PyPy replaces CPython’s bytecode interpreter with a JIT compiler. They’re all attacking the same bottleneck — the VM layer — just from different angles.</p><h3>You can inspect any function’s bytecode</h3><p>The <a href="https://docs.python.org/3/library/dis.html">dis</a> module works on functions, classes, modules, and source strings. A few useful patterns:</p><pre>import dis<br><br># Disassemble a function<br>dis.dis(my_function)<br><br># Disassemble a lambda<br>dis.dis(lambda x: x * 2)<br><br># Disassemble a string of source code<br>dis.dis(&quot;x = 1 + 2&quot;)<br><br># Look at the code object directly<br>print(my_function.__code__.co_consts)<br>print(my_function.__code__.co_varnames)</pre><p>The __code__ attribute on any function holds the compiled code object — the bytecode instructions, the constants, the variable names, where the code came from. It&#39;s all in there.</p><p>Spending twenty minutes running dis on functions you already understand is genuinely worth it. List comprehensions, generator expressions, try/except blocks — they all look different at the bytecode level, and that difference explains their performance characteristics better than any benchmark.</p><h3>One implementation note</h3><p>Everything here is specific to <a href="https://github.com/python/cpython">CPython </a>— the reference implementation most people use. The bytecode format, the VM design, the .pyc caching — these are <a href="https://github.com/python/cpython">CPython&#39;s</a> choices, not requirements of Python-the-language.</p><p>Other implementations do it differently. <a href="https://wiki.python.org/jython/UserGuide">Jython</a> compiles to JVM bytecode. <a href="https://ironpython-test.readthedocs.io/en/latest/">IronPython</a> targets the .NET CLR. PyPy has its own bytecode and JIT. <a href="https://ironpython-test.readthedocs.io/en/latest/">MicroPython</a> uses a more compact format for constrained hardware. Same language, different execution paths.</p><p>CPython’s bytecode format also isn’t stable across versions. The .pyc files include a version magic number, which is why switching Python versions invalidates the cache and forces a recompile.</p><h3>Putting it together</h3><p>The interpreted/compiled label is a simplification, and like most simplifications it works until it doesn’t. For day-to-day Python work it genuinely doesn’t matter. But when you’re debugging performance, choosing tools, or just trying to understand why something behaves the way it does — having an accurate model beats a tidy label every time.</p><p>Python compiles your code to bytecode. The VM interprets that bytecode. The dis module lets you see what it compiled to. That&#39;s really all there is to it. Once you see the steps, the whole interpreted-vs-compiled debate starts feeling like a less interesting question.</p><p><em>All examples use </em><a href="https://github.com/python/cpython"><em>CPython</em></a><em> 3.12. Bytecode output varies between Python versions — instruction names and numbering changed notably in 3.11 and 3.12 with VM optimisations.</em></p><p>Connect:<br>LinkedIn —<a href="https://www.linkedin.com/in/sriraksha-8358492b3/"> https://www.linkedin.com/in/sriraksha-8358492b3/<br></a>GitHub —<a href="https://github.com/sri443">https://github.com/sri443</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddd6050a74c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Geodesic distance — what it is, and why I used it in my phone-based location alarm]]></title>
            <link>https://medium.com/@sriraksha3337/geodesic-distance-what-it-is-and-why-i-used-it-in-my-phone-based-location-alarm-ef4eef1a832f?source=rss-fd9947d3ae14------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef4eef1a832f</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[geospatial]]></category>
            <category><![CDATA[termux]]></category>
            <dc:creator><![CDATA[Sriraksha]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 17:33:18 GMT</pubDate>
            <atom:updated>2026-04-14T19:18:33.998Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Or: how the Earth’s curvature quietly sneaks into your GPS code, and why it actually matters even for short trips.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDUO8OYyZbjoC4hGlvbNUw.jpeg" /><figcaption>Photo by Vimal S on Unsplash</figcaption></figure><p>I was building a small location alarm on my Android phone using Termux — the kind that wakes you up when you’re close enough to your destination so you don’t oversleep on a bus or train. Nothing fancy. Just GPS coordinates, a threshold distance, and a ringtone.</p><p>At some point I needed to answer one question: <em>how far am I from where I’m going?</em> That’s where geodesic distance came in, and it turned out to be more interesting than I expected.</p><h3>The naive approach — and why it breaks</h3><p>When most people first try to calculate distance from two GPS coordinates, they do something like this:</p><pre># This feels right but it&#39;s wrong<br>import math<br>dist = math.sqrt((lat2 - lat1)**2 + (lon2 - lon1)**2)</pre><p>That gives you a straight-line distance in degrees — not meters, not kilometers. Degrees aren’t uniform distances. One degree of longitude near the equator is about 111 km. One degree of longitude near a pole is nearly zero. So that formula is essentially useless for real-world navigation.</p><p>The next thing people try is the Haversine formula — it accounts for the curvature of a sphere and returns actual distance in meters. It’s a step up. But it still treats Earth as a perfect sphere, which it isn’t.</p><blockquote>Geodesic distance is the length of the shortest path between two points along the actual surface of the Earth — the route a taut string would trace across a globe. It’s the surface equivalent of a straight line.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*iok_pY5zXV0x6FnfjynR-A.png" /></figure><p>The library I used — geopy — computes geodesic distance using the WGS-84 ellipsoid model. Since GPS already uses WGS-84, using geodesic distance on the same model avoids inconsistencies.</p><h3>How it showed up in the code</h3><p>The core of the alarm is a loop that keeps polling your current location and checking how far you are from the destination. Here’s the exact line that does the work:</p><pre>from geopy.distance import geodesic<br><br>distance = geodesic(location, (target_lat, target_lon)).meters<br>print(f&quot;Distance: {int(distance)} meters&quot;)</pre><p>location is a (lat, lon) tuple pulled live from termux-location — a Termux API command that queries Android&#39;s GPS. The geodesic() function takes two coordinate pairs and returns an object; calling .meters on it gives you the distance in meters.</p><pre>while True:<br>    location = get_current_location()   # calls termux-location<br>    if location:<br>        distance = geodesic(location, (target_lat, target_lon)).meters<br>        if distance &lt;= trigger_distance_m:<br>            start_alarm()<br>            break<br>        if last_distance and distance &gt; last_distance:<br>            print(&quot;Passed destination. Triggering alarm.&quot;)<br>            start_alarm()<br>            break<br>        last_distance = distance<br>    if last_distance and last_distance &lt; 1000:<br>        time.sleep(3)<br>    else:<br>        time.sleep(10)</pre><p>There’s a subtle detail worth noticing: the alarm also triggers if you’ve <em>passed</em> the destination. If distance starts increasing after decreasing — meaning you&#39;re moving away from the target — it assumes you&#39;ve gone past it and fires the alarm. That&#39;s a useful safety net for bus or train travel where you might not be watching the screen.</p><h3>Flat math, sphere math, ellipsoid math — and why it matters which one you pick</h3><p>This is the part worth sitting with. The three approaches to distance aren’t just arbitrary choices — they represent three increasingly honest descriptions of the surface you’re actually moving on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*WHzcMp_JOQbNomKRqL1qsQ.png" /></figure><p>The mental shift is this: you’re not measuring through the Earth, and you’re not measuring across a flat map. You’re measuring along a surface — and the shape of that surface determines how the math works.</p><p>Flat math assumes the surface doesn’t curve. Sphere math assumes it curves uniformly. Ellipsoid math accepts that the poles are slightly closer to the center than the equator, and adjusts accordingly.</p><p>For a 500-meter alarm radius, the difference between Haversine and geodesic is in the centimeter range — imperceptible in practice. Since geodesic has no extra cost and avoids model mismatch, it’s the safer default.</p><h3>The travel mode thresholds</h3><p>One of the practical design decisions in the project was letting the user choose a travel mode, which just sets a trigger distance:</p><pre>modes = {<br>    &quot;1&quot;: 100,    # walk<br>    &quot;2&quot;: 200,    # cycle<br>    &quot;3&quot;: 500,    # car<br>    &quot;4&quot;: 800,    # train / bus<br>}</pre><p>These numbers reflect how much lead time you realistically need to gather yourself. On foot, 100 meters is enough — you can slow down and look around. On a train doing 80 km/h, 800 meters gives you about 36 seconds. Rough, but it works.</p><p>The geodesic calculation feeds directly into this comparison every loop iteration: compute distance, check against threshold, sleep, repeat.</p><h3>The GPS polling logic</h3><p>termux-location returns a JSON blob from Android&#39;s location APIs. The code parses it like this:</p><pre>def get_current_location():<br>    try:<br>        output = os.popen(&quot;termux-location&quot;).read()<br>        data = json.loads(output)<br>        return (data[&quot;latitude&quot;], data[&quot;longitude&quot;])<br>    except Exception as e:<br>        print(&quot;GPS error:&quot;, e)<br>        return None</pre><p>If this returns None — say, you&#39;re briefly underground or indoors with poor signal — the loop skips that iteration without crashing. last_distance isn&#39;t updated, and the script tries again after the sleep interval. GPS on a phone isn&#39;t perfectly reliable, so that resilience matters.</p><h3>Putting it together</h3><p>“Geodesic distance” sounds more intimidating than it is. Strip away the math and it’s just: <em>what’s the shortest path between these two points along the actual curved surface of the Earth?</em> The geopy library handles all the geometry. What you write is two coordinate tuples and a method call.</p><p>What I found interesting about this project is how it grounds an abstract idea of surface distance into something practical. You’re trying to make your phone vibrate before you miss your stop, and that forces you to understand it properly.</p><p><em>The full project </em><a href="https://github.com/sri443/Location-Alarm-On-Android-Using-Termux"><em>https://github.com/sri443/Location-Alarm-On-Android-Using-Termux</em></a> <em>runs on Termux with the Termux:API add-on installed. You’ll need </em><em>geopy (via pip) and the </em><em>termux-location, </em><em>termux-notification, </em><em>termux-media-player, and </em><em>termux-vibrate commands available in your environment. Written for developers who just want the thing to work — and to understand why it works.</em></p><p>Connect:<br>LinkedIn —<a href="https://www.linkedin.com/in/sriraksha-8358492b3/"> https://www.linkedin.com/in/sriraksha-8358492b3/<br></a>GitHub — <a href="https://github.com/sri443">https://github.com/sri443</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef4eef1a832f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>