<?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 Shristi K. on Medium]]></title>
        <description><![CDATA[Stories by Shristi K. on Medium]]></description>
        <link>https://medium.com/@shristikumari-blog?source=rss-cb04948e02b2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sWasm_M6jy6g9VpUuIB4IQ.jpeg</url>
            <title>Stories by Shristi K. on Medium</title>
            <link>https://medium.com/@shristikumari-blog?source=rss-cb04948e02b2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 21:20:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shristikumari-blog/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[Recursion: When a Function Learns to Call Itself]]></title>
            <link>https://medium.com/@shristikumari-blog/recursion-when-a-function-learns-to-call-itself-40eebebf8d46?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/40eebebf8d46</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Sat, 07 Nov 2026 12:41:38 GMT</pubDate>
            <atom:updated>2026-11-07T12:41:38.891Z</atom:updated>
            <content:encoded><![CDATA[<p>There is something fascinating about programming: sometimes, the simplest ideas lead to the most interesting solutions.</p><p>Imagine writing a function that calls itself. Sounds a little strange, doesn’t it? Why would we need a function to call itself when we can simply use a loop or call the function multiple times? Well, this is exactly where the concept of <strong>Recursion</strong> comes into the picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*orb3Lo3N5wn_zGwphmXHcA.png" /><figcaption>Recursion illustration</figcaption></figure><p>Recursion is a programming technique in which a function calls itself to solve a problem by breaking it into smaller and simpler versions of the same problem. Instead of writing instructions for every individual step, we define a pattern and allow the function to repeat that process until a specific condition is satisfied.</p><p>Think of it as solving a big problem by continuously reducing it into smaller problems. Each smaller problem follows the same logic as the original one, making recursion a natural approach for many programming challenges.</p><h3>Understanding the Logic Behind Recursion</h3><p>Let’s take a simple mathematical example: Factorial.</p><p>The factorial of a number is the product of all positive integers from that number down to 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120.</p><p>But there is another way to look at it. Instead of calculating everything together, we can express 5! as 5 × 4!, and 4! as 4 × 3!, continuing until we reach 1!.</p><p>This is the fundamental idea behind recursion: a problem can be expressed in terms of a smaller version of itself.</p><p>In Java, we can implement this logic as follows:</p><p>public static int factorial(int n) {<br> if (n == 1){ return 1; }<br>return n * factorial(n — 1);<br>}</p><p>The function keeps calling itself with a smaller value of n. When it reaches 1, it stops making further calls and starts returning the calculated results.</p><p>However, there is an important concept hidden inside this small piece of code: the condition that tells the function when to stop.</p><h3>The Base Case: Knowing When to Stop</h3><p>Every recursive function needs a stopping condition, commonly known as the <strong>Base Case</strong>. It defines the point at which the function should stop calling itself and return a result.</p><p>Without a base case, a recursive function can continue calling itself indefinitely. Each function call consumes additional stack memory, and eventually the program may encounter a StackOverflowError in Java.</p><p>Consider this example: if (n == 1){ return 1; } // BASE CASE</p><p>Here, n == 1, is the base case. Whenever the value of n becomes zero, the function returns without making another recursive call.</p><p>But simply writing a base case is not enough. The function must also move towards that condition with every recursive call. If we keep passing the same value repeatedly, the base case may never be reached.</p><p>This is why a good recursive solution always needs two things: a clearly defined stopping condition and a logical way to reach it.</p><h3>The Recursive Case: Breaking a Problem into Smaller Parts</h3><p>While the base case tells a function when to stop, the <strong>Recursive Case</strong> tells it how to continue.</p><p>In our factorial example, n * factorial(n — 1) represents the recursive case. Each call reduces the original problem from n to n — 1, making it progressively smaller.</p><p>This reduction is important because recursion works by solving a smaller version of the original problem and using that result to solve the larger one.</p><p>A well-designed recursive function should therefore make measurable progress towards its base case. This is what ensures that the function eventually terminates rather than getting trapped in repeated calls.</p><h3>The Call Stack: What Happens Behind the Scenes?</h3><p>One of the most interesting aspects of recursion is how the computer manages multiple function calls.</p><p>Whenever a function calls itself, the computer needs to remember the current function’s execution state, including its local variables and the point where execution should resume. This information is maintained using a data structure called the <strong>Call Stack</strong>.</p><p>The call stack follows the LIFO principle: Last In, First Out. This means the most recently added function call is completed first.</p><p>Let’s consider factorial(4). The function calls happen in the following order:</p><pre>factorial(4)<br>    factorial(3)<br>        factorial(2)<br>            factorial(1)</pre><p>At this stage, the base case is reached. The function no longer needs to make additional calls. Instead, it starts returning results in the reverse order.</p><pre>factorial(1) = 1<br>factorial(2) = 2 × 1 = 2<br>factorial(3) = 3 × 2 = 6<br>factorial(4) = 4 × 6 = 24</pre><p>This process has two important phases. During the calling phase, new function calls are added to the stack. During the returning phase, completed calls are removed from the stack one by one.</p><p>Understanding this mechanism is particularly useful when working with tree traversal, graph algorithms and backtracking problems, where multiple recursive calls may remain active simultaneously.</p><h3>Recursion and Iteration: Two Different Ways of Solving Problems</h3><p>Recursion is often compared with iteration because both techniques can perform repeated operations. However, the way they execute is different.</p><p>Iteration uses loops such as for and while, whereas recursion relies on repeated function calls. A simple task such as printing numbers from 1 to 5 can be implemented using either technique.</p><p>An iterative solution maintains the repetition through a loop variable. A recursive solution achieves the same result by calling the function with an updated argument until the base case is reached.</p><p>The difference becomes more important when we consider memory. A simple loop generally uses constant auxiliary stack space, whereas recursion creates a new stack frame for every active function call.</p><p>This means recursion can consume more memory, especially when the depth of recursive calls becomes large. In such situations, an iterative solution may be more practical.</p><p>However, recursion can make certain algorithms much easier to understand. For example, processing a hierarchical tree structure through recursion is often more natural than manually managing every node using loops.</p><p>Neither approach is universally better. The choice depends on the problem, its complexity, memory requirements and code readability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*TrMkh653JPRk8t-ObnR1cQ.png" /><figcaption>Recursion in different algorithms</figcaption></figure><h3>Where Does Recursion Actually Make a Difference?</h3><p>Recursion becomes particularly powerful when the structure of a problem naturally contains smaller versions of itself.</p><p>One of its most common applications is <strong>Tree Traversal</strong>. A tree consists of nodes connected through parent-child relationships, and each node can contain smaller subtrees. Instead of writing separate logic for every level, recursion allows us to apply the same function to the left and right subtrees.</p><p>For example, in inorder traversal of a binary tree, we first visit the left subtree, then the current node, and finally the right subtree. The same process is repeated recursively until all nodes have been visited. This makes recursion a natural fit for hierarchical data structures.</p><p>Another important application is <strong>Graph Traversal</strong>, particularly Depth First Search (DFS). DFS explores one path as deeply as possible before returning to explore other available paths. A recursive implementation makes this process straightforward because every newly discovered vertex can trigger another function call. Since graphs may contain cycles, a visited array or set is generally required to avoid repeatedly processing the same vertices.</p><p>Recursion also plays a major role in the <strong>Divide and Conquer</strong> technique. Here, a large problem is divided into smaller subproblems, those subproblems are solved independently, and their results are combined to obtain the final answer.</p><p>Merge Sort is a classic example. It divides an array into smaller halves until individual elements remain, then merges those elements back into sorted sections. Quick Sort also uses recursion by partitioning an array around a pivot and recursively sorting the resulting sections. Binary Search can similarly be implemented recursively by repeatedly reducing the search space to half.</p><p>Another interesting application is <strong>Backtracking</strong>. Imagine solving a maze where every intersection gives you multiple possible paths. You choose one path, continue exploring, and if you reach a dead end, you return to the previous decision and try another option.</p><p>Backtracking follows this same logic in programming. Recursion helps manage the sequence of decisions and returns to previous states whenever a particular choice does not lead to a valid solution. Problems such as N-Queens, Sudoku Solver and Rat in a Maze commonly use this approach.</p><p>These examples demonstrate that recursion is not simply a way to repeat instructions. It is a problem-solving technique that helps developers handle hierarchical structures, multiple possibilities and complex algorithms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*cDZfdQPeawEJeakFAx-CZA.png" /><figcaption>Types of Recursion</figcaption></figure><h3>Different Forms of Recursion</h3><p>Recursion can also be classified according to how function calls are structured.</p><p>In <strong>Direct Recursion</strong>, a function calls itself directly. Our factorial example follows this pattern because factorial() invokes factorial() again.</p><p>In <strong>Indirect Recursion</strong>, one function calls another function, which eventually calls the first function. For example, funA() calls funB(), and funB() calls funA(). This creates a recursive cycle even though neither function directly calls itself.</p><p>Another important form is <strong>Tail Recursion</strong>. A recursive function is considered tail-recursive when the recursive call is the last operation performed by that function. In other words, no additional computation remains after the recursive call returns.</p><h3>Time Complexity and Space Complexity: Beyond Just Writing Code</h3><p>Writing a recursive function is only one part of solving a programming problem. Understanding its performance is equally important.</p><p>Consider our factorial implementation. To calculate the factorial of n, the function makes approximately n calls, and each call performs a constant amount of additional work. Therefore, its time complexity is O(n).</p><p>Its space complexity is also O(n) because all recursive calls remain active on the call stack until the base case is reached. At the deepest point, approximately n function calls are waiting to return.</p><p>This distinction is important because time complexity tells us how the execution time grows with input size, while space complexity helps us understand how much additional memory the algorithm requires.</p><p>A recursive solution may look short and elegant, but that does not automatically make it efficient. Analysing both time and space is an essential part of writing production-quality code.</p><h3>The Connection Between Recursion and Dynamic Programming</h3><p>There is another important concept closely related to recursion: Dynamic Programming.</p><p>Sometimes, a recursive solution ends up solving the same smaller problem multiple times. This is known as overlapping subproblems.</p><p>The Fibonacci sequence is a classic example. Each number is calculated by adding the previous two numbers:</p><p>F(n) = F(n — 1) + F(n — 2)</p><p>A basic recursive implementation looks like this:</p><pre>static int fib(int n) {</pre><pre>    if (n &lt;= 1) {<br>        return n;<br>    }</pre><pre>    return fib(n - 1) + fib(n - 2);<br>}</pre><p>Although this implementation is easy to understand, it performs many repeated calculations. For example, fib(3) may be calculated through multiple branches while computing fib(5).</p><p>As the input increases, the number of function calls grows exponentially. The basic recursive approach has O(2^n) time complexity as a commonly used upper-bound analysis.</p><p>Dynamic Programming helps solve this problem by storing previously calculated results instead of repeatedly computing them.</p><p>There are two common approaches. Memoization follows a top-down strategy, where recursive results are stored and reused. Tabulation follows a bottom-up strategy, where smaller subproblems are solved first using an iterative approach.</p><p>For Fibonacci, memoization can reduce the time complexity to O(n).</p><p>This is a great example of how understanding recursion helps us recognise inefficiencies and develop better algorithms.</p><h3>Final Thoughts</h3><p>Recursion teaches us an interesting way of approaching problems. Instead of trying to solve everything at once, we learn to break a complex task into smaller pieces, understand how those pieces relate to one another, and build the final solution step by step.</p><p>Understanding recursion also means understanding how functions execute, how memory is managed and how algorithms can be designed more efficiently.</p><p>Perhaps the most valuable lesson is that solving a problem is not always about writing more instructions. Sometimes, it is about identifying a pattern, simplifying the problem and allowing that same logic to work at different levels.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40eebebf8d46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Day I Realized my Happiness had a Number]]></title>
            <link>https://medium.com/@shristikumari-blog/the-day-i-realized-my-happiness-had-a-number-77f74999c07c?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/77f74999c07c</guid>
            <category><![CDATA[awareness]]></category>
            <category><![CDATA[story-writing]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[self]]></category>
            <category><![CDATA[personal-development]]></category>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 12:07:32 GMT</pubDate>
            <atom:updated>2026-07-26T12:07:32.898Z</atom:updated>
            <content:encoded><![CDATA[<p><em>“Just one more refresh.”<br></em>That was the sentence I whispered to myself after posting a simple photo.</p><p>Five minutes passed.<br>Three likes.</p><p>Ten minutes later.<br>Seven.</p><p>An hour later.<br>Thirty-two.</p><p>I smiled.</p><p>Not because the picture captured a beautiful memory. Not because I was proud of it. But because thirty-two strangers had silently approved of me.<br>Without realizing it, my mood had become a number.</p><p>I refreshed again. And again. Then I stopped.</p><p>Not because I had enough likes.</p><p>But because I had a strange thought.<br><strong>“When did my happiness become something that could be counted?”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*OZIY4ppM6nYgJFJTIGceKg.png" /><figcaption>We didn’t stop creating memories. We started creating content.</figcaption></figure><h3>When Memories Became Performances</h3><p>There was a time when people took photos because they wanted to remember a moment.</p><p>Now many people experience a moment only after wondering,</p><p><em>“Will this look good online?”<br></em>A meal isn’t just dinner.<br>It’s content.</p><p>A vacation isn’t simply a vacation.<br>It’s a collection of stories waiting to be uploaded.</p><p>Even sunsets sometimes become less about watching them…<br>…and more about capturing them.</p><p>Somewhere along the way, we stopped asking,</p><p><em>“Do I love this?”<br></em>and started asking,<br><em>“Will everyone else love this?”</em></p><p>That’s a small shift.</p><p>But it changes everything.</p><h3>The Invisible Reward System</h3><p>Imagine a laboratory.<br>A mouse presses a button.</p><p>Sometimes food appears.<br>Sometimes nothing happens.</p><p>Because the reward is unpredictable, the mouse keeps pressing.<br>Again.<br>Again.<br>Again.</p><p>Psychologists call this a <strong>variable reward schedule</strong>.</p><p>It’s one of the most powerful ways to build habits.</p><p>Now replace the food with likes.<br>Or comments.<br>Or followers.<br>Or notifications.</p><p>You post something.<br>Maybe it gets twenty likes.<br>Maybe two hundred.<br>Maybe almost none.</p><p>You never know.</p><p>So your brain keeps checking.</p><p>Every notification releases a tiny burst of dopamine — not the chemical of happiness, as it’s often described, but one deeply involved in <strong>anticipation, motivation, and learning</strong>.</p><p>It whispers, <em>“Maybe something exciting happened.” </em>Sometimes something did. Sometimes nothing changed.</p><p>Yet we still checked. Because uncertainty keeps us coming back.</p><p>It’s the same psychological principle that makes slot machines so difficult to walk away from.</p><p>The next reward…<br>…might be bigger.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*PtqdrQ1CItbOVi2alazWFg.png" /><figcaption>Your phone is learning your mood</figcaption></figure><h3>Creating for the Algorithm</h3><p>Imagine someone who loves painting landscapes.</p><p>One day they upload a painting.<br>Twenty likes.</p><p>The next day they post a trending meme.<br>Five thousand likes.</p><p>The algorithm notices.<br>Their audience notices.<br>They notice.</p><p>Without anyone forcing them, they slowly stop painting.<br>Not because they stopped loving art.<br>Because they learned what gets rewarded.</p><p>Social media rarely tells you,<br><em>“Stop being yourself.”</em></p><p>It simply rewards certain versions of you more than others.<br>And over time…<br>we naturally become those versions.</p><p>Algorithms don’t directly change our personality.<br>They change <strong>what gets reinforced</strong>.<br>And humans repeat what gets rewarded.</p><h3>The Comparison Trap; Nobody Warned Us About</h3><p>You open Instagram for five minutes.</p><p>Someone got promoted.<br>Someone bought a house.<br>Someone is traveling across Europe.<br>Someone just crossed one million followers.<br>Someone else is getting married.</p><p>You close the app feeling strangely behind.</p><p>Nothing in your life changed during those five minutes.<br>Only your perception did.</p><p>The problem isn’t comparison itself. Humans have always compared themselves with others. The difference is scale.</p><p>Your grandparents compared themselves with neighbors.<br>Today you’re comparing yourself with the most successful moments from billions of people.</p><p>Even worse…<br>those moments are carefully selected.</p><p>Nobody uploads the panic attack before the presentation.<br>The rejection email.<br>The fight with their partner.<br>The lonely weekend.<br>The self-doubt.</p><p>Social media is a museum.<br>Everyone displays their masterpieces.</p><p>Very few show the unfinished sketches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3orf00Wq5jOZBebRBYpxg.png" /><figcaption>Data Centers keeps track</figcaption></figure><h3>The Game Was Designed Before You Opened the App</h3><p>One evening, I asked myself another question. <em>“Why is it so hard to close any social media app, after saying, ‘Just five more minutes’?”</em></p><p>Maybe I lacked discipline.<br>Or maybe…<br>the app was simply doing exactly what it had been designed to do.</p><p>Every swipe.<br>Every auto-play video.<br>Every notification.<br>Every “Suggested for You.”<br>Every “People You May Know.”<br>Every endless scroll.</p><p>None of it happened by accident.<br>Behind those tiny features are thousands of engineers.<br>Behavioral psychologists.<br>UX designers.<br>AI researchers.<br>Data scientists.<br>Product managers.</p><p>Entire teams studying one question:<br><strong>“How do we make someone stay just a little longer?”</strong></p><p>Not because they’re evil.<br>Because that’s how attention-driven platforms grow.<br>If users leave quickly, advertisements aren’t seen.</p><p>Engagement drops.<br>Revenue falls.</p><p>In the attention economy, time is the product.<br>And our attention is what companies compete for.</p><h3>The Algorithm Is Quietly Learning You</h3><p>Every second you spend on the app teaches it something.</p><p>What you like.<br>What you skip.<br>What you replay.<br>What makes you laugh.<br>What makes you angry.<br>What makes you stop scrolling for three extra seconds.<br>Even what you almost clicked.<br>Every action becomes data.</p><p>Then the algorithm asks itself,<br><em>“If this kept you here yesterday… what might keep you here today?”</em></p><p>Soon your feed becomes unique.<br>No two people see exactly the same social media.</p><p>You’re not looking at <strong>the</strong> Instagram.<br>You’re looking at <strong>your</strong> Instagram.</p><p>A version designed specifically for your behavior. That’s why two friends sitting beside each other can open the same app…<br>…and enter completely different worlds.</p><h3>Tiny Design Choices That Shape Big Habits</h3><p>Look closely, and you’ll notice that many features remove opportunities to stop.<br>Infinite scrolling means there is no final page.<br>Autoplay begins the next video before you’ve made a conscious decision.<br>Notifications arrive just often enough to pull you back.<br>Typing indicators create urgency.<br>Read receipts make silence feel awkward.</p><p>The small red notification badge grabs attention almost instantly because our brains naturally notice high-contrast signals associated with urgency.</p><p>None of these features are harmful by themselves.</p><p>Each one is clever.</p><p>Together, they’re incredibly persuasive.<br>Before you realize it…<br>forty-five minutes have disappeared.</p><p>The app didn’t steal your time.<br>It became exceptionally good at convincing you to spend it there.</p><h3>Are Social Media Companies Trying to Make Us Addicted?</h3><p>This is an important question.</p><p>The answer is more nuanced than many headlines suggest.<br>Most platforms don’t set out with the goal of making people unhappy or addicted.<br>Their goal is engagement.</p><p>If people enjoy using the product and stay longer, the platform grows.<br>Advertisers reach more people.<br>Creators earn more.<br>Businesses sell more.<br>Investors see growth.</p><p>Everyone benefits — up to a point.<br>The challenge is that the same techniques that make an app engaging can also make it difficult to put down.</p><p>A feature designed to keep you connected can unintentionally keep you scrolling. That’s why many experts compare social media to junk food.</p><p>The problem isn’t that it exists.<br>The problem is consuming it without limits.</p><h3>But Likes Are Not the Enemy</h3><p>It would be unfair to blame social media for everything.</p><p>Likes have helped artists find audiences.<br>Small businesses build customers.<br>Writers discover readers.<br>Musicians find fans.<br>Charities raise millions.<br>Students learn from educators around the world.<br>Communities form around shared interests.</p><p>Sometimes one simple like says, <em>“I saw your work.”, “Keep going.”<br></em>That matters.</p><p>Technology itself isn’t the villain.<br>It’s a tool.<br>Like fire.<br>It can cook food.<br>Or burn a house.</p><p>The difference lies in how we use it — and how consciously we let it use us.</p><h3>A Small Experiment</h3><p>The next time you post something…<br>Don’t check it for two hours.<br>Leave your phone.<br>Read ten pages of a book.<br>Cook dinner.<br>Call someone.<br>Go for a walk without headphones.<br>Learn a new skill.</p><p>When you finally return…<br>ask yourself, <em>“Did my life become worse because I didn’t know how many people liked my post?”</em></p><p>You may discover something surprising.<br>Peace often begins where notifications end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*NXtPSLQViJt_ij0aLFikkg.png" /><figcaption>The image says, whether you care for yourself, or you are just running behind likes? Look World around you not Screen.</figcaption></figure><h3>The Question That Matters Most</h3><p>Maybe the biggest question isn’t, <em>“How many people liked my post?”<br></em>Maybe it’s this: <strong>“Would I still post it if nobody could see the numbers?”</strong></p><p>If the answer is yes…<br>you probably posted it for yourself.</p><p>If the answer is no…<br>perhaps the algorithm has been making more decisions than you realized.</p><h3>Final Thought</h3><p>Social media is one of the greatest inventions of our generation. It connects families separated by oceans. Helps small businesses compete with giant corporations. Allows unknown creators to build careers. Spreads knowledge faster than any library ever could. Gives ordinary people a voice. None of that should be ignored.</p><p>But every powerful invention asks something from us in return. Cars ask for careful driving. Electricity asks for safe handling. Artificial intelligence asks for responsibility. Social media asks for awareness. Because the real battle isn’t between humans and technology. It’s between <strong>our attention</strong> and everything competing for it.</p><p>The next time you open an app, remember this:<br>The feed wasn’t waiting for you. It was preparing for you. <br>The algorithm doesn’t hate you. It doesn’t love you either.</p><p>It simply follows one objective: <strong>Keep your attention for one more minute.<br></strong>Your job isn’t to quit social media. Your job is to decide who stays in control.</p><p>The algorithm…<br>or you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*Zj_iaITwN2iJtiSt-2_WeQ.png" /><figcaption>Spend sometime with nature…</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77f74999c07c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Click, Many Reactions: The Power of Event-Driven Architecture]]></title>
            <link>https://medium.com/@shristikumari-blog/one-click-many-reactions-the-power-of-event-driven-architecture-de2bd96ea23d?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/de2bd96ea23d</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 07:14:26 GMT</pubDate>
            <atom:updated>2026-02-19T07:14:26.065Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s a fine day. You open your favourite food app, scroll for a few seconds, and tap on “Place Order.” That single tap does not start a long chain of direct calls. Instead, it creates an event, <em>OrderPlaced:</em></p><ul><li>represents a completed action</li><li>carries order details as data</li><li>becomes the trigger for multiple processes</li></ul><p>This event is created by the producer (Order Service)</p><ul><li>publishes the event and immediately becomes free</li><li>does not wait for other services</li><li>does not know who will consume the event</li></ul><p>The moment the event is published, it reaches the broker (message platform)</p><ul><li>acts like a smart post office for events</li><li>stores the event reliably</li><li>delivers it to all interested services</li><li>allows services to read it at their own speed</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*uHbrxPwCPdJJP41oFJmtgA.png" /></figure><p>Several consumers (independent services) are already listening.</p><p>The Payment Service</p><ul><li>reads the event and processes the transaction</li><li>emits a new event → PaymentSuccessful</li><li>enables the next set of actions</li></ul><p>The Restaurant Service</p><ul><li>receives the same original event</li><li>starts preparing the food without waiting for payment confirmation call</li><li>updates its internal system</li></ul><p>The Delivery Service</p><ul><li>listens for order and payment status</li><li>assigns the nearest delivery partner</li><li>begins real-time tracking</li></ul><p>The Notification Service</p><ul><li>sends instant confirmation to the user</li><li>keeps the experience interactive</li></ul><p>All of this happens in an asynchronous flow</p><ul><li>no service blocks another</li><li>all actions run in parallel</li><li>faster system response</li></ul><p>Because no service directly calls another, the system becomes loosely coupled</p><ul><li>new services can be added without changing existing ones</li><li>each service can be deployed independently</li><li>failure in one service does not stop the others</li></ul><p>As the story continues, we see event chaining</p><ul><li>OrderPlaced → PaymentSuccessful → OrderPacked → OutForDelivery → Delivered</li><li>each event triggers the next reaction</li><li>forms a real-time workflow without a central controller</li></ul><p>This design makes the system scalable</p><ul><li>high traffic only increases event flow</li><li>consumers can be multiplied based on load</li><li>performance remains stable</li></ul><p>It also makes the system fault tolerant</p><ul><li>events remain stored in the broker</li><li>failed services can reprocess events later</li><li>no data is lost</li></ul><p>And most importantly, it makes the system extensible</p><ul><li>a new Analytics Service can subscribe to existing events</li><li>the producer never needs to change</li></ul><p>So your single click does not control the system, it announces a fact.</p><p>That announcement travels through the broker, reaches multiple consumers, creates new events, and builds a continuous stream of real-time actions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3lwF_9JtXev58JDDDI2csg.png" /></figure><p>A simple food order is an architecture where:</p><ul><li>producers speak in events</li><li>brokers route the story</li><li>consumers react independently</li></ul><p>No tight connections.<br>No waiting.<br>No fragile chains.</p><p>Just a flow of meaningful events turning into user experiences.</p><p>One event starts the movement.<br>Many services create the outcome.<br>That is the power of this architecture.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de2bd96ea23d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Event Driven Architecture: Designing System that reacts in Real Time]]></title>
            <link>https://medium.com/@shristikumari-blog/event-driven-architecture-designing-system-that-reacts-in-real-time-75279f784cf1?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/75279f784cf1</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 06:20:13 GMT</pubDate>
            <atom:updated>2026-02-19T06:20:13.244Z</atom:updated>
            <content:encoded><![CDATA[<p>In modern software systems, everything happens in real time — placing an order, booking a cab, getting a payment notification, or receiving an OTP.</p><p>But have you ever wondered: How do so many services work together without slowing the system down?<em><br></em>The answer is Event-Driven Architecture (EDA).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*H7qq12gXlEcRFWmhNzt_MA.png" /></figure><h3>Event-Driven Architecture</h3><p>Event-Driven Architecture is a software design pattern in which different services communicate through events. An event represents something that has already happened, such as a user registration, order placement, or payment success.</p><p>Example: A user signup, then An order is placed, A successful payment ans then the product is delivered.</p><p>Instead of calling each other directly, services send events and other services listen and react.</p><h3><strong>Example</strong></h3><p>Suppose, you are ordering food, from online app</p><p>Once you place the order: <br>1. The restaurant gets the order<br>2. The delivery partner is notified<br>3. You receive a confirmation message<br>4. The payment service processes the payment <br>All this happens at the same time. Your order service does not call each service one by one. It simply says: “Order placed!” That is Event-Driven Architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*j0bn2axR7CqBupeSnBF2cA.png" /></figure><h3>Main Components</h3><ol><li>Event Producer: The service that creates the event.<br>Example: Order Service</li><li>Event Broker: A middle layer that stores and forwards events.<br>Example: Kafka, RabbitMQ</li><li>Event Consumer: The services that listen and take action.<br>Example: Email service, Payment service, Notification service</li></ol><h4>How It Works</h4><p>Step 1: A user places an order<br>Step 2: Order service creates an OrderPlaced event<br>Step 3: The event goes to the broker<br>Step 4: Multiple services receive it and do their work</p><p>All this happens asynchronously (without waiting).</p><h3>Why Use Event-Driven Architecture?</h3><ol><li>Fast and real-time</li><li>Highly scalable</li><li>Services are independent</li><li>Better for microservices</li><li>System does not break if one service fails</li></ol><h3>Challenges</h3><ol><li>Harder to debug</li><li>Managing event order can be tricky</li><li>Handling duplicate events</li></ol><h3>It Is Used in</h3><ul><li>E-commerce websites</li><li>Banking systems</li><li>Food delivery apps</li><li>Ride booking apps</li><li>Stock market applications</li></ul><h3>Conclusion</h3><p>Event-Driven Architecture (EDA) is a powerful approach for building modern, scalable, and real-time applications. Instead of tightly coupling services through direct communication, it allows them to interact through events, making the system faster, more flexible, and highly responsive. This loose coupling helps different services evolve independently and keeps the system running smoothly even if one component fails.</p><p>EDA is especially valuable in today’s world where applications must handle thousands or millions of actions simultaneously, from online shopping and digital payments to ride bookings and stock trading. Although it introduces challenges like debugging complexity and event management, the benefits in scalability, performance, and resilience make it a preferred choice for microservices-based architectures.</p><p>In simple terms, Event-Driven Architecture enables systems to react to what happens, when it happens, in real time, making it a key foundation of modern software systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75279f784cf1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cookies vs Sessions: How Websites Remember You After You Log In]]></title>
            <link>https://medium.com/@shristikumari-blog/cookies-vs-sessions-how-websites-remember-you-after-you-log-in-0b1ad69b1c45?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b1ad69b1c45</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 18:02:45 GMT</pubDate>
            <atom:updated>2026-02-14T18:02:45.992Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine: You log into LinkedIn.<br>You close the tab.<br>You reopen it, and you are still logged in.</p><p>How?</p><p>Websites are built on HTTP, which is a stateless protocol. That means the server does not remember previous requests.</p><p>So how do websites remember users?<br>They use Cookies and Sessions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*xtsBYafo3DayCHwH_tDVVQ.png" /></figure><h3><strong>Cookies</strong></h3><p>A cookie is a small piece of data stored on the client’s browser.<br>When you visit a website, the server sends a cookie. The browser stores it and sends it back with every future request.</p><p>It Stored At:</p><ul><li>Client side (browser)</li><li>Saved as small text files</li></ul><p>What Do Cookies Store?<br>User ID, Login token, Preferences (dark mode, language), Tracking information</p><h4>Example</h4><p>When you click “Remember Me” during login:</p><ul><li>The website stores a cookie in your browser.</li><li>Next time you visit, the browser sends that cookie.</li><li>Server verifies and logs you in automatically.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*i3nmIPwYslR-LMXsqKhtfg.png" /><figcaption>Cookies</figcaption></figure><h4>Advantages of Cookies</h4><ul><li>Reduce server load</li><li>Faster authentication</li><li>Good for personalization</li></ul><h4>Disadvantages of Cookies</h4><ul><li>Less secure (stored on client side)</li><li>Can be modified</li><li>Size limit (~4KB)</li></ul><h3>Sessions</h3><p>A session is stored on the server side.</p><p>When you log in:</p><ol><li>Server creates a session.</li><li>Stores your data on the server.</li><li>Sends a session ID to the browser.</li><li>Browser sends session ID with every request.</li></ol><p>The actual data remains secure on the server.</p><h4>Sessions Stored At:</h4><ul><li>Stored on the server</li><li>Only session ID is stored in browser</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*vlH_WFBQxjVelX0R05yEMw.png" /><figcaption>Sessions</figcaption></figure><h4>Example</h4><p>When you log into an online banking website:</p><ul><li>Server creates a session.</li><li>Stores your authentication details securely.</li><li>If someone steals your browser cookie, they only get session ID (still risky, but data isn’t exposed directly).</li></ul><h4>Advantages of Sessions</h4><ul><li>More secure</li><li>Sensitive data not stored on client</li><li>No size limitation like cookies</li></ul><h4>Disadvantages of Sessions</h4><ul><li>Increases server memory usage</li><li>Slightly slower than cookies</li></ul><p>Cookies store data on the client side, whereas sessions store data on the server side using a session ID; sessions are more secure while cookies are used for personalization and faster access.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b1ad69b1c45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCP vs UDP: From WhatsApp Messages to YouTube Streaming]]></title>
            <link>https://medium.com/@shristikumari-blog/tcp-vs-udp-from-whatsapp-messages-to-youtube-streaming-2da90dd355b3?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2da90dd355b3</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 17:39:21 GMT</pubDate>
            <atom:updated>2026-02-14T17:39:21.827Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine sending an important WhatsApp message: <em>“I have submitted the project.”<br></em>You want it delivered completely, correctly, and in order.</p><p>Now imagine watching a live cricket match on YouTube.<br>If one frame is lost, would you prefer buffering for 5 seconds or just continuing smoothly?</p><p>These different requirements, needs different transportation layer on Internet…<br>1. TCP = Transmission Control Protocol<br>2. UDP = User Datagram Protocol</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*d4s5BEeqxPRvXwhH4cY5IA.png" /><figcaption>TCP Vs UDP</figcaption></figure><h3>TCP</h3><p>TCP (Transmission Control Protocol) is a <strong>connection-oriented and reliable transport protocol</strong>.</p><p>Before sending data, TCP establishes a connection using a <strong>three-way handshake</strong>: = SYN -&gt; SYN-ACK -&gt; ACK<br>This ensures both sender and receiver are ready.</p><h3>Reliable TCP</h3><p>TCP guarantees reliable communication between sender and receiver by ensuring that data is delivered completely, accurately, and in the correct order. Each data segment is assigned a sequence number so the receiver can identify missing or out-of-order packets. The receiver sends acknowledgment (ACK) messages to confirm successful delivery. If a packet is lost. For example, if packet #4 does not arrive, TCP detects the gap using sequence numbers and retransmits the missing packet. Additionally, TCP performs error detection using checksums and manages data flow to prevent network congestion. Because of these multiple reliability mechanisms, TCP introduces additional overhead, making it slower than UDP but highly dependable.</p><p>TCP guarantees:<br>1. Data is delivered<br>2. Data is delivered in order<br>3. Lost packets are retransmitted<br>4. Errors are detected using checksum<br>4. Flow control is maintained<br>5. Congestion control is applied</p><p>Mechanism used:<br>1. Sequence numbers<br>2. Acknowledgment numbers<br>3. Retransmission mechanism</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*nWos4VfJfNDwbrohwcCppg.png" /><figcaption>TCP</figcaption></figure><h3>TCP Header Structure</h3><p>Minimum Size: <strong>20 bytes</strong></p><h4>1. Source Port</h4><ul><li>Identifies the sending application.</li><li>Example: Browser sending request from port 55000.</li></ul><h4>2. Destination Port</h4><ul><li>Identifies the receiving application.</li><li>Example: Web server listening on port 80 (HTTP) or 443 (HTTPS).</li></ul><h4>3️. Sequence Number</h4><ul><li>Indicates the position of the first byte of data in the current segment.</li><li>Used to maintain order.</li><li>Helps detect missing packets.</li></ul><h4>4. Acknowledgment Number</h4><ul><li>Sent by receiver to confirm received data.</li><li>Indicates the next expected byte.</li><li>Ensures reliability.</li></ul><h4>5. Flags (Control Bits)</h4><p>Important flags include:</p><ul><li><strong>SYN</strong> → Used to initiate connection.</li><li><strong>ACK</strong> → Acknowledgment flag.</li><li><strong>FIN</strong> → Used to terminate connection.</li><li><strong>RST</strong> → Reset connection.</li><li><strong>PSH</strong> → Push data immediately.</li><li><strong>URG</strong> → Urgent data.</li></ul><h4>6. Window Size</h4><ul><li>Used for flow control.</li><li>Tells how much data the receiver can accept.</li></ul><p>Prevents sender from overwhelming receiver.</p><h4>7. Checksum</h4><ul><li>Used for error detection.</li><li>Ensures data integrity.</li><li>If corrupted, packet is discarded and retransmitted.</li></ul><h3>Real-Life Examples</h3><ol><li>Whatsapp text</li><li>Email</li><li>Online Banking</li></ol><h3>UDP</h3><p>UDP (User Datagram Protocol) is a connectionless transport layer protocol that sends data without establishing a prior connection between sender and receiver. Unlike TCP, it does not guarantee delivery, ordering, or retransmission of lost packets. Data is sent in small units called datagrams, and once transmitted, the sender does not wait for acknowledgment. Because UDP avoids handshake mechanisms, congestion control, and retransmission processes, it has minimal overhead and provides faster data transmission compared to TCP.</p><h3>UDP is Faster</h3><p>UDP is faster because it:</p><ul><li>Does not establish a connection (no handshake)</li><li>Does not wait for acknowledgment</li><li>Does not retransmit lost packets</li><li>Does not maintain connection state</li><li>Does not implement flow control</li></ul><p>Since it performs fewer checks, latency is lower. That is why UDP is preferred for real-time applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*kfJ7HU44YoLt5gjrHS331A.png" /><figcaption>UDP</figcaption></figure><h3>UDP Header Structure</h3><p>Minimum size: <strong>8 bytes</strong></p><p>UDP header contains only 4 fields:</p><h4>1. Source Port</h4><ul><li>Identifies the sending application.</li><li>Helps in response routing.</li></ul><h4>2. Destination Port</h4><ul><li>Identifies the receiving application.</li><li>Example: DNS → Port 53</li><li>Streaming services → dynamic ports</li></ul><h4>3. Length</h4><ul><li>Indicates the total length of the UDP segment (header + data).</li><li>Minimum value is 8 bytes (header size).</li></ul><h4>4. Checksum</h4><ul><li>Used for basic error detection.</li><li>Verifies data integrity.</li><li>If corrupted, the packet is discarded.</li><li>However, UDP does not retransmit it.</li></ul><h3>Real-Life Examples of UDP</h3><ol><li>YouTube video streaming</li><li>Online multiplayer games</li><li>DNS</li><li>VoIP</li></ol><p>TCP is a reliable, connection-oriented protocol that ensures ordered and error-free data delivery using acknowledgments and retransmissions. Whereas, UDP is a fast, connectionless protocol that sends data without guaranteeing delivery, making it ideal for real-time applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2da90dd355b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RESTful APIs]]></title>
            <link>https://medium.com/@shristikumari-blog/restful-apis-d469694a025f?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d469694a025f</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Thu, 15 Jan 2026 08:49:19 GMT</pubDate>
            <atom:updated>2026-01-15T08:49:19.722Z</atom:updated>
            <content:encoded><![CDATA[<p>REST = Representational State Transfer</p><p>RESTful APIs are widely used in modern web and mobile applications to enable communication between client and server. It is basically interaction between frontend and backend. Client sends the data i.e., request to backend, via API (application programing interface). After processing data, backend sends processed information i.e., response to frontend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*EJgTImuh0dAaccUvhpR0zQ.png" /></figure><p>Example: When you order food at a restaurant, your order acts as a request. The waiter takes this request to the chef, similar to how an API forwards a request to the backend. The chef applies the required logic and prepares the food, which represents the backend processing. Finally, the prepared food is served back to you, which acts as the response.</p><p>Data is usually exchanged in two formats; JSON and XML, for get/send data.<br>1. JSON : JavaScript Object Notation<br>2. XML : Extensible Markup Language</p><p>CRUD in RESTful APIs:<br>1. C = Create = POST : Sends the data from user to server. Example; during signup/login<br>2. R = Read = GET : Shows information taken from server.<br>3. U = Update = PUT : For updating the details like updating in form.<br>4. D = Remove = DELETE : For deleting the existing details from database.</p><p>Client → API → Server → Database → Response</p><p>How is data sent?<br>Usually for sending, its POST or PUT requests<br>Example: User Signup</p><p>Request<br>POST /register (required data)<br>Content-Type: application/json (actual data)</p><p>json body<br>{<br> “username”: “example”,<br> “email”: “<a href="/service/mailto:sejal@gmail.com">example@gmail.com</a>”,<br> “password”: “1234”<br>}</p><p>Server side<br>Server reads and parses JSON.<br>Take out values, like username, email, etc.,<br>Apply logic</p><p>When client asks for data<br>GET /user/1 (data of 1st user)<br>Accept: application/json (actual data which is needed)</p><p>json<br>{<br> “id”: 1,<br> “username”: “example”,<br> “email”: “<a href="/service/mailto:sejal@gmail.com">example@gmail.com</a>”<br>}</p><p>Rules of RESTful APIs<br>1. It’s stateless. All requests are independent. Server does not remember requests.<br>2. URL has resource, like /users/1<br>3. Either data is in JSON format or XML</p><p>RESTful APIs used in:<br>1. Mobile Applications<br>2. Website<br>3. Microservices</p><p>Features of RESTful APIs:<br>1. Easy to use<br>2. Platform Independent<br>3. Scalable</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d469694a025f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vite]]></title>
            <link>https://medium.com/@shristikumari-blog/vite-bbf1cdb19fd7?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbf1cdb19fd7</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Thu, 18 Dec 2025 05:34:55 GMT</pubDate>
            <atom:updated>2026-02-19T07:23:29.089Z</atom:updated>
            <content:encoded><![CDATA[<p>Vite is a modern frontend build tool that provides a <strong>faster development experience</strong> for web projects. It uses <strong>native ES modules</strong> in the browser during development and bundles files efficiently for production.<br>Example : Instead of waiting minutes for a React app to start, Vite starts the dev server <strong>almost instantly</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*vih7JyLPkSyQhuEKMuogVQ.png" /></figure><h3>Vite Was Created</h3><p>Traditional tools like CRA and Webpack bundle the entire project before starting the server, which slows down development as the app grows.</p><p>Vite solves this by:</p><ul><li>Loading files <strong>on demand</strong></li><li>Using <strong>esbuild</strong> for lightning-fast processing</li><li>Bundling only for <strong>production</strong></li></ul><h3>Key Features of Vite</h3><h4>1. Lightning-Fast Dev Server</h4><p>Vite starts the server in milliseconds because it does not bundle everything upfront. <strong>Example: </strong>npm run dev → app runs instantly.</p><h4>2. Hot Module Replacement (HMR)</h4><p>Changes reflect instantly without refreshing the page or losing state. <strong>Example: </strong>Editing a React component updates the UI immediately.</p><h4>3. Native ES Modules</h4><p>Vite uses browser-supported ES modules during development, reducing unnecessary processing. <strong>Example:</strong> import App from “./App.jsx” is loaded directly by the browser.</p><h4>4. Optimized Production Build</h4><p>For production, Vite uses <strong>Rollup</strong> to create optimized, minified bundles. <strong>Example:</strong> Code splitting and tree-shaking happen automatically.</p><h4>5. Framework Support</h4><p>Vite works seamlessly with:</p><ul><li>React</li><li>Vue</li><li>Svelte</li><li>Solid</li><li>Vanilla JS</li></ul><h3>How to Create a Vite Project</h3><p>npm create vite@latest<br>cd project-name<br>npm install<br>npm run dev</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8BRDlmu1aFi28TtHGDGvzg.png" /></figure><h3><strong>Conclusion</strong></h3><p>Vite is a powerful alternative to traditional build tools, offering speed, simplicity, and a superior developer experience for modern frontend applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbf1cdb19fd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MongoDB Vs SQL]]></title>
            <link>https://medium.com/@shristikumari-blog/mongodb-vs-sql-cc4c61854ed3?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc4c61854ed3</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Wed, 17 Dec 2025 08:24:26 GMT</pubDate>
            <atom:updated>2025-12-20T13:48:42.837Z</atom:updated>
            <content:encoded><![CDATA[<p>Database is a collection of interrelated data, organized in such a way that enables efficient storage, retrieval, and manipulation of information.<br>Two popular types of databases are SQL databases and MongoDB (NoSQL database).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*a6uPB_3p5aE_GXPLfYGUdA.png" /></figure><h3>SQL Database</h3><p>SQL (Structured Query Language) databases store data in <strong>tables with rows and columns</strong>. They follow a <strong>fixed schema</strong>, meaning the structure of data must be defined and will not change.<br><strong>Example:</strong> MySQL, PostgreSQL, Oracle, SQL Server</p><h3>MongoDB</h3><p>MongoDB is a <strong>NoSQL database</strong> that stores data in <strong>documents (JSON-like format)</strong> instead of tables. It supports a <strong>dynamic schema</strong>, allowing data structure to change easily.<br><strong>Example: </strong>A user document with name, email, and optional address field.</p><h3>Data Storage Structure</h3><p><strong>SQL: </strong>Data is stored in tables, and relationships are created using foreign keys. This structure is highly organized and consistent.</p><p><strong>MongoDB: </strong>Data is stored in collections of documents. Each document can have a different structure.</p><p><strong>Example:</strong><br> SQL: User(id, email, name)<br> MongoDB: { name : “Shristi”, email: example@gmail.com }</p><h3>Schema Flexibility</h3><p><strong>SQL: </strong>Schema is strict. Altering tables later can be complex and time-consuming.<br><strong>MongoDB: </strong>Schema is flexible. Fields can be added or removed without affecting existing data.<br><strong>Example: </strong>Adding a new field like <strong>phoneNumber</strong> is easier in MongoDB.</p><h3>Query Language</h3><p><strong>SQL: </strong>Uses SQL queries like SELECT, INSERT, UPDATE, etc.<br><strong>Example: </strong>SELECT * FROM users;</p><p><strong>MongoDB: </strong>Uses JavaScript-based query syntax.<br><strong>Example: </strong>db.users.find()</p><h3>Scalability</h3><p><strong>SQL: </strong>Primarily uses <strong>vertical scaling</strong> (increasing server power).<br><strong>MongoDB: </strong>Supports <strong>horizontal scaling</strong> easily using sharding.</p><p><strong>Example: </strong>MongoDB is preferred for applications with large and growing data.</p><h3>Performance</h3><p><strong>SQL: </strong>Performs well for complex queries and transactions.<br><strong>MongoDB: </strong>Faster for read/write operations on large unstructured data.</p><p><strong>Example: </strong>Real-time applications often prefer MongoDB.</p><h3>ACID Compliance</h3><p><strong>SQL: </strong>Fully ACID compliant, ensuring strong data consistency.<br><strong>MongoDB: </strong>Supports ACID transactions but is generally optimized for flexibility and speed.</p><p><strong>Example: </strong>Banking systems prefer SQL databases.</p><h3>Use Cases</h3><p><strong>SQL Databases:</strong></p><ul><li>Banking systems</li><li>Enterprise applications</li><li>Applications with complex relationships</li></ul><p><strong>MongoDB:</strong></p><ul><li>MERN stack applications</li><li>Real-time analytics</li><li>Content management systems</li></ul><h3>When to Choose Which?</h3><p>We choose <strong>SQL</strong> when data consistency and relationships are critical and <strong>MongoDB</strong> when flexibility, scalability, and fast development are required.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc4c61854ed3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Scraping with Selenium]]></title>
            <link>https://medium.com/@shristikumari-blog/web-scraping-with-selenium-67125a87cbd1?source=rss-cb04948e02b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/67125a87cbd1</guid>
            <dc:creator><![CDATA[Shristi K.]]></dc:creator>
            <pubDate>Tue, 16 Dec 2025 13:10:50 GMT</pubDate>
            <atom:updated>2025-12-16T13:10:50.441Z</atom:updated>
            <content:encoded><![CDATA[<h3>Web Scraping</h3><p>Web scraping is the automated process of extracting data from websites using bots or software, transforming unstructured web content into organized, usable formats like spreadsheets or databases for analysis or research.<br>Example: A script can visit an e-commerce site daily and collect updated prices for comparison.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yeUigxbL40tfsgtyQrNfVg.png" /></figure><h3>Selenium</h3><p>Selenium is a browser automation tool that allows Python scripts to interact with web pages like a real user, making it suitable for scraping dynamic content.<br>Example: Scraping product prices that load only after the page opens.</p><h3>Difference Between Selenium and BeautifulSoup</h3><p>BeautifulSoup parses static HTML, while Selenium automates browsers to handle dynamic and interactive content.<br>Example:<strong> </strong>BeautifulSoup fails on JavaScript pages; Selenium succeeds.</p><h3>JavaScript-Rendered Web Pages</h3><p>These pages fetch data asynchronously using JavaScript, so content is not present in initial HTML.<br>Example:<strong> </strong>React-based websites showing empty source code.</p><h3>Why Use Selenium</h3><p>Selenium is used in web scraping when a website loads content dynamically using JavaScript. Unlike basic HTTP tools, Selenium controls a real browser, allowing it to interact with buttons, scroll pages, and load data just like a human user.</p><h3>Why Requests Fails but Selenium Works in Web Scraping</h3><p>The requests library only fetches the initial HTML response from a server and cannot execute JavaScript. Many modern websites load data after the page renders, which Selenium can handle because it runs a real browser and executes JavaScript automatically.</p><h3>Advantages of Using Selenium for Web Scraping</h3><ul><li>Scrapes JavaScript-rendered and dynamic websites</li><li>Mimics real user behavior</li><li>Handles login pages, scrolling, pagination, and pop-ups</li><li>Works well with complex and interactive web pages</li><li>Useful when APIs or static HTML are unavailable</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67125a87cbd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>