<?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>Forem: Spenser Brinkman</title>
    <description>The latest articles on Forem by Spenser Brinkman (@spenserbrinkman).</description>
    <link>https://forem.com/spenserbrinkman</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%2F486340%2Faedc01db-9ae8-43a6-8620-17a67795b49e.jpg</url>
      <title>Forem: Spenser Brinkman</title>
      <link>https://forem.com/spenserbrinkman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/spenserbrinkman"/>
    <language>en</language>
    <item>
      <title>Ternary Operations: the 1+ Line If/Else Statement</title>
      <dc:creator>Spenser Brinkman</dc:creator>
      <pubDate>Wed, 31 Mar 2021 22:40:09 +0000</pubDate>
      <link>https://forem.com/spenserbrinkman/ternary-operations-the-1-line-if-else-statement-5969</link>
      <guid>https://forem.com/spenserbrinkman/ternary-operations-the-1-line-if-else-statement-5969</guid>
      <description>&lt;p&gt;If/else statements represent one of the purest forms of programming. Logic gates and conditional functionality is often what makes the tech world go 'round. If/else is so ubiquitous and essential to writing effective code that it is often one of the first concepts and syntaxes learned by new programmers and really shouldn't need much explanation here. In contrast, there exists an alternate form of the if/else, often discovered later in one's learning, called a conditional/ternary operator, or simply ternary. Ternaries can be harnessed to write much more concise and elegant code, but not without the risk of over-complicating things if overused.&lt;/p&gt;

&lt;p&gt;Take, for example, this bland and reductionist if/else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if X
  A;
else
  B;
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above can be transformed into the following ternary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;X ? A : B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Much prettier, concise, and some even say more readable! As stated before, care needs to be taken to not overdo it.&lt;br&gt;
Try turning this into a single-line ternary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if X
  A;
else if Y
  B;
else if Z
  C;
else
  D;
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tecnhically, it can be done. I might consider trying to use a case statement instead of turning this into a ternary, or I might even leave it alone, unchanged. But the point of this article is to show that it &lt;strong&gt;&lt;em&gt;can&lt;/em&gt;&lt;/strong&gt; be done! Check it out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;X ? A : (Y ? B : (Z ? C : D))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I'd argue that this is not easy to read, and might even be considered 'uglier' code than a traditional if/else. But what if we tried some chaining and formatting magic to make it a bit more readable?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;X ? A      // if X is true, do A
: Y ? B    // else if Y is true, do B
: Z ? C    // else if Z is true, do C
: D        // if all else fails, just give up and do D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is functionally identical to our traditional if/else defined above, but with the added bonus of cutting the number of lines used by more than half, and also finishing with (subjectively) more elegant code.&lt;/p&gt;

&lt;p&gt;You can even have multiple actions occur for a condition by separating with commas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;X ? A, C      // if X is true, do A, then do and return C
: Y ? B, D    // else if Y is true, do B, then do and return D
: Z ? C       // else if Z is true, just do C
: D           // if all else fails, give up and just do D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final action in a comma-separated list will be the returned value of the whole ternary operation.&lt;/p&gt;

&lt;p&gt;There are lots of other ways to utilize the ternary operator, with plenty of documentation from &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator"&gt;MDN&lt;/a&gt; to help give you some ideas. The key is to be creative, but don't lose sight of the importance of readability!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React.js/Redux + Drag&amp;Drop</title>
      <dc:creator>Spenser Brinkman</dc:creator>
      <pubDate>Sat, 27 Mar 2021 04:51:28 +0000</pubDate>
      <link>https://forem.com/spenserbrinkman/react-js-drag-drop-2ne9</link>
      <guid>https://forem.com/spenserbrinkman/react-js-drag-drop-2ne9</guid>
      <description>&lt;p&gt;In my most recent project, 'GreenHouse', users manage spaces that may contain any number of house plants. One of my goals with this project was to incorporate as much interactive functionality as I could to provide a fluid user experience. Drag-and-drop was a big step towards this objective. I wanted to be able to drag plants between spaces and update the containing room components appropriately, and accomplishing this was relatively straight-forward to incorporate with my Redux build.&lt;/p&gt;

&lt;p&gt;We start off with two basic components: a PlantCard and a SpaceCard. I'm more familiar with class components, but this functionality might also be achievable using functional components.&lt;/p&gt;

&lt;p&gt;First, our PlantCard&lt;br&gt;
&lt;/p&gt;

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

import React, { Component } from 'react';

class PlantCard extends Component {

  # unrelated PlantCard functionality goes up here

  render() {
    return(
      &amp;lt;ul className='plant-card'&amp;gt;
        # plant information goes here
      &amp;lt;/ul&amp;gt;
    );
  }
}

export default PlantCard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...then our SpaceCard&lt;br&gt;
&lt;/p&gt;

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

import React, { Component } from 'react';

class SpaceCard extends Component {

  # unrelated SpaceCard functionality goes up here

  render() {
    return(
      &amp;lt;div className='space-card'&amp;gt;
        &amp;lt;div className='space-info'&amp;gt;
          # space info goes here
        &amp;lt;/div&amp;gt;
        &amp;lt;div classname='space-plants'&amp;gt;
          {this.props.plants.map(plant =&amp;gt; &amp;lt;PlantCard plant={plant} /&amp;gt;)}
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    );
  }
}

export default SpaceCard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With our basic components set up, we can build in our drag &amp;amp; drop functionality. First, we'll tell our PlantCard about being dragged around.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dragStart = event = {
  const plant = JSON.stringify(this.props.plant);
  event.dataTransfer.setData('plant', plant);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the mouse button is held and dragged away from a Plant component, the component's plant prop is stored in the DataTransfer object under the keyword &lt;code&gt;plant&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;As a safeguard to prevent strange graphical issues, we can also add this function to our PlantCard class component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dragOver = event =&amp;gt; {
  event.stopPropagation();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we'll attach these functions to the HTML elements being rendered by the component, and also assign 'true' to the 'draggable' attribute.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;render () {
  return(
    &amp;lt;ul
      className='plant-card'
      onDragStart={this.dragStart}
      onDragOver={this.dragOver}
      draggable='true'
    &amp;gt;
      # Plant information goes here
    &amp;lt;/ul&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;As for our SpaceCard's ability to receive dropped PlantCards, we'll follow a similar pattern as before.&lt;br&gt;
First thing to note is that D&amp;amp;D will not work if the receiving element doesn't have an 'on drag' function, so we'll define that with a generic &lt;code&gt;event.preventDefault()&lt;/code&gt; as a safeguard for unintended behavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dragOver = event =&amp;gt; {
  event.preventDefault();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next is the powerhouse of the operation, where we actually tell the application to change the plant's associated space to the one it's being dropped upon.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;drop = event =&amp;gt; {
  event.preventDefault();
  const plant = JSON.parse(event.dataTransfer.getData('plant'));
  plant.spaceId = this.props.space.id;
  this.props.editPlant(plant);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's a lot going up there, so we'll break it down line-by-line. We start with a basic preventDefault() again as a catch all (I wish) for unwanted problems. Next, we access the plant data we have saved away by asking for that 'plant' keyword from the DataTransfer object, setting it to a variable. We take that variable, change the necessary attributes (spaceId in this case), and then pass it to a dispatch function provided by our redux store. For the sake of brevity, I've omitted the process of connecting components to the store.&lt;/p&gt;

&lt;p&gt;Finally, we can tell the HTML all about it with a few more changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;render() {
  return(
    &amp;lt;div
      className='space-card'
      onDrop={this.drop}
      onDragOver={this.dragOver}
    &amp;gt;
      &amp;lt;div className='space-info'&amp;gt;
        # space info goes here
      &amp;lt;/div&amp;gt;
      &amp;lt;div classname='space-plants'&amp;gt;
        {this.props.plants.map(plant =&amp;gt; &amp;lt;PlantCard plant={plant} /&amp;gt;)}
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the end, you'll end up with something that can do a little dance like this:&lt;br&gt;
&lt;a href="https://i.giphy.com/media/4Az1YhPwbCSMfZt8rj/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/4Az1YhPwbCSMfZt8rj/giphy.gif" alt="Example GIF of drag and drop"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>html</category>
      <category>redux</category>
    </item>
    <item>
      <title>Making a Responsive Icon Button in JS</title>
      <dc:creator>Spenser Brinkman</dc:creator>
      <pubDate>Thu, 04 Feb 2021 19:23:31 +0000</pubDate>
      <link>https://forem.com/spenserbrinkman/making-a-responsive-icon-button-in-js-41c6</link>
      <guid>https://forem.com/spenserbrinkman/making-a-responsive-icon-button-in-js-41c6</guid>
      <description>&lt;p&gt;I recently wrapped up the initial iteration of my very first JS web application. While I found the crossover between my backend database and my frontend display to be powerful and intriguing, what really excited me was the styling and interactivity of the application. I wanted everything to be sleek, simple, and responsive. One such example can be found in the buttons I included in the header of the application, seen in the top-left and top-right here:&lt;/p&gt;

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

&lt;p&gt;The leaf button and door button, when clicked, render a form for creating a new plant or new room, respectively. My goal was to have the icon change from its initial green color to a contrasting orange when the mouse is hovering over the icon and also when the corresponding form is open, like this:&lt;/p&gt;

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

&lt;p&gt;Accomplishing this is actually quite simple. Since I already had functional buttons rendering their matching form, all I had to do was find a way to change the image displayed upon certain DOM events, specifically on mouse click and on mouse hover.&lt;/p&gt;

&lt;p&gt;My first step was to add both green and orange versions of my button icons into my application's local file structure. An external source can also work for this.&lt;/p&gt;

&lt;p&gt;In my .html file, I added a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with a class &lt;code&gt;green-leaf&lt;/code&gt; to the leaf's &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; tag and a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; with a class &lt;code&gt;green-door&lt;/code&gt; to the door's &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; tag. &lt;/p&gt;

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

&amp;lt;button id="leaf-button"&amp;gt;&amp;lt;div class="green-leaf"&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/button&amp;gt;


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

&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;green-&lt;/code&gt; classes would act a sort of default state for the divs within the buttons.&lt;/p&gt;

&lt;p&gt;In my .css file, I add the following lines:&lt;/p&gt;

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

.green-leaf {
  content: url("../images/green-leaf.png");
}

.orange-leaf {
  content: url("../images/orange-leaf.png");
}

.green-leaf:hover {
  content: url("../images/orange-leaf.png");
}

.green-door {
  content: url("../images/green-door.png");
}

.orange-door {
  content: url("../images/orange-door.png");
}

.green-door:hover {
  content: url("../images/orange-door.png");
}


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

&lt;/div&gt;

&lt;p&gt;Now, when an element has a class of &lt;code&gt;green-leaf&lt;/code&gt;, its content will be sourced from the corresponding url which directs to the local image file of a green leaf. When the class is changed to &lt;code&gt;orange-leaf&lt;/code&gt;, the content will be changed to the url directing to the local image file of an orange leaf. This content change also takes place when the button for a unopened form (depicted by a green icon) is hovered over with the mouse.&lt;/p&gt;

&lt;p&gt;Now all that's left would be to add JS event listeners onto the elements in question. This is also very straight-forward. A very basic example would be as such:&lt;/p&gt;

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

//grab the div containing the image

let leaf = document.querySelector("#leaf-button div")


//add an event listener to the leaf with an anonymous function

leaf.addEventListener("click", function(){
  leaf.classList.toggle("green-leaf")
  leaf.classList.toggle("orange-leaf")
}


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

&lt;/div&gt;

&lt;p&gt;Now every time the button is clicked, it will alternate between having a class of green-leaf or orange-leaf, applying different CSS rules in the process.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>styling</category>
      <category>beginners</category>
      <category>css</category>
    </item>
    <item>
      <title>Basic Rails Website Header</title>
      <dc:creator>Spenser Brinkman</dc:creator>
      <pubDate>Fri, 08 Jan 2021 23:34:24 +0000</pubDate>
      <link>https://forem.com/spenserbrinkman/basic-rails-website-header-32h5</link>
      <guid>https://forem.com/spenserbrinkman/basic-rails-website-header-32h5</guid>
      <description>&lt;p&gt;The header is ultimately one of the most viewed elements of many websites. In most cases, it should be visually simple with a priority on convenient functionality in regard to the user experience.&lt;/p&gt;

&lt;p&gt;I recently built a basic Ruby on Rails application called TreeLogger for keeping inventories of trees on any number of properties belonging to the user. One of the first things I set out to do was build a &lt;em&gt;very&lt;/em&gt; basic but helpful header which would be present across the entire website.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
What I came up with for this early version of my application was this:&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;The logo, composed of a picture of the tree and the text "TreeLogger", acts as a link to the root path of the website.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To the right are three buttons, each with their own functions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The "Properties" button takes the user to the index page of all properties on their account.&lt;/li&gt;
&lt;li&gt;The "Home Page" button actually does the same thing as clicking on the logo, but I chose to build it into a button for those who don't think to click on the logo to go home.&lt;/li&gt;
&lt;li&gt;Finally, the "Log Out" button does what it says and logs a user out of their account.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
The process for building this header is as follows:&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;app/views/layouts/application.html.erb&lt;/code&gt;, start with an empty header tag. This is where the code for our website's header will live.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
We'll need a link to our logo that directs to the root path of our website, for which we'll utilize an ERB expression.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/app/views/layouts/application.html.erb

&amp;lt;header&amp;gt;
  &amp;lt;a href=&amp;lt;%= root_path %&amp;gt;&amp;gt;
  &amp;lt;/a&amp;gt;
&amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
The content displayed as the link will be the logo itself, which is going to be composed of the tree image and the name "TreeLogger" (don't forget to assign alternate text to the image for those using a screen reader for accessibility).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;header&amp;gt;
  &amp;lt;a href=&amp;lt;%= root_path %&amp;gt;&amp;gt;
    &amp;lt;img src="/images/logo.png" alt="TreeLogger Logo" height="35", width="auto"&amp;gt;TreeLogger
  &amp;lt;/a&amp;gt;
&amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
Next, we'll build the three links to appear on the right side of the header using some helpful ERB expressions. These URI paths have been defined in &lt;code&gt;config/routes.rb&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;header&amp;gt;
  &amp;lt;a href=&amp;lt;%= root_path %&amp;gt;&amp;gt;
    &amp;lt;img src="/images/logo.png" alt="TreeLogger Logo" height="35", width="auto"&amp;gt;TreeLogger
  &amp;lt;/a&amp;gt;

  &amp;lt;%= link_to "Properties", properties_path %&amp;gt;
  &amp;lt;%= link_to "Home Page", root_path %&amp;gt;
  &amp;lt;%= link_to "Log Out", logout_path %&amp;gt;
&amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;br&gt;&lt;br&gt;
Here's what we have so far:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F14j4m4xcwzvbhmfn25zu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F14j4m4xcwzvbhmfn25zu.png" alt="Incomplete header"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Not quite right... Let's keep going. First, we'll separate the logo from the other three links and send them to their respective sides of the header. We can accomplish this by placing each "group" of elements into a corresponding &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt; and assigning a special style property to the span meant to live on the right&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;header&amp;gt;
  &amp;lt;span&amp;gt;
    &amp;lt;a href=&amp;lt;%= root_path %&amp;gt;&amp;gt;
      &amp;lt;img src="/images/logo.png" alt="TreeLogger Logo" height="35", width="auto"&amp;gt;TreeLogger
    &amp;lt;/a&amp;gt;
  &amp;lt;/span&amp;gt;

  &amp;lt;span style="float:right;"&amp;gt;
    &amp;lt;%= link_to "Properties", properties_path %&amp;gt;
    &amp;lt;%= link_to "Home Page", root_path %&amp;gt;
    &amp;lt;%= link_to "Log Out", logout_path %&amp;gt;
  &amp;lt;/span&amp;gt;
&amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Getting closer, now to apply a bit more styling to make it presentable. We'll add a class to the logo link and a class to each navigation link, then define the styling for both in the application's CSS stylesheet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/app/views/layouts/application.html.erb

&amp;lt;header&amp;gt;
  &amp;lt;span&amp;gt;
    &amp;lt;a class="logoLink" href=&amp;lt;%= root_path %&amp;gt;&amp;gt;
      &amp;lt;img src="/images/logo.png" alt="TreeLogger Logo" height="35", width="auto"&amp;gt;TreeLogger
    &amp;lt;/a&amp;gt;
  &amp;lt;/span&amp;gt;

  &amp;lt;span style="float:right;"&amp;gt;
    &amp;lt;%= link_to "Properties", properties_path, class: "navButton" %&amp;gt;
    &amp;lt;%= link_to "Home Page", root_path, class: "navButton" %&amp;gt;
    &amp;lt;%= link_to "Log Out", logout_path, class: "navButton" %&amp;gt;
  &amp;lt;/span&amp;gt;
&amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/app/assets/stylesheets/application.scss

a.logoLink {
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    font-size: 300%;
  }

a.navButton {
    background-color: rgb(25, 78, 38);
    border: none;
    color: white;
    padding: 7px 14px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 4px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
    border: 2px solid #4CAF50;
  }

a.navButton:hover {
    background-color: white;
    color: black
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which will give us the final look of:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmzqv23j3m6h91jiv6cnr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fmzqv23j3m6h91jiv6cnr.png" alt="Complete header"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Lastly, let's have the appearance of the navigation buttons be conditional to whether the user is logged in or not, using a &lt;code&gt;logged_in?&lt;/code&gt; method which is a commonly defined custom method used for authentication in many basic Rails applications. This leaves us with our final code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;header&amp;gt;
  &amp;lt;span&amp;gt;
    &amp;lt;a class="logoLink" href=&amp;lt;%= root_path %&amp;gt;&amp;gt;
      &amp;lt;img src="/images/logo.png" alt="TreeLogger Logo" height="35", width="auto"&amp;gt;TreeLogger
    &amp;lt;/a&amp;gt;
  &amp;lt;/span&amp;gt;

  &amp;lt;% if logged_in? %&amp;gt;
    &amp;lt;span style="float:right;"&amp;gt;
      &amp;lt;%= link_to "Properties", properties_path, class: "navButton" %&amp;gt;
      &amp;lt;%= link_to "Home Page", user_path(current_user), class: "navButton" %&amp;gt;
      &amp;lt;%= link_to "Log Out", logout_path, class: "navButton" %&amp;gt;
    &amp;lt;/span&amp;gt;
  &amp;lt;% end %&amp;gt;
&amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, if there is no user logged in, the header appears only as:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsh8y1xpriusfenxy7sbh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsh8y1xpriusfenxy7sbh.png" alt="Header when logged out"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
      <category>html</category>
    </item>
    <item>
      <title>Embedded RuBy (ERB)</title>
      <dc:creator>Spenser Brinkman</dc:creator>
      <pubDate>Mon, 23 Nov 2020 01:30:56 +0000</pubDate>
      <link>https://forem.com/spenserbrinkman/embedded-ruby-erb-he9</link>
      <guid>https://forem.com/spenserbrinkman/embedded-ruby-erb-he9</guid>
      <description>&lt;h6&gt;
  
  
  &lt;code&gt;closing_statement = "Thanks for reading!"&lt;/code&gt;
&lt;/h6&gt;

&lt;p&gt;An effective web developer's toolkit should incorporate a diverse and practical range of technologies that can be coordinated to achieve a robust final product. One such example of a technology at the disposal of a programmer is Embedded Ruby. There are a few popular implementations of Embedded Ruby. One such implementation is included in the Ruby standard library and is called "ERB".&lt;/p&gt;

&lt;p&gt;Through ERB, one is able to write dynamic text files (such as HTML documents to be viewed as web pages) using integrated Ruby code and logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Exempli Gratia&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Let's say I wanted a web page to display something like this:&lt;/p&gt;

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

&lt;p&gt;I could write an HTML document as such:&lt;/p&gt;

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

&lt;p&gt;But with the power of ERB, I can achieve the same results by having my application require the 'erb' gem and writing the following code in a .erb file*:&lt;/p&gt;

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

&lt;p&gt;In the example above, you might notice two unfamiliar tags:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Execution tags, represented with &lt;code&gt;&amp;lt;% some ruby code %&amp;gt;&lt;/code&gt; (also known as ice cream cones) to create what are called "scriptlets"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expression tags, represented with &lt;code&gt;&amp;lt;%= some ruby code %&amp;gt;&lt;/code&gt; (otherwise aptly called squid tags) to create "expressions"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scriptlets are the purest form of embedded Ruby, in that they covertly execute the enclosed Ruby code upon any HTML elements indicated. A user won't ever actually &lt;em&gt;see&lt;/em&gt; the results from a scriptlet, but they will see the effects they bring upon the HTML elements being executed upon. Expressions, on the other hand, will run Ruby code and display, as a string, the returned value of said code.&lt;/p&gt;

&lt;p&gt;In other words, going off of the above example, line 1's scriptlet initiates a loop to be run 10 times. The only code within our loop's block is an expression on line 2 which returns a literal string of "Hello, World!" followed by an HTML &amp;lt;br&amp;gt; tag to create a line-break. Line 3 wraps up the code with another scriptlet, this time indicating the end of our loop's block.&lt;/p&gt;

&lt;h3&gt;
  
  
  In Summary
&lt;/h3&gt;

&lt;p&gt;This elementary example is just a taste of the power of ERB. Any code that can be written in a plain .rb file can also be interpreted in scriptlets and expressions. A programmer could, theoretically, write the entire codebase for their ruby-based web application all within a single .erb file.**&lt;/p&gt;

&lt;p&gt;Documentation for ERB is as extensive as the technology itself is powerful, so if one means to take advantage of it's utility, there are many avenues to research, such as the rubyonrails.org &lt;a href="https://guides.rubyonrails.org/layouts_and_rendering.html" rel="noopener noreferrer"&gt;RailsGuide&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  &lt;code&gt;closing_statement = "Thanks for reading!"&lt;/code&gt;
&lt;/h6&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;&amp;lt;%= closing_statement %&amp;gt;&lt;/code&gt;
&lt;/h3&gt;

&lt;h6&gt;
  
  
  *Convention &lt;em&gt;often&lt;/em&gt; dictates that the file should be ended with the document type followed by .erb, as in "example_file.html.erb". This helps to avoid confusion about exactly what type of document is being acted on by Ruby code without having to open the file to investigate.
&lt;/h6&gt;

&lt;h6&gt;
  
  
  **Writing an entire application in a single .erb file is not recommended.
&lt;/h6&gt;

</description>
      <category>ruby</category>
      <category>erb</category>
      <category>html</category>
      <category>eruby</category>
    </item>
    <item>
      <title>Adding flavor to a Ruby CLI application</title>
      <dc:creator>Spenser Brinkman</dc:creator>
      <pubDate>Sun, 25 Oct 2020 23:57:20 +0000</pubDate>
      <link>https://forem.com/spenserbrinkman/adding-flavor-to-a-ruby-cli-application-4jae</link>
      <guid>https://forem.com/spenserbrinkman/adding-flavor-to-a-ruby-cli-application-4jae</guid>
      <description>&lt;p&gt;The CLI terminal is a technology infamous for its ability to repel and render useless the sharpest of minds raised in a graphical environment like Windows and iOS.  The absence of color, abrupt flow of text, no-nonsense and matter-of-fact atmosphere that pervades its very essence.  These are the cornerstones of what makes the terminal such an intimidating force for those unfamiliar with its hidden power and potential.&lt;/p&gt;

&lt;p&gt;I have only recently begun my journey towards understanding the nuance and mystery of one of the most fundamentally instrumental tools developed across the history of computers.  The first 'major' project I built from scratch was a Jeopardy game, meant to be played by one player in the terminal.  As someone who comes from a Windows-only household, the lack of graphics and animation in an application (especially a game) is unsettling to me, and so it was only natural that I try to inject some stylistic elements into my program to make it a bit more approachable.&lt;/p&gt;

&lt;p&gt;There are a number of tools available to one wishing to spice up a terminal application.  I've put together a short list of some of the things I was able to exploit to bring my solo-Jeopardy game from "technically playable" to "nearly enjoyable".&lt;/p&gt;

&lt;h1&gt;
  
  
  Alignment
&lt;/h1&gt;

&lt;p&gt;By default, the terminal justifies all text to the left side of the screen.  This is fine in most scenarios, but for the purpose of my program, I wanted most of my output to appear centered in the screen.&lt;/p&gt;

&lt;p&gt;I thought myself clever to just add a carefully counted number of spaces in front of every single line of text to be output in my program, until I stumbled upon the very handy &lt;a href="https://ruby-doc.org/core-2.7.2/String.html#method-i-center"&gt;&lt;code&gt;.center()&lt;/code&gt;&lt;/a&gt; method, which can be called on a string to be output.  This method centers the string in a provided argument of width as a number of characters.&lt;/p&gt;

&lt;p&gt;I used the Ubuntu terminal for my Jeopardy application, so I went into Ubuntu's settings on full-screen and determined the maximum width of my terminal to be 172 characters on my 13.3" laptop screen.  Then, centering the text of my program was as easy as appending &lt;code&gt;.center(172)&lt;/code&gt; to each string in my code which I wanted to be centered when output.&lt;/p&gt;

&lt;p&gt;If you add a second argument to &lt;code&gt;.center()&lt;/code&gt;, the padding on each side of your string will be changed from empty spaces to the character provided as a second argument!&lt;/p&gt;

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

&lt;h1&gt;
  
  
  Colorize
&lt;/h1&gt;

&lt;p&gt;A useful and well-known Ruby gem is &lt;a href="https://github.com/fazibear/colorize"&gt;Colorize&lt;/a&gt;.  Colorize allows programmers to add colorful output to their CLI application with varying degrees of customization.  The simplest use of the gem, once installed, is to append the method &lt;code&gt;.blue&lt;/code&gt; or &lt;code&gt;.red&lt;/code&gt;, or any other color supported by the gem, to change the color of output text. Follow the text color method with &lt;code&gt;.on_green&lt;/code&gt; or &lt;code&gt;.on_white&lt;/code&gt; etc to give the output a background color!&lt;/p&gt;

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

&lt;h1&gt;
  
  
  .sleep
&lt;/h1&gt;

&lt;p&gt;To a user unfamiliar with a text-based terminal, it is sometimes shocking to be faced with an enormous wall of text after entering a single input.  "Where do I even begin to start reading?  Where did my input end up?"  Something I like to utilize in order to make outputs more digestible is the &lt;a href="https://apidock.com/ruby/Kernel/sleep"&gt;sleep()&lt;/a&gt; method.  This method, simply put, tells the program to sleep for a number of seconds (including floats with fractional seconds), given as an argument.  The program will wait that number of seconds, and then resume.  A few well placed &lt;code&gt;sleep(0.5)&lt;/code&gt; or &lt;code&gt;sleep(1)&lt;/code&gt; can make a long wall of text much more readable for users, instead of spitting the text out all at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put it all together!
&lt;/h2&gt;

&lt;p&gt;Throw in a few &lt;code&gt;30.times {puts ""}&lt;/code&gt; and you've got yourself a simple but refined introduction screen that would make even Trebek proud!&lt;/p&gt;

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

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

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

</description>
      <category>ruby</category>
      <category>cli</category>
      <category>design</category>
      <category>jeopardy</category>
    </item>
    <item>
      <title>The Big "Why?"</title>
      <dc:creator>Spenser Brinkman</dc:creator>
      <pubDate>Fri, 09 Oct 2020 19:36:02 +0000</pubDate>
      <link>https://forem.com/spenserbrinkman/the-big-why-4j7n</link>
      <guid>https://forem.com/spenserbrinkman/the-big-why-4j7n</guid>
      <description>&lt;p&gt;Prompted with the question "&lt;em&gt;Why did you decide to study Software Engineering?&lt;/em&gt;," one looks to their history of experiences had and choices made leading up to such a fundamental change in life direction. Whitewater raft guide, tree climber, park groundskeeper, national park interpreter, produce manager--these hats, and more, make up the varied background I've built up as a part of the blue-collar workforce since my 16th birthday. I am thankful for these jobs, as I was able to pay my way through college with minimal debt to show for it. However, due to the physically intense nature of such work, my body experienced measurable decline and I was faced with a dilemma: stay the course and be forced by my body into an early retirement or jump ship and forge a path to a more fruitful and sustainable career and future. The choice, at this point, was easy for me to make, and so I decided to make a change.&lt;/p&gt;

&lt;p&gt;But this does not answer the question of "&lt;em&gt;Why?&lt;/em&gt;" as in "Why study coding?," but instead answers "&lt;em&gt;Why &lt;strong&gt;not&lt;/strong&gt; continue to do what you've already been doing?&lt;/em&gt;"&lt;/p&gt;

&lt;p&gt;As I considered alternate career paths that would utilize my mind over body, I read more about the skills required of a programmer and I realized that I fit the bill. As a lifelong enthusiast of logic puzzles and exercises in critical thinking, along with an affinity for math, creativity, and memorization; my hyper-focus for detail; and my ability to organize multiple evolving ideas at once, I became confident in my aptitude to become a successful software engineer.&lt;/p&gt;

&lt;p&gt;Fast forward three months and I am two weeks into a 20 week software engineering bootcamp. So far, any doubts I started with have fallen to the recesses of my mind and I am more sure than ever that the choice to jump head-first into this program was the right one. If anything, I wistfully wish I had made the change sooner. But, at least, I made the change.&lt;/p&gt;

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