<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Don&#039;t Forget to Plant It!</title>
	<atom:link href="http://blog.codeeg.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codeeg.com</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 12:22:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Loading CouchDB Views from Source Files</title>
		<link>http://blog.codeeg.com/2010/07/28/loading-couchdb-views/</link>
		<comments>http://blog.codeeg.com/2010/07/28/loading-couchdb-views/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 12:22:47 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[node.JS]]></category>
		<category><![CDATA[Socialytics]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=292</guid>
		<description><![CDATA[I&#8217;ve been doing a lot work with CouchDB lately for Socialytics, and which means writing map/reduce functions in JavaScript for building views.  I was beginning to have a healthy set of views, it made sense to have this code in version control and be able to load these views to a CouchDB instance via the command [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve been doing a lot work with CouchDB lately for Socialytics, and which means writing map/reduce functions in JavaScript for building views.  I was beginning to have a healthy set of views, it made sense to have this code in version control and be able to load these views to a CouchDB instance via the command line.  Not finding anything like this on the interwebs, I decided to come with something on my own.</p>
<p>My first pass at it was a Ruby implementation, but was fragile since it found the map and reduce functions via regular expressions.  This past weekend I decided to give a go with a new implementation using <a href="http://nodejs.org">Node.js</a>.  Since I&#8217;m now using JavaScript, I no longer had to use regular expressions to sniff out the map/reduce functions &#8211; I can just load the scripts up as code.  Another additional benefit is that now the view code got parsed, so I find syntax errors before the are loaded to Couch.</p>
<p><a title="loader.js" href="http://gist.github.com/492124">Here&#8217;s the code</a>.  The script expects a <em>designs/</em> folder at the same level as the loader script, with a subfolder for each design document underneath.  A design folder should have a <em>.js</em> file for each view.  A view file looks like this:</p>
<pre class="brush: jscript;">
design.view = {
    map: function(doc) {
        emit(doc.created_at, null);
    },
    reduce: '_count'
};
</pre>
<p><a href="http://wiki.apache.org/couchdb/Document_Update_Handlers">CouchDB document update handlers</a> are supported as well by assigning a function to <strong>design.update</strong>.  Once your view files are ready, just run <strong>loader.js</strong> with the CouchDB database URL as the parameter:</p>
<pre>node db/couchdb/loader.js http://localhost:5984/myDatabase</pre>
<p>So what do you think?  Does something like this exist already?  Is there a better way to do this?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2010/07/28/loading-couchdb-views/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Rack::CORS</title>
		<link>http://blog.codeeg.com/2010/06/09/introducin-rack-cors/</link>
		<comments>http://blog.codeeg.com/2010/06/09/introducin-rack-cors/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 12:16:57 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ruby rack CORS cross-origin AJAX JavaScript]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=284</guid>
		<description><![CDATA[Recently, I&#8217;ve been working on an HTML5 project that needed to need to retrieve data from a different origin, and decided to look at using CORS. CORS, or Cross-Origin Resource Sharing is a specification that allows web applications to make AJAX calls cross-origin without resorting to workarounds such as JSONP. Searching around, I found an [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Recently, I&#8217;ve been working on an HTML5 project that needed to need to retrieve data from a different origin, and decided to look at using CORS.</p>
<p>CORS, or Cross-Origin Resource Sharing is a specification that allows web applications to make AJAX calls cross-origin without resorting to workarounds such as <a title="Wikipedia write up on JSONP" href="http://en.wikipedia.org/wiki/JSON#JSONP">JSONP</a>.</p>
<p>Searching around, I found an CORS extension for Sinatra, which happened to be the framework I was using.  However, the extension didn&#8217;t properly implement the spec, nor did it support CORS preflighting (required for more complex AJAX requests).  So I rolled my own, but as a Rack Middleware.  Here&#8217;s an example of a Rackup that shows it in action (this example uses <a title="Rack::CORS Rubygem" href="http://rubygems.org/gems/rack-cors">Rack::CORS</a> in Sinatra app, but should be able to use it in any Rack compatible framework):</p>
<pre class="brush: ruby;">
require 'sinatra'
require 'rack/cors'

use Rack::Cors do |config|
  config.allow do |allow|
    allow.origins '*'
    allow.resource '/file/list_all/', :headers =&gt; :any
    allow.resource '/file/at/*',
        :methods =&gt; [:get, :post, :put, :delete],
        :headers =&gt; :any,
        :max_age =&gt; 0
  end
end

get '/file/list_all/' do
  #...
end

get '/file/at/*' do
  #...
end</pre>
<p>To get going with Rack::CORS, just install the rack-cors Gem.  To check out the source, see <a href="http://github.com/cyu/rack-cors">the project on Github</a>.</p>
<p>If you want to learn more about CORS, here are some good links I found along the way:</p>
<ul>
<li>The <a title="Cross-Origin Resource Sharing Working Draft" href="http://www.w3.org/TR/access-control/">W3C Working Draft on CORS</a>, for good night time reading.</li>
<li>A <a title="Cross-domain Ajax with Cross-Origin Resource Sharing" href="http://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/">good article about CORS</a> that summarizes the CORS spec.</li>
<li>You can <a title="CORS Support Tests" href="http://rdfa.digitalbazaar.com/tests/cors/">check if your browsers support CORS here</a>.  This site records all pass/fails so you&#8217;ll be able to see a list of CORS supported (and not supported) browsers.</li>
<li>The <a title="Cross Origin Resource Sharing with Sinatra" href="http://britg.com/2009/12/29/cross-origin-resource-sharing-with-sinatra/">Sinatra CORS Extension</a> I found.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2010/06/09/introducin-rack-cors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Virtual Hosts on Mac OSX</title>
		<link>http://blog.codeeg.com/2010/03/26/setting-up-virtual-hosts-on-mac-osx/</link>
		<comments>http://blog.codeeg.com/2010/03/26/setting-up-virtual-hosts-on-mac-osx/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 03:50:32 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[Virtual Hosts]]></category>
		<category><![CDATA[VirtualHost]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=277</guid>
		<description><![CDATA[I&#8217;ve been juggling a few different web projects lately, and decided to setup different virtual hosts on my Mac so that I can easily work with them. Googling around gave me a lot of different answers, none of which seem to work completely. This is what finally worked for me (on Snow Leopard). First, add [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve been juggling a few different web projects lately, and decided to setup different virtual hosts on my Mac so that I can easily work with them.  Googling around gave me a lot of different answers, none of which seem to work completely.  This is what finally worked for me (on Snow Leopard).</p>
<p>First, add a new local domain to your <em>/etc/hosts</em> file:<br />
<code> </code></p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre>127.0.0.1       localhost devsite.local</pre>
<p></code></p>
<p>Next, you&#8217;ll need to configure Apache with this new virtual host.  Fortunately, the default Apache config has this partially setup.  Open up <em>/etc/apache2/httpd.conf</em> and uncomment the following Include:</p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre># Virtual hosts
#Include /private/etc/apache2/extra/httpd-vhosts.conf</pre>
<p></code></p>
<p>Now, we need to add our virtual host to the <em>httpd-vhosts.conf </em>file referenced above.  The file already had a couple of sample configuration in it, but I commented out those and added the following:</p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre>&lt;VirtualHost *:80&gt;
    DocumentRoot "/Library/WebServer/Documents"
    ServerName localhost
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
    DocumentRoot "/usr/docs/devsite.local"
    ServerName devsite.local
&lt;/VirtualHost&gt;</pre>
<p></code></p>
<p>This first entry will map localhost to its default document location (without it http://localhost won&#8217;t work correctly).  The second entry maps my new domain.  Additionally, you&#8217;ll want to make sure files in your new docs directory have adequate access permissions.  I ended adding a new Directory section to <em>httpd-vhosts.conf </em>file:</p>
<p><code> </code></p>
<p><code></p>
<pre>&lt;Directory "/usr/docs/devsite.local"&gt;
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;</pre>
<p></code></p>
<p>Now all you have to do is put your web files in <em>/usr/docs/devsite.local</em>.  I originally had my new local domain map to <em>&lt;user dir&gt;/Sites/devsite.local</em>, but changed it because I would have to make sure Apache could access to all the directories leading up to those docs. So instead I just symlinked my http docs from my user directory into <em>/usr/docs.</em></p>
<p><em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2010/03/26/setting-up-virtual-hosts-on-mac-osx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Native Gems with Custom Library Paths</title>
		<link>http://blog.codeeg.com/2009/09/06/installing-native-gems-with-custom-library-paths/</link>
		<comments>http://blog.codeeg.com/2009/09/06/installing-native-gems-with-custom-library-paths/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 04:43:31 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=271</guid>
		<description><![CDATA[A few weeks ago, I started using the Patron Gem for Skribit and ran into an issue on our CentOS production servers which uses a very old version of libcurl.  I got it working by compiling a new version of libcurl and building the Gem against those binaries.  Since I didn&#8217;t want to overwrite the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>A few weeks ago, I started using the <a href="http://github.com/toland/patron/tree/master">Patron</a> Gem for Skribit and ran into an issue on our CentOS production servers which uses a very old version of libcurl.  I got it working by compiling a new version of libcurl and building the Gem against those binaries.  Since I didn&#8217;t want to overwrite the libcurl that CentOS provided, I installed the binaries in another location instead, and updated the <strong>LD_LIBRARY_PATH</strong> environment variable so Rails could properly load the Gem.</p>
<p>A couple of days ago, <a href="http://paulstamatiou.com">Paul</a> brought to my attention that <a href="http://linuxmafia.com/faq/Admin/ld-lib-path.html">using LD_LIBRARY_PATH isn&#8217;t a good thing</a>.  While I didn&#8217;t necessarily think it was a big deal, it did peak my curiosity on how I would get this work without it.  Here&#8217;s the command I finally used to get it to work:</p>
<script src="http://gist.github.com/182153.js"></script>
<p>The key part is the <strong>&#8211;with-ldflags</strong> option at the very end.  The <strong>-Wl,-R&lt;path&gt;</strong> option adds the given path to the list of paths the linker will use to find libraries at runtime.  Hopefully, someone will find this information useful, since I couldn&#8217;t find this information myself on the &#8216;nets anywhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2009/09/06/installing-native-gems-with-custom-library-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching from Windows to Mac: A Retrospective</title>
		<link>http://blog.codeeg.com/2009/07/08/switching-from-windows-to-mac-a-retrospective/</link>
		<comments>http://blog.codeeg.com/2009/07/08/switching-from-windows-to-mac-a-retrospective/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 00:55:27 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MacBook Pro]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=232</guid>
		<description><![CDATA[Just recently done a 2 week stint working on Windows while Apple Geniuses were working on my MBP, I thought it would be a good time to blog on my own Skribit Suggestion and reflect on my switch to Mac 14 months ago. Reasons for Switching Prior to my MBP, I&#8217;ve was working on a [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://blog.codeeg.com/2009/07/08/switching-from-windows-to-mac-a-retrospective/" title="Permanent link to Switching from Windows to Mac: A Retrospective"><img class="post_image alignnone" src="http://blog.codeeg.com/wp-content/uploads/2009/06/DSC_0081-300x199.jpg" width="300" height="199" alt="Post image for Switching from Windows to Mac: A Retrospective" /></a>
</p><p>Just recently done a 2 week stint working on Windows while Apple Geniuses were working on my MBP, I thought it would be a good time to blog on <a title="My Skribit Suggestion" href="http://skribit.com/suggestions/switching-to-from-windows-to-mac">my own Skribit Suggestion</a> and reflect on my switch to Mac 14 months ago.</p>
<h2>Reasons for Switching</h2>
<p>Prior to my MBP, I&#8217;ve was working on a personal HP laptop that was on it&#8217;s last leg.  My screen had started developing an assortment of 1 pixel vertical lines and the keyboard would randomly doouble typed keys.  I had a choice to make &#8211; I can either get another (and better) Windows laptop, or do the the switch.  Ultimately, I decided on switching.  Here were my reasons.</p>
<h3>Apple made great <span style="text-decoration: line-through;">looking</span> laptops that looks good too</h3>
<p>Apple really makes some really good looking laptops, but it&#8217;s easy to forget that they they&#8217;re functionally great laptops too.  When my wife first got her MacBook, I was amazed at how everything looked so crisp on it.  And speaking as someone that has broken a power connector on a laptop before, MagSafe is a must-have awesome feature.</p>
<h3>A Unix based Operating System</h3>
<p>When you do development, working on a Unix based environment with a real command line is a big advantage.  Cygwin can help bridge that gap on Windows, but it&#8217;s nothing like having a terminal that can size itself properly and not having to constantly translate Windows paths to Unix paths and vice versa.</p>
<p>Another benefit of having a Unix OS is that Open Source software plays much better on it than on Windows.  Most OSS is developed to target Unix first, Windows second.  When working on Elf Island on Windows, my workflow while working on the game (which is developed primarily using OSS), involved starting two different services from Windows System Tray, starting another service from the Windows Services, and finally running a few commands from Cygwin.  I can do the equivalent of all that from the command line on a Unix environment.</p>
<h3>A Paid-For Software Friendly Ecosystem</h3>
<p>For some reason, it seems that Mac users are willing to pay for software, and as a result there is a lot of <a title="TextMate Editor" href="http://macromates.com/">reasonably price</a> <a title="Transmit" href="http://www.panic.com/transmit/">software</a> for Macs.  Doing software development myself, I can appreciate and definitely want to support this line of thinking.  Sure, Windows has tons of commercial, <a href="http://downloads.com">paid-for software</a>, but I can&#8217;t say I feel comfortable about downloading them for fear of excessive ads, poor installations practices, and/or spyware.</p>
<h3>Experiencing Something New</h3>
<p>Probably the biggest reason for doing the switch is that I&#8217;ve been using Windows for years.  It was time for a change - a change for changes&#8217; sake.  Programmers are told that they should regularly learn new languages to keep their skills sharp and to explore new ways of doing things.  It should be the same with the software you use as well.  If you develop software, you owe it to yourself to see how the other side does it to gain some perspective.</p>
<h3>Conclusions</h3>
<p>So after a year of working fully on the Mac, here&#8217;s are some things I like and don&#8217;t like about my OS X:</p>
<h4>Pros</h4>
<ul>
<li><strong>Windows Management.</strong> It took a while getting used to, but I have grown to prefer <strong>Command+Tab</strong> &amp; <strong>Command+`</strong> to Windows <strong>Alt+Tab</strong> model.</li>
<li><strong>OS Degradation.</strong> With my prior laptop, Windows had greatly degraded by it&#8217;s first anniversary.  I haven&#8217;t experience that with my MBP yet.</li>
<li><strong>Great TrackPad.</strong> When programming, I try to stay on the keyboard as much as possible, but I find that transitioning between the trackpad and keyboard on my MBP the easiest of any laptop I&#8217;ve used before.</li>
</ul>
<h4>Cons</h4>
<ul>
<li><strong>Keyboard Shortcut Images. </strong>For some strange reason keyboard shortcuts are still displayed using icons (<img style="border: 0px initial initial;" title="Apple Keys" src="http://blog.codeeg.com/wp-content/uploads/2009/06/mac_keys.png" alt="Apple Keys" width="47" height="11" />) that in some cases are no longer shown on the keyboard.  Trying to remember what icon is what key can feel like akin to decipher hieroglyphics.</li>
<li><strong>Alt Key Menu Access.</strong> I miss how the <strong>Alt </strong>key in Windows gave you keyboard access to the application menu.  I often used that function keyboard shortcut.</li>
<li><strong>I Miss My Alt+Ctrl+Delete.</strong> I kind of feel that Windows does a better job of preventing errant applications from locking up the whole OS.  I attribute that to Window&#8217;s plentiful experience with crashes and lockups.  It seems that lockups on OS X are more catastrophic (requiring a hard reboot) than they should be.</li>
</ul>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 247px; width: 1px; height: 1px;">http://macromates.com/</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2009/07/08/switching-from-windows-to-mac-a-retrospective/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Problems Uploading Files to WordPress?</title>
		<link>http://blog.codeeg.com/2009/06/25/having-problems-uploading-files-to-wordpress/</link>
		<comments>http://blog.codeeg.com/2009/06/25/having-problems-uploading-files-to-wordpress/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 23:38:06 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[File Uploads]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=252</guid>
		<description><![CDATA[A Google search seems to indicate that problems uploading files on WordPress installs is a pretty common occurrence.  Unfortunately, I had the hardest time finding the solution to my particular ailment.  Hopefully, this post will find those others who run into this problem in the future. From the WP Admin pages, go to Settings &#62; [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>A Google search seems to indicate that problems uploading files on WordPress installs is a pretty common occurrence.  Unfortunately, I had the hardest time finding the solution to my particular ailment.  Hopefully, this post will find those others who run into this problem in the future.</p>
<p>From the WP Admin pages, go to <strong>Settings &gt; Miscellaneous</strong>.  Make sure the value for &#8216;Store uploads in this folder&#8217; is where you want your files stored (in most cases, it should be <em>wp-content/uploads</em>).</p>
<p style="text-align: center;"><a href="http://blog.codeeg.com/wp-content/uploads/2009/06/Miscellaneous-Settings-‹-Don’t-Forget-to-Plant-It-—-WordPress.jpg"><img class="aligncenter size-medium wp-image-253" title="Miscellaneous Settings ‹ Don’t Forget to Plant It! — WordPress" src="http://blog.codeeg.com/wp-content/uploads/2009/06/Miscellaneous-Settings-‹-Don’t-Forget-to-Plant-It-—-WordPress-300x117.jpg" alt="Miscellaneous Settings ‹ Don’t Forget to Plant It! — WordPress" width="300" height="117" /></a></p>
<p>In my case, this was pointing to a folder I was using for a WP install I was using to test the Thesis theme I&#8217;m using now.  Reverting it to the default fixed my problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2009/06/25/having-problems-uploading-files-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Static Pages w/ Rails ActionViews</title>
		<link>http://blog.codeeg.com/2009/05/24/creating-static-pages-w-rails-actionviews/</link>
		<comments>http://blog.codeeg.com/2009/05/24/creating-static-pages-w-rails-actionviews/#comments</comments>
		<pubDate>Mon, 25 May 2009 01:25:18 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[skribit]]></category>
		<category><![CDATA[Static Pages]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=221</guid>
		<description><![CDATA[Recently, I needed to create some static reporting pages for Skribit.  From a quick search, I got a lot of results that talk about Rails and static pages, but none did exactly what I needed: To be able to generate pages with different paths from one URL Pages to persist across Rails deployments Not seeing [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Recently, I needed to create some static reporting pages for Skribit.  From a quick search, I got a lot of results that talk about Rails and static pages, but none did exactly what I needed:</p>
<ol>
<li>To be able to generate pages with different paths from one URL</li>
<li>Pages to persist across Rails deployments</li>
</ol>
<p>Not seeing any solutions that fit my needs, I set out to come up with my own.  Here is what I ended up with.</p>
<p>First, I needed to add a route for generating/displaying the reports:</p>
<script src="http://gist.github.com/117205.js"></script>
<p>From here, I could just use the standard <strong>caches_page :show</strong> declaration, but that would only generate the page I wanted if I used <em>/report/2009/05/25 </em>as the URL.  What if I wanted <em>/report</em> to generate the report for the current week?  Well, you can do something like this:</p>
<script src="http://gist.github.com/117328.js"></script>
<p>The magic is in the <strong>after_filter</strong> method <strong>cache_weekly_report</strong>.  We basically use the same mechanism Rails page caching uses to save our new report page.  Now, calling <em>/report</em> will generate a static report at <em>/report/2009/05/25</em>, or whatever the current day is.</p>
<p>The last thing to do is to make sure that the reports persist through new server deployments.  That can easily be done with a symlink in your capistrano script:</p>
<script src="http://gist.github.com/117331.js"></script>
<p>And that&#8217;s it!  What do you think?  I&#8217;d love to know if there are any simpler solutions to this.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2009/05/24/creating-static-pages-w-rails-actionviews/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Software to their Audiences</title>
		<link>http://blog.codeeg.com/2009/02/24/building-software-to-their-audiences/</link>
		<comments>http://blog.codeeg.com/2009/02/24/building-software-to-their-audiences/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 10:35:03 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[audience]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[software design]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=201</guid>
		<description><![CDATA[When building software, it&#8217;s a good idea to identify the needs of 3 different kinds of audiences. The first 2 kinds are obvious ones.  We know to listen to what our End Users ask for, but not necessarily build everything they ask.  And we want to balance what the Business wants with when they want [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When building software, it&#8217;s a good idea to identify the needs of 3 different kinds of audiences.</p>
<p>The first 2 kinds are obvious ones.  We know to listen to what our End Users ask for, but not necessarily build everything they ask.  And we want to balance what the Business wants with when they want it.</p>
<p>The last audience, the fellow Developer, is often forgotten.  This means writing clear and concise code.  This also means identifying the common maintenance points in your software and making it easy to work with.</p>
<p>And this also means factoring into the design the capabilities of the development team.  Just like it is unacceptable to write bad code, it should be just as unacceptable to over design software beyond the hiring practices of the company you work for.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2009/02/24/building-software-to-their-audiences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning a New Page</title>
		<link>http://blog.codeeg.com/2008/11/15/turning-a-new-page/</link>
		<comments>http://blog.codeeg.com/2008/11/15/turning-a-new-page/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 16:36:03 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=192</guid>
		<description><![CDATA[It&#8217;s been a month now since I left my contract at AutoTrader.com.  For the most part, I&#8217;ve enjoyed my time there, but the thought of celebrating my two year anniversary there was a little frightening.  While I am very adaptable to the corporate life, it isn&#8217;t for me.  When FlickStation (the last startup I was [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>It&#8217;s been a month now since I left my contract at AutoTrader.com.  For the most part, I&#8217;ve enjoyed my time there, but the thought of celebrating my two year anniversary there was a little frightening.  While I am very adaptable to the corporate life, it isn&#8217;t for me.  When FlickStation (the last startup I was a part of) desolved, the plan was to serve a year of corporate duty to get my bearings before heading back into the startup arena.  But some interesting work, interesting politics, and great co-workers kept me there longer than I expected.  But ultimately, I&#8217;m addicted to execution and delivery, both of which seem very hard to do well and often in large companies.</p>
<p>Also, for people with entrepreneurial aspirations, the corporate world has a way of slowly draining it from you, replacing it with contentedness.  And when you&#8217;re building your startup, those aspirations provides the fuel for you to push on.  I was worried that one day I wake up and find it all gone.</p>
<p>I&#8217;m now spending my time at Good Egg Studios, where we just now wrapped up our second week in private beta of <a title="Elf Island" href="http://elfisland.com">Elf Island</a>.  Working here has been like a breathe of fresh air.  The technology is familiar and not so familiar at the same time, and I&#8217;m working with some great people (including <a href="http://atlanta.startupweekend.com">Startup Weekend</a> alums <a title="Rob Kischuk" href="http://blog.kischuk.com/">Rob</a> and <a title="Amro Mousa - iPhone Developer :)" href="http://amromousa.com">Amro</a>) and leadership with great character.  As an added bonus, my commute is a lot shorter now, and also I&#8217;m much closer to <a title="Skribit - Blog Suggestion Application" href="http://skribit.com">Skribit</a>.</p>
<p>Oh, and did I mention I was working on a game!  A fscking game!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2008/11/15/turning-a-new-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Growl Notifications for Ant</title>
		<link>http://blog.codeeg.com/2008/10/18/growl-notifications-for-ant/</link>
		<comments>http://blog.codeeg.com/2008/10/18/growl-notifications-for-ant/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 13:29:33 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[Growl]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/?p=187</guid>
		<description><![CDATA[It&#8217;s a real refreshing change to be doing developing on Mac these days.  Currently, our Ant builds at work are less than optimal, taking ten&#8217;s of minutes to do a full build.  Fixing it is something we definitely want to do, but because of the complexity of the build and existing deadlines, right now isn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>It&#8217;s a real refreshing change to be doing developing on Mac these days.  Currently, our Ant builds at work are less than optimal, taking ten&#8217;s of minutes to do a full build.  Fixing it is something we definitely want to do, but because of the complexity of the build and existing deadlines, right now isn&#8217;t the best time.  So instead of constantly checking on the progress of my build, I installed this <a href="http://blog.slimeslurp.net/2007/03/18/ant-build-notifications-via-growl/">Growl Ant build listener</a> which will display a Growl notification when a build has completed.</p>
<p>The <a href="http://code.google.com/p/growlbuildlistener/wiki/README">README</a> for the listener got me started &#8211; the only thing that didn&#8217;t work for me is setting the build listener using the <em>ANT_OPT</em> environment variable.  It looks like the default install of Ant on Leopard uses that environment variable as arguments to pass to the Java VM.  So instead, I just used an alias:</p>
<p><code>
<pre>
alias ant='ant -listener net.slimeslurp.growl.GrowlListener'
</pre>
<p></code></p>
<p>Just add this line to your <em>~/.bash_login</em> to use the build listener every time you build.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2008/10/18/growl-notifications-for-ant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
