<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>WhatCodeCraves</title>
    <link>http://www.whatcodecraves.com/</link>
    <description>Jerry Cheung's portfolio and tech blog</description>
    <language>en-us</language>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/whatcodecraves" type="application/rss+xml" /><item>
      <title>Introspecting Rails Models and Controllers Callbacks </title>
      <description>&lt;p&gt;Once models and controllers grow to a certain size and complexity, it
gets tricky to figure out what callbacks act upon them.  This is
especially true for objects that are several inheritance layers deep,
have multiple mixins, were written a long long time ago, or any
combination of the above.  I've picked up a few tools for crushing
nasty little callback buggers that crop up every now and then.  I hope
you find them useful!&lt;/p&gt;
&lt;a href='./articles/2009/06/04/introspecting_rails_models_and_controllers/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/ttzst7WPITA" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/06/04</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/ttzst7WPITA/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/06/04/introspecting_rails_models_and_controllers/index.html</feedburner:origLink></item>
    <item>
      <title>Ruby Postgresql Gem Cleanup </title>
      <description>&lt;p&gt;I ran into some trouble with getting a good native postgresql driver
installed.  Here are some links and resources I found to be useful.  I
also wrote a &lt;a href="http://www.whatcodecraves.com/articles/2008/02/05/setup_rails_with_postgresql/"&gt;checklist for bootstrapping a new Rails app with
postgres&lt;/a&gt;
as the adapter.&lt;/p&gt;
&lt;a href='./articles/2009/04/14/ruby_postgresql_gem_cleanup/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/TYi93hoPRb8" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/04/14</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/TYi93hoPRb8/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/04/14/ruby_postgresql_gem_cleanup/index.html</feedburner:origLink></item>
    <item>
      <title>Fast Tracked iPhone Development </title>
      <description>&lt;p&gt;Jumping into a new language, a new framework, and a new set of tools
is overwhelming!  But the best way to learn is to be utterly crushed
by the technology, then have friends pick up the pieces.  Once you've
seen a good broad overview of what's available, you're more capable of
finding resources on your own.  Here is my chronological step by step
guide to getting bootstrapped.&lt;/p&gt;
&lt;a href='./articles/2009/04/10/fast_tracked_iphone_development/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/vALd5zw7o8s" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/04/10</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/vALd5zw7o8s/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/04/10/fast_tracked_iphone_development/index.html</feedburner:origLink></item>
    <item>
      <title>Adventures with ActiveRecord find </title>
      <description>&lt;p&gt;Retrieving records from the database and mapping the results into
ActiveRecord models are a big part of every Rails app.  A large
majority of your controllers will retrieve one or more ActiveRecord
models.  For something as important and fundamental as 'find', knowing
more of it's options and idioms can help you write less, write it more
elegantly, and do more.&lt;/p&gt;
&lt;a href='./articles/2009/04/08/adventures_with_active_record_find/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/AoAqvYy--0g" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/04/08</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/AoAqvYy--0g/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/04/08/adventures_with_active_record_find/index.html</feedburner:origLink></item>
    <item>
      <title>Rails 2.2.2 Chicken and Egg Migrations Headache </title>
      <description>&lt;p&gt;For this upcoming March release, we plan to upgrade from Rails 2.1 to
Rails 2.2.2. When testing bootstrapping fresh instances of our app, we
ran across an annoying migrations problem.  Read on to see how we
resolved it.&lt;/p&gt;
&lt;a href='./articles/2009/03/17/rails_2.2.2_chicken_and_egg_migrations_headache/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/ctRIRfY9i0Y" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/03/17</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/ctRIRfY9i0Y/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/03/17/rails_2.2.2_chicken_and_egg_migrations_headache/index.html</feedburner:origLink></item>
    <item>
      <title>Rails and Gems Documentation Everywhere </title>
      <description>&lt;p&gt;&lt;img src="/images/mobile-me.png" alt="stick figure of me and macbook"
style="float:left;padding:0 10px 10px;" /&gt; A great thing about
&lt;a href="http://www.coupa.com/"&gt;Coupa&lt;/a&gt; work is how I can hack it up without a
network connection.  The codebase is checked out and I run mysql
locally.  I fire up emacs and a script/server and I'm pretty much good
to go.  The only downside is not being able to access the rails and
gems docs.  Here's what I did to put together a productive local
setup.&lt;/p&gt;
&lt;a href='./articles/2009/02/28/rails_and_gems_documentation_anywhere/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/UdhSlXtlJ8A" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/02/28</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/UdhSlXtlJ8A/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/02/28/rails_and_gems_documentation_anywhere/index.html</feedburner:origLink></item>
    <item>
      <title>Another .irbrc Jewel </title>
      <description>&lt;p&gt;A while back, I discovered the magical
&lt;a href="http://giantrobots.thoughtbot.com/2008/12/23/script-console-tips"&gt;.irbrc&lt;/a&gt;.
If you scroll down to the comments, Arthur and I left a tip on how to
view arbitrary script/console output in Textmate.  It's really amazing
for XML or big chunks of output.  Other useful irb links after the
fold.&lt;/p&gt;
&lt;a href='./articles/2009/02/18/another_irbrc_jewel/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/yXQNTCph4Pw" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/02/18</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/yXQNTCph4Pw/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/02/18/another_irbrc_jewel/index.html</feedburner:origLink></item>
    <item>
      <title>Multiple Gmail Accounts on OSX Done Right </title>
      <description>&lt;p&gt;I learned this tip from Seggy and I've explained it to several people
already. If you've fallen in love with Gmail's web interface, then
you're going to love this solution.&lt;/p&gt;
&lt;a href='./articles/2009/02/11/multiple_gmail_accounts_on_osx_done_right/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/c1Ds3rkkbos" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/02/11</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/c1Ds3rkkbos/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/02/11/multiple_gmail_accounts_on_osx_done_right/index.html</feedburner:origLink></item>
    <item>
      <title>Emacs Refactoring </title>
      <description>&lt;p&gt;While I waited for Coupa customers to be upgraded, I decided to clean
up my .emacs config file.  My .emacs was never a pretty thing to
admire.  Without any restraint, I often added whatever cool code
snippet I came across online.  The file became verbose, redundant, and
a general mess. I set out to make it more modular and easier to
follow.&lt;/p&gt;
&lt;a href='./articles/2009/02/06/emacs_refactoring/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/oLEQACGLSyg" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/02/06</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/oLEQACGLSyg/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/02/06/emacs_refactoring/index.html</feedburner:origLink></item>
    <item>
      <title>Rails-like Javascript Date Helpers </title>
      <description>&lt;p&gt;I'm a fan of
&lt;a href="http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Time/Calculations.html"&gt;ActiveSupport::CoreExtensions::Time::Calculations&lt;/a&gt;.
It gives you easy to use methods like &lt;code&gt;beginning_of_day&lt;/code&gt;,
&lt;code&gt;end_of_day&lt;/code&gt;, &lt;code&gt;beginning_of_week&lt;/code&gt;,
&lt;code&gt;end_of_day&lt;/code&gt;, etc.  These methods make date handling code
more concise and more readable.  I wanted the same benefits in
Javascript, so I've ported over a subset of these methods and mixed
them into Javascript's &lt;code&gt;Date&lt;/code&gt; object.  Read on for the
code.&lt;/p&gt;
&lt;a href='./articles/2009/01/11/rails_like_javascript_date_helpers/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/auVzFM4KHPk" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2009/01/11</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/auVzFM4KHPk/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2009/01/11/rails_like_javascript_date_helpers/index.html</feedburner:origLink></item>
    <item>
      <title>Rails Flash with Ajax </title>
      <description>&lt;p&gt;One small annoyance about working with the
&lt;a href="http://api.rubyonrails.org/classes/ActionController/Flash.html"&gt;flash&lt;/a&gt;
in Rails is that it only works well if you render separate pages per
action.  The flash falls apart if you do an Ajax call and render an
RJS template or some inline javascript.  The flash won't show up when
it should, and it'll show up on some other page when you don't want it
to.  I made 2 small changes to my app to make flash behave better when
an Ajax call is made.&lt;/p&gt;
&lt;a href='./articles/2008/12/13/rails_flash_with_ajax/index.html'&gt;Read more&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/whatcodecraves/~4/4GsxJqtjOFY" height="1" width="1"/&gt;</description>
      <author>Jerry Cheung</author>
      <pubDate>2008/12/13</pubDate>
      <link>http://feedproxy.google.com/~r/whatcodecraves/~3/4GsxJqtjOFY/index.html</link>
    <feedburner:origLink>http://www.whatcodecraves.com/articles/2008/12/13/rails_flash_with_ajax/index.html</feedburner:origLink></item>
  </channel>
</rss>
