<?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 Meera Devi on Medium]]></title>
        <description><![CDATA[Stories by Meera Devi on Medium]]></description>
        <link>https://medium.com/@techInnHouse?source=rss-3c91d20ddb94------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MXtPRgA4GdvCa43S</url>
            <title>Stories by Meera Devi on Medium</title>
            <link>https://medium.com/@techInnHouse?source=rss-3c91d20ddb94------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 22:04:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@techInnHouse/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[Debouncing vs Throttling Explained Like You’re 5]]></title>
            <link>https://medium.com/@techInnHouse/debouncing-vs-throttling-explained-like-youre-5-ce71e4d4d885?source=rss-3c91d20ddb94------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce71e4d4d885</guid>
            <category><![CDATA[debouncing]]></category>
            <category><![CDATA[throttling]]></category>
            <category><![CDATA[debouncing-in-javascript]]></category>
            <category><![CDATA[debouncing-vs-throttling]]></category>
            <category><![CDATA[throttling-in-javascript]]></category>
            <dc:creator><![CDATA[Meera Devi]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 21:46:01 GMT</pubDate>
            <atom:updated>2025-06-02T21:46:01.020Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KaO6qbIyqEmYfkGS_HMjJg.png" /></figure><h3>Imagine this…</h3><p><em>You have a toy that plays a sound every time you press a button.</em></p><p><em>But your little sibling </em><strong><em>keeps mashing the button super fast</em></strong><em>! You don’t want the toy to go crazy, so you come up with two smart rules:</em></p><p><strong>Debouncing (<em>Wait until they stop Asking</em>):</strong></p><blockquote>“I’ll wait until you stop pressing the button for a little while before I make the sound.”</blockquote><p><strong>What it means: </strong><em>Only do the thing </em><strong><em>after the activity has stopped</em></strong><em> for a moment.</em></p><pre>function debounce(fn, delay) {<br>  let timeout;<br>  return function(...args) {<br>    clearTimeout(timeout);<br>    timeout = setTimeout(() =&gt; fn.apply(this, args), delay);<br>  };<br>}</pre><p><strong>Real-life example:</strong></p><ul><li><em>You keep yelling, “Mom! Can I get a cookie? Mom! Cookie? Mom! COOKIE?!”</em></li><li><em>Your mom says, “I’ll only listen when you stop asking for 5 seconds.”</em></li><li><em>If you pause for 5 seconds, she buys the cookie. If you keep yelling, she ignores you.</em></li></ul><p><strong>Throttling</strong> (<em>Slow down the presses</em>):</p><blockquote>“Even if you press the button a lot, I’ll only let it make the sound <strong>once every 1 second</strong>.”</blockquote><p><strong>What it means:</strong><br><em> Do the thing at </em><strong><em>regular intervals</em></strong><em>, no matter how often it’s triggered</em>.</p><pre>function throttle(fn, limit) {<br>  let lastCall = 0;<br>  return function(...args) {<br>    const now = Date.now();<br>    if (now - lastCall &gt;= limit) {<br>      lastCall = now;<br>      fn.apply(this, args);<br>    }<br>  };<br>}</pre><p><strong>Real-life example:</strong><br> <em>Scrolling. If you scroll like crazy, it still only checks your position </em><strong><em>once every 100ms, Eg. </em></strong><em>Scroll event or resize</em></p><p><strong>Another Example</strong></p><ul><li>You beg, <em>“Mom! Can I get a cookie?”</em></li><li>She says, <em>“No matter how much you ask, I’ll only check every 5 minutes.”</em></li><li>Even if you ask 100 times in 5 mins, she only responds once.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce71e4d4d885" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clousure]]></title>
            <link>https://medium.com/@techInnHouse/clousure-5db58bcd4c7f?source=rss-3c91d20ddb94------2</link>
            <guid isPermaLink="false">https://medium.com/p/5db58bcd4c7f</guid>
            <category><![CDATA[closure]]></category>
            <category><![CDATA[closure-in-javascript]]></category>
            <dc:creator><![CDATA[Meera Devi]]></dc:creator>
            <pubDate>Fri, 30 May 2025 01:56:53 GMT</pubDate>
            <atom:updated>2025-05-30T01:56:53.511Z</atom:updated>
            <content:encoded><![CDATA[<pre>// The outer function defines a variable called &quot;name&quot;<br>const pet = function (name) {<br>  const getName = function () {<br>    // The inner function has access to the &quot;name&quot; variable of the outer function<br>    return name;<br>  };<br>  return getName; // Return the inner function, thereby exposing it to outer scopes<br>};<br>const myPet = pet(&quot;Vivie&quot;);<br><br>console.log(myPet()); // &quot;Vivie&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5db58bcd4c7f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Currying In Javascript]]></title>
            <link>https://medium.com/@techInnHouse/currying-in-javascript-7d1a743dbc9c?source=rss-3c91d20ddb94------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d1a743dbc9c</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[function-currying]]></category>
            <category><![CDATA[javascript-currying]]></category>
            <category><![CDATA[currying]]></category>
            <dc:creator><![CDATA[Meera Devi]]></dc:creator>
            <pubDate>Wed, 28 May 2025 21:08:34 GMT</pubDate>
            <atom:updated>2025-05-28T21:08:34.656Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>(Benefits &amp; Real-World Use Cases)</blockquote><p><strong><em>Currying</em></strong><em> is a technique in functional programming where a function that takes multiple arguments is </em><strong><em>transformed into a sequence of functions</em></strong><em>, each taking a </em><strong><em>single argument</em></strong>.</p><h3>Simple Example</h3><p>Let’s say you have a function that adds three numbers:</p><p><em>Without Currying:</em></p><pre>function add(a, b, c) {<br>  return a + b + c;<br>}<br><br>console.log(add(1, 2, 3)); // 6</pre><p><em>With Currying:</em></p><pre>function curriedAdd(a) {<br>  return function(b) {<br>    return function(c) {<br>      return a + b + c;<br>    };<br>  };<br>}<br><br>console.log(curriedAdd(1)(2)(3)); // 6</pre><p><em>ES6 Arrow Function Version:</em></p><pre>const curriedAdd = a =&gt; b =&gt; c =&gt; a + b + c;<br><br>console.log(curriedAdd(1)(2)(3)); // 6</pre><h3><strong>Real-World Use Cases</strong></h3><ol><li><strong>Authorization Checks</strong></li></ol><pre>const hasRole = role =&gt; user =&gt; user.roles.includes(role);<br><br>const isAdmin = hasRole(&#39;admin&#39;);<br>console.log(isAdmin({ roles: [&#39;user&#39;, &#39;admin&#39;] })); // true</pre><p>2. <strong>UI Event Handlers in React</strong></p><pre>const handleClick = id =&gt; event =&gt; {<br>  console.log(`Clicked item ${id}`);<br>};<br><br>// Usage: &lt;button onClick={handleClick(42)}&gt;Click Me&lt;/button&gt;</pre><p>3. <strong>Input Validators</strong></p><pre>const minLength = len =&gt; str =&gt; str.length &gt;= len;<br><br>const isValidUsername = minLength(5);<br>console.log(isValidUsername(&quot;user1&quot;)); // true</pre><h3>Helps with Functional Programming</h3><p>Currying works well with <strong>pure functions</strong> and <strong>higher-order functions</strong> — key principles in functional programming.</p><ul><li>Makes code more <strong>modular</strong>, <strong>composable</strong>, and <strong>reusable</strong>.</li><li>Better testability</li><li><strong>Currying</strong> breaking down a function of multiple arguments into a series of unary (single argument) functions.</li><li>Used often in <strong>functional programming</strong> and <strong>React</strong> with hooks and event handling.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d1a743dbc9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is JWT used for?]]></title>
            <link>https://medium.com/@techInnHouse/what-is-jwt-used-for-9331e4bb576b?source=rss-3c91d20ddb94------2</link>
            <guid isPermaLink="false">https://medium.com/p/9331e4bb576b</guid>
            <category><![CDATA[jwt-use-case]]></category>
            <category><![CDATA[real-life-example]]></category>
            <category><![CDATA[jwt]]></category>
            <category><![CDATA[jwt-token]]></category>
            <category><![CDATA[jwt-authentication]]></category>
            <dc:creator><![CDATA[Meera Devi]]></dc:creator>
            <pubDate>Wed, 28 May 2025 20:19:11 GMT</pubDate>
            <atom:updated>2025-05-28T20:19:11.035Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>JWT</strong> stands for <strong>JSON Web Token</strong>, and it is used primarily for <strong>securely transmitting information between parties as a JSON object</strong>. It is widely used in <strong>authentication and authorization</strong> in web applications.</p><h3>JWT used for?</h3><h4>1. Authentication</h4><ul><li>After a user logs in, the server generates a JWT and sends it to the client.</li><li>The client stores the JWT (usually in localStorage or cookies) and includes it in the header of subsequent requests.</li><li>The server verifies the token and grants access based on its validity.</li></ul><h4>2. Authorization</h4><ul><li>JWT contains claims (like user roles, permissions).</li><li>Based on the data in the JWT, the server can allow or restrict access to resources.</li></ul><h4>3. Information Exchange</h4><ul><li>JWT can carry data between parties in a secure, tamper-evident way.</li><li>Because it’s signed (with a secret or public/private key), the data can be trusted.</li></ul><h3>Example Use Case</h3><ul><li>User logs in → server verifies credentials</li><li>Server returns a JWT like: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...</li><li>Client stores this JWT.</li><li>Client makes API calls with the token in the Authorization header:</li><li>Server decodes and verifies the token before responding.</li></ul><h3>Structure of a JWT</h3><p>A JWT has three parts, separated by dots (.):</p><ul><li><strong>Header</strong>: metadata about the token (e.g., algorithm used)</li><li><strong>Payload</strong>: the data (claims) — like user ID, roles, etc.</li><li><strong>Signature</strong>: verification hash to ensure the token hasn’t been tampered with</li></ul><h3>Why JWT?</h3><ul><li><strong>Stateless</strong>: No session needs to be stored on the server</li><li><strong>Compact</strong>: Easily passed in URL, headers, or body</li><li><strong>Secure</strong>: Signed and optionally encrypted</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9331e4bb576b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Single Sign-On?]]></title>
            <link>https://medium.com/@techInnHouse/what-is-single-sign-on-31b8f6937fb8?source=rss-3c91d20ddb94------2</link>
            <guid isPermaLink="false">https://medium.com/p/31b8f6937fb8</guid>
            <category><![CDATA[what-is-sso]]></category>
            <category><![CDATA[benefits-of-sso]]></category>
            <category><![CDATA[use-case-of-sso]]></category>
            <category><![CDATA[sso]]></category>
            <category><![CDATA[real-example-of-sso]]></category>
            <dc:creator><![CDATA[Meera Devi]]></dc:creator>
            <pubDate>Wed, 28 May 2025 20:05:32 GMT</pubDate>
            <atom:updated>2025-05-28T20:06:35.519Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Single sign-on (SSO)</strong> is an authentication method that enables users<br>to <strong>log in once</strong> and gain access to <strong>multiple applications or services</strong> without having to log in again for each of them.</p><h3>Real-world Example: Google SSO</h3><p>Imagine you’re using different Google services:</p><ol><li>You go to <strong>Gmail</strong> and log in with your Google account.</li><li>Then you visit:</li></ol><ul><li><strong>YouTube</strong></li><li><strong>Google Drive</strong></li><li><strong>Google Calendar</strong></li><li><strong>Google Docs</strong></li></ul><p>Even though these are separate applications, you <strong>don’t need to log in again</strong> you’re already signed in because of SSO.</p><p><strong>Google</strong> acts as the identity provider, and each app trusts that identity.</p><h3>How SSO Works (Simplified Flow)</h3><ol><li>You try to access <strong>App A</strong>.</li><li>App A redirects you to the <strong>SSO login server</strong> (e.g., Okta, Auth0, Azure AD, or Google).</li><li>You <strong>log in once</strong> to the SSO server.</li><li>SSO server creates a secure token (often JWT or SAML) and redirects you back to App A.</li><li>You then visit <strong>App B</strong> — it checks with the SSO server, sees you’re already authenticated, and logs you in automatically.</li></ol><h3>Technologies Behind SSO</h3><p><strong>Protocols</strong>:</p><ul><li>SAML (Security Assertion Markup Language)</li><li>OAuth 2.0</li><li>OpenID Connect</li></ul><p><strong>Identity Providers (IdP)</strong>:</p><ul><li>Google</li><li>Okta</li><li>Microsoft Azure AD</li><li>Auth0</li></ul><p><strong>Service Providers (SP)</strong>:</p><ul><li>Applications that rely on the IdP for authentication</li></ul><h3>Benefits of SSO</h3><ul><li><strong>One login</strong> for many apps</li><li><strong>Fewer passwords</strong> to remember</li><li><strong>Improved security</strong> (centralized control) and user experience</li><li><strong>Faster access</strong> to multiple services</li><li>Centralized authentication</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31b8f6937fb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>