<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yung L. Leung on Medium]]></title>
        <description><![CDATA[Stories by Yung L. Leung on Medium]]></description>
        <link>https://medium.com/@yunglleung1?source=rss-483a9677bfb9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KSohBUkT3r5yWwLaU-kn6Q.png</url>
            <title>Stories by Yung L. Leung on Medium</title>
            <link>https://medium.com/@yunglleung1?source=rss-483a9677bfb9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 07:39:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yunglleung1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Real world data structures: tables and graphs in JavaScript]]></title>
            <link>https://medium.com/free-code-camp/real-world-data-structures-tables-and-graphs-in-javascript-bcb70c929495?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcb70c929495</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Fri, 22 Mar 2019 16:20:55 GMT</pubDate>
            <atom:updated>2019-03-22T16:20:55.802Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l60KCqKpGbwvSTqO301VZg.jpeg" /><figcaption>Photo by Matt Donders on <a href="https://unsplash.com/photos/fo3Obuy794g">Unsplash</a></figcaption></figure><p>An aerial view of boxes with addresses, each containing people &amp; various items, shows neighborhoods connected by their roads. Viewed up close, you may say that we have a <strong>hash table.</strong> But, when viewed from afar, you might see a <strong>graph</strong>. Advancing from <a href="https://medium.com/@yunglleung1/linear-data-structures-linked-lists-stacks-queues-a13c7591ad87"><strong>linear</strong></a><strong> (</strong>linked lists, stacks &amp; queues<strong>)</strong> and <a href="https://medium.com/@yunglleung1/binary-data-structures-trees-heaps-962ab536cb42"><strong>binary</strong></a><strong> (</strong>binary search trees, binary heaps<strong>) data structures</strong>, <strong>hash tables, </strong>and <strong>graphs</strong> are steps towards a greater diversity of real-world applications.</p><h3>Tables</h3><p>A <strong>hash table</strong> represents data (key-value pairs) tabulated by indexes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*jC3xWh4MF54nlh09kVAr3Q.png" /><figcaption><a href="https://www.geeksforgeeks.org/implementing-our-own-hash-table-with-separate-chaining-in-java/">source</a></figcaption></figure><p>Each unique key is used to generate an index (hash function). A hash function can generate the same index for several unique keys (<strong>collision</strong>). A solution to this problem is to store the data sets under the same index (<strong>chaining</strong>).</p><p>So, you can imagine a <strong>hash table</strong> being a system for shelving similar items together. Simply enter the item name into a <strong>hash function</strong> and all the greenish type items will be assigned a shelf space, i.e. 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*2ZHeMk7FhG11A_3IAuQ0Fw.gif" /><figcaption><a href="http://verticalcarousel.com.au/wp-content/uploads/2015/05/003.gif">source</a></figcaption></figure><p>In general, a key-value pair <strong>insert </strong>requires generating an <strong>index</strong> (shelf number), checking whether that shelf exists, and placing the item (<strong>data</strong>) on the shelf. Suppose I had bananas and apples on the bottom shelf (<strong>index 0</strong>) and red wine on my top shelf (<strong>index 2</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*BXzAtULmMJQz75AvV-gFcw.png" /><figcaption><strong>Stock items of 10 bananas, 20 apples &amp; 3 bottles of red wine</strong></figcaption></figure><p>If my index generator (<strong>hash function</strong>) returned an <strong>index 2</strong> for my 2 “rotisserie chickens,” to insert that data requires checking for and creating shelf space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*2WcJe9Fl4JyKjS508zhP6Q.png" /><figcaption>Added stock items of 2 rotisserie chickens</figcaption></figure><p>To get a <strong>value</strong> (item) requires inputting its name (<strong>key</strong>) to generate its index (shelf number) and retrieving all items on that shelf. Then searching for the exact item (its name or key) and retrieving it (return value). So, to find how many apples are in stock (<strong>20</strong>) requires iterating through my shelf of fruits.</p><p>To get a list of all <strong>keys</strong> or <strong>values</strong> requires searching through each existing shelf, logging it into your manifest (push into an array), and submitting the documents (return keys or values array).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*2H3iZ09mqd-XqGm0eKkHpw.png" /><figcaption>Keys (items) &amp; Values (quantity) of Hash Table (shelves of stock items)</figcaption></figure><p>The complexity to <strong>insert</strong> a key-value pair or <strong>access</strong> a value is, in general, a constant time (<strong>O(1)</strong>). A good hash function evenly distributes all items to all available shelves. So, <strong>insertion or access</strong> does not require looping through all existing “shelves” for storage or retrieval of data.</p><p>Because cataloging (<strong>keys or values</strong>) requires going through all shelves, it has a complexity <strong>O(n)</strong>. For <strong>n</strong> different data sets (for 4 different items), requires <strong>n steps </strong>to perform a catalog (requires looking through all 4 items to document its name or its quantity).</p><h3>Graphs</h3><p>A <strong>graph</strong> is nodes (<strong>vertices</strong>) of data related by their connections (<strong>edges</strong>). A road map of cities connected by their roads is a graph. A graph of connected users from a social media app is another example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*JI_3BxZMSDehrwnT-BXErQ.png" /><figcaption><a href="http://allthingsgraphed.com/2014/11/02/twitter-friends-network/">source</a></figcaption></figure><p>To <strong>add a vertex</strong> and an <strong>edge </strong>requires storing them as key-value pairs in an <strong>adjacency list</strong>. So a vertex (New York) can be connected to other vertices (New Jersey &amp; Pennsylvania) by making “New York” a key to an array containing “New Jersey,” “Pennsylvania.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*438Is5octwBEjNCdP1YxXw.png" /><figcaption><strong>List of All States Adjacent to New York</strong></figcaption></figure><p>The reverse must also be implemented, i.e.: “New Jersey” pointing to an array of “New York,” “Pennsylvania,” and so forth. So the result is an adjacency list of keys (“New York,” “New Jersey,” “Pennsylvania”), each pointing to arrays of their corresponding connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*6SGjx6P4gWIknhVZS_Lxqg.png" /><figcaption><strong>Complete Adjacency List from Google Maps</strong></figcaption></figure><p>To <strong>remove edge</strong> requires removing vertex1’s connection to vertex2 and the reverse. So, to remove New York’s connection to New Jersey requires, also, removing New Jersey’s connection to New York.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*oKMJjwC4xf20oqVnGfQ0TQ.png" /><figcaption><strong>Updated Adjacency List from Google Maps</strong></figcaption></figure><p>To <strong>remove a vertex</strong> requires iterating through its connections. Removing its edges, before finally deleting the vertex from the adjacency list. So, to remove New York requires disconnecting it from its neighbors before deleting from the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*0Gn_dxHbQRJOo3NbXsdHUQ.png" /><figcaption><strong>Adjacency List without New York from Google Maps</strong></figcaption></figure><p>Relative to a starting point, a <strong>depth-first </strong>traversal involves visiting a neighbor and its neighbors, before proceeding with the next immediate neighbor. A <strong>breadth-first</strong> traversal involves visiting all immediate neighbors before distant neighbors.</p><p>So for a graph with New York, New Jersey, Pennsylvania &amp; Virginia as vertices, a <strong>depth-first</strong> traversal starting from New Jersey would be [“New Jersey”, “Pennsylvania”, “Virginia”, “New York”].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*DF9_d73GMkEzE9yUxycTmg.png" /><figcaption><strong>Graph of New York, New Jersey, Pennsylvania &amp; Virginia from Google Maps</strong></figcaption></figure><p>A <strong>breadth-first</strong> from New Jersey would be [“New Jersey”, “New York”, “Pennsylvania”, “Virginia”].</p><p>Since a <strong>graph</strong> is a set of nodes connected, <a href="https://medium.com/@yunglleung1/linear-data-structures-linked-lists-stacks-queues-a13c7591ad87"><strong>linear</strong></a> &amp; <a href="https://medium.com/@yunglleung1/binary-data-structures-trees-heaps-962ab536cb42"><strong>binary</strong></a><strong> data structures </strong>can, in a sense, be viewed as simple graphs. Because graphs can take many different forms &amp; shapes, the <strong>complexity of traversal</strong> through a graph depends on the algorithm(s) used for the traveling, a discussion best saved for another time.</p><h3>References:</h3><p><a href="https://www.udemy.com/js-algorithms-and-data-structures-masterclass/">https://www.udemy.com/js-algorithms-and-data-structures-masterclass/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcb70c929495" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/real-world-data-structures-tables-and-graphs-in-javascript-bcb70c929495">Real world data structures: tables and graphs in JavaScript</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Binary data structures: an intro to trees and heaps in JavaScript]]></title>
            <link>https://medium.com/free-code-camp/binary-data-structures-an-intro-to-trees-and-heaps-in-javascript-962ab536cb42?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/962ab536cb42</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Wed, 20 Mar 2019 21:24:05 GMT</pubDate>
            <atom:updated>2019-03-20T21:24:05.334Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zrltwsvmiJBwYBZ2g6uiOg.jpeg" /><figcaption>Photo by Keith Wickramasekara on <a href="https://unsplash.com/photos/N96-q4oeNrs">Unsplash</a></figcaption></figure><p><a href="https://medium.freecodecamp.org/linear-data-structures-linked-lists-stacks-queues-a13c7591ad87"><strong>Linear data structures</strong></a> are simple in direction. A <strong>linked list</strong> is a list of nodes (each containing their own data) that are linked from one node to the next (and to the previous, for a doubly linked list). A <strong>stack</strong> builds upward like a tower of data. Each node stacking atop another, and shortens in a <strong>last in first out (</strong>LIFO<strong>)</strong> manner. A <strong>queue</strong> is a line of nodes that elongate from the end of the line and shortens in a <strong>first in first out (</strong>FIFO<strong>)</strong> mechanism.</p><p><strong>Binary data structures </strong>are like a fork in a road of data. The nodes build like the branches of a <strong>tree</strong> or a <strong>heap</strong> of rocks.</p><h3>Trees</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*PfDVlBXSXdx6PRFsVHes0w.gif" /><figcaption><a href="https://www.rosettacode.org/mw/images/a/a3/Fractal_tree_bbc.gif">source</a></figcaption></figure><p>A <strong>binary search tree</strong> is made up of nodes that branch off to no more than two nodes (binary). A parent node can have left and right child nodes. By convention, left child nodes contain values less than the parent. Whereas right child nodes contain greater values (<strong>left is less, right is greater</strong>). All trees begin with a single root node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*8lGLeJKf-um2ss1yOOzBhw.png" /><figcaption>A root branches off into two parents of leaves. Leaves (green) are nodes without children.</figcaption></figure><p>To <strong>insert</strong> a value requires creating a <strong>new node</strong>, comparing its value to the <strong>root </strong>&amp; its <strong>descendant</strong> values, while deciding to search further leftward (insertion of lesser value) or rightward (insertion of greater value). Once an available position is found, the node is inserted in place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*gwbCmr5CekUyH5w7ZzHUjw.gif" /><figcaption><strong>Insertion of the node with a value of 6</strong></figcaption></figure><p>To <strong>find</strong> a value is similar to the insertion of a value. You are performing the search for a stored value and returning the node containing it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*b5_vZIdpuh0oftFjLlB8PQ.gif" /><figcaption><strong>Finding the node with a value of 6</strong></figcaption></figure><p>To make a <strong>breadth-first search</strong> of values requires storing a root value. Then proceeding with the left child, then the right child and so forth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*SasGpMzYsYw2Amz8yGBx_A.gif" /><figcaption><strong>Breadth First Search returns [3, 1, 5, 0, 2, 4, 6]</strong></figcaption></figure><p>To make a <strong>depth-first search (</strong>pre-order<strong>)</strong> of values requires storing a root value. Then proceeding with all leftward descendants, before the rightward descendants.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ipeOfvlJdsfVLaoF9wm_AA.gif" /><figcaption><strong>Depth First Search Pre — Order returns [3, 1, 0, 2, 5, 4, 6]</strong></figcaption></figure><p>Since <strong>inserting</strong> &amp; <strong>finding</strong> a node of some value are relatively similar processes (insertion inserts a node whereas finding returns a node), it is of no surprise that their complexity is the same, <strong>O(log n)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*W9p-V8M_rj7E36NBlKnNIA.png" /><figcaption><strong>n = 3</strong></figcaption></figure><p>For a 3 node <strong>binary search tree</strong>, to <strong>find</strong> <strong>5</strong> requires two steps:</p><ul><li>Is <strong>5</strong> greater than or less than 3? Proceed rightward.</li><li>Is <strong>5</strong> equal to the value being searched? Return node.</li></ul><p>Similarly to <strong>insert</strong> a node with value 6 requires two steps:</p><ul><li>Is <strong>6</strong> greater than or less than 3? Proceed rightward.</li><li>Is <strong>6</strong> greater than or less than 5? Insert the right side.</li></ul><h3>Heaps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_X40dbAzhi-7QRzfy0RHw.png" /><figcaption>Photo by Nick Tong on <a href="https://unsplash.com/photos/zjy2yMUGzRU">Unsplash</a></figcaption></figure><p>A <strong>binary heap</strong> is a pyramidal structure of nodes whose nodes can stack upward with rows of decreasing values toward a minimum (<strong>minimum binary heap</strong>) or with rows of increasing values toward a maximum (<strong>maximum binary heap</strong>). Like the tree, each parent node can extend up to two child nodes. Unlike the tree, each parent can contain a lesser value than its children (<strong>minimum binary heap</strong>) or a greater value (<strong>maximum binary heap</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Sk7QKeLYdtPIWt65EMYgpg.png" /><figcaption>Max Binary Heap</figcaption></figure><p>For a <strong>max binary heap</strong>, to <strong>insert</strong> a value at the base of the pyramid requires comparing it to parent nodes and <strong>bubbling up</strong> the larger value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*LuG4KHi0Y4MawsyqGS2TTQ.gif" /><figcaption><strong>Insertion of a node with a value of 6 &amp; bubbling it upward.</strong></figcaption></figure><p>To <strong>extract a max</strong> value requires removing the apex value and <strong>sinking down</strong> a value from the pyramid’s base. This involves finding the higher of the two children nodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*8wX7UquUDhBLzJ3liiUcwg.gif" /><figcaption><strong>Extraction of the max node with the value of 6 &amp; sinking down node with the value of 3.</strong></figcaption></figure><p>For a <strong>max binary heap</strong>, <strong>insertion</strong> of a node &amp; <strong>extraction</strong> of a node with the max value both has a complexity of <strong>O(log n)</strong>.</p><p>For a 3 node <strong>max binary heap</strong>, insertion of a node with value 6 requires two steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*lddEChuEg2_f3--yfUw7Aw.png" /><figcaption><strong>Bubbling up of the new node with value 6</strong></figcaption></figure><ul><li>Upon attaching node of value 6 to a new row (below 4), is <strong>6</strong> greater than or less than 4? Swap.</li><li>Is <strong>6 </strong>greater than or less than 5? Swap.</li></ul><p>Similarly, after the removal of a node with a max value &amp; replacing it with a node of value <strong>1</strong>, two steps remain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*gcngUfEPQLPvLZETJ2xrVA.png" /><figcaption><strong>Sinking down of node with value 1</strong></figcaption></figure><ul><li>Is <strong>1</strong> greater than or less than 5? Swap.</li><li>Is <strong>1</strong> greater than or less than 4? Swap.</li></ul><p>Thank you for reading!</p><h3>Reference:</h3><p><a href="https://www.udemy.com/js-algorithms-and-data-structures-masterclass/">https://www.udemy.com/js-algorithms-and-data-structures-masterclass/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=962ab536cb42" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/binary-data-structures-an-intro-to-trees-and-heaps-in-javascript-962ab536cb42">Binary data structures: an intro to trees and heaps in JavaScript</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An intro to advanced sorting algorithms: merge, quick & radix sort in JS]]></title>
            <link>https://medium.com/free-code-camp/an-intro-to-advanced-sorting-algorithms-merge-quick-radix-sort-in-javascript-b65842194597?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b65842194597</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Tue, 19 Mar 2019 15:45:45 GMT</pubDate>
            <atom:updated>2019-03-22T11:33:51.147Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*BtcGRVPLOjnY5zFrhGX4TQ.gif" /><figcaption>Illustration by <a href="https://giphy.com/marclariviere">Marc Lariviere</a><strong> on Giphy</strong></figcaption></figure><p>In my previous article, “<a href="https://medium.freecodecamp.org/the-complexity-of-simple-algorithms-and-data-structures-in-javascript-11e25b29de1e?source=friends_link&amp;sk=994bc3da2b4cc5b78da06cf161dad6a7">The Complexity of Simple Algorithms &amp; Data Structures in JavaScript</a>,” we discussed simple sorting algorithms (bubble, selection &amp; insertion sorts). Here, I go through <strong>merge</strong>, <strong>quick </strong>&amp; <strong>radix sort, </strong>each of which has a significant improvement on <strong>average</strong> <strong>time complexity</strong>, less than <strong>O(n²)</strong>.</p><p>Let’s go through each of these in more detail.</p><h3>Merge</h3><p>A <strong>merge sort</strong> separates a list into its individual items. It then sorts them as they are being merged into a growing ordered list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*0GfXqJOE353FPZqFYibTkw.gif" /><figcaption><a href="https://codepumpkin.com/wp-content/uploads/2017/10/MergeSort_Avg_case.gif">source</a></figcaption></figure><p>In practice, this would mean continuously slicing an array into single element arrays, before pushing each element into a larger array (the smaller value first). Every stage of pushing elements from 2 smaller arrays into 1 larger array involves determining which element from which array has the smaller value.</p><p>The complexity of merge sort is <strong>O((n log n) + 1)</strong>. Remember that Big O notation (<a href="https://medium.freecodecamp.org/the-complexity-of-simple-algorithms-and-data-structures-in-javascript-11e25b29de1e?source=friends_link&amp;sk=994bc3da2b4cc5b78da06cf161dad6a7">Complexity of Simple Algorithms &amp; Data Structures in JS</a>) is a count of the <strong>number of operations (</strong>O<strong>)</strong> with respect to the <strong>number of elements (</strong>n<strong>)</strong>. So a 4 element list requires 3 splits. <strong>Note</strong>, the list is already ordered for the simplicity of the example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*dzEUOOyQGG1UIBHo13Hw1w.png" /><figcaption>Splitting a 4 element list.</figcaption></figure><p>Merging the 4 arrays requires 6 comparisons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*mT9wp36JrVODOgtZYVXASQ.png" /><figcaption>Once split, as it is being merged, the 4 elements requires a total of 6 comparisons.</figcaption></figure><p>So, the mathematical calculation is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/170/1*8276D6aNliZcNnRetu2nPA.png" /><figcaption>9 operations (<strong>3 splits &amp; 6 comparisons</strong>) are required to perform a merge sort on a 4 element array</figcaption></figure><p>For simplicity, the complexity of merge sort is <strong>O(n log n)</strong>. The <strong>+1</strong> is insignificant relative to the value of <strong>n log n </strong>and log base 2 is assumed.</p><h3>Quick</h3><p>A <strong>quick sort</strong> selects a value (at index 0), swaps all lesser values closer to it, then makes a final swap to place the selected value ahead of the lesser values (an index somewhere after 0). In this manner, all values behind the <strong>pivot value</strong> are lesser values. All values ahead of it are greater values. Hence, upon pivoting, the <strong>selected value (</strong>pivot<strong>)</strong> is placed into its correct position. The process repeats until all values are “pivoted” to their correct positions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*3Kpd-3_iZrGMpsYAQBFjrw.gif" /><figcaption><a href="https://thumbs.gfycat.com/RectangularHarmlessGalapagosmockingbird-size_restricted.gif">source</a></figcaption></figure><p>Similar in practice to <strong>merge sort,</strong> <strong>quick sort</strong> requires splitting a list into smaller lists. Rather than sorting on merge, a pivot is selected to order the list such that lesser values are to its left &amp; greater values are to its right. Therefore, it is no surprise that, like <strong>merge sort</strong>, <strong>quick sort</strong> also has a complexity of <strong>O(n log n)</strong>.</p><p>So, for a 4 element array, a pivot is selected &amp; its correct position is found (i.e., 2 at index 0 belongs at index 1). During this discovery, 3 comparisons are made with the pivot value (2) to the remaining elements (4, 1 &amp; 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*HMTB7K4E_7n2p1Ly3kcczg.png" /><figcaption>Quick Sort of Array [2, 4, 1, 3]</figcaption></figure><p>The partially sorted array (1, 2, 4, 3) is then decomposed to find the pivot positions of value <strong>1</strong> and <strong>4 (</strong>by comparison to value 3<strong>)</strong>, before discovering the last pivot position (value <strong>3</strong>). This amounts to 4 comparisons and the discovery of 4 pivot positions or:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*NaNUY1QhUJPZiU3l3_KFcA.png" /><figcaption>O(n log n)</figcaption></figure><h3>Radix</h3><p>A <strong>radix sort</strong> continuously orders a list of numbers by their base ten digit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*ulSTpnHVDA8pLVNOnVuLnw.gif" /><figcaption>Digits 0 to 9</figcaption></figure><p>In this case, the numbers (101, 54, 305, 6, 81) are first ordered by their 0’s place digit, then, 10’s place digit &amp; finally, 100’s place digit. In practice, this means creating buckets (digits 0 to 9) for storing numbers with common digits (i.e., 10<strong>1</strong> &amp; 8<strong>1</strong> shares a common digit at 0’s place). Then, combining all numbers in their bucket order (starting with 0’s place: 10<strong>1</strong>, 8<strong>1</strong>, 5<strong>4</strong>, 30<strong>5</strong>, <strong>6</strong>), before repeating the process over with the 10’s place digits. This continues until the highest placed digits are reached (i.e., <strong>1</strong>01 &amp; <strong>3</strong>05 have 100’s place digits).</p><p>In general, the complexity of the <strong>radix sort</strong> is <strong>O(kn)</strong>.</p><ul><li><strong>n</strong> is the number of elements</li><li><strong>k</strong> is the average number of digits per element</li></ul><p>The quantity of numbers to sort (<strong>n</strong>) is the number of times it is required to make deposits into these digit buckets. So the list of <strong>101, 54, 305, 6, 81</strong> requires at least 5 deposits. The higher the digits (<strong>k</strong>) of the number collection, the more times it is required to repeat the sorting process from 0’s, 10’s, 100’s, 1000’s, etc. So the list <strong>101, 54, 305, 6, 81</strong> requires 5 deposits for <strong>0’s</strong>, <strong>10’s</strong> &amp; <strong>100’s</strong> place. That’s a total of <strong>3 x 5 = 15</strong> deposits.</p><h3>Conclusion</h3><p>Learning advanced algorithms does not diminish the importance of the more basic ones. It is through the studying of basic algorithms that you learn about what it means to search or sort, simply. And from this study, you can begin to understand the problems that come with these basic algorithms.</p><p>Nothing is created in a vacuum. It starts with an idea. Where it goes from there is limited by the human mind and what we can do with the physical world around us. It is “always day one,” should you choose to expand your horizons.</p><h3><strong>Reference:</strong></h3><p><a href="https://www.udemy.com/js-algorithms-and-data-structures-masterclass/">https://www.udemy.com/js-algorithms-and-data-structures-masterclass/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b65842194597" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/an-intro-to-advanced-sorting-algorithms-merge-quick-radix-sort-in-javascript-b65842194597">An intro to advanced sorting algorithms: merge, quick &amp; radix sort in JS</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The complexity of simple algorithms and data structures in JS]]></title>
            <link>https://medium.com/free-code-camp/the-complexity-of-simple-algorithms-and-data-structures-in-javascript-11e25b29de1e?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/11e25b29de1e</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Mon, 18 Mar 2019 16:02:28 GMT</pubDate>
            <atom:updated>2019-03-19T13:03:13.149Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1bB3zrN0WrNC6ErArRF6cQ.jpeg" /><figcaption>Photo by Karsten Würth on <a href="https://unsplash.com/photos/ImeGmbUNarA">Unsplash</a></figcaption></figure><p>In the previous article “<a href="https://medium.com/@yunglleung1/a-step-towards-computing-as-a-science-algorithms-data-structures-4c0e2d6ae79a">A Step Towards Computing as a Science: Simple Algorithms &amp; Data Structures in JS</a>,” we discussed simple algorithms (linear &amp; binary searches; bubble, selection &amp; insertion sorts) &amp; data structures (array &amp; key-value paired objects). Here, I continue with the concept of complexity and its application to these algorithms &amp; data structures.</p><h3><strong>Complexity</strong></h3><p><strong>Complexity</strong> is a factor involved in a complex process. Regarding algorithms &amp; data structures, this can be the <strong>time</strong> or <strong>space </strong>(meaning computing memory) required to perform a specific task (search, sort or access data) on a given data structure. The efficiency of performing a task is dependent on the number of operations required to complete a task.</p><p><strong>Taking out the trash</strong> may require 3 steps (tying up a garbage bag, bringing it outside &amp; dropping it into a dumpster). <strong>Taking out the trash</strong> may be simple, but if you are taking out the trash after a long week of renovation, you may find yourself unable to complete the task due to a <strong>lack of space</strong> in the dumpster.</p><p><strong>Vacuuming a room</strong> can require many repetitive steps (turning it on, repeatedly sweeping the vacuum head across a floor &amp; turning it off). The larger a room, the more times you will have to sweep a vacuum head across its floor. Thus, the <strong>longer the time</strong> it will take to vacuum the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*e8gCso9DqdSzppv-BI0Z3A.png" /></figure><p>So, there is a direct causal relationship between the number of operations performed and the number of elements that are performed on. Having a lot of trash (elements) requires taking it out many times. This can lead to a problem of <strong>space complexity</strong>. Having a lot of square footage (elements) requires sweeping a vacuum head across a floor many times over. This can lead to a problem of <strong>time complexity</strong>.</p><p>Whether you are <strong>taking out the trash </strong>or <strong>vacuuming a room</strong>, you might say that the <strong>operation count (</strong>O<strong>)</strong> increases exactly with the <strong>number of elements (</strong>n<strong>)</strong>. If I have 1 trash bag, I have to take out the trash once. If I had 2 trash bags, I have to perform the same task twice, assuming you physically cannot lift more than one bag at a time. So, the Big-O of these chores is O = n or O = function(n) or <strong>O(n)</strong>. This is a linear complexity (a straight line with a 1 operation: 1 element correspondence). So, 30 operations are performed on 30 elements (yellow line on graph).</p><p>This is similar to what happens when considering algorithms &amp; data structures.</p><h3>Searches</h3><h4>Linear Search</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*M-jZ-x5GcOwkGPic0igdww.gif" /><figcaption><a href="https://www.mathwarehouse.com/programming/images/binary-vs-linear-search/binary-and-linear-search-animations.gif">source</a></figcaption></figure><p>The <strong>best case</strong> for searching an item in an ordered list, one after another, is a constant <strong>O(1)</strong>, assuming it is the 1st item in your list. So, if the item you are searching for is always listed first, regardless of your list size, you will find your item in an instant. The complexity of your search is constant with the list size. The <strong>average to the worst case </strong>of this kind of search is a linear complexity or <strong>O(n). </strong>In other words,<strong> </strong>for n items, I have to look n times, before I find my item, hence linear search.</p><h4>Binary Search</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*AunhjlInGjD1ZNEMPOF_xg.gif" /><figcaption><a href="https://www.mathwarehouse.com/programming/images/binary-vs-linear-search/binary-and-linear-search-animations.gif">source</a></figcaption></figure><p>For a binary search, the <strong>best case </strong>is O(1), meaning the item of your search is located at the midpoint. The <strong>worst &amp; average case</strong> is log base 2 of n or:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/1*dVwWJMu-DLBSE2XPZAxLRQ.png" /></figure><p>Logarithm or log is a way of expressing an exponent for a given base. So, if there were 16 elements (n = 16), then it would take, at worse case, 4 steps to find the number 15 (exponent = 4).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*xXNxc91vxhtjzx67wTbO_A.png" /></figure><p>Or simply: <strong>O(log n)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/110/1*H-iPBZilLvWusOukPSpwvA.png" /></figure><h3>Sorts</h3><h4>Bubble</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*oaBI9a9v0HkYhuhkjz2lsg.gif" /><figcaption><a href="https://upload.wikimedia.org/wikipedia/commons/5/54/Sorting_bubblesort_anim.gif">source</a></figcaption></figure><p>In bubble sort, every item is compared to the rest of the collection to determine the highest value to bubble up. For this reason, on <strong>average to worst case</strong>, its complexity is <strong>O(n²)</strong>. Think a loop nested within another loop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*sPW7i41jKf4u3pOwyRAeaA.png" /></figure><p>So, for each item, you are comparing it to the rest of your collection. This amounts to 16 comparisons (or operations) for 4 elements (4² = 16). The <strong>best case</strong> is if your collection is almost sorted, except for a single item. This would amount to a single round of comparisons. That is, four comparisons are required to bubble up a member of a four-item collection, which is a complexity of <strong>O(n)</strong>.</p><h4>Selection</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*VNXTiFSpXku8u2YFP-cL-A.gif" /><figcaption><a href="https://codepumpkin.com/selection-sort-algorithms/">source</a></figcaption></figure><p>Unlike<strong> bubble sort</strong>, instead of bubbling up the highest value, <strong>selection sort </strong>selects the lowest value to swap it to the earliest positions. But, because it requires comparing each item to the rest of the collection, it also has a complexity of <strong>O(n²)</strong>.</p><h4>Insertion</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*bqKOVwZE7K_jEfZ2Hjn3hQ.gif" /><figcaption><a href="https://gfycat.com/densebaggyibis">source</a></figcaption></figure><p>Unlike the <strong>bubble </strong>&amp;<strong> selection sorts</strong>, <strong>insertion sort</strong> inserts the item into its correct position. But, like the previous sorts, this also requires comparing each item to the rest of the collection, therefore, it has an <strong>average to worst case </strong>complexity of <strong>O(n²)</strong>. Like the <strong>bubble sort</strong>, if there is only one item left to sort, it only requires a single round of comparisons to insert the item into its correct position. That is, it has the <strong>best case</strong> complexity of <strong>O(n)</strong>.</p><h3>Data Structures</h3><h4>Arrays</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*sD1VZqMuLK3MhMmoS4xvsA.png" /></figure><p>Because it takes a single step to access an item of an array via its index, or add/remove an item at the end of an array, the complexity for <strong>accessing</strong>, <strong>pushing</strong> or <strong>popping</strong> a value in an array is <strong>O(1)</strong>. Whereas, <strong>linearly searching</strong> through an array via its index, as seen before, has a complexity of <strong>O(n)</strong>.</p><p>Also, because a <strong>shift</strong> or <strong>unshift</strong> of a value to or from the front of an array requires <strong>reindexing</strong> each element that follows it (i.e. removing an element at index 0 requires relabelling element at index 1 as index 0, and so forth), they have a complexity of <strong>O(n)</strong>. The relabelling is carried through from the start to the end of the array.</p><h4>Key — Value Paired Objects</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*Es1hJ7Or_WbYj9wXFBNxzg.jpeg" /><figcaption><a href="https://cdn.shopify.com/s/files/1/1147/6518/products/safeandvaultstore-sdbx9-safe-deposit-boxes_large.jpg?v=1495593363">source</a></figcaption></figure><p><strong>Accessing</strong>, <strong>inserting </strong>or <strong>removing</strong> a value by using a key is instantaneous, and so, they have a complexity of <strong>O(1)</strong>. Searching through each “deposit box” for a specific item by using every available key is essentially a <strong>linear search</strong>. And so, it has a complexity of<strong> O(n)</strong>.</p><h3>Conclusion</h3><p><strong>Complexity</strong> is more than just a topic for discussing established algorithms &amp; data structures. If used wisely, it can be a useful tool for gauging the efficiency of the work you do and the code you create to solve your problems.</p><h3><strong>Reference:</strong></h3><p><a href="https://www.udemy.com/js-algorithms-and-data-structures-masterclass/">https://www.udemy.com/js-algorithms-and-data-structures-masterclass/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11e25b29de1e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/the-complexity-of-simple-algorithms-and-data-structures-in-javascript-11e25b29de1e">The complexity of simple algorithms and data structures in JS</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linear Data Structures: Linked Lists, Stacks, and Queues in JS]]></title>
            <link>https://medium.com/free-code-camp/linear-data-structures-linked-lists-stacks-and-queues-in-javascript-a13c7591ad87?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/a13c7591ad87</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Wed, 13 Mar 2019 14:09:52 GMT</pubDate>
            <atom:updated>2019-03-19T13:08:03.187Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*AlfSJzw3bKoEHHaO9oiMqQ.jpeg" /><figcaption>Photo by Pranam Gurung on <a href="https://unsplash.com/photos/NSKdLjvfK1k">Unsplash</a></figcaption></figure><p>Building from <a href="https://medium.freecodecamp.org/a-step-towards-computing-as-a-science-algorithms-data-structures-4c0e2d6ae79a?source=friends_link&amp;sk=1291dffce9f32b30f36339d59a66e12c">Simple Algorithms &amp; Data Structures in JS</a>, here we’ll look at data structures beyond arrays and key-value objects, beyond “labelled &amp; deposit” boxes. Like a road along a path, <strong>linked lists</strong>, <strong>stacks</strong> &amp; <strong>queues</strong> are direct ways to move from one unit of data to the next.</p><h3>Linked Lists</h3><p>A <strong>linked list</strong> is like a set of boxes chained together and stored in a dark room. To get to any one box requires starting at one end (head or tail) and following the links, from one box to the next. Upon arriving at any one box, you are pointed towards the direction of the next box. <strong>There is no index</strong> to act as a guide for leaping to any one box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*kaShgNb9EtR7ps6odxP3QA.png" /><figcaption><a href="https://www.blackline.com/blog/rpa/blockchain-finance-6-things/">source</a></figcaption></figure><p>You can easily <strong>unshift</strong> or <strong>push</strong> “boxes” to the head or tail of the linked list. You can also easily <strong>shift</strong> or <strong>pop</strong> off “boxes” from the head or tail. The head or tail are easily accessible. But, to <strong>insert</strong> or <strong>remove</strong> “boxes” along the body of this linked list,<strong> </strong>to <strong>set</strong> items into a “box” that is beyond the head or tail, is more difficult. It requires starting at the head (or tail) and moving from a current “box” to the next one, before you can <strong>get</strong> to your desired “box.”</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqATBVw0iytM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqATBVw0iytM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqATBVw0iytM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/07ea82719842b77c9fdb5807917b215e/href">https://medium.com/media/07ea82719842b77c9fdb5807917b215e/href</a></iframe><p>A <strong>singly linked list</strong> is a one-way linked list. This means that you can only move forward from the head to the tail. The complexity to <strong>unshift </strong>&amp;<strong> shift </strong>is a constant (<strong>O(1)</strong>). This is because adding a “box” to or removing it from the beginning requires only accessing the head of the list. The complexity to <strong>push</strong> a “box” to the end is also <strong>O(1)</strong> for a similar reason, the tail is immediately accessible.</p><p>But, to <strong>pop</strong> off the tail requires reassigning a new tail, which is reachable only by moving forward starting from the head, hence a linear complexity (<strong>O(n)</strong>). An <strong>n</strong> number of “boxes” requires <strong>n</strong> number of steps (operations) to reach the second to last “box” &amp; reassign it as the new tail. Similarly, to <strong>insert/remove</strong> a “box,” or to <strong>get/set</strong> items in any “box” along the body of a list requires traveling from the head, and so their complexities are in general <strong>O(n)</strong>.</p><p>A <strong>doubly linked list</strong> is a two-way linked list. This means you can move forward from the head or the tail. An advantage is that both the head &amp; tail are easily accessible to add “boxes” to or remove “boxes” from. The complexity to <strong>unshift</strong>, <strong>shift</strong>, <strong>push</strong> or <strong>pop</strong> is <strong>O(1)</strong>. The new tail required for popping a tail off is reachable from the current tail.</p><p>Another advantage of being able to travel from two different end points (head or tail) is that to <strong>insert/remove </strong>any “box” or to <strong>get/set</strong> “items” in a “box” along the body of a list takes half the time of a singly linked list. That is, their complexities are <strong>half of O(n)</strong>. If the “box” or “item” is located at the 2nd half of the list, traveling from the tail will not require traveling through the 1st half of the list. The opposite is also true. Although, an <strong>O(1/2 n)</strong> tends to be simplified as <strong>O(n)</strong>.</p><h3>Stacks</h3><p>A <strong>stack</strong> is a pile of items neatly arranged atop each other. A new item can be <strong>pushed</strong> onto the top of a stack, one at a time, building to the height of the stack. Reversely, each item can be <strong>popped</strong> off, one at a time, from the top of the stack. The last item in is always the first item out (<strong>LIFO</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H0FjbIyvwvDMrw0OCqyCwQ.jpeg" /><figcaption>Annie Spratt from <a href="https://unsplash.com/photos/thI_CZAB0MY">UnSplash</a></figcaption></figure><p>Since a stack operates by a LIFO process, the complexity to <strong>push</strong> an item to the top of the stack or to <strong>pop</strong> it off is a constant of <strong>O(1)</strong>. The top of the stack is easily accessible.</p><h3>Queues</h3><p>A <strong>queue</strong> is a line of items, neatly arranged next to each other. A new item can be <strong>enqueued</strong> to the end of the line, one at a time, elongating the line. Reversely, each item can be <strong>dequeued</strong> from the front of the line, one at a time. The first item in is always the first item out (<strong>FIFO</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*hRd8rEZW87TbU1_uc6xCQw.jpeg" /><figcaption><a href="http://www.communityvoiceks.com/news/wichita_news/sedgwick-county-treasurer-launches-new-virtual-waiting-line-process/article_e1fce0c2-f05f-11e5-979b-93e21092f3d5.html">source</a></figcaption></figure><p>Since both the front &amp; end of the line is easily accessible, a queue’s <strong>enqueue</strong> &amp; <strong>dequeue</strong> have a complexity of <strong>O(1)</strong>.</p><p>Thanks for reading!</p><h3>Reference:</h3><p><a href="https://www.udemy.com/js-algorithms-and-data-structures-masterclass/">https://www.udemy.com/js-algorithms-and-data-structures-masterclass/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a13c7591ad87" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/linear-data-structures-linked-lists-stacks-and-queues-in-javascript-a13c7591ad87">Linear Data Structures: Linked Lists, Stacks, and Queues in JS</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Step Towards Computing as a Science]]></title>
            <link>https://medium.com/free-code-camp/a-step-towards-computing-as-a-science-algorithms-data-structures-4c0e2d6ae79a?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c0e2d6ae79a</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 21:02:36 GMT</pubDate>
            <atom:updated>2019-02-20T15:51:18.727Z</atom:updated>
            <content:encoded><![CDATA[<h4>Simple Algorithms &amp; Data Structures in JS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*494Zt3R4wuX6jGEE93bGyg.jpeg" /><figcaption>Photo by J. Craig on <a href="https://unsplash.com/photos/HH4WBGNyltc">Un-splash</a></figcaption></figure><p>An <strong>algorithm</strong> is the steps taken to solve a problem. A <strong>data structure</strong> is data organized for efficient access. You can use an algorithm to solve all kinds of problems (i.e., searching for a piece of data or sorting a collection of data) for a given data structure.</p><p>So with regards to computers, an <strong>algorithm</strong> is the method of what you are doing (i.e., linear search, binary search, bubble sort, selection sort, insertion sort, etc.), whereas a <strong>data structure</strong> is the thing that you are doing it to (i.e., array, key-value paired objects, etc.). So you can methodically search through, sort, or create an organized dataset.</p><h3>A Simple Data Structure</h3><h4>Array</h4><p>An <strong>array</strong> is like numbered boxes (<strong>index</strong>) ordered from lowest (0) to its highest (2) label. Each box is fixed in place and remains ordered by its label.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*APXREebIlMFezWFC-u-qjQ.png" /></figure><p>You can jump to any labeled box to look at its contents (arrayName[2]), to add content, or replace its content (arrayName[2] = “Sherlock Holmes”). You can <strong>push</strong> newly boxed content to the end of your collection (arrayName.push(“The Memoirs of Sherlock Holmes”)).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*uZkgySnR2wtr8-1pl-anKg.png" /></figure><p>This gives the incoming box the next label in the sequence (3). To return to your original boxed collection, you can <strong>pop</strong> off the end (arrayName.pop()).</p><p>You can also <strong>shift </strong>off your first box (arrayName.shift()), but this will require relabelling all your other boxes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*APXREebIlMFezWFC-u-qjQ.png" /></figure><p>Your Sherlock Holmes collection is now in the box labeled 1. If you <strong>unshift</strong> your box collection, you can add to the start of your collection a new box of content (arrayName.shift(“Dr. Strange”)).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*uZkgySnR2wtr8-1pl-anKg.png" /></figure><p>This gives us our Dr. Strange &amp; Sherlock Holmes collection at boxes labeled 0 &amp; 2.</p><h3>Searching a Data Structure</h3><h4>Linear Search</h4><p>A <strong>linear search</strong> is like walking along an array of boxes (i.e., 0 — 16) and opening each cover to see if its contents are what you are looking for (i.e., 37).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*oc5UleaeNGuegjT-L1EM1Q.gif" /><figcaption><a href="https://www.mathwarehouse.com/programming/images/binary-vs-linear-search/binary-and-linear-search-animations.gif">source</a></figcaption></figure><p>So, for an index ranging from the start of a collection (let us say 0) to its end (its length less one), we can search for our desired content in a box and move on to the next. We can increment from one box to the next until we find a match.</p><h4>Binary Search</h4><p>A <strong>binary search</strong> is like searching through an array of boxes, whose contents are ordered (i.e., numerical or alphabetical), by jumping halfway to a middle box and checking its contents for your desired item. If you overstepped, you <strong>jump backward</strong>, halfway between your current position and the starting point. Otherwise, you <strong>leap forward</strong>, halfway between your current position and the endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*mc2pr0bUyiq6O1g_Uwe9gw.gif" /><figcaption><a href="https://www.mathwarehouse.com/programming/images/binary-vs-linear-search/binary-and-linear-search-animations.gif">source</a></figcaption></figure><p>So, what you can do is keep track of your low (initially <strong>0</strong>), mid (<strong>8</strong>) &amp; high (initially <strong>16</strong>) index positions. The mid position is always half the sum of low &amp; high indexes. You check the mid box for a match (i.e., <strong>37</strong>). If its less than what you expected (&lt; 37), then you leap forward. You reset your low index to be passed your current mid position by one (8 + 1 = <strong>9</strong>). Then, recalculate a new mid position ((9 + 16) / 2 ≈ <strong>12</strong>).</p><p><strong>In other words, you can leap forward in your search by resetting your low index &amp; recalculating a new mid index. Conversely, if you overstepped, you can jump backward by resetting your high index &amp; recalculating a new mid index<em>.</em></strong></p><p>Unlike linear search, this type is binary. You are always guessing whether your item is located on the 1st or 2nd half of your boxed collection.</p><h3>Sorting a Data Structure</h3><h4>Bubble Sort</h4><p>A <strong>bubble sort</strong> is sorting a collection by continuously swapping a higher value with an adjacent lesser, resulting in the effect of the highest value bubbling up to the top.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/277/1*ndTs2LbN6hKmH1-v-8_kEQ.gif" /><figcaption><a href="https://upload.wikimedia.org/wikipedia/commons/5/54/Sorting_bubblesort_anim.gif">source</a></figcaption></figure><p>So, for the length of your collection, starting at index 0, you swap the contents of a current index (i) with the contents of a later index (i + 1), if the earlier is greater in value. Then, you move on to the next set of indexes (i + 1 vs. i + 2), and so forth.</p><p>At some point in time, you will have arrived at a box with the highest value in your collection. And so, it will be the content that keeps being swapped forward. Hence it bubbles upward. You repeat this process until your collection is sorted, from low to high in value.</p><p>Since the last box of each iteration will end with the highest value, you repeat the process by excluding the last boxes.</p><h4>Selection Sort</h4><p>A <strong>selection sort</strong> is sorting a collection by continuously <em>selecting</em> for the lowest value and swapping it to one end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*2a0cRzZpoN7e7vS0sE8_rw.gif" /><figcaption><a href="https://codepumpkin.com/selection-sort-algorithms/">source</a></figcaption></figure><p>So, here you scan through your entire collection to find the lowest value. Once it is found, you swap its content with the box labeled with the lowest index (initially index 0). You repeat this process starting with the next lowest index (index 1) since your lowest value is in its correct position. With every iteration, the range of length for your scan decreases by 1, until your entire collection is sorted from lowest to the highest value.</p><h4>Insertion Sort</h4><p>An <strong>insertion sort</strong> is sorting a collection by <em>inserting</em> each encountered value into its correct position.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*lOADpUyGCRe2VC7Rl7HV9g.gif" /><figcaption><a href="https://gfycat.com/densebaggyibis">source</a></figcaption></figure><p>So here, rather than scanning an entire collection per iteration (i.e., Bubble &amp; Selection Sorts), you start at index 0 &amp; 1 to compare their values. If the later value is lower, if index 1’s contents are lower in value than index 0, you swap their contents. You move to the next box at index 2 and compare to your previously sorted boxes (index 1, then index 0).</p><p>Every time you encounter a higher value, you swap its contents over to the right. When you have found the correct position, you insert the contents (previously at index 2) into the correct box. So, it is as if you “pulling out” the contents of a later box and walking over to an earlier box.</p><p>If the earlier box has a higher value than what you are holding, you move its contents over to the later box. You keep doing this until you find the correct spot to insert what you are holding.</p><h3>Another Simple Data Structure</h3><h4>Key — Value Paired Objects</h4><p>A <strong>key — value paired object</strong> is like an unlabelled set of deposit boxes. Each unique key opens up to a specific piece of data. Unlike an array, it is unordered data that is accessible by unique keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*imCQKPDt1nZx91VzGvucNA.jpeg" /><figcaption><a href="https://cdn.shopify.com/s/files/1/1147/6518/products/safeandvaultstore-sdbx9-safe-deposit-boxes_large.jpg?v=1495593363">source</a></figcaption></figure><p>So, you access a deposit box by using its key (objectName[‘s’]), change its content or create a key that opens up to a specified content (objectName[‘s’] = “Sherlock Holmes”). You can access all keys made for or all content stored in all your deposit boxes (Object.keys(objectName) or Object.values(objectName)).</p><h3>Conclusion</h3><p>Basic <strong>algorithms</strong> (linear &amp; binary searches; bubble, selection &amp; insertion sorts) &amp; <strong>data structures</strong> (array &amp; key-value objects) lead to questions of time &amp; space regarding data management. Considerations of the <strong>time</strong> taken to search, sort or access data and the memory <strong>space</strong> required for these processes can elevate a software developer from computer programming to computer science. It takes you from thinking of programming for efficacy to programming for efficiency.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c0e2d6ae79a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/a-step-towards-computing-as-a-science-algorithms-data-structures-4c0e2d6ae79a">A Step Towards Computing as a Science</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Functional, Object-Oriented, and Procedural Programming]]></title>
            <link>https://levelup.gitconnected.com/functional-object-oriented-procedural-programming-644feda5bcfc?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/644feda5bcfc</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Wed, 30 Jan 2019 03:24:26 GMT</pubDate>
            <atom:updated>2019-07-25T09:35:12.451Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/852/0*5OriWwweR-Z9_HtQ.jpg" /><figcaption><a href="https://www.finerminds.com/personal-growth/personal-growthlife-changing-motivation-dominos/">Image Source</a></figcaption></figure><p><strong>Procedural Programming</strong> is the use of code in a step-wise procedure to develop applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*0Wf_gVG07U_hLWRKZaGR9g.png" /></figure><p>For example, to develop a simple Bank Account App procedurally:</p><ul><li>Creating an account for an individual (account)</li><li>Getting an account to deposit or withdraw funds (getAccount, deposit, withdraw)</li><li>Transferring funds between two different accounts (transfer)</li><li>Recording all changes that occur with all accounts (accounts)</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-x3MxAFW1Rg%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-x3MxAFW1Rg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-x3MxAFW1Rg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbbc6f795c00ee38d0b7dc6938a1c302/href">https://medium.com/media/cbbc6f795c00ee38d0b7dc6938a1c302/href</a></iframe><p><strong>Object Oriented Programming (</strong>OOP<strong>)</strong> is the use of self-contained code (<strong>objects</strong>) to develop applications. In JavaScript, this can be achieved by creating a blueprint (<strong>class</strong>) for manufacturing objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*QvNPMRYJ6we3fffXsVvJMw.png" /></figure><p>A <strong>class</strong> (BankAccount) encapsulates a set of properties (<strong>constructor function</strong>) and behavior (<strong>class functions </strong>deposit<strong>, </strong>withdraw<strong>, and </strong>transfer) that can be used to instantiate an <strong>object </strong>of specific values (i.e: let john = new BankAccount(“John”)). This is typically used to model real-world objects.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FQM7NXG8zcVE%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DQM7NXG8zcVE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FQM7NXG8zcVE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f9d9a20d62cfd21ab02f146272183cac/href">https://medium.com/media/f9d9a20d62cfd21ab02f146272183cac/href</a></iframe><p><strong>Functional Programming</strong> is the use of <strong><em>pure</em></strong> high-order functions to develop applications. This involves a focus on creating code that avoids changing state and mutating data. JavaScript methods such as map, filter, find, and reduce are built such that any data received by a program, functionally coded, will not mutate the original data. Also, the use of <strong>closures </strong>&amp;<strong> currying</strong> makes functional programs simpler to implement and easier to read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*eLD4Q6auoz4XDlq4nOvJow.png" /></figure><p>Here, the data (origin) is not mutated during the creation of new accounts. Rather, a copy of it is created (slice) and merged with a new account (<strong>spread operator</strong>) into a new array (accounts). Accessing an account is also done without mutation (filter). Performance of transactions are done by creating an updated copy (map of accounts).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FbExlVfRuBu0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DbExlVfRuBu0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FbExlVfRuBu0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/55b0a5bfb3eba7935e16ca85cba9aea2/href">https://medium.com/media/55b0a5bfb3eba7935e16ca85cba9aea2/href</a></iframe><p>Unlike OOP, in functional programming there are no objects whose states are continually being updated (i.e.: no John or Joe objects). Rather, copies of an account or the list of accounts are copied, updated, and returned .</p><p><strong>References:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOEfSFrk_KEI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOEfSFrk_KEI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOEfSFrk_KEI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4243dd39f7cb4fbb7f048917e4b51a15/href">https://medium.com/media/4243dd39f7cb4fbb7f048917e4b51a15/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FHboT8g_QSGc%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DHboT8g_QSGc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FHboT8g_QSGc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a95dea409819b23fe00e0fde4f5fda42/href">https://medium.com/media/a95dea409819b23fe00e0fde4f5fda42/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fhy-C4NY7A_8%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dhy-C4NY7A_8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fhy-C4NY7A_8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2665ddd3f427cefe8b19e4a7be775269/href">https://medium.com/media/2665ddd3f427cefe8b19e4a7be775269/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoF9XTJoScOE%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoF9XTJoScOE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoF9XTJoScOE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c75686d289d95bca12be4cfdb29d0d1/href">https://medium.com/media/1c75686d289d95bca12be4cfdb29d0d1/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=644feda5bcfc" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/functional-object-oriented-procedural-programming-644feda5bcfc">Functional, Object-Oriented, and Procedural Programming</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Google Doc of Coding: Git & GitHub]]></title>
            <link>https://medium.com/free-code-camp/the-google-doc-of-coding-git-github-ec103e87926d?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec103e87926d</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[collaboration]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Wed, 23 Jan 2019 01:16:38 GMT</pubDate>
            <atom:updated>2019-02-01T20:30:06.217Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>Google Doc is a server-side (online) word processor. A user’s files are created via a web browser &amp; stored in a server. This software makes it possible for users to share documents with others for collaboration. Normally, the workflow is the following:</p><ul><li>Create a document &amp; fill with content.</li><li>Save content &amp; share file with others for collaboration.</li><li>Members contribute on the same document, online.</li></ul><p>Aside from file sharing, another important feature is the ability to undo or redo changes made to the ‘master’ file. The changes made to the document are sequential and any user can undo (or redo) those changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*LPFDGqFeBqWo2K3LlxsdOg.png" /></figure><p>But, this can quickly become a big mess, especially when multiple users are simultaneously adding or editing content. Who created or changed what content and for what reason is unknown.</p><h3>Atom, Git &amp; GitHub</h3><p>In software development, the tools for collaborative programming consists of a text editor, version control system &amp; an online repository.</p><p><strong>Atom (</strong>or any text editor<strong>) </strong>is like your client-side (desktop) word processor, except the document is code written in some language (i.e: JavaScript).</p><p><strong>Git</strong> is a tool for selectively recording the history of your project’s saved changes. It is a way to ‘<strong>control</strong>’ all the <strong>different versions</strong> of your programming project.</p><p><strong>GitHub</strong> is like your Google Docs, except you can create &amp; save your version of the code offline, before ‘<strong>pushing</strong>’ it to be saved online.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*e5O_94Tw9eUfUAbQVnVr_Q.png" /><figcaption>Atom, Git &amp; GitHub</figcaption></figure><p>So, you have your <strong>text editor</strong> <strong>(</strong>Atom<strong>)</strong>, <strong>version control system (</strong>Git<strong>)</strong> &amp; <strong>remote file storage system (</strong>GitHub<strong>)</strong>. These are the basic elements that solve the problem of collaboration, especially for software developers. The workflow is similar to the use of Google Docs, with some differences.</p><h3>Collaborative Software Development Workflow</h3><ol><li><strong>Create online (</strong>remote<strong>) GitHub repository (</strong><a href="https://github.com/new">https://github.com/new</a><strong>)</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*GLaZAxNU7lC-itWpFFPq2w.png" /></figure><p><strong>2. Create an offline (</strong>local<strong>) repository.</strong> The terminal command <strong>git init</strong> <strong><em>project_name</em></strong> initiates your project by creating a folder to store its content &amp; version control files to store a history of its changes</p><ul><li>The idea is to eventually have a remote &amp; a local copy of your project.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*V7v8JqLtgo9-6OmKdbsbjg.png" /></figure><p><strong>3. Use a text editor to build content.</strong> This is where you begin to write your program with Atom and create your JavaScript files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*zSEcz4mJig3OT6_zGygcDg.png" /><figcaption>Coding with an Atom Text Editor</figcaption></figure><p><strong>4. Save the content &amp; note significant historical progressions in your project.</strong> The terminal command <strong>git add .</strong> adds all folder contents, all the changes, <strong><em>to be committed</em></strong> in history. The command <strong>git commit -m ‘message’</strong> commits the changes to history, along with a message explaining the changes made. The command <strong>git push </strong>pushes your files and historical data to your remote repository.</p><ul><li>As you are continuously making progress in your project, you are recording the rationale behind each stage of development (git add, git commit, git push).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MdjXS2J5jfJCWqmD6bRcBQ.png" /><figcaption>Your remote &amp; local copy grows with every push.</figcaption></figure><p><strong>5. Share file with others for collaboration. </strong>Once your remote repository has content, you can share your project with collaborators.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*N1qsZdqUKnXFJ_HYNbpA_g.png" /></figure><ul><li>After members accept the invitation, they can fork a branch off of the remote repository and clone the project locally (<strong>git clone</strong> <strong><em>&lt;repo url or ssh&gt;</em></strong>).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WS1kYbIJVejKG9hsJayoMw.png" /><figcaption>Originator with two collaborators building content on project clones.</figcaption></figure><ul><li>Each collaborator can build content, save the content and push it to their remote branch.</li><li>As collaborators continue to build and save their content, they end up building forks in the GitHub “sky” (<strong>git add</strong>, <strong>git commit</strong>, <strong>git push</strong>).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uUmlq6J-oxAFkFW3L6EvOw.png" /><figcaption>Originator &amp; Collaborators developing project &amp; pushing it to GitHub.</figcaption></figure><ul><li>Each fork is a collaborator branching off from the original project so that members can work in parallel with the originator, without disrupting each other’s progress. Every time a collaborator performs a <strong>git push</strong>, the fork elongates.</li></ul><p><strong>6. Merge branched files.</strong> At the request of the collaborators, the <strong>originator</strong> can pull their branch to be merged with the master branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dfRzSPLQg5063u7AXwPvEg.png" /><figcaption>Collaborators are pushing &amp; submitting pull requests. The originator is pulling clones &amp; merging the branches.</figcaption></figure><ul><li>When a collaborator submits a pull request, the originator can perform a <strong>git pull</strong> to merge the branches into a single updated version of the project. This new version can then be pushed into the remote repo for all to see and use.</li></ul><h3>Version Control &amp; File Sharing</h3><p>In collaborative software development, changes are made to multiple clones of a master copy, before they are merged to the master file. So the changes made are sequential, but with overlaps in time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*34jSua-w6Ho_S7PGORNYzA.png" /><figcaption>Collaborators forking, pushing &amp; having their branches merged with the Originator, at different times.</figcaption></figure><p>Every new piece of content that is created on a clone is ultimately pushed towards a collaborator’s master repo. Every collaborator’s commit message provides feedback to the originator so that they can make intelligible edits &amp; additions to the original project.</p><p>This would be a difficult feat without <strong>Git’s</strong> version control &amp; <strong>GitHub’s</strong> file sharing. A simple terminal command (<strong>git branch &lt;</strong>branch_name<strong>&gt;</strong>) can take a clone on a local machine and create a branch so that a different version of the project can be developed. A user can then note take their progression (<strong>git add &amp; git commit</strong>) at any point in time. If there were any problems with an active version, the user can simply switch to a previous branch (<strong>git checkout &lt;</strong>branch_name<strong>&gt;</strong>) and continue from there.</p><p>This is the meaning of <strong>version control</strong>. At any point in time, a user can switch to alternate versions of a project, while committing intelligible notes that explain the progression of each version. The user has full control over the versions that are developed. A simple terminal push to the GitHub “clouds” makes any version available to their collaborators. This is the power of using Git &amp; GitHub in collaborative software development.</p><p><strong>References:</strong></p><ul><li><a href="https://git-scm.com/videos">Videos</a></li><li><a href="https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud">Learn Git with Bitbucket Cloud | Atlassian Git Tutorial</a></li><li><a href="https://computer.howstuffworks.com/internet/basics/google-docs5.htm">How Google Docs Works</a></li><li><a href="https://en.wikipedia.org/wiki/Atom_(text_editor)">Atom (text editor) - Wikipedia</a></li><li><a href="https://en.wikipedia.org/wiki/Git">Git - Wikipedia</a></li><li><a href="https://en.wikipedia.org/wiki/GitHub">GitHub - Wikipedia</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec103e87926d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/the-google-doc-of-coding-git-github-ec103e87926d">The Google Doc of Coding: Git &amp; GitHub</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Broad Overview of Application Architecture]]></title>
            <link>https://faun.pub/a-broad-overview-of-application-architecture-5acf98829140?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/5acf98829140</guid>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Sun, 13 Jan 2019 22:02:22 GMT</pubDate>
            <atom:updated>2019-07-18T15:21:23.859Z</atom:updated>
            <content:encoded><![CDATA[<p>In a previous article, I gave a <a href="https://medium.com/@yunglleung1/a-broad-overview-of-the-infrastructure-of-information-technology-784f29dbfc52">Broad Overview of IT Infrastructure</a>. I expressed my goal to understand how software fits in the physical world. Here, I continue building upon that by discussing the architecture of an application.</p><p>The basic functions of an application are essentially <strong>data management</strong>,<strong> application </strong>&amp; <strong>presentation logic</strong>. <strong>Data management</strong> is how the data is stored (i.e. JSON) and accessed (i.e.: SQL). <strong>Application logic</strong> is how the data is changed for use (i.e.: filter, concatenation, computation, etc.). <strong>Presentation logic</strong> is how the data is displayed and interacted with by a client (i.e.: what events there are &amp; how they are handled).</p><p>These three basic functions bring about the different types of application architectures. <strong>Application architecture</strong> asks the question, “Who should manage data, run the application &amp; present the information”. The answer is the server, client or both.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*zKlO95E0-0c8lTdugg-DyA.png" /></figure><p><strong>Server — based architecture</strong> involves having data management &amp; manipulation by the server, so that the client can only interact with the application &amp; database from afar. For example, <strong>Dropbox</strong> is a file sharing app where the users can upload their files through a Dropbox website, to be shared with others via Dropbox servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b1cpGIyN5LvDzwkVbs6pyA.png" /><figcaption>Cloud Computing</figcaption></figure><p><strong>Client — based architecture</strong> is when the entirety of an application is localized within a client’s computer. For example, <strong>Bit Torrent</strong> is a client — side file sharing application where users can choose what files to share from their computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*bBr1c1CmQX5n12Q4RVwdKA.jpeg" /><figcaption>Peer to Peer Computing</figcaption></figure><p><strong>Client — server architecture</strong> is when data management is performed by the server, presentation is done by the client &amp; data manipulation is shared between the server and client. For example, <strong>Microsoft Outlook</strong> is an email manager application enabling users to store their emails from multiple accounts in part on Microsoft’s Exchange Server &amp; in part, offline on their computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*Y8fre0VJvGeCKFcAyDcV6g.png" /><figcaption>Client-Server Computing</figcaption></figure><p>So, the distribution of data management, application &amp; presentation logics is what makes up the <strong>Application Architecture</strong>. But, for any sophisticated application to be interactive, there must be programs that interface between clients &amp; servers. This<strong> application programming interface (</strong>API<strong>)</strong> acts as a middleware that exchanges client requests &amp; server responses. For example, applications such as WhatsApp, Instagram, Snapchat would not work without APIs that interacted between them and a smartphone’s microphone, photo database, camera &amp; GPS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*WZ6E1AN16DBze3JAP4mRJw.png" /></figure><p>An API is the software that connects Apps to its servers.</p><p>Aside from APIs, an App <strong>can run</strong> <strong><em>because</em></strong> of all the different kinds of software it uses as it runs. This <strong>software stack</strong> consists of an operating system (or runtime environment), a database management system, a server &amp; application framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*5ojRs0yXehFt2e0Tp_Cs_w.png" /></figure><p>The <strong>operating system</strong> or <strong>runtime environment</strong> provides to the App the computer’s resources (i.e. memory). An <strong>application framework</strong> is a framework for implementing a standardized coding structure (i.e. Model -View-Controller (MVC), Components).</p><p>When a company is born out from the development of an application, in order to run a business, software is required to run a Web Page, Marketing, Sales &amp; Manufacturing. It is possible to have each business application built from different software stacks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*zXER6F7tXCPZSGrRro9Hzw.png" /></figure><p>A way to run all of these applications within the same computer system is to build <strong>virtual machines (VM)</strong>. VMs are emulations of computer systems. For example, you can have a single computer run VM’s for Linux, Windows &amp; MacOS. So, you start off with a single host server and you end up with multiple servers for each business application (Web Page, Manufacturing…). The problem with VMs is that they are slow and costly in terms of space (GB). This is because each VM is running its own OS.</p><p>If there was some way to contain the dependencies of each application within a single environment of an OS, instead of running a separate OS per application, then it would be possible to run each application instantaneously at the fraction of the size of a single OS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*Nr4LuG6KPwPtlXET8AZRsw.png" /></figure><p>A<strong> container (</strong>i.e.: Docker<strong>)</strong> is a program that that can contain an application and its OS or runtime environment dependencies. In this manner, containers enable the scalability of multiple applications.</p><p>An alternative from employing multiple software developer teams to build each part of the business (Webpage, Manufacturing, …) is to focus on the development of your primary application, while delegating the other parts of the business to micro — services. A <strong>micro — service</strong> is a single function mini-application that can be used to interact with your application via an API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eW-7-ib30f_RhwQ-L7yulQ.png" /></figure><p>In this case, instead of having your machine run multiple containers or multiple VMs, your machine runs only your App. Through the internet, it acquires services from providers of other mini — apps, each of which runs on their own servers. And so, you can start off with a simple app that enables friends to connect with each other (i.e. Facebook), but end up with an app that grows in complexity with features (i.e.: messenger, groups &amp; marketplace) via micro — services.</p><p><strong>References:</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FiyES7UwJfvw%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DiyES7UwJfvw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FiyES7UwJfvw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/879633957c19c0be8f225db4fe912e96/href">https://medium.com/media/879633957c19c0be8f225db4fe912e96/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-WytnzaViD4%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-WytnzaViD4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-WytnzaViD4%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4c664a700482fb0976849ebdea6d4e6/href">https://medium.com/media/a4c664a700482fb0976849ebdea6d4e6/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVECV6r9s5SE%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVECV6r9s5SE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVECV6r9s5SE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/66435c5ad5a9123186ac8df162080ed6/href">https://medium.com/media/66435c5ad5a9123186ac8df162080ed6/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FurzQeD7ftbI%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DurzQeD7ftbI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FurzQeD7ftbI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/db8dfb607d995a10a2340c110209dfc8/href">https://medium.com/media/db8dfb607d995a10a2340c110209dfc8/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fs7wmiS2mSXY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Ds7wmiS2mSXY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fs7wmiS2mSXY%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc0d4b1c7980784e90ccea523d44855d/href">https://medium.com/media/dc0d4b1c7980784e90ccea523d44855d/href</a></iframe><p><a href="https://www.techopedia.com/definition/5466/runtime-environment-rte">What is a Runtime Environment (RTE)? - Definition from Techopedia</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FwuhxSLapDe0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DwuhxSLapDe0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FwuhxSLapDe0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/57096680f731af446e7c8efb49d962b5/href">https://medium.com/media/57096680f731af446e7c8efb49d962b5/href</a></iframe><ul><li><a href="https://docs.microsoft.com/en-us/exchange/architecture/client-access/load-balancing?view=exchserver-2019">Load balancing in Exchange Server</a></li><li><a href="https://exchangeloadbalancer.com/exchange/exchange-2016-server-architecture/">Microsoft Exchange Server 2016 Architecture</a></li><li><a href="https://docs.inductiveautomation.com/display/DOC79/Cloud+Based+Architecture">Cloud Based Architecture - Ignition User Manual 7.9 - Ignition Documentation</a></li><li><a href="http://hibusiness.ca/2017/06/24/landlords-are-not-in-favor-of-people-sharing-rent-information-in-montreal/">Landlords are not in Favor of People Sharing Rent Information in Montreal</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FL1ie8negCjc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DL1ie8negCjc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FL1ie8negCjc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/61c5611207fd6198051681d5999e8a11/href">https://medium.com/media/61c5611207fd6198051681d5999e8a11/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FncAbr-oMHvw%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DncAbr-oMHvw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FncAbr-oMHvw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9dee6961c64185bdc07dd93b50a0e7b3/href">https://medium.com/media/9dee6961c64185bdc07dd93b50a0e7b3/href</a></iframe><p><a href="https://www.pubnub.com/blog/serverless-microservices-with-pubnub-functions/">How to Create Microservices and Go Serverless with PubNub Functions | PubNub</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/0*Piks8Tu6xUYpF4DU" /></figure><p><strong>Join our community Slack and read our weekly Faun topics ⬇</strong></p><figure><a href="https://www.faun.dev/join/?utm_source=medium.com%2Ffaun&amp;utm_medium=medium&amp;utm_campaign=faunmediumbanner"><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oSdFkACJxs5iy1oR" /></a></figure><h4>If this post was helpful, please click the clap 👏 button below a few times to show your support for the author! ⬇</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5acf98829140" width="1" height="1" alt=""><hr><p><a href="https://faun.pub/a-broad-overview-of-application-architecture-5acf98829140">A Broad Overview of Application Architecture</a> was originally published in <a href="https://faun.pub/">FAUN.dev() 🐾</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Broad Overview of the Infrastructure of Information Technology]]></title>
            <link>https://medium.com/@yunglleung1/a-broad-overview-of-the-infrastructure-of-information-technology-784f29dbfc52?source=rss-483a9677bfb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/784f29dbfc52</guid>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Yung L. Leung]]></dc:creator>
            <pubDate>Wed, 09 Jan 2019 00:43:53 GMT</pubDate>
            <atom:updated>2019-01-12T15:58:31.604Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Broad Overview of Information Technology Infrastructure</h3><p><strong>Information Technology (</strong>IT<strong>)</strong> is the technology of using computer systems to store and transfer information. Why is this important and what does it have to do with software development? When you are developing software, it is easy to be engulfed by the metaphysical realm of the digital world. Ever so often, I find it important to take a step back and look at how things as abstract as software fit in to the physical world.</p><p>A locally accessible network of computers (<strong>LAN</strong>) consists of <strong>servers</strong>, <strong>clients</strong> and <strong>network devices</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*el8pNWofodr-BF4McRYbLA.png" /></figure><p>A <strong>client</strong> can be anyone who owns a computer and has access to a local printer, email, or data stored elsewhere. A <strong>server</strong> can be any computer that serves the request of a <strong>client</strong>. For example, a mail server can serve a client’s emails. A <strong>network device</strong> is any device that serves the purpose of connecting computers. This includes a <strong>switch</strong>, <strong>access point</strong>, <strong>router</strong> and <strong>modem</strong>. The <strong>switch</strong> directs the traffic of client requests and server services. An <strong>access point</strong> is a point for computers to wirelessly access a LAN. A <strong>router</strong> are the routes from a modem to the LAN of computers. A <strong>modem</strong> converts digital data from computers to analog transmitted as electricity or light.</p><p>In other words, there are computers set up to serve data requested by clients, through devices that connect the computers. The entirety of this system of interconnected computers is a local access network (<strong>LAN</strong>). When you have multiple LANs connected by modems, you have what is called the <strong>internet, </strong>an internetwork of LANs.</p><p><strong>Twisted Paired Cables</strong> are useful for connecting devices at short distances (100 meters).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*xrR6smt_dW6qHqJP" /></figure><p><strong>Coaxial Cables </strong>are useful for connecting devices at longer distances (500 meters).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*u-MQkAUYozcqFZvm" /></figure><p><strong>Fiber Optics Cables</strong> are useful for connecting devices at great distances (80,000 meters).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3CNz1HsMK5l4o3Kl" /></figure><p>So, <strong>DSL Internet Connection</strong> uses the twisted pair cables of phone lines to connect to a modem (35 Mbps). <strong>Cable Internet Connection</strong> uses coaxial cables for high speed internet (500 Mbps) to connect a modem to an Internet Service Provider (ISP). <strong>Fiber Internet Connection</strong> uses fiber optic cables for higher speeds (1,000 Mbps) to connect a modem to an ISP.</p><p>Most modern devices contain a router, switch &amp; access point packaged together as a single device that connects to the modem. The modem acts as an “access point” to other LANs, to the internet. The quality of data depends on how the analog data is transferred to the modem (twisted pair, coaxial or fiber optics) from the ISP. Although, the direct connection between a computer is still limited to wired Ethernet cables (twisted pair cables) or wireless WiFi (radio waves).</p><p><strong>References:</strong></p><ul><li><a href="https://www.linkedin.com/pulse/usage-differences-coaxial-cable-twisted-pair-fiber-fanny-huang/">Usage And Differences Of Coaxial Cable, Twisted Pair Cable And Fiber</a></li><li><a href="https://community.fs.com/blog/the-difference-between-fiber-optic-cable-twisted-pair-and-cable.html">Fiber Optic Cable vs Twisted Pair Cable vs Coaxial Cable</a></li><li><a href="https://broadbandnow.com/guides/dsl-vs-cable-vs-fiber">DSL vs Cable vs Fiber: Comparing Internet Options</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FV6zJi8CU7Tk%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DV6zJi8CU7Tk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FV6zJi8CU7Tk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/48898589cb2a205faaabbe91bb7a8987/href">https://medium.com/media/48898589cb2a205faaabbe91bb7a8987/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=784f29dbfc52" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>