<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2titles.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemtitles.css"?><rss 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/" version="2.0">

<channel>
	<title>Bytefull of TechTalk</title>
	
	<link>http://tech.bytefull.com</link>
	<description />
	<pubDate>Thu, 02 Apr 2009 06:47:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/BytefullOfTechtalk" type="application/rss+xml" /><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.bloglines.com/sub/http://feeds.feedburner.com/BytefullOfTechtalk" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://my.feedlounge.com/external/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://static.feedlounge.com/buttons/subscribe_0.gif">Subscribe with FeedLounge</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" href="http://hub.netomat.net/account/account.autoSubscribe.jspa?urls=http%3A%2F%2Ffeeds.feedburner.com%2FBytefullOfTechtalk" src="http://www.netomat.net/blogger/images/icon_netomat_feedbutton.gif">Subscribe with netomat Hub</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Merb + Rails, and my doubts.</title>
		<link>http://tech.bytefull.com/2008/12/26/merb-rails-and-my-doubts/</link>
		<comments>http://tech.bytefull.com/2008/12/26/merb-rails-and-my-doubts/#comments</comments>
		<pubDate>Fri, 26 Dec 2008 13:42:45 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Merb]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/?p=32</guid>
		<description><![CDATA[I had the same reaction when I heard of the merge. A prank ?! Surely, it can&#8217;t be !
But it was true, and as a Merb user I felt let down at first. All that sermonizing about the (implied) evils of Rails, and &#8216;we&#8217; sell out ?! I thought, this is dodgy - why stick [...]]]></description>
			<content:encoded><![CDATA[<p>I had the same reaction when I heard of the merge. A prank ?! Surely, it can&#8217;t be !</p>
<p>But it was true, and as a <a href="http://www.merbivore.com" target="_blank">Merb</a> user I felt let down at first. All that sermonizing about the (implied) evils of <a href="http://www.rubyonrails.org" target="_blank">Rails</a>, and &#8216;we&#8217; sell out ?! <a href="http://groups.google.com/group/merb/msg/5a5bcbf0c123448a" target="_blank">I thought, this is dodgy</a> - why stick with the Rails label, when presumably a majority of the code is going to be merged in from Merb ?</p>
<p>But the Merb core team, in whom we trust, <a href="http://merbist.com/2008/12/25/merb-rails-merge-or-why-should-merbists-be-happy/" target="_blank">has been addressing</a> the Merb community&#8217;s concerns, and it is becoming clear that this is a major reaffirmation of the Merb project.</p>
<p>My primary interest in Rails 3.0 is to get what we have in Merb 1.0: &#8220;<a href="http://twitter.com/merbist/status/1076055806" target="_blank">good ruby code</a>&#8220;, modularity, freedom of choice, and good support (availability of the core team to answer questions).</p>
<p>To close, the most reassuring words I have heard so far came from <a href="http://yehudakatz.com/2008/12/23/rails-and-merb-merge/#comments" target="_blank">Yehuda</a> who said:</p>
<blockquote><p>Do you think for a second I would have been involved in an endeavor that represented the opposite of everything I’ve been talking about for a year now? Hell&#8217;s no!</p>
<p>Re-read DHH’s post. We’re all on the same page!</p></blockquote>
<p>So, having got over the initial shock, I look forward to a cleaner Rails 3.0 based on the Merb ideals, and a guaranteed public API. Good luck to the Merb/Rails core team !</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=h8RJ2wQu1Ko:WqqXmN82hiU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=h8RJ2wQu1Ko:WqqXmN82hiU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=h8RJ2wQu1Ko:WqqXmN82hiU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=h8RJ2wQu1Ko:WqqXmN82hiU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=h8RJ2wQu1Ko:WqqXmN82hiU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2008/12/26/merb-rails-and-my-doubts/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Updates</title>
		<link>http://tech.bytefull.com/2008/06/02/updates/</link>
		<comments>http://tech.bytefull.com/2008/06/02/updates/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 03:38:55 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2008/06/02/updates/</guid>
		<description><![CDATA[I&#8217;ve haven&#8217;t posted for quite a while. Here&#8217;s what I&#8217;ve been upto for the past few months:

Started working with merb + activerecord for a major project - no need to abandon ruby for django now &#8230; unless I need django-admin. My primary reason for choosing merb was its loosely coupled architecture (read: freedom of choice). [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve haven&#8217;t posted for quite a while. Here&#8217;s what I&#8217;ve been upto for the past few months:</p>
<ul>
<li>Started working with <a href="http://merbivore.com">merb</a> + activerecord for a major project - no need to abandon ruby for django now &#8230; unless I need django-admin. My primary reason for choosing merb was its loosely coupled architecture (read: freedom of choice). I also choose to stick with AR until DM is stable enough for production use.</li>
<li>Started working with <a href="http://git.or.cz" target="_blank">git</a>, which has been a good experience so far.</li>
<li>Abandoned <a href="http://www.gentoo.org" target="_blank">Gentoo Linux</a>, though I still have a soft spot for it. What I <i>don&#8217;t</i> have is the time or energy to manage it. Thank you, Gentoo, for a proper linux education, but now I just need a Desktop with a low maintenance overhead. Installing <a href="http://www.ubuntu.com" target="_blank">Ubuntu 8.04</a> on my desktop and laptop was a sobering reminder of how far Desktop Linux has come. </li>
<li>Reading - various stuff. One standout book that I recommend is <a href="http://www.amazon.com/Black-Swan-Impact-Highly-Improbable/dp/1400063515" target="_blank">Black Swan by Nassim Nicholas Taleb.</a>, an accessible rant about randomness and uncertainty in the <i>real world</i>.</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=j35t_N3twg0:cujNGU6OxNk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=j35t_N3twg0:cujNGU6OxNk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=j35t_N3twg0:cujNGU6OxNk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=j35t_N3twg0:cujNGU6OxNk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=j35t_N3twg0:cujNGU6OxNk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2008/06/02/updates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Update …</title>
		<link>http://tech.bytefull.com/2007/11/25/update/</link>
		<comments>http://tech.bytefull.com/2007/11/25/update/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 08:17:32 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/11/25/update/</guid>
		<description><![CDATA[My first Rails app went online on 1st Sep (more on that later), and I was subsequently busy with those &#8216;trivial&#8217; changes that drain your time and energy &#8230; I also have a looong list of feature requests to work through.
My other excuse for being inactive is that I&#8217;ve been working on 2 static sites [...]]]></description>
			<content:encoded><![CDATA[<p>My first Rails app went online on <strong>1st Sep</strong> (more on that later), and I was subsequently busy with those &#8216;trivial&#8217; changes that drain your time and energy &#8230; I also have a looong list of feature requests to work through.</p>
<p>My other excuse for being inactive is that I&#8217;ve been working on 2 static sites and it is sooo boring <img src='http://tech.bytefull.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> What little free time I had, I spent writing a wordpress theme for my <a href="http://chess.bytefull.com" title="Bxh7+">chess blog</a> !</p>
<p>I&#8217;ll profile the rails app, soon &#8230; I promise !</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=VhTbw25O224:pk7N66tUQBg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=VhTbw25O224:pk7N66tUQBg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=VhTbw25O224:pk7N66tUQBg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=VhTbw25O224:pk7N66tUQBg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=VhTbw25O224:pk7N66tUQBg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/11/25/update/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Little Things about Ruby Strings</title>
		<link>http://tech.bytefull.com/2007/08/06/little-things-about-ruby-strings/</link>
		<comments>http://tech.bytefull.com/2007/08/06/little-things-about-ruby-strings/#comments</comments>
		<pubDate>Mon, 06 Aug 2007 05:37:07 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/08/06/little-things-about-ruby-strings/</guid>
		<description><![CDATA[Here are some things about Ruby Strings that may have escaped your attention - if you were introduced to Ruby via Rails
Efficiency
Since Ruby scans double-quoted strings for variables and escape sequences, it&#8217;s more efficient to use single-quotes for raw strings: 

@sentence = 'Jackdaws love my big sphinx of quartz'
redirect_to :index =&#38;gt; 'action'

Pretty Please, with sugar [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some things about Ruby Strings that may have escaped your attention - if you were introduced to Ruby <i>via</i> Rails</p>
<h3>Efficiency</h3>
<p>Since Ruby scans double-quoted strings for variables and escape sequences, it&#8217;s more efficient to use single-quotes for raw strings: </p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#0066ff; font-weight:bold;">@sentence</span> = <span style="color:#996600;">'Jackdaws love my big sphinx of quartz'</span>
redirect_to <span style="color:#ff3333; font-weight:bold;">:index</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#996600;">'action'</span></pre></div></div>

<h3>Pretty Please, with sugar on top &#8230;</h3>
<p>Split your strings across multiple lines. No backslashes required (sorry, couldn&#8217;t resist that !).</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">sql_query = <span style="color:#996600;">&quot;SELECT [column]
                 FROM [table]
                 WHERE [condition]
-- sql comment goes here&quot;</span></pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># Q = double-quotes, embed variables </span>
<span style="color:#008000; font-style:italic;"># q = single-quotes</span>
sql_query = <span style="color:#006600; font-weight:bold;">%</span>Q<span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#CC0066; font-weight:bold;">SELECT</span> <span style="color:#0066ff; font-weight:bold;">@columnname</span>
                 FROM <span style="color:#0066ff; font-weight:bold;">@tablename</span>
                 WHERE <span style="color:#0066ff; font-weight:bold;">@conditions</span><span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#008000; font-style:italic;"># You may use [ &amp;lt; or (as delimiters instead of {</span></pre></div></div>

<h3>ASCII code</h3>
<p>To obtain the ASCII code for a character, prefix it with a question-mark:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">puts</span> ?B
<span style="color:#008000; font-style:italic;"># =&gt; 66</span></pre></div></div>

<p>Convert it back to a string with: </p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">puts</span> 66.<span style="color:#9900CC;">chr</span>
<span style="color:#008000; font-style:italic;"># =&gt; &quot;B&quot;</span></pre></div></div>

<h3>Concatenation</h3>
<p>Use the <strong>&lt;&lt;</strong> operator to concatenate strings. Where <strong>+=</strong> or <strong>+</strong> create a new copy, <strong>&lt;&lt;</strong> <i>appends</i> to an existing string. Hence, it is more efficient:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">existing <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; <span style="color:#996600;">&quot; end&quot;</span></pre></div></div>

<p>  Instead of:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">existing <span style="color:#006600; font-weight:bold;">+</span>= <span style="color:#996600;">&quot; end&quot;</span></pre></div></div>

<p><i>(<a href="http://blog.codahale.com/2006/04/18/ever-wonder-which-is-the-fastest-way-to-concatenate-strings-in-ruby/" target="_blank">source</a>)</i></p>
<h3>Index a string with a regexp</h3>
<p>You can test a string like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">email = <span style="color:#996600;">&quot;spamandbakedbeans@skit.org&quot;</span>
<span style="color:#9966CC; font-weight:bold;">if</span> email<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">/</span>@<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;I found the first @&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>And this replaces the first match</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">string</span> = <span style="color:#996600;">&quot;jackdaws love my big sphinx of quartz&quot;</span>
<span style="color:#CC0066; font-weight:bold;">string</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">/</span>a<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">'A'</span>
<span style="color:#008000; font-style:italic;"># =&gt; jAckdaws love my big sphinx of quartz</span></pre></div></div>

<p>This replaces the second match</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">string</span> = <span style="color:#996600;">&quot;jackdaws love my big sphinx of quartz&quot;</span>
<span style="color:#CC0066; font-weight:bold;">string</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#40;</span>j<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#006600; font-weight:bold;">+</span><span style="color:#006600; font-weight:bold;">&#40;</span>z<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">/</span>, <span style="color:#006666;">2</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;Z&quot;</span>
<span style="color:#008000; font-style:italic;"># =&gt; jackdaws love my big sphinx of quartZ</span></pre></div></div>

<p>Remember, the regexp matches the <strong>entire string</strong></p>
<h3>Convert hex to integer (sort of)</h3>
<p>Given a string representation of a hexadecimal, <strong>String.hex</strong> returns the corresponding integer:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;0x7b&quot;</span>.<span style="color:#9900CC;">hex</span> <span style="color:#008000; font-style:italic;"># you can omit 0x if you wish</span>
<span style="color:#008000; font-style:italic;"># =&amp;gt; 123</span></pre></div></div>

<h3>Multiply a string</h3>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;&lt;br /&gt;&quot;</span> <span style="color:#006600; font-weight:bold;">*</span> <span style="color:#006666;">3</span>
<span style="color:#008000; font-style:italic;"># =&amp;gt; &quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&quot;</span></pre></div></div>

<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=cnCC-UrWGsA:yDzzJfJ8C5U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=cnCC-UrWGsA:yDzzJfJ8C5U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=cnCC-UrWGsA:yDzzJfJ8C5U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=cnCC-UrWGsA:yDzzJfJ8C5U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=cnCC-UrWGsA:yDzzJfJ8C5U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/08/06/little-things-about-ruby-strings/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Handy Rake tasks for your TODOs</title>
		<link>http://tech.bytefull.com/2007/07/18/handy-rake-tasks-for-your-todos/</link>
		<comments>http://tech.bytefull.com/2007/07/18/handy-rake-tasks-for-your-todos/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 06:26:17 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/07/18/handy-rake-tasks-for-your-todos/</guid>
		<description><![CDATA[Here&#8217;s a rake task to list TODOs in all *.rb files under a Rails application&#8217;s app directory, and another to open them in VIM (or your preferred editor):

require File.expand_path&#40;File.dirname&#40;__FILE__&#41; + &#34;/../../config/environment&#34;&#41;
&#160;
namespace :todo do
  desc 'List TODOs in all .rb files under app/'
  task&#40;:list&#41; do
      FileList&#91;&#34;app/**/*.rb&#34;&#93;.egrep&#40;/TODO/&#41;
  end
&#160;
  [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a rake task to list <strong>TODOs</strong> in all *.rb files under a Rails application&#8217;s <strong>app</strong> directory, and another to open them in VIM (or your preferred editor):</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">expand_path</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;/../../config/environment&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
namespace <span style="color:#ff3333; font-weight:bold;">:todo</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">'List TODOs in all .rb files under app/'</span>
  task<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:list</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      FileList<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;app/**/*.rb&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">egrep</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>TODO<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  desc <span style="color:#996600;">'Edit all TODOs in VIM'</span> <span style="color:#008000; font-style:italic;"># or your favorite editor</span>
  task<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:edit</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      <span style="color:#008000; font-style:italic;"># jump to the first TODO in the first file</span>
      cmd = <span style="color:#996600;">'vim +/TODO/'</span> 
&nbsp;
      filelist = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
      FileList<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;app/**/*.rb&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">egrep</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">/</span>TODO<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|fn,cnt,line| filelist <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> fn<span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
      <span style="color:#008000; font-style:italic;"># will fork a new process and exit, if you're using gvim</span>
      <span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;#{cmd} #{filelist.sort.join(' ')}&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span> 
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Put the above code in a .task file under lib/tasks/, and invoke them with <strong>rake todo:list</strong>, and <strong>rake todo:edit</strong> respectively.</p>
<p>Sample Output of <strong>rake todo:list</strong>:</p>
<pre style="overfloat: scroll">
app/models/xxxx_transaction.rb:13: # TODO: rewrite this ...
app/controllers/membership_controller.rb:98:  # TODO: raise an exception
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=Lxs3XnlrRBQ:kH-FRUSpHyo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=Lxs3XnlrRBQ:kH-FRUSpHyo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=Lxs3XnlrRBQ:kH-FRUSpHyo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=Lxs3XnlrRBQ:kH-FRUSpHyo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=Lxs3XnlrRBQ:kH-FRUSpHyo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/07/18/handy-rake-tasks-for-your-todos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Testing a goldberg-enabled app</title>
		<link>http://tech.bytefull.com/2007/07/16/testing-a-goldberg-enabled-app/</link>
		<comments>http://tech.bytefull.com/2007/07/16/testing-a-goldberg-enabled-app/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 12:39:12 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/07/16/testing-a-goldberg-enabled-app/</guid>
		<description><![CDATA[Goldberg is a great plugin for user/role authentication, with simplistic CMS features and an administrative interface. It wraps itself around your application without adding a single line of code to it.
The Dark Con
But for a plugin that makes authentication so easy, testing really sucks. To boot, a goldberg-enabled application is currently very unintuitive to deploy [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://goldberg.240gl.org/" target="_blank">Goldberg</a> is a <strong>great</strong> plugin for user/role authentication, with simplistic CMS features and an administrative interface. It wraps itself around your application without adding a single line of code to it.</p>
<h3>The Dark Con</h3>
<p>But for a plugin that makes authentication so easy, testing really sucks. To boot, a goldberg-enabled application is currently very unintuitive to deploy (more on that in a separate post).</p>
<p>Once goldberg is installed, your functional/integration tests will fail because goldberg intercepts all url requests and redirects you to <strong>/goldberg/auth/login</strong>. Fret not, here&#8217;s what to do.</p>
<h3>Loading Goldberg&#8217;s data into the test environment</h3>
<p>Goldberg provides two handy rake tasks:</p>
<ul>
<li><strong>rake goldberg:dump_bootstrap</strong> which dumps your goldberg specific data to yaml files under vendor/plugins/goldberg/db/</li>
<li><strong>rake goldberg:load_bootstrap</strong> loads the data, from the yaml files that <strong>dump_bootstrap</strong> created, into your current database environment.</li>
</ul>
<p>Dig into the second task and you&#8217;ll see that it uses a <strong>GoldbergMigration.load_bootstrap</strong> method.</p>
<p>Add this to both your functional and integration tests:</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> setup
  GoldbergMigration.<span style="color:#9900CC;">load_bootstrap</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p> This loads the goldberg-specific data into your test environment. (of course, you need to dump it at least <strong>once</strong> using <strong>rake goldberg:dump_bootstrap</strong> !)</p>
<h3>Integration Tests</h3>
<p>In your integration tests, add the above code to your setup method, and use the below code in your test methods.</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> test_index
&nbsp;
    get <span style="color:#996600;">&quot;/goldberg/auth/login&quot;</span>
    assert_response <span style="color:#ff3333; font-weight:bold;">:success</span>
    post <span style="color:#996600;">&quot;/goldberg/auth/login&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:login</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>:name <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;yourusername&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:password</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;yourpass&quot;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
    follow_redirect!
    assert_response <span style="color:#ff3333; font-weight:bold;">:success</span>
&nbsp;
    <span style="color:#008000; font-style:italic;"># do your testing here</span>
    get <span style="color:#996600;">&quot;yourcontroller/index&quot;</span>
    assert_response <span style="color:#ff3333; font-weight:bold;">:success</span>
    assert_template <span style="color:#996600;">&quot;yourcontroller/index&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<h3>Functional Tests</h3>
<p>Put the following into your setup method and they&#8217;ll run fine.</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> setup
    get <span style="color:#996600;">'goldberg/auth/login'</span> <span style="color:#008000; font-style:italic;"># otherwise @request.session will be empty</span>
    <span style="color:#0066ff; font-weight:bold;">@ouruser</span> = <span style="color:#6666ff; font-weight:bold;">Goldberg::User</span>.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:first</span>, <span style="color:#ff3333; font-weight:bold;">:conditions</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'name=&quot;yourusername&quot;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#6666ff; font-weight:bold;">Goldberg::AuthController</span>.<span style="color:#9900CC;">set_user</span><span style="color:#006600; font-weight:bold;">&#40;</span>@request.<span style="color:#5A0A0A; font-weight:bold;">session</span>, <span style="color:#0066ff; font-weight:bold;">@ouruser</span>.<span style="color:#9900CC;">id</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>The downside to this is that calling <strong>GoldbergMigration.load_bootstrap</strong> for every test method slows down your tests, as it reads the .yml files from disk everytime. Awful, I know. But I can&#8217;t find a better way.</p>
<h3>Don&#8217;t forget</h3>
<p>Before you run your tests, don&#8217;t forget to create the proper goldberg tables in your test database: run &#8216;<strong>rake RAILS_ENV=test goldberg:plugin_migrations</strong>&#8216;. Also, I am assuming you have used goldberg&#8217;s admin interface to create a user to test with - you have, haven&#8217;t you ?</p>
<h3>Live Free and DRY Hard</h3>
<p>For my project, I created two helper methods in <strong>test_helper.rb</strong> called goldberg_setup and goldberg_migrate. The first method has the single line (<strong>GoldbergMigration.load_bootstrap</strong>) and the second one has the code that the functional tests require.</p>
<h3>For those who know not</h3>
<p>The <a href="http://goldberg.240gl.org/" target="_blank">goldberg plugin</a>, currently at version 0.2.1, is under active development, and the authors are active at the <a href="http://forum.goldberg.240gl.org/">Goldberg community forum</a>.</p>
<p><em>Thanks to <a href="http://forum.goldberg.240gl.org/viewtopic.php?t=195&amp;highlight=functional" target="_blank">unclecheese</a> whose travails preceded mine.</em></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=RgEE4kJ-hp0:_URcGW7rmYU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=RgEE4kJ-hp0:_URcGW7rmYU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=RgEE4kJ-hp0:_URcGW7rmYU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=RgEE4kJ-hp0:_URcGW7rmYU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=RgEE4kJ-hp0:_URcGW7rmYU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/07/16/testing-a-goldberg-enabled-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Link: Guide to Rails+Nginx+Mongrel on Ubuntu Feisty Fawn Server</title>
		<link>http://tech.bytefull.com/2007/07/13/link-guide-to-rails-deployment-on-ubuntu/</link>
		<comments>http://tech.bytefull.com/2007/07/13/link-guide-to-rails-deployment-on-ubuntu/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 08:50:51 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/07/13/link-guide-to-rails-deployment-on-ubuntu/</guid>
		<description><![CDATA[I found a nice guide (view as a pretty pastie) to deploying rails, mongrel and nginx on an Ubuntu Feisty Fawn Server. Its not verbose, but it is pretty helpful if you&#8217;re deploying your first rails app.
Be sure to customize it to your requirements.
]]></description>
			<content:encoded><![CDATA[<p>I found <a href="http://railswatcher.com/2007/6/19/ubuntu-feisty-deployment-server" target="_blank">a nice guide</a> (<a href="http://pastie.caboo.se/78532" target="_blank">view as a pretty pastie</a>) to deploying rails, mongrel and nginx on an Ubuntu Feisty Fawn Server. Its not verbose, but it is pretty helpful if you&#8217;re deploying your first rails app.</p>
<p>Be sure to customize it to your requirements.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=KOXhGvapPPM:402Hqggvhd0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=KOXhGvapPPM:402Hqggvhd0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=KOXhGvapPPM:402Hqggvhd0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=KOXhGvapPPM:402Hqggvhd0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=KOXhGvapPPM:402Hqggvhd0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/07/13/link-guide-to-rails-deployment-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hack: Redefine a rails model for a rake task</title>
		<link>http://tech.bytefull.com/2007/06/17/redefine-rails-model-for-rake/</link>
		<comments>http://tech.bytefull.com/2007/06/17/redefine-rails-model-for-rake/#comments</comments>
		<pubDate>Sun, 17 Jun 2007 10:04:38 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/06/17/redefine-rails-model-for-rake/</guid>
		<description><![CDATA[Well, this is weird.
I wrote a rake task to import data from a csv file (output from a legacy system) into my development database for testing. The catch was that I wanted to extend my model class by adding a custom method only in the rake file.

require File.expand_path&#40;File.dirname&#40;__FILE__&#41; + &#34;/../../config/environment&#34;&#41;
&#160;
class Customer &#60; ActiveRecord::Base
  def [...]]]></description>
			<content:encoded><![CDATA[<p>Well, this is weird.</p>
<p>I wrote a rake task to import data from a csv file (output from a legacy system) into my development database for testing. The catch was that I wanted to extend my model class by adding a custom method <strong>only in the rake file</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">expand_path</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">dirname</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">__FILE__</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#996600;">&quot;/../../config/environment&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> Customer <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> my_custom_method
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>But here, for some reason, rake tries to define a _new_ activerecord model, not redefine the existing model I’ve written. So, what I tried was to precede the class definition with:</p>

<div class="wp_syntax"><div class="code"><pre class="rails rails" style="font-family:monospace;">c = Customer.<span style="color:#5A0A0A; font-weight:bold;">new</span> <span style="color:#008000; font-style:italic;"># which really goes to waste</span></pre></div></div>

<p>and it worked ! Rake now recognizes that I&#8217;m trying to add a method to my existing rails model !</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=g22YaEBovNo:fdIZyqzXHwk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=g22YaEBovNo:fdIZyqzXHwk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=g22YaEBovNo:fdIZyqzXHwk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=g22YaEBovNo:fdIZyqzXHwk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=g22YaEBovNo:fdIZyqzXHwk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/06/17/redefine-rails-model-for-rake/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Initial experience of Safari for Windows</title>
		<link>http://tech.bytefull.com/2007/06/13/initial-experience-safari-for-window/</link>
		<comments>http://tech.bytefull.com/2007/06/13/initial-experience-safari-for-window/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 06:58:52 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/06/13/initial-experience-safari-for-window/</guid>
		<description><![CDATA[I tried out Apple&#8217;s Safari for Windows (beta). It&#8217;s not bad at all.
However, I did uncover the annoyance of being unable to minimize it by clicking on the taskbar ! You have to either use the shortcut CTRL+M or Windows+D. Worse, when you maximize it, the window is &#8216;restored&#8216; instead of being maximized. I hope [...]]]></description>
			<content:encoded><![CDATA[<p>I tried out Apple&#8217;s <a href="http://www.apple.com/safari" target="_blank">Safari for Windows (beta)</a>. It&#8217;s not bad at all.</p>
<p>However, I did uncover the annoyance of being unable to minimize it by clicking on the taskbar ! You have to either use the shortcut CTRL+M or Windows+D. Worse, when you maximize it, the window is &#8216;<span class="Apple-style-span" style="font-weight: bold">restored</span>&#8216; instead of being maximized. I hope they fix this in the final release.</p>
<p>I would like:</p>
<ul>
<li>To view RSS item headings in a menu as in firefox. Safari opens an admittedly nifty Feed Viewer with all the feed items. But I&#8217;d really like to see the headlines at a glance.</li>
<li>To use CTRL+TAB to cycle through the tabs instead of the given shortcut, which is CTRL+{ or CTRL+}. On my keyboard, this entails pressing three keys: CTRL + SHIFT + [</li>
<li>A lighter theme ? The current one is too dark and gray. An option to switch to the Macintosh theme would be nice.</li>
<li>To be able to <span class="Apple-style-span" style="font-weight: bold">click</span> on an item in the auto-completion menu for the address bar. You <span class="Apple-style-span" style="font-weight: bold">have</span> to press ENTER in Safari.</li>
<li>The status bar to be visible, by default, upon installation.</li>
</ul>
<p>Otherwise, I like Safari.</p>
<ul>
<li>Compared to IE, Safari is swift (to the naked eye).</li>
<li>Font smoothing is configurable.</li>
<li>There is an amnesiac mode called Private Browsing where, like TorPark, Safari does not record anything in the History or Downloads and form entries are not saved in AutoFill.</li>
<li>History items are accessible date-wise from a recursive menu (History -&gt; &#8216;Wednesday, June 13th 2007&#8242; -&gt; Item &#8230;. ), which, in my opinion, is far easier than opening a sidebar and navigating a tree menu.</li>
<li>I haven&#8217;t noticed any website rendering incorrectly, so far.</li>
</ul>
<p>I need Firebug at work, so I&#8217;ll probably stay with Firefox. I&#8217;m on Linux at home, so I don&#8217;t have the option of Safari there.</p>
<p>That said, I&#8217;ll definitely give Safari&#8217;s final release another chance.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=2AWxnNh-B8U:u3BCeGVB5_k:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=2AWxnNh-B8U:u3BCeGVB5_k:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=2AWxnNh-B8U:u3BCeGVB5_k:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=2AWxnNh-B8U:u3BCeGVB5_k:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=2AWxnNh-B8U:u3BCeGVB5_k:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/06/13/initial-experience-safari-for-window/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rails oddity: created_at not auto-updated in fixtures</title>
		<link>http://tech.bytefull.com/2007/06/12/rails-created-at-behaviour/</link>
		<comments>http://tech.bytefull.com/2007/06/12/rails-created-at-behaviour/#comments</comments>
		<pubDate>Tue, 12 Jun 2007 08:49:37 +0000</pubDate>
		<dc:creator>highandwild</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://tech.bytefull.com/2007/06/12/rails-created-at-behaviour/</guid>
		<description><![CDATA[Today I discovered the following Rails oddity.
Models created in a test fixture don&#8217;t have their created_at attributes auto-updated. They need to be specified like this:
     created_at: &#60;%=Time.now.to_s(:db)%&#62;

Thanks to toretore on #rubyonrails (irc.freenode.net) for this tip.
]]></description>
			<content:encoded><![CDATA[<p>Today I discovered the following Rails oddity.</p>
<p>Models created in a test fixture don&#8217;t have their created_at attributes auto-updated. They need to be specified like this:</p>
<blockquote><p><strong>     created_at: <font color="#339966">&lt;%=Time.now.to_s(:db)%&gt;</font><font color="#339966"><br />
</font></strong></p></blockquote>
<p>Thanks to <em>toretore</em> on <em>#rubyonrails (irc.freenode.net)</em> for this tip.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=MMrGTKBcs3w:udv4kKtNgeg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=MMrGTKBcs3w:udv4kKtNgeg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=MMrGTKBcs3w:udv4kKtNgeg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?i=MMrGTKBcs3w:udv4kKtNgeg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?a=MMrGTKBcs3w:udv4kKtNgeg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/BytefullOfTechtalk?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://tech.bytefull.com/2007/06/12/rails-created-at-behaviour/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
