<?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[Aditya Mohan's Blog]]></title><description><![CDATA[Passionate programmer and entertainment aficionado. Seamlessly blending code and creativity. Enthusiastic gamer, devoted cinephile. Bridging tech and art. 🎮🎬 ]]></description><link>https://www.adityamohan.me</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 10:06:06 GMT</lastBuildDate><atom:link href="https://www.adityamohan.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Why You Should Use Version Managers for Different Packages and Languages?]]></title><description><![CDATA[Hey there, coding superstar! You’re probably juggling more projects than a caffeinated circus clown, right? And if you’re anything like me, you like to keep things smooth, stylish, and a little bit sarcastic. So, let’s talk about something that'll ma...]]></description><link>https://www.adityamohan.me/version-managers</link><guid isPermaLink="true">https://www.adityamohan.me/version-managers</guid><category><![CDATA[version-manager]]></category><category><![CDATA[pyenv]]></category><category><![CDATA[clean coding practices]]></category><category><![CDATA[coding practice]]></category><category><![CDATA[declutter and organize]]></category><dc:creator><![CDATA[Aditya Mohan]]></dc:creator><pubDate>Mon, 19 Aug 2024 04:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1724122250157/33a3040c-73da-440c-b1cc-59b3a7a48e25.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey there, coding superstar! You’re probably juggling more projects than a caffeinated circus clown, right? And if you’re anything like me, you like to keep things smooth, stylish, and a little bit sarcastic. So, let’s talk about something that'll make your life easier and add a dash of cool to your coding game—version managers. Yep, those little life-savers that keep your projects from turning into a hot mess.</p>
<p>Imagine this: every time you switch projects, it feels like someone else has been wearing your underwear. Creepy, right? That’s what happens when you don't isolate your project environments. But with version managers, each project gets its own little bubble, free from the weird, uncomfortable overlap. Picture it: Python 3.8 in one corner, Python 3.10 in the other. No mixing, no awkwardness. Just pure, isolated bliss.</p>
<p><img src="https://i.pinimg.com/474x/76/63/a1/7663a19173ec3539028ad73122b2a879.jpg" alt="Image: Personal Bubble Meme" /></p>
<p>Because sometimes you need your own space... like your projects do.</p>
<p>And let’s talk about the drama—dependency drama. You know that feeling when you walk into a party, and your ex is there... with your other ex? Yeah, dependency hell is just like that—awkward, unpredictable, and full of regret. But don’t worry, with version managers, you can avoid that drama altogether. You get to manage the exact versions you need, and no one has to know about that messy breakup with Node.js v14. It’s all smooth sailing from here.</p>
<p>Now, switching between versions should be as easy as changing your pants. No judgment here if you don’t do that often. The point is, with version managers, you can move between projects faster than a spy swapping disguises, and your code will never know the difference. Today you’re all about Python 3.8, tomorrow you’re rocking 3.10—no problem at all.</p>
<p><img src="https://media.giphy.com/media/26AHqZycSplGWWPAI/giphy.gif" alt="Switching versions like a boss." /></p>
<p>Speaking of problems, nothing’s worse than being "that guy" in a team—showing up to the dev meeting with everyone else on Python 3.7 while you’re still cruising on 3.5. Avoid the embarrassment. With version managers, you can set up a standardized environment for the whole team, so everyone’s on the same page. It’s like syncing your Spotify playlists but for code. Consistency is key, and trust me, your team will thank you.</p>
<p><strong>Scenario:</strong> You’re in a team meeting, and everyone’s code is running on Python 3.7. But, you’re still on Python 3.5. When you try to run the code:</p>
<pre><code class="lang-bash">python main.py
</code></pre>
<p>You get a syntax error because Python 3.5 doesn’t support f-strings. A quick check confirms your suspicion:</p>
<pre><code class="lang-bash">python --version
</code></pre>
<p><strong>Output</strong>: <code>Python 3.5.10</code> To avoid this, use <code>pyenv</code> to align with your team. First, install the correct version:</p>
<pre><code class="lang-bash">pyenv install 3.7.12
</code></pre>
<p>Then set it locally:</p>
<pre><code class="lang-bash">pyenv <span class="hljs-built_in">local</span> 3.7.12
</code></pre>
<p>Now, you’re in sync with your team and ready to code without hiccups.</p>
<h3 id="heading-experiment-with-confidence">Experiment with Confidence</h3>
<p>Experimentation? Rollback? Yeah, we all love to live on the edge sometimes—try out that new language feature, maybe flirt with a different framework. But if things go sideways, version managers have got your back. They let you roll back faster than a toddler realizing broccoli isn’t candy: no harm, no foul, and no judgment.</p>
<p><img src="https://media.giphy.com/media/xT0GqssRweIhlz209i/giphy.gif" alt="When you need to roll back that experiment..." /></p>
<p>Legacy systems, though—those are like your old, comfy sneakers you just can’t let go of, even though they’re way past their prime. With version managers, you can keep those older versions around for those long-lived, still-useful projects without feeling like you’re stuck in the past. And for the record, sometimes old-school is the best school.</p>
<p><img src="https://i.pinimg.com/originals/08/96/54/0896543b3deb6d333b860d41771cc664.gif" alt="Because sometimes you just need to hold onto the classics." /></p>
<p>Now, we all know time is money, and who wants to waste it managing versions by hand? Version managers streamline your workflow, reduce conflicts, and let you get back to what really matters—coding like a boss and taking those slightly-too-long coffee breaks. You’ll be so productive, they might actually start paying you in coffee.</p>
<p>Here's an example of managing versions seamlessly on your device:</p>
<hr />
<p>Instead of manually managing Python versions, which can be time-consuming:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Manually uninstalling an old version</span>
sudo apt-get remove python3.5

<span class="hljs-comment"># Installing a new version manually</span>
sudo apt-get install python3.7
</code></pre>
<p>With a version manager like <code>pyenv</code>, you can effortlessly switch between global and local versions:</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Install a specific Python version</span>
pyenv install 3.7.12
pyenv install 3.6.10

<span class="hljs-comment"># Set it globally for all projects</span>
pyenv global 3.7.12

<span class="hljs-comment"># Or set it locally for a specific project</span>
pyenv <span class="hljs-built_in">local</span> 3.6.10
</code></pre>
<p>Now, whether you’re working across multiple projects or just one, <code>pyenv</code> ensures you’re always using the right version. No hassle, no conflicts—just pure, streamlined productivity. And with all that time saved, you can kick back, code like a boss, and take those slightly too-long coffee breaks. Efficiency never tasted so good!</p>
<p>And here’s the kicker: version managers come with whole communities behind them, ready to help you out if you get stuck. Think of them as your trusty sidekick. Whether you’re using <code>pyenv</code>, <code>nvm</code>, <code>rbenv</code>, or the versatile <code>asdf</code>, there’s a whole ecosystem out there to support you. It’s nice to know that when you’re in a jam, you’re not alone. Plus, these tools play nicely with the rest of your tech stack—no awkward introductions needed.</p>
<p>Finally, let’s not forget compatibility testing. No one likes surprises (unless there’s cake involved). Version managers make sure your code works across multiple environments without any nasty shocks when you hit deploy. It’s like doing a dry run before you meet the in-laws—better safe than sorry, right?</p>
<p><img src="https://synapticpotential.com/wp-content/uploads/2018/03/surprises-articles-Synaptic-Potential.jpg" alt="Surprises are only fun when there's cake involved." /></p>
<p>So, here’s the deal: version managers aren’t just a convenience—they’re a necessity. They make your life easier, your projects smoother, and your team happier. Plus, they give you that warm, fuzzy feeling that comes with knowing you’re a step ahead of the game.</p>
<p>If you’re not managing your versions, who’s managing you? Go ahead, give version managers a try, and let them add a touch of style and sanity to your coding life.</p>
<p><strong>Additional Resources:</strong></p>
<ul>
<li><p><a target="_blank" href="https://github.com/pyenv/pyenv">pyenv: Simple Python Version Management</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/nvm-sh/nvm">nvm: Node Version Manager</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/rbenv/rbenv">rbenv: Ruby Version Manager</a></p>
</li>
<li><p><a target="_blank" href="https://asdf-vm.com/">asdf: Manage multiple runtime versions with a single CLI tool</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Git Decoded: Exploring the Core Mechanics for Streamlined Version Control and Collaboration]]></title><description><![CDATA[As someone deeply involved in modern software development, I've witnessed firsthand the widespread adoption and powerful capabilities of Git for version control. Yet, I understand how Git's inner workings can appear opaque to many users, with its cry...]]></description><link>https://www.adityamohan.me/git-decoded-demystifying-git-internals</link><guid isPermaLink="true">https://www.adityamohan.me/git-decoded-demystifying-git-internals</guid><category><![CDATA[sha1]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><category><![CDATA[Gitcommands]]></category><dc:creator><![CDATA[Aditya Mohan]]></dc:creator><pubDate>Sun, 18 Feb 2024 09:25:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708239047763/2ab816c5-ab59-46e7-b2fc-f3003b8850fd.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As someone deeply involved in modern software development, I've witnessed firsthand the widespread adoption and powerful capabilities of Git for version control. Yet, I understand how Git's inner workings can appear opaque to many users, with its cryptic SHA-1 hashes and intricate branching structures. That's why I'm excited to share my comprehensive understanding of Git which delves deep into its internals, demystifying its underlying mechanisms and shedding light on how it efficiently manages version control.</p>
<p><img src="https://i.pinimg.com/originals/7d/cc/0b/7dcc0b5a2c64d741b6edd12a88738cf9.gif" alt="Let's get Started" class="image--center mx-auto" /></p>
<h3 id="heading-understanding-git-basics">Understanding Git Basics</h3>
<p>At its core, Git is a distributed version control system that excels in managing code changes across multiple contributors and branches. While Git's user-friendly commands make everyday tasks like committing, branching, and merging intuitive, understanding its internals unlocks a deeper level of proficiency and confidence in its usage.</p>
<p>Let's take a look at what a typical Git's folder structure looks like inside our project:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708240971289/7f9f4904-90bc-4400-a5aa-4b027cbebd67.png?height=400" alt="Contents of the .git folder" class="image--center mx-auto" /></p>
<p>As we can observe Git saves its contents inside the <code>.git</code> folder in our project directory.</p>
<p>The <code>.git</code> folder is a critical component of every Git repository, housing all the necessary information for tracking code changes. Here's a breakdown of its key contents:</p>
<ul>
<li><p><strong>HEAD File:</strong> This text file stores the SHA hash of the currently checked-out commit, effectively tracking the current branch.</p>
</li>
<li><p><strong>refs Folder:</strong> Contains references to commits and branches, with subfolders like <code>heads</code> for branch heads and <code>tags</code> for tags.</p>
</li>
<li><p><strong>objects Folder:</strong> Here, Git stores the codebase as a series of snapshots, with two subfolders: <code>pack</code> for compressed snapshots and <code>info</code> for metadata.</p>
</li>
<li><p><strong>config File:</strong> Stores repository configuration settings, including user information and default branch settings.</p>
</li>
<li><p><strong>hooks Folder:</strong> Allows users to add custom scripts to run at specific points in the Git workflow, such as before committing or after checking out.</p>
</li>
</ul>
<h4 id="heading-deciphering-the-sha-1-hash">Deciphering the SHA-1 Hash</h4>
<p><img src="https://cyphunk.files.wordpress.com/2006/02/expand_anim.gif" alt="SHA-1 Illustrated – deadhacker.com" class="image--center mx-auto" /></p>
<p>I've always found one of the most intriguing aspects of Git to be its reliance on SHA-1 hashes for uniquely identifying commits, trees, and blobs. These 40-character strings might initially seem arbitrary, but they're actually at the heart of Git's architecture. SHA-1 hashes are generated based on the content of an object, ensuring each one is entirely unique. This means that even the slightest change in content results in a completely different SHA-1 hash, thus ensuring data integrity and preventing accidental duplication. The Three Git Object Types</p>
<h4 id="heading-optimizing-storage-with-sha-1-hashes">Optimizing Storage with SHA-1 Hashes</h4>
<p>Git's use of SHA-1 hashes enables efficient storage optimization. Identical file contents result in the same SHA-1 hash, allowing Git to store them as a single blob, even if they appear in multiple commits or branches. This deduplication mechanism minimizes disk space usage while preserving the integrity of the repository.</p>
<p><img src="https://api.devtutorial.io/uploads/2020/07/5f1125af6b417.png" alt="What is Git Object - Devtutorial" /></p>
<p>Git operates on three main object types: commits, trees, and blobs. A commit represents a snapshot of changes made to files along with metadata such as author, timestamp, and commit message. Each commit points to a tree object, which in turn references the file structure. Finally, blobs contain the actual file contents. Together, these objects form a directed acyclic graph, tracing the history of changes in a Git repository.</p>
<h4 id="heading-what-makes-git-so-special-and-different-from-other-version-control-tools-out-there">What makes git so special and different from other version-control tools out there?</h4>
<p><img src="https://media3.giphy.com/media/xT1Ra21TCZ8fCPpBJu/200.gif?cid=790b7611cpgzc28aa3owxzsfz65yzo57zxyua8jowzvjx1n9&amp;ep=v1_gifs_search&amp;rid=200.gif&amp;ct=g" alt="Snapshot" class="image--center mx-auto" /></p>
<center><code>SNAPSHOTS MANAGEMENT!</code></center>

<p>The concept of a "snapshot" is crucial for understanding how the version control system operates. When we commit changes to a file, Git creates snapshots of the entire file rather than just the differences between the new and old versions. This approach, known as the "loose object format," means that even a minor change to file results in a new snapshot being saved to disk. While this may consume more disk space compared to systems like Subversion that save only the delta between versions, it streamlines the commit process and ensures integrity.</p>
<table><tbody><tr><td><p>🎞️ Snapshot storage saves the entire state of a file or system as a single instance, known as a snapshot. Each snapshot represents the system at a given time and serves as a reference point for future changes. This method is simple, efficient, and straightforward, but it can consume a lot of storage space over time if there are frequent changes to the system.</p></td><td><p>Δ Delta storage, on the other hand, saves only the changes made to a file or system rather than the entire state. Each change is stored as a delta or a difference from the previous version, and the system's current state is reconstructed by combining all the deltas. This method is more efficient in terms of storage space, as it only stores the differences between versions but can be more complex to implement and manage.</p></td></tr></tbody></table>

<p>To illustrate it better here's an example of a snapshot from my own project that I did before:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708245564218/87c9791a-6201-44b3-906a-323dc5f75e56.png" alt class="image--center mx-auto" /></p>
<p>In the above screenshot, we can observe that we are using this command <code>git cat-file -p</code> for gaining information about the weird hash strings we see on maybe Github or Bitbucket or any application that you might be using along with git.</p>
<p>The <code>0ee3f59</code> bit that we can observe up there in the first line is the value of hash present at the commit currently at my HEAD of the branch(SNAPSHOT of the whole project). The 40-character hash string in the next command is the hash value of the tree that we can observe in the first command's output. We are using that command to gain more information about what contents it is harbouring inside it in a nutshell!</p>
<p>Similarly to inspect a blob we can further use the same command on the hash value of a blob and depending upon the options we are using with <code>git cat-file</code> command we will get the desired results.</p>
<h4 id="heading-packfiles-and-efficiency">Packfiles and efficiency?</h4>
<p>Git optimizes disk usage through periodic processes like "git gc" (garbage collection), which creates "Packfiles" and removes redundant snapshots. Packfiles consolidate similar snapshots, reducing disk space usage to levels comparable to other version control systems that use delta compression.</p>
<p><img src="https://i.makeagif.com/media/7-17-2016/wrurN9.gif" alt="WALL∙E's “Day At Work” on Make a GIF" class="image--center mx-auto" /></p>
<p>This balance between performance and disk space efficiency is one of Git's strengths, allowing it to outpace other VCS systems in commit speed while keeping disk usage in check. The Packfiles, located under ".git/objects/pack," are generated through the "git gc" command, demonstrating Git's continuous optimization efforts.</p>
<h3 id="heading-exploring-branches-and-tags">Exploring Branches and Tags</h3>
<p>In Git, I see branches and tags as valuable pointers to specific commits. Branches are especially handy for branching workflows since they're lightweight and easy to create. Typically, the "master" branch is the go-to starting point for new projects, acting as the mainline branch. On the other hand, tags offer named references to significant commits like release points or milestones, adding clarity and context to the repository's history.</p>
<p><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lYJTD5v7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r8dplmbvkx1lz5xoai67.png" alt="how to tag a release in git - Online Discount Shop for Electronics,  Apparel, Toys, Books, Games, Computers, Shoes, Jewelry, Watches, Baby  Products, Sports &amp; Outdoors, Office Products, Bed &amp; Bath, Furniture," class="image--center mx-auto" /></p>
<h3 id="heading-git-internals-in-action">Git Internals in Action</h3>
<p>Let's dive into the inner workings of Git by applying it to our project. Through hands-on experimentation, we'll create a sequence of commits and examine the underlying objects, gaining a deeper understanding of how Git handles version history. With each commit, we capture a snapshot of the entire project, showcasing the interconnectedness of commits, trees, and blobs.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1708247087528/95b1a33a-ccf9-4bba-bd6a-9680604ee7d7.png" alt class="image--center mx-auto" /></p>
<p>Here's what the commit history should look like. Using the command mentioned earlier we can go over each snapshot and see how the files are being tracked and how blobs are created.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>By understanding how Git manages version control through commits, trees, and blobs, we can navigate complex workflows with confidence. Embracing Git's decentralized architecture and leveraging its branching features empowers our teams to collaborate effectively and deliver high-quality software iteratively.</p>
<h3 id="heading-more-things-ill-be-covering-in-future-articles">More things I'll be covering in future articles -</h3>
<ul>
<li><p>Branching Strategies</p>
</li>
<li><p>Workflows</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Spy Game]]></title><description><![CDATA["Spy game" - what's ringing in your ears? I bet you're imagining something like one of those "Tom Cruise" movies like "Mission Impossible". Well, it's almost exactly like that with a tad bit of retro flavor to it.
"Spy Game" is this cool spy movie fr...]]></description><link>https://www.adityamohan.me/spy-game</link><guid isPermaLink="true">https://www.adityamohan.me/spy-game</guid><dc:creator><![CDATA[Aditya Mohan]]></dc:creator><pubDate>Wed, 18 Oct 2023 17:33:05 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1697649389918/d867b593-472b-4a82-aa11-0534b8e5040a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697647922874/7823cb74-04a4-46d7-854d-38ddcd25ea84.jpeg" alt class="image--center mx-auto" /></p>
<p>"Spy game" - what's ringing in your ears? I bet you're imagining something like one of those "Tom Cruise" movies like "Mission Impossible". Well, it's almost exactly like that with a tad bit of retro flavor to it.</p>
<p>"Spy Game" is this cool spy movie from 2001 with Robert Redford and Brad Pitt. Redford plays this CIA guy, Nathan Muir, who's about to retire. His buddy, Brad Pitt's character, Tom Bishop, gets caught in a tight spot in China, and Redford's like, "Nope, not on my watch!" So, he goes on this crazy mission to save him.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697647805621/12b8c64e-71dc-4e8b-b6c7-87de582e6541.jpeg" alt class="image--center mx-auto" /></p>
<p>What makes this movie awesome is the story. It's all twisty and turny, jumping between the past and the present, showing how these two dudes got into the spy game. Redford nails the role of the experienced agent, and Pitt brings in the younger, wild vibe. The action scenes are top-notch, keeping you on the edge of your seat.</p>
<p>There are some areas where I felt the cinematography by the director Tony Scott could have been better. So, the movie can be described as a narration of episodes that happened previously and the story goes on by developing them in sequential order to bring the audience to the current event that is happening in the movie. The constant switch between the conference room and the life story of Tom(the character played by Pitt), is killing all the "Mojo". For me, the flow is breaking which is dialing down the effects suspense should have on us!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697649490070/ed73549b-714c-4300-bc84-ae39ca754fbb.jpeg" alt class="image--center mx-auto" /></p>
<p>I appreciate this movie as four distinct ones: the three flashbacks and then Muir's machinations at CIA headquarters. The Vietnam story is fine. The Germany story is my absolute favorite because of course that's the one where Robert Redford is teaching Brad Pitt how to be a spy. The Beirut story is pretty solid. And the CIA HQ story is really interesting after the conference call is over and Muir basically runs his own bureaucratic-but-somehow-thrilling operation within CIA corridors.</p>
<p>It's not just about the action. "Spy Game" dives into some deep stuff, like loyalty and sacrifice. It makes you think about the whole spy world and the tough choices these guys have to make. (Makes me wanna be a spy🎃)</p>
<p>If you're into spy flicks, good acting, and plots that keep you guessing, you'll totally dig "Spy Game." It's a wild ride from start to finish!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1697649577860/4c9c537d-fb54-45a9-8cf9-65982783781e.jpeg" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[Sometimes memory can be a real bitch!]]></title><description><![CDATA[This photo popped up as I was scrolling through my google photos collection. It brought back a boatload of nostalgic memories, flooding right into my fragile brain. A lot of cuss words are dedicated to google photos for showing me the only pic left f...]]></description><link>https://www.adityamohan.me/sometimes-memory-can-be-a-real-bitch</link><guid isPermaLink="true">https://www.adityamohan.me/sometimes-memory-can-be-a-real-bitch</guid><dc:creator><![CDATA[Aditya Mohan]]></dc:creator><pubDate>Tue, 01 Mar 2022 08:32:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/unsplash/uFomxGheuGk/upload/v1648886832130/A56b95KiC.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This photo popped up as I was scrolling through my google photos collection. It brought back a boatload of nostalgic memories, flooding right into my fragile brain. A lot of cuss words are dedicated to google photos for showing me the only pic left from my past relationship. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1648886091311/SLeSTa0Pg.jpg" alt="IMG_20161215_125634.jpg" /></p>
<p>That memory wasn't particularly happy if you know what I mean. She left memories, those that remained were mostly happy, though I should have known that the happiness came coupled with a fake personality. The point is that even though I thought that I had recovered from that unfortunate event, the harsh reality was that I didn't. The next two years of my life were accompanied by melancholy and depression of a sort that I was unaware of. Despite my melancholy, I grew emotionally and in a way enjoyed being in the shadows.</p>
<p>In a sense, it seems odd that anyone could enjoy melancholy: a disease characterized by sadness and fear that has age-old roots. Melancholy's symptoms, and its consequences, can be extreme. Around this time, I came across a book known as The Anatomy of Melancholy written by Robert Burton. I found the answer to my question, namely.</p>
<blockquote>
<p>Why are people drawn to a disease that could kill their minds?</p>
</blockquote>
<p>After a lot of research I came to realise that, since ancient Greece, melancholy had been associated with the genius of renowned poets, artists, and philosophers, and during the Renaissance, it became fashionable to depict people in a melancholic pose, dressed in black - <em>my favourite colour</em>. Yet such affectation in my opinion could conceal a potentially dangerous, habit-forming affliction from which I surely suffered<em>(not saying that I am a genius or anything XD)</em>.</p>
<p><img src="https://c.tenor.com/2VLFsrPYr8AAAAAd/thomas-shelby-peaky-blinders.gif" alt /></p>
<p>In the book Anatomy, Burton describes melancholy as like a Siren, luring its victims into an ‘irrevocable gulf’. It can start pleasantly enough: a person might want to spend time in solitary contemplation, wandering alone in the woods or down by the river. </p>
<blockquote>
<p>‘A most incomparable delight it is so to melancholy, and build castles in the air’, he comments.</p>
</blockquote>
<p>Though seemingly innocent, this behaviour starts to intrude on everything, until the person experiencing it can no longer control it: </p>
<blockquote>
<p>'these fantastical and bewitching thoughts so covertly, so feelingly, so urgently, so continually set upon, creep in, insinuate, possess, overcome, distract, and detain them, they cannot, I say, go about their more necessary business, stave off or extricate themselves, but are ever musing, melancholising, and carried along'. </p>
</blockquote>
<p>Burton’s language hints at the experience he is describing which is soooo relatable: he heaps verb upon verb, crowding his words in just as the ‘bewitching thoughts’ occupy the sufferer’s mind.</p>
<p>I decided to step back into the dating game after 2 years of resentment and breakups. I liked a few girls but COVID slapped me in the face with a monumental welcome. This kept me at home at the expense of a possible date with another girl. I stayed at home like a sitting duck while I waited for the day when I could showcase my life skills.</p>
<p><code>“The day stretched out the daylight as if on a rack. Each moment was drawn out until its anatomy collapsed. Time broke down. The day progressed in an endless sequence of dead moments.”- China Miéville, Perdido Street Station</code> </p>
<p><img src="https://cdn.mwallpapers.com/photos/celebrities/hd-wallpapers/sad-beautiful-sun-sunset-golden-sun-beautiful-android-iphone-hd-wallpaper-background-downloadhd-wallpapers-desktop-background-android-iphone-1080p-4k-zboqv.jpg" alt /></p>
<p>So, around this time, I was having a deep talk with my single friends about our relationship and each of our fuckups, and the day came when I realized I was totally single [ <em>I felt like my mental nuts were being punched :)</em> ]. In the meantime, I was talking almost every now and then with a girl. I knew she was single, so my toxic mind started sending me these weird signals and before I knew it, I was already into her. My friends caught wind of this and you know how it turns out :(. With an endless barrage of taunts coming their way and all the sweet conversations I was having with this girl, my fragile brain exploded with frustration. Boom, the end of phase 1. </p>
<p>No conversation between the two of us for the next two months. My confidence was touching the feet of hell. Life was tough back then, I couldn't even imagine it now, that I had stooped so low to care this much about someone with whom I have only conversed via an online medium. It was the 3rd of August 2021 - Friendship day: Guess what she texted me <strong>"HAPPY FRIENDSHIP DAY"</strong>. </p>
<p><img src="https://thumbs.dreamstime.com/b/huh-rubber-stamp-over-white-background-88411768.jpg" alt="HUH" /></p>
<blockquote>
<p>All it takes is a second and your whole life can be turned upside down. - Jodi Picoult</p>
</blockquote>
<p>I did not plan to reply to her, but my benevolent heart overruled my abate resolve. I gave her a cold reply...it became warmer as I talked to her, and soon it became too hot to handle :). As I was talking to her after 2 more months, I was literally living on the edge. My life was a mess, so much was going on, &amp; here I was wasting my time on a lost cause. To get my life together, I did the unthinkable; I professed my feelings to her - an ultimatum which I knew was going to end things between us but at least I got my shit together. </p>
<p><img src="http://images2.memedroid.com/images/UPLOADED83/533a1351aaae1.jpeg" alt="Get shit together" /></p>
<p>What's the lesson here? Don't expect things to always go your way every time. It will only bring you sorrow. Of course, I am not suggesting to stop being optimistic in life, but keep doing reality checks from time to time. While I do not regret giving her the ultimatum, if given a chance to do it all over again, I would like to talk to her just like a friend because I have found out that I was merely attracted to her, not in love. It took me 2-3 months to realize that my meat brain was only playing a ruse on me.</p>
<p>Finally, as a result of covid's spanking of my arse, I've gained newfound emotional maturity and some new perspectives, which have skyrocketed my confidence straight to the heavens. Met new friends, relived those nostalgic memories of college, socialised like never before, got a fake driver's license XD, travelled to places, and started believing in spirituality and whatnot. I think covid did a big favour to me by sucking out that depression that was stubborn as a mule.</p>
]]></content:encoded></item><item><title><![CDATA[On-campus placements scam or what?]]></title><description><![CDATA[Greetings visitors!

It will please some of you to know that I almost titled this article ‘College? placement?? Bitch!’ It will please the rest of you to know that I realized not everyone is gonna be happy reading that so, I begrudgingly decided agai...]]></description><link>https://www.adityamohan.me/on-campus-placements-scam-or-what</link><guid isPermaLink="true">https://www.adityamohan.me/on-campus-placements-scam-or-what</guid><category><![CDATA[jobs]]></category><category><![CDATA[job search]]></category><category><![CDATA[College]]></category><dc:creator><![CDATA[Aditya Mohan]]></dc:creator><pubDate>Fri, 03 Sep 2021 11:48:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1630664753135/PN7e0_wIC.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Greetings visitors!</p>
<blockquote>
<p><em>It will please some of you to know that I almost titled this article ‘College? placement?? Bitch!’ It will please the rest of you to know that I realized not everyone is gonna be happy reading that so, I begrudgingly decided against it</em></p>
</blockquote>
<p>A little introduction about me:</p>
<p>I am currently a student in my final year of engineering pursuing a B.E in computer engineering &amp; I like chocos :) So, that means it is my placement season (&gt;"&lt;).  Now, that should be a good thing because most people wait eagerly for it, as everyone wants a job in their hands ASAP.But I guess god is having different plans for me (-_-).</p>
<center><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630660669511/dY4iiL-dN.gif" alt="Ydjm.gif" /></center>

<p>Talking about campus placements in my college: it is pretty good TBH for a 3 tier college. A lot of companies are visiting &amp; not just for any position, they are giving away amazing profiles &amp; opportunities. So, why am I so sceptical about this? Well, because of this godforsaken pandemic a lot of bad happened SMH. My frustration is absolutely dependent on 1 single factor i.e; <strong>POINTER</strong>. </p>
<center><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630661793615/hqAnTABm3.gif" alt="bff-bestfriends.gif" /></center>

<p>That LiL decimal number was so important I couldn't have ever imagined in my life(<em>Although, I was reminded about it several times, but hey who cares about it right?</em>). I got 10 pointers in my 5th and 6th semester, &amp; I was unconditionally chill in my life. For, the first time in my life I felt like someone suddenly lit up a tiny light bulb 💡 in my endless void of failures. Then one day my buddies &amp; I were just swooning over our pointers when one of us had a terrible realisation that besides us most of our batchmates also scored 10 pointers. Finally, after a series of sorrowful realisations, we finally came to a conclusion that we got played while <em>Jesus</em> was vibing in his own zone🥲. </p>
<p>Let me break it down for those slowpokes who still have no idea of what I am talking about. This scenario is for students who all are going to graduate in the year 2022. Till now we are done with a total of six semesters, of which we had given the first 3 semesters in offline mode while 4th sem is kind of hybrid and the rest i.e; 5th and 6th in online mode. So if you notice your 4th-semester result is largely based on your 3rd-semester results(At least in Mumbai University). While for most of the people there 5th and 6th-semester results are greater than 9.5. 
<br />
<br />
Now, when a company comes for placements, they are going to set eligibility criteria based on pointer distribution among students most of the time, &amp; guess what will happen next. BAM! the final pointer is essentially completely based on our sem-1,2,3 results, which sucks.</p>
<center>
<img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630664066581/sABdJcda4.gif" alt="6jvb.gif" />
</center>

<p>As a result, I was ineligible for most of the dream companies that were coming for campus placements, only because of my incompetence in early semesters. So, in my POV I consider this whole process as one big scam but then again I really can't be a crybaby about it. This post's main purpose was to take out all that pent up frustration inside me &amp; hopefully it works(fingers crossed). I think companies shouldn't just blindly cut people off, just based on their Academics(pointers), I mean it literally, what are the aptitude tests for then?</p>
<center><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630669144204/DLl3AwoF3W.jpeg" alt="what_do_you_think.jpg" /></center>
]]></content:encoded></item><item><title><![CDATA[Javascript Temporal dead zone demystified!]]></title><description><![CDATA[Superficial Knowledge breeds arrogance, true knowledge induces humility

So, I was watching some random interview videos of backend development in Nodejs and I came across this term Temporal Dead Zone. My immediate reaction was like "huh, what is thi...]]></description><link>https://www.adityamohan.me/javascript-temporal-dead-zone-demystified</link><guid isPermaLink="true">https://www.adityamohan.me/javascript-temporal-dead-zone-demystified</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[js]]></category><category><![CDATA[vanilla-js]]></category><category><![CDATA[Hoisting]]></category><dc:creator><![CDATA[Aditya Mohan]]></dc:creator><pubDate>Wed, 01 Sep 2021 09:09:16 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1630479307179/jnFXnOhIQ.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<blockquote>
<p>Superficial Knowledge breeds arrogance, true knowledge induces humility</p>
</blockquote>
<p>So, I was watching some random interview videos of backend development in Nodejs and I came across this term <strong>Temporal Dead Zone</strong>. My immediate reaction was like "huh, what is this?? looks interesting!". Naturally, I stopped the video &amp; googled this term, turns out it was just a fancy term for something obvious for experienced javascript developers :p.</p>
<p>Let me give some context to all those readers who are scratching their heads like me(Unfortunately, I am also a newbie js developer :)). Whenever a js script is executed whether it is inside your browser or on your server, it doesn't matter where it is, an <strong>execution context</strong> is created. So, what is this execution context? It is essentially how a js program is compiled and executed. A js program's execution involves 2 phases: The first phase is where our variable environment(variables, method declaration, etc) is initialised(only memory space is reserved in this phase actual assignments of values doesn't happen) &amp; the second phase is known as a thread of execution. In the second phase, the js engine actually does all the assignment of variable values, calls the functions and executes the code inside them using a call stack. </p>
<p>Let's talk about variables in javascript. In js, we can make variable declarations using 3 keywords, i.e; <code>var</code>, <code>let</code> &amp; <code>const</code>. Variables declared using the keyword var are stored in the same memory space of the actual js script execution while in the case of <code>let</code> and <code>const</code> the variables are defined in different memory spaces. Here's a practical example of what I am trying to say:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630481637692/WXAkiLSo0.png" alt="dev_console.png" /></p>
<p>In the above screenshot, we can clearly observe that variable defined using let is declared in a separate memory space(Script) while var declarations are stored in global memory space. In order to understand why this happens in javascript, y'all should read the concept of <a target="_blank" href="https://www.geeksforgeeks.org/javascript-hoisting/#:~:text=In%20JavaScript%2C%20Hoisting%20is%20the,scope%20is%20global%20or%20local.">Hoisting in JS</a>. </p>
<p>So, basically during the creation phase of the execution context, the variables are hoisted. let and const declarations are hoisted in separate space than var declarations. (<strong>Note</strong>: Many js developers think that let and const declarations are not hoisted but they are actually hoisted, just in different memory space, hence: not accessible until initialised)</p>
<p>Now, I would define the temporal dead zone as:-</p>
<blockquote>
<p>The time since the let or const variable was hoisted till the moment it was initialised.</p>
</blockquote>
<center><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630483384914/JS0zoVqZG.gif" alt /></center>

<p>Yeahhh! that's it. That is all there is to it. Pretty easy huh :). Okay so now I know what it is but what if I choose not to give a shit about it, what can happen at worst?? My dear javascript developers if you don't respect this little concept then you might end up in a lot of misery of code debugging. Let's say you declared a variable using let and const and tried to reference it before even initialising it then boom bam!!! You will observe a nice little red line in your console shouting <strong>Reference error</strong>. </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630486477339/WnULAyIRD.png" alt="dev_console1.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630486487477/kOLcgnE1S.png" alt="dev_error.png" /></p>
<p>In the above attachment, we can clearly observe that we are trying to log a before initialising it so, it was throwing a reference error. In this case, if we were to swap lines 1 and 3 then the zone between those lines would essentially be referred to as the temporal dead zone of a. So here's my advice use <code>let</code> and <code>const</code> declarations very carefully but again use them as much as possible for their obvious advantages :).</p>
<center><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1630484342451/nXAjF1gZW.jpeg" alt="happy_coding.jpg" /></center>

<p>Adios Amigos!! </p>
<h3 id="heading-references"><strong>References:</strong></h3>
<p>Must Watch youtube video: <a target="_blank" href="https://www.youtube.com/watch?v=BNC6slYCj50">https://www.youtube.com/watch?v=BNC6slYCj50</a> </p>
<p>Really thorough article:  <a target="_blank" href="https://www.freecodecamp.org/news/what-is-the-temporal-dead-zone/">https://www.freecodecamp.org/news/what-is-the-temporal-dead-zone/</a> </p>
]]></content:encoded></item></channel></rss>