<?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: Mandeep Singh Panwar</title>
    <description>The latest articles on DEV Community by Mandeep Singh Panwar (@mannypanwar).</description>
    <link>https://dev.to/mannypanwar</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%2F368796%2Fbfc19bf5-0f9f-443d-a313-82f62fa0ecfb.jpeg</url>
      <title>DEV Community: Mandeep Singh Panwar</title>
      <link>https://dev.to/mannypanwar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mannypanwar"/>
    <language>en</language>
    <item>
      <title>6 VScode Extensions to boost your Code</title>
      <dc:creator>Mandeep Singh Panwar</dc:creator>
      <pubDate>Tue, 30 Jun 2020 14:54:50 +0000</pubDate>
      <link>https://dev.to/mannypanwar/6-vscode-extensions-to-boost-your-code-349k</link>
      <guid>https://dev.to/mannypanwar/6-vscode-extensions-to-boost-your-code-349k</guid>
      <description>&lt;h2&gt;
  
  
  6 VScode Extensions to boost your Code
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Lets get to it then 🚀
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TfbqDw11--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kgseb6e4udn9qb0b5427.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TfbqDw11--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kgseb6e4udn9qb0b5427.png" alt="Alt Text"&gt;&lt;/a&gt;Live Server  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Live server is useful to create local server of your file.&lt;/li&gt;
&lt;li&gt;It also gets updated automatically on save&lt;/li&gt;
&lt;li&gt;No more reloading the pages 🤣&lt;/li&gt;
&lt;li&gt;Link &lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SgOkFWk6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l13z592ig0oo3zot6vvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SgOkFWk6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/l13z592ig0oo3zot6vvx.png" alt="Alt Text"&gt;&lt;/a&gt;Auto Rename Tag &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This extension automatically renames the tag on change&lt;/li&gt;
&lt;li&gt;good for working with html&lt;/li&gt;
&lt;li&gt;Link &lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cvm9oZ4G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m0w2jg8k1sl1uz7qif8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cvm9oZ4G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/m0w2jg8k1sl1uz7qif8s.png" alt="Alt Text"&gt;&lt;/a&gt;Prettier &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prettier is used to beautify the code, It supports variety of languages&lt;/li&gt;
&lt;li&gt;To format on save go to VScode &lt;code&gt;settings&lt;/code&gt; then search and enable &lt;code&gt;Format on Save&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Link &lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VskBErf_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o5hxry21ok66248vnvhp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VskBErf_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o5hxry21ok66248vnvhp.png" alt="Alt Text"&gt;&lt;/a&gt;EsLint &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EsLint is a JavaScript linter, It identifies problems in your JavaScipt code leading to less bugs&lt;/li&gt;
&lt;li&gt;To use EsLint one must have installed EsLint globally or locally, tho global install is recommended&lt;/li&gt;
&lt;li&gt;for global install run  &lt;code&gt;npm install -g eslint&lt;/code&gt; in your terminal&lt;/li&gt;
&lt;li&gt;Link &lt;a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Mw6Ogm6K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/djfzdc1uyzmy3lpuvgwf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Mw6Ogm6K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/djfzdc1uyzmy3lpuvgwf.png" alt="Alt Text"&gt;&lt;/a&gt;TabNine &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TabNine is an AI Code Completions for All Languages and IDEs&lt;/li&gt;
&lt;li&gt;It indexes all your files and predicts what you may write&lt;/li&gt;
&lt;li&gt;Though still in infancy, it is worth a try&lt;/li&gt;
&lt;li&gt;Link &lt;a href="https://marketplace.visualstudio.com/items?itemName=TabNine.tabnine-vscode"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hPQg6xO6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o4teoh2xop02rvijryld.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hPQg6xO6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/o4teoh2xop02rvijryld.png" alt="Alt Text"&gt;&lt;/a&gt;Bracket Pair Colorizer 2 &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This extension allows matching brackets to be identified with colours.&lt;/li&gt;
&lt;li&gt;It saves time looking for the closing tag 🕶&lt;/li&gt;
&lt;li&gt;Saves from syntax typos&lt;/li&gt;
&lt;li&gt;Link &lt;a href="https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>vscode</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Difference in Asynchronous &amp; Synchronous JavaScript Code</title>
      <dc:creator>Mandeep Singh Panwar</dc:creator>
      <pubDate>Tue, 30 Jun 2020 14:00:52 +0000</pubDate>
      <link>https://dev.to/mannypanwar/difference-in-asynchronous-synchronous-javascript-code-4gcb</link>
      <guid>https://dev.to/mannypanwar/difference-in-asynchronous-synchronous-javascript-code-4gcb</guid>
      <description>&lt;h3&gt;
  
  
  Hello beautiful people on the internet 🙋‍♂️
&lt;/h3&gt;

&lt;h2&gt;
  
  
  This blog points out difference between Asynchronous &amp;amp; Synchronous JavaScript code
&lt;/h2&gt;

&lt;h3&gt;
  
  
  All developer eventually have to know about these two in order to write good code
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Lets get to it then 🚀
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Synchronous Programming&lt;/code&gt;&lt;/strong&gt; ▶ &lt;code&gt;Synchronous basically means that you can only execute one thing at a time&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;Like in JavaScript, the code runs from top to button executing single line of code at a time&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;Asynchronous Programming&lt;/code&gt;&lt;/strong&gt; ▶ &lt;code&gt;Asynchronous means that you can execute multiple things at a time and you don't have to finish executing the current thing in order to move on to next one&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why does it even matter 🤔
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Now that you know about this why does this even matter?
&lt;/h4&gt;

&lt;p&gt;It is important because the code that might take more time &lt;strong&gt;(like API calls)&lt;/strong&gt; must be written Asynchronously otherwise rest of the code will have to wait till the data is fetched.&lt;/p&gt;

&lt;h4&gt;
  
  
  In simple words 💁‍♂️
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;If we make API calls or fetch data &lt;strong&gt;Synchronously&lt;/strong&gt;, our code written after the call will have to wait till out call is made&lt;/li&gt;
&lt;li&gt;Assuming that fetching data takes &lt;code&gt;200ms&lt;/code&gt;, JavaScript will wait for &lt;code&gt;200ms&lt;/code&gt; and then execute rest of your code.&lt;/li&gt;
&lt;li&gt;While if the data fetching is written &lt;strong&gt;Asynchronously&lt;/strong&gt; the &lt;code&gt;200ms&lt;/code&gt; wait is no longer there, the rest of the code runs without waiting for the data fetching making code run faster. &lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Now how to write code Asynchronously 🤔
&lt;/h3&gt;

&lt;p&gt;There are various ways, most preferred are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;promises&lt;/code&gt; 

&lt;ul&gt;
&lt;li&gt;under this you fetch data inside a promise. Read more &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;async await&lt;/code&gt; 

&lt;ul&gt;
&lt;li&gt;this is used to make normal function act Asynchronously. Read more &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function"&gt;🔗&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Thank you for reading 💙👨‍💻
&lt;/h3&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Dark Art of centering elements in CSS</title>
      <dc:creator>Mandeep Singh Panwar</dc:creator>
      <pubDate>Tue, 30 Jun 2020 13:19:11 +0000</pubDate>
      <link>https://dev.to/mannypanwar/dark-art-of-centering-elements-in-css-5dnp</link>
      <guid>https://dev.to/mannypanwar/dark-art-of-centering-elements-in-css-5dnp</guid>
      <description>&lt;p&gt;Hello folks, this is my first blog 😊&lt;/p&gt;

&lt;p&gt;Alright, lets dive into it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What will you learn 🤔
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How to magically center anything in FLEXBOX
&lt;/h3&gt;

&lt;p&gt;Lets get to it, then&lt;/p&gt;

&lt;h3&gt;
  
  
  First create a pen at codepen.io
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Lets add some code
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Add this to the html sections&lt;/li&gt;
&lt;li&gt; &lt;code&gt;&amp;lt;div class="box"&amp;gt; &amp;lt;div class="sm-box"&amp;gt;&amp;lt;/div&amp;gt; &amp;lt;/div&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;We have created a 🙎‍♂️ parent div of class box which has 👶 child div sm-box&lt;/li&gt;
&lt;li&gt;and this to the css&lt;/li&gt;
&lt;li&gt; &lt;code&gt;.box {height: 200px; width: 200px; border: 1px solid #c51244;}&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt; &lt;code&gt;.sm-box{ height: 100px; width: 100px; background-color: red; }&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;It will look like this 
-&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cddHbxfI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/64lkw7kxuj4xf2yuxnjc.PNG" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;this css is used for us to see 👶child div layout in 🙎‍♂️parent div&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;h3&gt;
  
  
  We are ready now
&lt;/h3&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Flexbox basics 🚀
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In order to use flex box u must add &lt;code&gt;display: flex&lt;/code&gt; to the parent div i.e &lt;code&gt;.box&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Flex box uses two axis to layout out elements

&lt;ul&gt;
&lt;li&gt;main axis&lt;/li&gt;
&lt;li&gt;cross axis&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;flexbox uses flex direction property to define the main axis, it takes any of these value

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;row&lt;/code&gt; &lt;code&gt;row-reverse&lt;/code&gt; &lt;code&gt;column&lt;/code&gt; &lt;code&gt;column-reverse&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QtfVOdrp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0swpqtc8wvcxyae8fe38.png" alt="Alt Text"&gt;&lt;/li&gt;
&lt;li&gt;the diagram above defines the direction of main axis for all different &lt;code&gt;flex-direction&lt;/code&gt; properties&lt;/li&gt;
&lt;li&gt;by default (when not defined) flex-direction is &lt;code&gt;row&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Alright we are done with theory lets center our 👶 child div now
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Since now u know about axis and flex-direction, we can move on to the main properties &lt;code&gt;justify-content&lt;/code&gt; and &lt;code&gt;align-items&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;justify-content&lt;/code&gt; handles the main axis&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;align-items&lt;/code&gt; handles the main axis&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;to center child element we add &lt;code&gt;justify-content: center&lt;/code&gt; and &lt;code&gt;align-items: center&lt;/code&gt; to the parent css&lt;/li&gt;
&lt;li&gt;and voila!! child div is centered&lt;/li&gt;
&lt;li&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G4GDk0br--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/8veesj4fjdy77u0zmyyc.PNG" alt="Alt Text"&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Overview
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In order to center all elements inside a parent element u can use flexbox&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;display: flex&lt;/code&gt; to parent div &lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;justify-content: center&lt;/code&gt; to center  the main axis&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;align-items: center&lt;/code&gt; to center the cross axis
## Keep Coding 👨‍💻 &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>flexbox</category>
      <category>html</category>
    </item>
  </channel>
</rss>
