<?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: Billy Witherspoon</title>
    <description>The latest articles on DEV Community by Billy Witherspoon (@billywitherspoon).</description>
    <link>https://dev.to/billywitherspoon</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%2F141900%2F4e9472b2-66df-45e8-8427-ccc70fa5834e.JPG</url>
      <title>DEV Community: Billy Witherspoon</title>
      <link>https://dev.to/billywitherspoon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/billywitherspoon"/>
    <language>en</language>
    <item>
      <title>AWS in 2 Minutes: A Summary, A History, A Flagship Product, and A Case Example</title>
      <dc:creator>Billy Witherspoon</dc:creator>
      <pubDate>Tue, 16 Apr 2019 04:48:55 +0000</pubDate>
      <link>https://dev.to/billywitherspoon/aws-in-2-minutes-a-summary-a-history-a-flagship-product-and-a-case-example-1ef3</link>
      <guid>https://dev.to/billywitherspoon/aws-in-2-minutes-a-summary-a-history-a-flagship-product-and-a-case-example-1ef3</guid>
      <description>&lt;h2&gt;
  
  
  A Summary
&lt;/h2&gt;

&lt;p&gt;AWS (Amazon Web Services) is a subsidiary of Amazon that provides on demand cloud based platforms that allows businesses of all sizes to scale and grow through compute power, database storage, content delivery and other functionality.&lt;/p&gt;

&lt;h2&gt;
  
  
  A History
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tCX3-lcH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/i4dzxh7xh0jh6rvpmvbb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tCX3-lcH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/i4dzxh7xh0jh6rvpmvbb.jpg" alt=""&gt;&lt;/a&gt;Cape Town, South Africa.  The birthplace of AWS.&lt;/p&gt;

&lt;h4&gt;
  
  
  2003
&lt;/h4&gt;

&lt;p&gt;AWS all began with Benjamin Black and Chris Pinkham.  These two Amazon employees wrote a vision paper for a service that:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"completely standardized, completely automated, and relied extensively on web services for things like storage."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  2004
&lt;/h4&gt;

&lt;p&gt;Jeff B gives the project a green light.  Pinkham, having grown up in South Africa, sets up a satellite office in Cape Town.  He works with a team to develop a flagship product called the Elastic Computer Cloud (EC2).  &lt;/p&gt;

&lt;h4&gt;
  
  
  2006
&lt;/h4&gt;

&lt;p&gt;AWS officially launches their first three products:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;EC2 (Elastic Computer Cloud)&lt;/li&gt;
&lt;li&gt;S3 (Simple Storage Service)&lt;/li&gt;
&lt;li&gt;SQS (Simple Queue Service)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three of these remain top 10 AWS services (out of approximately 100).&lt;/p&gt;

&lt;h2&gt;
  
  
  A Flagship Product
&lt;/h2&gt;

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

&lt;h4&gt;
  
  
  What is it?
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;EC2 is a service that allows clients to rent amazon resources on demand to create virtual machines (named 'instances' by AWS).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Essentially, AWS maintains their servers.  Clients can 'rent' computing power from these servers.  Clients create 'instances' that have varying attributes such as CPU, RAM, or OS.  Options range from on-demand instances to reserved dedicated hosts paid by the hour.&lt;/p&gt;

&lt;h4&gt;
  
  
  What are the Benefits?
&lt;/h4&gt;

&lt;h5&gt;
  
  
  Scalable
&lt;/h5&gt;

&lt;p&gt;Have a change in computing demand overnight, over months...or a full year?  Clients can configure new instances in less than 10 minutes.  It is marketed as infinitely scalable for any size solution.&lt;/p&gt;

&lt;h5&gt;
  
  
  No Maintenance and Upgrading
&lt;/h5&gt;

&lt;p&gt;Clients have no need to maintain, repair, monitor, and upgrade equipment.&lt;/p&gt;

&lt;h5&gt;
  
  
  Reliable
&lt;/h5&gt;

&lt;p&gt;Like many major cloud services, reliability is extremely high.  A quick look at an &lt;a href="https://www.enterpriseai.news/2015/01/06/aws-rates-highest-cloud-reliability/"&gt;older 2015 comparison&lt;/a&gt; shows a reliability rating over 99.99%.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Case Example (Expedia ESS)
&lt;/h2&gt;

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

&lt;p&gt;A great example of a major company turning to EC2 was Expedia in 2010.  They were launching a typeahead suggestion service called ESS (Expedia Suggest Service) in Asia and Europe that helped customers enter travel, search, and location information correctly.&lt;/p&gt;

&lt;p&gt;Internal studies found that an error page was a main reason for site abandonment.  &lt;/p&gt;

&lt;p&gt;Existing Expedia data centers were all located in Chandler, AZ.  Technology Director, Murari Gopalan was quoted saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“There was no way for us to solve the problem without AWS.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After their migration and implementation, latency was reduced from 700ms to 50ms.&lt;/p&gt;

&lt;h4&gt;
  
  
  Resources:
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/ec2/"&gt;AWS EC2&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Amazon Web Services EC2&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Timeline_of_Amazon_Web_Services"&gt;Timeline of AWS&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Wikipedia&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.zdnet.com/article/how-amazon-exposed-its-guts-the-history-of-awss-ec2/"&gt;How Amazon exposed its guts: The History of AWS's EC2&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Jack Clark, ZDNEt&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.networkworld.com/article/3074508/top-30-aws-cloud-services.html"&gt;Top 30 AWS cloud services&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Brandon Butler, Senior Editor, Network World&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.enterpriseai.news/2015/01/06/aws-rates-highest-cloud-reliability/"&gt;AWS Rates Highest on Cloud Reliability&lt;/a&gt;&lt;br&gt;
&lt;em&gt;George Leopold, EnterpriseAI&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=wWeyzYzd17o"&gt;What is AWS&lt;/a&gt;&lt;br&gt;
&lt;em&gt;edureka!, YouTube&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Wrangling RVM and Ruby Gems</title>
      <dc:creator>Billy Witherspoon</dc:creator>
      <pubDate>Mon, 08 Apr 2019 16:59:48 +0000</pubDate>
      <link>https://dev.to/billywitherspoon/wrangling-rvm-and-ruby-gems-1534</link>
      <guid>https://dev.to/billywitherspoon/wrangling-rvm-and-ruby-gems-1534</guid>
      <description>&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%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AVkIYx3y_Bafqh-QY" class="article-body-image-wrapper"&gt;&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AVkIYx3y_Bafqh-QY"&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/@zhenhu2424?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Zhen Hu&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: All referenced commands are using a Bash shell on a Mac OS X Terminal.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;RVM (Ruby Version Manager)&lt;/h3&gt;
&lt;h4&gt;What is RVM?&lt;/h4&gt;
&lt;p&gt;RVM is a platform designed to help you manage local versions of Ruby. It separates versions of Ruby and each of their associated gems that have been installed for that version.&lt;/p&gt;
&lt;p&gt;Let’s jump right into to some uses of RVM once it has been installed.&lt;/p&gt;
&lt;h4&gt;RVM Commands&lt;/h4&gt;
&lt;p&gt;Well, we can’t manage ruby without having it in the first place. I’m going to go ahead and install some versions of Ruby.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Install the latest version of Ruby&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;rvm install ruby&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Install a specific version of Ruby (replace X.X.X with version number)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;rvm install ruby-X.X.X&lt;/pre&gt;
&lt;p&gt;For demonstration I have installed the latest version of Ruby (ruby-2.6.0) as well as two other versions (ruby-2.3.0 and ruby-2.5.3).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Return a list of currently installed versions&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;rvm list&lt;/pre&gt;
&lt;p&gt;Here is what this looks like when I run it on my machine.&lt;/p&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F239%2F1%2AURYXuqZB8n7dFhrx9I7LUQ.png"&gt;&lt;p&gt;I’m currently running the latest version. Go me. However, what if I just got assigned to a project that requires me to run any version before 2.6.0. I have a couple commands at my disposal.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Change the current version of Ruby (replace X.X.X with version number)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;rvm use X.X.X&lt;/pre&gt;
&lt;p&gt;This will temporarily change the version of Ruby in my shell. Ruby will reset to my default when opening a new terminal shell. This is the best choice if I need to quickly work on a project for a short period of time without changing my default Ruby version.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Change the default version of Ruby (replace X.X.X with version number)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;rvm --default use X.X.X&lt;/pre&gt;
&lt;p&gt;This will now be the default version of Ruby when I open a new terminal shell. Let’s assume this is a long term project, I’ll go with this one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Delete a version of Ruby (replace X.X.X with version number)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;rvm remove X.X.X&lt;/pre&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F240%2F1%2AD276St4de9CPMkUNdsa1Nw.png"&gt;&lt;h4&gt;Ruby Gemsets&lt;/h4&gt;
&lt;p&gt;With each Ruby version comes it’s associated gems. Keep in mind when you install, change, or delete a version of Ruby, whatever gems have been installed/associated with that version go with it. Tracking individual gems locally are less critical when working on a project thanks to a Ruby Gem called Bundler.&lt;/p&gt;
&lt;h3&gt;Ruby Gems&lt;/h3&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AnSa_YkdQNOs9X3PN"&gt;Photo by &lt;a href="https://unsplash.com/@mahkeo?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Mahkeo&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;h4&gt;What are Ruby Gems?&lt;/h4&gt;
&lt;p&gt;A gem is a software package that can be added to enhance functionalities of ruby programs. We already learned of one gem (bundler). I won’t go too deep into all the types of ruby gems, but they are a beautiful addition to making any Ruby project more capable.&lt;/p&gt;
&lt;h4&gt;Basic Ruby Gem Commands&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Install a Ruby gem&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;gem install gem_name&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;List installed gems&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;gem list&lt;/pre&gt;
&lt;p&gt;Pretty simple stuff. Now, let’s look at a list of gems installed locally.&lt;/p&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F726%2F1%2AleerpGmtr6bdCuCtRfJmxg.png"&gt;&lt;p&gt;Truncated to only the first 7 gems and we can see…that’s a lot! Let’s do some uninstalling.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: each of these commands will prompt you if you are trying to remove a gem that is part of a dependency, how helpful!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Remove all old versions of all gems&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;gem cleanup&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Remove all old versions of a specific gem&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;gem cleanup gem_name&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Uninstall all versions of a gem&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;gem uninstall gem_name&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Uninstall certain version of a gem (replace X.X.X with version number)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;gem uninstall gem_name -v, X.X.X&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Remove all versions less than a specified version (replace X.X.X with version number)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;gem uninstall gem_name -v, '&amp;lt;X.X.X'&lt;/pre&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F242%2F1%2AMzlYOVRuEp9aXiCpJgKSiQ.png"&gt;&lt;p&gt;Much better! Our gems are clean as soap.&lt;/p&gt;
&lt;p&gt;It should be noted that older versions of gems can certainly be useful due to compatibilities. However, if using Bundler, this won’t be a problem as it will simply reinstall any missing gems as necessary. Let’s learn a little more about this.&lt;/p&gt;
&lt;h3&gt;Bundler&lt;/h3&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AHYry8r1dNptuBz59"&gt;Photo by &lt;a href="https://unsplash.com/@rgrzybowski?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Radek Grzybowski&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;h4&gt;What is Bundler?&lt;/h4&gt;
&lt;p&gt;Bundler was released in 2009 (sorry coding vets) as a Ruby gem management system for Ruby projects. It has multiple benefits:&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;It allows the user to specify Ruby gems (in a gemfile) that must be installed locally before working on a project&lt;/li&gt;

&lt;li&gt;It allows the user to specify specific versions of Ruby gems&lt;/li&gt;

&lt;li&gt;It automatically installs the specified Ruby gems and any gem dependencies&lt;/li&gt;

&lt;li&gt;It creates a gemfile lock that notes the installed gems&lt;/li&gt;

&lt;/ul&gt;
&lt;h4&gt;Bundler Magic&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;To check for and install missing gems required for a project&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;bundle install&lt;/pre&gt;
&lt;p&gt;One command to rule them all!&lt;/p&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AxtINib8YN-757RZj"&gt;Photo by &lt;a href="https://unsplash.com/@andresiga?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Andres Iga&lt;/a&gt; on &lt;a href="https://unsplash.com?utm_source=medium&amp;amp;utm_medium=referral" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;p&gt;So what is bundler doing behind the scenes with this single command?&lt;/p&gt;
&lt;ol&gt;

&lt;li&gt;Reads the gemfile lock (if it exists)&lt;/li&gt;

&lt;li&gt;Reads the gemfile&lt;/li&gt;

&lt;li&gt;Queries RubyGems.org for a list of every version of each specified gem&lt;/li&gt;

&lt;li&gt;Finds gem versions allowed by the gemfile that work together including any necessary dependency gems&lt;/li&gt;

&lt;li&gt;Writes down those versions in the gemfile lock&lt;/li&gt;

&lt;li&gt;Install all gems in the gemfile lock&lt;/li&gt;

&lt;/ol&gt;
&lt;p&gt;Powerful stuff! Bundler is a necessity in any Ruby project to keep gems nice and organized.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Congrats! Consider your ruby wrangled!&lt;/strong&gt;&lt;/p&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedium.com%2F_%2Fstat%3Fevent%3Dpost.clientViewed%26referrerSource%3Dfull_rss%26postId%3D950b1c57b140"&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>bash</category>
    </item>
    <item>
      <title>Making Git, Lit (A Fun Intro to Version Control)</title>
      <dc:creator>Billy Witherspoon</dc:creator>
      <pubDate>Mon, 08 Apr 2019 16:56:27 +0000</pubDate>
      <link>https://dev.to/billywitherspoon/making-git-lit-471k</link>
      <guid>https://dev.to/billywitherspoon/making-git-lit-471k</guid>
      <description>&lt;p&gt;&lt;em&gt;Note: All referenced commands are using Bash on a Mac OS X Terminal. Github is used as an example version control platform.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Project. Project-final. Project-final-FINAL. Project-please-let-this-be-the-last version. Project-spaghetti. Project-done-complete-over-submit.&lt;/p&gt;
&lt;p&gt;Look familiar?&lt;strong&gt; &lt;/strong&gt;Maybe you’ve been down this path of fear. That you’ve worked tireless hours and dread the thought of losing your hard earned work. Maybe you’re going out on a limb and don’t want to lose your current version for posterity.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;You need version control in your life&lt;/em&gt;&lt;/p&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2An4VBS54zK4MxTbgs6sAJbA.jpeg"&gt;&lt;blockquote&gt;&lt;em&gt;“Hey Max? Can you send me the updated file?”&lt;/em&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;em&gt;“I don’t have it, Stephanie is currently working on it”&lt;/em&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;em&gt;“Hey Megan, I just sent you my changes”&lt;/em&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;&lt;em&gt;“You did? Max just told me, Stephanie is supposed to be working on the file”&lt;/em&gt;&lt;/blockquote&gt;
&lt;p&gt;Look familiar? The decrease in productivity, the continual cycle of communication and manual changes.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;You need version control in your life.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Enter Github&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Github is a version control platform that enables multiple users to seamlessly and simultaneously work on the same set of files and directories. Storing a breadcrumb of versions along the way.&lt;/p&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AXSkuIVMupYV1Mc24sBgGNw.jpeg"&gt;&lt;h3&gt;Quick Definitions&lt;/h3&gt;
&lt;p&gt;Let’s run through a set of definitions. Don’t skip these!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Directory: &lt;/strong&gt;A folder&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Project&lt;/strong&gt;: For this post, refers to a set of files nested in directories.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Repository&lt;/strong&gt;: A place where a project are stored (hint: it can be stored in multiple places). Often referred to as a repo.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Local&lt;/strong&gt;: Your machine, your computer, and only your computer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remote&lt;/strong&gt;: A place that is not your machine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Branch: &lt;/strong&gt;A repository linked to the master repository. Can be local or remote.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Working directory: &lt;/strong&gt;Your workspace. Where you access and edit your project directories and files once you have created a local repository.&lt;/p&gt;
&lt;h3&gt;Where Da Repos At?&lt;/h3&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2AOP6RC92-DjB3IZhpvzII2w.jpeg"&gt;&lt;p&gt;Ok so you’ve got a project. Do you have a project? No? Well get on it!&lt;/p&gt;
&lt;h4&gt;Build Your Project Directory&lt;/h4&gt;
&lt;p&gt;This is your project directory, add your files, your code, your pictures, your memes, your last will and testament, and whatever else seems prudent.&lt;/p&gt;
&lt;p&gt;Alright, you’ve got your project ready to go. Now what? Start a new repository on Github!&lt;/p&gt;
&lt;h4&gt;Create Github Remote Repository&lt;/h4&gt;
&lt;p&gt;Go to Github.com and create a new repository. This will be the central point for your version control. This won’t be the only repository, but it is the most important. This repository is considered remote as it is hosted by Github.&lt;/p&gt;
&lt;p&gt;Next you have two options to create your working directory:&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;Clone your repository&lt;/li&gt;

&lt;li&gt;Build your directory, initialize a local repository, link to your remote repository&lt;/li&gt;

&lt;/ul&gt;
&lt;h4&gt;&lt;strong&gt;Option 1: Clone your repository&lt;/strong&gt;&lt;/h4&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F1%2AFJAqpNXfAN_aW0BbVt6lYw.jpeg"&gt;&lt;p&gt;&lt;strong&gt;Clone&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git clone ssh/https_link_to_github_repository&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The act of cloning takes three major actions:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;

&lt;li&gt;Cloning creates a working directory on your local machine linked to your local repository. Migrate your project directory to this new directory.&lt;/li&gt;

&lt;li&gt;Cloning creates a local repository on your machine that is a copy (clone) of the one you just made on Github. &lt;em&gt;You generally won’t be viewing the content of the individual files while they are on your local repository.&lt;/em&gt;
&lt;/li&gt;

&lt;li&gt;Cloning creates a link to your local repository and the remote repository created earlier. You’ll be able to update the remote repository later on with certain commands.&lt;/li&gt;

&lt;/ol&gt;
&lt;h4&gt;
&lt;br&gt;
&lt;strong&gt;Option 2: &lt;/strong&gt;Initialize a local repository, link to your remote repository&lt;/h4&gt;
&lt;p&gt;You currently have a project directory. Let’s use it to create a local repository, then link it to the remote repository. You won’t need to move your project directory with this option, it will simply become your working directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Initialize&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git init&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;First, make sure you are in your project directory. Then run &lt;code&gt;git init&lt;/code&gt;. This creates a local repository on your local machine linked to your working directory. Your project directory has now become your working directory and is linked to this new repository.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Add Remote&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git remote add origin ssh/https_link_to_github_repository&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This links your local repository to your Github remote repository.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Getting Samantha Involved&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;KABOOM, two repositories have now been created. A remote repository on your Github profile and a local repository on your machine.&lt;/p&gt;
&lt;p&gt;For fun, lets create one more. Let’s say your coworker Samantha wants to do a sick collab. She will simply use option 1 to clone your Github repository. Don’t forget to add Samantha as a collaborator on Github. &lt;em&gt;That is, if you trust Samantha. The employee eating other people’s food from the fridge still hasn’t been caught…&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Now we have three repositories:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;

&lt;li&gt;A remote repository on your Github profile.&lt;/li&gt;

&lt;li&gt;A local repository on your machine.&lt;/li&gt;

&lt;li&gt;A local repository on Samantha’s machine.&lt;/li&gt;

&lt;/ol&gt;
&lt;h3&gt;Add it, Commit it, Push it,&lt;/h3&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F661%2F1%2AeqQjdyCde34Nv47MohUKAw.jpeg"&gt;&lt;p&gt;Psst. Pssssst. PSSSSST. HEY WAKE UP. This is the important bit. Save your files and get ready to throw them up to the remote.&lt;/p&gt;
&lt;p&gt;Let’s get right into it, these are the commands you are going to use to sync your local repository to the remote repository. &lt;em&gt;Note: all git commands are prepended with &lt;/em&gt;&lt;em&gt;&lt;code&gt;git&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Add&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Command: &lt;code&gt;git add file_name or git add .&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git add&lt;/code&gt; prepares your files by staging them. In this case staging them simply means collecting them into a staging area. You can add files one by one by file name or all files in the working directory with &lt;code&gt;git add .&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The staging area is full of some files you want to send on to bigger and better things.&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Commit&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git commit -m &amp;amp;quot;summarize your changes&amp;amp;quot&lt;/code&gt;;&lt;/p&gt;
&lt;p&gt;You’ve set the stage, literally. You’ve got your updated files all hyped and ready. Now commit them. Committing moves those bad boys to your local repository.&lt;/p&gt;
&lt;p&gt;Congrats, you’re in a committed relationship with Github. You have now updated your local repository.&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Push&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git push&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Send em on up! You can specify the specific remote repository you want to push by appending it’s name to &lt;code&gt;git push&lt;/code&gt;, otherwise it will use your current remote repository.&lt;/p&gt;
&lt;p&gt;Pushing files updates the remote repository with your changed files. Congrats! You just updated your repository and the remote repository! These three steps are Github at it’s core and you will be using them often.&lt;/p&gt;
&lt;h3&gt;Pull it, Fetch it, Branch it&lt;/h3&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AsefktrimnSHSWaOg"&gt;&lt;p&gt;&lt;strong&gt;4. Fetch&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git fetch&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;CRSHKKBRRTCKK ERROR ERROR&lt;/p&gt;
&lt;p&gt;You may get an error while attempting to push. This error may say something along the lines of MERGE CONFLICT.&lt;/p&gt;
&lt;p&gt;Samantha sent up some files before you and Github can’t accept your files just yet. No worries, let’s fetch them and fix this up.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git fetch&lt;/code&gt; takes down files from the remote repository to your local repository. However, you still can’t see them in your working directory. Time to merge them into your working directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Merge&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git merge&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Merges files from your local repository to your working directory.&lt;/p&gt;
&lt;p&gt;When you run &lt;code&gt;git merge&lt;/code&gt;, more than likely your text editor will prompt you to fix the conflicts that exist between your files and the ones you just pulled down.&lt;/p&gt;
&lt;p&gt;Once you fixed these up, repeat steps 1 through 3. For this second commit, you can typically just use the command &lt;code&gt;git commit -m “merged”&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Pull (Fetch + Merge)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: &lt;code&gt;git pull&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Pulling is the act of bringing down those files from the remote repository and merging them to your working directory. In this case these are the updated files Samantha already pushed to the remote repository.&lt;/p&gt;
&lt;p&gt;Pulling is the combination of two git commands &lt;code&gt;git fetch&lt;/code&gt; and &lt;code&gt;git merge&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Branch&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Command: git branch branch_name and &lt;code&gt;git checkout branch_name&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Let’s say you want to try out some funky stuff on your project, but while retaining your current version. The best way to do this is to create a new directory. The directory you already have is pre-designated the master. You can see this with the command &lt;code&gt;git branch&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A branch is a new directory linked to your master that you have already created. Creating a new branch allows you to edit your project without yet making changes to your master.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git branch branch_name&lt;/code&gt; will create a new branch. &lt;code&gt;git checkout branch_name&lt;/code&gt; will switch to working in that directory. Now when you do &lt;code&gt;git add&lt;/code&gt; and &lt;code&gt;git commit&lt;/code&gt; in steps 1 and 2 they will be only affecting this new directory.&lt;/p&gt;
&lt;p&gt;If you want to merge those changes in your new directory/branch with your master, run the following sequence:&lt;/p&gt;
&lt;p&gt;git checkout master switch back to your master branch&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git merge branch_name&lt;/code&gt; merge that branch into your master&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;IT’S A PARTY IT’S A PARTY&lt;/strong&gt;&lt;/h3&gt;
&lt;img alt="" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1024%2F0%2AJYtSZXJ-S3zdvmxn"&gt;&lt;p&gt;You’ve done it! Now you and Samantha can knock this out as a team and have extra time to celebrate!&lt;/p&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmedium.com%2F_%2Fstat%3Fevent%3Dpost.clientViewed%26referrerSource%3Dfull_rss%26postId%3D2f657d0c9911"&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>versioncontrol</category>
      <category>bash</category>
    </item>
    <item>
      <title>Should you use Grid or Flexbox...or Both?</title>
      <dc:creator>Billy Witherspoon</dc:creator>
      <pubDate>Tue, 02 Apr 2019 21:08:56 +0000</pubDate>
      <link>https://dev.to/billywitherspoon/should-you-use-grid-or-flexbox-or-both-280h</link>
      <guid>https://dev.to/billywitherspoon/should-you-use-grid-or-flexbox-or-both-280h</guid>
      <description>&lt;h2&gt;
  
  
  And The Answer is...
&lt;/h2&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%2Fmedia2.giphy.com%2Fmedia%2F116seTvbXx07F6%2Fgiphy.gif%3Fcid%3D790b76115ca2f3af624f796b6bed49a6" 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%2Fmedia2.giphy.com%2Fmedia%2F116seTvbXx07F6%2Fgiphy.gif%3Fcid%3D790b76115ca2f3af624f796b6bed49a6"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most likely both! &lt;/p&gt;

&lt;p&gt;Sweet! Consider this article read.  Have yourself a magnificent day of coding. Or, keep reading to find out why!&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;The CSS Flexible Box (Flexbox) and CSS Grid Layout (Grid) are CSS modules designed to make layouts and positioning in HTML a lot easier.  It enables users to lay out elements without using CSS floats and positioning.  &lt;/p&gt;

&lt;p&gt;Flexbox was first introduced in 2009 and has since worked itself up to be a World Wide Web Consortium (W3C) candidate recommendation.&lt;/p&gt;

&lt;p&gt;Grid was initially proposed by Microsoft in 2011 to the CSS Working Group.  Akin to Flexbox it is also a W3C candidate recommendation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Similarities
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Set up
&lt;/h4&gt;

&lt;p&gt;Flexbox and Grid both work by setting up container in which elements will be 'flexed' OR 'gridded'.  &lt;em&gt;Please note: I just made those words up&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;In your stylesheet for the container's class or id you can set it to be flexbox controlled or grid controlled with the following code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;display: flex&lt;/code&gt; or &lt;code&gt;display: grid&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Notice that you cannot both flex and grid a single container.  However, that isn't to say you can't nest containers to achieve maximum POWER.&lt;/p&gt;

&lt;h4&gt;
  
  
  Syntax
&lt;/h4&gt;

&lt;p&gt;There also exist similarities in attribute syntax.  Lines such as flex-start and grid-column-start use positioning keywords that land elements at the beginning of their containers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Differences
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Dimension
&lt;/h4&gt;

&lt;p&gt;The main difference between Grid and Flexbox is that Grid works best in a two dimensional space (ie: both columns and rows) while Flexbox is best used in a single dimensional space (ie: columns or rows).&lt;/p&gt;

&lt;p&gt;This generally leads to the larger containers for a websites layout being defined by grid and nested elements in a Flexbox containers.  However, this is not a hard and fast rule. &lt;/p&gt;




&lt;h1&gt;
  
  
  Blackjack Example
&lt;/h1&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%2Fmedia1.giphy.com%2Fmedia%2F3ov9jUCYetT3GVwcy4%2Fgiphy.gif%3Fcid%3D790b76115ca307347142484551988223" 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%2Fmedia1.giphy.com%2Fmedia%2F3ov9jUCYetT3GVwcy4%2Fgiphy.gif%3Fcid%3D790b76115ca307347142484551988223"&gt;&lt;/a&gt;Don't Look Too Long&lt;/p&gt;

&lt;p&gt;A recent small team project I worked on was creating a blackjack game.  For that project we opted to use the CSS framework Bootstrap.  However, let's dive in to how I might define certain page elements using Grid and Flexbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Measurements
&lt;/h2&gt;

&lt;p&gt;As it's name implies, the basis of Grid is first defining a grid by it's number of rows and columns.  You can further refine the size and position of these rows and columns to create.  This can be done in a multitude of methods.&lt;/p&gt;

&lt;p&gt;Here is the vision for our blackjack game top to bottom:&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%2Fgh6zle6po0d0qn2q030m.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%2Fgh6zle6po0d0qn2q030m.png"&gt;&lt;/a&gt;Preview of Our Final Design&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A header that has a name, balance, and logout button that are displayed evenly horizontally.&lt;/li&gt;
&lt;li&gt;A blackjack table and some betting actions side by side.  There will be two betting actions (hit and stay) on top of one another.&lt;/li&gt;
&lt;li&gt;A footer with a centered element that displays who created the game&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So let's count the rows and columns.  Looks like 3 rows right? Not so fast!  Certainly the header and footer are a single row.  However, the betting actions area has at least two rows nested in it.  Let's make it 4 for scalability.  Note that the blackjack table will also be contained on these rows.&lt;/p&gt;

&lt;p&gt;So 1 row for a header, 4 for the table/betting actions, and 1 for a footer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6 rows!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ok how about columns.  The header may be a candidate with it's elements needing to be evenly spaced.  However, this is a one dimensional row, so it is really a task better suited for Flexbox later on. Rows 2 - 5 look like they just have 2 columns for a blackjack table and some betting actions. &lt;/p&gt;

&lt;p&gt;Row 6 with the footer looks like it has some potential. Let's have it centered, but not take up the entire width of the page.&lt;/p&gt;

&lt;p&gt;A total of 5 columns should work nicely. In row 1, the header will take up all 5 columns. In rows 2-5 the blackjack table will take up 3 columns and the betting actions will take up 2. In row 6 the footer will take up 3 of the columns in the center, with one column of white space on either side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5 columns!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Container CSS
&lt;/h2&gt;

&lt;p&gt;So we know we need a 6 x 5 CSS grid.  Let's think about sizing of our rows.  The header and footer should take up about 10% vertical space of the page each.  That leaves 80% for the table and betting actions.&lt;/p&gt;

&lt;p&gt;For the column sizing, we don't have to worry about size. We will dictate how many columns each element takes. &lt;/p&gt;

&lt;p&gt;Our container will have a class of 'grid-container'.  There are many many ways to write out grids.  I highly recommend checking out links at the bottom such as Grid Garden to get started on these.  For demonstration, I'm going to use % (percent of container) and fr (fraction of a container).&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.grid-container {&lt;br&gt;
    display: grid;&lt;br&gt;
    grid-template-rows: 10% 1fr 1fr 1fr 1fr 10%;&lt;br&gt;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;&lt;br&gt;
}&lt;/code&gt;&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%2Fo1tgs1ae833gi7yekov3.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%2Fo1tgs1ae833gi7yekov3.png"&gt;&lt;/a&gt;Consider Yourself Gridded&lt;/p&gt;

&lt;p&gt;Looks great! Let's move on to defining where our elements will go in our grid.&lt;/p&gt;
&lt;h2&gt;
  
  
  Grid Elements HTML/CSS
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Note: The code for the following demo is hosted on this &lt;a href="https://codepen.io/billywitherspoon/pen/VNLwaj" rel="noopener noreferrer"&gt;code pen repo&lt;/a&gt;.  Feel free to follow along, and play around with commenting and uncommenting code as you go.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Header
&lt;/h4&gt;

&lt;p&gt;We want the header to span the entire page on row 1.  So it will take up all columns and only row 1. Again, there are many ways to write this, so I'll keep it explicit with start and end points of each element. Keep in mind CSS grid snaps 'up to' a column.  So to span two columns we go from 1 to 6.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#header {&lt;br&gt;
    grid-row: 1;    &lt;br&gt;
    grid-column: 1 / 6;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Blackjack Table
&lt;/h4&gt;

&lt;p&gt;Here the table should span 4 rows and 3 columns. This will have it occupy 3/5 of the page horizontally.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#blackjack-table {&lt;br&gt;
    grid-row: 2 / 6;&lt;br&gt;
    grid-column: 1 / 4;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Betting actions
&lt;/h4&gt;

&lt;p&gt;A hit button and stay button are in line with the blackjack table with the hit button occupying the upper two rows of the right column, with the stay button beneath it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#hit-button {&lt;br&gt;
    grid-row: 2 / 4;&lt;br&gt;
    grid-column: 4 / 6;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#stay-button {&lt;br&gt;
    grid-row: 4 / 6;&lt;br&gt;
    grid-column: 4 / 6;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Footer
&lt;/h4&gt;

&lt;p&gt;Footer goes in the last row and takes up the three center columns.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.footer {&lt;br&gt;
    grid-row: 6;&lt;br&gt;
    grid-column: 2 / 5;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And that's it! We've done everything we can with Grid! Things are in the right place.  Now let's clean up the elements inside our elements/divs.  &lt;/p&gt;
&lt;h2&gt;
  
  
  Flexbox Usage
&lt;/h2&gt;

&lt;p&gt;Flexbox is great for working within elements that have a single dimension of sub-elements.  This might be a div with nested text, or a div with a nested row or nested column.  A row or a column is a single dimension, thus there is no need to make a new grid.&lt;/p&gt;

&lt;p&gt;We can jump right into the CSS for each of our div elements.  For the table, the betting buttons, and the footer, everything will be centered in each direction.  Here is the CSS for the blackjack-table.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#blackjack-table {&lt;br&gt;
    display: flex;&lt;br&gt;
    justify-content: center:&lt;br&gt;
    align-items: center;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For the header. We know we want the three nested elements (username, balance, and logout button) to be right justified in a row.  We want them centered vertically in the header.&lt;/p&gt;

&lt;p&gt;Without any css they appear as a column on the left side of the header, so it's going to be quite the change.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;#header {&lt;br&gt;
    display: flex;&lt;br&gt;
    flex-direction: row;&lt;br&gt;
    justify-content: space-around:&lt;br&gt;
    align-items: center;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Let's check out our work&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/billywitherspoon/embed/VNLwaj?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Looks great!&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;Some awesome, awesome resources on CSS Grid and Flexbox&lt;/p&gt;

&lt;p&gt;&lt;a href="https://flexboxfroggy.com/" rel="noopener noreferrer"&gt;Flexbox Froggy (learn CSS Flexbox with a fun interactive website)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://cssgridgarden.com/" rel="noopener noreferrer"&gt;GridGarden (learn CSS Grid with a fun interactive website)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=RSIclWvNTdQ" rel="noopener noreferrer"&gt;CSS Grid vs CSS Flexbox by Academind on Youtube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/rachelandrew/pen/BNXyQa" rel="noopener noreferrer"&gt;Codepen with a pre built grid for playing around&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hackernoon.com/getting-started-with-css-grid-layout-8e00de547daf" rel="noopener noreferrer"&gt;Lots more cool background, links, info, tutorials, and articles on Hackernoon&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>grid</category>
      <category>flexbox</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Decoding Regex Hieroglyphs</title>
      <dc:creator>Billy Witherspoon</dc:creator>
      <pubDate>Tue, 19 Mar 2019 17:43:56 +0000</pubDate>
      <link>https://dev.to/billywitherspoon/decoding-regex-hieroglyphs-2lmp</link>
      <guid>https://dev.to/billywitherspoon/decoding-regex-hieroglyphs-2lmp</guid>
      <description>&lt;p&gt;Ever mash on your keyboard to test out a form? Ever seen an encrypted password? Regular expressions make those strings look like Hemmingway. Regular expresions (regex) are non-sensical, non-syntactical and just plain gibberish. Or are they...&lt;/p&gt;

&lt;h1&gt;
  
  
  What is a Regular Expression?
&lt;/h1&gt;

&lt;p&gt;A regular expression is a sequence of characters that define a search pattern. By setting up this search pattern, you can parse through text to find sets of characters that match that pattern.  Regular expressions are a very powerful tool development tool.&lt;/p&gt;

&lt;h1&gt;
  
  
  Characters
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Character Literals
&lt;/h3&gt;

&lt;p&gt;Character literals are individual characters with individual values.  For example &lt;code&gt;b&lt;/code&gt;, &lt;code&gt;N&lt;/code&gt;, &lt;code&gt;8&lt;/code&gt;, and &lt;code&gt;~&lt;/code&gt; are all character literals.  Think of it like typing a single character key on your keyboard and expecting that key to be assigned to a single value.&lt;/p&gt;

&lt;h5&gt;
  
  
  Sequencing Character Literals
&lt;/h5&gt;

&lt;p&gt;Using these character literals, you can sequence them to create things like words, sentences, and even paragraphs. &lt;code&gt;Spaghetti&lt;/code&gt; is a sequence of character literals, as is &lt;code&gt;Mom's Spaghetti&lt;/code&gt; (spaces are character literals too!)&lt;/p&gt;

&lt;h5&gt;
  
  
  Using Character Literals in Regex
&lt;/h5&gt;

&lt;p&gt;Let's say we want to find a sequence of character literals.  Specifically &lt;code&gt;JoeSmith@gmail.com&lt;/code&gt;.  One way we can accomplish this is in regex using character literals. &lt;/p&gt;

&lt;p&gt;Let's see an example in javascript where we want to hide two users e-mails.&lt;/p&gt;

&lt;p&gt;We define a function called &lt;code&gt;hideEmails&lt;/code&gt; that will take in a string argument and use replace to insert &lt;code&gt;#####&lt;/code&gt; in place of the two e-mails in that string. In javascript the &lt;code&gt;replace&lt;/code&gt; function can be used to perform this task.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;string.replace(/regex/g, replacement string)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Regex expressions are always wrapped with &lt;code&gt;/forward slashes/&lt;/code&gt;. The &lt;code&gt;g&lt;/code&gt; flag can appended outside of the slashes &lt;code&gt;/regex/g&lt;/code&gt; to globally replace for the entire string.&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@billywitherspoo/character-literal?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;We used our first regex &lt;code&gt;/JoeSmith@gmail.com/&lt;/code&gt; to search for &lt;code&gt;JoeSmith@gmail.com&lt;/code&gt; and successfully replaced it with &lt;code&gt;#####&lt;/code&gt;!&lt;/p&gt;

&lt;p&gt;Notice for e-mail &lt;code&gt;NancySmith@gmail.com&lt;/code&gt;, the replace function was unable to match our second regex &lt;code&gt;/nancysmith@gmail.com/&lt;/code&gt; to any text in &lt;code&gt;exampleSentence&lt;/code&gt;.  That is because &lt;code&gt;n&lt;/code&gt; and &lt;code&gt;s&lt;/code&gt; are a different character literals than &lt;code&gt;N&lt;/code&gt; and &lt;code&gt;S&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Meta Characters
&lt;/h3&gt;

&lt;p&gt;While character literals are nice and simple, they don't provide a very broad capability.  Enter meta characters, the building blocks of regular expressions.  &lt;/p&gt;

&lt;p&gt;Meta characters have a much broader scope than character literals. They are special characters that can match multiple character literals.&lt;/p&gt;

&lt;h5&gt;
  
  
  Syntax
&lt;/h5&gt;

&lt;p&gt;Because character literals generally use single characters, meta characters are often generated with a preceding &lt;code&gt;\&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Some common examples are:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\w&lt;/code&gt; any character that is A-Z, a-z, or 0-9&lt;br&gt;
&lt;code&gt;\d&lt;/code&gt; any digit 0-9&lt;br&gt;
&lt;code&gt;\s&lt;/code&gt; any white space (can be multiple spaces)&lt;/p&gt;

&lt;p&gt;They can also be capitalized to have the opposite effect:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\W&lt;/code&gt; any character that is not A-Z, a-z, or 0-9 (symbols)&lt;br&gt;
&lt;code&gt;\D&lt;/code&gt; any non digit&lt;br&gt;
&lt;code&gt;\S&lt;/code&gt; any non white space&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@billywitherspoo/RichElatedMacro?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;Notice how &lt;code&gt;\d&lt;/code&gt; replaces the 2 and &lt;code&gt;\D&lt;/code&gt; replaces everything but the 2.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quantifiers
&lt;/h3&gt;

&lt;p&gt;Quantifiers are meta characters that modify both literal and meta characters.  They determine things like how many of this character do you wish to match or where should this character be to match.  They are generally placed following a character in a regex.  &lt;/p&gt;

&lt;h5&gt;
  
  
  General Quantifiers
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;*&lt;/code&gt; matches if a character occurs 0 or more times&lt;br&gt;
&lt;code&gt;+&lt;/code&gt; matches if a character occurs 1 or more times&lt;br&gt;
&lt;code&gt;?&lt;/code&gt; matches if a character occurs 0 or 1 times&lt;br&gt;
&lt;code&gt;{min,max}&lt;/code&gt; matches for a range of character occurrences&lt;br&gt;
&lt;code&gt;{min,}&lt;/code&gt; matches for a minimum of character occurrences&lt;br&gt;
&lt;code&gt;{,max}&lt;/code&gt; matches for a maximum of character occurrences&lt;br&gt;
&lt;code&gt;{n}&lt;/code&gt; matches for an exact number of character occurrences&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@billywitherspoo/CloudyCanineTrust?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;?&lt;/code&gt; following the &lt;code&gt;-&lt;/code&gt; character means both &lt;code&gt;JoeSmith@gmail.com&lt;/code&gt; and &lt;code&gt;Joe-Smithgmail.com&lt;/code&gt; are a match as &lt;code&gt;-&lt;/code&gt; character occurred 0 or 1 time in that position in the sequence.&lt;/p&gt;

&lt;h5&gt;
  
  
  Position Quantifiers
&lt;/h5&gt;

&lt;p&gt;&lt;code&gt;^&lt;/code&gt; matches if a character occurs at the beginning of a line (is placed before the character)&lt;br&gt;
&lt;code&gt;$&lt;/code&gt; matches if a character occurs at the end of a line&lt;br&gt;
&lt;code&gt;\b&lt;/code&gt; matches if a character is inside the boundary of a word (is placed before and after the character)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: If you would like to search for the character literal of a meta character such as `&lt;/em&gt;&lt;code&gt; simply escape it as so &lt;/code&gt;*`*&lt;/p&gt;
&lt;h3&gt;
  
  
  Character Classes
&lt;/h3&gt;

&lt;p&gt;Character classes occur within &lt;code&gt;[brackets]&lt;/code&gt;.  They allow a user to specify multiple literal characters to match. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;^&lt;/code&gt; can be used at the beginning of a character class like a bang operator.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[a-z]&lt;/code&gt; is a set of character literals a to z&lt;br&gt;
&lt;code&gt;[A-Z]&lt;/code&gt; is a set of character literals A to Z&lt;br&gt;
&lt;code&gt;[0-9]&lt;/code&gt; is a set of character literals 0 to 9 &lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@billywitherspoo/RotatingAbsolutePolyhedron?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;Here a set of vowels is entered as character literals and replaced with #.&lt;/p&gt;

&lt;p&gt;Then a carrot &lt;code&gt;^&lt;/code&gt; is added to the regex to only remove non-vowels.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/QVyK1uJsHVQ6k/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/QVyK1uJsHVQ6k/giphy.gif" width="500" height="353"&gt;&lt;/a&gt;Feelin Rad About Regex&lt;/p&gt;

&lt;h1&gt;
  
  
  Bring it together now
&lt;/h1&gt;

&lt;p&gt;Let's work on an e-mail regex.  Take a quick look at this very basic example.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[\w-]+@[\w-]{2,}\.[\w-]{2,}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It's a little intimidating at first, but we've covered everything it involves, so let's break it down.&lt;/p&gt;

&lt;p&gt;An e-mail has the following components: &lt;a href="mailto:local-part@domain.domain-extension"&gt;local-part@domain.domain-extension&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This can be split up as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;local-part&lt;/li&gt;
&lt;li&gt;@&lt;/li&gt;
&lt;li&gt;domain&lt;/li&gt;
&lt;li&gt;.&lt;/li&gt;
&lt;li&gt;domain-extension&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. local-part
&lt;/h3&gt;

&lt;p&gt;We know the first part of an e-mail is a set of characters a-z, A-Z, 0-9.  We can take care of this with the meta character &lt;code&gt;\w&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\w&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;However, we know some e-mail names have a dash in them.  So we need to combo a &lt;code&gt;-&lt;/code&gt; character literal with the &lt;code&gt;\w&lt;/code&gt; meta character. We can do that with a [character class].&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[\w-]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Great.  Now we need to specify how many of these characters we expect.  In this case we expect 1 or more characters before the @.  The &lt;code&gt;+&lt;/code&gt; quantifier is a good candidate for this action.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[\w-]+&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Perfect, we've built out the first part of our e-mail regex.  &lt;/p&gt;

&lt;h3&gt;
  
  
  2. @
&lt;/h3&gt;

&lt;p&gt;The second part is very simple.  We know the &lt;code&gt;@&lt;/code&gt; character literal will appear with no exceptions.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;@&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. domain
&lt;/h3&gt;

&lt;p&gt;Here we can make our pattern similar to what we did in local-part.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[\w-]+&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But that's a little boring.  Let's pretend we know all domains are at least two letters.  We can replace the &lt;code&gt;+&lt;/code&gt; 1 or more quantifier with &lt;code&gt;{2,}&lt;/code&gt; signifying we know there will be at least two characters.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[\w-]{2,}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. .
&lt;/h3&gt;

&lt;p&gt;Another easy one! A character literal&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Hold on, that's a meta character.  Make sure to escape it with &lt;code&gt;\&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;\.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Better!&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Domain Extension
&lt;/h3&gt;

&lt;p&gt;We can make the identical assumption on length and reuse the pattern we made for domain.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[\w-]{2,}&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Test it out
&lt;/h3&gt;

&lt;p&gt;Drumroll, please.  Our final regex expression is ready to go!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[\w-]+@[\w-]{2,}\.[\w-]{2,}&lt;/code&gt;&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@billywitherspoo/SafePristineStatistics?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;Beautiful! It was able to search through the text and grab the e-mails we expected it to.  It also skipped over other sequences that had characters and structure similar to an e-mail, but did not match our regex. There are certainly still room for improvements, so I encourage everyone to experiment on their own!&lt;/p&gt;

&lt;p&gt;Some of my favorite regex resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=7DG3kCDx53c&amp;amp;t=2s"&gt;The coding train on Youtube&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://rubular.com/"&gt;Rubular, a Ruby based regex tester&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Your built in IDE! Try out Ctrl + F or Cmd + F and click the * option to test out searching by Regex.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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