<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Colby Sanchez Wagenbach</title>
    <description>The latest articles on DEV Community by Colby Sanchez Wagenbach (@colbysanchbach).</description>
    <link>https://dev.to/colbysanchbach</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F925130%2Ff8d4ad31-67d1-4885-9645-0dc1bddf0b3f.jpeg</url>
      <title>DEV Community: Colby Sanchez Wagenbach</title>
      <link>https://dev.to/colbysanchbach</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/colbysanchbach"/>
    <language>en</language>
    <item>
      <title>Intro to Singly Linked Lists for the JavaScript Developer</title>
      <dc:creator>Colby Sanchez Wagenbach</dc:creator>
      <pubDate>Sat, 25 Mar 2023 01:48:14 +0000</pubDate>
      <link>https://dev.to/colbysanchbach/intro-to-singly-linked-lists-for-the-javascript-developer-24mk</link>
      <guid>https://dev.to/colbysanchbach/intro-to-singly-linked-lists-for-the-javascript-developer-24mk</guid>
      <description>&lt;p&gt;&lt;strong&gt;IF YOU ARE HERE FOR A PLAIN ENGLISH/JS EXPLANATION OF DATA STRUCTURES AND LINKED LISTS, PLEASE SCROLL PAST INTRODUCTION&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I'm beginning this series with the intended audience of JavaScript developers emerging fresh from a web development boot camp. Many boot camp graduates are unaware that they already possess the skills necessary to construct the very data structures they may be asked about in interviews. This series is meant to be a guide to translating your hands-on JavaScript skills into the abstract (and &lt;em&gt;needlessly inaccessible!&lt;/em&gt;) world of algorithms.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Structures
&lt;/h3&gt;

&lt;p&gt;A linked list represents a particular type of a data structure. Both "linked list" and "data structure" are terms coming from computer science. A &lt;em&gt;data structure&lt;/em&gt; at it's most simple is a collection of values, the relationships between those values, and the means available to act upon those values. Data structures are built upon the simpler primitive types. An array represents the data structure most familiar to JavaScript developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Linked Lists
&lt;/h3&gt;

&lt;p&gt;If arrays are collections of elements (individual data points) in a set order, where each element may be accessed individually by its index, how do linked lists differ? A &lt;strong&gt;linked list&lt;/strong&gt; is a linear collection of &lt;em&gt;nodes&lt;/em&gt;. Each node contains two elements, a value and a pointer. (Doubly linked lists have two pointers and will be discussed in a later post.) A node's value is the data point itself, and a node's pointer indicates the next node in the list. The first node in a linked list we call the &lt;em&gt;head&lt;/em&gt;, and the final node in a list we call the &lt;em&gt;tail&lt;/em&gt;. Here is an example of a linked list, &lt;code&gt;myLinkedList&lt;/code&gt;, in the form of a JavaScript object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myLinkedList = {
    head: {
        value: 10,
        next: {
            value: 15,
            next: {
                value: 20, 
                next: {
                    value: 25,
                    next: {
                        value: 30,
                        next: null
                    }
                }
            }
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value associated with each node increments by 5, starting at 10 and ending at 30. The &lt;code&gt;head&lt;/code&gt; key indicates the first node in the list. Each node is itself an object with two properties, &lt;code&gt;value&lt;/code&gt; and &lt;code&gt;next&lt;/code&gt;, &lt;code&gt;next&lt;/code&gt; being the pointer. The value of the &lt;code&gt;value&lt;/code&gt; property is the data point itself, while the &lt;code&gt;next&lt;/code&gt; property's value is a nested object, the next node in the list! This is the "pointing" done by the pointer. The tail of the linked list points to &lt;code&gt;null&lt;/code&gt;, indicating the end of the list.&lt;/p&gt;

&lt;h3&gt;
  
  
  Contrasts with Arrays
&lt;/h3&gt;

&lt;p&gt;First, and most importantly, a given node in a linked list can not be accessed by some given index. To explain this further, consider &lt;code&gt;myLinkedList&lt;/code&gt; with the same data points laid out in an array: &lt;code&gt;[10, 15, 20, 25, 30]&lt;/code&gt;. If we wanted to access the data point with a value of 25, we might grab its index based on its distance from the start &lt;code&gt;array[3]&lt;/code&gt;, or knowing it's proximity to the end of the array, we might say &lt;code&gt;array[array.length - 2]&lt;/code&gt;. It's almost as if the pointer is built into arrays. You don't need to tell the element after element[0] that it's element[1], it just is. Regardless, there is an index that allows us to grab the individual element. Let's return to &lt;code&gt;myLinkedList&lt;/code&gt;. If we wanted to grab the 25 value, we could access it with &lt;code&gt;myLinkedList.head.next.next.next.value&lt;/code&gt;. Not only is this cumbersome and impractical (.next.next.next.next . . .), but what if we don't know the contents of a list beforehand, or its length?&lt;/p&gt;

&lt;p&gt;Unlike arrays, &lt;em&gt;linked lists must be traversed.&lt;/em&gt; This method of navigating through a list will become more clear with demonstration in the next post, when we begin to design a generic singly linked list. &lt;/p&gt;

&lt;h3&gt;
  
  
  Why Linked Lists Now?
&lt;/h3&gt;

&lt;p&gt;You likely made it through boot camp without once encountering a linked list. Web developers do not often need to be familiar with the nuances of computer science, although data structures certainly mark an element of CS one can expect to confront in engineering interviews. &lt;/p&gt;

&lt;p&gt;To most immediately answer the question: Why haven't I done this yet throughout my web dev journey? &lt;em&gt;The point is that this is abstract. That's why you haven't done it and might not have been taught it.&lt;/em&gt; What you'll come to see is that you were certainly taught all the &lt;em&gt;tools&lt;/em&gt; in boot camp, the matter at hand is properly understanding the task you are assigned. &lt;/p&gt;

&lt;p&gt;In the next post, we'll go over using class constructors to design and build our own custom Linked List class.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>algorithms</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 2: Web Development</title>
      <dc:creator>Colby Sanchez Wagenbach</dc:creator>
      <pubDate>Wed, 08 Mar 2023 01:10:02 +0000</pubDate>
      <link>https://dev.to/colbysanchbach/day-2-web-development-1jd</link>
      <guid>https://dev.to/colbysanchbach/day-2-web-development-1jd</guid>
      <description>&lt;h1&gt;
  
  
  Day 2 - Debugging (already)
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Vision
&lt;/h2&gt;

&lt;p&gt;I thought today I'd get to finish building the home page, but as soon as I sat down to execute &lt;code&gt;npm run dev&lt;/code&gt;, the application crashed and I was served&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;[Error: UNKNOWN: unknown error, readlink 'C:\Users\colby\OneDrive\Desktop\chowder-kettle\chowder-kettle-web\.next\static\webpack\pages'] {&lt;br&gt;
  errno: -4094,&lt;br&gt;
  code: 'UNKNOWN',&lt;br&gt;
  syscall: 'readlink',&lt;br&gt;
  path: 'C:\\Users\\colby\\OneDrive\\Desktop\\chowder-kettle\\chowder-kettle-web\\.next\\static\\webpack\\pages'&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;I'd encountered this same error weeks ago when finishing the Next.js tutorial included on their website. I chose to dig deeper on the matter this time around.&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging
&lt;/h2&gt;

&lt;p&gt;After some fruitless googling, I followed the file path &lt;code&gt;C:\\Users\\colby\\OneDrive\\Desktop\\chowder-kettle\\chowder-kettle-web\\.next\\static\\webpack\\pages&lt;/code&gt; and discovered a series of inscrutable files therein. I was able to extract some plain text from these files which returned results directing me towards configuring my debugger in VS Code. I created a file in the root of the project's directory .vscode/launch.json and added in the following code to the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Next.js: debug server-side",
            "type": "node-terminal",
            "request": "launch",
            "command": "npm run dev"
        },
        {
            "name": "Next.js: debug client-side",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:3000"
        },
        {
            "name": "Next.js: debug full stack",
            "type": "node-terminal",
            "request": "launch",
            "command": "npm run dev",
            "serverReadyAction": {
                "pattern": "started server on .+, url: (https?://.+)",
                "uriFormat": "%s",
                "action": "debugWithChrome"
            }
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Following directions found on Stack Overflow, I ran the dubugging console and was ultimately returned the message "autoprefixer: start value has mixed support, consider using flex-start instead". I went into the Home.modules.css file I'd created for the NavBar yesterday and updated  &lt;code&gt;display: flex; justify-content: start; align-items: start&lt;/code&gt; to &lt;code&gt;display: flex; justify-content: flex-start; align-items: flex-start&lt;/code&gt;. This circumvented the matter and got the development environment properly running. &lt;/p&gt;

&lt;h2&gt;
  
  
  Home Page
&lt;/h2&gt;

&lt;p&gt;Debugging took me about two hours to work through, and after I began building a Profile component, I quickly realized that I would need to pull data from Firebase if I wanted to authentically model this component in development (As I write this, I realize that I could also hard-code in values to placehold for data; potential route to pursue tomorrow). This line of thought pulled me towards configuring user authentication, and that matter led into my currently non-existent login page. Tomorrow I plan to begin with building the login page and ensuring user authentication is properly configured. &lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;p&gt;One thing I realized towards the end of my work day was that I'd left yesterday's terminal session still running. Scrolling through it, I began to discover that when I was still working yesterday, I'd received a series of warnings that explained the issue the compiler was having with start vs. flex-start. While in live development, the compiler was able to reconcile the issue, when I was trying to reload the development environment, the compiler would not move past the issue it was encountering. Essentially, if I had paid more attention to the warnings I was receiving, I would have saved the time I spent deciphering a far more complex error message.&lt;/p&gt;

&lt;p&gt;Additionally, I realize I need to approach developing the application more programmatically. Whereas yesterday I came in with the set goal of designing the navbar component, today I set myself the broader task of designing the remainder of the homepage. I ignored my concern about the need to pull data, and as soon as I encountered that issue, I was stunted in my ability to immediately move forward. When planning my days, I must ensure I am staying granular so that development continues to move forward, so that days and hours are not lost to incessant reorientation.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>css</category>
      <category>nextjs</category>
      <category>react</category>
    </item>
    <item>
      <title>Web Development: Day 1</title>
      <dc:creator>Colby Sanchez Wagenbach</dc:creator>
      <pubDate>Tue, 07 Mar 2023 02:00:52 +0000</pubDate>
      <link>https://dev.to/colbysanchbach/web-development-day-1-4bim</link>
      <guid>https://dev.to/colbysanchbach/web-development-day-1-4bim</guid>
      <description>&lt;h1&gt;
  
  
  Day 1 - NavBar Component
&lt;/h1&gt;

&lt;p&gt;Today I undertook to develop a custom navigation bar from scratch for the first time since learning how to utilize the Bootstrap API. With a wireframe I drew over the weekend to guide me, a trial-by-fire refresher on flexboxes, and responsive CSS units, I wound up with a  &lt;strong&gt;still in development&lt;/strong&gt; Navigation bar that conformed with my skeletal mock-up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges
&lt;/h2&gt;

&lt;p&gt;Historically, I've had difficulty tracking the &lt;code&gt;display&lt;/code&gt; property when planning a front-end. I credit React's functional components with forcing me to think much more atomically about the DOM, and thus children elements and their inheritance. &lt;/p&gt;

&lt;h2&gt;
  
  
  globals.css
&lt;/h2&gt;

&lt;p&gt;I knew that I wanted the NavBar to display on every single page across the application, so I scoped it's styling globally. To start, I set properties for the entire document:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html,
body {
  padding: 0;
  margin: 0;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: hidden;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next.JS adds in a root &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with an id of &lt;code&gt;__next&lt;/code&gt;. In order to frame the content of the application proportionally inside of the page, I added styling to this root element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#__next {
  height: 83.3vh;
  width: 83.3vw;
  display: flex;
  flex-direction: row;
  align-items: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The NavBar itself consisted of five buttons evenly spaced out in a column. I wanted the buttons to all stretch to fill the same space regardless of their text input. Here's what I came up with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.navbar {
  height: 83.3vh;
  width: 27.7vw;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.navitem {
  width: 100%;
  height: 20%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar button {
  width: 16.6vw;
  height: 8.3vh;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Takeaways
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Responsive Units
&lt;/h3&gt;

&lt;p&gt;CSS has built-in units which make proportional, responsive sizing easy to do. &lt;code&gt;vh&lt;/code&gt; and &lt;code&gt;vw&lt;/code&gt; stand for 'viewport height' and 'viewport width,' respectively, and 1 unit of each represents 1% of the viewport's corresponding dimension. I used a straight-edge and pencil when developing the wireframe for the webpage, and I had anticipated a maze of&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;.nav { height: ??%; width: ??% }&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
 in getting the page to render as desired. Instead, using some middle-school mathematics, I was able to quickly determine the desired sizes in relative terms that translated directly into &lt;code&gt;vw&lt;/code&gt;s and &lt;code&gt;vh&lt;/code&gt;s. Not only does the sizing quickly translate, but it is &lt;em&gt;already responsive&lt;/em&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  Display
&lt;/h3&gt;

&lt;p&gt;I left today thinking that the element that is receiving the &lt;code&gt;display: flex&lt;/code&gt; property is being told "You will digest your immediate children in this matter." Cronus imagery aside, the flexbox reaches down &lt;em&gt;only one level&lt;/em&gt;. This insight seriously assisted in reasoning out where and how each element would land. &lt;/p&gt;

&lt;h2&gt;
  
  
  Status Update
&lt;/h2&gt;

&lt;p&gt;I ended the day with an extremely raw form of the navbar, but I am satisfied with it's geometry, so to speak. Tomorrow I'll take to building out the remainder of the homepage. &lt;/p&gt;

</description>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
