<?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.kyleslattery.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Kyle Slattery</title>
    <description>Entries, Links, and Photos from KyleSlattery.com</description>
    <link>http://kyleslattery.com/notebook</link>
    
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.kyleslattery.com/KyleSlattery" /><feedburner:info uri="kyleslattery" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>My Paris Photos on Flickr</title>
      <description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/deansfurniture5/5700074092/" title="Windows, Rue du Faubourg-Saint-Denis, Paris, France by Kyle Slattery, on Flickr"&gt;&lt;img src="http://farm6.static.flickr.com/5221/5700074092_6f0a0caa86_z.jpg" width="590" alt="Windows, Rue du Faubourg-Saint-Denis, Paris, France"&gt;&lt;/a&gt;
Wow, almost 5 months since I last posted. That&amp;#8217;s&amp;#8230;sad. But, anyways, I&amp;#8217;m in Paris until July, working at my &lt;a href="http://buzzcar.com"&gt;new job&lt;/a&gt;. I recently bought a &lt;a href="http://www.usa.canon.com/cusa/consumer/products/cameras/slr_cameras/eos_60d"&gt;new camera&lt;/a&gt;, so I&amp;#8217;ll be posting photos pretty regularly &lt;a href="http://www.flickr.com/photos/deansfurniture5/"&gt;on Flickr&lt;/a&gt;. The Flickr Import on my site is broken at the moment (and I&amp;#8217;m not sure if it&amp;#8217;s worth fixing), so they won&amp;#8217;t be appearing in this RSS feed.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://www.flickr.com/photos/deansfurniture5/"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=0UYwJ1fJrxs:wVfMZaXf1gw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=0UYwJ1fJrxs:wVfMZaXf1gw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=0UYwJ1fJrxs:wVfMZaXf1gw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=0UYwJ1fJrxs:wVfMZaXf1gw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=0UYwJ1fJrxs:wVfMZaXf1gw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=0UYwJ1fJrxs:wVfMZaXf1gw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=0UYwJ1fJrxs:wVfMZaXf1gw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=0UYwJ1fJrxs:wVfMZaXf1gw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/0UYwJ1fJrxs" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/deansfurniture5/5700074092/" title="Windows, Rue du Faubourg-Saint-Denis, Paris, France by Kyle Slattery, on Flickr"&gt;&lt;img src="http://farm6.static.flickr.com/5221/5700074092_6f0a0caa86_z.jpg" width="590" alt="Windows, Rue du Faubourg-Saint-Denis, Paris, France"&gt;&lt;/a&gt;
Wow, almost 5 months since I last posted. That&amp;#8217;s&amp;#8230;sad. But, anyways, I&amp;#8217;m in Paris until July, working at my &lt;a href="http://buzzcar.com"&gt;new job&lt;/a&gt;. I recently bought a &lt;a href="http://www.usa.canon.com/cusa/consumer/products/cameras/slr_cameras/eos_60d"&gt;new camera&lt;/a&gt;, so I&amp;#8217;ll be posting photos pretty regularly &lt;a href="http://www.flickr.com/photos/deansfurniture5/"&gt;on Flickr&lt;/a&gt;. The Flickr Import on my site is broken at the moment (and I&amp;#8217;m not sure if it&amp;#8217;s worth fixing), so they won&amp;#8217;t be appearing in this RSS feed.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://www.flickr.com/photos/deansfurniture5/"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Mon, 09 May 2011 03:48:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/0UYwJ1fJrxs/my-paris-photos-on-flickr</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/my-paris-photos-on-flickr</guid>
    <feedburner:origLink>http://kyleslattery.com/links/my-paris-photos-on-flickr</feedburner:origLink></item>
    <item>
      <title>Ruby Hash Tricks</title>
      <description>&lt;p&gt;Some really cool tricks with Ruby hashes&amp;#8211;if you supply a block to &lt;code&gt;Hash.new&lt;/code&gt;, that will act as a default value for a given key. For example, here&amp;#8217;s a Fibonacci hash I put together which caches the values (making it pretty quick):&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;fibonacci = Hash.new do |h,k|
  if k &amp;lt; 2
    h[k] = k
  else
    h[k] = h[k-1] + h[k-2]
  end
end

fibonacci[6]   # =&amp;gt; 8
fibonacci[100] # =&amp;gt; 354224848179261915075
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;a href="http://endofline.wordpress.com/2010/12/24/hash-tricks/"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=_9FpCZQRQHo:5jy7Gxx9rLQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=_9FpCZQRQHo:5jy7Gxx9rLQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=_9FpCZQRQHo:5jy7Gxx9rLQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=_9FpCZQRQHo:5jy7Gxx9rLQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=_9FpCZQRQHo:5jy7Gxx9rLQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=_9FpCZQRQHo:5jy7Gxx9rLQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=_9FpCZQRQHo:5jy7Gxx9rLQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=_9FpCZQRQHo:5jy7Gxx9rLQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/_9FpCZQRQHo" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;Some really cool tricks with Ruby hashes&amp;#8211;if you supply a block to &lt;code&gt;Hash.new&lt;/code&gt;, that will act as a default value for a given key. For example, here&amp;#8217;s a Fibonacci hash I put together which caches the values (making it pretty quick):&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;fibonacci = Hash.new do |h,k|
  if k &amp;lt; 2
    h[k] = k
  else
    h[k] = h[k-1] + h[k-2]
  end
end

fibonacci[6]   # =&amp;gt; 8
fibonacci[100] # =&amp;gt; 354224848179261915075
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;a href="http://endofline.wordpress.com/2010/12/24/hash-tricks/"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Mon, 27 Dec 2010 17:11:00 -0500</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/_9FpCZQRQHo/ruby-hash-tricks</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/ruby-hash-tricks</guid>
    <feedburner:origLink>http://kyleslattery.com/links/ruby-hash-tricks</feedburner:origLink></item>
    <item>
      <title>The Official Viddler Ruby Gem</title>
      <description>&lt;p&gt;I just announced our new Ruby gem over on &lt;a href="http://blog.viddler.com"&gt;the Viddler blog&lt;/a&gt;. It&amp;#8217;s a fairly basic wrapper for our &lt;a href="http://developers.viddler.com/documentation/api-v2/"&gt;v2 API&lt;/a&gt; for now, but I definitely have plans for some really cool features, like having ActiveModel compatible classes for stuff like videos, playlists, users, etc., as well as making it easy to integrate into existing ActiveRecord models in Rails.&lt;/p&gt;

&lt;p&gt;So, if you&amp;#8217;re into Ruby and you&amp;#8217;re looking for a way to integrate video into your site, definitely check us out. We have a really great API, and now that there&amp;#8217;s an official gem, it&amp;#8217;s easier than ever to get started.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://blog.viddler.com/kyleslat/an-official-viddler-ruby-gem/"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=xvGshrCDpUo:_kG6FS7IuIo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=xvGshrCDpUo:_kG6FS7IuIo:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=xvGshrCDpUo:_kG6FS7IuIo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=xvGshrCDpUo:_kG6FS7IuIo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=xvGshrCDpUo:_kG6FS7IuIo:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=xvGshrCDpUo:_kG6FS7IuIo:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=xvGshrCDpUo:_kG6FS7IuIo:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=xvGshrCDpUo:_kG6FS7IuIo:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/xvGshrCDpUo" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;I just announced our new Ruby gem over on &lt;a href="http://blog.viddler.com"&gt;the Viddler blog&lt;/a&gt;. It&amp;#8217;s a fairly basic wrapper for our &lt;a href="http://developers.viddler.com/documentation/api-v2/"&gt;v2 API&lt;/a&gt; for now, but I definitely have plans for some really cool features, like having ActiveModel compatible classes for stuff like videos, playlists, users, etc., as well as making it easy to integrate into existing ActiveRecord models in Rails.&lt;/p&gt;

&lt;p&gt;So, if you&amp;#8217;re into Ruby and you&amp;#8217;re looking for a way to integrate video into your site, definitely check us out. We have a really great API, and now that there&amp;#8217;s an official gem, it&amp;#8217;s easier than ever to get started.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://blog.viddler.com/kyleslat/an-official-viddler-ruby-gem/"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Wed, 15 Dec 2010 13:10:00 -0500</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/xvGshrCDpUo/the-official-viddler-ruby-gem</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/the-official-viddler-ruby-gem</guid>
    <feedburner:origLink>http://kyleslattery.com/links/the-official-viddler-ruby-gem</feedburner:origLink></item>
    <item>
      <title>Ajax Upload</title>
      <description>&lt;p&gt;This looks like a nice alternative to Flash-based uploaders like &lt;a href="http://valums.com/ajax-upload/"&gt;Uploadify&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;This plugin uses XHR for uploading multiple files with progress-bar in FF3.6+, Safari4+, Chrome and falls back to hidden iframe based upload in other browsers, providing good user experience everywhere.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;(&lt;a href="http://valums.com/ajax-upload/"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=PYrYXRJH0Oo:pfLxOL6R2Js:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=PYrYXRJH0Oo:pfLxOL6R2Js:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=PYrYXRJH0Oo:pfLxOL6R2Js:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=PYrYXRJH0Oo:pfLxOL6R2Js:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=PYrYXRJH0Oo:pfLxOL6R2Js:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=PYrYXRJH0Oo:pfLxOL6R2Js:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=PYrYXRJH0Oo:pfLxOL6R2Js:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=PYrYXRJH0Oo:pfLxOL6R2Js:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/PYrYXRJH0Oo" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;This looks like a nice alternative to Flash-based uploaders like &lt;a href="http://valums.com/ajax-upload/"&gt;Uploadify&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;This plugin uses XHR for uploading multiple files with progress-bar in FF3.6+, Safari4+, Chrome and falls back to hidden iframe based upload in other browsers, providing good user experience everywhere.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;(&lt;a href="http://valums.com/ajax-upload/"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Sun, 17 Oct 2010 23:14:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/PYrYXRJH0Oo/ajax-upload</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/ajax-upload</guid>
    <feedburner:origLink>http://kyleslattery.com/links/ajax-upload</feedburner:origLink></item>
    <item>
      <title>What technologies are geeks pioneering today?</title>
      <description>&lt;p&gt;Marco Arment:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Even geeks (like us) have their limits of reasonability. At some point, we often decide that what we’ve been doing or what we think we should enjoy just isn’t worthwhile.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Marco absolutely &lt;em&gt;nails it&lt;/em&gt; with this. I used to be all about building custom computers, but nowadays, I&amp;#8217;d much rather buy a MacBook Pro that just works, because the extra aggravation of maintaining my own system just isn&amp;#8217;t worth the price difference any more.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://www.marco.org/1246041841"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=EgqvMlszha8:H7M3sAD2mpE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=EgqvMlszha8:H7M3sAD2mpE:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=EgqvMlszha8:H7M3sAD2mpE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=EgqvMlszha8:H7M3sAD2mpE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=EgqvMlszha8:H7M3sAD2mpE:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=EgqvMlszha8:H7M3sAD2mpE:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=EgqvMlszha8:H7M3sAD2mpE:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=EgqvMlszha8:H7M3sAD2mpE:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/EgqvMlszha8" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;Marco Arment:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Even geeks (like us) have their limits of reasonability. At some point, we often decide that what we’ve been doing or what we think we should enjoy just isn’t worthwhile.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Marco absolutely &lt;em&gt;nails it&lt;/em&gt; with this. I used to be all about building custom computers, but nowadays, I&amp;#8217;d much rather buy a MacBook Pro that just works, because the extra aggravation of maintaining my own system just isn&amp;#8217;t worth the price difference any more.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://www.marco.org/1246041841"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Mon, 04 Oct 2010 21:54:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/EgqvMlszha8/what-technologies-are-geeks-pinoeering-today</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/what-technologies-are-geeks-pinoeering-today</guid>
    <feedburner:origLink>http://kyleslattery.com/links/what-technologies-are-geeks-pinoeering-today</feedburner:origLink></item>
    <item>
      <title>Requiring SSL Using Route Constraints in Rails 3</title>
      <description>&lt;p&gt;The &lt;a href="http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/"&gt;new router in Rails 3&lt;/a&gt; makes it super easy to require SSL for certain routes.  Just use the following in your &lt;code&gt;config/routes.rb&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;MyApp::Application.routes.draw do
  class SslConstraint
    def self.matches?(request)
      request.ssl?
    end
  end

  scope :constraints =&amp;gt; SslConstraint do
    resources :payments
    # Other SSL routes go in here
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, this is a pretty simple example&amp;#8211;you&amp;#8217;ll likely want to also have routes to redirect if a user tries to access without SSL, but it definitely shows off the power of the new router.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=r6IxednOXbA:1oFq1gDoMdU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=r6IxednOXbA:1oFq1gDoMdU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=r6IxednOXbA:1oFq1gDoMdU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=r6IxednOXbA:1oFq1gDoMdU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=r6IxednOXbA:1oFq1gDoMdU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=r6IxednOXbA:1oFq1gDoMdU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=r6IxednOXbA:1oFq1gDoMdU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=r6IxednOXbA:1oFq1gDoMdU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/r6IxednOXbA" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;The &lt;a href="http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/"&gt;new router in Rails 3&lt;/a&gt; makes it super easy to require SSL for certain routes.  Just use the following in your &lt;code&gt;config/routes.rb&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="ruby"&gt;MyApp::Application.routes.draw do
  class SslConstraint
    def self.matches?(request)
      request.ssl?
    end
  end

  scope :constraints =&amp;gt; SslConstraint do
    resources :payments
    # Other SSL routes go in here
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, this is a pretty simple example&amp;#8211;you&amp;#8217;ll likely want to also have routes to redirect if a user tries to access without SSL, but it definitely shows off the power of the new router.&lt;/p&gt;
</content>
      <pubDate>Fri, 13 Aug 2010 13:31:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/r6IxednOXbA/requiring-ssl-using-route-constraints-in-rails-3</link>
      <guid isPermaLink="false">http://kyleslattery.com/entries/requiring-ssl-using-route-constraints-in-rails-3</guid>
    <feedburner:origLink>http://kyleslattery.com/entries/requiring-ssl-using-route-constraints-in-rails-3</feedburner:origLink></item>
    <item>
      <title>GitHub Introduces Organizations</title>
      <description>&lt;p&gt;This is just awesome. Prices feel a little high (for private repositories, the plans start at $100/mo), but if you&amp;#8217;re a business that needs this, you&amp;#8217;re likely able to afford it.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://github.com/blog/674-introducing-organizations"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=f-cr7Q4x1v8:hGVnELFVcNU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=f-cr7Q4x1v8:hGVnELFVcNU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=f-cr7Q4x1v8:hGVnELFVcNU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=f-cr7Q4x1v8:hGVnELFVcNU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=f-cr7Q4x1v8:hGVnELFVcNU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=f-cr7Q4x1v8:hGVnELFVcNU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=f-cr7Q4x1v8:hGVnELFVcNU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=f-cr7Q4x1v8:hGVnELFVcNU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/f-cr7Q4x1v8" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;This is just awesome. Prices feel a little high (for private repositories, the plans start at $100/mo), but if you&amp;#8217;re a business that needs this, you&amp;#8217;re likely able to afford it.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://github.com/blog/674-introducing-organizations"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Tue, 29 Jun 2010 15:56:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/f-cr7Q4x1v8/github-introduces-organizations</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/github-introduces-organizations</guid>
    <feedburner:origLink>http://kyleslattery.com/links/github-introduces-organizations</feedburner:origLink></item>
    <item>
      <title>Install LAMP stack from source with Homebrew</title>
      <description>&lt;p&gt;A quick tutorial on installing PHP from source using &lt;a href="http://github.com/mxcl/homebrew"&gt;Homebrew&lt;/a&gt;.  I needed to recompile PHP and could not get things to work, until &lt;a href="http://twitter.com/bleikamp/status/15676589114"&gt;Ben Bleikamp pointed me towards Homebrew&lt;/a&gt;, and this tutorial worked great. One thing to note: the tutorial is a bit out of date, as it uses newer versions of the software, so make sure to check the versions in the commands.  For me, I had to change this line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ln -s /usr/local/Cellar/php52/5.2.12/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.2.so
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I updated it to 5.2.13:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ln -s /usr/local/Cellar/php52/5.2.13/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.2.so
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;a href="http://boztek.net/blog/2009/10/07/install-lamp-stack-source-mac-os-x-106-snow-leopard-using-homebrew"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=yG-LerMog_g:zjE-ytaDghI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=yG-LerMog_g:zjE-ytaDghI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=yG-LerMog_g:zjE-ytaDghI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=yG-LerMog_g:zjE-ytaDghI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=yG-LerMog_g:zjE-ytaDghI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=yG-LerMog_g:zjE-ytaDghI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=yG-LerMog_g:zjE-ytaDghI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=yG-LerMog_g:zjE-ytaDghI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/yG-LerMog_g" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;A quick tutorial on installing PHP from source using &lt;a href="http://github.com/mxcl/homebrew"&gt;Homebrew&lt;/a&gt;.  I needed to recompile PHP and could not get things to work, until &lt;a href="http://twitter.com/bleikamp/status/15676589114"&gt;Ben Bleikamp pointed me towards Homebrew&lt;/a&gt;, and this tutorial worked great. One thing to note: the tutorial is a bit out of date, as it uses newer versions of the software, so make sure to check the versions in the commands.  For me, I had to change this line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ln -s /usr/local/Cellar/php52/5.2.12/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.2.so
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I updated it to 5.2.13:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ln -s /usr/local/Cellar/php52/5.2.13/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.2.so
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(&lt;a href="http://boztek.net/blog/2009/10/07/install-lamp-stack-source-mac-os-x-106-snow-leopard-using-homebrew"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Mon, 07 Jun 2010 23:51:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/yG-LerMog_g/install-lamp-stack-from-source-with-homebrew</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/install-lamp-stack-from-source-with-homebrew</guid>
    <feedburner:origLink>http://kyleslattery.com/links/install-lamp-stack-from-source-with-homebrew</feedburner:origLink></item>
    <item>
      <title>Gruber's Google I/O Thoughts</title>
      <description>&lt;blockquote&gt;&lt;p&gt;The big loser this week, though, was Microsoft. They’re simply not even part of the game. RIM looms large, as BlackBerrys continue to reign as the best-selling smartphones in the U.S. But Microsoft? They’ve got nothing. No interesting devices, weak sales, and a shrinking user base. Microsoft’s irrelevance is taken for granted.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;As usual, John Gruber nails it.  Microsoft really has no chance at catching up with either Apple or Google at this point, and it&amp;#8217;s pretty stunning.  They entered the game way too late, and, as far as I know, it&amp;#8217;s still going to be a while before the first Windows Phone 7 handsets come out.  They&amp;#8217;ve already lost the mobile war.&lt;/p&gt;

&lt;p&gt;However, as Gruber mentions, things between Apple and Google are getting &lt;em&gt;very&lt;/em&gt; interesting. While I admittedly have not been all that satisfied with my Droid experience so far, it&amp;#8217;s a promising platform, and I really love how much Google is pushing cloud technology.  A cell phone should operate completely separate from a computer, and that&amp;#8217;s something Apple just hasn&amp;#8217;t done right yet.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://daringfireball.net/2010/05/post_io_thoughts"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=DW5P3GvPNAU:VugnUQdyBmc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=DW5P3GvPNAU:VugnUQdyBmc:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=DW5P3GvPNAU:VugnUQdyBmc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=DW5P3GvPNAU:VugnUQdyBmc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=DW5P3GvPNAU:VugnUQdyBmc:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=DW5P3GvPNAU:VugnUQdyBmc:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=DW5P3GvPNAU:VugnUQdyBmc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=DW5P3GvPNAU:VugnUQdyBmc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/DW5P3GvPNAU" height="1" width="1"/&gt;</description>
      <content>&lt;blockquote&gt;&lt;p&gt;The big loser this week, though, was Microsoft. They’re simply not even part of the game. RIM looms large, as BlackBerrys continue to reign as the best-selling smartphones in the U.S. But Microsoft? They’ve got nothing. No interesting devices, weak sales, and a shrinking user base. Microsoft’s irrelevance is taken for granted.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;As usual, John Gruber nails it.  Microsoft really has no chance at catching up with either Apple or Google at this point, and it&amp;#8217;s pretty stunning.  They entered the game way too late, and, as far as I know, it&amp;#8217;s still going to be a while before the first Windows Phone 7 handsets come out.  They&amp;#8217;ve already lost the mobile war.&lt;/p&gt;

&lt;p&gt;However, as Gruber mentions, things between Apple and Google are getting &lt;em&gt;very&lt;/em&gt; interesting. While I admittedly have not been all that satisfied with my Droid experience so far, it&amp;#8217;s a promising platform, and I really love how much Google is pushing cloud technology.  A cell phone should operate completely separate from a computer, and that&amp;#8217;s something Apple just hasn&amp;#8217;t done right yet.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://daringfireball.net/2010/05/post_io_thoughts"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Sun, 23 May 2010 00:16:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/DW5P3GvPNAU/grubers-google-i-slash-o-thoughts</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/grubers-google-i-slash-o-thoughts</guid>
    <feedburner:origLink>http://kyleslattery.com/links/grubers-google-i-slash-o-thoughts</feedburner:origLink></item>
    <item>
      <title>Photos of Space Shuttle Atlantis' Final Launch</title>
      <description>&lt;p&gt;The end of an era. It will be a sad day when the final space shuttle mission is completed.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://www.boston.com/bigpicture/2010/05/first_of_the_last_space_shuttl.html"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=OOFboRDhSjw:s5bL2Fs2Ho0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=OOFboRDhSjw:s5bL2Fs2Ho0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=OOFboRDhSjw:s5bL2Fs2Ho0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=OOFboRDhSjw:s5bL2Fs2Ho0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=OOFboRDhSjw:s5bL2Fs2Ho0:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=OOFboRDhSjw:s5bL2Fs2Ho0:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=OOFboRDhSjw:s5bL2Fs2Ho0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=OOFboRDhSjw:s5bL2Fs2Ho0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/OOFboRDhSjw" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;The end of an era. It will be a sad day when the final space shuttle mission is completed.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://www.boston.com/bigpicture/2010/05/first_of_the_last_space_shuttl.html"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Fri, 14 May 2010 22:42:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/OOFboRDhSjw/photos-of-space-shuttle-atlantis-final-launch</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/photos-of-space-shuttle-atlantis-final-launch</guid>
    <feedburner:origLink>http://kyleslattery.com/links/photos-of-space-shuttle-atlantis-final-launch</feedburner:origLink></item>
    <item>
      <title>Lazy Loading Asynchronous Javascript</title>
      <description>&lt;p&gt;A great summary of how to build a non-blocking JS widget.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://friendlybit.com/js/lazy-loading-asyncronous-javascript/"&gt;link&lt;/a&gt;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=oeu416-nDeY:f_bP68f9JOM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=oeu416-nDeY:f_bP68f9JOM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=oeu416-nDeY:f_bP68f9JOM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=oeu416-nDeY:f_bP68f9JOM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=oeu416-nDeY:f_bP68f9JOM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=oeu416-nDeY:f_bP68f9JOM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=oeu416-nDeY:f_bP68f9JOM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=oeu416-nDeY:f_bP68f9JOM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/oeu416-nDeY" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;A great summary of how to build a non-blocking JS widget.&lt;/p&gt;

&lt;p&gt;(&lt;a href="http://friendlybit.com/js/lazy-loading-asyncronous-javascript/"&gt;link&lt;/a&gt;)&lt;/p&gt;
</content>
      <pubDate>Fri, 07 May 2010 22:00:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/oeu416-nDeY/lazy-loading-asynchronous-javascript</link>
      <guid isPermaLink="false">http://kyleslattery.com/links/lazy-loading-asynchronous-javascript</guid>
    <feedburner:origLink>http://kyleslattery.com/links/lazy-loading-asynchronous-javascript</feedburner:origLink></item>
    <item>
      <title>Using Git Branches as Patches</title>
      <description>&lt;p&gt;At &lt;a href="http://viddler.com"&gt;Viddler&lt;/a&gt;, we&amp;#8217;re now using Git for projects, and it&amp;#8217;s going really well so far. While we haven&amp;#8217;t figured out the perfect workflow just yet, we&amp;#8217;re doing some things I really like, and one of them is treating branches like patches.&lt;/p&gt;

&lt;p&gt;Often, people think of Git branches as a full copy of the parent branch, but it&amp;#8217;s better to treat them as a simple collection of new commits, to be applied to the parent branch later.  This might not seem too revolutionary, but this small change in thinking can really improve your workflow.&lt;/p&gt;

&lt;p&gt;For example, at Viddler we use &lt;a href="http://trac.edgewall.org/"&gt;Trac&lt;/a&gt; to manage tickets, and in Git.  For each ticket in Trac, we create a branch, called something like &lt;code&gt;3241-fix-embed-codes&lt;/code&gt;.  We have two permanent branches: &lt;code&gt;dev&lt;/code&gt;, which reflects current development, and &lt;code&gt;master&lt;/code&gt;, which is considered always production-ready.  So, &lt;code&gt;dev&lt;/code&gt; and &lt;code&gt;master&lt;/code&gt; are going to have different code to reflect their reflective stability.  To get started with a fix, we first create a feature branch from &lt;code&gt;master&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git checkout -b 3241-fix-embed-codes master
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This simply creates a new branch of &lt;code&gt;master&lt;/code&gt; called &lt;code&gt;3241-fix-embed-codes&lt;/code&gt; and checks it out. When the ticket is completed and the code has been committed, the patch thinking really comes into play.  Since this now needs to be tested in the &lt;code&gt;dev&lt;/code&gt; environment, the branch first gets applied to the &lt;code&gt;dev&lt;/code&gt; branch:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git checkout dev
git merge &amp;#8212;no-ff 3241-fix-embed-codes
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Using the &lt;code&gt;&amp;#8212;no-ff&lt;/code&gt; option on &lt;code&gt;git merge&lt;/code&gt; is important for this patch mindset: it creates a separate commit for the merge itself, which allows you to &lt;code&gt;git revert&lt;/code&gt; the entire thing (if necessary), rather than having to undo each individual commit within it.&lt;/p&gt;

&lt;p&gt;Once we&amp;#8217;ve decided this fix is read for production, it&amp;#8217;s time to move the code over to &lt;code&gt;master&lt;/code&gt;.  Without the patch mindset, you might consider merging &lt;code&gt;dev&lt;/code&gt; into &lt;code&gt;master&lt;/code&gt;, but that means you&amp;#8217;d be copying anything that&amp;#8217;s applied to &lt;code&gt;dev&lt;/code&gt;, some of which might not yet be ready.  When you think of your feature branch as a patch, however, it&amp;#8217;s easy to only apply the one you need.  To apply this patch to &lt;code&gt;master&lt;/code&gt;, just use a similar method as before:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git checkout master
git merge &amp;amp;#45;-no-ff 3241-fix-embed-codes
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now you&amp;#8217;ve only moved the safe commits over, leaving any buggy code safely in &lt;code&gt;dev&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This method may seem obvious, but the mindset has really changed the way I use Git, and I think it makes it a much more powerful tool, especially when you&amp;#8217;re working across multiple environments (like production and staging).  I&amp;#8217;ve skipped over some additional considerations, like merging &lt;code&gt;master&lt;/code&gt;/&lt;code&gt;dev&lt;/code&gt; into your feature branch, but those are topics for a future post.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=i_VzqjbHGHc:P0Y4iMXYqY4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=i_VzqjbHGHc:P0Y4iMXYqY4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=i_VzqjbHGHc:P0Y4iMXYqY4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=i_VzqjbHGHc:P0Y4iMXYqY4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=i_VzqjbHGHc:P0Y4iMXYqY4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=i_VzqjbHGHc:P0Y4iMXYqY4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.kyleslattery.com/~ff/KyleSlattery?a=i_VzqjbHGHc:P0Y4iMXYqY4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/KyleSlattery?i=i_VzqjbHGHc:P0Y4iMXYqY4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/KyleSlattery/~4/i_VzqjbHGHc" height="1" width="1"/&gt;</description>
      <content>&lt;p&gt;At &lt;a href="http://viddler.com"&gt;Viddler&lt;/a&gt;, we&amp;#8217;re now using Git for projects, and it&amp;#8217;s going really well so far. While we haven&amp;#8217;t figured out the perfect workflow just yet, we&amp;#8217;re doing some things I really like, and one of them is treating branches like patches.&lt;/p&gt;

&lt;p&gt;Often, people think of Git branches as a full copy of the parent branch, but it&amp;#8217;s better to treat them as a simple collection of new commits, to be applied to the parent branch later.  This might not seem too revolutionary, but this small change in thinking can really improve your workflow.&lt;/p&gt;

&lt;p&gt;For example, at Viddler we use &lt;a href="http://trac.edgewall.org/"&gt;Trac&lt;/a&gt; to manage tickets, and in Git.  For each ticket in Trac, we create a branch, called something like &lt;code&gt;3241-fix-embed-codes&lt;/code&gt;.  We have two permanent branches: &lt;code&gt;dev&lt;/code&gt;, which reflects current development, and &lt;code&gt;master&lt;/code&gt;, which is considered always production-ready.  So, &lt;code&gt;dev&lt;/code&gt; and &lt;code&gt;master&lt;/code&gt; are going to have different code to reflect their reflective stability.  To get started with a fix, we first create a feature branch from &lt;code&gt;master&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git checkout -b 3241-fix-embed-codes master
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This simply creates a new branch of &lt;code&gt;master&lt;/code&gt; called &lt;code&gt;3241-fix-embed-codes&lt;/code&gt; and checks it out. When the ticket is completed and the code has been committed, the patch thinking really comes into play.  Since this now needs to be tested in the &lt;code&gt;dev&lt;/code&gt; environment, the branch first gets applied to the &lt;code&gt;dev&lt;/code&gt; branch:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git checkout dev
git merge &amp;#8212;no-ff 3241-fix-embed-codes
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Using the &lt;code&gt;&amp;#8212;no-ff&lt;/code&gt; option on &lt;code&gt;git merge&lt;/code&gt; is important for this patch mindset: it creates a separate commit for the merge itself, which allows you to &lt;code&gt;git revert&lt;/code&gt; the entire thing (if necessary), rather than having to undo each individual commit within it.&lt;/p&gt;

&lt;p&gt;Once we&amp;#8217;ve decided this fix is read for production, it&amp;#8217;s time to move the code over to &lt;code&gt;master&lt;/code&gt;.  Without the patch mindset, you might consider merging &lt;code&gt;dev&lt;/code&gt; into &lt;code&gt;master&lt;/code&gt;, but that means you&amp;#8217;d be copying anything that&amp;#8217;s applied to &lt;code&gt;dev&lt;/code&gt;, some of which might not yet be ready.  When you think of your feature branch as a patch, however, it&amp;#8217;s easy to only apply the one you need.  To apply this patch to &lt;code&gt;master&lt;/code&gt;, just use a similar method as before:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git checkout master
git merge &amp;amp;#45;-no-ff 3241-fix-embed-codes
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now you&amp;#8217;ve only moved the safe commits over, leaving any buggy code safely in &lt;code&gt;dev&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This method may seem obvious, but the mindset has really changed the way I use Git, and I think it makes it a much more powerful tool, especially when you&amp;#8217;re working across multiple environments (like production and staging).  I&amp;#8217;ve skipped over some additional considerations, like merging &lt;code&gt;master&lt;/code&gt;/&lt;code&gt;dev&lt;/code&gt; into your feature branch, but those are topics for a future post.&lt;/p&gt;
</content>
      <pubDate>Thu, 06 May 2010 00:29:00 -0400</pubDate>
      <link>http://feeds.kyleslattery.com/~r/KyleSlattery/~3/i_VzqjbHGHc/using-git-branches-as-patches</link>
      <guid isPermaLink="false">http://kyleslattery.com/entries/using-git-branches-as-patches</guid>
    <feedburner:origLink>http://kyleslattery.com/entries/using-git-branches-as-patches</feedburner:origLink></item>
  </channel>
</rss>
