<?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: PC</title>
    <description>The latest articles on DEV Community by PC (@princenwaonicha).</description>
    <link>https://dev.to/princenwaonicha</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%2F861450%2Fb1a827b5-a6f2-4f23-b8ae-7f1658ab7117.jpeg</url>
      <title>DEV Community: PC</title>
      <link>https://dev.to/princenwaonicha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/princenwaonicha"/>
    <language>en</language>
    <item>
      <title>A Simple Introduction to Arrays In JavaScript</title>
      <dc:creator>PC</dc:creator>
      <pubDate>Mon, 08 Aug 2022 14:34:00 +0000</pubDate>
      <link>https://dev.to/princenwaonicha/a-simple-introduction-to-arrays-in-javascript-46no</link>
      <guid>https://dev.to/princenwaonicha/a-simple-introduction-to-arrays-in-javascript-46no</guid>
      <description>&lt;p&gt;Arrays are one of the most used Data Structures in JavaScript and pretty much any language. Today I'll be talking about what they are, what they do, and when to use them.&lt;/p&gt;

&lt;p&gt;So lets get to it!&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Arrays?
&lt;/h2&gt;

&lt;p&gt;To start off I'll be talking about Arrays. This is a Data Structure, most programmers are familiar with, that organizes data sequentially like shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;basket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&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="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 0 index&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="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 1st index&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="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 2nd index&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="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 3rd index&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="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// 4th index&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="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;// 5th index&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pretty simple right? Arrays are really nice because they are a small and simple data structure that are contiguous in memory, meaning that each value is stored right next to each other, so you don't have to allocate a lot of space to store data. Also in JavaScript arrays are resizable and are dynamic in nature. In contrast to static arrays in other languages which have a predefined size, so you cannot add more values to them. Instead for static arrays you need to move the array over to a different location in memory in order to increase the size essentially creating a whole new array.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methods for Arrays
&lt;/h2&gt;

&lt;p&gt;When using arrays these are some common methods that have varying time complexities:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yEtxZeCC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tl6bmzu4ywm6hy2qq99v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yEtxZeCC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tl6bmzu4ywm6hy2qq99v.png" alt="Time Complexities" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Access the i-th Element O(1)&lt;/strong&gt; - Constant Time: Since we are essentially accessing the the key: which is the index and the value which is the data stored in that index.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search O(n)&lt;/strong&gt; - Linear Time: Since we have to use the index to access the value we wont be able to just instantaneously access a value and instead we will have to loop through n items of the array to get a certain value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Override the Element at i-th index O(1)&lt;/strong&gt; - Constant Time: Similar to accessing the i-th Element all it takes is using the key: index to change the value at a certain index.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traverse All Elements O(n)&lt;/strong&gt; - Linear Time: Looping through each element is similar to searching so we will be going through however many n items are in the array.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insertion O(n)&lt;/strong&gt;* - Linear Time: Order matters in an array so if you insert an element in any index that isn't the last index you will have to shift the indexes after and increase their index number by 1. The act of shifting the indexes increases the time complexity to O(n) items needing to be shifted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deletion O(n)&lt;/strong&gt;* - Linear Time: Similar to above except you will have to shift the indexes after by decreasing their number by 1.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;*&lt;strong&gt;Note&lt;/strong&gt; - You do not have to shift the indexes if you are inserting to the end of the array or deleting the last index.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As we can see there are different types of time complexities for the different types of methods for arrays. But as we notice with the last two, Insertion and Deletion, they differ for the last index of the array. In JavaScript this is also evident from the fact that they have two very special names for their methods:&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;basket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;basket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As the name implies pop() will delete a index from the end of the array reducing the size. While push() will add to the end of the array increasing the size. Both of which are constant time.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use JavaScript Arrays?
&lt;/h2&gt;

&lt;p&gt;So Imagine you have a deck of cards:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--42UVi2pH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8m3pqybinivsb0tth1jg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--42UVi2pH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8m3pqybinivsb0tth1jg.png" alt="Deck of Cards" width="880" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A good time to use an array could be if you are creating a card game where you are only getting cards from the end of the deck. This will allow you to utilize the O(1) time complexity of pop() and push() to get cards from the top of the deck. Also In a deck of cards the order in which you put the cards matters so it will also be represented by the indices of the array.&lt;/p&gt;

&lt;h2&gt;
  
  
  In Conclusion
&lt;/h2&gt;

&lt;p&gt;JavaScript Arrays allow us to store memory that is contiguous, of different data types and ordered. Although it does have some tradeoffs when it comes to insertion and deletion because of shifting the indexes. It has fast lookup and changing of an index. It can also be the for the building block to more complex data structures that we will talk about in the future.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>datastructures</category>
    </item>
    <item>
      <title>Learning How To Learn Is One of The Most Valuable Skills and 3 Ways to Learn More Effectively.</title>
      <dc:creator>PC</dc:creator>
      <pubDate>Thu, 04 Aug 2022 04:45:28 +0000</pubDate>
      <link>https://dev.to/princenwaonicha/learning-how-to-learn-is-one-of-the-most-valuable-skills-and-3-ways-to-learn-more-effectively-39mo</link>
      <guid>https://dev.to/princenwaonicha/learning-how-to-learn-is-one-of-the-most-valuable-skills-and-3-ways-to-learn-more-effectively-39mo</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“I am still learning.”&lt;br&gt;
— Michelangelo at age 87&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Learning is something we do throughout our lives, from our adolescent years to staying competitive in the job market as an adult. There are things nobody teaches us like learning how to walk and there are things we are generally taught, like learning to count. Throughout our lives we are constantly learning new things. But when do we focus solely on learning how to learn? In this blog I'll be discussing why learning how to learn efficiently and quickly is one of the most valuable skills you can have and 3 strategy's you can use to learn more effective and efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning How to Learn Efficiently is Important
&lt;/h2&gt;

&lt;p&gt;Learning to how to learn effectively will increase the rate at which you can adapt to the ever changing environment that is the tech industry. Although we all have different learning styles and generally have our own learning preferences. According to Learning Specialist &lt;a href="https://barbarahong.com/"&gt;Dr. Barbara Hong&lt;/a&gt;,  “We’re more similar in learning than we are different in styles.” Furthermore In tech unlike most industries things are constantly changing and there are times we need to catch up and times when it's not necessary. Learning what you need to learn is just as important as learning how to learn when learning efficiently. Like I explained in my last post. With the Pareto Principle, the law of the vital few, A small percent of the effort, lets say around 20%, yields a majority,around 80%, of the results. So when it comes to focusing on the important parts how do we approach learning? Well, I'll share with you 3 methods that work for me when it comes to learning more efficiently:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Compound learning
&lt;/h2&gt;

&lt;p&gt;When it comes to learning your brain is like a muscle. When you use your brain to learn it gets stronger (Wow who knew?), but just like a muscle it also needs time to rest to come back even stronger. Learning a lot at once can lead to burn out however if you see this graph:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mY6ed94y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqifg0544dnmgpk9o5gt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mY6ed94y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mqifg0544dnmgpk9o5gt.jpg" alt="Compound Learning" width="880" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see that learning a little bit at a time can compound and increase your learning interest over time. This is akin to working out to get fit. Since when you work out you have to do it consistently overtime to build your muscles. Likewise learning a little bit each day will lead to more overall growth in the long term and prevent burnout. &lt;/p&gt;

&lt;h2&gt;
  
  
  2. Feynman Technique
&lt;/h2&gt;

&lt;p&gt;This is one of my favorite ways to learn because it really challenges you to break down a topic to it's most fundamental level and forces you to truly understand it. Essentially the Feynman Technique is a method of learning where you explain a topic to someone else. It can be shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hAjVExC1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbpg6iadgrwgri88wrvw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hAjVExC1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fbpg6iadgrwgri88wrvw.png" alt="Feynman technique" width="880" height="643"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see above it can be described in 4 steps:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;1. Study a topic&lt;/strong&gt; - Learn about it initially.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Teach it to someone&lt;/strong&gt; - Comprehend even the most basic steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Fill in any gaps&lt;/strong&gt; - Understand the things you are missing to fully teach it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Return to literature&lt;/strong&gt; - Learn the things you need to fully understand it and to communicate it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not only do you learn something more efficiently but you also teach it to someone else who can do the same thing! Which is why I like to call this the "Each One Teach One" Method.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pomodoro Technique
&lt;/h2&gt;

&lt;p&gt;Named after the infamous Tomato, (actually), this technique is vastly popular and effective because it takes advantage of your diffused and focused modes of thinking.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S2ABWv0N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yod5ni3y824378can58y.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S2ABWv0N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yod5ni3y824378can58y.jpeg" alt="Pomodoro Technique" width="880" height="738"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you are deliberately learning for 25 minutes, you are in your focused mode of thinking where you are working your brain. When you take your 5 minute break you allow your brain to enter it's diffused mode, which lets your brain rest and take a breather. This in turn allows it to build connections between the neurons in the brain. This is a direct comparison to working out and taking a rest between sets. This technique not only is effective but it allows you to study for more prolonged periods of time cumulatively. As opposed to if you were to do it all at once and lose focus during the later half of the session.&lt;/p&gt;

&lt;p&gt;In conclusion, Learning to learn effectively is not only an effective skill to have for your job in tech. But also for whatever challenges you may have to face in life. This article only scratches the surface of the methods and techniques we have at our disposal to learn effectively. These are just a few of the methods that work for me but I implore you to do your research to learn methods to learn effectively that may suit you better. I'll leave you with this quote by your neighborhood poet Dr. Seuss:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The more that you read, the more things you will know. The more that you learn, the more places you'll go.”&lt;br&gt;
― Dr. Seuss&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>The Big O</title>
      <dc:creator>PC</dc:creator>
      <pubDate>Sun, 31 Jul 2022 23:03:05 +0000</pubDate>
      <link>https://dev.to/princenwaonicha/the-big-o-4b6p</link>
      <guid>https://dev.to/princenwaonicha/the-big-o-4b6p</guid>
      <description>&lt;p&gt;So to kick off this series of technical blogs I'm going to start with what I'm currently learning right now, which is Data Structures and Algorithms! To start off I'm going to talk about the basics of what you need to know before you get into DSA which is Big O so lets get to it!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Big O...
&lt;/h2&gt;

&lt;p&gt;No I am not talking about the 1990's anime that's a cross between Batman and Gundam, It kinda is, but rather Big O Asymptotic Analysis Notation. It sounds really complicated and to some degree it can get complicated. However all Big O is, is a way to measure how well your code solves a problem. This is important because any engineer can code something to solve a problem but what matters most is how well the problem is solved.&lt;/p&gt;

&lt;p&gt;To understand Big O we first need to understand what good code is and why. There are 2 Important aspects of good code.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Readability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scalability&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When it comes to Big O we mainly want to focus on the latter aspect while considering the first when the situation arises. Just like when you are baking a cake and using a recipe. Writing code to program a computer is the same way. There are right instructions, wrong instructions and some recipes are better than others. When things get bigger and bigger having instructions be as efficient as possible can save time and a company millions. Just like how you wouldn't want to preheat the oven after mixing in all the ingredients to bake a cake. But instead you would want to do it before you start mixing so that when your done mixing hopefully your oven is preheated and ready to go. Take this for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;everyone&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dory&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nemo&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gill&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;squirt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;darla&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hank&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;clifford&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;findClifford&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;t0&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;now&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&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;array&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;clifford&lt;/span&gt;&lt;span class="dl"&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;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;Found The Big Red Dog!&lt;/span&gt;&lt;span class="dl"&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;t1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;now&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;t1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;t0&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 is a simple program that prints out 'Found The Big Red Dog!' when we find him in the array. However the performance of this function, or algorithm, is determined differently by each computers CPU and they have different varying factors such as other programs running that may slow down the program. How do we solve this?&lt;/p&gt;

&lt;p&gt;The Big O solves this issue by being the universal language we use as engineers to determine how long an algorithm takes to run. It tells us about how, as we grow bigger and bigger with our input, long  an algorithm takes to run. This is irrespective of computer differences and can be described in the following graph:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UFFwARH3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2193jm6ohjxu2cjnyzqj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UFFwARH3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2193jm6ohjxu2cjnyzqj.png" alt="Big O Time Complexity Chart" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;O(1) Constant Time - This means that as the number of inputs increases the operations stays the same.&lt;/p&gt;

&lt;p&gt;O(n) Linear Time - As inputs increase operations increases at the same rate. (for loops, while loops through n items)&lt;/p&gt;

&lt;p&gt;O(n^2) Quadratic Time - every element in a collection of data needs to be compared to every other element. Two nested loops&lt;/p&gt;

&lt;p&gt;O(n!) Factorial Time - As inputs increase operations increases by n factorial (you are adding a loop for every element)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Ideally we want our programs to be as close to O(1) constant time and as algorithmically efficient as possible. Although it might not always be possible we can get algorithms to tend towards that by varying methods. We will discuss these methods in the future including the Big O complexities that I haven't mentioned. To measure Big O we have 4 rules that help in simplifying it for general purposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Worst case.
&lt;/h2&gt;

&lt;p&gt;We only care about the worst case scenario. E.g.,&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;const everyone = ['dory', 'bruce', 'marlin', 'nemo','gill','bloat','nigel','squirt','darla','hank','nemo']
function findNemo(array) {
  let t0 = performance.now();
  for (let i = 0; i &amp;lt; array.length; i++){
    if (array[i] === 'nemo') {
      console.log('Found Nemo!');
    }
  }
  let t1 = performance.now()
  console.log(t1 - t0)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Even though in the array everyone, nemo is in the &lt;em&gt;4th&lt;/em&gt; index. We assume that in the worst case it is in the last index.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Remove Constants
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;printFirstItemThenFirstHalfThenSayHi100Times&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&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;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;middle&lt;/span&gt; &lt;span class="nx"&gt;Index&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;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;middleIndex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// O(n/2)&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;items&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
    &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// O(100)&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;hi&lt;/span&gt;&lt;span class="dl"&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;Even though the above is O(n/2 + 100). We don't care about the constants so it becomes O(n) because as it scales and approaches "Infinity". We don't care how steep the line is  just how the line is moving.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Different inputs should have different variables
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;compressBoxesTwice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;boxes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;boxes2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;boxes&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;boxes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// O(n)&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;boxes&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="nx"&gt;boxes2&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;boxes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// O(n)&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;boxes&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 rule states that since there are two different items the Big O is not O(n + n) but rather O(a + b) because the two inputs could be of varying sizes. &lt;/p&gt;

&lt;h2&gt;
  
  
  4. Drop Non Dominants
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;printAllNumbersThenAllPairSums&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&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;these are the numbers:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;numbers&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;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// O(n)&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;number&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;and these are their sums:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;numbers&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;firstNumber&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// O(n)&lt;/span&gt;
    &lt;span class="nx"&gt;numbers&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;secondNumber&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="c1"&gt;// O(n)&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;firstNumber&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;secondNumber&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="nx"&gt;printAllNumbersThenAllPairSums&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example above is O(n + n^2) since loops right next to each other are added and loops nested in each other are multiplied. However rule number 4 states that we only want to keep the most dominant term. So we can actually simplify this example's Big O to be O(n^2) because as n scales the linear operations will become insignificant compared to the quadratic operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does it all mean?
&lt;/h2&gt;

&lt;p&gt;We usually only think in the here and now when it comes to coding and we are usually only handling small amounts of data. But what happens when we get millions and millions of users on our site? If our code isn't scalable our code will break. This is why big O is so important because it allows us to think about how our code scales as inputs and operations increase on a larger scale. The 3 pillars of programming are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Readability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Memory (Space Complexity)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Speed (Time Complexity)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Like what makes a good programmer, scalability can be broken into two aspects such as memory and speed. So far we've only discussed Time Complexity, speed, but another important aspect is Space Complexity, memory, which is how much space an algorithm or data structure takes up. This is just as important because computers have a limited amount of memory. The things that cause Space Complexity are these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Variables&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Allocations &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Structures&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Function calls&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Although we want less time and less memory there is a tradeoff between having less speed or less memory, one usually increases the other.&lt;/p&gt;

&lt;p&gt;And that's a wrap FOLKS! That's pretty much all I have to talk about for now when it comes to Big O. If there is anything that I hope you take away from this article, its that Big O is the language Software Engineers use to determine what's good code and bad code. Last but not least, If you remember to write scalable code maybe one day you too can program something as big as...&lt;/p&gt;

&lt;h2&gt;
  
  
  The Big O.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IdjLdObv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.gifer.com/G0pu.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IdjLdObv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://i.gifer.com/G0pu.gif" alt="The Big O" width="500" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>beginners</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>"A journey of a thousand miles begins with a single step" - Lao Tzu</title>
      <dc:creator>PC</dc:creator>
      <pubDate>Sun, 31 Jul 2022 15:16:37 +0000</pubDate>
      <link>https://dev.to/princenwaonicha/a-journey-of-a-thousand-miles-begins-with-a-single-step-lao-tzu-3bla</link>
      <guid>https://dev.to/princenwaonicha/a-journey-of-a-thousand-miles-begins-with-a-single-step-lao-tzu-3bla</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"A Journey of a thousand miles begins with a single step."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;These are the words that echo through my mind every time I get stuck on a difficult problem or find myself in a rut. Just one push up, one lesson, one paragraph, just one step. Whether it's mastering a skill or completing your first blog post. The road to success begins with taking that first step.&lt;/p&gt;

&lt;p&gt;So now you've taken that first step now what? Congratulations, but being consistent and holding yourself accountable to doing the work even when you don't feel like it, is what separates the average from the extraordinary. As my first blog I'll be discussing 3 way's to increase your odds of ending up in the latter category in anything that you do.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Motivation can falter with feelings, but Discipline doesn't care how you feel."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When achieving goals one thing you have to realize is that your motivation will only take you so far. For example check out this graph which is describing the Dunning Kruger effect:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XbsTSOIA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5s8cjeigsef83qum5f4d.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XbsTSOIA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5s8cjeigsef83qum5f4d.jpg" alt="Dunning Kruger Effect" width="593" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see when starting to learn a difficult skill you have a period during the beginning, where things are going great and you are excited to learn every chance you get. However as you get more and more skilled you start to realize how large the gap is going from a beginner to a expert. This is actually a popular feeling that many people experience , &lt;em&gt;in software engineering especially&lt;/em&gt;, called Imposter Syndrome. This feeling occurs in the valley of despair, when you feel like you don't know enough or aren't good enough in a particular subject. A good way to overcome this is by having the discipline to doing the work when you don't feel like it. This is a key difference compared to motivation because motivation can wax and wane but discipline is consistent. Which is what you will need to achieve your goals.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"When you fail to plan, plan to fail."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In your journey to reaching success and mastery in whatever your subject of interest is one thing you have to pay attention to is planning. Without a smart plan your goals wont really be achievable because practically nobody stumbles upon success. A good system to creating a smart plan and roadmap to success is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rs7WV3b2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k89sfkdfvrq1ka4nmbkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rs7WV3b2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k89sfkdfvrq1ka4nmbkh.png" alt="SMART Goals" width="880" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;S.M.A.R.T Goal system helps increase your rate of achieving your goals by:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Specific:&lt;/strong&gt; Being as specific as possible to help you know what you are going to do and how you are going to do it. This also helps alleviate the time and energy it takes to come up with what to do at that specific moment so you can spend your energy on doing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measurable:&lt;/strong&gt; Having measurable goals helps you keep track of your progress so you can adjust your roadmap if anything changes in the future. It also is a nice indicator of showing how much progress you have made. So that when you look back it could help increase motivation which will make it easier for you to get through the valley of despair.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attainable:&lt;/strong&gt; Having an attainable and realistic goal is helpful. Although It's good to dream big, having goals that you know you can achieve will help instill confidence to achieve even bigger goals and dreams. A good way to determine if a goal is achievable is by looking for proof of concept. As in finding other people who have done the same thing or something similar.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relevant:&lt;/strong&gt; Does this goal make sense for your current circumstances? If your jobless and live in your moms basement. Now is probably not the best time to be creating a goal to run a marathon. Meaning make sure your goals are align with your larger goals in life and are helping you to achieve them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Time-bound:&lt;/strong&gt; Keep a timeline for when you want to achieve your goal by. So that you actually have a way to determine whether you succeed or fail. This will act as a sense of accountability which will in turn help you stay focused on meeting your deadline.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Through this 5 step system to goal setting you can increase your chances drastically for success in any subject.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Efficiency trumps grit."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When trying to become a master at a subject or achieve a goal, efficiency will always trump grit. For example someone who study's for 1 hour studying the top 20% of things to know will always be better at something than if they would have spent 4 hours with the other 80% even though the second person studied longer. This can be seen best with the famous 80/20 rule also known as the Pareto principle:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8WxwjZm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dicbccf3z7aa25zist2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8WxwjZm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dicbccf3z7aa25zist2x.png" alt="Pareto Principle" width="408" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;20% of the effort gives 80% of the results meaning that the time it takes to achieve a goal can be greatly reduced if you focus on the important 20% initially to give you the vast majority of results. This is a critical aspect to achieving goals because time is our most important resource that we tend to take for granted.&lt;/p&gt;

&lt;p&gt;All in all, there are many ways to staying consistent in our journey through life and these are just a some of the ways that have worked for me. There is still a ton more I wish to share with you as the reader and I just want to say thanks for reading my first blog post. Stay tuned for next week Monday for more blog posts like these that deal with life skills. Meanwhile this Friday and following Fridays I will post blogs that will be more technical in nature. I will now leave you with my version of Lao Tzu's quote from the beginning.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"A journey of a thousand miles begins with a single step in the right direction" - Prince Nwaonicha&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>beginners</category>
      <category>productivity</category>
      <category>career</category>
    </item>
  </channel>
</rss>
