<?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: Maegan Wilson</title>
    <description>The latest articles on DEV Community by Maegan Wilson (@maeganwilson_).</description>
    <link>https://dev.to/maeganwilson_</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%2F132617%2F259733e8-c83c-4fe6-a578-8aebc0482aeb.png</url>
      <title>DEV Community: Maegan Wilson</title>
      <link>https://dev.to/maeganwilson_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maeganwilson_"/>
    <language>en</language>
    <item>
      <title>3 ways to make better pull request descriptions</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Fri, 20 May 2022 14:03:17 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/3-ways-to-make-better-pull-request-descriptions-1ldc</link>
      <guid>https://dev.to/maeganwilson_/3-ways-to-make-better-pull-request-descriptions-1ldc</guid>
      <description>&lt;p&gt;A pull request, aka merge request, is crucial in the git workflow when working on a team. If your project has CI/CD setup, it is usually the piece that needs to be merged to trigger code to production. This post outlines three ways to make your pull request descriptions better.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What and Why
&lt;/h2&gt;

&lt;p&gt;Make sure you are clear about what your code does and why it’s essential. Explain what it does and include whatever is necessary to show what it does. GitHub allows images and gifs in the pull request description, so if those would help illustrate you’re point, then do it. Including a why lets the code reviewer know the purpose of the pull request.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does What and Why differentiate
&lt;/h3&gt;

&lt;p&gt;The what and why of a pull request might seem similar, but they are quite different. The &lt;strong&gt;what&lt;/strong&gt; of the pull request explains what the code does, and the &lt;strong&gt;why&lt;/strong&gt; defines the pull request's impact. &lt;/p&gt;

&lt;h4&gt;
  
  
  Example
&lt;/h4&gt;

&lt;p&gt;I want to submit a PR that updates ESLint.&lt;br&gt;
&lt;/p&gt;

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

This PR adds a new ESLint rule to adjust the import order

## Why

It makes the code easier to read and easier to follow by organizing imports in a predictable way. It also groups imports by siblings and parents.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In the example above, the &lt;strong&gt;what&lt;/strong&gt; says what the code does and the &lt;strong&gt;why&lt;/strong&gt; explains how the pull request is necessary.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. How to determine if this PR is good to merge
&lt;/h2&gt;

&lt;p&gt;Mention how the reviewer is supposed to test the pull request works in the description. Explicitly stating how the code reviewer is supposed to evaluate the code will make it easier for them.&lt;/p&gt;
&lt;h3&gt;
  
  
  Example
&lt;/h3&gt;

&lt;p&gt;Building on the above example:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## What

This PR adds a new ESLint rule to adjust the import order

## Why

It makes the code easier to read and easier to follow by organizing imports in a predictable way. It also groups imports by siblings and parents.

## How to test

1. Open a JavaScript file
2. Change the import order
3. Save file and see how it changed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The above example is a great start, but a way to take it up a level would be to actually give before code and after code in the description like this.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;✉️ Get articles directly to your &lt;a href="https://cctplus.dev/#/portal"&gt;email&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  3. Create a template
&lt;/h2&gt;

&lt;p&gt;If you have a structure to your pull request, you should create a template. A template gives pull requests structure since it guides the author on what they should include. It also ensures that all the necessary pieces to the pull request are there.&lt;/p&gt;

&lt;p&gt;A sample template might look like this:&lt;br&gt;
&lt;/p&gt;

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

Describe what this PR does

## Why

Describe the impact that this PR makes

## How to test

Describe how to test that this PR does what it says it does

## Checklist

- [ ] Ran all tests locally
- [ ] There are no credentials stored in the code
- [ ] Has this been signed off by PM or designers or any other stakeholders?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are links to making a pull or merge request template on GitHub, GitLab, and BitBucket. I found these by googling “How to make pull request template on {platform}” so if your platform isn’t here, then you can probably find it using the exact search.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository"&gt;How to make a pull request template on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.gitlab.com/ee/user/project/description_templates.html#create-a-merge-request-template"&gt;How to make a merge request template on GitLab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bitbucket.org/blog/save-time-with-default-pull-request-descriptions"&gt;How to make a pull request template on BitBucket&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you have any comments about this post, then make sure to let me know on Twitter, &lt;a href="https://twitter.com/maeganwilson_"&gt;@maeganwilson_&lt;/a&gt; and follow me there.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;☕ Support my articles by &lt;a href="https://checkout.stripe.com/pay/plink_1Ji13BBhq0W6Mf4HCqPAYBNo#fidkdWxOYHwnPyd1blppbHNgWjVgf39QQGFGU2pPakhHTVFdQEs0R1F8VTU1Ym1ATmByUG0nKSd1aWxrbkB9dWp2YGFMYSc%2FJzQxbjFsdDJiXDZOQWFOUDBubicpJ3dgY2B3d2B3SndsYmxrJz8nbXFxdXY%2FKipmZnF1aXB2K2Fgcyo2KHJkfHYocWooaGRuYChnYHFxYHcodXBpaSh3YHRwYHZxKGFgdmZ3bHVxbGprdionKSd1d2BpamRhQ2prcSc%2FJ1ZqcHdmYCVWZGt2JVV3aid4JSUl"&gt;buying me a coffee&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>How to use the @FocusState property wrapper in SwiftUI</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Fri, 29 Apr 2022 16:12:57 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/how-to-use-the-focusstate-property-wrapper-in-swiftui-5cof</link>
      <guid>https://dev.to/maeganwilson_/how-to-use-the-focusstate-property-wrapper-in-swiftui-5cof</guid>
      <description>&lt;p&gt;Here’s how to make TextFields focused and not let a form close until the proper fields are filled out by the user.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/P1dL96vJhLg"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;em&gt;This article is also a video&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;WWDC 2021 introduced the property wrapper @FocusState. It can be used to set which textfields are in focus pretty easily. I’m going to open this form for adding a new bag of coffee an app I’m working on.&lt;/p&gt;

&lt;p&gt;Notice how when I click on save it just closes the form and doesn’t dismiss the keyboard. The @FocusState can help fix that. First thing that needs to be added is an enum with the fields that we want to be required.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;enum&lt;/span&gt; &lt;span class="kt"&gt;Field&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;roaster&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The enum needs to conform to the Hashable protocol so you can either force conformance by adding : Hashable or as long as the cases don’t have a value assigned you should be good since Swift will do that “automagically”.&lt;/p&gt;

&lt;p&gt;Now, we need to add a variable with the property wrapper @FocusState private var focusField: Field&lt;br&gt;
Then on the TextFields, add the focused modifier and what field it should be equal to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kt"&gt;TextField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;textFieldStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roundedBorder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;focused&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;focusedField&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;equals&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kt"&gt;TextField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Style"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;textFieldStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roundedBorder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;focused&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;focusedField&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;equals&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kt"&gt;TextField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Roaster"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roaster&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;textFieldStyle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roundedBorder&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;focused&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;focusedField&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;equals&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roaster&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, let’s put some logic in to make sure these fields are filled and set the next focusedField&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kt"&gt;Button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isEmpty&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;focusedField&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isEmpty&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;focusedField&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roaster&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isEmpty&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;focusedField&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roaster&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;isEdit&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateBean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;viewContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addBeansToData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;viewContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;resetBeans&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="n"&gt;showForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, after a successful save, we should set the focusedfield to nil and dismiss the keyboard&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kt"&gt;Button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isEmpty&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;focusedField&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isEmpty&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;focusedField&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roaster&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isEmpty&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;focusedField&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;roaster&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;isEdit&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;updateBean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;viewContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;beans&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addBeansToData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;viewContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;resetBeans&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="n"&gt;showForm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
      &lt;span class="n"&gt;focusedField&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;nil&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let’s run through the form one more time to just show it all together.&lt;/p&gt;

&lt;p&gt;Hopefully that showed you how to use the @FocusState property wrapper. If you have any questions, then please drop a comment below.&lt;/p&gt;




&lt;p&gt;Want my posts directly to your inbox? &lt;br&gt;
Great! Sign up &lt;a href="https://cctplus.dev/#/portal"&gt;here&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>swift</category>
      <category>swiftui</category>
    </item>
    <item>
      <title>How social media helped my career as a software engineer</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Thu, 28 Apr 2022 14:23:52 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/how-social-media-helped-my-career-as-a-software-engineer-n5</link>
      <guid>https://dev.to/maeganwilson_/how-social-media-helped-my-career-as-a-software-engineer-n5</guid>
      <description>&lt;p&gt;In this post, I'm going to discuss what it means to work in public, what are the positives from working in public, how it actually has helped me and why I think you should use Social Media if you come from a non-traditional background. &lt;/p&gt;

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

&lt;h2&gt;
  
  
  What does it mean to actually work in public?
&lt;/h2&gt;

&lt;p&gt;Working in public means sharing what you're working on with other people. That could be a blog, an Instagram account, YouTube, or other social media. It doesn't matter how you're sharing, just that you share with other people besides yourself. Working in public is not keeping your work siloed in private GitHub repos or even in public ones if you don't link to it anywhere. You have to be sharing your progress or what you're working on in some way, shape, or form.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do I share?
&lt;/h2&gt;

&lt;p&gt;I share my work on &lt;a href="https://instagram.com/mwilson_codes"&gt;Instagram&lt;/a&gt;, &lt;a href="https://twitch.tv/maeganwilson_"&gt;Twitch&lt;/a&gt;, &lt;a href="https://youtube.com/c/maeganwilson_"&gt;YouTube&lt;/a&gt;, and my &lt;a href="https://cctplus.dev"&gt;website&lt;/a&gt;. I chose platforms that I was interested in creating content for so that I would be more inclined to post. Going live on Twitch and making a video on YouTube are a lot easier for me to discuss what I'm working on for a few reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's easy to turn on a camera&lt;/li&gt;
&lt;li&gt;I can show my screen instantly&lt;/li&gt;
&lt;li&gt;I don't have to spell check&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Making a well-performing video on YouTube takes more effort than those 3 points, but it's usually more effortless than a blog post.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the positives that can come from this?
&lt;/h2&gt;

&lt;p&gt;The number one positive outcome of using social media to show your work as a software engineer is networking. Meeting other people who can help you in your career and life is invaluable. I was able to take on my first freelancing project because I connected with someone in my live stream chat, and we chatted over Instagram messages also. I have received a lot of helpful advice about Swift, advancing my career, and just life from people in my YouTube and Instagram comments.&lt;/p&gt;

&lt;p&gt;Another positive of my YouTube channel and blog is that future employers or freelance clients can see that I know what I claim to do on my resume. This "proof" is essential since my background is not in tech. I went to school for technical theatre, and I worked in the industry for five years. My previous work history does not show that I know iOS app development or web development, even though I have studied them and released two apps in the last four years. My videos and posts show that my resume is correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  Should you share in public?
&lt;/h2&gt;

&lt;p&gt;I believe you should be sharing the work you've done. It can be a simple blog post explaining a tool you've used or a photo of some code with an explanation of the project it belongs to.&lt;/p&gt;

&lt;p&gt;If you have any comments about this post, then make sure to let me know on Twitter, &lt;a href="https://twitter.com/maeganwilson.com"&gt;@maeganwilson_&lt;/a&gt;!&lt;/p&gt;




&lt;p&gt;Want my posts directly to your inbox? &lt;br&gt;
Great! Sign up &lt;a href="https://cctplus.dev/#/portal"&gt;here&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>wip</category>
    </item>
    <item>
      <title>How to add a swift package to iOS App using the Swift Package Manager</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Thu, 14 Oct 2021 12:43:38 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/how-to-add-a-swift-package-to-ios-app-using-the-swift-package-manager-460</link>
      <guid>https://dev.to/maeganwilson_/how-to-add-a-swift-package-to-ios-app-using-the-swift-package-manager-460</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/Zcv6rK8IXPQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I'm going to show you how to add a swift package to your iOS app using the Swift Package Manager.&lt;/p&gt;

&lt;h2&gt;
  
  
  First how to add a package to your app
&lt;/h2&gt;

&lt;p&gt;To add a package you will need a &lt;strong&gt;repository’s URL&lt;/strong&gt; or if the package is hosted on GitHub or GitHub enterprise and you’re logged in you can just search for the package.&lt;/p&gt;

&lt;p&gt;There’s actually two ways.&lt;/p&gt;

&lt;h3&gt;
  
  
  Here is way number 1:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the target’s general pane&lt;/li&gt;
&lt;li&gt;Click the &lt;code&gt;+&lt;/code&gt; button in the &lt;code&gt;Frameworks, Libraries, and Embedded Content&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;code&gt;Add Other&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Choose &lt;code&gt;Add Package Dependecy&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Here is way number 2:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the project&lt;/li&gt;
&lt;li&gt;Go to the File Menu&lt;/li&gt;
&lt;li&gt;Choose Swift Packages and enter the repo URL&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How to use the dependency?
&lt;/h2&gt;

&lt;p&gt;To actually use the dependency, you will need to first import the package and then call the property you want.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to delete a package from your app
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the swift packages pane in the Project settings&lt;/li&gt;
&lt;li&gt;Select the package to delete&lt;/li&gt;
&lt;li&gt;Hit the &lt;code&gt;-&lt;/code&gt; button&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  When should you reach for an external dependency?
&lt;/h2&gt;

&lt;p&gt;An external dependency aka package can make your life easier as a developer. Sometimes they can save you hours of coding and figuring out how something works.&lt;/p&gt;

&lt;p&gt;I use one in iHog for OSC a network protocol that I have no idea how to actually implement in Swift. OSCKit allowed me to focus on other parts of the app and for the package to actually handle all the OSC communication between the app, the iOS device, and the Hog controller.&lt;/p&gt;




&lt;p&gt;If you are finding these posts and videos useful, then please share this post or &lt;a href="https://geni.us/buy-maegan-a-coffee" rel="noopener noreferrer"&gt;buy me a coffee&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://geni.us/buy-maegan-a-coffee" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.cctplus.dev%2Fimages%2Fbmc.png" alt="Buy Me a Coffee Link"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Want my posts directly to your inbox? &lt;br&gt;
Great! Sign up &lt;a href="https://cctplus.dev/#/portal" rel="noopener noreferrer"&gt;here&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>xcode</category>
      <category>swift</category>
    </item>
    <item>
      <title>Git GUI vs Command Line</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Wed, 07 Apr 2021 13:19:34 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/git-gui-vs-command-line-369a</link>
      <guid>https://dev.to/maeganwilson_/git-gui-vs-command-line-369a</guid>
      <description>&lt;h1&gt;
  
  
  Git GUI vs Command Line
&lt;/h1&gt;

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

&lt;p&gt;In the past couple of posts, I’ve been using the command line to interact with Git, but you don’t have to do that! You can actually use an application to do git commands. If you haven’t guessed it by now, today, we are going to talk about using an app for git versus using the command line.&lt;/p&gt;

&lt;h1&gt;
  
  
  Now, you might be wondering, &lt;strong&gt;why&lt;/strong&gt; would you want to use an app to interface with Git instead of the command line?
&lt;/h1&gt;

&lt;p&gt;Well here are some reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Graph view of commits&lt;/li&gt;
&lt;li&gt;Graph view of branches&lt;/li&gt;
&lt;li&gt;See the changes and explore them more&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6v-WWdi---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/E89B5766-746A-4DA2-B008-3A660116D2D6_2" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6v-WWdi---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/E89B5766-746A-4DA2-B008-3A660116D2D6_2" alt="Fork" width="880" height="578"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s really nice to be able to see all of this in a more user-friendly way. Yes, you can see this all through the command line, but it can be a bit easier to read in an app also might be a bit easier to use. Especially because you don’t have to remember the commands.&lt;/p&gt;

&lt;p&gt;Most Apps will also let you set up your remote server account like GitHub or GitLab so that you can clone from the app which also avoids the command line.&lt;/p&gt;

&lt;p&gt;There are so many options when it comes to using an application for Git. The three that I’ve used are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fork&lt;/li&gt;
&lt;li&gt;GitKraken&lt;/li&gt;
&lt;li&gt;Tower&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They all work on Windows or Mac and can be used together if you want. Each app offers something a little bit different, so I highly suggest you try them out and see which one you like best. I like Fork the best since it can handle private repositories for free. To support development, the developers do charge around $50, but you can bypass that if you want.&lt;/p&gt;

&lt;h1&gt;
  
  
  Now, how does the app workflow compare to the command line?
&lt;/h1&gt;

&lt;p&gt;Well, the workflow is the same. You still add your files, commit the changes with a message, and push them to the remote server. There are just some buttons to hit instead of typing the commands. Let’s look at how Fork does it since that’s what I use as my client.&lt;/p&gt;

&lt;p&gt;First, we need to go to the repo.&lt;/p&gt;

&lt;p&gt;Then to add files, Fork actually has us check them to acknowledge the change and then stage them.&lt;/p&gt;

&lt;p&gt;Now, we add our message and hit commit!&lt;/p&gt;

&lt;p&gt;That’s pretty easy to do on the command line even, but where I think Git Clients/Apps/GUIs whatever you wanna call them really shine is when you need to do something a bit more complex like switching branches and adding tags, which I use a lot in my workflow.&lt;/p&gt;

&lt;p&gt;If you need a reminder on how to switch and create branches via the command line, check out this &lt;a href="https://cctplus.xyz/2021/03/17/giting-tree"&gt;post&lt;/a&gt; about branching strategies.&lt;/p&gt;

&lt;p&gt;Here’s how I’ll create a branch in Fork. It’s relatively similar to all the other apps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Right-click on the current branch&lt;/li&gt;
&lt;li&gt;Choose create branch&lt;/li&gt;
&lt;li&gt;Give a branch a name&lt;/li&gt;
&lt;li&gt;Click create&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, isn’t that pretty easy?&lt;/p&gt;

&lt;p&gt;These are some of the niceties that come from an app.&lt;/p&gt;

&lt;h1&gt;
  
  
  Which should you choose?
&lt;/h1&gt;

&lt;p&gt;Well, that’s not really a question I can answer for you, but I can say I still use the command line regularly even if I have an app installed. It’s a “what tool will do the right job” type answer. If you have a preference, then let me know in the comments below!&lt;/p&gt;

&lt;p&gt;If you got something out of this post, make sure to let me know in the comments below!&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>The Git-ing Tree: Git Branching and Merging Strategies</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Wed, 17 Mar 2021 11:59:28 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/the-git-ing-tree-git-branching-and-merging-strategies-5cbh</link>
      <guid>https://dev.to/maeganwilson_/the-git-ing-tree-git-branching-and-merging-strategies-5cbh</guid>
      <description>&lt;p&gt;Hey yall! Let’s grab a cup of coffee or whatever your beverage of choice is and talk about git branches and merging.&lt;/p&gt;

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

&lt;h1&gt;
  
  
  What is a branch
&lt;/h1&gt;

&lt;p&gt;A branch is the area where edits and commits are stored. If you watched my &lt;a href="https://youtu.be/4KwLqLXGPn8"&gt;last video&lt;/a&gt; about git remote servers, then I was actually pushing to a branch already, the &lt;code&gt;main&lt;/code&gt; branch.&lt;/p&gt;

&lt;p&gt;By default, a git repo is on a master or a main branch. There has been a push for repos to have a main branch, but that's a topic for a different video or maybe even just a blog post. Just know, I’ll be using &lt;code&gt;main&lt;/code&gt; in the rest of this video.&lt;/p&gt;

&lt;p&gt;Branches can be created whenever you need one, which we will talk about in just a minute. Creating a branch will give you a new area to work in that doesn’t adjust your main branch.&lt;/p&gt;

&lt;p&gt;When a branch is created, you create a fork in your git repo. This is what a repo looks like with commits.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gLj09-uX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/760B3011-F445-4B58-B63B-F1065CD12421_2" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gLj09-uX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/760B3011-F445-4B58-B63B-F1065CD12421_2" alt="image" width="880" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this is what it looks like when you create a branch&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BNG7-ka7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/58576EDD-C0EC-4F0D-BDB7-8F602A4E7DD5_2" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BNG7-ka7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/58576EDD-C0EC-4F0D-BDB7-8F602A4E7DD5_2" alt="image" width="880" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Why branch your code?
&lt;/h1&gt;

&lt;p&gt;There are two main reasons to create branch are&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keep changes isolated from your main code base&lt;/li&gt;
&lt;li&gt;Work on different modules at the same time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Keeping changes isolated from your main code is the main benefit here if you are a solo developer. This allows you to keep potentially breaking code away from working code.&lt;/p&gt;

&lt;p&gt;Working on different modules at the same time is really useful for teams, so that someone can work on feature A while another person works on feature B and someone else can fix issue number 512. All 3 can have their own branch and don’t have to worry about breaking changes, until bringing the code back together.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating a branch
&lt;/h1&gt;

&lt;p&gt;To create a branch in the code, you need to run a command&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git branch &amp;lt;name of branch&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now to start working on that branch, you need to run a checkout command. The checkout command is used to switch between versions of the repo and by specifying the branch name, then git will grab the branch&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git checkout &amp;lt;name of branch&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once you’ve checked out the branch, you can now make changes on that branch just like normal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &amp;lt;file name&amp;gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &amp;lt;Message&amp;gt;
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  How to get the code back together
&lt;/h1&gt;

&lt;p&gt;Now, the code has been split into branches, what happens when you want to get the branches back to s ingle point. That’s where the &lt;code&gt;merge&lt;/code&gt; command comes into play.&lt;/p&gt;

&lt;p&gt;To merge the branch back to main run the following commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout main
git merge &amp;lt;branch name&amp;gt;
&lt;span class="c"&gt;# optional - delete the old branch now that it is in main&lt;/span&gt;
git branch &lt;span class="nt"&gt;-d&lt;/span&gt; &amp;lt;branch name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might run into conflicts, but those can be resolved in your text editor. Once you resolve the conflicts, you can add, commit, and push your resolution like any other change.&lt;/p&gt;

&lt;h1&gt;
  
  
  My Use Case of Branches
&lt;/h1&gt;

&lt;p&gt;I use branches for each release of my apps. You can see that with iHog’s GitHub Repo. There is a &lt;code&gt;master&lt;/code&gt; branch and then the version I'm currently working on, &lt;code&gt;2021-2&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OnxOXZ88--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/5BC54927-397D-4C92-B9E4-F344DE30CE6B_2" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OnxOXZ88--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.craft.do/user/full/e08d0ba1-ee73-de35-2f90-2e261c097071/doc/82149C1E-E8FF-4BBE-8EA8-FE551C5A7E68/5BC54927-397D-4C92-B9E4-F344DE30CE6B_2" alt="image" width="880" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Master or Main Branch is always the latest release&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I keep master or main as a release branch. Meaning, that it’s not in development. This is the code used that is currently on the app store.&lt;/p&gt;

&lt;p&gt;If I’m adding a feature in the middle of a version, then I will add a branch for that feature off of the version’s branch and then merge the feature back into the version branch.&lt;/p&gt;

&lt;p&gt;This work flow allows me to issue bug fixes without needing to finish the feature if need be.&lt;/p&gt;




&lt;p&gt;Thanks for reading! I appreciate it. If you found this useful, then please make sure to share this wherever you can!&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>Git that Code!</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Wed, 10 Mar 2021 14:10:04 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/git-that-code-2heh</link>
      <guid>https://dev.to/maeganwilson_/git-that-code-2heh</guid>
      <description>&lt;p&gt;Welcome to "Git that Code!" The 2nd post in my Git series. In this post, I'm going to talk about the popular remote servers, GitHub, GitLab, and BitBucket, how to get your code on the server, and retrieve code from it. Let's get started!&lt;/p&gt;

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

&lt;h1&gt;
  
  
  Remote Server Options
&lt;/h1&gt;

&lt;p&gt;There are 3 Git server options that you hear about, well you might actually only hear about the first 2. You could also roll your own, but that's a bit out of the scope here. So, here are some options that are free and offer quite a bit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub&lt;/li&gt;
&lt;li&gt;GitLab&lt;/li&gt;
&lt;li&gt;BitBucket&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are just the most "popular" options and each have their pluses and minuses, but here are some general features that each offer on their free tiers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free, unlimited private repos (where the code lives)&lt;/li&gt;
&lt;li&gt;Issue tracking&lt;/li&gt;
&lt;li&gt;Wiki per repo&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now here is what each is mainly known for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub&lt;/strong&gt;: Open source software. Most people put their OSS on GitHub for others to contribute to or use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitLab&lt;/strong&gt;: Contains more devop options like Continuious Integration and more access levels&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BitBucket&lt;/strong&gt;: Has unlimited private repos and integrates well with JIRA and other atlassian software&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this post, I'll be demoing using GitHub, but it is relatively the same on all 3 platforms.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to get code to the server
&lt;/h1&gt;

&lt;p&gt;Now, that we know where to store code, let's talk about getting code onto the server. To get code onto the server, you must &lt;code&gt;push&lt;/code&gt; the code into a repository.&lt;/p&gt;

&lt;p&gt;What I like to do is start the repo in your choice of server, mine is GitHub and then get the repo onto my computer, but in the last &lt;a href="https://cctplus.xyz/2021/03/02/giting_started"&gt;post&lt;/a&gt; I walked through making a git repo locally, so let's get that repo onto GitHub.&lt;/p&gt;

&lt;p&gt;The first thing I need to do is make a blank repository. This repository is going to be where the code will be stored.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your browser of choice&lt;/li&gt;
&lt;li&gt;Navigate to your server&lt;/li&gt;
&lt;li&gt;Sign in&lt;/li&gt;
&lt;li&gt;Create a new repository&lt;/li&gt;
&lt;li&gt;Don't check any of these boxes, but make sure to give your repo a name.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, this is the remote repo that needs to be added to our local repo. GitHub gives us some handy quick setup which is what we are going to follow.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open your terminal app&lt;/li&gt;
&lt;li&gt;Navigate to your local repository&lt;/li&gt;
&lt;li&gt;Add a remote url to the local git repository &lt;code&gt;git remote add origin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Now we need to create a branch locally &lt;code&gt;git branch -M main&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then, we &lt;code&gt;push&lt;/code&gt; it to the server. basically we are uploading it to the server now. &lt;code&gt;git push -u origin main&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now the code should be in my GitHub repo. Let's refresh and &lt;strong&gt;BAM&lt;/strong&gt; it's there.&lt;/p&gt;

&lt;p&gt;After commits have been made, we need to run &lt;code&gt;git push&lt;/code&gt; which will push the commits to the remote server.&lt;/p&gt;

&lt;p&gt;When do you push your code? All the time. Sometimes I do it after a long session. Sometimes I do it after each commit. Just make sure your code in the remote server is as up to date as possible. In case things go south, you want a way o bring that work back and the history back.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to get the code from the server
&lt;/h1&gt;

&lt;p&gt;We just talked about pushing code to the server, now let's talk about pulling and cloning code from the server. There are two basic commands to get the code from the server. They are &lt;code&gt;git clone&lt;/code&gt; and &lt;code&gt;git pull&lt;/code&gt;. Each are used in different scenarios.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git clone&lt;/code&gt; is &lt;strong&gt;mainly&lt;/strong&gt; used to get a repository from the server that doesn't exist on the local computer. If you stumble upon a project on  GitHub that you want to hack on, then you clone it to your machine.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git pull&lt;/code&gt; is &lt;strong&gt;mainly&lt;/strong&gt; used to get changes to a repository that you are working on locally. It can be used if you're working on a team or make a change on the web that you need on your computer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's walk through an example of cloning a repo. I'll clone my &lt;code&gt;hello-world-js&lt;/code&gt; repo from forever ago.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open terminal&lt;/li&gt;
&lt;li&gt;Navigate where you want to store the repo for me that'll be my developer folder&lt;/li&gt;
&lt;li&gt;Grab the URL to clone from the repo&lt;/li&gt;
&lt;li&gt;In the terminal type the command &lt;code&gt;git clone git@github.com:maeganwilson/hello-world-js.git&lt;/code&gt; and press enter&lt;/li&gt;
&lt;li&gt;DONE!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, we can edit the file and push it back.&lt;/p&gt;

&lt;p&gt;Alright, cloning was kinda easy, now let's try pulling. Like I said, pulling can only happen when there are changes on the server that you need to git. So, I'm going to make some changes in GitHub.com in the iHog repo.&lt;/p&gt;

&lt;p&gt;Now, in my terminal, I'm going to change my directory to iHog and then run &lt;code&gt;git pull&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the terminal, we see how many changes were made and a bit more.&lt;/p&gt;




&lt;p&gt;That's a very basic overview of using a remote server and how to pull and clone code.&lt;/p&gt;

&lt;p&gt;In the next post, I'm going to cover branches and not the outside tree kind.&lt;/p&gt;




&lt;p&gt;If you want to chat with me and point out some tips and tricks, you can watch me work on iOS apps on Tuesday, Thursday, and Friday mornings at &lt;a href="http://twitch.tv/maeganwilson_"&gt;twitch.tv/maeganwilson_&lt;/a&gt; Make sure to drop by and say hi!&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>Git-ing Started: An intro to Git</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Wed, 03 Mar 2021 13:58:17 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/git-ing-started-an-intro-to-git-4hmb</link>
      <guid>https://dev.to/maeganwilson_/git-ing-started-an-intro-to-git-4hmb</guid>
      <description>&lt;p&gt;Let’s talk about Git. This is the first post in a series of using git. In this post, I’m going to explain these things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is Git?&lt;/li&gt;
&lt;li&gt;Why you should be using it&lt;/li&gt;
&lt;li&gt;How to use it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you'd rather watch a video than read though, you can do that right here also!&lt;/p&gt;

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

&lt;h1&gt;
  
  
  What is it Git?
&lt;/h1&gt;

&lt;p&gt;Git is “Distributed version control” meaning it keeps track of changes made to files and there is a remote server somewhere else in the world that also has those changes. A common remote server is &lt;strong&gt;&lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/strong&gt;, which I will talk about in the next video, so make sure to hit that subscribe button and the bell to be notified when I post it.&lt;/p&gt;

&lt;p&gt;Basically, it’s like track changes in Word but for files in a repository, or folder, that are stored locally and can be pushed to a remote server if needed. These files can be any type, but it works best with text files.&lt;/p&gt;

&lt;p&gt;It’s usually used by developers to track all the changes made in source code and to collaborate on projects since it supports working on different parts of the project and merge them together. Since each computer also gets the full history of the repository, or project, the developers can also go back to another point in time and adjust things there.&lt;/p&gt;

&lt;p&gt;Those advantages also stand for being a solo dev, so let’s talk about why you should use it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why you should use it?
&lt;/h1&gt;

&lt;p&gt;If you’re not on a team, I still say you should be using git and here are my reasons.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Allows you to see what changes are made&lt;/li&gt;
&lt;li&gt;Allows you to easily roll back changes if needed&lt;/li&gt;
&lt;li&gt;Allows you to have a backup of your developer environment if using a remote server like GitHub&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  How does one use git?
&lt;/h1&gt;

&lt;p&gt;We’ve talked about why and what is git, but how do you actually use git? Like what software do you need and what do you do?&lt;/p&gt;

&lt;h2&gt;
  
  
  First off, download and install git
&lt;/h2&gt;

&lt;p&gt;from &lt;a href="http://git-scm.com/" rel="noopener noreferrer"&gt;git-scm.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s the only “extra” piece of software you need, since git can be ran through the command line&lt;/p&gt;

&lt;h2&gt;
  
  
  Workflow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Initialize git to the repository or project folder, I’ll call it repo from here on out&lt;/li&gt;
&lt;li&gt;Create and or modify folders and files&lt;/li&gt;
&lt;li&gt;Add those files and folders to git’s staging area&lt;/li&gt;
&lt;li&gt;Commit the changes to git&lt;/li&gt;
&lt;li&gt;Push those changes if you have a remote server&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All 5 of these steps have commands, so let's work through creating a basic website that has git.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Example:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Creating a folder for the project
&lt;/h3&gt;

&lt;p&gt;Create a new folder, I’m going to be creating it in my &lt;code&gt;ptd&lt;/code&gt; folder, but it could really be anywhere on your computer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Initialize git
&lt;/h3&gt;

&lt;p&gt;Now, we are going to tell git to start tracking this folder.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the terminal app or whatever you use to access the command line&lt;/li&gt;
&lt;li&gt;Change your working directory to the folder you just created

&lt;ol&gt;
&lt;li&gt;Use &lt;code&gt;cd&lt;/code&gt; followed by the path to the directory to change your working directory&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cd developer/git-website&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;in the terminal, type &lt;code&gt;git init&lt;/code&gt; . Now git is working on this repo&lt;/li&gt;

&lt;/ol&gt;

&lt;h3&gt;
  
  
  Create an index.html file
&lt;/h3&gt;

&lt;p&gt;Now, let’s create a simple index.html file that just shows “GIT IS THE BEST” and make sure to save it in the git-website folder&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage the file
&lt;/h3&gt;

&lt;p&gt;Since, the file has been created, we need to actually tell git to track this file and the current state of the file. To do this, we use the command &lt;code&gt;git add {file path}&lt;/code&gt;. This will need to happen for any change you want git to store.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git add index.html&lt;/code&gt; adds index.html to the staging area.&lt;/p&gt;

&lt;p&gt;You can repeat this step for as many files as you need.&lt;/p&gt;

&lt;h3&gt;
  
  
  Record the changes
&lt;/h3&gt;

&lt;p&gt;Now, to actually tell git to record the changes that were added by committing those files. When committing files, you must specify a message.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git commit -m “Adding the index file”&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Push those changes
&lt;/h3&gt;

&lt;p&gt;Again, this step would only happen if a remote was setup, which we didn’t do in this video, but will do in the next one! So make sure to hit that subscribe button and the bell so you don’t mix it.&lt;/p&gt;

&lt;p&gt;The command to push the changes is &lt;code&gt;git push&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You’ll repeat the &lt;code&gt;git add&lt;/code&gt;, &lt;code&gt;git commit&lt;/code&gt;, and &lt;code&gt;git push&lt;/code&gt; a lot throughout the project so get used to those commands.&lt;/p&gt;




&lt;p&gt;That’s the basics of what git is, why you should use it, and how to actually use it.&lt;/p&gt;

&lt;p&gt;In the next post, I’ll talk about adding a remote server tool so that you can push your changes to a remote repo.&lt;/p&gt;

&lt;p&gt;If you found the post useful, then please share with anyone you think will find this useful.&lt;/p&gt;

</description>
      <category>git</category>
    </item>
    <item>
      <title>5 Ways to improve your Xcode workflow</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Thu, 11 Feb 2021 00:21:20 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/5-ways-to-improve-your-xcode-workflow-2hcg</link>
      <guid>https://dev.to/maeganwilson_/5-ways-to-improve-your-xcode-workflow-2hcg</guid>
      <description>&lt;p&gt;Here are my top 5 tips and tricks for using Xcode! This is a script for a YouTube video I made which is right here!&lt;/p&gt;

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

&lt;p&gt;If you have any tips, then please let me know in the comments cause I would love for them to be shared.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Build and Run Shortcuts
&lt;/h1&gt;

&lt;p&gt;First off make use of the short cuts for building and running the app. These are actions you'll do a lot&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Command + b&lt;/code&gt; = build&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Command + r&lt;/code&gt; = run&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These will save you time in the long run cause your hands are already on the keyboard and don't have to go click the Run button on the toolbar.&lt;/p&gt;

&lt;p&gt;If you use the canvas, then make sure to jot down the shortcut to restart the live preview. The canvas will stop it's updating when adjusting anything not in the View it self, so if you add a variable or an environment object, you'll need to restart it. The shortcut is&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Command + Option + p&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So these three shortcuts are probably my most used short cuts.&lt;/p&gt;

&lt;p&gt;The next most used shortcuts are in my next point. &lt;/p&gt;

&lt;h1&gt;
  
  
  2. Keep the file formatted
&lt;/h1&gt;

&lt;p&gt;How many times do you go back into your code and look for a specific line or are just reading a section to understand what's happening? I know I do it all the time. Having a file with the right indention and is easy to follow cause the formatting is the same makes the world of difference.&lt;/p&gt;

&lt;p&gt;Xcode has a way to format a section of your code.&lt;/p&gt;

&lt;p&gt;Select the part you want to format and then press &lt;code&gt;Control + i&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;To do this to a whole file, select all then &lt;code&gt;control + i&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Command + a&lt;/code&gt; → &lt;code&gt;Control + i&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Another reason to format your file is to easily know if something syntax wise isn't working. Sometimes this is faster than waiting till build time to find the error.&lt;/p&gt;

&lt;p&gt;I just talked about keeping the file formatted correctly to help reading a file, but let's shift to navigating your file. Maybe I know exactly where I want to go, well that can be done pretty easily. &lt;/p&gt;

&lt;p&gt;My 3rd topic is how to navigating your file like a pro.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Navigate your file like a pro
&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6absz37imb0d9e7vwgqv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6absz37imb0d9e7vwgqv.gif" alt="GIF of clicking the drop down menu to navigate the file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Utilize the drop down menu on the file name to navigate your file. What gets populated there?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Declaration of properties&lt;/li&gt;
&lt;li&gt;Declaration of functions&lt;/li&gt;
&lt;li&gt;Comments that are MARKED&lt;/li&gt;
&lt;li&gt;Comments that are TODOs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can click on any of these items and immediately be taken to that item. It's useful to get exactly where you need to be and also get a quick glance of what exactly is happening in a specific file.&lt;/p&gt;

&lt;p&gt;Number 4 and 5 are how to make your code a bit better with a bit more work on your end.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. The Add Documentation feature
&lt;/h1&gt;

&lt;p&gt;Sometimes you can &lt;code&gt;Option + Click&lt;/code&gt; on a property name and get information about it. Especially when it's a class or function provided by Apple. Well, you can also do this for your code!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Command + click&lt;/code&gt; on the class, struct, or method and choose add documentation. You'll then be given a template to fill in! The best part is if you do this on a method or function that requires a property then it also gives those as well.&lt;/p&gt;

&lt;p&gt;Let's see this in action by checking out OSCHelper. In here you can see at &lt;code&gt;selectProgrammingObject&lt;/code&gt; there isn't any documentation about what this does or when to use it, so I'm going to change that.&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Command click on the funciton name&lt;/li&gt;
&lt;li&gt;Choose Add Documentation&lt;/li&gt;
&lt;li&gt;Fill in the documentation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now, when I option click on the name, I get the summary and what parameters are needed.&lt;/p&gt;

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

&lt;p&gt;Tip number 5 is another option inside that menu and it's the rename feature.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. The Rename feature
&lt;/h1&gt;

&lt;p&gt;I'm sure we've all been there when a variable is declared, but then the name doesn't fit what you are using it for but then it's been used in 8 million different places. Well that's where the Rename feature comes in handy. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;Command + click&lt;/code&gt; on a property name gives some options no matter where you are. It will also go through the project and completely rename all instances of that property, method, or function.&lt;/p&gt;

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

&lt;p&gt;It's a very useful tool that saves me a lot of time and headache.&lt;/p&gt;

&lt;p&gt;Hopefully these 5 tips help you out in your app development! If you found these tips useful make sure to hit the like button and drop a comment with some tips I missed! Thanks for watching! &lt;/p&gt;




&lt;p&gt;If you want to chat with me and point out some tips and tricks, you can watch me work on iOS apps on Tuesday, Thursday, and Friday mornings at &lt;a href="http://twitch.tv/maeganwilson_" rel="noopener noreferrer"&gt;twitch.tv/maeganwilson_&lt;/a&gt; Make sure to drop by and say hi!&lt;/p&gt;

</description>
      <category>swift</category>
      <category>xcode</category>
      <category>ios</category>
    </item>
    <item>
      <title>How to use Notion as an Issue Tracker</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Wed, 27 Jan 2021 14:19:19 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/how-to-use-notion-as-an-issue-tracker-3oab</link>
      <guid>https://dev.to/maeganwilson_/how-to-use-notion-as-an-issue-tracker-3oab</guid>
      <description>&lt;p&gt;First off, this is a video on YouTube. If you like it and watch it, please head over to YouTube and give it a like.&lt;/p&gt;

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

&lt;p&gt;Alright, if you're reading this it's because you want to read the points in the video. Here are the two major topics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is Notion&lt;/li&gt;
&lt;li&gt;Why I use Notion as an issue tracker&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What is Notion
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.notion.so/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqyw9qg0ddu10nr5nc5ms.png" alt="Notion.so website before logging in"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notion brands itself as an "All-in-one Workspace" and as a major tool for teams. It's a web app that can be used to create a "wiki" style document. You can add links to other notion documents, photos, and website links as well. YouTube videos can also be put in to the documents, which is pretty neat.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why I use Notion as an issue tracker
&lt;/h1&gt;

&lt;p&gt;The main reason I like to use Notion as an issue tracker is the database feature. Another reason I like using Notion is that I can share a page quickly to the web.&lt;/p&gt;

&lt;h2&gt;
  
  
  Databases
&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4am0a59wbxdod44eb849.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4am0a59wbxdod44eb849.png" alt="My issue tracking for iHog"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This database can be setup with whatever properties you want. The choices I use are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text: Enter whatever text you want&lt;/li&gt;
&lt;li&gt;Number: I use this to associate to a GitHub issue&lt;/li&gt;
&lt;li&gt;Multi-select: Think of these as chain-able tags&lt;/li&gt;
&lt;li&gt;Select: Think of these as non-chain-able tags&lt;/li&gt;
&lt;li&gt;Links: Put a link to anywhere on the internet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another bonus to the database feature is that you can have different views to present the data.&lt;/p&gt;

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

&lt;p&gt;Once you create a view, then you can sort and filter the data based on the databse properties. I have a property called progress and a Board view that has the columns based on the progress. The progress is a select since an issue can only be in one state at a time.&lt;/p&gt;

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

&lt;p&gt;Then utilizing filters and sorts you can quickly see specific issues for a release or any other property in the database.&lt;/p&gt;

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

&lt;p&gt;These filters and sorting capabilities make Notion such a great tool for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sharing a web page
&lt;/h2&gt;

&lt;p&gt;You can share a web page with the internet if you need to. Anyone can access it and click on links. This makes it quite easy to make a one page website and share to other places.&lt;/p&gt;

&lt;p&gt;Another nice thing is on that page, you can add a linked database that can be filtered and used in the page. In the image below, I have 2 views of the issue tracker. You can click on the image and see it live.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.notion.so/ihog/v2021-1-425b31a2f2684b1ba356ecf8dfbb7be4" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq5wfxtz782x7cr2eschq.png" alt="Release notes page"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;That's what I have about Notion!&lt;/p&gt;

&lt;h1&gt;
  
  
  Links as a thanks for reading!
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.notion.so/" rel="noopener noreferrer"&gt;Notion website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.notion.so/parttimedeveloper/51efdc27322e42e88df74ce6722bacba?v=fd70df00e81c4b19b3dab9b086e28ca6" rel="noopener noreferrer"&gt;Template of my issue tracker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;I work on iHog live every Tuesday and Thursday at 6:45am CST on my Twitch. Please go check it out and join me for a stream! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitch.tv/maeganwilson_" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4si8aq4fh7rtdr8ehvr5.png" alt="Twitch https://twitch.tv/maeganwilson_"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've created a discord for to discuss development topics, technology, and other random things! If you want to join click the image below!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://discord.gg/HmGYbNHmun" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgtm1w4zfv62datsjoynw.png" alt="Discord invite https://discord.gg/HmGYbNHmun"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>developertips</category>
    </item>
    <item>
      <title>5 VS Code Extensions You Need to be Using in 2021</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Wed, 06 Jan 2021 12:57:34 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/5-vs-code-extensions-you-need-to-be-using-in-2021-4jkp</link>
      <guid>https://dev.to/maeganwilson_/5-vs-code-extensions-you-need-to-be-using-in-2021-4jkp</guid>
      <description>&lt;p&gt;In this post, I''m going to cover my favorite VS Code extensions, the settings I use, and some other things I like about the text editor!&lt;/p&gt;

&lt;p&gt;If you'd rather watch than read the post, then here is the YouTube Video.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/YX8U3d3Eb04"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;What do I use VS Code for? Well, I use it for web development and notes if needed but mainly for web development in React or Vue depending on what I need to accomplish. I also like it for writing in mark down due to it's Mark down preview&lt;/p&gt;

&lt;p&gt;What also makes VS Code my favorite Text Editor are the extensions and here are my favorites! You can quickly get all the extensions in this post from my &lt;a href="https://kit.co/maeganwilson_/vs-code-extensions" rel="noopener noreferrer"&gt;kit.co page&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Path Intellisense
&lt;/h1&gt;

&lt;p&gt;Path intellisense is going to auto complete file names for you. This is super useful when trying to link to a custom component or a CSS style sheet in an HTLM file.&lt;/p&gt;

&lt;h1&gt;
  
  
  2. Better Comments
&lt;/h1&gt;

&lt;p&gt;Now, I like this extension because I love leaving meaningful comments in my code for me or my team mates. It's helpful to know what I was thinking at the time or to know why I chose to pass a specific parameter and Better Comments makes that easy to see and distinguish. It has custom formatting for important notes, questions, todos, and parameters.&lt;/p&gt;

&lt;p&gt;Some languages it supports are HTML, CSS, JavaScript which includes React, Swift, Go and so much more.&lt;/p&gt;

&lt;p&gt;So, the jist of better comments is to make the code comments be easier to read at a glance.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Bracket Pair Colorizer 2
&lt;/h1&gt;

&lt;p&gt;This extension highlights nested bracket pairs by giving them different colors. It also outlines the section of the code in the editor.&lt;/p&gt;

&lt;p&gt;This really helps read-ability and edit-ability of the code since brackets can get nested quite fast in React.&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Prettier
&lt;/h1&gt;

&lt;p&gt;The Prettier extension helps code look better and be more consistent. It keeps me coding in the same style all the time or for specific directories. Another reason I love using formatters because it helps me realize where I make errors. If the code doesn't format, then there is an issue with my code some where.&lt;/p&gt;

&lt;h1&gt;
  
  
  5. ES7 React/Redux/GraphQL/React-Native snippets
&lt;/h1&gt;

&lt;p&gt;This snippet example is super duper useful. It can save some typing and cause less typos. You type the abbreviation, then hit &lt;code&gt;Enter&lt;/code&gt; and then you have the full thing. Here are my favorite snippets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;imr&lt;/code&gt; - Imports react&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;exp&lt;/code&gt; - Exports default&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;imd&lt;/code&gt; - Import {destructed module} from 'module'&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;nfn&lt;/code&gt; - Creates a constant function&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;clg&lt;/code&gt; - Console.log&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't that hard to type out, but it helps me be consistent.&lt;/p&gt;

&lt;h1&gt;
  
  
  My Aesthetics
&lt;/h1&gt;

&lt;p&gt;Here's a list of my fonts, icons, and themes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fonts
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Operator Mono - this stays the same between Xcode and VS Code.&lt;/li&gt;
&lt;li&gt;Fira Code - Occasionally I do use Fira Code if I really want ligatures.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Themes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Xcode Default Dark - This is my go to theme so VS Code looks similar to Xcode
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5fozowyb7ms88j4ima1k.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Cobalt2 - This is my "I'm feeling crazy and need a change real quick" theme
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F045w4m5q0cv5ii8n7ujj.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Icons
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Material Icon Theme - Gives cool icon&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get all the extensions from my &lt;a href="https://kit.co/maeganwilson_/vs-code-extensions" rel="noopener noreferrer"&gt;kit.co page&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;Thanks for reading or watching the video! If you enjoyed this post, then share it please!&lt;br&gt;
Feel free to stop by my Twitch stream on Tuesdays and Thursdays at 6:45am CST and say hi! &lt;a href="https://twitch.tv/maeganwilson_" rel="noopener noreferrer"&gt;@maeganwilson_&lt;/a&gt;&lt;br&gt;
You can also follow me no Instagram &lt;a href="https://www.instagram.com/parttimedeveloper_/" rel="noopener noreferrer"&gt;@parttimedeveloper_&lt;/a&gt; and subscribe to my YouTube channel &lt;a href="https://www.youtube.com/channel/UC6na4Lq0ozPBjHD1X42szEQ" rel="noopener noreferrer"&gt;parttimedeveloper_&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>2/100 Days of SwiftUI</title>
      <dc:creator>Maegan Wilson</dc:creator>
      <pubDate>Mon, 04 Jan 2021 13:43:19 +0000</pubDate>
      <link>https://dev.to/maeganwilson_/2-100-days-of-swiftui-1ij8</link>
      <guid>https://dev.to/maeganwilson_/2-100-days-of-swiftui-1ij8</guid>
      <description>&lt;p&gt;Here are day 2's notes! Have fun and if you have any questions or notice there's an issue, let me know on &lt;a href="https://twitter.com/maeganwilson_"&gt;Twitter&lt;/a&gt;, &lt;a href="https://instagram.com/parttimedeveloper_"&gt;Instagram&lt;/a&gt;, or in the comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Today's Topics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arrays&lt;/li&gt;
&lt;li&gt;Tuples&lt;/li&gt;
&lt;li&gt;Dictionaries&lt;/li&gt;
&lt;li&gt;Sets&lt;/li&gt;
&lt;li&gt;Enums&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Arrays
&lt;/h1&gt;

&lt;p&gt;Arrays are collections of data in a specific order and are stored as a single value.&lt;/p&gt;

&lt;p&gt;Example of an Array with my pets&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// values for array&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;thorgi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Thorgi Wilson"&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;dobby&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Dobby Wilson"&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;cairo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Cairo Wilson"&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;sydney&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Sydney Wilson"&lt;/span&gt;

&lt;span class="c1"&gt;// creates the array&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;pets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;thorgi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dobby&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cairo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sydney&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To retrieve a value from the array, the position of the value is needed. Note, the positions for array start at 0.&lt;/p&gt;

&lt;p&gt;Example: get the value of &lt;code&gt;dobby&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;pets&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;// Dobby Wilson&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If trying to get a value from a position that doesn't exist, then Swift will crash.&lt;/p&gt;

&lt;p&gt;If wanting to give a type to the array, put the type annotation in brackets. The image below shows that calling &lt;code&gt;pets[6]&lt;/code&gt; gives an index out of range error since there are only 4 positions in &lt;code&gt;pets&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7ImKevvd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/maeganwilson/100DaysOfSwiftui/master/images/002_array_1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7ImKevvd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/maeganwilson/100DaysOfSwiftui/master/images/002_array_1.png" alt="Index out of range error" width="880" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Sets
&lt;/h1&gt;

&lt;p&gt;Similar to arrays but have two main differences&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Items are &lt;strong&gt;not&lt;/strong&gt; stored in an order and may be returned in a different order&lt;/li&gt;
&lt;li&gt;All items must be unique&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Create a set by using &lt;code&gt;Set()&lt;/code&gt; and put a collection of items inside it.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;westNHLTeams&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;"Ducks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Blackhawks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Coyotes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Avalanche"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Flames"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Stars"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Oilers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Wild"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Kings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Predators"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Sharks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Blues"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Canucks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Jets"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Golden Knights"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you create a set with duplicate items, then the duplicates get ignored.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="c1"&gt;// flames and avalanche are duplicated&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;westNHLTwo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s"&gt;"Ducks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Blackhawks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Coyotes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Avalanche"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Avalanche"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Flames"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Flames"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Stars"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Oilers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Wild"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Kings"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Predators"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Sharks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Blues"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Canucks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Jets"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Golden Knights"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;westNHLTeams&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// ["Blackhawks", "Predators", "Blues", "Stars", "Kings",&lt;/span&gt;
&lt;span class="c1"&gt;// "Avalanche", "Golden Knights", "Coyotes", "Flames",&lt;/span&gt;
&lt;span class="c1"&gt;// "Sharks", "Oilers", "Wild", "Ducks", "Canucks", "Jets"]&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;westNHLTeamsTwo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// ["Blackhawks", "Predators", "Blues", "Stars", "Kings",&lt;/span&gt;
&lt;span class="c1"&gt;// "Avalanche", "Golden Knights", "Coyotes", "Flames",&lt;/span&gt;
&lt;span class="c1"&gt;// "Sharks", "Oilers", "Wild", "Ducks", "Canucks", "Jets"]&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Notice in the two print statements the outputs are the same.&lt;/p&gt;

&lt;h1&gt;
  
  
  Tuples
&lt;/h1&gt;

&lt;p&gt;Store a several values in one value. Tuples are different from arrays because&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tuples are fixed in size&lt;/li&gt;
&lt;li&gt;The type of items in a tuple cannot be changed&lt;/li&gt;
&lt;li&gt;Tuple items can be accessed from name or numerical positions. Swift will not let you read numbers or names that don't exist.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;first&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Taylor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;second&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Swift"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tyQhrFqs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/maeganwilson/100DaysOfSwiftui/blob/master/images/002_tupple_2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tyQhrFqs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/maeganwilson/100DaysOfSwiftui/blob/master/images/002_tupple_2.png" alt="Tuple examles" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  When to use each?
&lt;/h3&gt;

&lt;p&gt;Arrays, Sets, and Tpples are a collection of data. Each of them has a specific use case.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tuples should be used when each item has a precise position or name&lt;/li&gt;
&lt;li&gt;Sets should be used when every value in the collection is unique&lt;/li&gt;
&lt;li&gt;Arrays should be use when order matters and or you need duplicates

&lt;ul&gt;
&lt;li&gt;Arrays are also the most common data type&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Dictionaries
&lt;/h1&gt;

&lt;p&gt;Collections of calues like arrays.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;captains&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s"&gt;"penguins"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Crosby"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"wild"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Spurgeon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"sharks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Couture"&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a key doesn't exist, then you get back nil.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="n"&gt;captains&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"penguins"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;// Crosby&lt;/span&gt;
&lt;span class="n"&gt;captains&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"ducks"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;// nil&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding a default value to ducks could be easier to know what your return type will be.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;captains&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="s"&gt;"penguins"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Crosby"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"wild"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Spurgeon"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"sharks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"Couture"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s"&gt;"ducks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"unknown"&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;captains&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"penguins"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;// Crosby&lt;/span&gt;
&lt;span class="n"&gt;captains&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"ducks"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;// unknown&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Empty Collections
&lt;/h1&gt;

&lt;p&gt;Empty collections can be made by providing type annotations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;emptyArray&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;emptyDictionary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Int&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;emptySet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Set&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Enumerations (enums)
&lt;/h1&gt;

&lt;p&gt;Define related values in a way that is easier to use.&lt;br&gt;
Can keep you from using different strings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;result1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"failure"&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;result2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"failed"&lt;/span&gt;

&lt;span class="kd"&gt;enum&lt;/span&gt; &lt;span class="kt"&gt;Result&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;failure&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;success&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;result3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;failure&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;result1&lt;/code&gt;, &lt;code&gt;result2&lt;/code&gt;, &lt;code&gt;result3&lt;/code&gt; are failures but because 1 and 2 are different strings it would be hard to check if it failed. By using the enum for &lt;code&gt;result3&lt;/code&gt;, we can always get the same thing back.&lt;/p&gt;

&lt;p&gt;Associated values can also have values attached to each case. This allows for cases to be more specific.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;enum&lt;/span&gt; &lt;span class="kt"&gt;AppleProducts&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nf"&gt;iPhone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;generation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="nf"&gt;laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;maegansPhone&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;AppleProducts&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;iPhone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;generation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"12 Pro Max"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;katiesLaptop&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;AppleProducts&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;"MacBook Pro"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Enums can have raw values also which allows them to have more meaning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;enum&lt;/span&gt; &lt;span class="kt"&gt;Planet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;mercury&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;venus&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;earth&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;mars&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift will automatically give values starting at 0 because the enum type is &lt;code&gt;Int&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Planet&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;earth&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rawValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// 2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If I assign one or more cases a specific value, Swift will generate the rest.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="kd"&gt;enum&lt;/span&gt; &lt;span class="kt"&gt;Planet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;Int&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;mercury&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;venus&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;earth&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;mars&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;Planet&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;earth&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rawValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// 3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Thanks for reading! Tune back in tomorrow for Day 3!&lt;/p&gt;

&lt;p&gt;Make sure to follow my Instagram &lt;a href="https://instagram.com/parttimedeveloper_"&gt;@parttimedeveloper_&lt;/a&gt; for more development tips, tricks, advice, and updates on my own coding journey!&lt;/p&gt;

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