<?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! &#187; ruby</title>
	<atom:link href="http://blog.codeeg.com/tag/ruby/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.1</generator>
		<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>Eclipse Doesn&#8217;t Have to Beat IntelliJ</title>
		<link>http://blog.codeeg.com/2007/03/08/eclipse-doesnt-have-to-beat-intellij/</link>
		<comments>http://blog.codeeg.com/2007/03/08/eclipse-doesnt-have-to-beat-intellij/#comments</comments>
		<pubDate>Fri, 09 Mar 2007 01:53:56 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/2007/03/08/eclipse-doesnt-have-to-beat-intellij/</guid>
		<description><![CDATA[Lars says IntelliJ can&#8217;t beat IDEA for Java development. I say that&#8217;s fine, but Eclipse doesn&#8217;t have to be better than IntelliJ, it just can&#8217;t be more than $500 worst . How much IDE does one need anyway? When IntelliJ first entered the market, they offered a IDE that offered a huge (with a capital [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://serpensalbus.com/blog/?p=109">Lars says IntelliJ can&#8217;t beat IDEA for Java development</a>.  I say that&#8217;s fine, but Eclipse doesn&#8217;t have to be better than IntelliJ, it just can&#8217;t be more than $500 worst <img src='http://blog.codeeg.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .  How much IDE does one need anyway?  When IntelliJ first entered the market, they offered a IDE that offered a <strong>huge</strong> (with a capital F) productivity gain over existing IDEs, but since then Eclipse has caught up.  While I would concede that IntelliJ has some very smart features that doesn&#8217;t exist in Eclipse, they only offer me marginal benefits towards overall productivity.  I feel like I make that up easily with Eclipse&#8217;s excellent source control facilities,  the breadth of plugins available, and through my experience with the tool.</p>
<p>Another thing is, if you&#8217;re heart is set on IntelliJ, you&#8217;re most likely never going to give Eclipse a fair shake.  It&#8217;s the same with me towards IntelliJ.  Good developers invests a lot of time learning and loving our IDE&#8217;s, and it&#8217;s not easy for us to give up on something we&#8217;ve invested some much time in mastering.  Having said that, if IntelliJ can revolutionize the IDE market again, I&#8217;ll be one of the first to plop my $500 down for a license.</p>
<p>Now about the Ruby IDE front &#8212; there&#8217;s been a lot of news about Ruby IDE support recently, which is a good thing.  Being an Eclipse advocate, I of course have been using RDT and RadRails, but these plugins haven&#8217;t really advanced as much as I had hope (hopefully the <a title="RadRails Moves to Aptana" href="http://www.rubyonrailsblog.com/articles/2007/03/07/radrails-moves-to-aptana">Aptana crew will be able to get it on track</a>).  I would love to contribute to the project, but I just don&#8217;t have to time.  This leads to one of my biggest gripes about Eclipse: the cost of building the robust platform that is Eclipse is that it requires a huge investment out of the developers to understand how to code to that platform.  The Eclipse guys need to work on making this easier.</p>
<p>I recently tried the <a title="Ruby Plugin for IntelliJ" href="http://www.jetbrains.com/idea/features/ruby_development.html">Ruby plugin for IntelliJ</a>, but right now there&#8217;s just too much Java in the way (why do I have to specify a classes directory?  Why do I care about JDKs and compiler options?).  JetBrains really needs to make a standalone Ruby IDE, and not make Ruby development feel like the unwanted stepchild of Java (this is where Eclipse&#8217;s Perspectives concept really shows its value).  I&#8217;ve also downloaded <a title="NetBeans + Ruby" href="http://blogs.sun.com/tor/entry/netbeans_and_ruby_is_true">NetBeans with the Ruby Plugin</a>, but because of some annoying errors and the lack of documentation (need to know what the shortcuts are, see IntelliJ&#8217;s write ups on their Ruby Plugin) I decided I&#8217;ll wait until that project is further along. Initial impression is that it doesn&#8217;t seem to suffer from the &#8216;peanut butter in my chocolate&#8217; problem that IntelliJ has, but why does it start WEBrick when I load the project, and how would I change that to be Mongrel?</p>
<p>I would love to give TextMate a whirl, but I&#8217;m not ready to pay $2,060 for it (that&#8217;s TextMate plus the MacBook Pro I would get to run it on &#8212; I&#8217;m on Ubuntu Linux).</p>
<p>One thing I would like to say about all these IDEs (TextMate excluded since I&#8217;ve never used it): I wonder if the path that these IDEs are going is sub-optimal.  Should we be be building Ruby IDE&#8217;s in the Java mold, or should we be doing it in Ruby/RoR/CoC mold?  If someone was to build an IDE not knowing what Eclipse/NetBeans/IntelliJ/Visual Studio is, what would it look like?</p>
<p>For now I&#8217;ve gone back to Eclipse (I&#8217;m in love with the &#8216;Synchronize with Repository&#8217; feature, where is it in IntelliJ?), but I&#8217;m going to try the <a title="Dynamic Language Toolkit for Eclipse" href="http://www.eclipse.org/dltk/">Ruby support in the Dynamic Language Toolkit</a> instead of RDT to see how that works out.  I&#8217;ll post a follow-up about my experiences with DLTK and Ruby+NetBeans once I get more time with them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2007/03/08/eclipse-doesnt-have-to-beat-intellij/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Desktop Backgrounds w/ Flickr</title>
		<link>http://blog.codeeg.com/2006/08/15/desktop-backgrounds-w-flickr/</link>
		<comments>http://blog.codeeg.com/2006/08/15/desktop-backgrounds-w-flickr/#comments</comments>
		<pubDate>Tue, 15 Aug 2006 14:54:01 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[desktop background]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/2006/08/15/desktop-backgrounds-w-flickr/</guid>
		<description><![CDATA[I usually get my backgrounds from a couple of photo blogs I subscribe to, but using Flickr for my backgrounds was such a good idea (and a good excuse to play with ruby), that I thought I&#8217;d give it a shot. After some trail and error, and some help online, I was able to come [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I usually get my backgrounds from a couple of <a href="http://www.chromasia.com/">photo blogs</a> <a href="http://wvs.topleftpixel.com/">I subscribe to</a>, but using <a href="http://www.redmonk.com/sogrady/archives/002054.html">Flickr for my backgrounds</a> was such a good idea (and a good excuse to play with ruby), that I thought I&#8217;d give it a shot.</p>
<p>After some trail and error, and <a href="http://maxdunn.com/typo/articles/2006/07/06/getting-started-with-flickr-on-rails">some</a> <a href="http://moosoft.net/docs/2005/gnome-wallpaper">help</a> online, I was able to come up with this <a href="http://codeeg.com/misc/chg-background.rb">ruby script to do the trick</a>.  The script will pull the interesting photos for that day, and will try to find the best fit for your screen resolution.  If you don&#8217;t like the current background, you can run the script again to change it.  With a simple cron entry you can have fresh background at periodic intervals (I have mine set to every 2 hours).</p>
<p>I created the script under Ubuntu GNOME.  If you want to give the script a try, you&#8217;ll have to edit the script and put in your <a href="http://www.flickr.com/services/api/keys/">Flickr api key and shared secret</a> as well as your screen resolution (unless you&#8217;re runing on 1440&#215;900).  You&#8217;ll also need to have rubygems and the rflickr gem installed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2006/08/15/desktop-backgrounds-w-flickr/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>A Graph of 2005 Software Development Job Trends</title>
		<link>http://blog.codeeg.com/2006/01/14/a-graph-of-2005-software-development-job-trends/</link>
		<comments>http://blog.codeeg.com/2006/01/14/a-graph-of-2005-software-development-job-trends/#comments</comments>
		<pubDate>Sat, 14 Jan 2006 17:20:24 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[job trends]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/2006/01/14/a-graph-of-2005-software-development-job-trends/</guid>
		<description><![CDATA[After some tweaking of a graph originally created by a member of the ST-J Java Group, this is what I think is the most accurate representation of 2005: This graph was creating using Indeed.com&#8216;s niftly Job Trends tool. What does it say? Not much really &#8211; to me it seems as though the software development [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>After some tweaking of a graph originally created by a member of the <a title="Straight-Talking Java" href="http://groups.yahoo.com/group/straight_talking_java/">ST-J Java Group</a>, this is what I think is the most accurate representation of 2005:</p>
<p><span style="color:#0000ee;text-decoration:underline;"><a class="imagelink" title="2005 SD Job Trends Graph" href="http://blog.codeeg.com/wp-content/uploads/2006/01/jobgraph.png"><img class="alignnone size-full wp-image-131" src="http://blog2.codeeg.com/wp-content/uploads/2008/06/jobgraph_small.png" alt="" width="450" height="250" /></a></span></p>
<p>This graph was creating using <a title="Job Search Site Indeed.com" href="http://www.indeed.com">Indeed.com</a>&#8216;s <a title="Job trends graphing tool" href="http://www.indeed.com/jobtrends?q=java+software%2Cc+software%2Cc%2B%2B+software%2Cc%23+software%2Cruby+software%2Csmalltalk+software%2C.net+software">niftly Job Trends tool</a>.  What does it say?  Not much really &#8211; to me it seems as though the software development market is pretty healthy.</p>
<p>And what about Ruby?   I&#8217;m not sure it reveals anything &#8211; I suspect that its flatness has more to do with the hiring behavior of Ruby shops than anything else.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2006/01/14/a-graph-of-2005-software-development-job-trends/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
