<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Katrina Garloff on Medium]]></title>
        <description><![CDATA[Stories by Katrina Garloff on Medium]]></description>
        <link>https://medium.com/@katrinagarloff?source=rss-9b97a8e11e2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*41lcBDUZMTGYx1OR</url>
            <title>Stories by Katrina Garloff on Medium</title>
            <link>https://medium.com/@katrinagarloff?source=rss-9b97a8e11e2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 07:47:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@katrinagarloff/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why You Should Hire a Barista Career Changer]]></title>
            <link>https://medium.com/@katrinagarloff/why-you-should-hire-a-barista-career-changer-53520a4b41cf?source=rss-9b97a8e11e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/53520a4b41cf</guid>
            <category><![CDATA[coffee]]></category>
            <dc:creator><![CDATA[Katrina Garloff]]></dc:creator>
            <pubDate>Sun, 28 Oct 2018 21:05:29 GMT</pubDate>
            <atom:updated>2018-10-28T22:37:39.753Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fgd4lWZaO0pZQJ-NLxYTAw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sabrituzcu">Sabri Tuzcu</a></figcaption></figure><p>Full transparency I am a former barista and I am a career changer. This blog is hopefully less so about myself and more so about the awesome humans I have worked with during my barista career. Often times it can be hard for baristas to transition out of retail because hiring managers often passover the candidate’s transferable skills. While hard skills may not have the desired relevancy, baristas have RIDICULOUS soft skills. You would be hard pressed to find another industry churning out more socially evolved candidates. Here’s why.</p><h3>1. Time Management</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iXYQlZuoWexOKo-ev6uY5A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@andrewtneel">Andrew Neel</a></figcaption></figure><p>Any barista who has held their job for an extended period of time has incredible time management skills. Many cafe managers will fire baristas for being just 5 minutes late to the start of their shift just a few times. Many cafes open their doors sometime between 5am-7am, which means opening shifts start between 4:30am-6:30am. A good barista may be confused by what “on-time” can mean in salary environments. Be at work at 9am does not mean 9:15 to a barista.</p><p>Since baristas are paid hourly, and most coffee shops have tight budgets where labor hours are concerned, a barista will be milked for every ounce of productivity at any given moment (“if you’ve got time to lean, you’ve got time to clean.”) A cafe will be often understaffed and a barista will have to manage assisting customers quickly, while balancing closing down a cafe for the night. Imagine having to clean up your entire apartment to the standard of “sparkling” clean while people streamed in, asking you to make them coffee. Now do it in an hour. That’s time management.</p><h3>2. Communication Skills</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*gqNeAFRxSV0RaiSLNAHE9Q.jpeg" /><figcaption>Photo by rawpixel via unsplash.com</figcaption></figure><p>First off: baristas have incredible calm and patience during highly stressful discussions. They have a lot of practice holding their tongue while others fly off the handle. Another fireable offense is to say anything inflammatory while a customer is quite literally yelling in your face. On top of this, you have to find some way of calming them down and ideally making them feel good enough that when they walk out the door that they actually want to return to a place that caused them to fly into a rage. Yikes.</p><p>Baristas also learn how to communicate effectively and quickly. There’s no time for indirect talk during a rush, so a good barista must quickly learn how to communicate their needs to their coworkers on the fly from across the room as well as field requests from others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*NtmJBkRO79k7OkFJxT8oSQ.jpeg" /><figcaption>Photo by Nathan Dumlao via unsplash.com</figcaption></figure><h3>3. Multitasking</h3><p>Any scientist who tells you that multitasking is physically impossible for the brain or doesn’t exist has never succeeded as a barista. There is no other way to explain the crazy amount of tasks that a barista can complete simultaneously. And well. Maybe you have to see it first hand to believe, and perhaps scientists should make some studies on baristas before we rule out the concept of effective multitasking completely. A barista can remember multiple drink orders, make a drink, clean a counter, take another drink order, and carry on small talk about a customers day all at the same time. A good barista can do this without breaking sweat with a big phony smile pasted on their face. In the middle of doing these 5 activities, a barista will be thrown new unexpected challenges, such as remaking a drink or cleaning up a spilt drink, and we still deny the existence of effective multitasking? They defy science.</p><h3>4. Fearlessness</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*romBc5M82cep2hA7vgbRhQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@saltnstreets">Alesia Kazantceva</a></figcaption></figure><p>A barista is not afraid to get dirty. They do not turn their nose up at mopping the floor or cleaning a public restroom. A barista works with the prospect of physical injury. They continuously handle boiling hot liquids and steaming hot heavy machinery in a fast paced environment. A barista faces physical challenges. They can walk the equivalent of 6 miles or more in a period of 8 hours on shift and stow away heavy orders of liquids and ceramics on high and low shelving. Working as barista requires a certain amount of fearlessness. A barista must face physical and mental challenges without hesitation. They are not afraid to get their hands dirty — literally! Often times a barista must fix something technical or mechanical themselves without waiting for someone else to do it for them. A barista gets in there and gets the job done.</p><h3>Wrapping Up</h3><p>I encourage you to take an extra look at your barista applicants. If you see they’ve effectively held a barista position for an extended period of time, see this as no mere feat. Next time you order your coffee, I encourage you to find a non-invasive way of observing a barista while you wait for your order. See the interactions they carry out with customers and notice the other activities they complete in a timely manner. You may be surprised to notice how much is going on. A talented barista will never let you see them sweat.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53520a4b41cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Chai with Mocha Tests]]></title>
            <link>https://medium.com/@katrinagarloff/using-chai-with-mocha-tests-9a5a2f2a7b63?source=rss-9b97a8e11e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a5a2f2a7b63</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[mocha]]></category>
            <category><![CDATA[chai]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Katrina Garloff]]></dc:creator>
            <pubDate>Wed, 17 Oct 2018 21:26:29 GMT</pubDate>
            <atom:updated>2018-10-17T21:26:29.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*wO1Tx2H04EkGqy_wTpcKfw.png" /></figure><p>We’re going to zoom through setup with this one. If you want a more step-by-step guide checkout my first blog on <a href="https://medium.com/@katrinagarloff/writing-your-first-mocha-test-287423aac80f">Writing Your First Mocha Test</a>. In this blog, I want to show you how to use a couple of handy methods from the Chai library which we’ll use to test a JavaScript class.</p><h3>A Quick Setup</h3><p>In your terminal run the commands:</p><pre>mkdir mocha-chai-latte </pre><pre>cd mocha-chai-latte</pre><pre>mkdir test</pre><pre>npm init</pre><pre>npm install mocha chai --save-dev </pre><p>(Note: we are going to create dependencies for mocha and chai with our “- -save-dev” command.)</p><p>Ok now launching into some test writing! Open your project in your preferred text editor. Make a file in the top level of your directory called “Latte.js” then make a file inside of your test directory called “test.js”. Your file structure should look like this:</p><pre>├── node_modules</pre><pre><strong>├── Latte.js</strong></pre><pre><strong>├── test</strong></pre><pre><strong>     └── test.js</strong></pre><pre>├── package-lock.json</pre><pre>├── package.json</pre><h3>Considering Our Goals</h3><p>Alright, so first we come up with our desired behavior. I desire a Latte class that I can use to create a dirty chai latte. Let’s get some basic connecting done in our files and we can write some tests!</p><p>In Latte.js make the framework for the class and export.</p><pre>class Latte {</pre><pre>}</pre><pre>module.exports = Latte;</pre><p>In the test.js file require “Latte” and “chai” and make a grouping for our latte tests:</p><pre>const expect = require(&#39;chai&#39;).<strong>expect</strong>;<br>const Latte = require(&#39;../Latte.js&#39;);</pre><pre>describe(&quot;Latte Creation&quot;) {</pre><pre>}</pre><p>For this example I am going to use the<strong> expect </strong>“assertion style.” From the Chai library you can also use “assert” or “should” which have different syntax. If I run the <em>mocha </em>command on my terminal I should see 0 tests passing because we haven’t written any. However, this should let us know this far we hooked everything up without any errors.</p><p>Ok now I’m going to write out all the initial behaviors I want my latte class to have.</p><pre>describe(&quot;Latte Creation&quot;, function() {</pre><pre><em>describe(</em><strong>&quot;Should be able to create a new latte&quot;</strong><em>, function(){<br>  });</em></pre><pre><em>describe(</em><strong>&quot;A latte should have a milk, base, and optional flavors&quot;</strong><em>, function(){<br>  });</em></pre><pre><em>describe(</em><strong>&quot;A latte should be able to have flavors&quot;</strong><em>, function(){<br>  });</em></pre><pre>});</pre><h3>Writing Our Tests</h3><p>Now let’s test for these behaviors using some cool Chai functionalities. For starters, we’ll a handy keyword from the Chai library called “instanceof” inside of our first describe. We will begin by creating a new latte, using “before” which will execute once before our tests.</p><pre>describe(&quot;Latte Creation&quot;, function() {<br><strong>let basicLatte;</strong></pre><pre><strong>  before(function(){<br>    basicLatte = new Latte();<br>  });</strong></pre><pre>  describe(&quot;Should be able to create a new latte&quot;, function(){<br>    <strong>it(&quot;Should create a new instance of the Latte class&quot;, function() {<br>      expect(basicLatte).to.be.an.instanceof(Latte);<br>    });</strong><br>  });</pre><p>When we run mocha we should see:</p><pre>Latte Creation</pre><pre>Should be able to create a new latte</pre><pre>✓ Should create a new instance of the Latte class</pre><pre>1 passing (7ms)</pre><p>Our test is passing because we have already created our Latte class. This confirms that we are able to make a new instance of the Latte class. Now let’s write some more extensive tests. Ok, I want a latte to be comprised of a milk, a base, and an optional flavor. Let’s create some tests for that.</p><pre>describe(&quot;A latte should have a milk, base, and flavors.&quot;, function(){<br>  <br>    <strong>it(&quot;should have keys of milk, base, and flavors&quot;, function(){<br>      expect(basicLatte).to.have.all.keys(&quot;milk&quot;, &quot;base&quot;, &quot;flavors&quot;);</strong><br>    });</pre><p>The handy “().to.have.all.keys()” will check that an object has all of the keys we give as arguments! And when we run our tests…</p><pre>Latte Creation</pre><pre>Should be able to create a new latte</pre><pre>  ✓ Should create a new instance of the Latte class</pre><pre>A latte should have a milk, base, and flavors.</pre><pre>1) should have keys of milk, base, and flavors</pre><pre>  1 passing (14ms)</pre><pre>  1 failing</pre><pre>1) Latte Creation</pre><pre>  A latte should have a milk, base, and flavors.</pre><pre>should have keys of milk, base, and flavors:</pre><pre>  AssertionError: expected {} to have keys &#39;milk&#39;, &#39;base&#39;, and &#39;flavors&#39;</pre><pre>  + expected - actual</pre><pre>  -[]</pre><pre>  +[</pre><pre>  +  &quot;base&quot;</pre><pre>  +  &quot;flavors&quot;</pre><pre>  +  &quot;milk&quot;</pre><pre>  +]</pre><p>Ok let’s fix them by adding a constructor to our Latte class.</p><pre>class Latte {<br> <strong> constructor(milk, base) {<br>    this.milk = milk;<br>    this.base = base;<br>    this.flavors = [];<br>  }</strong><br>}</pre><p>Now when we run our tests we should get 2 passing! Ok next, let’s test if we can assign actual values to our properties. First we’ll change our “before” slightly:</p><pre>before(function(){<br>    basicLatte = new Latte(<strong>&quot;Whole milk&quot;, &quot;Espresso&quot;</strong>);<br>  });</pre><p>And then add another check:</p><pre>it(&quot;should have keys of milk, base, and flavors&quot;, function(){<br>      expect(basicLatte).to.have.all.keys(&quot;milk&quot;, &quot;base&quot;, &quot;flavors&quot;);<br>    });<br>    <strong>it(&quot;Should have &#39;Whole milk&#39;, &#39;Espresso&#39;, and &#39;flavors&#39; pointing to an empty array.&quot;, function(){<br>      expect(basicLatte).to.deep.equal({milk: &#39;Whole milk&#39;, base: &#39;Espresso&#39;, flavors: []});<br>    });</strong></pre><p>The thing to focus on here is that we could not use “().to.equal” by itself to compare objects, as this would follow “strict” JavaScript comparison (===). The keyword “deep” from Chai gives us the power to compare objects easily without having to check each property individually ourselves.</p><p>When running our tests we should have all passing! Alright the next section, I’m going to give you a big chunk altogether and then we’ll break it down.</p><pre>describe(&quot;Lattes should be able to have flavors&quot;, function(){<br>   <strong> beforeEach(function(){<br>      basicLatte.addFlavor(&quot;Chai&quot;)<br>    });<br>    it(&quot;Should be able to add a flavor to a latte.&quot;, function() {<br>      expect(basicLatte.flavors).to.include(&quot;Chai&quot;);<br>    });</strong><br>  <br>  });</pre><p>Ok first we added a “beforeEach.” This works a little bit differently than “before” because it will execute before every test inside its parent’s scope. Notice that this beforeEach is placed inside of an inner describe. This gives it a different scope just like in any JavaScript code. The “before” where we assigned basicLatte is in the top level of our tests block, so that will still execute before any tests we have, as well as before our newly nested beforeEach where we are attempting to add a flavor.</p><p>Then we used include in our test to check if the array of flavors included our newly add “Chai” flavor.</p><p>When we run our tests we should get an error:</p><pre>TypeError: basicLatte.addFlavor is not a function</pre><p>That’s right! We need to write it in the Latte class:</p><pre>class Latte {<br>  constructor(milk, base) {<br>    this.milk = milk;<br>    this.base = base;<br>    this.flavors = [];<br>  }</pre><pre><strong>addFlavor(flavor) {<br>  this.flavors.push(flavor)<br>}</strong></pre><pre>}</pre><p>And now if we run our tests again we should be all passing!</p><pre>Latte Creation</pre><pre>Should be able to create a new latte</pre><pre>  ✓ Should create a new instance of the Latte class</pre><pre>A latte should have a milk, base, and flavors.</pre><pre>  ✓ should have keys of milk, base, and flavors</pre><pre>  ✓ Should have &#39;Whole milk&#39;, &#39;Espresso&#39;, and flavors pointing to an  empty array.</pre><pre>Lattes should be able to have flavors</pre><pre>  ✓ Should be able to add a flavor to a latte.</pre><pre>4 passing (11ms)</pre><h3>That’s It!</h3><p>I hope this was a helpful introduction to utilizing some Chai elements in your Mocha tests. There are a bunch more you can use! You can check out the documentation <a href="https://www.chaijs.com/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a5a2f2a7b63" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing Your First Mocha Test]]></title>
            <link>https://medium.com/@katrinagarloff/writing-your-first-mocha-test-287423aac80f?source=rss-9b97a8e11e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/287423aac80f</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[mocha]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Katrina Garloff]]></dc:creator>
            <pubDate>Sun, 14 Oct 2018 21:48:50 GMT</pubDate>
            <atom:updated>2018-10-17T21:49:42.694Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*1C93UafUupt2TI-FpqFHoA.png" /></figure><p>This will be a step-by-step guide for setting up an npm project with Mocha and running your first test. If you’d like to skip setup you can go straight to the <a href="https://medium.com/p/287423aac80f#b129">code</a>.</p><p>Requirements: some basic knowledge of javascript, terminal and Node.js installed.</p><h3>Setup</h3><p>Let’s install mocha globally using the terminal:</p><pre>npm install -g mocha</pre><p>Then make a new directory:</p><pre>mkdir my-first-tests</pre><p>Switch into the directory:</p><pre>cd my-first-tests</pre><p>Initialize our project with npm. This will create an package.json file which will specify what packages are needed for the project.</p><pre>npm init</pre><p>We will now be guided through the package.json setup. You can accept default settings or enter info for the next few areas. Until you get to “test command.” This is important! Enter mocha:</p><pre>test command: mocha </pre><p>After “test command” you can accept defaults or enter in your desired info.</p><p>Great! For our last setup step in the terminal we need to create a test directory. When we run the mocha command to run tests it will be looking for this directory.</p><pre>mkdir test</pre><p>Now you can open up your project with your text editor of choice. I am using Atom so I will run:</p><pre>atom . </pre><p>Inside of our text editor let’s create a test.js file inside our test directory.</p><p>We should now have these files:</p><pre>├── package.json</pre><pre>└── test</pre><pre>   └── test.js</pre><p>Now when we run our tests we should see this:</p><pre>mocha</pre><pre>0 passing (3ms)</pre><p>We have 0 passing because we don’t have any tests yet, but this means we’ve set everything up correctly! Let’s get to the actual test writing!</p><h3>Let’s Get to the Code</h3><p>First off, in order to use the assertion library from Mocha, we’re going to require it at the top of our test.js file.</p><pre>let assert = require(&quot;assert&quot;);</pre><p>In test driven development we want to think up desired behaviors for our functions before we start writing the actual function. Using this flow we are going to write our tests first.</p><p>Suppose I want to create a simple function. This function will take in a name and return “Hello [name]”. What are some ways we can test to see if the function is acting correctly? Here is my first test case in plain English:</p><p>When given the name “Amy”, return “Hello Amy”.</p><p>Now let’s write out a corresponding mocha test. First, we want to create grouping for all the tests we will write for this function. For this example, we will give the group the name of our function.</p><pre>describe(&quot;sayHello&quot;, function(){<br>});</pre><p>All we are doing is logically grouping our code by creating a scope to put our tests in. It will also make our tests easier to read, especially as our projects grow.</p><p>Now let’s set expectations for the result of our test.</p><pre>describe(&quot;sayHello&quot;, function(){</pre><pre><strong><em>  it(&quot;should return &#39;Hello Amy&#39;&quot;, function() {<br>  });</em></strong></pre><pre>}); </pre><p>We can write anything we want in between the quotes, but the goal is to write the desired result when we run our test case.</p><p>Next, let’s make the test and run it!</p><pre>describe(&quot;sayHello&quot;, function(){<br> it(&quot;should return &#39;Hello Amy&#39;&quot;, function() {<br>    <br>    <strong><em>expect(sayHello(&quot;Amy&quot;).to.equal(&quot;Hello Amy&quot;));</em></strong></pre><pre>  });<br>});</pre><p>This is nice because it reads like plain English. When we call the function “sayHello” with the argument of “Amy” we expect the result to equal “Hello Amy”.</p><p>Ok, now run mocha in your terminal.</p><pre>mocha </pre><p>And we get…</p><pre>sayHello</pre><pre>1) should return &#39;Hello Amy&#39;</pre><pre>0 passing (7ms)</pre><pre>1 failing<br></pre><pre>1) sayHello</pre><pre>should return &#39;Hello Amy&#39;:</pre><pre>ReferenceError: sayHello is not defined</pre><pre>at Context.&lt;anonymous&gt; (test/test.js:5:5)</pre><p>“ReferenceError: sayHello is not defined” — absolutely! We haven’t made it yet, let’s do that.</p><p>Make a new file in the top level of our project called “app.js”. Our file structure should now look like this:</p><pre>├── app.js</pre><pre>├── package.json</pre><pre>└── test</pre><pre>   └── test.js</pre><p>Make a function in the app.js file called “sayHello” and export it</p><pre>const sayHello = function(name) {<br>  return &quot;Hello &quot; + name;<br>}</pre><pre>module.exports = sayHello;</pre><p>And now we need to require it at the top of our test.js file.</p><pre>let assert = require(&quot;assert&quot;);<br><strong><em>let sayHello = require(&quot;../app.js&quot;);</em></strong></pre><p>Run mocha in the terminal again and we should get to see our test passing!</p><pre>sayHello</pre><pre>✓ should return &#39;Hello Amy&#39;</pre><pre>1 passing (6ms)</pre><h3>Beyond Your First Test</h3><p>Where can we go next? Well we can start thinking about edge cases for our functions. What do we want our sayHello function to do if we pass it an empty string? Do we expect it to return “Hello” or perhaps we want it to handle that kind of argument as an error i.e. “Please enter a name.”</p><p>We can also start preparing for larger amounts of code by wrapping like functions together inside of another describe function. For further mastery, I recommend exploring Mocha’s BeforeEach functionality. As you get deeper into your tests you may find that you need to create helper functions to test for certain behaviors.</p><p>Also check out Chai — a library that you can use with Mocha that gives you some nice syntax benefits as well as easy ways of comparing objects and strings. I have a follow up blog post <a href="https://medium.com/@katrinagarloff/using-chai-with-mocha-tests-9a5a2f2a7b63">here</a> that goes into using the Chai library.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=287423aac80f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neural Networks]]></title>
            <link>https://medium.com/@katrinagarloff/neural-networks-109aba9776f?source=rss-9b97a8e11e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/109aba9776f</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Katrina Garloff]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 12:58:13 GMT</pubDate>
            <atom:updated>2018-08-14T12:58:13.350Z</atom:updated>
            <content:encoded><![CDATA[<p>Neural networks are the mechanics behind how machine learning (or deep learning works). Instead of an engineer having to instruct a machine on exactly what to do, they make it possible for software to learn to from input it is receiving and come up with responses on its on. Some common use cases are image recognition, search engines results, social media friend suggestions.</p><p>So put simply a neural network takes in input and calculates a result through an algorithm. Here’s a simple diagram of what that looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*rKcrTCmGj8W9CyP2" /></figure><p>The information passes through a network of nodes. The first layer is the input layer. No calculations happen here. The second layer (represented as one layer in the diagram but can be none to very, very many) is the hidden layer. This layer contains nodes that are given certain “weights.” The weight of the node determines the importance of its result. Calculations are done here based on the input passed through from the input layer. The last layer is the output nodes and here we have our result(s).</p><p>From these results a neural network can make a guess. It needs some training to some extent in order to learn how to make the correct guess. For instance, if we were trying to train a neural network to recognize pictures of cats, we would first give it a picture, then it would make a guess as to whether or not it was a picture of a cat. Then there would have to be some kind of confirmation as to whether or not it guessed correctly. Perhaps during the training phase we would use only pictures that had attached data about what was in the picture.</p><p>If we are to reeeeeally dumb down the process into a verrrrrrry simplified equation it would look like this:</p><pre>input * weight = guess</pre><p>Then we compare it to the correct answer:</p><pre>ground truth - guess = error</pre><p>Then based on the error we need to make the necessary adjustments to our algorithm.</p><pre>error * weight&#39;s contribution to error = adjustment</pre><p>In this phase, the adjustment is walked back down all the hidden weighted nodes to change their weights. Then hopefully the next time it sees a picture of a kitten it will know it’s a kitten!</p><p>So these are the simplified concepts. A usable neural network would be closer to this diagram than the previous one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/0*bVMTGcVy9kUJCBEP.png" /></figure><p>We have to note that each node affects multiple other nodes and that connections and weights that must be calculated add up quickly. Imagine in our picture example that each input node takes in a piece of a picture. Even if we just want to recognize a handwritten letter “A.” This can be really hard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/0*7jG1KEFiBShYqlDf" /></figure><p>In figure (a) we see the handwritten ‘A’ as we would see it. In figure (b) we see the a as the our neural network would see it if we gave it 48 input nodes.</p><p>The previous deep neural network diagram had 8 input nodes.</p><p>So this is a just the tip of the iceberg. If you’re interested in learning more, I highlight recommend jabrils’ youtube channel. He is a self taught coder who has some really well done videos explaining how neural networks work. He also documents his projects and experiments on youtube so you can see some fun examples of machine learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*sVGvZOhF1OFsaek6.jpg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=109aba9776f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cryptography]]></title>
            <link>https://medium.com/@katrinagarloff/cryptography-9611fffa56c1?source=rss-9b97a8e11e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9611fffa56c1</guid>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Katrina Garloff]]></dc:creator>
            <pubDate>Tue, 31 Jul 2018 17:09:09 GMT</pubDate>
            <atom:updated>2018-07-31T17:09:09.028Z</atom:updated>
            <content:encoded><![CDATA[<p>Cryptography is the study of encryption. Taking information you want kept secret and making it unreadable to anyone except the intended recipient.</p><p>One of the oldest examples is called the Caesar Cypher, used by its namesake, Julius Caesar. The method used to encrypt the message was to take every letter in the message and switch it with a another letter in the alphabet. The corresponding letter would be depend on a number which would determine how many letters you would shift over in the alphabet. For instance: if the number was 1 (which would be absolutely terrible for disguising the message) then ‘A’ would be ‘B’ and ‘B’ would be ‘C’. Here’s an example of the shift with 3:</p><pre>Plain:    ABCDEFGHIJKLMNOPQRSTUVWXYZ<br>Cipher:   XYZABCDEFGHIJKLMNOPQRSTUVW</pre><p>The number used to encode and decode the message is called a “key.” Only the sender and the recipient would no the “key,” so that they would be the only ones able to read the message. Now the problem is, this is actually a fairly easy cipher to crack, especially by today’s standards. When Caesar was using this kind of cipher, most of his enemy’s were probably illiterate so it made it a little easier for him to create secret messages.</p><p>This still lets us understand a basic principle of cryptography — something called “symmetric encryption.” It requires one key that can be used by the both the sender and receiver. The key must be kept secret because anyone who knows the key can decrypt the information.</p><p>We also have asymmetrical encryption. In this model we have two different keys: one private and one public.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/0*zOAbwL499FMI1nxP.png" /></figure><p>One number is generated to make both keys. In one model,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/0*7ggGGHZ7uT0T5mWk.png" /></figure><p>the public key is used to encrypt the data and the private key is used to decrypt the data. A good analogy for this would be a locked mailbox at the post office. Anyone can put the mail through the slot but you have to have a key to read the mail inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/0*qmLUHclvbZ4vdryw.png" /></figure><p>Another model of asymmetrical encryption would involve combining two keys in order to encrypt or decrypt given data.</p><p>Another example would be a digital signature where the private key is used to protect the validity of the information and a public key is used to verify it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/0*eeMs4xOfYmQt4Oh_.png" /></figure><p>RSA (named for its three creators: “Rivest-Shamir-Adleman”)is a widely used algorithm for asymmetrical encryption.</p><blockquote>RSA derives its security from the difficulty of factoring large integers that are the product of two large <a href="https://whatis.techtarget.com/definition/prime-number">prime numbers</a>. Multiplying these two numbers is easy, but determining the original prime numbers from the total — factoring — is considered infeasible due to the time it would take even using today’s super computers. — Margaret Rouse (WhatIs.com)</blockquote><p>So that’s cool… and a lot of math if we go into the details of the process. RSA is regularly used to secure web browsers, chat applications, email, and VPNs. Some other used algorithms are the Diffie-Hellman key agreement, Elliptic Curve Cryptography (ECC), El Gamal, and Digital Signature Algorithm(DSA). All have their strengths and tradeoffs. Usually there are tradeoffs between speed of authentication and level of security provided.</p><p>So here’s a brief look at symmetrical and asymmetrical encryption. Often times technologies looking to take advantage of the speed gained with a symmetrical encryption and extra security of asymmetrical encryption will use both!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9611fffa56c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[50 Things You Wish You Didn’t Know Your Roomba Could Do]]></title>
            <link>https://medium.com/@katrinagarloff/50-things-you-wish-you-didnt-know-your-roomba-could-do-5711ab5a2720?source=rss-9b97a8e11e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5711ab5a2720</guid>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Katrina Garloff]]></dc:creator>
            <pubDate>Tue, 10 Jul 2018 13:04:14 GMT</pubDate>
            <atom:updated>2018-07-10T13:04:14.717Z</atom:updated>
            <content:encoded><![CDATA[<p>Ok maybe not 50…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FCMuf6PVXOQjfO%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FCMuf6PVXOQjfO%2Fgiphy.mp4&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FCMuf6PVXOQjfO%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="258" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d51130687c213cae63bc903e6a94538/href">https://medium.com/media/5d51130687c213cae63bc903e6a94538/href</a></iframe><p>…and definitely not this. But did you know you can hack your Roomba? The Roomba from iRobot is essentially a robot with sensors the vacuums your floors for you. iRobot offers guides on how to directly program your Roomba. It may be some simple actions, but there are some unexpected features! Here’s a few!</p><p>First off, iRobot has developed Roomba technology over the years. Previously models featured sensors that would detect walls and thick furniture legs to slow itself down when approaching an object. There were metal plates that would detect the vibration of dirt hitting them, to spend more time on dirtier areas. Infrared sensors would lead Roomba back to a charging dock when the battery was low.</p><p>Now, Roomba is smart enough to navigate using simultaneous location and mapping (“SLAM”). It builds a map as it goes along and refers back to it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F10YnFzg90Y1prq%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F10YnFzg90Y1prq%2Fgiphy.mp4&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F10YnFzg90Y1prq%2Fgiphy-downsized-large.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba6c3e796b217827802be0f482fa475c/href">https://medium.com/media/ba6c3e796b217827802be0f482fa475c/href</a></iframe><p>So how do you unlock the full potential of this robot mastermind? You can communicate to it with your computer or mobile phone over a usb or bluetooth connection through byte arrays(basic binary data).</p><p>You simply need to buy a usb or bluetooth connector and plug it into your Roomba. iRobot has some free available documentation on programming your Roomba <a href="http://www.robotappstore.com/files/KB/Roomba/iRobot_Roomba_500_Open_Interface_Spec.pdf">here</a>. They also sell a package called <a href="https://www.irobot.com/About-iRobot/STEM/Create-2/Projects.aspx">Create 2</a> that includes everything you need to start interacting with your Roomba.</p><p>Some things you can play around with out of the box are making the Roomba preform certain movements or even play songs. But people have modded their Roombas with all kinds of cool gear. A popular mod is setting up your Roomba to draw.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*qv3R2rugLV0JB4U3i6Yk7w.jpeg" /></figure><p>A Japanese hacker named Takashi Ogura hooked up a Kinect to his Roomba, which senses a person’s movements and gestures, so that he could control the direction of the Roomba by holding up an arm to the right or left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*5gQ8AT-jAGiOapfF_9eGMg.jpeg" /></figure><p>How to get started with your own Roomba project? Googling can bring up a lot of step-by-step guides with the hardware requirements of whatever you’re interested in. In terms of the code you will need to write, examples are a little harder to come by. You can write programming for Roomba in pretty much any language you’d like. I found examples in C, java, javascript, and Python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*rnKvzmlZyNahV2d3Vt_SPg.png" /><figcaption>An example of some Roomba coding in Python</figcaption></figure><p>That’s all I got! I’m feeling inspired to take my Roomba apart. If you’re interested in doing the same, you can buy the Create2 for around $200 and you’re getting access to more than gimmicky vacuum cleaner. The technology is really cool and the things you could do with it are even cooler.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5711ab5a2720" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Databases: ACID and BASE Simplified]]></title>
            <link>https://medium.com/@katrinagarloff/databases-acid-and-base-simplified-5b0cc5350e90?source=rss-9b97a8e11e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b0cc5350e90</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <dc:creator><![CDATA[Katrina Garloff]]></dc:creator>
            <pubDate>Sun, 17 Jun 2018 20:24:57 GMT</pubDate>
            <atom:updated>2018-06-17T20:24:57.558Z</atom:updated>
            <content:encoded><![CDATA[<p>There are a loooot of databases options with different strengths and weaknesses. It can be overwhelming. But we’ve got a couple of terms available to us to use as a rubric when evaluating databases!</p><p>The first idea we can look at is a way to evaluate relational databases:</p><h3>A C I D — Atomicity, Consistency, Isolation, Durability</h3><p>…Ok so that’s great… What does this look like?</p><p><strong>Atomicity: </strong><em>Transactions are all or nothing.</em> Anybody remember the Monopoly card: “bank error in your favor?” Atomicity ensures that money is sent <em>and </em>received. Otherwise the money stays put and money doesn’t magically appear out of thin pixels on the other side.</p><p><strong>Consistency:</strong> <em>Only valid data is saved.</em> Alright so this is basically checks and balances. Is incoming data following the rules of the database?</p><p><strong>Isolation:</strong> <em>Transactions do not affect each other.</em> This means we have a certain order to transactions; finishing one before starting the next. First Bill’s money is wired to Elizabeth. Then Bill’s money is withdrawn for groceries. Then Bill receives an overdraft alert.</p><p><strong>Durability:</strong> <em>Written data will not be lost.</em> OK, last one. The database will not forget, under any circumstances, that Bill has over-drafted.</p><p>Now, hitting this rubric makes a good database for enterprises small and big. Enter: google, social networks, amazon, big-data. Suddenly, big becomes massive and a traditional organization of data doesn’t necessarily apply. Enter: Non-relational databases and a clever acronym to oppose our ACID rubric.</p><h3>B A S E — Basically Available, Soft state, Eventual consistency</h3><p><strong>Basically Available:</strong> <em>There will be a response to any request.</em> The database may respond that it’s unavailable but it will still say it to your face.</p><p><strong>Soft state:</strong> <em>The state of the system could change over time.</em> Yes, you just poured milk in your iced coffee. No, the bottom of the cup doesn’t register that it should become milky coffee <em>yet</em>. Don’t worry! Eventually, the milk will mix into the coffee. The ice will melt and you’ll be drinking an equally-distributed, watery, milky, lukewarm cup of coffee. Every new sip is a different sip, because the state of your ice coffee could change over time.</p><p><strong>Eventual consistency:</strong> <em>The system will eventually become consistent.</em> Ok lets bang this last one out. An Amazon seller has one copy of Golden Girls Season 2 on DVD. Ok stay with me on this: you <em>own</em> a DVD player. You click buy. For twenty glorious seconds, it’s yours. Then you receive a notification that another buyer got to it before you. Now that the system has reached consistency, somebody else gets to watch your Golden Girls DVD.</p><p>Ok, that’s a lot. Neither of these rubrics are black and white. But in short, we can see that a relational database, living up to the ACID rubric, feels clean and systematic. Big data feels like the wild west. It’s all new, dirty and disorganized. A BASE adhering non-relational database could be the new sherif in town to bring his own kind of order to the data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b0cc5350e90" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>