<?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>Kristina Lim</title>
	<atom:link href="http://kristinalim.com.ph/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://kristinalim.com.ph/blog</link>
	<description></description>
	<lastBuildDate>Fri, 26 Feb 2010 18:24:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hire me!</title>
		<link>http://kristinalim.com.ph/blog/2010/02/27/hire-me/</link>
		<comments>http://kristinalim.com.ph/blog/2010/02/27/hire-me/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:23:05 +0000</pubDate>
		<dc:creator>kristina</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://kristinalim.com.ph/blog/?p=598</guid>
		<description><![CDATA[I recently left my group (Syndeomedia, Exist Global, G2iX) to do freelance software development on the Ruby on Rails framework, and have a bit of time to work on personal projects on the side.
So here you go: I am for hire. If you are interested in working together, please do contact me regarding your project [...]]]></description>
			<content:encoded><![CDATA[<p>I recently left my group (<a href="http://syndeomedia.com">Syndeomedia</a>, <a href="http://www.exist.com">Exist Global</a>, <a href="http://www.g2ix.com">G2iX</a>) to do freelance software development on the <a href="http://rubyonrails.org">Ruby on Rails</a> framework, and have a bit of time to work on personal projects on the side.</p>
<p>So here you go: I am for hire. If you are interested in working together, please do <a href="http://kristinalim.com.ph/blog/hire-me/">contact me</a> regarding your project and timeline.</p>
<ul>
<li><a href="http://kristinalim.com.ph/files/personal/CV.pdf">Curriculum Vitae</a></li>
<li><a href="http://github.com/kristinalim">GitHub Profile</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://kristinalim.com.ph/blog/2010/02/27/hire-me/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Collaboration for Heroku Users</title>
		<link>http://kristinalim.com.ph/blog/2010/02/08/collaboration-for-heroku-users/</link>
		<comments>http://kristinalim.com.ph/blog/2010/02/08/collaboration-for-heroku-users/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 21:54:43 +0000</pubDate>
		<dc:creator>kristina</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://kristinalim.com.ph/blog/?p=332</guid>
		<description><![CDATA[For some reason, there aren&#8217;t enough guides for collaboration on Heroku. There is a quickstart guide over at the Heroku docs for cases when both source hosting and deploys happen through a single repository on Heroku. It does not cover other scenarios though.
This is mostly on Git, which Heroku uses for source control and deploy [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, there aren&#8217;t enough guides for collaboration on <a href="http://heroku.com">Heroku</a>. There is a <a href="http://docs.heroku.com/collab">quickstart guide</a> over at the <a href="http://docs.heroku.com">Heroku docs</a> for cases when both source hosting and deploys happen through a single repository on Heroku. It does not cover other scenarios though.</p>
<p>This is mostly on <a href="http://git-scm.com">Git</a>, which Heroku uses for source control and deploy triggers. This also assumes that the <a href="http://github.com/heroku/heroku">heroku gem</a> is all <a href="http://docs.heroku.com/heroku-command">installed and set up</a>.</p>
<h4>Separate Source Hosting</h4>
<p>Starting off with the most common scenario: Your source is hosted somewhere else (<a href="http://github.com">GitHub</a>, for example) and you deploy on Heroku.</p>
<p>If you have not done so yet, clone your application:</p>
<pre><code>$ git clone git@github.com:me/myapp.git myapp</code></pre>
<p>Besides making a copy of the code in the myapp directory, this also takes care of adding the repository as the default remote &quot;origin&quot;. This means that, by default, doing:</p>
<pre><code>$ git push</code></pre>
<p>from the directory would already be equivalent to doing:</p>
<pre><code>$ git push origin</code></pre>
<p>which should push your changes up to the source host.</p>
<p>Next let us add the repository on Heroku as a different remote:</p>
<pre><code>$ cd myapp
$ git remote add heroku git@heroku.com:myapp.git
$ git fetch heroku # Download objects and refs</code></pre>
<p>At this point, you should be able to start deploying with:</p>
<pre><code>$ git push heroku</code></pre>
<p>and run heroku gem commands like such:</p>
<pre><code>$ heroku console
$ heroku info</code></pre>
<h4>Multiple Environments</h4>
<p><a href="http://jqr.github.com">Elijah Miller</a> wrote a great guide <a href="http://jqr.github.com/2009/04/25/deploying-multiple-environments-on-heroku.html">Deploying Multiple Environments on Heroku</a>. If you are looking into setting up the multiple environments, head to that article instead. The rest of this section is for collaborating on already set up application environments.</p>
<p>So let us say we want to work with the following scenario:</p>
<table>
<tr>
<th>Role</th>
<th>Heroku</th>
<th>Git Repository</th>
</tr>
<tr>
<td>Source</td>
<td>-</td>
<td>git://github.com/me/myapp.git</td>
</tr>
<tr>
<td>Production</td>
<td>myapp</td>
<td>git://heroku.com/myapp.git</td>
</tr>
<tr>
<td>Staging</td>
<td>myapp-staging</td>
<td>git://heroku.com/myapp-staging.git</td>
</tr>
</table>
<p>The procedure is pretty much the same as above. First, you need to clone your source repository:</p>
<pre><code>$ git clone git@github.com:me/myapp.git myapp</code></pre>
<p>The next step is adding the Heroku repositories as remotes. You will have to come up with remote names better than &#8220;heroku&#8221; since you will be working with more than one Heroku application this time. The most obvious decent naming scheme is, of course, naming them after the environments:</p>
<pre><code>$ cd myapp
$ git remote add production git://heroku.com/myapp.git
$ git remote add staging git://heroku.com/myapp-staging.git
$ git fetch production # Download objects and refs
$ git fetch staging # Download objects and refs</code></pre>
<p>Since the source repository has been added as the &#8220;origin&#8221; remote, pushing changes for regular updates even pre-deploy would still be as simple as:</p>
<pre><code>$ git push</code></pre>
<p>Deploying is also straightforward:</p>
<pre><code>$ git push production production-branch-name:master
$ git push staging staging-branch-name:master</code></pre>
<p>Since there will be more than one Heroku repository in your Git configuration, the heroku gem will not be able to automatically determine the application you want to run application commands for. You will need to specify the application name like this:</p>
<pre><code>$ heroku console --app myapp
$ heroku rake db:migrate --app myapp-staging</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://kristinalim.com.ph/blog/2010/02/08/collaboration-for-heroku-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easter holidays</title>
		<link>http://kristinalim.com.ph/blog/2009/04/08/easter-holidays/</link>
		<comments>http://kristinalim.com.ph/blog/2009/04/08/easter-holidays/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 08:00:40 +0000</pubDate>
		<dc:creator>kristina</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://i-think.com.ph/kristina/?p=319</guid>
		<description><![CDATA[I finally have a 4-day break from work ahead of me, and I have to say I could not wait. I intentionally did not get copies of movies and tv show episodes to watch so I don&#8217;t end up spending most of the days bumming &#8212; I have regular weekends for that.
These four days are [...]]]></description>
			<content:encoded><![CDATA[<p>I finally have a 4-day break from work ahead of me, and I have to say I could not wait. I intentionally did not get copies of movies and tv show episodes to watch so I don&#8217;t end up spending most of the days bumming &#8212; I have regular weekends for that.</p>
<p>These four days are for:
<ol>
<li>Jogging,</li>
<li>Setting up <a href="http://debian.org">Debian</a> with development environment on the MacBook,</li>
<li>Some progress on work project #1,</li>
<li>Some progress on work project #2,</li>
<li>Prototype for toy web application (integrated with <a href="http://facebook.com">Facebook</a>),</li>
<li>More park time,</li>
<li>Further planning for some things I realized still matter to me, and</li>
<li>Savoring a good cups of coffee.</li>
</ol>
<p>Hello again, lovely world! Keep me excited.</p>
]]></content:encoded>
			<wfw:commentRss>http://kristinalim.com.ph/blog/2009/04/08/easter-holidays/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ActiveRecord association :reset</title>
		<link>http://kristinalim.com.ph/blog/2009/02/18/activerecord-association-reset/</link>
		<comments>http://kristinalim.com.ph/blog/2009/02/18/activerecord-association-reset/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 16:28:41 +0000</pubDate>
		<dc:creator>kristina</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://i-think.com.ph/kristina/?p=204</guid>
		<description><![CDATA[Is it just me, or is the use of reset() on one-to-many and many-to-many ActiveRecord associations quite unpopular? I actually have never used it (maybe never needed to use it) and have never seen it used yet.
I was looking into performance issues in one of our projects, and noticed some bit of association loading within [...]]]></description>
			<content:encoded><![CDATA[<p>Is it just me, or is the use of <code>reset()</code> on one-to-many and many-to-many ActiveRecord associations quite unpopular? I actually have never used it (maybe never needed to use it) and have never seen it used yet.</p>
<p>I was looking into performance issues in one of our projects, and noticed some bit of association loading within a loop. I realized it is actually quite deceiving if we don&#8217;t remember some things.</p>
<p>Consider the following scenario:</p>
<pre><code>persons = Person.find(:all)
persons.each do |person|
  books = persons.books
  # ... And then say a bunch of rendering goes here.
end</code></pre>
<p>Whatever the reason, let us say there are on the average 50 books associated to each person, and we need a list of all books associated to each of 50 persons in a single go. That could grow a pretty large data set.</p>
<p>Sure, the books for each person record are assigned to a variable within the scope of the <code>each</code> block and would normally be garbage collected as soon as the loop ends an iteration, but we might be ignoring that these books have been stored for the <code>:books</code> association of each person record. Each person record then is still referenced in the <code>persons</code> array, so there will be no garbage collection happening there either.</p>
<p>In goes the <code>reset()</code> function. The <code>reset()</code> function on associations simply clears the association data <code>@target</code> and updates the boolean tracker <code>@loaded</code> to put things back how they are before association data is loaded.</p>
<pre><code>persons = Person.find(:all)
persons.each do |person|
  persons.books
  # ... And then say a bunch of rendering goes here.
  person.books.reset
end</code></pre>
<p>This did not help the particular area I was looking at as we are dealing with a harmlessly small collection there. Large index pages and sitemaps should employ memory-efficient tricks too, like combinations of pre-loading record IDs and paginated fetching, so this might not exactly be useful knowledge. It really is something to watch out for, though, and it could contribute much in memory optimization.</p>
]]></content:encoded>
			<wfw:commentRss>http://kristinalim.com.ph/blog/2009/02/18/activerecord-association-reset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maryland, et al</title>
		<link>http://kristinalim.com.ph/blog/2008/12/17/maryland-et-al/</link>
		<comments>http://kristinalim.com.ph/blog/2008/12/17/maryland-et-al/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 16:58:20 +0000</pubDate>
		<dc:creator>kristina</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[usa]]></category>

		<guid isPermaLink="false">http://i-think.com.ph/kristina/?p=117</guid>
		<description><![CDATA[(Haha, before you even think about it: I am working remotely on Philippine time, not on vacation.)
My second sister and I flew over to Maryland on the 13th so we could spend the holidays with the rest of the family. We are just about to end our fifth day here.
So far everything is good. We [...]]]></description>
			<content:encoded><![CDATA[<p>(Haha, before you even think about it: I am working remotely on Philippine time, not on vacation.)</p>
<p>My second sister and I flew over to Maryland on the 13th so we could spend the holidays with the rest of the family. We are just about to end our fifth day here.</p>
<p>So far everything is good. We have been around Washington D.C. this weekend, have driven through Maryland a bit, and will be in New York City tomorrow til Friday (Hopefully, I can drop by <a href="http://www.metmuseum.org">MET</a> this time.). The company is great, of course. A different range of shops, the Wii, HD on demand, and GPS also deserve so much more than a bit of mentioning. I&#8217;m especially looking forward to possible skiing and eat-all-you-can cheesecake feast.</p>
<p>Hmm, what else to say. I&#8217;m starting colds because of the cold and some lack of sleep, but I&#8217;m just about to pwn it. <img src='http://kristinalim.com.ph/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  So forget about that.</p>
<p>I got some books earlier today. I wonder what else I&#8217;ll end up bringing home.</p>
]]></content:encoded>
			<wfw:commentRss>http://kristinalim.com.ph/blog/2008/12/17/maryland-et-al/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
