<?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 Ruchi DEO on Medium]]></title>
        <description><![CDATA[Stories by Ruchi DEO on Medium]]></description>
        <link>https://medium.com/@happy_ruchideo?source=rss-d2ea4008ca0c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rgUE44V-mCWAgo5FaQcY4A.png</url>
            <title>Stories by Ruchi DEO on Medium</title>
            <link>https://medium.com/@happy_ruchideo?source=rss-d2ea4008ca0c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 18:38:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@happy_ruchideo/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[Memory Management in Python : Part 2.3]]></title>
            <link>https://blog.stackademic.com/memory-management-in-python-part-2-3-1c3c61cd7bd9?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c3c61cd7bd9</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Sun, 06 Sep 2026 01:13:23 GMT</pubDate>
            <atom:updated>2026-09-09T00:53:36.961Z</atom:updated>
            <content:encoded><![CDATA[<p>This article explains how the internal memory management consists of 4 layers that interact with data structures—or, as we call them in Python, objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8f5kTDky5GWX7fRG3F2dDw.png" /><figcaption>Python getting memory from OS for private heap</figcaption></figure><p><strong>Welcome back, Fellas!!</strong></p><p>We are continuing where we left off. We are done with the basic structures of objects in our previous articles. Let’s dive deep into the layers of memory management.</p><p>These layers are managed by the <strong>Python Internal Memory Manager</strong>. It keeps track of all kinds of changes happening in the memory that Python uses.</p><p>Our exploration will move in this order (mentioning it for convenience):</p><p><strong>System Allocator &gt; Raw Domain &gt; Mem Domain &gt; Object Domain</strong></p><p>Well, our OS is the master for managing memory in our devices. And yes, programming languages like Python need to interact with the OS to get memory allocated in their name!</p><p><strong>System Allocator:</strong> As the name suggests, it deals with the system (the OS). This domain asks for chunks of memory space in the RAM, typically in blocks of <strong>256KB</strong> (fun fact: Python’s arenas are 256KB, not 215KB). <br>This borrowed space is popularly called the <strong>PRIVATE HEAP</strong>. This term will be repeated many times, so remember it. 🙂</p><p>Now,</p><p><strong>What does the Raw Domain do?</strong> <br>As said in the <a href="https://medium.com/stackademic/python-memory-management-part-2-1-03ef76805e69">previous article</a>, it is a wrapper around the System Allocator, which oversees all the major fallbacks. All the other domains are deemed to talk with the Raw Domain first if they want the System Allocator to do something for them (mostly getting extra memory).</p><p><strong>Why do we need the Mem Domain?<br></strong>So, we now have the <strong>Private Heap</strong>. The<strong> Mem Domain</strong> accesses this memory and distributes it to the <strong>Object Domain.</strong> This layer also handles buffer allocation (we will visit this in the later part of the article, or you can scroll down directly).</p><p><strong>Why is the object domain so important?</strong> <br>The Object Domain is the one that holds pymalloc, which is used to initialize memory for the objects. This domain handles the allocation of <em>all</em> objects and keeps memory in check.</p><p><strong>So, when we write:</strong></p><p>a = 1002</p><p>This means the Object Domain will fire up pymalloc, and then pymalloc will assign this object a spot in the memory pool.</p><p>To get the real picture of how the <strong>object domain works</strong>, let’s visualize the pattern in the next topic.</p><p><strong>Fact time:</strong> <br>Python is slower than pure C or C++ in raw math because it needs to read the value from every object and create a brand-new object for the result (except for integer interning, where it just references the existing value if it’s in range).</p><h3>How is memory divided inside the Object Domain??</h3><p>We have <strong>Arenas</strong>, which are divided into <strong>pools</strong> of 4 KB. <em>Take Arenas as a warehouse, and the Pools as the rooms inside the warehouse.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*r1NRo4AxiAf1lNfB-MoQxg.png" /></figure><p>Each room (pool) handles sizes from <strong>64 size classes</strong>.</p><ul><li>Like Pool 1: handles 16-byte blocks</li><li>Pool 2: handles 24-byte blocks</li></ul><p>Now, these pools are divided into equal parts (blocks). When empty, these equal parts take the form of a linked list. They are linked, but not permanently. These linked lists are called <strong>free lists,</strong> which have a pointer indicating what memory is available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m09voRMJhwVG-PfeOow1ZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*7hNl7j8xIkrLPBeoE4AYqQ.png" /></figure><p>When we write a = 1002, one of the blocks from the free list is taken out and filled with the object and all its necessary metadata.</p><p><strong>No separate address for the value is formed; the whole object lives inside the block itself.</strong> Python does not store an extra address just for the data.</p><p>In the case of complex objects (like lists, dicts, etc.), the block contains the PyObject header along with pointers that point to other memory locations.</p><p>Well, we are done with objects, but we have yet to know:</p><p><strong>How are buffers handled here?</strong></p><p><strong>Buffers:</strong> These point to files or point to the raw arrays inside complex data structures.</p><p>The <strong>Mem Domain</strong> handles buffers. But a question arises: <strong><em>which memory does it use, and how does it use it for the buffer?</em></strong></p><p>Well, the Mem Domain has access to the Private Heap. It checks for memory using pymalloc, which strictly has an allocation limit of <strong>512 bytes</strong>. If the buffer data is more than that limit, pymalloc shows an error and routes the request directly to the Raw Allocator (to ask the OS for more memory).</p><p>The Mem Domain handles buffers differently depending on their size:</p><p><strong>Scenario A: Small Buffers (≤ 512 bytes)</strong> If a C extension asks the Mem Domain for a small buffer (e.g., an array of 5 pointers, which is 40 bytes):</p><ol><li>The Mem Domain (PyMem_Malloc) routes the request to pymalloc.</li><li>pymalloc recognizes the request is small (≤ 512 bytes).</li><li>pymalloc gives the Mem Domain an empty block from its pre-existing Pools and Arenas inside the Private Heap.</li><li>No interaction with the system allocator occurs.</li></ol><p><strong>Scenario B: Large Buffers (&gt; 512 bytes)</strong> If a C extension asks the Mem Domain for a large buffer (e.g., reading a 1 MB file chunk):</p><ol><li>The Mem Domain (PyMem_Malloc) routes the request to pymalloc.</li><li>pymalloc sees that the request (1,000,000 bytes) is far larger than its 512-byte limit.</li><li>pymalloc immediately bypasses its arenas and pools and routes the request directly to the underlying Raw Allocator (which then talks to the System Allocator).</li><li>The OS allocates a new, separate chunk of RAM specifically for this large buffer.</li></ol><h3>Let’s look at some simple examples to see the concepts we’ve learned so far!</h3><p><strong>Example 1:</strong></p><pre>a = 10</pre><p>The Python interpreter has already allocated integers in the range of -5 to 256 using the Object Domain. So, a just point is to the pre-existing 10 object references (integer interning).</p><p><strong>Example 2 (This one is complex!):</strong></p><pre>list1 = [2, 2, 424]</pre><p>The allocator allocates memory for the list object in one of the pools in the arena using pymalloc (Object Domain).</p><p>The Mem Domain allocates the array of pointers pointing to these number objects. The integers 2 and 2 are pre-allocated in memory at the beginning of the code. However, 424 gets a new object and is referenced by the array. The Object Domain (pymalloc) intercepts this, grabs an available 28-byte block from its pre-allocated 256KB Arenas, and creates a new integer object for 424.</p><p><strong>Example 3:</strong></p><pre>basic_string = &quot;pie&quot;</pre><p>First, this will get a block of memory. Here we encounter <strong>String Interning</strong>. Python will check for “pie” in its internal dictionary of cached strings. If it exists, the newly created object for “pie” gets destroyed, and the existing reference is returned. If it doesn’t exist, “pie” is cached for future use.</p><p><strong>Example 4:</strong></p><p>Things get interesting here as we get a lot of events happening at once. Let’s break it down:</p><pre>num_str = input(&quot;Enter a number: &quot;)<br>num = int(num_str)<br>def is_odd_even(n):<br>return &quot;Even&quot; if n % 2 == 0 else &quot;Odd&quot;<br>print(f&quot;The number {num} is: {is_odd_even(num)}&quot;)</pre><ul><li><strong>input(…) and int(…):</strong> When the user types a number, the Object Domain allocates a temporary string object for the input. When wrapped in int(), if the user types a large number (e.g., 5000), the Object Domain (pymalloc) allocates a new integer object block for it. If they type 12, it just points to the cached integer.</li><li><strong>Function Definition (def is_odd_even(n):):</strong> When the script runs, the Object Domain allocates memory for a function object. The byte code (the compiled instructions of the function) is stored in a code object buffer.</li><li><strong>F-String Generation:</strong> f”The number {num} is…” dynamically generates a brand-new string at runtime. Because this happens dynamically, the Object Domain (pymalloc) must allocate a new memory block perfectly sized to fit the final concatenated sentence right before passing it to print().</li><li>Once print() finishes, the reference count for that f-string drops to 0, and pymalloc immediately reclaims that block of memory for future use.</li></ul><h3>Before I take my leave!</h3><p><strong>What happens when an object is deleted?</strong></p><p>Well, Python does not go and actually erase the data. <br>It just puts the block back into the (that linked list we saw earlier).</p><p>The old data stays in the block until a new object overrides it later. Interesting!</p><p>For data to be “deleted,” it must have a reference count of 0. That means the object is not being used anywhere by any variable.</p><p>Well, that’s it for now!</p><p>We will look into<strong> garbage collection in the next article.</strong> Till then, let me know how you liked this article, and do share your point of view on this topic.</p><p>See Yaa!! 👋</p><h3>Before you go</h3><ul><li>Please take a moment to like the post and follow the writer!</li><li>Did you know that over 400,000 developers share what they’re building, learning, and discovering across our platforms every month? Learn how you can contribute <a href="https://plainenglish.io/write-for-us"><strong>here</strong></a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c3c61cd7bd9" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/memory-management-in-python-part-2-3-1c3c61cd7bd9">Memory Management in Python : Part 2.3</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Memory Management in Python: Part 2.2]]></title>
            <link>https://blog.stackademic.com/memory-management-in-python-part-2-2-81efec3d57e4?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/81efec3d57e4</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Fri, 04 Sep 2026 12:31:01 GMT</pubDate>
            <atom:updated>2026-09-04T12:31:01.194Z</atom:updated>
            <content:encoded><![CDATA[<p>This article dives into the inner structure of Python objects, breaking things down to give you a clear visual mental model.</p><p><strong>Welcome back!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wUvgcwkuqW5uFpl-" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema?utm_source=medium&amp;utm_medium=referral">Kelly Sikkema</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Today, we are taking a visual look at how common Python data structures are laid out under the hood.</p><p><strong>List</strong></p><pre>MyList = [10, &quot;hello&quot;, 3.14]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4o2kciOsc1Un4iC6qHdhVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*mkmRZgQze-bHLX5MamG1cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*DcbDkoKvMDaFknlwMDlxMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*WgwRinMJ1Y9UnKgb1SIsfw.png" /></figure><p><strong>Why this design?</strong></p><p>Python lists need to accommodate dynamic sizing (growing or shrinking as elements are added or removed) while supporting multiple data types simultaneously.</p><p><strong>What happens to memory when we call list.append()?</strong></p><p>Python</p><p>My_list = [10, “hello”]</p><p>My_list.append(3.14)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*F3qVkkH6-cjYeE9OP9aalg.png" /></figure><ol><li><strong>Capacity check:</strong> Python checks if the currently allocated memory array has room for another element.</li><li><strong>Reallocation:</strong> If the array is full, Python creates a new, larger array.</li><li><strong>Copying pointers:</strong> The memory addresses (pointers) from the old array are copied over to the new one.</li><li><strong>Freeing memory:</strong> The old, smaller array is freed and returned to pymalloc (the arena allocator).</li><li><strong>Updating pointers:</strong> The ob_item pointer in the list object is updated to point to the new array.</li><li><strong>Inserting value:</strong> Finally, the pointer for 3.14 is stored in the newly allocated slot.</li></ol><p><strong>Tuple</strong></p><p>Python</p><p>My_tuple = (10, “hello”, 3.14)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*014Qzp_o4jW-gIqUJK25kw.png" /></figure><p>Unlike lists—where ob_item points to a separate external memory block—a tuple’s array of object pointers lives <strong>directly inside</strong> the tuple object itself. Because tuples are immutable, Python doesn’t need to over-allocate memory or manage dynamic arrays for them.</p><p><strong>Dictionary</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X3tXtG_ZjGd3_O2Qchf9Eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*pu4eCcWlvdDBdS9r9YJCmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*up2CGF5GuroS-1EViMynAw.png" /></figure><p>This is where things get interesting. Dictionaries are complex objects involving hashing, open addressing, combined vs. split tables, and key sharing.</p><p>Depending on performance optimizations, <strong>key-value pairs can be stored together in a dense array or managed across separate lookup and entry tables.</strong></p><p><em>(More on dictionary internals in a future deep dive!)</em></p><p><strong>Wrapping Up</strong></p><p>That’s it for now!</p><p><strong>In the </strong><a href="https://medium.com/@happy_ruchideo/1c3c61cd7bd9?sharedUserId=happy_ruchideo"><strong>next article</strong></a><strong>, we’ll bring everything together and explore how memory domains and these object structures interact as a whole.</strong></p><p>See ya!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81efec3d57e4" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/memory-management-in-python-part-2-2-81efec3d57e4">Memory Management in Python: Part 2.2</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python: Memory Management (Part 2.1)]]></title>
            <link>https://blog.stackademic.com/python-memory-management-part-2-1-03ef76805e69?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/03ef76805e69</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Thu, 20 Aug 2026 22:53:50 GMT</pubDate>
            <atom:updated>2026-08-20T22:53:50.153Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jH0ULaPtabwUtReWX8qXpA.png" /><figcaption>C showing Python around the memory management department!!</figcaption></figure><p>This article tells you about the witchcraft done by the Python creators to make Python what it is today—specifically, <strong>how every</strong> <strong>created variable and data structure is spread across memory and the inner layer of management that talks with the OS.</strong></p><p><a href="https://medium.com/python-in-plain-english/everything-in-python-is-object-86564d494326"><strong>Part 1</strong></a> was about knowing how everything is an object in Python and how they are referred to. <em>Please read Part 1 before jumping ahead into this article.</em></p><p><strong>This article is all about memory management (Part 2), divided into 3 medium articles.</strong></p><h3>Welcome back!!</h3><p><strong>This particular one will answer who is behind memory management, the underlying structures of data types, and what integer and string interning actually means in Python.</strong></p><p><strong><em>Reminder</em></strong><em>: We are discussing CPython powered by C as core. </em>And we have malloc() in C, which is responsible for memory allocation, and free() for freeing up memory.</p><p>In Python, there are wrappers around these functionalities, which help Python manage its memory.</p><h3>How are these wrappers responsible for memory management, and what are they called?</h3><p>These wrappers—or, I should say, domains—serve different purposes in layers, starting from the OS, down to assigning objects their memory locations and referencing them to variable names.</p><p>The domain architecture is divided into 5 parts:</p><ul><li><strong>System Allocator or System Domain</strong></li><li><strong>Raw Domain</strong></li><li><strong>Mem Domain</strong></li><li><strong>Object Domain</strong></li><li><strong>Garbage Collector</strong></li></ul><p><em>Note: I am not going into the deep technical structure of these domains and how they interact with Python just yet, but rather giving an eagle-eye view of how they behave.</em></p><ul><li><strong>System Domain:</strong> The base layer interacting with the OS (Windows/Linux) to allocate large chunks of memory. Whatever memory is asked for here is not known to the garbage collector. This borrowed memory is called the <strong>private heap</strong>, which will majorly be used by the Mem Domain and Object Domain.</li><li><strong>Raw Domain:</strong> A wrapper around the System Domain. It is responsible for handling all sorts of errors and checking for any memory issues within the process of memory handling and borrowing. PyMem_RawMalloc is used for interacting with the Raw Domain (mostly used by C-extensions).</li><li><strong>Mem Domain:</strong> This is a quite interesting domain that looks over allocating memory from the private heap for general-purpose buffers.</li><li><strong>In case you don’t know what buffers are</strong>: <br>Think of them as arrays of 0s and 1s, which are later converted to readable strings. Buffer-type data is mostly related to input and output operations, e.g., reading a file.</li><li><strong>Object Domain:</strong> This is the best friend of all the objects created and is responsible for living up to the famous slogan: “Everything in Python is an object.” This domain assigns allocations for all the objects present in Python.</li><li><strong>Garbage Collector:</strong> Handles object cleanup via reference counting (immediate deallocation when references hit zero) and a cyclic garbage collector (to clean up isolated reference loops).</li></ul><p>Before seeing how these domains work together (will be covered in next part ),</p><p><strong>Let&#39;s get into the inner structures of the data types we have in Python.</strong></p><p>This will crystalize our concept of memory management. I will be covering the basics, but it will be enough for concept mapping in our brains.</p><p><a href="https://medium.com/python-in-plain-english/everything-in-python-is-object-86564d494326"><strong>In the last article,</strong></a><strong> I discussed briefly how lists and tuples look and how variables are just pointers to the object assigned to them. Let’s bring that same concept back and establish the connection here!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*7_hYL0rYeA4tYm1Oe-QitQ.png" /></figure><p>The base object structure in CPython is common across all objects but changes when the type of data changes, like for lists and tuples.</p><p><strong>Let’s start with integers in Python.</strong></p><h3>Integer Interning or Small Int Cache</h3><p>In Python, integers sometimes show an interesting referencing behavior, which was added by Python developers for optimization.</p><p><strong>It’s not a huge mystery</strong>:</p><blockquote>Before starting out, the interpreter caches—meaning it pre-allocates—integer values from <strong>-5 to 256</strong>.</blockquote><p>Because these numbers are generally used heavily in loops and as standard values, it is much faster to reference them when they are already created. We don’t need to worry about a thing, but it was fascinating to me when I first came across this term.</p><p>Here is a quick example of how integer interning looks in action:</p><pre>Here is a quick example of how integer interning looks in action:<br><br># Integer Interning in Action<br>a = 256<br>b = 256<br>print(a is b)  # True! Both point to the exact same cached object in memory.<br><br>c = 257<br>d = 257<br>print(c is d)  # False! 257 is outside the -5 to 256 range, so two separate objects are created.</pre><h4>Many curious minds might be asking: <em>what happens with decimal values (floats)?</em></h4><p>Well, it comes down to<strong> predictability and mathematics. </strong>Think about it!</p><p><strong>A = 10.22, B = 10.2234</strong></p><p>They are different but still start with 10. For this, we need different objects; you can’t have them all already stored, or your precision calculations will go wrong! You don’t want that, right?</p><p><strong>One more thing I missed!</strong></p><p>Interning is heavily tied to the “is” operator in Python.</p><ul><li>== checks if two objects have the <em>same value</em>.</li><li>“is” checks if two objects share the <em>same memory address</em>.</li></ul><p>Because specific integers and strings are interned, doing x is y is a very fast way for Python’s internal C code to check if two things are identical without having to read their actual values.</p><p>However, <strong>because of the imprecision mentioned above, checking if two floats share an identity is a massive anti-pattern in programming.</strong></p><p>Developers are taught to never use it with floats and often shouldn’t even use == (<em>instead, they use math.isclose() to check if floats are “close enough”</em>).</p><blockquote><strong><em>Since the language discourages checking float identity, the developers have no reason to optimize memory addresses to match.</em></strong></blockquote><h3>String Interning</h3><p>Storing or caching strings happens in two stages:</p><ol><li><strong>Static Interning (Startup):</strong> A few strings, like “a” or “1” (and empty strings), are pre-stored. These are placed into a permanent, hidden C dictionary (a hash table) known as the “interned dictionary.”</li><li><strong>Dynamic Interning (Runtime):</strong> When Python parses your code, it automatically interns strings that look like identifiers (variable names, function names, dictionary keys).</li></ol><p><strong>The Process:</strong></p><ul><li>If you type my_var = &quot;hello&quot; Python allocates memory for the string “hello”.</li><li>Before giving it to you, Python checks the hidden “interned dictionary.”</li><li>If “hello” is already in there, Python immediately destroys the newly allocated object and gives you the pointer to the existing one.</li><li>If it is not in there, Python adds your newly allocated string to the dictionary so future identical strings will share this memory.</li></ul><h4><strong>Is every string interned then?</strong></h4><p>Well, no! It is <strong>mostly short strings</strong> containing only letters, numbers, and underscores <em>without spaces</em>. Strings with spaces, punctuation, special characters, or very long strings read from files are created normally and destroyed when not in use.</p><p>Let’s look at a quick example:</p><pre># String Interning in Action<br>str1 = &quot;hello_world&quot;<br>str2 = &quot;hello_world&quot;<br>print(str1 is str2)  # True! It looks like an identifier (no spaces), so it is automatically interned.<br><br>str3 = &quot;hello world!&quot;<br>str4 = &quot;hello world!&quot;<br>print(str3 is str4)  # False! Because of the space and exclamation mark, Python creates two separate objects.</pre><p><strong>What is with the dictionary thing?</strong> Well, that dictionary is only for referencing the string. The string object is made normally; just its reference is stored. If a second string with the exact same characters is found, the new one will be destroyed and the variable will be referred to the earlier one.</p><p>Take the example of basic_string = “pie”:</p><ul><li><strong>Evaluation:</strong> Python evaluates the string “pie” and determines it fits the criteria for automatic interning (it contains only letters).</li><li><strong>Logging:</strong> Python adds a new entry into the interned dictionary.</li><li><strong>Reuse:</strong> If you create another_string = “pie” later in the code, Python checks the dictionary, finds the existing address, and simply points the new variable to the exact same block in memory, bypassing allocation entirely.</li></ul><p>Easy, and we don’t even know these things are happening behind the scenes!</p><p>Well, that’s it for now.</p><p><em>Originally I wanted one whole article for memory management.</em> <br>(<strong>I thought it was possible, until reality kicked me!! </strong>🥲).</p><p><em>But hey! Long articles get boring, right? </em>😅😅</p><p><strong>I will bring in the new part covering the rest of the structures and the working of these domains, connecting all the dots together ASAP.</strong></p><p>Till then, have fun with Python.</p><p>See yaa!! 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03ef76805e69" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/python-memory-management-part-2-1-03ef76805e69">Python: Memory Management (Part 2.1)</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My concerns are with HUMAN SURVIVAL in this ERA!!]]></title>
            <link>https://medium.com/@happy_ruchideo/my-concerns-are-with-human-survival-in-this-era-8ec32596d991?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ec32596d991</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[humanity]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 10:54:28 GMT</pubDate>
            <atom:updated>2026-08-01T10:54:28.045Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jg2gAoaxYPjH2xZM" /><figcaption>Photo by <a href="https://unsplash.com/@2renkov?utm_source=medium&amp;utm_medium=referral">alexey turenkov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article covers the unpredicted future of HUMAN from the POV of a tech person. Which provides an obvious signal of what comes next now!!<br><a href="https://x.com/simple_smile9/status/2083503595798859951?s=20">[originally posted on X]</a></p><h4>Start!!</h4><p><strong>Alright, I know that bitching about AI is not productive.</strong></p><p>BUT we are moving toward a future where fewer jobs will be available that cannot be automated or are hard to automate.</p><p><strong>We are running agents in the codebase, sitting back, and observing what they do. We can no longer call ourselves engineers; we are tech operators, simply observing and using our knowledge to fix whatever falls out.</strong></p><p><em>Just like a factory operator fixes a machine while monitoring its output</em>, we are moving toward operator roles—and honestly, we won’t need many people for them.</p><p><strong><em>This is an arguable notion</em></strong>, but it’s close to reality. Software engineering comprises many domains, but we also know this gap will be filled in the next two to five years. You might be an advanced operator with the skill of talking to humans and understanding business (which will eventually be optimized, so you won’t need to do it anymore).</p><p>What’s left is human interaction, which AI has yet to master. The future in-company AI will take orders directly from CEOs and their chosen teams of experienced professionals. The AI will do the entire sales job, develop and write the features, update the codebases, design them, and deploy them.</p><p>For these tasks, we will need a few tech operators in between to run these machines and AIs. I don’t think we will even need that many screens, as most of the work is moving to the terminal.</p><p><strong>A TUI (Terminal User Interface) will suffice, with a few screens just for fixing outliers and testing if the intent was met. It seems like top-level executives will hold all the power.</strong></p><p><em>For people who want to remain in this sector, the most profitable professions will be in research (all types), data centers, and playing with wires — hardware and low-level engineering to build more robust operating systems for these AI powerhouses. Any job that helps run the core AI infrastructure will pay well.</em></p><p>Computer science is merging with electronics and communication engineering. Good news for the ECE crowd.</p><p><strong>The finance, healthcare, food, and clothing sectors will survive, albeit with heavy automation.</strong></p><p>As for the rest, we will be working on farms alongside robots. Risky jobs will be taken over by machines, replacing humans who will find themselves relegated to being remote-control operators.</p><p><strong>One or two countries will control this entire tech space.</strong> The others will just follow.<em> The financial hierarchy will have a much wider gap than it does now!</em></p><h3>What happens to Earth?</h3><p>There will obviously be more pollution. <strong>India </strong>and other developing countries are already taking the burden of their own waste, along with the waste dumped here by others. In case you didn’t know, you will eventually need to own a mask and a gas cylinder, and many will die in the process. You don’t have to wait a hundred years; this may happen in just a few decades. <em>Congratulations, you are successfully screwed.</em></p><p>Now, regarding the unemployed, lost generation who will be 30+ in the next five to six years: if you have no money,</p><p><strong>who is buying these products?</strong></p><p>Maybe their use will be forced upon us (you know how!), making people so addicted that they lose the reasoning skills that originated in this era. <strong><em>Reading books</em></strong> will be viewed as an elite hobby rather than a normal practice. You will be trained to follow along and kept in a loop where you never question why these things even exist.</p><p>This era is starting now, and it seems unstoppable. AI is the next factory. And you will be the operator. You will be instructed by the powerful through these devices and sometimes called to fix them!!</p><p><em>[This is a probability article; a lot is happening, but a lot is on the way. My article does not account for all of the variables, and I leave out the elites who will be drinking beer on MARS. Perhaps all sci-fi movies will come true, and I believe AI will develop consciousness at some point, though I am not sure how! However, it will lead to working with or against us!! ]</em></p><p>That’s it for now.</p><p>I will be continuing my Python insights part in the next article.</p><p>In case you missed it, <a href="https://medium.com/@successkillsall266/everything-in-python-is-object-86564d494326">here </a>is the article!!</p><p>See ya!! 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ec32596d991" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Everything in Python is OBJECT!!]]></title>
            <link>https://python.plainenglish.io/everything-in-python-is-object-86564d494326?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/86564d494326</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 16:01:46 GMT</pubDate>
            <atom:updated>2026-07-30T16:01:46.900Z</atom:updated>
            <content:encoded><![CDATA[<p>This article answers why everything in Python is an object and why you should always remember this concept when coding in Python. This will change how you think about Python forever!</p><p>Pss!! 🤫 You know Python is <strong>classy!!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VzjqC_MNaZlWf-K2" /><figcaption>Photo by <a href="https://unsplash.com/@blankerwahnsinn?utm_source=medium&amp;utm_medium=referral">Fabian Blank</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s start with one of the most talked-about facts in Python:</p><blockquote><strong>“Everything in Python is an object.”</strong></blockquote><p>This statement is hugely important — it completely rewires how we think about Python, from basic variables to functions and beyond!</p><p><strong>Note:</strong><em> This article is for people who have some familiarity with programming languages or know basic Python.</em></p><h3>Rewire: VARIABLES in Python</h3><p>Take this simple assignment:</p><pre>a = 302</pre><p><strong><em>What most people assume is that A directly stores the value 302.</em></strong><em> Right?</em></p><p>This holds true for languages like Java or C, where <strong>primitive types</strong> exist.</p><h4>Why did I mention primitive types?</h4><p>A primitive type means a <strong>value is stored directly in a memory slot </strong>without any attached object header, class type, or metadata. When you pass <strong>primitives </strong>into functions in primitive-heavy languages, <strong>a copy of the actual value is usually passed</strong>.</p><blockquote><strong>But —</strong> Primitive types <strong>do not exist in Python!</strong></blockquote><blockquote>In Python, variables don’t store values directly; they store <strong>references</strong> (pointers) to <strong><em>memory locations where object instances live</em></strong>.</blockquote><p><em>“Hold on!! But we have </em>int<em>, </em>str<em>, and </em>float<em> in Python!”</em></p><p>You see, in Python, these aren’t raw primitive data types — they are fully realized object types (classes)! When we talk about “data types” in Python, we are secretly talking about object classes.</p><p>Let’s get back to our example</p><pre>a = 302</pre><p>Question: <strong>Which part here is the object?</strong></p><p><strong>Is it A?</strong> If you guessed A, that’s <em>wrong</em>! A is just a <strong>name</strong> (a reference label).</p><p>If you answered 302, you’re on the <em>right</em> track!</p><blockquote><strong>DATA is the OBJECT.</strong></blockquote><p>Whether data is held inside a complex structure or lives alone as a single string, boolean, or number—Python treats it as an object.</p><blockquote><strong>A variable is simply a name bound to an object that lets us access it.</strong></blockquote><h3>The Evidence</h3><pre>A = 302<br>A = [9, 12]</pre><p><strong>Observe</strong>: <strong>What happened here? </strong><br>We used the exact same variable name A, but only the <strong>reference target</strong> changed!</p><p>First, A pointed to an int object (302). Then, we rebound A to point to a list object ([9, 12]).</p><h3>Is a Variable Mutable or Immutable?</h3><p>If you answered “immutable” or “mutable”—you&#39;re actually wrong!</p><blockquote><strong>A variable is neither.</strong></blockquote><p>Mutabilities belong strictly to the <strong>data object</strong> being referenced, NOT to the binding tool (the variable name) pointing to it.</p><h3>The “Objects” Mental Model Rewrite</h3><p>Our friendly everyday objects—list, tuple, function, dict, and set—are legitimate objects we think we know a thing or two about.</p><p>But before jumping in deep, we need to look at the <strong>three core characteristics</strong> of every Python object:</p><ol><li><strong>Identity (</strong>id<strong>)</strong></li><li><strong>Type (</strong>type<strong>)</strong></li><li><strong>Value</strong></li></ol><p>An object’s <strong>identity never changes</strong> once created. Who told us these are the characteristics of an object? Python’s creators!</p><p><strong><em>The official Python documentation states:</em></strong></p><blockquote><em>“Objects are Python’s abstraction for data. All data in a Python program is represented by objects or by relations between objects. Even code is represented by objects.</em></blockquote><blockquote><em>Every object has an identity, a type, and a value. An object’s identity never changes once it has been created; you may think of it as the object’s address in memory.</em></blockquote><blockquote><em>The </em>is<em> operator compares the identity of two objects; the </em>id()<em> function returns an integer representing its identity.”</em></blockquote><p>Keep this in mind—we are entering the confusion lane!</p><h3>Dissecting Mutability: List vs. Tuple</h3><p>What actually makes a structure <strong>mutable</strong> or <strong>immutable</strong>?</p><p>If we reassign a variable to a brand-new object, its id() changes (proving a new object was created). But <strong>mutability</strong> specifically refers to whether you can <strong>change the internal data inside the exact same object memory address</strong> (id).</p><p>To understand this, we need to look inside the object under the hood!</p><p><em>FYI: Python has several implementations, but the standard one most people use is </em><strong><em>CPython</em></strong><em> (written in C).</em></p><h3>What is inside a Python object?</h3><p>At the C level in CPython, every standard object starts with a structure called PyObject (or PyVarObject for variable-length items like lists).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4b7bV9Muu2xSoCLUnrRgA.png" /></figure><h3>What happens inside list and tuple memory?</h3><ul><li><strong>In a list:</strong> <br>A list object holds a pointer to a dynamically allocated array of pointers. Each slot in that array points to an actual Python object in memory. When you append or modify a list, CPython can reallocate or swap out the pointers inside that dynamic array without changing the list’s main PyObject identity! This is why lists have <strong>in-place mutability</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hC1poIb_O40QAM8IS9nykQ.png" /></figure><ul><li><strong>In a tuple:</strong> A tuple object contains a fixed-length array of object pointers embedded directly into its structure layout upon creation. You cannot add slots, remove slots, or replace the pointers inside it. That is what makes a tuple <strong>immutable</strong>!</li></ul><h3>Conclusion</h3><p>This was <strong>Part 1</strong> of Python is classy.</p><p>Next week, <strong>Part 2</strong> will dive deep into <strong>Python’s memory management and object garbage collection!</strong></p><p>That’s it for now</p><p>Let me know if this article was helpful to you through comments 😅!!</p><p><strong>See Yaa! 👋</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86564d494326" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/everything-in-python-is-object-86564d494326">Everything in Python is OBJECT!!</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI transformed photography on smartphones forever!!]]></title>
            <link>https://medium.com/@happy_ruchideo/ai-transformed-photography-on-smartphones-forever-b01d49141532?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b01d49141532</guid>
            <category><![CDATA[smartphones]]></category>
            <category><![CDATA[photography]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Sun, 19 Jul 2026 16:31:23 GMT</pubDate>
            <atom:updated>2026-07-19T16:31:23.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*shaR5TnbwGIy5Bbd" /><figcaption>Photo by <a href="https://unsplash.com/@omarprestwich?utm_source=medium&amp;utm_medium=referral">Omar Prestwich</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article maps the timeline of how AI slowly took control of our cameras, comparing the classic tech we used to rely on with the software taking over today.</p><p><strong>Modern smartphones </strong>are always marketed on a laundry list of features: RAM, storage, processors, speed, and displays.</p><p>But let’s be honest —</p><p>What interests most of us is the power of taking photos in the <strong>ERA</strong> where <strong>SHOWING</strong> your daily <strong>LIFE </strong>is a <strong>NORM. </strong>and the rest of those features are just there to back the camera up.</p><p><strong>NOTE for nerds/otakus:</strong> <em>This article isn’t for the mobile gaming crowd. If you came here to argue about processor benchmarks and RAM optimization, you’re in the wrong place! We’re skipping that discussion entirely.</em></p><p><strong>Friendly Reminder:<em> </em></strong><em>This article is strictly informational. We aren’t here to promote or defame any specific brand.</em></p><h3>First, let&#39;s get into some blunders!!</h3><p>A Redditor posted this, showing a blunder caused by AI. A picture captured of a walking dog. Poor dog was converted into a raccoon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*rLSpRjZDnJ2iJXF6QcqgGg.png" /></figure><p>Some are in discussion of putting a toggle feature of AI in the phone so they can choose when and where they want AI to intervene.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*9eBrNrvmE_lNnNE6QLZkeg.png" /></figure><p>I have attached 2 of the examples; you will get many, and you may have complaints as well.</p><p><strong><em>But we are here to see the era where it began.</em></strong></p><h3>Filter app before AI</h3><p>We all remember using <strong>B612 filters </strong>and similar software to smooth out our skin or add goofy cat ears.</p><p><strong>That feels like a lifetime ago.<br> </strong><br><strong>Snapchat</strong> eventually hijacked that entire trend, <strong><em>pairing filters</em></strong> with <strong><em>direct</em></strong> <strong><em>messaging and stories</em></strong>.</p><p>While Snapchat remains a social media giant, I stopped using it a couple of years back and haven’t felt the urge to open it since — even though they’ve crammed an AI chatbot into the app now.</p><p><strong><em>Back in the day, at least we felt like we had total control over what our photos actually looked like.</em></strong></p><h3>5 Phases That Changed Camera Photography</h3><h4><strong>MULTI-FRAME FUSION (NIGHT MODE)</strong></h4><p>We all know night photography on tiny mobile sensors used to be absolute garbage.</p><p>Fixingg this required a leap into <strong>computational photography—specifically</strong> a method known as <em>epsilon photography</em>, where a camera rapidly brackets its settings (like taking multiple shots at different exposures) in a split second. The software then fuses those frames together to mathematically eliminate grain and pull detail out of the dark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*O6DqF7_eXw5tJ_REer37hQ.png" /></figure><p><strong>Nokia</strong> technically pioneered the quest for<em> low-light supremacy</em> with their <strong>PureView tech around 2013</strong>, though they relied on massive physical sensors to force light into dark shots.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*71mzaJdtWskTX-ruiQ6j1A.png" /><figcaption>iPhone XS with SmartHDR (left), and Pixel 3 with Night Sight (right).</figcaption></figure><p>The ultimate software trendsetters, however, were <strong>Google with Pixel’s <em>Night Sight</em></strong>, followed by<strong> Huawei’s <em>XD Fusion</em> and Samsung’s <em>Nightography</em></strong>. They started using AI to literally predict and replace lost color data in pitch-black environments.</p><p><em>Now, you can find the lost socks under your bed just by clicking a photo. Turns out it wasn’t a bed monster after all.</em></p><h4><strong>COMPUTATIONAL PHOTOGRAPHY</strong></h4><p><strong>It is powered by the built-in software + AI to combine multiple photos and enhance them instead of relying only on the lens and sensor.</strong></p><p>You know that weird, split-second glitch right after you snap a photo, where the image suddenly shifts and magically looks way better? That’s computational photography at work</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*BlFCKmqtyPVFo7TnGzYmUw.png" /></figure><p><strong><em>Your phone takes a rapid burst of shots the moment you press the shutter, analyzes the environment, and automatically adjusts color, detail, and contrast to match real life</em></strong>—essentially performing a<strong> professional editing workflow in milliseconds</strong>.</p><p><strong>Google</strong> kicked off the modern era of this with their HDR+ pipeline on the Nexus and Pixel lines. Today, brands use dedicated <strong>ISP (Image Signal Processor)</strong> hardware stitched right into the phone’s chip set to execute these calculations before you even open your gallery app.</p><h4><strong>SEMANTIC SEGMENTATION</strong></h4><p>This is the process of breaking an image down into distinct labels and processing them completely differently. Modern smartphones automatically recognize what they are looking at:</p><ul><li>Landscapes</li><li>Food</li><li>Pets</li><li>Architecture</li><li>People</li><li>Night scenes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*4H5KRKFdUjf-Hf0u7JsVfg.png" /></figure><p>Once identified, these elements are adjusted at a pixel level. <br>If the camera spots a sky, it tweaks the blues; if it sees a face, it softens skin tones while preserving hair texture.</p><p><strong>Huawei</strong> pioneered this trend with its <em>Master AI</em> on the Mate 10 using the mobile world’s first<strong> NPU (Neural Processing Unit)</strong>. Today, you can see it on your screen when a little “Food” or “Sky” icon pops up as you aim.</p><p><strong>Apple </strong>took this deep into the system with <em>Smart HDR</em>, treating skin tones, hair textures, and clothing as completely separate layers to apply custom processing.</p><h4><strong>On-Device Diffusion Models</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*QtSwP9i5x0uOOsiM7dJqUw.png" /></figure><p>Everyone’s favorite phase: a <strong>generative diffusion model</strong> living right inside your ecosystem. This tech allows you to remove unwanted objects (like an ex or a random tourist), extend backgrounds, or generate entirely new elements out of thin air.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*RdI0yveUPZrLnzLlqvdNAQ.png" /></figure><p>We saw the initial wave of this when <strong>Samsung introduced <em>Galaxy AI</em> (Generative Edit) and Google debuted <em>Magic Editor</em></strong>.</p><p>Early versions relied heavily on energy-hungry cloud servers, causing noticeable processing delays. <strong>Now, flagship devices utilize a hybrid approach</strong>.</p><p>Thanks to <strong>hyper-compressed latent diffusion models </strong>and massive NPU upgrades in local silicon chips, everyday edits happen instantly and entirely offline.</p><p>The phone <strong>generates </strong>intricate pixels from scratch <em>on-device</em>, democratizing powerful photo manipulation tools for everyone, regardless of their technical background.</p><h4><strong>NEURAL RENDERING</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*aFv4OU50aiClYSSjDOcvtw.png" /></figure><p><strong>Before 2018, if you wanted to brighten a shadowy photo, the phone would brighten the <em>entire</em> image globally. It looked terrible; the sky would blow out into pure white, and shadows looked like muddy water.</strong></p><p>When <strong>Apple</strong> dropped the <strong>iPhone XS</strong>, they cracked the code on breaking an image down into thousands of microregions and applying custom exposure curves to each area simultaneously.</p><p>Today,<strong> AI neural rendering</strong> decides exactly how much local contrast and “glow” your face needs. It tracks your aesthetic preferences, adjusts local contrast, and essentially determines what your memory of that day should look like. <strong><em>Honestly? </em></strong>The camera algorithm understands your emotional insecurities better than your real-life partner. FR, FR.</p><h4>CONCLUSION</h4><p>We have officially reached a <strong><em>fascinating</em></strong>, yet slightly <strong><em>terrifying</em></strong>, crossroad. As generative tech advances, the line between a regular, realistic photo capture and a complete software fabrication is completely evaporating.</p><p><strong>If you want to share your thoughts on where phone photography is heading, drop a comment below!</strong></p><p>That’s it for today. See ya!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b01d49141532" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service Unavailable: How to Fix 503 Errors in an AWS Lambda Serverless Setup]]></title>
            <link>https://blog.stackademic.com/service-unavailable-how-to-fix-503-errors-in-an-aws-lambda-serverless-setup-49d7b52e7079?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/49d7b52e7079</guid>
            <category><![CDATA[aws-certification]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[backend-development]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 11:17:16 GMT</pubDate>
            <atom:updated>2026-08-14T07:15:12.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*x2g0jJp34PRNMYWP" /><figcaption>Photo by <a href="https://unsplash.com/@cestmoisheedy?utm_source=medium&amp;utm_medium=referral">Sarah Sheedy</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article explains <strong>what to do when </strong>you encounter a <strong>“Service Unavailable” (503) </strong>error on a request from your backend, even when your other routes are working fine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*EQ0OkVLPv8vhG1LSvV2TWQ.png" /><figcaption>Service Unavailable.</figcaption></figure><p><strong>Please Note</strong>: This solution is solely for the <strong>AWS Lambda Serverless setup in 2026</strong> (<em>Mentioning year so that content of this article will be relevant to you</em>.) However, this solution might also help with other AWS setups, <em>like the SAM CLI, that yield the exact same result.</em></p><p><strong>Helper Note: </strong>If you are here to get the solution ASAP (don’t want to read details), go to the section:<br> <strong>&quot;Understanding Core Problem”</strong> and <br><strong>“How to fix problem”</strong><br>straightaway in this medium article</p><h3><strong>Let&#39;s Get things Rolling 🥁</strong></h3><p>So, you are hosting your backend on AWS Serverless because you are tired (like me) of paying for traditional hosting services, or maybe you’re just experimenting with AWS Serverless for the first time.</p><h3><strong>What have you done so far?</strong></h3><p>You went ahead and installed all the recommended configurations, like the serverless framework and the serverless-offline plugin. You created your serverless.yml file, the setup looks right, and you&#39;ve tested everything on your local development server to confirm it works.</p><p><em>(I am assuming here that you are handling multimedia files in the backend. OK!!)</em></p><p>You’ve tested all your routes using Postman or similar software, and they successfully passed.</p><p>After that, you deployed your code via GitHub or your suited repository service. Now you just need to fit in the missing pieces: grabbing the AWS API link to integrate with your frontend.</p><p>Running: serverless deploy --stage prod</p><p>…will give you the endpoint link that you can plug into Cloudflare if you are using a custom domain.</p><h3>When do you see the problem?</h3><p>After you are done integrating the link, you call your APIs. Most of the pathways work perfectly, and all results match what you expect.</p><blockquote>But one or two API endpoints just don’t give a result. Instead, you land on a Request Code of <strong>503 Service Unavailable</strong>.</blockquote><p>You checked all the routes locally, and they were working fine. What went wrong?!</p><h3>Understanding Core Problem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/1*Bn0ONqFURJvS90c19u_QSw.png" /></figure><blockquote>The core problem is that your default Lambda <strong>timeout</strong> and <strong>memory limits</strong> a<strong>re set way too low.</strong> By default, your timeout might be short (e.g., 6 seconds) and your memory size might be as low as 512MB.</blockquote><p><em>If you were only dealing with text-based requests and responses, these limits would be perfectly fine. But when you are dealing with multimedia, those files are heavy in memory. Even a 2MB file takes a toll.</em></p><p><strong>Right now, your data flow looks like this:</strong><br> Client → Lambda/Express (receives file in memory) → S3/R2 upload</p><p>Because these<strong> files are stored and processed in AWS by Lambda before being sent to your bucket or other controllers,</strong> it causes several massive issues:</p><ul><li><strong>Memory Limits:</strong> Files consume Lambda memory (easily exceeding the 512MB limit).</li><li><strong>Timeouts:</strong> Large file uploads take time, causing Lambda to hit its execution timeout. <em>(Note: API Gateway also has a hard 29-second timeout limit!)</em></li><li><strong>Cost:</strong> It wastes valuable Lambda execution time.</li><li><strong>Bandwidth:</strong> It results in inefficient bandwidth usage.</li></ul><h3>How to Fix The Problem</h3><p><strong>1. The Quick Fix (Configuration)</strong> For me, the immediate solution that worked best was going into my settings serverless.yml and bumping up the memory size and timeout settings. If your files aren&#39;t massive, simply increasing the memory to 1024MB or 2048MB and adjusting the timeout can get things working again.</p><p><strong>2. The Recommended Fix (Architecture)</strong> If your requirements heavily involve storing multimedia files, the best practice is to stop passing them through Lambda entirely. Instead, use <strong>presigned URLs</strong> for direct S3 or R2 uploads.</p><p>With this method, <strong>your client asks Lambda for a secure, temporary URL, and then the client uploads the heavy multimedia file <em>directly</em> to the storage bucket</strong>. This completely bypasses the Lambda server, preventing timeouts and memory crashes altogether.</p><h3>Conclusion</h3><p>Well, I ran into this problem recently. It took a lot of prompting and debugging to find the solution, but adjusting my timeout and memory size was what ultimately worked best to get me unblocked.</p><p>Let me know if it helped you or not!!! 🐶</p><p>What was your solution? Do let me know in the comment section (ﾉ◕ヮ◕)ﾉ</p><p><strong>If you are someone like me who needs quick solutions for things that are simple but somehow get complex, my recent Medium articles cater exactly to that.</strong></p><blockquote><strong>I also write over at </strong><a href="https://www.rantdoc.com/"><strong>rantdoc.com</strong></a><strong>, where you can just listen and scroll for some more juicy information about the daily struggles of a tech person navigating projects and life.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49d7b52e7079" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/service-unavailable-how-to-fix-503-errors-in-an-aws-lambda-serverless-setup-49d7b52e7079">Service Unavailable: How to Fix 503 Errors in an AWS Lambda Serverless Setup</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to fix the “Failed to fetch” backend error in Railway or similar?]]></title>
            <link>https://medium.com/@happy_ruchideo/why-does-a-web-app-work-on-wi-fi-but-break-on-mobile-data-how-to-fix-it-692780b5e501?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/692780b5e501</guid>
            <category><![CDATA[full-stack-developer]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[domains]]></category>
            <category><![CDATA[dns]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 22:30:40 GMT</pubDate>
            <atom:updated>2026-03-26T20:52:07.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvbVjPI2BZcEwM2ALbE67w.png" /></figure><h3><strong>We’ve all been there.</strong></h3><h4><strong>You spend all night coding, hit &quot;Deploy&quot; for the backend in Railway or a similar platform, and share the link with your friends</strong>.</h4><p>On your home Wi-Fi, it looks beautiful. But the moment a friend opens it on their phone using mobile data (like Jio or Airtel), everything breaks. No content, just a skeleton loader — or worse, a “Site Can’t Be Reached” error.</p><p>I recently went through this <strong>“launch day nightmare,”</strong> and it led me to discover a major issue with how certain ISPs handle free hosting subdomains.</p><h3>The Problem: ISP-Level DNS Blocking</h3><p>Many free hosting services, like Railway, Render, etc., use shared subdomains. Because these are sometimes abused for spam, some ISPs block them at the DNS level. Your home Wi-Fi might be using a more “open” DNS, but mobile carriers are often much more restrictive.</p><h3>The Fix: The Cloudflare “Shield”</h3><p>To solve this, I had to move my project behind a custom domain managed by <strong>Cloudflare</strong>. By using Cloudflare as a proxy, you bypass the ISP’s direct block on your host’s IP and route your traffic through a clean, global network.</p><p><strong>The basic workflow involves:</strong></p><ol><li>Pointing your domain’s nameservers to Cloudflare.</li><li>Configuring CNAME records for your frontend and backend.</li><li>Managing the “Proxy Status” (the famous orange cloud) to mask your server’s origin.</li></ol><h3>The Full “Sunday Struggle” Story</h3><p>If you want to see the exact technical configuration—including when to use the “Orange Cloud” vs. the “Grey Cloud” and how I fixed my site while half-asleep on a Sunday morning—<strong>I&#39;ve documented the whole process (with audio for struggle story) over at my</strong> <a href="http://rantdoc.peropeko.com/"><strong>Rant Doc</strong></a>.</p><p><strong>Check out the full deep dive here:</strong> <a href="https://rantdoc.peropeko.com/rant/articles/33"><strong><em>How to Fix DNS Blocks and “ISP Only” Access with Cloudflare</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=692780b5e501" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How do you document learnings?]]></title>
            <link>https://medium.com/@happy_ruchideo/how-do-you-document-learnings-ada794328d22?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ada794328d22</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[full-stack-developer]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 08:38:58 GMT</pubDate>
            <atom:updated>2026-03-15T08:38:58.959Z</atom:updated>
            <content:encoded><![CDATA[<p>Aaaaiiiish!! I made a whole platform for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*px5W3xIt79i3TZnsImOOMQ.png" /></figure><p>I am not a nerd nor an expert, but I’m pretty good at <strong>DOOMscrolling</strong> (the new horror of our tech-emerging society).</p><p>To solve my “lazy” problem of forgetting things—like where I put my documentation or where I should keep my notes—I came across the idea of teaching through articles. It’s so convenient! But then, I’m also too lazy to write. HEHE!!</p><p>One night, after a heavy doomscrolling session, I decided I would just <strong>rant</strong>. I’ll rant about my process, my perspective, and my thoughts. That’s how the concept of <strong>RANT DOC</strong> was born. 😘</p><p>I combine my actual voice with a structured blog—think of it as a personal, unfiltered version of Medium.</p><p><strong>Do check it out:</strong> <a href="http://rantdoc.peropeko.com/">rantdoc.peropeko.com</a></p><p>Moving forward, I’ll be posting the deep dives over there, and I’ll keep things here on Medium as a concise summary of those docs. To understand what the Rant Doc is all about, visit <a href="https://rantdoc.peropeko.com/rant/articles/28">https://rantdoc.peropeko.com/rant/articles/28</a></p><p>It helps me streamline my documentation, and—best of all—no one can judge me! HEHE!!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F1740352770930329390&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fhoppers-lizard-tom-gecko-gif-1740352770930329390&amp;image=https%3A%2F%2Fmedia.tenor.com%2FGCb5n9crRy4AAAAN%2Fhoppers-lizard.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba78706e2e9839a3d549dcfaf74a952b/href">https://medium.com/media/ba78706e2e9839a3d549dcfaf74a952b/href</a></iframe><p>That’s it for now.</p><p>See Yaa!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ada794328d22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to change the GitHub account in VS Code/Terminal for Windows users?]]></title>
            <link>https://medium.com/@happy_ruchideo/how-to-change-the-github-account-in-vs-code-terminal-for-windows-users-6908dbe415ff?source=rss-d2ea4008ca0c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6908dbe415ff</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Ruchi DEO]]></dc:creator>
            <pubDate>Wed, 24 Dec 2025 20:40:30 GMT</pubDate>
            <atom:updated>2025-12-24T20:48:58.912Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Switch GitHub Accounts in VS Code &amp; Terminal?! (Windows Guide)</h3><p>Struggle to be the owner of one or more GitHub accounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*phzloHZQ99BiVoJY" /><figcaption>Photo by <a href="https://unsplash.com/@praveentcom?utm_source=medium&amp;utm_medium=referral">Praveen Thirumurugan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I am the proud owner of two GitHub accounts. If you’re wondering why, I like to keep my code and profiles separate: one for frontend and official work, and the other for backend projects and advanced learning.</p><p>So, how do you switch GitHub accounts in VS Code or the terminal? I am a Windows user and haven’t switched to Linux yet, though I have used it before.</p><p>You might find solutions online suggesting you change your Git config name and email, but you will likely still get stuck with this error:</p><blockquote>remote: Permission to <strong>githubusername/projectname.git </strong>denied to <strong>yoursecondaccount</strong>.</blockquote><p>This happens because Git sees the other GitHub account as a separate entity and won’t allow it to push content unless it is a collaborator or has specific permissions.</p><h3>Before we begin, a few assumptions:</h3><ul><li>The repository you are pushing to belongs to your second account (the one you want to switch to).</li><li>Your browser contains your account data/cache; otherwise, you might log into the wrong account.</li><li>You are using Windows.</li></ul><h3>How to switch:</h3><ol><li><strong>Access Credentials:</strong> Open <strong>Windows Credential Manager</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*vsEWmw3np1zfdhzpl3xSIA.png" /></figure><p>2. <strong>Find GitHub:</strong> Look for the entry labeled git:https://github.com (our &quot;sweetheart&quot;).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*bzXc88461THpFJF8yfYq7g.png" /></figure><p>3.<strong> Edit or Remove:</strong> Open it and change the username and password (or Personal Access Token) to your second GitHub account. <br>Alternatively, just <strong>remove</strong> the entry entirely.</p><p>4. <strong>Restart:</strong> Restart your terminal or VS Code (a full system restart is usually not necessary).</p><p>5. <strong>Push and Log In:</strong> Go back to your terminal, add and commit your changes, and run the push command. Git will automatically ask you to log in.</p><ul><li><strong>Option 1:</strong> Log in through the browser.</li><li><strong>Option 2:</strong> Log in using a Personal Access Token (PAT).</li><li>Once authenticated, your code will be pushed successfully!</li></ul><h3>Conclusion</h3><p>There are other methods out there, like signing out of your GitHub account within VS Code or configuring SSH files. However, those never worked for me. If they work for others, that’s great, but I found them to be more trouble than they were worth. This method is the one that finally solved it for me.</p><p>That’s it for now.</p><p>See ya 👋!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6908dbe415ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>