<?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; ny</title>
	<atom:link href="http://pivotallabs.com/tag/ny/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Wed, 19 Jun 2013 22:16:35 +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>Start small and compose: A strategy for using FactoryGirl</title>
		<link>http://pivotallabs.com/how-to-use-factorygirl-effectively/</link>
		<comments>http://pivotallabs.com/how-to-use-factorygirl-effectively/#comments</comments>
		<pubDate>Wed, 06 Mar 2013 00:54:21 +0000</pubDate>
		<dc:creator>John Barker</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[factories]]></category>
		<category><![CDATA[factory_girl]]></category>
		<category><![CDATA[ny]]></category>
		<category><![CDATA[nyc]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=15615</guid>
		<description><![CDATA[<p>While I&#8217;m still not entirely sold on FactoryGirl, I often see it being used in a particularly lazy way. Imagine your basic factory: factory :project Before long you&#8217;re adding relations to projects, and the first thing people do is this: factory :project do association :user end This immediately means that every single time you instantiate a project, you&#8217;re getting a user as well. In most cases this is more than you want, and if you continue to follow down this path you end up with a huge slow test suite. I prefer a slightly different strategy: start small and compose. factory :project do ... end trait :with_manager do association :user, factory: :manager end This defines a very simple factory :project which gives you only a project and allows you to build a project with an associated user like so: FactoryGirl.create(:project, :with_manager) The result is a couple more arguments when you&#8230;</p><p>The post <a href="http://pivotallabs.com/how-to-use-factorygirl-effectively/">Start small and compose: A strategy for using FactoryGirl</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>While I&#8217;m still not entirely sold on <a href="https://github.com/thoughtbot/factory_girl">FactoryGirl</a>, I often see it being used in a particularly lazy way. Imagine your basic factory:</p>
<pre><code>factory :project</code></pre>
<p>Before long you&#8217;re adding relations to projects, and the first thing people do is this:</p>
<pre><code>factory :project do
  association :user
end</code></pre>
<p>This immediately means that every single time you instantiate a project, you&#8217;re getting a user as well. In most cases this is more than you want, and if you continue to follow down this path you end up with a huge slow test suite. I prefer a slightly different strategy: start small and compose.</p>
<pre><code>factory :project do
  ...
end

trait :with_manager do
  association :user, factory: :manager
end
</code></pre>
<p>This defines a very simple factory :project which gives you only a project and allows you to build a project with an associated user like so:</p>
<pre><code>FactoryGirl.create(:project, :with_manager)</code></pre>
<p>The result is a couple more arguments when you use the factory, but the overall code is more intention revealing.</p>
<p>If this is too much, you could always create a more descriptive factory:</p>
<pre><code>factory :managed_project, parent: :project, traits: [:with_manager]</code></pre>
<p>If you stick with this strategy, you&#8217;ll find that tests are more concise, factories are more useful and your test suite run time won&#8217;t grow as fast.</p>
<p>The post <a href="http://pivotallabs.com/how-to-use-factorygirl-effectively/">Start small and compose: A strategy for using FactoryGirl</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/how-to-use-factorygirl-effectively/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>All evidence points to OOP being bullshit</title>
		<link>http://pivotallabs.com/all-evidence-points-to-oop-being-bullshit/</link>
		<comments>http://pivotallabs.com/all-evidence-points-to-oop-being-bullshit/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 00:40:32 +0000</pubDate>
		<dc:creator>John Barker</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[composition]]></category>
		<category><![CDATA[fp]]></category>
		<category><![CDATA[functional]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[mutability]]></category>
		<category><![CDATA[ny]]></category>
		<category><![CDATA[nyc]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=15387</guid>
		<description><![CDATA[<p>This is the second part in a series I&#8217;m writing about lessons that can be learned from functional programming. Find the first part here. Object Oriented Programming (OOP) as an idea has been oversold. The most commonly used languages in use today are designed around the idea of OOP. Extremist languages like Java force you to think of everything in terms of objects. But is Object Orientation (OO) a good idea? Does it have problems? Is it the right tool for everything? Let&#8217;s explore some of these questions in a slightly tongue in cheek and cathartic rant. Imperative vs Declarative The object-oriented model makes it easy to build up programs by accretion. What this often means, in practice, is that it provides a structured way to write spaghetti code. — Paul Graham Procedural programming languages are designed around the idea of enumerating the steps required to complete a task. OOP&#8230;</p><p>The post <a href="http://pivotallabs.com/all-evidence-points-to-oop-being-bullshit/">All evidence points to OOP being bullshit</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><em>This is the second part in a series I&#8217;m writing about lessons that can be learned from functional programming. Find the first part <a href="http://pivotallabs.com/why-you-should-care-about-functional-programming/">here</a>.</em></p>
<p>Object Oriented Programming (OOP) as an idea has been oversold. The most commonly used languages in use today are designed around the idea of OOP. Extremist languages like Java force you to think of everything in terms of objects. But is Object Orientation (OO) a good idea? Does it have problems? Is it the right tool for everything? Let&#8217;s explore some of these questions in a slightly tongue in cheek and <a href="http://vimeo.com/43380467">cathartic rant</a>.</p>
<h1>Imperative vs Declarative</h1>
<blockquote><p>The object-oriented model makes it easy to build up programs by accretion. What this often means, in practice, is that it provides a structured way to write spaghetti code. — Paul Graham</p></blockquote>
<p>Procedural programming languages are designed around the idea of enumerating the steps required to complete a task. OOP languages are the same in that they are imperative &#8211; they are still essentially about giving the computer a sequence of commands to execute. What OOP introduces are abstractions that attempt to improve code sharing and security. In many ways it is still essentially procedural code.</p>
<p>Declarative languages on the other hand are about describing computation. While a a declarative language necessarily maps down to imperative code, the resulting code often reveals <a href="http://notes-on-haskell.blogspot.com/2007/02/whats-wrong-with-for-loop.html">less incidental complexity</a> and can sometimes be much more easily parallelized.</p>
<h1>State</h1>
<blockquote><p>The problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. — Joe Armstrong</p></blockquote>
<p>State is not your friend, state is your enemy. Changes to state make programs harder to reason about, harder to test and harder to debug. Stateful programs are harder to parallelize, and this is important in a world moving towards more units, more cores and more work. OOP languages encourage <a href="http://www.infoq.com/presentations/Simple-Made-Easy">mutability, non determinism and complexity</a>.</p>
<p>As someone who was initially hostile to the idea that state is the root of all problems, I initially greeted this idea with skepticism. Mutating state is so easy and fundamental in OOP that you often overlook how often it happens. If you&#8217;re invoking a method on an object that&#8217;s not a getter, you&#8217;re probably mutating state.</p>
<h1>Nouns and Verbs</h1>
<blockquote><p>Java is the most distressing thing to happen to computing since MS-DOS. — Alan Kay</p></blockquote>
<p>The typical college introduction to OOP starts with a gentle introduction to objects as metaphors for real world concepts. Very few real world OOP programs even consist entirely of nouns, they&#8217;re filled with <a href="http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html">verbs masquerading as nouns: strategies, factories and commands</a>. Software as a mechanism for directing a computer to do work is primarily concerned with <em>verbs.</em></p>
<p>OOP programs that exhibit low coupling, cohesion and good reusability sometimes feel like nebulous constellations, with hundreds of tiny objects all interacting with each other. Sacrificing readability for changeability. Many of  <a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)">OOP best practices</a> are in fact encouraged by functional programming languages.</p>
<h1>Inheritance vs composition</h1>
<blockquote><p>Object-oriented programming is an exceptionally bad idea which could only have originated in California — Edsger W. Dijkstra</p></blockquote>
<p>Inheritance is one of the primary mechanisms for sharing code in an an OO language. But this idea is so problematic that even the keenest advocates of OO <a href="http://en.wikipedia.org/wiki/Composition_over_inheritance">discourage this pattern</a>. Inheritance forces you to define the taxonomy and structure of your application in advance, with all it&#8217;s connections and intricacies. This structure is <a href="https://github.com/raganwald/homoiconic/blob/master/2010/12/oop.md">resistant to change</a> which is one of the primary problems software developers face every day. It also <a href="http://en.wikipedia.org/wiki/Circle-ellipse_problem">fails to model</a> some pretty fundamental concepts.</p>
<h1>Further reading</h1>
<p>This is far from an <a href="http://c2.com/cgi/wiki?ArgumentsAgainstOop">exhaustive list of the criticisms leveled at OOP</a>. While I believe the problems with OOP are extensive, I do think it is a valuable mechanism for developing software. But is certainly not the only one. The biggest problem in my mind is thus:</p>
<p>When people overcome the significant hurdle of fully appreciating OOP, they tend to apply it to every problem. OOP becomes the solution, and every problem looks like a nail.</p>
<p>There&#8217;s got to be a better way&#8230;</p>
<p>The post <a href="http://pivotallabs.com/all-evidence-points-to-oop-being-bullshit/">All evidence points to OOP being bullshit</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/all-evidence-points-to-oop-being-bullshit/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>[NY] Thursday Standup</title>
		<link>http://pivotallabs.com/thursday-standup/</link>
		<comments>http://pivotallabs.com/thursday-standup/#comments</comments>
		<pubDate>Thu, 14 Feb 2013 15:28:41 +0000</pubDate>
		<dc:creator>Rasheed Abdul-Aziz</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[ny]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/?p=15148</guid>
		<description><![CDATA[<p>Interestings Tenderlove explains YAML exploits Tenderlove explains YAML exploits in great detail, and with his usual panache http://tenderlovemaking.com/2013/02/06/yaml-f7u12.html</p><p>The post <a href="http://pivotallabs.com/thursday-standup/">[NY] Thursday Standup</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<h3>Tenderlove explains YAML exploits</h3>
<p>Tenderlove explains YAML exploits in great detail, and with his usual panache</p>
<p><a href="http://tenderlovemaking.com/2013/02/06/yaml-f7u12.html">http://tenderlovemaking.com/2013/02/06/yaml-f7u12.html</a></p>
<p>The post <a href="http://pivotallabs.com/thursday-standup/">[NY] Thursday Standup</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/thursday-standup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleaning old branches</title>
		<link>http://pivotallabs.com/cleaning-old-branches/</link>
		<comments>http://pivotallabs.com/cleaning-old-branches/#comments</comments>
		<pubDate>Thu, 11 Oct 2012 14:47:00 +0000</pubDate>
		<dc:creator>John Barker</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[ny]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/cleaning-old-branches/</guid>
		<description><![CDATA[<p><p>We're using Github pull requests on our project. Which means whenever a pull request is accepted, a branch is left lying around.</p>

<p>So I wrote a quick script to remove all remote branches that have been merged into develop &#40;our working branch, you'll have to alter the first instance of 'develop' to master if you use a more typical git branching model&#41;.</p>

<p>Here goes:</p>

<pre><code>git branch -r --merged develop &#124; sed 's/ *origin///' &#124; grep -v 'master$' &#124; grep -v HEAD &#124; xargs -n 1 printf "echo git push origin :%sn" &#124; bash
</code></pre> <a href="http://pivotallabs.com/cleaning-old-branches/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/cleaning-old-branches/">Cleaning old branches</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>We&#8217;re using Github pull requests on our project. Which means whenever a pull request is accepted, a branch is left lying around.</p>
<p>So I wrote a quick script to remove all remote branches that have been merged into develop &#40;our working branch, you&#8217;ll have to alter the first instance of &#8216;develop&#8217; to master if you use a more typical git branching model&#41;.</p>
<p>Here goes:</p>
<pre><code>git branch -r --merged develop | sed 's/ *origin///' | grep -v 'master$' | grep -v HEAD | xargs -n 1 printf "echo git push origin :%sn" | bash
</code></pre>
<p>The post <a href="http://pivotallabs.com/cleaning-old-branches/">Cleaning old branches</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/cleaning-old-branches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NYC Standup 7/25/2012 &#8211; Phone                                                                               Gap</title>
		<link>http://pivotallabs.com/nyc-standup-7-25-2012-phone-gap/</link>
		<comments>http://pivotallabs.com/nyc-standup-7-25-2012-phone-gap/#comments</comments>
		<pubDate>Wed, 25 Jul 2012 17:01:00 +0000</pubDate>
		<dc:creator>John Barker</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[ny]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/nyc-standup-7-25-2012-phone-gap/</guid>
		<description><![CDATA[<p><h2>Interestings</h2>

<ul>
<li>PhoneGap 2.0 released - supposed to be easier for devs?</li>
<li>Mountain Lion's out today</li>
<li>Chrome 21 supports drag &#38; dropping of FOLDERS onto a web page</li>
</ul> <a href="http://pivotallabs.com/nyc-standup-7-25-2012-phone-gap/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/nyc-standup-7-25-2012-phone-gap/">NYC Standup 7/25/2012 &#8211; Phone                                                                               Gap</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<ul>
<li>PhoneGap 2.0 released &#8211; supposed to be easier for devs?</li>
<li>Mountain Lion&#8217;s out today</li>
<li>Chrome 21 supports drag &amp; dropping of FOLDERS onto a web page</li>
</ul>
<p>The post <a href="http://pivotallabs.com/nyc-standup-7-25-2012-phone-gap/">NYC Standup 7/25/2012 &#8211; Phone                                                                               Gap</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/nyc-standup-7-25-2012-phone-gap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup NY 7-19-2012</title>
		<link>http://pivotallabs.com/standup-ny-7-19-2012/</link>
		<comments>http://pivotallabs.com/standup-ny-7-19-2012/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 11:11:00 +0000</pubDate>
		<dc:creator>Jeff Saracco</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[ny]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-ny-7-19-2012/</guid>
		<description><![CDATA[<p><h2>Interestings</h2>

<ul>
<li>automated deploys with jenkins</li>
</ul>

<p>TL;DR:</p>

<pre><code>exec ssh-agent ./path/to/your/build/script
</code></pre>

<p>We setup our ci server to deploy &#40;via capistrano&#41; our app to an "acceptance" environment after a successful build. However, the ssh configuration on the environment we deploy to confuses the ruby net-ssh library, rendering the "forward-agent" option in capistrano useless. Therefore, our build script needed to manually add keys to the ssh-agent. </p>

<p>To make an ssh-agent available to your build script in jenkins, wrap the shell command for your build script in "exec ssh-agent":</p>

<pre><code>exec ssh-agent ./path/to/your/build/script
</code></pre>

<p>Your build script will be executed as a subprocess of the agent.  When the command finishes, the agent dies with it.</p>

<h2>To help DRY up your stylesheets, SCSS allows for inheritance. Take the following example:</h2>

<p>.btn-red {
  height: 20px;
  width: 20px;
  border-radius: 5px 5px 5px 5px;
  background-color: #FF0000;
}</p>

<p>.btn-white {
  height: 20px;
  width: 20px;
  border-radius: 5px 5px 5px 5px;
  background-color: #FFFFFF;
}</p>

<p>Notice the similarities between the three classes; copying &#38; pasting style declarations should tickle the same spidey sense that copying &#38; pasting Ruby code does. Fortunately, SCSS offers @extend, which can be used like so:</p>

<p>.btn {
  height: 20px;
  width: 20px;
  border-radius: 5px 5px 5px 5px;
}</p>

<p>.btn-red {
  @extend .btn;
  background-color: #FF0000;
}</p>

<p>.btn-white {
  @extend .btn;
  background-color: #FFFFFF;
}</p>

<h2>Events</h2>

<ul>
<li>Machine learning meetup tonight</li>
</ul> <a href="http://pivotallabs.com/standup-ny-7-19-2012/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-ny-7-19-2012/">Standup NY 7-19-2012</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interestings</h2>
<ul>
<li>automated deploys with jenkins</li>
</ul>
<p>TL;DR:</p>
<pre><code>exec ssh-agent ./path/to/your/build/script
</code></pre>
<p>We setup our ci server to deploy &#40;via capistrano&#41; our app to an &#8220;acceptance&#8221; environment after a successful build. However, the ssh configuration on the environment we deploy to confuses the ruby net-ssh library, rendering the &#8220;forward-agent&#8221; option in capistrano useless. Therefore, our build script needed to manually add keys to the ssh-agent. </p>
<p>To make an ssh-agent available to your build script in jenkins, wrap the shell command for your build script in &#8220;exec ssh-agent&#8221;:</p>
<pre><code>exec ssh-agent ./path/to/your/build/script
</code></pre>
<p>Your build script will be executed as a subprocess of the agent.  When the command finishes, the agent dies with it.</p>
<h2>To help DRY up your stylesheets, SCSS allows for inheritance. Take the following example:</h2>
<p>.btn-red {<br />
  height: 20px;<br />
  width: 20px;<br />
  border-radius: 5px 5px 5px 5px;<br />
  background-color: #FF0000;<br />
}</p>
<p>.btn-white {<br />
  height: 20px;<br />
  width: 20px;<br />
  border-radius: 5px 5px 5px 5px;<br />
  background-color: #FFFFFF;<br />
}</p>
<p>Notice the similarities between the three classes; copying &amp; pasting style declarations should tickle the same spidey sense that copying &amp; pasting Ruby code does. Fortunately, SCSS offers @extend, which can be used like so:</p>
<p>.btn {<br />
  height: 20px;<br />
  width: 20px;<br />
  border-radius: 5px 5px 5px 5px;<br />
}</p>
<p>.btn-red {<br />
  @extend .btn;<br />
  background-color: #FF0000;<br />
}</p>
<p>.btn-white {<br />
  @extend .btn;<br />
  background-color: #FFFFFF;<br />
}</p>
<h2>Events</h2>
<ul>
<li>Machine learning meetup tonight</li>
</ul>
<p>The post <a href="http://pivotallabs.com/standup-ny-7-19-2012/">Standup NY 7-19-2012</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-ny-7-19-2012/feed/</wfw:commentRss>
		<slash:comments>0</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 3/11 queries in 0.009 seconds using apc
Object Caching 828/852 objects using apc

 Served from: pivotallabs.com @ 2013-06-20 04:10:09 by W3 Total Cache -->