<?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: Joseph Knopke</title>
    <description>The latest articles on DEV Community by Joseph Knopke (@jrknopke).</description>
    <link>https://dev.to/jrknopke</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%2F537225%2F005515af-40b0-4593-9a58-fe4d4ed74e0e.png</url>
      <title>DEV Community: Joseph Knopke</title>
      <link>https://dev.to/jrknopke</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jrknopke"/>
    <language>en</language>
    <item>
      <title>Props vs. State in React</title>
      <dc:creator>Joseph Knopke</dc:creator>
      <pubDate>Thu, 07 Oct 2021 16:50:00 +0000</pubDate>
      <link>https://dev.to/jrknopke/props-vs-state-in-react-1nfi</link>
      <guid>https://dev.to/jrknopke/props-vs-state-in-react-1nfi</guid>
      <description>&lt;p&gt;One question that came up when working with React was: What's the difference between &lt;code&gt;props&lt;/code&gt; and &lt;code&gt;state&lt;/code&gt;? But before we explore their difference, let's look at their similarities: &lt;code&gt;Props&lt;/code&gt; and &lt;code&gt;state&lt;/code&gt; are both plain javascript objects, and they both hold information that affects the render output in a component.&lt;/p&gt;

&lt;p&gt;The key difference between the two is that &lt;code&gt;props&lt;/code&gt; is passed down from the parent component to its children, whereas &lt;code&gt;state&lt;/code&gt; is created and managed within the component. &lt;code&gt;Props&lt;/code&gt; is therefore immutable, and should not be changed, only passed down. &lt;code&gt;State&lt;/code&gt;, on the other hand, is changeable, internal to the component, and is therefore not passed down to children components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Props
&lt;/h2&gt;

&lt;p&gt;Since &lt;code&gt;props&lt;/code&gt; cannot change during a component's lifecycle, they should be used when handling information that does not need to be acted on or edited. These components are known as "pure" or "stateless" components.&lt;/p&gt;

&lt;h2&gt;
  
  
  State
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;State&lt;/code&gt; should therefore be used to handle changes internal to a component. When a stateful component first mounts, it is given an initial or default state. Based on user interactions, this default state will change and be re-rendered. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;setState()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Using the &lt;code&gt;setState()&lt;/code&gt; method, state can be mutated. It is important to note that &lt;code&gt;setState()&lt;/code&gt; is asynchronous, and should therefore be passed a function instead of an object. This will ensure that &lt;code&gt;setState()&lt;/code&gt; is always passed the most recent version of &lt;code&gt;state&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Here is an example from the reactjs official documentation:&lt;/p&gt;

&lt;p&gt;The below function will not work as intended, because &lt;code&gt;setState()&lt;/code&gt; is being passed an object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;incrementCount() {
  this.setState({count: this.state.count + 1});
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead, the above should be written like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;incrementCount() {
  this.setState((state) =&amp;gt; {
    return {count: state.count + 1}
  });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because a function is being passed, the &lt;code&gt;incrementCount()&lt;/code&gt; updater will act on the current state, and be able to chain its updates. Before, with &lt;code&gt;this.state&lt;/code&gt; the updates would act upon the default state value each time, which is not the desired action.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;To review, &lt;code&gt;Props&lt;/code&gt; are immutable values that are passed down from parent components to their children. Props cannot be changed during a component's lifecycle.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;State&lt;/code&gt; is handled within a component and is "private" to that component. It starts with a default value that changes over time based on user interactions. &lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Reducers: Confusing Yet Convenient</title>
      <dc:creator>Joseph Knopke</dc:creator>
      <pubDate>Mon, 27 Sep 2021 12:22:21 +0000</pubDate>
      <link>https://dev.to/jrknopke/reducers-confusing-yet-convenient-5gp9</link>
      <guid>https://dev.to/jrknopke/reducers-confusing-yet-convenient-5gp9</guid>
      <description>&lt;p&gt;When I was first introduced to Redux, Reducers were extremely difficult to wrap my head around. They seemed like an unnecessary source of headaches and confusion. I quickly learned how wrong I was.&lt;/p&gt;

&lt;p&gt;See, Reducers are actually beautifully simple. At its core, a Reducer is a function that accepts the current &lt;code&gt;state&lt;/code&gt; and an &lt;code&gt;action&lt;/code&gt; as arguments, and returns a new &lt;code&gt;state&lt;/code&gt; in result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(state, action) =&amp;gt; newState
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An important note here is that Reducers must not mutate the initial or current state - they always produce a new state following an action.&lt;/p&gt;

&lt;p&gt;A Reducer can therefore be the perfect way to help with any CRUD functionality you might need. Simply call one of the &lt;code&gt;case&lt;/code&gt;s defined in your Reducer through a function defined in an &lt;code&gt;actions&lt;/code&gt; file&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>javascript</category>
      <category>rails</category>
    </item>
    <item>
      <title>Self and This</title>
      <dc:creator>Joseph Knopke</dc:creator>
      <pubDate>Thu, 26 Aug 2021 12:53:40 +0000</pubDate>
      <link>https://dev.to/jrknopke/self-and-this-3jp0</link>
      <guid>https://dev.to/jrknopke/self-and-this-3jp0</guid>
      <description>&lt;p&gt;The &lt;code&gt;self&lt;/code&gt; keyword in ruby is used to access the current object, depending on the context in which it is used. For example, when used in an instance method, &lt;code&gt;self&lt;/code&gt; refers to an instance of the class. When used in a class, &lt;code&gt;self&lt;/code&gt; refers to the Object of whichever class it's used in. This allows for code that's easier to read and change, and also useful for debugging purposes.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;this&lt;/code&gt; keyword in javascript has some similarities to &lt;code&gt;self&lt;/code&gt; in ruby, but also some key differences. &lt;/p&gt;

&lt;p&gt;The value of &lt;code&gt;this&lt;/code&gt; depends heavily on the context in which it is called, and also whether it is called in strict-mode or non-strict-mode. In the global context, &lt;code&gt;this&lt;/code&gt; will refer to the global object, which is often the window object. In the context of a function, the value of &lt;code&gt;this&lt;/code&gt; will depend on how the function is called. If the value of &lt;code&gt;this&lt;/code&gt; is not set by the call, it will automatically default to the global object.&lt;/p&gt;

&lt;p&gt;In the context of a Class, &lt;code&gt;this&lt;/code&gt; is a regular object, similar to &lt;code&gt;self&lt;/code&gt; in ruby. &lt;code&gt;This&lt;/code&gt; can be used in the constructor function of a class, and becomes self-referential. &lt;/p&gt;

&lt;p&gt;When the &lt;code&gt;bind()&lt;/code&gt; method is used, &lt;code&gt;this&lt;/code&gt; will become bound to the first argument of &lt;code&gt;bind&lt;/code&gt;, regardless of the context in which it is used.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;This&lt;/code&gt; seems like a more confusing keyword than &lt;code&gt;self&lt;/code&gt; in ruby, but it is also extremely useful and important when using Javascript. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>ruby</category>
    </item>
    <item>
      <title>HTML Form Elements</title>
      <dc:creator>Joseph Knopke</dc:creator>
      <pubDate>Thu, 04 Mar 2021 08:29:40 +0000</pubDate>
      <link>https://dev.to/jrknopke/html-form-elements-3alg</link>
      <guid>https://dev.to/jrknopke/html-form-elements-3alg</guid>
      <description>&lt;p&gt;When creating a HTML form, the  tag can be a jack of all trades. &lt;code&gt;&amp;lt;input type="text"&amp;gt;&lt;/code&gt; prompts a user with a small text box. &lt;code&gt;&amp;lt;input type="button"&amp;gt;&lt;/code&gt; prompts the user with a clickable button. There are a bunch of other input types including "email","username","password","checkbox", and of course "submit".&lt;/p&gt;

&lt;p&gt;All of these input types cover alot of bases, but there are a couple of other HTML form elements that can be useful too. Here's some others that I used when making my first Sinatra app, which lets users make their own custom spells for D&amp;amp;D.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;h3&gt;The &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; Element&lt;/h3&gt;&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;&amp;lt;textarea&amp;gt;&lt;/code&gt; tag creates a larger input field for when you want to give the user more room to respond. In my spellmaker app, I wanted the user to have more room for the spell description, so I did the following:&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;label for="desc"&amp;gt;Description:&amp;lt;/label&amp;gt;

&amp;lt;textarea name="desc" rows="5" cols="50"&amp;gt;Type Description here...&amp;lt;/textarea&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The size of the textarea can be adjusted with the rows and cols attributes, and if you'd like to have some sort of message or default text in the box, just place it in between the start and end tags!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;h3&gt;The &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; Element&lt;/h3&gt;&lt;/strong&gt;&lt;br&gt;
The &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; tag creates a drop down list. Perfect for presenting the user with a selection of options, like Schools of magic:&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;label for="school"&amp;gt;School:&amp;lt;/label&amp;gt;
    &amp;lt;select name="school"&amp;gt;
        &amp;lt;option value="Abjuration"&amp;gt;Abjuration&amp;lt;/option&amp;gt;
        &amp;lt;option value="Conjuration"&amp;gt;Conjuration&amp;lt;/option&amp;gt;
        &amp;lt;option value="Divination"&amp;gt;Divination&amp;lt;/option&amp;gt;
        &amp;lt;option value="Enchantment"&amp;gt;Enchantment&amp;lt;/option&amp;gt;
        &amp;lt;option value="Evocation"&amp;gt;Evocation&amp;lt;/option&amp;gt;
        &amp;lt;option value="Illusion"&amp;gt;Illusion&amp;lt;/option&amp;gt;
        &amp;lt;option value="Necromancy"&amp;gt;Necromancy&amp;lt;/option&amp;gt;
    &amp;lt;/select&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the user can select from a curated list of options. You'll notice we simply use the &lt;code&gt;&amp;lt;option&amp;gt;&lt;/code&gt; tag to make each option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The &lt;code&gt;&amp;lt;fieldset&amp;gt;&lt;/code&gt; Element&lt;/strong&gt;&lt;br&gt;
This tag is a way of breaking up a form into two separate boxes. I didn't actually use this one for my project, but here's an example nonetheless:&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;form&amp;gt;
  &amp;lt;fieldset&amp;gt;
    &amp;lt;legend&amp;gt;Person:&amp;lt;/legend&amp;gt;
    &amp;lt;label for="fname"&amp;gt;First name:&amp;lt;/label&amp;gt;
    &amp;lt;input type="text" id="fname" name="fname"&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
    &amp;lt;label for="lname"&amp;gt;Last name:&amp;lt;/label&amp;gt;
    &amp;lt;input type="text" id="lname" name="lname"&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;fieldset&amp;gt;
    &amp;lt;legend&amp;gt;Pet:&amp;lt;/legend&amp;gt;
    &amp;lt;label for="pname"&amp;gt;Name:&amp;lt;/label&amp;gt;
    &amp;lt;input type="text" id="pname" name="pname"&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;input type="submit" value="Submit"&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a stylistic element that draws a box around different parts of your form. The &lt;code&gt;&amp;lt;legend&amp;gt;&lt;/code&gt; tag can be used to caption each box.&lt;/p&gt;

</description>
      <category>html</category>
    </item>
    <item>
      <title>Building a CLI Spell Finder for D&amp;D 5e</title>
      <dc:creator>Joseph Knopke</dc:creator>
      <pubDate>Sun, 10 Jan 2021 22:15:11 +0000</pubDate>
      <link>https://dev.to/jrknopke/building-a-cli-spell-finder-for-d-d-5e-4l7j</link>
      <guid>https://dev.to/jrknopke/building-a-cli-spell-finder-for-d-d-5e-4l7j</guid>
      <description>&lt;p&gt;It took me longer than I'd like to admit to come up with an idea for this CLI project to end Phase 1. I spent several days trying to wrap my head around using APIs and scraping, but I still found myself ridiculously confused on even just the basics of navigating an API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/2fTOT5PhBUdJbDeVLH/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img width="75%" src="https://i.giphy.com/media/2fTOT5PhBUdJbDeVLH/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After watching and rewatching a dozen different videos and lectures on APIs, I thought I was finally ready to start working on my own project. The public API that immediately caught my eye was a database for &lt;a href="https://www.dnd5eapi.co/docs/#base"&gt;D&amp;amp;D 5e&lt;/a&gt;. While i'm not the most knowledgable or experience D&amp;amp;D player, it is a game that I thoroughly enjoy playing. On top of that, this API is incredibly readable and user-friendly, as it allows access to a vast amount of information through a variety of endpoints. &lt;/p&gt;

&lt;p&gt;When beginning my project, I decided to narrow my focus on spells, as it was a large enough pool of data to play around with, but not so large where I could get lost on my first ruby CLI project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l0ExsgrTuACbtPaqQ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img width="66%" src="https://i.giphy.com/media/l0ExsgrTuACbtPaqQ/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My first idea was allowing the user to search for a spell by name, then returning a bunch of relevant data about the spell they searched for. I knew I would need a class that created different Spell objects, as well as a class to get those objects from the API.&lt;/p&gt;

&lt;p&gt;Implementing this functionality was simple enough: I just need to get user input, use the &lt;strong&gt;downcase&lt;/strong&gt; and &lt;strong&gt;gsub&lt;/strong&gt; methods to add the correct formatting, and then plug the result into the url.&lt;/p&gt;

&lt;p&gt;(I know I said it was "simple enough," but you won't believe how excited I was when I finally was able to return a hash I could use and pull data from)&lt;/p&gt;

&lt;p&gt;The resulting hash contained a bunch of information about the inputted spell, but I noticed something strange about the formatting pretty quickly. &lt;strong&gt;Some of the keys had array values, while some had string values&lt;/strong&gt;. I know this is exceedingly common, but when I first tried pulling info from my hash it definitely tripped me up. &lt;/p&gt;

&lt;p&gt;With enough prying around, I was able to return the values I wanted, but just when I thought I was good to go- &lt;strong&gt;AN ERROR&lt;/strong&gt;!!!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;undefined method `[]' for nil:NilClass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After scratching my head for a while, I realized that one of the attributes I was pulling from the spell's hash must've had an empty value. See, I was searching through the hash and defining instance variables like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="vi"&gt;@damage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;spell_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"damage"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s2"&gt;"damage_at_slot_level"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But what if my spell doesn't have any damage?? An empty value would still be assigned to @damage, and trying to call the damage getter method results in our error.&lt;/p&gt;

&lt;p&gt;So, I needed to change my code so that spells without damage would simply return Damage:N/A, rather than breaking my code.&lt;/p&gt;

&lt;p&gt;I come up with the block below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;spell_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"damage"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;spell_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"damage"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s2"&gt;"damage_at_slot_level"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
            &lt;span class="vi"&gt;@damage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;spell_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"damage"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="s2"&gt;"damage_at_slot_level"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;
            &lt;span class="vi"&gt;@damage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"N/A"&lt;/span&gt;
        &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I paired this with the code below, in order to actually return a value in my CLI class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vi"&gt;@spell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;damage&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s2"&gt;"N/A"&lt;/span&gt;
      &lt;span class="vi"&gt;@spell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;damage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;each&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;lvl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dmg&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
           &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"Level &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;lvl&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;: &lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;dmg&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; damage"&lt;/span&gt;
      &lt;span class="k"&gt;end&lt;/span&gt;
   &lt;span class="k"&gt;else&lt;/span&gt;
      &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s2"&gt;"N/A"&lt;/span&gt;
   &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By implementing this code, I made sure my program wouldn't break when presented with a spell that didn't have a damage value. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/XreQmk7ETCak0/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img width="66%" src="https://i.giphy.com/media/XreQmk7ETCak0/giphy.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While it may be a simple solution upon reflection, overcoming this error felt like a big success at the time! I added some more functionality to the program: allowing users to search for a list of spells by level or by school of magic. Also, after the search results were presented, I allowed for users to either search again or exit the application.&lt;/p&gt;

&lt;p&gt;I know this is a super basic project, but it was definitely exciting to see the potential of a CLI. Building out the app on my own was definitely a rewarding process (albeit frustrating at times). &lt;/p&gt;

&lt;p&gt;I'm already thinking about the ways I could expand the current application!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>cli</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Two weeks in...</title>
      <dc:creator>Joseph Knopke</dc:creator>
      <pubDate>Sun, 20 Dec 2020 23:16:08 +0000</pubDate>
      <link>https://dev.to/jrknopke/two-weeks-in-2oho</link>
      <guid>https://dev.to/jrknopke/two-weeks-in-2oho</guid>
      <description>&lt;p&gt;My first exposure to computer programming was 8 years ago, when I took Visual Basic in highschool. While Visual Basic is virtually extinct now, it was still a good introduction to the world of code, to the capabilities, theories, and purposes of computer programming. Eight years later, with all of that Visual Basic knowledge long gone, I find myself learning the basics of a computer programming language yet again. &lt;/p&gt;

&lt;p&gt;Over the past couple weeks, while working through labs and attending study groups, I have also been asking myself - Why? Why am I completely changing my career path, doing something that doesn't really relate to my bachelor's degree or previous lines of work? &lt;/p&gt;

&lt;p&gt;The first thing that attracted me to flatiron's software engineering program was simply the usefulness and practicality of a software engineering degree. Obviously coding is a widely applicable skillset, something that can be used in a variety of different fields and markets. &lt;/p&gt;

&lt;p&gt;Another thing that initially attracted me to programming was just the process of creation that takes place. Throughout my academic experience, I was constantly involved in the creation of things: essays, stories, poems, plays, musicals, drawings. While these things are vastly different from computer programs and software, the process of creation is still similar.&lt;/p&gt;

&lt;p&gt;I'm happy to say that, two weeks in, I still feel good about my decision to enroll in the software engineering program at flatiron. There have definitely been ups and downs, but all in all I have been thoroughly interested in the content, and I have enjoyed the learning process. &lt;/p&gt;

&lt;p&gt;The most exciting moments have come when talking and working with classmates over zoom: I have received a lot of help and guidance from the people in my cohort, and I know that they will continue to be an important resource for the rest of the course.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
