<?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>Mike Doel</title>
	<atom:link href="http://www.mikedoel.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mikedoel.com/blog</link>
	<description>Thoughts and pictures from central Ohio</description>
	<lastBuildDate>Fri, 15 Jan 2010 03:59:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Codemash slides &#8211; Cucumber Beyond the Basics</title>
		<link>http://www.mikedoel.com/blog/codemash-slides-cucumber-beyond-the-basics</link>
		<comments>http://www.mikedoel.com/blog/codemash-slides-cucumber-beyond-the-basics#comments</comments>
		<pubDate>Fri, 15 Jan 2010 03:59:07 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=145</guid>
		<description><![CDATA[Thanks to the folks at Codemash for the opportunity to present today.
The slides from my presentation are attached here.
]]></description>
			<content:encoded><![CDATA[<p>Thanks to the folks at Codemash for the opportunity to present today.</p>
<p>The slides from my presentation are attached <a href="http://dl.dropbox.com/u/218972/CucumberCodeMash.pdf" >here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/codemash-slides-cucumber-beyond-the-basics/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Resolutions</title>
		<link>http://www.mikedoel.com/blog/the-resolutions</link>
		<comments>http://www.mikedoel.com/blog/the-resolutions#comments</comments>
		<pubDate>Tue, 05 Jan 2010 22:06:53 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=141</guid>
		<description><![CDATA[Since publicly stated goals help encourage accountability, I&#8217;m documenting my goals for the year.  Like everyone else, I fall into the trap of getting overly enthusiastic at the start and set unreasonable expectations.  And with the way I&#8217;m wired, once I fall off the wagon of good habits, I find it hard to [...]]]></description>
			<content:encoded><![CDATA[<p>Since publicly stated goals help encourage accountability, I&#8217;m documenting my goals for the year.  Like everyone else, I fall into the trap of getting overly enthusiastic at the start and set unreasonable expectations.  And with the way I&#8217;m wired, once I fall off the wagon of good habits, I find it hard to get back on.  So, this year, I&#8217;m going to try to keep the goals realistic.</p>
<p>I&#8217;m a believer of the expression &#8220;you can&#8217;t manage what you don&#8217;t measure&#8221;.  In the last couple of years, I&#8217;ve done a decent job of measuring exercise volume (thanks to Nike+), but not the other elements of healthy living.  So, this year, my goals are basically to improve the one area I have already been measuring and start to measure other things I think will lead to overall health:</p>
<ol>
<li>As <a href="http://twitter.com/mikedoel/status/7249428254" >previously committed</a>, I&#8217;m setting a goal of improving my Nike+ workouts by 50% this year &#8211; from 58 to 87 runs.</li>
<li>I&#8217;m also resolving to post monthly counts of four other things that affect my overall health &#8211; physical and mental: healthy meals (currently defined as those that meet the &#8220;Michael Pollan test&#8221;), runs or other form of exercise, hours of television watched, and books completed.</li>
<li>Finally, I&#8217;m going to keep private counts for a couple things of a spiritual nature (e.g. days where I read scripture).  I&#8217;m not a very public person in this regard, so I won&#8217;t be posting about it.  But I want to count my progress anyway.</li>
</ol>
<p>Of course, merely keeping track of counts of things and posting (some of) them regularly isn&#8217;t much of a chore.  But, I&#8217;m obviously planning that this will be something of a trick I play on myself.  If I have to come clean about how many of my meals are good, I&#8217;m hoping I&#8217;ll make better choices about what I eat.  Furthermore, if I fall off the wagon for a bit, this will be easier to get back on.</p>
<p>That&#8217;s the theory anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/the-resolutions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regarding Edgecase</title>
		<link>http://www.mikedoel.com/blog/regarding-edgecase</link>
		<comments>http://www.mikedoel.com/blog/regarding-edgecase#comments</comments>
		<pubDate>Thu, 24 Dec 2009 15:39:32 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=134</guid>
		<description><![CDATA[I mentioned this in my prior post, but I wanted to highlight it on its own.  Not everyone yet understands how modern web development is done and how powerful technologies like Ruby on Rails and its associated ecosystem are.  But one company that does is Edgecase.  They&#8217;ve been our partner on VacationTrade [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned this in my prior post, but I wanted to highlight it on its own.  Not everyone yet understands how modern web development is done and how powerful technologies like Ruby on Rails and its associated ecosystem are.  But one company that does is <a href="http://edgecase.com" >Edgecase</a>.  They&#8217;ve been our partner on <a href="http://www.vacationtrade.com" >VacationTrade</a> for many months now and I couldn&#8217;t be more happy.  If you&#8217;re looking to hire a team of people to help develop a web application the right way, you really should take a look at Edgecase.  Thanks again guys.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/regarding-edgecase/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A year (or more) in the life</title>
		<link>http://www.mikedoel.com/blog/a-year-or-more-in-the-life</link>
		<comments>http://www.mikedoel.com/blog/a-year-or-more-in-the-life#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:06:50 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[vacationtrade]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=131</guid>
		<description><![CDATA[December 23, 2009 at 9:45pm EST.  That marks the official time when the project/company that has consumed my life for a year (really more) was finally open for business.  Check it out at http://www.vacationtrade.com and get details about what it is we do at http://www.vacationtrade.com/page/blog.  If you own a timeshare and have [...]]]></description>
			<content:encoded><![CDATA[<p>December 23, 2009 at 9:45pm EST.  That marks the official time when the project/company that has consumed my life for a year (really more) was finally open for business.  Check it out at <a href="http://www.vacationtrade.com" >http://www.vacationtrade.com</a> and get details about what it is we do at <a href="http://www.vacationtrade.com/page/blog" >http://www.vacationtrade.com/page/blog</a>.  If you own a timeshare and have become frustrated with the experience of trying to exchange it through RCI or Interval International, we hope we can make your life better.</p>
<p>The site is in an alpha state right now.  That means it basically works but it&#8217;s not hard to find bugs or opportunities for improvement.  There&#8217;s a saying in the startup world &#8211; if you&#8217;re not embarrassed/worried by the first release of your product, you waited too long to release.   I also like what Paul Graham had to say in <a href="http://www.paulgraham.com/really.html" >his essay on what startups are really like</a>:</p>
<blockquote><p>It&#8217;s so important to launch fast that it may be better to think of your initial version not as a product, but as a trick for getting users to start talking to you.</p></blockquote>
<p>Alright users &#8211; speak up!</p>
<p>The past year and change has really been a whirlwind.  It actually all started in April of 2008 when <a href="http://twitter.com/mikeblackwell" >Mike Blackwell</a> and I decided we wanted to form a company together.  We just needed to figure out what it was to do.  I could not ask for a better person to go through my initial startup experience with than Mike.  As the former CEO of <a href="http://www.sharethis.com" >ShareThis</a> along with getting in on the ground floor of a prior startup that crashed and burned, Mike knew the ropes and was able to properly set my expectations and helped us to focus on the right things.  He is also a great guy who has an integrity and perspective on life that I really admire.</p>
<p>Over the course of the past year, we&#8217;ve had several other folks come along and join the team in one way or another.  Once we had settled on the right business idea (after many false starts), <a href="http://twitter.com/bobkington" >Bob Kington</a> and <a href="http://twitter.com/ljlj1138" >LJ Freeman</a> got involved as co-founders of the company in May of this year.  In July, <a href="http://twitter.com/saragibby" >Sara Gibbons</a> joined us and in November, <a href="http://twitter.com/muncman" >Kevin Munc</a> became employee #6.  <a href="http://twitter.com/ginawinkler" >Gina Winkle</a>r also spent a fair amount of time on our project as did several other friends.  And we could not have done this without the help of the guys at <a href="http://edgecase.com" >Edgecase</a>, most especially <a href="http://twitter.com/adamlogic" >Adam McCrea</a>.</p>
<p>So, come and check us out and let us know what you think.  Yes, I&#8217;m slightly embarrassed about the site&#8217;s flaws and shortcomings, but I guess that means we released in time.  The next several months are going to be extremely busy (just as the past several have been) while we react to feedback and make improvements.  I take it as a good sign that there&#8217;s a big part of me that wants to get started on those right now.  But, it is Christmas time and rest and family time are also important.  Have a Merry Christmas everyone and may your 2010 find you as excited by life&#8217;s opportunities as I am.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/a-year-or-more-in-the-life/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>About Last Tweet</title>
		<link>http://www.mikedoel.com/blog/about-last-tweet</link>
		<comments>http://www.mikedoel.com/blog/about-last-tweet#comments</comments>
		<pubDate>Wed, 09 Dec 2009 02:39:19 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=125</guid>
		<description><![CDATA[Earlier today, I tweeted that I couldn&#8217;t recommend Braintree as a payment processor.  It was a tweet born of frustration and would probably have better been kept to myself.  But now several folks have asked for an explanation, so I&#8217;ll try to do so in a way that is fair to Braintree.
There are [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today, I <a href="http://twitter.com/mikedoel/status/6473758875" >tweeted</a> that I couldn&#8217;t recommend <a href="http://braintreepaymentsolutions.com" >Braintree</a> as a payment processor.  It was a tweet born of frustration and would probably have better been kept to myself.  But now several folks have asked for an explanation, so I&#8217;ll try to do so in a way that is fair to Braintree.</p>
<p>There are several good reasons to like Braintree as a processor for your site:</p>
<ul>
<li>They allow you to treat payment processing and merchant account handling (two separate things) as if they were one.</li>
<li>They relieve you of the requirement to hold sensitive data (i.e. credit card numbers) in your database, thereby making PCI compliance much less of a headache than it need be</li>
<li>They have a well documented and relatively simple API to develop to that is a piece of cake to integrate into a Rails app</li>
<li>They have some folks on staff who are Columbus Ruby Brigade alumni</li>
</ul>
<p>So, after a brief survey and at the suggestion of colleagues, we decided to use Braintree for our site.  We&#8217;re not yet live on that site, so I&#8217;ll keep details of it somewhat private at this point.  But you can think of the site as one that uses a model similar to <a href="http://stubhub.com" >StubHub</a> or <a href="http://glyde.com" >Glyde</a> (sexy UI by the way fellas) but in the travel/vacation industry.  Watch this space over the next couple weeks for more details.</p>
<p>At any rate, we first contacted Braintree about 2 months ago and began a dialog about engaging their services.  This included a discussion of our business model, anticipated transaction volumes, revenue projections, and the like.  Given that we were not yet done with development, we did not submit a formal application with them at that time.  Instead, we continued work on the items we knew Braintree wanted to see (e.g. clear communication about pricing, customer support contacts, terms of service, etc.) as well as the more core features of the site.  During this time, Braintree allowed us to develop against their development gateway and occasionally asked us if we had any questions (we did not &#8211; it all appeared straight forward to us).</p>
<p>This week, the time came to actually begin the formal application process.  Which is when we ran into problems.  As mentioned above, one of the things Braintree does for its customers is handle the merchant account setup.  It turns out that this was a more significant step than I thought.  Once the underwriters saw our site, they declared it a high risk site and refused to underwrite the creation of the merchant account for us.  It&#8217;s not clear why we were considered high risk when other sites with essentially identical business models in different industries are allowed to proceed.  The message given to us is that our customer guarantee (which currently looks SHOCKINGLY like StubHub as we refine it for our specific case) was something they didn&#8217;t want to cover.  But, they let us know, they&#8217;d be happy to work with us if we changed our business model in fundamental ways.</p>
<p>So, I was frustrated with Braintree for a few reasons:</p>
<ul>
<li>The risk issue was not detected by them in a timely fashion. </li>
<li>Resolution of the issue was poorly handled.  For example, we didn&#8217;t get a chance to talk directly to the underwriter to make sure they were clear on the model and risks (or lack thereof in our case)</li>
<li>The only suggested remediation was to fundamentally change our business model.  I have to believe we could have perhaps explored intermediate options (e.g. holding some reserves in the merchant account) but Braintree did not make those available to us.</li>
<li>In the end, I just believe that Braintree didn&#8217;t necessarily do a good job at being an advocate for us in one of their core value propositions (i.e. setting up the merchant account)</li>
</ul>
<p>Of course, we&#8217;re not without blame in this too.  One of the great things about working in a startup is that you learn things at such an insane pace.  Here are my lessons learned, hoping the future entrepreneurs might avoid some of the mistakes we&#8217;ve made:</p>
<ul>
<li>Don&#8217;t under-estimate the merchant account creation process &#8211; especially in this economy with banks still being fairly risk averse</li>
<li>Always have a backup plan.  We didn&#8217;t in this case, and now we&#8217;re scrambling to get another solution in place</li>
<li>Don&#8217;t let it get you down and tweet out of frustration.  After all, a bad day at a startup is still better than most days in a big company.</li>
</ul>
<p>So, I hope that didn&#8217;t come across as too whiny or unfair to Braintree.  I definitely think they could have done better and hope they&#8217;ll do a better job with future customers.  But I know too that most people who use them still think very highly of them.  Sadly though, that won&#8217;t be with us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/about-last-tweet/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Matthew playing Carol of the Bells</title>
		<link>http://www.mikedoel.com/blog/matthew-playing-carol-of-the-bells</link>
		<comments>http://www.mikedoel.com/blog/matthew-playing-carol-of-the-bells#comments</comments>
		<pubDate>Tue, 08 Dec 2009 02:06:29 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=114</guid>
		<description><![CDATA[It&#8217;s amazing how quickly kids learn things.  Our son loves the song Carol of the Bells and has started to learn to play it on his own.  With no formal training whatsoever.  He seems to really enjoy it.  Perhaps we&#8217;ll have to see if he wants to take piano lessons.
http://www.youtube.com/watch?v=H9TVd3lqLng
]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s amazing how quickly kids learn things.  Our son loves the song Carol of the Bells and has started to learn to play it on his own.  With no formal training whatsoever.  He seems to really enjoy it.  Perhaps we&#8217;ll have to see if he wants to take piano lessons.</p>
<p><a href="http://www.youtube.com/watch?v=H9TVd3lqLng" >http://www.youtube.com/watch?v=H9TVd3lqLng</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/matthew-playing-carol-of-the-bells/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two machine workflow with git</title>
		<link>http://www.mikedoel.com/blog/two-machine-workflow-with-git</link>
		<comments>http://www.mikedoel.com/blog/two-machine-workflow-with-git#comments</comments>
		<pubDate>Mon, 27 Jul 2009 18:51:03 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=108</guid>
		<description><![CDATA[For SCM, our project is using the new hotness in version control &#8211; git, hosted on github.com.  For a good long while, I was the only contributor who was using the repository there.  When you&#8217;re the only contributor, you can get away with sins that aren&#8217;t acceptable when you&#8217;re part of a team.  Sins like [...]]]></description>
			<content:encoded><![CDATA[<p>For SCM, our project is using the new hotness in version control &#8211; git, hosted on github.com.  For a good long while, I was the only contributor who was using the repository there.  When you&#8217;re the only contributor, you can get away with sins that aren&#8217;t acceptable when you&#8217;re part of a team.  Sins like pushing half-baked code to your SCM as you move back and forth between two machines (I have both a laptop and desktop machine).  But, once you&#8217;ve brought others into your team and started hooking up continuous integration services like RunCodeRun, this practice is no longer cool.</p>
<p>Like many new to git, it took awhile to get past the centralized mindset that had been pounded into my brain by years and years of thinking of CVS and SVN as the be-all and end-all of how you did these things.  Solving my problem of switching machines without impacting my teammates is one of those things that helps to rewire my thinking.  I how have four git remote&#8217;s that I use regularly.  The first three were set up for me more or less without me knowing what was really going on:</p>
<p><strong><em>origin</em></strong> &#8211; aka github.com &#8211; the main point of sharing by the development team and where RunCodeRun watches for updates to verify as part of the continuous integration process</p>
<p><strong><em>staging</em></strong> &#8211; hosted on the outstanding Heroku platform, this is where code goes when we&#8217;re ready for review by our business stakeholders</p>
<p><strong><em>demo</em></strong> &#8211; also on Heroku, this is an environment that is intended to be more stable than staging.  While staging changes daily (perhaps multiple times), we generally rev demo only once ever couple of weeks</p>
<p>The fourth remote is the subject of this post however.  It&#8217;s called &#8220;<em><strong>justme</strong></em>&#8221; and is actually hosted on my laptop.  I use it to shuttle code back and forth between my laptop and desktop machines.  I can use this to commit all of the sins I used to commit when only I was working on the project.  For example, if I&#8217;m working out somewhere on my laptop on some feature and don&#8217;t quite get done before I get home.  And now I want to finish up my work on the desktop machine which has significantly better hardware.  Tests not passing?  No problem &#8211; just &#8220;git push justme mydevbranch&#8221; on the laptop and then &#8220;get pull justme mydevbranch&#8221; on the desktop.  Once my work is finished and I verify tests are passing, I can share the code with my other team members from the desktop with &#8220;git push origin somebranch&#8221; (or just &#8220;git push&#8221; for some branches like master).</p>
<p>To set this up on a Mac:</p>
<p>1. On the laptop, create a bare repository somewhere.  For example</p>
<blockquote><p>mkdir $HOME/src/justme</p>
<p>cd $HOME/src/justme</p>
<p>git clone &#8211;bare git@github.com:username/projectname.git projectname.git.</p></blockquote>
<p>2. On the laptop, go to your normal working directory and add a remote to this new area with something like:</p>
<blockquote><p>git remote add justme $HOME/src/justme/projectname.git</p></blockquote>
<p>3. On the desktop, add the remote with something like:</p>
<blockquote><p>git remote add justme userid@laptop.local:src/justme/projectname.git</p></blockquote>
<p>4. Make sure ssh access is enabled on your laptop (Remote Login option of the Sharing Preference Pane under System Preferences)</p>
<p>5. Make sure the git directory is in your PATH for SSH users on your laptop.  For me, this meant adding this to my ~/.bashrc file:</p>
<blockquote><p>export PATH=$PATH:/usr/local/git/bin</p></blockquote>
<p>And you should be good to go.</p>
<p>As I said before, embracing the distributed nature of git is not something that comes easily &#8211; especially if you cut your teeth in a world where everything was centralized.  But, once you understand how it works and can put it to your advantage, you really appreciate the benefits of git.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/two-machine-workflow-with-git/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MetricFu at CRB</title>
		<link>http://www.mikedoel.com/blog/metricfu-at-crb</link>
		<comments>http://www.mikedoel.com/blog/metricfu-at-crb#comments</comments>
		<pubDate>Tue, 16 Jun 2009 02:31:26 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=105</guid>
		<description><![CDATA[Tonight, I got a chance to give a presentation to the Columbus Ruby Brigade on MetricFu.  If you&#8217;re interested in seeing it, here is the PDF.
]]></description>
			<content:encoded><![CDATA[<p>Tonight, I got a chance to give a presentation to the Columbus Ruby Brigade on MetricFu.  If you&#8217;re interested in seeing it, <a title="MetricFu Presentation" href="http://mikedoel.com/blog/wp-content/uploads/2009/06/MetricFu.pdf"  target="_blank">here is the PDF</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/metricfu-at-crb/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding to webrat_steps with cukesteps</title>
		<link>http://www.mikedoel.com/blog/adding-to-webrat_steps-with-cukesteps</link>
		<comments>http://www.mikedoel.com/blog/adding-to-webrat_steps-with-cukesteps#comments</comments>
		<pubDate>Tue, 02 Jun 2009 19:59:06 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=99</guid>
		<description><![CDATA[As a recent convert to Ruby on Rails, I&#8217;ve fallen in love with the combination of Cucumber and its associated ecosystem (RSpec, webrat, etc.).  When you first start a Cuke project, it provides an initial set of helpful steps in a file called webrat_steps.rb in your features/step_definitions file.  While these are helpful, I found myself [...]]]></description>
			<content:encoded><![CDATA[<p>As a recent convert to Ruby on Rails, I&#8217;ve fallen in love with the combination of Cucumber and its associated ecosystem (RSpec, webrat, etc.).  When you first start a Cuke project, it provides an initial set of helpful steps in a file called webrat_steps.rb in your features/step_definitions file.  While these are helpful, I found myself creating several other steps that seemed to be more generally useful than just my project.  I&#8217;ve packaged these steps up into a gem called cukesteps that you can get at:<br />
<a href=http://github.com/mdoel/cukesteps/tree/master>Github</a></p>
<p>These steps fall into three basic categories:</p>
<ol>
<li>Object creation step(s)</li>
<li>Debugging steps</li>
<li>Semantic markup checking steps</li>
</ol>
<h3>Object creation steps</h3>
<p>In our project, we have fairly complex sets of ActiveRecord models and associations.  Trying to do acceptance testing proved challenging because several tests require non-trivial amounts of setup to work.   Consider for an example an application that helps you find restaurants with foods that enable you to lose weight.  In this kind of application, you might have models for Food, Restaurant, Brand, and Location.  And you need to tie these together in your features as in this example:</p>
<pre>
  Given the following foods exist
    | food   | calories | fat_calories |
    | eggs   | 200      | 180          |
    | burger | 350      | 200          |
    | salad  | 100      | 80           |
  And the following restaurants exist
    | brand     | location   | foods         |
    | mcdonalds | chicago il | eggs, burger  |
    | panera    | chicago il | eggs, salad   |
    | mcdonalds | dallas tx  | burger, salad |
  When I fill in "city" with "chicago"
  And I select "under 100" from "calories"
  And I press "search"
  Then I should see "panera"
</pre>
<p>Creation of restaurants in this example is fairly complicated (and maybe over-complicated):<br />
- the base Restaurant object is probably created with FixtureReplacement, FactoryGirl, Object Daddy, Fixjour, or something similar, but:<br />
- the associated brand might have to be grabbed using Brand.find_by_name to make use of a db:seed kind of table<br />
- the associated location could be created with whatever Factory mechanism you&#8217;re using with only a single string param being enough to make it interesting<br />
- the associated foods come from objects created in the prior step</p>
<p>
Getting these steps with the cukesteps gem installed is a matter of doing the following in your features/support/env.rb file for cuke:
</p>
<pre>
require 'cukesteps'
include CukeAssociationHelpers

cuke_association_attributes(:brand => :name,
                            :location => :address)
</pre>
<p>
The use of cuke_association_attributes causes the brand and location columns in the second step to be treated special.  Instead of being treated as simple attributes, they instead are found or built.  If a result of find_by_attribute_name (e.g. find_by_name for brand or find_by_address for location) returns non-nil, then that object is used as the associated object.  Otherwise, the object is created using a create_model-style factory method.  The foods column is also special in that it refers back to the Food objects created in the prior step. </p>
<h3>Debugging Steps</h3>
<p>The cukesteps gem provides four basic debugging steps:</p>
<ol>
<li>Then I debug</li>
<li>Then save_and_open_page</li>
<li>Then n foos should exist</li>
<li>Then dump all foos to standard output</li>
</ol>
<p>These steps are not ones you&#8217;d leave in your feature file for any length of time, but they can come in handy for chasing down problems you encounter along the way.</p>
<h3>Semantic markup checking steps</h3>
<p>These steps help encourage use of semantic IDs and Class Names in your markup. The use of the articles &#8220;a&#8221; and &#8220;the&#8221; represent a class and ID respectively. For example, &#8220;I should see a photo in the search-results&#8221; ensures that the the page contains an element of class photo inside an element of ID search-results. The steps available here are:</p>
<ol>
<li>Then I should see the foo (e.g. Then I should see the search-results)</li>
<li>Then I should see a|an foo (e.g. Then I should see a listing)</li>
<li>Then I should see a foo in the bar (e.g. Then I should see a listing in the search-results)</li>
<li>Then I should see the foo in the bar (e.g. Then I should see the map in the search-results)</li>
<li>Then I should see n foos in the bar (e.g. Then I should see 4 listings in the search-results)</li>
<li>Then I should see n to m foos in the bar (e.g. Then I should see 3 to 5 listings in the search-results)</li>
<li>Then the baz in the bar should contain a foo (e.g. Then the map in the search-results should contain a resizer)</li>
</ol>
<p>The negation of each of the above is also available (e.g. Then I should not see a listing in the search-results)</p>
<h3>Installation</h3>
<p>To use this gem, just do the following:</p>
<pre>
gem sources github.com
gem install mdoel-cukesteps
</pre>
<p>Feel free to fork away and send me feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/adding-to-webrat_steps-with-cukesteps/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stealing Second Base</title>
		<link>http://www.mikedoel.com/blog/stealing-second-base</link>
		<comments>http://www.mikedoel.com/blog/stealing-second-base#comments</comments>
		<pubDate>Mon, 29 Dec 2008 21:33:36 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mikedoel.com/blog/?p=93</guid>
		<description><![CDATA[Progress always involves risk; you can&#8217;t steal second base and keep your foot on first.
Fred Wilcox
For Christmas this year, my wife got me a copy of The Winners Manual by Jim Tressel &#8211; head coach of the Ohio State football team.  It&#8217;s a fantastic book, written in a style that is well suited to digesting [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Progress always involves risk; you can&#8217;t steal second base and keep your foot on first.</p>
<p><strong>Fred Wilcox</strong></p></blockquote>
<p>For Christmas this year, my wife got me a copy of <a title="The Winners Manual" href="http://www.thewinnersmanual.com" >The Winners Manual</a> by Jim Tressel &#8211; head coach of the Ohio State football team.  It&#8217;s a fantastic book, written in a style that is well suited to digesting it in small bits of 5-7 pages at a time.  Given the author, you might be surprised to find that there&#8217;s really very little football in the book.  Instead, it&#8217;s a book that helps you to realize the big picture parts of your life &#8211; your life&#8217;s purpose and the goals you set for yourself.  Reading a chunk is now a part of my morning ritual for getting the day started.</p>
<p>The quote at the start of this post comes from the beginning of chapter 3 &#8211; &#8220;Attitude&#8221;.  I found it particularly relevant to my current situation.  It was a year ago that I left AOL and the comforts of a steady paycheck.  The past year has been eventful (more on that in a future post), but the professional part of it has largely been a search for the right entrepreneurial business opportunity with some consulting work done along the way.</p>
<p>Well, we finally feel like we have the right business model to pursue and have started working on that over the last couple of weeks.  The thing is, pursuing this opportunity means more time with, uh, shall we say a non-ideal income model (on the positive side &#8211; income taxes are low).  And in the last couple of days, I&#8217;ve had someone approach me about an opportunity that is very tempting.  It would be a 40 hour per week position that brought in a nice income stream.  And in case you haven&#8217;t been paying attention to the news lately, this could come in handy.  But it would almost certainly put a serious crimp in our ability to execute on the new business.</p>
<p>Which brings me back to The Winners Manual and that quote.  I guess every entrepreneur eventually reaches a gut-check moment where you move from <a title="The Chicken and the Pig" href="http://en.wikipedia.org/wiki/The_Chicken_and_the_Pig" >chicken to pig</a>.  Well, oink oink &#8211; this pig is off first and running hard for second.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikedoel.com/blog/stealing-second-base/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
