<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Patrick Geiger</title>
    <description>The latest articles on Forem by Patrick Geiger (@spacesnaill).</description>
    <link>https://forem.com/spacesnaill</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%2F336408%2F07ecf6d0-ce97-4ae0-a5b7-4c0eafa33bdf.jpg</url>
      <title>Forem: Patrick Geiger</title>
      <link>https://forem.com/spacesnaill</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/spacesnaill"/>
    <language>en</language>
    <item>
      <title>React and TypeScript Testing: Mocking Functions with Jest</title>
      <dc:creator>Patrick Geiger</dc:creator>
      <pubDate>Tue, 07 Apr 2020 13:36:23 +0000</pubDate>
      <link>https://forem.com/spacesnaill/react-and-typescript-testing-mocking-functions-with-jest-1pn8</link>
      <guid>https://forem.com/spacesnaill/react-and-typescript-testing-mocking-functions-with-jest-1pn8</guid>
      <description>&lt;p&gt;Hello, in this article we're going to talk about mocking functions with Jest and TypeScript in React. Specifically, we're going to talk about how to mock a function that you pass into a component using Jest. &lt;/p&gt;

&lt;p&gt;Now mocking functions with Jest, in general, is pretty straightforward.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const mockFunction = jest.fn();&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That's all you really need to get started using a mock function that you can then monitor. For example, if pushing a button should call a function your assertion, after clicking the button, can be the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;expect(mockFunction).toHaveBeenCalledTimes(1);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is, of course, for functions that are being passed into your component. So, if using Enzyme, your code may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mockFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;MyComponent&lt;/span&gt; &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mockFunction&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This works fine for the most part. But this does type things with &lt;code&gt;any&lt;/code&gt;, plus what do you do if you need create a variable but don't want to initialize it immediately? You have to type it of course, but what typing do you use? Consider the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;mockFunction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Mock&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;any&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;p&gt;This would work fine in the following case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;mockFunction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Mock&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kr"&gt;any&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;wrapper&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ReactWrapper&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;beforeEach&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;wrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;MyComponent&lt;/span&gt; &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mockFunction&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In some cases, this is about as far as you need to go. After all, the function itself is fake anyway. Typing it further may not be necessary depending on your use case. But it'd be good form to make sure it's properly typed and you're not using any. You may even need it to be typed because it provides useful information, or you get a linting error because of it. So how would we go about doing that?&lt;/p&gt;

&lt;p&gt;It's actually relatively straightforward. I'll break it down:&lt;/p&gt;

&lt;p&gt;Looking at &lt;code&gt;jest.mock&amp;lt;any, any&amp;gt;&lt;/code&gt;, the &lt;code&gt;jest.mock&lt;/code&gt; part stays. As for the &lt;code&gt;&amp;lt;any, any&amp;gt;&lt;/code&gt; it's helpful to look at it as &lt;code&gt;&amp;lt;return, input&amp;gt;&lt;/code&gt;. The first value is what you plan on returning, while the second value is actually an array of the inputs. So what if we take in a string and return nothing?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let mockFunction: jest.Mock&amp;lt;void, [ string ]&amp;gt;;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It's simple once you know what goes where. Let's see it in action when it comes to assignment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;mockFunction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Mock&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;mockFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;myString&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&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;In the above case we threw in a return value. Sometimes it's necessary to mock a return when you're testing. After all, you don't really care how the function got the return. These unit tests are for this component in particular, and whatever function is being passed in, in the actual code, should have its own unit tests. So you just need your return so you can move on.&lt;/p&gt;

&lt;p&gt;Let's take a look at a more complicated example, this time with promises.&lt;/p&gt;

&lt;p&gt;Consider that you have a voting component. The component itself consists of two buttons that allow the user to like or dislike something. You need to persist this on the back end as well. One solution to this is to pass a function into the voting component that talks to the back end in some way. There may be better solutions, but for the sake of this example we're going to go with this one.&lt;/p&gt;

&lt;p&gt;The exact implementation isn't important. Let's just say the function that talks to your back end takes in an string id and a boolean value, and returns a Promise and this function is passed in through an &lt;code&gt;onChange&lt;/code&gt; prop on the component. That &lt;code&gt;onChange&lt;/code&gt; prop is then called when one of the buttons are clicked.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;IResponse&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SUCCESS&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ERROR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;mockFunction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Mock&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;IResponse&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;wrapper&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ReactWrapper&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;beforeEach&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;mockFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;jest&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;vote&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SUCCESS&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nx"&gt;wrapper&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Votes&lt;/span&gt; &lt;span class="nx"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mockFunction&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="se"&gt;)&lt;/span&gt;&lt;span class="err"&gt;;
&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Of course your &lt;code&gt;IResponse&lt;/code&gt; should probably be in its own typescript file. Regardless, this is the basic structure you would use for something like this. If you wanted to test your error handling when receiving an error from the backend, you can just switch the &lt;code&gt;status&lt;/code&gt; over to "ERROR". And if you wanted to test the promise failing entirely, you can use &lt;code&gt;reject&lt;/code&gt; instead of &lt;code&gt;resolve&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Hopefully this helped somebody out there.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>jest</category>
      <category>testing</category>
      <category>react</category>
    </item>
    <item>
      <title>React Unit Testing: Async Act</title>
      <dc:creator>Patrick Geiger</dc:creator>
      <pubDate>Fri, 20 Mar 2020 17:37:07 +0000</pubDate>
      <link>https://forem.com/spacesnaill/react-unit-testing-async-act-2m77</link>
      <guid>https://forem.com/spacesnaill/react-unit-testing-async-act-2m77</guid>
      <description>&lt;p&gt;This is more or less for my own benefit as much as other people. Since starting my newest job last September, I've been knee deep in figuring out React testing with Enzyme and Jest. I'm not saying what I've got is the best way of doing things, but it works well enough.&lt;/p&gt;

&lt;p&gt;So this will be the first of a series of different short articles where I describe methods of unit testing React.&lt;/p&gt;

&lt;p&gt;We'll start with the async act. Act itself is rolled into a lot of Enzyme functions already, for example &lt;code&gt;mount&lt;/code&gt; and &lt;code&gt;simulate&lt;/code&gt;. So for the most part it's abstracted out if you use Enzyme.&lt;/p&gt;

&lt;p&gt;But Enzyme just rolls in &lt;code&gt;act&lt;/code&gt;, which is required if state changes happen. Without encompassing something that changes state in your component in &lt;code&gt;act&lt;/code&gt; in a unit test, it throws an error. There are situations where you need to wait until the state change is entirely finished before continuing on. This is often found when using &lt;code&gt;useEffect&lt;/code&gt; and setting state in that, especially if it sets the state that's required for the rest of the component. If you start looking at the component before &lt;code&gt;useEffect&lt;/code&gt; has run its course, you might run into issues with things not looking how you'd expect them to.&lt;/p&gt;

&lt;p&gt;This is where async act comes in.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;mount&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;enzyme&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;act&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-dom/test-utils&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;MyComponent&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./MyComponent&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;beforeEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;act&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;wrap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;mount&lt;/span&gt;&lt;span class="p"&gt;(&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;MyComponent&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="nx"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;update&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;Let's pretend that &lt;code&gt;MyComponent&lt;/code&gt; has a useEffect that sets some state. If you just use mount that state may not be set properly. On the other hand, if you use an async act like above? It will wait until the useEffect has finished running. &lt;/p&gt;

&lt;p&gt;Make sure to call &lt;code&gt;.update()&lt;/code&gt; as well so the React wrapper updates.&lt;/p&gt;

&lt;p&gt;This was a major pain point for us where useEffects would not run as we expected them to. The &lt;code&gt;async act&lt;/code&gt; solved a lot of these issues, and we didn't even know it existed until we updated our version of React. So I guess that's a good lesson for keeping up with the updates for the tools you use!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>testing</category>
    </item>
    <item>
      <title>Udacity Full-Stack Nanodegree Journey</title>
      <dc:creator>Patrick Geiger</dc:creator>
      <pubDate>Tue, 25 Feb 2020 20:55:56 +0000</pubDate>
      <link>https://forem.com/spacesnaill/udacity-full-stack-nanodegree-journey-11b8</link>
      <guid>https://forem.com/spacesnaill/udacity-full-stack-nanodegree-journey-11b8</guid>
      <description>&lt;p&gt;Hey, this is my first post. I'm sure I'll post about other things, but I thought a great way to start on this platform is to document my journey through Udacity's Full-Stack Nanodegree.&lt;/p&gt;

&lt;p&gt;I'd like to preface all of this by saying I have CS degree and some experience in the software engineering already. Currently, I do a lot of front end work in TypeScript and React at my job with some back end JavaScript work thrown in so I'm not a beginner. With that said, I do want to expand my skill set and learn more about the back end, as I think that's where I'm weakest.&lt;/p&gt;

&lt;p&gt;So for the foreseeable future I'll be documenting what I learn from the Nanodegree, my work on the projects in the Nanodegree, and my general thoughts on the structure of it all. I haven't decided if I'm going to do an update once every week or every two weeks, but I'm sure I'll figure that out as we go.&lt;/p&gt;

&lt;p&gt;Looks like the first project is some sort of CRUD application with the purpose of "connecting musicians with venues" and it seems pretty straightforward. Here's the tech stack for it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.python.org/"&gt;Python 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flask.palletsprojects.com/en/1.1.x/#"&gt;Flask&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.postgresql.org/"&gt;PostgresSQL&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pypi.org/project/psycopg2/"&gt;psycopg2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sqlalchemy.org/"&gt;SQLAlchemy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flask-sqlalchemy.palletsprojects.com/en/2.x/#"&gt;Flask-SQLAlchemy&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Out of the above, I've worked with Python 3, PostgresSQL, and psycopg2. I sadly haven't done anything with Flask in the past, so the project should be a good learning experience. I briefly dabbled with Django, though.&lt;/p&gt;

&lt;p&gt;I look forward to learning more, and hopefully posting more too. I'm not entirely sure if I'm just going to offer snippets of my journey or do full recaps at regular intervals. We'll see.&lt;/p&gt;

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