<?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; programming</title>
	<atom:link href="http://blog.codeeg.com/tag/programming/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>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>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>Refactoring IDEs and Dynamic Languages</title>
		<link>http://blog.codeeg.com/2006/10/01/refactoring-ides-and-dynamic-languages/</link>
		<comments>http://blog.codeeg.com/2006/10/01/refactoring-ides-and-dynamic-languages/#comments</comments>
		<pubDate>Mon, 02 Oct 2006 02:32:10 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[dynamic languages]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.codeeg.com/2006/10/01/refactoring-ides-and-dynamic-languages/</guid>
		<description><![CDATA[For the most part, I agree with Cedric: One of the main reasons why people like dynamically typed languages is precisely because they don&#8217;t have to specify these types. Is it really so shocking that this convenience comes at the price of not being able to perform any operation that requires type information on this [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img class="alignnone size-full wp-image-122" src="http://blog2.codeeg.com/wp-content/uploads/2008/06/jerrymaguire.jpg" alt="" width="200" height="210" /></p>
<p>For the most part, <a title="Dynamic language, refactoring IDE. Pick one." href="http://beust.com/weblog/archives/000414.html">I agree with Cedric</a>:</p>
<blockquote><p>One of the main reasons why people like dynamically typed languages is precisely because they don&#8217;t have to specify these types. Is it really so shocking that this convenience comes at the price of not being able to perform any operation that requires type information on this code?</p></blockquote>
<p>This problem has always reminded me of the &#8216;Help me help you!&#8217; scene in <em>Jerry Maguire</em> &#8211; if you don&#8217;t tell your IDE your intentions, then there is always going to be limits to what your IDE is going to be able to do for you.</p>
<p>Having said that, it took a couple of years of JBuilder,  Netbeans, and Visual Age before we got the great refactoring capabilities of Eclipse and IntelliJ.  I would not be at all surprised if someone out there figures out a good solution to this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codeeg.com/2006/10/01/refactoring-ides-and-dynamic-languages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
