<?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: Curtis Laurence Chadwell</title>
    <description>The latest articles on DEV Community by Curtis Laurence Chadwell (@curchadw).</description>
    <link>https://dev.to/curchadw</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%2F570547%2F24c7e7e6-c155-4c58-8b00-c7e1f3869862.jpeg</url>
      <title>DEV Community: Curtis Laurence Chadwell</title>
      <link>https://dev.to/curchadw</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/curchadw"/>
    <language>en</language>
    <item>
      <title>David Vs. Goliath(Node.js/Express.js vs Ruby on Rails)</title>
      <dc:creator>Curtis Laurence Chadwell</dc:creator>
      <pubDate>Tue, 25 May 2021 03:27:08 +0000</pubDate>
      <link>https://dev.to/curchadw/daniel-vs-goliath-node-js-express-js-vs-ruby-on-rails-4o57</link>
      <guid>https://dev.to/curchadw/daniel-vs-goliath-node-js-express-js-vs-ruby-on-rails-4o57</guid>
      <description>&lt;p&gt;This particular post is more of an opinion piece just an fyi, and didn't feel like coding tonight. Over the weekend I had the chance to finally work with Node.js and Express.js...because I found it necessary for me to gain exposure ,and to be able have my own opinion of the two. As a developer its good to have these perspective to know how to integrate these backend frameworks with your frontend frameworks like React, and Vuejs. &lt;/p&gt;

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

&lt;p&gt;What do Node.js/Express.js and Rails have in common? They are both Model, View, Controller(MVC) frameworks that make it easy to develop a organized backend for a full-scale web application. I will not go into breaking down the two in depth, otherwise you all would be reading a dissertation. Express.js uses JavaScript ,and Rails uses Ruby(Wooohooo). You can integrate any database you want with these(..but never use SQLite for a production application).&lt;/p&gt;

&lt;p&gt;Now what is the difference between the two? &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Rails&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Rails is a very heavy framework given the amount of files it produces, but is a lot of fun to work with in my opinion when you are learning the MVC concept. Though slow at times, it comes with a lot for you to work with without needing to customize your eco-system too much. This is part of the reason you'll see a lot of startups using Ruby on Rails. Plus if Ruby is your first language outside of JavaScript, its probably very easy to understand syntax-wise with it being a high-level language(Very human readable). But the main thing to take away for this is Rails is fun ,but heavy&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Node.js/Express.js&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
Express.js on the other hand is the the skinny boy out of the two frameworks, but you can build out the heck of this framework for what you need your project to be. Minimal amount of files....but robust by design. Its very fast to start up, but you will need to be more creative, because you can end up writing more lines of code versus how much you would with Rails, hence why Express.js is way more flexible in how you want to customize it. You'll see bigger companies using Express.Js/Node.Js, because they need something designed for literally everything which is fine. &lt;/p&gt;

&lt;p&gt;I will not provide an opinion on what type of project you should use these for because they can both be used as a reliable backend framework and it comes down to preference. Whenever you are exploring the two for a upcoming big project, just just keep the brief points I mentioned in mind.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>node</category>
      <category>ruby</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to efficiently sort a large array</title>
      <dc:creator>Curtis Laurence Chadwell</dc:creator>
      <pubDate>Tue, 18 May 2021 03:12:06 +0000</pubDate>
      <link>https://dev.to/curchadw/how-to-efficiently-sort-a-large-array-5927</link>
      <guid>https://dev.to/curchadw/how-to-efficiently-sort-a-large-array-5927</guid>
      <description>&lt;p&gt;A buddy of mine from up in Canada is in the same full-stack group as me. He happened to be out for a little while, and needed to get caught up on the course work. I had a very fun time explaining merge sorts over the phone, and surprisingly...we did not need to get on for a zoom call. I guess the more you understand something, the easier it is to explain it. Just a fair warning....this is not exactly my own original code but thought this would be a good example to explain, and this was something we came up with in my group together.&lt;/p&gt;

&lt;p&gt;Firstly, what is a merge sort algorithm used for? Its used to simply sort a very large array. You could use a simple linear sort but you are talking about possibly longer processing time if you are trying to cover a very large array. In comes the merge sort algorithm meteor. &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%2Fuploads%2Farticles%2F5u3ntv7rminyx7gbm2ky.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%2Fuploads%2Farticles%2F5u3ntv7rminyx7gbm2ky.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the sake of just showing how this works, I am just going to use a small array...no need to get crazy. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const someArray = [10,5,19,18,6,11,13]


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

&lt;/div&gt;

&lt;p&gt;There are actually two parts to this, there is a function that will mergeSort function, and there is a merge function&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

const mergeSort = (array)=&amp;gt;{}

const merge =(left,right)=&amp;gt;{}


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

&lt;/div&gt;

&lt;p&gt;I will start building up the mergeSort function then move to the merge function. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

function mergeSort(array) {
//#1  
const half = array.length / 2 

  //#2
  if(array.length &amp;lt; 2){ 
    return array 
  }

  //#3
  const left = array.splice(0, half) 
  //#4
  return merge(mergeSort(left),mergeSort(array))
  //
}



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

&lt;/div&gt;

&lt;p&gt;So since there are no line numbers, I thought it was best I left some number labels in the code above to help you follow along&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1) The array passed in will get chopped in half into two sub arrays&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2) If the array is less than the length of 2, the array just gets returned ending it right here&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3) the left array will start from 1st index up to where the half variable starts&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;4) the split array is now passed into the returned merge function as the left and right parameters&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now what is going on in the mysterious merge function?&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

 //#1
 let arr = []

 //#2   
while (left.length &amp;amp;&amp;amp; right.length) {
        // Pick the smaller among the smallest element of left and 
//#3
right sub arrays 
        if (left[0] &amp;lt; right[0]) {
            arr.push(left.shift())  
        } else {
            arr.push(right.shift()) 
        }
    }

  //#4

    return [ ...arr, ...left, ...right ]


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

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1) an empty array is setup&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2) Both the left and right array have to have elements in them at the same time for this loop to work&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3) The first element values in both arrays are being compared to see which is the smallest. The smallest will get pushed in the empty array we sat up in the beginning of the function. One thing you will need to keep in mind the first index values are getting updated in each array as they are leaving the sub arrays, hence why we are always comparing the first index&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;4) So..there was one thing I didn't mention..In some cases there will be an array that has odd number of indexes. When split the array in the mergeSort function typically that left over index goes in you first sub array. At label #4 the while loop is over because only one sub array has a value and is just concatenated to the back of the array that all the other values were getting pushed into earlier&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When all of this processes, our array in the beginning results to this output: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

5,6,10,11,13,18,19


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

&lt;/div&gt;

&lt;p&gt;I hope this was enlightening as I found. Any feedback is appreciated if you find anything wrong with this. Have a great evening folks!&lt;/p&gt;

&lt;p&gt;Here is the full code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

function merge(left, right) {
    let arr = []

    while (left.length &amp;amp;&amp;amp; right.length) {
        right sub arrays 
        if (left[0] &amp;lt; right[0]) {
            arr.push(left.shift())  
        } else {
            arr.push(right.shift()) 
        }
    }


    return [ ...arr, ...left, ...right ]
}
function mergeSort(array) {
  const half = array.length / 2


  if(array.length &amp;lt; 2){
    return array 
  }

  const left = array.splice(0, half)
  return merge(mergeSort(left),mergeSort(array))
}


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

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Breaking Down a Binary Search Tree</title>
      <dc:creator>Curtis Laurence Chadwell</dc:creator>
      <pubDate>Tue, 11 May 2021 03:28:08 +0000</pubDate>
      <link>https://dev.to/curchadw/breaking-down-a-binary-search-tree-48ob</link>
      <guid>https://dev.to/curchadw/breaking-down-a-binary-search-tree-48ob</guid>
      <description>&lt;p&gt;One of the most import concepts to understand when it comes to data structures is a Binary Search Tree or BST. A Binary Search is simply a way that will allow us to maintain a sorted list of numbers.&lt;/p&gt;

&lt;p&gt;Its called a Binary Tree because each node is only able to have up to child nodes each.&lt;/p&gt;

&lt;p&gt;Here you will see that the root node 19 has two child nodes, and node 21 has one child node which is 25&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--InbRf663--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/znzanj1m00r77v5wk4rh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--InbRf663--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/znzanj1m00r77v5wk4rh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Being called a Search Tree is in reference to search of a number in 0(log(n)).&lt;/p&gt;

&lt;p&gt;With each BST are some things to rememeber:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The very first value passed in into the BST is going to be your root value.&lt;/li&gt;
&lt;li&gt;The next thing to keep in mind is there is a left and right side to all nodes in the tree. If the next value passed into the BST is larger than the the parent node, that "child" node will form on the right side, and if the next child is less than the parent, that child node will form on the left side of the parent. Keep in mind those child nodes can potentially turn into their own parent nodes and will form their own trees as the same rules mentioned above are applied. &lt;strong&gt;When you look at tree with a bunch of nodes, you will notice that everything on the left side is always smaller than every thing on the right side of the tree.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;There are two operations I will focus on which are insert, and find.&lt;br&gt;
But first...&lt;/p&gt;

&lt;p&gt;When starting a BST, you will have to classes, a node class, and a BST class. &lt;/p&gt;

&lt;p&gt;In the Node class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Node{
  constructor(value){
    this.value = value
    this.left = null
    this.right = null

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

&lt;/div&gt;



&lt;p&gt;Your BST class will start with the falling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class BST{
  constructor(){
    this.root = null
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why the null assignments? By default your root, your left and right needs to be null until you start to traverse down the tree when inserting values. You cannot insert a left or right child first, if the root node is not defined.&lt;/p&gt;

&lt;p&gt;Lets start building a tree!&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Insert&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The first operation is the insert operation. When inserting a new node, you need to create the node first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class BST{
  constructor(){
    this.root = null
  }
 insert(val){
 let newNode = new Node(val)

 }

}

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

&lt;/div&gt;



&lt;p&gt;When inserting a node you need to set the base case of....."Does the root node exist?" If you answered no to this...the first node you insert will be your root node automatically. You also want to set a temporary variable.....I'll call it current in this case...and assign the root node to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class BST{
  constructor(){
    this.root = null
  }
 insert(val){
 let newNode = new Node(val)

 if(this.root === null){
      this.root = node
      return this
    }
 let current = this.root

 }

}

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

&lt;/div&gt;



&lt;p&gt;Next I am going to implement a helper function called whichSide(). What is going on here? Later on you you see how this is applied, but simply if you are not on one side of the current value or node in this case, you are obviously going to be on the other side and start traversing that way. eg are you on the left side, or on you on the right side of the current temporary value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class BST{
  constructor(){
    this.root = null
  }
 insert(val){
 let newNode = new Node(val)

 if(this.root === null){
      this.root = node
      return this
    }
 let current = this.root

 }

const whichSide = side =&amp;gt;{
      if (!current[side]){
        current[side] = node
        return this
      }
      current = current[side]
    }

}

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

&lt;/div&gt;



&lt;p&gt;Next is where we start placing the conditions based on the value and whether it goes left or right. The temporary value or the current value is always going to update to current parent node depending on how far you traverse down the tree fyi.As mentioned earlier if the value being inserted is less than the parent node, the child node node or val being inserted will fall on the left side, or else the value will fall on the right side.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class BST{
  constructor(){
    this.root = null
  }

  insert(val){
    let node = new Node(val)

    if(this.root === null){
      this.root = node
      return this
    }

    let current = this.root

    const whichSide = side =&amp;gt;{
      if (!current[side]){
        current[side] = node
        return this
      }
      current = current[side]
    }

    while(true){
      if(val === current.value){
        return this
      }

      if(val &amp;lt; current.value){
        whichSide('left')
      } else{ 
        whichSide('right')
      }
    }

  }

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;find&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
The find function is not very complicated as its only looking for a value you provide and just traversing down the tree until its located.&lt;/p&gt;

&lt;p&gt;The first thing we need to catch is if the root node exist, because if the root node does not exist, then you will need to created tree for this to work and will just get false returned.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find(val){
 if (!this.root){
 return false
 }


}

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

&lt;/div&gt;



&lt;p&gt;Then just like in our insert function we need to setup a temporary variable.....we'll use current as the name again(has no relation to the one in my insert function). We also want create a variable that will be set to false initially. I high recommend this for convention purposes, otherwise you can just declare variable, and it will just be a "falsey" variable and it won't set off any errors in our compiler.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find(val){
 if (!this.root){
 return false
 }

 let current = this.root

 let located = false




}

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

&lt;/div&gt;



&lt;p&gt;Next we want to go into a loop as this is indicating it's traversing down the tree until the val is located or not. While there is a root value which there should be if you are using the find function, and is not yet located, you will jump to either the left or right side of the depending on the value you are passing in and the temporary(current) value being compared to will keep reassigning itself as it traverses down the tree until the value you are looking for is located.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;find(val){
  if (!this.root){
    return false
  }

  let current = this.root

  let located = false

  while (current &amp;amp;&amp;amp; !located){
    if (val &amp;lt; current.value){
      current = current.left
    } else if (val &amp;gt; current.right){
      current = current.right
    }else{
      located = true
    }

  }



}

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

&lt;/div&gt;



&lt;p&gt;Lastly...what if the value you are looking for does not exist after your algorithm went through the whole tree? You simply return false or whatever message you want to provide. If the value was located, you will return true.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
  find(val){
  if (!this.root){
    return false
  }

  let current = this.root

  let located = false

  while (current &amp;amp;&amp;amp; !located){
    if (val &amp;lt; current.value){
      current = current.left
    } else if (val &amp;gt; current.right){
      current = current.right
    }else{
      located = true
    }

  }

  if (!located) return "Doesn't exist in tree"

  return located


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

&lt;/div&gt;



&lt;p&gt;I hope this helps people in some way that need help understanding binary search trees. Any suggestion would be greatly appreciated. &lt;/p&gt;

&lt;p&gt;Here is the full code if you need to see it all.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Node{
  constructor(value){
    this.value = value
    this.left = null
    this.right = null

  }
}


class BST{
  constructor(){
    this.root = null
  }

  insert(val){
    let node = new Node(val)

    if(this.root === null){
      this.root = node
      return this
    }

    let current = this.root

    const whichSide = side =&amp;gt;{
      if (!current[side]){
        current[side] = node
        return this
      }
      current = current[side]
    }

    while(true){
      if(val === current.value){
        return this
      }

      if(val &amp;lt; current.value){
        whichSide('left')
      } else{ 
        whichSide('right')
      }
    }

   find(val){
  if (!this.root){
    return false
  }

  let current = this.root

  let located = false

  while (current &amp;amp;&amp;amp; !located){
    if (val &amp;lt; current.value){
      current = current.left
    } else if (val &amp;gt; current.right){
      current = current.right
    }else{
      located = true
    }

  }

  if (!located) return "Doesn't exist in tree"

  return located

  }


}




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

&lt;/div&gt;



</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Understanding a Singly Linked List</title>
      <dc:creator>Curtis Laurence Chadwell</dc:creator>
      <pubDate>Tue, 04 May 2021 03:37:46 +0000</pubDate>
      <link>https://dev.to/curchadw/understanding-a-singly-linked-list-3ge0</link>
      <guid>https://dev.to/curchadw/understanding-a-singly-linked-list-3ge0</guid>
      <description>&lt;p&gt;To better understand something, sometimes you have to attempt to teach it to others. So....in saying that I want to give a crash course of a linked list data structure.&lt;/p&gt;

&lt;p&gt;What is a linked list? A linked list is chained or linked nodes filled with data that reference each other. Unlike arrays where they each index takes up a part in memory, linked list use pointers to reference that data which makes them faster performance wise compared to arrays in some cases. A great way to visualize this is just think of a train that has cars linked with the clamps between the cars. These clamps are the pointers in the case of singly linked list. &lt;/p&gt;

&lt;p&gt;So how do we start building these linked list? From here I will use Object Orientated Programming, or simply OOP since linked list are composed of a 2 classes. Those classes are a Node class, and a Linked List class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Node{
  constructor(element){
    this.element = element
    this.next = next

  }
}

class LinkedList {
    constructor(head){
      this.head = head || null
      this.tail = null
      this.length = 0

    }
}

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

&lt;/div&gt;



&lt;p&gt;What's going on in the previous code is the node class is creating your nodes, and your linked list class you are establishing the head because will will need to append the nodes to that head eventually.&lt;/p&gt;

&lt;p&gt;There are some properties of a linked list you will need to remember before we get deeper. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First property is nodes are connected by pointers&lt;/li&gt;
&lt;li&gt;The last node will always point to null&lt;/li&gt;
&lt;li&gt;The head is always maintained and is pointing the the first node of the list. If you you were to get rid of this head, the train is basically not going anywhere&lt;/li&gt;
&lt;li&gt;Lastly Linked List and spread out memory where needed unlike an array.&lt;/li&gt;
&lt;li&gt;The size of the list can get bigger or smaller&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;We will focus on two operations for linked list with is inserting and deleting.&lt;/p&gt;

&lt;p&gt;The first  operation which we will call append is basically adding a node behind another node. The pointer from the previous node will point to the new node as the tail.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Within the linked list class

 append(val){
      let node = new Node(val)

      if (!this.head || !this.tail){
       this.head = node
       this.tail = node
       this.length = 1
      }else{
        this.tail.next = node
        this.tail = node
        this.length++
      }
    }

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

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const train = new LinkedList()

train.append(1)
console.log(train)

//output
{"head":{"el":1,"next":null},"tail:{"el":1,"next":null},"length":1}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this snippet we defined our append function which is simply appending a new node at the end of the list. The edge case here is in the event the no head is established, the first node will become the head and the size of the list will be 1. On the other hand if the head is established, then the head will point to the new node and that node will become the tail.&lt;/p&gt;

&lt;p&gt;Delete on the other hand is a little more but not as involved as the case of doubly linked list which I will blog about pretty soon.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remove(index){
      //keep track of previous pointer
      let deletedNode;
      //deletes from the beginning
      if (index === 0){
        deletedNode = this.head
        let nextNode = deletedNode.next;
        this.head = nextNode
      }else if (index !== this.length -1){
        let current = this.head
        let count = 0

        while(count !== index -1){
          count++
          current = current.next
        }

        let prevNode = current
        deletedNode = prevNode.next
        let nextNode = deletedNode.next

        prevNode.next = nextNode
      }

      this.length--
      return deletedNode

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

&lt;/div&gt;



&lt;p&gt;I am going to sum this part up a bit. You have the abilty to delete from whichever index and when you go through the code for the delete depending if its in the middle, beginning or the end, you need to remember to reestablish connection to other nodes and the key here is you will need to keep track of the previous pointers in the middle, and the tail. As mentioned before, let say I have four nodes and I delete node 3, you will need to establish the connection between node 2 and 4. Or if you are deleting current head you will need to designate the next node as the new head. &lt;/p&gt;

&lt;p&gt;Well I hope this crash course was enough to get people started, I will at some point touch on this in greater detail.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding the Bubble Sort Algorithm</title>
      <dc:creator>Curtis Laurence Chadwell</dc:creator>
      <pubDate>Tue, 27 Apr 2021 04:14:30 +0000</pubDate>
      <link>https://dev.to/curchadw/understanding-the-bubble-sort-algorithm-6pf</link>
      <guid>https://dev.to/curchadw/understanding-the-bubble-sort-algorithm-6pf</guid>
      <description>&lt;p&gt;My Fullstack group and I are on a journey....that journey is to become software developers and along that journey is to understand how things work. One day we started getting into algorithms and one of the first ones I had to fully understand was the bubble sort algorithm. &lt;/p&gt;

&lt;p&gt;What is the bubble sort algorithm and what is a practical example of it? First thing you to know that is important is what type of data is the bubble sort manipulating? The bubble sort is manipulating arrays simply no matter what type of values it contains(numbers, characters, other arrays, objects, etc.). The whole purpose of it is to swap adjacent values in ascending or descending order depending on what you want to do with the array.&lt;/p&gt;

&lt;p&gt;What is an everyday example that a lot of people might not have noticed? One example of a bubble sort I saw somewhere online is using cars traveling on a two lane road all going one direction.&lt;br&gt;
Cars will travel in one lane, and other cars will pass in the other lane. This sort is depending on who is traveling faster than the other. What will happen if I want to get in front of the car in front of me? I will pass the the car in the left hand and move back in the right hand lane traveling faster than the car I was previously behind. This is an example bubble sorting cars traveling in a lane based on who is traveling faster than the other.&lt;/p&gt;

&lt;p&gt;So when looking at an array, you are trying to sort values in an array ascending or descending. Lets look at an example of ascending order.&lt;/p&gt;

&lt;p&gt;Let's say I have the following array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const array = [4,5,9,3,5,0,2,12]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How would I approach this?&lt;/p&gt;

&lt;p&gt;Your first thought would be how do I swap the values in the array and return the array in its modified state?&lt;/p&gt;

&lt;p&gt;I first created a shell of my function called....... &lt;em&gt;bubbleSort&lt;/em&gt; that will take in an array as an argument&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bubbleSort = (arg) =&amp;gt;{

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

&lt;/div&gt;



&lt;p&gt;Then next within the function you will want to create a outer for loop that starts at first iteration and an inner for loop that will start at the first iteration as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bubbleSort = (arg) =&amp;gt;{
  let len  = arg.length
    for (let i = 0; i &amp;lt; len; i++){
      for (let j = 0; j &amp;lt; len; j++){



      } 
   }

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

&lt;/div&gt;



&lt;p&gt;So the question for this part is "what is this doing?"&lt;br&gt;
Trying to keep this simple.....the outer for loop is simply using the inner for loop to compare the adjacent values along the way...like in my array example, when it gets to position &lt;em&gt;array[3]&lt;/em&gt; or &lt;em&gt;array[2+1]&lt;/em&gt; it will check to see if its less than the value in the previous iteration. Since 3 is less than 9, they will switch places.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bubbleSort = (arg) =&amp;gt;{
  let len  = arg.length
    for (let i = 0; i &amp;lt; len; i++){
      for (let j = 0; j &amp;lt; len; j++){



        if(arg[j] &amp;gt; arg[j + 1]){
        let temp = arg[j]
        arg[j] = arg[j + 1]
        arg[j + 1] = temp
        }
      } 
   }

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

&lt;/div&gt;



&lt;p&gt;You will notice I setup a temporary variable which this simply represents a holding place for the swapped out value until it's compared to next value in the iteration. Once all the values have been  swapped, the array will be returned in it modified form&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bubbleSort = (arg) =&amp;gt;{
  let len  = arg.length
    for (let i = 0; i &amp;lt; len; i++){
      for (let j = 0; j &amp;lt; len; j++){



        if(arg[j] &amp;gt; arg[j + 1]){
        let temp = arg[j]
        arg[j] = arg[j + 1]
        arg[j + 1] = temp
        }
      } 
   }
   return arg
}


console.log(bubbleSort(arrary))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[0,2,3,4,5,9,12]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope this was a clear enough example of a bubble sort algorithm, any feed back would be appreciated for my own fyi. Until then have a good evening everyone! &lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Birthday Cake Candles challenge and working with an Array List</title>
      <dc:creator>Curtis Laurence Chadwell</dc:creator>
      <pubDate>Mon, 19 Apr 2021 22:26:55 +0000</pubDate>
      <link>https://dev.to/curchadw/birthday-cake-candles-challenge-and-working-with-an-array-list-2i72</link>
      <guid>https://dev.to/curchadw/birthday-cake-candles-challenge-and-working-with-an-array-list-2i72</guid>
      <description>&lt;p&gt;I am learning Java, and wanted to see if I was able to do some HackerRank problems. Do keep in mind that I am going straight to the solving this and not worrying about all that other stuff in their editor.&lt;/p&gt;

&lt;p&gt;When solving this I had to do a quick lookup of array list as I was not that far into my lessons yet in Java. The thing I love about them is that they are mutable versus a regular Java array is immutable. Its safe to assume that these are used more often than regular arrays in Java. Anyone can feel free to call my out and correct me on this.&lt;/p&gt;

&lt;p&gt;The problem states...&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You are in charge of the cake for your child's birthday. You have decided the cake will have one candle for each year of their total age. They will only be able to blow out the tallest of the candles. Count how many are the tallest.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So my thought process...."When did I care how tall my candles were on my cakes because I blew them all out"....jk&lt;/p&gt;

&lt;p&gt;I first had to figure out what the output was supposed to give me. When I was examining the examples provided, it was easier to understand.&lt;/p&gt;

&lt;p&gt;The input would accept an array list of integers as such....&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[1,5,6,6]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then they get accepted into a method and the array list is the argument accepted into the parameters of the method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static int birthdayCakeCandles(List&amp;lt;Integer&amp;gt; candles) {

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

&lt;/div&gt;



&lt;p&gt;It gets fun from here...&lt;/p&gt;

&lt;p&gt;How I broke this down from this point is I had to figure how to scan through each element by looping to see if the element meets a certain condition.&lt;/p&gt;

&lt;p&gt;First I had to declare a variable that has the first element of the array list assigned to it because the assumption is that this is the tallest until otherwise.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static int birthdayCakeCandles(List&amp;lt;Integer&amp;gt; candles) {
 int tallest = candles.get(0)

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

&lt;/div&gt;



&lt;p&gt;Next part is I need come kind of count since it asking me for the number of the tallest candles. I will declare a variable called "sum" that will keep track of this count&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static int birthdayCakeCandles(List&amp;lt;Integer&amp;gt; candles) {
 int tallest = candles.get(0)
 int sum = 0


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

&lt;/div&gt;



&lt;p&gt;From here I was faced with two small unknowns.... I needed to determine what candle(s) is/are the tallest of the candles, then I can count them from there. For this I implemented two for loops checking for those conditions separately before I was given a final count.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static int birthdayCakeCandles(List&amp;lt;Integer&amp;gt; candles) {
 int tallest = candles.get(0)
 int sum = 0
//If the i value is greater than the inital tallest...tallest is reassigned that value until another values get assigned or not.

for (Integer i : candles){
        if (tallest &amp;lt; i){
            tallest = i;
        }     

    }


}

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

&lt;/div&gt;



&lt;p&gt;Next you will keep track of the count of the tallest by telling your for loop to increment the count if i is equal to the current tallest value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static int birthdayCakeCandles(List&amp;lt;Integer&amp;gt; candles) {
 int tallest = candles.get(0)
 int sum = 0

for (Integer i : candles){
        if (tallest &amp;lt; i){
            tallest = i;
        }     

    }

for (Integer i : candles){
        if (i == tallest){
        sum += 1;
        }

    }


}

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

&lt;/div&gt;



&lt;p&gt;Then last ,but not least.....you will return the sum&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public static int birthdayCakeCandles(List&amp;lt;Integer&amp;gt; candles) {

    int highest = candles.get(0);
    int sum = 0;
    for (Integer i : candles){
        if (highest &amp;lt; i){
            highest = i;
        }     

    }

    for (Integer i : candles){
        if (i == highest){
        sum += 1;
        }

    }


      return sum;//should return 2 if we are using the array from earlier

    }


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

&lt;/div&gt;



&lt;p&gt;And this is how I approached and solved the Birthday Cake Candles problem.&lt;/p&gt;

</description>
      <category>java</category>
    </item>
    <item>
      <title>What's next after a coding bootcamp?</title>
      <dc:creator>Curtis Laurence Chadwell</dc:creator>
      <pubDate>Mon, 12 Apr 2021 04:06:24 +0000</pubDate>
      <link>https://dev.to/curchadw/what-s-next-after-a-coding-bootcamp-dlg</link>
      <guid>https://dev.to/curchadw/what-s-next-after-a-coding-bootcamp-dlg</guid>
      <description>&lt;p&gt;I just graduated from a coding bootcamp, and I am now in the land of the unknown. The scariest part about shifting careers is simply the in-between part. Why is this? In my particular case, I am not sure what potential employers want when they are looking for candidates other than what's in the job descriptions. Figuring out what employers want is only part of the battle.&lt;/p&gt;

&lt;p&gt;Just because you graduated from something doesn't mean that's where the learning stops. There is a whole lot more you need to accomplish until you land that next job. In the case of becoming a software developer, you need make sure you are keeping with as much as possible, because if you don't...all that you worked for in those 10 months in a coding camp was for nothing. A lot of coding camps do not provide direction after you graduate, so if the one you've graduated from does provide that help...take advantage of it.&lt;/p&gt;

&lt;p&gt;What are the things in particular that you need to do after a bootcamp until you land your next job as a software developer? The first thing is you need to lay a plan out for your weeks to help support you job search activity. The next thing is research companies you want to potentially work for &lt;strong&gt;before&lt;/strong&gt; you apply. The second point is very subjective only because you will have interest in working for some companies, while sometimes you will come across a job postings for a company you have never heard of before, and you will try to research them as much as you can before you apply. The third thing you will need to do is utilize LinkedIn as much as possible for networking with people that are working in these companies you are interested in or applying for through connections. The downside is you will not get a lot of responses for a lot of reasons. An alternative to this are meetups, or talking to people you know that may know other people.&lt;br&gt;
The forth thing is your resume. Its a good idea to get with someone to help you put your resume together to be mote appealing to potential employers. There is a certain way resumes need to be depending on the industry you are trying to work in. Review samples as there are several all over the internet. The fifth, and final thing I'll mention is keep up with your coding skills. You can be building something, cranking out problems on HackerRank or Leetcode, contributing to a open source project, learning other languages, learning data structures and algorithms, etc. Something I will point out about this forth point is a lot of people like me at one point get themselves spread out too thin, instead of being strategic about their learning priorities. This is because when we look at a job posting and we see that it may require you to know particular programming language for example, but doesn't mean break your back to learn the language. I recommend you make learning that language as a goal, but don't waste your energy trying to learn what is required of one job when there are several other jobs you can likely get into first. &lt;/p&gt;

&lt;p&gt;Everything I've said can be taken with a grain of salt, because what I say will not workout for many, while there are a few that will use this advice, or improve upon it to make a little more for them. Coming out of a coding bootcamp is like graduating from college, because in the end...we are all looking for jobs, and guidance can be appreciated when needed.  &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
