<?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>No One Is Perfect &#187; ruby</title>
	<atom:link href="http://watchitlater.com/blog/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://watchitlater.com/blog</link>
	<description>A reluctant foray into the world of blogging.</description>
	<lastBuildDate>Sun, 13 Jun 2010 03:35:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Post-Redirect-Get in Rails</title>
		<link>http://watchitlater.com/blog/2010/03/post-redirect-get-in-rails/</link>
		<comments>http://watchitlater.com/blog/2010/03/post-redirect-get-in-rails/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:06:28 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[My Code]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[haml]]></category>
		<category><![CDATA[post-redirect-get]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[resource]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[rspec]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sass]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=182</guid>
		<description><![CDATA[For a while now I&#8217;ve been flying the flag for using a post-redirect-get design pattern when writing web applications. In my opinion the current crop of web frameworks still make it very easy to do the &#8220;bad&#8221; thing since to do PRG properly you need to think what kind of an interaction you want with [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now I&#8217;ve been flying the flag for using a <a href="http://en.wikipedia.org/wiki/Post/Redirect/Get">post-redirect-get</a> design pattern when writing web applications. In my opinion the current crop of web frameworks still make it very easy to do the &#8220;bad&#8221; thing since to do PRG properly you need to think what kind of an interaction you want with users and not cop out saying its technically very difficult in &lt;insert framework here&gt;. If you resort to ActiveX controls, popups without navigation bars and/or weird javascript hacks to stop users from clicking refresh or back buttons then perhaps you should have written a better web application.</p>
<p>Whenever I play with Rails, or for that matter any other web framework, I get stuck on trying to find a problem to solve (or a set of requirements). Fortunately the <a href="http://pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition">Agile Development with Rails</a> book from the Pragmatic Programmers has a nice little bookstore application that I can develop iteratively. I&#8217;ve put my latest adaptation of their depot application to use post-redirect-get (even works with ActiveResource scaffolds), UUIDs as ActiveRecord primary keys, HAML, SASS and RSpec on <a href="http://github.com/tomcz/pragprog-depot-prg">GitHub</a>. Feedback is always welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2010/03/post-redirect-get-in-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UUID as an ActiveRecord primary key</title>
		<link>http://watchitlater.com/blog/2010/02/ruby-on-rails-uuid-as-an-activerecord-primary-key/</link>
		<comments>http://watchitlater.com/blog/2010/02/ruby-on-rails-uuid-as-an-activerecord-primary-key/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 04:17:24 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Reminders]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[primarykey]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[UUID]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=176</guid>
		<description><![CDATA[I like non-sequential identifiers for resources. Easy to do in Java (with java.util.UUID) and in Python (using the uuid module). This has been a bit of a pain in Rails, until now &#8211; check out Ariejan de Vroom&#8217;s post. I especially like his solution as it plays well with RSpec, although to be picky I [...]]]></description>
			<content:encoded><![CDATA[<p>I like non-sequential identifiers for resources. Easy to do in Java (with java.util.UUID) and in Python (using the uuid module). This has been a bit of a pain in Rails, until now &#8211; check out <a href="http://ariejan.net/2008/08/12/ruby-on-rails-uuid-as-your-activerecord-primary-key/">Ariejan de Vroom&#8217;s post</a>. I especially like his solution as it plays well with RSpec, although to be picky I would have chosen UUID.random_create rather than UUID.timestamp_create.</p>
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2010/02/ruby-on-rails-uuid-as-an-activerecord-primary-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn2cvs</title>
		<link>http://watchitlater.com/blog/2008/10/svn2cvs/</link>
		<comments>http://watchitlater.com/blog/2008/10/svn2cvs/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 09:32:00 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[My Code]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[cruisecontrol]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://watchitlater.com/blog/?p=24</guid>
		<description><![CDATA[I am currently working with a team that uses subversion for day-to-day development but needs to use cvs due to a corporate policy. So I suggested that we create a build on our continuous integration server to automatically merge changes from a subversion working copy to a cvs checkout.
I had a quick look on the [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently working with a team that uses subversion for day-to-day development but needs to use cvs due to a corporate policy. So I suggested that we create a build on our continuous integration server to automatically merge changes from a subversion working copy to a cvs checkout.</p>
<p>I had a quick look on the internet for something to do the merging and managed to find and play with a perl script to merge from svn to cvs, and with a java application that was supposed to do the same. The quality of code in each put me off a little, but what put me off more was that they just did not work properly in our environment.</p>
<p>A long time ago I wrote a ruby script to copy changed or new files from one directory to another, so I decided to dust it off and adapt it to merge from a svn tree to a cvs tree. The result can be downloaded from <a href="http://watchitlater.com/blog/wp-content/uploads/2008/10/svn2cvs.zip">here</a>. This script now performs the following:</p>
<ul>
<li>Copies all files that have been changed in the svn tree to the cvs tree. It compares the modified time of each svn file against its cvs counterpart and only copies the svn file over to cvs if it is newer. Alternatively the script can use an MD5 hash of each file to see if the files are different.</li>
<li>Copies all files and directories that don&#8217;t exist in the svn tree to the cvs tree, and executes the cvs add command on each new directory and file in the cvs tree.</li>
<li>Executes cvs remove on each file in the cvs tree that has no counterpart in the svn tree.</li>
</ul>
<p>We use CruiseControl for continuous build and integration and apache ant as the build tool. Consequently everything else is taken care of by ant tasks that update the svn working copy, checkout (or update) a cvs working copy, and then commit the cvs working copy using the svn revision as the commit message.</p>
]]></content:encoded>
			<wfw:commentRss>http://watchitlater.com/blog/2008/10/svn2cvs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
