<?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>Nicholas' Blog</title>
	<atom:link href="http://www.ozmox.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ozmox.com</link>
	<description>adventures in Ruby and Ruby on Rails programming</description>
	<lastBuildDate>Sun, 29 Aug 2010 14:57:23 +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>Blurry Fonts on External Monitor with MacBook Pro</title>
		<link>http://www.ozmox.com/2010/08/29/blurry-fonts-on-external-monitor-with-macbook-pro/</link>
		<comments>http://www.ozmox.com/2010/08/29/blurry-fonts-on-external-monitor-with-macbook-pro/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 13:33:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[MacOS X]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=492</guid>
		<description><![CDATA[I don&#8217;t know if you have the same problem as me, but when I plug my MacBook Pro into my HP w2338h monitor the fonts are not as crisp as on the laptop itself.  I found out that there&#8217;s a bug in how Mac OS X detects whether it should use font smoothing or not [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if you have the same problem as me, but when I plug my MacBook Pro into my HP w2338h monitor the fonts are not as crisp as on the laptop itself.  I found out that there&#8217;s a bug in how Mac OS X detects whether it should use font smoothing or not for certain external monitors. It&#8217;s not a problem if you&#8217;re using an Apple monitor (obviously their stuff works perfectly with their own stuff), but not all of us as so fortunate to shell out that kind of cash.</p>
<p>You can easily fix this by typing the following into your command line:</p>
<pre><code>defaults -currentHost write -globalDomain AppleFontSmoothing -int 2
</code></pre>
<p>&nbsp;<br/><br />
You can try int 1 to 3 (to play with various levels of font smoothing, I found 2 to work best for me).  To remove the setting just open the Appearance app (inside the Control Panel) and at the bottom you&#8217;ll see LCD font smoothing with a [-] inside, click it off and back on and it&#8217;ll show up as an [x] (and you&#8217;ll be back to where you started).</p>
<p>You may have to quit and restart your application before you see the effect.  I tested it out using my terminal application since that&#8217;s something I use quite a lot and not having nice smooth fonts in it makes me cry.  </p>
<p>Below are two screen shots to demonstrate the difference.  Notice how the first image shows 3 columns of text, while the second only two.  This is because in the first screen shot (with no font-smoothing) the fonts take up just a few pixels less space, as smoothing adds a few pixels to each font to fill them out so they&#8217;re more readable on an LCD screen.</p>
<p style="text-align: center;"><a href="http://www.ozmox.com/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-8.09.13-AM.png"></a></p>
<div id="attachment_497" class="wp-caption aligncenter" style="width: 529px"><a href="http://www.ozmox.com/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-8.22.23-AM.png"><img class="size-full wp-image-497 " title="Before Proper Font Smoothing" src="http://www.ozmox.com/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-8.22.23-AM.png" alt="before tweaking fonts appear incomplete and with fuzzy edges" width="519" height="250" /></a><p class="wp-caption-text">Before tweaking fonts appear incomplete and with fuzzy edges.</p></div>
<p>The screenshot below matches what I normally see on my montior&#8217;s laptop.  Fonts are bold and character are filled out fully (no fuzzy edges, offsets or bleeding).</p>
<div id="attachment_498" class="wp-caption aligncenter" style="width: 529px"><a href="http://www.ozmox.com/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-8.24.11-AM.png"><img class="size-full wp-image-498 " title="With Proper Font Smoothing" src="http://www.ozmox.com/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-8.24.11-AM.png" alt="after tweaking the fonts are properly smoothed on my external monitor" width="519" height="250" /></a><p class="wp-caption-text">After tweaking the fonts are properly smoothed on my external monitor.</p></div>
<p><a href="http://www.ozmox.com/wp-content/uploads/2010/08/Screen-shot-2010-08-29-at-8.11.38-AM.png"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/08/29/blurry-fonts-on-external-monitor-with-macbook-pro/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LSRC 2010 &#8211; Day 2</title>
		<link>http://www.ozmox.com/2010/08/28/lsrc-2010-day-2/</link>
		<comments>http://www.ozmox.com/2010/08/28/lsrc-2010-day-2/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 01:43:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[apotomo]]></category>
		<category><![CDATA[cells]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[hydra]]></category>
		<category><![CDATA[padrino]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=489</guid>
		<description><![CDATA[Below are my notes from the second day at LSRC. Faster Test Suites Nick Gauthier gave an impressive talk on reducing the execution time of a test suite.  The original suite took over 15 minutes to run.  Using factory_girl, shoulda and paperclip, he strongly recommended empty DB testing (no fixtures, all tests setup and tear [...]]]></description>
			<content:encoded><![CDATA[<p>Below are my notes from the second day at LSRC.</p>
<h2>Faster Test Suites</h2>
<p>Nick Gauthier gave an impressive talk on reducing the execution time of a test suite.  The original suite took over 15 minutes to run.  Using factory_girl, shoulda and paperclip, he strongly recommended empty DB testing (no fixtures, all tests setup and tear down their objects/records), and the use of &#8220;no side-effect&#8221; test blocks.</p>
<p>Switching to the use of fast_context the execution time was brought down to 5 minutes.  Using perf_tools he found that calls to ImageMagic (from Paperclip) were calling out to the shell, taking a lot of time.  So he mocked those calls and brought it down to 3 minutes.</p>
<p>Using Hydra to do multi-core (concurrent) testing he brought execution time down to 1 minute.</p>
<p>Hydra is easy to set-up (no sockets or daemons to configure).  Just add a Rake task and configuration yml and you&#8217;re ready to use it.</p>
<p>When you run Test::Unit the Rails environment is loaded 4 times!!  Cucumber loads the environment twice.  RSpec and Hydra load it just once.</p>
<p>Further tweaking EXT4 journal_data_writeback and atime (access time) on the file system he got testing down to just 50 seconds.  Using Ruby Enterprise Edition (with the tmalloc) and more tweaks (this time to the Ruby _HEAP and _GC settings) he had tests running in 18 seconds.  A 4417% increase in performance!!</p>
<p><em>Check the comments below for a link to Nick&#8217;s presentation slides.  He&#8217;s been kind enough to provide the link!</em></p>
<h2>Searchability</h2>
<p>Luigi Montanez gave an insightful presentation on SEO.  He doesn&#8217;t believe that you have to be an &#8220;expert&#8221; in SEO.  You simply need to have good content and Google (or Bing) will handle the rest.  There are some things you can do though to make sure you don&#8217;t sabotage your pages when crawlers visit them.</p>
<p>Make sure you have a sitemap.xml (sitemaps.org) and a robots.txt (robotstxt.org).  These help crawlers know what to pay attention to and what to ignore.  Make sure you use either a www or non-www domain.  If you have both choose one and redirect to it.  You don&#8217;t want to have the site indexed under both.</p>
<p>When redirecting make sure you use 302 and 301 appropriately.  302 is for a temporary redirect, and Google/Bing will not index the page it&#8217;s redirected to.  Use 301 instead, if your intention is to have the page permanently moved.  Be cautious too because many web frameworks will use a 302 by default, instead of a 301.</p>
<p>Do not change your content by region, nor require cookies for someone to view content.  Also page titles are very important.  Always follow the &#8220;Page Title | Site Title&#8221; style (or you can replace | with a &#8211; or some other delimiter, just be consistent).</p>
<p>In your URLs dashes (-) are word separators, underscores (_) are not!  Make sure you are using dashes in your URLs!!  Take advantage of meta tagging, and Google Webmaster Tools.</p>
<p>Takeaway:</p>
<ul>
<li>Think like a searcher (search engine: crawler, index, rank)</li>
<li>Optimize your title tags (they are the most important thing)</li>
<li>Use Google Webmaster Tools (it provides valuable insight)</li>
</ul>
<h2>Components</h2>
<p>Nick Sutterer gave a cool demonstration of Cells and Apotomo.  They allow you to create stateful widgets in your Rails views.</p>
<h2>Padrino</h2>
<p>Joshua Hull gave a talk on Padrino, another web framework built on top of Sinatra.  It takes a minimalist style approach (take what you need).  It&#8217;s light-weight and fast.  It has all the basic stuff you&#8217;d expect of  web framework including a simple mailer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/08/28/lsrc-2010-day-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Elegance of Ruby</title>
		<link>http://www.ozmox.com/2010/08/28/the-elegance-of-ruby/</link>
		<comments>http://www.ozmox.com/2010/08/28/the-elegance-of-ruby/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 13:10:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java ruby]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=482</guid>
		<description><![CDATA[Take this simple example of sorting an array of names in Java vs. Ruby: // in Java with import java.util.*; (so we can use the sort method) String names[] = {"Nicholas", "Calvin", "Tank", "Karen", "Amanda"}; Arrays.sort(names); System.out.println("The names sorted:"); for (int dex = 0; dex &#60; names.length; dex++) { System.out.println(dex + ":" + names[dex]); } [...]]]></description>
			<content:encoded><![CDATA[<p>Take this simple example of sorting an array of names in Java vs. Ruby:</p>
<pre>// in Java with import java.util.*; (so we can use the sort method)
String names[] = {"Nicholas", "Calvin", "Tank", "Karen", "Amanda"};
Arrays.sort(names);
System.out.println("The names sorted:");
for (int dex = 0; dex &lt; names.length; dex++) {
    System.out.println(dex + ":" + names[dex]);
}

# in Ruby
names = %w(Nicholas Calvin Tank Karen Amanda)
names.sort.each_with_index { |x, idx| puts "#{idx}:#{x}" }

0:Amanda
1:Calvin
2:Karen
3:Nicholas
4:Tank
</pre>
<p><br/></p>
<p>Both produce the same output, but Ruby handles Array and enumeration a lot better imho.  The code is simpler and you don&#8217;t have to deal with silly for loops or include any special utility libraries.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/08/28/the-elegance-of-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LSRC 2010 &#8211; Day 1</title>
		<link>http://www.ozmox.com/2010/08/27/lsrc-2010-day-1/</link>
		<comments>http://www.ozmox.com/2010/08/27/lsrc-2010-day-1/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 01:18:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=479</guid>
		<description><![CDATA[Had a great info-filled day today at LSRC.  It&#8217;s my 3rd year attending.  Below are some of the highlights of the different talks I attended: Real Software Engineering Glenn Vanderburg gave a great opening talk about software engineering.  he said software engineering doesn&#8217;t work.  He explores the roots of the idea of &#8220;software engineering&#8221; all [...]]]></description>
			<content:encoded><![CDATA[<p>Had a great info-filled day today at LSRC.  It&#8217;s my 3rd year attending.  Below are some of the highlights of the different talks I attended:</p>
<h2>Real Software Engineering</h2>
<p>Glenn Vanderburg gave a great opening talk about software engineering.  he said software engineering doesn&#8217;t work.  He explores the roots of the idea of &#8220;software engineering&#8221; all the back to the first NATO Software Engineering Conference on the subject.  At the conference they described best practices as:</p>
<ol>
<li>A software system is best designed if tests are interlaced with the software as it&#8217;s developed, rather than at the end.</li>
<li>Creates a simulation which matches the requirements, contains the control which organizes the design of the system.</li>
<li>Through successive repetitions of testing and design, the model ultimately becomes the software system itself.</li>
</ol>
<p>Sound familiar?  He then talks about what went wrong, how did we start with what sounds like Agile and ended up with waterfall.  He talked about how the creator of waterfall process (Winston W. Royce) actually was trying to express he didn&#8217;t feel it worked.  His paper was so poorly written though that people (paying attention mostly to the fancy diagrams, and not the text) believed he was in favor of it.</p>
<p>Cost is *always* an object, and engineering is about what you can do with a dollar vs. what a &#8220;bumbler&#8221; can do with two.  Mathematical models are not supposed to be about correctness, but about saving on costs.  In traditional engineering you create models because it&#8217;s expensive to use up materials, labor, etc.  In software these things are extremely cheap and expendable, so mathematical models are less important.</p>
<p>Engineering is a science AND art.  It involves designing AND making, with cost AND elegance balanced.</p>
<p>Don&#8217;t build software as if it were bridges.  The source code *is* the design!  Customers are not paying for the source code.  It is the design of the software system.  Programs themselves are the models.  The customer in the end desires working software.</p>
<h2>How to Build Awesome Teams</h2>
<p>The guys from Hashrocket talked about their hiring process and what they felt made for great teams, core ideas:</p>
<ul>
<li>Hiring</li>
<li>Transparency</li>
<li>Community</li>
<li>Methodology</li>
<li>Environment</li>
</ul>
<p>They frown on:</p>
<ul>
<li>Micro-management</li>
<li>Penny pinching (they still budget)</li>
<li>Death marches</li>
<li>Meetings (daily stand-up, monthly mission control)</li>
<li>Hierarchy</li>
<li>Future-proofing</li>
</ul>
<p>When they hire candidates they look for people who are smart and get things done.  They look for individuals who like to communicate, participate and contribute back to the community.  They need to be a cultural fit.  They look at their online presence, see what they&#8217;re Twittering about, review their work on GitHub (code, commit hygiene, etc).  They also require a candidate to subject themselves to a week long interview, where they pair program and go to after-hours with the team.</p>
<h2>Keynote: Tom Preston-Werner (GitHub)</h2>
<p>Today everyone can start a business on their computer.  What you need though is an idea.</p>
<ul>
<li>go to user groups (learn about people&#8217;s problems)</li>
<li>drink (seriously, it makes you honest)</li>
<li>find people you can work with (co-founders)</li>
<li>build something you love (that inspires you)</li>
<li>look for untapped potential (who are the early adopters, and how awesome can it become?)</li>
<li>keep your day job (not having time is a poor excuse)</li>
<li>fight entropy (keep it simple, and get stuff done)</li>
<li>ship it (or you might as well not exist) [<a href="http://shipitsquirrel.github.com/">ship it squirrel</a>]</li>
<li>charge money (investors only care about money, not your company, so make customers your investors)</li>
<li>have fun! (&#8220;drink-ups&#8221; where drinking is sponsored)</li>
<li>never give it up (it&#8217;s going to be hard, don&#8217;t let fear hold you back)</li>
</ul>
<p>If you want to have a $100,000 a year salary, you just need to get about 500 subscriptions at $12/mo (with a few premium or mid-level price options).  It&#8217;s totally realistic and in your grasp.  Don&#8217;t be afraid of not knowing something &#8230; people just like you started out with just an idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/08/27/lsrc-2010-day-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compile Your Own VIM</title>
		<link>http://www.ozmox.com/2010/08/22/compile-your-own-vim/</link>
		<comments>http://www.ozmox.com/2010/08/22/compile-your-own-vim/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 15:33:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=469</guid>
		<description><![CDATA[VIM is a powerful text editor that is available across all platforms.  While TextMate is awesome for MacOS X, no question, not all of us can work in TextMate 100% of the time.  (For example, at work I have to use a Linux desktop system to develop my code, no TextMate for me.)  I personally [...]]]></description>
			<content:encoded><![CDATA[<p>VIM is a powerful text editor that is available across all platforms.  While TextMate is awesome for MacOS X, no question, not all of us can work in TextMate 100% of the time.  (For example, at work I have to use a Linux desktop system to develop my code, no TextMate for me.)  I personally find it easiest to just focus on getting very familiar with one text editor, rather than constantly switch contexts, so I stick with VIM (since it&#8217;s available anywhere).</p>
<h2>Getting and Configuring VIM</h2>
<p>You can compile your own version of VIM (this is recommended) to make sure you have all the features and you can include Ruby Interpreter support by using [you can use CURL  or even just a ftp or web browser to get the archive, you may also need to run the make install as sudo unless you are already root]:</p>
<pre>mkdir src
cd src
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
./configure --with-features=huge --enable-cscope --enable-rubyinterp
make
make install</pre>
<p><br/><br />
Unless you&#8217;re on a wimpy system you&#8217;ll want to do nothing less than huge.  This will install vim and related files to /usr/local/bin (unless you specified otherwise when configuring).</p>
<h2>Additional Information</h2>
<p><a href="http://www.peepcode.com/"><span style="color: #000000;">PeepCode</span></a> has some great videos on how to use VIM, for sale.  You can also a find some good ones on YouTube that are free, but your time/mileage may vary.</p>
<p><a href="http://github.com/tpope">Tim Pope</a> also maintains a great collection of VIM plugins that are useful for Ruby/Rails developers.</p>
<pre><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;"><span style="line-height: 19px; white-space: normal; font-size: small;"><span style="font-size: small;">
</span></span></span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/08/22/compile-your-own-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rollback with Yum History</title>
		<link>http://www.ozmox.com/2010/07/08/rollback-with-yum-history/</link>
		<comments>http://www.ozmox.com/2010/07/08/rollback-with-yum-history/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 12:29:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[linux os]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=462</guid>
		<description><![CDATA[Ever want to install software and find out your missing libraries? So you go and install all the libraries and dependencies.  Then afterwards you decide you don&#8217;t want the software after all. You&#8217;ve installed megabytes worth of packages and dependencies.  You want to get back to your previous state, but are not quite sure what [...]]]></description>
			<content:encoded><![CDATA[<p>Ever want to install software and find out your missing libraries? So you go and install all the libraries and dependencies.  Then afterwards you decide you don&#8217;t want the software after all. You&#8217;ve installed megabytes worth of packages and dependencies.  You want to get back to your previous state, but are not quite sure what needs to be removed. Now what do you do? You can&#8217;t remember what was installed or all the dependencies that came with those packages, but you roughly remember the day and time you played around with the new software.</p>
<p>This is where yum history comes to the rescue.  (If you&#8217;re using a RPM friendly flavor of Linux, like Fedora or RedHat). You can get a history of what was installed by using</p>
<pre>$&gt; sudo yum history

Loaded plugins: presto, refresh-packagekit
ID | Login user      | Date and time    | Action(s) | Altered
---------------------------------------------------------------
47 | System &lt;unset&gt;  | 2010-07-08 11:54 | Update    |   11   
46 | &lt;nicholas&gt;      | 2010-07-07 22:53 | Update    |    2   
45 | &lt;nicholas&gt;      | 2010-07-07 22:50 | Install   |   49
44 | &lt;nicholas&gt;      | 2010-07-03 18:52 | Install   |    8
...more
</pre>
<p>You can then find out what was installed that day and remove it:</p>
<pre>$&gt; sudo yum history undo 45</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/07/08/rollback-with-yum-history/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Back into the Flow</title>
		<link>http://www.ozmox.com/2010/05/08/getting-back-into-the-flow/</link>
		<comments>http://www.ozmox.com/2010/05/08/getting-back-into-the-flow/#comments</comments>
		<pubDate>Sat, 08 May 2010 15:07:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Off-topic]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/2010/05/08/getting-back-into-the-flow/</guid>
		<description><![CDATA[Sorry I have not been keeping up with my blog writing. I&#8217;ll use the regular life has been hectic excuse. At work we have been pushing to hire some new folks, released two new websites and a ton of other things. I am going to try and finish up my new article series on Cucumber [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry I have not been keeping up with my blog writing.  I&#8217;ll use the regular life has been hectic excuse.  At work we have been pushing to hire some new folks, released two new websites and a ton of other things.  </p>
<p>I am going to try and finish up my new article series on Cucumber in the next couple of weeks, that I started back a few months ago.  Thank you always for the comments, seeing people comment and visiting my blog helps inspire me to write more often.  </p>
<p>I&#8217;m also considering adding a politics tab for my ranting on current news and the like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/05/08/getting-back-into-the-flow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixing Rails 3 Beta &#8216;Invalid .gemspec format&#8217; Errors</title>
		<link>http://www.ozmox.com/2010/02/07/fixing-rails-3-beta-invalid-gemspec-format-errors/</link>
		<comments>http://www.ozmox.com/2010/02/07/fixing-rails-3-beta-invalid-gemspec-format-errors/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 14:51:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=450</guid>
		<description><![CDATA[If you&#8217;ve tried out Rails 3 on Ruby 1.9.1 (like myself) you might of noticed that a lot of errors are being sent to stderr, it&#8217;ll look something like this: Ozawa Sakuro has posted a fix for this on GitHub.  You can see the original thread here, or simply follow the directions below to quickly [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve tried out Rails 3 on Ruby 1.9.1 (like myself) you might of noticed that a lot of errors are being sent to stderr, it&#8217;ll look something like this:</p>
<p><a style="text-decoration: none;" href="http://www.ozmox.com/wp-content/uploads/2010/02/Screen-shot-2010-02-07-at-8.38.52-AM.png"><img class="aligncenter size-medium wp-image-451" title="Rails 3 .gemspec warnings printing to stderr" src="http://www.ozmox.com/wp-content/uploads/2010/02/Screen-shot-2010-02-07-at-8.38.52-AM-300x190.png" alt="" width="300" height="190" /></a></p>
<p><a href="http://github.com/sakuro" target="_blank">Ozawa Sakuro</a> has posted a fix for this on GitHub.  You can see the <a href="http://github.com/carlhuda/bundler/issues/issue/24" target="_blank">original thread</a> here, or simply follow the directions below to quickly fix it without trolling through the entire discussion:</p>
<p>1.  Edit <strong>lib/bundler.rb</strong>:</p>
<pre>4: require 'bundler/rubygems-ext'  # originally 'bundler/rubygems'</pre>
<p>2. Next rename <strong>lib/bundler/rubygems.rb</strong> to <strong>rubygems-ext.rb</strong> and then edit the file and wrap the require in a control structure as shown below:</p>
<pre>1: unless defined? Gem
2:   require 'rubygems'
3:   require 'rubygems/specification'
4: end</pre>
<p>I&#8217;ve tested this fix and it works with Bundler 0.9.3.  Version 0.9.4 resolves the issue (thanks for the update Christian).  In any event I hope this little nugget of information helps reduce the hair pulling.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/02/07/fixing-rails-3-beta-invalid-gemspec-format-errors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Know What You&#8217;re Eating?</title>
		<link>http://www.ozmox.com/2010/01/03/know-what-youre-eating/</link>
		<comments>http://www.ozmox.com/2010/01/03/know-what-youre-eating/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 21:17:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cooking]]></category>
		<category><![CDATA[Off-topic]]></category>
		<category><![CDATA[food industry]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=437</guid>
		<description><![CDATA[A lot of us take on new year&#8217;s resolutions to exercise and try to be more healthy. You might be better off saving the money on the gym membership that statistically you&#8217;ll lose money on (and believe me they all know it and bank on it). Try instead to take a look at what you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of us take on new year&#8217;s resolutions to exercise and try to be more healthy. You might be better off saving the money on the gym membership that statistically you&#8217;ll lose money on (and believe me they all know it and bank on it). Try instead to take a look at what you&#8217;re eating&#8230;</p>
<p>I&#8217;m as guilty as anyone keeping a stash of Chili Fritos (a favorite here in Texas) corn chips in my desk at work. This year I&#8217;m going to try and be more conscience as to what I&#8217;m eating though. I&#8217;ve come to understand over the last part of 2009 (especially due to Michael Pollan&#8217;s book &#8216;In Defense of Food&#8217; and the recession, people losing their livelihoods because of corrupt politicians and businessmen). You choice of food doesn&#8217;t only affect your health, but it affects your local economy and the livelihoods of people worldwide.</p>
<p>Would you eat something with the following ingredients?</p>
<div id="_mcePaste"><strong>Rice flour, corn, sunflower oil with vitamin-e and anti-oxidents, salt, corn starch, cheddar and blue cheese (cured milk, salt, enzymes, yellow-orange food additive), dense oil (similar to saturated fat)*, butter (cream, salt), MSG (a flavor enhancer), preservative, anti-caking agent, anti-caking agent, preservative, edible glue, lab-created flavors, yellow-orange food additive.</strong></div>
<div><strong><br />
</strong></div>
<div><strong><span style="font-weight: normal;">Ok, what if I told you that the above were actual ingredients from Quaker&#8217;s Quakes Rice Snacks, only not in the way they list them:</span></strong></div>
<div><strong><span style="font-weight: normal;"><br />
</span></strong></div>
<pre>Rice flour, corn, sunflower oil with natural tocopherols added, whey, 
salt, maltodextrin, cheddar and blue cheese (cured milk, salt, enzymes,
annatto extract), partially hydrogenated soybean and cottenseed oil*,
butter (cream, salt), monosodium glutamate, lactic acid, disodium
phosphate, tricalcium phosphate, citric acid, gum arabic, 
natural flavors, annatto extract. *Adds a dietary insignificant
amount of trans fat.</pre>
<p>Eating is more than just about your health.  Food isn&#8217;t just to provide nutrients.  Food should be eaten for pleasure, community and identity.  It should engage you with the natural world and make you appreciate and respect life.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/01/03/know-what-youre-eating/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing a Cucumber Feature</title>
		<link>http://www.ozmox.com/2010/01/02/writing-a-cucumber-feature/</link>
		<comments>http://www.ozmox.com/2010/01/02/writing-a-cucumber-feature/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 17:19:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[story-writing]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.ozmox.com/?p=422</guid>
		<description><![CDATA[This is the second post about Cucumber, where we&#8217;ll be exploring the creation of a feature. Cucumber centers on testing the expected behavior of your application, rather than the expected behavior of a method. I had someone explain to me once, &#8220;unit tests/specs are the methods/implementation you wish you had, Cucumber tests are the application [...]]]></description>
			<content:encoded><![CDATA[<p>This is the second post about Cucumber, where we&#8217;ll be exploring the creation of a feature. Cucumber centers on testing the expected behavior of your application, rather than the expected behavior of a method. I had someone explain to me once, &#8220;unit tests/specs are the methods/implementation you wish you had, Cucumber tests are the application you wish you had.&#8221;</p>
<h2>User Stories</h2>
<p>When thinking about a Cucumber feature you will want to relate it to a user story. If you&#8217;re familiar with Agile development stories are nothing new.  For those who are not though it&#8217;s not too complicated. A story is simply an expression of value generally in the form of:  &#8221;As {a role} I want/need {to do some function} so that {business value}.&#8221; Generally the business value is best expressed in terms of: revenue generation, revenue protection, operational efficiency (cost savings).</p>
<p>For the example we&#8217;ll be using this story:</p>
<p><strong><em>As a workshop co-ordinator I need to manage contact information so I can easily reference individuals and start communications with them.</em></strong></p>
<p>You&#8217;ll notice that this story doesn&#8217;t imply implementation.  You generally never want to imply implementation in a story.  Also you&#8217;ll notice that the story is simple and comprehensible by pretty much anyone (business user, developer, average Joe Public).</p>
<h2>Starting a Feature File</h2>
<p>In our Rails application we&#8217;ll want to go inside our <strong>/features</strong> folder.  Create a new file called <strong>manage_contact.feature</strong>.  At the top of the file type in the following:</p>
<pre>Feature:  Manage Contact
  In order to easily reference individuals and start communications with them
  As a workshop co-ordinator
  I want to manage contact information</pre>
<p>Now we have our first feature.  The next step is to define some scenarios.  Scenarios express various actions the user might take in relation to the feature.  Below are some of the scenarios we came up with for this feature (these go below your feature entry &#8211; indented to be even to the &#8220;In order, As a, I want&#8221; section).  You don&#8217;t need to, but I like listing the scenarios in order of priority, this way a developer working on the feature can just start on top and work downwards:</p>
<pre>Scenario: View list of contacts

Scenario: Add a new contact

Scenario: Email a contact from the list

Scenario: Remove an existing contact

Scenario: Update an existing contact

Scenario: Start an IM conversation with a contact from the list</pre>
<p>Your finished feature file should look something like this <a href="http://gist.github.com/267564" target="_blank">gist</a>. In the next post we&#8217;ll start to look at building out our scenario&#8217;s with step definitions, that is define what behavior we expect to happen with each scenario we have defined.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ozmox.com/2010/01/02/writing-a-cucumber-feature/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
