<?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>Carbon Five Community</title>
	<atom:link href="http://blog.carbonfive.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.carbonfive.com</link>
	<description></description>
	<lastBuildDate>Fri, 27 Aug 2010 00:24:40 +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>Come geek out with us this Thursday!</title>
		<link>http://blog.carbonfive.com/2010/08/c5/come-geek-out-with-us-this-thursday</link>
		<comments>http://blog.carbonfive.com/2010/08/c5/come-geek-out-with-us-this-thursday#comments</comments>
		<pubDate>Mon, 23 Aug 2010 23:53:51 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[C5]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1154</guid>
		<description><![CDATA[Thursday we&#8217;re opening the doors to the San Francisco office and hosting a casual gathering for our fellow geeks. Want to see what other developers are working on or who&#8217;s using the latest and greatest gem/practice/database/etc? Do you have a side project or open source framework that you&#8217;re contributing to (or just using) that you [...]]]></description>
			<content:encoded><![CDATA[<p>Thursday we&#8217;re opening the doors to the San Francisco office and hosting a casual gathering for our fellow geeks.  Want to see what other developers are working on or who&#8217;s using the latest and greatest gem/practice/database/etc?  Do you have a side project or open source framework that you&#8217;re contributing to (or just using) that you want to show off, lightning-talk style?  Do you want to see what success others are having with agile development?  Want to learn how to make a wicked macchiato on our Italian espresso machine?  It&#8217;s all fair game!</p>
<p>We&#8217;ll have a room with a projector dedicated to lightning talks and the rest of the space will be free for mingling and socializing.  There will be beer and food.  Doors open at 5:30 and we&#8217;ll stick around until 7ish; if people are still hanging out we&#8217;ll migrate elsewhere for more drinks.  Carbon Five is located at 171 2nd Street Floor 4 (<a href="http://maps.google.com/maps?f=q&#038;source=s_q&#038;hl=en&#038;geocode=&#038;q=171+2nd+street+floor+4+94105&#038;sll=37.0625,-95.677068&#038;sspn=47.569986,93.691406&#038;ie=UTF8&#038;hq=&#038;hnear=171+2nd+St,+San+Francisco,+California+94105&#038;z=16&#038;iwloc=A">map</a>), above the Tempura House.</p>
<p>Lightning talk topics on the docket thusfar:</p>
<ul>
<li>Alon will demo C5 Story Mapper</li>
<li>Corey will discuss http-pulse, a node.js application for monitoring http</li>
<li>Alex will discuss Wrong &#8211; a minimal assertion library for Ruby</li>
<li>Christian discusses the outcome of a recent MongoDB development spike</li>
<li>Jon discusses the Mission Artists United website</li>
<li>Jonah will discuss an iPhone widget he built over the weekend at the iphone deve camp</li>
</ul>
<p>Please RSVP below if you&#8217;re coming.</p>
<p>See you Thursday!</p>
<p><iframe src="https://spreadsheets.google.com/embeddedform?formkey=dFIxdU9jRlpOTjBFWXhrcUNZbkphX3c6MQ" width="760" height="795" frameborder="0" marginheight="0" marginwidth="0">Loading&#8230;</iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/08/c5/come-geek-out-with-us-this-thursday/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vote for Carbon Five&#8217;s SXSW 2011 Interactive Sessions</title>
		<link>http://blog.carbonfive.com/2010/08/speaking/vote-for-carbon-fives-sxsw-2011-interactive-sessions</link>
		<comments>http://blog.carbonfive.com/2010/08/speaking/vote-for-carbon-fives-sxsw-2011-interactive-sessions#comments</comments>
		<pubDate>Fri, 13 Aug 2010 19:02:10 +0000</pubDate>
		<dc:creator>Rudy Jahchan</dc:creator>
				<category><![CDATA[C5]]></category>
		<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1150</guid>
		<description><![CDATA[Next year will be the third time Carbon Five visits Austin for SXSW Interactive. We’ve proposed some hands-on, take-away focused sessions that we ourselves would enjoy and think you would too. For example Embracing NoSQL &#8211; Your First Cassandra Project is an extension of the talk Mike gave at the Los Angeles NoSQL meetup a [...]]]></description>
			<content:encoded><![CDATA[<p>Next year will be the third time Carbon Five visits Austin for <a href="http://www.sxsw.com/interactive">SXSW Interactive.</a> We’ve proposed some hands-on, take-away focused sessions that we ourselves would enjoy and think you would too.</p>
<p>For example <a href="http://panelpicker.sxsw.com/ideas/view/6428">Embracing NoSQL &#8211; Your First Cassandra Project</a> is an extension of the <a href="http://blog.carbonfive.com/2010/06/nosql/cassandra-and-rails-talk-at-la-nosql-meetup">talk Mike gave at the Los Angeles NoSQL meetup</a> a couple of months ago. The ultimate goal of the session is to NOT just “digg” (pardon the pun) into why many real-time social sites have started using Cassandra and other non-traditional storage systems, but to have you walking out with code to bootstrap your own projects with.</p>
<p>Similarly, in <a href="http://panelpicker.sxsw.com/ideas/view/6894">Get Your Act Together: Build Better iPhone Apps</a>, Jonah plans on demonstrating the <a href="http://blog.carbonfive.com/category/iphone">agile iOS development patterns</a> he&#8217;s been documenting here on our blog. You&#8217;ll learn how you can continue to rapidly deliver (and have Apple approve) builds of your app while meeting the higher quality expectations of the maturing app marketspace.</p>
<p>Finally, Alon is bringing to Austin the quite literally interactive session of <a href="http://panelpicker.sxsw.com/ideas/view/6805">Play at Work: Agile Games for Productive Teams</a>, which <a href="http://blog.carbonfive.com/2010/04/agile/play-at-work">he presented earlier this year</a> in San Francisco. By having you actually play through games we use every day such as “Planning Poker”, you’ll get a much better sense of how they can be incorporated into your own agile development efforts than any simple presentation could provide.</p>
<p>Of course, we don’t just want to talk about our experiences, but want to hear about yours too, either at the sessions or over a drink later that day! So if you’re interested, please <a href="http://panelpicker.sxsw.com/ideas/view/6428">click</a> <a href="http://panelpicker.sxsw.com/ideas/view/6894">the</a> <a href="http://panelpicker.sxsw.com/ideas/view/6805">links</a> above and vote for our panels, as <a href="http://panelpicker.sxsw.com/">your voice is an important factor in SXSW’s panel selection process</a>.</p>
<p>And if you see any of us at Austin next year or sooner, don’t hesitate to say &#8220;Hi&#8221;; we’ll take you up on those drinks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/08/speaking/vote-for-carbon-fives-sxsw-2011-interactive-sessions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuous integration for iPhone projects in TeamCity</title>
		<link>http://blog.carbonfive.com/2010/08/iphone/continuous-integration-for-iphone-projects-in-teamcity</link>
		<comments>http://blog.carbonfive.com/2010/08/iphone/continuous-integration-for-iphone-projects-in-teamcity#comments</comments>
		<pubDate>Sun, 08 Aug 2010 22:58:32 +0000</pubDate>
		<dc:creator>jonah</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1101</guid>
		<description><![CDATA[Carbon Five has been using TeamCity as our continuous integration server for most of our recent projects, including our iPhone work. Out continuous integration environment monitors the git repository used by each project, runs the project&#8217;s tests each time a change is pushed to the repository, and can automatically produce an ad-hoc build of an [...]]]></description>
			<content:encoded><![CDATA[<p>Carbon Five has been using <a href="http://www.jetbrains.com/teamcity/">TeamCity</a> as our continuous integration server for most of our recent projects, including our iPhone work. Out continuous integration environment monitors the git repository used by each project, runs the project&#8217;s tests each time a change is pushed to the repository, and can automatically produce an ad-hoc build of an app each time the tests pass.<br />
<span id="more-1101"></span><br />
<strong>Configuring the TeamCity build agent</strong><br />
In order to build an iPhone project I need a build runner running on an OS X machine with Xcode installed so I added a remote build agent on a mac mini. Each of the build configurations below then requires that compatible build agents be running on OS X. </p>
<p><strong>Running unit tests with GTM</strong><br />
I have been using <a href="http://code.google.com/p/google-toolbox-for-mac/">GTM</a> to run iPhone unit tests as part of the build process for a &#8220;Unit Tests&#8221; build target (see Alon&#8217;s post on our <a href="http://blog.carbonfive.com/2009/02/testing/iphone-unit-testing-toolkit">iPhone Unit Testing Toolkit)</a>. Running these tests with a TeamCity build agent just requires a command line build runner which calls the `xcodebuild` command and specifies the project, built target, and configuration to build.</p>
<table>
<tbody>
<tr>
<td>Command executable:</td>
<td>/Developer/usr/bin/xcodebuild</td>
</tr>
<tr>
<td>Command parameters:</td>
<td>-project example_project.xcodeproj -target &#8220;Unit Tests&#8221; -configuration &#8220;Debug&#8221; -sdk iphonesimulator4.0</td>
</tr>
</tbody>
<table>
<p><strong>Ad-hoc builds</strong><br />
Ad-hoc builds run with a similar command:</p>
<table>
<tbody>
<tr>
<td>Command executable:</td>
<td>/Developer/usr/bin/xcodebuild</td>
</tr>
<tr>
<td>Command parameters:</td>
<td>-project example_project.xcodeproj -target &#8220;ExampleProject&#8221; -configuration &#8220;Distribution&#8221; -sdk iphoneos4.0</td>
</tr>
</tbody>
<table>
Once the ad-hoc build has been created I want to save the resulting app and its debug symbols so I add these as build artifacts under the TeamCity build configuration&#8217;s General Settings:</p>
<table>
<thead>
<tr>
<th>Artifact paths:</th>
</tr>
</thead>
<tbody>
<tr>
<td>/Users/teamcity/xcode_builds/Distribution-iphoneos/ExampleProject.app => ExampleProject.zip</td>
</tr>
<tr>
<td>/Users/teamcity/xcode_builds/Distribution-iphoneos/ExampleProject.app.dSYM => ExampleProject.app.dSYM.zip</td>
</tr>
</tbody>
</table>
<p>Now my ad-hoc builds are produced automatically, always up to date with my working code changes, and available as an easy download from my TeamCity server. TeamCity will also save the artifacts for each build so I can easily retrieve the dSYM for a particular ad-hoc build to symbolicate a crashlog for that build on any developer&#8217;s machine.</p>
<p><strong>Future improvements</strong><br />
If necessary I can run tests on actual iPhone hardware by changing the sdk (`-sdk iphoneos4.0`) but I am not yet sure how I could specify which one of multiple devices would run the tests. It would be nice to eventually be able to choose between multiple devices so I can deliberately run some tests on a device with a specific OS version or feature set.<br />
With my current configuration TeamCity can only report a pass/fail status for iPhone tests. I need to consider modifying the GTM test runner script or switching to <a href="http://github.com/gabriel/gh-unit">GHUnit</a> or <a href="http://github.com/pivotal/cedar">Cedar</a> to get per-test results and then be able to build up a history of individual test failures.<br />
I also need to add a build configuration which uses agvtool to automatically increment the project&#8217;s build number as part of every ad-hoc build.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/08/iphone/continuous-integration-for-iphone-projects-in-teamcity/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Deploying to Heroku from TeamCity</title>
		<link>http://blog.carbonfive.com/2010/08/ruby-on-rails/deploying-to-heroku-from-teamcity</link>
		<comments>http://blog.carbonfive.com/2010/08/ruby-on-rails/deploying-to-heroku-from-teamcity#comments</comments>
		<pubDate>Fri, 06 Aug 2010 07:09:32 +0000</pubDate>
		<dc:creator>jonah</dc:creator>
				<category><![CDATA[Ruby (on Rails)]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rapid development]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1098</guid>
		<description><![CDATA[Previously I discussed our TeamCity configuration using RVM and mentioned that we often use git to deploy projects. Today I&#8217;ll share an example of how a TeamCity build agent can trigger deployments of a application hosted on Heroku and some of the challenges I found. Add an ssh config entry for the project&#8217;s access to [...]]]></description>
			<content:encoded><![CDATA[<p>Previously I discussed our <a href="http://blog.carbonfive.com/2010/08/ruby-on-rails/using-rvm-on-teamcity-build-agents">TeamCity configuration</a> using RVM and mentioned that we often use git to deploy projects. Today I&#8217;ll share an example of how a TeamCity build agent can trigger deployments of a application hosted on <a href="http://heroku.com/">Heroku</a> and some of the challenges I found.<br />
<span id="more-1098"></span><br />
<strong>Add an ssh config entry for the project&#8217;s access to Heroku</strong></p>
<p>Much like shared github access I need to be able to specify which ssh key a particular project&#8217;s connections to heroku should use. Since I want to use client side checkouts I can&#8217;t specify a private key within TeamCity but I do know that all my compatible build agents are local so I can add a new entry to `~/.ssh/config` and define a host which will allow me to connect to Heroku with a particular key.</p>
<p><code># Heroku for #{new_project}<br />
Host heroku-#{new_project}<br />
  HostName heroku.com<br />
  User git<br />
  ForwardAgent yes<br />
  IdentityFile /home/teamcity/.ssh/teamcity_#{new_project}_rsa<br />
</code></p>
<p><strong>Add a ssh key to the Heroku account</strong><br />
Now I need to add this new key to the Heroku account for this project by installing the heroku gem in my project&#8217;s gemset and using the `heroku` command line to add the key. Heroku stores the account credentials used in `~/.heroku` and the user account running my build agents might need to connect to many different heroku accounts. I could switch my heroku credentials, upload a key, and have different projects deploy using different accounts. However since I find it useful to be able to run the heroku command line (see below) I found it preferable to have a single `teamcity` heroku account added to every project as a collaborator.<br />
<em>If you find it necessary to switch between Heroku accounts frequently this tool from Aeonscope might be useful:</em> <a href="http://www.aeonscope.net/2010/02/22/managing-multiple-heroku-accounts/">managing multiple heroku accounts</a></p>
<p>Now I can add a key to the current project&#8217;s Heroku account.<br />
<code>heroku keys:add ~/.ssh/teamcity_#{new_project}_rsa</code></p>
<p><strong>Deploying to Heroku</strong><br />
Now I can add a simple TeamCity build configuration which pushes code to Heroku once a particular revision passes the tests.</p>
<table>
<tbody>
<tr>
<td>Command executable</td>
<td>git</td>
</tr>
<tr>
<td>Command parameters</td>
<td>push git@heroku-#{new_project}:#{new heroku project&#8217;s name}.git master</td>
</tr>
</tbody>
</table>
<p><div id="attachment_1132" class="wp-caption alignnone" style="width: 585px"><a href="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_heroku_build_runner.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_heroku_build_runner.png" alt="" title="tc_heroku_build_runner" width="575" height="319" class="size-full wp-image-1132" /></a><p class="wp-caption-text">A project's deployment build configuration</p></div><br />
<strong>Deploying and running database migrations</strong><br />
I don&#8217;t want my app trying to respond to requests while waiting for a database migration to finish so now it becomes necessary to put the app in maintenance mode before deploying and migrating.</p>
<table>
<tbody>
<tr>
<td>Command executable</td>
<td>sh</td>
</tr>
<tr>
<td>Command parameters</td>
<td>-c heroku maintenance:on &#8211;app #{new_project} &#038;&#038; sleep 60 &#038;&#038; git push git@heroku.com:#{new_project}.git master &#038;&#038; heroku rake db:migrate &#8211;app #{new_project} &#038;&#038; heroku maintenance:off &#8211;app #{new_project}</td>
</tr>
</tbody>
</table>
<p>I found that I need to add a delay between turning on maintenance mode for the app and pushing to heroku. Attempting to push immediately fails with the error `Heroku push rejected, your slug is currently being compiled. Please try again later.` Even with a significant delay I still see this error occasionally and have to rerun the deploy build but at this point I don&#8217;t know of a way to make sure heroku can handle a new revision before attempting to push changes.</p>
<p>Now I can use TeamCity to automatically deploy changes to Heroku as soon as my project&#8217;s tests pass.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/08/ruby-on-rails/deploying-to-heroku-from-teamcity/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using RVM on TeamCity build agents</title>
		<link>http://blog.carbonfive.com/2010/08/ruby-on-rails/using-rvm-on-teamcity-build-agents</link>
		<comments>http://blog.carbonfive.com/2010/08/ruby-on-rails/using-rvm-on-teamcity-build-agents#comments</comments>
		<pubDate>Fri, 06 Aug 2010 04:52:16 +0000</pubDate>
		<dc:creator>jonah</dc:creator>
				<category><![CDATA[Ruby (on Rails)]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[rapid development]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1106</guid>
		<description><![CDATA[We have been using TeamCity to manage the continuous integration, testing, and deployment of many of our recent projects. We have also been using RVM on all of our recent Rails projects to allow us to install multiple ruby versions and create isolated gemsets for each project. RVM proved to be particularly useful on our [...]]]></description>
			<content:encoded><![CDATA[<p>We have been using <a href="http://www.jetbrains.com/teamcity/">TeamCity</a> to manage the continuous integration, testing, and deployment of many of our recent projects. We have also been using <a href="http://rvm.beginrescueend.com">RVM</a> on all of our recent Rails projects to allow us to install multiple ruby versions and create isolated gemsets for each project. RVM proved to be particularly useful on our TeamCity build agents where it allows a single agent to build many projects without the fear that we will see gem or ruby version conflicts between projects or introduce dependencies on gems installed on the build server but not enumerated in the project. Here&#8217;s the configuration I have used to get our build agents to use each project&#8217;s RVM settings.<br />
<span id="more-1106"></span><br />
As much as I would like to see each project able to configure all of it&#8217;s dependencies on its environment we still have some dependencies which are not captured in the project configuration. For example we have projects which need access to a database servers or need private keys to use when deploying. As a result I have favored running as many build agents as possible as local build agents so that they share this configuration. The configuration below is therefore usually only applied once but in an environment using remote build agents it would need to be repeated or shared between every compatible remote agent&#8217;s system. Perhaps one day we&#8217;ll see each project include chef recipes to configure it&#8217;s own build environment and I would be interested to hear from anyone who has automated their CI configuration to that extent.</p>
<p><strong>1. Create a key for github access</strong><br />
   <code>> ssh-keygen -t rsa -C "#{project_name}"</code><br />
   Upload the public key to github as a deploy key for the project so that the build agent can pull from the github repository.</p>
<p><strong>2. Setup rvm and a gemset for the project</strong><br />
<code>> rvm install ruby-#{version}-r#{patch level}<br />
> rvm use ruby-#{version}-r#{patch level}<br />
> rvm gemset create #{project name}<br />
> rvm gemset use #{project name}<br />
> gem install bundler</code></p>
<p><em>This could probably all be automated as part of the project&#8217;s .rvmrc file.</em></p>
<p><strong>3. Setup a ssh config for the project</strong><br />
The keys used by many of the services we interact with are unique and tied to an account so we need to have TeamCity use different ssh keys when connecting to projects under different accounts. Add a new entry to ~/.ssh/config to alias a host to use a specific ssh key</p>
<p><code># GitHub for #{new_project}<br />
Host github-#{new_project}<br />
    HostName github.com<br />
    User git<br />
    ForwardAgent yes<br />
    IdentityFile /home/teamcity/.ssh/teamcity_#{new_project}_rsa<br />
</code></p>
<p>Connections to `github-#{new_project}` will now default to use `teamcity_#{new_project}_rsa` rather than the default `id_rsa`. By specifying the key in the ssh config file we&#8217;re able to use client side checkouts which will be useful when deploying using git. For projects able to use server side checkouts we can specify a private key to use in TeamCity&#8217;s VCS settings. </p>
<p><strong>4. Create a new TeamCity project</strong><br />
On projects with multiple build steps using the same build runner we could create a template to avoid repeating these settings in each build phase. Unfortunately TeamCity 5.1 templates do not support running multiple types of build runners so projects with both command line (`bundle install`) and rake runners (`rake spec`) require some repetition.</p>
<table>
<thead>
<tr>
<th>Setting the VCS root:</th>
</tr>
</thead>
<tbody>
<tr>
<td>Type of VCS</td>
<td>Git(JetBrains)</td>
</tr>
<tr>
<td>Fetch URL</td>
<td>git@github-#{project name}:#{account name}/#{project name}.git</td>
</tr>
<tr>
<td>Authentication method</td>
<td>default private key</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Version Control Settings:</th>
</thead>
<tbody>
<tr>
<td>VCS Checkout Mode</td>
<td>Automatically on client</td>
</tr>
</tbody>
</table>
<p>Client checkouts have a full git repository while a server side checkout performs a git pull and then copies the resulting files but not the full git work-tree to the build agents leaving the agents unable to easily run git commands. A client side checkout is therefore preferable when using `git push` to deploy a project.</p>
<table>
<thead>
<tr>
<th>Command line tasks (bundle install):</th>
</tr>
</thead>
<tbody>
<tr>
<td>Runner</td>
<td>command line</td>
</tr>
<tr>
<td>Executable</td>
<td>/home/teamcity/.rvm/gems/%rvm.ruby%@%rvm.gemset%/bin/bundle</td>
</tr>
<tr>
<td>Arguments</td>
<td>install</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_cl_build_runner.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_cl_build_runner.png" alt="Command line build runner settings" title="tc_rvm_cl_build_runner" width="861" height="393" class="alignnone size-full wp-image-1114" /></a></p>
<table>
<thead>
<tr>
<th>Rake tasks (test):</th>
</tr>
</thead>
<tbody>
<tr>
<td>Runner</td>
<td>rake</td>
</tr>
<tr>
<td>Rake task</td>
<td>%rake.tasks%</td>
</tr>
<tr>
<td>Additional rake command line parameters</td>
<td>%rake.opts%</td>
</tr>
<tr>
<td>Ruby interpreter path</td>
<td>/home/teamcity/.rvm/rubies/%rvm.ruby%/bin/ruby</td>
</tr>
<tr>
<td>RVM Gemset Name</td>
<td>#{project name}</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_rake_build_runner.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_rake_build_runner.png" alt="Rake task build runner settings" title="tc_rvm_rake_build_runner" width="852" height="548" class="alignnone size-full wp-image-1117" /></a></p>
<table>
<thead>
<tr>
<th>Configuration parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td>rvm.ruby</td>
<td>ruby-#{version}-r#{patch level}</td>
</tr>
<tr>
<td>rvm.gemset</td>
<td>#{new_project}</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_config_params.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_config_params.png" alt="Configuration parameters" title="tc_rvm_config_params" width="852" height="220" class="alignnone size-full wp-image-1115" /></a></p>
<p>If using a template set the `rake.tasks`, `rake.opts`, and any other configuration parameters the template uses. Each build configuration based on the template can specify its own configuration parameters but cannot override the rake task and command line parameters directly.</p>
<p>To use the project&#8217;s RVM ruby and gemset add the following environment variables with appropriate paths:</p>
<table>
<tbody>
<tr>
<td>BUNDLE_PATH 	/home/teamcity/.rvm/gems/%rvm.ruby%@%rvm.gemset%</td>
</tr>
<tr>
<td>GEM_HOME 	/home/teamcity/.rvm/gems/%rvm.ruby%@%rvm.gemset%</td>
</tr>
<tr>
<td>GEM_PATH 	/home/teamcity/.rvm/gems/%rvm.ruby%@%rvm.gemset%:/home/teamcity/.rvm/gems/%rvm.ruby%@global</td>
</tr>
<tr>
<td>PATH 	/home/teamcity/.rvm/bin:/home/teamcity/.rvm/rubies/%rvm.ruby%/bin:/home/teamcity/.rvm/gems/%rvm.ruby%@%rvm.gemset%/bin:/home/teamcity/.rvm/gems/%rvm.ruby%@global/bin:%env.PATH%</td>
</tr>
</tbody>
</table>
<p><a href="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_environment_variables.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_rvm_environment_variables.png" alt="Environment variables" title="tc_rvm_environment_variables" width="854" height="355" class="alignnone size-full wp-image-1116" /></a></p>
<p>Now I can finally build a set of build configurations for a project which will all use the project&#8217;s RVM settings to isolate it from other projects on the TeamCity server.</p>
<p><a href="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_example_project.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/08/tc_example_project.png" alt="An example set of build configurations" title="tc_example_project" width="1207" height="549" class="alignnone size-full wp-image-1122" /></a></p>
<p> JetBrains appears committed to adding RVM support to TeamCity and added the `RVM Gemset` property to rake tasks in TeamCity 5.1.3 so hopefully we&#8217;ll see additional RVM support in future releases.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/08/ruby-on-rails/using-rvm-on-teamcity-build-agents/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>We&#8217;re talking Agile at SFRuby&#8230;</title>
		<link>http://blog.carbonfive.com/2010/07/agile/were-talking-agile-at-sfruby</link>
		<comments>http://blog.carbonfive.com/2010/07/agile/were-talking-agile-at-sfruby#comments</comments>
		<pubDate>Thu, 15 Jul 2010 16:07:14 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[Agile]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1093</guid>
		<description><![CDATA[Alon and I will be giving an hour talk about agile development next Wednesday at the SFRuby meetup: Agile software development provides a number of discrete practices to help you be a better programmer and a great provider of programming services to your clients, internal or external to your business. The continuous daily rigor of [...]]]></description>
			<content:encoded><![CDATA[<p>Alon and I will be giving an hour talk about agile development next Wednesday at the <a href="http://www.meetup.com/sfruby/calendar/14031344/">SFRuby meetup</a>:</p>
<blockquote><p>Agile software development provides a number of discrete practices to  help you be a better programmer and a great provider of programming services to your clients, internal or external to your business. The continuous daily rigor of testing, refactoring, pairing and integrating is a great path to producing quality software. The process of defining short development iterations with regular delivery and review with your client encourages collaboration and ensures that you are defining and meeting expectations along the way. We&#8217;ll describe the agile development and planning practices that we have found to be most effective in our work over the last 10 years and hope to hear from the group what is working for you.</p></blockquote>
<p>The event is full, but there&#8217;s a waiting list&#8230; go ahead and sign up if you&#8217;d like to join us.  Hope to see you there!</p>
<p>Updated!  Slides&#8230;</p>
<div style="width:425px" id="__ss_4853325"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/xianpants/bootstrapping-agile-projects" title="Bootstrapping Agile Projects">Bootstrapping Agile Projects</a></strong><object id="__sse4853325" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=2010-07-21-sfruby-agile-100727191955-phpapp01&#038;stripped_title=bootstrapping-agile-projects" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4853325" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=2010-07-21-sfruby-agile-100727191955-phpapp01&#038;stripped_title=bootstrapping-agile-projects" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/07/agile/were-talking-agile-at-sfruby/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few experiments with HTML 5 applications</title>
		<link>http://blog.carbonfive.com/2010/07/software-design/a-few-experiments-with-html-5-applications</link>
		<comments>http://blog.carbonfive.com/2010/07/software-design/a-few-experiments-with-html-5-applications#comments</comments>
		<pubDate>Thu, 08 Jul 2010 21:30:03 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript / AJAX]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[spa]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1052</guid>
		<description><![CDATA[I&#8217;ve had a long-standing interest in taking client-side programming beyond display logic and input validation. The new HTML 5 technologies are making full-scale application development in the browser increasingly practical. Unfortunately, the needs of Carbon Five&#8217;s clients generally exceed the capabilities of purely client-side solutions, so I don&#8217;t get to spend as much time developing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a long-standing interest in taking client-side programming beyond display logic and input validation.  The new <a href="http://en.wikipedia.org/wiki/HTML5">HTML 5</a> technologies are making full-scale application development in the browser increasingly practical. Unfortunately, the needs of Carbon Five&#8217;s clients generally exceed the capabilities of purely client-side solutions, so I don&#8217;t get to spend as much time developing JavaScript as I&#8217;d like. Consequently, I challenged myself to solve as many of my day-to-day issues as possible by writing applications that require only a single HTML page and a modern browser to run. So far, this has resulted in five applications; they&#8217;re available &#8212; with some additional thoughts on this style of development &#8212; below the fold.</p>
<p><span id="more-1052"></span></p>
<h2>The Applications</h2>
<ul>
<li>
  <b><label><a href="http://carbonfive.github.com/html5-playground/snowballs.html">Snowballs</a></label></b></p>
<p>Snowballs is a video game that was mostly designed by my 7 year old daughter, Ada. She started with a drawing that contained a maze filled with dots, a player and some monsters, and she explained how you throw snowballs at the monsters and build walls to block them. I convinced her we could get roughly the same effect by freezing the monsters instead of blocking them, and then I began developing. We started iterating, and she continued to contribute ideas which, somewhat surprisingly, always made the game more fun. The arrow keys move the player, and the spacebar launches a snowball. It&#8217;s implemented as a single Canvas tag using a JavaScript interval as a run loop. The maze, players, monsters, and snowballs are all drawn with JS functions using the Canvas drawing API. Since this application uses the Canvas tag, it won&#8217;t run in Internet Explorer or older versions of other browsers.
  </p>
</li>
<li>
  <b><label><a href="http://carbonfive.github.com/html5-playground/flashcards.html">Flashcards</a></label></b></p>
<p>I wrote Flashcards one evening when Ada&#8217;s teacher suggested using flash cards to help her memorize the words she shouldn&#8217;t need to sound out. The idea is that the parent clicks the spacebar when the child reads the word and they work together to reduce the time needed to read all the words. The application doesn&#8217;t need any graphics (other than some external images at the end), so it doesn&#8217;t use any HTML 5 features (browser compatibility is unknown).
  </p>
</li>
<li>
  <b><label><a href="http://carbonfive.github.com/html5-playground/timetest.html">Timetest</a></label></b></p>
<p>
    Like Flashcards, I wrote Timetest to help Ada with her schoolwork. In this case, she was getting frustrated with a lesson on analog clocks, so I wrote this application to make it more of a game. The goal is to answer as many questions as possible in the given time. The test turned out to be more difficult than it really needed to be, so I created an easier version (accessed by adding <i>#easy</i> to the URL). Since this application uses the Canvas tag, it won&#8217;t run in Internet Explorer or older versions of other browsers.
  </p>
</li>
<li>
  <b><label><a href="http://carbonfive.github.com/html5-playground/arithmetic.html">Arithmetic</a></label></b></p>
<p>
    Arithmetic is another educational application designed to drill addition that uses carrying. It provides spaces at the top, which you can click to mark a carry from the previous column. It doesn&#8217;t have any fancy HTML 5 features, but it does have a lot of stats.
  </p>
</li>
<li>
  <b><label><a href="http://carbonfive.github.com/html5-playground/surround.html">Surround</a></label></b></p>
<p>
    My wife and I had designed a fireplace surround and mantel for our living room,  but when it came to actually buying the materials and building the thing, we realized we didn&#8217;t know exactly how to scale it.  Since the design was entirely composed of rectangles, I realized it would be possible to build a simple one-off CAD program to help us agree on some dimensions.  The application makes use of the Canvas tag and the new HTML 5 slider inputs (which aren&#8217;t currently supported in Firefox). It translates between pixels and feet/inches constrained to an 8th of an inch, in order to make the measurements easier to use in the shop.
  </p>
</li>
</ul>
<p>  The goal of these exercises was to produce something simple and quick, but not entirely without polish. All the applications except Snowballs took only an evening or two. Each application (also excluding Snowballs) ended up under 300 lines of HTML, CSS, and JS combined.</p>
<h2>Developing without a JavaScript framework</h2>
<p>Limiting the applications to a single page means no importing <a href="http://jquery.com">jQuery</a> or <a href="http://www.prototypejs.org/">Prototype</a>. This might seem like a big constraint in an application written entirely in JavaScript. But these frameworks really only help out with DOM traversal/manipulation, event handling, animation, Ajax, form validation. All the applications make do with a small amount of HTML, so it&#8217;s easy enough to grab elements by ID, and a few visits to <a href="http://www.quirksmode.org/">Quirksmode</a> gave me some reasonably cross-browser event-handling code. Animation isn&#8217;t really that hard in JS, and I needed it to be more custom than frameworks allow anyway. The rest I didn&#8217;t need.  The truth is, I never miss having a framework (though I&#8217;m not about to stop using jQuery when working on client&#8217;s sites).</p>
<h2>Advantages and disadvantages</h2>
<ul>
<li>
  <b>They&#8217;re quick to start.</b>  Since it&#8217;s a single page, there&#8217;s no setup and no integration.
  </li>
<li>
    <b>They&#8217;re easy to deploy.</b>  It&#8217;s only one relatively small file, so you can e-mail it to friends, and you can host it anywhere. If you want to spend a little time making it touch-screen compatible, you can get it on all the smarter smart phones without bothering with app stores. On the other hand, there is no way prevent people from stealing the application or the code if you were developing it commercially, since the source is always just a right-click away.
  </li>
<li>
    <b>HTML+CSS is a powerful display framework.</b>  Although it lacks built-in support for some of the fancier UI widgets, there is no GUI framework that I&#8217;m aware of (and I&#8217;ve developed with quite a few) that provides the same level of design control with the same ease of development as these technologies. Of course, I&#8217;ve been swimming in HTML/CSS for years, so this opinion is a bit biased.
  </li>
<li>
    <b>Canvas has a powerful vector graphics API.</b>  I had done a fair amount of <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Introduction/Introduction.html">Cocoa programming</a> prior to these projects, so this didn&#8217;t come as a surprise. The real power of <a href="https://developer.mozilla.org/en/drawing_graphics_with_canvas">Canvas</a> lies in its transformation functions. I&#8217;d like to find an application for some more advanced spline generation. The downside is that Canvas and HTML don&#8217;t really mix, so you can have great text layout in HTML and sophisticated text animations in Canvas, but not both at the same time.
  </li>
<li>
    <b>JavaScript is a capable if not optimal language.</b>  No one is going to <a href="http://www.crockford.com/javascript/javascript.html">make the case</a> that JavaScript is the greatest language ever designed, but what it lacks in performance and language features, it partially makes up in powerful fundamentals and simplicity.  JavaScript is neither a great functional language nor a great object-oriented one, but it is sufficiently powerful to develop in either of these paradigms. Snowballs, for example, acts a lot like a simulation and benefited from stateful objects. The other applications required less state and I found several uses for <a href="http://en.wikipedia.org/wiki/Higher-order_function">higher-order functions</a>, though I wouldn&#8217;t consider any of them properly functional.
  </li>
<li>
    <b>Single-page applications are fun.</b>  These exercises have reminded me that, once the responsibilities of software engineering are stripped away, there is a joy to be found in coding for coding&#8217;s sake.
  </li>
</ul>
<p>
All of these applications are <a href="http://github.com/carbonfive/html5-playground">available on GitHub</a>, but it&#8217;s probably easier to right-click on the page and choose <i>view source</i>. <img src='http://blog.carbonfive.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/07/software-design/a-few-experiments-with-html-5-applications/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Carbon Five is hiring!</title>
		<link>http://blog.carbonfive.com/2010/07/c5/carbon-five-is-hiring</link>
		<comments>http://blog.carbonfive.com/2010/07/c5/carbon-five-is-hiring#comments</comments>
		<pubDate>Fri, 02 Jul 2010 18:06:05 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[C5]]></category>
		<category><![CDATA[jobs]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1047</guid>
		<description><![CDATA[We&#8217;re growing our team in both the San Francisco and Los Angeles offices (yay!). We&#8217;re looking for bright, passionate developers who love to learn and work with their peers. We&#8217;re writing a lot of Ruby and JavaScript these days, but there&#8217;s also a fair bit of Objective-C (iPhone) and some Java as well. We&#8217;ll cross-train [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re growing our team in both the San Francisco and Los Angeles offices (yay!).  We&#8217;re looking for bright, passionate developers who love to learn and work with their peers.  We&#8217;re writing a lot of Ruby and JavaScript these days, but there&#8217;s also a fair bit of Objective-C (iPhone) and some Java as well.  We&#8217;ll cross-train awesome candidates in the technologies they don&#8217;t know.  Are you an awesome Java developer who&#8217;s Rails-curious&#8230; perfect!</p>
<p>Check out our jobs page (<a href="http://www.carbonfive.com/jobs">http://www.carbonfive.com/jobs</a>) for additional detail.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/07/c5/carbon-five-is-hiring/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cassandra and Rails talk at LA NoSQL meetup</title>
		<link>http://blog.carbonfive.com/2010/06/nosql/cassandra-and-rails-talk-at-la-nosql-meetup</link>
		<comments>http://blog.carbonfive.com/2010/06/nosql/cassandra-and-rails-talk-at-la-nosql-meetup#comments</comments>
		<pubDate>Mon, 28 Jun 2010 17:41:47 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[cassandra]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1034</guid>
		<description><![CDATA[Last week, Mike Wynholds presented at the inaugural Los Angeles No SQL meetup. The movement to these non-traditional data storage systems has exploded in the last year, and we had a chance to use Cassandra in one of our client&#8217;s projects. Cassandra is a column based datastore developed within Facebook, and open-sourced as a top-level [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, Mike Wynholds presented at the <a href="http://www.meetup.com/lanosql/calendar/13699376/" target="_blank">inaugural Los Angeles No SQL meetup</a>. The movement to these non-traditional data storage systems has exploded in the last year, and we had a chance to use Cassandra in one of our client&#8217;s projects. Cassandra is a column based datastore developed within Facebook, and open-sourced as a top-level Apache project. It is being used by its creators as well as Digg, Twitter, Reddit, Rackspace, and many others. For the meetup, our presentation covered what is Cassandra&#8217;s structure, how we used it, the challenges we faced, and the lessons learned. You can watch the presentation below, or you can grab the presentation with this <a href="http://www.carbonfive.com/assets/documents/NoSQL-Cassandra.pdf">PDF</a>, and from its original <a href="http://www.carbonfive.com/assets/documents/NoSQL-Cassandra.key">Keynote file</a><a href="http://www.slideshare.net/mwynholds/cassandra-and-rails-at-la-nosql-meetup" target="_blank"></a>. And feel free to ask questions and leave comments below!</p>
<div id="__ss_4643279" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Cassandra and Rails at LA NoSQL Meetup" href="http://www.slideshare.net/mwynholds/cassandra-and-rails-at-la-nosql-meetup">Cassandra and Rails at LA NoSQL Meetup</a></strong><object id="__sse4643279" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=nosql-cassandra-100629111524-phpapp01&amp;stripped_title=cassandra-and-rails-at-la-nosql-meetup" /><param name="name" value="__sse4643279" /><param name="allowfullscreen" value="true" /><embed id="__sse4643279" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=nosql-cassandra-100629111524-phpapp01&amp;stripped_title=cassandra-and-rails-at-la-nosql-meetup" name="__sse4643279" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/mwynholds">Michael Wynholds</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/06/nosql/cassandra-and-rails-talk-at-la-nosql-meetup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UIView Frames and Bounds</title>
		<link>http://blog.carbonfive.com/2010/05/iphone/uiview-frames-and-bounds</link>
		<comments>http://blog.carbonfive.com/2010/05/iphone/uiview-frames-and-bounds#comments</comments>
		<pubDate>Fri, 28 May 2010 06:42:12 +0000</pubDate>
		<dc:creator>jonah</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1011</guid>
		<description><![CDATA[All UIViews have frame and bounds properties which define their dimensions. The similarity of these properties can cause some confusion when attempting to determine which property to use to calculate view sizes or reposition views. The frame of a view is given in the coordinates of its superview so a view controller&#8217;s view&#8217;s frame will [...]]]></description>
			<content:encoded><![CDATA[<p>All <a href="http://developer.apple.com/iphone/library/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-DontLinkElementID_1">UIViews</a> have <a href="http://developer.apple.com/iphone/library/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW5">frame</a> and <a href="http://developer.apple.com/iphone/library/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/uid/TP40006816-CH3-SW1">bounds</a> properties which define their dimensions. The similarity of these properties can cause some confusion when attempting to determine which property to use to calculate view sizes or reposition views.</p>
<p>The frame of a view is given in the coordinates of its superview so a view controller&#8217;s view&#8217;s frame will include offsets for the status bar, navigation bar, or tab bar. The bounds of a view are given in the view&#8217;s own coordinate system which does not include these elements.</p>
<p>In addition the frame property&#8217;s values are undefined if the view has any transform other than the identity transform. Rotating a view into landscape mode applies a transform to the view so it is not safe to rely on frame values for an app in landscape mode.</p>
<p>When a transform is applied to a view it does not apply to any subviews. A UIViewController or custom UIView subclass is therefore free to adjust the frames of its subviews to reposition them regardless of the device&#8217;s orientation. For example a UIView class can change the frames of its subviews within its layoutSubviews method no matter what transform might have been applied to the parent view.<br />
Each view&#8217;s frame will position it relative to its parent view so an origin of (0, 0) will always place a subview in the top left corner of its parent view.</p>
<p>See the images below for examples<span id="more-1011"></span></p>
<div id="attachment_1031" class="wp-caption alignnone" style="width: 330px"><a href="http://blog.carbonfive.com/wp-content/uploads/2010/05/Screen-shot-2010-05-28-at-12.59.40-AM.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/05/Screen-shot-2010-05-28-at-12.59.40-AM.png" alt="" title="portrait orientation" width="320" height="480" class="size-full wp-image-1031" /></a><p class="wp-caption-text">This view controller's view has a frame of (x:0.00 y:20.00 width:320.00 height:460.00) and bounds of (x:0.00 y:0.00 width:320.00 height:460.00). Its subviews are positioned relative to their parent views and not relative to the overall window.</p></div>
<div id="attachment_1032" class="wp-caption alignnone" style="width: 490px"><a href="http://blog.carbonfive.com/wp-content/uploads/2010/05/Screen-shot-2010-05-28-at-12.58.47-AM.png"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/05/Screen-shot-2010-05-28-at-12.58.47-AM.png" alt="" title="landscape orientation" width="480" height="320" class="size-full wp-image-1032" /></a><p class="wp-caption-text">This view controller's view has been transformed and its frame is therefore undefined and should not be used. Its bounds are (x:0.00 y:0.00 width:480.00 height:300.00). Its subviews have not been transformed so their frames can be used to position them relative to their parent views.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/05/iphone/uiview-frames-and-bounds/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A neat javascript hack</title>
		<link>http://blog.carbonfive.com/2010/05/javascript-ajax/a-neat-javascript-hack</link>
		<comments>http://blog.carbonfive.com/2010/05/javascript-ajax/a-neat-javascript-hack#comments</comments>
		<pubDate>Fri, 14 May 2010 18:31:04 +0000</pubDate>
		<dc:creator>lowell</dc:creator>
				<category><![CDATA[JavaScript / AJAX]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=1001</guid>
		<description><![CDATA[Javascript library publishers often go out of their way to prevent other sites from linking to their libraries directly, preferring anyone who wants to use their library to download and host the file(s) themselves. The most common way to do this is to check the referrer of any requests for javascript files and reject any [...]]]></description>
			<content:encoded><![CDATA[<p>Javascript library publishers often go out of their way to prevent other sites from linking to their libraries directly, preferring anyone who wants to use their library to download and host the file(s) themselves. The most common way to do this is to check the referrer of any requests for javascript files and reject any requests which come from other domains. However, this requires the (minor) extra complexity of requiring server side support.</p>
<p>I just discovered a neat hack in <a href="http://www.crockford.com/">Douglas Crockford</a>&#8216;s popular json2 parser/serializer which obviates the need for any server side support. So simple, yet so effective. Check out the first line of  <a href="http://www.json.org/json2.js">http://www.json.org/json2.js</a>:</p>
<pre>  alert('IMPORTANT: Remove this line from json2.js before deployment.');</pre>
<p>Neat, eh?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/05/javascript-ajax/a-neat-javascript-hack/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alon at Web 2.0 in SF May 5 on &#8220;Blurring the Lines&#8221;</title>
		<link>http://blog.carbonfive.com/2010/04/speaking/alon-at-web-2-0-in-sf-may-5-on-blurring-the-lines</link>
		<comments>http://blog.carbonfive.com/2010/04/speaking/alon-at-web-2-0-in-sf-may-5-on-blurring-the-lines#comments</comments>
		<pubDate>Wed, 28 Apr 2010 19:19:54 +0000</pubDate>
		<dc:creator>alon</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[customer development]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[lean startups]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=992</guid>
		<description><![CDATA[I&#8217;m excited about our panel next Wed at Web 2.0 Expo in San Francisco Blurring the Lines: From Human Centered Design to Customer Driven Development. We&#8217;re planning to share real world practices that help multi-disciplinary teams collaborate on creating great products. We&#8217;ve got a good range of perspective and experience to draw from. Maria Giudice [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m excited about our panel next Wed at Web 2.0 Expo in San Francisco <a href="http://www.web2expo.com/webexsf2010/public/schedule/detail/11837">Blurring the Lines: From Human Centered Design to Customer Driven Development</a>. We&#8217;re planning to share real world practices that help multi-disciplinary teams collaborate on creating great products.</p>
<p>We&#8217;ve got a good range of perspective and experience to draw from. <a href="http://www.web2expo.com/webexsf2010/public/schedule/speaker/10279">Maria Giudice</a> from <a href="http://www.hotstudio.com">Hot Studio</a> is our user-centered designer, <a href="http://www.web2expo.com/webexsf2010/public/schedule/speaker/52400">Rob Spiro</a> from <a href="http://aardvark.im">Aardvark</a> is our user-centered product entrepreneur, <a href="http://www.web2expo.com/webexsf2010/public/schedule/speaker/55939">Darren David</a> from <a href="http://stimulant.io">Stimulant</a> is our multi-touch and <a href="http://stimulant.io/wp/index.php/blog/2009/07/nathan-talks-nui-at-interaction09/">NUI</a> innovator, and I am our Agile software developer.</p>
<p>This event seems to have really caught on to the growing energy in the entrepreneurial community around strategies and techniques for creating products that people really want. <a href="http://www.web2expo.com/webexsf2010/public/schedule/speaker/45691">Eric Ries</a> is giving the <a href="http://www.web2expo.com/webexsf2010/public/schedule/detail/13317">keynote on Tuesday</a> just one year after his first big conference presentation at Web 2.0 2009 and <a href="http://www.steveblank.com/">Steve Blank</a> is giving the <a href="http://www.web2expo.com/webexsf2010/public/schedule/detail/12875">keynote Thursday</a>. Both of these guys and the growing community around them have been inspiration to me and our work at Carbon Five over the last year for the answers they provide about how software development serves the goal of creating successful businesses and products.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/04/speaking/alon-at-web-2-0-in-sf-may-5-on-blurring-the-lines/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Intro to Spring MVC Talk at SD Forum</title>
		<link>http://blog.carbonfive.com/2010/04/java/intro-to-spring-mvc-talk-at-sd-forum</link>
		<comments>http://blog.carbonfive.com/2010/04/java/intro-to-spring-mvc-talk-at-sd-forum#comments</comments>
		<pubDate>Wed, 28 Apr 2010 05:12:18 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[spring mvc]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=986</guid>
		<description><![CDATA[I&#8217;ll be speaking next Tuesday evening for SD Forum in Palo Atlo about Spring MVC. It&#8217;s mostly an introductory talk, but I&#8217;ll weave in some opinions and lessons learned from real projects. I&#8217;ll cover many of the MVC features, including those introduced in 3.0, by walking through code for a running application. Event Page Networking [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be speaking next Tuesday evening for SD Forum in Palo Atlo about Spring MVC.  It&#8217;s mostly an introductory talk, but I&#8217;ll weave in some opinions and lessons learned from real projects.  I&#8217;ll cover many of the MVC features, including those introduced in 3.0, by walking through code for a running application.</p>
<p><strong><a href="http://www.sdforum.org/index.cfm?fuseaction=Calendar.eventDetail&#038;eventID=13694">Event Page</a></strong></p>
<p>Networking (and pizza) starts at 6:30 and we&#8217;ll get down to business at 7:00.  The night starts with a short talk about Agile Java by Bjorn Freeman-Benson, of New Relic fame.</p>
<p>If you&#8217;re still doing Java and you&#8217;re curious about Spring MVC, come join in the fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/04/java/intro-to-spring-mvc-talk-at-sd-forum/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Play at Work for Museums and the Web in Denver, April 17</title>
		<link>http://blog.carbonfive.com/2010/04/agile/play-at-work</link>
		<comments>http://blog.carbonfive.com/2010/04/agile/play-at-work#comments</comments>
		<pubDate>Tue, 13 Apr 2010 19:12:27 +0000</pubDate>
		<dc:creator>alon</dc:creator>
				<category><![CDATA[Agile]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=975</guid>
		<description><![CDATA[Dana Mitroff from SFMOMA and I are running a session April 17 at Museums and the Web in Denver, CO called Play at Work: Applying Agile Methods to Museum Web Site Development. Our goal is to give attendees a taste of some of the novel activities we use to encourage collaboration, communication and fun while [...]]]></description>
			<content:encoded><![CDATA[<p>Dana Mitroff from <a href="http://www.sfmoma.org">SFMOMA</a> and I are running a session April 17 at <a href="http://www.archimuse.com/mw2010/">Museums and the Web</a> in Denver, CO called <a href="http://www.archimuse.com/mw2010/abstracts/prg_335002326.html">Play at Work: Applying Agile Methods to Museum Web Site Development</a>.</p>
<p>Our goal is to give attendees a taste of some of the novel activities we use to encourage collaboration, communication and fun while engaged in the messy business of creating web software. The session is intended to be interactive &#8211; we want attendees to try some of this out with us &#8211; which should be interesting given that the conference organizers chose to put us in the Grand Ballroom, the same room used for the conference keynotes. &#8220;Gather around, everyone!&#8221;</p>
<h3>Resources</h3>
<p>Here are some follow up resources for attendees who are intrigued and want to learn more.</p>
<p><strong>Effective User Stories for Agile Requirements</strong><br />
<a href="http://www.mountaingoatsoftware.com/presentations/52-effective-user-stories-for-agile-requirements">http://www.mountaingoatsoftware.com/presentations/52-effective-user-stories-for-agile-requirements</a><br />
This series of slides by Mike Cohn is a good introduction to user stories as a means of capturing project requirements. We often use this presentation to introduce folks new to agile to the ins and outs of user stories.</p>
<p><strong>Agile Estimating and Planning</strong><br />
<a href="http://www.mountaingoatsoftware.com/books/1-agile-estimating-and-planning">http://www.mountaingoatsoftware.com/books/1-agile-estimating-and-planning</a><br />
This book by Mike Cohn is an excellent guide to the planning side of agile software development and what you do with those user stories.</p>
<p><strong>Art of Agile</strong><br />
<a href="http://www.amazon.com/Art-Agile-Development-James-Shore/dp/0596527675">http://www.amazon.com/Art-Agile-Development-James-Shore/dp/0596527675</a><br />
This book by James Shore covers the breadth of agile practices, both in planning and development, and includes many activities like those we cover in this session for helping your team collaborate and communicate effectively and efficiency.</p>
<p><strong>Tasty Cupcakes</strong><br />
<a href="http://blog.tastycupcakes.com">http://blog.tastycupcakes.com</a><br />
Tasty Cupcakes is collection of games and activities designed to help illustrate the value and effectiveness of different agile practices. Rather than being specific techniques used in running an agile project, they are more targeted at teaching agile practices and values with short illustrative games.</p>
<p><strong>The Manifesto for Agile Software Development</strong><br />
<a href="http://agilemanifesto.org">http://agilemanifesto.org</a><br />
This is a historic document (2001) in the Agile software movement where a group of folks advocating new values and practices in software development came together to recognize their shared goals and values.</p>
<blockquote><p>
We are uncovering better ways of developing<br />
software by doing it and helping others do it.<br />
Through this work we have come to value:</p>
<p><em>Individuals and interactions</em> over processes and tools<br />
<em>Working software</em> over comprehensive documentation<br />
<em>Customer collaboration</em> over contract negotiation<br />
<em>Responding to change</em> over following a plan</p>
<p>That is, while there is value in the items on<br />
the right, we value the items on the left more.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/04/agile/play-at-work/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Controlling embedded Vimeo video using javascript</title>
		<link>http://blog.carbonfive.com/2010/04/javascript-ajax/controlling-embedded-vimeo-video-using-javascript-3</link>
		<comments>http://blog.carbonfive.com/2010/04/javascript-ajax/controlling-embedded-vimeo-video-using-javascript-3#comments</comments>
		<pubDate>Thu, 01 Apr 2010 18:06:21 +0000</pubDate>
		<dc:creator>lowell</dc:creator>
				<category><![CDATA[JavaScript / AJAX]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=960</guid>
		<description><![CDATA[We are embedding video from Vimeo on a site we are working on and wanted to change the behavior of playing a video so that it would go back to the first frame after the video was done playing, rather than staying on the last frame. Since it ended up being harder than expected and [...]]]></description>
			<content:encoded><![CDATA[<p>We are embedding video from Vimeo on a site we are working on and wanted to change the behavior of playing a video so that it would go back to the first frame after the video was done playing, rather than staying on the last frame. Since it ended up being harder than expected and finding good documentation online was difficult, I thought I&#8217;d share my solution here.<span id="more-960"></span></p>
<p>First, in order to do this, you need to embed your video using the <a href="http://code.google.com/p/swfobject/">swfobject</a> javascript library. Next, you have to create a div that has an id (swfobject requires you to pass an id string for its initialization) &#8211; this div will be replaced by swfobject with a video object. The convention we&#8217;re using is to use an id of video-XXX, where XXX is the id of the video in <a href="http://vimeo.com">vimeo</a>&#8216;s system. Finally, the div needs to be given a size (using CSS) so that the embedded video will end up being the correct size.</p>
<p>The code is structured as a <a href="http://jquery.com">jQuery</a> plugin, so of course you will need jQuery. However, there is not a strong dependency on jQuery so with a little restructuring, I&#8217;m sure the jQuery dependency could be dropped.</p>
<p>Here it is:</p>
<p><script src="http://gist.github.com/352152.js?file=gistfile1.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/04/javascript-ajax/controlling-embedded-vimeo-video-using-javascript-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install rails on CentOS 5.4 x64</title>
		<link>http://blog.carbonfive.com/2010/03/ruby-on-rails/how-to-install-rails-on-centos-5-4</link>
		<comments>http://blog.carbonfive.com/2010/03/ruby-on-rails/how-to-install-rails-on-centos-5-4#comments</comments>
		<pubDate>Tue, 30 Mar 2010 01:20:15 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Ruby (on Rails)]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=943</guid>
		<description><![CDATA[1. Download ruby source wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz tar -zxvf ruby-1.8.7.tar.gz 2. Install dependencies sudo yum install gcc sudo yum install gcc-c++ sudo yum install zlib-devel sudo yum install openssl-devel sudo yum install readline-devel sudo yum install sqlite3-devel 3. Build ruby from source cd ruby-1.8.7 ./configure --with-openssl-dir=/usr/lib64/openssl make sudo make install 4. Download rubygems source wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. Download ruby source</strong><br />
<code><br />
wget http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz<br />
tar -zxvf ruby-1.8.7.tar.gz<br />
</code></p>
<p><strong>2. Install dependencies</strong><br />
<code><br />
sudo yum install gcc<br />
sudo yum install gcc-c++<br />
sudo yum install zlib-devel<br />
sudo yum install openssl-devel<br />
sudo yum install readline-devel<br />
sudo yum install sqlite3-devel<br />
</code></p>
<p><strong>3. Build ruby from source</strong><br />
<code><br />
cd ruby-1.8.7<br />
./configure --with-openssl-dir=/usr/lib64/openssl<br />
make<br />
sudo make install<br />
</code></p>
<p><strong>4. Download rubygems source</strong><br />
<code><br />
wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz<br />
tar -zxvf rubygems-1.3.6.tgz<br />
cd rubygems-1.3.6<br />
sudo ruby setup.rb<br />
</code></p>
<p><strong>5. Install gems</strong><br />
<code><br />
sudo gem install rake<br />
sudo gem install rails<br />
sudo gem install sqlite3-ruby (optional)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/03/ruby-on-rails/how-to-install-rails-on-centos-5-4/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Story Mapper is Release Planning for Pivotal Tracker</title>
		<link>http://blog.carbonfive.com/2010/03/agile/story-mapper-is-release-planning-for-pivotal-tracker</link>
		<comments>http://blog.carbonfive.com/2010/03/agile/story-mapper-is-release-planning-for-pivotal-tracker#comments</comments>
		<pubDate>Thu, 25 Mar 2010 22:42:03 +0000</pubDate>
		<dc:creator>alon</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[patton]]></category>
		<category><![CDATA[story map]]></category>
		<category><![CDATA[tracker]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=930</guid>
		<description><![CDATA[We&#8217;re proud to announce the release of Story Mapper, a project we have been working on at Carbon Five to support an Agile project planning technique called story mapping. We use Pivotal Tracker to manage our feature backlog and the day-to-day activities of tracking a feature from estimation through delivery and acceptance. However, we find [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re proud to announce the release of <a href="http://www.trackerstorymaps.com">Story Mapper</a>, a project we have been working on at Carbon Five to support an Agile project planning technique called <a href="http://www.agileproductdesign.com/blog/the_new_backlog.html">story mapping</a>.</p>
<p>We use <a href="http://www.pivotaltracker.com">Pivotal Tracker</a> to manage our feature backlog and the day-to-day activities of tracking a feature from estimation through delivery and acceptance. However, we find it easy to lose the big picture in the detail-oriented view Tracker provides.</p>
<p>Story Mapper uses your project data from Tracker to provide a higher level view geared toward release and milestone planning. This view is based on Jeff Patton&#8217;s <a href="http://www.agileproductdesign.com/blog/the_new_backlog.html">story mapping</a> techniques and provides the ability to see how the different components of your project will evolve across successive milestone.</p>
<p><a href="http://www.trackerstorymaps.com"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/03/screenshot1.png" alt="Story Mapper Screenshot" title="Story Mapper Screenshot" width="500" height="347" class="aligncenter size-full wp-image-931" style="border:1px solid #303030;"/></a></p>
<p>All you need in order to use Story Mapper is a Tracker project with a backlog of stories and a subset of labels that represent user activities or components of your system. If you have a large project and have not been using labels in this way, you may have some work to do in Story Mapper before you have a story map that makes sense.</p>
<p><a href="http://www.trackerstorymaps.com">Try it out</a>, let us know what you think, and tell us how to make it better. Comment here so others can see your thoughts or by <a href="mailto:storymapper@carbonfive.com">contacting us directly</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/03/agile/story-mapper-is-release-planning-for-pivotal-tracker/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ada Freezes Monsters with Snowballs (and Canvas)</title>
		<link>http://blog.carbonfive.com/2010/03/javascript-ajax/ada-freezes-monsters-with-snowballs-and-canvas</link>
		<comments>http://blog.carbonfive.com/2010/03/javascript-ajax/ada-freezes-monsters-with-snowballs-and-canvas#comments</comments>
		<pubDate>Mon, 15 Mar 2010 17:53:32 +0000</pubDate>
		<dc:creator>alon</dc:creator>
				<category><![CDATA[JavaScript / AJAX]]></category>
		<category><![CDATA[sxsw canvas flash]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=911</guid>
		<description><![CDATA[Alex sent me an email Saturday morning with this really cute Canvas game he wrote with his daughter Ada. His timing was really great since I am on a panel at SXSW Tuesday called Is Canvas the End of Flash? He explains it all below&#8230; I was telling Ada how video games are made one [...]]]></description>
			<content:encoded><![CDATA[<p>Alex sent me an email Saturday morning with this really cute Canvas game he wrote with his daughter Ada. His timing was really great since I am on a panel at SXSW Tuesday called <a href="http://blog.carbonfive.com/2010/03/speaking/alon-on-flash-and-canvas-at-sxsw">Is Canvas the End of Flash?</a> He explains it all below&#8230;</p>
<blockquote><p>
I was telling Ada how video games are made one night, and she ask me if I could make a game. I said yes, we could make one together, and she bugged me all night to get started.  I told her to start by designing a game on paper.  She drew something that looks surprisingly like pacman (given that she&#8217;s never played the game), but she told me the dots were snowballs and that you could throw them at the monsters and use them to build walls.  I started programming it as an SPA using canvas.  She came up with all the rules, with some suggestions from me.</p>
<p>It may be that I&#8217;ve just been doing a lot of JS lately, but building a game like this in JavaScript felt really comfortable and extremely rapid.  I had a basic version working with about 200 lines of code, but the details have tripled that.  I went through a couple of major refactors, neither of which were troublesome in textmate.</p>
<p>The game is completely un-optimized, but it runs fast enough on my macbook.  I know lots of ways to speed it up if I had to.  It&#8217;s a little rough in a lot of areas, but it&#8217;s getting close enough to present.
</p></blockquote>
<p><a href="http://asalant.github.com/snowballs/" target="_new"><img src="http://blog.carbonfive.com/wp-content/uploads/2010/03/screenshot.png" alt="Play Snowballs" title="Play Snowballs" width="600" height="360" class="aligncenter size-full wp-image-916" /></a></p>
<p style="text-align: center">
<a href="http://asalant.github.com/snowballs/" target="_new">Play Snowballs</a>
</p>
<h3>Instructions</h3>
<p>Load in Firefox or Safari.  The arrow keys move your character, the spacebar launches snowballs (which you have to collect).  Hit a monster 5 times to freeze it, then touch it to collect it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/03/javascript-ajax/ada-freezes-monsters-with-snowballs-and-canvas/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing iPhone View Controllers</title>
		<link>http://blog.carbonfive.com/2010/03/testing/testing-view-controllers</link>
		<comments>http://blog.carbonfive.com/2010/03/testing/testing-view-controllers#comments</comments>
		<pubDate>Wed, 10 Mar 2010 18:01:08 +0000</pubDate>
		<dc:creator>jonah</dc:creator>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=864</guid>
		<description><![CDATA[I have been writing tests around my iPhone apps&#8217; view controllers in order to follow the same TDD practices we use in other environments. Writing tests first has changed the way I structure my code in a couple of ways which I think offer immediate and emergent benefits for my applications. Most of an iPhone [...]]]></description>
			<content:encoded><![CDATA[<p>I have been writing tests around my iPhone apps&#8217; view controllers in order to follow the same TDD practices we use in other environments. Writing tests first has changed the way I structure my code in a couple of ways which I think offer immediate and emergent benefits for my applications. Most of an iPhone application&#8217;s business logic is implemented in its view controllers. Testing those controllers is therefore a priority if I want to have a well tested application.<br />
Below are some examples of the sort of tests I have written for my view controllers using GTM, Hamcrest, and OCMock (our <a href="http://blog.carbonfive.com/2009/02/testing/iphone-unit-testing-toolkit">iPhone Unit Testing Toolkit</a>). Hopefully this can serve as a starting point for the tests you could be writing for your own projects.<br />
<span id="more-864"></span><br />
<strong>Testing Interface Builder Bindings</strong><br />
Broken nib bindings appear to be a common cause of application bugs during development. It is certainly easy enough to accidentally break or forget to create a binding while editing a nib file so let&#8217;s write some simple tests to assert that our actions and outlets are actually connected to objects in a nib file.<br />
These are really tests of the nib file itself. If the goal was to test the view controller&#8217;s use of these bound view objects I would replace the views with mock objects which could verify the controller&#8217;s behavior. (Erik Dörnenburg has provided a nice example of doing just that: <a href="http://erik.doernenburg.com/2008/07/testing-cocoa-controllers-with-ocmock/">Testing Cocoa Controllers with OCMock</a>)</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> testViewBinding <span style="color: #002200;">&#123;</span>
	TestableSimpleViewController <span style="color: #002200;">*</span>viewController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>TestableSimpleViewController alloc<span style="color: #002200;">&#93;</span> initWithNibName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;color: blue;">&quot;TestableSimpleViewController&quot;</span> bundle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>viewController loadView<span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">//It is not strictly necessary to call loadView for this test as we access the view property which will call loadView if view is nil</span>
	assertThat<span style="color: #002200;">&#40;</span>viewController.view, isNot<span style="color: #002200;">&#40;</span>nilValue<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
	assertThat<span style="color: #002200;">&#40;</span>viewController.button, isNot<span style="color: #002200;">&#40;</span>nilValue<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> testUIButtonActionBinding <span style="color: #002200;">&#123;</span>
	TestableSimpleViewController <span style="color: #002200;">*</span>viewController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>TestableSimpleViewController alloc<span style="color: #002200;">&#93;</span> initWithNibName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;color: blue;">&quot;TestableSimpleViewController&quot;</span> bundle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>viewController loadView<span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">//Here we must call loadView since we have not accessed the controller's view property to trigger view loading from the nib</span>
	assertThat<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>viewController.button actionsForTarget<span style="color: #002200;">:</span>viewController forControlEvent<span style="color: #002200;">:</span>UIControlEventTouchUpInside<span style="color: #002200;">&#93;</span>, onlyContains<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;color: blue;">&quot;testAction&quot;</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p><strong>Testing View Reloading</strong><br />
View controllers should be able to unload their views if the application receives a memory warning while the view is not visible and then reload the view when it is needed again. We can reproduce that same sequence of messages in a test. For a non-trivial controller we would add additional assertions to test that any other view dependent properties were correctly released and recreated as the view was unloaded and reloaded.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> testViewUnloading <span style="color: #002200;">&#123;</span>
	TestableSimpleViewController <span style="color: #002200;">*</span>viewController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>TestableSimpleViewController alloc<span style="color: #002200;">&#93;</span> initWithNibName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;color: blue;">&quot;TestableSimpleViewController&quot;</span> bundle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>viewController loadView<span style="color: #002200;">&#93;</span>;
	assertThat<span style="color: #002200;">&#40;</span>viewController.view, isNot<span style="color: #002200;">&#40;</span>nilValue<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
	<span style="color: #002200;">&#91;</span>viewController didReceiveMemoryWarning<span style="color: #002200;">&#93;</span>;
	assertThat<span style="color: #002200;">&#40;</span>viewController.button, is<span style="color: #002200;">&#40;</span>nilValue<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>; <span style="color: #11740a; font-style: italic;">//Note that while viewController.view is nil here we cannot test that directly as accessing view will trigger a call to loadView. Instead we can only test that our outlets have been released as expected.</span>
	<span style="color: #002200;">&#91;</span>viewController loadView<span style="color: #002200;">&#93;</span>;
	assertThat<span style="color: #002200;">&#40;</span>viewController.view, isNot<span style="color: #002200;">&#40;</span>nilValue<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p><strong>Testing Switching Between View Controllers</strong><br />
View controllers frequently have dependencies on other view controllers. If those dependencies are tightly coupled it becomes very difficult to test the behavior of a single view controller. Instead we can expose those dependencies and replace them with mock objects in order to isolate the controller we are currently testing. Here we have a simple table view controller which presents a detail view controller when a table cell is selected. By mocking both the navigation controller used to present that detail view and the detail view itself we can capture and verify the table view controller&#8217;s behavior.</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> testSelectingACellPushesADetailView <span style="color: #002200;">&#123;</span>
	<span style="color: #a61390;">id</span> detailViewController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>OCMockObject niceMockForClass<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>GenericDetailViewController class<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #400080;">NSDictionary</span> <span style="color: #002200;">*</span>data <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDictionary</span> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	UINavigationController <span style="color: #002200;">*</span>navController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UINavigationController alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
	<span style="color: #a61390;">id</span> navigationController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>OCMockObject partialMockForObject<span style="color: #002200;">:</span>navController<span style="color: #002200;">&#93;</span>;
&nbsp;
	TestableTableViewController <span style="color: #002200;">*</span>viewController <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>TestableTableViewController alloc<span style="color: #002200;">&#93;</span> initWithNibName<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;color: blue;">&quot;TestableTableViewController&quot;</span> bundle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
	viewController.detailViewController <span style="color: #002200;">=</span> detailViewController;
	viewController.modelData <span style="color: #002200;">=</span> data;
&nbsp;
	<span style="color: #002200;">&#91;</span>navigationController pushViewController<span style="color: #002200;">:</span>viewController animated<span style="color: #002200;">:</span><span style="color: #a61390;">NO</span><span style="color: #002200;">&#93;</span>;
	assertThat<span style="color: #002200;">&#40;</span>viewController.navigationController, isNot<span style="color: #002200;">&#40;</span>nilValue<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>;
&nbsp;
	<span style="color: #002200;">&#91;</span>viewController loadView<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>detailViewController expect<span style="color: #002200;">&#93;</span> setModelData<span style="color: #002200;">:</span>data<span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">//expect that the detail view will be given some data to display</span>
	<span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>navigationController expect<span style="color: #002200;">&#93;</span> pushViewController<span style="color: #002200;">:</span>detailViewController animated<span style="color: #002200;">:</span><span style="color: #a61390;">YES</span><span style="color: #002200;">&#93;</span>; <span style="color: #11740a; font-style: italic;">//expect that the detail view will be pushed onto the nave controller</span>
	<span style="color: #002200;">&#91;</span>viewController tableView<span style="color: #002200;">:</span>viewController.tableView didSelectRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSIndexPath</span> indexPathForRow<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span> inSection<span style="color: #002200;">:</span><span style="color: #2400d9;">0</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>detailViewController verify<span style="color: #002200;">&#93;</span>;
	<span style="color: #002200;">&#91;</span>navigationController verify<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p><strong>So what makes test-driven controllers different?</strong><br />
I certainly could have written these example controllers without any tests around them. However by writing tests I was encouraged to make a couple of changes to the way I structure my code.</p>
<ul>
<li>My controllers expose dependencies that might otherwise remain buried in their implementations. In the example above I exposed the detail view controller my controller used so that I could replace it with a mock object. That made it possible to test that the expected data was passed to the detail view but it will also make it easy to switch to a different detail view controller in the future.</li>
<li>By focusing on testing just one class at a time I am encouraged to create well defined interfaces and a clear set of responsibilities for each class. That in turn leads to more modular code which is easier to maintain and reuse.</li>
<li>I write bugs but if I write a test to reproduce them and then prove that they are fixed I shouldn&#8217;t ever see the same bug twice. It is much easier to catch a missing nib binding because a test failed than it is to see the app crash when displaying some view and have to track down that exc_bad_access error in the debugger.</li>
<li>Most importantly by writing tests I can have confidence that my code works as I expected, not only when I first write it but also every time I run my tests (which happens every time I build the app). With that feedback I can change one controller without fearing that I might have broken something somewhere else in the app.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/03/testing/testing-view-controllers/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript Testing Talk in Oakland</title>
		<link>http://blog.carbonfive.com/2010/03/software-design/javascript-testing-talk-in-oakland</link>
		<comments>http://blog.carbonfive.com/2010/03/software-design/javascript-testing-talk-in-oakland#comments</comments>
		<pubDate>Mon, 08 Mar 2010 17:40:13 +0000</pubDate>
		<dc:creator>andy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[JavaScript / AJAX]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=903</guid>
		<description><![CDATA[Next week at EBig Jonah and I are wrapping up our world tour of talking about Javascript testing. March 17th in Oakland: &#8221;Recent evolutions in Javascript testing frameworks now allow creating test suites, test-driving development, and running tests on a continuous integration server. This allows us to support more complex Javascript, have confidence in the implementation, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ebig.org/index.cfm?fuseaction=Calendar.eventDetail&amp;eventID=158" target="_blank">Next week at EBig</a> Jonah and I are wrapping up our world tour of talking about Javascript testing. March 17th in Oakland: &#8221;Recent evolutions in Javascript testing frameworks now allow creating test suites, test-driving development, and running tests on a continuous integration server. This allows us to support more complex Javascript, have confidence in the implementation, and push more of the logic from the server into the browser, reducing the load on the server.&#8221; The focus of the talk is walking through a suite of tests we build for a real-world example.</p>
<p>For those of you who caught it last week at the SDForum, here are the links people requested:</p>
<ul>
<li><a href="http://code.google.com/p/javascript-test-maven-plugin/">Maven plugin for Javascript Unit Testing with Rhino/ScrewUnit</a> (from C5)</li>
<li><a href="http://github.com/ndp/wizardize">The current code for the &#8220;wizardize&#8221; example we walked through</a>.</li>
<li><a href="http://github.com/relevance/blue-ridge">Blue Ridge (Rails integration tool)</a></li>
<li><a href="http://pivotallabs.com/users/nick/blog/articles/455-better-javascript-testing-through-screwunit">ScrewUnit</a></li>
<li><a href="http://www.slideshare.net/jeresig/understanding-javascript-testing">JResig&#8217;s Presentation on JS Testing</a></li>
<li><a href="http://dl.dropbox.com/u/1399422/Javascript%20Unit%20Testing%2C%20Yes%20We%20Can%20Slides.pdf">The slides we used</a></li>
</ul>
<p>To sign up for next Wednesday, go to the <a href="http://www.ebig.org/index.cfm?fuseaction=Calendar.eventDetail&amp;eventID=158">EBig site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/03/software-design/javascript-testing-talk-in-oakland/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alon on Flash and Canvas at SXSW</title>
		<link>http://blog.carbonfive.com/2010/03/speaking/alon-on-flash-and-canvas-at-sxsw</link>
		<comments>http://blog.carbonfive.com/2010/03/speaking/alon-on-flash-and-canvas-at-sxsw#comments</comments>
		<pubDate>Mon, 01 Mar 2010 19:55:54 +0000</pubDate>
		<dc:creator>alon</dc:creator>
				<category><![CDATA[Speaking]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=897</guid>
		<description><![CDATA[I&#8217;m looking forward to participating in a panel Is Canvas the End of Flash? this month at SXSW on the role the new HTML Canvas element is playing in web development and how it compares to Flash. Much of the perspective I have for this panel comes from my long history working with Flash and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sxsw.com"><img src="http://www.sxsw.com/files/conf-logos/ia-logo.gif" align="right" alt="SXSW" style="margin-left:20px;"></a></p>
<p>I&#8217;m looking forward to participating in a panel <a href="http://my.sxsw.com/events/event/561">Is Canvas the End of Flash?</a> this month at SXSW on the role the new HTML Canvas element is playing in web development and how it compares to Flash. Much of the perspective I have for this panel comes from my long history working with Flash and from our recent work with Canvas for Isilon Systems on <a href="http://www.isilon.com/isiBlogs/254">InsightIQ</a>.</p>
<p>The panel has been organized by Greg Veen of SmallBatch, Inc., creators of <a href="http://typekit.com">TypeKit</a> and includes Chet Haas from the Adobe Flex team, Nathan Germick from social gaming start up Wonderhill and Ben Galbraith from Palm and Mozilla, also lead of the ambitious <a href="">Bespin project</a>.</p>
<p>Come check us out if you&#8217;re going to be in Austin.</p>
<p>Also check out some of the presentations by friends of Carbon Five at SXSW:</p>
<p><a href="http://hottub.hotstudio.com/2010/03/sxsw-here-we-come-a-museum-convergence-success-story/">From Dinosaurs to Digital: A Museum Convergence Success Story</a> from Maria Giudice of <a href="http://www.hotstudio.com">Hot Studio</a> on her work with Jonathon Denholtz of the <a href="http://www.calacademy.org/">California Academy of Sciences</a>.</p>
<p><a href="http://my.sxsw.com/events/event/662">Social Search: A Little Help From My Friends</a> a panel on social search organized by Brynn Evans that includes CEO Max Ventilla from our recently acquired client <a href="http://vark.com">Aardvark</a>.</p>
<p><a href="http://my.sxsw.com/events/event/421">Beyond the Desktop: Embracing New Interaction Paradigms</a> a panel on interactions that go beyond keyboard+mouse includes Nathan Moody of <a href="http://www.stimulant.io">Stimulant</a>, masters of the multitouch Microsoft Surface and NUI design.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/03/speaking/alon-on-flash-and-canvas-at-sxsw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test-Driven JavaScript with ScrewUnit and BlueRidge</title>
		<link>http://blog.carbonfive.com/2010/02/software-design/test-driven-javascript-with-screwunit-and-blueridge</link>
		<comments>http://blog.carbonfive.com/2010/02/software-design/test-driven-javascript-with-screwunit-and-blueridge#comments</comments>
		<pubDate>Fri, 26 Feb 2010 01:33:04 +0000</pubDate>
		<dc:creator>andy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript / AJAX]]></category>
		<category><![CDATA[Ruby (on Rails)]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=893</guid>
		<description><![CDATA[Jonah and I are taking our presentation about Javascript Testing on the road next Tuesday at 6:30 in Palo Alto, at the SDForum The teaser for it&#8230; Recent evolutions in JavaScript testing frameworks now allow creating test suites, test-driving development, and running tests on a continuous integration server. This allows us to support more complex JavaScript, [...]]]></description>
			<content:encoded><![CDATA[<p>Jonah and I are taking our presentation about Javascript Testing on the road <a href="http://www.sdforum.org/index.cfm?fuseaction=Calendar.eventDetail&amp;eventID=13629&amp;pageId=471">next Tuesday at 6:30 in Palo Alto, at the SDForum</a></p>
<p>The teaser for it&#8230; Recent evolutions in JavaScript testing frameworks now allow creating test suites, test-driving development, and running tests on a continuous integration server. This allows us to support more complex JavaScript, have confidence in the implementation, and push more of the logic from the server into the browser, reducing the load on the server&#8230;</p>
<p>Hope to see you there.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/02/software-design/test-driven-javascript-with-screwunit-and-blueridge/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screw.Unit JS Testing in Maven: javascript-test-maven-plugin</title>
		<link>http://blog.carbonfive.com/2010/02/testing/screw-unit-js-testing-in-maven-javascript-test-maven-plugin</link>
		<comments>http://blog.carbonfive.com/2010/02/testing/screw-unit-js-testing-in-maven-javascript-test-maven-plugin#comments</comments>
		<pubDate>Thu, 25 Feb 2010 03:29:31 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript / AJAX]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=878</guid>
		<description><![CDATA[I&#8217;ve written a maven plugin to integrate Screw.Unit javascript tests into a maven build. The project is inspired by the Blue Ridge testing framework for Rails, but it&#8217;s a bit more light-weight by design. To use the plugin you should start by downloading Screw.Unit and implement your tests according to their instructions. Once you have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written a <a href="http://code.google.com/p/javascript-test-maven-plugin/">maven plugin</a> to integrate <a href="http://github.com/nkallen/screw-unit">Screw.Unit</a> javascript tests into a maven build.  The project is inspired by the <a href="http://blog.thinkrelevance.com/2009/5/12/blue-ridge-1-0-javascript-unit-testing-for-rails-scandalous">Blue Ridge</a> testing framework for Rails, but it&#8217;s a bit more light-weight by design.<br />
<span id="more-878"></span><br />
To use the plugin you should start by downloading Screw.Unit and implement your tests according to their instructions.  Once you have some tests implemented in html files, add the plugin to your maven pom file:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;goals<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;goal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javascript-test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/goal<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/goals<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/execution<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/executions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.carbonfive.javascript-test<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>javascript-test-maven-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.0-beta1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>src/test/javascript/suite*.html<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/include<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/includes<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>You will probably also need to add Carbon Five&#8217;s public repository so that maven will know where to grab the plugin:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>c5-public-repository<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Carbon Five Public Repository<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/name<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://mvn.carbonfive.com/public<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/url<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepository<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pluginRepositories<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>The &lt;configuration&gt; section contains <a href="http://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html">standard</a> maven &lt;include&gt; and &lt;exclude&gt; tags to allow you to specify any Screw.Unit test suite html files you would like to include in your build.</p>
<p>Now when maven executes its test phase, it will include your javascript tests as well. Any test that fails will halt the build. When the test phase is complete the target directory will contain a &#8216;screw-unit&#8217; directory that contains the test reports. There will be two files for every file included in the test execution The first is an XML file named TEST-dir1.dir2.dir3.filename.html.xml that contains the test results for that file in a reasonable approximation of JUnit&#8217;s xml format. The other file will be named dir1.dir2.dir3.filename.html and will contain a sort of snapshot of the test suite&#8217;s html at the time the tests completed (the javascript will be removed and the css will be baked in).</p>
<p>Like Blue Ridge, the javascript-test-maven-plugin relies on the excellent <a href="http://ejohn.org/blog/bringing-the-browser-to-the-server/">env.js</a> project and the less-excellent <a href="http://www.mozilla.org/rhino/">Rhino</a> project to emulate a browser in Java.   Unfortunately this combination creates the possibility of discrepancies between the browser and build results, and the probability of relatively slow test execution.  To keep the simulation as realistic as possible, javascript-test-maven-plugin recreates the test environment for each Screw.Unit html file, so the more tests you can cram into a single file the faster your builds will run.</p>
<p>There are a few directions for future work.  I&#8217;d like for the plugin to handle other browser-based javascript testing frameworks.  Screw.Unit is popular, but seems suboptimal in many respects.  The only limiting factor here is the plugin&#8217;s ability to interpret the results.  If env.js could run in javascript interpreters other than Rhino, I&#8217;d like to give the the plugin the capability to fork out to <a href="http://www.mozilla.org/js/spidermonkey/">spidermonkey</a> for better compatibility and performance.  Modifying the plugin would be relatively easy, but env.js appears to have some significant dependencies on Java.</p>
<p>Check it out if you have a need for this kind of thing and let us know if you have any problems or suggestions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/02/testing/screw-unit-js-testing-in-maven-javascript-test-maven-plugin/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>DNA Direct Acquired by Medco Health Solutions</title>
		<link>http://blog.carbonfive.com/2010/02/clients/dna-direct-acquired-by-medco-health-solutions</link>
		<comments>http://blog.carbonfive.com/2010/02/clients/dna-direct-acquired-by-medco-health-solutions#comments</comments>
		<pubDate>Sat, 20 Feb 2010 01:26:51 +0000</pubDate>
		<dc:creator>alon</dc:creator>
				<category><![CDATA[Clients]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=865</guid>
		<description><![CDATA[Medco Health Solutions and Carbon Five client DNA Direct announced earlier this month that DNA Direct has been acquired by Medco. Congratulations to everyone on the DNA Direct team on this new opportunity to extend their genomic medicine and health care services to an exponentially greater audience. Among other initiatives, Carbon Five worked with DNA [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://medco.mediaroom.com/index.php?s=43&#038;item=424">Medco Health Solutions</a> and Carbon Five client <a href="http://www.dnadirect.com">DNA Direct</a> announced earlier this month that <a href="http://talk.dnadirect.com/2010/02/01/medco-acquires-dna-direct-a-great-step-for-personalized-medicine/">DNA Direct has been acquired by Medco</a>. Congratulations to everyone on the DNA Direct team on this new opportunity to extend their genomic medicine and health care services to an exponentially greater audience.</p>
<p>Among other initiatives, Carbon Five worked with DNA Direct to roll out their first release of, as founder and CEO Ryan Phelan describes it, &#8220;the first genetic guidance program for a top five health plan with Humana, facilitating prior authorization and providing clinical services to ensure appropriate testing with lower out of pocket costs from the right lab.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/02/clients/dna-direct-acquired-by-medco-health-solutions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solid State Disks</title>
		<link>http://blog.carbonfive.com/2010/02/uncategorized/solid-state-disks</link>
		<comments>http://blog.carbonfive.com/2010/02/uncategorized/solid-state-disks#comments</comments>
		<pubDate>Tue, 16 Feb 2010 18:05:35 +0000</pubDate>
		<dc:creator>christian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hard disk]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[ssd]]></category>

		<guid isPermaLink="false">http://blog.carbonfive.com/?p=829</guid>
		<description><![CDATA[I&#8217;m a bit of a hardware geek. I tend to keep up on what&#8217;s new and neat. I&#8217;m a bit conservative when it actually comes to buying the latest and greatest, but that doesn&#8217;t stop me from following the trends. I&#8217;ve been eyeing solid state disks for the last year or so, speculating that they [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a bit of a hardware geek.  I tend to keep up on what&#8217;s new and neat.  I&#8217;m a bit conservative when it actually comes to buying the latest and greatest, but that doesn&#8217;t stop me from following the trends.</p>
<p>I&#8217;ve been eyeing solid state disks for the last year or so, speculating that they could have a huge impact on developer productivity once all of the major gotchas were worked out.  I specifically though that pairing a decent laptop with an SSD would be awesome, since laptops generally have significantly slower hard disks than workstations.  They&#8217;re also a bit slower across the board (cpu, memory bus, etc), so I thought the IO boost from an SSD might even things out.</p>
<p>In December I decided to end the speculation, so I bought an 80G Intel x25m (Gen 2) SSD for my 15&#8243; Unibody MacBook Pro.<br />
<span id="more-829"></span></p>
<p>As it turns out, the SSD is faster than the 7200 RPM disk that was in my laptop by every measure.  Though, for most of the day-to-day tasks that I benchmarked, it wasn&#8217;t <em>that</em> much faster. For my Java and Rails projects, building (Java only of course) and running test suites ran between 5-25% faster.  Deploying Java apps was about 5-10% faster.  Reindexing a whole project in IntelliJ IDEA was about 40% faster.  These are real improvements, but they&#8217;re not the knock-your-socks off speed improvements I thought I might get.</p>
<p>There are some benchmarks that were way-way-way faster.  Running migrations on a database: super fast.  I just don&#8217;t do those things that often.  When you read about SSD performance, you see charts that make them seem 10-20 times faster.  They are in some cases, just not for most of my regular usage patterns. </p>
<p>I learned that the <em>real</em> benefit wasn&#8217;t really speedier builds or faster tests.  An SSD simply makes the machine zippy all the time.  Applications launch as fast as they do once they&#8217;re already cached by the operating system, even when they&#8217;re not.  In fact, the difference between a warm and cold start for all apps is nearly gone.  Spotlight is essentially instantaneous.  Opening new windows, web browsing, pulling up preferences, switching between apps&#8230; it&#8217;s all snappier.  Even when you think it shouldn&#8217;t be &#8212; because the data has to already be in memory &#8212; it feels just a tiny bit faster.</p>
<p>You know that feeling when there are two apps vying for the disk at the same time?  Everything just slllooooowwwws down as the drive hops from one section of the disk to another, multiple times each second as it fetches disparate data.  Yeah, that doesn&#8217;t happen anymore.  Heavy disk IO and multitasking aren&#8217;t a drag.  For example, I don&#8217;t notice when Time Machine is running anymore because it doesn&#8217;t effect my work at all, even when I&#8217;ve got a number of my own disk heavy tasks going.</p>
<p>Sounds awesome, right?  Well, where prices are now you&#8217;re paying about 20 times more per storage unit than normal drives.  That&#8217;s way better than the 50x from 18 months ago, but it&#8217;s still a lot more.</p>
<p>Is it worth it?  Since I could get away with buying an 80G model (~$260), I totally think it&#8217;s worth it.  If I needed a bigger drive than I wouldn&#8217;t have been able to bite the bullet in principle ($500 for a 160G drive is crazy).  Luckily, it will become an easier decision later this year when the 3rd generation drives hit the market.  They&#8217;ll been even faster, offer more capacity, and come with a slightly more reasonable price tag.</p>
<p>If you&#8217;re thinking about it, get educated because there are drives that are good (Intel x25m) and many others that are not.  AnandTech is a great resource for benchmarks and <a href="http://anandtech.com/searchresults.aspx?keyword=ssd&#038;submit=search">all kinds of information</a> related to SSDs.  While most of the major gotchas have been worked out, it&#8217;s a good idea to make sure your hardware, operating system, and future SSD will be friendly.</p>
<p>In the end, I&#8217;m not getting tons more stuff done than before, but it&#8217;s certainly more fun to code when things are always snappy.<br />
Christian</p>
<p>PS: You can check out my limited development-centric benchmarks <a href="https://spreadsheets.google.com/ccc?key=0AlPWHm0Y7-GkdGxoOS15b2JpQ05naENUbjZCWjM1a1E&#038;hl=en">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.carbonfive.com/2010/02/uncategorized/solid-state-disks/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
