<?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"
	>

<channel>
	<title>Springy Development</title>
	<atom:link href="http://www.springydevelopment.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.springydevelopment.co.uk</link>
	<description></description>
	<pubDate>Sat, 27 Mar 2010 12:31:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Scotish Ruby Conference - Rocket Fuelled Cucumbers</title>
		<link>http://www.springydevelopment.co.uk/2010/03/26/scotish-ruby-conference-rocket-fuelled-cucumbers/</link>
		<comments>http://www.springydevelopment.co.uk/2010/03/26/scotish-ruby-conference-rocket-fuelled-cucumbers/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 21:10:33 +0000</pubDate>
		<dc:creator>Springy</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.springydevelopment.co.uk/?p=38</guid>
		<description><![CDATA[Joseph Wilks did an excellent talk on how to speed up and scale your Cucumber integration tests.
What is Cucumber?
Cucumber is a Behavior Driven Development (http://bit.ly/r7L4) framework for integration tests.
Cucumber uses plain-text descriptions as automated tests. The language used is called Gherkin.
The plain-text descriptions can be written by anyone, but usually they are written by the management team [...]]]></description>
			<content:encoded><![CDATA[<p>Joseph Wilks did an excellent talk on how to speed up and scale your Cucumber integration tests.</p>
<h2>What is Cucumber?</h2>
<p>Cucumber is a Behavior Driven Development (http://bit.ly/r7L4) framework for integration tests.</p>
<p>Cucumber uses plain-text descriptions as automated tests. The language used is called Gherkin.</p>
<p>The plain-text descriptions can be written by anyone, but usually they are written by the management team of the project who will do a role play for each of the users who use the system. The QA team would usually be involved in every step of creating the descriptions.</p>
<h2>The honey moon period</h2>
<p>You have started to write your application, writing a few cucumber descriptions, a little RSpec. You have your tests running with AutoTest and even have a notification from Growl (on a mac) to tell you that your tests have passed, but this can be short lived.</p>
<p>As your application grows, so do the amount of cucumber tests. This means it takes more time for the tests to run, and every time you make a change to your code, autotest will run all of your tests again. This can take a lot of time! Autotest is good, but it is pretty dumb!</p>
<h2>Lazy Loading</h2>
<p>But wait! There is a tool to solve the problem that Autotest has, its called Cucover (http://bit.ly/dg3Je3).</p>
<p>Cucover is a think wrapper for Cucumber, that well makes it lazy. It works by using RCov to detect which parts of the code have changed, Cucover will then only rerun the scenarios that are affected by the code changes.</p>
<p>You can install Cucover by using this command:</p>
<p><code>sudo gem install mattwynne-cucover --source http://gems.github.com</code></p>
<p>Lazy loading can also be used for loading web services, this is so time is not wasted loading up services that a feature does not require.</p>
<h2>Handy Cucumber features</h2>
<p>Another way to speed up your tests during development is to use the handy features built into cucumber.</p>
<p>Tagging: $ cucumber &#8211;tags @media</p>
<p>Tagging is used to run certain scenarios.</p>
<p>Filenames: $ cucumber visitor_*</p>
<p>You can name files with a naming convention and only run those files using a regex.</p>
<p>Subsystems: $ cucumber admin_suite/*</p>
<p>Put each of your different features into folders and get cucumber to run all features in that folder.</p>
<h2>Continuous Integration</h2>
<p>Another way to rocket fuel your cucumbers is to use Continuous Integration. There are many continuous integration systems out there, here are some:</p>
<ul>
<li>Hudson</li>
<li>Team City</li>
<li>Integrity</li>
<li>Bamboo</li>
<li>Run Code Run</li>
<li>CI Joe</li>
<li>CruiseControl.rb</li>
<li>Cerberus</li>
</ul>
<div>The example showed to us was Hudson. Hudson is written in Java, and has plugins to test Ruby code.</div>
<div>Hudson also allows you to use slave agents to scale your tests among multiple servers. This will help you increase the speed of your cucumber tests, and it will also deploy your site for you.</div>
<h2>Spork</h2>
<p>Spork (http://bit.ly/1zUlXg) is Tim Harper’s implementation of test server (similar to the script/spec_server provided by rspec-rails), except rather than using the Rails constant unloading to reload your files, it forks a copy of the server each time you run your tests. The result? Spork runs more solid: it doesn’t get corrupted over time, and it properly handles modules and any voo-doo meta programming you may have put in your app.</p>
<h2>Divide and Conquer</h2>
<p>One way to divide your application is to use Rails Engines. Rails Engines are mini Rails applications that are run from the vendor/plugins directory, you can write separate cucumber tests and run these against your rails engine.</p>
<p>Another way is to use Service Oriented Architecture (http://bit.ly/PTT-SOA) by using this design principle, you can separate your cucumber tests for each service of your application.</p>
<h2>Axing Treetop</h2>
<p>Treetop is the parser that Cucumber uses to read the plain-text descriptions, but it is well&#8230;.a bit slow.</p>
<p>This is where Ragel comes in.</p>
<p>Here are some statistics comparing Regal and Treetop:</p>
<p>To parse 1257 Scenarios when using tags:</p>
<p>Treetop took 60 seconds</p>
<p>Regal took 5 seconds.</p>
<p>Regal is currently being integrated with Cucumber, but you can get it now by running:</p>
<p><code>sudo gem install gherkin</code></p>
<h2>Looking to the Cloud</h2>
<p>Amazon EC2 is a good way to use cloud computing to run your cucumber tests.</p>
<p>To run 1257 steps for a http://www.songkick.com/ on one build server took 4 hours.</p>
<p>On 19 Amazon S3 instances it took 13minutes and 40 seconds.</p>
<p>The key is to have an image created so that you can just startup as many instances as you need, so that they are all setup and ready to receive tests.</p>
<p>To use multiple servers to run your tests you can use a tool called Testjour.</p>
<p>Testjour can distribute your tests over multiple servers or if you like, multiple cores of your build machine.</p>
<p>To run 254 Features, and 1257 steps, took 4 hours on one build server.</p>
<p>When using 3 servers and Testjour, it took 2.</p>
<p>The only problem with Testjour is that its poorly documented, it says it can do things that it can&#8217;t.</p>
<p>It is also very fragile!</p>
<p>This is how Testjour works, it first uploads your code to all of the slave servers.</p>
<p>Next it uploads the tests to a Redis Work Queue, this then sends the tests to which ever slave servers are free to be tested against the application.</p>
<p>Joseph&#8217;s company spends around $80 a day on Amazon EC2 instances, but this saves dividends</p>
<h2>Useful tip</h2>
<p>To see how long your cucumber tests take to run, you can run the following command:<br />
<code>cucumber -format usage features/</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.springydevelopment.co.uk/2010/03/26/scotish-ruby-conference-rocket-fuelled-cucumbers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Mounting Mac OS X harddrives on Linux</title>
		<link>http://www.springydevelopment.co.uk/2009/11/10/mounting-mac-os-x-harddrives-on-linux/</link>
		<comments>http://www.springydevelopment.co.uk/2009/11/10/mounting-mac-os-x-harddrives-on-linux/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 17:44:49 +0000</pubDate>
		<dc:creator>Springy</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.springydevelopment.co.uk/?p=28</guid>
		<description><![CDATA[I had to transfer some of my video files across from my harddrive onto my new HTPC, but XBMC would not mount the harddrive. So I had to mount the drive myself.

Heres how, first I installed the hfsplus via apt:
sudo apt-get install hfsplus hfsprogs hfsutils
This is so Linux can read the filesystem on the harddrive.
Now, to [...]]]></description>
			<content:encoded><![CDATA[<p>I had to transfer some of my video files across from my harddrive onto my new HTPC, but XBMC would not mount the harddrive. So I had to mount the drive myself.<br />
<span id="more-28"></span><br />
Heres how, first I installed the hfsplus via apt:</p>
<p><code>sudo apt-get install hfsplus hfsprogs hfsutils</code></p>
<p>This is so Linux can read the filesystem on the harddrive.</p>
<p>Now, to find out which drive is our harddrive we need to use a utility called parted, this will show us all the drives attached and their partitions. You have to be a superuser to use parted.</p>
<p>Start up parted:</p>
<p><code>sudo parted</code></p>
<p>Now print a list of all the drive:</p>
<p><code>print all</code></p>
<p>Here is the output for the harddrive I wish to mount:</p>
<p><code>Model: WD 10EACS External (scsi)<br />
Disk /dev/sdc: 1000GB<br />
Sector size (logical/physical): 512B/512B<br />
Partition Table: gpt<br />
Number  Start   End     Size    File system  Name                  Flags<br />
 1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot<br />
 2      210MB   1000GB  1000GB  hfsx         Untitled </code></p>
<p>The output tells us where the disk is: /dev/sdc and the number of partitions.</p>
<p>I want to mount the second partition as thats the one with all my data on it, to mount the second partition you add a 2 to the end of /dev/sdc to say you want the second partition:</p>
<p><code>sudo mount -t hfsplus /dev/sdc2 /mnt</code></p>
<p>Now the drive is mounted, all the files on the drive will be available in /mnt.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.springydevelopment.co.uk/2009/11/10/mounting-mac-os-x-harddrives-on-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Minimal install of XBMC on Ubuntu Karmic Koala (9.10)</title>
		<link>http://www.springydevelopment.co.uk/2009/11/08/minimal-install-of-xbmc-on-ubuntu-karmic-koala/</link>
		<comments>http://www.springydevelopment.co.uk/2009/11/08/minimal-install-of-xbmc-on-ubuntu-karmic-koala/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 20:33:07 +0000</pubDate>
		<dc:creator>Springy</dc:creator>
		
		<category><![CDATA[XBMC]]></category>

		<category><![CDATA[XBMC Ubuntu]]></category>

		<guid isPermaLink="false">http://www.springydevelopment.co.uk/?p=7</guid>
		<description><![CDATA[Ok, so I have been building a media centre for about a week now, and I have had a lot of trouble getting it setup and working right, but now XBMC has released version 9.11 alpha 1 version of its popular media centre software which is now compatible with Ubuntu 9.10.

After all the trouble I [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, so I have been building a media centre for about a week now, and I have had a lot of trouble getting it setup and working right, but now XBMC has released version 9.11 alpha 1 version of its popular media centre software which is now compatible with Ubuntu 9.10.<br />
<span id="more-7"></span><br />
After all the trouble I had, I thought I would share with you how I installed it, and got XBMC to boot on load. I am using an <a href="http://www.google.co.uk/products/catalog?hl=en&amp;source=hp&amp;q=asus+ion&amp;um=1&amp;ie=UTF-8&amp;cid=9817285263368611935&amp;ei=th_3StuOCcye4Qa0uNHSAw&amp;sa=X&amp;oi=product_catalog_result&amp;ct=result&amp;resnum=5&amp;ved=0CBoQ8wIwBA#ps-sellers" target="_blank">ASUS AT3N7A-I</a> with a 1.6 dual core atom processor and NVidia ION chipset, 2GB of ram and a 1TB hard drive. So I will only be showing you how to use the NVidia drivers for linux, but to be honest NVidia driver support for linux is better than ATI support.</p>
<p>First, download the minimal install of <a title="Ubuntu Karmic Koala Minimal Install" href="https://help.ubuntu.com/community/Installation/MinimalCD" target="_blank">Ubuntu Karmic Koala</a> (12.1mb x86 12.2mb x64)</p>
<p>Download either the x86 or x64 version dependent on your hardware.</p>
<p>Once the disk image has downloaded either burn it to CD or use <a title="UNetbootin Project Website" href="http://unetbootin.sourceforge.net/" target="_blank">UNetbootin</a> to boot from a USB pen drive.</p>
<p>Reboot the computer you wish to install xbmc on, and boot from the CD or USB pen drive, you may need to change some settings in your bios to boot from CD or USB.</p>
<p>Start the installation, and follow the onscreen instructions to set your language and keyboard layout. Enter a username and password for your main account, for this I entered xbmc.</p>
<p>The installer will ask you what packages to install, scroll down to OpenSSH Server and press SPACE, then press ENTER to continue.</p>
<p>After the installation has completed, your computer will reboot.</p>
<p>When you get to the login screen, login with the username and password you entered.</p>
<p>Once you have logged in we need to add the PPA for XBMC.</p>
<p><code>sudo nano /etc/apt/sources.list</code></p>
<p>And these lines to the end.</p>
<p><code><br />
deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main<br />
deb-src http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu karmic main<br />
deb http://ppa.launchpad.net/team-xbmc/karmic-ppa/ubuntu karmic main<br />
deb-src http://ppa.launchpad.net/team-xbmc/karmic-ppa/ubuntu karmic main<br />
</code></p>
<p>We will need to add the a key to aptitude to stop it complaining.</p>
<p><code>sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 64234534 40618B66 CEC06767 318C7509 91E7EE5E</code></p>
<p>Sometimes the key server will return this error:<br />
<code>gpg: keyserver timed out<br />
gpg: keyserver receive failed: keyserver error</code></p>
<p>A trick I found was to ping the key server address, after it responded try and run the previous command again:</p>
<p><code>ping keyserver.ubuntu.com</code></p>
<p>Now we need to update aptitude.</p>
<p><code>sudo apt-get update<br />
</code></p>
<p>Now we will install the NVidia drivers:</p>
<p><code>sudo apt-get install nvidia-glx-190</code></p>
<p>You will need to enter your password again.</p>
<p>Next, we want sound for our media, so we will install some sound drivers.</p>
<p><code>sudo apt-get install linux-sound-base alsa-base alsa-utils<br />
</code></p>
<p>Your user needs to be added to the sound group.</p>
<p><code>sudo usermod -a -G audio xbmc<br />
</code></p>
<p>Change xbmc to the username that you entered.</p>
<p>The sound level will be set to zero, to change the volumes we need to enter the sound mixer.</p>
<p><code>sudo alsamixer<br />
</code></p>
<p>Use you up and down keys and set the volumes to the maximum they will go. Press the right key until you get to IEC958, EC958 D, EC958 1 and press M on each of them to un-mute them.</p>
<p>Press ESC to quit out of the mixer.</p>
<p>To make alsa save the volumes run.</p>
<p><code>sudo alsactl store 0<br />
</code></p>
<p>Now we can install XBMC.</p>
<p><code>sudo apt-get install xbmc xbmc-skin-* xbmc-eventclients-* xbmc-scripts-*<br />
</code></p>
<p>This will install xbmc, all the skins and eventclients.</p>
<p>Now X will need to know about your monitor, so run:</p>
<p><code>sudo nvidia-xconfig</code></p>
<p>XBMC will need to control power settings of the computer:</p>
<p><code>sudo apt-get install pm-utils policykit<br />
</code></p>
<p>And give your user access to these power features:</p>
<p><code>sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.suspend<br />
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.hibernate<br />
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot<br />
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown<br />
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.reboot-multiple-sessions<br />
sudo polkit-auth --user xbmc --grant org.freedesktop.hal.power-management.shutdown-multiple-sessions<br />
</code></p>
<p>Again you will have have to change &#8211;user xbmc to the username that you entered in the installation.</p>
<p>Now the last thing to do is make XBMC launch at startup.</p>
<p><code>sudo nano /etc/init/tty1.conf<br />
</code></p>
<p>Change the line</p>
<p><code>exec /sbin/getty 38400 tty1<br />
</code></p>
<p>To</p>
<p>exec /bin/login -f xbmc &lt; /dev/tty1 &gt; /dev/tty1 2&gt;&amp;1</p>
<p>Next we need to get Ubuntu to clear the screen and start X:</p>
<p><code>nano ~/.bash_profile<br />
</code></p>
<p>And add these lines to the file:</p>
<p><code>case "`tty`" in<br />
/dev/tty1) clear &amp;&amp; startx &amp;&gt;/dev/null;;<br />
esac<br />
</code></p>
<p>Now we need to tell X to start XBMC:</p>
<p><code>nano ~/.xsessionrc<br />
</code></p>
<p>Add the lines:</p>
<p><code>exec xbmc --standalone</code></p>
<p>This next step is <strong>OPTIONAL</strong>, to hide all the information about what is being loaded, we shall install a usplash boot screen.</p>
<p><code>sudo apt-get install usplash libusplash-dev usplash-theme-xbmc-*<br />
</code></p>
<p>Once the splash screen installation has completed we need to select a splash screen:</p>
<p><code>sudo update-alternatives --config usplash-artwork.so<br />
</code></p>
<p>Enter the number of the splash screen you wish to use, find examples below:</p>
<p><a href="http://www.youtube.com/watch?v=9MGUdyrG2dc" target="_blank">Pulsating Logo</a><br />
<a href="http://www.youtube.com/watch?v=gsG0Fu5QiAs" target="_blank">Spinner Black</a><br />
<a href="http://www.youtube.com/watch?v=_SE6tnFOy0k" target="_blank">Spinner Blue</a><br />
<a href="http://www.youtube.com/watch?v=d-HKSHnIaAQ" target="_blank">XBMC Logo</a></p>
<p>All the previews where created by <a href="http://du-duke.blogspot.com/" target="_blank">DU-Duke</a></p>
<p>Next set the screen resolution of your tv in the usplash settings:</p>
<p><code>sudo nano /etc/usplash.conf<br />
</code></p>
<p>And add these lines:</p>
<p><code>resx=1920<br />
resy=1080<br />
</code></p>
<p>My TV is 1080p, so the settings above will suite yours if it is full HD, for 720p enter:</p>
<p><code>resx=1280<br />
resy=720<br />
</code></p>
<p>To make the new splash screen active run:</p>
<p><code>sudo update-initramfs -u</code></p>
<p>Now reboot your computer:</p>
<p><code>sudo reboot<br />
</code></p>
<p>When the computer restarts, you should see the splash screen you selected, and XBMC should boot up.</p>
<p>Now, go into XBMC&#8217;s Videos settings and select VDPAU for the render mode (if your graphics card supports it) and edit the Sound settings:</p>
<p><code>Audio Output: Digital<br />
AC3: Off<br />
DTS: Off<br />
Audio Capable Device: plughw:hdmi<br />
Passthrough Output Device: hdmi<br />
Downmix: On<br />
</code></p>
<p>And that&#8217;s it, you should have a fully functional media centre running the latest version of Ubuntu and XBMC.</p>
<p>As this is an alpha version, you will need to perform some updates now and again until the final release is out.</p>
<p>To so this, ssh into your computer and update it:</p>
<p><code>ssh xbmc@your media centre IP<br />
sudo apt-get upgrade<br />
</code></p>
<p>Now I can&#8217;t take all the credit for this, I have collected some information from other sources and put them together from here:</p>
<p><code><a href="http://xbmc.org/forum/showthread.php?t=53812" target="_blank">http://xbmc.org/forum/showthread.php?t=53812</a><br />
<a href="http://xbmc.org/forum/showthread.php?t=38804" target="_blank">http://xbmc.org/forum/showthread.php?t=38804</a></code></p>
<p>Thanks to jonassw from XBMC forums, who suggested using the latest version of the NVidia drivers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.springydevelopment.co.uk/2009/11/08/minimal-install-of-xbmc-on-ubuntu-karmic-koala/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Welcome Back</title>
		<link>http://www.springydevelopment.co.uk/2009/09/23/welcome-back/</link>
		<comments>http://www.springydevelopment.co.uk/2009/09/23/welcome-back/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 10:46:48 +0000</pubDate>
		<dc:creator>Springy</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.springydevelopment.co.uk/?p=3</guid>
		<description><![CDATA[Hey guys,
I know the blog has been down for a long time, only displaying the nice words of the default Apache page, but rest assured I am back! But this time im going to be using this blog for iPhone development instead of Rails.
I have been writing some iPhone applications recently and have discovered some [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys,</p>
<p>I know the blog has been down for a long time, only displaying the nice words of the default Apache page, but rest assured I am back! But this time im going to be using this blog for iPhone development instead of Rails.</p>
<p>I have been writing some iPhone applications recently and have discovered some good tips that I want to share.</p>
<p>With the things I wanted to do there were not very many resources out there to help me, but I figured them out and I am going to share the wealth!</p>
<p>Im working on a new design for the blog, so watch this space!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.springydevelopment.co.uk/2009/09/23/welcome-back/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
