<?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>DEV Community: Rishav Pandey</title>
    <description>The latest articles on DEV Community by Rishav Pandey (@thenomadtechie).</description>
    <link>https://dev.to/thenomadtechie</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%2F632812%2Ff4949629-f2c4-41af-b889-81de0367e1d1.jpeg</url>
      <title>DEV Community: Rishav Pandey</title>
      <link>https://dev.to/thenomadtechie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thenomadtechie"/>
    <language>en</language>
    <item>
      <title>Mastering Prototypal Inheritance in JavaScript: A Comprehensive Guide</title>
      <dc:creator>Rishav Pandey</dc:creator>
      <pubDate>Sun, 12 Nov 2023 16:20:43 +0000</pubDate>
      <link>https://dev.to/thenomadtechie/mastering-prototypal-inheritance-in-javascript-a-comprehensive-guide-2op2</link>
      <guid>https://dev.to/thenomadtechie/mastering-prototypal-inheritance-in-javascript-a-comprehensive-guide-2op2</guid>
      <description>&lt;p&gt;Understanding Prototypal inheritance in Javascript is the key concept to understand how objects really work in Javascript which has always been tricky when compared to other traditional OOPS patterns in different programming languages. Prototypal inheritance is a way in which our objects in JS can inherit properties/methods from other objects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is one of the most commonly asked questions in Senior Frontend Interviews&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s first go through a code snippet and understand it -&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="c1"&gt;//We have an object `person1` with two properties `name` and `place`&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bob&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;place&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Amsterdam&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// we have another object `person2` with property `name` &lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;person2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;john&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// john&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;place&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// undefined&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code snippet is pretty clear about how we created two different objects while logging person2.place we get undefined which is correct and expected, let’s add something magical to the above code -&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="nx"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;__proto__&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;person1&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;place&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// Amsterdam&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;WHAT? Now we’re getting Amsterdam a value of &lt;code&gt;person2.place&lt;/code&gt; that was never defined by us earlier. So, what’s going on here?&lt;/p&gt;

&lt;p&gt;Let’s confirm if there’s any property place existing in person2 the object via &lt;code&gt;hasOwnProperty&lt;/code&gt; method —&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hasOwnProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;place&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, what’s really going on here? We do not have any &lt;code&gt;place&lt;/code&gt; property defined in the &lt;code&gt;person2&lt;/code&gt; object but still, it’s returning a value when we’re trying to access it.&lt;/p&gt;

&lt;p&gt;If you remember we wrote a magical line &lt;code&gt;person2.__proto__ = person1&lt;/code&gt; and this is where everything happened, now let's understand how.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Prototypal Inheritance in Javascript
&lt;/h2&gt;

&lt;p&gt;In Javascript, all the objects have a hidden property &lt;code&gt;[[Prototype]]&lt;/code&gt; which either stores &lt;code&gt;null&lt;/code&gt; within it or stores references to another object, and then we’ve another method &lt;code&gt;__proto__&lt;/code&gt; (proto property) which is a getter/setter of the hidden &lt;code&gt;[[Prototype]]&lt;/code&gt; property of the object.&lt;/p&gt;

&lt;p&gt;Whenever we try to fetch any property/method from any object, it has a default tendency to look over its own property, and if not found it checks within its [[Prototype]] property and returns the value. This is why we were able to get &lt;code&gt;place&lt;/code&gt; property inside &lt;code&gt;person2&lt;/code&gt; object which was originally defined inside &lt;code&gt;person1&lt;/code&gt; object.&lt;/p&gt;

&lt;p&gt;Let’s verify our concept and try to console &lt;code&gt;person2&lt;/code&gt; —&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wmJVqrew--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9795h4nbo1farr068ghh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wmJVqrew--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9795h4nbo1farr068ghh.png" alt="person2 has [[Prototype]] property" width="553" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can clearly see in the above image that we’ve &lt;code&gt;[[Prototype]]&lt;/code&gt; object inside &lt;code&gt;person2&lt;/code&gt; which stores the reference of &lt;code&gt;person1&lt;/code&gt; object created earlier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prototype Chain
&lt;/h2&gt;

&lt;p&gt;You might be wondering why is there another &lt;code&gt;[[Prototype]]&lt;/code&gt; property inside the &lt;code&gt;[[Prototype]]&lt;/code&gt; property of &lt;code&gt;person2&lt;/code&gt; object. And first of all, what's this &lt;code&gt;[[Prototype]]&lt;/code&gt; in the object that we never defined?&lt;/p&gt;

&lt;p&gt;This is the concept of a prototype chain in which an object looks over its &lt;code&gt;[[Prototype]]&lt;/code&gt; to fetch the property/method and if not found it iterates to the &lt;code&gt;[[Prototype]]&lt;/code&gt; of its own &lt;code&gt;[[Prototype]]&lt;/code&gt; and if again not found it goes on till it finds the null.&lt;/p&gt;

&lt;p&gt;Isn’t it confusing, let’s understand by another 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;animal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;eats&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;rabbit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;jumps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;__proto__&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;animal&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;kangaroo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;swims&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;__proto__&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rabbit&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;kangaroo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eats&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O8Oj4KM---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s65bszhxjyrxgg7bl1th.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O8Oj4KM---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s65bszhxjyrxgg7bl1th.png" alt="visualization of prototypal chaining&amp;lt;br&amp;gt;
" width="800" height="715"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how chained prototypal inheritance looks like when consoled out —&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fTn0aaKe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36hlbk41l5rocaiz3nzc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fTn0aaKe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/36hlbk41l5rocaiz3nzc.png" alt="prototypal chaining in picture" width="553" height="168"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Things to note about Prototypal Inheritance in object
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The reference of the prototype can’t be like a loop, like creating a circle. Javascript will throw an error if we try to assign &lt;strong&gt;proto&lt;/strong&gt; in a circle.&lt;/li&gt;
&lt;li&gt;The value of &lt;strong&gt;proto&lt;/strong&gt; can be either an object or null. Other types are ignored.&lt;/li&gt;
&lt;li&gt;An object can only have a single [[Protype]] property within it, it never inherits from two objects at the same time.&lt;/li&gt;
&lt;li&gt;Prototype chaining ends only when it encounters null, or else it’ll go to the n level of depth to the top finding the requested property in the object.&lt;/li&gt;
&lt;li&gt;An object always looks first within itself to search for any property before looking to its [[Prototype]], if it gets the same property both within itself and [[Prototype]], it’ll give priority to its own property.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Creating prototypal inheritance using Object.create()
&lt;/h2&gt;

&lt;p&gt;We already saw a way in which we can inherit the property defined in any object to another object via the &lt;code&gt;__proto__&lt;/code&gt; keyword. But we can do this in other ways too.&lt;/p&gt;

&lt;p&gt;We can use &lt;code&gt;Object.create()&lt;/code&gt; method to create any object and bind another object to its prototype. Let’s visualize how —&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;animal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;eats&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;rabbit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;animal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;jumps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}})&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;rabbit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;eats&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;In JavaScript, we have the ability to use properties defined in one object to be used by different objects, which is known as Prototypal Inheritance.&lt;/p&gt;

&lt;p&gt;JavaScript looks for inherited properties in the prototype of the object, but also in the prototype of the prototype, and so on in the chain of prototypes.&lt;/p&gt;

&lt;p&gt;This is one of the classic ways of using OOPS in javascript and it’s very useful when used effectively.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Have any questions about prototypal inheritance? Let’s connect in a comment box!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>oop</category>
      <category>programming</category>
    </item>
    <item>
      <title>My VS Code setting for Web Development in 2022</title>
      <dc:creator>Rishav Pandey</dc:creator>
      <pubDate>Sat, 30 Jul 2022 13:48:18 +0000</pubDate>
      <link>https://dev.to/thenomadtechie/my-vs-code-setting-for-web-development-in-2022-5h03</link>
      <guid>https://dev.to/thenomadtechie/my-vs-code-setting-for-web-development-in-2022-5h03</guid>
      <description>&lt;p&gt;After using VS Code for the last 5–6 years, I've tried tons of customization and setup in my Editor. No doubt VS code is expensive in terms of its memory usage of the system but with lots of features and being a Developer centric Editor it's worth trying.&lt;/p&gt;

&lt;p&gt;I've been now very obsessed with the configuration and setup I've done which has undoubtedly increased my overall productivity a lot, and now would like to share my VS code setup with you all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Appearance
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Theme
&lt;/h3&gt;

&lt;p&gt;I’ve been using the &lt;strong&gt;Dark&lt;/strong&gt; color scheme from the start when I started using sublime(again one cool editor you can try).&lt;/p&gt;

&lt;p&gt;Now, this is a personal choice and you can try the Light theme also.&lt;/p&gt;

&lt;p&gt;I've tried several different themes, and now using &lt;a href="https://draculatheme.com/visual-studio-code"&gt;Dracula&lt;/a&gt;  for quite a long. There are other themes also worth trying like &lt;strong&gt;Monokai, Tokyo Night, Ayu, Night Owl, Cobalt2&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--erAHcJdm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gflioqrte2v47nihzn0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--erAHcJdm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gflioqrte2v47nihzn0g.png" alt="Dracula Theme VS Code" width="800" height="1071"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Font and Styling
&lt;/h3&gt;

&lt;p&gt;Choosing a good font and its styling is very important if you're planning to spend most of your time on the editor itself.&lt;/p&gt;

&lt;p&gt;My personal choice here is &lt;a href="https://github.com/microsoft/cascadia-code/wiki/Installing-Cascadia-Code"&gt;Cascadia Code&lt;/a&gt; or &lt;a href="https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions"&gt;Fira Code&lt;/a&gt;. You're going to get some very cool interactive styling while writing the code. This even increases the readability of the code a lot. Few other fonts worth trying here are &lt;strong&gt;Source Code Pro&lt;/strong&gt;, &lt;strong&gt;JetBrains Mono&lt;/strong&gt;, &lt;strong&gt;Monolisa&lt;/strong&gt;(paid).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gImoFZ64--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1lb14kwtd6rj82wtj2d7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gImoFZ64--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1lb14kwtd6rj82wtj2d7.png" alt="Cascadia Code VS Code" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Extensions
&lt;/h2&gt;

&lt;p&gt;Now comes the real power of VSCode. Let me introduce you to some of the coolest extensions ones can use for writing efficient code while creating some cool web applications.&lt;/p&gt;

&lt;p&gt;Those marked with an asterisk(*) should be definitely tried once.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=apollographql.vscode-apollo"&gt;Apollo GraphQL&lt;/a&gt; - Rich editor support for GraphQL client and server development that seamlessly integrates with the Apollo platform&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag"&gt;Auto Rename Tag&lt;/a&gt; - Automatically rename paired HTML/XML tag *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel"&gt;Babel JavaScript&lt;/a&gt; - VSCode syntax highlighting for today's JavaScript. *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments"&gt;Better Comments&lt;/a&gt; - Improve your code commenting by annotating with alert, informational, TODOs, and more!&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=softwaredotcom.swdc-vscode"&gt;Code Time&lt;/a&gt; - Code Time is an open source plugin that provides programming metrics right in Visual Studio Code.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight"&gt;Color Highlight&lt;/a&gt; - Highlight web colors in your editor&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=pranaygp.vscode-css-peek"&gt;CSS Peek&lt;/a&gt; - Allow peeking to css ID and class strings as definitions from html files to respective CSS. Allows peek and goto definition.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=IronGeek.vscode-env"&gt;ENV&lt;/a&gt; - Adds formatting and syntax highlighting support for env files (.env) to Visual Studio Code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens"&gt;Error Lens&lt;/a&gt; - Improve highlighting of errors, warnings and other language diagnostics. *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint"&gt;Eslint&lt;/a&gt; - Find and fix problems in your JavaScript code. *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.copilot"&gt;GitHub Copilot&lt;/a&gt; - Your AI pair programmer&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"&gt;GitLens&lt;/a&gt; - Supercharge Git within VS Code *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=kumar-harsh.graphql-for-vscode"&gt;GraphQL for VSCode&lt;/a&gt; - GraphQL syntax highlighting, linting, auto-complete, and more!&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ecmel.vscode-html-css"&gt;HTML CSS Support&lt;/a&gt; - CSS Intellisense for HTML&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=bradgashler.htmltagwrap"&gt;htmltagwrap&lt;/a&gt; - Wraps selected code with HTML tags&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost"&gt;Import Cost&lt;/a&gt; - Display import/require package size in the editor *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=xabikos.JavaScriptSnippets"&gt;JavaScript (ES6) code snippets&lt;/a&gt; - Code snippets for JavaScript in ES6 syntax *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer"&gt;Live Server&lt;/a&gt; - Launch a development local Server with live reload feature for static &amp;amp; dynamic pages *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense"&gt;npm Intellisense&lt;/a&gt; - Visual Studio Code plugin that autocompletes npm modules in import statements *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=nrwl.angular-console"&gt;Nx Console&lt;/a&gt; - Nx Console for Visual Studio Code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=pnp.polacode"&gt;Polacode&lt;/a&gt; - 📸 Polaroid for your code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;Prettier&lt;/a&gt; - Code formatter using prettier *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=alefragnani.project-manager"&gt;Project Manager&lt;/a&gt; - Easily switch between projects *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"&gt;Settings Sync&lt;/a&gt; - Synchronize Settings, Snippets, Themes, File Icons, Launch, Keybindings, Workspaces and Extensions Across Multiple Machines Using GitHub Gist. *&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint"&gt;Stylelint&lt;/a&gt; - Official Stylelint extension for Visual Studio Code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=SimonSiefke.svg-preview"&gt;Svg Preview&lt;/a&gt; - Preview for Svg files.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons"&gt;vscode-icons&lt;/a&gt; - Icons for Visual Studio Code&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Frequently used shortcuts (in Mac) which ease my development
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Toggle Explorer - CMD+B&lt;/li&gt;
&lt;li&gt;Global search - CMD+SHIFT+F&lt;/li&gt;
&lt;li&gt;Global search and Replace - CMD+SHIFT+H&lt;/li&gt;
&lt;li&gt;Opening list of projects (Project Manager) - CMD+OPTION+P&lt;/li&gt;
&lt;li&gt;Selecting line of codes in all the directions from the cursor - CMD+SHIFT+ARROW_KEY&lt;/li&gt;
&lt;li&gt;Navigating the whole line UP/DOWN - OPTION+TOP/BOTTOM ARROW KEY&lt;/li&gt;
&lt;li&gt;Copying the whole line beneath it - SHIFT+OPTION+DOWN_ARROW&lt;/li&gt;
&lt;li&gt;Selecting any word in all the places present in the file - Double click on that word and CMD+D.&lt;/li&gt;
&lt;li&gt;Multiple cursors - CMD+LEFT_CLICK&lt;/li&gt;
&lt;li&gt;Emmet shortcuts - checkout to the &lt;a href="https://code.visualstudio.com/docs/editor/emmet"&gt;link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Faster navigation with keyboard - Try using arrow_keys with OPTION/CMD Keys.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Recommended Settings/Configs I follow.
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Set &lt;strong&gt;Require config&lt;/strong&gt; to &lt;strong&gt;true&lt;/strong&gt; and avoid unnecessary formatting when working on collaborative project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WRa1AKlK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksokv73bgqbp1jvy4o9l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WRa1AKlK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ksokv73bgqbp1jvy4o9l.png" alt="Prettier config" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set &lt;strong&gt;Auto Save&lt;/strong&gt; to &lt;em&gt;onWindowChange.&lt;/em&gt; and avoid loosing the changes made while switching the editor.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nfmj3hra--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4heh1zsu935pljl0swm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nfmj3hra--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4heh1zsu935pljl0swm.png" alt="File AutoSave" width="800" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use the &lt;strong&gt;Project Manager&lt;/strong&gt; extension and add frequently used projects there. You can easily switch between multiple projects despite of their location with a few keystrokes.&lt;/li&gt;
&lt;li&gt;Configure terminal with code command and use VSCode inbuilt terminal. It saves a lot of time.&lt;/li&gt;
&lt;li&gt;Never hesitate of using good extensions just to save some space on the system, It helps a lot in our day-to-day work.&lt;/li&gt;
&lt;li&gt;Use CLI for every possible thing, and avoid GUI.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>vscode</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
