<?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>Meta Bates &#187; News</title>
	<atom:link href="http://www.metabates.com/category/news/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.metabates.com</link>
	<description>The technical ramblings of Mark Bates.</description>
	<lastBuildDate>Sun, 15 Aug 2010 12:49:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>CoverMe &#8211; Code Coverage for Ruby 1.9</title>
		<link>http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/</link>
		<comments>http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 17:49:44 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rcov]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tests]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=343</guid>
		<description><![CDATA[Ruby 1.9(.2) is an amazing language to develop applications in. It&#8217;s faster, more powerful, cleaner, and a huge improvement over Ruby 1.8.x. Because of those reasons every Ruby developer should move to this exciting new version of our language. When making a move of this size it&#8217;s important to have the right tools to help [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby 1.9(.2) is an amazing language to develop applications in. It&#8217;s faster, more powerful, cleaner, and a huge improvement over Ruby 1.8.x. Because of those reasons every Ruby developer should move to this exciting new version of our language.</p>
<div id="_mcePaste">When making a move of this size it&#8217;s important to have the right tools to help us along. Unfortunately, one of the most useful tools as a Ruby developer, <a href="http://github.com/relevance/rcov">RCov</a>, does not work with Ruby 1.9.</div>
<div id="_mcePaste">RCov, for those unfamiliar analyzes your code and tells you which part of your code was not executed. This is INCREDIBLY useful when hooked up to your test suite. While, it&#8217;s not the only metric you should use when determining how good your test coverage it, it certainly is a great first step to point out exactly which parts of your code haven&#8217;t been touched at all!</div>
<p>Enter <a href="http://github.com/markbates/cover_me">CoverMe</a>.</p>
<h2>History</h2>
<p>While working on a Ruby 1.9/Rails 3 project, and loving everything about it (except for the lack of RCov), I came across a <a href="http://engineering.attinteractive.com/2010/08/code-coverage-in-ruby-1-9/">post</a> by Aaron Patterson (of <a href="http://github.com/tenderlove/nokogiri">Nokogiri</a> fame). In this post he quickly outlined a very basic coverage tool using the new built-in Coverage module in Ruby 1.9.</p>
<p>After spending a morning playing with it, I was quickly able to grow the idea into something useful for the project. Later that day the company I was consulting for (<a href="http://www.biddingforgood.com">BiddingForGood.com</a>), and in particular their chief architect, <a href="http://twitter.com/stuartmg">Stuart Garner</a>, told me to take a day or two and clean it up and release it for the world to use, and so <a href="http://github.com/markbates/cover_me">here</a> it is.</p>
<h2>Features</h2>
<p>Here is a brief overview of the features of CoverMe:</p>
<h3>Index Page</h3>
<ul>
<li>Sortable column headers (File, Lines, Lines of Code, Tested %).</li>
<li>Searching/filtering by file name.</li>
<li>Filtering by coverage percent.</li>
<li>Color coded list of files to quickly see which ones are 100% covered, &gt; 90% covered, or less than 90% covered.</li>
<li>Large color coded average coverage percent, for quick reference.</li>
</ul>
<h3>Detail Page</h3>
<ul>
<li>Line by line coverage report</li>
<li>Color coded lines to quickly see which lines where executed and which ones were not.</li>
<li>Side by side viewing with the corresponding test/spec file (if one exists).</li>
</ul>
<p>See the <a href="http://github.com/markbates/cover_me">README</a> file for more information on installation and usage.</p>
<h2>Thanks</h2>
<p>I would just quickly like to give another quick thanks to Aaron Patterson for pointing out the Coverage module in Ruby 1.9 and inspiring this, hopefully, helpful little gem. Also another big thanks to Stuart Garner for pushing me to package this up and release it to the world.</p>
<h2>Screenshots</h2>

<a href='http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/detail_side_by_side/' title='detail_side_by_side'><img width="150" height="150" src="http://www.metabates.com/wp-content/uploads/2010/08/detail_side_by_side-150x150.png" class="attachment-thumbnail" alt="detail_side_by_side" title="detail_side_by_side" /></a>
<a href='http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/detail/' title='detail'><img width="150" height="150" src="http://www.metabates.com/wp-content/uploads/2010/08/detail-150x150.png" class="attachment-thumbnail" alt="detail" title="detail" /></a>
<a href='http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/index_filter/' title='index_filter'><img width="150" height="150" src="http://www.metabates.com/wp-content/uploads/2010/08/index_filter-150x150.png" class="attachment-thumbnail" alt="index_filter" title="index_filter" /></a>
<a href='http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/index_search/' title='index_search'><img width="150" height="150" src="http://www.metabates.com/wp-content/uploads/2010/08/index_search-150x150.png" class="attachment-thumbnail" alt="index_search" title="index_search" /></a>
<a href='http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/index/' title='index'><img width="150" height="150" src="http://www.metabates.com/wp-content/uploads/2010/08/index-150x150.png" class="attachment-thumbnail" alt="index" title="index" /></a>

]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2010/08/13/coverme-code-coverage-for-ruby-1-9/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>APN on Rails has a new Home.</title>
		<link>http://www.metabates.com/2010/03/10/apn-on-rails-has-a-new-home/</link>
		<comments>http://www.metabates.com/2010/03/10/apn-on-rails-has-a-new-home/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 15:46:20 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[apn]]></category>
		<category><![CDATA[apn_on_rails]]></category>
		<category><![CDATA[github.com]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=327</guid>
		<description><![CDATA[Quite often I get asked why don&#8217;t I blog more? Why don&#8217;t I tweet more? Why don&#8217;t I _fill in the blank_ more. The answer is I&#8217;m a busy man. I&#8217;m the CTO for a pre-funding startup, www.shortbord.com, the father of two adorable little boys, the lead singer of a Boston-based band, www.myspace.com/colawarvets, and that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Quite often I get asked why don&#8217;t I blog more? Why don&#8217;t I tweet more? Why don&#8217;t I _fill in the blank_ more. The answer is I&#8217;m a busy man. I&#8217;m the CTO for a pre-funding startup, <a href="http://www.shortbord.com/invites/ZAZLBQH5FA">www.shortbord.com</a>, the father of two adorable little boys, the lead singer of a Boston-based band, <a href="http://www.myspace.com/colawarvets">www.myspace.com/colawarvets</a>, and that&#8217;s just the big stuff! I have to prioritize what I can spend my time on, and unfortunately some of my open source projects are the first to get the ax.</p>
<p>Why do the open source projects always seem to get the ax? Well, let me start by saying that they don&#8217;t <em>always</em> get the ax, but they certainly jump to the top of the list. There are certain libraries I&#8217;ve written, <a href="http://github.com/markbates/cachetastic">cachetastic</a> and <a href="http://github.com/markbates/configatron">configatron</a>, are the two most prominent that I use day in and day out. They will always get the love the deserve. Then there are projects like APN on Rails. I wrote it because I had an iPhone app (no longer available) that I wanted notifications for, and there was nothing else available for Ruby to do the job. The plugin took off like crazy and I was overwhelmed with patches, questions, bugs, etc&#8230; That was great, and I was happy to help, for a time, but alas, I haven&#8217;t written an iPhone app for ages, and I just don&#8217;t have time to maintain a plugin that I wasn&#8217;t even using.</p>
<p>A while ago I realized that the best thing for APN on Rails, myself, and for the community was to find someone to take over the project so that it got the love it deserved. I put out the call and the good folks over at <a href="http://www.prx.org/">PRX</a> (Public Radio Exchange) answered the call. The folks at PRX have written some great iPhone apps, including the very popular &#8220;This American Life&#8221; app.</p>
<p>So I&#8217;m happy to announce that the new official home for APN on Rails is now at: <a href="http://github.com/PRX/apn_on_rails">http://github.com/PRX/apn_on_rails</a>. I ask that you continue to show the same support to PRX that you have shown to me over the life of this plugin.</p>
<p>Again, thank you to everyone, and thank you to Rebecca Nesson and the folks over at PRX for picking up the project and giving it renewed life.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2010/03/10/apn-on-rails-has-a-new-home/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>First Book Review is a 5-Star One!</title>
		<link>http://www.metabates.com/2009/11/19/first-book-review-is-a-5-star-one/</link>
		<comments>http://www.metabates.com/2009/11/19/first-book-review-is-a-5-star-one/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 21:09:56 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Press]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[distributed programmig]]></category>
		<category><![CDATA[distributed programming with ruby]]></category>
		<category><![CDATA[distributed ruby]]></category>
		<category><![CDATA[drb]]></category>
		<category><![CDATA[rinda]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=295</guid>
		<description><![CDATA[About.com became the first, that I know about, to review my book, &#8220;Distributed Programming with Ruby&#8221;. What a great first review to have as well. They rated the book 5 out of 5 stars! The review can be found here. &#8220;Anyone working with distributed programming in Ruby will want this book.&#8221; The only downside they [...]]]></description>
			<content:encoded><![CDATA[<p>About.com became the first, that I know about, to review my book, &#8220;Distributed Programming with Ruby&#8221;. What a great first review to have as well. They rated the book 5 out of 5 stars! The review can be found <a href="http://ruby.about.com/od/bookreviews/gr/distributedprogramming.htm">here</a>.</p>
<blockquote><p>&#8220;Anyone working with distributed programming in Ruby will want this book.&#8221;</p></blockquote>
<p>The only downside they saw in the book, was that they wanted it to be longer! I have to save something for the 2nd edition, don&#8217;t I? <img src='http://www.metabates.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you haven&#8217;t purchased yours yet, I encourage you to do so. It&#8217;s on sale at <a href="http://book.markbates.com">Amazon.com</a> right now.</p>
<p>If you have reviewed the book, or know of a review of the book, please pass it along.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/11/19/first-book-review-is-a-5-star-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Warp Drive for Rails</title>
		<link>http://www.metabates.com/2009/10/07/introducing-warp-drive-for-rails/</link>
		<comments>http://www.metabates.com/2009/10/07/introducing-warp-drive-for-rails/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 13:00:19 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[engines]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[warp drive]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=269</guid>
		<description><![CDATA[At work recently we had a need to build a large Rails application that we then wanted to, for lack of a better word, subclass. Unfortunately there is no real good way of doing that. Rails Engines and templates have way too may limitations. We wanted to bundle up the entire Rails app (models, controllers, [...]]]></description>
			<content:encoded><![CDATA[<p>At work recently we had a need to build a large Rails application that we then wanted to, for lack of a better word, subclass. Unfortunately there is no real good way of doing that. Rails Engines and templates have way too may limitations. We wanted to bundle up the entire Rails app (models, controllers, views, routes, migrations, configurations, libs, assets, etc&#8230; everything!), but there was no good way of doing that. Well, now there is, it&#8217;s called the Warp Drive.</p>
<p>I&#8217;ve decided to just include my README file below to explain what it is, since it&#8217;s a bit lengthy, and I don&#8217;t feel like retyping.</p>
<p>This is still in it&#8217;s early stages, so use with care, but it does seem to be working for us on a daily basis. Let me know what you think!</p>
<h2>What is Warp Drive?</h2>
<p>Warp Drive is what Rails Engines wish they could be, and more! They kick Rails templates in the ass, and they beat keeping an ever evolving base Rails app up to date.</p>
<h3>What are Rails Engines?</h3>
<p>Rails Engines allow you to package up some of a Rails app (controllers, models, views, routes, libs) and put them in a plugin that can be included into a new Rails app, thereby giving it the functionality you had in the engine. That sounds good, but what about the downsides of using an engine? Well, you can&#8217;t override or extend any of the functionality from the engine in your main application. You can hack at the plugin, but now you&#8217;ve made it difficult to update. So what do you do if you want to add or alter a method to a controller or model? What do you do if you want to change the look and feel of a view? You have to copy everything into your main application. Boo!</p>
<p>Rails Engines also don&#8217;t allow you to package up migrations, assets, plugins, initializers, etc&#8230; All the fun stuff that you&#8217;ve come to know and love about a Rails application.</p>
<h3>Enter the Warp Drive!</h3>
<p>So what is a Warp Drive? Great question. To put it simply a Warp Drive is a standard, full featured, Rails application that you can easily bundle up into a Ruby Gem, and include into another Rails app. That second Rails app now has all the power of the first Rails. That is all there is to it.</p>
<h2>Creating a Warp Drive.</h2>
<p>Let&#8217;s assume we have an application that implements AuthLogic for handling user registration/authentication. We have controllers, views, models, plugins, initializers, configurations, migrations, tasks, etc&#8230; it&#8217;s a full featured fully functional Rails application, we call it authenticator.</p>
<p>We want to turn our authenticator application into a Warp Drive. We can do it in three simple steps, the first two steps you only need to do the first time, to set everything up.</p>
<ol>
<li><code>$ gem install warp_drive</code></li>
<li><code>$ warpify</code><br />
That will add a little bit of code to your <code>Rakefile</code>. That code simply requires the Warp Drive gem, and gives you hooks to configure the gem of your Warp Drive application.</li>
<li>$ <code>rake warp_drive:compile</code> (<code>rake warp_drive:install</code>)This will either compile your gem for your (<code>warp_drive:compile</code>) or compile and install your gem (<code>warp_drive:install</code>)</li>
</ol>
<p>That&#8217;s it! You should now have your Rails application bundled up and/or installed as a RubyGem!</p>
<h2>Using a Warp Drive.</h2>
<p>With your fancy new Warp Drive, authenticator, built and installed how do you use it in that new application your building? Again, it&#8217;s stupid easy, and it only takes one step, that only needs to be run once:</p>
<ol> <code>$ install_warp_drive authenticator</code></ol>
<p>That will put a few lines of code in your <code>Rakefile</code>, so you have access to all the <code>Rakefile</code> tasks in your Warp Drive, and a line in your <code>config/environment.rb</code> so that it will load your Warp Drive when you launch your application.</p>
<p>That&#8217;s it! You&#8217;re done. Now you can run <code>rake db:migrate</code> to run the migrations from both your Warp Drive and your new application. Enjoy!</p>
<h2>Overriding, Extending, and Other Such Fun Things</h2>
<h3>Overriding and Extending</h3>
<p>You&#8217;ve been enjoying your new Warp Drive back application for a little while now, but you decide you really need to change an action in your controller, how do you go about that? Simple, just like you would any normal alteration to a Ruby class.</p>
<p>Example:<br />
Here is what the action looks like in our Warp Drive UsersController:</p>
<pre><code>
  def new
    @user = User.new
  end
</code></pre>
<p>In our new application we can just open up the UsersController like this:</p>
<pre><code>
  class UsersController &lt; ApplicationController

    def new_with_default_name
      new_without_default_name
      @user.login = 'default_name'
    end

    alias_method_chain :new, :default_name

  end
</code></pre>
<p>Viola! The same works for any thing else in the system, models, libs, etc&#8230; In our example we used <code>alias_method_chain</code> to retain the original method, but we could have completely rewritten the method as well.</p>
<p>You can also plop in a new view and it will override the view that was in your Warp Drive. The sky is really the limit.</p>
<h3>Assets</h3>
<p>You can easily bundle assets from your public directory in your Warp Drive. Just make sure they are in folders called <code>warp_drive</code>. Those folders will then be symlinked to your new project&#8217;s public directory when the application starts up.</p>
<h3>Keep Those Rake Tasks Private!</h3>
<p>We all them, Rake tasks we have created to help us do all sorts of things, and we usually don&#8217;t want them to ship. Well, Warp Drive has you covered there. Just place your tasks in folders called <code>private</code> and Bob&#8217;s your uncle they won&#8217;t be available in the compiled gem.</p>
<pre><code>
  lib/
    tasks/
      foo.rake
      private/
        bar.rake
</code></pre>
<p>In this example <code>foo.rake</code> will be available to clients of your Warp Drive, but <code>bar.rake</code> will not be.</p>
<p>Copyright (c) 2009 Mark Bates</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/10/07/introducing-warp-drive-for-rails/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>APN on Rails 0.3.0 Released</title>
		<link>http://www.metabates.com/2009/07/31/apn-on-rails-0-3-0-released/</link>
		<comments>http://www.metabates.com/2009/07/31/apn-on-rails-0-3-0-released/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 04:51:02 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[apn]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[push notification]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=264</guid>
		<description><![CDATA[The latest version of Apple Push Notifications on Rails (APN on Rails) has been released. This release brings a few bug fixes, a new migration, and Feedback processing. Installing/upgrading is easy: $ sudo gem install apn_on_rails $ ruby script/generate apn_migrations $ rake db:migrate It&#8217;s important to always run the migrations generator after each update to [...]]]></description>
			<content:encoded><![CDATA[<p>The latest version of Apple Push Notifications on Rails (APN on Rails) has been released. This release brings a few bug fixes, a new migration, and Feedback processing.</p>
<p>Installing/upgrading is easy:</p>
<p><code>$ sudo gem install apn_on_rails<br />
$ ruby script/generate apn_migrations<br />
$ rake db:migrate<br />
</code></p>
<p>It&#8217;s important to always run the migrations generator after each update to get the latest database schema needed for the the gem.</p>
<p>To use the new Feedback integration you have to first make sure that you update the new <code>last_registered_at</code> column when your iPhone application calls home. This column is checked against the timestamp Apple returns with the device token. If the <code>last_registered_at</code> is older than Apple&#8217;s date then the device is deleted, otherwise the Feedback is ignored.</p>
<p>To get and process the list of devices from Apple&#8217;s Feedback service just run the following Rake task:</p>
<p><code>$ rake apn:feedback:process</code></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/07/31/apn-on-rails-0-3-0-released/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Almost There&#8230; Book Wise.</title>
		<link>http://www.metabates.com/2009/07/27/almost-there-book-wise/</link>
		<comments>http://www.metabates.com/2009/07/27/almost-there-book-wise/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 01:54:02 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[delayed job]]></category>
		<category><![CDATA[distributed programming with ruby]]></category>
		<category><![CDATA[drb]]></category>
		<category><![CDATA[map reduce]]></category>
		<category><![CDATA[rinda]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=260</guid>
		<description><![CDATA[I&#8217;m now entering the home stretch of writing the Distributed Programming with Ruby book. I&#8217;m just a few weeks away, well, technically I&#8217;m hours away from finishing the last chapter (Delayed Job) in the official table of contents, however, I&#8217;m going to add another chapter and a half. Why? Mostly because I&#8217;m a glutton for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m now entering the home stretch of writing the Distributed Programming with Ruby book. I&#8217;m just a few weeks away, well, technically I&#8217;m hours away from finishing the last chapter (Delayed Job) in the official table of contents, however, I&#8217;m going to add another chapter and a half. Why? Mostly because I&#8217;m a glutton for punishment. That and I want to deliver the best book possible. The extra chapter and a half, not featured in the table of contents below, will be on MapReduce technologies. It&#8217;s a really hot topic, and I think it will fit well in the book. What do you think?</p>
<p><del datetime="2009-07-29T03:01:37+00:00">Unfortunately, the &#8220;Rough Cuts&#8221; book on O&#8217;Reilly&#8217;s Safari site hasn&#8217;t been updated in nearly 3 months! I&#8217;m not sure why. I keep asking my editor to update it, but it hasn&#8217;t happened yet. I&#8217;m sure it will soon, especially since the first draft of the entire manuscript will be done in just a few weeks!</del></p>
<p>UPDATE: Today they updated the &#8220;Rough Cuts&#8221; with nearly the latest revisions. It&#8217;s still missing the chapters on Delayed Job and BackgrounDRb, but it&#8217;s closer than it was yesterday. </p>
<p>Anyway, as a public service announcement to you, the readers, I thought I would the table of contents as it stands right now, so you have a better idea of what the book is going to be about. So here it goes:</p>
<p><script src="http://gist.github.com/156861.js"></script></p>
<p>What do you think? Does it look good? Is this something you&#8217;d buy? Let me know. This is your chance to have an influence on a book. If you think something is missing or should be laid out differently, please let me know, it might just make it into the final product.</p>
<p>Ok, enough delaying here, let me get back to writing so I can finish up the Delayed Job chapter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/07/27/almost-there-book-wise/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Apple Push Notifications on Rails</title>
		<link>http://www.metabates.com/2009/07/24/apple-push-notifications-on-rails/</link>
		<comments>http://www.metabates.com/2009/07/24/apple-push-notifications-on-rails/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 01:06:10 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[apn]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[push notification]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=250</guid>
		<description><![CDATA[The other night I submitted a new iPhone application to the Apple Store. The app, which I&#8217;ll speak about when, and if it gets approved, uses the new Apple Push Notification service available in iPhone OS 3.0. On the server side I have a Rails application that I am using to send the notifications to [...]]]></description>
			<content:encoded><![CDATA[<p>The other night I submitted a new iPhone application to the Apple Store. The app, which I&#8217;ll speak about when, and if it gets approved, uses the new Apple Push Notification service available in iPhone OS 3.0. On the server side I have a Rails application that I am using to send the notifications to Apple. The problem I ran into was how.</p>
<p>Enter the APN on Rails gem. While searching I found one plugin for Rails that mostly worked for me, Sam Soffes&#8217; apple_push_notification plugin. It was a great place to start, but I found that there were things that didn&#8217;t suite me. For starters, not having any tests is always a big turn off for me when it comes to any code. I also didn&#8217;t like that you didn&#8217;t need to save a notification in order to send it. That means you don&#8217;t have a record of what was sent and when. I also wanted to have devices stored separately from the notification. Finally, I wanted to be able to easily configure the plugin. Sam&#8217;s was using constants that would need to be changed when it hit production.</p>
<p>So, with all that said and done I took Sam&#8217;s great work, ripped it apart, and put it back together again, this time in gem form instead of a plugin, and here it is.</p>
<p>There are a few migrations, a few models, and a few Rake tasks, but here is the basic idea of how it works:</p>
<p><script src="http://gist.github.com/154516.js"></script></p>
<p>To get a better understanding of exactly how it works, and what it does, I highly recommend reading the <a href="http://apnonrails.metabates.com/">RDOC</a>.</p>
<p>There are a few things I still would like to add, for example, a controller to do CRUD for devices so iPhones can register with the Rails app. I&#8217;d also like to add a task that talks to Apple and finds out which devices are no longer accepting messages so they can be removed.</p>
<p>If you&#8217;d like to contribute, please feel free and for the project on GitHub:<br />
<a href="http://github.com/markbates/apn_on_rails/tree">http://github.com/markbates/apn_on_rails/tree</a></p>
<p>Again, a special thanks to Fabien Penso and Sam Soffes for their initial work on this project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/07/24/apple-push-notifications-on-rails/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>The Evolving Table of Contents</title>
		<link>http://www.metabates.com/2009/06/20/the-evolving-table-of-contents/</link>
		<comments>http://www.metabates.com/2009/06/20/the-evolving-table-of-contents/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 04:26:02 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[distributed programmig]]></category>
		<category><![CDATA[drb]]></category>
		<category><![CDATA[rinda]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=241</guid>
		<description><![CDATA[For those of you who have checked out the Rough Cuts version of my book, &#8220;Distributed Programming with Ruby&#8221;, I thought you would like to get a peek into how the Table of Contents is going to change shortly. For those of you who haven&#8217;t seen the old Table of Contents, or are just plain [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who have checked out the Rough Cuts version of my book, &#8220;Distributed Programming with Ruby&#8221;, I thought you would like to get a peek into how the Table of Contents is going to change shortly. For those of you who haven&#8217;t seen the old Table of Contents, or are just plain old interested to see what&#8217;s going to be in the book, or to see how far along with the book I am, here is the current Table of Contents as of tonight:</p>
<p><script src="http://gist.github.com/133394.js"></script></p>
<p>As you can see it has evolved quite a bit from what was posted on Rough Cuts just about a month ago. Chances are that it will probably change again, and as it does, I&#8217;ll try and keep you all posted. There is talk of adding a large chapter at the end that takes a handful of the technologies I discuss in the book and use them to build a &#8220;real world&#8221; example application, like a Twitter clone, or something like that. If anyone has any good ideas on what they would like to see for this example, please them my way, I&#8217;d love to hear them.</p>
<p>If there are no sections listed below a particular chapter that means that I have either not written it yet, or I&#8217;m still too early in that chapter&#8217;s development to have properly assigned it actual sections.</p>
<p>The first draft of the book is slated for the end of July. So there is still a lot of work to be done, but it&#8217;s still rather exciting. Well, it&#8217;s exciting for me at least. Talk to you all soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/06/20/the-evolving-table-of-contents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cachetastic 3.0.0 Released</title>
		<link>http://www.metabates.com/2009/06/18/cachetastic-3-0-0-released/</link>
		<comments>http://www.metabates.com/2009/06/18/cachetastic-3-0-0-released/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 02:07:10 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[cachetastic]]></category>
		<category><![CDATA[configatron]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://www.metabates.com/?p=237</guid>
		<description><![CDATA[After more than two years powering production level applications I found that Cachetastic was starting to get a bit long in the tooth. I felt that there was a lot I could to make Cachetastic an even better library than it already was. I thought that I had added a bunch of cruft to the [...]]]></description>
			<content:encoded><![CDATA[<p>After more than two years powering production level applications I found that Cachetastic was starting to get a bit long in the tooth. I felt that there was a lot I could to make Cachetastic an even better library than it already was. I thought that I had added a bunch of cruft to the framework that people were just not using and maintaining it all seemed like a bit of a pointless chore.</p>
<p>So what was I unhappy about?</p>
<h3>Configuration:</h3>
<p>I was pretty unhappy with the way configuration was being done. I liked using Configatron to power the configuration, but I didn&#8217;t like the way I implemented the way I was using Configatron. For example, to set up one of the default settings, like the expiry time, you would configure it like such:</p>
<pre>configatron.cachetastic_default_options.expiry_time = 30.minutes</pre>
<p>Now you would configure that same option like this:</p>
<pre>configatron.cachetastic.defaults.expiry_time = 30.minutes</pre>
<p>That&#8217;s a little savings, but it really hits when you want to configure a particular cache. Let&#8217;s say we a cache called My::Super::AwesomeCache, to configure it in past versions of Cachetastic we would do this:</p>
<pre>configatron.my_super_awesome_cache_options.expiry_time = 15.minutes</pre>
<p>Now in Cachetastic 3.0.0 we configure like this:</p>
<pre>configatron.cachetastic.my.super.awesome_cache.expire_time = 15.minutes.</pre>
<p>As you can see all configuration now happens under the cachetastic namespace in Configatron. Then it&#8217;s a matter of using a Configatron namespace for each of your modules. I find it a lot easier to manage.</p>
<p>Another change in configuration is that in previous versions if you wanted to override one default configuration value for a particular cache,  you had to override them all. Now, you can just override the one value  you want, and the rest will be nicely inherited from the defaults.</p>
<h3>Speed</h3>
<p>Cachetastic has always been a very fast library, but I knew that more could be squeezed from that stone. With Cachetastic 3.0.0 you now get a hefty 25% improvement in the Memcached adapter and a whopping 99% in the LocalMemory adapter! Those are pretty awesome numbers. These numbers were easy to achieve when I stepped back and examined what it was I really wanted to do, and picked the most straightforward path to that goal.</p>
<h3>Bloat</h3>
<p>After more than two years Cachetastic was starting to suffer from a severe case of bloat. For example, I&#8217;ve never used the DRb adapter, have you? So why is it there? The same goes for the HtmlFile adapter. I wrote that because at my last job the operations team weren&#8217;t savvy  enough to be able to get Apache to talk to Memcached, so they wanted to serve HTML files, hence the rather awful adapter. Both of those adapters are now history.</p>
<p>There also used to be support for Rails Session Caching. Considering that most people are now using the Cookie store for sessions, there really is no need for this cache. It could also be argued that it should not have been bundled with Cachetastic at all. I would agree with those arguments. Cachetastic is, and should always be, a standalone caching framework, that can be plugged into Rails or any plain old Ruby project that needs caching support.</p>
<p>Also purged is automatic support for mixing in the Cachetastic::Cacheable module into ActiveRecord. If you want this functionality, it is very easy to include in your application. I don&#8217;t want to force it on anyone, so that is gone now.</p>
<p>Finally there are a handful of smaller features that I&#8217;m sure no one will miss that I&#8217;ve yanked out in the name of performance, reliability, and ease of maintenance.</p>
<h3>Nice and Clean</h3>
<p>When I realized what I really wanted, and what I didn&#8217;t want, it became clear that what was needed was a fresh code base. With that said, I hit delete (well, not really) and started over again. The code is now smooth, so much easier to read, and fast. In previous versions even my eyes went a bit crossed when I tried to figure out exactly what was going on. There where quite a few levels of indirection, and things just weren&#8217;t place where they probably should&#8217;ve been. That has all been fixed.</p>
<p>With a nice, clean code base comes a brand new set of tests. The tests are now extremely comprehensive, and while 2.x was very well tested, I know that 3.0.0, is tested to the hilt.</p>
<p>Because 3.0.0 is a brand new code base, I should probably stress the fact that is <strong>NOT</strong> backward compatible. So please be advised.</p>
<h3>Installation:</h3>
<pre>$ sudo gem install cachetastic</pre>
<h3>Conclusion</h3>
<p>I really hope everyone likes this brand new version of Cachetastic. I&#8217;m very happy with it, and I think if you give it a chance, you will be too.</p>
<p>If you&#8217;d like to have a peek at the RDoc, it can be found at:<br />
<a href="http://cachetastic-api.mackframework.com/">http://cachetastic-api.mackframework.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/06/18/cachetastic-3-0-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distributed Programming with Ruby Book Update</title>
		<link>http://www.metabates.com/2009/05/22/distributed-programming-with-ruby-book-update/</link>
		<comments>http://www.metabates.com/2009/05/22/distributed-programming-with-ruby-book-update/#comments</comments>
		<pubDate>Sat, 23 May 2009 02:01:47 +0000</pubDate>
		<dc:creator>Mark Bates</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[addison-wesley]]></category>
		<category><![CDATA[distribunaut]]></category>
		<category><![CDATA[distributed programming with ruby]]></category>
		<category><![CDATA[drb]]></category>
		<category><![CDATA[github.com]]></category>
		<category><![CDATA[rinda]]></category>

		<guid isPermaLink="false">http://www.mackframework.com/?p=221</guid>
		<description><![CDATA[Hey there folks, I know it&#8217;s been awhile, so I thought I would give you all a very quick update as to how the book is going. It&#8217;s going really well. I&#8217;m about 100 pages into it, and it&#8217;s shaping up very nicely. Addison-Wesley is preparing to put it into their &#8220;Rough Cuts&#8221; program so [...]]]></description>
			<content:encoded><![CDATA[<p>Hey there folks, I know it&#8217;s been awhile, so I thought I would give you all a very quick update as to how the book is going. It&#8217;s going really well. I&#8217;m about 100 pages into it, and it&#8217;s shaping up very nicely. Addison-Wesley is preparing to put it into their &#8220;Rough Cuts&#8221; program so you can all get your dirty little hands on what I&#8217;ve written so far as early as a few weeks from now, or so I&#8217;m told.</p>
<p>While I don&#8217;t want to give too much away about the contents, everybody loves a good surprise, let me say that part one of the book will be the most comprehensive guide to DRb and Rinda that you&#8217;ll find anywhere. Including the source code!!</p>
<p>I&#8217;m working hard on part two of the book which focuses on third party tools, frameworks, and libraries. It&#8217;s quite a fun part of the book to write as there are a great deal of choices out there, including my own Distribunaut. (PS. I released a new version of it on GitHub a week or so ago.) Writing about different libraries is quite fun as I get to really delve into the source code and see the good and bad ways people like to write code. Plus some of the libraries have really great features, or really turn things on their head.</p>
<p>When the book is available as a &#8220;Rough Cut&#8221;, I&#8217;ll certainly keep you all informed. In the mean time keep watching this space and have a great weekend!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.metabates.com/2009/05/22/distributed-programming-with-ruby-book-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.557 seconds -->
