<?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"><channel><title><![CDATA[Arun's blog]]></title><description><![CDATA[Arun's blog]]></description><link>https://ajsd.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Sep 2026 22:51:47 GMT</lastBuildDate><atom:link href="https://ajsd.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[🧭 The Blueprint of "You": Navigating the Fog of an Identity Crisis]]></title><description><![CDATA[We’ve all heard the term "identity crisis." We usually picture a teenager rebelling against their parents or a 50-year-old buying a sports car. But the truth is, an identity crisis is a much more profound and common human experience.
It's that deeply...]]></description><link>https://ajsd.hashnode.dev/the-blueprint-of-you-navigating-the-fog-of-an-identity-crisis</link><guid isPermaLink="true">https://ajsd.hashnode.dev/the-blueprint-of-you-navigating-the-fog-of-an-identity-crisis</guid><category><![CDATA[Self Improvement ]]></category><category><![CDATA[identity crisis]]></category><dc:creator><![CDATA[Arun SD]]></dc:creator><pubDate>Wed, 29 Oct 2025 18:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1762000683895/ea2e20c3-dbe7-43ed-a2c6-f61cb402c763.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We’ve all heard the term "identity crisis." We usually picture a teenager rebelling against their parents or a 50-year-old buying a sports car. But the truth is, an identity crisis is a much more profound and common human experience.</p>
<p>It's that deeply unsettling feeling when you look in the mirror and ask, "Who am I, <em>really</em>?"</p>
<p>This crisis isn't a failure; it's a critical signal. It’s the moment when the <em>person you believe you are</em>, the <em>values you hold</em>, and the <em>actions you take</em> stop aligning. Let's break down this internal earthquake.</p>
<hr />
<h3 id="heading-the-blueprint-your-self-image-and-the-ego">The Blueprint: Your "Self-Image" and the Ego</h3>
<p>To understand an identity crisis, we first need to understand identity itself. One of the best frameworks for this comes from Dr. Maxwell Maltz, a plastic surgeon who, in the 1950s, wrote a groundbreaking book called <strong>"Psycho-Cybernetics."</strong></p>
<p>Maltz noticed something fascinating: when he performed plastic surgery on a patient (like fixing a scar), the patient's <em>life</em> didn't always change. Their "new face" didn't make them more confident or successful. Why?</p>
<p>Because they hadn't updated their <strong>internal self-image</strong>.</p>
<ul>
<li><p><strong>The "Cybernetic" Mechanism:</strong> Maltz described the human mind as a "servo-mechanism," like the guidance system in a torpedo or the AC in your house.</p>
</li>
<li><p><strong>The AC:</strong> A AC doesn't <em>know</em> if it's hot or cold. It only knows the <em>goal</em> it was set to (e.g., 27 degrees). It then sends signals, to make the external reality <em>match</em> its internal goal.</p>
</li>
<li><p><strong>The Self-Image as Ego:</strong> Your "ego" or "self-image" is your AC’s setting. It's the <strong>blueprint</strong> of the "sort of person" you believe yourself to be.</p>
</li>
</ul>
<p>If your self-image is set to "I am an anxious person who fails at public speaking," your mind will <em>automatically</em> steer you toward that reality. It will make you feel sick, forget your words, and focus on the one person yawning in the crowd. You "achieve" your blueprint.</p>
<p>An <strong>identity crisis</strong> begins when this blueprint is violently challenged. Your internal "setting" no longer matches the reality you're experiencing, and the whole system short-circuits.</p>
<hr />
<h3 id="heading-when-the-foundation-cracks-how-changing-morals-shake-our-identity">When the Foundation Cracks: How Changing Morals Shake Our Identity</h3>
<p>A massive part of our self-image blueprint is built on our <strong>morals and values</strong>. These are the load-bearing walls of our identity.</p>
<ul>
<li><p>"I am an <strong>honest</strong> person."</p>
</li>
<li><p>"I am a <strong>loyal</strong> friend."</p>
</li>
<li><p>"I am someone who believes in <strong>justice/family/faith/logic</strong>."</p>
</li>
</ul>
<p>We use these moral statements to define "good" (what's like me) and "bad" (what's not like me). But what happens when these morals, which we thought were solid as concrete, begin to change?</p>
<p>This can be triggered by:</p>
<ul>
<li><p><strong>New Experiences:</strong> Moving to a new country and realizing your "absolute" moral code isn't shared by billions of other good, happy people.</p>
</li>
<li><p><strong>Education:</strong> Learning about history or science that challenges a deeply held belief you were raised with.</p>
</li>
<li><p><strong>Trauma or Loss:</strong> An event that makes you question your entire belief system about fairness and the world.</p>
</li>
</ul>
<p>When your morals shift, the "old self" (who you <em>were</em>) comes into direct conflict with the "new self" (who you are <em>becoming</em>).</p>
<p>If your identity was "I am a person who always follows the rules," but you find yourself believing a specific rule is unjust, you are now in a crisis. <em>Am I a hypocrite? Am I a bad person? Or was the rule wrong all along?</em> This internal schism is terrifying because the very compass you used to navigate the world is spinning wildly.</p>
<hr />
<h3 id="heading-the-action-identity-loop-i-did-it-but-was-it-me">The Action-Identity Loop: "I Did It, But Was It 'Me'?"</h3>
<p>This brings us to the third, and perhaps most common, trigger for an identity crisis: the conflict between <strong>our actions</strong> and <strong>our beliefs</strong>.</p>
<p>This is the central theme of <em>cognitive dissonance</em>. We have a powerful, innate need for our actions and our self-image to be consistent. When they are <em>not</em>, we feel a psychic pain.</p>
<p><strong>This conflict goes both ways:</strong></p>
<ol>
<li><p><strong>Doing Something "Worse" Than We Are:</strong> You believe, "I am a kind and patient person." But one day, under extreme stress, you yell at your child or betray a friend. The action is done. It's real. It now <em>exists</em> in the world, in total opposition to your self-image. The crisis is the question: "Was my 'kind person' identity a lie all along? Or was that action just a fluke?" To resolve the crisis, you <em>must</em> change something: either your self-image ("Maybe I'm not as kind as I thought") or your future actions ("I will never do that again").</p>
</li>
<li><p><strong>Doing Something "Better" Than We Are:</strong> This is the flip side. Your self-image is, "I am shy and not a leader." But at work, your team is failing, and you instinctively step up, organize everyone, and save the project. Your <em>action</em> (effective leadership) completely contradicts your <em>blueprint</em> ("I am not a leader"). This, too is a crisis, a positive one! Your brain is forced to ask, "Wait... if I just <em>did</em> that, can my old belief about myself possibly be true?"</p>
</li>
</ol>
<p>An identity crisis is the moment of friction when your actions prove your old blueprint is wrong.</p>
<hr />
<h3 id="heading-re-drawing-the-blueprint">Re-Drawing the Blueprint</h3>
<p>An identity crisis feels like you're being erased. But you're not. You are being <strong>rewritten</strong>.</p>
<p>Maxwell Maltz’s "Psycho-Cybernetics" isn't just a diagnosis; it's a manual. He argued that since the self-image is just a blueprint, <em>it can be re-drawn</em>. An identity crisis isn't a breakdown; it's a <strong>breakthrough</strong>. It's the painful, necessary process of shedding an old, outdated "self-image" that no longer fits your reality.</p>
<p>It's the moment you stop letting an old program run your life and consciously decide to change the setting on the thermostat.</p>
<hr />
<p><em>Disclaimer: This blog post is for informational purposes. If you are experiencing severe distress from an identity crisis, please consider speaking with a mental health professional.</em></p>
]]></content:encoded></item><item><title><![CDATA[The Quiet Rebellion: Finding Joy in a 'Boring' Life]]></title><description><![CDATA[In a world obsessed with viral moments and endless scrolling, admitting you want a "boring" life feels like a quiet act of rebellion. But what if trading chaos for calm isn’t a downgrade? What if it’s the smartest upgrade you could ever make? I’m con...]]></description><link>https://ajsd.hashnode.dev/the-quiet-rebellion-finding-joy-in-a-boring-life</link><guid isPermaLink="true">https://ajsd.hashnode.dev/the-quiet-rebellion-finding-joy-in-a-boring-life</guid><dc:creator><![CDATA[Arun SD]]></dc:creator><pubDate>Thu, 16 Oct 2025 17:15:48 GMT</pubDate><content:encoded><![CDATA[<p>In a world obsessed with viral moments and endless scrolling, admitting you want a "boring" life feels like a quiet act of rebellion. But what if trading chaos for calm isn’t a downgrade? What if it’s the smartest upgrade you could ever make? I’m convinced that the steady, uneventful life isn't something to escape, it’s something to build. It’s a sign that things are, for the most part, working.</p>
<h4 id="heading-the-digital-fog-and-the-myth-of-keeping-up"><strong>The Digital Fog and the Myth of 'Keeping Up'</strong></h4>
<p>That feeling of being mentally fried after 20 minutes on social media? It’s not just you. Platforms like TikTok and Instagram run on a diet of digital junk food, short, flashy content that delivers a quick dopamine hit and leaves you hungry for more. This isn't just a harmless distraction; it's rewiring your brain.</p>
<p>The endless scroll creates a kind of mental fog. Your attention span shrinks, and your thinking becomes fragmented. The algorithm trains you to crave constant novelty, making it almost painful to sit through a movie, read a chapter of a book, or just be alone with your thoughts. I’ve watched brilliant, creative friends get lost in this haze, chasing trends until they burn out, feeling disconnected from their own lives. A life built on reacting to the next notification isn't really your life at all.</p>
<p>The way out is simpler than it sounds: unplug. Try giving yourself a hard stop after 30 minutes. Curate your feed ruthlessly. Better yet, take walks without your phone. Reclaim your mental space for things that actually nourish you, not just distract you. A good life often starts when you tune out the noise.</p>
<h4 id="heading-rediscovering-the-power-of-boredom"><strong>Rediscovering the Power of Boredom</strong></h4>
<p>We've been sold the idea that happiness is a perpetual state of stimulation. But that’s exhausting. True well-being has an ebb and a flow, and the calm in between is where boredom works its magic.</p>
<p>Boredom isn't a void to be filled; it's fertile ground. It’s the mental space where your mind can finally wander, untethered from a screen. It’s in those quiet moments, staring out a window, waiting for the kettle to boil, that genuine ideas spark and self-reflection happens. Inventors and artists have long credited these "empty" moments for their biggest breakthroughs.</p>
<p>So the next time you feel the itch for distraction during a quiet moment, try to just sit with it. Let your mind drift. Journal. Tinker with something. Boredom isn't the enemy; it's the reset button your overstimulated brain has been begging for. It’s where contentment begins.</p>
<h4 id="heading-the-quiet-hum-of-a-life-thats-working"><strong>The Quiet Hum of a Life That's Working</strong></h4>
<p>Think about it: what we call "excitement" is often just the relief that follows chaos. It's the thrill of escaping a rut, dodging a disaster, or landing a win after a long struggle. But if your days feel predictable and calm, it’s not a sign you’re stuck. It’s a sign you’re not in survival mode anymore.</p>
<p>A life defined by thrilling highs and dramatic lows is a life spent on a rollercoaster. A "boring" life is a steady, scenic hike. It offers peace, reliable routines, and the space to appreciate small, profound joys, a home-cooked meal, a conversation that flows effortlessly, the comfort of a familiar sunset.</p>
<p>This is a life where problems stay manageable and fulfillment comes from consistency, not spectacle. If your happiness depends on the next big thrill, you’re always one step away from a fall. Aim for the plateau instead. It’s sustainable, it’s peaceful, and it’s profoundly good.</p>
<p>Ultimately, embracing a "boring" life isn't about settling. It’s about choosing depth over distraction. It’s about stripping away the digital haze, welcoming boredom as a guide, and learning to cherish the steady, quiet hum of a life that is truly your own.</p>
]]></content:encoded></item><item><title><![CDATA[Closures in JavaScript - what and why we need closures?]]></title><description><![CDATA[What Is Closures in JavaScript?
Recently I saw lots of tweets and post about closures in JavaScript and I thought about posting about my understanding of the Closures.
According to  MDN  closure is "A closure is the combination of a function bundled ...]]></description><link>https://ajsd.hashnode.dev/closures-in-javascript-what-and-why-we-need-closures</link><guid isPermaLink="true">https://ajsd.hashnode.dev/closures-in-javascript-what-and-why-we-need-closures</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[closure]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[Arun SD]]></dc:creator><pubDate>Sat, 22 Aug 2020 11:21:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1598095207610/CT6bLn9QQ.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="what-is-closures-in-javascript">What Is Closures in JavaScript?</h1>
<p>Recently I saw lots of tweets and post about closures in JavaScript and I thought about posting about my understanding of the Closures.</p>
<p>According to  <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures">MDN </a> closure is <em>"A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment). In other words, a closure gives you access to an outer function’s scope from an inner function. In JavaScript, closures are created every time a function is created, at function creation time."</em></p>
<p>So now you understand what closure is let's move on to next part, just kidding ;) to make it clear lets see an example, but before that I assume you are familiar with concepts such functions are first class citizen, call stack and scopes/execution context (if not please leave comment, I'll post blogs about functions, call stack and scopes/execution context). </p>
<pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">outer</span>(<span class="hljs-params"></span>)</span>{
    <span class="hljs-keyword">let</span> closureVariable = <span class="hljs-number">5</span>;
    <span class="hljs-keyword">let</span> nonClosureVariable = <span class="hljs-number">7</span>;
    <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">inner</span>(<span class="hljs-params"></span>)</span>{
        <span class="hljs-keyword">return</span> <span class="hljs-number">5</span> + closureVariable;
    }
}

<span class="hljs-keyword">let</span> inner = outer();
<span class="hljs-keyword">debugger</span>;
inner();
</code></pre><p>In the example above you see that I have declared a function <code>outer</code> with two variables 
<code>closureVariable</code> and <code>nonClousreVariable</code> and returned a function <code>inner</code> which is accessing the <code>closureVariable</code>. You can also see that I have a debugger just before executing inner function.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1598081670827/pM5JoC79U.png" alt="image.png" /></p>
<p>When I run the code in chrome console,  as you can see in the image, though the call stack is in  <code>inner</code> function's execution context and <code>outer</code> function is kicked off from the call stack you can still access the <code>closureVariable</code>but <code>nonClosureVariable</code> is not available, JavaScript knows what variable is needed for the execution of inner function and keep those variables in memory till the exection of inner function this is clousure. In simple words </p>
<blockquote>
<p>The ability of JS function to keep the variables from outer scope in memory till it's execution.</p>
</blockquote>
<p>I hope you can understand what closure is now let's move on to why we need closures.</p>
<h1 id="why-we-need-closures-or-where-can-we-use-closure">Why we need closures? Or Where can we use closure?</h1>
<p>There are many uses for closures, let us see 2 uses with examples.</p>
<ul>
<li>Encapsulation</li>
<li>Function Composition</li>
</ul>
<h2 id="encapsulation-with-closure">Encapsulation with closure:</h2>
<p>Let's see an example of encapsulation with closure, let us build a function which keeps track of seconds passed. </p>
<pre><code>
<span class="hljs-comment">// Encapsulation </span>
<span class="hljs-keyword">const</span> calculateTime = <span class="hljs-function"><span class="hljs-params">()</span> =&gt;</span>{
    <span class="hljs-keyword">let</span> seconds= <span class="hljs-number">0</span>;
    <span class="hljs-keyword">const</span> toAdd = <span class="hljs-number">0.5</span>
    <span class="hljs-keyword">let</span> addSeconds= <span class="hljs-function"><span class="hljs-params">()</span> =&gt;</span> seconds+= toAdd <span class="hljs-comment">// Arrow function implicit return</span>
    setInterval(addSeconds,<span class="hljs-number">500</span>); <span class="hljs-comment">// Adding 0.5 second every 500 milliseconds </span>
    <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-params">()</span>=&gt;</span> seconds; <span class="hljs-comment">// Arrow function implicit return</span>
}

<span class="hljs-keyword">let</span> timeStart = calculateTime();
<span class="hljs-comment">// Assume function is a long running function that takes 5 seconds to execute.</span>
setTimeout(<span class="hljs-function"><span class="hljs-params">()</span>=&gt;</span><span class="hljs-built_in">console</span>.log(timeStart()),<span class="hljs-number">5000</span>);
</code></pre><p>In the example above assume we're building a function to calculate time taken for execution of a function in different browser or computers.</p>
<p>Here you can see the <code>calculateTime</code> function returns the seconds inside a anonymous function and we've successfully encapsulated all the implementation details and we're just returning the seconds variable but the function has access to other variables such as <code>toAdd</code> and <code>setInterval</code> but from outside the function we can only access the seconds variable.</p>
<blockquote>
<p>Note: I'm using arrow function just to show arrow function supports closure, we can use normal function also</p>
</blockquote>
<h2 id="compose-with-closure">Compose with closure:</h2>
<p>Lets see an example of composing function with closure</p>
<pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">addWith</span>(<span class="hljs-params">num1</span>)</span>{
    <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-params">num2</span>=&gt;</span> num1 + num2 <span class="hljs-comment">// Arrow function with implicit return</span>
}

<span class="hljs-keyword">const</span> addWithFive = addWith(<span class="hljs-number">5</span>);<span class="hljs-comment">// Closure function remembering 5</span>
<span class="hljs-keyword">const</span> addWithTen = addWith(<span class="hljs-number">10</span>);<span class="hljs-comment">// Closure function remembering 10</span>
<span class="hljs-keyword">const</span> addWithEight= addWith(<span class="hljs-number">8</span>);<span class="hljs-comment">// Closure function remembering 8</span>
<span class="hljs-built_in">console</span>.log(addWithFive(<span class="hljs-number">7</span>));
<span class="hljs-built_in">console</span>.log(addWithTen (<span class="hljs-number">7</span>));
<span class="hljs-built_in">console</span>.log(addWithTen (<span class="hljs-number">7</span>));
</code></pre><p>In the example above we're composing 3 new functions <code>addWithFive</code>,<code>addWithTen</code> and <code>addWithEight</code> with  help of <code>addWith</code> function. This is possible because of the closure as the functions can keep track of the num1 we're able to use the composition.</p>
<h1 id="conclusion">Conclusion</h1>
<p>The examples I gave above are silly but I hope you can see the power of closures now. In short </p>
<ul>
<li>Closure let's the inner function keep track of variable outside of it's scope.</li>
<li>Especially useful for encapsulation and composing function from other functions.</li>
<li>Keeps track of value even after the outer function is out of the call stack.</li>
</ul>
<p>If you enjoyed the article please share it with others, feel free to hit me up on  <a target="_blank" href="https://twitter.com/TheArunJagadish">twitter </a> </p>
<blockquote>
<p>This is my first blog post so please leave your valuable comments. If you find any topic in this post difficult to understand let me know I'll write about it.</p>
</blockquote>
]]></content:encoded></item></channel></rss>