<?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: Meg Gutshall</title>
    <description>The latest articles on DEV Community by Meg Gutshall (@meg_gutshall).</description>
    <link>https://dev.to/meg_gutshall</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%2F100968%2F61b8a7af-6c2e-4cc3-9205-d2e06c47c762.jpg</url>
      <title>DEV Community: Meg Gutshall</title>
      <link>https://dev.to/meg_gutshall</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meg_gutshall"/>
    <language>en</language>
    <item>
      <title>Everyday Inspiration</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Fri, 20 Nov 2020 16:21:32 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/everyday-inspiration-520d</link>
      <guid>https://dev.to/meg_gutshall/everyday-inspiration-520d</guid>
      <description>&lt;p&gt;For my fourth portfolio project during what is beginning to feel like my tenure as an online coding bootcamp student, I decided to create a tool specifically for my particular track at the Flatiron School—at least that's what my project started out as, but I'll save &lt;em&gt;that&lt;/em&gt; story for a different blog post. I'm (still) enrolled in Flatiron School's online software engineering self-paced track and unlike the part-time and full-time cohorts, we aren't beholden to a set schedule where we have to keep up with the rest of the group week to week. Instead, self-paced students are allotted a 15-month period to complete their coursework and graduate, after which they have the option to purchase time extensions.&lt;/p&gt;

&lt;p&gt;When I enrolled at Flatiron School, there was no hard and fast time period in which self-paced students had to complete their coursework, which is part of the reason why I'm still steadily working through the curriculum to this day. I like to jokingly refer to myself as a "lifer." I made use of this flexible schedule to dive deeper into topics that I didn't fully understand as well as take advantage of unique opportunities that came my way. However, the flexibility does make it difficult to prioritize coursework over other things such as open source collaboration, networking, and side projects, which is probably another reason why I haven't completed my coursework yet. Nonetheless, I've reached the final stretch and I'm determined to finish this curriculum within the next few months.&lt;/p&gt;

&lt;p&gt;Being a self-paced student has its pros and cons, but the main concern of this project is the support we receive from our instructors. When I began this project, we had a team of four dedicated self-paced instructors sharing the duties of holding office hours and conducting topic-based lectures, among other tasks. These sessions were held live over Zoom to enable student interaction and the topic-based lectures were almost always recorded for students who couldn't attend the original study group session. I experienced some &lt;em&gt;&lt;strong&gt;absolutely incredible&lt;/strong&gt;&lt;/em&gt; learning breakthroughs in these study groups that I know I &lt;strong&gt;never&lt;/strong&gt; could have had by watching a video recording alone. Actually, the very fact that Flatiron School provided these study groups was a huge influence in my decision to enroll in their program over another coding bootcamp I was considering.&lt;/p&gt;

&lt;p&gt;Since these sessions have impacted my learning experience so profoundly, when I had the idea to create a tool that would fulfill the requirements of the curriculum's fourth portfolio project and add value to Flatiron's self-paced student community, I got right to work!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Original Idea
&lt;/h2&gt;

&lt;p&gt;As I alluded to in the first sentence of this post, right now I'm talking about my &lt;em&gt;&lt;strong&gt;original&lt;/strong&gt;&lt;/em&gt; project idea, not what the finished product turned out to be (&lt;a href="https://meghangutshall.com/2019/08/17/knowing_when_to_quit"&gt;sound familiar?&lt;/a&gt;). Keep that in mind as you read through the rest of this post.&lt;/p&gt;

&lt;p&gt;Originally, I wanted to create a web app that would enable Flatiron students in the online self-paced software engineering track to make study group topic requests. They would then be able to see all topic requests and upvote the ones they like. This way the Flatiron instructors would be able to better tell which topics their students need more support with and plan their study groups accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Models
&lt;/h2&gt;

&lt;p&gt;I decided to create three models for this project: &lt;code&gt;User&lt;/code&gt;, &lt;code&gt;Upvote&lt;/code&gt;, and &lt;code&gt;Req&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Below, you can see my model map which displays each model's attributes and associations.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Confession Time:&lt;/strong&gt; Okay, truthfully my original app used the model name &lt;code&gt;Request&lt;/code&gt; instead of &lt;code&gt;Req&lt;/code&gt;, but when I got to the frontend part of my project I hit a major issue. I had errors popping up all over my console and had &lt;strong&gt;no idea&lt;/strong&gt; where they were coming from! Then I got the notion to look up JavaScript's reserved words and—what do you know—&lt;code&gt;Request&lt;/code&gt; is one of them! I changed it here because I didn't want to use examples of bad code through my blog post. I promise the rest of this post is all factually accurate, exactly as it happened!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a id="model-map"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gqY-5klR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n92ki9k5i37juedni0dw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gqY-5klR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n92ki9k5i37juedni0dw.jpg" alt="Model Map (v1)" title="Model Map (v1)"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Enum Attributes
&lt;/h3&gt;

&lt;p&gt;There's one thing I want to highlight in the &lt;code&gt;User&lt;/code&gt; model before we move on. Since this app is meant to be used by different types of users, I created a user enum attribute called &lt;code&gt;role&lt;/code&gt;, which assigns the user one of the roles I predefined: &lt;code&gt;student&lt;/code&gt;, &lt;code&gt;instructor&lt;/code&gt;, or &lt;code&gt;super_admin&lt;/code&gt;. See example 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="c1"&gt;# app/models/user.rb&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
  &lt;span class="n"&gt;enum&lt;/span&gt; &lt;span class="ss"&gt;role: &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:student&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:instructor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:super_admin&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

  &lt;span class="c1"&gt;# Alternatively you can use...&lt;/span&gt;
  &lt;span class="c1"&gt;# enum role: { student: 0, instructor: 1, super_admin: 2 }&lt;/span&gt;
  &lt;span class="c1"&gt;# This is a more explicit way of defining an enum attribute&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You &lt;strong&gt;must&lt;/strong&gt; define the enum attribute's values in the model &lt;strong&gt;before&lt;/strong&gt; adding the enum attribute to the model in the database (aka running a migration). In other words, run your migration for the model as normal &lt;strong&gt;except&lt;/strong&gt; leave out the enum attribute. Then in the model file, define the enum attribute's values as shown in the example above. Now run another migration adding the enum attribute to your model as an &lt;code&gt;integer&lt;/code&gt; value. It's a good idea to set the default value to &lt;code&gt;0&lt;/code&gt; as well so that each new instance of the model automatically takes on the first value in the enum attribute's list of values. Below is the migration code I used to add &lt;code&gt;role&lt;/code&gt; as an enum attribute &lt;strong&gt;after&lt;/strong&gt; I created my &lt;code&gt;User&lt;/code&gt; model and defined &lt;code&gt;role&lt;/code&gt;'s attribute values.&lt;/em&gt;&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="c1"&gt;# app/db/migrate/date_add_role_to_users.rb&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AddRoleToUsers&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Migration&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;6.0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;change&lt;/span&gt;
    &lt;span class="n"&gt;add_column&lt;/span&gt; &lt;span class="ss"&gt;:users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:role&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:integer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;default: &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the &lt;code&gt;role&lt;/code&gt; enum attribute allows the different types of users to interact with the app in different ways depending on which &lt;code&gt;role&lt;/code&gt; they've been assigned. I won't go any further into enums, but in the future I plan to write a more detailed post about this handy type of attribute and its many built-in methods.&lt;/p&gt;

&lt;h3&gt;
  
  
  Associations
&lt;/h3&gt;

&lt;p&gt;As you can see in the model map above, &lt;code&gt;Upvote&lt;/code&gt; acts as the join table between &lt;code&gt;Student&lt;/code&gt; (an alias for &lt;code&gt;User&lt;/code&gt;) and &lt;code&gt;Req&lt;/code&gt;. This creates two types of student-owned requests:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Type 1:&lt;/strong&gt; When a &lt;code&gt;Student&lt;/code&gt; creates a new &lt;code&gt;Req&lt;/code&gt;&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="c1"&gt;# app/models/user.rb&lt;/span&gt;

  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
    &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:reqs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;foreign_key: :student_id&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;  &lt;span class="c1"&gt;# app/models/req.rb&lt;/span&gt;

  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Req&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
    &lt;span class="n"&gt;belongs_to&lt;/span&gt; &lt;span class="ss"&gt;:student&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;class_name: &lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Type 2:&lt;/strong&gt; When a &lt;code&gt;Student&lt;/code&gt; creates an &lt;code&gt;Upvote&lt;/code&gt; on an existing &lt;code&gt;Req&lt;/code&gt;&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="c1"&gt;# app/models/user.rb&lt;/span&gt;

  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
    &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:upvotes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;foreign_key: :student_id&lt;/span&gt;
    &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:upvoted_reqs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;through: :upvotes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;source: :reqs&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;  &lt;span class="c1"&gt;# app/models/upvote.rb&lt;/span&gt;

  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Upvote&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
    &lt;span class="n"&gt;belongs_to&lt;/span&gt; &lt;span class="ss"&gt;:student&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;class_name: &lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;
    &lt;span class="n"&gt;belongs_to&lt;/span&gt; &lt;span class="ss"&gt;:req&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;  &lt;span class="c1"&gt;# app/models/req.rb&lt;/span&gt;

  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Req&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
    &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:upvotes&lt;/span&gt;
    &lt;span class="n"&gt;has_many&lt;/span&gt; &lt;span class="ss"&gt;:supporting_students&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;through: :upvotes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;source: :student&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Look and Feel
&lt;/h2&gt;

&lt;p&gt;Since this app was targeting a distinct group of people—online self-paced software engineering students at Flation School—I decided to model it after Flatiron's Learn.co curriculum platform, specifically their login functionality, curriculum topics, and study group dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YK4x-Fhj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z3ko5fw8xs6ykqih5bie.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YK4x-Fhj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z3ko5fw8xs6ykqih5bie.jpg" alt="Flatiron study group dashboard" title="Flatiron School's study group dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  User Flow
&lt;/h2&gt;

&lt;p&gt;In my mind, the user flow would go something like this:&lt;/p&gt;

&lt;h3&gt;
  
  
  Login
&lt;/h3&gt;

&lt;p&gt;The student logs into the web app using their Flatiron School credentials or GitHub OAuth and is immediately directed to the study group dashboard. From there, they have the ability to navigate the app to view other students' requests or create their own request.&lt;/p&gt;

&lt;p&gt;It's worth noting that creating any type of authentication system was by no means part of the project requirements, but the way my app was designed and modeled made it difficult to picture the app being used without this feature included.&lt;/p&gt;

&lt;h3&gt;
  
  
  Navigating the App
&lt;/h3&gt;

&lt;p&gt;The study group dashboard has a sidebar which contains a list of Flatiron's software engineering curriculum modules. This is also how the requests are ordered. Instead of being grouped and ordered by date like Flatiron's study group dashboard, they're grouped and ordered by module. The students can either scroll through the dashboard or select an option from the sidebar to jump to that particular module. If they find a request they like, they can click the "Upvote" button, optionally leaving a comment with their upvote. Doing so will add to that request's total number of upvotes and boost its popularity ranking. The upvote will then appear at the top of the dashboard along with the student's other upvotes and any requests they themselves had previously created.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a New Request
&lt;/h3&gt;

&lt;p&gt;Once the student has logged in, they'll see a "Create a New Request" button in the menu bar. Clicking this will open a modal form in which the student can input the request topic, select the appropriate module from a dropdown menu, and provide further information about the request in the description textarea field. Upon clicking "Submit", the modal disappears, the study group dashboard scrolls to the module that was input via the form's dropdown menu, and an alert is triggered asking the student to make sure they're not submitting a duplicate request (the alternative being to upvote and leave a comment on the request they would be duplicating). The student then either opts to cancel their request, edit their request, or submit their request as is. Their request will then appear at the top of the dashboard along with their previously submitted requests and any upvotes they've created on other students' requests.&lt;/p&gt;

&lt;h3&gt;
  
  
  Logout
&lt;/h3&gt;

&lt;p&gt;Also upon login, a "Logout" button will appear in the menu which the student can click to be logged out of the web app. Again, this is not part of the project requirements but if you have a login... you gotta have a logout too.&lt;/p&gt;

&lt;h2&gt;
  
  
  In the End
&lt;/h2&gt;

&lt;p&gt;Ultimately, I did not go forward with this particular plan. There were several reasons why, which as I said earlier could be a blog post on its own—and maybe it will be some day. Instead, I created a very similar app with almost identical functions, but instead the resulting study sessions are meant to be a "crowdsourced" activity. Hopefully I'll be able to find or create a community that will really embrace this idea of self-teaching and I can see where it goes. Until then, I plan to redesign my finished project to be more easily expandable and find something &lt;em&gt;slightly&lt;/em&gt; more sophisticated than vanilla JavaScript to use when building the frontend.&lt;/p&gt;

</description>
      <category>womenintech</category>
      <category>codingbootcamp</category>
      <category>rails</category>
      <category>studygroups</category>
    </item>
    <item>
      <title>Slipsum L. Jackson</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Wed, 16 Oct 2019 04:19:23 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/slipsum-l-jackson-blog-post-3khl</link>
      <guid>https://dev.to/meg_gutshall/slipsum-l-jackson-blog-post-3khl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Author's Note&lt;/strong&gt; (11/12/20)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My original blog post was flagged by the DEV Team for violating the Code of Conduct.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Here's the email they sent me:&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rWTCqwND--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vn0p9q1rpa7jtchuxqfp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rWTCqwND--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vn0p9q1rpa7jtchuxqfp.png" alt="DEV Code of Conduct warning email"&gt;&lt;/a&gt;&lt;/p&gt;
For the record, my name is spelled Meghan



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I'm not going to complain about the "free speech police" or anything like that. I could have used a different, less-controversial Lorem Ipsum generator as an example in my post—though it's interesting how even Lorem Ipsum generators cause controversies nowadays—however, I highly admire Samuel L. Jackson and think he's a &lt;strong&gt;brilliant&lt;/strong&gt; actor so I wanted to use this one. The language that violated the DEV Community's Code of Conduct was all produced by the Lorem Ipsum generator and includes iconic dialog from his many films.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I understand the value of creating a safe community and have decided to respect the wishes of the DEV team. That being said, I do think it's a bit ridiculous to flag a post for quoting immensely popular works of cinematography. I've thought for a while about how I can adhere to DEV's CoC while maintaining the integrity of my original post and have decided to take the following steps:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;I am going to redact this post, but leave the canonical version unredacted.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;I am including citation links on each generated quote which take you directly to the quote's IMDb page. This is to assist readers who would like further information on the movies themselves. I'm a fierce advocate for documentation as I believe that it's an easy and universal way to disseminate knowledge to others.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;I have come across a large list of other Lorem Ipsum generators since first writing this post which I've included in this update. This gives the readers a plethora of options to pick from for their own Lorem Ipsum uses.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;You can find &lt;a href="https://meghangutshall.com/2019/03/29/slipsum_l_jackson_blog_post/"&gt;the original post&lt;/a&gt; and others on &lt;a href="https://meghangutshall.com/blog/"&gt;my personal blog&lt;/a&gt;. Please enjoy!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Slipsum L. Jackson (Redacted)
&lt;/h2&gt;

&lt;p&gt;I created this blog post as part of a demonstration in a recent Code Talk session I recorded about the Flatiron student blogs. Feel free to check out the video below and &lt;a href="http://bit.ly/code-talk-flatiron-blog"&gt;view the session notes here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Hvq6u0CW6R0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I know this post is full of &lt;code&gt;REDACTED&lt;/code&gt; words. It's actually a bunch of monologues given by one of my favorite actors, Samuel L. Jackson. I found this awesome tool called &lt;a href="https://slipsum.com/"&gt;Samuel L. Ipsum&lt;/a&gt; that will generate "mother&lt;code&gt;REDACT&lt;/code&gt;ing placeholder text mother&lt;code&gt;REDACT&lt;/code&gt;er". If this isn't for you, search "Lorem Ipsum" generators and I'm sure you'll be able to find something to your liking, perhaps &lt;a href="http://www.catipsum.com/index.php#.XJ7RhutKhTa"&gt;Cat Ipsum&lt;/a&gt; so you can "litter your copy with more kitty"? :)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Author's Note:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I have since stumbled across &lt;a href="https://github.com/templeman/awesome-ipsum"&gt;an Awesome List of Lorem Ipsum generators&lt;/a&gt;. There's something for everyone in here!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you know of a Lorem Ipsum generator that is &lt;strong&gt;not&lt;/strong&gt; on this list, try your hand at open source contribution by submitting a pull request to add it!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Now take it away Mr. Jackson...
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Cnl0rNws--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/i2v7o84f0k525xvq21n7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Cnl0rNws--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/i2v7o84f0k525xvq21n7.jpg" alt="Samuel L. Jackson as Jules Winnfield from Pulp Fiction"&gt;&lt;/a&gt;&lt;/p&gt;
Photo sourced from Samuel L. Ipsum website



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Look, just because I don't be givin' no man a foot massage don't make it right for Marsellus to throw Antwone into a glass mother&lt;code&gt;REDACT&lt;/code&gt;in' house, &lt;code&gt;REDACT&lt;/code&gt;in' up the way the &lt;code&gt;REDACT&lt;/code&gt;er talks. Mother&lt;code&gt;REDACT&lt;/code&gt;er do that shit to me, he better paralyze my &lt;code&gt;REDACTED&lt;/code&gt;, 'cause I'll kill the mother&lt;code&gt;REDACT&lt;/code&gt;er, know what I'm sayin'?&lt;/em&gt; &lt;sup&gt;[&lt;a href="https://www.imdb.com/title/tt0110912/quotes/qt0447127"&gt;1&lt;/a&gt;]&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;My money's in that office, right? If she start giving me some &lt;code&gt;REDACTED&lt;/code&gt; about it ain't there, and we got to go someplace else and get it, I'm gonna &lt;code&gt;REDACT&lt;/code&gt; you in the head then and there. Then I'm gonna &lt;code&gt;REDACT&lt;/code&gt; that &lt;code&gt;REDACTED&lt;/code&gt; in the kneecaps, find out where my &lt;code&gt;REDACTED&lt;/code&gt; money is. She gonna tell me too. Hey, look at me when I'm talking to you, mother&lt;code&gt;REDACT&lt;/code&gt;er. You listen: we go in there, and that &lt;code&gt;REDACTED&lt;/code&gt; Winston or anybody else is in there, you the first mother&lt;code&gt;REDACT&lt;/code&gt;er to get &lt;code&gt;REDACTED&lt;/code&gt;. You understand?&lt;/em&gt; &lt;sup&gt;[&lt;a href="https://www.imdb.com/title/tt0119396/quotes/qt0427338"&gt;2&lt;/a&gt;]&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr. Glass.&lt;/em&gt; &lt;sup&gt;[&lt;a href="https://www.imdb.com/title/tt0217869/quotes/qt0525308"&gt;3&lt;/a&gt;]&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers. And you will know My name is the Lord when I lay My vengeance upon thee.&lt;/em&gt; &lt;sup&gt;[&lt;a href="https://www.imdb.com/title/tt0110912/quotes/qt0447157"&gt;4&lt;/a&gt;]&lt;/sup&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The above is just a sample of some text you can generate with the &lt;a href="https://slipsum.com/"&gt;Samuel L. Ipsum&lt;/a&gt; tool.&lt;/p&gt;

</description>
      <category>womenintech</category>
      <category>jekyll</category>
      <category>githubpages</category>
      <category>blogging</category>
    </item>
    <item>
      <title>Creating Rxeactions</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Wed, 16 Oct 2019 04:19:10 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/creating-rxeactions-48a7</link>
      <guid>https://dev.to/meg_gutshall/creating-rxeactions-48a7</guid>
      <description>&lt;h2&gt;
  
  
  Project Idea
&lt;/h2&gt;

&lt;p&gt;When I was in college, I was diagnosed with generalized anxiety disorder. Since then, I have changed psychiatrists several times and have added major depression and PTSD to my list of diagnoses. Over the course of the past decade, between seeking treatment from different doctors (each with their own preferred methods of therapy) and receiving new diagnoses, I've been on a LOT of different medications. Unfortunately, I couldn't tell you what most of them were, let alone the dosage.&lt;/p&gt;

&lt;p&gt;This is where the idea for Rxeactions stemmed from. When I would see a new psychiatrist and we would discuss prescription medications, they would ask me for a history which I wouldn't be able to give them. I may be able to track down at least the names, dosages, and when I was taking them, but who wants to call a bunch of doctor's offices to track down their medical records? I don't! Other times, my psychiatrist would suggest a medication they had in mind to try for my treatment and I'd remember taking it before but not when, or for how long, or why I stopped it.&lt;/p&gt;

&lt;p&gt;I really wish I would have had the foresight at the time to write down my prescribed medications and associated experiences, but I didn't. With this app, it's no longer something I'll have to worry about and hopefully it will prevent the same regret I feel now for others who find themselves in a similar situation to mine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting the Project
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Delay
&lt;/h3&gt;

&lt;p&gt;I had a really difficult time starting this project. I think it was a combination of a few things. The last three labs in Flatiron's Sinatra section of the curriculum—&lt;a href="https://github.com/meg-gutshall/playlister-sinatra-v-000"&gt;Playlister&lt;/a&gt;, &lt;a href="https://github.com/meg-gutshall/nyc-sinatra-v-000"&gt;NYC Landmarks&lt;/a&gt;, and &lt;a href="https://github.com/meg-gutshall/sinatra-fwitter-group-project-v-000"&gt;Fwitter&lt;/a&gt;—were just &lt;em&gt;ridiculously&lt;/em&gt; hard. I got totally burnt out from them so by the time I finished those I was mentally exhausted. Also after I finished Fwitter, I didn't get an email from the project lead for another four days! When I asked him about it, he told me about the process the project leads have to go through to see which students are at the project and it's just really jacked up. Flatiron School's logistics and operations department needs to get their shit together. They're churning out these excellent programmers—why are they not having them build out solutions for their own use as well? It just doesn't make any sense to me why they are using sub-par third-party tools when former students can make them exactly what they need. Okay, rant over.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design
&lt;/h3&gt;

&lt;p&gt;I designed my app to act as a digital journal that allows users to privately track medications they’ve been prescribed as well as side effects, thoughts, and feelings associated with those medications.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Setup
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;environment.rb&lt;/code&gt; file is where we load all of the app's dependencies, from gems to database connections. Some Ruby gems that I decided to use were &lt;code&gt;BCrypt&lt;/code&gt; for password hashing and &lt;code&gt;Sinatra Flash&lt;/code&gt; to display error messages. The &lt;code&gt;config.ru&lt;/code&gt; file details to Rack the environment requirements of the app and then runs the app. The &lt;code&gt;Rakefile&lt;/code&gt; is where the app's rake tasks are defined. The only custom task defined in my app's &lt;code&gt;Rakefile&lt;/code&gt; is &lt;code&gt;rake console&lt;/code&gt;, which starts a new session in &lt;code&gt;Pry&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For more detailed information on the aforementioned files and how they interact, see my blog post &lt;a href="https://meghangutshall.com/2019/02/15/whats_up_with_that_sinatra_env/"&gt;What's Up With That!?: SINATRA_ENV&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Build
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Corneal
&lt;/h3&gt;

&lt;p&gt;I used the &lt;a href="https://github.com/thebrianemory/corneal"&gt;&lt;code&gt;Corneal&lt;/code&gt; gem&lt;/a&gt; to build out the skeleton of my project. It was so helpful, and no wonder-it was build by a previous Flatiron student!&lt;/p&gt;

&lt;h2&gt;
  
  
  The Build - Models
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Migrations
&lt;/h3&gt;

&lt;p&gt;I built out my migration tables using the &lt;code&gt;rake db:create_table&lt;/code&gt; rake task. I love the autocreate feature for the migration tables because writing those timestamp names by hand is annoying!! I had to go through a lot of iterations of my &lt;code&gt;create_table&lt;/code&gt; migrations since I kept changing up my model attributes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Models
&lt;/h3&gt;

&lt;p&gt;I built out three models: &lt;code&gt;User&lt;/code&gt;, &lt;code&gt;Medication&lt;/code&gt;, and &lt;code&gt;Reaction&lt;/code&gt;. I set up my associations as follows: A user has many medications and has many reactions through medications. A medication belongs to a user and has many reactions. A reaction belongs to a user. Therefore, I added a &lt;code&gt;user_id&lt;/code&gt; attribute to the medication table migration and a &lt;code&gt;medication_id&lt;/code&gt; attribute to the reaction table migration.&lt;/p&gt;

&lt;p&gt;In addition, the &lt;code&gt;Medication&lt;/code&gt; model contains two methods: one that defines the medication's &lt;code&gt;slug&lt;/code&gt; attribute and one that will find a medication by its &lt;code&gt;slug&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Active Record Validations
&lt;/h4&gt;

&lt;p&gt;I added validations to my models as well using Active Record's built-in validation helper methods. Model-level validations are the best way to ensure that only &lt;strong&gt;valid data&lt;/strong&gt; is persisted because they are database-agnostic, cannot be bypassed by end users, and are convenient to test and maintain. I learned a LOT about Active Record &lt;a href="https://guides.rubyonrails.org/active_record_validations.html"&gt;validations&lt;/a&gt; and &lt;a href="https://guides.rubyonrails.org/association_basics.html"&gt;associations&lt;/a&gt; by reading through the online documentation. I feel like I have a much better grasp of those concepts now and will be more prepared for the Rails curriculum.&lt;/p&gt;

&lt;p&gt;For the &lt;code&gt;User&lt;/code&gt; model, I validated the &lt;code&gt;presence&lt;/code&gt; of the user's required attributes as well as the &lt;code&gt;length&lt;/code&gt; of their password and the &lt;code&gt;uniqueness&lt;/code&gt; of their email address to prevent duplicate accounts from being created. I specified to the model to only check for &lt;code&gt;uniqueness&lt;/code&gt; on creation because when a user tries to log in I don't want an error message saying that the email is already associated with an account because, duh it's the user's account! For the &lt;code&gt;Medication&lt;/code&gt; model, I validated the &lt;code&gt;presence&lt;/code&gt; of the medication's required attributes (one of which is boolean so I had to use different options for this validation). For the &lt;code&gt;Reaction&lt;/code&gt; model, I validated the &lt;code&gt;presence&lt;/code&gt; of the reaction's required attributes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Seed Data
&lt;/h3&gt;

&lt;p&gt;I created three different seed files (one for each model) and saved them under &lt;code&gt;db/seeds&lt;/code&gt;. I named the files &lt;code&gt;1-users.rb&lt;/code&gt;, &lt;code&gt;2-medications.rb&lt;/code&gt;, and &lt;code&gt;3-reactions.rb&lt;/code&gt; so they would execute in numerical order. Then, in &lt;code&gt;seeds.rb&lt;/code&gt; I wrote some code to iterate through &lt;code&gt;db/seeds&lt;/code&gt; and load the files so that when the rake task &lt;code&gt;rake db:seed&lt;/code&gt; is executed, my database is populated in exactly the order I want while at the same time keeping the seed files separated by model, making them easier to read and manipulate later.&lt;/p&gt;

&lt;p&gt;In the first line of each seed file, I destroyed any information in the database pertaining to that file's model so I would be sure that my seeds would be persisting into a clean database. Then, I used the &lt;code&gt;.create!&lt;/code&gt; method and entered my own invented data for each attribute. For the medications seeds, I repeated the above process and also assigned &lt;code&gt;created_at&lt;/code&gt;, &lt;code&gt;updated_at&lt;/code&gt;, and &lt;code&gt;user_id&lt;/code&gt; attributes so I could associate the medication to a user upon instantiation. For the reactions seeds, I did the same but instead assigned &lt;code&gt;created_at&lt;/code&gt; and &lt;code&gt;medication_id&lt;/code&gt; attributes so I could associate the reaction to a medication upon instantiation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Build - Controllers
&lt;/h2&gt;

&lt;p&gt;The controllers are where the application configurations, routes, and controller actions are implemented. They handle all incoming requests to the app, and send back the appropriate responses to the client through the use of routes and the MVC file structure. I ended up with a total of five controllers for my app. In addition to a controller for each model, I also have a &lt;code&gt;SessionsController&lt;/code&gt; and an &lt;code&gt;ApplicationController&lt;/code&gt; which all of my app's other controllers use as an inheritance point.&lt;/p&gt;

&lt;h3&gt;
  
  
  Application Controller
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ApplicationController&lt;/code&gt; represents an instance of my app when the server is up and running. The configure block tells the controller where to look to find the views and the public directory. It also enables the use of sessions and sets a session secret. Lastly, it registers the use of the &lt;code&gt;Sinatra Flash&lt;/code&gt; gem.&lt;/p&gt;

&lt;p&gt;My app's root route is defined in this controller as well as the route for my app's about page. I chose only these two routes to define in the &lt;code&gt;ApplicationController&lt;/code&gt; because anyone can access them when they're logged out of the app.&lt;/p&gt;

&lt;p&gt;I also defined four of my app's helper methods in the controller. Since my other controllers inherit from the &lt;code&gt;ApplicationController&lt;/code&gt;, they have access to the helper methods, which means I won't have to redefine them in each controller to use them. These methods jobs are to: determine the current user, determine whether or not the current user is logged, display an error message if the current user is not logged in, and display an error message if a user is trying to view another user's content.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sessions Controller
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;SessionsController&lt;/code&gt; is responsible for maintaining the user's session while they're using the app. The signup route will conditionally redirect the user to the home page where there will be a signup form. The input from this form will go to the &lt;code&gt;UsersController&lt;/code&gt;. If the input proves valid, a new user will be created and logged in, then redirected to their dashboard. The login route will conditionally redirect the user to the home page where there will be a login form. If the input proves valid, the user will be logged in and redirected to their dashboard. The logout route clears the current session, effectively logging the current user out of the app, ending in a redirect to the home page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Users Controller
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;UsersController&lt;/code&gt; handles all HTTP requests that call on the &lt;code&gt;User&lt;/code&gt; model object. The post users route accepts information from the signup form. If the input is valid, a new user is then created based on that input and the user is logged in and redirected to their dashboard. If not, they're returned to the signup form with an error message corresponding to the invalid input. This controller also has routes to render the user dashboard page, edit the user's information, and save those edits if they are valid. In addition, the &lt;code&gt;UsersController&lt;/code&gt; has its own helper method that relies on &lt;code&gt;current_user&lt;/code&gt;, one of the helper methods in &lt;code&gt;ApplicationController&lt;/code&gt;-a great example of the magic of inheritance at work!&lt;/p&gt;

&lt;h3&gt;
  
  
  Medications Controller
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;MedicationsController&lt;/code&gt; uses RESTful routes. This means that when the controller receives an HTTP request, it identifies both the HTTP verb and the URL to execute the code in the controller action that has the corresponding method and URL. The &lt;code&gt;MedicationsController&lt;/code&gt; also has full CRUD actions, meaning it can create, read, update, or delete a &lt;code&gt;Medication&lt;/code&gt; model object. In addition, I added a &lt;code&gt;stop-med&lt;/code&gt; route which will change specific medication attributes to reflect that it is no longer current and then redirect the user to create a new reaction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reactions Controller
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ReactionsController&lt;/code&gt; is much like the &lt;code&gt;MedicationsController&lt;/code&gt; except it employs the use of nested URLs.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Build - Views
&lt;/h2&gt;

&lt;p&gt;For my &lt;code&gt;layout.rb&lt;/code&gt; file, I used a navbar in my header and added conditional statements as to which links I want displayed when the user is not logged in. I also used erb interpolation to create a &lt;code&gt;@title&lt;/code&gt; instance variable which I set on each view page, enabling the page's title to change dynamically as the user navigates through the app.&lt;/p&gt;

&lt;p&gt;I tried something different as well throughout my app by using partials. Sinatra is not as friendly to partials as Rails, but it worked for my purposes. I basically made view pages for my controllers to render that act as sub-layouts. Then, I used erb interpolation to render other view files within the containers I had created in the sub-layouts. This way, I could have users take multiple actions on the same page instead of navigating through the app page-by-page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Home Page
&lt;/h3&gt;

&lt;p&gt;The home page displays a greeting with a small blurb about my app and some buttons that link to the about page, followed by the signup and login forms. Users who are already logged in will be redirected to their dashboard if they try to access the home page.&lt;/p&gt;

&lt;h3&gt;
  
  
  About Page
&lt;/h3&gt;

&lt;p&gt;The about page has four sections: "How To Use", "FAQs", "The Idea", and "Contact Me". Each of the first three sections has a button that will return the user either to their dashboard or the home page, depending on if they are logged in. The "How To Use" section explains the actions the user can take on each page of the app (except the forms since they're pretty self-explanatory) and each corresponding page has a question mark icon in the top right corner that will bring them to this view. The "FAQs" section is a list of  questions I imagine users may have about the app. I take the opportunity here to clarify that this app is not meant to be used as a resource for medical advice and then direct them towards a few outside resources. In "The Idea" section I talk about how I came up with the idea for my app and in the "Contact Me" section I talk a little bit about myself and post links to my social profiles and email contact.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Views
&lt;/h3&gt;

&lt;h4&gt;
  
  
  User Dashboard
&lt;/h4&gt;

&lt;p&gt;Upon login or successful registration, the user will be redirected to their dashboard. The right-hand column displays the user details as entered in the signup form along with the option to edit these details by clicking the blue "Edit my user details" button. Below this is a list of the user's current medications with a few details about each medication. The user should click on the name of the medication to visit its detail page. In the left-hand column is a form to create a new medication. Upon completing the new medication form, the user will be redirected to that medication's detail page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Medication Views
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Medication Detail Page
&lt;/h4&gt;

&lt;p&gt;On the medication detail page the user can see all the information submitted through the new medication form. If the user left the "Usage Start Date", "Usage End Date", or "Prescribing Doctor" fields blank (as they were not required), they will not appear on the medication's detail page until they add the missing information via the "Edit Medication" button. Keep in mind that deleting a medication is different from stopping a medication. To record that a medication is no longer being taken, the user should click on the "Stop Taking Medication" button. The user should only use the "Delete Medication" button if they wish to completely remove the medication and its associated reactions from their account. Once done, this action is irreversible.&lt;/p&gt;

&lt;p&gt;On the right-hand side underneath the medication details is a list of the user's reactions associated with this particular medication along with a few details about each reaction. The user should click on the reaction's title to visit its detail page. On the left-hand side is a form to record a new reaction. Upon completing the new reaction form, the user will be redirected to that reaction's detail page.&lt;/p&gt;

&lt;h4&gt;
  
  
  Medications List
&lt;/h4&gt;

&lt;p&gt;The medications list page displays a column of the user's current medications on the left and the user's previous medications on the right followed by all of the user's medications listed at the bottom. There is also a button in the upper right-hand corner to create a new medication which when clicked will take the user to a full-page new medication form.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reaction Views
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Reaction Detail Page
&lt;/h4&gt;

&lt;p&gt;On the reaction detail page, the user will see the name of the medication the reaction is associated with followed by the title of the reaction. Below that will be an entry timestamp (as well as update if one was made to the reaction) and the body content of the user's recorded reaction. Following that are the dosage amount and usage instructions of the medication at the time the user recorded their reaction and whether or not the user is currently taking the medication. Further down the user will find "Edit Reaction" and "Delete Reaction" buttons as well as a button to return to the associated medication's detail page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Styling
&lt;/h2&gt;

&lt;p&gt;If you don't know by now, you gon' learn today... I LOVE HTML AND CSS!!! So I probably spent a little too much time on styling with this project if I'm going to be honest with myself (procrastination in the best way possible). I used &lt;a href="https://getbootstrap.com/docs/4.3/getting-started/introduction/"&gt;Bootstrap 4&lt;/a&gt; for the basic layout as well as a few components like navbar, forms, and buttons. I also used &lt;a href="https://fonts.google.com/"&gt;GoogleFonts&lt;/a&gt; for my text and &lt;a href="https://fontawesome.com/"&gt;FontAwesome&lt;/a&gt; for the icons throughout my app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;p&gt;I had a hard time with the dates in the project. I didn't want to use the typical &lt;code&gt;yyyy-mm-dd&lt;/code&gt; format for medication start and end dates because most people don't remember a specific day they started or stopped taking a medication so instead I went with &lt;code&gt;yyyy-mm&lt;/code&gt;. However, Ruby did not like that at all. HTML5 allows for forms with input type &lt;code&gt;month&lt;/code&gt; but Ruby will not persist the &lt;code&gt;yyyy-mm&lt;/code&gt; format as a date so I appended &lt;code&gt;"-01"&lt;/code&gt; on to the end of the date &lt;code&gt;params&lt;/code&gt; to act as &lt;code&gt;-dd&lt;/code&gt; and let Ruby persist the data. When I needed to populate the form fields for the edit forms or show the dates on any view pages, I just used the &lt;code&gt;#strftime&lt;/code&gt; method to convert them back and it worked like a charm.&lt;/p&gt;

&lt;p&gt;I had issues with the &lt;code&gt;session.user_id&lt;/code&gt; not persisting as I browsed through different pages of my app. I tried to use some different gems to set a secure &lt;code&gt;session_secret&lt;/code&gt; but it seemed that the only thing that would work was a plain old string. I read through the Sinatra documentation (in addition to countless other resources) but I just couldn't get the sysrandom gem to work and I had wasted enough time on it already.&lt;/p&gt;

&lt;p&gt;My biggest issue was associating the user's reaction with the correct medication. I didn't want the user to have to pick from a drop down list of their medications whenever they wanted to record a new reaction because I wanted my app to be more intuitive than that (considering the new reaction form is located on the medication's detail page). I came up with a viable solution by creating a &lt;code&gt;session.med_id&lt;/code&gt; that would change depending on the last medication detail page the user visited and using the &lt;code&gt;session.med_id&lt;/code&gt; to set the new reaction's &lt;code&gt;medication_id&lt;/code&gt; attribute. However, another student suggested I use nested routing and that turned out to be a cleaner, much more straightforward solution to my problem. Plus, by implementing nested routes, I was able to get rid of a lot of unnecessary code that was junking up my app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expansion Ideas
&lt;/h2&gt;

&lt;p&gt;As I built out my app, I had a ton of ideas, many of which went in a separate file for later if I decide to expand Rxeactions and try to make it available on the market. Here are some of the ideas:&lt;/p&gt;

&lt;h3&gt;
  
  
  Forms &amp;amp; Views
&lt;/h3&gt;

&lt;p&gt;I would like to be able to add sort functions to the medications and reactions list views. I'd also like to edit the form so the user has less control over the types of input, meaning I would get back data in the exact format I want. Examples of this are requiring the medication &lt;code&gt;dosage_amount&lt;/code&gt; to be integer input while using a dropdown list for the &lt;code&gt;dosage_amount&lt;/code&gt; units and using a dropdown list for the &lt;code&gt;dosage_form&lt;/code&gt; choices. In addition I'd like to make the forms more granular in what information they ask for, especially when it comes to the medication usage instructions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Models
&lt;/h3&gt;

&lt;p&gt;It would make much more sense to make a &lt;code&gt;Prescription&lt;/code&gt; model that holds the details specific to the user and create models that act as attributes to fill in parts of the new medication form, such as medication name, dosage, and dosage form. This could even apply to the prescribing doctor attribute as I also had the idea to make a &lt;code&gt;Doctor&lt;/code&gt; model. The doctor would be able to view and edit medications with which they're associated as well as view the associated reactions and user information, but they will not have edit privileges and they also would not be able to view any of the user's other medications unless they were listed as the prescribing doctor for those too. The doctor would also have contact info properties that would be viewable by all users in case any of their patients (or prospective patients) needed to get in touch with them. Another user model idea would be to add a family function in which users could be grouped by families, allowing each other viewing permissions, or a user could track a dependent's medications as a sub-user under their own account.&lt;/p&gt;

&lt;h3&gt;
  
  
  Medication Information
&lt;/h3&gt;

&lt;p&gt;I would like to add an alarm feature to remind people to take their medication and then have a box for them to check off when they actually take it so they don't forget if they did or not. If the app could track the quantity of the medication the user has compared with the dosage amount and usage instructions, it would be able to send the user a reminder when they need to order a refill-or even send a reminder to the pharmacy or prescribing doctor. It would also be beneficial to the users if they could access verified medical advice about their specific medications right from the medication details page. I'd really like to be able to add the capability for an alert to appear on the user's dashboard when they list two medications as &lt;code&gt;current&lt;/code&gt; that have been shown to present negative interactions with each other. Or possibly an alert for common or dangerous side effects when a user adds a new medication.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overall Reactions
&lt;/h3&gt;

&lt;p&gt;I'm thinking about how I could implement a text analyzer to comb the titles and content of the reactions for each medication and give an overall rating for the medication based on the user's recorded reactions. It would decide if the medication was mostly helpful to the user, mostly harmful to the user, or maybe neither and display this analysis on the medication's details page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Demo Video
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/xRKItzdbQwk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>womenintech</category>
      <category>ruby</category>
      <category>sinatra</category>
      <category>projects</category>
    </item>
    <item>
      <title>Creating BeerSnob</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Wed, 16 Oct 2019 04:18:54 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/creating-beersnob-4ad5</link>
      <guid>https://dev.to/meg_gutshall/creating-beersnob-4ad5</guid>
      <description>&lt;h2&gt;
  
  
  Project Idea
&lt;/h2&gt;

&lt;p&gt;I had a few ideas that I was considering for this project at first. I tossed around the idea of scraping through each year in the '90s and highlighting different trends, fads, pop culture, and new stories. I also considered scraping through popular songs and returning the original songs that the new song took samples from. That came closest to fruition but unfortunately I couldn't find a website conducive to this idea. I added it to my list of future projects. :)&lt;/p&gt;

&lt;p&gt;I wanted my first project to be something useful–not just a throw-away program that I’d never touch after submission. I examined my interests and found that I could create an app at the intersection of beer and education. I found craftbeer.com to be a viable website for scraping and thus BeerSnob was born.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting the Project
&lt;/h2&gt;

&lt;p&gt;I experienced quite a few delays in starting this project, each one pretty frustrating. I used the Visual Studio Code text editor in place of the Learn IDE and had several issues with setup that I had to solve–either through Google, message boards, or speaking with other developers and students. After fixing the settings to allow me to submit commit messages with titles and description (which is a coding habit I want to ingrain upon myself from the start) and then installing rvm to manage my rubies and gems, I was ready to dive in and begin coding my project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup - Creating a Gem with Bundler
&lt;/h3&gt;

&lt;p&gt;I installed and used bundler to set up my project, taking the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the terminal and &lt;code&gt;cd&lt;/code&gt; into the folder in which you want to create your project (mine is called &lt;code&gt;code&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Type in &lt;code&gt;bundle gem&lt;/code&gt; then your project name. (Use an underscore instead of a hyphen to make your project name camel case.) Decide whether you want to use RSpec, MiniTest, or neither for development testing, use the MIT license for open sourcing regulation, and a code of conduct for any open source contributors to follow. Bundler then initializes a git repo for your project!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Setup - Connecting Your Project to GitHub
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;cd&lt;/code&gt; into your newly created project folder, then navigate to GitHub. Create a new repository with the same name as the project on your computer. Type &lt;code&gt;git add .&lt;/code&gt; into your terminal, then enter the last three lines under the "create a new repository on the command line" option. They should look like:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"first commit"&lt;/span&gt;
git remote add origin git@github.com:[your-username]/[your-project-name].git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Refresh your GitHub page and you'll see your project and its files now in your GitHub repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To make sure you're working out of the correct repo, click on the green "Clone or download" button in your project's repository. Select "Clone with SSH" for a more secure connection. "Clone with HTTPS" will also work, however, you'll be required to supply your GitHub username and password each time you make a connection to your remote repo. Click on the clipboard image to copy the link and return to your terminal. Make sure you're working in the &lt;code&gt;code&lt;/code&gt; folder (or whichever folder your project is stored in), then type &lt;code&gt;git clone&lt;/code&gt; and paste the link to clone the correct repo for your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your new project's repo folder should appear in your local &lt;code&gt;code&lt;/code&gt; folder. Open your text editor of choice and &lt;code&gt;cd&lt;/code&gt; into the project folder to start working.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Hint:&lt;/em&gt; To test your text editor's connectivity to GitHub, make a change to your &lt;code&gt;README.md&lt;/code&gt; file and save. In the terminal, type &lt;code&gt;git add .&lt;/code&gt;, &lt;code&gt;git commit -m "Modify README.md"&lt;/code&gt;, and &lt;code&gt;git push&lt;/code&gt;. When you refresh your GitHub page, you should see the updated commit message and two commits.&lt;/p&gt;

&lt;p&gt;-OR-&lt;/p&gt;

&lt;p&gt;Type &lt;code&gt;git remote -v&lt;/code&gt; into your terminal. If you're connected correctly to your remote repo, you should see the following lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;your-project-name &lt;span class="nv"&gt;$ &lt;/span&gt;origin git@github.com:[your-username]/[your-project-name].git &lt;span class="o"&gt;(&lt;/span&gt;fetch&lt;span class="o"&gt;)&lt;/span&gt;
your-project-name &lt;span class="nv"&gt;$ &lt;/span&gt;origin git@github.com:[your-username]/[your-project-name].git &lt;span class="o"&gt;(&lt;/span&gt;push&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup - The Executable File
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Add your executable file (the file that makes the app run) in the &lt;code&gt;bin&lt;/code&gt; folder. I named mine &lt;code&gt;beer-snob&lt;/code&gt;. (Remember to add the shebang line &lt;code&gt;#!/usr/bin/env ruby&lt;/code&gt; at the top of your file so your computer knows to use ruby to run the program.)&lt;/li&gt;
&lt;li&gt;We want the user to be able to run the app right out of the terminal using bash instead of explicitly calling on a ruby interpreter to run it. This means we have to change the executable file's permissions. We can do this by &lt;code&gt;cd&lt;/code&gt;ing into the &lt;code&gt;bin&lt;/code&gt; folder and entering &lt;code&gt;chmod +x&lt;/code&gt; followed by the executable file's name.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Program Files
&lt;/h2&gt;

&lt;p&gt;I employed the encapsulation principle in creating and writing my various program files. All components of the app (gems and files) are required in an environment file called &lt;code&gt;beer_snob.rb&lt;/code&gt;, which in turn is required in the executable file.&lt;/p&gt;

&lt;h3&gt;
  
  
  BeerSnob Executable File
&lt;/h3&gt;

&lt;p&gt;The app's executable file employs only one line of code to start the program, however, it does have a few other requirements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;As mentioned earlier, the shebang line (&lt;code&gt;#!/usr/bin/env ruby&lt;/code&gt;) tells your computer that the file is written in ruby. Therefore, this needs to be the very first line of your program to ensure that your computer reads and processes the app correctly.&lt;/li&gt;
&lt;li&gt;The next line is &lt;code&gt;require bundler/setup&lt;/code&gt; which enables the app to load all necessary gems and dependencies from the &lt;code&gt;Gemfile&lt;/code&gt; by adding them to the load path.&lt;/li&gt;
&lt;li&gt;The third line is the app's environment file. Mine reads &lt;code&gt;require beer_snob&lt;/code&gt;. This enables your executable file to access all the gems and program files contained within your environment.&lt;/li&gt;
&lt;li&gt;Then of course follows the line that starts the program. Mine reads &lt;code&gt;CLI.new.learn&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  CLI File
&lt;/h3&gt;

&lt;p&gt;The purpose of the CLI file is to call methods that act as basic functions of the program. I created a basic run method &lt;code&gt;#learn&lt;/code&gt; which first instantiates an instance variable using the &lt;code&gt;Beers&lt;/code&gt; and &lt;code&gt;Scraper&lt;/code&gt; classes and then uses that variable in the following methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#greeting&lt;/code&gt;: welcomes the user to the app&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#list_style_families&lt;/code&gt;: lists the 15 beer style families&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#top_menu&lt;/code&gt;: handles the user input of which family they wish to explore and executes the appropriate action&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#list_beer_styles&lt;/code&gt;: lists the beer styles within whichever style family the user chose&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#sub_menu&lt;/code&gt;: handles the user input of which beer style they wish to explore and returns the appropriate information&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;#exit&lt;/code&gt;: displays a closing message and exits out of the program&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I incorporated decorative elements in my &lt;code&gt;puts&lt;/code&gt; Strings by using ASCII art in the &lt;code&gt;#exit&lt;/code&gt; method and the &lt;code&gt;colorize&lt;/code&gt; gem to distinguish headers and categories from general information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scraper
&lt;/h3&gt;

&lt;p&gt;I decided to start my project by creating a &lt;code&gt;scraper.rb&lt;/code&gt; file. I actually began the file in a practice repo to mess around and see what I could come up with. When it started coming together, I migrated my work into a file in my gem repo.&lt;/p&gt;

&lt;p&gt;For each beer I wanted to store the style name, family name, and a brief description of its characteristics. Since some beers have a longer description than others, I at first decided to store only the first paragraph of each beer description. Through helping another Flatiron student with her project, I discovered a method which could return multiple paragraphs of text, depending on the parameters I set. I liked this execution much better as it allowed the app to pull all text for the beer styles with a multi-paragraph description without compromising other, shorter beer style description texts.&lt;/p&gt;

&lt;p&gt;Next I wanted to store the listed examples of brewery and beer name for each style. This was a little tricky because my scraper kept returning the list of breweries followed by the list of beer names instead of returning them as key/value pairs. In the end, I created a nested array composed of brewery/beer name hashes by creating an iteration inside of the main beer style iteration. By doing this, I was able to create and store key/value pairs of the commercial examples.&lt;/p&gt;

&lt;h3&gt;
  
  
  Beers File
&lt;/h3&gt;

&lt;p&gt;I wrote the &lt;code&gt;beers.rb&lt;/code&gt; file as abstractly as possible to enable it to create new arrays and object attributes from whichever hash arguments were fed into the method. These methods in turn created the objects that were used in the &lt;code&gt;cli.rb&lt;/code&gt; file to display the scraped information.&lt;/p&gt;

&lt;h3&gt;
  
  
  Art File
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;art.rb&lt;/code&gt; file houses ASCII art which I incorporated in my &lt;code&gt;CLI#exit&lt;/code&gt; method.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scraping
&lt;/h3&gt;

&lt;p&gt;For you to be able to get a sense of the document structure of the website I was scraping from, I'm including the site link here: &lt;a href="https://www.craftbeer.com/beer/beer-styles-guide"&gt;Beer Styles Study Guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The site that I decided to scrape is structured differently than I would have done it. Not all the HTML elements are nested properly and a lot of them either don't have classes or they're not descriptive of the actual element. Therefore, when scraping the site, I originally decided to iterate over the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; tags and use indexes to draw out the information and associate it to the proper key. Unfortunately, some of the beer styles include the "Brewing and Conditioning Process" characteristic while other do not. I discovered this after my CLI displayed info associated with the wrong characteristic for some of the beer styles, shifting them down by one line item. So I went back to the scraper drawing board.&lt;/p&gt;

&lt;p&gt;I reviewed earlier scraper labs and got an idea from the Student Scraper Lab. I created a subiteration within my &lt;code&gt;#scrape&lt;/code&gt; method to create a key/value pair only if the key existed. I assigned the new key to be created from the &lt;code&gt;param&lt;/code&gt; class and its corresponding value from the &lt;code&gt;value&lt;/code&gt; class nested within the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; tags. This process scraped more information than I want to display, but that wasn’t an issue since I could choose which information I wanted to display in the &lt;code&gt;CLI&lt;/code&gt; class.&lt;/p&gt;

&lt;p&gt;I didn't have to change anything for the “Commercial Examples” characteristic since I also created a subiteration for those, which dug deeper down in the nested levels to retrieve the specific beer and brewery information. However, I did have to treat the “Alcohol” characteristic differently because instead of storing its value in a &lt;code&gt;&amp;lt;span class="value"&amp;gt;&lt;/code&gt; element, the website inserted the value text directly inside the &lt;code&gt;&amp;lt;li&amp;gt;&lt;/code&gt; element. Thankfully, I was able to keep my indexing method for this characteristic as it's the first line under the "Style A-Z" category and, therefore, is unaffected by the addition of other characteristics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simplifying the Program
&lt;/h3&gt;

&lt;p&gt;Even after making the above changes I still ran into issues. When writing the &lt;code&gt;#initialize&lt;/code&gt; method in the &lt;code&gt;Beers&lt;/code&gt; class, I employed the &lt;code&gt;#send&lt;/code&gt; method in order to create the object’s attributes from the key/value pairs. However, since the keys were Strings and not Symbols, I wasn’t able to convert the pairs to attributes using the &lt;code&gt;#send&lt;/code&gt; method. I could probably figure out a way to do it if I researched it more but I decided to eliminate these characteristics altogether and readdress the problem at a later date.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Demo Video
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/m-sAVQi9MQo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>womenintech</category>
      <category>ruby</category>
      <category>cli</category>
      <category>projects</category>
    </item>
    <item>
      <title>Knowing When to Quit</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Wed, 16 Oct 2019 04:18:22 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/knowing-when-to-quit-51j8</link>
      <guid>https://dev.to/meg_gutshall/knowing-when-to-quit-51j8</guid>
      <description>&lt;p&gt;My Rails portfolio project took a &lt;em&gt;loooooooong&lt;/em&gt; time to finish. Actually, my &lt;a href="https://github.com/meg-gutshall/borrow-buddy"&gt;BorrowBuddy app&lt;/a&gt; is version 2.0 of my project which was required to complete the Rails section of &lt;a href="https://flatironschool.com/career-courses/coding-bootcamp/online/"&gt;Flatiron's online software engineering program&lt;/a&gt;. I had an amazing—and completely viable—idea to begin with and I worked really hard on trying to bring to life, but I found myself going in circles and eventually decided to start over. The most difficult part though was determining whether to start fresh or press on.&lt;/p&gt;

&lt;p&gt;This project originally started out as BookBuddy. BookBuddy was designed to be a library checkout system for school and classroom libraries. In effect, the app would allow students in a school to view all books catalogued in the school's libraries, ranging from a centrally-located library to teachers' classroom libraries. They can borrow the book through the app, where they'll be told in which library the book is located, and then go physically retrieve the book from the room. The student has the ability to put a book on hold if it's on loan and renew their current borrow if the book does not have a hold against it by another student. I also added admin users because it wouldn't be an effective app without someone maintaining the libraries, now would it? They have the ability to create, edit, and destroy schools, libraries, books, students, borrows, and holds. I wanted to eventually include email notification capabilities so the students would automatically receive reminders for when their books were due and when books they had on hold became available but I wasn't able to get that far; the problems had started up.&lt;/p&gt;

&lt;p&gt;The build was actually going really smoothly at first. Flatiron includes virtual study groups as part of the online program (which as an interactive learner, I find to be &lt;strong&gt;&lt;em&gt;immensely&lt;/em&gt;&lt;/strong&gt; helpful) and I had attended—and actively participated in—one of the &lt;a href="https://www.youtube.com/playlist?list=PLI_-ZfHw8Y6UtkEuZ9aJ-DN3t1L0_8BGs"&gt;Rails Project Build series&lt;/a&gt; hosted by Jenn Hansen, the wonderful and highly knowledgeable Rails section lead (see the corresponding repo &lt;a href="https://github.com/hansenjl/Ice-Cream-Social"&gt;here&lt;/a&gt;). Needless to say, I felt pretty comfortable with what I was doing. The issues started when I added my &lt;code&gt;Admin&lt;/code&gt; model to the app. Since I was using the Devise gem for my user models, I had generated &lt;code&gt;Admin&lt;/code&gt; using Devise like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails g devise Admin
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;After that I checked the model and the migration file to make sure everything was configured the way I wanted it, then ran &lt;code&gt;rails db:migrate&lt;/code&gt;, restarted my server, and it was all running pretty smoothly. But when I would navigate throughout my app, I keep running into permission issues. You see, my &lt;code&gt;Admin&lt;/code&gt; and &lt;code&gt;Student&lt;/code&gt; models had different Active Record associations as well as different permissions so they had to be created as two separate classes (instead of adding &lt;code&gt;admin&lt;/code&gt; as a boolean attribute on a &lt;code&gt;User&lt;/code&gt; class). I tried so many different fixes. The &lt;a href="http://devise.plataformatec.com.br/"&gt;Devise docs&lt;/a&gt; became my best friend. I attended every Rails project office hours that I could, but it seemed like whenever I had the issue nipped in the bud and tried to move on to fulfilling another requirement in my project, my browser would raise &lt;strong&gt;&lt;em&gt;another&lt;/em&gt;&lt;/strong&gt; error leading back to Devise. It came to a head the week after I returned from the &lt;a href="https://rubyforgood.org/"&gt;Ruby for Good&lt;/a&gt; conference/hackathon when I felt like I hadn't accomplished &lt;em&gt;anything&lt;/em&gt; because I was just coding myself in circles trying to fix these bugs. At this point in time, I had been working on the project for three weeks and was nowhere near finished.&lt;/p&gt;

&lt;p&gt;I had one of two choices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Stick with BookBuddy and somehow dig my way out.&lt;/strong&gt; I had put so much work into this project already and I &lt;em&gt;knew&lt;/em&gt; there had to be a solution to my problem out there—I just hadn't found it yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Go scorched earth and start from scratch.&lt;/strong&gt; At this point, the option was appealing just so I wouldn't feel like slamming my head against a wall anymore. But did I really want to start all over again?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6GxvIaKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xi2nu6jd6c2bbgjduwfn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6GxvIaKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xi2nu6jd6c2bbgjduwfn.jpg" alt="Burning buildings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It turns out I landed somewhere in the middle. Like I said before, I had put a &lt;strong&gt;ton&lt;/strong&gt; of hard work and long hours into BookBuddy so that app was not going to go anywhere; but that didn't mean it had to be my Rails portfolio project either. It's still sitting happily in its &lt;a href="https://github.com/meg-gutshall/book-buddy"&gt;GitHub repo&lt;/a&gt; just waiting for me to obtain a little more knowledge (or patience... or bravery) to pick it up again and continue on. Instead, what I did was abstract the original concept of BookBuddy and create BorrowBuddy, an app that tracks which items you lend out and to whom you lend the items. I was able to use a lot of the code I had already written in my previous project and implement it on a smaller, simpler, more manageable scale.&lt;/p&gt;

&lt;p&gt;In many cases, it's important to stick with something once you start it—especially as a programmer (that's pretty much part of the job description). That's a huge reason why I was so hesitant to restart my project. Programmers are naturally drawn to figuring out why something doesn't work, and a healthy dose of perseverance (a.k.a. stubbornness) is certainly a good quality to have, but not when it starts to get in the way of your main objective, your end goal. I'm learning many things through the Flatiron program and this latest project taught me that, at times, there can be value in quitting.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>projects</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>What's Up With That!?: SINATRA_ENV</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Tue, 05 Mar 2019 23:07:19 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/whats-up-with-that-sinatraenv-b70</link>
      <guid>https://dev.to/meg_gutshall/whats-up-with-that-sinatraenv-b70</guid>
      <description>&lt;p&gt;If you’re in the Sinatra Active Record section of the Flatiron School, you’ve probably seen this error message a few times: “Migrations are pending. Run &lt;code&gt;rake db:migrate SINATRA_ENV=test&lt;/code&gt; to resolve the issue.” Well we know we need to run &lt;code&gt;rake db:migrate&lt;/code&gt; to create our migration tables, but &lt;code&gt;SINATRA_ENV&lt;/code&gt;... what’s up with that!?&lt;/p&gt;

&lt;p&gt;First let’s go over a few files line by line so we can follow &lt;code&gt;ENV["SINATRA_ENV"]&lt;/code&gt; on its journey through our app. For this, I’m using the &lt;a href="https://github.com/meg-gutshall/sinatra-complex-forms-associations-v-000"&gt;Sinatra Complex Forms Associations Lab&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rakefile
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;"SINATRA_ENV"&lt;/code&gt; is the key to Ruby's &lt;code&gt;ENV&lt;/code&gt; hash and defines your deployment environment. This is set in your &lt;code&gt;Rakefile&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pClX6GMP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zvixj1a7z2exbqj9j23c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pClX6GMP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zvixj1a7z2exbqj9j23c.jpg" alt="Picture of Rakefile"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"SINATRA_ENV"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||=&lt;/span&gt; &lt;span class="s2"&gt;"development"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In most of the labs in this section, this will be the first line of your &lt;code&gt;Rakefile&lt;/code&gt;. This means that if &lt;code&gt;"SINATRA_ENV"&lt;/code&gt; doesn’t already have a value, its value will be set equal to &lt;code&gt;"development"&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;require_relative&lt;/span&gt; &lt;span class="s1"&gt;'./config/environment'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This loads our app’s &lt;code&gt;environment.rb&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'sinatra/activerecord/rake'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This loads Rake tasks from the &lt;code&gt;sinatra-activerecord&lt;/code&gt; gem. A custom Rake task is defined on Lines 8-10 which starts a new Pry session.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment.rb
&lt;/h2&gt;

&lt;p&gt;Now let’s check out our &lt;code&gt;config/environment.rb&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yMEuXJXR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xav49qftkl6d9992m6w6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yMEuXJXR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xav49qftkl6d9992m6w6.jpg" alt="Picture of environment.rb"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"SINATRA_ENV"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||=&lt;/span&gt; &lt;span class="s2"&gt;"development"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Again, we see our &lt;code&gt;"SINATRA_ENV"&lt;/code&gt; being defined. In order to maintain DRY code, I removed Line 1 from the &lt;code&gt;Rakefile&lt;/code&gt; and all my tests for the lab still passed without any failures.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'bundler/setup'&lt;/span&gt;
&lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="no"&gt;Bundler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:default&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'SINATRA_ENV'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;On Lines 3 and 4 we require our gems and dependencies. Line 3 finds our &lt;code&gt;Gemfile&lt;/code&gt; and makes all the gems contained within (plus their dependencies) available to Ruby by adding them to the load path. On Line 4, we’re requiring all of our gems (&lt;code&gt;:default&lt;/code&gt; represents all gems since we didn’t create gem groups for this app) as well as our deployment environment hash to be used with the Active Record gem.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;6&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;establish_connection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="mi"&gt;7&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="nf"&gt;adapter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"sqlite3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="nf"&gt;database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"db/&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="no"&gt;SINATRA_ENV&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;.sqlite"&lt;/span&gt;
&lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;On Lines 6 through 9, we establish our database connection. Our &lt;code&gt;adapter&lt;/code&gt; sets the name of the database management system (typed in all lower-case) that we’re using to hold our data and our &lt;code&gt;database&lt;/code&gt; sets the path to our app’s database. This path includes our deployment environment hash, which is an argument of &lt;code&gt;Bundle.require&lt;/code&gt; on Line 4 and will change based on our key’s value, pointing to other databases.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;11&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;require_all&lt;/span&gt; &lt;span class="s1"&gt;'app'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This loads all other files nested under &lt;code&gt;app&lt;/code&gt; to run the program.&lt;/p&gt;

&lt;h2&gt;
  
  
  Config.ru
&lt;/h2&gt;

&lt;p&gt;Lastly, let’s look at our &lt;code&gt;config.ru&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dPb3gqRM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xr5iylg5oni6e2kqqdtv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dPb3gqRM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xr5iylg5oni6e2kqqdtv.jpg" alt="Picture of config.ru"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'./config/environment'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Again, this loads our app’s &lt;code&gt;environment.rb&lt;/code&gt; file. Notice the difference between this line and Line 3 in our &lt;code&gt;Rakefile&lt;/code&gt;? Both do the same thing, they just require the &lt;code&gt;environment.rb&lt;/code&gt; file in different ways.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;if&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Migrator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;needs_migration?&lt;/span&gt;
&lt;span class="mi"&gt;4&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="nf"&gt;raise&lt;/span&gt; &lt;span class="s1"&gt;'Migrations are pending. Run `rake db:migrate` to resolve the issue.'&lt;/span&gt;
&lt;span class="mi"&gt;5&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Lines 3 through 5 check to make sure our migrations have been run. If not, the error message on Line 4 is raised.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;use&lt;/span&gt; &lt;span class="no"&gt;Rack&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;MethodOverride&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Rack::MethodOverride&lt;/code&gt; is a piece of Sinatra Middleware that intercepts every request run by our application. It will interpret any requests with &lt;code&gt;name="_method"&lt;/code&gt; by translating the request to whatever is set by the &lt;code&gt;value&lt;/code&gt; attribute-normally &lt;code&gt;PATCH&lt;/code&gt; or &lt;code&gt;DELETE&lt;/code&gt; for purposes in our Sinatra curriculum. This line must be placed in the &lt;code&gt;config.ru&lt;/code&gt; file above all controllers in which you want access to the Middleware's functionality.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="no"&gt;Dir&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s2"&gt;"app/controllers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"*.rb"&lt;/span&gt;&lt;span class="p"&gt;)].&lt;/span&gt;&lt;span class="nf"&gt;collect&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="no"&gt;File&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;basename&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"."&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}.&lt;/span&gt;&lt;span class="nf"&gt;reject&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"application_controller"&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;file&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="nf"&gt;string_class_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'_'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;collect&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;capitalize&lt;/span&gt; &lt;span class="p"&gt;}.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;
&lt;span class="mi"&gt;11&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="nf"&gt;class_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;const_get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string_class_name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="mi"&gt;12&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="nf"&gt;use&lt;/span&gt; &lt;span class="n"&gt;class_name&lt;/span&gt;
&lt;span class="mi"&gt;13&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In Lines 9 through 13, we're mounting our controllers nested under &lt;code&gt;app/controllers&lt;/code&gt;. These classes will also be loaded as Middleware. In this case, they'll be &lt;code&gt;use OwnersController&lt;/code&gt; and &lt;code&gt;use PetsController&lt;/code&gt;. Notice how &lt;code&gt;"application_controller"&lt;/code&gt; is rejected? That's because it is called on in Line 14 below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;14&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt; &lt;span class="no"&gt;ApplicationController&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This line creates an instance of our &lt;code&gt;ApplicationController&lt;/code&gt; class that can respond to requests from a client. We can only &lt;code&gt;run&lt;/code&gt; one class and the rest are loaded via &lt;code&gt;use&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing It All Together
&lt;/h2&gt;

&lt;p&gt;So now we know what happens each time the &lt;code&gt;Rakefile&lt;/code&gt;, the &lt;code&gt;config/environment.rb&lt;/code&gt; file, and the &lt;code&gt;config.ru&lt;/code&gt; file is run. We still have to answer the question as to what &lt;code&gt;ENV["SINATRA_ENV"]&lt;/code&gt; actually is.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ENV&lt;/code&gt; is a hash-like accessor for Ruby environment variables. It will change depending on what information Ruby needs. The &lt;code&gt;ENV&lt;/code&gt; accessor holds all types of information for Ruby as well as its corresponding frameworks and gems. In our case, Ruby needs to define a &lt;code&gt;"SINATRA_ENV"&lt;/code&gt; so this is added as a key to the &lt;code&gt;ENV&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When we run &lt;code&gt;learn&lt;/code&gt; to test our app, this triggers the gem RSpec, which will run our &lt;code&gt;spec_helper.rb&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Sjtg7Iv7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mv8kppugc236comeo31p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Sjtg7Iv7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mv8kppugc236comeo31p.jpg" alt="Picture of spec_helper.rb"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="no"&gt;ENV&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"SINATRA_ENV"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"test"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;As we can see on Line 1, our &lt;code&gt;ENV["SINATRA_ENV"]&lt;/code&gt; is being set equal to &lt;code&gt;"test"&lt;/code&gt; so that when we go to our &lt;code&gt;environment.rb&lt;/code&gt; file as directed on Line 3, &lt;code&gt;ENV["SINATRA_ENV"]&lt;/code&gt; is already assigned a value and, therefore, does not take on the value of &lt;code&gt;"development"&lt;/code&gt;. This means that on Line 4 of our &lt;code&gt;environment.rb&lt;/code&gt; file, the deployment environment hash dependency has the value of &lt;code&gt;"test"&lt;/code&gt; and on Line 8, we are establishing a connection with a different database entirely-&lt;code&gt;db/test.sqlite&lt;/code&gt;! This database contains seed data to match the expected test outputs.&lt;/p&gt;

&lt;p&gt;Lines 4 through 6 require gems related to testing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;if&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Migrator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;needs_migration?&lt;/span&gt;
&lt;span class="mi"&gt;9&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;   &lt;span class="nf"&gt;raise&lt;/span&gt; &lt;span class="s1"&gt;'Migrations are pending. Run `rake db:migrate SINATRA_ENV=test` to resolve the issue.'&lt;/span&gt;
&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nf"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Lines 8 through 10 check to make sure our migrations have been run. If not, the error message on Line 9 is raised... and now we've come full circle. The app will not function unless we've run our migrations first because we won't have any information to display or manipulate.&lt;/p&gt;

&lt;p&gt;The rest of our &lt;code&gt;spec_helper.rb&lt;/code&gt; file configures the app for testing and then runs our &lt;code&gt;config.ru&lt;/code&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shotgun
&lt;/h2&gt;

&lt;p&gt;There's one last difference I'd like to point out. In the Sinatra section, we learn about a trusty little gem called &lt;code&gt;shotgun&lt;/code&gt; which allows you to start your Rack-based web app with an automatic code reloading feature. It starts up a Rack server and listens for any requests so when you hit the browser's refresh button, you can see changes made to your code that have been saved. All you have to do is type &lt;code&gt;shotgun&lt;/code&gt; in your terminal to start up a new session.&lt;/p&gt;

&lt;p&gt;Starting a new &lt;code&gt;shotgun&lt;/code&gt; session is like starting a new &lt;code&gt;rackup&lt;/code&gt; session in that the first thing our app loads is our &lt;code&gt;config.ru&lt;/code&gt; file, which on the very first line, requires our &lt;code&gt;environment.rb&lt;/code&gt; file. At this point, &lt;code&gt;ENV["SINATRA_ENV"]&lt;/code&gt; will be set equal to &lt;code&gt;"development"&lt;/code&gt; and the rest of our &lt;code&gt;environment.rb&lt;/code&gt; file will execute, bringing us back to &lt;code&gt;config.ru&lt;/code&gt;. Again, we have the chance of raising an error message on Line 4 of our &lt;code&gt;config.ru&lt;/code&gt; file if we have not already run our migrations. However, this message simply says "Run &lt;code&gt;rake db:migrate&lt;/code&gt; to resolve the issue" instead of "Run &lt;code&gt;rake db:migrate SINATRA_ENV=test&lt;/code&gt; to resolve the issue" Why is that? It's because of the line of code &lt;code&gt;ENV["SINATRA_ENV"] ||= "development"&lt;/code&gt;, which sets &lt;code&gt;"development"&lt;/code&gt; as our default value for the &lt;code&gt;"SINATRA_ENV"&lt;/code&gt; key. Since that's the default, we don't have to specify another &lt;code&gt;"SINATRA_ENV"&lt;/code&gt; in our error message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;ENV["SINATRA_ENV"]&lt;/code&gt; started out as a mixed-up mess for me but after a lot of research and deep-diving into my code files, I came to understand its purpose throughout my programs. Hopefully this post helped you understand it a little bit better as well.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>sinatra</category>
      <category>environment</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>Git commit aborts before I can create a commit message and I use “--wait”</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Mon, 15 Oct 2018 20:34:02 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/git-commit-aborts-before-i-can-create-a-commit-message-and-i-use---wait-1n8n</link>
      <guid>https://dev.to/meg_gutshall/git-commit-aborts-before-i-can-create-a-commit-message-and-i-use---wait-1n8n</guid>
      <description>&lt;p&gt;I use Visual Studio Code on my Mac as my text editor and have it set up to open a new window to type my commit message, however when I type 'git commit' in the terminal, it instantaneously displays 'Aborting commit due to empty commit message.'&lt;/p&gt;

&lt;p&gt;I have my git config set up as 'git config --global core.editor "code --wait"' and when I type 'git config --global -e' it shows '[core] editor = code --wait'. I've uninstalled and reinstalled git, I've went through the &lt;a href="https://code.visualstudio.com/docs/editor/versioncontrol#_vs-code-as-git-editor"&gt;VS Code as Git Editor setup guide&lt;/a&gt;, and have searched online for a solution for at least ten hours. My git and VS Code versions are up to date and my commits work when I type 'git commit -m "message here"' in the command line, but I still don't know why my VS Code editor option isn't working.&lt;/p&gt;

&lt;p&gt;Any ideas here? Thank you!&lt;/p&gt;

</description>
      <category>help</category>
      <category>visualstudiocode</category>
      <category>git</category>
      <category>gitcommit</category>
    </item>
    <item>
      <title>Get to Know Your Self (Refactored)</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Thu, 20 Sep 2018 16:38:21 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/get-to-know-your-self-3345</link>
      <guid>https://dev.to/meg_gutshall/get-to-know-your-self-3345</guid>
      <description>&lt;p&gt;While Ruby is an incredibly user-friendly language, it’s not without its conundrums—one in particular: &lt;code&gt;self&lt;/code&gt;. &lt;code&gt;self&lt;/code&gt; is a Ruby reserved word, or a word specifically designed to have a special meaning in the Ruby language. The scope (or program visibility) of &lt;code&gt;self&lt;/code&gt; is any class or instance of a class, which we can also refer to as an &lt;code&gt;object&lt;/code&gt;. This means that &lt;code&gt;self&lt;/code&gt; can enable developers to contextually reference a particular class or instance of a class—depending on what the needs are for their program—without using a specific variable name.&lt;/p&gt;

&lt;p&gt;If the method is a message, who is the receiver? The object! Many times the object and &lt;code&gt;self&lt;/code&gt; are one in the same, but sometimes they aren't. In the example below, I'll explain how &lt;code&gt;self&lt;/code&gt; changes depending on the "message" that's being sent.&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;class&lt;/span&gt; &lt;span class="nc"&gt;AfroPet&lt;/span&gt;
  &lt;span class="nb"&gt;attr_accessor&lt;/span&gt; &lt;span class="ss"&gt;:species&lt;/span&gt;
  &lt;span class="vc"&gt;@@all&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;species&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="vi"&gt;@species&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;species&lt;/span&gt;
    &lt;span class="vc"&gt;@@all&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nc"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;
    &lt;span class="vc"&gt;@@all&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;hipmo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;AfroPet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hippopotamouse"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;eleham&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;AfroPet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Eleham"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;ghound&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;AfroPet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Giraffet Hound"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code above shows the &lt;code&gt;AfroPet&lt;/code&gt; class which has a &lt;code&gt;species&lt;/code&gt; attribute as well as an &lt;code&gt;@@all&lt;/code&gt; class variable. Two methods have been defined as part of the &lt;code&gt;AfroPet&lt;/code&gt; class: &lt;code&gt;#initialize&lt;/code&gt; and &lt;code&gt;self.all&lt;/code&gt;. In addition, three new species of &lt;code&gt;AfroPet&lt;/code&gt; are created, including the pocket-sized Eleham!&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fx36hlu3cc8gisa698wnk.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fx36hlu3cc8gisa698wnk.jpg" alt="Elephant shrew in the Berlin Zoo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;self&lt;/code&gt; Referring to an Instance of a Class
&lt;/h2&gt;

&lt;p&gt;We first see &lt;code&gt;self&lt;/code&gt; being shoveled into the &lt;code&gt;@@all&lt;/code&gt; class variable on Line 7, in the &lt;code&gt;#initialize&lt;/code&gt; method. At this moment in the program, what is &lt;code&gt;self&lt;/code&gt; referring to?&lt;/p&gt;

&lt;p&gt;Remember that whenever we instantiate a new object (also referred to as creating a new instance of a class), we call &lt;code&gt;#new&lt;/code&gt; on the class itself, then immediately call &lt;code&gt;#initialize&lt;/code&gt; on the object &lt;em&gt;just&lt;/em&gt; created—like a one, two punch. By writing &lt;code&gt;@@all &amp;lt;&amp;lt; self&lt;/code&gt; into our &lt;code&gt;#initialize&lt;/code&gt; method, we enable the new instance to be automatically saved into the &lt;code&gt;@@all&lt;/code&gt; class variable at the time of creation instead of having to manually add it later, which saves us time and keeps our code DRY!&lt;/p&gt;

&lt;p&gt;To refer back to my message analogy, in this example &lt;code&gt;#new&lt;/code&gt; is the sender while the &lt;code&gt;#initialize&lt;/code&gt; method is the message. Furthermore, since we find &lt;code&gt;self&lt;/code&gt; being utilized &lt;em&gt;inside&lt;/em&gt; the &lt;code&gt;#initialize&lt;/code&gt; method, it is considered part of what is called the method scope, confirming that &lt;code&gt;self&lt;/code&gt; does indeed refer to the newly created object.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;self&lt;/code&gt; Referring to a Class
&lt;/h2&gt;

&lt;p&gt;We next see &lt;code&gt;self&lt;/code&gt; on Line 10 in the &lt;code&gt;self.all&lt;/code&gt; class method. This is a class method designed to return the value of the &lt;code&gt;@@all&lt;/code&gt; class variable, which is an array of instances of the &lt;code&gt;AfroPet&lt;/code&gt; class. As you saw above, we created three new instances of the &lt;code&gt;AfroPet&lt;/code&gt; class: &lt;code&gt;hipmo&lt;/code&gt;, &lt;code&gt;eleham&lt;/code&gt;, and &lt;code&gt;ghound&lt;/code&gt;. So what happens when we call the &lt;code&gt;self.all&lt;/code&gt; class method?&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="no"&gt;AfroPet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;
&lt;span class="c1"&gt;#=&amp;gt; [#&amp;lt;AfroPet:0x000055b7db32c9c0 @species="Hippopotamouse"&amp;gt;,&lt;/span&gt;
     &lt;span class="c1"&gt;#&amp;lt;AfroPet:0x000055b7db32c970 @species="Eleham"&amp;gt;,&lt;/span&gt;
     &lt;span class="c1"&gt;#&amp;lt;AfroPet:0x000055b7db32c920 @species="Giraffet Hound"&amp;gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After typing &lt;code&gt;AfroPet.all&lt;/code&gt; in our terminal, it returns an array containing our three previously-instantiated &lt;code&gt;AfroPet&lt;/code&gt; objects, showing that the program recognizes that in this case, &lt;code&gt;self&lt;/code&gt; is referring to the &lt;code&gt;AfroPet&lt;/code&gt; class. We know this because the recipient of this particular "message" (or any class method as denoted with the &lt;code&gt;self.&lt;/code&gt; prefix before the method name) is the class itself, which means that &lt;code&gt;self&lt;/code&gt; is &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt; scoped to any particular instance, but to the &lt;em&gt;class&lt;/em&gt; instead.&lt;/p&gt;

&lt;p&gt;So how does &lt;code&gt;self&lt;/code&gt; know when to change the object it’s referencing? Two ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The first being context as we have previous discussed above.&lt;/li&gt;
&lt;li&gt;The second being a built-in rule for this reserved word: &lt;strong&gt;&lt;em&gt;one and only one &lt;code&gt;self&lt;/code&gt; will exist at any given time in the program.&lt;/em&gt;&lt;/strong&gt; There will never be a case in which &lt;code&gt;self&lt;/code&gt; will refer to more than one object at a time, therefore leaving it up to context to determine what &lt;code&gt;self&lt;/code&gt; actually means at any given point in the program.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I know, that’s a lot of information and your head is probably spinning by now, but let’s do one more example of &lt;code&gt;self&lt;/code&gt;. I’ll walk you through it!&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;class&lt;/span&gt; &lt;span class="nc"&gt;Creamery&lt;/span&gt;
  &lt;span class="nb"&gt;attr_accessor&lt;/span&gt; &lt;span class="ss"&gt;:creamery_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:ice_cream_flavor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:creamery_flavors&lt;/span&gt;
  &lt;span class="vc"&gt;@@all&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;creamery_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ice_cream_flavor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="vi"&gt;@creamery_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;creamery_name&lt;/span&gt;
    &lt;span class="vi"&gt;@ice_cream_flavor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ice_cream_flavor&lt;/span&gt;
    &lt;span class="vi"&gt;@creamery_flavors&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;creamery_flavors&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="vi"&gt;@ice_cream_flavor&lt;/span&gt;
    &lt;span class="vc"&gt;@@all&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;new_flavor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ice_cream_flavor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="vi"&gt;@ice_cream_flavor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ice_cream_flavor&lt;/span&gt;
    &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;creamery_flavors&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="vi"&gt;@ice_cream_flavor&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nc"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all_creamery_flavors&lt;/span&gt;
    &lt;span class="vc"&gt;@@all&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;creamery&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
      &lt;span class="n"&gt;creamery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;creamery_flavors&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;flavor&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;"&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;creamery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;creamery_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; "&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;flavor&lt;/span&gt;
      &lt;span class="k"&gt;end&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;

&lt;span class="n"&gt;bnj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Creamery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Ben and Jerry's"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Chunky Monkey"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;hersheys&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Creamery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Hershey's"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Chocolate"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;nelsons&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Creamery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Nelson's"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Graham Slam"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After defining the &lt;code&gt;Creamery&lt;/code&gt; class, we create three new creameries: &lt;code&gt;bnj&lt;/code&gt;, &lt;code&gt;hersheys&lt;/code&gt;, and &lt;code&gt;nelsons&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In this example, the &lt;code&gt;#initialize&lt;/code&gt; method creates a new creamery given the &lt;code&gt;creamery_name&lt;/code&gt; and &lt;code&gt;ice_cream_flavor&lt;/code&gt; attributes. Here we also declare an empty array called &lt;code&gt;@creamery_flavors&lt;/code&gt; to store this creamery’s ice cream flavors. The &lt;code&gt;ice_cream_flavor&lt;/code&gt; is added to the creamery’s &lt;code&gt;@creamery_flavors&lt;/code&gt; instance variable and the creamery itself is added to the &lt;code&gt;@@all&lt;/code&gt; class variable. &lt;em&gt;Remember: In the last example, we saw how &lt;code&gt;self&lt;/code&gt; refers to the newly created object when used inside the &lt;code&gt;#initialize&lt;/code&gt; method.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You can add a new flavor to a creamery by calling &lt;code&gt;#new_flavor&lt;/code&gt; on that instance of creamery and declaring the new &lt;code&gt;ice_cream_flavor&lt;/code&gt; as a String argument of the method. The new flavor is then added to the creamery’s &lt;code&gt;@creamery_flavors&lt;/code&gt; array. Does the context in which &lt;code&gt;self&lt;/code&gt; is used here look familiar? (Hint: See the &lt;code&gt;#initialize&lt;/code&gt; method!)&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="n"&gt;hersheys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_flavor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Vanilla"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#=&amp;gt; ["Chocolate", "Vanilla"]&lt;/span&gt;
&lt;span class="n"&gt;hersheys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_flavor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Strawberry"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#=&amp;gt; ["Chocolate", "Vanilla", "Strawberry"]&lt;/span&gt;

&lt;span class="n"&gt;bnj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_flavor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Chubby Hubby"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#=&amp;gt; ["Chunky Monkey", "Chubby Hubby"]&lt;/span&gt;
&lt;span class="n"&gt;bnj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_flavor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Oat of this Swirled"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;#=&amp;gt; ["Chunky Monkey", "Chubby Hubby", "Oat of this Swirled"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, the &lt;code&gt;self.all_creamery_flavors&lt;/code&gt; class method iterates over the creameries in the &lt;code&gt;@@all&lt;/code&gt; class variable and displays all the ice cream flavors contained within the &lt;code&gt;Creamery&lt;/code&gt; class. It works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Iterate over the &lt;code&gt;@@all&lt;/code&gt; class variable to access each creamery instance.&lt;/li&gt;
&lt;li&gt;For each creamery, call &lt;code&gt;#creamery_flavors&lt;/code&gt; to access their instance variable array of &lt;code&gt;ice_cream_flavor&lt;/code&gt; attributes.&lt;/li&gt;
&lt;li&gt;Chain the &lt;code&gt;#each&lt;/code&gt; method on that to iterate again over this nested array, this time &lt;code&gt;puts&lt;/code&gt;-ing out the flavors to the terminal.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The original &lt;code&gt;@@all&lt;/code&gt; class variable will automatically &lt;code&gt;return&lt;/code&gt; at the end of this method's execution.&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="no"&gt;Creamery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all_creamery_flavors&lt;/span&gt;

&lt;span class="s2"&gt;"Ben and Jerry's Chunky Monkey"&lt;/span&gt;
&lt;span class="s2"&gt;"Ben and Jerry's Oat of this Swirled"&lt;/span&gt;
&lt;span class="s2"&gt;"Ben and Jerry's Chubby Hubby"&lt;/span&gt;
&lt;span class="s2"&gt;"Hershey's Chocolate"&lt;/span&gt;
&lt;span class="s2"&gt;"Hershey's Vanilla"&lt;/span&gt;
&lt;span class="s2"&gt;"Hershey's Strawberry"&lt;/span&gt;
&lt;span class="s2"&gt;"Nelson's Graham Slam"&lt;/span&gt;

&lt;span class="c1"&gt;#=&amp;gt; [#&amp;lt;Creamery:0x00005558bceb7e08 @creamery_name="Ben and Jerry's", @ice_cream_flavor="Oat of this Swirled", @creamery_flavors=["Chunky Monkey", "Chubby Hubby", "Oat of this Swirled"]&amp;gt;,&lt;/span&gt;
     &lt;span class="c1"&gt;#&amp;lt;Creamery:0x00005558bceb7d68 @creamery_name="Hershey's", @ice_cream_flavor="Strawberry", @creamery_flavors=["Chocolate", "Vanilla", "Strawberry"]&amp;gt;,&lt;/span&gt;
     &lt;span class="c1"&gt;#&amp;lt;Creamery:0x00005558bceb7cc8 @creamery_name="Nelson's", @ice_cream_flavor="Graham Slam", @creamery_flavors=["Graham Slam"]&amp;gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You just learned &lt;code&gt;self&lt;/code&gt;! If you feel you have a good grasp of the concept of &lt;code&gt;self&lt;/code&gt;, celebrate with a scoop of your favorite ice cream! If not, check out the following helpful resources:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://learn.co/lessons/ruby-self-readme" rel="noopener noreferrer"&gt;Ruby &lt;code&gt;self&lt;/code&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://airbrake.io/blog/ruby/self-ruby-overview" rel="noopener noreferrer"&gt;Self in Ruby: A Comprehensive Overview&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.honeybadger.io/blog/ruby-self-cheat-sheet/" rel="noopener noreferrer"&gt;Understanding &lt;code&gt;self&lt;/code&gt; in Ruby&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;...And then have a scoop of ice cream. :D&lt;/p&gt;
&lt;h3&gt;
  
  
  Refactor Bonus Section
&lt;/h3&gt;

&lt;p&gt;Over a year after I originally wrote this blog post, I had occasion to come back and review my old posts. &lt;em&gt;My God&lt;/em&gt; this one was &lt;strong&gt;&lt;em&gt;not&lt;/em&gt;&lt;/strong&gt; pretty! I tried to clean it up a bit and use better examples/explain them better. If you have any comments to add or see something that's glaringly wrong, please DM me on Twitter at &lt;a href="https://twitter.com/meg_gutshall" rel="noopener noreferrer"&gt;@meg_gutshall&lt;/a&gt; or email me at &lt;a href="mailto:meghan.gutshall@gmail.com"&gt;meghan.gutshall@gmail.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In my second round of research, I found a remarkably interesting and high-level post on &lt;code&gt;self&lt;/code&gt; in Ruby and wanted to share it as bonus content. &lt;strong&gt;Warning:&lt;/strong&gt; This is confusing shit and I am still far away from feeling completely comfortable with it. If you're a beginner, I highly recommend you stick to the three links above and bookmark this one to revisit at a later date: &lt;a href="https://yehudakatz.com/2009/11/15/metaprogramming-in-ruby-its-all-about-the-self/" rel="noopener noreferrer"&gt;Metaprogramming in Ruby: It's All About the Self&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also, I rewrote both of my code examples used above for this refactored blog post and wanted to show a method for the second example that could be of general use—it's just not necessarily related to &lt;code&gt;self&lt;/code&gt;.&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;class&lt;/span&gt; &lt;span class="nc"&gt;Creamery&lt;/span&gt;

  &lt;span class="o"&gt;...&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;all_flavors&lt;/span&gt;
    &lt;span class="vi"&gt;@creamery_flavors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;each&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;flavor&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="n"&gt;flavor&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nc"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all_creamery_flavors&lt;/span&gt;
    &lt;span class="vc"&gt;@@all&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;each&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;creamery&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;creamery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all_flavors&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You may have noticed that we had to iterate twice in the blog post's &lt;code&gt;self.all_creamery_flavors&lt;/code&gt; method. Here I created an &lt;code&gt;#all_flavors&lt;/code&gt; instance method that iterates over the &lt;code&gt;@creamery_flavors&lt;/code&gt; array, &lt;code&gt;puts&lt;/code&gt;-ing each flavor just like the blog post example. The only difference is, this method is scoped to an individual creamery. Then, I refactored the &lt;code&gt;self.all_creamery_flavors&lt;/code&gt; class method to call on the new &lt;code&gt;#all_flavors&lt;/code&gt; instance method once it goes through its first iteration in accessing individual creamery instances.&lt;/p&gt;

</description>
      <category>softwaredevelopment</category>
      <category>ruby</category>
      <category>reservedwords</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>HTML &amp; CSS: The ‘90s Kids of Programming</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Thu, 20 Sep 2018 16:34:05 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/html--css-the-90s-kids-of-programming-50hg</link>
      <guid>https://dev.to/meg_gutshall/html--css-the-90s-kids-of-programming-50hg</guid>
      <description>&lt;p&gt;&lt;em&gt;For brevity’s sake, I am going to use acronyms throughout this post. Full phrases and relevant information will be covered at the end of this post.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After almost two months in the &lt;a href="https://flatironschool.com/career-courses/coding-bootcamp/online/" rel="noopener noreferrer"&gt;online software engineering program&lt;/a&gt;, I finally feel like I’m getting into the thick of the curriculum at Flatiron. I’ve finished Intro to Ruby Development, learned about Git and &lt;a href="https://github.com/meg-gutshall" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, sped through Procedural Ruby, and am now working on the Object Oriented Ruby section. One section I especially enjoyed though was HTML and CSS Introduction.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6z59r46fvrjdl76ow8mu.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F6z59r46fvrjdl76ow8mu.png" alt="HTML &amp;amp; CSS Symbols"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  HTML: The Language of the Web
&lt;/h2&gt;

&lt;p&gt;HTML is the language of the web, however, it is not a programming language, but rather a &lt;em&gt;markup&lt;/em&gt; language. HTML documents are comprised of content (text written in plain English) and markup (HTML tags meant to structure the content). These documents are used by web servers and web browsers to display the non-markup version of the document—a web page—in a process called rendering.&lt;/p&gt;

&lt;p&gt;Here’s a basic overview of the rendering process: HTML documents are stored at unique locations (IP addresses) on web servers and made available to web browsers via the Internet. A user will type a URL into a web browser’s search bar and the web browser feeds the URL into the DNS, which then translates the URL address to its corresponding IP address. The web browser then uses HTTP to communicate with the server at the returned IP address and requests the sought-after information—the HTML files used to render the web page. Once the web browser receives these files, it translates the HTML code and displays the web page on our screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Semantics of HTML
&lt;/h2&gt;

&lt;p&gt;As a linguistics nerd (in case you missed it, there's a great example of my Spanish linguistics nerdiness coming out in my last post, &lt;a href="https://meghangutshall.com/2018/07/21/the_little_things_matter/" rel="noopener noreferrer"&gt;"The Little Things Matter"&lt;/a&gt;), I love HTML due to its semantic capabilities, so bear with me as I geek out for a minute…&lt;/p&gt;

&lt;p&gt;An HTML document consists of two sections: a head and a body. The head is not displayed as part of the web page when the browser renders the HTML document. Instead it contains data (such as page title, a favicon, links to the document’s CSS and JavaScript, and metadata) which relays additional information not contained in the body section to the web browser. A web page’s title and favicon appear in the window tab of the web browser. The CSS link provides styling rules for the HTML document and the JavaScript link enables additional, more complex features. Metadata defines the document’s language, character encoding, author, and description. Adding an accurate description that includes applicable keywords is especially important as it affects the site’s SEO and will determine the frequency with which the web page appears in Internet search results.&lt;/p&gt;

&lt;p&gt;The meat of the document, the body, is composed of HTML elements. An HTML element contains an opening tag, a section of content, and a closing tag*. The type of tag used in the element determines the meaning and structure (semantics!) of the enclosed content. Common HTML tags denote links, line breaks, headings, images, lists, paragraphs, and tables. Web browsers read the HTML tags and apply their meaning to the enclosed content when rendering a web page. HTML elements can also accept attributes to transfer more detailed information regarding the enclosed content. It is important to assign HTML tags accurately, not only to structure the web page correctly, but also to enable website accessibility for those who use screen readers and other tools to navigate the web.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS: The Beauty to HTML’s Beast
&lt;/h2&gt;

&lt;p&gt;CSS styles web pages by assigning a CSS selector to an HTML element and a declaration to the selector. The most commonly used CSS selectors point toward an HTML element, class, or id, but can also call on an element’s attribute or its relationship with the surrounding elements. CSS declarations are made up of properties and their corresponding property values. Multiple CSS declarations can apply to one or more CSS selectors–called a declaration block–and multiple CSS selectors can apply to one or more HTML elements, giving CSS a totally customizable execution.&lt;/p&gt;

&lt;p&gt;A general convention among programmers is to completely separate the tasks of writing content (HTML) and styling content (CSS). Although CSS was designed specifically to work with HTML, in most cases a site’s CSS is located in an entirely separate document than the HTML. Instead, the HTML document stores a link to its corresponding CSS document in the head section which the web browser calls on to style the web page at the time of rendering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why HTML and CSS Are Important for Programmers
&lt;/h2&gt;

&lt;p&gt;The combination of these two languages make up a huge part of front-end web development. As a software engineer, you’ll need to be able to read and write HTML to code and debug your programs... and you’ll want to be familiar with CSS to make your programs pretty! While on Flatiron’s learning platform, the message that stood out to be the most in the HTML and CSS Introduction section was: &lt;strong&gt;All pathways to web programming success rely on strength in HTML.&lt;/strong&gt; And as I see it, the first step on that pathway is your &lt;a href="https://meghangutshall.com/" rel="noopener noreferrer"&gt;portfolio website&lt;/a&gt;. This cannot be created without HTML and will most likely look awful without CSS. Your website is your prospective employers’ first impression of you as a programmer—so make it a good one!&lt;/p&gt;

&lt;p&gt;There is so much information available on HTML and CSS as they are fundamental programming tools and, simply, because they have been around for a very long time. I could write a dozen more blog posts on the topic but, for now, will leave you with a short index of the aforementioned acronyms as well as some of my favorite resources regarding HTML and CSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Index
&lt;/h3&gt;

&lt;p&gt;CSS → Cascading Style Sheets&lt;br&gt;
DNS → Domain Name Server&lt;br&gt;
HTML → Hypertext Markup Language&lt;br&gt;
HTTP → Hypertext Transfer Protocol&lt;br&gt;
SEO → Search Engine Optimization&lt;br&gt;
URL → Uniform Resource Locator&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Learn/HTML" rel="noopener noreferrer"&gt;Mozilla Development Network&lt;/a&gt;&lt;br&gt;
&lt;a href="https://learn.shayhowe.com/html-css/" rel="noopener noreferrer"&gt;Learn to Code HTML &amp;amp; CSS&lt;/a&gt;&lt;br&gt;
&lt;a href="https://css-tricks.com/guides/" rel="noopener noreferrer"&gt;CSS Tricks&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/" rel="noopener noreferrer"&gt;W3Schools&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;*Not all HTML elements require a closing tag (such as &lt;code&gt;img&lt;/code&gt;, &lt;code&gt;input&lt;/code&gt;, &lt;code&gt;br&lt;/code&gt;, &lt;code&gt;hr&lt;/code&gt;, &lt;code&gt;meta&lt;/code&gt;, and a few others), but that's a topic for another blog post. When in doubt, use a closing tag.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>The Little Things Matter</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Thu, 20 Sep 2018 16:30:13 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/the-little-things-matter-56i6</link>
      <guid>https://dev.to/meg_gutshall/the-little-things-matter-56i6</guid>
      <description>&lt;p&gt;I’m officially one month into the &lt;a href="https://flatironschool.com/career-courses/coding-bootcamp/online/" rel="noopener noreferrer"&gt;online software engineering program at the Flatiron School&lt;/a&gt;! It’s tough (&lt;em&gt;really&lt;/em&gt; tough)... but I’m still here! I just finished the ‘Intro to Ruby Development’ section and learned step-by-step how to program a game of Tic Tac Toe in the Ruby language. So far I’ve noticed that once I get through the snags I encounter in the labs, I get a fairly comprehensive understanding of the material. When I’m unravelling those knots though, I find myself repeating over and over in my head, ‘Don’t be so damn hard on yourself!’&lt;/p&gt;

&lt;p&gt;You see, this is brand new to me. I never touched Ruby until I started at Flatiron. I’ve found that it’s an incredibly user-friendly language, but inevitably (and more frequently than I’d like), I still manage to get lost. It’s really frustrating, and I have to constantly remind myself that it’s okay to get a little off-track. Confusion is part of learning something new, and as a beginner, it’s important to have patience while getting over that learning curve.&lt;/p&gt;

&lt;p&gt;Patience is key—and I’ll explain more later—but first I need to give you a little more background about myself. Let’s get in our time machine and go back ten years…&lt;/p&gt;

&lt;p&gt;I had just entered Temple University as a freshman with an undeclared major. Although both of my parents were drawn toward STEM-related fields, I decided to forge my own path through the college of Liberal Arts. Since a language was required, I added Spanish to my schedule and ultimately came to love it, declaring Spanish as my major in my third semester. After four years of study and multiple visits to Spanish-speaking countries, I can now say that I’m a fluent speaker.&lt;/p&gt;

&lt;p&gt;So what does this have to do with Ruby and the Flatiron program?&lt;/p&gt;

&lt;p&gt;As I go through the lessons, I’m drawing a lot of parallels between learning Ruby and learning Spanish. One that keeps jumping out at me is: &lt;strong&gt;the little things matter&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you’re a programmer, I’m sure you’ve been through this at least once before: You’re writing a program and trying to get it to pass your tests but you keep receiving an error message. You try everything you can think of to fix it and the next thing you, know three hours have gone by and you’re still stuck on that one damn test!! Yeah, that was me last Saturday afternoon and I was getting desperate.&lt;/p&gt;

&lt;p&gt;Luckily, Flatiron’s platform Learn.co lets you chat live with a technical coach when you get stuck on something—which I probably should have utilized about 30-40 minutes into my struggle instead of driving myself completely insane. I was connected with technical coach James (shout out to James!) and we got to work. He seemed a bit confused because everything looked okay to him, so we tried a few small tweaks at a time to see if we could get the code to pass. In the end, we discovered that I was returning &lt;code&gt;false&lt;/code&gt; at the wrong part of the program. If you return &lt;code&gt;false&lt;/code&gt; inside an iteration, the method only accepts the first object in your array and ends before iterating through the rest of the objects. In other words, not good.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff45v0xw6jf3n51vqqb6k.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ff45v0xw6jf3n51vqqb6k.jpg" alt="Screen shot of side-by-side code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ugh!! After all of that confusion, hard work, and frustration, the end result was switching just two lines to get the program to pass the test. Two lines! That’s it! I laughed at myself, thanked James profusely, and was able to code out the rest of the program on my own to complete the Tic Tac Toe Game Status lab. Again (over a well-deserved beer), I thought to myself: ‘Have patience. You’ll get this down soon.’&lt;/p&gt;

&lt;p&gt;This experience reminded me of a common beginner’s mistake with the Spanish language. There are many Spanish-English cognates—which are words that sound very similar because they have the same root origin in Latin (i.e. apartment and apartamento)—and because of this, many beginners will accidentally use the wrong word or make up a new word entirely. For instance, a lot of students mistakenly say “estoy embarazada”, which means “I’m pregnant”, instead of “estoy avergonzada”, which means “I’m embarrassed”. That’s a fun one to explain to a new Spanish speaker. :)&lt;/p&gt;

&lt;p&gt;Even changing one letter in one word of a sentence can completely change the meaning of the statement. In a class at Temple, a friend of mine meant to say “No como desayuno si no tengo hambre.” but instead it came out as “No como desayuno si no tengo &lt;em&gt;hombre&lt;/em&gt;.” One means “I don’t eat breakfast unless I’m hungry.” the other, “I don’t eat breakfast unless I have a man.” Hmm… we got a good laugh out of that one.&lt;/p&gt;

&lt;p&gt;Needless to say, in a learning environment, these little mistakes in Spanish can be a lot funnier than mistakes in Ruby, which tend to be frustrating as all hell. But like I said before, it’s important to have patience with yourself, because if you’re not careful, little mistakes can snowball into bad situations. I’ve gotten lost in both Cuba and Mexico (twice) because of mispronunciation or confusing common words. Those were both frustrating and costly lessons to learn.&lt;/p&gt;

&lt;p&gt;Once I reach the more complex labs, I imagine it will be pretty similar, but only on a larger scale so messing up one little bit of code will have greater consequences. Therefore, I’m taking a lesson I learned early on while studying Spanish and applying it here to programming: &lt;strong&gt;Be patient. If you pay attention to the little things, you keep them from becoming big problems.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>spanish</category>
      <category>learning</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>My $witch to $oftware Development</title>
      <dc:creator>Meg Gutshall</dc:creator>
      <pubDate>Thu, 20 Sep 2018 13:47:38 +0000</pubDate>
      <link>https://dev.to/meg_gutshall/my-witch-to-oftware-development-2fm5</link>
      <guid>https://dev.to/meg_gutshall/my-witch-to-oftware-development-2fm5</guid>
      <description>&lt;p&gt;In late 2017 I was working as technical coordinator and marketing lead for a small IT consulting firm outside of Philadelphia, my first ever position in the tech industry. Since I knew absolutely nothing about the industry, I decided to do my own research and immerse myself in the latest news and best practices. I read books and articles on different technologies and programming languages, I attended numerous networking events in the city, and I even enrolled in a computer science class through my local community college. I was never afraid to ask questions and suggest implementing new concepts at the firm, but my boss never seemed to recognize my efforts and in fact discouraged my actions, citing that it wasn’t part of my job description. After over a year and a half of dedication to the company, I began to realize that ideas we had discussed at the interview were never going to come to fruition and, frankly, I was feeling extremely underappreciated in my role. It seemed to me that the position I had so much wanted to become a career was not working out.&lt;/p&gt;

&lt;p&gt;As part of my job, I was in charge of onboarding new consultants and running payroll which meant I had intimate knowledge of everyone’s salary details and how many years of work experience it took for them to get there. This insight, combined with networking events in which I met many women who had transitioned into the tech industry, sparked an idea in my brain and got me thinking, ‘Why can’t I do this too?’&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frp8jql1hgybfohjgp1ha.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Frp8jql1hgybfohjgp1ha.jpg" alt="Cash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay, so the title of my blog post may be a little misleading. The wages, benefits, and job perks that I encountered with the consultants at the recruiting firm definitely caught my eye, but after the first time I manipulated HTML code and saw tangible changes reflect on a website… you could say I fell in love.&lt;/p&gt;

&lt;p&gt;My journey to my present-day status started in 2012 with a simple project at my first job—a field hockey training facility. After scoring an interview for an administrative position, Googling ‘What is field hockey?’, and sitting through the strangest 2.5-hour interview I’ve experienced to date, I was offered to start the following Monday. One of my tasks was to add content to their website which was developed through WordPress. I began to teach myself how to navigate the platform using the enormous amount of free educational information available online and soon went from updating rosters and posting pictures to creating tournament galleries, adding streamlined registration features (with online payment capabilities), and cracking open files to tweak the HTML and CSS codes. I even created a subdomain to highlight the club’s tour in New Zealand which included blog posts and collaborative galleries.&lt;/p&gt;

&lt;p&gt;After two and a half years at my first job, I decided to resign in the summer of 2015 and take some time to travel. Upon arriving home, I followed some LinkedIn connections to my next job at the IT consulting firm. (Networking—it really works!) Even though I had an overwhelming amount of duties (when you work as admin for a small company, you wear many, many hats), I was still able to get my hands on the company website's code. I mainly updated blog posts and tweaked features here and there, but I also had the opportunity to run site testing when my manager decided to hire a professional to completely redo our site. It was my job to try to break things before the site went live and I got pretty good at it!&lt;/p&gt;

&lt;p&gt;At the end of 2017 I had to take short term disability leave and my employer couldn’t hold my position open for me so I was let go. I was struggling to pay the bills and on top of that, questioning everything about my life and what had led me to my current situation. After some intensive self-reflection and a few meetings with a career coach, I found myself on the path to starting a career in software engineering.&lt;/p&gt;

&lt;p&gt;Through attending networking events and tech talks, I learned the myriad ways in which software engineering can be used to help society as well as improve the lives of others. Philly is a city of passion—which extends to their tech industry and startup culture as well. Whether it be fixing a simple dilemma or creating a solution for a systemic problem, the people in my city are willing to share their thoughts, then collaborate and act on them. I myself have a passion for solving problems and helping others and I think this could be the perfect outlet for me to do so. Plus, there will never be a risk of stagnation in the field since technology is ever increasingly becoming a part of our day-to-day lives.&lt;/p&gt;

&lt;p&gt;The tech industry seems to crave innovation and curiosity so this trait that had previously gotten me reprimanded could do the exact opposite in the proper environment. Already, a mentor of mine reached out to me for help at her social media marketing firm, which includes updating her website. Now, I find that when I have nonconventional suggestions or go the extra mile in a project, I’m either met with praise or directional feedback which constructively encourages me down an alternate path. I don’t feel boxed-in or micromanaged anymore. Plus when I told her that I was going back to school for software engineering, she was ecstatic for me!&lt;/p&gt;

&lt;p&gt;Thankfully, I have already learned the tools I need to get a foothold in the tech industry (you pick up a LOT working at a recruiting firm), now I just need the developmental knowledge and, with &lt;a href="https://flatironschool.com/career-courses/coding-bootcamp/online/" rel="noopener noreferrer"&gt;Flatiron School’s online software engineering program&lt;/a&gt;, I will attain that expertise.&lt;/p&gt;

</description>
      <category>codingbootcamp</category>
      <category>womenintech</category>
      <category>careerchange</category>
    </item>
  </channel>
</rss>
