<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DUcMSXYzfSp7ImA9WhVWE0Q.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033</id><updated>2012-04-25T16:38:08.885-07:00</updated><category term="ruby" /><category term="apache" /><category term="miscellaneous" /><category term="shell script" /><category term="macintosh" /><category term="javascript" /><category term="ajax" /><category term="freeciv" /><category term="mac os x" /><category term="github" /><category term="mocha" /><category term="book" /><category term="flex" /><category term="outsourcing" /><category term="software development" /><category term="cocoa" /><category term="movie" /><category term="jquery" /><category term="ruby on rails" /><category term="passenger" /><category term="terminal" /><category term="css" /><category term="factory_girl" /><category term="sql" /><category term="unit test" /><category term="git" /><category term="leopard" /><category term="plugin" /><category term=".net" /><category term="mod_rails" /><category term="macports" /><category term="prototype" /><category term="hardware" /><category term="subversion" /><title>The Banana Peel</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://the-banana-peel.saltybanana.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>61</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/TheBananaPeel" /><feedburner:info uri="thebananapeel" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CkcFRnc6eSp7ImA9Wx5SFUQ.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-4675223641335701918</id><published>2010-08-11T22:08:00.000-07:00</published><updated>2010-08-11T22:13:37.911-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-11T22:13:37.911-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freeciv" /><title>Freeciv 2.2.2 + Snow Leopard = Half Joy</title><content type="html">Got some feedback on the Freeciv &lt;a href="http://forum.freeciv.org/index.php"&gt;forum&lt;/a&gt; regarding Freeciv 2.2.2 on Snow Leopard.  While the SDL version works but without sound, the GTK (X11) version does not.  I asked the kind poster for more info, let's see what comes of it.&lt;br /&gt;&lt;br /&gt;There is a workaround to enable sounds in the SDL version.  Read about it &lt;a href="http://forum.freeciv.org/viewtopic.php?t=6343"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-4675223641335701918?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZS7rb5ZiXxxRXGoj9chBVYndlJg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZS7rb5ZiXxxRXGoj9chBVYndlJg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZS7rb5ZiXxxRXGoj9chBVYndlJg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZS7rb5ZiXxxRXGoj9chBVYndlJg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/AqElqJ8kFqg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/4675223641335701918/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=4675223641335701918" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4675223641335701918?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4675223641335701918?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/AqElqJ8kFqg/freeciv-222-snow-leopard-half-joy.html" title="Freeciv 2.2.2 + Snow Leopard = Half Joy" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2010/08/freeciv-222-snow-leopard-half-joy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEFQ308eyp7ImA9Wx5TGE8.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-1146767500457713723</id><published>2010-08-03T00:55:00.000-07:00</published><updated>2010-08-03T01:03:32.373-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-03T01:03:32.373-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freeciv" /><title>Freeciv 2.2.2 Trifecta</title><content type="html">Freeciv 2.2.2 came out not long ago.  I put together the following Mac OS X packages for it:&lt;br /&gt;&lt;ul style="line-height:1em"&gt;&lt;br /&gt;&lt;li&gt;GTK version for Intel, 10.5.8+&lt;/li&gt;&lt;br /&gt;&lt;li&gt;SDL version for Intel, 10.5.8+&lt;/li&gt;&lt;br /&gt;&lt;li&gt;GTK version for PowerPC, 10.4.11&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;These also install into /opt/com.bitaxis instead of the canonical /opt/local directory used by &lt;a href="http://macports.org/"&gt;MacPorts&lt;/a&gt;.  Hence, they are now &lt;em&gt;compatible&lt;/em&gt; with MacPorts.&lt;br /&gt;&lt;br /&gt;You can check them out &lt;a href="http://freeciv.wikia.com/wiki/Download#Mac_OS_X_Packages"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-1146767500457713723?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ZFqYflHAdv147zB8S9Hm-x_JfNQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZFqYflHAdv147zB8S9Hm-x_JfNQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ZFqYflHAdv147zB8S9Hm-x_JfNQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ZFqYflHAdv147zB8S9Hm-x_JfNQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/K3SNzcjqtLk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/1146767500457713723/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=1146767500457713723" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1146767500457713723?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1146767500457713723?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/K3SNzcjqtLk/freeciv-222-trifecta.html" title="Freeciv 2.2.2 Trifecta" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2010/08/freeciv-222-trifecta.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUCQno5fSp7ImA9WxFaEks.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-6967748107004633428</id><published>2010-07-15T23:14:00.001-07:00</published><updated>2010-07-15T23:37:43.425-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-15T23:37:43.425-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freeciv" /><title>Freeciv 2.2.1 -- I am back!</title><content type="html">I was looking through the &lt;a href="http://macports.org"&gt;MacPorts&lt;/a&gt; man pages, and noticed the &lt;tt&gt;pkg&lt;/tt&gt; and &lt;tt&gt;mpkg&lt;/tt&gt; directives.  Which got me thinking...&lt;br /&gt;&lt;br /&gt;So, I decided to take another crack at Freeciv packaging for Mac OS X.  As I mentioned in another &lt;a href="http://the-banana-peel.saltybanana.com/2009/06/freeciv-packaging-troubles.html"&gt;post&lt;/a&gt;, my old way of packaging Freeciv was untenable for me as someone with limited knowledge in GTK+ and X11.&lt;br /&gt;&lt;br /&gt;After some experimentation, and with the help of MacPorts, I put together two brand new Freeciv packages that are much easier to put together, albeit with an ironic twist of the results being incompatible with MacPorts.  Go figure!&lt;br /&gt;&lt;br /&gt;Anyhow, you can read about them &lt;a href="http://forum.freeciv.org/viewtopic.php?t=6324"&gt;here&lt;/a&gt; as well as try them out for yourselves.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-6967748107004633428?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5irHYqf_uTqec_rix1D8e3MSsk8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5irHYqf_uTqec_rix1D8e3MSsk8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5irHYqf_uTqec_rix1D8e3MSsk8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5irHYqf_uTqec_rix1D8e3MSsk8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/Mz5QkLTZmVA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/6967748107004633428/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=6967748107004633428" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6967748107004633428?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6967748107004633428?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/Mz5QkLTZmVA/freeciv-221.html" title="Freeciv 2.2.1 -- I am back!" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2010/07/freeciv-221.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4ERXY6fip7ImA9WxFVF0s.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-4915821163748969431</id><published>2010-06-17T01:29:00.000-07:00</published><updated>2010-06-17T01:38:24.816-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-17T01:38:24.816-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><title>Rails 3 Beta 4 -- Success!</title><content type="html">After watching this series of Rails 3 &lt;a href="http://rubyonrails.org/screencasts/rails3"&gt;screencasts&lt;/a&gt;, I decided to give Rails 3 a try.&lt;br /&gt;&lt;br /&gt;Reading the beta &lt;a href="http://guides.rails.info/3_0_release_notes.html"&gt;release notes&lt;/a&gt;, I updated to the late rvm gem, then proceeded to install Ruby 1.8.7-p174.  While the installation was successful, and I was able to create a Rails 3 app, I couldn't run rake.  Any attempt to invoke it, even just to list rake tasks, gave me a cryptic error about Rail's delegate method.&lt;br /&gt;&lt;br /&gt;Next, I tried to install REE's flavor of Ruby 1.8.7, and that failed to install.&lt;br /&gt;&lt;br /&gt;So lastly, I tried 1.9.2-preview3, and that worked.  Woohoo!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-4915821163748969431?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XoUFbhEr_Njq098iEYkhh_ljvCc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XoUFbhEr_Njq098iEYkhh_ljvCc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XoUFbhEr_Njq098iEYkhh_ljvCc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XoUFbhEr_Njq098iEYkhh_ljvCc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/WKnd5nKM60Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/4915821163748969431/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=4915821163748969431" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4915821163748969431?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4915821163748969431?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/WKnd5nKM60Q/rails-3-beta-4-success.html" title="Rails 3 Beta 4 -- Success!" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2010/06/rails-3-beta-4-success.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QDR3cycSp7ImA9WxNUGEQ.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-469551223284222760</id><published>2009-11-10T15:08:00.000-08:00</published><updated>2009-11-10T15:22:56.999-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-11-10T15:22:56.999-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="unit test" /><title>assert_false</title><content type="html">Ruby has a pretty good unit-test framework.  However, it is annoying that &lt;tt&gt;assert_false&lt;/tt&gt; does not come built-in.  So, here is my own that I use in my Rails applications' test code:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;script src="http://gist.github.com/231376.js"&gt;&lt;/script&gt;&lt;/blockquote&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-469551223284222760?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zmytCGvB9KHeQmcJSt_moeNqKy0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zmytCGvB9KHeQmcJSt_moeNqKy0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zmytCGvB9KHeQmcJSt_moeNqKy0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zmytCGvB9KHeQmcJSt_moeNqKy0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/OgDSYRN9DCc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/469551223284222760/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=469551223284222760" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/469551223284222760?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/469551223284222760?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/OgDSYRN9DCc/assertfalse.html" title="assert_false" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/11/assertfalse.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcEQXo9cSp7ImA9WxNVGUk.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-6642140278241224386</id><published>2009-10-30T13:55:00.000-07:00</published><updated>2009-10-30T15:00:00.469-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-30T15:00:00.469-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="subversion" /><category scheme="http://www.blogger.com/atom/ns#" term="github" /><title>Peaceful Co-Existence Between Subversion and Git</title><content type="html">So I have been using &lt;a href="http://svn.tigris.org"&gt;Subversion&lt;/a&gt; as my source control tool for my Rails apps for a couple of years now, and I am very happy with it.&lt;br /&gt;&lt;br /&gt;Recently, I have begun to use &lt;a href="http://git-scm.com"&gt;Git&lt;/a&gt; as my source control for plugin development, and using &lt;a href="http://github.com"&gt;github.com&lt;/a&gt; as a means to share my work with the community.&lt;br /&gt;&lt;br /&gt;So, the dual-tool strategy begs the questions:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Do they play nice together?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;How does a developer make them play nicely with one another?&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;The short answers to these questions is Yes.  If you want the details, read on.&lt;br /&gt;&lt;br /&gt;Given the Tidy code I am versioning using Git is not a full-blown application, I need it to reside within the context of a Rails application to test it.  So this is what I did:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Have my application, let's call it X, version controlled using Subversion&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In application X's &lt;tt&gt;vendor/plugins&lt;/tt&gt; directory, I create a Git repository called &lt;tt&gt;tidy&lt;/tt&gt;; this is where I maintain and test Tidy's code&lt;/li&gt;&lt;br /&gt;&lt;li&gt;This Git repository is tied to &lt;a href="http://github.com"&gt;github.com&lt;/a&gt;, so that I can push any changes out for the community to see&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The &lt;tt&gt;tidy&lt;/tt&gt; directory is also version controlled by Subversion, so that my application has a working copy of Tidy that I can deploy&lt;/li&gt;&lt;br /&gt;&lt;li&gt;However, Subversion complains about the &lt;tt&gt;tidy/.git&lt;/tt&gt; directory, and Git in turn complains about the various &lt;tt&gt;tidy/*/.svn&lt;/tt&gt; directories&lt;/li&gt;&lt;br /&gt;&lt;li&gt;To remedy this, I added a &lt;tt&gt;tidy/.gitignore&lt;/tt&gt; file to ignore the various &lt;tt&gt;tidy/*/.svn&lt;/tt&gt; directories, and I added set the &lt;tt&gt;svn:ignore&lt;/tt&gt; property on&lt;tt&gt; tidy/&lt;/tt&gt; to ignore the &lt;tt&gt;tidy/.git&lt;/tt&gt; directory&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;With this setup, I can now more easily maintain the code for both my Rails application and the Tidy plugin.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-6642140278241224386?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aFtPOtKNM32F6L9yAjcFqkRJskA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aFtPOtKNM32F6L9yAjcFqkRJskA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aFtPOtKNM32F6L9yAjcFqkRJskA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aFtPOtKNM32F6L9yAjcFqkRJskA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/S4CvXgFar5A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/6642140278241224386/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=6642140278241224386" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6642140278241224386?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6642140278241224386?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/S4CvXgFar5A/peaceful-co-existence-between.html" title="Peaceful Co-Existence Between Subversion and Git" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/10/peaceful-co-existence-between.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8MQn4_cSp7ImA9WxNVGU4.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-4304110174830064768</id><published>2009-10-30T08:36:00.000-07:00</published><updated>2009-10-30T14:41:23.049-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-30T14:41:23.049-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="software development" /><category scheme="http://www.blogger.com/atom/ns#" term="miscellaneous" /><category scheme="http://www.blogger.com/atom/ns#" term="github" /><title>Github.com Has Uptime Issues?</title><content type="html">Since I've started to use it frequently within the last month or so, I have noticed several times where &lt;a href="http://github.com"&gt;github.com&lt;/a&gt; either responds very slowly or is outright unavailable.  Even as I am typing this, my repeated attempts to load github.com in another Safari tab just failed with another server error.&lt;br /&gt;&lt;br /&gt;Has anyone else noticed this, or is it just me?&lt;br /&gt;&lt;br /&gt;Update: Looks like they are having &lt;a href="http://twitter.com/github"&gt;issues&lt;/a&gt; with their backend...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-4304110174830064768?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/i7w6veU22Mr439956KyrVrDr5TU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i7w6veU22Mr439956KyrVrDr5TU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/i7w6veU22Mr439956KyrVrDr5TU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i7w6veU22Mr439956KyrVrDr5TU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/vJrGCjXi1Hk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/4304110174830064768/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=4304110174830064768" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4304110174830064768?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4304110174830064768?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/vJrGCjXi1Hk/githubcom-has-uptime-issues.html" title="Github.com Has Uptime Issues?" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/10/githubcom-has-uptime-issues.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIARH49eip7ImA9WxNVGE4.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-633907381830585127</id><published>2009-10-29T10:10:00.001-07:00</published><updated>2009-10-29T10:15:45.062-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-29T10:15:45.062-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="plugin" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><title>Tidy Plugin Updated for Rails 2.3.4</title><content type="html">Turns out my Tidy plugin doesn't work with Rails 2.3.4.  I discovered this when I upgraded one of my apps from Rails 2.2.2 to the latest version.  A quick debug session revealed and fixed the problem.&lt;br /&gt;&lt;br /&gt;However, the change means it will no longer work with Rails 2.2.2.&lt;br /&gt;&lt;br /&gt;Check it out &lt;a href="http://github.com/bitaxis/tidy"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-633907381830585127?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aJzAXubACyECwIDnBVyYe-Ywh0I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aJzAXubACyECwIDnBVyYe-Ywh0I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aJzAXubACyECwIDnBVyYe-Ywh0I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aJzAXubACyECwIDnBVyYe-Ywh0I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/MWEySyI6HRg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/633907381830585127/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=633907381830585127" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/633907381830585127?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/633907381830585127?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/MWEySyI6HRg/tidy-plugin-updated-for-rails-234.html" title="Tidy Plugin Updated for Rails 2.3.4" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/10/tidy-plugin-updated-for-rails-234.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkICSXw4fCp7ImA9WxNVGU4.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-3333268918470787535</id><published>2009-10-19T09:51:00.000-07:00</published><updated>2009-10-30T14:36:08.234-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-30T14:36:08.234-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="plugin" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><title>Announcement: Tidy Plugin for Rails</title><content type="html">I finally put some effort and re-factored my &lt;tt&gt;tidy_javascripts&lt;/tt&gt; and &lt;tt&gt;tidy_stylsheets&lt;/tt&gt; helper methods into a Rails plugin to help me accomplish the following goals:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Ease of re-use across multiple projects&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Learn about &lt;a href="http://git-scm.com"&gt;git&lt;/a&gt; and &lt;a href="http://github.com"&gt;github.com&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Learn about authoring a Rails plugin&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Check out my &lt;a href="http://github.com/bitaxis/tidy"&gt;Tidy&lt;/a&gt; plugin and let me know what you think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-3333268918470787535?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yW4aznqsg2-7lutuWxVAhsBEfp4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yW4aznqsg2-7lutuWxVAhsBEfp4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yW4aznqsg2-7lutuWxVAhsBEfp4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yW4aznqsg2-7lutuWxVAhsBEfp4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/vaMA0yKZ1JQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/3333268918470787535/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=3333268918470787535" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/3333268918470787535?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/3333268918470787535?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/vaMA0yKZ1JQ/announcement-tidy-plugin-for-rails.html" title="Announcement: Tidy Plugin for Rails" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/10/announcement-tidy-plugin-for-rails.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4CQXc9eip7ImA9WxNWF00.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-1985562263698147704</id><published>2009-10-16T08:32:00.000-07:00</published><updated>2009-10-16T09:02:40.962-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-16T09:02:40.962-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="factory_girl" /><category scheme="http://www.blogger.com/atom/ns#" term="unit test" /><category scheme="http://www.blogger.com/atom/ns#" term="mocha" /><title>Unit Test: Take Two, with factory_girl + Mocha</title><content type="html">In my day job, I occasionally interface with a group of Java developers, who pride themselves in doing a darn good job of testing their own code.  We are talking about unit tests, functional tests, continuous integration tests, the whole shebang.&lt;br /&gt;&lt;br /&gt;I learnt about mocking from them (and was the target of many such jokes, e.g. "So, here to be mocked some more?"), and decided to try out some mocking frameworks for .NET, but am having time comprehending the role of mock objects in testing.  However, recently I was reading Recipe #55 in Advanced Rails Recipes, and was inspired.&lt;br /&gt;&lt;br /&gt;So when I took my reading to the web, largely driven/led by Google, I realized that mocha is another mocking framework that some prefer over flexmock.  I looked into it a bit, and decided that it is for me.&lt;br /&gt;&lt;br /&gt;Now, like many, I have come to dislike fixtures for complex test cases where multiple instances of multiple models are involved.  But I do believe that fixtures have a role.  The way I look at it, if you find that you set up the same data over and over again in your tests, maybe it's time to push them into fixtures.&lt;br /&gt;&lt;br /&gt;Anyhow, instead of using fixtures, I have been using ThoughtBot's factory_girl to create my test objects, and am loving it.&lt;br /&gt;&lt;br /&gt;Furthermore, someone challenged me to rip out all my test code and re-write them since they are woefully out-of-date and no longer pass.  But part of my failure to keep my test code fresh was due to frustration with fixtures.&lt;br /&gt;&lt;br /&gt;So now, armed with factory_girl and Mocha, I wiped my test slate clean (removed almost all my test code and fixtures), and am starting over.&lt;br /&gt;&lt;br /&gt;To start things off, I decided to do something akin to that recipe in the ARR book, like so:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;# test/unit/project_test.rb&lt;br /&gt;&lt;br /&gt;require 'test_helper'&lt;br /&gt;require 'mocha'&lt;br /&gt;&lt;br /&gt;class ProjectTest &lt; ActiveSupport::TestCase&lt;br /&gt;&lt;br /&gt;  test "create" do&lt;br /&gt;    p = Factory.build(:project)&lt;br /&gt;    assert p.valid?&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;  test "use mocha to simulate failure" do&lt;br /&gt;    p = Factory.build(:project)&lt;br /&gt;    p.expects(:valid?).returns(false)&lt;br /&gt;    assert p.invalid?&lt;br /&gt;  end&lt;br /&gt;&lt;br /&gt;end&lt;/pre&gt;&lt;/blockquote&gt;Now let's run it:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;% rake test:units&lt;br /&gt;----- &amp;lt;snipped&amp;gt; -----&lt;br /&gt;Started&lt;br /&gt;........................&lt;br /&gt;Finished in 0.179492 seconds.&lt;br /&gt;&lt;br /&gt;24 tests, 41 assertions, 0 failures, 0 errors&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;Nice!  Of course I am not yet certain how mocking applies to unit tests, but I will forge ahead and see how things go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-1985562263698147704?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/B-BIt-QWUNVFMbc3sxpSOTc2-w4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B-BIt-QWUNVFMbc3sxpSOTc2-w4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/B-BIt-QWUNVFMbc3sxpSOTc2-w4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/B-BIt-QWUNVFMbc3sxpSOTc2-w4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/zhhMcHsfH40" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/1985562263698147704/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=1985562263698147704" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1985562263698147704?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1985562263698147704?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/zhhMcHsfH40/test-code-take-two-factorygirl-mocha.html" title="Unit Test: Take Two, with factory_girl + Mocha" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/10/test-code-take-two-factorygirl-mocha.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAHQXszfyp7ImA9WxNVGU4.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-5512494236180680337</id><published>2009-08-11T12:33:00.000-07:00</published><updated>2009-10-30T14:38:50.587-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-30T14:38:50.587-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="book" /><title>Learning Ruby and Rails</title><content type="html">I get occasional messages via &lt;a href="http://meebo.com"&gt;meebo&lt;/a&gt; (which I love) from folks who have stumbled across this blog, most of them are Ruby and/or Rails related.&lt;br /&gt;&lt;br /&gt;Recently a message came in about learning Ruby, and by extension, I am assuming Ruby on Rails.&lt;br /&gt;&lt;br /&gt;Here's the route I took:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;The &lt;a href="http://pragprog.com/titles/ruby/programming-ruby"&gt;Pick-axe book&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition"&gt;Agile Web Development with Rails&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;After that, it comes down to lots and lots of practice, all 10,000 hours worth (if you are a fan of &lt;a href="http://en.wikipedia.org/wiki/Outliers_%28book%29"&gt;Outliers&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;For completeness sake, though, I've also read at least portions of the following books that are Rails related:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://pragprog.com/titles/fr_arr/advanced-rails-recipes"&gt;Advanced Rails Recipes&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/Flexible-Rails-Flex-Peter-Armstrong/dp/1933988509/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1250023404&amp;sr=1-1"&gt;Flexible Rails: Flex 3 on Rails 2&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/Rails-Way-Addison-Wesley-Professional-Ruby/dp/0321445619/ref=sr_1_1?ie=UTF8&amp;qid=1250023348&amp;sr=8-1"&gt;The Rails Way&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-5512494236180680337?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r6cmqIdIfg1xTQQE1tSiiUB7qhs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r6cmqIdIfg1xTQQE1tSiiUB7qhs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r6cmqIdIfg1xTQQE1tSiiUB7qhs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r6cmqIdIfg1xTQQE1tSiiUB7qhs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/khzj2nzfviQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/5512494236180680337/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=5512494236180680337" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/5512494236180680337?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/5512494236180680337?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/khzj2nzfviQ/learning-ruby-and-rails.html" title="Learning Ruby and Rails" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/08/learning-ruby-and-rails.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EGSX05eSp7ImA9WxJWEks.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-62644840998523247</id><published>2009-06-17T11:49:00.001-07:00</published><updated>2009-06-17T12:07:08.321-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-17T12:07:08.321-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="macports" /><category scheme="http://www.blogger.com/atom/ns#" term="miscellaneous" /><title>The unfurl Script</title><content type="html">I am ashamed to say that I recently fell &lt;i&gt;victim&lt;/i&gt; to a &lt;a href="http://en.wikipedia.org/wiki/Rickroll"&gt;rickrolling&lt;/a&gt; prank, because the not-so-innocent URL was given to me by someone I know.&lt;br /&gt;&lt;br /&gt;Then I came across the &lt;a href="http://gumbynet.org.uk/software/furl.html"&gt;furl&lt;/a&gt; utility (easily installed on my systems using &lt;a href="http://macports.org/"&gt;MacPorts&lt;/a&gt;), which gave me an idea.&lt;br /&gt;&lt;br /&gt;From now on, when I see another such URL, I will just run a simple &lt;tt&gt;unfurl&lt;/tt&gt; script to unroll it.  The script simply does the following:&lt;br /&gt;&lt;pre&gt;    furl http://tinyurl.com/n2o29e \&lt;br /&gt;      | grep -e "^Location"&lt;/pre&gt;There!  Short and sweet.&lt;br /&gt;&lt;br /&gt;Now if someone can come up with a system utility, iChat or browser plug-in that can unroll the URL for me, or perhaps if such a thing already exists, please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-62644840998523247?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/EdKkfiA-UP0smUjD25bw-AgHx3Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EdKkfiA-UP0smUjD25bw-AgHx3Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/EdKkfiA-UP0smUjD25bw-AgHx3Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EdKkfiA-UP0smUjD25bw-AgHx3Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/KcIe2hynGT4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/62644840998523247/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=62644840998523247" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/62644840998523247?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/62644840998523247?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/KcIe2hynGT4/unfurl-script.html" title="The &lt;tt&gt;unfurl&lt;/tt&gt; Script" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/06/unfurl-script.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcBQH4-cSp7ImA9WxJXEk8.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-1295960575528310377</id><published>2009-06-05T09:41:00.001-07:00</published><updated>2009-06-05T10:30:51.059-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-05T10:30:51.059-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freeciv" /><title>Freeciv Packaging Troubles</title><content type="html">I have been having increasing issues in maintaining my Freeciv package.&lt;br /&gt;&lt;br /&gt;Recently, when I upgraded my MacPorts installation along with all my ports (which I have neglected to do so for 12+ months), things have changed sufficiently to have broken my current process, beyond my ability to rectify.&lt;br /&gt;&lt;br /&gt;This means until I figure out a way, there will not be any forthcoming Freeciv packages from me.&lt;br /&gt;&lt;br /&gt;In the meantime, for those of you who have wrote me indicating interest in compiling Freeciv for yourselves, the easiest way to get going would be to install it using &lt;a href="http://macports.org/"&gt; MacPorts &lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Good luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-1295960575528310377?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lxt0-TYsai62kAMM3UAkS1PYcZ4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lxt0-TYsai62kAMM3UAkS1PYcZ4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/lxt0-TYsai62kAMM3UAkS1PYcZ4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lxt0-TYsai62kAMM3UAkS1PYcZ4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/1QFXTUFoJGg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/1295960575528310377/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=1295960575528310377" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1295960575528310377?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1295960575528310377?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/1QFXTUFoJGg/freeciv-packaging-troubles.html" title="Freeciv Packaging Troubles" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2009/06/freeciv-packaging-troubles.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUDRno4fyp7ImA9WxRaE0g.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-1128132501384895375</id><published>2008-12-15T07:46:00.000-08:00</published><updated>2008-12-15T07:51:17.437-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-15T07:51:17.437-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mac os x" /><category scheme="http://www.blogger.com/atom/ns#" term="shell script" /><category scheme="http://www.blogger.com/atom/ns#" term="terminal" /><title>Faster New Terminal Tab/Window Scripts</title><content type="html">Reader Eric Allen &lt;a href="http://the-banana-peel.saltybanana.com/2008/02/new-terminal-tab-in-current-directory.html"&gt;commented&lt;/a&gt; on a &lt;a href="http://gist.github.com/35556"&gt;shell script&lt;/a&gt; he's written to create new terminal tabs in Leopard faster.  Very cool.&lt;br /&gt;&lt;br /&gt;Thanks, Eric!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-1128132501384895375?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rdMnG0f29KxAMqo-b-cuYCcSu1M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rdMnG0f29KxAMqo-b-cuYCcSu1M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rdMnG0f29KxAMqo-b-cuYCcSu1M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rdMnG0f29KxAMqo-b-cuYCcSu1M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/ZhBTGeeRZfg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/1128132501384895375/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=1128132501384895375" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1128132501384895375?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1128132501384895375?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/ZhBTGeeRZfg/faster-new-terminal-tabwindow-scripts.html" title="Faster New Terminal Tab/Window Scripts" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/12/faster-new-terminal-tabwindow-scripts.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8ASXwyfCp7ImA9WxRbFEQ.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-4495202729403755934</id><published>2008-12-05T08:34:00.000-08:00</published><updated>2008-12-05T09:24:08.294-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-05T09:24:08.294-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mod_rails" /><category scheme="http://www.blogger.com/atom/ns#" term="macports" /><category scheme="http://www.blogger.com/atom/ns#" term="mac os x" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="passenger" /><category scheme="http://www.blogger.com/atom/ns#" term="apache" /><title>Passenger Rocks!</title><content type="html">I am referring to, of course, to &lt;a href="http://www.modrails.com/"&gt;Phusion Passenger&lt;/a&gt;, a.k.a. mod_rails.&lt;br /&gt;&lt;br /&gt;Prior to using Passenger, I had been serving up a Rails web application I've been working on using mongrel.  However, I am anticipating more people hitting it (compared to just me and one other person), so I thought it's time to move up to something more robust.&lt;br /&gt;&lt;br /&gt;The server platform I am using is the latest version of Tiger (client edition).  I already have &lt;a href="http://macports.org/"&gt;MacPorts&lt;/a&gt; installed in order to get Ruby and Rails.  So, after installing Apache 2 using the &lt;tt&gt;port&lt;/tt&gt; command, I simply followed the instructions on Passenger's web site and installed the passenger gem and the Apache module, and was serving up my application via a sub-URI in very little time.  This is significant because I am not very versed in Apache configuration!&lt;br /&gt;&lt;br /&gt;One suggestion.  If you are using Tiger, don't bother following the link from the Passenger documentation to some guy's blog about setting up Passenger for Leopard.  Just stick to the official docs.&lt;br /&gt;&lt;br /&gt;As for performance relative to mongrel, it remains to be seen when the app is under some load.  But when I first practiced this on an ancient 400MHz G4 running Tiger, I noticed a 2x jump in performance.  That is, Apache2+Passenger with one user hitting the server is able to serve up pages twice as fast as a single instance of mongrel (using the &lt;tt&gt;-d -e production&lt;/tt&gt; flags) with only one user.  The same can't be said of the actual deployment machine, both serving methods yielded similar times for the one-user test.&lt;br /&gt;&lt;br /&gt;Furthermore, after I figured out the deployment steps, I wrote a simple Python script to automate it.  Yes, I know I can use capistrano.  But my deployment scenario is to simple right now that I simply don't need it.&lt;br /&gt;&lt;br /&gt;One note on deployment.  After you execute &lt;tt&gt;sudo apachectl start&lt;/tt&gt; (or &lt;tt&gt;restart&lt;/tt&gt;), it takes a long time to load the first page.  That's probably when Apache is loading stuff into memory.  After, it's all good.  So I added a &lt;tt&gt;curl&lt;/tt&gt; command as the last step to my deployment script to kick-start things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-4495202729403755934?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/10Eg3YN9wi0SgfmSHCZCGSUDuX8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/10Eg3YN9wi0SgfmSHCZCGSUDuX8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/10Eg3YN9wi0SgfmSHCZCGSUDuX8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/10Eg3YN9wi0SgfmSHCZCGSUDuX8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/Tqg0iHul-Wk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/4495202729403755934/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=4495202729403755934" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4495202729403755934?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/4495202729403755934?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/Tqg0iHul-Wk/passenger-rocks.html" title="Passenger Rocks!" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/12/passenger-rocks.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8NRXg_fCp7ImA9WxRTGUw.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-5427409737225057044</id><published>2008-09-07T23:07:00.000-07:00</published><updated>2008-09-08T16:01:34.644-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-08T16:01:34.644-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="freeciv" /><title>Freeciv 2.1.6</title><content type="html">I built my package of &lt;a href="http://freeciv.org/"&gt;Freeciv 2.1.6&lt;/a&gt; for Mac OS X for those who are interested.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-5427409737225057044?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VvNHATnT9bwKEM-8nx_SiZoVRZI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VvNHATnT9bwKEM-8nx_SiZoVRZI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VvNHATnT9bwKEM-8nx_SiZoVRZI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VvNHATnT9bwKEM-8nx_SiZoVRZI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/V9Zm11Khz78" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/5427409737225057044/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=5427409737225057044" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/5427409737225057044?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/5427409737225057044?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/V9Zm11Khz78/freeciv-216.html" title="Freeciv 2.1.6" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/09/freeciv-216.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMCQnc8eSp7ImA9WxdaFEs.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-6341407993994582367</id><published>2008-08-22T10:57:00.000-07:00</published><updated>2008-08-22T20:34:23.971-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-22T20:34:23.971-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><category scheme="http://www.blogger.com/atom/ns#" term="prototype" /><title>Tidy Javascripts</title><content type="html">So I have been reading the &lt;a href="http://pragprog.com/titles/fr_arr/advanced-rails-recipes"&gt;Advanced Rails Recipes&lt;/a&gt; book by Mike Clark.  Pretty good book.&lt;br /&gt;&lt;br /&gt;Recipe 19, Decouple JavaScript with Low Pro, uses &lt;a href="http://www.danwebb.net/"&gt;Dan Webb&lt;/a&gt;'s Low Pro Javascript library to pluck the behavior-oriented Javascripts out of the mark-up code and tuck them away into its own section or file.  We are basically talking about onxxx events.  Neat!&lt;br /&gt;&lt;br /&gt;However, the example in the recipe puts the behavior Javascript code in public/javascripts/application.js.  This is fine for globally applicable stuff.  What about code that is applicable only to views of a specific controller or just a single view?&lt;br /&gt;&lt;br /&gt;Taking a cue for my &lt;a href="http://the-banana-peel.saltybanana.com/2008/06/tidy-stylesheets-take-two.html"&gt;Tidy Stylesheets&lt;/a&gt; post, I came up with the following:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;application_helper.rb&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;  def tidy_javascripts&lt;br /&gt;    @javascripts ||= []&lt;br /&gt;    ["application", "#{controller.controller_path}/_controller", "#{controller.controller_path}/#{controller.action_name}"].each do |javascript|&lt;br /&gt;      @javascripts &lt;&lt; javascript if File.exists? "#{Dir.pwd}/public/javascripts/#{javascript}.js"&lt;br /&gt;    end&lt;br /&gt;    @javascripts&lt;br /&gt;  end&lt;/pre&gt;Then, in my layouts, I just do this:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;some_layout.html.erb&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;%= javascript_include_tag "prototype" %&amp;gt;&lt;br /&gt;&amp;lt;%= javascript_include_tag "effects" %&amp;gt;&lt;br /&gt;&amp;lt;%= javascript_include_tag "lowpro" %&amp;gt;&lt;br /&gt;&amp;lt;%= javascript_include_tag tidy_javascripts %&amp;gt;&lt;/pre&gt;If you are interested in Low Pro, you can download it from Dan's web site.  It's a bit hard to get to, but I think the latest is &lt;a href="http://svn.danwebb.net/external/lowpro/tags/rel_0.5/dist/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Oh, and for &lt;a href="http://jquery.com"&gt;jQuery&lt;/a&gt; fans (I am torn between it and &lt;a href="http://prototypejs.org"&gt;Prototype&lt;/a&gt;), there is a &lt;a href="http://github.com/danwrong/low-pro-for-jquery/tree/master"&gt;port&lt;/a&gt; of Low Pro for jQuery.  You can read about &lt;a href="http://www.danwebb.net/2008/2/3/how-to-use-low-pro-for-jquery"&gt;how to use it&lt;/a&gt;, too.&lt;br /&gt;&lt;br /&gt;What do you think?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-6341407993994582367?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LQf4t2MzTAfvk0jpkVAQDJkaUb0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LQf4t2MzTAfvk0jpkVAQDJkaUb0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LQf4t2MzTAfvk0jpkVAQDJkaUb0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LQf4t2MzTAfvk0jpkVAQDJkaUb0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/xSRzWwuAjs0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/6341407993994582367/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=6341407993994582367" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6341407993994582367?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6341407993994582367?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/xSRzWwuAjs0/tidy-javascripts.html" title="Tidy Javascripts" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/08/tidy-javascripts.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8ARXo5cCp7ImA9WxdaFE8.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-3720959902090020922</id><published>2008-08-22T10:52:00.000-07:00</published><updated>2008-08-22T10:57:24.428-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-22T10:57:24.428-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="miscellaneous" /><title>Busy, Busy, Busy...</title><content type="html">Haven't added an entry in ... wow, over two months.&lt;br /&gt;&lt;br /&gt;What happened, you might ask.  Well, among others, I have been busying myself with two things:  Ruby on Rails (of course) and &lt;a href="http://oberin.com"&gt;Oberin&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-3720959902090020922?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/wRNx6S0YRj2BoXmVFY3lmBgxdPo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wRNx6S0YRj2BoXmVFY3lmBgxdPo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/wRNx6S0YRj2BoXmVFY3lmBgxdPo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/wRNx6S0YRj2BoXmVFY3lmBgxdPo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/t6AxD4HRpZU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/3720959902090020922/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=3720959902090020922" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/3720959902090020922?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/3720959902090020922?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/t6AxD4HRpZU/busy-busy-busy.html" title="Busy, Busy, Busy..." /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/08/busy-busy-busy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08ER38yfip7ImA9WxdQFUg.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-8459650045361023640</id><published>2008-06-15T10:26:00.001-07:00</published><updated>2008-06-15T10:43:26.196-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-15T10:43:26.196-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="software development" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><title>Tidy Stylesheets, Take Two</title><content type="html">Back in February I &lt;a href="http://the-banana-peel.saltybanana.com/2008/02/tidy-stylesheets-in-rails.html"&gt;wrote&lt;/a&gt; about a nifty way to have fine-grained control over styles in Rails.&lt;br /&gt;&lt;br /&gt;As I was looking at it again, I realized something:  The way it was implemented (and the way I adopted it) violates the &lt;em&gt;separation of concerns&lt;/em&gt; principle.&lt;br /&gt;&lt;br /&gt;That implementation called for a filter in the ApplicationController base class to scan and collect an array of stylesheet file paths in an instance variable.  Then the layout used will pull in stylesheets from the said collection.&lt;br /&gt;&lt;br /&gt;With that realization, I came up with an alternate approach that moves the code to collect stylesheets into the ApplicationHelper module.&lt;br /&gt;&lt;br /&gt;Now, the concern of styles rest squarely with views, and controllers know nothing of them.  A clean separation!&lt;br /&gt;&lt;br /&gt;Another subtle difference here is that the original version collected the stylesheets whether they are pulled in by the layout or not.  The new implementation will collect stylesheets only if the layout decides to use them.&lt;br /&gt;&lt;br /&gt;The relevant code snippets are as follows:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ApplicationHelper.rb&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;  def get_stylesheets&lt;br /&gt;    stylesheets = [] unless stylesheets&lt;br /&gt;    ["#{controller.controller_path}/_controller",&lt;br /&gt;    "#{controller.controller_path}/#{controller.action_name}"].each do |ss|&lt;br /&gt;      stylesheets &lt;&lt; ss if File.exists? "#{Dir.pwd}/public/stylesheets/#{ss}.css"&lt;br /&gt;    end&lt;br /&gt;    stylesheets&lt;br /&gt;  end&lt;/pre&gt;&lt;b&gt;some_layout.html.erb&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;  &amp;lt;%= stylesheet_link_tag(*get_stylesheets) %&amp;gt;&lt;/pre&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-8459650045361023640?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rdvoL3IWU8n-Sdh0Qa3sMSCuTnI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rdvoL3IWU8n-Sdh0Qa3sMSCuTnI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rdvoL3IWU8n-Sdh0Qa3sMSCuTnI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rdvoL3IWU8n-Sdh0Qa3sMSCuTnI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/v6DGPzWPwdE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/8459650045361023640/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=8459650045361023640" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/8459650045361023640?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/8459650045361023640?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/v6DGPzWPwdE/tidy-stylesheets-take-two.html" title="Tidy Stylesheets, Take Two" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/06/tidy-stylesheets-take-two.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIMRHYyeCp7ImA9WxdQE0U.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-6817266892430728268</id><published>2008-06-13T11:12:00.000-07:00</published><updated>2008-06-13T11:43:05.890-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-13T11:43:05.890-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="software development" /><category scheme="http://www.blogger.com/atom/ns#" term="miscellaneous" /><title>Offline Translates Into Higher Productivity</title><content type="html">I have been doing some work from home.&lt;br /&gt;&lt;br /&gt;On one such day, my Internet access was down.  Troubleshooting with the provider was no help.  It will be 24 hours before they can send out a technician.&lt;br /&gt;&lt;br /&gt;This means no E-mail, no web, no IM, not even telephone, since I am with &lt;a href="http://vonage.com"&gt;Vonage&lt;/a&gt;.  My means of connectivity with the outside world boiled down to a cell phone.  Sure, I can walk/drive and go somewhere.  But I am supposed to be working.&lt;br /&gt;&lt;br /&gt;Great.  What to do?&lt;br /&gt;&lt;br /&gt;I had been meaning to write better tests for a Rails application.  You know?  The whole test-driven thing.  But, that's like boring work.  I mean, it is a lot more interesting to whip together a mash-up using any number of Web 2.0 APIs, reading reviews about them online, browsing through documentation and cool demos.  These work great, assuming you are connected to the Internet.  Which I wasn't.  Oh well.  Writing tests it is.&lt;br /&gt;&lt;br /&gt;A couple of hours went by. I was done with a good suite of unit tests and a basic suite of functional tests.  While everything seemed okay with my unit tests, the functional test uncovered a couple of bugs.  And I think I uncovered a flaw/weakness in Rails 2.1's fixtures.&lt;br /&gt;&lt;br /&gt;Wait a minute.  I had been struggling to get this stuff done for a few days now.  I would start, then move on to something else.  Come back.  Stare at the code and not being too productive, think of something else I need to do, and hop on that one.&lt;br /&gt;&lt;br /&gt;But now, a couple of hours without Internet access, and it is done!  All right, time to move on to integration tests.  I reached over and picked up the &lt;a href="http://pragprog.com/titles/rails2/agile-web-development-with-rails"&gt;AWDR book&lt;/a&gt; to refresh my memory about them.&lt;br /&gt;&lt;br /&gt;In doing so, I glanced at my modem.  The &lt;em&gt;online&lt;/em&gt; light is solid.  I quickly &lt;b&gt;Cmd-Tab&lt;/b&gt;'d over to Mail and clicked &lt;b&gt;Get new mail&lt;/b&gt;.  It works.  Woohoo!  I am back online.&lt;br /&gt;&lt;br /&gt;It hit me.  I had been rather productive while I was offline.  Sure, I moped at first, wondering what to do.  Then I called customer support.  Then I moped some more.  But then, I got to work, and was productive.  I focused well, by default, because there was nothing else to do.&lt;br /&gt;&lt;br /&gt;Boy, gotta tell someone about this.  Are my friends on IM?  Let me go online and look!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-6817266892430728268?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/EYGqaVCYhOGlF039GmMQTWSI7w8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EYGqaVCYhOGlF039GmMQTWSI7w8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/EYGqaVCYhOGlF039GmMQTWSI7w8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/EYGqaVCYhOGlF039GmMQTWSI7w8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/LluMf9biPqY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/6817266892430728268/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=6817266892430728268" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6817266892430728268?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6817266892430728268?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/LluMf9biPqY/offline-translates-into-higher.html" title="Offline Translates Into Higher Productivity" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/06/offline-translates-into-higher.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ABRnY7eip7ImA9WxdRFkU.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-6010467444177960395</id><published>2008-06-03T14:07:00.000-07:00</published><updated>2008-06-05T11:15:57.802-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-05T11:15:57.802-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sql" /><category scheme="http://www.blogger.com/atom/ns#" term="macports" /><category scheme="http://www.blogger.com/atom/ns#" term="software development" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><title>Connect to Microsoft SQL Server from Rails ActiveRecord -- a Moving Target?</title><content type="html">Some time ago, I approached my boss regarding doing some internal R&amp;D work using Ruby on Rails.  I gave a demo.&lt;br /&gt;&lt;br /&gt;It was received well, except when he found out that the preferred deployment system for Rails applications is not Windows, and that the preferred database backend is not Microsoft's SQL Server.&lt;br /&gt;&lt;br /&gt;He recommended that I look into at least getting Rails (ActiveRecord, specifically) to talk to Microsoft SQL Server.  I said that I would, but inside I cringed.  From the research I had done then, it was clear to me that Microsoft SQL Server support was not considered a first-class citizen within portions of the Rails community.&lt;br /&gt;&lt;br /&gt;Some other stuff came along, and the whole thing got derailed (no pun intended).&lt;br /&gt;&lt;br /&gt;Fast forward to May (last Thursday/Friday to be exact), and I find myself returning to the topic of getting ActiveRecord to talk to Microsoft SQL Server.  I found that the Wiki entry titled "&lt;a href="http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServer"&gt;HowtoConnectToMicrosoftSQLServer&lt;/a&gt;" had been updated for Rails 2.x.  Nice.&lt;br /&gt;&lt;br /&gt;So I followed the instructions and got FreeTDS 0.82 installed on my Mac via MacPorts.  I even found instructions on how to get Mac OS X's ODBC Administrator to talk to FreeTDS, as well as installed the activerecord-sqlserver-adapter gem.  When I wrapped up my work week, all that was left undone was to manually install the lib/dbd/ADO.rb file from the Ruby-DBI project.&lt;br /&gt;&lt;br /&gt;Today, I found out that Rails 2.1 had been released over the weekend, containing some cool &lt;a href="http://weblog.rubyonrails.org/2008/6/1/rails-2-1-time-zones-dirty-caching-gem-dependencies-caching-etc"&gt;enhancements&lt;/a&gt;.  But, to my dismay, the activerecord-sqlserver-adapter gem has disappeared from &lt;a href="http://gems.rubyonrails.org"&gt;http://gems.rubyonrails.org&lt;/a&gt;.  Hmm...&lt;br /&gt;&lt;br /&gt;A bit more sleuthing revealed to me the existence of &lt;a href="http://odbc-rails.rubyforge.org/"&gt;activerecord-odbc-adapter&lt;/a&gt; gem, which offers support for SQL Server.  I guess I will have to shift gears and pursue it from this angle.  Instead of FreeTDS, I will need to install the rb-odbc port.  Thank goodness for MacPorts!&lt;br /&gt;&lt;br /&gt;So, as of Rails 2.1, SQL Server connectivity is still second-class, and this exercise has been frustrating.&lt;br /&gt;&lt;br /&gt;Is it supposed to be this hard?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-6010467444177960395?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/S7yLCZ8xRcog-NExBvLbQ8_Yt9k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/S7yLCZ8xRcog-NExBvLbQ8_Yt9k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/S7yLCZ8xRcog-NExBvLbQ8_Yt9k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/S7yLCZ8xRcog-NExBvLbQ8_Yt9k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/P2QnaI24PhY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/6010467444177960395/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=6010467444177960395" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6010467444177960395?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/6010467444177960395?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/P2QnaI24PhY/connecto-to-microsoft-sql-server-from.html" title="Connect to Microsoft SQL Server from Rails ActiveRecord -- a Moving Target?" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/06/connecto-to-microsoft-sql-server-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMEQXcyfSp7ImA9WxZaFEw.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-3288652722729348246</id><published>2008-04-28T12:13:00.000-07:00</published><updated>2008-04-28T12:20:00.995-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-28T12:20:00.995-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="flex" /><category scheme="http://www.blogger.com/atom/ns#" term="software development" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><title>NetBeans 6.1 + Flex Builder 3</title><content type="html">As I am going through Peter Armstrong's book, my current development environment of choice is using NetBeans to edit Rails code and Flex Builder to edit my Flex/ActionScript code.&lt;br /&gt;&lt;br /&gt;Even though it means I need to Alt-Tab to switch back and forth between the two depending on which kind of code I am editing, I kind of like the separation of concerns.  That is, one application for Rails and the other for Flex/ActionScript.  I haven't seen any need to intermingle the two yet.&lt;br /&gt;&lt;br /&gt;I was using the RC1 version of NetBeans 6.1, but now looks like 6.1 was official released recently.&lt;br /&gt;&lt;br /&gt;Cool stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-3288652722729348246?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Kgj_cks1DQvz-zbq_2P30DQxtqk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kgj_cks1DQvz-zbq_2P30DQxtqk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Kgj_cks1DQvz-zbq_2P30DQxtqk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Kgj_cks1DQvz-zbq_2P30DQxtqk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/hwmAG1ZbrK0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/3288652722729348246/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=3288652722729348246" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/3288652722729348246?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/3288652722729348246?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/hwmAG1ZbrK0/netbeans-61-flex-builder-3.html" title="NetBeans 6.1 + Flex Builder 3" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/04/netbeans-61-flex-builder-3.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4ESHs8eSp7ImA9WxZbGEw.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-162567721939299014</id><published>2008-04-21T15:18:00.000-07:00</published><updated>2008-04-21T16:01:49.571-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-21T16:01:49.571-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="software development" /><category scheme="http://www.blogger.com/atom/ns#" term="ruby on rails" /><title>Why Does This Work?</title><content type="html">So I am going through Peter Armstrong's &lt;a href="http://www.amazon.com/Flexible-Rails-Flex-2/dp/1933988509/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1208818273&amp;sr=8-1"&gt;Flexible Rails&lt;/a&gt; book.&lt;br /&gt;&lt;br /&gt;In Chapter 5, he talks about &lt;em&gt;fixing&lt;/em&gt; &lt;tt&gt;ActiveRecord&lt;/tt&gt;'s &lt;tt&gt;to_xml()&lt;/tt&gt; method.  I am a fan of Rails, but I am not a fan of the solution he chose in his book.  IMHO, it's kind of ugly and un-&lt;em&gt;DRY&lt;/em&gt;.  In other words, inelegant.&lt;br /&gt;&lt;br /&gt;My first attempt at a better solution is to write my own &lt;tt&gt;to_xml()&lt;/tt&gt; method, which is as follows:&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;def to_xml(options=nil, &amp;block)&lt;br /&gt;  super options == nil ? { :dasherize =&gt; false } : options.merge(:dasherize =&gt; false), &amp;block&lt;br /&gt;end&lt;/pre&gt;&lt;/tt&gt;I pasted the above into each of the four models defined in the Pomodo project Peter guides his readers through in the book, and it works, albeit un-&lt;em&gt;DRY&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;Then I did some reading on how I might override the built-in method at a single place, and came across this &lt;a href="http://toolmantim.com/article/2006/12/27/environments_and_the_rails_initialisation_process"&gt;article&lt;/a&gt;.  So I then removed the code from the model classes and placed the following at the very end of the &lt;em&gt;pomodo/config/environment.rb&lt;/em&gt; file:&lt;br /&gt;&lt;tt&gt;&lt;pre&gt;class ActiveRecord::Base&lt;br /&gt;  def to_xml(options=nil, &amp;block)&lt;br /&gt;    super options == nil ? { :dasherize =&gt; false } : options.merge(:dasherize =&gt; false), &amp;block&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;/tt&gt;To my surprise, it works, too.  It has fewer lines of code than both my first stab and Peter's solution, and it is very &lt;em&gt;DRY&lt;/em&gt;.  In other words, it is elegant.&lt;br /&gt;&lt;br /&gt;But now I am left with this question:  &lt;b&gt;&lt;em&gt;Why does this work?&lt;/em&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I am not as well-versed in Ruby/Rails.  Can someone help enlighten me?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-162567721939299014?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vt5qMYQpK8TXPVzGvXYTnI-U5t8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vt5qMYQpK8TXPVzGvXYTnI-U5t8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vt5qMYQpK8TXPVzGvXYTnI-U5t8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vt5qMYQpK8TXPVzGvXYTnI-U5t8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/xAVMEraqNKY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/162567721939299014/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=162567721939299014" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/162567721939299014?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/162567721939299014?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/xAVMEraqNKY/why-does-this-work.html" title="Why Does This Work?" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/04/why-does-this-work.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QFSHw5cSp7ImA9WxZbFUk.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-5776881623540217158</id><published>2008-04-18T11:39:00.000-07:00</published><updated>2008-04-18T12:01:59.229-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-18T12:01:59.229-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="miscellaneous" /><category scheme="http://www.blogger.com/atom/ns#" term="movie" /><title>300</title><content type="html">I just watched the movie "300" on DVD.&lt;br /&gt;&lt;br /&gt;I was ambiguous about watching it.  However, I was intrigued to watch it due to the high &lt;a href="http://imdb.com/title/tt0416449/"&gt;IMDb&lt;/a&gt; rating.&lt;br /&gt;&lt;br /&gt;I enjoyed watching it.&lt;br /&gt;&lt;br /&gt;When I first read about the movie, I was turned off because I kinda knew what the outcome would be already.  I am now glad I did watch it.&lt;br /&gt;&lt;br /&gt;In fact, I was so intrigued by the historical events that inspired the movie I went online to read more about them &lt;a href="http://en.wikipedia.org/wiki/Leonidas"&gt;here&lt;/a&gt;, &lt;a href="http://en.wikipedia.org/wiki/Battle_of_Thermopylae"&gt;here&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Battle_of_Plataea"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-5776881623540217158?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FWFB_cT7DYWlm__DIKy2k_bqE2k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FWFB_cT7DYWlm__DIKy2k_bqE2k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FWFB_cT7DYWlm__DIKy2k_bqE2k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FWFB_cT7DYWlm__DIKy2k_bqE2k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/WJ3TcMxbDMk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/5776881623540217158/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=5776881623540217158" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/5776881623540217158?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/5776881623540217158?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/WJ3TcMxbDMk/300.html" title="300" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/04/300.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04ASHo5fCp7ImA9WxZbFUk.&quot;"><id>tag:blogger.com,1999:blog-4172981932098931033.post-1229851847970738015</id><published>2008-04-17T11:53:00.001-07:00</published><updated>2008-04-18T12:12:29.424-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-18T12:12:29.424-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="macintosh" /><category scheme="http://www.blogger.com/atom/ns#" term="hardware" /><title>I Love My iMac's Screen</title><content type="html">For non-work computing, my 24" iMac is my main machine.  For work-related computing, I have a 20" HP 2035 LCD attached to my ThinkPad.&lt;br /&gt;&lt;br /&gt;I used to think the HP display is pretty good, until recently, when I have been spending an increased amount of time in front of my iMac.  The increased use of my iMac made me notice how dim and blurry the HP display is.  At first I thought it is a settings thing, so I tried to tweak with the physical controls and the software settings.  I also tried switching to a DVI connection to see if it helps.  But nope.  The iMac screen is just that much brighter and easier to read, even given Mac OS X's preference to render fonts such that they more closely resemble the actual look of the font over pixel-level sharpness (which is favored by Windows).  And this is when I have the iMac's screen set at the lowest brightness level available via the OS.&lt;br /&gt;&lt;br /&gt;This realization is now making me wanting to order a new LCD for work.  Does anyone know of a comparable display I can use for work?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4172981932098931033-1229851847970738015?l=the-banana-peel.saltybanana.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mDCGsRKHq7CjxGZKluqxtx2sfvc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mDCGsRKHq7CjxGZKluqxtx2sfvc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mDCGsRKHq7CjxGZKluqxtx2sfvc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mDCGsRKHq7CjxGZKluqxtx2sfvc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/TheBananaPeel/~4/Bfukjv4k_sE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://the-banana-peel.saltybanana.com/feeds/1229851847970738015/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=4172981932098931033&amp;postID=1229851847970738015" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1229851847970738015?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4172981932098931033/posts/default/1229851847970738015?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TheBananaPeel/~3/Bfukjv4k_sE/i-love-my-imacs-screen.html" title="I Love My iMac's Screen" /><author><name>saltybanana</name><uri>http://www.blogger.com/profile/02266260856342765794</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://the-banana-peel.saltybanana.com/2008/04/i-love-my-imacs-screen.html</feedburner:origLink></entry></feed>

