<?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 Adam Bickford on Medium]]></title>
        <description><![CDATA[Stories by Adam Bickford on Medium]]></description>
        <link>https://medium.com/@adam_bickford?source=rss-96b887bc39c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*rnz4fK1YPhhwPOpY.jpeg</url>
            <title>Stories by Adam Bickford on Medium</title>
            <link>https://medium.com/@adam_bickford?source=rss-96b887bc39c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 01:51:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@adam_bickford/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[How to move a custom emoji between Slack networks ]]></title>
            <link>https://medium.com/@adam_bickford/how-to-move-a-custom-emoji-between-slack-networks-20344b1ac921?source=rss-96b887bc39c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/20344b1ac921</guid>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[emoji]]></category>
            <category><![CDATA[slack-tips-and-tricks]]></category>
            <dc:creator><![CDATA[Adam Bickford]]></dc:creator>
            <pubDate>Wed, 20 Jun 2018 20:00:30 GMT</pubDate>
            <atom:updated>2018-06-20T20:00:30.713Z</atom:updated>
            <content:encoded><![CDATA[<p>Your coworker added an emoji that you’ve come to rely on, but it doesn’t exist in your other Slack networks… These working conditions are 🚫 not 🚫 acceptable. Someone call OSHA.</p><p>Whoa whoa whoa. Calm down. After all… this is important office biz. It is impossible to effectively communicate with your other colleagues while you lack this emoji. Let’s add it so we can get back to work 🙂</p><ol><li>Head to https://&lt;your network name here&gt;.slack.com/customize/emoji</li></ol><p>2. Find the emoji you want to move.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*dk3W9AaFsYzuXuodkH19Zw.png" /></figure><p>3. Inspect 🕵️‍ it using Chrome’s built in dev tools. We have to do this because emoji’s aren’t rendered as normal images, they’re a little hidden.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*ijGT3AduSR8SVlL4q87UGw.gif" /></figure><p>4. Find the image url and copy it. There’s a couple places to find it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z8cBFODFjItTH2CWOZ1MTw.png" /></figure><p>5. Clean it up. Usually it has a bit of extra code that needs to be removed. You only need the bit from “https” to “.png”.</p><pre>background-image: url(https://medium.com/%3Ca%20href=%22/service/https://emoji.slack-edge.com/T02FQM02F/bb8/e1e3987605418064.png%22%3Ehttps://emoji.slack-edge.com/T02FQM02F/bb8/e1e3987605418064.png%3C/a%3E);</pre><p>✂️ it down to just:</p><pre><a href="https://emoji.slack-edge.com/T02FQM02F/bb8/e1e3987605418064.png">https://emoji.slack-edge.com/T02FQM02F/bb8/e1e3987605418064.png</a></pre><p>6. Go to that url in your browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TDzFc_YyIzbqm1WX9lUvMw.png" /></figure><p>7. Right click on the image and save it to your computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*6O5CvDyReryd1RHEw3QyCw.gif" /></figure><p>8. Head to https://&lt;your network name here&gt;.slack.com/customize/emoji for the Slack network you want to add the emoji to.</p><p>9. Follow the onscreen instructions to add your new emoji, from the image you saved on your computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JfSP5r-F-bS6CLBjphO4UQ.png" /></figure><p>10. Impress your coworkers with your hot new emoji skillz 😎</p><p><strong>BONUS</strong>: Check out the <a href="https://slackmoji.com/">Slackmoji</a> chrome extension for an easy way to search for new emojis and add them to your Slack network.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20344b1ac921" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Segment’s Java Library with Scala]]></title>
            <link>https://medium.com/@adam_bickford/using-segments-java-library-with-scala-63213c74ff9a?source=rss-96b887bc39c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/63213c74ff9a</guid>
            <category><![CDATA[segment]]></category>
            <category><![CDATA[scala]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Adam Bickford]]></dc:creator>
            <pubDate>Mon, 23 Apr 2018 16:46:40 GMT</pubDate>
            <atom:updated>2018-04-23T16:46:40.087Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently I was tasked with adding Segment’s event tracking to a Scala service that I work on. If you use Java Libraries in your Scala project you might already know there’s some small differences that can cause big headaches. Below I walk through how I got the Java library from Segment to work with our Scala service.</p><p>This is the <a href="https://segment.com/docs/sources/server/java/">Java installation guide</a> I was using.</p><h4>1. Adding the library to my project.</h4><p>Following the first step of the Java installation I searched for the groupId on mvnrepository.com and <a href="https://mvnrepository.com/artifact/com.segment.analytics.java/analytics/2.1.0">found it here</a>.</p><p>This confirmed the most recent version and also gave me the SBT dependency string. I added that to the rest of my project dependencies.</p><pre>&quot;com.segment.analytics.java&quot; % &quot;analytics&quot; % &quot;2.1.0&quot;</pre><h4>2. Initializing the Segment SDK</h4><p>I knew I was going to create a separate Segment object for any Segment related methods I would be using around my project. I added that to my utilities package and pulled in the Segment development write key environment variable that I had created for this event source. The line to initialize the Analytics class stayed essentially the same as the Java installation.</p><pre><strong>package </strong>utilities<br><br><strong>import </strong>com.segment.analytics.Analytics<br><br><strong>object </strong>SegmentUtils {<br>  <strong>private val </strong><em>segmentWriteKey</em>: Option[String] = sys.<em>env</em>.get(<br>    &quot;SEGMENT_WRITE_KEY&quot;<br>  )</pre><pre>  <strong>val </strong><em>analytics </em>: Analytics = Analytics.<em>builder</em>(<br>    <em>segmentWriteKey</em>.get<br>  ).build()<br>}</pre><p>If you don’t already have a dev write key for your segment source you will need to go into the dashboard and add your source.</p><h4>3. Testing the track event example</h4><p>The Java example in the installation looks like this:</p><pre>analytics.enqueue(TrackMessage.builder(&quot;Item Purchased&quot;)<br>    .userId(&quot;f4ca124298&quot;)<br>    .properties(ImmutableMap.builder()<br>        .put(&quot;revenue&quot;, 39.95)<br>        .put(&quot;shipping&quot;, &quot;2-day&quot;)<br>        .build()<br>    )<br>);</pre><p>So like any good dev I copy/pasted that mofo into a new track() method on my SegmentUtils object just to see what would happen. I imported all of the relevant pieces of segment that the example uses, and my whole file looked something like this:</p><pre><strong>package </strong>utilities<br><br><strong>import </strong>com.segment.analytics.Analytics<br><strong>import </strong>com.segment.analytics.messages.{TrackMessage, ImmutableMap}<br><br><strong>object </strong>SegmentUtils {<br>  <strong>private val </strong><em>segmentWriteKey</em>: Option[String] = sys.<em>env</em>.get(<br>    &quot;SEGMENT_WRITE_KEY&quot;<br>  )</pre><pre>  <strong>val </strong><em>analytics </em>: Analytics = Analytics.<em>builder</em>(<br>    <em>segmentWriteKey</em>.get<br>  ).build()<br><br>  <strong>def </strong>track(): Unit = {<br>    analytics.enqueue(TrackMessage.builder(&quot;Item Purchased&quot;)<br>    .userId(&quot;f4ca124298&quot;)<br>    .properties(ImmutableMap.builder()<br>        .put(&quot;revenue&quot;, 39.95)<br>        .put(&quot;shipping&quot;, &quot;2-day&quot;)<br>        .build()<br>      )<br>    )<br>  }<br>}</pre><p>However, before I could even start my service my IDE Intellij was mad about that ImmutableMap class. It had a warning I had never seen before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yrlm0rn0NMvat0pabsMxUA.png" /></figure><p>Symbol ImmutableMap is inaccessible from this place</p><p>Googling the issue sounded like I was trying to access a private property, but it imported fine, ImmutableMap wasn’t a class to be instantiated, and my fellow Scala dev had also never run into that before. Intellij has autocomplete for imports, but I removed that and looked through the segment library to make sure I had the right one, which I did.</p><p>(I fully expect someone with more Java experience will school me on why I couldn’t use the example as-is)</p><h4>4. Troubleshooting</h4><p>I started looking for a way around this by backtracking to the .properties function and looking at exactly what type of param that function was expecting, which was util.Map[String, _].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*URNBhqH1VyvT5w18jzK17A.png" /></figure><p>So I thought, ok I’ll just build my own Map instead of using the ImmutableMap builder. Something like:</p><pre><strong>def </strong>track(): Unit = {<br>  <em>analytics</em>.enqueue(TrackMessage.builder(&quot;Item Purchased&quot;)<br>    .userId(&quot;f4ca124298&quot;)<br>    .properties(<em>Map</em>(<br>      &quot;test&quot; -&gt; &quot;test&quot;<br>    ))<br>  )<br>}</pre><p>Except I found that I still had a type mismatch. .properties() was expecting a java.util.Map, not a Scala Map.</p><h4>5. The Solution</h4><p>I searched for a way to convert a java.util.Map to a Scala Map and came across <a href="https://stackoverflow.com/questions/16583265/how-can-i-convert-scala-map-to-java-map-with-scala-float-to-java-float-k-v-conve">this StackOverflow post</a>. Slightly different issue but still shed light on the existence of an implicit java.util.Map conversion available in the scala.collection.JavaConversions package.</p><p>Simply importing that was all I needed to be able to pass a Scala Map to the .properties() method without getting yelled at.</p><pre>import scala.collection.JavaConversions._</pre><p>Success! My first functional example of using the Segment Java library in a Scala project looked like this:</p><pre><strong>package </strong>utilities<br><br><strong>import </strong>com.segment.analytics.Analytics<br><strong>import </strong>com.segment.analytics.messages.TrackMessage<br><strong>import</strong> scala.collection.JavaConversions._</pre><pre><strong>object </strong>SegmentUtils {<br>  <strong>private val </strong><em>segmentWriteKey</em>: Option[String] = sys.<em>env</em>.get(<br>    &quot;SEGMENT_WRITE_KEY&quot;<br>  )</pre><pre><strong>  val </strong><em>analytics </em>: Analytics = Analytics.<em>builder</em>(<br>    <em>segmentWriteKey</em>.get<br>  ).build()<br><br>  <strong>def </strong>track(): Unit = {<br>    <em>analytics</em>.enqueue(TrackMessage.builder(&quot;Item Purchased&quot;)<br>      .userId(&quot;f4ca124298&quot;)<br>      .properties(<em>Map</em>(<br>        &quot;test&quot; -&gt; &quot;test&quot;<br>      ))<br>    )<br>  }<br>}</pre><h4>5.1 Alternative solution</h4><p>I also learned that for a bit more explicit solution you could import the JavaConverters package and explicitly convert your Scala map to a java.util.Map with the .asJava method. This is a nice way to let the next developer know exactly what is happening, and prevent any possible confusion in the future.</p><pre><strong>import </strong>scala.collection.JavaConverters._</pre><pre><strong>def </strong>track(): Unit = {<br>  <em>analytics</em>.enqueue(TrackMessage.builder(&quot;Item Purchased&quot;)<br>    .userId(&quot;f4ca124298&quot;)</pre><pre>// and then you can use the .asJava conversion method</pre><pre>    .properties(<em>Map</em>(<br>      &quot;test&quot; -&gt; &quot;test&quot;<br>    ).asJava)<br>  )<br>}</pre><h4>6. Cleanup</h4><p>With a little bit of cleanup, I had a usable function that I could sprinkle around our service wherever we needed Segment tracking.</p><pre><strong>def </strong>track(<br>          event: String,<br>          userId: String, <br>          props: Map[String, _]<br>         ): Unit = {<br>  analytics.enqueue(<br>    TrackMessage.builder(event)<br>      .userId(userId)<br>      .properties(props)<br>  )<br>}</pre><p>From there I was free to make other optimizations like adding some default props I knew would be on all events, adding a fallback for the props param so that could be optional, and so on.</p><p>Hope this helps anyone looking to integrate Segment events to a Scala project!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63213c74ff9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top Five Films Across The Board]]></title>
            <link>https://medium.com/@adam_bickford/top-five-films-across-the-board-bb35f4d10ca5?source=rss-96b887bc39c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb35f4d10ca5</guid>
            <category><![CDATA[film]]></category>
            <category><![CDATA[horror]]></category>
            <category><![CDATA[movies]]></category>
            <dc:creator><![CDATA[Adam Bickford]]></dc:creator>
            <pubDate>Wed, 31 May 2017 00:05:19 GMT</pubDate>
            <atom:updated>2023-08-14T20:45:05.082Z</atom:updated>
            <content:encoded><![CDATA[<p>Favorites, bests, whatever you want to call them, these are my top 5 (sometimes more) from every genre and sub-genre I thought worth mentioning. The list comes to a total of over 225 of my all-time favorite films. Every single entry here I would consider essential viewing, at least once.</p><p>There’s an understandable amount of crossover here, as something like Total Recall could easily be considered Sci-fi as much as I consider it Action. Or Kill Bill could easily be considered Revenge as much as Martial Arts. My thought’s regarding crossover are pretty simple. On the whole, if a movie feels more like X than Y, I’ll put it in category X. Some I have just included in multiple categories. Don’t bother trying to make a stink like “Rain Man isn’t an X movie!” cause genres are a little loose and I don’t care. There’s no doubt some great movies left off this list, but I’ll be counting on you to fill in those gaps.</p><p>I’ve also included a “where to start” for each category. This will sometimes be my favorite, or the best, but more than likely a fun, exciting, easy to get into film. If it’s something you’ve seen before but not in years, it’s time to revisit that film.</p><h4><strong>Monsters:</strong></h4><p>Giant beasts battling giant robots, or terrorizing buildings and sucking people’s insides out, it’s hard to beat a good monster movie.</p><ul><li>Godzilla vs. Mechagodzilla</li><li>King Kong (both)</li><li>Cloverfield</li><li>The Mist</li><li>Pacific Rim</li><li>The Blob (’88)</li></ul><p><strong>Where to start:</strong> The Blob. It’s a non-conventional monster but the havoc wreaked is astronomical. One of the best remakes.</p><h4><strong>Sci-Fi Horror:</strong></h4><p>Setting up some of the creepiest tales ever told, Horror and Science fiction (when done right) are a match made in Hell.</p><ul><li>Alien</li><li>The Thing</li><li>Event Horizon</li><li>Re-Animator</li><li>The Fly (‘86)</li><li>From Beyond</li></ul><p><strong>Where to start:</strong> I feel like everyone has seen the Thing, but if you haven’t, start there. Otherwise go with Re-Animator or The Fly. Two of the best mad scientists ever put to film.</p><h4><strong>Zombies:</strong></h4><p>I don’t care for that long debated fight between fast and slow zombies. Both have exceptional films and terrible ones. I’ve included a few of both.</p><ul><li>Dawn of the Dead (‘78)</li><li>28 Days Later</li><li>The Battery</li><li>[REC]</li><li>Return of the Living Dead</li><li>Zombi 2</li></ul><p><strong>Where to start:</strong> For fast zombies [REC] is hard to beat. For slow zombies Fulci’s Zombi 2 has the greatest reveal of worm covered corpses that currently exists.</p><h4><strong>Vampires:</strong></h4><p>The absolute best in sexually charged horror. Forget Twilight or True Blood, this is where I’d go for vampires.</p><ul><li>Interview with the Vampire</li><li>Let the Right One In</li><li>The Lost Boys</li><li>Fright Night</li><li>From Dusk till Dawn</li><li>Blade</li><li>Only Lovers Left Alive</li><li>The Hunger</li><li>Thirst</li><li>Near Dark</li></ul><p><strong>Where to start:</strong> I have a hard time saying anything is better than Interview with the Vampire. If you’ve already seen that check out Jim Jarmusch’s Only Lovers Left Alive.</p><h4><strong>Paranormal / Supernatural:</strong></h4><p>All masterfully atmospheric and creepy to no end.</p><ul><li>Paranormal Activity</li><li>The Conjuring</li><li>The Sentinel</li><li>Carrie</li><li>Silent Hill</li><li>Session 9</li><li>The Innkeepers</li></ul><p><strong>Where to start:</strong> If you like the slow burn, I can’t recommend The Sentinel more. For something more modern, I believe the Conjuring is one of the best mainstream horror films in recent years.</p><h4>Satanic/Demonic/Witchcraft:</h4><p>Demons to some, Angels to others. Tapping into unreachable horrors and carnal instincts.</p><ul><li>The Exorcist</li><li>Hellraiser</li><li>Rosemary’s Baby</li><li>The Ninth Gate</li><li>House of the Devil</li><li>The Witch</li><li>Mark of the Devil</li><li>Constantine</li><li>Hereditary</li><li>The Ritual</li></ul><p><strong>Where to start: </strong>House of the Devil is a great start. Ti West did an impeccable job recreating the old school feel of films like Rosemary’s Baby. Oh and Rosemary’s Baby is pretty good too.</p><h4><strong>Killer / Slasher:</strong></h4><p>I’m not sure Misery belongs here but I couldn’t leave it off this list. These make up my favorite/best films featuring either a killer protagonist or slasher villain.</p><ul><li>Henry: Portrait of a Serial Killer</li><li>Scream</li><li>Black Christmas</li><li>Halloween</li><li>Nightmare on Elm St.</li><li>House of 1000 Corpses</li><li>Sleepaway Camp</li><li>The Texas Chainsaw Massacre</li><li>Misery</li><li>Maniac (2013) (Yes, over the original)</li><li>Monster</li></ul><p><strong>Where to start:</strong> Henry no doubt. H:POASK would be in my top 5 all time horror films.</p><h4><strong>Crime horror/thrillers:</strong></h4><p>Usually told from the cop or detective’s perspectives, these movies can be incredibly intense, and can show that the good guys don’t always win.</p><ul><li>Zodiac</li><li>Seven</li><li>Silence of the Lambs</li><li>True Detective</li><li>Stoker</li><li>The Lost (Jack Ketchum’s)</li></ul><p><strong>Where to start:</strong> If you’ve got the time for a short TV series, watch True Detective. If you’re looking for a film watch Silence of the Lambs or Zodiac.</p><h4><strong>Disturbing:</strong></h4><p>A Serbian Film would take the cake for disturbing, but my favorite super disturbing flicks have a little more substance to them.</p><ul><li>Cannibal Holocaust</li><li>Martyrs</li><li>Inside</li><li>Irreversible</li><li>The Girl Next Door</li></ul><p><strong>Where to start:</strong> Martyrs. It’s emotionally exhausting for sure, as all of these films are, but Martyrs has an underlying beauty and incredible ambition that set it apart from the rest.</p><h4><strong>Gore:</strong></h4><p>Movies where the gore might as well be a character in itself. If you’re looking to zone out to some blood and guts, this is where to go.</p><ul><li>Dead Alive</li><li>Tokyo Gore Police</li><li>Riki-oh: The Story of Ricky</li><li>The Evil Dead</li><li>Guinea Pig 2: The Flowers of Flesh and Blood</li></ul><p><strong>Where to start:</strong> The Evil Dead is the obvious pick here, but I’m gonna have to go with the incredibly over the top Riki-oh.</p><h4><strong>Psychological:</strong></h4><p>Movies that might make you crazy while your protagonist goes crazy. Smart thrillers that keep you guessing long after the credits roll.</p><ul><li>The Shining</li><li>Jacob’s Ladder</li><li>Saw</li><li>Cube</li><li>Altered States</li><li>Black Swan</li><li>Triangle</li><li>The Signal (‘07)</li></ul><p><strong>Where to start:</strong> The Shining of course. The Signal from 2007 is great for a lesser known picture, I haven’t seen The Signal from 2014.</p><h4><strong>Horror Comedy:</strong></h4><p>The only thing that goes better with Horror than Sci-fi is comedy. These are the best films for a lighter night of violent fun.</p><ul><li>Shaun of the Dead</li><li>Young Frankenstein</li><li>Tucker and Dale vs Evil</li><li>Evil Dead 2</li><li>Killer Klowns from Outer Space</li><li>Black Sheep</li><li>Cabin in the Woods</li><li>Night of the Creeps</li><li>Beetlejuice</li></ul><p><strong>Where to start:</strong> Night of the Creeps. Tom Atkins’ best film in my opinion.</p><h4><strong>Italian Horror:</strong></h4><p>Sometimes completely nonsensical, but you won’t find more beautiful, more nightmarish horror anywhere else.</p><ul><li>Suspiria</li><li>City of the Living Dead</li><li>Nightmare City</li><li>Opera</li><li>The Beyond</li></ul><p><strong>Where to start:</strong> Suspiria for the beauty, City of the Living Dead for the gore.</p><h4><strong>Trash:</strong></h4><p>Terrible effects, ridiculous storylines, crude violence, scummy characters… trashy, sleazy flicks like these aren’t for everyone, but they can also be the most fun you’ve had watching a movie.</p><ul><li>Basket Case</li><li>The Toxic Avenger</li><li>Brain Damage</li><li>Street Trash</li><li>Class of Nuke ’em High</li><li>Troll 2</li><li>Frankenhooker</li><li>Thankskilling</li><li>Poultrygeist</li></ul><p><strong>Where to start:</strong> The Toxic Avenger, a love story built around bullies and radioactive waste. Troma’s magnum opus.</p><h4><strong>Animal/Eco:</strong></h4><p>You can make animal horror serious or goofy, and both can be equally fun. Lake Placid could easily be considered horror-comedy, but films like Jaws and The Grey lead you into darker territory.</p><ul><li>Jaws</li><li>Alligator</li><li>Lake Placid</li><li>Piranha 3D</li><li>The Grey</li></ul><p><strong>Where to start:</strong> Alligator. Robert Forester takes on a giant Alligator surviving in the Chicago sewer system. Too much fun.</p><h4><strong>Anthologies:</strong></h4><p>Small doses of horror in bite sized little packages. Anthologies can pack a lot of variety into a feature length time-slot.</p><ul><li>Creepshow</li><li>Chillerama</li><li>Trick ‘r’ Treat</li><li>3 Extremes</li><li>Twilight Zone: The Movie</li><li>Terror Eyes</li><li>V/H/S</li></ul><p><strong>Where to start:</strong> Trick ‘r’ Treat. Incredibly well written and edited. It’s kinda like Pulp Fiction if Tarantino was reading Tales from the Crypt comics instead of pulp crime novels.</p><h4>Found Footage:</h4><p>Playing with the pseudo first hand account of traumatic or horrifying events, when done well can be extremely potent.</p><ul><li>The Blair Witch Project</li><li>[REC]</li><li>Grave Encounters</li><li>Cannibal Holocaust</li><li>Cloverfield</li><li>Trollhunter</li><li>Paranormal Activity</li><li>Megan is Missing</li><li>The Taking of Deborah Logan</li></ul><h4><strong>Arthouse / Mindfuck horror</strong></h4><p>These films take psychological horror to unimaginable levels, and can’t be watched on the fly. You’ve definitely gotta be in the right mood to experience any of these.</p><ul><li>Eraserhead</li><li>Antichrist</li><li>Beyond the Black Rainbow</li><li>Videodrome</li><li>Naked Lunch</li></ul><p><strong>Where to start:</strong> Eraserhead. There’s no easy way into this sub-genre, but Eraserhead is the perfect place to see if you might enjoy more.</p><h4><strong>Classics (pre — 1960):</strong></h4><p>There’s a variety of actual genre’s here but these are my favorite older horror films.</p><ul><li>Creature from the Black Lagoon</li><li>Nosferatu</li><li>The Cabinet of Dr. Caligari</li><li>Plan 9 from Outer Space</li><li>The Most Dangerous Game</li></ul><p><strong>Where to start:</strong> The Most Dangerous Game is a great start. The film actually was a favorite of the infamous Zodiac killer, so go watch Fincher’s ‘Zodiac’ afterwards.</p><h4><strong>Revenge:</strong></h4><p>The definition of justified violence. Tales of wronged people forced to take matters into their own hands.</p><ul><li>Blue Ruin</li><li>Oldboy</li><li>I Saw the Devil</li><li>The Count of Monte Cristo</li><li>Last House on the Left</li><li>Death Proof</li><li>Lady Vengeance</li><li>Sushi Girl</li><li>Thriller: A Cruel Picture</li></ul><p><strong>Where to start:</strong> The Count of Monte Cristo. The ultimate tale of revenge, Jim Caviezel’s portrayal is great, and Guy Pearce plays a real piece of shit.</p><h3>Non-Horror:</h3><h4><strong>Comedies:</strong></h4><p>When it comes to comedy I’m a much bigger fan of darker, off-beat humor. That’s not to say I don’t enjoy a more straight forward comedy, complete with potty mouth fools such as Jay and Silent Bob Strike Back.</p><ul><li>The Sasquatch Gang</li><li>Wet Hot American Summer (and everything else Stella touches)</li><li>National Lampoon’s Christmas Vacation</li><li>Cecil B. Demented</li><li>The Slammin’ Salmon</li><li>The Life Aquatic</li><li>Club Dread</li><li>Idiocracy</li><li>Fear and Loathing in Las Vegas</li><li>Gentlemen Broncos</li><li>Ghost World</li><li>Jay and Silent Bob Strike Back</li><li>Little Miss Sunshine</li><li>Rushmore</li><li>Bulletproof</li><li>Saving Silverman</li></ul><p><strong>Where to start:</strong> Wet Hot American Summer. It’s got an amazing cast of would-soon-be big shot actors and an incredible sense of humor.</p><h4><strong>Animation:</strong></h4><p>Hand drawn to stop motion and computer animation, these selections span more than 50 years of film history.</p><ul><li>Wall-E</li><li>Alice in Wonderland (‘51)</li><li>Coraline</li><li>The Nightmare before Christmas</li><li>The Hobbit (‘77)</li><li>Spirited Away</li><li>My Neighbor Totoro</li></ul><p><strong>Where to start:</strong> Alice in Wonderland, as timeless as it is imaginative.</p><h4><strong>Fantasy:</strong></h4><p>Some of the most imaginative films on this list, These films bring the fantastical and make it as real as can be.</p><ul><li>Pan’s Labyrinth</li><li>Jason and the Argonauts</li><li>Being John Malkovich</li><li>The Princess Bride</li><li>Labyrinth</li><li>Time Bandits</li><li>Willow</li><li>Lord of the Rings</li></ul><p><strong>Where to start:</strong> Hands down, Willow. One of my favorite childhood films. A fantastic adventure filled with dragons, wizards, witches, knights, and… giant snowballs?</p><p><strong>Where to start:</strong> If you haven’t seen this entire list by now then I can’t help you.</p><h4><strong>Drama:</strong></h4><ul><li>Mullholland Dr.</li><li>Girl, Interrupted</li><li>Fight Club</li><li>Magnolia</li><li>The Shawshank Redemption</li><li>Synecdoche, NY</li><li>American Beauty</li><li>Charlie Wilson’s War</li><li>Leaving Las Vegas</li><li>The Life of David Gale</li><li>The Royal Tenenbaums</li><li>Melancholia</li><li>Titanic</li></ul><p><strong>Where to start:</strong> The Shawshank Redemption. Masterful in every way.</p><h4><strong>“Spacey” Sci-fi:</strong></h4><p>Sci-fi including extra-terrestrials or traveling outside of our immediate planetary neighborhood.</p><ul><li>Sunshine</li><li>2001: A Space Odyssey</li><li>Solaris</li><li>Moon</li><li>Interstellar</li><li>Starship Troopers</li><li>Contact</li><li>District 9</li></ul><p><strong>Where to start:</strong> Starships Troopers for something a little more fun. Contact though is a personal favorite, written by Carl Sagan.</p><h4><strong>Non-“Spacey” Sci-fi:</strong></h4><p>Down to earth (literally) science fiction that doesn’t skimp on story or quality.</p><ul><li>Primer</li><li>Children of Men</li><li>Inception</li><li>The Jacket</li><li>Eternal Sunshine of the Spotless Mind</li><li>The Matrix</li><li>Looper</li><li>12 Monkeys</li><li>Dark City</li><li>eXistenZ</li><li>Source Code</li><li>Sphere</li><li>Vanilla Sky</li><li>Timecrimes</li><li>Jurassic Park</li></ul><p><strong>Where to start:</strong> Children of Men. Really this entire list is incredible. Sphere is another personal favorite, though it didn’t get a great critical response.</p><h4><strong>War:</strong></h4><p>Something I hope to never be a part of, these films portray the best and worst of it.</p><ul><li>Apocalypse Now</li><li>Full Metal Jacket</li><li>Saving Private Ryan</li><li>Counterfeiters</li><li>Gladiator</li><li>Black Hawk Down</li><li>Inglorious Basterds</li></ul><p><strong>Where to start:</strong> Gladiator, but if you’re looking for something a bit more modern then Saving Private Ryan.</p><h4><strong>Action/Adventure:</strong></h4><p>I usually prefer action movies that are smartly written, but I do enjoy the occasional zone-out mindless “shoot em up”.</p><ul><li>Total Recall</li><li>Indiana Jones (prefer the original 3)</li><li>Terminator 1/2</li><li>The Raid: Redemption</li><li>Dredd</li><li>Mission Impossible</li><li>Lethal Weapon</li><li>Hardcore Henry</li><li>Resident Evil (All)(Yes… all.)</li></ul><p><strong>Where to start:</strong> Mission Impossible, the action is incredible, but the twists and turns really put it above the rest.</p><h4><strong>Kung-fu/Martial Arts:</strong></h4><p>I admittedly have not seen enough Bruce Lee or Jackie Chan movies. There’s really no excuse.</p><ul><li>The 36th Chamber of Shaolin</li><li>Kill Bill</li><li>Ong-bak</li><li>Shogun Assassin</li><li>5 Deadly Venoms</li></ul><p><strong>Where to start:</strong> The 36th Chamber of Shaolin. If you’ve never seen it, there’s a reason you’ve heard of it.</p><h4><strong>Crime/Gangsters:</strong></h4><p>The best of the bad guys.</p><ul><li>Pulp Fiction</li><li>Heat</li><li>Donnie Brasco</li><li>Goodfellas</li><li>The Departed</li><li>Blow</li><li>Drive</li><li>Lock, Stock, and Two Smoking Barrels</li><li>Snatch</li><li>The Usual Suspects</li></ul><p><strong>Where to start:</strong> I feel like Donnie Brasco is left out of too many conversations about gangster flicks. An incredible true story backed by wonderful performances.</p><h4><strong>Romantic Comedies:</strong></h4><p>These Romantic Comedies feature well rounded, relatable characters for everyone.</p><ul><li>Chasing Amy</li><li>Silver Linings Playbook</li><li>High Fidelity</li><li>The Wedding Singer</li><li>Seeking a Friend for the End of the World</li></ul><p><strong>Where to start:</strong> The Wedding Singer. Set in the 80’s and featuring a great soundtrack, this is Adam Sandler toned down to a much more manageable level, and it works great.</p><h3>Final Act:</h3><p>This will be a living document, and tweaked, and updated, and re-written, and re-tweaked, and re-re-written, as life goes on. Hopefully along the way you can discover new favorites, or rekindle a love with an old-favorite.</p><h3>Post Credits Scene:</h3><p>Since I’ve gotten so many questions about an overall top 5 or so I’m going to try and keep an overall list of my all time favorites. Key word “favorite” not “best”. Some movies I cannot count how many times I’ve seen and basically instantly put me in a good mood. Some I just <em>have </em>to watch at least like once a year.</p><ul><li>The Thing</li><li>Blade</li><li>Death Proof</li><li>The Evil Dead</li><li>The Rocky Horror Picture Show</li><li>House of 1000 Corpses</li><li>Dead Alive</li><li>The Slammin’ Salmon</li><li>The Silence of the Lambs</li><li>The Shawshank Redemption</li><li>Fight Club</li><li>Willow</li><li>National Lampoon’s Christmas Vacation</li><li>Idiocracy</li><li>Return of the Living Dead</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb35f4d10ca5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A-Z’s of pro-equality companies]]></title>
            <link>https://medium.com/@adam_bickford/a-zs-of-pro-equality-companies-839a5978b7a0?source=rss-96b887bc39c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/839a5978b7a0</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[marriage-equality]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Adam Bickford]]></dc:creator>
            <pubDate>Fri, 20 Jan 2017 19:46:38 GMT</pubDate>
            <atom:updated>2019-06-08T04:39:03.644Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Update</strong>: When I originally collected these logos I felt that companies were a bit more genuine in their displays of solitude. Nowadays it feels more like pandering and some companies have been proven as contradicting their shows of support with actions that say otherwise. So take this collection with a grain of salt, stay strong, and don’t be a dickhead 🖤.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*XFyjBYpT9lnZmZwFTq5UBA.jpeg" /><figcaption>500 Startups</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*1bDe5Og-9PSDHKnUT-T3lw.jpeg" /><figcaption>Abercrombie &amp; Fitch</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*figMpTdVRI0lUELPG_mnzg.jpeg" /><figcaption>ACLU</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*kdpBCyqLyV1ke5yTIJD37g.png" /><figcaption>AirBnB</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*HCRNziOS9DeYCkif7I-sUA.png" /><figcaption>American Airlines</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*95GlEP2rzoSbxVUIDu75YA.png" /><figcaption>American Bridge</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*6kl6WodNr5AHG_QNGPm87A.jpeg" /><figcaption>American Express</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*7K4rLW7q2-8ZPLyC_xMLiA.jpeg" /><figcaption>Amy Poehler’s Smart Girls</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*4IB3yrLFGhVUaCOK4SI9OA.png" /><figcaption>Apple (v1)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*tl-QnHqW6kNWTWfresy9Lw.jpeg" /><figcaption>Apple (v2)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*KEpTrL8Ty-lpbN436xe92Q.jpeg" /><figcaption>AriZona Tea</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*pWJpuivaVImjMiszgowEUQ.png" /><figcaption>Asana</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*LNkh6kt2aJW6XmW5fmZgDg.png" /><figcaption>AT&amp;T</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*G0KVo-EBj8PdZWrbU5Oc_A.jpeg" /><figcaption>Attn:</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*-pG5JM152a29Nk1TGIWg4w.png" /><figcaption>Bank of America</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*3prR9H8v3LFPo-S4SEwItQ.jpeg" /><figcaption>Belly</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*nAD3hT1NPidVRdSiGDwAaA.png" /><figcaption>Blackberry</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*3HZ2mHnlFbxVMoWVKMOEfw.png" /><figcaption>Bobo Academy</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*_QbwZcLt_tf9x7C_LSwDeA.jpeg" /><figcaption>Bravo TV</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*RHnl6HKWgQX_xS2QzynGng.png" /><figcaption>Buffer</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*Q5onW7DHMAT9fRl6XGMyAg.png" /><figcaption>Bustle</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Bv9VNfSP8Lf9o69vfrJOVQ.png" /><figcaption>Buzzfeed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*PDSakWEXmbf8vT6T4oPN-g.png" /><figcaption>Coca-Cola</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*rpMLGdW8zb2uRUHBw5u8AQ.png" /><figcaption>Coder’s Clan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*utAalua5CgRJGJFPtvZuQg.jpeg" /><figcaption>CrowdFire</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*LGk76QtUXCcqgX_qI11hgg.jpeg" /><figcaption>Daily Motion</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Ys2O9raQyixPPdEv2c23Gg.png" /><figcaption>DeviantArt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*WHvgcr85iDFwQQrQnV_F-w.jpeg" /><figcaption>Digg</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*fwI60zx8hxJo-l2jubkzWw.png" /><figcaption>Digital Trends</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*CN3LX3QnuR9d51AcTuQXfQ.png" /><figcaption>Drippler</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*wAdBxfhhu9iug5N3M4j4ow.png" /><figcaption>DropBox</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*4CkvjSshA7qxn2x6JRu4UQ.jpeg" /><figcaption>E! Online</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*Be-_N_kC1vCh0dwGd9CrqA.png" /><figcaption>Edge</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*FUKBq0U2T3vTYgVvrkG-qA.jpeg" /><figcaption>Ellen</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*6O4hW-DrhD6CnNDeUoc49w.png" /><figcaption>Engadget</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*FFSom-wlIp3G7PJFAJQfHQ.png" /><figcaption>Entertainment Weekly</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*9dqP7atbpoUcLHgYyDwTaA.jpeg" /><figcaption>Expedia</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*OBLvPyDXfhAOBLHOLSP0GQ.jpeg" /><figcaption>EyeIn</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*cucVWz6JwX0gvkBQ6qI8XQ.jpeg" /><figcaption>Facebook</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*7m8_LHe_R4Bypu-pT4zzUA.png" /><figcaption>First Round Capital</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*NcHMfrkgJ0_cQOWuOE-z9A.png" /><figcaption>Founder Fox</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*1idUv_oYYjUCunYQrhg0eQ.png" /><figcaption>Freelancer.com</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*kQBtx6ys1OvCCPfdY8MUvw.png" /><figcaption>Fusion</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*H9pH3isbOoZGBeb4LwEY_A.jpeg" /><figcaption>Gap</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*KJm28lPpqmE4mZTJKgQWoQ.png" /><figcaption>General Assembly</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*REz1dtN7_Po7i_I6llc9EQ.png" /><figcaption>General Electric</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*8UeAL0J9IXZyIG2bVWsnZw.png" /><figcaption>GetAround</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*a008fu1E-S_s9BKT201ARQ.png" /><figcaption>Github</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*rxkieuGUQtVOGm6J8YjPnQ.jpeg" /><figcaption>Glamour</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*KJEO81oc2cWqmoBrRL76YA.jpeg" /><figcaption>Google</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*fOcYAu8xOVTQDk-syteSJg.jpeg" /><figcaption>Gramavox</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*a3hH2rl3NNvaT0NYBFmiQg.jpeg" /><figcaption>Groupon</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*Y_VDha6GXFzT2TiWpQJoVQ.png" /><figcaption>Harper Perennial</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*-U90_cMdxUatcj9J-ksL7Q.png" /><figcaption>HealthMap</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*pSZJ2C2t9wxcybA0EC52eA.png" /><figcaption>Hillary Clinton</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*PzX-bFixbER88c9wLoLUvg.jpeg" /><figcaption>The Honest Company</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*tbtEsYq5kGN6s-VXCBk6OQ.jpeg" /><figcaption>HootSuite</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BzaWCCH0-VmNOlcP8RSm0Q.png" /><figcaption>HubSpot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*7ajqQy9VgYfW07ddHqpLUQ.png" /><figcaption>Huffington Post</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/350/1*Mh2cSMKCc-zZbyH7yT-yRQ.jpeg" /><figcaption>Hyatt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*mYPsxn6h11Fz6INJuDfZdQ.jpeg" /><figcaption>IBM</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*A9FjSsjXrlw0IFxgAGyyoA.png" /><figcaption>IFC Films</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*CWylvWfOVPoQYOHNL3Agnw.png" /><figcaption>Image Comics</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*bUdk7dLQDudul5yp9nPw7w.png" /><figcaption>The Independent US</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BUIcQjuHw1ZxIwmDHYChXQ.jpeg" /><figcaption>Jello</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*-Yxk2Avkcazf83nvG_gvOw.jpeg" /><figcaption>Kool-Aid</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*I6nASwJ1lx7bLVC7ESvIYw.jpeg" /><figcaption>Lady Gaga</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*JgRPtovPOA5RlubGwhh2tg.jpeg" /><figcaption>Levi’s</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*xYSE_jbiFPHq5M1xpQnJ-A.jpeg" /><figcaption>LinkedIn</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*eltjszArICj4Mik30mi1yA.png" /><figcaption>Lyft (v1)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*oheGI61MOX2hutgyrXaIuw.jpeg" /><figcaption>Lyft (v2)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*z0GIhMPQ-KnMHuh6z3mAOA.jpeg" /><figcaption>Mailchimp</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*DreMfy2ijNCWqXJdyCm5tw.png" /><figcaption>Mashable</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*d_YVHZaj8AsaJHzshHmDeg.png" /><figcaption>MasterCard</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Vkqm4Ayo4teKTxeL_e0UaQ.png" /><figcaption>McSweeney’s</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*DxSjlHq1t_mzDM6yPdVwHA.png" /><figcaption>Medium (old)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*o7_Y51-YsP1UIeuFA6u1Cg.jpeg" /><figcaption>Medium</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*DnRINFOae0fEE2FSknzrxA.png" /><figcaption>Meerkat</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*I08DMsCpJRS6Jec4RJ2aSA.jpeg" /><figcaption>MetroMile</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*61zoZctsdaKzTGOZAZCSxA.png" /><figcaption>Motorola</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*B2h8uB4cEv3Psp22jR1LQQ.jpeg" /><figcaption>MobiFile</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*XiG_UVia0SpwssFhZCV_5Q.jpeg" /><figcaption>Mother Jones</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*tyBsrnA6o5ODHO3EbpyXIA.png" /><figcaption>Motown</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*-Qn6wmpoyN6HkD-l6fNl8g.jpeg" /><figcaption>MTV</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*2cBaD-IqpOTOwtFOiEr8Jg.jpeg" /><figcaption>Nerdist</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*bkRatnHyW3yMcU9ezF4YTg.jpeg" /><figcaption>NYC Governer Twitter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*JrZhsBkYrRe_RkbG_xCrfg.jpeg" /><figcaption>Pandora</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*DOqRAuevnmzoqVqBD3aM5A.jpeg" /><figcaption>Parse</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*O2CSdTfusr2Y0RfTKqYfZw.jpeg" /><figcaption>PayPal</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*mxCT-U3M3OWxHrpF-4oiaw.jpeg" /><figcaption>Peta</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*LOx0zm0xlNsRPCqo-u4KDg.jpeg" /><figcaption>Piggybank</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*i509Ye80UBtdtJL5ox4DZA.jpeg" /><figcaption>Pinterest</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*hMF-15NDngGveyfcv561uw.jpeg" /><figcaption>POP! Wed Co</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*0P34zTnLuAsc343i7uSIAg.png" /><figcaption>Product Hunt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*0zgz2oNaH11577HK1-v6WA.png" /><figcaption>Quando</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*sI1Lt7Gdtf2K3s3ZRrzI3w.jpeg" /><figcaption>Quora</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*c19TtJcPoe5aDZtzONrpiw.png" /><figcaption>Rdio</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*OO4dNvWSd2Sm3Pdu-ePx6Q.jpeg" /><figcaption>(Red)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*ZEl097d1TRyuULlVIuKz9w.png" /><figcaption>Reddit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MzhdGiAsRTh_jCWOfDJY8Q.png" /><figcaption>RuPaul’s Drag Race</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*N9MA4712mQwbQFzCoRdg2g.jpeg" /><figcaption>San Francisco Giants</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*PVLyDv9tNY9atsWi6DLpeg.jpeg" /><figcaption>Science Alert</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*pDE4juBXUpt-fPdI8HJisQ.jpeg" /><figcaption>Shake Shack</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*cZE-ZYwFstoa906jp3BzfA.png" /><figcaption>Shorty Awards</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*vgStxtCciwdqLnZXsdp9eg.jpeg" /><figcaption>Shyp</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*BZPtolAQNUgnDw8BefRqTA.png" /><figcaption>Simple</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*FnNiVNoRGIX_JCWeA4_2yg.jpeg" /><figcaption>Smirnoff</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*ANHV5F-zOmnDRFHJ9tvaSA.jpeg" /><figcaption>Snapchat</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*-xFN1_9OZxj1VzIfNolOnw.png" /><figcaption>Spotify</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/180/1*mMcx7mLa-aTmGyGqER6K_A.png" /><figcaption>StackOverflow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*t5khXsLl1I7eFqtDCbLDPQ.jpeg" /><figcaption>T-Mobile</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qYttHxSCJcOxyItfDSrFXg.png" /><figcaption>Target (v1)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*esfbAaXWfnh3HmsINewWRg.jpeg" /><figcaption>Target (v2)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*JhbT8ZZnkFkaRoiHDm3PCw.jpeg" /><figcaption>TechCrunch</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*EIzZ6QXvBVSL8ARbFe0jPQ.png" /><figcaption>TeeSpring</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*J5N6em47j20nUZ84Ikmfmg.jpeg" /><figcaption>Tide</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*g3wozvjcxG-eSqnHV_VV8w.jpeg" /><figcaption>Tin House</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*GhWPBnvMOidmLYgP5oVt7A.png" /><figcaption>Tumblr</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*-13MD9Dg7fJqKDV18uatDg.png" /><figcaption>Twitter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*U2zSgu9N2u6Nhf1QRbXXQw.png" /><figcaption>Two Dots</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*imT1DXZwsLqptPp4MptFJQ.jpeg" /><figcaption>UberFacts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*6VFHaSlzKlYMdWquPo_2Mw.jpeg" /><figcaption>Uber</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Uj11us4ikInAYPvSzL_vqA.jpeg" /><figcaption>Unruly</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*I--flVrTweCovMbREe8neQ.png" /><figcaption>The Verge</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*J5vDYxTvOMVXNggOwZSbMA.png" /><figcaption>Vertical Engine</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Y9mEK3fvc981ZoVQQzma5g.png" /><figcaption>Vevo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*EoQM73cMxbMR5AEwl9dkqw.png" /><figcaption>Vice Sports</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*tDPHuNSk5eMCJFBzxmu02g.png" /><figcaption>Vimeo (v1)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*ELo8b8bPPwOEW6CC2eWLsQ.png" /><figcaption>Vimeo (v2)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*uNvsxe1_ef1zpA3-im9hOw.png" /><figcaption>Vine</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*HZrNbe5EbPxVDhFSa6aD_Q.png" /><figcaption>Virgin</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*annQ6bVnxAcM3bNrXNWicQ.png" /><figcaption>W3C DevTools</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Xul6qZE3YVpb6IllZJJ0gA.jpeg" /><figcaption>WattPad</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/240/1*CuMgc6AspvB7EuNkqk3SSQ.jpeg" /><figcaption>Weather Underground</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*tzmZ4bNlAngfWvK0Ji3ACA.jpeg" /><figcaption>The White House</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*eKf7TwXXIaMimWGzed82vg.jpeg" /><figcaption>Wix</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*YG1a1TdDuyGMtbKxleqyaA.jpeg" /><figcaption>Yahoo!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*S0Wt6Cleuc1wPJxON64Dww.png" /><figcaption>Yelp</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*EzmfLtDcSytdyG1fvlOcMQ.png" /><figcaption>You Now</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*uTluBLZJol02R_WvvTgSaQ.jpeg" /><figcaption>The Young Turks</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*ycBbEyCXPFhUO05LnEQnAw.png" /><figcaption>YouTube</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*PrlyZUoDDDhappr_KCxClQ.jpeg" /><figcaption>Zynga</figcaption></figure><p>Spotted a mistake? Have a logo that should be included? Have a better quality logo for a company that’s already here? Just want to say hi? Feel free to send me an email at adam@adambickford.net.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=839a5978b7a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Event tracking with Google Analytics]]></title>
            <link>https://medium.com/the-javascript-collection/event-tracking-with-google-analytics-8f8dc26063f1?source=rss-96b887bc39c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f8dc26063f1</guid>
            <dc:creator><![CDATA[Adam Bickford]]></dc:creator>
            <pubDate>Wed, 03 Dec 2014 00:16:57 GMT</pubDate>
            <atom:updated>2014-12-03T00:48:03.203Z</atom:updated>
            <content:encoded><![CDATA[<p>With just a few lines of code you can get analytics about specific user interactions on your site. Cross reference successes, failures, and more, with all the great information Google Analytics already provides.</p><p>If you’ve built a website in the last 7–8 years you’ve probably copy pasted a Google Analytics (GA) snippet into your &lt;head&gt; and gotten some nice information about who’s visiting your site. Page views, bounce rates, and browser usage are all great, but what do you do when you want GA to track <em>how </em>people are interacting with your site? To no surprise GA has you covered, and I’ll elaborate on how I used this to get much more in-depth information about email signups on <a href="http://getpiggybank.com/">getpiggybank.com</a>. With event tracking we’re now able to see what percentage of people who click signup get success responses, failures, or nothing at all, as well as information about their referring websites, and much more.</p><p>This article assumes you know a little bit about ajax and jQuery. Here’s what I was working with before:</p><pre>$(&#39;.email-signup-form&#39;).on(&#39;submit&#39;, function (e) {<br>  var $form = $(this);</pre><pre>  $.ajax({<br>    url: &#39;/sendmail&#39;,<br>    type: &#39;POST&#39;,<br>    dataType: &#39;json&#39;,<br>    data: $form.serialize(),<br>    complete: function (data) {<br>      var json = data.responseJSON;<br>      if (json.status == &#39;error&#39;) {<br>        // show error message<br>      }<br>      else {<br>        // show success message<br>      }<br>    }<br>  });<br>});</pre><p>I cut a lot of our actual code out, but the basic gist to take away is that when you submit the form, it sends the serialized form data to the backend, and based on the response, displays either an error message or a success message to the user.</p><p>Now lets incorporate some GA event tracking. We’re going to track 3 events, click, success, and error. The syntax to fire these events off to GA is very simple:</p><pre>ga(&#39;send&#39;, &#39;event&#39;, &#39;category&#39;, &#39;action&#39;, &#39;label&#39;);</pre><p>We can leave those ‘send’ and ‘event’ parameters alone. They simply tell our function to send an event. The ‘category’ param is a name to group the events by, and the ‘action’ param is whatever you want to name the event. That ‘label’ parameter is optional, but we’re going to use it to associate our event with the email submitted by the user. If it succeeds the email will be added to our database, so this is more useful to know if someone fails. If they are failing repeatedly, or if users from a certain referral are having issues, we can pinpoint the problem and hopefully fix it. Current docs on Analytics’ event tracking can be found <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/events">here</a>.</p><p>So our function calls will look something like this:</p><pre>ga(&#39;send&#39;, &#39;event&#39;, &#39;email-signup&#39;, &#39;click&#39;, email);<br>ga(&#39;send&#39;, &#39;event&#39;, &#39;email-signup&#39;, &#39;error&#39;, email);<br>ga(&#39;send&#39;, &#39;event&#39;, &#39;email-signup&#39;, &#39;success&#39;, email);</pre><p>They all have the same category — ‘email-signup’, and then whatever action they pertain to. The email variable being used for the label will need to be defined before being used of course. Alternatively, all of the parameters of the send command have their own field names, so you can send an event just by passing an object like so:</p><pre>ga(&#39;send&#39;, {<br>  &#39;hitType&#39;: &#39;event&#39;,              // Required.<br>  &#39;eventCategory&#39;: &#39;email-signup&#39;, // Required.<br>  &#39;eventAction&#39;: &#39;error&#39;,          // Required.<br>  &#39;eventLabel&#39;: &#39;foo@bar.com&#39;,<br>  <br>  // Doing it this way you can use other field keys <br>  // like hitCallback, should you need a callback to<br>  // fire after the data is saved in GA.<br>  &#39;hitCallback&#39;: function () {<br>    console.log(&quot;Google Analytics — Error event sent&quot;);<br>  }<br>});</pre><p>For more info, the Field reference can be found <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference">here</a>.</p><p>After adding our events, our updated submit handler will look something like this:</p><pre>// Again, simplified for the article<br><br>$(&#39;.email-signup-form&#39;).on(&#39;submit&#39;, function (e) {<br>  var $form = $(this);<br>  <br>  // grab the email from the form<br>  var email = $form.find(&#39;.email-input&#39;).val();<br> <br>  // and send the initial click event to GA<br>  ga(&#39;send&#39;, &#39;event&#39;, &#39;email-signup&#39;, &#39;click&#39;, email);<br> <br>  $.ajax({<br>    url: &#39;/sendmail&#39;,<br>    type: &#39;POST&#39;,<br>    dataType: &#39;json&#39;,<br>    data: $form.serialize(),<br>    complete: function (data) {<br>      var json = data.responseJSON;<br>      if (json.status == ‘error’) {<br><br>        // show error message<br>        // after showing error message, send error event.<br>        ga(&#39;send&#39;, &#39;event&#39;, &#39;email-signup&#39;, &#39;error&#39;, email);<br><br>      }<br>      else {<br><br>        // show success message<br>        // after showing success message, send success event.<br>        ga(&#39;send&#39;, &#39;event&#39;, &#39;email-signup&#39;, &#39;success&#39;, email);<br><br>      }<br>    }<br>  });<br>});</pre><p>After giving our email signup form some good and bad emails for testing, let’s login to Analytics and see what we can see. Once in GA you’ll go to Behavior &gt; Events &gt; Overview. Towards the bottom you will be able to sort by Category, Action, and Label. If you click ‘view full report’ in the bottom right corner you’ll be able to cross reference against other information. You can get more detailed info in this report, but events may take a few minutes to show up. However, you can also view them in real-time by going to Real-time &gt; Events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*aozaVogkP1Ea9FPaUk26gQ.jpeg" /></figure><p>Below I’ve added the referral source (Full Referrer) as a secondary dimension, and we can see where our emails came from, as well as how their interaction with the page went.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*AGxk7MZQKflW6mDV1f8Wxw.jpeg" /><figcaption>“I heart data.”</figcaption></figure><p>The combinations really are endless, and of course, these GA events can be hooked up to whatever page event you want. If you want to know whenever someone hovers over your logo you can do that. Maybe you want to know whenever a bot inputs some text in a hidden input field trying to spam you, you can do that, and then find the source. Or maybe you want to see just how many times people are triggering your site’s easter egg. Creating specific events like this will give you GA’s detailed analysis on specific interactions, and can be an invaluable tool.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f8dc26063f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-javascript-collection/event-tracking-with-google-analytics-8f8dc26063f1">Event tracking with Google Analytics</a> was originally published in <a href="https://medium.com/the-javascript-collection">The JavaScript Collection</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to be treated like a professional]]></title>
            <link>https://medium.com/@adam_bickford/how-to-be-treated-like-a-professional-579bd24a5d6a?source=rss-96b887bc39c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/579bd24a5d6a</guid>
            <dc:creator><![CDATA[Adam Bickford]]></dc:creator>
            <pubDate>Wed, 19 Nov 2014 19:46:05 GMT</pubDate>
            <atom:updated>2014-12-03T00:52:29.360Z</atom:updated>
            <content:encoded><![CDATA[<p>Simple steps to be treated with respect in your field.</p><h4>Step 1: Act like a damn professional.</h4><h4>Step 2: Don’t not act like a professional.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=579bd24a5d6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a basic site with Koa — pt.1]]></title>
            <link>https://medium.com/@adam_bickford/creating-a-basic-site-with-koa-pt-1-f3e1711f7a9?source=rss-96b887bc39c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3e1711f7a9</guid>
            <dc:creator><![CDATA[Adam Bickford]]></dc:creator>
            <pubDate>Thu, 17 Apr 2014 18:20:59 GMT</pubDate>
            <atom:updated>2017-08-29T17:35:39.205Z</atom:updated>
            <content:encoded><![CDATA[<h2>Creating a basic site with Koa</h2><h4>Koa.js — A next generation web framework for node.js</h4><p>8/29/2017 Disclaimer: This tutorial is well out of date nowadays, so please do your own research to verify which parts of this article you end up using or learning from so you don’t run into too much trouble down the road. I’m so glad to see this still gets views from time to time, and I hope it has helped those of you who found yourselves here.</p><p>I’ll preface this by saying I’m still new to backend development, but I have done a little bit of work with Node and would like to document my experience with <a href="http://koajs.com/">Koa.js</a>, a newer framework for Node from the team behind the <a href="http://expressjs.com/">Express.js</a> framework.</p><p>I’m currently using Koa to refactor our marketing site for <a href="http://getpiggybank.com/">Piggybank</a>. It’s awesome because it’s extremely lightweight, and extremely modular. It has a lot of capabilities that are easily customized by just requiring the tools you need.</p><h4>Prerequisite — Updating Node</h4><p>First things first, Koa needs to run in Node’s “harmony” mode, so you’ll need to upgrade to version 0.11.9 or newer. I suggest using the <a href="https://github.com/creationix/nvm">Node Version Manager</a> from <a href="https://github.com/creationix">creationix</a>. Updating (or installing for the first time, if you don’t have Node yet) with nvm allows you to install different versions without uninstalling your current version. This way you can switch back and forth between versions should some of your current projects not work with this newer version of Node. It’s as easy as running the nvm install script…</p><pre>$ sudo curl https://raw.github.com/creationix/nvm/v0.5.1/install.sh | sh<br><br>// You can find the most current version at <br>// <a href="https://github.com/creationix/nvm">https://github.com/creationix/nvm</a></pre><p>and then installing 0.11.9…</p><pre>$ nvm install 0.11.9</pre><p>then telling nvm to <em>use</em> version 0.11.9.</p><pre>$ nvm use 0.11.9</pre><p>After that you can list all the versions of Node you have installed with:</p><pre>$ nvm ls<br>//<em>outputs something like:</em><br>       .nvm<br>    v0.10.8<br>-&gt;  v0.11.9 //arrow indicates that we&#39;re already using v0.11.9</pre><p>You can also set a default version with:</p><pre>$ nvm alias default 0.10.8</pre><p>So you can easily switch back to that version by inputting:</p><pre>nvm use default</pre><p>Handy! You can actually set as many aliases as you want with the command:</p><pre>nvm alias [name] [version]</pre><p>(Thanks to Gergely Nemeth (@nthgergo) for the `nvm alias` tip).</p><h4>Now lets get started with Koa</h4><p>Create a new directory where your project will be, and from the terminal run `npm init`. This will setup your package.json file. For the purposes of this demo you can just hit enter through all of it. Now to install Koa, in your project directory run:</p><pre>$ npm install koa --save</pre><p>Notice that save tag at the end. If you are not already familiar with it, it will tell npm to automatically add the npm module you are installing to the dependencies in your package.json file. Since Koa is a collection of small modules, you’ll more than likely be installing a fair amount of them. So, that functionality comes in extra handy, saving you the steps of adding it yourself and figuring out which version you need. It is the “Node PACKAGE manager”, why not let it manage our packages for us?</p><p>Next lets create our app. In your project directory, create a file such as server.js, and set up the basics—</p><pre>//<em>We&#39;re using koa, so lets require it, (duh).</em><br>var koa = require(&#39;koa&#39;);</pre><pre>//<em>and initialize it with</em><br>var app = koa();</pre><pre>//<em>and then give it a port to listen for</em><br>app.listen(8008);<br>console.log(&#39;Koa listening on port 8008&#39;);</pre><p>But as it sits, this app doesn’t do shit, so let’s make it handle some basic pages.</p><h4>Adding some of Koa’s middleware</h4><p>Koa’s <a href="https://github.com/koajs/koa/wiki">middleware</a> makes up all of the modular building blocks of Koa, which allow us to include only what we need. We could have done the most absolute barebones ‘Hello World’ example and made the app respond when you hit the port, but why don’t we check out some of koa’s middleware to setup some basic routes! In the terminal let’s install the `koa-route` module which will let us handle routes in Koa.</p><pre>$ npm install koa-route --save</pre><p>Then we can add a little onto our server.js file.</p><pre>var koa = require(&#39;koa&#39;);<br>var route = require(&#39;koa-route&#39;); //<em>require it</em></pre><pre>var app = koa();</pre><pre>//<em>and we&#39;ll set up 2 routes, for our index and about me pages</em><br>app.use(route.get(&#39;/&#39;, index));<br>app.use(route.get(&#39;/about&#39;, about));</pre><pre>app.listen(8008);<br>console.log(&#39;Koa listening on port 8008&#39;);</pre><p>Using the koa-route middleware is pretty straightforward. `app.use()` tells our Koa app to use whatever middleware we pass to it. The 2 arguments that we passed to our `route.get()` method are the route and a generator function (that we have yet to define) which tells that route what to do. So, we’ll have to define an `*index()` generator and an `*about()` generator.</p><p>Here’s a short description of JavaScript generators from <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">MDN</a> —</p><blockquote>“Generators are functions which can be exited and later re-entered. Their context (variable bindings) will be saved across re-entrances.”</blockquote><p>Generators are still pretty fresh to JavaScript and still pretty fresh to me. So, instead of me trying to expand on that and possibly confusing you, I’d suggest perusing the many “What are JavaScript generators?” articles (such as <a href="http://tobyho.com/2013/06/16/what-are-generators/">this one</a> from tobyho.com) that are all over the web for more information.</p><p>Back to setting up our simple generators so our app can actually do something when we hit the ‘/’ and ‘/about’ routes that we setup. We won’t be changing anything, so in the context of this demo they will behave pretty much like a regular function. You might think, “If we’re not using them like a generator then couldn’t we just pass a regular function?” Well, not quite. `route.get()` seems to be expecting a generator, and will throw a 500 error if you try and give it a regular function.</p><pre>//<em>The asterisk is key, designates a function as a generator.</em><br>function *index() {<br>  this.body = &quot;&lt;h1&gt;Hello! This is my home page!&lt;/h1&gt;&quot;;<br>}<br><br>function *about() {<br>  this.body = &quot;&lt;h2&gt;My name is Adam and I like JavaScript&lt;/h2&gt;&quot;;<br>}</pre><p>Within these generators `this` refers to the Koa context. From the Koa.js docs —</p><blockquote>A Koa Context encapsulates node’s request and response objects into a single object which provides many helpful methods for writing web applications and APIs. These operations are used so frequently in HTTP server development that they are added at this level instead of a higher level framework, which would force middleware to re-implement this common functionality.</blockquote><blockquote>A Context is created <em>per </em>request, and is referenced in middleware as the receiver, or the `this` identifier.</blockquote><h4>Startin’ her up</h4><p>So with our comments stripped out, our little Koa app should look something like this:</p><pre>var koa = require(&#39;koa&#39;);<br>var route = require(&#39;koa-route&#39;);</pre><pre>var app = koa();</pre><pre>app.use(route.get(&#39;/&#39;, index));<br>app.use(route.get(&#39;/about&#39;, about));</pre><pre>function *index() {<br> this.body = &quot;&lt;h1&gt;Hello! This is my home page!&lt;/h1&gt;&quot;;<br>}</pre><pre>function *about() {<br> this.body = &quot;&lt;h2&gt;My name is Adam and I like JavaScript&lt;/h2&gt;&quot;;<br>}</pre><pre>app.listen(8008);<br>console.log(&#39;Koa listening on port 8008&#39;);</pre><p>Not bad at all! Around 20 lines and we’ve got a barebones Koa app running. Almost. We should probably run it and make sure it all works, yeah?</p><p>Go back to your terminal and punch in:</p><pre>$ node --harmony server.js</pre><p>There’s that harmony mode I mentioned at the beginning. There are ways to get around typing that every time but I’ll go over that in part 2. You’ll see that “Koa listening on port 8008” print to your terminal and then in your browser you can navigate to ‘localhost:8008’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*Fs218V4_SEBi96YWhL7ZOg.jpeg" /><figcaption>fig. 1 — Home page</figcaption></figure><p>How about that? We’ve gotten a response from our Koa server and have a simple home page. Let’s also test our “about” page. Navigate to “localhost:8008/about”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*V1iVmBqTbflAGbLQhTa42g.jpeg" /><figcaption>fig. 2 — About page</figcaption></figure><p>Great, now we have a separate page where we can describe ourselves!</p><p>Credits:<br>I first learned about NVM from <a href="http://www.marcusoft.net/2014/03/koaintro.html">marcusoft.net’s Koa tutorial</a>, and I have also learned a ton from the <a href="http://koajs.com/">Koa.js docs</a> and their <a href="https://github.com/koajs/examples">examples hosted on GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3e1711f7a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>