<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Vasu Jain</title>
    <description>The latest articles on Forem by Vasu Jain (@vasujain275).</description>
    <link>https://forem.com/vasujain275</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1418763%2F523c5909-7ff5-4381-adf1-05a321e6cb3e.jpg</url>
      <title>Forem: Vasu Jain</title>
      <link>https://forem.com/vasujain275</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vasujain275"/>
    <language>en</language>
    <item>
      <title>AUR - The Reason I Switched from Debian 12 to Arch Linux</title>
      <dc:creator>Vasu Jain</dc:creator>
      <pubDate>Thu, 11 Apr 2024 10:39:33 +0000</pubDate>
      <link>https://forem.com/vasujain275/aur-the-reason-i-switched-from-debian-12-to-arch-linux-cij</link>
      <guid>https://forem.com/vasujain275/aur-the-reason-i-switched-from-debian-12-to-arch-linux-cij</guid>
      <description>&lt;p&gt;I have been using Linux-based operating systems for the past couple of years now. I installed Linux Mint on my 6th gen i3 laptop to get better performance, and immediately fallen love with the command line. I love the fact we can control our whole system through certain sets of commands. I like the idea of installing an app through &lt;strong&gt;&lt;em&gt;apt&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;install&lt;/em&gt; directly and not having to go to that app website to first download an installer and click next multiple times to install an application.&lt;/p&gt;

&lt;p&gt;With a package manager like &lt;em&gt;apt&lt;/em&gt; all my applications installed through apt can be upgraded with one command all at once. This was mind-blowing for me, but there were many packages that were not present in apt and I had to manually install them from the &lt;em&gt;.deb&lt;/em&gt; installer that I had to download from their site.&lt;/p&gt;

&lt;p&gt;Recently I got to know about &lt;strong&gt;AUR&lt;/strong&gt; (Arch User Repository) and I found out about its amazing functionality. You can install official arch-supported applications from their package manager &lt;strong&gt;&lt;em&gt;pacman&lt;/em&gt;&lt;/strong&gt; but here is the most beautiful part you can install 99% of your favorite apps from &lt;strong&gt;AUR&lt;/strong&gt; using AUR helper &lt;strong&gt;yay&lt;/strong&gt; . 9 out of 10 times if software is not present in the official arch repository you can find it of AUR. This possibility was so exciting to me that made me switch from my good &lt;strong&gt;Debian 12 + GNOME 44&lt;/strong&gt; to &lt;strong&gt;Arch + GNOME 45&lt;/strong&gt; and I do not regret it at all.&lt;/p&gt;

&lt;p&gt;The experience of using pacman and yay to install stuff is just awesome, I don't even have to use my browser to search package names for an application which I am sure you can do with apt too but I didn't know about that possibility earlier.&lt;/p&gt;

&lt;p&gt;In my opinion, this is the best way to install applications on Linux. I am pretty excited to learn more about package managers in the future so that I can level up my daily computer experience.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Key Podcast Takeaways: Wisdom from CTO Subhash Choudhary</title>
      <dc:creator>Vasu Jain</dc:creator>
      <pubDate>Thu, 11 Apr 2024 10:35:37 +0000</pubDate>
      <link>https://forem.com/vasujain275/key-podcast-takeaways-wisdom-from-cto-subhash-choudhary-5f2c</link>
      <guid>https://forem.com/vasujain275/key-podcast-takeaways-wisdom-from-cto-subhash-choudhary-5f2c</guid>
      <description>&lt;p&gt;Found this great podcast of Subhash Choudhary, CTO, Dukaan and his life journey. It was so entertaining that I watched the whole 3-hour podcast in one sitting. It was packed with knowledge, life experiences and insights. I thought of summarizing my leanings from this podcast into a small blog post. So, here are some of the key takeaways from this gem of a podcast -&lt;/p&gt;

&lt;h2&gt;
  
  
  Be a Technologist first then a Businessman
&lt;/h2&gt;

&lt;p&gt;We should never open a startup if we want to have a luxurious life or we want to get insanely rich, we will most likely lose motivation and fail. We should aspire to become &lt;em&gt;Good&lt;/em&gt; &lt;em&gt;Technologists&lt;/em&gt; who know their stuff and are excited about new tech coming out every day to make our lives better.&lt;/p&gt;

&lt;p&gt;If you become a &lt;em&gt;Good&lt;/em&gt; &lt;em&gt;Technologist,&lt;/em&gt; you will eventually find ways to monetize your skills by building a product or service that will make people's lives easy.&lt;/p&gt;

&lt;h2&gt;
  
  
  It's Okay to be employed
&lt;/h2&gt;

&lt;p&gt;I had a feeling for the past few years that I didn't want a job, I wanted to start my own business. I think this is common for my age ambitious students because of social media. We think that we will be stuck in our jobs for our lives and will waste our lives working for others but from Subhash Choudhary's story I found out that industry experience is really valuable for our development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monolithic vs Micro-Services Architecture
&lt;/h2&gt;

&lt;p&gt;If you are building a product that may need to be expanded for different use cases in various countries in the future, avoid creating a monolithic software architecture. Instead, develop a core software that focuses solely on essential features vital to your product and add plugins or features as microservices on top of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud vs Bare Metal Servers
&lt;/h2&gt;

&lt;p&gt;You can opt for bare-metal servers instead of cloud services like GCP or AWS, especially if you possess a strong knowledge of Kubernetes and Terraform. It's advisable to keep database backups in the cloud for added security since databases are the only components in our infrastructure that cannot be rapidly recreated. Infrastructure as code can be written once and requires only minor maintenance.&lt;/p&gt;

&lt;p&gt;For early-stage startups, going with the cloud is a safer choice, as you may not have a clear idea about your growth and user base. However, once your startup matures and you have gathered data about your growth and users, transitioning to bare metal can result in significant cost savings.&lt;/p&gt;

&lt;p&gt;These were some key points that I learned from this podcast, do check out the full podcast linked below to learn about this guy's inspiring and amazing experiences.&lt;/p&gt;

&lt;p&gt;Source - &lt;a href="https://youtu.be/a5kKRtMmhzQ"&gt;https://youtu.be/a5kKRtMmhzQ&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How JavaScript Execute Code</title>
      <dc:creator>Vasu Jain</dc:creator>
      <pubDate>Thu, 11 Apr 2024 10:32:33 +0000</pubDate>
      <link>https://forem.com/vasujain275/how-javascript-execute-code-b21</link>
      <guid>https://forem.com/vasujain275/how-javascript-execute-code-b21</guid>
      <description>&lt;p&gt;&lt;strong&gt;{ }&lt;/strong&gt; - This is our &lt;strong&gt;Global Execution Context&lt;/strong&gt; &lt;em&gt;(this)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Global Execution Context is different in various environment like Node, Browser, Bun, etc.&lt;/p&gt;

&lt;p&gt;It is a window object in browser and a empty object in a runtime like Nodejs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Execution Contexts
&lt;/h2&gt;

&lt;p&gt;There are mainly three types of global execution contexts: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Global Execution Context&lt;/li&gt;
&lt;li&gt;Functional Execution Context&lt;/li&gt;
&lt;li&gt;Eval Execution Context (Good to Know, mainly used in mongoose) &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How JS code is Executed?
&lt;/h2&gt;

&lt;p&gt;Let's understand this process with an Example -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;val1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;val2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;addNum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;num1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;num2&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;num1&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;num2&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;total&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addNum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;val2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;addNum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  1. Global Execution / Environment
&lt;/h3&gt;

&lt;h4&gt;
  
  
  A global object &lt;strong&gt;{ }&lt;/strong&gt; - &lt;em&gt;this&lt;/em&gt; is created.
&lt;/h4&gt;

&lt;h3&gt;
  
  
  2. Memory Creation Phase
&lt;/h3&gt;

&lt;p&gt;All variables are created and &lt;em&gt;undefined&lt;/em&gt; value is assigned to them.&lt;/p&gt;

&lt;p&gt;In case of our Example - &lt;/p&gt;

&lt;p&gt;&lt;em&gt;var1&lt;/em&gt; -&amp;gt; undefined&lt;/p&gt;

&lt;p&gt;&lt;em&gt;var2&lt;/em&gt; -&amp;gt; undefined&lt;/p&gt;

&lt;p&gt;&lt;em&gt;addNum&lt;/em&gt; -&amp;gt; definition of Function i.e. Steps to Execute&lt;/p&gt;

&lt;p&gt;&lt;em&gt;result1&lt;/em&gt; -&amp;gt; undefined&lt;/p&gt;

&lt;p&gt;&lt;em&gt;result2&lt;/em&gt; -&amp;gt; undefined&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Execution Phase
&lt;/h3&gt;

&lt;p&gt;Values are assigned to variables.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;var1&lt;/em&gt; &amp;lt;-- 10&lt;/p&gt;

&lt;p&gt;&lt;em&gt;var2&lt;/em&gt; &amp;lt;-- 5&lt;/p&gt;

&lt;p&gt;Now the function creates it own Execution Context first- &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;addNum&lt;/strong&gt; --&amp;gt; &lt;em&gt;New Variable Environment&lt;/em&gt; + &lt;em&gt;New Execution Thread&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; For each new Function, there will be its own Execution Context where new Memory Creation Phase and Execution Phase will be created.&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;addNum&lt;/strong&gt;'s Memory Phase -
&lt;/h5&gt;

&lt;p&gt;&lt;em&gt;var1&lt;/em&gt; -&amp;gt; undefined&lt;/p&gt;

&lt;p&gt;&lt;em&gt;var2&lt;/em&gt; -&amp;gt; undefined&lt;/p&gt;

&lt;p&gt;&lt;em&gt;total&lt;/em&gt; -&amp;gt; undefined&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;addNum&lt;/strong&gt;'s Execution Phase -
&lt;/h5&gt;

&lt;p&gt;&lt;em&gt;num1&lt;/em&gt; -&amp;gt; 10&lt;/p&gt;

&lt;p&gt;&lt;em&gt;num2&lt;/em&gt; -&amp;gt; 5&lt;/p&gt;

&lt;p&gt;&lt;em&gt;total&lt;/em&gt; -&amp;gt; 15&lt;/p&gt;

&lt;h5&gt;
  
  
  The &lt;em&gt;total&lt;/em&gt; variable with variable is returned to &lt;strong&gt;Global Context&lt;/strong&gt;.
&lt;/h5&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Now&lt;/strong&gt; the Execution Context of addNum will be &lt;strong&gt;Deleted&lt;/strong&gt; and control will reach Global Execution Phase.
&lt;/h5&gt;

&lt;p&gt;&lt;em&gt;result1&lt;/em&gt; -&amp;gt; 15&lt;/p&gt;

&lt;p&gt;&lt;em&gt;result2&lt;/em&gt; -&amp;gt; 12       // Same logic will be used to get value of result2&lt;/p&gt;

&lt;h5&gt;
  
  
  This was the Basic Overview of How JavaScript Execute Code.
&lt;/h5&gt;

&lt;p&gt;Concept by - &lt;em&gt;Hitesh Choudhary (YT)&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Article by - &lt;em&gt;Vasu Jain&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
