<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Scott Wagner</title>
    <description>The latest articles on Forem by Scott Wagner (@nbbdog11).</description>
    <link>https://forem.com/nbbdog11</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%2F132898%2F320b6c73-1e50-40cb-ad0e-bd373306a2d4.png</url>
      <title>Forem: Scott Wagner</title>
      <link>https://forem.com/nbbdog11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nbbdog11"/>
    <language>en</language>
    <item>
      <title>TIL: Straight Borders on a Rounded Element With CSS</title>
      <dc:creator>Scott Wagner</dc:creator>
      <pubDate>Sat, 19 Jun 2021 21:30:47 +0000</pubDate>
      <link>https://forem.com/nbbdog11/til-straight-borders-on-a-rounded-element-1lbj</link>
      <guid>https://forem.com/nbbdog11/til-straight-borders-on-a-rounded-element-1lbj</guid>
      <description>&lt;p&gt;Hi! This is the second post in my TIL series, where I'm sharing small things that I've learned recently. With this post, I'm going to cover a method I've recently used for putting a straight border on an HTML element with rounded corners.&lt;/p&gt;

&lt;p&gt;I was building out a "card" element for a website, and it had that typical card styling: some rounded corners, and a bit of a box shadow to create some depth. While reading through &lt;a href="https://www.refactoringui.com/book"&gt;Refactoring UI: The Book&lt;/a&gt; I got to the "Finishing Touches" section. In that section, the book suggested adding accent borders to things for a pop of color. It looks neat, so I decided to go for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you put a border on an HTML element?
&lt;/h2&gt;

&lt;p&gt;This isn't a trick question. It's usually one of the first things that a web developer will learn when they're starting to play with CSS. You use the &lt;code&gt;border&lt;/code&gt; property if you want all the borders to be the same. Otherwise, you'll use  some combination of the side-specific border properties: &lt;code&gt;border-top&lt;/code&gt;, &lt;code&gt;border-bottom&lt;/code&gt;, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;The card element has a &lt;code&gt;border-radius&lt;/code&gt; set on it to achieve the rounded corners we want. As a result though, the border follows the curvature of the corners. If this is desirable for you, then there's no problem. What I wanted though, was a straight line "accent" that mimicked a border.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;I ended up using &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements"&gt;pseudo-elements&lt;/a&gt; to achieve the desired accent effect. With absolute positioning, and hiding overflow on the card, I was able to make an accent line that didn't curve with the card's corners. There's a CodeSandbox demo below with the working solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Demo
&lt;/h3&gt;

&lt;p&gt;This CodeSandbox has a demo of the problem and the solution.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/quirky-pascal-btom0?module=/index.css"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Pros
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;I think the straight accent line looks nicer than the curved border.&lt;/li&gt;
&lt;li&gt;Using the pseudo-element unlocks extra animation options if we want them (slide in, expand outward, etc.) &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cons
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The solution introduces positioned elements. This may cause some layering problems depending on the elements around it. Unlikely, but possible. (&lt;em&gt;See &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context"&gt;The stacking context&lt;/a&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position"&gt;position&lt;/a&gt;&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;The element with the accent line needs to have its overflow hidden. It's fine in this use case, but may not be in others.&lt;/li&gt;
&lt;li&gt;It does require more code than using a regular border.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;This solution ended up working out well for me. It allowed me to achieve what I believe is a more desirable look without too much more code. I realize that the cons list is longer than the pros list, but the tradeoff is worth it for me. The scarier cons about positioning and overflow only apply in specific situations that seem unlikely.&lt;/p&gt;

&lt;p&gt;Also, I mentioned &lt;a href="https://www.refactoringui.com/book"&gt;Refactoring UI: The Book&lt;/a&gt; earlier. I'd highly recommend it, but it is a bit on the pricey side (see if your employer has an education budget). I've found it to be a great resource for developers looking to improve their web design skills with practical examples.&lt;/p&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>TIL: DRYing Out Styles With styled-components</title>
      <dc:creator>Scott Wagner</dc:creator>
      <pubDate>Tue, 04 May 2021 23:12:38 +0000</pubDate>
      <link>https://forem.com/nbbdog11/til-drying-out-styles-with-styled-components-b29</link>
      <guid>https://forem.com/nbbdog11/til-drying-out-styles-with-styled-components-b29</guid>
      <description>&lt;p&gt;Welcome to the first post in my TIL series. My intention with this series is to share tidbits of neat things that I've learned, experimented with, or rediscovered.&lt;/p&gt;

&lt;p&gt;This first post is going to be about extracting and reusing some common styling in React components using &lt;a href="https://styled-components.com/"&gt;styled-components&lt;/a&gt; (a CSS-in-JS library for React), and how Typescript saved the day. &lt;/p&gt;

&lt;p&gt;So here's the background: I'm working in a React Typescript project that uses styled-components. In this project, there was a component that had a dropdown element to it and when the dropdown expanded a chevron svg would rotate as a bit of visual indication that the dropdown was now open. I needed to add a new component that had a dropdown element with a similar svg animation.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: The &lt;a href="https://codesandbox.io/s/sad-oskar-iz92p"&gt;CodeSandbox sample project&lt;/a&gt; isn't the actual project, but a stripped down example for this post.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Started
&lt;/h2&gt;

&lt;p&gt;Here's the first component. The interesting bit is the svg styling in the button, particularly the &lt;code&gt;transition&lt;/code&gt; and &lt;code&gt;transform&lt;/code&gt; properties. They combine to create the rotation animation that responds to the styled component prop change.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// OriginalComponent.tsx&lt;/span&gt;
&lt;span class="cm"&gt;/* other components and stuff */&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;DropdownTriggerButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DropdownTriggerButtonProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;`
  /* some button styles */
  svg {
    height: 1em;
    width: auto;
    /* LOOK HERE 👇 */
    transition: transform ease-in-out 300ms;
    &lt;/span&gt;&lt;span class="p"&gt;${(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isOpen&lt;/span&gt;
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
            transform: rotate(0deg);
          `&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
            transform: rotate(180deg);
          `&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What Next?
&lt;/h2&gt;

&lt;p&gt;I needed to add a new component, so I did that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// NewComponent.tsx&lt;/span&gt;
&lt;span class="cm"&gt;/* other components and stuff */&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Expander&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ExpanderProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;`
  svg {
    height: 1.5em;
    width: auto;
    cursor: pointer;
    /* LOOK HERE 👇 */
    transition: transform ease-in-out 200ms;
    &lt;/span&gt;&lt;span class="p"&gt;${(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;expanded&lt;/span&gt;
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
            transform: rotate(0deg);
          `&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
            transform: rotate(180deg);
          `&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Neat Part
&lt;/h2&gt;

&lt;p&gt;Through the use of the &lt;a href="https://styled-components.com/docs/api#css"&gt;css&lt;/a&gt; utility in styled-components, I was able to extract the common svg animation to a reusable variable for inclusion in both components. &lt;em&gt;This is the DRYing (Don't Repeat Yourself) bit.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="cm"&gt;/* expandIconAnimation.tsx */&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;styled-components&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;expandIconAnimationProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;expanded&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;expandIconAnimation&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;expandIconAnimationProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;`
  svg {
    transition: transform ease-in-out 300ms;
    &lt;/span&gt;&lt;span class="p"&gt;${(&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;expanded&lt;/span&gt;
        &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
            transform: rotate(0deg);
          `&lt;/span&gt;
        &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;css&lt;/span&gt;&lt;span class="s2"&gt;`
            transform: rotate(180deg);
          `&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is neat for a couple reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;There's now an animation that's easy to include in new components that need it. We don't need to reinvent the wheel every time.&lt;/li&gt;
&lt;li&gt;This promotes visual consistency across components. If the two components had the same icon animation for the same semantic reason (implemented separately), and there were differences in the timing function, or the animation duration, or even the transform, it wouldn't feel as cohesive. This can be a bad thing. If you did want to allow some style overrides for specific circumstances, you could change the &lt;code&gt;expandIconAnimation&lt;/code&gt; variable to a function that accepted arguments for values that need to be be able to be overridden.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Updating Our Original Components
&lt;/h2&gt;

&lt;p&gt;Our components after being updated to use the &lt;code&gt;expandIconAnimation&lt;/code&gt; "partial":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;DropdownTriggerButton&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DropdownTriggerButtonProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;`
  /* some button styles */

  &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;expandIconAnimation&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
  svg {
    height: 1em;
    width: auto;
  }
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Expander&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;styled&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;ExpanderProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="s2"&gt;`
  &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;expandIconAnimation&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;
  svg {
    height: 1.5em;
    width: auto;
    cursor: pointer;
  }
`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We've successfully reduced the duplication and ensured a consistent rotation animation for the expand/collapse functionality. However, you may have noticed that the &lt;code&gt;DropdownTriggerButton&lt;/code&gt; used &lt;code&gt;isOpen&lt;/code&gt; as the prop to control the transforms, whereas the &lt;code&gt;Expander&lt;/code&gt; used &lt;code&gt;expanded&lt;/code&gt;, and the &lt;code&gt;expandIconAnimation&lt;/code&gt; expects &lt;code&gt;expanded&lt;/code&gt;. This means that the usage in &lt;code&gt;DropdownTriggerButton&lt;/code&gt; won't work. &lt;/p&gt;

&lt;p&gt;Luckily, Typescript catches that for us. When using &lt;code&gt;expandIconAnimation&lt;/code&gt; in &lt;code&gt;DropdownTriggerButton&lt;/code&gt; we get a build error that the property &lt;code&gt;expanded&lt;/code&gt; is missing in the props type for &lt;code&gt;DropdownTriggerButton&lt;/code&gt;, but is required by &lt;code&gt;expandIconAnimation&lt;/code&gt;. Fortunately, it's a pretty simple fix in this scenario. We can just change the prop on &lt;code&gt;DropdownTriggerButton&lt;/code&gt; from &lt;code&gt;isOpen&lt;/code&gt; to &lt;code&gt;expanded&lt;/code&gt;. The types are satisfied, and the animation works as expected. Thanks Typescript. &lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Making common styles can be a good way to reduce code duplication and promote visual consistency.&lt;/li&gt;
&lt;li&gt;Typescript is a great tool to aid in the prevention of bugs.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>react</category>
      <category>typescript</category>
      <category>css</category>
    </item>
    <item>
      <title>The Hunger for Learning: Based on a True Story</title>
      <dc:creator>Scott Wagner</dc:creator>
      <pubDate>Sun, 08 Mar 2020 02:50:04 +0000</pubDate>
      <link>https://forem.com/nbbdog11/the-hunger-for-learning-based-on-a-true-story-2bke</link>
      <guid>https://forem.com/nbbdog11/the-hunger-for-learning-based-on-a-true-story-2bke</guid>
      <description>&lt;p&gt;&lt;em&gt;Note: This was a blog post I originally published on my &lt;a href="https://scottwagner.io"&gt;personal site&lt;/a&gt; back in June of 2018. I've decided to write here instead, and now some parts are wrong (particularly the last paragraph). Most of it is still relevant.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This story starts with a web developer who had a desire to learn new skills, and practice and reinforce old ones.&lt;/p&gt;

&lt;p&gt;First, he tried to contribute to open source. It was a bit intimidating, and he didn't feel comfortable with it (may have been a small case of imposter syndrome). Next, he tried to find opportunities at work to learn new skills. This proved difficult as well, because he didn't have the freedom to choose how his work got done. Finally, a voice spoke to him, "Build a portfolio website/blog. All the cool kids are doing it. Plus, you can start building a personal brand. Score!" And that's just what he set out to do.&lt;/p&gt;

&lt;p&gt;With an idea in hand, and a thirst for knowledge, his focus shifted from "What?" to "How?". The "How?" question was almost as tricky as the "What?" question, and itself posed a "What?" question. "What do I know, and what do I want to learn?", he asked himself. "Well, I'm pretty comfortable with React and its ecosystem. Let's start there."&lt;/p&gt;

&lt;p&gt;The developer started like many people do in this situation, he fired up VS Code, initialized a new project, installed all of the necessary dependencies, etc. After about 30 minutes, voila, a React project shell was born. His pomodoro timer said it was time for a break, and he rested.&lt;/p&gt;

&lt;p&gt;Upon returning to the task at hand, he began to research how others were building blog sites in React, at which point he stumbled upon &lt;a href="https://www.gatsbyjs.org/"&gt;Gatsby&lt;/a&gt;. Gatsby is a static-site generator for React which handles a lot of the boilerplate necessary to get a site up and running, and has a &lt;a href="https://graphql.org/"&gt;GraphQL&lt;/a&gt; data/configuration layer to make programmatic page generation easy. This revelation, while a huge time-saver in the long run, meant that he had to tear down the existing project and start over. So after deleting the "old" project, initializing a new one, and installing one or two dependencies, he was ready to go. For real this time, and quicker than before.&lt;/p&gt;

&lt;p&gt;He read through a bunch of the tutorials on Gatsby's site, learned about all the cool things Gatsby could do, and pushed them to the back of his brain for later consumption. Now that Gatsby was handling all the tricky stuff, our developer was free to focus on what he was comfortable with, building a site with React. The components were coming along nicely, and he had a basic layout built, but he needed to make it look pretty. This meant taking a journey into a place he was less familiar with, CSS Land. He read about UX patterns, and anti-patterns, and anti-anti-patterns. How much padding this or that element needed, and what borders are okay to use. He read about media queries so that mobile users would have a nice experience too. He refreshed his memory of &lt;a href="https://fontawesome.com/"&gt;Font Awesome&lt;/a&gt; to add nice icons for social sites, and then he got to work on making the site pretty.&lt;/p&gt;

&lt;p&gt;At this point in our story, the site was built, and looked kinda pretty, but it wasn't accessible to the world. This meant he had another question to answer, "How do I host this, and how do I get it there?" Many options were available to him: use a GitHub Pages repository, use a static web host and FTP the files there, use a VPS, but ultimately he decided to go back to the second question "What do I want to learn?" He decided that cloud hosting and provisioning was a gap in his skill set that needed addressing. To remedy this, he chose to use AWS S3 to host the site, with a plethora of other AWS services (Cloudfront, Route53, etc.) to support it. Using the AWS CLI along with the web interface, he was able to create the infrastructure needed, put files where they belonged, and show off his new site to the world.&lt;/p&gt;

&lt;p&gt;He still wasn't satisfied. The developer had recently been to a &lt;a href="https://www.meetup.com/PhillyXP/events/245147441/"&gt;meetup&lt;/a&gt; where he was introduced to the concept of infrastructure as code, using &lt;a href="https://www.terraform.io/"&gt;Terraform&lt;/a&gt; to provision AWS infrastructure. This was another opportunity to learn a new skill, and the developer seized it. He tore down his existing AWS infrastructure, re-provisioned it using Terraform, and wrote a script to automate the Gatsby build, and AWS/Terraform deploy process. The script was run, and a fully functional site was available to the world, and it was good.&lt;/p&gt;

&lt;p&gt;The developer looked back on this project, and was relatively pleased with the results. He now had a fully functional portfolio site/blog, and a new set of skills acquired in the process. Starting with knowledge of React and a touch of CSS, he learned Gatsby, more in-depth CSS, AWS, and Terraform. Knowing that no work is ever truly complete, he continues to look for areas of improvement to this day.&lt;/p&gt;

&lt;p&gt;My name is Scott Wagner, and I am that developer. &lt;del&gt;The site you are on&lt;/del&gt; (&lt;a href="https://scottwagner.io"&gt;scottwagner.io&lt;/a&gt;) is the site built in this story. I wanted to share my experience building this site and learning a bunch of neat stuff along the way, so I started writing, and it came out as a third person story. I'll be adding more content in the coming weeks/months on a variety of software-related topics. Stay tuned sports fans.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>react</category>
      <category>beginners</category>
      <category>gatsby</category>
    </item>
  </channel>
</rss>
