<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Alice, Bob, and Mallory: Category Java</title>
    <link>http://www.alicebobandmallory.com/articles/category/java</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>metasyntactics</description>
    <item>
      <title>Inspired by randomness</title>
      <description>&lt;p&gt;Inspired by &lt;a href="http://vanillajava.blogspot.com/2011/10/randomly-no-so-random.html"&gt;Randomly not so random&lt;/a&gt; I decided to play around with the subject.&lt;/p&gt;

&lt;p&gt;Both Java and C# uses a &lt;a href="http://en.wikipedia.org/wiki/Linear_congruential_generator"&gt;linear congruential generator&lt;/a&gt; as their &lt;a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator"&gt;pseudorandom number generators&lt;/a&gt;. I found &lt;a href="http://msdn.microsoft.com/en-us/library/system.random.aspx"&gt;this&lt;/a&gt;
 at MSDN &lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;The current implementation of the Random class is based on a modified version of Donald E. Knuth's subtractive random number generator algorithm."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;but I couldn't find any information on what values Microsoft uses for the &lt;em&gt;m&lt;/em&gt;, &lt;em&gt;a&lt;/em&gt;, and &lt;em&gt;c&lt;/em&gt; parameters in their &lt;a href="http://en.wikipedia.org/wiki/Linear_congruential_generator"&gt;LGC&lt;/a&gt; implementation.&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;The German Federal Office for Information Security (BSI) has established four criteria for quality of deterministic random number generators. They are summarized here:
    K1 — A sequence of random numbers with a low probability of containing identical consecutive elements.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;From the &lt;a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator"&gt;pseudorandom number generator&lt;/a&gt; article on Wikipedia. Let's see what we can do about that.&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;&lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; random = new Random(&lt;span style="color:#00D;font-weight:bold"&gt;116793166&lt;/span&gt;);&lt;tt&gt;
&lt;/tt&gt;&lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; i = &lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;; i &amp;lt; &lt;span style="color:#00D;font-weight:bold"&gt;9&lt;/span&gt;; i++)&lt;tt&gt;
&lt;/tt&gt;{&lt;tt&gt;
&lt;/tt&gt;    Console.Write(random.Next(&lt;span style="color:#00D;font-weight:bold"&gt;10&lt;/span&gt;) + &lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;);&lt;tt&gt;
&lt;/tt&gt;}&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;&lt;br/&gt;&lt;/p&gt;

&lt;p&gt;Outputs:&lt;/p&gt;

&lt;pre&gt;
1 1 1 1 1 1 1 1 1
&lt;/pre&gt;

&lt;p&gt;Did I just break the K1 criteria above? You know I didn't but you might be interested in how I found the seed number. It's easy but also quite computational intensive, that's why I used &lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.parallel.for.aspx"&gt;Parallel.For&lt;/a&gt;.&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;Parallel.For(&lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;, &lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt;.MaxValue, i =&amp;gt;&lt;tt&gt;
&lt;/tt&gt;{&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; rnd = new Random(i);&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;bool&lt;/span&gt; allSame = &lt;span style="color:#038;font-weight:bold"&gt;true&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; j = &lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;; j &amp;lt; &lt;span style="color:#00D;font-weight:bold"&gt;9&lt;/span&gt;; j++)&lt;tt&gt;
&lt;/tt&gt;    {&lt;tt&gt;
&lt;/tt&gt;        allSame = allSame &amp;amp;&amp;amp; rnd.Next(&lt;span style="color:#00D;font-weight:bold"&gt;10&lt;/span&gt;) == &lt;span style="color:#00D;font-weight:bold"&gt;1&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;        &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (!allSame) &lt;span style="color:#080;font-weight:bold"&gt;break&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;    }&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (allSame)&lt;tt&gt;
&lt;/tt&gt;        Console.WriteLine(i); &lt;tt&gt;
&lt;/tt&gt;});&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;&lt;br/&gt;
It took a couple of minutes for the number 116793166 to show up in my console.&lt;/p&gt;

&lt;p&gt;To keep on playing I needed a random string generator. Mine looks like this.&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;private &lt;span style="color:#080;font-weight:bold"&gt;const&lt;/span&gt; string _chars = &lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;span style=""&gt;abcdefghijklmnopqrstuvwxyz&lt;/span&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;private &lt;span style="color:#080;font-weight:bold"&gt;static&lt;/span&gt; string RandomString(&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; size, Random rng)&lt;tt&gt;
&lt;/tt&gt;{&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; buffer = new &lt;span style="color:#339;font-weight:bold"&gt;char&lt;/span&gt;[size];&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; i = &lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;; i &amp;lt; size; i++)&lt;tt&gt;
&lt;/tt&gt;        buffer[i] = _chars[rng.Next(_chars.Length)];&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;return&lt;/span&gt; new string(buffer);&lt;tt&gt;
&lt;/tt&gt;}&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;&lt;br/&gt;
If the random generators were the same it looks like it should give the same result as &lt;a href="http://vanillajava.blogspot.com/2011/10/randomly-no-so-random.html"&gt;the Java one&lt;/a&gt; but &lt;code&gt;RandomString(5, new Random(-229985452))&lt;/code&gt; returns &lt;code&gt;tfsld&lt;/code&gt;. Either my RandomString method works different than the Java one or it's the case that Java and .NET has slightly different settings of their LGCs.&lt;/p&gt;

&lt;p&gt;Mathematically there's an infinite amount of inputs that results in a returned &lt;code&gt;hello&lt;/code&gt;, for instance 1382472294, but here we are limited by the size of our integers.&lt;/p&gt;

&lt;p&gt;I found the seed 1382472294 with the following little method and loop&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;private &lt;span style="color:#080;font-weight:bold"&gt;static&lt;/span&gt; &lt;span style="color:#339;font-weight:bold"&gt;bool&lt;/span&gt; CompareToRandomString(string str, Random rng) &lt;tt&gt;
&lt;/tt&gt;{ &lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;for&lt;/span&gt; (&lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt; i = &lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;; i &amp;lt; str.Length; i++)&lt;tt&gt;
&lt;/tt&gt;    {&lt;tt&gt;
&lt;/tt&gt;        &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (_chars[rng.Next(_chars.Length)] != str[i])&lt;tt&gt;
&lt;/tt&gt;            &lt;span style="color:#080;font-weight:bold"&gt;return&lt;/span&gt; &lt;span style="color:#038;font-weight:bold"&gt;false&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;    }&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;return&lt;/span&gt; &lt;span style="color:#038;font-weight:bold"&gt;true&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;}&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;...&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span style="color:#080;font-weight:bold"&gt;const&lt;/span&gt; string lookingFor = &lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;span style=""&gt;hello&lt;/span&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;Parallel.For(&lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;, &lt;span style="color:#339;font-weight:bold"&gt;int&lt;/span&gt;.MaxValue, i =&amp;gt;&lt;tt&gt;
&lt;/tt&gt;{&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#339;font-weight:bold"&gt;var&lt;/span&gt; rnd = new Random(i);&lt;tt&gt;
&lt;/tt&gt;    &lt;span style="color:#080;font-weight:bold"&gt;if&lt;/span&gt; (CompareToRandomString(lookingFor, rnd))&lt;tt&gt;
&lt;/tt&gt;        Console.WriteLine(i);&lt;tt&gt;
&lt;/tt&gt;});&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;&lt;br/&gt;
I leave it up to you to implement a &lt;a href="http://msdn.microsoft.com/en-us/library/dd460721.aspx"&gt;break&lt;/a&gt; out of that loop.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.ruby-doc.org/core-1.9.2/Random.html"&gt;Ruby&lt;/a&gt; does not use a LGC but a &lt;a href="http://en.wikipedia.org/wiki/Mersenne_twister"&gt;Mersenne twister&lt;/a&gt; instead. It's still only pseudorandom so there's no problem finding patters you like and being able to repeat them.&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;srand(&lt;span style="color:#00D;font-weight:bold"&gt;2570940381&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;&lt;span style="color:#00D;font-weight:bold"&gt;9&lt;/span&gt;.times { print &lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;span style=""&gt;%d &lt;/span&gt;&lt;span style="color:#710"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; % rand(&lt;span style="color:#00D;font-weight:bold"&gt;10&lt;/span&gt;) }&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Outputs:&lt;br/&gt;
&lt;code&gt;1 2 3 4 5 6 7 8 9&lt;/code&gt;&lt;/p&gt;

&lt;table class="CodeRay"&gt;&lt;tr&gt;
  &lt;td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class="code"&gt;&lt;pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"&gt;charset=(&lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;span style=""&gt;a&lt;/span&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;/span&gt;..&lt;span style="background-color:#fff0f0;color:#D20"&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;span style=""&gt;z&lt;/span&gt;&lt;span style="color:#710"&gt;'&lt;/span&gt;&lt;/span&gt;).to_a&lt;tt&gt;
&lt;/tt&gt;srand(&lt;span style="color:#00D;font-weight:bold"&gt;124931&lt;/span&gt;)&lt;tt&gt;
&lt;/tt&gt;puts (&lt;span style="color:#00D;font-weight:bold"&gt;0&lt;/span&gt;...&lt;span style="color:#00D;font-weight:bold"&gt;4&lt;/span&gt;).map{ charset.to_a[rand(charset.size)] }.join&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Outputs:&lt;br/&gt;
&lt;code&gt;ruby&lt;/code&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 27 Oct 2011 23:19:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:f596c241-0004-4935-ba79-64693f890cb2</guid>
      <author>Jonas Elfström</author>
      <link>http://www.alicebobandmallory.com/articles/2011/10/27/inspired-by-randomness</link>
      <category>Ruby</category>
      <category>C#</category>
      <category>Math</category>
      <category>Java</category>
    </item>
    <item>
      <title>Unit testing strains</title>
      <description>&lt;p&gt;I've felt it and I've heard it from colleagues several times. Writing unit tests can be hard work. Especially adding unit test to an existing code base is, at best, cumbersome. Also it's one of those things with delayed gratification. Sometimes it's not even you that will benefit from them being there because the biggest win can be long down the road, when changes to the system has to be made. &lt;/p&gt;

&lt;p&gt;Tests may seem to be isolated and it's even considered a good thing to keep them that way. Even so the tests of your application has a correlation to what the system aims to do on a bigger scale.  This one of the things &lt;a href="http://en.wikipedia.org/wiki/Behavior_driven_development"&gt;BDD&lt;/a&gt;  focuses on. I think that one of the biggest advantages is that you in one process writes a specification and tests that ensures that the spec. is met. Testing becomes a natural part of the development process. This way it clearly shows that BDD and  &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt; are design processes and that it's certainly not all about adding unit tests.&lt;/p&gt;

&lt;p&gt;Find out more about BDD on: &lt;a href="http://behaviour-driven.org"&gt;BehaviourDrivenDevelopment&lt;/a&gt;&lt;br/&gt;
&lt;em&gt;It must be stressed that BDD is a rephrasing of existing good practice, it is not a radically new departure. Its aim is to bring together existing, well-established techniques under a common banner and with a consistent and unambiguous terminology.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For Ruby &lt;a href="http://rspec.info/"&gt;RSpec&lt;/a&gt; has almost become the de facto standard for BDD. The concepts Story, Scenario, and Test feels natural and the syntax is short and easy to read.&lt;/p&gt;

&lt;p&gt;In languages like Java or C# the tests often becomes much more cluttered and some of that clutter is the extra code that comes with static typing. I believe that dynamically typed and overall dynamic languages like Ruby or Python could find a nice little niche here. They could become &lt;a href="http://en.wikipedia.org/wiki/Domain-specific_programming_language"&gt;DSL's&lt;/a&gt; for testing.&lt;/p&gt;

&lt;p&gt;RSpec is on it's way for .NET/C# via &lt;a href="http://en.wikipedia.org/wiki/IronRuby"&gt;IronRuby&lt;/a&gt; and for Java via &lt;a href="http://jruby.codehaus.org/"&gt;JRuby&lt;/a&gt; but don't hold your breath because they are still in alpha and beta.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;.NET / C#&lt;/strong&gt;&lt;br/&gt;
&lt;a href="http://rubydoes.net/2008/02/21/testing-net-with-ironrubys-mini_rspecrb/"&gt;Testing .NET with IronRuby...&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://bgeek.net/2008/02/14/nspecify-rspec-well-closer-anyway/"&gt;NSpecify =&gt; RSpec… well closer anyway&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java&lt;/strong&gt;&lt;br/&gt;
&lt;a href="http://pivots.pivotallabs.com/users/pzabelin/blog/articles/375-functional-tests-for-java-project-rspec-jruby"&gt;Java Functional Testing with JRuby and RSpec&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://jtestr.codehaus.org/"&gt;JtestR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ruby&lt;/strong&gt;&lt;br/&gt;
&lt;a href="http://socialface.com/slapp/"&gt;Slapp&lt;/a&gt; - A simple chat wall Merb tutorial. With nice exampes of using RSpec.&lt;br/&gt;
&lt;a href="http://www.ibm.com/developerworks/web/library/wa-rspec/"&gt;Behavior-driven testing with RSpec&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ASP.NET MVC&lt;/strong&gt;&lt;br/&gt;
&lt;a href="http://blogs.msdn.com/webdevtools/archive/2008/03/06/asp-net-mvc-test-framework-integration-demo.aspx"&gt;ASP.NET MVC Test Framework Integration Walkthrough&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://www.asp.net/learn/3.5-extensions-videos/video-271.aspx"&gt;MVC Preview - Testing&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://www.hanselman.com/blog/ASPNETMVCSessionAtMix08TDDAndMvcMockHelpers.aspx"&gt;ASP.NET MVC Session at Mix08, TDD and MvcMockHelpers&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 05 May 2008 21:17:00 +0200</pubDate>
      <guid isPermaLink="false">urn:uuid:89da439e-a963-4880-9501-16902abf9b31</guid>
      <author>Jonas Elfström</author>
      <link>http://www.alicebobandmallory.com/articles/2008/05/05/unit-testing-strains</link>
      <category>Ruby</category>
      <category>C#</category>
      <category>Java</category>
    </item>
  </channel>
</rss>

