<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Codeulate.</title>
	
	<link>http://codeulate.com</link>
	<description />
	<lastBuildDate>Mon, 03 Oct 2011 04:12:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Codeulate" /><feedburner:info uri="codeulate" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Just closed more funding? My condolences.</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/PG-JsQdMxUo/</link>
		<comments>http://codeulate.com/2011/10/my-condolences/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 04:12:10 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=393</guid>
		<description><![CDATA[When a popular company announces a new round of funding, the Hacker News comment threads are usually overwhelmingly congratulatory. This attitude is horribly misguided. In my eyes, announcing post-seed funding is a BAD thing, and should be close to a PR disaster. The HN threads should be full of condolences. Here&#8217;s why. The company hasn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>When a popular company announces a new round of funding, the Hacker News comment threads are usually overwhelmingly congratulatory. This attitude is horribly misguided. In my eyes, announcing post-seed funding is a BAD thing, and should be close to a PR disaster. The HN threads should be full of condolences. Here&#8217;s why.</p>
<h2>The company hasn&#8217;t figured out how to pay its bills</h2>
<p>At the end of the day, a company exists to make money. Every round of funding (past, maybe, a seed round) is an admission that you still haven&#8217;t figured out a business model that will keep the damn lights on. Every startup should want each round of funding to be its last.</p>
<h2>The founders have ceded control</h2>
<p>Companies in very strong positions are sometimes able to take funding without losing much control of the company, but this is rare. In general, founders are turning over substantial control to professional gamblers with horrible succes rates. A VC will never love your company like you do; he&#8217;s there only to get paid. This will forever taint your relationship.</p>
<h2>Part of the company was sold prematurely</h2>
<p>People seem to forget that &#8220;getting funded&#8221; really means &#8220;selling part of the store&#8221;. If you think your company is going to be worth more in the future, why are you selling part of it now?</p>
<p>Here&#8217;s an announcement I&#8217;d love to congratulate: <em>&#8220;we&#8217;ve recently reached profitability and know we can keep the lights on. We think we can make even more money in the future, so we&#8217;re going to hang on to as much precious equity as we can. Offers for outside funding are flattering but unnecessary.&#8221;</em></p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/PG-JsQdMxUo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/10/my-condolences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/10/my-condolences/</feedburner:origLink></item>
		<item>
		<title>Don’t get blocked</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/JCA8v42gi2w/</link>
		<comments>http://codeulate.com/2011/09/dont-get-blocked/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 03:35:19 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[coding]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=390</guid>
		<description><![CDATA[Every day at our stand-up, each person shares what they did the day before, what they plan to do today, and, critically, whether or not they&#8217;re blocked. Blocked is a crappy place to be. It means you&#8217;re trying to get something done but can&#8217;t. Current velocity: zero. I&#8217;ve noticed something about programmers I admire: they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>Every day at our stand-up, each person shares what they did the day before, what they plan to do today, and, critically, whether or not they&#8217;re blocked.</p>
<p>Blocked is a crappy place to be. It means you&#8217;re trying to get something done but can&#8217;t. Current velocity: zero.</p>
<p>I&#8217;ve noticed something about programmers I admire: they&#8217;re extremely good at not getting blocked. </p>
<p>Some time ago I spent three days trying to get a feature working. I was blocked, and bad. Finally, I took a break and went to work on something else. The next day at standup, a colleague mentioned implementing that same feature, and then then going on to do two more tasks with the other half of his day. Incredulous, I asked him how he solved the problem I&#8217;d run into. He happily admitted he hadn&#8217;t. He&#8217;d run into that problem, spent a half hour on it, and then changed direction.</p>
<p>Me: got blocked, pounded on the barrier. Great programmer: got blocked, tried something else that worked and moved on.</p>
<p>Like most programmers, I have an strong desire to solve problems. Put some broken code in front of me and I&#8217;ll wrestle with it &#8217;til it works. There&#8217;s lots to do but I&#8217;ve got to start by fixing this problem.</p>
<p>The best programmers I know have a different mantra: don&#8217;t get blocked. They&#8217;re focused on moving things forward, not getting bogged down making everything perfect. They&#8217;ll duck and weave, leaping over obstacles or tunneling beneath them. They like problems too, but they like something else even more: shipping.</p>
<p>Don&#8217;t get blocked.</p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/JCA8v42gi2w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/09/dont-get-blocked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/09/dont-get-blocked/</feedburner:origLink></item>
		<item>
		<title>Programmer Resumes are Deprecated</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/J1klpoAlhFg/</link>
		<comments>http://codeulate.com/2011/06/programmer-resumes-are-deprecated/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 05:24:22 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=377</guid>
		<description><![CDATA[First, some exciting news: after a thorough (but enjoyable!) interview process, I&#8217;ve accepted a position at thoughtbot in Boston and will begin in a few weeks. I can&#8217;t wait to get started. The interviews themselves will make great fodder for future posts, but I realized a startling fact the other day: I never once sent [...]]]></description>
			<content:encoded><![CDATA[<p>First, some exciting news: after a thorough (but enjoyable!) interview process, I&#8217;ve accepted a position at <a href="http://www.thoughtbot.com">thoughtbot</a> in Boston and will begin in a few weeks. I can&#8217;t wait to get started.</p>
<p>The interviews themselves will make great fodder for future posts, but I realized a startling fact the other day: I never once sent anyone at thoughtbot a resume.</p>
<p>Moreover, I was never asked about schools, degrees, nor much about my past experience. My &#8220;resume&#8221; took the form of links to this blog, some open source contributions, and access to a couple private github repos of Rails apps I&#8217;d built. </p>
<p>This experience confirms an idea that I&#8217;m glad to see gaining ground lately: resumes are deprecated. Code is king. Oh, and connections help a lot too.</p>
<p>A year ago I wrote that it was possible to <a href="http://codeulate.com/2010/06/land-a-rails-job-with-no-experience/">land a Rails job with no experience</a>, provided you had a portfolio application, some code on Github, and attended Ruby meetups to network. Some people were skeptical, but it was exactly those things that got me my first Rails job. Now, years later, the same set of things got me in the door at thoughtbot: code, more code, and the recommendation of thoughtbotter <a href="http://dancroak.com/">Dan Croak</a>, who I got to know during the &#8217;09 Rails Rumble (yet more coding!)</p>
<p>I&#8217;m starting to think this really is the secret sauce for professional programming success, regardless of experience level. Get some code out there for people to see, and get yourself out there to meet awesome programmers you might want to work with someday. Leave the bullshitty bullet points to the MBAs.</p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/J1klpoAlhFg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/06/programmer-resumes-are-deprecated/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/06/programmer-resumes-are-deprecated/</feedburner:origLink></item>
		<item>
		<title>Let’s read some Rails code: with_options</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/Rmta8S4fpNs/</link>
		<comments>http://codeulate.com/2011/06/dry-up-your-rails-code-with_options/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 07:35:41 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=358</guid>
		<description><![CDATA[Did you know you can refactor this: # Duplicated :dependent =&#62; :destroy option. class Account &#60; ActiveRecord::Base &#160; has_many :customers, :dependent =&#62; :destroy &#160; has_many :products, &#160;:dependent =&#62; :destroy &#160; has_many :invoices, &#160;:dependent =&#62; :destroy &#160; has_many :expenses, &#160;:dependent =&#62; :destroy end into this? # Nice and DRY! class Account &#60; ActiveRecord::Base &#160; with_options :dependent [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know you can refactor this:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:635px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;"># Duplicated :dependent =&gt; :destroy option.</span><br />
<span style="color:#9966CC; font-weight:bold;">class</span> Account <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span><br />
&nbsp; has_many <span style="color:#ff3333; font-weight:bold;">:customers</span>, <span style="color:#ff3333; font-weight:bold;">:dependent</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:destroy</span><br />
&nbsp; has_many <span style="color:#ff3333; font-weight:bold;">:products</span>, &nbsp;<span style="color:#ff3333; font-weight:bold;">:dependent</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:destroy</span><br />
&nbsp; has_many <span style="color:#ff3333; font-weight:bold;">:invoices</span>, &nbsp;<span style="color:#ff3333; font-weight:bold;">:dependent</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:destroy</span><br />
&nbsp; has_many <span style="color:#ff3333; font-weight:bold;">:expenses</span>, &nbsp;<span style="color:#ff3333; font-weight:bold;">:dependent</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:destroy</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>into this?</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:635px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;"># Nice and DRY!</span><br />
<span style="color:#9966CC; font-weight:bold;">class</span> Account <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span><br />
&nbsp; with_options <span style="color:#ff3333; font-weight:bold;">:dependent</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#ff3333; font-weight:bold;">:destroy</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>assoc<span style="color:#006600; font-weight:bold;">|</span><br />
&nbsp; &nbsp; assoc.<span style="color:#9900CC;">has_many</span> <span style="color:#ff3333; font-weight:bold;">:customers</span><br />
&nbsp; &nbsp; assoc.<span style="color:#9900CC;">has_many</span> <span style="color:#ff3333; font-weight:bold;">:products</span><br />
&nbsp; &nbsp; assoc.<span style="color:#9900CC;">has_many</span> <span style="color:#ff3333; font-weight:bold;">:invoices</span><br />
&nbsp; &nbsp; assoc.<span style="color:#9900CC;">has_many</span> <span style="color:#ff3333; font-weight:bold;">:expenses</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>The with_options method is a really cool chunk of code that lets you DRY up duplication that sometimes appear when passing the same options to a series of methods.</p>
<p>But the point of this post is <strong>how it works behind the scenes</strong>, so check out this 11-minute code walkthrough:</p>
<p><iframe width="640" height="375" src="http://www.youtube.com/embed/OBOl9fFuILk?hd=1"  allowfullscreen></iframe></p>
<p>By the way, this is an excerpt of a longer screencast I&#8217;m working on about ActiveSupport internals. If you&#8217;d like to be notified when the full screencast is released, <a href="http://codeulatescreencasts.wufoo.com/forms/want-an-email-when-the-screencast-is-released/">drop your email in this form</a>. (One email, ever.)</p>
<p>You can also <a href="http://www.codeulatescreencasts.com">check out the other Rails-related screencasts I&#8217;ve already done</a>.</p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/Rmta8S4fpNs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/06/dry-up-your-rails-code-with_options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/06/dry-up-your-rails-code-with_options/</feedburner:origLink></item>
		<item>
		<title>Video: write code faster — expert-level vim</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/K_cgxC2zcmA/</link>
		<comments>http://codeulate.com/2011/05/video-write-code-faster-expert-level-vim/#comments</comments>
		<pubDate>Mon, 30 May 2011 23:40:12 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=355</guid>
		<description><![CDATA[In May of 2010 I gave a one-hour talk to the Boston Ruby Group titled &#8216;Write Code Faster: Expert-level Vim&#8217;. I&#8217;d volunteered to give it as a test-run before delivering the same talk at RailsConf a month later. Little did I know, someone recorded the Boston.rb talk and it recently surfaced on the presentations page. [...]]]></description>
			<content:encoded><![CDATA[<p>In May of 2010 I gave a one-hour talk to the Boston Ruby Group titled &#8216;Write Code Faster: Expert-level Vim&#8217;.</p>
<p>I&#8217;d volunteered to give it as a test-run before delivering the same talk at RailsConf a month later.</p>
<p>Little did I know, someone recorded the Boston.rb talk and it recently surfaced on <a href="http://bostonrb.org/presentations">the presentations page</a>.</p>
<p>If the title sounds interesting, <a href="http://bostonrb.org/presentations/25">go watch the talk!</a></p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/K_cgxC2zcmA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/05/video-write-code-faster-expert-level-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/05/video-write-code-faster-expert-level-vim/</feedburner:origLink></item>
		<item>
		<title>Let’s read some Rails code: OrderedOptions</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/Sl22Ae-diIw/</link>
		<comments>http://codeulate.com/2011/05/lets-read-some-rails-code-orderedoptions/#comments</comments>
		<pubDate>Sat, 28 May 2011 23:55:12 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=345</guid>
		<description><![CDATA[Curious about Rails&#8217; internals? In the screencast below, I take you on a 5-minute tour of the OrderedOptions and InheritedOptions classes in ActiveSupport. Check it out for a code-level tour of an interesting bit of Rails. By the way, this is an excerpt of a longer screencast I&#8217;m creating of guided tour through the best [...]]]></description>
			<content:encoded><![CDATA[<p>Curious about Rails&#8217; internals? In the screencast below, I take you on a 5-minute tour of the OrderedOptions and InheritedOptions classes in ActiveSupport. Check it out for a code-level tour of an interesting bit of Rails.</p>
<p>By the way, this is an excerpt of a longer screencast I&#8217;m creating of guided tour through the best parts of the Rails source. If you&#8217;d like to be notified when the full screencast is released, <a href="http://codeulatescreencasts.wufoo.com/forms/want-an-email-when-the-screencast-is-released/">drop your email in this form</a>. (One email, ever.)</p>
<p><iframe width="640" height="349" src="http://www.youtube.com/embed/PVkJR2wBEBM" frameborder="0" allowfullscreen></iframe></p>
<p>UPDATE: Youtube&#8217;s compression isn&#8217;t looking so hot, so if you prefer, you can <a href="http://downloads.codeulatescreencasts.com/ordered_options.mov">download the high quality version here</a>. (43MB)</p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/Sl22Ae-diIw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/05/lets-read-some-rails-code-orderedoptions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://downloads.codeulatescreencasts.com/ordered_options.mov" length="45555357" type="video/quicktime" />
		<feedburner:origLink>http://codeulate.com/2011/05/lets-read-some-rails-code-orderedoptions/</feedburner:origLink></item>
		<item>
		<title>2011 Boston Rails Developer Salary Survey</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/4iZj50HLNTc/</link>
		<comments>http://codeulate.com/2011/04/2011-boston-rails-developer-salary-survey/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 19:28:32 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=329</guid>
		<description><![CDATA[Summary: an anonymous survey with 50 responses indicates that the average salary for full-time, Boston-based Rails developers is $99,646 Several weeks ago I posted to the Boston Ruby Group mailing list asking people how much money they made. I asked people for their annual salary (including bonuses), how they&#8217;d rate their Rails skills from 1-10, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Summary: an anonymous survey with 50 responses indicates that the average salary for full-time, Boston-based Rails developers is $99,646</strong></p>
<p>Several weeks ago I posted to the Boston Ruby Group mailing list asking people how much money they made. I asked people for their annual salary (including bonuses), how they&#8217;d rate their Rails skills from 1-10, whether they managed other developers, and whether they were freelancers.</p>
<p><a href="http://codeulatescreencasts.wufoo.com/forms/2011-boston-rails-salary-survey/">See the original survey</a>. </p>
<p><strong>Results:</strong><br />
Average salary (non-freelancers): $99,646</p>
<p>Average salary (freelancers): $114,000</p>
<p>Average salary (no management of other devs): $88,340</p>
<p>Average salary (with management of other devs): $113,040</p>
<p>Average self-rating of Rails ability (1-10): 7</p>
<p>Raw data, and the brutally-complicated code I wrote for averaging a handful of numbers <a href="https://github.com/r00k/salary_survey_2011">lives on github</a>.</p>
<p><strong>Thoughts on the results:</strong><br />
Based on conversations with those familiar with the local market and my own experience, these numbers seem a bit high. I have a hunch there is selection bias at work: perhaps developers that are proud of their salaries are more likely to respond. Additionally, I&#8217;d guess there&#8217;s a tendency for people to exaggerate slightly on these sorts of surveys. Naturally, you should treat these numbers as you would any drawn from an anonymous survey sent to a public mailing list.</p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/4iZj50HLNTc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/04/2011-boston-rails-developer-salary-survey/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/04/2011-boston-rails-developer-salary-survey/</feedburner:origLink></item>
		<item>
		<title>Bundler’s got bash-fu</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/HD0vBb0jIis/</link>
		<comments>http://codeulate.com/2011/03/bundlers-got-bash-fu/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 04:13:34 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=315</guid>
		<description><![CDATA[Well, technically got it&#8217;s got POSIX-compliant-fu. But that&#8217;s even better; so no worries. Check out this line from bundler&#8217;s gemspec. The goal of this line is to set s.test_files to an array of file located in testing-related directories: s.test_files = `git ls-files -- {test,spec,features}/*`.split&#40;&#34;\n&#34;&#41; There are a couple interesting things going on in this line: [...]]]></description>
			<content:encoded><![CDATA[<p>Well, technically got it&#8217;s got POSIX-compliant-fu. But that&#8217;s even better; so no worries.</p>
<p>Check out this line from bundler&#8217;s <a href="https://github.com/carlhuda/bundler/blob/1-0-stable/bundler.gemspec">gemspec</a>. The goal of this line is to set s.test_files to an array of file located in testing-related directories:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:635px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">s.<span style="color:#9900CC;">test_files</span> = <span style="color:#996600;">`git ls-files -- {test,spec,features}/*`</span>.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;<span style="color:#000099;">\n</span>&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></div>
<p>There are a couple interesting things going on in this line:</p>
<ul>
<li><strong>git ls-files</strong>: by default, this command outputs all the files in the index, but we&#8217;re going to constrain it with a path supplied by&#8230;</li>
<li><strong>{test,spec,features}</strong>: this is a &#8220;curly brace expansion&#8221;. In bash (and other POSIX shells), this will expand to &#8220;test spec features&#8221;, however notice that we&#8217;ve got a trailing&#8230;</li>
<li><strong>/*</strong>: when you&#8217;ve got leading or trailing characters around expansions, they are included in the expansion. So the full command of {test,spec,features}/* expands to &#8220;test/* spec/* features/*&#8221;</li>
<li>Finally, git ls-files outputs the names of all the files in those directories, and we split them on newlines to get our array.
</ul>
<p>Finally, if you like the idea of curly brace expansions, but prefer to stay in Ruby-land, you can have the best of both worlds:</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:635px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">glob</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;{test,spec,features}/*&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;"># This also works</span></div></div>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/HD0vBb0jIis" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/03/bundlers-got-bash-fu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/03/bundlers-got-bash-fu/</feedburner:origLink></item>
		<item>
		<title>Jumping Long Distances in Vim</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/qjbrPrrW_xo/</link>
		<comments>http://codeulate.com/2011/02/jumping-long-distances-in-vim/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 03:00:20 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=292</guid>
		<description><![CDATA[Commands mentioned: nG &#8211; jump to line n L &#8211; jump to the bottom of the screen (&#8220;low&#8221;) H &#8211; jump to the top of the screen (&#8220;high&#8221;) M &#8211; jump to the middle of the screen (&#8220;middle&#8221;) C-o &#8211; jump back C-i &#8211; jump forward zt &#8211; move this line to the top of [...]]]></description>
			<content:encoded><![CDATA[<p><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/psKe0-fLKbo" frameborder="0" allowfullscreen></iframe></p>
<p>Commands mentioned:<br />
nG &#8211; jump to line n<br />
L &#8211; jump to the bottom of the screen (&#8220;low&#8221;)<br />
H &#8211; jump to the top of the screen (&#8220;high&#8221;)<br />
M &#8211; jump to the middle of the screen (&#8220;middle&#8221;)<br />
C-o &#8211; jump back<br />
C-i &#8211; jump forward<br />
zt &#8211; move this line to the top of the screen (&#8220;top&#8221;)<br />
zb &#8211; move this line to the bottom of the screen (&#8220;bottom&#8221;)<br />
zz &#8211; move this line to the middle of the screen (&#8220;ziddle?&#8221;)</p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/qjbrPrrW_xo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/02/jumping-long-distances-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/02/jumping-long-distances-in-vim/</feedburner:origLink></item>
		<item>
		<title>A handy vim macro for RSpec users</title>
		<link>http://feedproxy.google.com/~r/Codeulate/~3/Eb7Zx-FPMbg/</link>
		<comments>http://codeulate.com/2011/02/a-handy-vim-macro-for-rspec-users/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 15:55:49 +0000</pubDate>
		<dc:creator>Ben Orenstein</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://codeulate.com/?p=277</guid>
		<description><![CDATA[In this screencast, I teach how to record a useful vim macro that does a simple RSpec &#8220;refactoring&#8221;. (You&#8217;ll want to open it on Youtube and watch in high-resolution.) Commands used: 7G &#8211; jump to line 7 &#8220;td &#8211; delete into the t register &#8220;tp &#8211; put from the t register qq &#8211; start recording [...]]]></description>
			<content:encoded><![CDATA[<p>In this screencast, I teach how to record a useful vim macro that does a simple RSpec &#8220;refactoring&#8221;.</p>
<p>(You&#8217;ll want to open it on Youtube and watch in high-resolution.)</p>
<p><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/_3L0d8wAm_8" frameborder="0" allowfullscreen></iframe></p>
<p>Commands used:<br />
7G &#8211; jump to line 7<br />
&#8220;td &#8211; delete into the t register<br />
&#8220;tp &#8211; put from the t register<br />
qq &#8211; start recording a macro (just a series of keystrokes) into register q<br />
@q &#8211; execute the keystrokes stored in register q<br />
vmap &#8211; set up a mapping active only when in visual mode</p>
<img src="http://feeds.feedburner.com/~r/Codeulate/~4/Eb7Zx-FPMbg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://codeulate.com/2011/02/a-handy-vim-macro-for-rspec-users/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://codeulate.com/2011/02/a-handy-vim-macro-for-rspec-users/</feedburner:origLink></item>
	</channel>
</rss>

