<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[J.Wo]]></title>
  <link href="http://jessewolgamott.com/atom.xml" rel="self"/>
  <link href="http://jessewolgamott.com/"/>
  <updated>2017-10-26T16:18:09-05:00</updated>
  <id>http://jessewolgamott.com/</id>
  <author>
    <name><![CDATA[Jesse Wolgamott]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Half Baked Idea: README Linter using the GitHub API]]></title>
    <link href="http://jessewolgamott.com/blog/2017/10/26/half-baked-idea-readme-linter-using-the-github-api/"/>
    <updated>2017-10-26T15:05:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2017/10/26/half-baked-idea-readme-linter-using-the-github-api</id>
    <content type="html"><![CDATA[<p>It started as a simple idea: let’s explore the awesomeness of the new GraphQL API by building a tiny app. Think Travis-CI but for writing. Maybe it could check spelling, grade level, and possibly help with adverbs the way <a href="http://hemingwayapp.com">hemingwayapp.com</a> does.</p>

<p>Maybe that app could help people use pull-requests during editorial reviews, much like how tests help developers with code reviews.</p>

<p>It lead to a rather simple question:</p>

<p><strong>What do I have to do to get the following to work?</strong></p>

<!-- MORE -->

<p><img src="http://jessewolgamott.com/images/jwo_react-hover-image.png" alt="readme-good" /></p>

<p>OK so that’s what I want to do, I researched and built the pieces but when it came time to actually building the entire node app, I stopped short.</p>

<p>That makes this is a half-baked idea: I’ve verified the individual pieces of tech work, but am stopping because I don’t want to actually build an entire product.</p>

<p>What tech would I need to build in order to do is? Here are the broad strokes:</p>

<h3 id="write-good-the-npm-module-to-test-our-readmes">0. Write-Good: the npm module to test our READMEs</h3>

<p>There’s a rather clever npm module <a href="https://github.com/btford/write-good">write-good</a> which you can run as a CLI. Example from their docs:</p>

<div class="bogus-wrapper"><notextile><figure class="code"><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
</pre></td><td class="code"><pre><code class=""><span class="line">$ write-good README.md
</span><span class="line">
</span><span class="line">In README.md
</span><span class="line">=============
</span><span class="line"> = writeGood('So the cat was stolen.');
</span><span class="line">                         ^^^^^^^^^^
</span><span class="line">"was stolen" is passive voice on line 20 at column 40</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>I figure we can use this to test a repo’s README.</p>

<h3 id="github-api-accesstoken-with-repostatus-access">1. GitHub API: AccessToken with repo:status access</h3>

<p>We’ll need to get an AccessToken since each of our GitHub API calls will require it. We can either:</p>

<ol>
  <li>Create a personal access token</li>
  <li>Use oAuth to sign in. If you were building out an application, this is what you’d need to do.</li>
</ol>

<p>For personal access tokens, you can follow instructions <a href="https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/">here</a>.</p>

<p>For oAuth signin, you can duck-duck-go for “Sign in With GitHub”. In Rails, omniauth is the dominant way forward. In Node/Express land, I found the options less hospitable, but the npm package <code>passport-github2</code> is very well done.</p>

<div><script src="https://gist.github.com/ea79620b5229e7821e4ae61055899cf9.js"></script>
<noscript><pre><code /></pre></noscript></div>

<h3 id="github-graphql-list-of-repos-to-activate">2. GitHub GraphQL: list of repos to activate</h3>

<p>You’ll want your app to get notified when a pull-request is created or updated so you can run your “test suite”.</p>

<p>I imagine that after your user signs in, you’ll present them with a list of their repos. How do you get their repository list? I used the GraphQL endpoint.</p>

<div class="bogus-wrapper"><notextile><figure class="code"><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
</pre></td><td class="code"><pre><code class=""><span class="line">POST https://api.github.com/graphql
</span><span class="line">HEADERS
</span><span class="line">  ContentType: application/json
</span><span class="line">  Authorization: Bearer $TOKENGOESHERE</span></code></pre></td></tr></table></div></figure></notextile></div>

<div><script src="https://gist.github.com/99fa81c67fd9562da78c5949a3599cc6.js"></script>
<noscript><pre><code /></pre></noscript></div>

<h3 id="github-api-webhook-know-when-a-pull-request-happens">3. GitHub API: WebHook: know when a pull-request happens</h3>

<p>They’d switch a repo on, at which point you would post to GitHub’s WebHook API and register a webhook.</p>

<div class="bogus-wrapper"><notextile><figure class="code"><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
<span class="line-number">12</span>
<span class="line-number">13</span>
<span class="line-number">14</span>
<span class="line-number">15</span>
<span class="line-number">16</span>
</pre></td><td class="code"><pre><code class=""><span class="line">POST /repos/:owner/:repo/hooks
</span><span class="line">HEADERS
</span><span class="line">  ContentType: application/json
</span><span class="line">  Authorization: Bearer $TOKENGOESHERE
</span><span class="line">BODY
</span><span class="line">{
</span><span class="line">  "name": "readme-good",
</span><span class="line">  "active": true,
</span><span class="line">  "events": [
</span><span class="line">    "pull_request"
</span><span class="line">  ],
</span><span class="line">  "config": {
</span><span class="line">    "url": "http://example.com/webhook",
</span><span class="line">    "content_type": "json"
</span><span class="line">  }
</span><span class="line">}
</span></code></pre></td></tr></table></div></figure></notextile></div>

<p>A fun hack here is to actually post to <a href="viasocket.com">viasocket.com</a>. It stores and lets you inspect, change, and replay webhooks, when you’re trying to diagnose how to handle a webhook, there’s not much more frustrating than having to recreate entire scenarios to test the typo you just fixed.</p>

<p>Second fun hack is to use https://webhookrelay.com/ or https://ngrok.com to get webhooks to hit your local development system. You’d <strong>definitely</strong> want to do that here.</p>

<h3 id="github-api-status-update-a-build-has-started">4. GitHub API: Status Update: a build has started</h3>

<p>OK, so there’s a new pull-request on a repo which your app is watching, and GitHub has told you about it.</p>

<p>We’ll want to notify GitHub that you’re starting a build using the GitHub API (REST v3). That’s what will add our app to the list of builds. GitHub isn’t waiting for us, we tell it when we start a build – this changes the status to “pending”.</p>

<div class="bogus-wrapper"><notextile><figure class="code"><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
</pre></td><td class="code"><pre><code class=""><span class="line">POST /repos/:owner/:repo/statuses/:commitsha
</span><span class="line">HEADERS
</span><span class="line">  ContentType: application/json
</span><span class="line">  Authorization: Bearer $TOKENGOESHERE
</span><span class="line">BODY
</span><span class="line">{
</span><span class="line">  "state": "pending",
</span><span class="line">  "target_url": "https://example.com/builds/BUILD_ID_HERE",
</span><span class="line">  "description": "Building...",
</span><span class="line">  "context": "readme-good/status"
</span><span class="line">}</span></code></pre></td></tr></table></div></figure></notextile></div>

<h3 id="github-api-graphql-git-commit">5. GitHub API: GraphQL: git commit</h3>

<p>We’re going to need to clone the repository at the pull-request level to run tests. Which SHA should we use after we clone? We’ll ask GraphQL for what we need.</p>

<p>Note: we’ll know from the webhook which pull request number is in question.</p>

<div><script src="https://gist.github.com/e49d06f7f76428fa17fb901e7f418cca.js"></script>
<noscript><pre><code /></pre></noscript></div>

<h3 id="docker-start-build">4. Docker: start build</h3>

<p>This is a little hand-wavey… But imagine we have a server with docker installed. We can build an image that has our write-good npm package installed. We can then run a docker container and:</p>

<ol>
  <li>clone our repo</li>
  <li>checkout to the correct SHA or ref</li>
  <li>run our tests</li>
</ol>

<p>We then capture our build status and store it against our BuildID.</p>

<div><script src="https://gist.github.com/c12b96fa5c3bcf7a2a4a43df3e79bbd2.js"></script>
<noscript><pre><code /></pre></noscript></div>

<h3 id="github-api-status-update-build-is-complete">5. GitHub API: Status Update: build is complete</h3>

<p>Notify GitHub that the build is over and either passed or failed.</p>

<div class="bogus-wrapper"><notextile><figure class="code"><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class="line-number">1</span>
<span class="line-number">2</span>
<span class="line-number">3</span>
<span class="line-number">4</span>
<span class="line-number">5</span>
<span class="line-number">6</span>
<span class="line-number">7</span>
<span class="line-number">8</span>
<span class="line-number">9</span>
<span class="line-number">10</span>
<span class="line-number">11</span>
</pre></td><td class="code"><pre><code class=""><span class="line">POST /repos/:owner/:repo/statuses/:commitsha
</span><span class="line">HEADERS
</span><span class="line">  ContentType: application/json
</span><span class="line">  Authorization: Bearer $TOKENGOESHERE
</span><span class="line">BODY
</span><span class="line">{
</span><span class="line">  "state": "success",
</span><span class="line">  "target_url": "https://example.com/builds/BUILD_ID_HERE",
</span><span class="line">  "description": "All is good...",
</span><span class="line">  "context": "readme-good/status"
</span><span class="line">}</span></code></pre></td></tr></table></div></figure></notextile></div>

<h3 id="what-didnt-i-think-of">What didn’t I think of?</h3>

<p>I’m sure a ton. After all, I just built the pieces of tech, and didn’t tie them together <em>at all</em>. But it sure was fun!</p>

<p>All of the code I used ended up being stored in Gists, and generally as a Git Repo.</p>

<h3 id="documentation-for-endpoints">Documentation for endpoints</h3>

<p>The GitHub API Endpoints we end up using:</p>

<ul>
  <li><a href="https://developer.github.com/v3/#authentication">REST v3: Authorization</a></li>
  <li><a href="https://developer.github.com/v3/repos/statuses/">REST v3: Status Creation</a></li>
  <li><a href="https://developer.github.com/v4/guides/forming-calls/#the-graphql-endpoint">GraphQL v4</a></li>
</ul>

<p>PS: you should absolutely use the <a href="https://developer.github.com/v4/explorer/">GitHub GraphQL API Explorer</a> to explore the GraphQL. It’s awesome once you get one specific thing to work and then you can edit and try other things.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[So much to learn, so little time]]></title>
    <link href="http://jessewolgamott.com/blog/2016/08/16/so-much-to-learn-so-little-time/"/>
    <updated>2016-08-16T00:00:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2016/08/16/so-much-to-learn-so-little-time</id>
    <content type="html"><![CDATA[<p>My birthday is coming up; looking back on what I learned about looking forward on what I want to learn, I noticed a pattern. Each year I spend revolving around the sun tends to have a pattern of what I learn. Maybe it was distributed systems and how easy it is to screw up in 2007-2008. Or APIs from 2012-2013.</p>

<p>There is too much to learn with far too few years to learn. The only way I’ve been able to be ok with this fact is to schedule my learning, learn by doing, and then reading the books on the subject. Note: read the books, not the blogs, is a technique by <a href="http://chrisoakman.com/">Chris Oakman</a> and it’s helped me dive into the theory behind the tech. The tech changes, but the theory stays the same.</p>

<p>That said, this is probably a very hip-javascript heavy post. If you’re suffering from JavaScript fatigue, this may or may not help.</p>

<!-- more -->

<h2 id="what-i-learned">What I learned</h2>

<p>With learningyear 2015-2016, I’ve devoted most of my learning to two separate sets of technology:</p>

<ul>
  <li>
    <p>Upgrading my JavaScript to 2016 era JavaScript Front-End</p>
  </li>
  <li>
    <p>Exploring Elixir/Phoenix and other functional languages</p>
  </li>
</ul>

<h3 id="era-javascript">2016 era JavaScript</h3>

<p>Front-end is fun, sticking to 2010 era jQuery is a mess, and functional components, surrounded by imperative containers, is the past and the future.</p>

<p>I started with learning React so that I could explore React-Native. This was a bit like learning how to cook by starting with a Cajun Roux (and filling the house with smoke) when you’re 15. Which: yeah, I totally did. Small steps, I’m not a fan of.</p>

<p>I had been pretty heavy with Ember, running Houston-Ember, and building apps with it. After the ember team declared they would focus on the web-experience (instead of mobile), I started looking for something to help solve the cross-platform development experience. React-Native appeared to do so, and I built a couple of apps with it, not really knowing what I was doing.</p>

<p>You know: change something and see what happens development.</p>

<p>I saw react-rails, and began to see the potential for a mixture of Rails as the API and React components managing their view and their state at the same time. Presentation: <a href="https://speakerdeck.com/jwo/react-rails-an-isomorphic-match-made-in-heaven">Given</a>. Apps: built.</p>

<p>But I missed the ease in which you could import modules and dependencies in front-end apps versus the flips you had to do to get Sprockets to work in Rails.</p>

<p>Recently, I explored getting webpack or browserify working in a Rails project. The progression at which I tried to get Rails’ to behave with the node ecosystem:</p>

<ul>
  <li>
    <p>shakacode’s <a href="https://github.com/shakacode/react_on_rails">react_on_rails</a>: complex, thorough, and was difficult for me to understand what’s going on.</p>
  </li>
  <li>
    <p><a href="https://www.reax.io/blog/2016/06/23/using-npm-to-manage-front-end-assets-in-rails/">Browserify with Rails</a>: excellent tutorial by Reax. It was good, but I wanted to learn webpack.</p>
  </li>
  <li>
    <p><a href="https://github.com/jdmorlan/rails-webpack-integration">Jay Morlan</a>: simple webpack integration with Rails.</p>
  </li>
</ul>

<p>I haven’t replaced the Asset Pipeline, I’ve enhanced it with a webpack process that builds out <code>app/frontend</code> into a bundle, which Rails slurps up and uses with jquery-ujs, action-cable, and other Railsy front-end things. Jay is going to give a talk at Houston-Ruby about this soon, which I’m excited about.</p>

<h3 id="functional">Functional</h3>

<p>Both elm and elixir are functional languages, and I had a blast writing with both of them. I have friends who have jumped all in on the elixir train, with its millisecond response times, coherent coding style, and Rails like Phoenix framework.</p>

<p>I built out an API for a React-Native mobile app and thoroughly enjoyed the experience. It was a hop-skip-and-a-jump to learn Elm, a front-end functional language that compiles down to JavaScript.</p>

<p>I wrote <a href="http://hipstack.me">Hipstack.me</a> in elm; a fun project that allows me to rewrite the entire application every six months in whatever language is hippest at the time. Sort of a TodoMVC, but TodoMVC is a little too popular these days.</p>

<h3 id="where-to-learn-these-techs">Where to learn these techs</h3>

<ul>
  <li>
    <p><a href="https://github.com/facebookincubator/create-react-app">Create-React-App</a> Your starting point when creating a React app.</p>
  </li>
  <li>
    <p>Redux: This <a href="http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html">full-stack redux tutorial</a>, which should have been a book, and I should have paid for it, finally got redux to stick. (Note: you don’t need redux/react-router to learn react, but it’s nice when you get 3+ components that aren’t parent child).</p>
  </li>
  <li>
    <p>elm: After hearing that Redux was inspired by elm, I dove in with the (shockingly free, excellent) <a href="http://courses.knowthen.com/courses/elm-for-beginners">elm for beginners course</a>. Highly recommended.</p>
  </li>
  <li>
    <p>Elixir: <a href="http://learningwithjb.com/guides/essential-elixir">Essential Elixir</a></p>
  </li>
  <li>
    <p>Phoenix: <a href="http://learningwithjb.com/guides/building-an-app-with-phoenix">Build an app with Phoenix</a> and <a href="http://learningwithjb.com/guides/ecto-for-beginners">Ecto for Beginners</a>.</p>
  </li>
</ul>

<h2 id="what-im-diving-into-next">What I’m diving into next</h2>

<p>I’m exploring data-science, both the correlation/statistics/machine-learning aspect as well as the big-data side of the house. I’m not sure I believe in “AI” as traditionally taught, but I absolutely believe in data and our ability to make guesses based upon said data.</p>

<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">PSA to my fellow devs: AI skills are bleeding edge right now, but they’ll be *table stakes* in a few short years. Invest in yourself now.</p>&mdash; Jerod Santo (@jerodsanto) <a href="https://twitter.com/jerodsanto/status/747409638681808897">June 27, 2016</a></blockquote>
<script async="" src="http://jessewolgamott.com//platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>I’m also going to give Go another chance. Working through <a href="http://exercism.io">exercism</a>’s examples in Go is super cool. The static code analysis helps you learn the “go” way to do things.</p>

<ul>
  <li>
    <p><a href="http://shop.oreilly.com/product/mobile/0636920033400.do">Data Science from Scratch</a></p>
  </li>
  <li>
    <p><a href="https://thewhitetulip.gitbooks.io/webapp-with-golang-anti-textbook/content/">webapp-with-golang-anti-textbook </a></p>
  </li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Scenes from Seven Cohorts]]></title>
    <link href="http://jessewolgamott.com/blog/2016/08/12/scenes-from-seven-cohorts/"/>
    <updated>2016-08-12T09:21:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2016/08/12/scenes-from-seven-cohorts</id>
    <content type="html"><![CDATA[<p>Two years ago, my first cohort graduated at The Iron Yard in Houston, Texas. 12
students received their diplomas and started their journey, their career, and
their new life.</p>

<p>Five cohorts followed; today my seventh, and final, immersive cohort will
present their final projects and begin the next phase of their live. I look back
and remember:</p>

<!-- more -->

<ul>
  <li>A young student and his mother and grandmother, all dressed up, crying because
of the job offer he received, and never thought he’d have access to this type
of career.</li>
  <li>The mom, who used to develop software, took 6 years off to raise kids, and
received their job offer to rejoin the workforce and support her family.</li>
  <li>The lawyer, who, while crying, thanked me for helping her to realize the dream
she’s had for years.</li>
  <li>The anthropologist who has gone on to multiple jobs, press interviews, and
generally kicks all sorts of ass.</li>
  <li>The musician who graduated, brought his friends to The Iron Yard, and all
started a company together.</li>
  <li>The waiter, who felt stuck in a dead end career, giving meetup talks and
negotiating better jobs.</li>
  <li>The veteran, coming back to the US after Afghanistan, and starting a career.</li>
  <li>The scientist, always pushing herself to do more, learn more, and be more.
Watching her build up the nerve to negotiate her salary/benefits, not for
herself, but because more women should.</li>
  <li>The star of the course, developing open source software and sharing
interesting things he finds on the internet with me. (I’m learning from him)</li>
  <li>My TA, coming back and sharing her time with students, one-on-one, and helping
run RailsGirls and helping even more people.</li>
  <li>And so many others…</li>
</ul>

<p>I want to thank you all; I was a smart part of your journey, and you were a big
part of mine.</p>

<p><img src="http://jessewolgamott.com/images/jwo-tiy.jpg" alt="jwo-tiy" /></p>

<h2 id="something-that-actually-matters">Something that actually matters</h2>
<p>Overall, I’ve graduated nearly 100 students over 7 cohorts. I started at
the Iron Yard in 2014 with a healthy skepticism on code-schools – I thought,
‘hey JWo, you’ll be able to help with things you care deeply about.’ Namely: </p>

<ul>
  <li>Helping to solve the diversity problem in Tech.</li>
  <li>Teaching kids how to code.</li>
</ul>

<p>Being a part of something that actually matters to you is an experience I highly
recommend. I spent the first 18 years of my career trading my time and ability
to tell computers what to do in exchange for money. You know, as you do.</p>

<p>But being able to do so AND help people AND align with your core desires – it’s
an emotional experience I cannot fully describe. </p>

<p>I’m proud of what I’ve done at The Iron Yard in Houston, believe whole-heartily
in TIY’s ability to affect real and lasting change for people, and want to
expand the scope of the people I can help.</p>

<h2 id="add-some-zeroes-to-that-number">Add some zeroes to that number</h2>

<p>On Monday, I’ll start a new position at The Iron Yard as the Director of
Back-End Engineering. I’ll lead the effort to wrangle the curriculum for the
back-end stacks we teach at TIY nationally: Rails, .NET, Java, and Python, as
well as help develop curriculum for non-immersive courses.</p>

<p>I hope to be able to expand the people we can help, including those who cannot
take a 12 week immersive code school. Additionally, I’m excited to experiment
with other formats and show off the technology TIY’s internal tech team has
built. So Excite. Such potential. Very future.</p>

<p>My goal: as bittersweet as it is to finish leading 15 students on a twelve week
journey, I hope to add some zeroes to that number. At 20 campuses (currently),
The Iron Yard is the largest codeschool in the country; helping instructors help
students has the potential to change even more lives.</p>

<h2 id="excite">Excite</h2>

<p>I’m like this:</p>

<p><img src="http://jessewolgamott.com/images/ron.gif" alt="images" /></p>

<p>No really, see:</p>

<p><img src="http://jessewolgamott.com/images/jwo-dance.gif" alt="images" /></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Explaining Elixir Pipes through the Magic of Turduckens]]></title>
    <link href="http://jessewolgamott.com/blog/2015/11/20/explaining-elixir-pipes-through-the-magic-of-turduckens/"/>
    <updated>2015-11-20T08:24:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2015/11/20/explaining-elixir-pipes-through-the-magic-of-turduckens</id>
    <content type="html"><![CDATA[<p>One of the cooler features of Elixir (and other functional languages) is the
Pipe operator <code>|&gt;</code>. It certainly makes code easier to read, but it’s a bit
difficult to grep for the first time.</p>

<p>Let’s use the <a href="https://en.wikipedia.org/wiki/Turducken">Turducken</a> to explain
it. For the uninitiated, A Turducken is a turkey stuffed with a duck which is
itself stuffed in a chicken.</p>

<!-- more -->

<p><img src="http://jessewolgamott.com/images/turducken.jpg" alt="turducken" /></p>

<p>Code written sans pipe might look like:</p>

<div class="bogus-wrapper"><notextile><figure class="code elixir"><figcaption><span></span></figcaption><pre><code class="elixir"><span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span><span class="p">(</span><span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span><span class="p">(</span><span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span><span class="p">(</span><span class="s2">&quot;chicken&quot;</span><span class="p">),</span> <span class="s2">&quot;duck&quot;</span><span class="p">),</span> <span class="s2">&quot;turkey&quot;</span><span class="p">)</span>
</code></pre></figure></notextile></div>

<p>You have to read this from the inside out. You:</p>

<ol>
  <li>start at the output of <code>Turducken.stuff("chicken")</code></li>
  <li>figure out that goes into the <code>Turducken.stuff(_, "duck")</code></li>
  <li>and then THAT could into <code>Turducken.stuff(_, "turkey")</code></li>
</ol>

<p>Better code might be to follow the transformation from inside to out (left to
right):</p>

<div class="bogus-wrapper"><notextile><figure class="code elixir"><figcaption><span></span></figcaption><pre><code class="elixir"><span class="s2">&quot;chicken&quot;</span> <span class="o">|&gt;</span> <span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span> <span class="o">|&gt;</span> <span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span><span class="p">(</span><span class="s2">&quot;duck&quot;</span><span class="p">)</span> <span class="o">|&gt;</span> <span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span><span class="p">(</span><span class="s2">&quot;turkey&quot;</span><span class="p">)</span>
</code></pre></figure></notextile></div>

<p>Full code*</p>

<div class="bogus-wrapper"><notextile><figure class="code elixir"><figcaption><span></span></figcaption><pre><code class="elixir"><span class="k">defmodule</span> <span class="no">Turducken</span> <span class="k">do</span>

<span class="k">  def</span> <span class="n">stuff</span><span class="p">(</span><span class="n">animal</span><span class="p">)</span> <span class="k">do</span>
<span class="k">    </span><span class="n">animal</span>
  <span class="k">end</span>

  <span class="k">def</span> <span class="n">stuff</span><span class="p">(</span><span class="n">animal</span><span class="p">,</span> <span class="n">into</span><span class="p">)</span> <span class="k">do</span>
<span class="k">    </span><span class="no">IO</span><span class="o">.</span><span class="n">inspect</span> <span class="s2">&quot;You put the </span><span class="si">#{</span><span class="n">animal</span><span class="si">}</span><span class="s2"> into the </span><span class="si">#{</span><span class="n">into</span><span class="si">}</span><span class="s2">&quot;</span>
    <span class="n">into</span>
  <span class="k">end</span>

<span class="k">end</span>


<span class="c1">#Turducken.stuff(Turducken.stuff(Turducken.stuff(&quot;chicken&quot;), &quot;duck&quot;), &quot;turkey&quot;)</span>

<span class="s2">&quot;chicken&quot;</span> <span class="o">|&gt;</span> <span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span> <span class="o">|&gt;</span> <span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span><span class="p">(</span><span class="s2">&quot;duck&quot;</span><span class="p">)</span> <span class="o">|&gt;</span> <span class="no">Turducken</span><span class="o">.</span><span class="n">stuff</span><span class="p">(</span><span class="s2">&quot;turkey&quot;</span><span class="p">)</span>
</code></pre></figure></notextile></div>

<p>You can run this on the <a href="http://elixirplayground.com?gist=8bb0c58f4a27d4f5af20">elixir playground</a></p>

<h2 id="a-more-unixy-example">A more unixy example</h2>

<p>In UNIX, we use pipe to take output from one operation into the other.
Example: We’ll copy the contents of a file to the Mac clipboard.</p>

<div class="bogus-wrapper"><notextile><figure class="code elixir"><figcaption><span></span></figcaption><pre><code class="elixir"><span class="n">cat</span> <span class="n">yolo</span><span class="o">.</span><span class="n">md</span> <span class="o">|</span> <span class="n">pbcopy</span>
</code></pre></figure></notextile></div>

<p>The output of yolo goes into pbcopy. If this was a program (ruby), it could be:</p>

<div class="bogus-wrapper"><notextile><figure class="code elixir"><figcaption><span></span></figcaption><pre><code class="elixir"><span class="n">pbcopy</span><span class="p">(</span><span class="n">cat</span><span class="p">(</span><span class="s2">&quot;yolo.md&quot;</span><span class="p">))</span>
</code></pre></figure></notextile></div>

<p>In Elixir, you could write it as:</p>

<div class="bogus-wrapper"><notextile><figure class="code elixir"><figcaption><span></span></figcaption><pre><code class="elixir"><span class="n">cat</span><span class="p">(</span><span class="s2">&quot;yolo.md&quot;</span><span class="p">)</span> <span class="o">|&gt;</span> <span class="n">pbcopy</span>

<span class="c1"># Or even</span>

<span class="s2">&quot;yolo.md&quot;</span> <span class="o">|&gt;</span> <span class="n">cat</span> <span class="o">|&gt;</span> <span class="n">pbcopy</span>
</code></pre></figure></notextile></div>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[When (fake) Googlebots attack your rails app]]></title>
    <link href="http://jessewolgamott.com/blog/2015/11/17/when-fake-googlebots-attack-your-rails-app/"/>
    <updated>2015-11-17T13:01:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2015/11/17/when-fake-googlebots-attack-your-rails-app</id>
    <content type="html"><![CDATA[<p>We’ve all scraped a site or two (rite?) but what do you do when bad actors start
taking up a non-trivial amount of resources on <em>your</em> app?  Further, what if bad actors 
are masking their user agent to appear as though they were googlebot?</p>

<!-- more -->

<p>Kickstarter open sourced their rack middleware designed to protect your web app
from bad clients, named <a href="https://github.com/kickstarter/rack-attack">rack-attack</a>.</p>

<p>It works by cutting off requests early in the process, a couple of milliseconds
in, and returning a <a href="http://www.status.ws/code/429">429 Too Many Requests</a>
status.</p>

<p>In a recent project, web utilization was crossing 90% with database utilization
approacing 60%. Memory utilization was creeping and web response times were
crossing 5 seconds. Things were not happy in Rails land.</p>

<p>An inspection of the logs and skylight performance monitoring brought three
things to my attention:</p>

<ol>
  <li>There were quite a few requests per second to the product listing and
searching routes</li>
  <li>There were three IP addresses that seemed to appear over and over and over
again. They linked to bluehost.com servers and other not-very-legit
addresses.</li>
  <li>The user agent being used was Googlebot’s</li>
</ol>

<h2 id="how-to-rate-limit">How to rate limit</h2>

<p>This is my first line of defense – can I limit a user to a request per second?
The rate you choose is pretty much up to you; I went with 300 over a 5 minute
period of time. This is 5 requests per second per IP.</p>

<p>This particular app has two types of requests I didn’t want to rate limit:</p>

<ol>
  <li>Assets like images, stylesheets, webfonts, javascripts, etc</li>
  <li>The Load Balancer (HAProxy) runs a <code>/check</code> on the server to check if it’s
still online. We’ll let those go though unimpeded.</li>
</ol>

<div><div class="CodeRay">
  <div class="code"><pre><span class="constant">Rack</span>::<span class="constant">Attack</span>.throttle(<span class="string"><span class="delimiter">'</span><span class="content">req/ip</span><span class="delimiter">'</span></span>, <span class="key">limit</span>: <span class="integer">300</span>, <span class="key">period</span>: <span class="integer">5</span>.minutes) <span class="keyword">do</span> |req|
  req.remote_ip <span class="keyword">if</span> [<span class="string"><span class="delimiter">'</span><span class="content">/assets</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">/check</span><span class="delimiter">'</span></span>].any? {|path| req.path.starts_with? path }
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<h2 id="how-to-block-an-ip-address">How to block an IP address</h2>

<p>In my #2 above, I blocked the two bad actor IP addresses. IP Addresses blurred
because of obvs reasons (obvs).</p>

<div><div class="CodeRay">
  <div class="code"><pre><span class="constant">Rack</span>::<span class="constant">Attack</span>.blacklist(<span class="string"><span class="delimiter">'</span><span class="content">block bad actors</span><span class="delimiter">'</span></span>) <span class="keyword">do</span> |req|
  [<span class="string"><span class="delimiter">'</span><span class="content">10.1.1.1</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">10.1.1.2</span><span class="delimiter">'</span></span>].include? req.ip
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<h2 id="why-would-they-pretend-theyre-googlebot">Why would they pretend they’re googlebot?</h2>

<p>I’ve seen rate limiters let Googlebot by by default. Because why block google
when you want Google to visit your literally as often as possible because SEO?</p>

<p>Knowing this information, it’s likely that as an evil-doer-scraper you’ll set
your user-agent to match Googlebot’s to maximize the chance you’ll be let in,
rate-limits be foresaken and ignored.</p>

<h2 id="how-to-reverse-lookup-user-agents-to-verify-googlebots-are-actually-googlebots">How to reverse lookup user agents to verify Googlebots are actually googlebots?</h2>

<p>It’s vitaly important to let actual Googlebots through to your site, but what
about fake lying liar googlebots? Those we want to 429.</p>

<p>Google helpfully published <a href="https://support.google.com/webmasters/answer/80553">Verifying Googlebot</a>
which states the following:</p>

<ol>
  <li>There is no list of valid IPs to allow for Googlebot</li>
  <li>if you <code>host the-ip-address</code> it will return the host for that ip. Such as
<code>crawl-66-249-66-1.googlebot.com</code></li>
  <li>All googlebots will end in <code>googlebot.com</code> or <code>google.com</code></li>
  <li>if you <code>host crawl-66-249-66-1.googlebot.com</code> it should match the
<code>the-ip-address</code> you started with</li>
</ol>

<p>Soooooo, if a HTTP request proclaims itself as a Googlebot user-agent, we could
use the <code>Resolv</code> library in ruby to verify it. Resolv is concurrent and does not
block the world \o/</p>

<div><div class="CodeRay">
  <div class="code"><pre>require <span class="string"><span class="delimiter">'</span><span class="content">resolv</span><span class="delimiter">'</span></span>

<span class="constant">Rack</span>::<span class="constant">Attack</span>.blacklist(<span class="string"><span class="delimiter">'</span><span class="content">googlebots who are not googlebots</span><span class="delimiter">'</span></span>) <span class="keyword">do</span> |req|
  <span class="keyword">if</span> req.user_agent =~ <span class="regexp"><span class="delimiter">/</span><span class="content">Googlebot</span><span class="delimiter">/</span><span class="modifier">i</span></span>

    <span class="keyword">begin</span>
      name = <span class="constant">Resolv</span>.getname(req.ip.to_s)
      reversed_ip = <span class="constant">Resolv</span>.getaddress(name)

      resolves_correctly = name.end_with?(<span class="string"><span class="delimiter">&quot;</span><span class="content">googlebot.com</span><span class="delimiter">&quot;</span></span>) || name.end_with?(<span class="string"><span class="delimiter">&quot;</span><span class="content">google.com</span><span class="delimiter">&quot;</span></span>)
      reverse_resolves = reversed_ip == req.ip.to_s

      is_google = resolves_correctly &amp;&amp; reverse_resolves


      !is_google
    <span class="keyword">rescue</span> <span class="constant">Resolv</span>::<span class="constant">ResolvError</span> 
      <span class="predefined-constant">true</span>
    <span class="keyword">end</span>

  <span class="keyword">end</span>
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<h2 id="how-to-make-sure-this-still-works-behind-your-proxy--load-balancer">How to make sure this still works behind your Proxy / Load Balancer</h2>

<p>If you use HAProxy, this code is for you! Generally, your load balancer 
(HAProxy, heroku, etc) might present itself as the IP address the request 
is coming from. You do <em>not</em> want to rate limit based on requests from the
proxy.</p>

<p>We’ll change all <code>req.ip</code> to <code>req.remote_ip</code> and add this code which looks
for the <code>HTTP_X_FORWARDED_FOR</code> header added by most load balancers. If not
found, it will default to the IP.</p>

<div><div class="CodeRay">
  <div class="code"><pre><span class="keyword">class</span> <span class="class">Rack::Attack</span>
  <span class="keyword">class</span> <span class="class">Request</span> &lt; ::<span class="constant">Rack</span>::<span class="constant">Request</span>
    <span class="keyword">def</span> <span class="function">remote_ip</span>
      <span class="instance-variable">@remote_ip</span> ||= (env[<span class="string"><span class="delimiter">'</span><span class="content">HTTP_X_FORWARDED_FOR</span><span class="delimiter">'</span></span>] || ip).to_s
    <span class="keyword">end</span>
  <span class="keyword">end</span>
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<h2 id="the-code">The Code</h2>

<p>Final Code to make the awesome happen:</p>

<div><script src="https://gist.github.com/a3db6d4eb5355adbca6e.js"></script>
<noscript><pre><code /></pre></noscript></div>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Writing Like Actually Getting Words Onto Paper]]></title>
    <link href="http://jessewolgamott.com/blog/2015/04/06/writing-like-actually-getting-words-onto-paper/"/>
    <updated>2015-04-06T09:13:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2015/04/06/writing-like-actually-getting-words-onto-paper</id>
    <content type="html"><![CDATA[<p>Writing is a series of small burst of rushing water, a thousand words pouring out of me in a very short period of time.</p>

<p>Writing is day dreaming, when no words come at all. The rushing water has stopped, the creek dry and crackling.</p>

<p>Writing is using your own voice and avoiding sounding important or intellectual. Writing is real.</p>

<p>Writing happens in the morning for me. I imagine my brain is still excited about the day in the morning, and like sushi, degrades the further it gets from sleep. I should look into napping. You should find the part of the day you are most creative, and write then. AB test it. Trial and error.</p>

<h3 id="tools">Tools</h3>

<p>Many developers spend days, weeks even, on getting the correct Tool. I have used Pages, Desk.pm, IA Writer, Scrivener, and more authoring tools I can remember. They do not do the work for you, and in general do not make anything easier.</p>

<p>You can also spend days, and weeks, on your toolkit to transfer your words into an ebook format. Or, your site’s marketing website.</p>

<p>But here’s the truth: you are ignoring the part that matters: getting words out of your brain and onto ‘paper’. Stop with the tools, and just write. Use <a href="http://softcover.io/">softcover</a> or <a href="http://leanpub.com/">leanpub</a> - both will create a page for you so you can focus on the writing.</p>

<p>Fiddling with tools instead of writing is wankery distraction.</p>

<h3 id="timeline-of-a-chapter">Timeline of a chapter</h3>

<ul>
  <li>Day 1: write an outline of an article or chapter</li>
  <li>Day 2: fill in the outline</li>
  <li>Day 3: edit the first chapter</li>
  <li>Day 7+: revisit and read with a clean mind. I’ll find that I find I didn’t say all I thought I had said. Or, I’ll find typos clear as day that my mind wouldn’t let me see the previous week.</li>
</ul>

<p>I’m currently putting my ideas on writing into action creating Tex Mex
Consulting. Some of my favorite articles:</p>

<ul>
  <li><a href="http://blog.texmexconsulting.com/clients-do-not-pay-you-for-the-code/">Clients do not pay you for the code</a></li>
  <li><a href="http://blog.texmexconsulting.com/from-employee-to-freelancer-to-consultant/">From Employee To Freelancer to Consultant</a></li>
  <li><a href="http://blog.texmexconsulting.com/proposals-shitty-to-super-fantastic/">Proposals: shitty to super-fantastic</a></li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Why I Created Tex Mex Consulting]]></title>
    <link href="http://jessewolgamott.com/blog/2015/03/22/why-i-created-tex-mex-consulting/"/>
    <updated>2015-03-22T15:29:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2015/03/22/why-i-created-tex-mex-consulting</id>
    <content type="html"><![CDATA[<p>Employees don’t make enough money. You’re not treated fairly, are not respected,
and have to put up with a lot of crap. </p>

<p>Most software developers can learn a hellaton from freelancing and consulting;
at the very least you can learn what you’re worth. And it’s not $75,000 a year
with free soda and 1% equity.</p>

<p>I’ve spent 6 years and many thousands of dollars in mistakes, masterclasses,
and good old sweat equity in created a workflow system for expert software
consulting.</p>

<p>I want to give you a path to consulting; a path to go from Employee to
Freelancer to Consultant. A path to freedom, more money, and more respect.</p>

<p>The basic ethos of the book:</p>

<blockquote>
  <p>Freelancers are hired by companies. Consultants choose their clients
carefully.</p>
</blockquote>

<p>Want to try out some the techniques in my system? I’ve created a 30 day free
email course on Professional Freelancing – try it out below.</p>

<form action="https://www.getdrip.com/forms/9399974/submissions" method="post" target="_blank" data-drip-embedded-form="9399974">

    <div>
      <label for="fields[first_name]">First Name</label><br />
      <input type="text" name="fields[first_name]" value="" />
    </div>
    <div>
      <label for="fields[email]">Email Address</label><br />
      <input type="text" name="fields[email]" value="" />
    </div>
  <div>
    <input type="submit" name="submit" value="Send me the chapters, start my course!" data-drip-attribute="sign-up-button" />
  </div>
</form>

<p>Check out the system for Professional Freelancing at <a href="http://texmexconsulting.com/">Tex Mex
Consulting</a>. </p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[1000 Day Love Story with Ember]]></title>
    <link href="http://jessewolgamott.com/blog/2015/03/06/1000-day-love-story-with-ember/"/>
    <updated>2015-03-06T09:10:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2015/03/06/1000-day-love-story-with-ember</id>
    <content type="html"><![CDATA[<p>Like most love stories, my love affair with Ember took time to blossom. I first saw Ember in 2011, had some fun, and planned to look at it once the API solidified.</p>

<p>In that time, pre-1.0, Ember’s API would change constantly. Most people saw this as a flaw, after all, it meant that documentation, blogs, and stack overflow searches would frequently reference older versions. The router saw the biggest changes, frequently.</p>

<p>The benefit of this – Ember got the API right. Once it hit 1.0, the API was on point; and with the correct API in place, Ember keeps getting better. Ember is able to make changes under the hood, applying React style rendering, performance enhancements, and generally get better and better over time.</p>

<p>My experience with ember is generally along the lines of Deleting more code than I add; Ember tends to add what I need overtime and I use that instead of my code.</p>

<p>Told over a series of many (perhaps too many) tweets, here is the story of my transition from Ember to Angular to Ember.</p>

<!-- more -->

<h3 id="section">2011</h3>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">It&#39;s not quite &quot;the first time you saw rails&quot; tingly, but I have the tingles about emberjs. Well played <a href="https://twitter.com/wycats?ref_src=twsrc%5Etfw">@wycats</a> , well played.</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/147056588740505601?ref_src=twsrc%5Etfw">December 14, 2011</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<h3 id="section-1">2012</h3>

<p>I live-coded some ember at Houston Code Camp and it didn’t go very well. Too many rough edges, mostly with ember-data.</p>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Speaking of <a href="https://twitter.com/houstoncodecamp?ref_src=twsrc%5Etfw">@houstoncodecamp</a>, I&#39;ll be live coding an <a href="https://twitter.com/emberjs?ref_src=twsrc%5Etfw">@emberjs</a> app with rails as the API. Come experience the magic! cc: <a href="https://twitter.com/HoustonJS?ref_src=twsrc%5Etfw">@HoustonJS</a></p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/231040665767792641?ref_src=twsrc%5Etfw">August 2, 2012</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<h3 id="section-2">2013</h3>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr"><a href="https://twitter.com/tehviking?ref_src=twsrc%5Etfw">@tehviking</a> I like that viewpoint. (I like both angular and ember)</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/322376953564901377?ref_src=twsrc%5Etfw">April 11, 2013</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Love both angular and ember. excited to see which ages better.</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/372472103984848896?ref_src=twsrc%5Etfw">August 27, 2013</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr"><a href="https://twitter.com/garrettdimon?ref_src=twsrc%5Etfw">@garrettdimon</a> angular fits into your rails app. Your rails all fits into ember.<br />Both great. Ember takes more thought, may be better long run</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/371643939960279040?ref_src=twsrc%5Etfw">August 25, 2013</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>During 2013, JB and I wrote and published <a href="http://www.angularails.com/">AngularJS + Rails</a>. Angular was very pragmatic and got some things done. Others, like directives and services, seemed half-baked.</p>

<h3 id="section-3">2014</h3>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr"><a href="https://twitter.com/hashtag/Realtalk?src=hash&amp;ref_src=twsrc%5Etfw">#Realtalk</a> Sooo jb and I bet on angular, with good success; my timeline is full of ember-love and I&#39;m planning to revisit embah.</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/449647197249101826?ref_src=twsrc%5Etfw">March 28, 2014</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>I read about the community love at EmberConf 2014 and was insta-jealous. I remember what I love about Rails and Ruby was the community; decide to revist Ember in earnest and see how things are rolling along.</p>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">.<a href="https://twitter.com/iwarshak?ref_src=twsrc%5Etfw">@iwarshak</a> to be honest, I’m amazed at ember now vs nov 2012. I’m using on a project and have lots of love toward <a href="https://twitter.com/emberjs?ref_src=twsrc%5Etfw">@emberjs</a></p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/461179402638733313?ref_src=twsrc%5Etfw">April 29, 2014</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">. <a href="https://twitter.com/hkarthik?ref_src=twsrc%5Etfw">@hkarthik</a> yep, I use both now. Angular to enhance an existing app. Ember for greenfield.</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/498928611714281472?ref_src=twsrc%5Etfw">August 11, 2014</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Preview of <a href="https://twitter.com/emberjs?ref_src=twsrc%5Etfw">@emberjs</a> app I built for my college fantasy football draft. So simple. So fast. So easy. Blogpost soon. <a href="http://t.co/gkBef9W9un">pic.twitter.com/gkBef9W9un</a></p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/504641335261806592?ref_src=twsrc%5Etfw">August 27, 2014</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Also had super awesome fun times with ember and cordova. This is such a stack of win.</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/549700891201110016?ref_src=twsrc%5Etfw">December 29, 2014</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Quick look of what I did to filter by company and/or first/last name. joins arel together / to_sql (rails and ember) <a href="https://t.co/AsoZqJpdXx">https://t.co/AsoZqJpdXx</a></p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/540261729599381505?ref_src=twsrc%5Etfw">December 3, 2014</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>I dive into ember-cli; it’s the final piece of the ember puzzle. Followed by ember-addons and quite simply amazing.</p>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">ember-cli: Getting Started With the Awesome <a href="http://t.co/M0XVHVm8YO">http://t.co/M0XVHVm8YO</a> | more reasons to love <a href="https://twitter.com/emberjs?ref_src=twsrc%5Etfw">@emberjs</a></p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/524302483674243072?ref_src=twsrc%5Etfw">October 20, 2014</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<h3 id="section-4">2015</h3>

<p>Angular announced their 2.0 backward compatibility breakathon apocalypse. I finalize what’s been happening for a year, and break up with Angular for Ember. #sorrynotsorry</p>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Watching Portlandia, getting moar excitet about <a href="https://twitter.com/EmberConf?ref_src=twsrc%5Etfw">@EmberConf</a> which OH BTW is is Portland. :boom:</p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/566047213143343104?ref_src=twsrc%5Etfw">February 13, 2015</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>EmberConf 2015. Such amazing awesomeness.</p>

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">A collection of links that cover what happened during EmberConf 2015. <a href="https://t.co/IYZvxBwlWN">https://t.co/IYZvxBwlWN</a> <a href="https://twitter.com/hashtag/emberconf?src=hash&amp;ref_src=twsrc%5Etfw">#emberconf</a>  :: amaze. thanks <a href="https://twitter.com/sugarpirate_?ref_src=twsrc%5Etfw">@sugarpirate_</a></p>&mdash; Jesse Wolgamott (@jwo) <a href="https://twitter.com/jwo/status/573504125637279744?ref_src=twsrc%5Etfw">March 5, 2015</a></blockquote>
<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>Can’t wait to see what happens in 2015 and beyond.</p>

<p>PS. The actual 1000 days is Tue, 09 Sep 2014; I had built my 3rd app by this time. I doubt it’ll take you 1000 days to fall in love. Want to try? Check out the <a href="http://ember.codeschool.com">CodeSchool Course</a>, <a href="http://www.ember-cli.com/">ember-cli</a>, and the <a href="http://emberjs.com/guides/getting-started/">ember guides</a>.</p>

<p>PPS: I created this using a combination of <a href="https://github.com/sferik/t">t</a> and the <a href="https://blog.twitter.com/2012/your-twitter-archive">twitter archive</a>. (t only returned 3200 tweets in a search).</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Getting Websockets, CarrierWave, and Fog to play nicely together]]></title>
    <link href="http://jessewolgamott.com/blog/2015/03/05/getting-websockets-carrierwave-and-fog-to-play-nicely-together/"/>
    <updated>2015-03-05T11:30:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2015/03/05/getting-websockets-carrierwave-and-fog-to-play-nicely-together</id>
    <content type="html"><![CDATA[<p>Getting Websockets, CarrierWave, and Fog to play nicely together</p>

<p>Alternate title: “Dancing with Dragons, or, how I got screwed by ActiveRecord Callbacks yet again.”</p>

<p>I’ve been working on the following scenario:</p>

<ul>
  <li>2 different people have an ember app open</li>
  <li>One of them adds a new record to the Rails app</li>
  <li>I want other-person’s ember to refresh with that new record instantaniously-ish</li>
</ul>

<h3 id="the-setup">The setup</h3>

<div class="bogus-wrapper"><notextile><figure class="code ruby"><figcaption><span></span></figcaption><pre><code class="ruby"><span class="k">class</span> <span class="nc">Photo</span> <span class="o">&lt;</span> <span class="ss">ActiveRecord</span><span class="p">:</span><span class="ss">:Base</span>
  <span class="n">mount_uploader</span> <span class="ss">:image</span><span class="p">,</span> <span class="no">ImageUploader</span>

  <span class="n">after_create</span> <span class="k">do</span>
    <span class="no">Pusher</span><span class="o">.</span><span class="n">notify</span><span class="p">(</span><span class="s2">&quot;new_photo&quot;</span><span class="p">,</span> <span class="no">PhotoSerializer</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="nb">self</span><span class="p">)</span><span class="o">.</span><span class="n">attributes</span><span class="p">)</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></figure></notextile></div>

<p>Fairly simple, but here’s what’s going on:  </p>

<ul>
  <li>When our photo is created, carrier wave will resize the image, upload it to S3</li>
  <li>We will send the JSON through Pusher to any clients subscribed to the <code>new_photo</code> channel. The JSON we’re sending is the same JSON that ActiveModelSerializer will use in the API. WIN.</li>
</ul>

<h2 id="but-then-melancholy">But then, melancholy.</h2>

<p>The JSON that comes through has something rather odd for <code>large_image_url</code> - it’s a local path to the /tmp/upload directory, which absolutely does not work. :/</p>

<div class="bogus-wrapper"><notextile><figure class="code json"><figcaption><span></span></figcaption><pre><code class="json"><span class="p">{</span>
    <span class="nt">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;399ca80efb2bd65e7254f299adfe278a&quot;</span><span class="p">,</span>
    <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;thumbythumbythumby&quot;</span><span class="p">,</span>
    <span class="nt">&quot;large_image_url&quot;</span><span class="p">:</span> <span class="s2">&quot;/uploads/tmp/1425583084-37430-8620/large_thumbnail.jpg&quot;</span><span class="p">,</span>
    <span class="nt">&quot;thumb_photo_url&quot;</span><span class="p">:</span> <span class="s2">&quot;/uploads/tmp/1425583084-37430-8620/thumb_thumbnail.jpg&quot;</span>
<span class="p">}</span>
</code></pre></figure></notextile></div>

<p>Basically, when Pusher is sending PhotoSerializer.new(self).attributes, the image has not been stored up to S3. We want to do Pusher later, after fog does it’s thing.</p>

<p>Callbacks are run in this order:</p>

<div class="bogus-wrapper"><notextile><figure class="code ruby"><figcaption><span></span></figcaption><pre><code class="ruby"><span class="n">before_validation</span>
<span class="n">after_validation</span>
<span class="n">before_save</span>
<span class="n">around_save</span>
<span class="n">before_create</span>
<span class="n">around_create</span>
<span class="n">after_create</span>
<span class="n">after_save</span>
<span class="n">after_commit</span><span class="o">/</span><span class="n">after_rollback</span>
</code></pre></figure></notextile></div>

<p>So, <code>after_create</code> is occurring before <code>after_save</code>. Let’s switch that up and our problems should be solved:</p>

<div class="bogus-wrapper"><notextile><figure class="code ruby"><figcaption><span></span></figcaption><pre><code class="ruby"><span class="k">class</span> <span class="nc">Photo</span> <span class="o">&lt;</span> <span class="ss">ActiveRecord</span><span class="p">:</span><span class="ss">:Base</span>
  <span class="n">mount_uploader</span> <span class="ss">:image</span><span class="p">,</span> <span class="no">ImageUploader</span>

  <span class="n">after_save</span> <span class="ss">on</span><span class="p">:</span> <span class="ss">:create</span> <span class="k">do</span>
    <span class="no">Pusher</span><span class="o">.</span><span class="n">notify</span><span class="p">(</span><span class="s2">&quot;new_photo&quot;</span><span class="p">,</span> <span class="no">PhotoSerializer</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="nb">self</span><span class="p">)</span><span class="o">.</span><span class="n">attributes</span><span class="p">)</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></figure></notextile></div>

<p>Result: Same thing. huh?</p>

<p>To see the order in which callbacks are run, we can do this:</p>

<div class="bogus-wrapper"><notextile><figure class="code ruby"><figcaption><span></span></figcaption><pre><code class="ruby"><span class="no">Photo</span><span class="o">.</span><span class="n">_save_callbacks</span><span class="o">.</span><span class="n">map</span><span class="p">(</span><span class="o">&amp;</span><span class="ss">:filter</span><span class="p">)</span>
</code></pre></figure></notextile></div>

<p>That will show the name of the callbacks being called, and will look something like:</p>

<div class="bogus-wrapper"><notextile><figure class="code ruby"><figcaption><span></span></figcaption><pre><code class="ruby"><span class="o">[</span><span class="mi">70220584822820</span><span class="p">,</span> <span class="ss">:remove_previously_stored_photo</span><span class="p">,</span> <span class="ss">:store_photo!</span><span class="p">,</span> <span class="ss">:write_photo_identifier</span><span class="o">]</span>
</code></pre></figure></notextile></div>

<p>That 70220584822820 is our block callback. And it’s first. Why is it first? Can we get it to go last?  Callbacks are run in a last-first order. Further, changing it to something like the following also doesn’t work.</p>

<div class="bogus-wrapper"><notextile><figure class="code ruby"><figcaption><span></span></figcaption><pre><code class="ruby"><span class="k">class</span> <span class="nc">Photo</span> <span class="o">&lt;</span> <span class="ss">ActiveRecord</span><span class="p">:</span><span class="ss">:Base</span>
  <span class="n">mount_uploader</span> <span class="ss">:image</span><span class="p">,</span> <span class="no">ImageUploader</span>

  <span class="n">after_save</span> <span class="ss">on</span><span class="p">:</span> <span class="ss">:create</span> <span class="k">do</span>
    <span class="no">Pusher</span><span class="o">.</span><span class="n">notify</span><span class="p">(</span><span class="s2">&quot;new_photo&quot;</span><span class="p">,</span> <span class="no">PhotoSerializer</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="nb">self</span><span class="p">)</span><span class="o">.</span><span class="n">attributes</span><span class="p">)</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></figure></notextile></div>

<h3 id="so-then-what-the-hell-works">So then what the hell works?</h3>

<p>We need to store the image before we get the attributes. So, let’s add that <code>store_image!</code> callback we saw in the list of callbacks. This will result in <code>store_image!</code> being called twice, but it won’t actually store the image twice — the second call is basically a no-op.</p>

<div class="bogus-wrapper"><notextile><figure class="code ruby"><figcaption><span></span></figcaption><pre><code class="ruby"><span class="k">class</span> <span class="nc">Photo</span> <span class="o">&lt;</span> <span class="ss">ActiveRecord</span><span class="p">:</span><span class="ss">:Base</span>
  <span class="n">mount_uploader</span> <span class="ss">:image</span><span class="p">,</span> <span class="no">ImageUploader</span>

  <span class="n">after_save</span> <span class="ss">on</span><span class="p">:</span> <span class="ss">:create</span> <span class="k">do</span>
    <span class="n">store_image!</span> <span class="c1">## It’s this. this is carrierwave saving the image.</span>
    <span class="no">Pusher</span><span class="o">.</span><span class="n">notify</span><span class="p">(</span><span class="s2">&quot;new_photo&quot;</span><span class="p">,</span> <span class="no">PhotoSerializer</span><span class="o">.</span><span class="n">new</span><span class="p">(</span><span class="nb">self</span><span class="p">)</span><span class="o">.</span><span class="n">attributes</span><span class="p">)</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></figure></notextile></div>

<div class="bogus-wrapper"><notextile><figure class="code json"><figcaption><span></span></figcaption><pre><code class="json"><span class="p">{</span>
    <span class="nt">&quot;id&quot;</span><span class="p">:</span> <span class="s2">&quot;399ca80efb2bd65e7254f299adfe278a&quot;</span><span class="p">,</span>
    <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;thumbythumbythumby&quot;</span><span class="p">,</span>
    <span class="nt">&quot;large_image_url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://sevensevenseven-dev.s3.amazonaws.com/uploads/photo/photo/32/large_thumbnail.jpg&quot;</span><span class="p">,</span>
    <span class="nt">&quot;thumb_photo_url&quot;</span><span class="p">:</span> <span class="s2">&quot;https://sevensevenseven-dev.s3.amazonaws.com/uploads/photo/photo/32/thumb_thumbnail.jpg&quot;</span>
<span class="p">}</span>
</code></pre></figure></notextile></div>

<h3 id="it-works-rejoice-then-anger">IT WORKS. REJOICE. Then: Anger.</h3>

<p>CALLBACKS!!! </p>

<p><img src="http://jessewolgamott.com/images/khallbacks.jpg" alt="khallbacks" /></p>

<p>It reminds me of a <a href="http://jessewolgamott.com/blog/2012/06/06/railsconf-2012-ignite-talk-activerecord-and-velveeta/">story about a younger Rails developer warning other Rails devs about the dangers of Callbacks, and how they tend to screw you over</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Rails and the next 5 years]]></title>
    <link href="http://jessewolgamott.com/blog/2014/12/05/rails-and-the-next-5-years/"/>
    <updated>2014-12-05T09:54:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2014/12/05/rails-and-the-next-5-years</id>
    <content type="html"><![CDATA[<p>After a few flirtatious encounters with Ruby, I left .NET in 2009.
I was looking for something better, something where I
didn’t use an IDE, something where I didn’t feel like I was fighting the
entire culture, and a place I could be happy being a devloper again.</p>

<p>I found Rails. I found open source. I found Ruby. And I found myself.</p>

<p>Ruby/Rails to me: a community where people help each other learn, full of
interesting and fun challenges, and a desire to learn the entire stack from UNIX
to CSS. </p>

<p>Fast forward 5 years; I’ve been thinking about what the next 5 years will look
like, for both me specifically and for web/mobile application in general.</p>

<p>It’s fairly clear to me that most medium to large’ish apps won’t be a single
Rails app with 100 controllers. That dog has tried to hunt, and well… that
dog won’t hunt. OneLargeRailsApp is not the future. </p>

<p>Rails isn’t going away. I will still use it for prototyping and for
applications where expressiveness is key (billing code and administration of
data are two examples). Rails will become part of the puzzle, not the whole
thing. I don’t envision anything being the entire puzzle anymore. Too much
awesome tech which each do one thing super awesomely.</p>

<h3 id="prediction-apps-in-this-half-decade-will-be-split-up">Prediction: apps in this half-decade will be split up</h3>

<ul>
  <li>Many Apps (iOS/android, some rails, some Ember, some R, some Go)</li>
  <li>Depending on your worldview, <code>gsub/Go/Node|Elixir/</code></li>
</ul>

<p>I don’t anticipate quote-unquote leaving Rails. There’s no need to leave like
there was a need for me to flee .NET. Instead, the communities will merge
together under an open-source umbrella. I doubt there will be one big huge
community in which you do ALL of your development. </p>

<p>The future, in my opinion, is many languages. Many communities. Many meetups. </p>

<p>Bring on the future!</p>

<p>(and my hoverboards. and jetpacks. and flying cars)  </p>

<iframe src="http://giphy.com/embed/3jmLczk5BbfZC?html5=true" width="480" height="261" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""></iframe>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ember-cli: Getting Started with the Awesome]]></title>
    <link href="http://jessewolgamott.com/blog/2014/10/20/ember-cli-getting-started-with-the-awesome/"/>
    <updated>2014-10-20T13:40:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2014/10/20/ember-cli-getting-started-with-the-awesome</id>
    <content type="html"><![CDATA[<p>ember-cli <sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> is a command line application that creates a separate project for your ember project.
It is crafted by the Ember core team and extended by the Ember community <sup id="fnref:"><a href="#fn:" rel="footnote"></a></sup>.
So: your backend API will be in 1 app/repo, and ember in a seperate one. This is
a good thing for all sorts of reasons, but mostly: Your Front End App has grown
up.</p>

<blockquote class="twitter-tweet" lang="en"><p>So excited by how Ember CLI is
shaping up. This is the story I&#39;ve been wanting to tell about developing web
apps for the last 3 years.</p>&mdash; Tom Dale (@tomdale) <a href="https://twitter.com/tomdale/status/523265743610060800">October 18,
2014</a></blockquote>
<script async="" src="http://jessewolgamott.com//platform.twitter.com/widgets.js" charset="utf-8"></script>

<p>What does ember-cli give you over other-tool.js?</p>

<ul>
  <li>ember-cli includes the ability to build SCSS, Coffee-Script, include bower assets, and test your code.
It will generate ember components for you in the same style as “rails generate model Customer”</li>
  <li>ember-cli can run all of your front-end tests. Fastly. Without hair-pulling.</li>
  <li>ember-cli can build the code for you (into a dist) folder, which can be deployed, or copied to a Rails public folder.</li>
  <li>ember-cli can also be deployed directly to Heroku, or used to build Cordova applications on iOS and Android.</li>
</ul>

<p>** Tl;dr ember-cli is the awesome **</p>

<p>However: There is a confusion generating getting-started period where you might be confused by some of
the conventions. (confession: I had to fiddle around to figure stuff out.
Hopefully, you dear reader won’t have to do so).</p>

<h2 id="es6-modules">ES6 Modules</h2>
<p>If you’ve used ember before in Rails or Lineman<sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup>, moving to ember-cli could confuse you a bit — 
ember-cli uses ES6 modules, which you may have never seen before.</p>

<p>Prior to ember-cli, you may have declared your ember data models in this fashion:</p>

<p>** app/js/models/user.js **</p>

<div class="bogus-wrapper"><notextile><figure class="code javascript"><figcaption><span></span></figcaption><pre><code class="javascript"><span class="nx">App</span><span class="p">.</span><span class="nx">User</span> <span class="o">=</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">Model</span><span class="p">.</span><span class="nx">extend</span><span class="p">({</span>
  <span class="nx">first_name</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">),</span>
  <span class="nx">last_name</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">),</span>
  <span class="nx">email</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">),</span>
  <span class="nx">admin</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;boolean&#39;</span><span class="p">)</span>
<span class="p">});</span>
</code></pre></figure></notextile></div>

<p>Things to notice: in this file, we assume that Ember and Ember Data have already been loaded, 
and are in the global namespace ready for use. </p>

<p>ES6, on the other hand, requires you to be explicit about what you want to use — you import namespaces, 
name them what you want, and then use them.</p>

<p>** app/models/recipe.js **</p>

<div class="bogus-wrapper"><notextile><figure class="code js"><figcaption><span></span></figcaption><pre><code class="js"><span class="kr">import</span> <span class="nx">DS</span> <span class="nx">from</span> <span class="s1">&#39;ember-data&#39;</span><span class="p">;</span>

<span class="kr">export</span> <span class="k">default</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">Model</span><span class="p">.</span><span class="nx">extend</span><span class="p">({</span>
  <span class="nx">permalink</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">),</span>
  <span class="nx">name</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">),</span>
  <span class="nx">ingredients</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">),</span>
  <span class="nx">instructions</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">),</span>
  <span class="nx">description</span><span class="o">:</span> <span class="nx">DS</span><span class="p">.</span><span class="nx">attr</span><span class="p">(</span><span class="s1">&#39;string&#39;</span><span class="p">)</span>
<span class="p">});</span>
</code></pre></figure></notextile></div>

<p>We import the “DS” from ember-data, and it exports the object we define. What we notice:</p>

<ol>
  <li>We never say this is a “Recipe”. Instead, the ember-cli “Resolver” knows that this is from recipe.js and 
therefor is a “Recipe”.</li>
  <li>The “export default” is important. Without it, nothing happens.</li>
  <li>It’s extremely important to name files correctly. Extreme Extremeness.</li>
</ol>

<h2 id="getting-sass-working">Getting Sass Working</h2>
<p>Coming from Rails, the first thing I want to do is work with Sass. I found a couple of loops you had to 
jump through to get your .scss working again. </p>

<h4 id="step-1-install-brocolli-sass-and-broccoli-merge-trees">Step 1: install brocolli-sass and broccoli-merge-trees</h4>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash">npm install --save-dev broccoli-sass
npm install --save-dev broccoli-merge-trees
</code></pre></figure></notextile></div>

<p>If you’re new to npm, the “–save-dev” means “use only in this project”.</p>

<h4 id="step-2-edit-brocfilejs">Step 2: edit Brocfile.js</h4>

<p>Make it look like this:</p>

<div class="bogus-wrapper"><notextile><figure class="code js"><figcaption><span></span></figcaption><pre><code class="js"><span class="cm">/* global require, module */</span>

<span class="kd">var</span> <span class="nx">EmberApp</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;ember-cli/lib/broccoli/ember-app&#39;</span><span class="p">);</span>

<span class="kd">var</span> <span class="nx">app</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">EmberApp</span><span class="p">();</span>

<span class="kd">var</span> <span class="nx">compileSass</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;broccoli-sass&#39;</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">mergeTrees</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span><span class="s1">&#39;broccoli-merge-trees&#39;</span><span class="p">);</span>

<span class="kd">var</span> <span class="nx">sassSources</span> <span class="o">=</span> <span class="p">[</span>
  <span class="s1">&#39;app/styles&#39;</span><span class="p">,</span>
  <span class="s1">&#39;vendor/css&#39;</span>
<span class="p">]</span>

<span class="kd">var</span> <span class="nx">appCss</span> <span class="o">=</span> <span class="nx">compileSass</span><span class="p">(</span> <span class="nx">sassSources</span> <span class="p">,</span> <span class="s1">&#39;app.scss&#39;</span><span class="p">,</span> <span class="s1">&#39;assets/app.css&#39;</span><span class="p">);</span>
<span class="kd">var</span> <span class="nx">appAndCustomDependencies</span> <span class="o">=</span> <span class="nx">mergeTrees</span><span class="p">([</span><span class="nx">app</span><span class="p">.</span><span class="nx">toTree</span><span class="p">(),</span><span class="nx">appCss</span><span class="p">],</span> <span class="p">{</span>
  <span class="nx">overwrite</span><span class="o">:</span> <span class="kc">true</span>
<span class="p">});</span>
<span class="c1">// EXPORT ALL THE THINGS!</span>
<span class="nx">module</span><span class="p">.</span><span class="nx">exports</span> <span class="o">=</span> <span class="nx">appAndCustomDependencies</span><span class="p">;</span>
</code></pre></figure></notextile></div>

<p>This will create an asset-pipeline of sorts for you. Broccoli will compile any sass files in app/styles and vendor/css, and compile app.scss into “assets/app.css”. </p>

<p>Generally, this is what you want.</p>

<h4 id="step-3-customize-your-sass">Step 3: Customize your sass</h4>

<p>Move app/styles/app.css to app/styles/app.scss. You can now use scss all you like:</p>

<div class="bogus-wrapper"><notextile><figure class="code scss"><figcaption><span></span></figcaption><pre><code class="scss"><span class="nt">body</span> <span class="p">{</span>
  <span class="na">color</span><span class="o">:</span> <span class="nf">lighten</span><span class="p">(</span><span class="mh">#222222</span><span class="o">,</span> <span class="mi">20</span><span class="kt">%</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></figure></notextile></div>

<p>(We’ll use Bourbon in a future article)</p>

<h2 id="creating-routes">Creating Routes</h2>

<div class="bogus-wrapper"><notextile><figure class="code scss"><figcaption><span></span></figcaption><pre><code class="scss"><span class="nt">ember</span> <span class="nt">generate</span> <span class="nt">route</span> <span class="nt">Index</span>
</code></pre></figure></notextile></div>

<p>This will create app/routes/index.js (and create “routes” directory for you, cool). We’ll change the default to the standard ember starter:</p>

<div class="bogus-wrapper"><notextile><figure class="code scss"><figcaption><span></span></figcaption><pre><code class="scss"><span class="nt">import</span> <span class="nt">Ember</span> <span class="nt">from</span> <span class="s1">&#39;</span><span class="s2">ember&#39;</span><span class="o">;</span>

<span class="nt">export</span> <span class="nt">default</span> <span class="nt">Ember</span><span class="nc">.Route.extend</span><span class="o">(</span><span class="p">{</span>
  <span class="na">model</span><span class="o">:</span> <span class="nf">function</span><span class="p">()</span> <span class="p">{</span>
    <span class="nt">return</span> <span class="o">[</span><span class="s2">&quot;red&quot;</span><span class="o">,</span> <span class="s2">&quot;yellow&quot;</span><span class="o">,</span> <span class="s2">&quot;green&quot;</span><span class="o">];</span>
  <span class="p">}</span>
<span class="p">}</span><span class="na">);</span>
</code></pre></figure></notextile></div>

<p>And we’ll create a template to show. </p>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash">ember generate template index
</code></pre></figure></notextile></div>

<p>This created app/templates/index.hbs. We’ll change its contents to:</p>

<script src="https://gist.github.com/jwo/8fdfe5e630d37a07cdce.js"></script>

<h3 id="running-locally">Running Locally</h3>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash">ember server
</code></pre></figure></notextile></div>

<p>If things are good to go, you’ll see the colors listed out on the screen. WOAH, the power.</p>

<h3 id="building-for-deploying">Building for Deploying</h3>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash">ember build
</code></pre></figure></notextile></div>

<p>This creates a “dist” directory with “index.html” and other static assets. We can deploy this to S3, or anywhere else. TOTES AWESOME.</p>

<h3 id="deploying-to-heroku">Deploying to Heroku</h3>

<p>If we run into CORS problems, or generally want to use Heroku, there’s a build pack for maximum awesome.</p>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash">heroku create --buildpack https://github.com/tonycoco/heroku-buildpack-ember-cli.git
git push heroku master
</code></pre></figure></notextile></div>

<p>At this point, you have an ember app, build with ember-cli, hosted on Heroku. </p>

<p>We can set an API Proxy to get around CORS problems:</p>

<p><code>heroku config:set API_URL=http://api.example.com/</code></p>

<p>If you want to checkout a repo where this is hooked up <sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup> </p>

<h2 id="where-to-go-from-here">Where to go from here?</h2>

<ul>
  <li>Check out ember-cli-cordova https://github.com/poetic/ember-cli-cordova </li>
  <li>Watch Jake from Poetic Systems’s Houston.JS talk on using this to build mobile apps</li>
  <li>
    <blockquote class="twitter-tweet" lang="en"><p>My talk on building hybrid apps with ember is up! <a href="http://t.co/iKOB75Dgex">http://t.co/iKOB75Dgex</a> Presented for <a href="https://twitter.com/HoustonJS">@HoustonJS</a> at <a href="https://twitter.com/PoeticSystems">@PoeticSystems</a></p>&mdash; Jake Craige (@jakecraige) <a href="https://twitter.com/jakecraige/status/518037818246189056">October 3, 2014</a></blockquote>
    <script async="" src="http://jessewolgamott.com//platform.twitter.com/widgets.js" charset="utf-8"></script>
  </li>
  <li>Add Ember-Data and use the ember-cli-buildpack’s API proxy <sup id="fnref:5"><a href="#fn:5" rel="footnote">5</a></sup></li>
  <li>Have serious FUN.</li>
</ul>

<h3 id="next-articles-in-this-series">Next Articles in this series</h3>
<ol>
  <li>How to Bourbon/Neat/Bitters your ember-cli</li>
  <li>How to use environment variables in ember-cli and on heroku</li>
  <li>How to customize the JSON you receive from someone’s API and play nicely with ember-data</li>
</ol>

<div class="footnotes">
    <ol>
        <li id="fn:1"><p><a href="http://www.ember-cli.com/">ember-cli</a>
  <a href="#fnref:1" rev="footnote">↩</a></p>
</li><li id="fn:2"><p>(seriously, check out <a href="http://www.emberaddons.com/">emberaddons.com</a>),
  <a href="#fnref:2" rev="footnote">↩</a></p>
</li><li id="fn:3"><p><a href="https://github.com/jwo/embereno-buildpack-test">jwo/embereno-buildpack-test</a>
  <a href="#fnref:3" rev="footnote">↩</a></p>
</li><li id="fn:4"><p><a href="http://www.linemanjs.com/">LinemanJS.com</a>
  <a href="#fnref:4" rev="footnote">↩</a></p>
</li><li id="fn:5"><p><a href="https://github.com/jwo/weeatt-ember-cli">GitHub/Jwo/weeatt-ember-cli</a>
<a href="#fnref:5" rev="footnote">↩</a></p>
</li>
    </ol>
</div>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Using pg_dumpall to move all postgres databases to a new laptop]]></title>
    <link href="http://jessewolgamott.com/blog/2014/10/16/using-pg-dumpall-to-move-all-postgres-databases-to-a-new-laptop/"/>
    <updated>2014-10-16T10:35:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2014/10/16/using-pg-dumpall-to-move-all-postgres-databases-to-a-new-laptop</id>
    <content type="html"><![CDATA[<p>I recently upgraded laptops because it’s been 2 years and my business lease on
it was up. Which: cool to have the new MacBook Air with the day-long-battery TM, but moving computers is a pain.  </p>

<p>Except: I have <a href="https://github.com/jwo/dotfiles">dot files</a> and that makes it easier. After copying my home directory over, re-dotfiling, things
seemed good.  </p>

<p>Except: my postgres databases. How to get them all from Air A to Air B without copying every.single.one.  </p>

<p>Enter: pg_dumpall. It’ll dump every database into a file, with which you import on new computer.</p>

<p>When moving to a new computer</p>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash"><span class="nv">$ </span>pg_dumpall &gt; db.out
</code></pre></figure></notextile></div>

<p>(Move file to to new computer)</p>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash"><span class="nv">$ </span>psql -f dbout postgres
</code></pre></figure></notextile></div>

<blockquote>
  <p>if you have trouble with “database $username not found”, type in “createdb”</p>
</blockquote>

<p>To confirm, </p>

<div class="bogus-wrapper"><notextile><figure class="code bash"><figcaption><span></span></figcaption><pre><code class="bash">psql
</code></pre></figure></notextile></div>

<p>And then <code>\l</code> to list the databases</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Excitement! I'm teaching Rails at The Iron Yard Houston]]></title>
    <link href="http://jessewolgamott.com/blog/2014/05/05/excitement-im-teaching-rails-at-the-iron-yard-houston/"/>
    <updated>2014-05-05T10:28:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2014/05/05/excitement-im-teaching-rails-at-the-iron-yard-houston</id>
    <content type="html"><![CDATA[<p>Teaching Ruby has been awesome. It’s been so awesome that I want more. I want to 
meet the students face to face, and help change their lives for the better.  To
make that happen, I’m going to teach Rails at Houston’s first open-source stack code school.
The Iron Yard Houston. Classes start June 2nd.</p>

<p>In March, I flew to Greenville, South Carolina, to experience a course first
hand. The cohorts were 8 weeks into their JavaScript course, and amazed me with 
their abilities. This was the real deal (discussing how to make
Backbone models more maintainable). The Iron Yard came to Houston, and asked me
to teach the Rails Engineering course. I kept looking for a reason to say no
… </p>

<!-- more -->

<p>The Iron Yard’s is student focused to its core.  Their formula is not only badass 
but is also designed for optimal awesome for the students. Reasonable rates, fostering community
involvement, mock interviews, and a 100% guarantee. I had no more “no’s” to give.</p>

<p>I’m teaching a Ruby heavy Rails Engineering course. <a href="http://mkeas.org/#/">Matt Keas</a> is leading
the front end course (JavaScripts).</p>

<p>My goal? Give people the opportunity to learn how to have a much happier
career. All while using he happiest stack I’ve encountered yet: Rails+. Rails+: 
Rails as the API backend or Rails as the prototype. We’ll focus heavily on Ruby,
only getting into Rails after we’ve created console and sinatra apps. 
Stretch goal: EmberJS.</p>

<p>And the coolest thing? Instructors send a weekly recap of what their cohorts
are doing. Awesomely, the other instructors believe as I do students should learn Ruby.
After all, Rails isn’t magic, it’s Ruby.</p>

<ul>
  <li><a href="http://theironyard.com/academy/rails-engineering/">About the Rails Curriculum</a></li>
  <li><a href="http://theironyard.com/academy/rails-engineering/faq/">FAQ</a></li>
  <li><a href="https://theironyard.typeform.com/to/BYIK2p">Sign Up</a></li>
  <li><a href="https://www.hipchat.com/gVQZ3qwbv">Join the chatroom</a></li>
</ul>

<h3 id="techsas-free-coding-event-houston-may-10th-2014">TechSas: Free Coding Event (Houston, May 10th, 2014)</h3>

<p>Since everything is bigger in Texas, we’re hosting a free coding event, 
<a href="http://techsas.co/">Tech-sas</a>. We’ve sold out our venue, which is pretty
freaking awesome. Over 200 people, both with some coding experience and total
beginners, will learn how to build awesome things. (Free). (Soldout). ( :O )</p>

<h3 id="final-slug-of-awesomeness-free-coding-for-kids-scratch">Final Slug of Awesomeness? Free Coding for Kids (Scratch)</h3>

<p>Volunteering at the Austin KidsCodeCamp at RailsConf (Austin) was a changing 
experience. From 8-15 years old, kids were learning to program using Scratch,
blew their minds wide open. Especially Robots –  So much excitement, very potential.</p>

<p>The Iron Yard has (free) code schools for kids all over the
<a href="http://theironyard.com/academy/scratch">south and southeast</a>.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Reminder to hand-craft your whenever files]]></title>
    <link href="http://jessewolgamott.com/blog/2013/03/27/reminder-to-hand-craft-your-whenever-files/"/>
    <updated>2013-03-27T14:39:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2013/03/27/reminder-to-hand-craft-your-whenever-files</id>
    <content type="html"><![CDATA[<p>Day 5: crash. Day 6: crash. Each day, we were receiving notifications from
Rackspace that the server had exceeded its memory allocation and was thrashing
too hard; it rebooted our server for us.</p>

<p>My initial reaction: Increase the memories!</p>

<p>I looked deeper into the problem, and along with some colleagues, discovered
that at midnight our server was kicking off 9 different processes at the same 
time. 9x Rails is just about 8x too many.</p>

<!-- more -->

<p>My whenever schedule (names changed to reflect tex-mex dishes)</p>

<div><div class="CodeRay">
  <div class="code"><pre>set <span class="symbol">:output</span>, <span class="string"><span class="delimiter">'</span><span class="content">log/cron.log</span><span class="delimiter">'</span></span>

job_type <span class="symbol">:rake</span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">cd :path &amp;&amp; RAILS_ENV=:environment bundle exec rake :task :output</span><span class="delimiter">&quot;</span></span>

every <span class="integer">1</span>.day, <span class="symbol">:at</span> =&gt; <span class="string"><span class="delimiter">'</span><span class="content">12am</span><span class="delimiter">'</span></span> <span class="keyword">do</span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">margarita:enchiladas</span><span class="delimiter">'</span></span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">margarita:fajitas</span><span class="delimiter">'</span></span>
<span class="keyword">end</span>

every <span class="integer">1</span>.minute <span class="keyword">do</span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">guacamole:soft_tacos</span><span class="delimiter">'</span></span>
<span class="keyword">end</span>

every <span class="integer">12</span>.hours <span class="keyword">do</span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">guacamole:tortilla_soup</span><span class="delimiter">'</span></span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">guacamole:grande_combo_de_tejas</span><span class="delimiter">'</span></span>
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<p>Seems pretty standard for how I organize and schedule tasks. But each of these
would be (and were) running at midnight, since they all intersected that particular
intersection of space and time.</p>

<p>Instead, if we spread this around a bit, we could still get the business
requirements accomplished:</p>

<ol>
  <li>Order soft tacos pretty often</li>
  <li>Get the other dishes one or twice a day</li>
</ol>

<p>The timing, other than that, didn’t matter. And in your apps, it probably
doesn’t matter that often either.</p>

<p>An updated “Hand Crafted, Artisan Tex Mex Whenever File”</p>

<div><div class="CodeRay">
  <div class="code"><pre>set <span class="symbol">:output</span>, <span class="string"><span class="delimiter">'</span><span class="content">log/cron.log</span><span class="delimiter">'</span></span>

job_type <span class="symbol">:rake</span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">cd :path &amp;&amp; RAILS_ENV=:environment bundle exec rake :task :output</span><span class="delimiter">&quot;</span></span>

every <span class="integer">1</span>.day, <span class="symbol">:at</span> =&gt; <span class="string"><span class="delimiter">'</span><span class="content">12am</span><span class="delimiter">'</span></span> <span class="keyword">do</span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">margarita:enchiladas</span><span class="delimiter">'</span></span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">margarita:fajitas</span><span class="delimiter">'</span></span>
<span class="keyword">end</span>

<span class="comment"># skip the top of the hour. Every 5 minutes</span>
every <span class="string"><span class="delimiter">'</span><span class="content">5,10,15,20,25,30,35,40,45,50,55 * * * *</span><span class="delimiter">'</span></span> <span class="keyword">do</span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">guacamole:soft_tacos</span><span class="delimiter">'</span></span>
<span class="keyword">end</span>

every <span class="integer">1</span>.day, <span class="symbol">:at</span> =&gt; [<span class="string"><span class="delimiter">'</span><span class="content">3am</span><span class="delimiter">'</span></span>, <span class="string"><span class="delimiter">'</span><span class="content">3pm</span><span class="delimiter">'</span></span>] <span class="keyword">do</span>
  rake <span class="string"><span class="delimiter">'</span><span class="content">guacamole:tortilla_soup guacamole:grande_combo_de_tejas</span><span class="delimiter">'</span></span>
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<p>What did this gain us?</p>

<ul>
  <li>At midnight, only 2 tasks will run.</li>
  <li>Instead of <code>tortilla_soup</code> and <code>grande_combo_de_tejas</code> running at the same time, they’ll now run sequentially (saves on the RAM) </li>
  <li><code>soft_tacos</code> skips the midnight run</li>
</ul>

<p>Reminder: Hand craft your whenever cron jobs. And to test the output: <code>whenever</code></p>

<div><div class="CodeRay">
  <div class="code"><pre><span class="integer">0</span> <span class="integer">0</span> * * * <span class="regexp"><span class="delimiter">/</span><span class="content">bin</span><span class="delimiter">/</span></span>bash -l -c <span class="string"><span class="delimiter">'</span><span class="content">cd /Users/jwo/Projects/texmex &amp;&amp; RAILS_ENV=production bundle exec rake margarita:enchiladas &gt;&gt; log/cron.log 2&gt;&amp;1</span><span class="delimiter">'</span></span>

<span class="integer">0</span> <span class="integer">0</span> * * * <span class="regexp"><span class="delimiter">/</span><span class="content">bin</span><span class="delimiter">/</span></span>bash -l -c <span class="string"><span class="delimiter">'</span><span class="content">cd /Users/jwo/Projects/texmex &amp;&amp; RAILS_ENV=production bundle exec rake margarita:fajitas &gt;&gt; log/cron.log 2&gt;&amp;1</span><span class="delimiter">'</span></span>

<span class="integer">5</span>,<span class="integer">10</span>,<span class="integer">15</span>,<span class="integer">20</span>,<span class="integer">25</span>,<span class="integer">30</span>,<span class="integer">35</span>,<span class="integer">40</span>,<span class="integer">45</span>,<span class="integer">50</span>,<span class="integer">55</span> * * * * <span class="regexp"><span class="delimiter">/</span><span class="content">bin</span><span class="delimiter">/</span></span>bash -l -c <span class="string"><span class="delimiter">'</span><span class="content">cd /Users/jwo/Projects/texmex &amp;&amp; RAILS_ENV=production bundle exec rake guacamole:start_guacamole &gt;&gt; log/cron.log 2&gt;&amp;1</span><span class="delimiter">'</span></span>

<span class="integer">0</span> <span class="integer">3</span>,<span class="integer">15</span> * * * <span class="regexp"><span class="delimiter">/</span><span class="content">bin</span><span class="delimiter">/</span></span>bash -l -c <span class="string"><span class="delimiter">'</span><span class="content">cd /Users/jwo/Projects/texmex &amp;&amp; RAILS_ENV=production bundle exec rake guacamole:tortilla_soup guacamole:grande_combo_de_tejas &gt;&gt; log/cron.log 2&gt;&amp;1</span><span class="delimiter">'</span></span>
</pre></div>
</div>
</div>

<p>More on Cron and whenever:</p>

<ul>
  <li><a href="http://en.wikipedia.org/wiki/Cron">Cron</a></li>
  <li><a href="http://railscasts.com/episodes/164-cron-in-ruby">Cron in Ruby</a></li>
  <li><a href="https://github.com/javan/whenever">Whenever gem</a></li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[RailsBerry rejected my talk and I am happy about it]]></title>
    <link href="http://jessewolgamott.com/blog/2013/03/04/railsberry-rejected-my-talk-and-i-am-happy-about-it/"/>
    <updated>2013-03-04T13:12:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2013/03/04/railsberry-rejected-my-talk-and-i-am-happy-about-it</id>
    <content type="html"><![CDATA[<p>I received the greatest email this weekend: RailsBerry had rejected my talk for
their 2013 conference. Normally: another “oh well, they must have found really
great talks to reject mine” and a sigh. Why did I like this rejection email?</p>

<h3 id="railsberry-gave-me-personalized-actionable-feedback-on-making-my-future-submissions-better">RailsBerry gave me personalized, actionable feedback on making my future submissions better.</h3>

<!-- more -->

<p>First, the details about my talk. I’ve been teaching <a href="http://rubyoffrails">Ruby off Rails</a>
for a year now. I heart Ruby like a hundred &lt;3s
and think we can show off Ruby more than just showing Rails APIs to developers.</p>

<p>My description of <em>Teaching Ruby without Rails</em></p>

<blockquote>
  <p>What are the essential elements of Ruby that an artisan developer ninja
developer needs to understand before they can see the beauty of Ruby? After all:
there was Ruby before there was Rails; There is Ruby outside of Rails.</p>

  <p>Let’s cover examples of how to teach Blocks, Send, Class Eval, and Modules to
developers who can develop, but not in Ruby land (yet). And, how these 4
features of Ruby can enlighten Rails and DSLs.</p>
</blockquote>

<p>In the ‘Why should we choose you’ section, I added:</p>

<blockquote>
  <p>Honestly? I don’t know if you should… I’m a pretty good speaker and people
have been way supportive of my teaching Ruby without the Rails.</p>

  <p>How about why you SHOULDN’T choose me, eh?</p>

  <ul>
    <li>I’m a white male from the US.</li>
    <li>I’m not an A-list Ruby developer</li>
    <li>I probably won’t get someone to buy tickets that wouldn’t buy it already</li>
  </ul>

  <p>However, some things that MAY tip the scales in my favor:</p>

  <ul>
    <li>I don’t use like a billionty meme’s in my talks</li>
    <li>I’m decently funny and hopefully inspiring</li>
    <li>I like &lt;3 tacos, Ruby, and Whiskey.</li>
  </ul>
</blockquote>

<p>I also included a link to my <a href="http://www.youtube.com/watch?feature=player_embedded&amp;v=Ucma74yqH6w">Rails Ignite 2012 talk</a>.
I submitted and waited. In late January, I received an email letting me know I
wasn’t selected. It was your standard rejection letter.</p>

<p>OK, I thought – and didn’t buy my plane ticket.  I was pretty surprised when
I received the explanation letter on March 3rd. Here
it is:</p>

<h3 id="the-letter-from-michael--railsberry">The Letter from Michael @ RailsBerry</h3>

<blockquote>
  <p>First of all thank you for taking your time and submitting proposal.
We have received more than 90 and had to select only 7 of them.
It wasn’t an easy task and I’d like to give you a little feedback
on why we didn’t choose ones that you had submitted.</p>

  <p>You’ve submitted :
  - Teaching Ruby without Rails</p>

  <p>Hmm tough call. You’ve convinced us that you are a good speaker.
  However the talk proposal lacked the “wow” factor and might not fit into 20
  minutes.</p>

  <p>The talk sounds kind of interesting and I’m sure it can get accepted by plenty
  of conferences.</p>
</blockquote>

<h3 id="what-i-like-about-the-rejection-email">What I like about the rejection email</h3>

<h5 id="my-talk-would-be-too-long">My talk would be too long</h5>
<p>I missed this completely, 20 minutes is a good speech length, not enough time 
to go over what I said I would).</p>

<h4 id="my-talk-wouldnt-wow-people">My talk wouldn’t <em>wow</em> people</h4>
<p>True enough, reading back over it. I should have submitted something like 
‘A Lambda, a Proc, and a Block walk into a bar’… and talk about how their 
similarities and differences).</p>

<h4 id="my-speaking-qualifications-are-there">My speaking qualifications are there</h4>
<p>I’m sending enough information in my submissions to convey I’m decent on stage)</p>

<h3 id="suggestions-for-conference-organizers">Suggestions for Conference Organizers</h3>

<p>Feedback like this would be very very awesome to send out to people who asked 
to speak at your conferences. Brutal honesty is best: otherwise the speakers 
won’t know what to change to get better.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Easy, Light Weight, and Magical Parallel Processing in Ruby]]></title>
    <link href="http://jessewolgamott.com/blog/2013/02/07/the-one-where-i-introduce-celluloid-pmap/"/>
    <updated>2013-02-07T11:18:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2013/02/07/the-one-where-i-introduce-celluloid-pmap</id>
    <content type="html"><![CDATA[<h2 id="ever-had-a-set-of-tasks-in-ruby-take-too-long">Ever had a set of tasks in Ruby take too long?</h2>

<p>We’ve all been there – you have code that needs to be run, and it’s taking forever. You wish there was a way to speed things along, but you can’t tweak the algorithm. You read about multi-threading but hear tales of dragons, pirates, and warnings of people who have ventured before you never to return.</p>

<h2 id="worry-not-celluloid-is-here-and-celluloid-pmap-is-an-easy-way-to-get-started">Worry Not, Celluloid is here! (And celluloid-pmap is an easy way to get started)</h2>
<p>But fear not! <a href="http://celluloid.io">Celluloid</a> exists, and is awesome. It’s an actor based implementation, but all you <em>need</em> to know is that it’s awesome. You can process an array of things in parallel, and continue when it’s complete.</p>

<!-- more -->

<p>Let’s say you started with the task to see which servers are alive and which are not-so-much-alive:</p>

<div><div class="CodeRay">
  <div class="code"><pre>servers = <span class="constant">Server</span>.all.map <span class="keyword">do</span> |server|
  server.status = check_status(server) 
<span class="keyword">end</span>
<span class="comment"># do something with the non-responsive servers</span>
</pre></div>
</div>
</div>

<p>So this would map over all servers, and make a network call to check if it’s alive.</p>

<p>In a normal non-parallel world, if each status call would take 0.1 seconds, then 10 servers would take 1 second, and 10000 servers would take 1000 seconds. Sub-optimal.</p>

<p>If you execute them in parallel, then goodness happens. Under the hood, celluloid-pmap uses Celluloid::Future’s for each element in the array. The pmap will wait until the value is complete before returning, and we’ll wait for them all to finish before continuing.</p>

<p>That same example in parallel would look:</p>

<div><div class="CodeRay">
  <div class="code"><pre><span class="constant">Server</span>.all.pmap <span class="keyword">do</span> |user|
   <span class="comment">#… same code here</span>
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<h2 id="parallelization-cuts-processing-time-to-your-slowest-item">Parallelization cuts processing time to your slowest item</h2>

<p>Let’s say you need to create a PDF report for a set of users, store them at S3, and download them for you to give to your users when it’s complete. This is a great case for parallel processing since you’ll be waiting on:</p>

<ul>
  <li>wkhtmlpdf to convert HTML to PDF</li>
  <li>fog to upload PDF to S3</li>
  <li>curl to download PDF from S3 for you</li>
</ul>

<p>With the example below, your total processing time gets cut to the slowest report generated/uploaded/downloaded.</p>

<div><div class="CodeRay">
  <div class="code"><pre>    [<span class="string"><span class="delimiter">&quot;</span><span class="content">email1@example.com</span><span class="delimiter">&quot;</span></span>, <span class="string"><span class="delimiter">&quot;</span><span class="content">email2@example.com</span><span class="delimiter">&quot;</span></span>].pmap <span class="keyword">do</span> |email|
      user = <span class="constant">User</span>.find_by_email!(email)
      <span class="constant">CreatesReports</span>.new(user).generate_reports
      user.reports.each{|report| <span class="shell"><span class="delimiter">`</span><span class="content">curl -o </span><span class="inline"><span class="inline-delimiter">#{</span>report.filename<span class="inline-delimiter">}</span></span><span class="content"> </span><span class="char">\&quot;</span><span class="inline"><span class="inline-delimiter">#{</span>report.pdf.url<span class="inline-delimiter">}</span></span><span class="char">\&quot;</span><span class="delimiter">`</span></span>}
      puts <span class="string"><span class="delimiter">&quot;</span><span class="content">reports ready for </span><span class="inline"><span class="inline-delimiter">#{</span>email<span class="inline-delimiter">}</span></span><span class="delimiter">&quot;</span></span>
    <span class="keyword">end</span>
    puts <span class="string"><span class="delimiter">&quot;</span><span class="content">Everybody's done!</span><span class="delimiter">&quot;</span></span>
</pre></div>
</div>
</div>

<p>Other examples of usages:</p>

<ul>
  <li>Searching Google and Amazon and What</li>
  <li>Scheduling of Sidekiq jobs in parallel to speed things up</li>
  <li>Deleting of files at once</li>
  <li>Making database calls in parallel</li>
</ul>

<h2 id="make-sure-to-obey-your-database-connection-maximums">Make sure to obey your database connection maximums</h2>

<p>If you are iterating over a set of documents and calling any resource that has a limited connection set, or a rate limit, you might run into a Connection Pool problem. That is, you might try connect with 20 connections and your default pool size is 5. What can be done?</p>

<p>celluloid-pmap uses a Celluoid Supervisor to set a maximum number of actors working at the same time. So if you can only connect to 5 postgres users at the same time, you can set that like so:</p>

<div><div class="CodeRay">
  <div class="code"><pre>users.pmap(<span class="integer">5</span>) {|user| user.say_anything! }
</pre></div>
</div>
</div>

<p>The (5) argument will say it’s OK to use as many as 5 actors at once. By default, celluloid-pmap will default to the number of cores your machine has.</p>

<h2 id="also-check-out-celluloid">Also check out Celluloid</h2>

<p>I started adding code into a Rails initializer from <a href="https://github.com/celluloid/celluloid/blob/master/examples/simple_pmap.rb">Celluloid Simple Pmap</a> example. It went like this:</p>

<p>config/initializers/celluloid-pmap.rb</p>

<div><div class="CodeRay">
  <div class="code"><pre><span class="keyword">module</span> <span class="class">Enumerable</span>
  <span class="keyword">def</span> <span class="function">pmap</span>(&amp;block)
    futures = map { |elem| <span class="constant">Celluloid</span>::<span class="constant">Future</span>.new(elem, &amp;block) }
    futures.map { |future| future.value }
  <span class="keyword">end</span>
<span class="keyword">end</span>
</pre></div>
</div>
</div>

<p>This worked very well, but I found I was adding it to every.single.project. So I worked up an example to have a Supervisor to help with connection pooling and rate limiting, and bam… a gem was born.</p>

<p>Installation and configuration is over at <a href="https://github.com/jwo/celluloid-pmap">https://github.com/jwo/celluloid-pmap</a>. But it’s as simple as you’d think:</p>

<pre><code>gem install celluloid-pmap
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The One Where I Have to Explain Why I Want Diversity in our Field]]></title>
    <link href="http://jessewolgamott.com/blog/2013/02/05/the-one-where-i-have-to-explain-why-i-want-diversity-in-our-field/"/>
    <updated>2013-02-05T09:09:00-06:00</updated>
    <id>http://jessewolgamott.com/blog/2013/02/05/the-one-where-i-have-to-explain-why-i-want-diversity-in-our-field</id>
    <content type="html"><![CDATA[<p><a href="https://twitter.com/RellyAB">@RellyAB</a>
<a href="https://twitter.com/RellyAB/status/298467323419967489">tweeted</a>:</p>

<blockquote>
  <p>If you are a guy and you want to help fight the good fight, tell people why you want diversity and not dickery, from your point of view.</p>
</blockquote>

<p>This comes after:</p>

<ul>
  <li>Ashe Dryden <a href="http://ashedryden.com/blog/we-deserve-better-than-this">was treated horribly</a>  </li>
  <li>Sarah Parmenter (whom I’ve never spoken to) <a href="http://www.sazzy.co.uk/2013/02/speaking-up/">was treated horribly</a></li>
</ul>

<p>And this is in the last week. </p>

<p>So. Why do I want diversity (and not dickery) in our field? a) it makes economic sense, b) we need to create better software and more of the same probably isn’t going to help, and c) it’s the human thing to do.</p>

<!-- more -->

<h2 id="it-makes-economic-sense">It Makes Economic Sense</h2>

<p>Software Development pays very well, and is in desperate need of qualified developers. The more highly paying jobs that exist increase the amount of money available to be spent on subscription codecasts, ebooks, and training materials. If there’s more money in the system, there’s more opportunities for <em>everyone</em> to take home more money. <a href="http://en.wikipedia.org/wiki/A_rising_tide_lifts_all_boats">A rising tide lifts all boats</a>.</p>

<p>Given that rather simple assertion, it does not make economic sense to drive people out of our industry. We should be welcoming people and making changes to our processes to become happier and more productive. We should be going out of our way to have a society that anyone can join if it interests them. We do not do this as an industry, and that does not make macro or micro-economic sense.</p>

<p>Given the extraordinary and unsatiable appetite our industry has for developers, it makes sense to teach people with an aptitude and interest for programming to do so. It is a way for low income families to have a better life. We should encourage this.</p>

<p><a href="http://www.thegcircle.com/blog/2012/when-women-make-money-it-helps-everyone/">When Women Make More Money, Everybody Wins</a></p>

<h2 id="it-will-result-in-better-software">It Will Result in Better Software</h2>

<p>Software gets better when we can break outside of our mental models and solve problems using a different mindset. What a fully functioning group needs is not 10 “rockstars” who think the same – that tends to lead to group think and programs that solve the wrong problems.</p>

<p>What groups need is diversity in world views, shared experiences, and cultural references. If you want to build an app that only people in your specific niche in the world truly get, you should eschew diversity. If you want to have as many people in the world use your software, you should embrace diversity.</p>

<p><a href="http://www.fastcodesign.com/1665597/how-women-are-leading-the-effort-to-make-robots-more-humane">Women are making robots more humane</a></p>

<h2 id="its-the-human-thing-to-do">It’s the human thing to do</h2>

<p>Things I believe in, an incomplete list:</p>

<ul>
  <li>
    <table>
      <tbody>
        <tr>
          <td>It is wrong to treat someone differently because of {skin-color</td>
          <td>gender</td>
          <td>sexuality</td>
          <td>anything}.</td>
        </tr>
      </tbody>
    </table>
  </li>
  <li>Gender, skin-color, and sexuality has no impact on the creative or analytical skillset</li>
  <li>There is no basis that men are better at software development than women (see the <a href="http://en.wikipedia.org/wiki/Grace_Hopper">inventor of the compiler</a>) [1]]</li>
</ul>

<p>I believe it is no longer acceptable to sit back and say the status quo is good enough. Because it is not good enough. From healthcare to income inequality to a growing police state – the status quo is not good enough and we should not be defending it.</p>

<p>Think of how people were treated fifty years ago — we’ve changed since then — but think about how you consider people who defended the status quo in the 1960s (my assumption here is that you do not think fondly of them).  </p>

<p>Be the person you want 2063-you to be proud of. I do not see any possible way that includes treating women as if they don’t belong in any profession.</p>

<h2 id="in-conclusion">In Conclusion</h2>
<p>Don’t we (collectively) believe that happier developers make for more productive developers? Don’t we want our software to make the world a better place? That starts with treating all people as human. Next, go out of your way to help.</p>

<p>Ways to help:</p>

<ul>
  <li>Call people out for being sexist</li>
  <li>Lower prices and other barriers to entry for women to learn our craft</li>
  <li>Don’t be awful to anyone</li>
  <li>Mentor and teach <a href="http://railsgirls.com/">RailsGirls</a> and <a href="http://workshops.railsbridge.org/">RailsBridge</a> both target women developers.</li>
</ul>

<p>I have disabled comments; To continue the discussion, let’s talk on twitter –
or better yet, write a blog post in response and/or in agreement.</p>

<p>[1] In fact, with the advancements that young girls have over young boys in math and science, one could conclude that we are losing our best developers before they get started. <a href="http://www.ams.org/notices/201201/rtx120100010p.pdf">Debunking Myths about Gender and Mathematics Performance</a></p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The One Where You Run Rake Commands with Capistrano]]></title>
    <link href="http://jessewolgamott.com/blog/2012/09/10/the-one-where-you-run-rake-commands-with-capistrano/"/>
    <updated>2012-09-10T13:38:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2012/09/10/the-one-where-you-run-rake-commands-with-capistrano</id>
    <content type="html"><![CDATA[<p>Simple Enough, right? Run some rake tasks on your servers. You think it’d be built in, but nope. Drink some sake and let capistrano do the work!</p>

<!-- more -->
<div class="tldr">
	<span class="heading">tl;dr</span> 
Use my codes to only precompile assets on cap:deploy when there is a change to assets or gems.
</div>

<h3 id="first-off-sake-is-not-sake">First Off, Sake is not <code>sake</code></h3>

<p><a href="https://github.com/defunkt">Defunkt</a> wrote <a href="http://rubygems.org/gems/sake">sake</a> in ought-eight (2008) for system wide rake tasks. This isn’t it; this is just a file, name it what you want.</p>

<h3 id="background">Background</h3>

<p>I’ll use rake tasks to do data-migrations that I don’t want to stick around in db/migrations. Or to do one-off things like re-process images.</p>

<p>But it’s not all that awesome to actually run those things in production when you need to. Here’s a way!</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>config/recipes/sake.rb  </span></figcaption>
 <pre><code class="ruby"><span class="n">namespace</span> <span class="ss">:sake</span> <span class="k">do</span>
  <span class="n">desc</span> <span class="s2">&quot;Run a task on a remote server.&quot;</span>
  <span class="c1"># run like: cap staging rake:invoke task=a_certain_task  </span>
  <span class="n">task</span> <span class="ss">:invoke</span> <span class="k">do</span>
    <span class="n">run</span><span class="p">(</span><span class="s2">&quot;cd </span><span class="si">#{</span><span class="n">deploy_to</span><span class="si">}</span><span class="s2">/current &amp;&amp; bundle exec rake </span><span class="si">#{</span><span class="no">ENV</span><span class="o">[</span><span class="s1">&#39;task&#39;</span><span class="o">]</span><span class="si">}</span><span class="s2"> RAILS_ENV=</span><span class="si">#{</span><span class="n">rails_env</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></figure></notextile></div>

<p>Then, make sure you require it</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>config/deploy.rb  </span></figcaption>
 <pre><code class="ruby"><span class="nb">load</span> <span class="s2">&quot;config/recipes/assets&quot;</span>
</code></pre></figure></notextile></div>

<p>And that’s it! Now, when you want to run that code, say to migrate a database:</p>

<div><div class="CodeRay">
  <div class="code"><pre>cap <span class="key">sake</span>:invoke task=<span class="string"><span class="delimiter">&quot;</span><span class="content">db:migrate</span><span class="delimiter">&quot;</span></span>
</pre></div>
</div>
</div>

<p>This is not mind-blowing, but it’s not very obvious for new deployers, so I wanted to add it here for the googlers.</p>

<h2 id="naming-notes">Naming Notes</h2>

<p>Don’t name your task rake – newer versions of rake (0.9.2) are not pleased with that. That’s how I ended on sake. (rake =&gt; sake).</p>

<h2 id="credit">Credit</h2>

<p>This <a href="http://stackoverflow.com/questions/312214/how-do-i-run-a-rake-task-from-capistrano">answer on Stack Overflow</a> had some good stuffs. I modified from there.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The One Where You Take Your Deploy to 11: Asset Pipeline]]></title>
    <link href="http://jessewolgamott.com/blog/2012/09/03/the-one-where-you-take-your-deploy-to-11-asset-pipeline/"/>
    <updated>2012-09-03T14:56:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2012/09/03/the-one-where-you-take-your-deploy-to-11-asset-pipeline</id>
    <content type="html"><![CDATA[<p>Things I love: the asset pipeline in Rails. Things I detest: Long deploys caused by recompiling the asset-pipeline when <em>I KNOW NOTHING HAS CHANGED</em>. It makes it hard to deploy constantly if each takes 2 minutes.</p>

<!-- more -->
<div class="tldr">
	<span class="heading">tl;dr</span> 
Use my codes to only precompile assets on cap:deploy when there is a change to assets or gems.
</div>

<h3 id="background">Background</h3>

<ul>
  <li>The asset pipeline needs to be precompiled in order to serve one awesome application.js and application.css file  </li>
  <li>Using a CSS library like Zurb or Bootstrap adds about 2 minutes to the asset pipeline compilation time.</li>
</ul>

<p>So… Here’s a solution to fast-compile your assets by only checking if the changeset includes changes under:</p>

<ul>
  <li>app/assets </li>
  <li>lib/assets </li>
  <li>vendor/assets </li>
  <li>Gemfile.lock </li>
  <li>config/routes.rb</li>
</ul>

<p>The assets is pretty self-explanatory. We compile if the Gemfile.lock changed to catch if something like twitter-bootstrap-rails was added or updated. At first the config/routes.rb seems out of place, but it’s in case you load an engine (or remove one).</p>

<h2 id="the-code">The code!</h2>

<p>Make sure you’re loading deploy/assets</p>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>Capfile  </span></figcaption>
 <pre><code class="ruby"><span class="nb">load</span> <span class="s1">&#39;deploy/assets&#39;</span>
</code></pre></figure></notextile></div>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>config/recipes/assets.rb  </span></figcaption>
 <pre><code class="ruby"><span class="c1"># -*- encoding : utf-8 -*-                                                                                                    </span>

<span class="n">set</span> <span class="ss">:assets_dependencies</span><span class="p">,</span> <span class="sx">%w(app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb)</span>

<span class="n">namespace</span> <span class="ss">:deploy</span> <span class="k">do</span>
  <span class="n">namespace</span> <span class="ss">:assets</span> <span class="k">do</span>

    <span class="n">desc</span> <span class="o">&lt;&lt;-</span><span class="no">DESC</span>
<span class="sh">      Run the asset precompilation rake task. You can specify the full path \</span>
<span class="sh">      to the rake executable by setting the rake variable. You can also \</span>
<span class="sh">      specify additional environment variables to pass to rake via the \</span>
<span class="sh">      asset_env variable. The defaults are:</span>

<span class="sh">        set :rake,      &quot;rake&quot;</span>
<span class="sh">        set :rails_env, &quot;production&quot;</span>
<span class="sh">        set :asset_env, &quot;RAILS_GROUPS=assets&quot;</span>
<span class="sh">        set :assets_dependencies, fetch(:assets_dependencies) + %w(config/locales/js)</span>
<span class="no">    DESC</span>
    <span class="n">task</span> <span class="ss">:precompile</span><span class="p">,</span> <span class="ss">:roles</span> <span class="o">=&gt;</span> <span class="ss">:web</span><span class="p">,</span> <span class="ss">:except</span> <span class="o">=&gt;</span> <span class="p">{</span> <span class="ss">:no_release</span> <span class="o">=&gt;</span> <span class="kp">true</span> <span class="p">}</span> <span class="k">do</span>
      <span class="n">from</span> <span class="o">=</span> <span class="n">source</span><span class="o">.</span><span class="n">next_revision</span><span class="p">(</span><span class="n">current_revision</span><span class="p">)</span>
      <span class="k">if</span> <span class="n">capture</span><span class="p">(</span><span class="s2">&quot;cd </span><span class="si">#{</span><span class="n">latest_release</span><span class="si">}</span><span class="s2"> &amp;&amp; </span><span class="si">#{</span><span class="n">source</span><span class="o">.</span><span class="n">local</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">from</span><span class="p">)</span><span class="si">}</span><span class="s2"> </span><span class="si">#{</span><span class="n">assets_dependencies</span><span class="o">.</span><span class="n">join</span> <span class="s1">&#39; &#39;</span><span class="si">}</span><span class="s2"> | wc -l&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">to_i</span> <span class="o">&gt;</span> <span class="mi">0</span>
        <span class="n">run</span> <span class="sx">%Q{cd </span><span class="si">#{</span><span class="n">latest_release</span><span class="si">}</span><span class="sx"> &amp;&amp; </span><span class="si">#{</span><span class="n">rake</span><span class="si">}</span><span class="sx"> RAILS_ENV=</span><span class="si">#{</span><span class="n">rails_env</span><span class="si">}</span><span class="sx"> </span><span class="si">#{</span><span class="n">asset_env</span><span class="si">}</span><span class="sx"> assets:precompile}</span>
      <span class="k">else</span>
        <span class="n">logger</span><span class="o">.</span><span class="n">info</span> <span class="s2">&quot;Skipping asset pre-compilation because there were no asset changes&quot;</span>
      <span class="k">end</span>
    <span class="k">end</span>

  <span class="k">end</span>
<span class="k">end</span>
</code></pre></figure></notextile></div>

<div class="bogus-wrapper"><notextile><figure class="code"><figcaption><span>config/deploy.rb  </span></figcaption>
 <pre><code class="ruby"><span class="nb">load</span> <span class="s2">&quot;config/recipes/assets&quot;</span>
</code></pre></figure></notextile></div>

<h2 id="how-does-it-know">How does it know?</h2>

<p>The regular assets:precompile task is getting overridden by our custom task. We then:</p>

<ol>
  <li>get the FROM git revision</li>
  <li>get the git log of changes from the FROM to the TO that include our paths we care about</li>
  <li>Pipe that into wc to see if there’s anything there</li>
</ol>

<p>If there is, then we call the rake assets:precompile (like calling <code>super</code>)</p>

<h2 id="output">Output</h2>

<div><div class="CodeRay">
  <div class="code"><pre>    triggering after callbacks <span class="keyword">for</span> <span class="shell"><span class="delimiter">`</span><span class="content">deploy:update_code'
  * executing </span><span class="delimiter">`</span></span><span class="key">deploy</span>:<span class="key">assets</span>:precompile<span class="string"><span class="delimiter">'</span><span class="content">
  * executing &quot;cat /home/deployer/apps/yourapp/current/REVISION&quot;
    servers: [&quot;yourapp.comalproductions.com&quot;]
    [yourapp.comalproductions.com] executing command
    command finished in 921ms
  * executing &quot;cd /home/deployer/apps/yourapp/releases/20120903203634 &amp;&amp; git log 2e03e2b18530c86a69ba8a2c2d75909142767f5b.. app/assets lib/assets vendor/assets Gemfile.lock config/routes.rb | wc -l&quot;
    servers: [&quot;yourapp.comalproductions.com&quot;]
    [yourapp.comalproductions.com] executing command
    command finished in 400ms
 ** Skipping asset pre-compilation because there were no asset changes
</span></span></pre></div>
</div>
</div>

<p>PROOF: 400ms &lt; 2.5 minutes</p>

<h2 id="credit">Credit</h2>

<p>This <a href="https://gist.github.com/3072362">Gist</a> by <a href="https://github.com/xdite">@xdite</a> is the direct source for the code. I’ve used this in several projects and think it’s awesome-sauce.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[RubyOffRails Scholarship for Women]]></title>
    <link href="http://jessewolgamott.com/blog/2012/07/30/rubyoffrails-scholarship-for-women/"/>
    <updated>2012-07-30T10:35:00-05:00</updated>
    <id>http://jessewolgamott.com/blog/2012/07/30/rubyoffrails-scholarship-for-women</id>
    <content type="html"><![CDATA[<p>I have an opportunity to do something, and I want to do it. Ruby is awesome, and I’ve been inspired by <a href="http://railsgirls.com/">RailsGirls</a> and <a href="http://kidscodecamp.com/">Kids Code Camp</a>. I want to bridge the gender gap in software development, and this is an initial step for me to do something.</p>

<!-- more -->
<div class="tldr">
	<span class="heading">tl;dr</span> 
I am offering a 100% scholarship to the 6 week RubyOffRails class for up to 5 women software developers. <a href="http://comal.wufoo.com/forms/z7x3p9/">Apply Here</a>
</div>

<p>The <a href="http://rubyoffrails.com">Ruby online training course</a> starts July 31, and I’ll keep applications open through <del>August 3rd</del> Thursday Morning, August 2nd. It’s a self-paced course, so if you start this week you won’t be behind. I’ll be granting scholarships to the candidates I feel have the best chance to succeed and will have the most impact. Obviously subjective, but I think this will work. Apply and learn how to be a happy programmer!</p>

<p>So…</p>

<h2 id="what-do-you-have-to-do">What do you Have to do?</h2>

<ol>
  <li>Tell me why you want to learn Ruby?</li>
  <li>Tell me how learning Ruby can improve your life</li>
</ol>

<h2 id="what-will-you-get">What will you get?</h2>

<ol>
  <li>Free access to the Summer RubyOffRails course</li>
  <li>Full access to code reviews and office hours. It’s a full ticket!</li>
  <li>Happiness because you’re loving Ruby</li>
</ol>

<h2 id="who-is-this-course-for">Who is this course for?</h2>

<ol>
  <li>Developers who have programming experience in a C based language</li>
  <li>Ideally programmers who want to learn the fundamentals of Ruby for a career in Rails</li>
  <li>Awesome people.</li>
</ol>

<p>You can learn more about the course at <a href="http://rubyoffrails.com">http://rubyoffrails.com</a></p>

<p><a href="http://comal.wufoo.com/forms/z7x3p9/">Apply Here</a>.</p>

<p>UPDATE:<br />
I was asked what my relationship is to RubyOffRails: I created RubyOffRails in April 2012 and run the course: the video codecasts, discussions, and code reviews are all me.</p>
]]></content>
  </entry>
  
</feed>
