<?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>Casper Kuijjer's Homepage &#187; TDD</title>
	<atom:link href="http://www.kuijjer.com/tag/tdd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kuijjer.com</link>
	<description></description>
	<lastBuildDate>Wed, 31 Mar 2010 19:52:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Introducing www.sofinummer.com</title>
		<link>http://www.kuijjer.com/2009/04/introducing-wwwsofinummercom/</link>
		<comments>http://www.kuijjer.com/2009/04/introducing-wwwsofinummercom/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 16:35:38 +0000</pubDate>
		<dc:creator>ckuijjer</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Elfproef]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[QUnit]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://www.kuijjer.com/?p=79</guid>
		<description><![CDATA[In the first days of january Dreamhost ran a promotion where one could get two years of hosting for about 20 dollars on which I acted. As part of this package came a free one year .com registration. I used it to registrer www.sofinummer.com on which I intended to implement a tiny web application that [...]]]></description>
			<content:encoded><![CDATA[<p>In the first days of january <a href="http://www.dreamhost.com">Dreamhost</a> ran a promotion where one could get two years of hosting for about 20 dollars on which I acted. As part of this package came a free one year .com registration. I used it to registrer <a href="http://www.sofinummer.com">www.sofinummer.com</a> on which I intended to implement a tiny web application that can be used to generate and validate <a href="http://nl.wikipedia.org/wiki/Sofinummer">BSN/sofinummers</a></p>

<p>I have tried to keep <a href="http://www.sofinummer.com">the site</a> as simple as possible. It shows an oversized text input field that is used for both validating and generating numbers and a message box that shows if the input field contains a correct sofinummer. After generating a number the contents of the input field are selected for easy copy/pasting.</p>

<p>Initially I wanted to use <a href="http://www.ruby-lang.org/en/">Ruby</a> and learn a little about <a href="http://sinatra.rubyforge.org/">Sinatra</a> and <a href="http://haml.hamptoncatlin.com/">Haml</a>. When I found out that deploying was quite hard I decided to rewrite it in Javascript.</p>

<p>The javascript has been split in two scripts. The first handles the user-interface and uses <a href="http://jquery.com/">jQuery</a> to add some event handlers and to show/hide the message boxes. The second script handles validating and generating numbers. I&#8217;ve implemented generating numbers by simply taking a random number, validating it and retrying if incorrect. In modern browsers Javascript is fast enough to make a few tries before arriving at a correct number and this has the advantage that the code is kept simple and that the numbers aren&#8217;t pulled from a skewed distribution. </p>

<p>I&#8217;ve used <a href="http://en.wikipedia.org/wiki/Test-driven_development" title="Test Driven Development">TDD</a> and <a href="http://docs.jquery.com/QUnit">QUnit</a> when creating the second script, and the test suite has really saved me a lot of times. To test the user-interface I&#8217;m thinking of using <a href="http://seleniumhq.org/">Selenium</a> as I want to get some knowledge of it.</p>

<p>As dutch bankaccount numbers use almost the same check I&#8217;ve also registered <a href="http://www.banknummer.com">www.banknummer.com</a> to check bankaccount numbers that are 9 decimals large. Perhaps one day I&#8217;ll extend this to bankaccount numbers that are 10 decimals large, or to <a href="http://en.wikipedia.org/wiki/Single_Euro_Payments_Area">SEPA</a> <a href="http://www.ibannl.org/iban_check.php">numbers</a></p>
 <img src="http://www.kuijjer.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=79" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.kuijjer.com/2009/04/introducing-wwwsofinummercom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
