<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Equivalent Exchange</title>
    <description>On a mission to build beautiful and awesome things with code. Plenty of learning and adventure on the horizon!
</description>
    <link>http://gregrv.github.io/eqex/</link>
    <atom:link href="http://gregrv.github.io/eqex/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Mon, 07 Dec 2015 06:33:14 +0000</pubDate>
    <lastBuildDate>Mon, 07 Dec 2015 06:33:14 +0000</lastBuildDate>
    <generator>Jekyll v2.4.0</generator>
    
      <item>
        <title>All About that FE FP - Diving into Elm</title>
        <description>&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/elm_logo.png&quot; alt=&quot;Elm logo&quot;&gt;&lt;/p&gt;

&lt;p&gt;A few months ago, a relatively new programming language by the name of &lt;a href=&quot;http://elm-lang.org/&quot;&gt;Elm&lt;/a&gt; caught my attention. In a nutshell, Elm is a client-side language that utilizes the functional programming paradigm and compiles down to JavaScript. If you visit its landing page, some of the described benefits of using Elm include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No runtime exceptions&lt;/li&gt;
&lt;li&gt;It&amp;#39;s incredibly fast (as compared to popular JavaScript libraries, including React)&lt;/li&gt;
&lt;li&gt;A clean syntax&lt;/li&gt;
&lt;li&gt;Ability to incorporate existing JavaScript libraries in Elm apps&lt;/li&gt;
&lt;li&gt;A Time-Travelling Debugger&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While I&amp;#39;ve only had a chance to test a few of these claims for myself with the tutorial I just completed, I can say that I do like what I&amp;#39;m seeing so far. I wanted to write down a few immediate impressions, as well as notes for my own reference as I dive deeper into Elm.&lt;/p&gt;

&lt;p&gt;To get a small sense as to how Elm works, here&amp;#39;s a quick overview:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elm structures its applications between Models, Views, and Updates

&lt;ul&gt;
&lt;li&gt;Models and Views for the most part behave as you&amp;#39;d expect if you&amp;#39;re familiar with other app architectures (ie MVC), and Updates determine what type of behavior will take place in response to user interaction&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;-- An example of a few Actions, followed by their respective Update behavior

type Action
  = NoOp
  | Sort
  | Delete Int
  | Mark Int

update : Action -&amp;gt; Model -&amp;gt; Model
update action model =
  case action of
    NoOp -&amp;gt;
      model

    Sort -&amp;gt;
      { model | entries = List.sortBy .points model.entries }

    Delete id -&amp;gt;
      let
        remainingEntries =
          List.filter (\e -&amp;gt; e.id /= id) model.entries
      in
        { model | entries = remainingEntries }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;All data is immutable, so whenever things change, we pass around NEW instaces of the respective record(s)&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;-- This function updates a model&amp;#39;s &amp;#39;phraseInput&amp;#39; property
-- with whatever is passed along in &amp;#39;contents&amp;#39;,
-- and returns a new instance of that model (the original is unaffected)

UpdatePhraseInput contents -&amp;gt;
  { model | phraseInput = contents }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Elm&amp;#39;s compiler is mindful of the TYPE of data you&amp;#39;re passing around, so it&amp;#39;s best practice to specify said types in each function&amp;#39;s signature&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;-- This signature for the &amp;#39;sum&amp;#39; function expects an Integer,
-- another Integer, and will return a new Integer

sum : Int -&amp;gt; Int -&amp;gt; Int
sum 3 4 -- returns 7
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;There are several ways to require and specify dependencies&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;import Html.Events exposing (..)
import String exposing (toUpper, repeat, trimRight)
import StartApp.Simple as StartApp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;As with most functional programming languages, you can pipe data through multiple functions&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;-- This accepts a String message, an Integer for how many
-- times you want it repeated, and returns a String of
-- the resulting text uppercased with trailing whitespace trimmed.

repeatText : String -&amp;gt; Int -&amp;gt; String
repeatText message times =
  message ++ &amp;quot; &amp;quot;
    |&amp;gt; toUpper
    |&amp;gt; repeat times
    |&amp;gt; trimRight
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now that you have a sense of how Elm works, the demo app that I built following the &lt;a href=&quot;https://pragmaticstudio.com/courses/elm&quot;&gt;Pragmatic Studio tutorial&lt;/a&gt; (which I definitely recommend) is a simple &amp;quot;Bingo&amp;quot; app where you can create new entries, sort them by points, and mark them once they&amp;#39;ve been &amp;quot;called&amp;quot;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/bingo.gif&quot; alt=&quot;Buzzword Bingo&quot;&gt;&lt;/p&gt;

&lt;p&gt;The tutorial did a great job explaining the Elm fundamentals, and I look forward to diving into their follow-up course about &lt;a href=&quot;https://pragmaticstudio.com/courses/elm-signals&quot;&gt;Elm Signals, Mailboxes, &amp;amp; Ports&lt;/a&gt;. Some of the syntax still seems a bit weird to me (such as the numerous empty brackets when there are no attributes or children to add to elements), but I&amp;#39;ll reserve judgement until I get more exposure and practice. That being said, I already do greatly appreciate the compiler&amp;#39;s error messages, as well as the Elm REPL. These two tools made it super easy to begin learning and debugging, and are wonderfully done.&lt;/p&gt;

&lt;p&gt;As mentioned, I&amp;#39;ll do another post with thoughts, impressions, and misc. notes for the next Elm course. As of right now, my favorite tool to use for UI&amp;#39;s is still React, but who knows, maybe that&amp;#39;ll soon change! In any case, cheers to functional programming in the front-end!&lt;/p&gt;
</description>
        <pubDate>Sun, 06 Dec 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/all-about-that-fe-fp---diving-into-elm.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/all-about-that-fe-fp---diving-into-elm.html</guid>
        
        
      </item>
    
      <item>
        <title>Learn, Teach, Repeat - Joining the Offcourse Team</title>
        <description>&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/offcourse-livingroom.jpg&quot; alt=&quot;Offcourse Living Room&quot;&gt;&lt;/p&gt;

&lt;p&gt;This past Summer I had the opportunity to meet and join the team behind &lt;a href=&quot;https://offcourse-nightly.herokuapp.com/&quot;&gt;Offcourse&lt;/a&gt;- an open source educational platform based out of Amsterdam. Though still early in development, when released, Offcourse will provide an environment for individuals to craft their own curriculum on any subject and share it freely with the world. Whether it&amp;#39;s learning a new programming language, or learning how to bake a cake, community members ranging from beginners to industry experts will have a centralized space in Offcourse for creating and exploring these customized learning paths.&lt;/p&gt;

&lt;p&gt;Offcourse is comprised of a small core team, who&amp;#39;s currently collaborating internationally. These passionate life-long learners are working diligently around the clock (and the globe) to help make learning, sharing, and teaching as accessible as possible. Like the early stages of many startups, Offcourse is currently researching various fronts and applying new insights learned along the way. As the year&amp;#39;s end draws near, a few of the team&amp;#39;s goals include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;completing a beautiful, fast, and mobile-friendly UI&lt;/li&gt;
&lt;li&gt;refactoring parts of the codebase to utilize new tech (namely Clojurescript)&lt;/li&gt;
&lt;li&gt;regular blog posts about covering Offcourse&amp;#39;s progress&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find an early glimpse of the prototype UI &lt;a href=&quot;https://offcourse-nightly.herokuapp.com/featured&quot;&gt;here&lt;/a&gt;. In future releases, you&amp;#39;ll be able to peruse the different courses and click on the tags for things you may want to learn later. If you have any thoughts, opinions, or questions about the platform, the team would love to hear it! Feedback has been vital in steering the direction of Offcourse, and it&amp;#39;s mission to help shape the future of education. We&amp;#39;ve been fortunate to consistently receive feedback from college students, software engineers, academics, and we&amp;#39;d love to hear what you have to say, as well!&lt;/p&gt;

&lt;p&gt;Happy learning,&lt;/p&gt;

&lt;p&gt;Offcourse&lt;/p&gt;
</description>
        <pubDate>Sun, 29 Nov 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/learn-teach-repeat-joining-the-offcourse-team.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/learn-teach-repeat-joining-the-offcourse-team.html</guid>
        
        
      </item>
    
      <item>
        <title>Day of the Devs &#39;15</title>
        <description>&lt;p&gt;Yesterday I attended &lt;a href=&quot;http://www.dayofthedevs.com/&quot;&gt;Day of the Devs&lt;/a&gt;- an awesome annual event (with this being the third) where indie video game developers are able to showcase projects that they’ve been working on, including some that are just about ready for release. This is particularly exciting because, despite being indie titles with considerably lower budgets than larger studios, some of them have gained a ton of traction in the industry, so being able to play them before their official release was a great time.&lt;/p&gt;

&lt;p&gt;Something that I really appreciate about a lot of indie titles is that more often than not, the team wants to create something unique and personal, as opposed to churning out a new iteration of some franchise annually like a lot of companies currently bank on. The games at DotD’s were bursting with character, beautiful art, and definitely made an impression. It’s really cool of companies like Humble Bundle, Unreal, Twitch, and Facebook to sponsor these kinds of events and provide a venue for smaller companies to bring their projects to the community.&lt;/p&gt;

&lt;p&gt;I got some footage of the event which you can check out below. I had a blast and would encourage anyone who’s remotely interested in video games, programming, technology, or just the creative space in general to check it out next year! The best part of these kinds of events is chatting with the creators who are usually super excited to talk more about their work and answer any questions. There’s a ton of passion, creativity, and energy put into all of these, which is super inspiring and makes me want to get back to coding my own fun projects :)&lt;/p&gt;

&lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;&lt;script&gt;(function(d, s, id) {  var js, fjs = d.getElementsByTagName(s)[0];  if (d.getElementById(id)) return;  js = d.createElement(s); js.id = id;  js.src = &quot;//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.3&quot;;  fjs.parentNode.insertBefore(js, fjs);}(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));&lt;/script&gt;&lt;div class=&quot;fb-video&quot; data-allowfullscreen=&quot;1&quot; data-href=&quot;/GregRV/videos/vb.24611787/10101841477441487/?type=3&quot;&gt;&lt;div class=&quot;fb-xfbml-parse-ignore&quot;&gt;&lt;blockquote cite=&quot;https://www.facebook.com/GregRV/videos/10101841477441487/&quot;&gt;&lt;a href=&quot;https://www.facebook.com/GregRV/videos/10101841477441487/&quot;&gt;&lt;/a&gt;&lt;p&gt;Awesome stuff from Day of the Devs! Anyone down for some co-op? :)&lt;/p&gt;Posted by &lt;a href=&quot;#&quot; role=&quot;button&quot;&gt;Gregory Allan&lt;/a&gt; on Saturday, November 7, 2015&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Sun, 08 Nov 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/day-of-the-devs.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/day-of-the-devs.html</guid>
        
        
      </item>
    
      <item>
        <title>Weekend Mentoring at NodeSchool</title>
        <description>&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/nodeschool.jpg&quot; alt=&quot;NodeSchool SF&quot;&gt;&lt;/p&gt;

&lt;p&gt;Immersing myself in the tech community (and community in general) has hands-down been one of my favorite things to do since moving to San Francisco in 2013. When I first thought I &lt;em&gt;might&lt;/em&gt; be interested in learning to program a few years ago, I remember how desperate I was to find someone - anyone - who I could go to with my questions. Beyond that, it would have been amazing to find someone who made their way into the industry through “non-traditional” means (self-taught, attended an “immersive” aka “coding bootcamp”, etc) just so I knew that the path I wanted to embark on wasn’t restricted to another 4-year program. For these reasons (and many more), I try to take any opportunity I can to participate in coding workshops and similar events that are free to all those who are interested. At its core, these events allow everyone to meet other members of the community, get help on whatever they’re coding, or simply get their questions answered- from absolute beginner to industry professional.&lt;/p&gt;

&lt;p&gt;With that, &lt;a href=&quot;http://nodeschool.io/&quot;&gt;NodeSchool&lt;/a&gt; is definitely one of my favorite organizations to participate in. Granted, I’ve only been twice (once as a student, another as a mentor), but both have been amazing experiences with truly awesome people who want to help an eager group of learners, however possible. The curriculum is free and available on their &lt;a href=&quot;http://nodeschool.io/&quot;&gt;site&lt;/a&gt;, and offers digestible lessons that range from the very basics of JavaScript, to more elaborate and specific “electives”, including frameworks and libraries like React, Koa, and WebGL. The courses are for the most part ran in your Terminal, and are a great way to quickly dive into a new technology and get a feel for things.&lt;/p&gt;

&lt;p&gt;As you can already tell, if you haven&amp;#39;t checked out NodeSchool yet, I would highly encourage you to do so! Whether you’re looking to attend as a student or a mentor, it is a great time, and know that you’re contributing to a community who will want to pay it forward and keep the learning going!&lt;/p&gt;
</description>
        <pubDate>Sun, 25 Oct 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/weekend-mentoring-at-nodeschool.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/weekend-mentoring-at-nodeschool.html</guid>
        
        
      </item>
    
      <item>
        <title>HRX Startup Weekend</title>
        <description>&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/abp.jpg&quot; alt=&quot;AwesomeBox.Party&quot;&gt;&lt;/p&gt;

&lt;p&gt;This past weekend I attended &lt;a href=&quot;http://startupweekend.org/&quot;&gt;Startup Weekend&lt;/a&gt;, an event where engineers, designers, entrepreneurs and the like spend 48 hours together to not only create a prototype of a new product, but to also define a sound business model to support the idea. For many of us, the business side of things was brand new territory. As grads from Hack Reactor, we were expecting to spend our time this weekend coding away like a usual hackathon, but this event provided a different kind of challenge, and we were eager to get cracking.&lt;/p&gt;

&lt;h3&gt;The Pitch&lt;/h3&gt;

&lt;p&gt;Our group pitched and created AwesomeBox.Party. ABP allows users to have shared control over the music playlist at social events. By visiting the site and joining your event’s room, anyone can view the playlist, add to the song queue, and even bump up song priority using AwesomeBucks (in-app currency). ABP allows party goers and party throwers control over the musical atmosphere, so everyone can do their part to keep the party rockin.&lt;/p&gt;

&lt;h3&gt;Planning Stages&lt;/h3&gt;

&lt;p&gt;After we formed our team Friday night, we got started by white boarding our general plan for the weekend. We established what our MVP looked like, as well as stretch goals that we thought would be fun and challenged to work on before presenting the final product. We also discussed what kind of technologies would be best suited for our project, and much to my delight, the team was very excited about using React.js for the front-end. I was also excited to see that we’d be using Socket.io for the real-time communication between client/server, as I&amp;#39;ve yet to use sockets.&lt;/p&gt;

&lt;h3&gt;Hackers =&amp;gt; Entrepreneurs?&lt;/h3&gt;

&lt;p&gt;As mentioned before, this event was a bit different from what most of our group expected. As the title implies, there is an obvious emphasis on the idea of building a startup, but even knowing that, we still couldn’t anticipate just how much business foresight we needed for ABP. We were told to build a business plan for monetization, determine the demographic, consider any legal issues, get real feedback from the public (if they would actually use our product, what should change, would they pay for X, etc). As an engineer, I definitely have more appreciation for the teams who take care of all these things- it’s tricky stuff!&lt;/p&gt;

&lt;h3&gt;Final Thoughts&lt;/h3&gt;

&lt;p&gt;Hands-down the best part of the weekend meeting and working with this awesome group. I can say with confidence that we all learned something new, and had a lot of fun in the process. Even when thrown into something completely new, everyone’s great attitudes and communication skills made the entire process much more streamlined and easier to move through each feature efficiently. I’d definitely be up for working with any of them again in the future! #TeamAwesomeBox&lt;/p&gt;
</description>
        <pubDate>Tue, 06 Oct 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/hrx-startup-weekend.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/hrx-startup-weekend.html</guid>
        
        <category>hackathon</category>
        
        <category>startup weekend</category>
        
        <category>hrx</category>
        
        <category>awesomebox</category>
        
        
      </item>
    
      <item>
        <title>Comment Driven Development with SpeckJS</title>
        <description>&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/speckjs.png&quot; alt=&quot;SpeckJS Splash&quot;&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://speckjs.github.io/&quot;&gt;SpeckJS&lt;/a&gt; is an npm module that parses JavaScript and outputs unit tests. SpeckJS currently supports the Tape, Jasmine, and Mocha/Chai testing frameworks. Aside from it&amp;#39;s standalone core module, SpeckJS also comes with plugins for &lt;a href=&quot;https://github.com/speckjs/grunt-speckjs&quot;&gt;Grunt&lt;/a&gt;, &lt;a href=&quot;https://github.com/speckjs/gulp-speckjs&quot;&gt;Gulp&lt;/a&gt; and &lt;a href=&quot;https://github.com/speckjs/atom-speckjs&quot;&gt;Atom&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Our goal with SpeckJS is to make it as easy as possible to get started using Test Driven Development on a new project, to quickly add unit tests to your existing project, or anywhere in between. We know the value of well-tested code, and SpeckJS is here to make that simpler than ever.&lt;/p&gt;

&lt;p&gt;To see just how easy it is to use, here&amp;#39;s a GIF of the Atom plugin in action:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/speckjs-atom.gif&quot; alt=&quot;SpeckJS for Atom&quot;&gt;&lt;/p&gt;

&lt;p&gt;I&amp;#39;ll be adding more posts soon offering an inside look at the development of SpeckJS, including technical hurdles our team encountered, interesting JavaScript discoveries we made, our Git and issue workflow, and more! But for now, you can visit &lt;a href=&quot;http://speckjs.github.io/&quot;&gt;http://speckjs.github.io&lt;/a&gt; to learn more! Happy testing!&lt;/p&gt;
</description>
        <pubDate>Thu, 24 Sep 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/comment-driven-development-with-speckjs.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/comment-driven-development-with-speckjs.html</guid>
        
        
      </item>
    
      <item>
        <title>Special Delivery! Creating an npm Package</title>
        <description>&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/package.jpg&quot; alt=&quot;Special Delivery&quot;&gt;&lt;/p&gt;

&lt;h3&gt;Sharing is Caring&lt;/h3&gt;

&lt;p&gt;As developers, we rely heavily on libraries written by other members of the community on a daily basis. That&amp;#39;s actually one of the best things (in my opinion) about being in this space- people are constantly pushing themselves to share knowledge, tools, and practices to help make others&amp;#39; workflows and daily lives that much easier. Some of these libraries come from huge companies like Google and Facebook, while other (just as popular) tools are contributed by small teams (or even individuals) who do this purely out of hobby. One of the best parts about this system is that creating and sharing your own package is made incredibly easy by npm, the node.js package management system. Who knows, maybe you&amp;#39;ll author the next &lt;em&gt;(insert 20XX hawt.js framework)&lt;/em&gt;!&lt;/p&gt;

&lt;h3&gt;Let&amp;#39;s Get Started&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;This tutorial will assume you have basic skills with command-line and JavaScript&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This example package that we&amp;#39;re about to create is simply responsible for exporting a single function that console log&amp;#39;s a message.&lt;/p&gt;

&lt;h4&gt;npm init&lt;/h4&gt;

&lt;p&gt;From the command-line, enter &lt;code&gt;npm init&lt;/code&gt;. This will guide you through a series of questions including: who is the author, package name, package description, etc. Don&amp;#39;t worry about having all of these answers right away- you can always edit the file that this prompt generates. When you are done answering the questions, it will generate a &lt;code&gt;package.json&lt;/code&gt; file for you will all the information you just entered. You&amp;#39;re pretty much halfway there to publishing your package!&lt;/p&gt;

&lt;h4&gt;package.json &amp;amp; index.js&lt;/h4&gt;

&lt;p&gt;In &lt;code&gt;package.json&lt;/code&gt;, you will see a property named &lt;code&gt;main&lt;/code&gt;, which represents the entry-point, or main file to load in order to start using your package. By default, it will assign the name &lt;code&gt;index.js&lt;/code&gt; (which you can always change).
Open &lt;code&gt;index.js&lt;/code&gt; in your text editor, and we&amp;#39;re going create a simple function to export, like so:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-text&quot; data-lang=&quot;text&quot;&gt;exports.myFunction = function() {
  console.log(&amp;quot;Here&amp;#39;s a message from your new module!&amp;quot;);
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4&gt;npm login&lt;/h4&gt;

&lt;p&gt;From the command-line, run &lt;code&gt;npm login&lt;/code&gt; which will either guide you through signing up for npm, or logging into your existing account.&lt;/p&gt;

&lt;h4&gt;npm publish&lt;/h4&gt;

&lt;p&gt;Once, you&amp;#39;re logged-in, run &lt;code&gt;npm publish&lt;/code&gt; from the same directory as your &lt;code&gt;package.json&lt;/code&gt; file.&lt;/p&gt;

&lt;h4&gt;That&amp;#39;s It!&lt;/h4&gt;

&lt;p&gt;If you visit the url &amp;quot;https://www.npmjs.com/~&lt;em&gt;your&lt;/em&gt;user&lt;em&gt;name&lt;/em&gt;&amp;quot;, you can view your new package, including statistics like download count, GitHub issues, etc. And now, most importantly, people can use your new package by running the command &lt;code&gt;npm install _your_package_name_&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&amp;quot;How cool is that?!&amp;quot;&lt;/strong&gt; &lt;em&gt;(Rivers Cuomo voice)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;Resources&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;http://nick.balestra.ch/2015/pick-your-parsing/&quot;&gt;Pick Your Parsing with Nick Balestra&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://lukesavage.me/technical/2015/09/05/deep-dive-into-deep-equal/&quot;&gt;Deep dive into deepEqual with Luke Savage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://zachsebag.com/2015/09/05/tape-or-how-i-learned-to-stop-worrying-and-love-TDD.html&quot;&gt;Stop Worrying and Love TDD with Zach Sebag&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sat, 05 Sep 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/special-delivery-creating-an-npm-package.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/special-delivery-creating-an-npm-package.html</guid>
        
        
      </item>
    
      <item>
        <title>Holy Macro-roni!</title>
        <description>&lt;h1&gt;Create Your Own JavaScript Operator using Macros&lt;/h1&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/homer_macaroni.gif&quot; alt=&quot;Homac&quot;&gt;&lt;/p&gt;

&lt;h3&gt;We want more&lt;/h3&gt;

&lt;p&gt;Recently, I&amp;#39;ve been learning more about how to get the most out of our favorite programming languages. Everyone knows that JavaScript in particular can quickly become unweidly and unsightly with just a bit of nesting, callbacks, etc, and many developers have already taken into their own hands to come up with solutions to produce more elegant, yet just as effective code from the natural (often referred to as &amp;quot;vanilla&amp;quot;) language. One example of this is &lt;a href=&quot;http://coffeescript.org/&quot;&gt;Coffeescript&lt;/a&gt;- a language that compiles into JavaScript, but is much more aesthetically pleasing to work with.&lt;/p&gt;

&lt;h3&gt;Enter, macros&lt;/h3&gt;

&lt;p&gt;As great as these other languages are, there&amp;#39;s also another really nifty solution- creating macros. A macro is simply a piece of code that parses and transforms the code around it. Like most concepts in programming, this is a very basic idea, but also incredibly powerful when you consider just how it can help push a language forward. In this post, I will cover a basic example of how to utilize &lt;a href=&quot;http://sweetjs.org/&quot;&gt;Sweet.js&lt;/a&gt;- a library for creating macros in JavaScript- to create your own JavaScript operator!&lt;/p&gt;

&lt;h3&gt;The awesome &amp;quot;Rocket operator&amp;quot;&lt;/h3&gt;

&lt;p&gt;The code snippets from this blog are taken from an excellent Sweet.js course on &lt;a href=&quot;http://www.pluralsight.com/courses/sweet-js-get-started&quot;&gt;Plurlsight&lt;/a&gt;, which I&amp;#39;d highly recommend checking out if you like what you see here. What we&amp;#39;re going to do is create a new operator to clean up the normal boilerplate code we&amp;#39;d expect to see in a regular JavaScript promise.&lt;/p&gt;

&lt;p&gt;Here, we see a normal JavaScript promise (disregard the $ followed by numbers, that&amp;#39;s known as &amp;quot;variable hygiene&amp;quot; which Zach does a great job explaining &lt;a href=&quot;http://zachsebag.com/2015/08/29/losing-your-hygienity.html&quot;&gt;here&lt;/a&gt;). This is a basic example, but this syntax can get messy quick.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/promise.png&quot; alt=&quot;promise&quot;&gt;&lt;/p&gt;

&lt;p&gt;Now, we can use Sweet.js to create a macro to take the place of all that syntax, and still have it be incredibly expressive! Here&amp;#39;s what&amp;#39;s happening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &amp;#39;=&amp;gt;&amp;#39; represents a macro that does the same thing as a function &amp;quot;fat-arrow&amp;quot; from Coffeescript or ES2015 (aka ES6).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &amp;#39;==&amp;gt;&amp;#39; represents our new macro that condenses promise boilerplate.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &amp;#39;12&amp;#39; refers to our new operator&amp;#39;s precedence (you can assign any value you wish). Every operator has their own precedence, which you can find &lt;a href=&quot;http://sweetjs.org/doc/main/sweet.html#operator-precedence&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The { $l, $r } represents whatever will be found to the immediate left and to the right of our &amp;#39;==&amp;gt;&amp;#39; operator.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The =&amp;gt; #{ $l.then($r) } represents our expected output. In this case, we&amp;#39;ll have the code from the left of the operator, followed by a call to .then, passing the code from the right of the operator as an argument to .then.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/rocket_macro.png&quot; alt=&quot;rocket macro&quot;&gt;&lt;/p&gt;

&lt;p&gt;And here is your new &amp;quot;Rocket&amp;quot; operator in action! Ain&amp;#39;t it pretty?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/rocket_operator.png&quot; alt=&quot;rocket operator&quot;&gt;&lt;/p&gt;

&lt;h3&gt;Niceee. But why use macros instead of XYZ?&lt;/h3&gt;

&lt;p&gt;With some basic macro use, you have the power to extend your favorite programming language. Read about an awesome ES20XX feature/function that you wish were available today?? PutAMacroOnIt&lt;/p&gt;

&lt;h3&gt;Additional Resources&lt;/h3&gt;

&lt;p&gt;If you want to learn more about macros and Sweet.js, here are a few awesome blog posts to help you get started!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://nick.balestra.ch/2015/sweetjs-case-macros-for-javascript/&quot;&gt;Case-based Macros with Nick Balestra&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://lukesavage.me/technical/2015/08/29/sweetjs-and-rule-based-macros/&quot;&gt;Rule-based Macros with Luke Savage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://zachsebag.com/2015/08/29/losing-your-hygienity.html&quot;&gt;Macro Hygienity with Zach Sebag&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.pluralsight.com/courses/sweet-js-get-started&quot;&gt;Pluralsight Sweet.js Tutorial&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sat, 29 Aug 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/holy-macro-roni.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/holy-macro-roni.html</guid>
        
        
      </item>
    
      <item>
        <title>Balance</title>
        <description>&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/iroh.jpg&quot; alt=&quot;Iroh&quot;&gt;&lt;/p&gt;

&lt;p&gt;Today marks the half-way point of my time as a Hack Reactor student. If there’s anything that I’ve learned over the past 6 weeks (aside from a boatload of JavaScript), it’s that maintaining balance during even the most arduous endeavors is incredibly important. I’ve been fortunate to be a part of a program that takes this into great consideration before we step foot through the (digital) door. They’ve allotted time specifically for exercise every other day of the ‘work’ week, which has been critical for keeping me in a state where I can spend hours at the desk (alternating between sitting and standing mode), and still be active enough in any given week where this intense studying isn’t detrimental to my health.&lt;/p&gt;

&lt;p&gt;This is the general idea that I really need to adhere to during second half of the program. We will be afforded a ton of autonomy in how we move forward in the program, and with that, it’s up to me to maintain this schedule of regular activity and balance. I’ve used the metaphor a million times, but this type of learning is like a marathon, not a sprint, and with that I need to make sure I’m keeping my body in as good of shape to remain at an optimal level for the following 6 weeks, and beyond.&lt;/p&gt;

&lt;p&gt;Obviously, this takes the mind into consideration as well. In order for me to stay mentally engaged and continue giving 100% to the program, what I do when I’m away from the keyboard is just as important as what I’m doing while I’m cracking away at JavaScript. Having this healthy balance will allow me to return to the work feeling reinvigorated, and often times inspired. It’s times like those that I produce my best work, so for anyone with similar behavior, it’s important to stay congnizant of this so you don’t hit a point of diminished returns. I greatly look forward to each challenge every day, but I also keep an eye out for things outside of the screen for inspiration to come back and go even harder.&lt;/p&gt;

&lt;p&gt;‘Balance’ is a word thrown around quite a bit in these types of learning environments, and rightfully so. It may mean something different to each person you ask. but regardless of how you achieve it, make sure you’re investing that time into yourself. You’ll be surprised at the returns when it’s time to get back to the grind.&lt;/p&gt;
</description>
        <pubDate>Sat, 08 Aug 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/balance.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/balance.html</guid>
        
        
      </item>
    
      <item>
        <title>Measure Twice, Cut Once - Planning with Diagrams and Test-Driven Development</title>
        <description>&lt;p&gt;Last week I had the opportunity to work on my first Backbone.js project with another developer who was also trying the framework for the first time. We were building a Blackjack game, and going into this project I knew that Backbone takes a bit of a different approach to structuring applications compared to frameworks that I’m used to, specifically Rails. In my mind, I have an understanding about how Models, Views, and Controllers are separated and behave, but in the world of client-side frameworks, this understanding was in need of some re-wiring.&lt;/p&gt;

&lt;p&gt;This post isn’t intended to detail the difference between Backbone’s architecture compared to framework ‘X’, rather, a few techniques that helped me get the most out of my time while solving a problem with a new set of tools. When I’m trying new frameworks or libraries, I catch myself often spinning my wheels with some things that weren’t necessarily essential for the problem at hand. It’s very easy to go down a rabbit hole when playing with new technologies, because it (usually) is fun to tear things down and see how they work, and we as developers/engineers/tinkerers have this natural curiosity. However, when you’re on a schedule, you need to stick to a plan and remain cognizant of how you’re investing your time.&lt;/p&gt;

&lt;p&gt;The first practice that I’ve really come to appreciate is creating a diagram of your application. As much as I love digital copies of everything, I find myself retaining information much easier when I put a pen to paper and start sketching things out. This became incredibly useful when approaching Backbone because, by its own nature, it has very little care for strict rules over architecture, leaving it almost entirely up to you to decide. For seasoned developers, this can be very liberating if you feel shackled by the ‘convention over configuration’ mantra of frameworks, like Rails. Seeing how this was my first go at not just Backbone, but a JavaScript framework in general, creating a diagram helped me by making me consider the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the flow of communication and data throughout the application&lt;/li&gt;
&lt;li&gt;how the event system operates&lt;/li&gt;
&lt;li&gt;understanding the difference between DOM events (‘click’) and their relationship to user intent (‘Hit’ or ‘Stand’)&lt;/li&gt;
&lt;li&gt;loose coupling between objects (minimal dependencies)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is one of the first diagrams that I created to get an idea of what the interface would look like, how they communicate, and what classes would be necessary for an MVP. I’ll likely be getting a whiteboard for future diagramming as we move into projects beyond the scope of toy problems.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/blackjackDiagram.jpg&quot; alt=&quot;blackjack diagram&quot; title=&quot;Blackjack Diagram&quot;&gt;&lt;/p&gt;

&lt;p&gt;The other practice that really made a difference in how we approached the problem is Test-Driven Development (TDD). ’Approached’ probably isn’t the right word, considering we didn’t start testing until we had the basic functionality of the game working (I know, not great), but it definitely made us reconsider a lot of the code we had already written. As we started writing tests, we noticed that we were simply writing tests that made our current implementation pass, rather than writing specs based on what we believed each component should do/be responsible for. As we began to place more emphasis on the latter, we noticed that a lot of our logic was placed in several illogical places, so we wrote specs for how the game should operate, and began refactoring to meet this new architecture. Upon finishing, we had much cleaner models/classes, functions with single-responsibility, and proper event handling. Prior to this refactoring, most of our code that we didn’t know where to place ended up in a central ‘dump’ that was globally accessible. Deleting this area after refactoring, and knowing that not only did our app still worked as well as it did before, but was also much easier to comprehend, was very satisfying. We thought that investing time to learn how to properly test our code would have taken too long, but it turns out we lost time needing to refactor everything we wrote, anyway. Had we started with tests and a clear plan from the beginning, we would have been much more productive from the start.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/eqex/assets/images/blackjackSpecs.png&quot; alt=&quot;blackjack specs&quot; title=&quot;Blackjack Specs&quot;&gt;&lt;/p&gt;

&lt;p&gt;As I move into new projects, I look forward to the planning stages more and more. By adopting these techniques, I can gain a stronger understanding of how I want the application to work, what the architecture will look like (diagram), and the incremental steps in building everything out (TDD). By measuring out the scope of the problem and planning before writing a single line of code, I can greatly increase the chances of staying on schedule while maximizing my productivity. I’ll be sure to share more posts about these kinds of tips and tricks as I try them out for myself.&lt;/p&gt;
</description>
        <pubDate>Wed, 22 Jul 2015 00:00:00 +0000</pubDate>
        <link>http://gregrv.github.io/eqex/measure-twice-cut-once.html</link>
        <guid isPermaLink="true">http://gregrv.github.io/eqex/measure-twice-cut-once.html</guid>
        
        <category>backbone</category>
        
        <category>testing</category>
        
        
      </item>
    
  </channel>
</rss>
