<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pivotal Labs &#187; Evan Farrar</title>
	<atom:link href="http://pivotallabs.com/author/evan/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Tue, 21 May 2013 16:50:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Rails 3.1 Hackfest NYC July 23rd</title>
		<link>http://pivotallabs.com/rails-3-1-hackfest-nyc-july-23rd/</link>
		<comments>http://pivotallabs.com/rails-3-1-hackfest-nyc-july-23rd/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 15:06:00 +0000</pubDate>
		<dc:creator>Evan Farrar</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/rails-3-1-hackfest-nyc-july-23rd/</guid>
		<description><![CDATA[<p><p>Pivotal Labs NYC is happy to host a day of the Rails 3.1 hackfest from 10am-8pm on Saturday July 23rd.</p>

<p>Our office is located in Union Square: 841 Broadway, 8th floor.</p>

<p>Ample food and drink will be provided, just bring your computers and yourselves.  I'll be hacking all day on documentation patches.</p>

<p>Read more about the hackfest on the <a href="http://weblog.rubyonrails.org/2011/7/14/rails-3-1-hackfest">Rails Blog</a></p> <a href="http://pivotallabs.com/rails-3-1-hackfest-nyc-july-23rd/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/rails-3-1-hackfest-nyc-july-23rd/">Rails 3.1 Hackfest NYC July 23rd</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Pivotal Labs NYC is happy to host a day of the Rails 3.1 hackfest from 10am-8pm on Saturday July 23rd.</p>
<p>Our office is located in Union Square: 841 Broadway, 8th floor.</p>
<p>Ample food and drink will be provided, just bring your computers and yourselves.  I&#8217;ll be hacking all day on documentation patches.</p>
<p>Read more about the hackfest on the <a href="http://weblog.rubyonrails.org/2011/7/14/rails-3-1-hackfest">Rails Blog</a></p>
<p>The post <a href="http://pivotallabs.com/rails-3-1-hackfest-nyc-july-23rd/">Rails 3.1 Hackfest NYC July 23rd</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/rails-3-1-hackfest-nyc-july-23rd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing Service Integrations with Bash and cURL</title>
		<link>http://pivotallabs.com/testing-service-integrations-with-bash-and-curl/</link>
		<comments>http://pivotallabs.com/testing-service-integrations-with-bash-and-curl/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 01:07:00 +0000</pubDate>
		<dc:creator>Evan Farrar</dc:creator>
				<category><![CDATA[Labs]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/testing-service-integrations-with-bash-and-curl/</guid>
		<description><![CDATA[<p><p>One of the most important parts of testing a system is "finding a seam". Testing a whole system can be a foolhardy and unproductive first step. Find your seam, and begin spreading tests in each direction from it. External services almost always present us with an excellent and obvious seam. I was inspired to take testing my services more seriously after talking to pivots Jeff and Rachel about their recent work testing and developing Facebook integration for a client, and also after hearing from Paul Dix and reading his <a href="http://www.amazon.com/exec/obidos/ASIN/0321659368/1n9867a-20">Rails Services book</a>. Based on the words of Jeff, Rachel and Paul, I've drawn up the following strategy for testing services:</p> <a href="http://pivotallabs.com/testing-service-integrations-with-bash-and-curl/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/testing-service-integrations-with-bash-and-curl/">Testing Service Integrations with Bash and cURL</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>One of the most important parts of testing a system is &#8220;finding a seam&#8221;. Testing a whole system can be a foolhardy and unproductive first step. Find your seam, and begin spreading tests in each direction from it. External services almost always present us with an excellent and obvious seam. I was inspired to take testing my services more seriously after talking to pivots Jeff and Rachel about their recent work testing and developing Facebook integration for a client, and also after hearing from Paul Dix and reading his <a href="http://www.amazon.com/exec/obidos/ASIN/0321659368/1n9867a-20">Rails Services book</a>. Based on the words of Jeff, Rachel and Paul, I&#8217;ve drawn up the following strategy for testing services:</p>
<ol>
<li>Test at the point of integration <em>downwards</em>, that the live service returns what you expect for various inputs.</li>
<li>Using the same tests to drive your development, write a <em>fake-out</em> of the service that passes the same tests.</li>
<li>Then use the faked out service as you test <em>upwards</em>, that functionality in your app can utilize the features of the service.</li>
<li>Once you&#8217;re ready to <em>integrate</em>, write a very high level smoke test that can pass against both the real service and the fake service.</li>
</ol>
<p>After some analysis with our client and their resident WordPress expert, we determined we&#8217;d need to create users in WordPress when they sign up for rails, and update those users later when they change their information. We knew we&#8217;d prefer to use a simple HTTP REST API with a /users resource we could handle the C and U in CRUD. We&#8217;d also like to help the developer test drive his API, without having to learn much about Ruby. We chose to write some simple smoke tests in the most pervasive scripting language in world, Bash [1]. Luckily, Bash has an awesome standard distribution, usually including one of the best http wrappers ever written, cURL. So we began with the following script:</p>
<pre><code>#!/usr/env bash
RESULT=`curl -ipost -s http://testsite.boonewebdev.com/api/users -pname=Evan+Farrar -pid=12`
if [[ $RESULT =~ 'evan-farrar' ]]
  echo "Test Create: Success. Got: $result"
else
  echo "Test Create: Failure. Got: $result"
endif
</code></pre>
<p>There it was in a few lines of Bash: a failing test. The WordPress developer used our suite of tests, ran them as he refactored, extended our script and corrected it where we had made incorrect assumptions about his service. As we worked with him, it was much easier to simply run the test to see what had changed or what was failing than to try to communicate the subtle differences by email. Of course, once I first saw the script I went a little overboard with Bash hackery; I&#8217;ll have to save my resulting Bash unit testing framework for another blab&#8230;</p>
<p>[1] This statement is wholly unfounded and without research. I didn&#8217;t even ask my friend Google if this was true.</p>
<p>The post <a href="http://pivotallabs.com/testing-service-integrations-with-bash-and-curl/">Testing Service Integrations with Bash and cURL</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/testing-service-integrations-with-bash-and-curl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FasterCSV, Ruby 1.8, and Character Encodings</title>
		<link>http://pivotallabs.com/fastercsv-ruby-1-8-and-character-encodings/</link>
		<comments>http://pivotallabs.com/fastercsv-ruby-1-8-and-character-encodings/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 23:52:00 +0000</pubDate>
		<dc:creator>Evan Farrar</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[nyc]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/fastercsv-ruby-1-8-and-character-encodings/</guid>
		<description><![CDATA[<p><p>We had a bit of a head scratcher this week at the New York City office while working on <a href="http://www.redroverhq.com/">Red Rover</a>, a social directory for engaging students with their colleges and employees with their employer. We were trying to allow a CSV to be uploaded to the application, when it mysteriously failed to parse the CSV. We narrowed it down to being caused by a certain row with strangely encoded international characters &#40;but not every row with them was a problem&#41;:</p>

<blockquote>
    <p>Fuentes,Jesús,"Cribbage, Chess, and Bridge Club",Treasurer</p>
</blockquote>

<p>But another row with the same character with the same encoding would import fine:</p>

<blockquote>
    <p>Johnson,Lúisa,Dodgeball Club,President</p>
</blockquote> <a href="http://pivotallabs.com/fastercsv-ruby-1-8-and-character-encodings/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/fastercsv-ruby-1-8-and-character-encodings/">FasterCSV, Ruby 1.8, and Character Encodings</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>We had a bit of a head scratcher this week at the New York City office while working on <a href="http://www.redroverhq.com/">Red Rover</a>, a social directory for engaging students with their colleges and employees with their employer. We were trying to allow a CSV to be uploaded to the application, when it mysteriously failed to parse the CSV. We narrowed it down to being caused by a certain row with strangely encoded international characters &#40;but not every row with them was a problem&#41;:</p>
<blockquote>
<p>Fuentes,Jesús,&#8221;Cribbage, Chess, and Bridge Club&#8221;,Treasurer</p>
</blockquote>
<p>But another row with the same character with the same encoding would import fine:</p>
<blockquote>
<p>Johnson,Lúisa,Dodgeball Club,President</p>
</blockquote>
<p>It turned out that this was due a problem with how Ruby finds character boundaries in 1.8. If that miscalculated character boundary happens to be where a quote mark begins in your CSV file, FasterCSV will hurl:</p>
<pre><code>1.8.7&gt; 'Jesús,"'.split&#40;//&#41;
=&gt; ["J","e","s","349s,""]
1.9   &gt; 'Jesús,"'.split&#40;//&#41;
=&gt; ["J","e","s","ú","s",",","""]
</code></pre>
<p>This is not a problem in Ruby 1.9 with FasterCSV or in the old fashioned CSV class included with Ruby&#8217;s standard library in 1.8.6. Hopefully I can help others who have got this error staring them in the face despite having a perfectly valid CSV in every regard:</p>
<pre><code>FasterCSV::MalformedCSVError: FasterCSV::MalformedCSVError
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1623:in `shift'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1614:in `each'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1614:in `shift'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `loop'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1581:in `shift'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1526:in `each'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `to_a'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1537:in `read'
    from /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/fastercsv-1.5.3/lib/faster_csv.rb:1229:in `parse'
</code></pre>
<p>The post <a href="http://pivotallabs.com/fastercsv-ruby-1-8-and-character-encodings/">FasterCSV, Ruby 1.8, and Character Encodings</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/fastercsv-ruby-1-8-and-character-encodings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sending Text Messages with Twilio</title>
		<link>http://pivotallabs.com/sending-text-messages-with-twilio/</link>
		<comments>http://pivotallabs.com/sending-text-messages-with-twilio/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 23:28:00 +0000</pubDate>
		<dc:creator>Evan Farrar</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[nyc]]></category>
		<category><![CDATA[sms]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/sending-text-messages-with-twilio/</guid>
		<description><![CDATA[<p><p>I recently got the chance to use <a href="http://www.twilio.com/">Twilio</a> to connect college students to other people with their interests for <a href="http://www.redroverhq.com/">Red Rover</a> &#40;a client of Pivotal&#41;. I've done SMS integrations over email before and considered it here; <a href="http://mms2r.rubyforge.org/">MMS2R</a> is nice for that &#40;and free of carrier charges&#41; but Twilio sends and receives using a real phone number. Using <a href="http://github.com/nakajima/sms-rb">Pat Nakajima's sms-rb</a> I was able to quickly send out text messages:</p>

<pre><code>require 'sms-rb'
SMS.twilio_id = "DE4DB33F"
SMS.twilio_secret = "ASDFGHJK123456"
SMS.twilio_phone = "+15555555555"
SMS.text&#40;"eat more cake", :to =&#62; "+13121234567"&#41;
</code></pre>

<p>By configuring Twilio to hit a URL in your rails app you can also receive messages easily:</p>

<pre><code>class TextMessageParrotController &#60; ApplicationController
  def parrot
    SMS.text&#40;"*SQUAWK* #{params[:body]} *SQUAWK*", :to =&#62; params[:from]&#41;
  end
end
</code></pre>

<p>And it's as simple as that. Don't hesitate to try out Twilio. They give you an ample amount of SMS credit when you sign up &#8212; more than enough test messages to bootstrap any sort of SMS integration in your Rails application. It's a lot of fun!</p>

<p>Red Rover, by the way, is looking to hire some developers. It's a great company that is passionate about engaging students with their university and each other. Their technologies at work include Rails, Solr, rspec, SMS, hadoop, and RSS. But experience with Rails, knowledge of test driven development and great communication are what they are really hoping to have. I'd love to see folks in the New York City area who can come pair with us at pivotal, but working remotely is certainly possible too. Just shoot a mail to kevin &#60; at > redroverhq.com if you are interested.</p> <a href="http://pivotallabs.com/sending-text-messages-with-twilio/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/sending-text-messages-with-twilio/">Sending Text Messages with Twilio</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I recently got the chance to use <a href="http://www.twilio.com/">Twilio</a> to connect college students to other people with their interests for <a href="http://www.redroverhq.com/">Red Rover</a> &#40;a client of Pivotal&#41;. I&#8217;ve done SMS integrations over email before and considered it here; <a href="http://mms2r.rubyforge.org/">MMS2R</a> is nice for that &#40;and free of carrier charges&#41; but Twilio sends and receives using a real phone number. Using <a href="http://github.com/nakajima/sms-rb">Pat Nakajima&#8217;s sms-rb</a> I was able to quickly send out text messages:</p>
<pre><code>require 'sms-rb'
SMS.twilio_id = "DE4DB33F"
SMS.twilio_secret = "ASDFGHJK123456"
SMS.twilio_phone = "+15555555555"
SMS.text&#40;"eat more cake", :to =&gt; "+13121234567"&#41;
</code></pre>
<p>By configuring Twilio to hit a URL in your rails app you can also receive messages easily:</p>
<pre><code>class TextMessageParrotController &lt; ApplicationController
  def parrot
    SMS.text&#40;"*SQUAWK* #{params[:body]} *SQUAWK*", :to =&gt; params[:from]&#41;
  end
end
</code></pre>
<p>And it&#8217;s as simple as that. Don&#8217;t hesitate to try out Twilio. They give you an ample amount of SMS credit when you sign up &mdash; more than enough test messages to bootstrap any sort of SMS integration in your Rails application. It&#8217;s a lot of fun!</p>
<p>Red Rover, by the way, is looking to hire some developers. It&#8217;s a great company that is passionate about engaging students with their university and each other. Their technologies at work include Rails, Solr, rspec, SMS, hadoop, and RSS. But experience with Rails, knowledge of test driven development and great communication are what they are really hoping to have. I&#8217;d love to see folks in the New York City area who can come pair with us at pivotal, but working remotely is certainly possible too. Just shoot a mail to kevin &lt; at > redroverhq.com if you are interested.</p>
<p>The post <a href="http://pivotallabs.com/sending-text-messages-with-twilio/">Sending Text Messages with Twilio</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/sending-text-messages-with-twilio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching using apc
Object Caching 636/678 objects using apc

 Served from: pivotallabs.com @ 2013-05-21 23:54:07 by W3 Total Cache -->