<?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: Nijeesh Joshy</title>
    <description>The latest articles on DEV Community by Nijeesh Joshy (@nijeesh4all).</description>
    <link>https://dev.to/nijeesh4all</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%2F44962%2F967976a1-27dc-465d-b2f5-0375d56de0df.gif</url>
      <title>DEV Community: Nijeesh Joshy</title>
      <link>https://dev.to/nijeesh4all</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nijeesh4all"/>
    <language>en</language>
    <item>
      <title>Sorting HTML elements with Flexbox and JavaScript</title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Mon, 06 Jan 2020 13:42:04 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/sort-html-elements-with-flex-3cdc</link>
      <guid>https://dev.to/nijeesh4all/sort-html-elements-with-flex-3cdc</guid>
      <description>&lt;h1&gt;
  
  
  What is flexBox
&lt;/h1&gt;

&lt;p&gt;flexbox or flexible box layout is a layout scheme in CSS. which is used to align and organize HTML elements in a layout.  &lt;/p&gt;

&lt;p&gt;let say this is our HTML layout&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="row"&amp;gt;
  &amp;lt;div class="col " id=""&amp;gt;1&amp;lt;/div&amp;gt;
  &amp;lt;div class="col " id=""&amp;gt;3&amp;lt;/div&amp;gt;
  &amp;lt;div class="col " id=""&amp;gt;5&amp;lt;/div&amp;gt;
  &amp;lt;div class="col " id=""&amp;gt;200&amp;lt;/div&amp;gt;
  &amp;lt;div class="col " id=""&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;div class="col " id=""&amp;gt;2&amp;lt;/div&amp;gt;
  &amp;lt;div class="col " id=""&amp;gt;400&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;to use the flexbox properties we have to change the &lt;code&gt;display:&lt;/code&gt; type of the parent to &lt;code&gt;flex&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.row {
  display: flex;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;for making the elements appear in a column instead of a row we have to set the &lt;code&gt;flex-direction&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;it can have values row, row-reverse, column, column-reverse;&lt;/p&gt;

&lt;p&gt;so getting the column layout we add &lt;code&gt;flex-direction: column&lt;/code&gt; to our css.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.row {
  display: flex;
  flex-direction: column
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;another flexbox property is&lt;code&gt;order&lt;/code&gt;, as the name suggest it can be used to define where in the flex container the current element should be placed.&lt;/p&gt;

&lt;p&gt;for more info on how CSS flex works.&lt;br&gt;
&lt;a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/"&gt;flexbox cheet-sheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;by using this trick we can easy make a simple list which we can sort in any way we want.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://jsfiddle.net/nijeesh4all/on5rsax8/59/embedded/result,html,css,js//dark" width="100%" height="600"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>html</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>css</category>
    </item>
    <item>
      <title>Is it still safe for large production applications with a large user base to use bcrypt as the password hashing algorithm ?</title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Tue, 03 Sep 2019 06:43:44 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/is-it-still-safe-for-large-production-applications-with-a-large-user-base-to-use-bcrypt-as-the-password-hashing-algorithm-3j69</link>
      <guid>https://dev.to/nijeesh4all/is-it-still-safe-for-large-production-applications-with-a-large-user-base-to-use-bcrypt-as-the-password-hashing-algorithm-3j69</guid>
      <description>&lt;p&gt;I have been doing backend dev for 3 years now, i read couple of articles recently which says argon2 is much more safer than bcrypt everyone should switch to it.&lt;/p&gt;

&lt;p&gt;Is it still safe for large production applications with a large user base to use bcrypt as the password hashing algorithm or should it switch ?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>security</category>
      <category>encryption</category>
      <category>explainlikeimfive</category>
    </item>
    <item>
      <title>Why does two small for-loops run faster than a big one ?</title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Tue, 27 Aug 2019 13:30:02 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/why-two-small-for-loops-run-faster-than-a-big-one-49pn</link>
      <guid>https://dev.to/nijeesh4all/why-two-small-for-loops-run-faster-than-a-big-one-49pn</guid>
      <description>&lt;p&gt;&lt;em&gt;Explain Like I am five&lt;/em&gt; Why does two small for loops run faster than one big for loop?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;s = Date.now()
for(let i=0;i&amp;lt;1e10;i++) { i + 100 }
for(let i=0;i&amp;lt;1e10;i++) { i + 100 }
console.log(Date.now() - s)
// =&amp;gt; 37s


s = Date.now()
for(let i=0;i&amp;lt;2e10;i++) { i + 100 }
console.log(Date.now() - s)
// =&amp;gt; 38s

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Especially for language like JS which is not multi-threaded&lt;/p&gt;

</description>
      <category>explainlikeimfive</category>
      <category>discuss</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Functional Programming vs OOPS : Explain Like I'm Five</title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Thu, 25 Oct 2018 06:04:39 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/functional-programming-vs-oops--explain-x-like-im-five-2fnc</link>
      <guid>https://dev.to/nijeesh4all/functional-programming-vs-oops--explain-x-like-im-five-2fnc</guid>
      <description>&lt;p&gt;what is the difference between Functional Programming vs OOPS&lt;/p&gt;

</description>
      <category>explainlikeimfive</category>
    </item>
    <item>
      <title>Do You believe Ruby on rails is still relevant ?</title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Fri, 12 Oct 2018 05:00:44 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/do-you-believe-ruby-on-rails-is-still-relevant--4ln1</link>
      <guid>https://dev.to/nijeesh4all/do-you-believe-ruby-on-rails-is-still-relevant--4ln1</guid>
      <description>

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>How often You Have to use the Concepts of Trees in your algo </title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Sat, 18 Nov 2017 18:34:00 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/how-often-you-have-to-use-the-concepts-of-trees-in-your-algo-cm8</link>
      <guid>https://dev.to/nijeesh4all/how-often-you-have-to-use-the-concepts-of-trees-in-your-algo-cm8</guid>
      <description>&lt;p&gt;I really dont get it &lt;br&gt;
I haven't Used Trees in any of my Programs so far is it me or everyone feels the same ?&lt;/p&gt;

&lt;p&gt;I may be a bad programmer but its just a thought... &lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>KISS The JavaScript</title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Sat, 18 Nov 2017 17:41:47 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/kiss-the-java-script-298</link>
      <guid>https://dev.to/nijeesh4all/kiss-the-java-script-298</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                       " KEEP IT STUPID SIMPLE "
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;I used to see this quote and say "When I can Write Some Awesome Code Why Should I Keep it simple after all it is my code I have comments Every where so no problem for me to understand it later"&lt;/p&gt;

&lt;p&gt;So as a programmer just think for a second what was the best practice yiu have taken when you write code.Is is Commenting every now and then?, Spliting it into modules ?, or may be reducing Repetition.&lt;/p&gt;

&lt;p&gt;Every one writes codes in their own way but there is a way which can be applied to any way is 'Keep it simple stupid'.&lt;/p&gt;

&lt;p&gt;You can get two meanings from the same quote which is&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;'Keep it simple, Stupid'&lt;/li&gt;
&lt;li&gt;'Keep it simply stupid'&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I will Go with the Second one because i don't like anybody calling me stupid.&lt;/p&gt;

&lt;p&gt;I will say why you should kiss (Sounds a little awkward but it sounds funny).You may be an Einstein you can write codes that only you can read and understand.But the way our mind works is really funny you may be in your Einstein mode when you wrote your code  when you have to rework on the code after a few days may be months or years your mind will be on the trump state. So instead correcting the code you wrote you will be wasting a lots of time trying to make sense of what you wrote (Getting  dejavu ?).&lt;/p&gt;

&lt;p&gt;You may be thinking all code i write is stupid i am not smart enough to write complex code. Let me tell you why this is probably not the case.According to me an awesome code is something which can be understood by even a dumb person (Smart enough to read code).Keeping things simple ironically is not that simple.&lt;/p&gt;

&lt;p&gt;According to me write codes for the dumper self of you not for others to understand.&lt;/p&gt;

&lt;p&gt;When it comes to JS things can get real bad real soon.If you have coded in JS for some time you would have heard about something called as &lt;strong&gt;callback hell&lt;/strong&gt;. If you don't know this is an  definition of callback hell&lt;/p&gt;

&lt;p&gt;Seen the movie Inception? The movie talks about dreams within dreams within dreams, each layer with its own scope but can affect the previous layer of dream - if there is one. The worst scenario is that if you get lost, then you have no way of knowing where you are and where you came from.&lt;/p&gt;

&lt;p&gt;This is an example of a call back hell from &lt;a href="http://callbackhell.com/"&gt;callback hell&lt;/a&gt;&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;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error finding files: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;fileIndex&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="nx"&gt;gm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error identifying file size: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt; : &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="nx"&gt;aspect&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
          &lt;span class="nx"&gt;widths&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;widthIndex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;aspect&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;resizing &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;to &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;x&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dest&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;w&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;_&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
              &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Error writing file: &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt;
          &lt;span class="p"&gt;}.&lt;/span&gt;&lt;span class="nx"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code here looks real messy it can be avoided using promises learn more &lt;a href="https://scotch.io/tutorials/javascript-promises-for-dummies"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Using promises will make you code pretty much easy to read and maintain. You will feel more happy seeing the code which is neatly organised.&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;awesome_function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;do_this&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;do_this_too&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;here_is_one_more&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;oh_crap&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See writing code with promises is almost looks like synchronous programming.So think of a scenario where you have to correct the code some one else written if it is written in the first way you will be pulling your hairs out and if its the second way even a stupid person can understand that it does. &lt;/p&gt;

&lt;p&gt;I have talked here about call back hell where i should have talked more generally.In my opinion call backs are the easiest things to make your code messy So refactoring them will you leave you with a good and  neat code.&lt;/p&gt;

&lt;p&gt;Happy coding ... &lt;/p&gt;

&lt;h3&gt;
  
  
  links
&lt;/h3&gt;

&lt;p&gt;1.&lt;a href="https://simpleprogrammer.com/2015/08/19/kiss-one-best-practice-to-rule-them-all/"&gt;KISS for programming&lt;/a&gt;&lt;br&gt;
2.&lt;a href="http://callbackhell.com/"&gt;Callback Hell&lt;/a&gt; &lt;br&gt;
3.&lt;a href="https://scotch.io/tutorials/javascript-promises-for-dummies"&gt;Promises&lt;/a&gt;&lt;br&gt;
4.&lt;a href="http://javascriptissexy.com/understand-javascript-callback-functions-and-use-them/"&gt;Callbacks&lt;/a&gt;&lt;br&gt;
5.&lt;a href="https://dev.to/maxart2501/gotchas-about-asyncawait-and-promises-9di"&gt;Promises&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Why Learning JavaScript Is Fun</title>
      <dc:creator>Nijeesh Joshy</dc:creator>
      <pubDate>Fri, 17 Nov 2017 13:20:10 +0000</pubDate>
      <link>https://dev.to/nijeesh4all/why-learning-javascript-is-fun-bj8</link>
      <guid>https://dev.to/nijeesh4all/why-learning-javascript-is-fun-bj8</guid>
      <description>&lt;p&gt;I started Leaning JavaScript in the fall of 2016 and at First it seems really boring but i kept leaning JS because i have to lean  I was in a middle of a project which is my first try to web development. So with out JavaScript doing functions in the Client-Side is not possible so i had to lean it.&lt;br&gt;
    I was like why i have to go through all these documentation it just like any other programming languages some for ,while , ans for each loops and if ,else if controls. At that point i was really getting bored and decided not to read any guides to lean JavaScript just dig in and start codding like a mad Hacker (Like in the movies not the real world).&lt;br&gt;
    Then i started codding like i always do with having only a basic idea of the syntax and not sure how to do anything. As long as we have stack Overflow All the programming related questions wont go unanswered. So i stated coding it was pretty much python lots of functions for you to use (I love C/C++ for their "if you want some thing to be done do it your self" attitude ). If I don't know Something went to W3schools or Stack-overflow for answers and  i was like this is just a piece of cake. i was like give me a year i will build Facebook for you.All of that was about to change....!&lt;br&gt;
    That was when i had to use Async Programming . I was never into the Async Programming before i was never even used multi threading or no parallel processing methods and i was feeling like why my code is behaving really funny.So i tool my code to Stack Overflow and explained then what am i trying to do and what is the error. Then One guy commented "it is because of JavaScript's Async Programming you have to do that as a call back."&lt;br&gt;
    I was like what Async and callbacks ? what the hell are those ?. So i dig in to the internet for answers. After a lots of conversations and reading i decided i have leaned everything about Async and callback now its time for me to code.&lt;br&gt;
    So i started codding again and i get stuck every now and then and i tries to experiment by moving the lines of code here and there until it works. After wasting lots of coffee and  time i decide to lean more about it.&lt;br&gt;
    So as a lazy person i thought why i should read when someone else will read and explain for us. that way i wont have to make sense of the all documentations. So i went to YouTube and searched for "Explain JavaScript Async" like i am commanding YouTube to teach me. I viewed a couple of videos and then one video hit my eye it was a video a young developer talking at a conference so i decided to give it a try and that was really good. I realized that i was seeing JS like other languages that was my mistake JS is a entirely different language. Like none other languages i have learned and worked with JS was different it does not always has to wait for each line to execute and finish. i will come back to the part when the execution of that is completed.&lt;br&gt;&lt;br&gt;
    It was more of an event driven language that a line by line executing language. After learning JS for a few months and experimenting with it on a couple of side projects my alliance has changed from python to JS.&lt;br&gt;
    Learning JS can be really challenging if you are new to Async Programming but that is the beauty of it throws you challenges which most of the times you have to&lt;br&gt;
solve on your own. Not like all other languages each and every line you code will make you fell in  love the language deeper and deeper.&lt;/p&gt;

&lt;p&gt;So happy coding.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>languages</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
