<?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: mikitashah</title>
    <description>The latest articles on DEV Community by mikitashah (@mikitashah).</description>
    <link>https://dev.to/mikitashah</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%2F58763%2Fff8999c2-d09c-4357-9f83-f193fdae0fd4.png</url>
      <title>DEV Community: mikitashah</title>
      <link>https://dev.to/mikitashah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mikitashah"/>
    <language>en</language>
    <item>
      <title>Search Algorithms</title>
      <dc:creator>mikitashah</dc:creator>
      <pubDate>Mon, 19 Oct 2020 06:00:24 +0000</pubDate>
      <link>https://dev.to/mikitashah/search-algorithms-1ame</link>
      <guid>https://dev.to/mikitashah/search-algorithms-1ame</guid>
      <description>&lt;p&gt;Today, let us touch base on some fundamental concepts like search algorithms.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In simple terms, searching is a process of looking up a particular data record in the database or in the collection of items. A search typically answers as true or false whether the particular data in which we are referring is found or not and perform the next action accordingly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Commonly used algorithms for search are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linear search&lt;/li&gt;
&lt;li&gt;Binary search&lt;/li&gt;
&lt;li&gt;Interpolation search&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let us understand them in detail with some example&lt;/p&gt;

&lt;h3&gt;
  
  
  Linear Search Algorithm
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Linear Search Algorithm&lt;/em&gt; is the simplest and easiest form of the search algorithm. In this algorithm, a sequential search is made over all the items one by one to search for the targeted item. Each item is checked in sequence until the match is found. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the match is found, the searched item is returned otherwise the search continues till the end.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To make it easy to understand, let us see understand linear search using a flow diagram and example.&lt;/p&gt;

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

&lt;h4&gt;
  
  
  Points to note:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Does not need sorted array list&lt;/li&gt;
&lt;li&gt;Performs equality comparisons&lt;/li&gt;
&lt;li&gt;The time complexity is O(n)&lt;/li&gt;
&lt;li&gt;Time taken to search elements keeps increasing as the number of elements is increased.&lt;/li&gt;
&lt;/ol&gt;

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




&lt;h3&gt;
  
  
  Binary Search Algorithm
&lt;/h3&gt;

&lt;p&gt;In &lt;em&gt;Binary search algorithm&lt;/em&gt;, it begins with an interval covering the whole array and diving it in half. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise narrow it to the upper half. Repeatedly check until the value is found or the interval is empty.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To make it easy to understand, let us see understand binary search using flow diagram and example as below.&lt;/p&gt;

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

&lt;h4&gt;
  
  
  Points to note:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;The array needs to be sorted&lt;/li&gt;
&lt;li&gt;Performs ordering comparisons&lt;/li&gt;
&lt;li&gt;Time complexity to O(log n).&lt;/li&gt;
&lt;li&gt;Search is done to either half of the given list, thus cut down your search to half time&lt;/li&gt;
&lt;/ol&gt;

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




&lt;h3&gt;
  
  
  Interpolation search Algorithm
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Interpolation search&lt;/em&gt; is an improved version of binary search. This search algorithm works on the probing position of the required value. Binary Search always goes to the middle element to check. On the other hand, interpolation search may go to different locations according to the value of the key being searched. For example, if the value of the key is closer to the last element, the interpolation search is likely to start search toward the end side. To find the position to be searched, it uses the following formula.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;position = lowVal + [ (s-array[lowVal])*(highVal-lowVal) / (array[highVal]-array[lowVal]) ]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;array[]&lt;/code&gt; =&amp;gt; Array where elements need to be searched&lt;br&gt;
&lt;code&gt;s&lt;/code&gt; =&amp;gt; Element to be searched&lt;br&gt;
&lt;code&gt;lowVal&lt;/code&gt; =&amp;gt; Starting index in arr[]&lt;br&gt;
&lt;code&gt;highVal&lt;/code&gt; =&amp;gt; Ending index in arr[]&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Algorithm is same as binary search except that here we determine the probe position based on the above formula&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;h4&gt;
  
  
  Points to note:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;The array needs to be sorted&lt;/li&gt;
&lt;li&gt;Improved version of Binary search algorithm&lt;/li&gt;
&lt;li&gt;Time complexity to log(log(n))&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;Hope this article helps refresh your basic concepts. I will come up with more articles to revise and touch base on legendary and foundational concepts.&lt;/p&gt;

</description>
      <category>datastructures</category>
      <category>algorithms</category>
      <category>search</category>
      <category>programming</category>
    </item>
    <item>
      <title>Why HTML5?</title>
      <dc:creator>mikitashah</dc:creator>
      <pubDate>Fri, 09 Oct 2020 06:59:38 +0000</pubDate>
      <link>https://dev.to/mikitashah/why-html5-1hd9</link>
      <guid>https://dev.to/mikitashah/why-html5-1hd9</guid>
      <description>&lt;p&gt;Let us take this moment and revisit! Why HTML5?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Let us refresh the features provided by HTML5 and how they are helpful in today’s world of web development.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thanks to the rise of new gadgets, such as smartphones, tablets, mobile watches, IoT, and many more, accessing the internet has become way easy! This has increased the need for similar user experience across all devices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F387t7za481g0lr8ngy1v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F387t7za481g0lr8ngy1v.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There was a need to have a seamless experience across all devices&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;HTML5 has lots of new features including support to multimedia, new tags, minimal usage of external plugins, etc&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F08riwk3dcryva221qewh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F08riwk3dcryva221qewh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The HTML markup language has very much evolved with time and HTML5 is the latest version that comes with a plethora of new features and efficiency in the web development galaxy. The latest version is better integration of CSS, Java, and HTML components that are focused to make it easy for developers to create better apps and make the whole technology better accessible for mobile devices.&lt;/p&gt;

&lt;p&gt;So let us go through the features and how to use them, in easy steps.&lt;/p&gt;

&lt;h4&gt;
  
  
  Feature 1: Doctype declaration is quite simple and easy.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;Title of the document&amp;lt;/title&amp;gt;
    &amp;lt;/head&amp;gt;
    &amp;lt;body&amp;gt;
        The content of the document......
    &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Feature 2: Supports audio and video controls
&lt;/h4&gt;

&lt;p&gt;For Audio: Just need to add audio controls tag&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;audio controls&amp;gt;
     &amp;lt;source src=&amp;lt;YourMP3AudioFile.mp3&amp;gt; type="audio/mpeg”&amp;gt; 
     Your browser does not support audio
&amp;lt;/audio&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Video: Just need to add video controls tag&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;video controls&amp;gt;
      &amp;lt;source src="YourMP4VideoFile.mp4" type="video/mp4"&amp;gt;
       Your browser does not support video.
&amp;lt;/video&amp;gt;

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

&lt;/div&gt;






&lt;h4&gt;
  
  
  Feature 3: Support for graphics
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Vector graphics is additionally an integral part of HTML5 like SVG and canvas.&lt;/li&gt;
&lt;li&gt;HTML5 allows the drawing of shapes like circle, rectangle, triangle, etc.&lt;/li&gt;
&lt;li&gt;It is supported by all-new browsers like Firefox, Mozilla, Chrome, Safari, etc.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;svg width="100" height="100"&amp;gt;
     &amp;lt;circle cx="50" cy="50" r="40" fill="yellow" /&amp;gt;
&amp;lt;/svg&amp;gt;

&amp;lt;canvas id="myCanvas" width="200" height="100" style="border:1px solid #000000;"&amp;gt;
&amp;lt;/canvas&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Feature 4: Introduced semantic attributes
&lt;/h4&gt;

&lt;p&gt;New elements for web structure like nav, header, footer, article, section, nav, aside, figure are introduced. The below example shows the usage of some semantic attributes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;article&amp;gt;
   &amp;lt;header&amp;gt;
      &amp;lt;h1&amp;gt;A heading here&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;Some subtitles here&amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;Some additional information here&amp;lt;/p&amp;gt;
   &amp;lt;/header&amp;gt;
   &amp;lt;p&amp;gt;Lorem Ipsum dolor set amet....&amp;lt;/p&amp;gt;
   &amp;lt;section&amp;gt;
      &amp;lt;h2&amp;gt;Topic 1&amp;lt;/h2&amp;gt;
      &amp;lt;p&amp;gt;Topic 1 details and more and more information&amp;lt;/p&amp;gt;
   &amp;lt;/section&amp;gt;
   &amp;lt;footer&amp;gt;
      &amp;lt;p&amp;gt;Developed and Published&amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;
          &amp;lt;a href="mailto:support@website.com"&amp;gt;support@website.com
          &amp;lt;/a&amp;gt;
      &amp;lt;/p&amp;gt;
   &amp;lt;/footer&amp;gt;
&amp;lt;/article&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Feature 5: Character encoding is simple and easy
&lt;/h4&gt;

&lt;p&gt;Simply add one line and you are set.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta charset=“UTF-8”&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  Feature 6: Track GeoLocation
&lt;/h4&gt;

&lt;p&gt;One can track the GeoLocation of a user easily by using JS GeoLocation API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
   &amp;lt;body&amp;gt;
      &amp;lt;p&amp;gt;Click the button to get your coordinates.&amp;lt;/p&amp;gt;
      &amp;lt;button onclick="getLocation()"&amp;gt;Try It&amp;lt;/button&amp;gt;
      &amp;lt;p id="demo"&amp;gt;&amp;lt;/p&amp;gt;
      &amp;lt;script&amp;gt;
          var x = document.getElementById("demo");
          function getLocation() {
              if (navigator.geolocation) {
             navigator.geolocation.getCurrentPosition(showPosition);
              } else {
             x.innerHTML = "Geolocation is not supported by this browser.";
              }
          }          function showPosition(position) {
              x.innerHTML = "Latitude: " + position.coords.latitude + "&amp;lt;br&amp;gt;Longitude: " + position.coords.longitude;
          }
       &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;






&lt;h4&gt;
  
  
  Feature 7: Uses application cache to store offline data.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
     &amp;lt;body&amp;gt;
         &amp;lt;div id="result"&amp;gt;&amp;lt;/div&amp;gt;
         &amp;lt;script&amp;gt;
             // Check browser support
             if (typeof(Storage) !== "undefined") {
                  // Store
                  localStorage.setItem("lastname", "shah");
                  // Retrieve
                  document.getElementById("result").innerHTML =           localStorage.getItem("lastname");
             } else {
                  document.getElementById("result").innerHTML = "Sorry, your browser does not support Web Storage...";
             }
         &amp;lt;/script&amp;gt;
       &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;






&lt;h4&gt;
  
  
  Feature 8: Supports calendar operations
&lt;/h4&gt;

&lt;p&gt;Modern form elements like date, time, week, email, and many more are launched.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="week" name="week" id="my-week" min="2020-W18" max="2020-W26" required&amp;gt;
&amp;lt;/input&amp;gt;

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

&lt;/div&gt;






&lt;h4&gt;
  
  
  Miscellaneous features
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Allows JavaScript to run in the background. This is possible due to the JS web worker API in HTML5. JS worker API is integrated into HTML5, and that’s the reason it can now run JavaScript within the web browser, instead of the browser interface thread&lt;/li&gt;
&lt;li&gt;More mobile-friendly.&lt;/li&gt;
&lt;li&gt;Capable of handling inaccurate syntax.&lt;/li&gt;
&lt;li&gt;Supports async and ping attributes&lt;/li&gt;
&lt;li&gt;Supports drag and drop effects.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;I think the feature list can go on and on. But I hope with this article you can at least get some basic understanding of what’s new and supported with new evolving HTML5 language!&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Many thanks for reading!
&lt;/h3&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>features</category>
    </item>
    <item>
      <title>Let's Understand the Express.js framework</title>
      <dc:creator>mikitashah</dc:creator>
      <pubDate>Sun, 20 Sep 2020 13:45:57 +0000</pubDate>
      <link>https://dev.to/mikitashah/let-s-understand-the-express-js-framework-3j5n</link>
      <guid>https://dev.to/mikitashah/let-s-understand-the-express-js-framework-3j5n</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Node.js has become a reliable and trusted framework for modern web application development, providing a runtime environment that allows the use of JavaScript for both client-side and server-side application code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article, let us understand the basics of the Express.js framework and why should we use this framework.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8qarabsc4dm2roism7pm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8qarabsc4dm2roism7pm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Express is a light-weight, backend-based framework used for developing single-page, multi-page, and hybrid Node.js applications. Express is a minimal and flexible Node.js web application framework that provides a robust set of features for developing web and mobile applications. It helps to organize an application into an MVC (model-view-controller) architecture.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Every developer may have heard of an express framework earlier or later during their development phase and maybe using it knowingly or unknowingly while doing their project development life cycle&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Why should I use express.js?
&lt;/h3&gt;

&lt;p&gt;Express is an open-source and flexible NodeJS web app framework designed to make developing websites, web apps, &amp;amp; API’s much simple and easy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You should use this so that you don’t have to repeat the same code over and over again.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Node.js is a low-level I/O mechanism that has an HTTP module. If you just use an HTTP module, a lot of work like parsing the payload, cookies, storing sessions (in memory or in Redis), selecting the right route pattern based on regular expressions will have to be re-implemented. With Express.js, it is just there for you to use.&lt;/p&gt;




&lt;p&gt;There are quite a few Node.js frameworks built based upon this express framework or inspired by its concepts. I have listed down a few for reference.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kraken: Secure and scalable layer that extends Express by providing structure and convention.&lt;/li&gt;
&lt;li&gt;LoopBack: Highly-extensible, open-source Node.js framework for quickly creating dynamic end-to-end REST APIs.&lt;/li&gt;
&lt;li&gt;Sails: MVC framework for Node.js for building practical, production-ready apps.&lt;/li&gt;
&lt;li&gt;NestJs: A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications on top of TypeScript &amp;amp; JavaScript (ES6, ES7, ES8)&lt;/li&gt;
&lt;li&gt;ItemsAPI: Search backend for web and mobile applications built on Express and Elasticsearch.&lt;/li&gt;
&lt;li&gt;KeystoneJS: Website and API Application Framework / CMS with an auto-generated React.js Admin UI.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Let us create our first Hello World app using express.js in 5 simple steps as listed below!
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Step1: Install express
&lt;/h4&gt;

&lt;p&gt;Express framework can be installed using the Node Package Manager (NPM) with command as follows&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install express
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2: Import express module
&lt;/h4&gt;

&lt;p&gt;Create a file called server.js and import express module using the following syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require(‘express’)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 3: Create an object
&lt;/h4&gt;

&lt;p&gt;Create an object which will hold the value of the express module. In our case, the ‘app’ is the object holding instance of the express module.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let app = express();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 4: Create a callback function
&lt;/h4&gt;

&lt;p&gt;Create a GET callback function using the object we created in the above step. This function accepts two params ‘req’ i.e. request which the client browser can send and ‘res’ i.e. response which our server file will send back to the client.&lt;br&gt;
In our case, we will just send the string ‘Hello World’ back to the client browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.get(‘/‘,function (req, res){
res.send(“Hello World”);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 5: Listen to the client request
&lt;/h4&gt;

&lt;p&gt;Listen on port 3000 which means every time the client browser hits on this port number, then our server will return back string response.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.listen(3000, function(){
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hurray! We finished writing the code! Let us run our first client-server application.&lt;/p&gt;

&lt;p&gt;For that, first of all, we would need to run our server, which will listen to any request hitting on port 3000 from the browser.&lt;/p&gt;

&lt;p&gt;Go to command prompt/ terminal and type the following command&lt;br&gt;
npm node server.js&lt;/p&gt;

&lt;p&gt;Now, open the browser on your machine, and type &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Voila, you can see ‘Hello World’ on your browser.
&lt;/h3&gt;


&lt;h3&gt;
  
  
  Notable features of using Express.js
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Feature 1: Routing
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Routing&lt;/strong&gt;&lt;/em&gt; refers to how an application’s endpoints (URIs) respond to client requests.&lt;/p&gt;

&lt;p&gt;You can define routing using methods of the Express app object that correspond to HTTP methods like &lt;em&gt;app.get()&lt;/em&gt; to handle GET requests and &lt;em&gt;app.post&lt;/em&gt; to handle POST requests. You can also use &lt;em&gt;app.all()&lt;/em&gt; to handle all HTTP methods and &lt;em&gt;app.use()&lt;/em&gt; to specify middleware as the callback function.&lt;/p&gt;

&lt;p&gt;We will study more about middlewares in the below article.&lt;/p&gt;

&lt;p&gt;These routing methods specify a callback function (also referred to as &lt;em&gt;&lt;strong&gt;handler functions&lt;/strong&gt;&lt;/em&gt;) which is called when the application receives a request to the specified route (endpoint) and HTTP method.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In other words, the application listens for requests that match the specified route(s) and method(s), and when it detects a match, it calls the specified callback function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Routing methods can have more than one callback function as arguments. With multiple callback functions, it is important to provide next as an argument to the callback function and then call next() within the body of the function to hand off control to the next callback.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var express = require(‘express’)
var app = express()
// respond with “Learning Express” when a GET request is made to the homepage
app.get(‘/’, function (req, res) {
res.send(‘Learning Express’)
   // Logic
})
A route method is derived from one of the HTTP methods and is attached to an instance of the express class.
// GET method
app.get(‘/’, function (req, res) {
    res.send(‘You called GET request’)
})
// POST method
app.post(‘/’, function (req, res) {
   res.send(‘You called POST request’)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expressions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.get(‘/’, function (req, res) {
   res.send(‘this is default index page’)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now say, for example, you want to call the AboutUs page, following is the way&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.get(‘/aboutUs’, function (req, res) {
    res.send(‘About Us’)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Route parameters are named URL segments that are used to capture the values specified at their position in the URL. The captured values are populated in the req.params object, with the name of the route parameter specified in the path as their respective keys.&lt;br&gt;
Let us say, for example, if you want to perform some function when you have bookId and userId passed, you can define the endpoint URI as follows&lt;br&gt;
Request URL: &lt;a href="http://localhost:3000/users/34/books/8989" rel="noopener noreferrer"&gt;http://localhost:3000/users/34/books/8989&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.get(‘/users/:userId/books/:bookId’, function (req, res) {
   res.send(req.params)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Feature 2: Middlewares
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Middleware&lt;/strong&gt;&lt;/em&gt;, as the name implies, sits in the middle of a raw request sent from the client-side browser and the final intended routing logic designed by your server-side application. It basically lets you configure how your express application should work. Middleware functions have access to the request object (req), the response object (res), and the next function in the application’s request-response cycle. The next function is a function in the Express router which, when invoked, executes the middleware succeeding the current middleware.&lt;/p&gt;

&lt;p&gt;Middleware functions can perform the following tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Execute any code.&lt;/li&gt;
&lt;li&gt;Make changes to the request and the response objects.&lt;/li&gt;
&lt;li&gt;End the request-response cycle.&lt;/li&gt;
&lt;li&gt;Call the next middleware in the stack.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Some common tasks include checking for user login status, validating user authority, or preventing cross-site attacks that are best extracted as middleware.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the current middleware function does not end the request-response cycle, it must call next() to pass control to the next middleware function. Otherwise, the request will be left hanging.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is a simple example of a middleware function called &lt;strong&gt;logger&lt;/strong&gt;. This function just prints "Logging" when a request to the app passes through it. The middleware function is assigned to a variable named &lt;strong&gt;logger&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;To load the middleware function, call _app.use()&lt;/em&gt;, specifying the middleware function._&lt;/p&gt;

&lt;p&gt;For example, the following code loads the &lt;strong&gt;logger&lt;/strong&gt; middleware function before the route to the root path (/)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require(‘express’);
let app = express()
let logger = function (req, res, next) {
    console.log(‘Logging’)
    next()
}
app.use(logger)
app.get(‘/’, function (req, res) {
    res.send(‘My home page’)
})
app.listen(3000)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every time the app receives a request, it prints the message &lt;strong&gt;Logging&lt;/strong&gt; to the terminal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The order of middleware loading is important. Middleware functions that are loaded first are also executed first.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the &lt;strong&gt;logger&lt;/strong&gt; was loaded after the route to the root path, the request never reaches it and the app doesn’t print "Logging", because the route handler of the root path terminates the request-response cycle.&lt;/p&gt;

&lt;p&gt;The middleware function &lt;strong&gt;logger&lt;/strong&gt; simply prints a message, then passes on the request to the next middleware function in the stack by calling the next() function.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can use third-party middleware to add functionality to Express apps.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The following example illustrates installing and loading the third-party cookie-parsing middleware function called cookie-parser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var app = express();
app.use(cookieParser());
app.use(bodyParser());
app.use(logger());
app.use(authentication());
app.get(‘/’, function (req, res) {
     // …
});
app.listen(3000);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;An Express application is essentially Node.js with a host of middleware functions, whether you want to customize your own middleware or take advantage of the built-in middlewares of the framework, Express made the process natural and intuitive.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Feature 3: Templating
&lt;/h4&gt;

&lt;p&gt;A &lt;em&gt;&lt;strong&gt;template engine&lt;/strong&gt;&lt;/em&gt; enables you to use static template files in your application. At runtime, the template engine replaces variables in a template file with actual values and transforms the template into an HTML file sent to the client. &lt;/p&gt;

&lt;p&gt;This approach makes it easier to design an HTML page.&lt;br&gt;
Some popular template engines that work with Express are Pug, Mustache, and EJS. The Express application generator uses Jade as its default, but it also supports several others.&lt;/p&gt;

&lt;p&gt;After the view engine is set, you don’t have to specify the engine or load the template engine module in your app;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.set(‘view engine’, ‘pug’)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Template engines allow the developer to embed backend variables into HTML files, and when requested the template file will be rendered to plain HTML format with the variables interpolated with their actual values.&lt;/p&gt;

&lt;h4&gt;
  
  
  Feature 4: Error-handling
&lt;/h4&gt;

&lt;p&gt;Define &lt;em&gt;&lt;strong&gt;error-handling&lt;/strong&gt;&lt;/em&gt; middleware functions in the same way as other middleware functions, except error-handling functions, have four arguments instead of three: (err, req, res, next)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.use(function (err, req, res, next) {
     console.error(err.stack)
     res.status(500).send(‘Something broke!’)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can define error-handling middleware at last, after defining other &lt;em&gt;app.use()&lt;/em&gt; and routes call.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var bodyParser = require(‘body-parser’)
var methodOverride = require(‘method-override’)
app.use(bodyParser.urlencoded({
    extended: true
}))
app.use(bodyParser.json())
app.use(methodOverride())
app.use(function (err, req, res, next) {
    // logic
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Express.js simplifies development and makes it easier to write secure, modular, and fast applications. You can anytime do all that in plain old Node.js, but some bugs can (and will) surface, including security concerns (eg. not escaping a string properly), etc. Whenever we think about developing a scalable web application using NodeJS then express.js will be the recommended framework to be used.&lt;/p&gt;




&lt;h3&gt;
  
  
  Are there any cons of using Express.js?
&lt;/h3&gt;

&lt;p&gt;Express is a minimal, un-opinionated framework. It doesn’t apply any of the prevalent design patterns such as MVC, MVP, MVVM, or whatever is trending out of the box. For fans of simplicity, this is a big plus among all other frameworks because you can build your application with your own preference and no unnecessary learning curve. This is especially advantageous when creating a new personal project with no historical burden, but as the project or developing team grows, lack of standardization may lead to extra work for project/code management, and worst-case scenario it may lead to the inability to maintain.&lt;/p&gt;




&lt;h4&gt;
  
  
  Hope this article helps you understand some basics of how and why Express.js is useful.
&lt;/h4&gt;

</description>
      <category>node</category>
      <category>framework</category>
      <category>express</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Is it a Smart Move? Moving from a Developer to Tech BA</title>
      <dc:creator>mikitashah</dc:creator>
      <pubDate>Mon, 07 Sep 2020 11:16:09 +0000</pubDate>
      <link>https://dev.to/mikitashah/is-it-a-smart-move-moving-from-a-developer-to-tech-ba-1727</link>
      <guid>https://dev.to/mikitashah/is-it-a-smart-move-moving-from-a-developer-to-tech-ba-1727</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---yFn98sc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3yos3jntm4k35ghlo7ky.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---yFn98sc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3yos3jntm4k35ghlo7ky.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Are you wondering moving from developer to technical business analyst is a good career move? Or are you thinking about how this position will further help to increase your skill-set? Or do you feel becoming a Business Analyst will be a complete change in your career?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If these are the questions in your mind, then go on and read this article.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Its meant to answer how a career in Technical Business Analyst will benefit you not only in expanding your organization’s domain knowledge but also improve upon your soft skills.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Wondering how? Keep reading …&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Many IT professionals consider this move as a normal path for their career growth.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  First, some facts check
&lt;/h1&gt;

&lt;p&gt;Who/What/When/Why is BA?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tech BA refers to an individual who follows the process of identifying/analysing business processes, needs, and opportunities through participation in the SDLC process to achieve the organisation’s vision and goals.&lt;/li&gt;
&lt;li&gt;They are considered to bridge the gap between technology architects and business stakeholders using processes like requirement gathering, data analytics, etc and deliver data-driven recommendations on how can business be improved.&lt;/li&gt;
&lt;li&gt;Being a business analyst is similar to being an architect. Architect produces plans while BA produces a requirement list stating business needs based on the organisation’s vision and aligned with business processes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Let me share with you a list of activities that I perform being a tech BA.&lt;/em&gt;&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Depending on the organization, you are expected to perform a variety of activities at different stages mentioned above.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Following are the benefits which you will see in yourself after working as a BA for a few months
&lt;/h3&gt;

&lt;h1&gt;
  
  
  Benefit 1: Improved communication skill
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;The ability to communicate effectively with superiors, colleagues, and staff is essential, no matter what industry you work in.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;Our ability to communicate with others effectively makes an impact not only on our relationships but also on the results which we can achieve as an organization. A good communicator can encourage two-way dialogue, discuss critical issues, exchange information, build trust, and engage people in the mission of the business.&lt;/p&gt;

&lt;p&gt;Effective communication is the key to managing employees efficiently as well as to understand business needs. As you need to actively communicate with the business authorities, the IT Team, and various other stakeholders, this skill will automatically help to improve your oral as well as written communication.&lt;/p&gt;

&lt;p&gt;This skill in a way helps to improve our ability to really listen to and clearly understand the other person’s message. There are many barriers to effective listening. High performers are repeatedly rewarded for finding solutions, but moving into a “fix-it” mode before fully understanding the issue can lead to communication mishaps.&lt;/p&gt;

&lt;h1&gt;
  
  
  Benefit 2: Planning
&lt;/h1&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Planning is basically a roadmap that guides us on how to complete a task before attempting to begin it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As a BA, you need to explore improvement opportunities for the current state of the project or innovative ideas on how to develop a product and produce a clear project scope and estimation.&lt;/p&gt;

&lt;p&gt;Planning needs you to initiate to-and-fro communications between users, customers, stakeholders, and developers. Also planning the new features helps you to define the scope of the project which helps to set the correct expectations when it is delivered.&lt;/p&gt;

&lt;h1&gt;
  
  
  Benefit 3: Creative &amp;amp; Innovative
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WnS4HrRW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9xzr5k9wxcqeerrvpmjr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WnS4HrRW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9xzr5k9wxcqeerrvpmjr.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Creativity helps in generating ideas without boundaries. Creativity must be something that can add value and, that which is, not done before in the organization like a new business model, or developing new product, new customer service model, etc.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Creativity is the skill that helps the BA uncover options for minimizing the cost of production while innovation is the process through which the selected option for minimizing costs comes to action. The skill of creativity is applied at every point in the innovation process.&lt;/p&gt;

&lt;p&gt;Defining, analyzing, and documenting requirements is a highly creative and iterative process that is designed to show what the system will do, not how it will do. Thus as a BA, you need to make the best decision on what the system needs to perform in order to achieve the organization’s vision.&lt;/p&gt;

&lt;p&gt;Data and information are becoming the lifeblood for all IT projects. They are the key mechanism to turn an organization’s vision into reality.&lt;/p&gt;

&lt;h1&gt;
  
  
  Benefit 4: Change perspective, i.e. develop an attitude of turning challenges to opportunities
&lt;/h1&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Challenges come in many shapes, sizes, and dangers levels. Attitude often determines whether people and companies face these crises successfully or crumble under the pressure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Crises occur in good times and bad times. Treating these potential disasters as opportunities to enhance your career might make the difference between the future success and failure of your career.&lt;/p&gt;

&lt;p&gt;You understand business pain points and the impact of the proposed solution and make the correct decisions.&lt;/p&gt;

&lt;p&gt;Someone quoted “It is easier to succeed and achieve when you are challenged.”, which I feel is true. When real challenges or crises arise, you have the opportunity to step up, handle the situation, and resolve the problem more gracefully. Challenges are the source of new opportunities to establish your professionalism, decision-making quality, and ability to focus on a problem and solve it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Benefit 5: Analytical thinking and problem solving
&lt;/h1&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Problem-solving is all about using logic and imagination, to make sense of a situation and come up with an intelligent solution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Trying to solve a complex problem alone, however, can be a mistake. The old proverb: “A problem shared is a problem halved” is sound advice. Talking to others about problems is not only therapeutic but can help you see things from a different point of view, opening up more potential solutions.&lt;/p&gt;

&lt;p&gt;This skill helps to provide a simple but structured approach to problem-solving activity.&lt;/p&gt;

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

&lt;h1&gt;
  
  
  Benefit 6: Improvements in your behavior
&lt;/h1&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Any behavior attribute such as knowledge, skillset, teamwork, leadership skills, technical know-how, proactively communicate, being assertive, etc. which contributes to the development of an individual in the organization to take up bigger roles comes under the umbrella of behavior skill.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It can be applied to individuals at all levels, which simply means that it is not restricted to just top, middle, or lower level.&lt;/p&gt;

&lt;p&gt;Behavioral skills often fall under the general heading of good character, friendliness, maturity, or common sense, and many people assume that those skills come naturally. But that’s not true. Every skill needs a little discipline and training in the correct direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hope this article helps you to look at how my journey to move from developer to business analyst helped me improve my skills which not only helped me at the organizational level but also helped me grow as an individual.
&lt;/h2&gt;

</description>
      <category>career</category>
      <category>developer</category>
      <category>businessanalyst</category>
      <category>analyst</category>
    </item>
    <item>
      <title>Still, confused? ‘var’ or ‘let’ in Javascript
</title>
      <dc:creator>mikitashah</dc:creator>
      <pubDate>Sun, 30 Aug 2020 12:03:36 +0000</pubDate>
      <link>https://dev.to/mikitashah/still-confused-var-or-let-in-javascript-51hb</link>
      <guid>https://dev.to/mikitashah/still-confused-var-or-let-in-javascript-51hb</guid>
      <description>&lt;p&gt;Are you still thinking about whether to use var or let in javascript? Let me show you a comparison chart of why let makes more sense and how you could avoid potential issues by making use of let.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;I developed android applications before switching to web development using Nodejs Javascript. In android, we declared variables using primitive data types like int, float, char, etc. but javascript is very different, it just uses ‘var’ declaration. So cool, right?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But as Javascript evolved, there were some potential issues popping up which needed some modifications in the current way of development. Following comparison helps you to save your valuable time in developing some more cool features instead of fixing and resolving issues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparison 1: Origin and Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Var:&lt;/strong&gt; It is there since Javascript is originated. Mainly used for declaration i.e. initialization and assignment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let:&lt;/strong&gt; ES2015 or (ES6) introduced two new ways to declare variables i.e. using let and const.&lt;/p&gt;

&lt;p&gt;Let is used for variable declaration i.e. initialization and assignment.&lt;/p&gt;

&lt;p&gt;Const is used for variable declaration too but its value once assigned cannot be changed (it is immutable) e.g. mathematical pi. If you attempt to change the value of const then it will throw an error&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Comparison 2: Variable Scope&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Var:&lt;/strong&gt; It is function- scoped. Let’s understand what does it mean to be function scoped by the below example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(x);
var x= 'Hello World';
console.log(x);

Output

undefined
Hello World

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If variables are declared inside a function, they will not be available to the parent function, but vice-versa is true. That means all parent declared variables are accessible by the child function. As you see above, there was no error while executing the first line i.e. console.log(x), as the compiler understood variable x is defined in the code. But since its value is initialized at a later stage, it will display undefined at first.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This can be a potential source for a lot of bugs&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Let:&lt;/strong&gt; It is a block-scoped. Let’s understand what does it mean to be block scoped by the same example but replacing &lt;em&gt;var&lt;/em&gt; with &lt;em&gt;let&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(x);
let x= 'Hello World';
console.log(x);

Output 
ReferenceError: x is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Why does this happen? let does not hoist variable declaration. New term hoisting, I will explain in detail below. But in short, it means its existence starts only when it is declared not before it and also lives within this block. So if you try to use this variable in any other function without declaring it will throw an error.&lt;/p&gt;

&lt;p&gt;This behavior is also referred to as &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This means using let you can write less error-prone codes. You can declare variables inside blocks (if statements, for loops, functions, and so on) without worrying about overwriting some previously declared variable.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;strong&gt;Comparison 3: Redeclaring&lt;/strong&gt;&lt;br&gt;
Let us understand with help of below code&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Var:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a;
var a; // Works fine. It overrides previous declaration

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Let:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let a;
let a; // SyntaxError: Identifier 'a' has already been declared

--------------------

const PI_VALUE = 3.14;
PI_VALUE = 7.89; // TypeError: Assignment to constant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;Comparison 4: Variable Hoisting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let us understand with the help of our previous code&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Var:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(a);
var a = 'Hello World';

Output 
undefined

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

&lt;/div&gt;



&lt;p&gt;Why??? We should have expected output to be ‘Hello World’, right? Let me break it down a bit. Let’s see how the compiler will read this code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var a;
console.log(a);
a = 'Hello World';

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

&lt;/div&gt;



&lt;p&gt;As you see above, the compiler internally moved all variable declaration on top, and leave the value to be assigned at the step where we want it. Hence, we don’t see any error but also no value. Variables are initialized with default value as undefined when they are created. So if you try to print a var after initialization, its value will be undefined.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;During compile-time, JavaScript only stores function and variable declarations in the memory, not their actual value.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Let:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(a);
let a = 'Hello World';


Output 
ReferenceError: a is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All declarations (function, var, let, const, and class) are hoisted in JavaScript, while the var declarations are initialized with undefined, but let and const declarations remain uninitialized.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;let variables will only get initialized during runtime by the JavaScript engine.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;&lt;strong&gt;Comparison 5: Closures&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let us understand this with the help of below code&lt;/p&gt;

&lt;p&gt;**Var:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (var i = 0; i &amp;lt; 3; i++) {
     setTimeout(() =&amp;gt; console.log(i), 0);
}

Output
3
3
3

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

&lt;/div&gt;



&lt;p&gt;Is this what you expected? No right? This is because of hoisting. It executed the for loop and passes the last value of i to the inner function&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for (let i = 0; i &amp;lt; 3; i++) {
      setTimeout(() =&amp;gt; console.log(i), 0);
}

Output
0
1
2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, in this case on each iteration, it will get a new variable instance.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Comparison 6: Miscellaneous&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Var:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No error is thrown if you declare the same variable twice using var. The values will be overridden with the latest assignment. (though “strict mode” in es5 takes care of that too).&lt;/li&gt;
&lt;li&gt;Only reason var still exists is because of backward-compatibility. Since there are many browsers still not supporting ES2015.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Let:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;let and const will throw an error if a variable is declared twice&lt;/li&gt;
&lt;li&gt;Most Javascript experts agree var shouldn’t be used.&lt;/li&gt;
&lt;li&gt;Linters are now pointing out the usage of var as bad coding practice. ESlint can be configured with a “no-var” rule that throws an error if there is any var being used.&lt;/li&gt;
&lt;li&gt;let is preferable to var because it reduces the scope in which an identifier is visible. It allows us to safely declare variables at the site of first use.&lt;/li&gt;
&lt;li&gt;Not all browsers support ES6 specification, we might need to use the tool: Babel which will help transpile code from ES6 to ES5.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Do you still find yourself using var? What’s stopping you from switching over to using let? Share your experiences below in the comment section
&lt;/h3&gt;

</description>
      <category>variables</category>
      <category>javascript</category>
      <category>es6</category>
      <category>declarations</category>
    </item>
  </channel>
</rss>
