<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>tdd &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/tdd/</link>
	<description>Feed of posts on WordPress.com tagged "tdd"</description>
	<pubDate>Sat, 28 Nov 2009 14:28:39 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[TDD unlimited]]></title>
<link>http://monkeyisland.pl/2009/11/26/tdd-unlimited/</link>
<pubDate>Thu, 26 Nov 2009 22:39:59 +0000</pubDate>
<dc:creator>szczepiq</dc:creator>
<guid>http://monkeyisland.pl/2009/11/26/tdd-unlimited/</guid>
<description><![CDATA[So read a short rant that questions TDD (or unit testing &#8211; it&#8217;s hard to figure). Here]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>So read a <a href="http://binstock.blogspot.com/2009/11/limitations-of-tdd.html">short rant</a> that questions TDD (or unit testing &#8211; it&#8217;s hard to figure). Here&#8217;s my message:</p>
<p><strong>If you want to learn</strong> your trade don&#8217;t get too excited about gurus that outsmarted the Universe and found cracks in TDD. There are way more IT celebrities that successfully practice TDD. They blog about, they teach and you know what? Their code kicks ass big time. So&#8230; Write loads of tests, try TDD, taste BDD. Learn it yourself and at some point you won&#8217;t be needing blogs to decide what side to take (Alliance or the Horde? =).</p>
<p><strong>Now, if you already know</strong> your trade please try to influence others to write more tests and learn TDD. How much inspirational is <a href="http://geekswithblogs.net/leesblog/archive/2008/04/04/test-driven-development-sucks.aspx">this</a> or <a href="http://misko.hevery.com/2009/11/17/how-to-get-started-with-tdd/">that</a>! Anyway, it&#8217;s just my humble request to the world. Of course, you can write whatever you want, dear influential blogger!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Kata == Practice (to me at least)]]></title>
<link>http://castever.wordpress.com/2009/11/26/code-kata-practice-to-me-at-least/</link>
<pubDate>Thu, 26 Nov 2009 11:31:59 +0000</pubDate>
<dc:creator>castever</dc:creator>
<guid>http://castever.wordpress.com/2009/11/26/code-kata-practice-to-me-at-least/</guid>
<description><![CDATA[I have been reading some about Code Katas and what I take from it is that to be a professional and g]]></description>
<content:encoded><![CDATA[I have been reading some about Code Katas and what I take from it is that to be a professional and g]]></content:encoded>
</item>
<item>
<title><![CDATA[TDD - Test Driven Development/Design]]></title>
<link>http://enerbilitytesting.wordpress.com/2009/11/26/tdd-test-driven-developmentdesign/</link>
<pubDate>Thu, 26 Nov 2009 11:06:53 +0000</pubDate>
<dc:creator>enerbilitytesting</dc:creator>
<guid>http://enerbilitytesting.wordpress.com/2009/11/26/tdd-test-driven-developmentdesign/</guid>
<description><![CDATA[A relatively new concept of coding is becoming more mainstream; what do you think of writing test co]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A relatively new concept of coding is becoming more mainstream; what do you think of writing test code prior to actually writing the code itself.  Sounds a little strange and against the thought of the mainstream coding paradigm where the test itself is done after the code has been written prior to implementation. </p>
<p>However, through TDD coding can actually be done quicker, meeting user requirements, and requiring less timely maintenance than in coding the old fashioned way.</p>
<p>As a coder would you rather spend more time debugging, refactoring, or being able to develop new code to meet yet another never-ending user requirement.  TDD enables the coder to spend less time babysitting the code because the tests are in place to provide a first line of security.</p>
<p>An excerpt from Wikipedia</p>
<p>Test-driven development (TDD) is a software development technique that relies on the repetition of a very short development cycle: First the developer writes a failing automated test case that defines a desired improvement or new function, then produces code to pass that test and finally refactors the new code to acceptable standards. Kent Beck, who is credited with having developed or &#8216;rediscovered&#8217; the technique, stated in 2003 that TDD encourages simple designs and inspires confidence.</p>
<p>Test-driven development is related to the test-first programming concepts of extreme programming, begun in 1999, but more recently has created more general interest in its own right.</p>
<p>Programmers also apply the concept to improving and debugging legacy code developed with older techniques.  Test-driven development requires developers to create automated unit tests that define code requirements before writing the code itself. The tests contain assertions that are either true or false. Passing the tests confirms correct behavior as developers evolve and refactor the code. Developers often use testing frameworks, such as xUnit, to create and automatically run sets of test cases.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Challenging assumptions]]></title>
<link>http://alife2love.com/2009/11/26/challenging-assumptions/</link>
<pubDate>Thu, 26 Nov 2009 10:51:25 +0000</pubDate>
<dc:creator>iamhide</dc:creator>
<guid>http://alife2love.com/2009/11/26/challenging-assumptions/</guid>
<description><![CDATA[Hey Guys, This will be the last update on my end for a while as I fulfill the final commitments of m]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hey Guys,</p>
<p>This will be the last update on my end for a while as I fulfill the final commitments of my travel schedule and take the necessary steps to make this the most amazing December of my life. As I prepare for another <a href="http://alife2love.com/tdd-programs/"><strong>Masterclass</strong></a> weekend tomorrow, I thought I&#8217;d write a post for everyone out there.</p>
<p><strong><span style="text-decoration:underline;">Challenging Assumptions</span></strong></p>
<p style="text-align:center;"><strong><span style="text-decoration:underline;"><img class="aligncenter" src="http://static.flickr.com/171/405446647_31e97690ae.jpg" alt="" width="350" height="233" /><!--more--><br />
</span></strong></p>
<p>&#8220;Maybe she&#8217;s with her boyfriend.&#8221;</p>
<p>&#8220;Maybe she has better things to do.&#8221;</p>
<p>&#8220;Maybe she&#8217;s busy.&#8221;</p>
<p>&#8220;Maybe she doesn&#8217;t want to talk.&#8221;</p>
<p>Sound familiar? It most certainly does to me. These were the excuses that I gave myself again and again when I hesitated upon making an approach. I am not going to lie : there is no denying that the Asian culture here is not as used to dealing with interactions from complete strangers and as a young man living within the Singaporean society, all the more these excuses actually <span style="text-decoration:underline;">seem</span> like valid reasons for me to not approach a woman.</p>
<p>Back when I was still starting to make sense of the dynamics between men and women, I found myself giving lots of excuses. Like one of my early mentors, Val, would tell you, I would go out for 4-5 hours on some days and not do a single approach. <strong>I was always waiting for the right moment</strong>.  My inexperience was what caused my mind to wander and make me nervous. The truth is, in those seemingly &#8220;perfect&#8221; moments, there was a very real chance that things were not as perfect as I thought they were. It was very possible that a girl who was alone and bored (2 positive requisites for a successful interaction) was actually having some alone time and does not want to be disturbed.</p>
<p>In my experience thus far, I&#8217;ll strongly believe : <strong>There is no perfect moment.</strong></p>
<p><span style="text-decoration:underline;">So what should I do?</span></p>
<p>There are many ways in which a person can solve this problem (drink alcohol, getting someone to push them, drug abuse etc.). But I want to share with you my personal and most favorite solution.</p>
<p><strong>Challenge your assumptions.</strong> Developing a good understanding of the dynamics between men and women (<em>which is what TDD specializes in</em>) will help immensely. The more knowledge I had, the clearer things became and the more confident I was. With this new found knowledge and confidence, it was a lot easier to approach a woman despite these assumptions I had in my head.</p>
<p><strong>Be comfortable with success and failure.</strong> There is no such thing as PERFECTION. If you have been thinking that there will be a magic pill out there that will bring you instant success with women, let me smash that belief for you right now : There isn&#8217;t. As rare as they are, I am not ashamed to admit it : there are times where I did not have a successful interaction. These times are usually due to logistics and matters I can not control. What I do is this : Celebrate from the successes, learn the lessons from the failures and move on.</p>
<p>And here&#8217;s where it gets better&#8230;</p>
<p>The more I actually approached women successfully, the more it cemented the lesson in my head that <strong>all these assumptions were just my mind&#8217;s way of protecting my ego</strong>. I realised that most of the time, all these assumptions turn out to be false. In fact, as I practiced further, I realised that even if my assumptions proved to be right, by the law of <strong>X=X</strong>, it turned out that my undeniable good-vibe made the woman commit to an interaction with me. With the addition of my <strong>high-level awareness</strong>, I was more than capable of continuing the interaction very smoothly because I knew the dynamics of a good <strong>Macro Plan</strong> thus enabling me to make spontaneous decisions and enable me to give the women what they wanted : <strong>DIRECTION</strong>.</p>
<p style="text-align:center;"><img class="aligncenter" src="http://image.yesstyle.com/assets/19/191/l_p1005119119.jpg" alt="" width="195" height="195" /></p>
<p>I adopt this same belief to all aspects of my life. Challenging assumptions also helps your life become less complicated. Most of the time, we already know whether or not we want to escalate things with women or with a task at hand. It is all these assumptions that cause unnecessary worry and hold us back. Knowing that there is not perfect moment and that failure and success are all very realistic possibilities no matter what, I choose to act. It is better to take a chance and gain a learning lesson from it than to not take one at all and regret.</p>
<p>You know what you want. Now push aside all these assumptions and just take action to make it yours!</p>
<p><strong>Live and Love,</strong></p>
<p><strong>Xavier</strong></p>
<p>xav@troydizondating.com</p>
<p>http://alife2love.com</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Rhino Mocks: Anonymous method for Do Handler]]></title>
<link>http://hendrikswan.wordpress.com/2009/11/26/rhino-mocks-anonymous-method-for-do-handler/</link>
<pubDate>Thu, 26 Nov 2009 08:08:02 +0000</pubDate>
<dc:creator>hendrikswan</dc:creator>
<guid>http://hendrikswan.wordpress.com/2009/11/26/rhino-mocks-anonymous-method-for-do-handler/</guid>
<description><![CDATA[I haven&#8217;t been doing a lot of unit tests lately &#8211; gasp! I&#8217;ve been doing a LOT of J]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I haven&#8217;t been doing a lot of unit tests lately &#8211; gasp! I&#8217;ve been doing a LOT of Javascript sorta stuff in the last year, which has been interesting for a change, but I&#8217;m really happy it&#8217;s over now.</p>
<p>I&#8217;m back to doing proper development, and I forgot how to use an anonymous method for a Do() handler!</p>
<p>Luckily I quickly stumbled on to this post by Igor Brejc: <a href="http://igorbrejc.net/development/c/rhinomocks-do-handler-using-anonymous-delegates" target="_blank">http://igorbrejc.net/development/c/rhinomocks-do-handler-using-anonymous-delegates.</a></p>
<p>I wanted to do something when a wrapper I developed for the <a href="http://msdn.microsoft.com/en-us/library/system.workflow.runtime.workflowruntime.aspx" target="_blank">WorkflowRuntime</a> class adds the <a href="http://msdn.microsoft.com/en-us/library/ms735872.aspx" target="_blank">ExternalDataExchange</a> service to the runtime, so I ended up with something like this in my test:</p>
<pre class="brush: csharp;">                Expect.Call(() =&#62; mockWorkflowRuntime.AddService(null))
                    .IgnoreArguments()
                    .Constraints(Is.TypeOf(typeof (ExternalDataExchangeService)))
                    .Do((Action&#60;ExternalDataExchangeService&#62;)delegate(ExternalDataExchangeService service)
                                     {
                                         //do my stuff here
                                     });</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[VS Test Method Snippet]]></title>
<link>http://coderhapsody.wordpress.com/2009/11/25/vs-test-method-snippet/</link>
<pubDate>Wed, 25 Nov 2009 19:50:23 +0000</pubDate>
<dc:creator>syoguran</dc:creator>
<guid>http://coderhapsody.wordpress.com/2009/11/25/vs-test-method-snippet/</guid>
<description><![CDATA[Test driven geliştirme yapmak, eğlenceli olduğu kadar uzun süren bi işlemdir malumunuz. Bu konu ile ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://serkanyoguran.wordpress.com/files/2009/11/snippet.gif"><img class="alignleft size-full wp-image-64" title="snippet.gif" alt="" src="http://serkanyoguran.wordpress.com/files/2009/11/snippet.gif" width="123" height="123" /></a>Test driven geliştirme yapmak, eğlenceli olduğu kadar uzun süren bi işlemdir malumunuz. Bu konu ile ilgili bir <a href="http://serkanyoguran.wordpress.com/2009/10/29/basit-tasarim/" target="_blank">yazım</a> olacaktı.</p>
<p>Önce test yazacaksınız, sonra testi geçirecek kodu yazacaksınız. Başka bir test yazıp asıl işi yapacak kodu yazmaya zorlarsınız kedinizi. Sonra duplicationları gidermek için <a href="http://en.wikipedia.org/wiki/Code_refactoring" target="_blank">refactor</a> edersiniz. Bunları yaparken <a href="http://en.wikipedia.org/wiki/Naming_conventions_(programming)" target="_blank">naming convention</a> a dikkat edersiniz.</p>
<p>Derken ne oldu? Hepi topu 3 ile 5 i toplayıp 8 döndüren bir method yazdınız daha. Bu methodu yazabilmek için en az 4 test yazmış olmamız lazım. Yani sadece basit bir method için 4 test yazıyoruz ki, büyükçe bir projede bu sayı nerelere çıkar varın siz düşünün.</p>
<p>TDD yazıyorsak en çok yazılan şey doğal olarak testtir. Farkettim ki bizim Visual Studio içinde bu durumla ilgili bir snippet yok. Ben her test için şunu kendim yazmak zorundayım:</p>
<pre class="code">[<span style="color:#2b91af;">Test</span>]
<span style="color:blue;">public void </span>TestMethodTest()
{
    <span style="color:#2b91af;">Assert</span>.Fail(<span style="color:#a31515;">&#34;Not implemented yet!&#34;</span>);
}</pre>
<p>Halbuki bir code snippet olsa ve biz 1-2 tuş ile bunu şak diye yazmış sayılsak diye düşünerek bir snippet yazdım. İtiraf etmeliyim ki “prop” snippettını referans alarak yazdım.</p>
<p>İndirmek isterseniz <a href="http://rapidshare.com/files/312152937/td.snippet.html" target="_blank">buyrun</a>.</p>
<p>Bu dosyayı <em>“My Documents\Visual Studio 2008\Code Snippets\Visual C#\[İstediğiniz bir folder]\”</em> altına atabilirisiz.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[VS Test Method Snippet]]></title>
<link>http://serkanyoguran.com/2009/11/25/vs-test-method-snippet/</link>
<pubDate>Wed, 25 Nov 2009 19:42:02 +0000</pubDate>
<dc:creator>syoguran</dc:creator>
<guid>http://serkanyoguran.com/2009/11/25/vs-test-method-snippet/</guid>
<description><![CDATA[Test driven geliştirme yapmak, eğlenceli olduğu kadar uzun süren bi işlemdir malumunuz. Bu konu ile ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img style="margin:0 10px 5px 0;" class="alignleft size-full wp-image-64" title="snippet.gif" alt="" src="http://serkanyoguran.wordpress.com/files/2009/11/snippet.gif" width="123" height="123" />Test driven geliştirme yapmak, eğlenceli olduğu kadar uzun süren bi işlemdir malumunuz. Bu konu ile ilgili bir <a href="http://serkanyoguran.wordpress.com/2009/10/29/basit-tasarim/" target="_blank">yazım</a> olacaktı.</p>
<p>Önce test yazacaksınız, sonra testi geçirecek kodu yazacaksınız. Başka bir test yazıp asıl işi yapacak kodu yazmaya zorlarsınız kedinizi. Sonra duplicationları gidermek için <a href="http://en.wikipedia.org/wiki/Code_refactoring" target="_blank">refactor</a> edersiniz. Bunları yaparken <a href="http://en.wikipedia.org/wiki/Naming_conventions_(programming)" target="_blank">naming convention</a> a dikkat edersiniz.</p>
<p>Derken ne oldu? Hepi topu 3 ile 5 i toplayıp 8 döndüren bir method yazdınız daha. Bu methodu yazabilmek için en az 4 test yazmış olmamız lazım. Yani sadece basit bir method için 4 test yazıyoruz ki, büyükçe bir projede bu sayı nerelere çıkar varın siz düşünün.</p>
<p>TDD yazıyorsak en çok yazılan şey doğal olarak testtir. Farkettim ki bizim Visual Studio içinde bu durumla ilgili bir snippet yok. Ben her test için şunu kendim yazmak zorundayım:</p>
<pre class="code">[<span style="color:#2b91af;">Test</span>]
<span style="color:blue;">public void </span>TestMethodTest()
{
    <span style="color:#2b91af;">Assert</span>.Fail(<span style="color:#a31515;">&#34;Not implemented yet!&#34;</span>);
}</pre>
<p>Halbuki bir code snippet olsa ve biz 1-2 tuş ile bunu şak diye yazmış sayılsak diye düşünerek bir snippet yazdım. İtiraf etmeliyim ki “prop” snippettını referans alarak yazdım.</p>
<p>İndirmek isterseniz <a href="http://rapidshare.com/files/312152937/td.snippet.html" target="_blank">buyrun</a>.</p>
<p>Bu dosyayı <em>“My Documents\Visual Studio 2008\Code Snippets\Visual C#\[İstediğiniz bir folder]\”</em> altına atabilirisiz.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Visual Assert Beta 3 released]]></title>
<link>http://jpassing.wordpress.com/2009/11/24/visual-assert-beta-3-released/</link>
<pubDate>Tue, 24 Nov 2009 17:05:27 +0000</pubDate>
<dc:creator>jpassing</dc:creator>
<guid>http://jpassing.wordpress.com/2009/11/24/visual-assert-beta-3-released/</guid>
<description><![CDATA[A third beta release of Visual Assert is now available for download on www.visualassert.com. Visual ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>A third beta release of <a href='http://www.visualassert.com/'>Visual Assert</a> is now <a href='http://www.visualassert.com/unit-testing-framework/download.html'>available for download on www.visualassert.com</a>.</p>
<p>Visual Assert, in case you have not tried it yet, is an Add-In for Visual Studio that adds unit testing capabilities to the Visual C++ IDE: Based on the <a href='http://www.cfix-testing.org/'>cfix unit testing framework</a>, Visual Assert allows unit tests to be written, run, and debugged from within the IDE. Pretty much like Junit/Eclipse, TestDriven.Net or MSTest, but for real, native code &#8212; code written in C or C++.</p>
<h3>Bugs, bugs, bugs, bugs</h3>
<p>Alas, there were still a few of them in the previous two beta releases. Luckily though, almost all I received from users or found by internal testing were relatively minor in nature. Still, I want Visual Assert to be as high quality as possible and decided to add this third beta release into the schedule and take the time to focus on &#8212; you guessed it &#8212; bugfixing, bugfixing, bugfixing, and bugfixing.</p>
<p>Speaking of bug reports, I have to thank all users of Visual Assert and cfix who reported bugs, suggested new features or provided general feedback. Your input has been, and still is highly appreciated. Although I had to postpone any feature suggestions to a later release, I tried hard to resolve all bugs and have them fixed in this new release.</p>
<h3>Download, Try it, Share Your Opinion</h3>
<p>Of course, using the new Beta version is free. So whether you have already used the previous beta or not, whether you are a unit testing newbie or write unit tests on a daily basis, be sure to give the new version a try. And of course, do not forget to let me know about your feedback, suggestions, found bugs, etc.!</p>
<div style='padding-left:50px;padding-bottom:20px;'>
<p><a href='http://www.visualassert.com/download/VisualAssert_1.0.2.3612.msi'><br />
<b>Download Visual Assert Beta 3</b><br />
Version 1.0.2.3612<br />
</a>
</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Testen von Exceptions mit JMockit]]></title>
<link>http://graberj.wordpress.com/2009/11/23/testen-von-exceptions-mit-jmockit/</link>
<pubDate>Mon, 23 Nov 2009 19:00:43 +0000</pubDate>
<dc:creator>Johnny Graber</dc:creator>
<guid>http://graberj.wordpress.com/2009/11/23/testen-von-exceptions-mit-jmockit/</guid>
<description><![CDATA[Für einen Unit-Test benötigt man meistens nur gewisse Teile eines &#8220;fremden&#8221; Objekts. Oft]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Für einen Unit-Test benötigt man meistens nur gewisse Teile eines &#8220;fremden&#8221; Objekts. Oft genügt einem eine fixe Anzahl definierter Rückgabewerte. Statt das man nun das &#8220;fremde&#8221; Objekt erzeugt und die Werte aus einer Datenbank holt, setzt man eine Testattrappe ein. Diese Attrappe liefert einem die definierten Rückgabewerte oder Exceptions, ohne dabei wirklich mit der Datenbank, dem Dateisystem oder dem Netzwerk zu sprechen. So eine Attrappe kann ein <a href="http://de.wikipedia.org/wiki/Mock-Objekt">Mock</a> oder <a href="http://de.wikipedia.org/wiki/Stub_%28Programmierung%29">Stub</a> sein.</p>
<p><a href="https://jmockit.dev.java.net/">JMockit</a> ist ein Framework für Java, das einem bei der Erstellung von Mocks und Stubs hilft. Für Java gibt es zahlreiche solcher <a href="http://www.sizovpoint.com/2009/03/java-mock-frameworks-comparison.html">Frameworks</a>. JMockit hat aber einige besondere Fähigkeiten, was das Testen deutlich erleichtern kann.</p>
<p>Für <a href="http://bit.ly/1ADdxP">AtaraxiS</a> war ich in den letzten Tagen am erweitern der Unit-Tests. Die Testabdeckung war noch nicht überall so gut, wie ich diese haben will. Es fehlten vor allem noch die zahlreichen Catch-Blocke für die Exceptions. <br />
(Wieso überhaupt Exceptions testen? AtaraxiS will die Verschlüsselung abstrahieren und reduziert die dabei möglichen Exceptions auf eine handlichere Anzahl. Diese Tests dienen der Kontrolle, ob auch nach dem anstehenden Umbau noch alles wie gewohnt läuft.)</p>
<pre class="brush: java;">
	public ACDecryptInputStream (File inFile, SecretKey aesKey) throws IOException
	{
		try
		{
			// Parse the Header of the File
			AtaraxisHeaderParser ahParser = new AtaraxisHeaderParser(inFile);

			// When it contains a Header, then prepare all for CBC-Mode
			IvParameterSpec ivSpec = new IvParameterSpec(ahParser.getIV());

			fis = new FileInputStream(inFile);
			fis.skip(ahParser.bytesToSkip());

			cipher = Cipher.getInstance(&#34;AES/CBC/PKCS7Padding&#34;, &#34;BC&#34;);
			cipher.init(Cipher.DECRYPT_MODE, aesKey, ivSpec);

			// Create the CipherInputStream
			decryptedInputStream = new CipherInputStream(fis, cipher);
		}
		catch (NoSuchAlgorithmException e)
		{
			LOGGER.error(&#34;NoSuchAlgorithmException&#34;, e);
			throw new IOException(&#34;NoSuchAlgorithmException&#34;);
		}
		.....
	}
</pre>
<p>Um dies zu testen, müsste die Klasse Cipher bei getInstance() eine NoSuchAlgorithmException werfen. Dies könnte ich durch eine Abstraktionsschicht zwischen unserem Code und dem von <a href="http://bouncycastle.org/">BouncyCastle</a> machen. Das bedingt aber eine Änderung am Code. Hier wäre das zwar möglich, doch geht das nicht immer. </p>
<p>JMockit hat dafür eine passende Methode. Mittels Mockit.redefineMethods() kann eine Methode umgeleitet werden. Das angegebene Ziel kann genau das machen, was man von ihm erwartet. Um die Exception zu werfen, dient dieser Aufruf:</p>
<pre class="brush: java;">
	@Test(expected=IOException.class)
	public void ACDecryptInputStream_NoSuchAlgorithmException() throws Exception
	{
		Mockit.redefineMethods(javax.crypto.Cipher.class, new Object() {
			@SuppressWarnings(&#34;unused&#34;)
			public final Cipher getInstance(String transformation,
                    Provider provider)
             throws NoSuchAlgorithmException,
                    NoSuchPaddingException
			{
				throw new NoSuchAlgorithmException();
			}
		});

		ACDecryptInputStream acI = new ACDecryptInputStream(testFile, key);
		fail(&#34;IOException missing for &#34; + acI);
	}
</pre>
<p>Dies ist nur eine der unzähligen Möglichkeiten, die JMockit bietet. Nach dem gleichen Prinzip kann man beliebige Rückgabewerte zurückliefern. Wer mehr dazu wissen will, findet auf der Projektseite von JMockit eine sehr detaillierte <a href="https://jmockit.dev.java.net/tutorial.html">Anleitung</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Agile revelations part 2]]></title>
<link>http://implementingagile.wordpress.com/2009/11/21/agile-revelations-part-2/</link>
<pubDate>Sat, 21 Nov 2009 23:04:52 +0000</pubDate>
<dc:creator>Paul Harrington</dc:creator>
<guid>http://implementingagile.wordpress.com/2009/11/21/agile-revelations-part-2/</guid>
<description><![CDATA[My last Agile Revelations post was an unexpected foray into the reasons behind why I love Agile so m]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>My last <a href="http://implementingagile.wordpress.com/2009/09/11/agile-revelations/">Agile Revelations</a> post was an unexpected foray into the reasons behind why I love Agile so much. Written on a Friday night, a bit bored, it started me thinking about my career in software development and how I got to this point in my life.</p>
<p>So if you weren&#8217;t put off by my previous post and are still interested in what motivates people like me to pursue this most rewarding of methodologies then read on&#8230;&#8230;..</p>
<p>So where was I? Oh yes, I was still in my first development job and I&#8217;d just finished reading <a href="http://www.amazon.co.uk/Extreme-Programming-Explained-Embrace-Change/dp/0321278658">Extreme Programming: embrace change</a> by Kent Beck &#8211; the book which single-handedly inspired me to take on Agile. I&#8217;d been in that role for about a year by the time I finished the book and at around the same time I completed my full MCSD in my spare time. And it was lucky because within a month my company had no more C# work for me (they&#8217;d decided to re-write in java) so I took a junior C# developer role with a new company.</p>
<p>The development work there was challenging for a relatively in-experienced developer so I found it hard work implementing real WinForms and ASP.Net Web applications into production, but the hardest thing about it was that between projects there was a lot of &#8220;sitting around time&#8221; where we would be waiting for work (read spec documents as it was a classic waterfall environment!). This was so immensely painful as I hate being bored, having to pester people to give me work to do so in the end I used this time to improve my development skills and learn more about Agile.</p>
<p>The funny thing is that nowadays “being Agile” is such a buzz word and everybody and his dog is claiming that their company is doing it. But at the time it still felt very new (well I guess it was in the UK) and it wasn’t enough to just read buzz word books about XP &#8211; I wanted to learn the coding principles behind Agile and understand what made these programmers (apparently) so talented.</p>
<p>So I spent loads of time reading blogs, researching who was saying the most about Agile and XP and (to name but a few) I came up with some very well known writers on these subjects: <a href="http://www.martinfowler.com/bliki/">Martin Fowler</a>, <a href="http://www.threeriversinstitute.org/blog/?p=29">Kent Beck</a> and my own personal God <a href="//codebetter.com/blogs/jeremy.miller/">Jeremy Miller</a>.</p>
<p>I quickly realised that an Agile methodogy is useless if you don&#8217;t know how to write quality code so I started buying books which concentrated on improving development skills and writing clean code, here are just a few I started out with:</p>
<p><a href="http://www.amazon.co.uk/Refactoring-Improving-Design-Existing-Technology/dp/0201485672">Refactoring</a> by Martin Fowler<br />
<a href="http://www.amazon.co.uk/Test-Driven-Development-Addison-Wesley-Signature/dp/0321146530">Test Driven Development</a> by Kent Beck<br />
<a href="http://www.amazon.co.uk/Enterprise-Application-Architecture-Addison-Wesley-signature/dp/0321127420">POEAA</a> by Martin Fowler<br />
<a href="http://www.amazon.co.uk/Head-First-Design-Patterns-Freeman/dp/0596007124">Head first Design Patterns</a> by the Freemans<br />
<a href="http://www.amazon.co.uk/Applying-Domain-Driven-Design-Patterns-Using/dp/0321268202">Applying DDD</a> by Jimmy Nilsson</p>
<p>And that was how I spent my 2nd year in software development. It was an interesting time and for anyone just starting out I would definitely recommend these writers (and obviously a whole load more now &#8211; you&#8217;ll have to wait for part 3 for those!). The only caveat I would say is that these guys are so good that I did sometimes feel out of my depth, thinking I would never be able to write code as well as them (which is probably still true but I do at least now try!). I think this was probably a very natural reaction but to counter it I would recommend that rather than just reading about the concepts, try to implement them as often as you can in production code.  With that said, the best way to ultimately learn is to find an environment with technically excellent, like minded people, eager to learn the same values and able to implement them in production.</p>
<p>Enter <a href="www.uswitch.com">uSwitch</a> stage left <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Until next time&#8230;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Dojo Review(2) and the final exercise]]></title>
<link>http://gordonmcmahon.wordpress.com/2009/11/20/dojo-review2-and-the-final-exercise/</link>
<pubDate>Fri, 20 Nov 2009 10:04:46 +0000</pubDate>
<dc:creator>gordonmcmahon</dc:creator>
<guid>http://gordonmcmahon.wordpress.com/2009/11/20/dojo-review2-and-the-final-exercise/</guid>
<description><![CDATA[We ran the second coding dojo this week, a repeat of the first one but with the other half of the of]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>We ran the second coding dojo this week, a repeat of the first one but with the other half of the office. Again, it went well but was heavily constrained by the time limits of lunchtime.I&#8217;m hoping that at the very least, it&#8217;s shown people an alternative style of software development that they might try to adopt or apply to parts of their work.</p>
<p>Since I&#8217;m leaving the company in a weeks time and a couple of people who were keen to participate haven&#8217;t made it due to meetings and project commitments, I have decided to run a final exercise. It&#8217;s one of my favourites and something I like to do when learning a new language. It&#8217;s the <a href="http://codekata.pragprog.com/2007/01/kata_fourteen_t.html" target="_blank">Trigrams kata </a>from <a href="http://pragdave.pragprog.com/" target="_blank">PragDave</a>&#8217;s website of code katas.</p>
<p>I&#8217;m not sticking with the more traditional coding dojo style this time though. Instead of attempting to cram it into a single session, I&#8217;ve thrown it open to everyone to attempt, in the langauge of their choice, in any spare time (or lunch time) that they have spare. I&#8217;ll make myself available to assist when they encounter problems, and maybe run a couple of &#8216;catch-up&#8217; or progress sessions, but other than that, they&#8217;ll be left to their own devices. I&#8217;ll let you know how it works out.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Coding Dojo: próximo encontro em 24/11]]></title>
<link>http://bluesoft.wordpress.com/2009/11/19/coding-dojo-proximo-encontro-em-24-11/</link>
<pubDate>Thu, 19 Nov 2009 14:39:18 +0000</pubDate>
<dc:creator>Luiz Faias Jr</dc:creator>
<guid>http://bluesoft.wordpress.com/2009/11/19/coding-dojo-proximo-encontro-em-24-11/</guid>
<description><![CDATA[Apesar da pouca divulgação que fizemos aqui no blog, nosso coding dojo continua acontecendo todas as]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Apesar da <a href="http://bluesoft.wordpress.com/2009/10/19/coding-dojo-na-bluesoft-as-tercas-feiras/" target="_blank">pouca divulgação</a> que fizemos aqui no blog, nosso coding dojo continua acontecendo todas as terças-feiras à partir das 19:00.</p>
<p>O que havíamos esquecido de mencionar explicitamente é que este é um evento <strong>gratuito</strong> e que conta com a participação de programadores de diversos níveis de conhecimento!</p>
<p>Seu propósito é realmente <strong>treinar boas práticas</strong> de programação e <strong>proporcionar diversão</strong>!</p>
<p>Criamos um site para publicar o conteúdo de todas as sessões realizadas, seus participantes e os resultados das retrospectivas. Acesse em: <a href="http://dojo.bluesoft.com.br" target="_blank">http://dojo.bluesoft.com.br</a></p>
<div id="attachment_475" class="wp-caption aligncenter" style="width: 460px"><a href="http://dojo.bluesoft.com.br" target="_blank"><img class="size-full wp-image-475  " title="Coding Dojo Website" src="http://bluesoft.wordpress.com/files/2009/11/coding-dojo-website1.png" alt="" width="450" height="400" /></a><p class="wp-caption-text">Bluesoft Coding Dojo Website</p></div>
<p>Se vocês está em São Paulo e deseja participar, apareça! Estamos te esperando no <a href="http://dojo.bluesoft.com.br/home/proximo-encontro" target="_blank">próximo encontro</a> em 24/11/09.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[wireless for surveillance system - INDONESIA]]></title>
<link>http://gudangwireless.wordpress.com/2009/11/19/wireless-for-surveillance-system-cctv-ipcamera/</link>
<pubDate>Thu, 19 Nov 2009 07:43:47 +0000</pubDate>
<dc:creator>gudangwireless</dc:creator>
<guid>http://gudangwireless.wordpress.com/2009/11/19/wireless-for-surveillance-system-cctv-ipcamera/</guid>
<description><![CDATA[wireless for surveillance system in Indonesia see the website here click the features Read this! MES]]></description>
<content:encoded><![CDATA[wireless for surveillance system in Indonesia see the website here click the features Read this! MES]]></content:encoded>
</item>
<item>
<title><![CDATA[Watch Out for Triad Of Champions!]]></title>
<link>http://alife2love.com/2009/11/17/watch-out-for-triad-of-champions/</link>
<pubDate>Tue, 17 Nov 2009 10:13:09 +0000</pubDate>
<dc:creator>iamhide</dc:creator>
<guid>http://alife2love.com/2009/11/17/watch-out-for-triad-of-champions/</guid>
<description><![CDATA[What&#8217;s up people! I am back again from China after making an urgent trip so thanks to everyone]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>What&#8217;s up people!</p>
<p>I am back again from China after making an urgent trip so thanks to everyone for their patience when it came to me responding to your e-mails and queries. I will be following up closely with all the enquiries that I have received since last week so check your mailboxes and Skype for my response soon.</p>
<p><!--more--></p>
<p>In light of all my recent enquiries, I have received a few very ridiculous questions. If you are thinking of taking a program and you are still asking ridiculous questions, let me make one thing clear to you : The fact is, <strong>You want in</strong>.</p>
<p>Listen up.  If you think you can get a better program out there then by all means, sign-up with them, become a PUA today. You live your life being &#8220;safe&#8221; all the time, you are going to achieve only normal, &#8220;safely&#8221; results. This problem is bigger than you think it is. Not being good with women is only one small problem, <strong>the NEED to control an outcome by avoiding risk will make you move a lot less in life and that <span style="color:#800000;">logically and naturally</span> gives you less results</strong>.</p>
<p>If you haven&#8217;t already noticed by now, there might be something seriously wrong with you. What I teach is different from PUA stuff simply because I am not a PUA&#8230; and <strong>what I teach works</strong>. That&#8217;s why I have a blog and there is <a href="http://troydizondatingreview.com">TDDReview</a> that is constantly updated with<strong> real-life results from real people</strong>. The truth is, if you want what our successful clients have, you will have to take the plunge, the first step. No one can guarantee you anything. If you can find someone who can, please tell me so that I can sign-up with them too. As far as I&#8217;m concerned, no one in Singapore and Asia can even sniff the kind of success we have when it comes to training men (as proven, time and again). This is why we are plastered all over the media, from ChannelNewsAsia to MTV to Radio shows etc.</p>
<p>The last thing I wanna say is this : <strong>Manage your expectations</strong>. Believe me, I have the ability to train you to date almost all kinds of girls. Models, celebrities, socialites, you name it. <strong>But whether you can do it or not is another thing</strong>. I didn&#8217;t get to the point of dating 8-9 girls at one time immediately. It took time and a lot of discipline to improve. X = X, a quality man will date a quality girl and vice versa. You cannot expect to be that be-spectacled turd with bad hair and over-sized clothing and still expect to hold on to a quality girl. If you say other people can promise you that, go to them. But one thing is for sure, I can train you to make that happen, without a doubt.</p>
<p><strong>Risk-takers win more by simply taking more chances.</strong></p>
<div class="wp-caption aligncenter" style="width: 302px"><img src="http://photos-f.ak.fbcdn.net/hphotos-ak-snc3/hs112.snc3/15941_188950401440_642296440_3411527_6768217_n.jpg" alt="" width="292" height="222" /><p class="wp-caption-text">Look what Masterclass Alumni &#34;MILFton monster&#34; got for taking risks</p></div>
<p>I don&#8217;t know about you but as the year draws to a close, I am eager to make this one of the best and most unforgettable festive seasons of my life and <strong>I know I can because I know how to</strong>. I have celebrated a lonely festive season before. It sucks immensely. I didn&#8217;t have someone to share my joy with. I sent text messages to girls at those happy moments, only to feel crushed within minutes when I didn&#8217;t get a reply back. And as much as I tried to deny it, watching others around me have that privilege really hurt me inside. Which is explains why Troy, Julian, Nash, all the TDD Instructors and myself are selling out programs months ahead. The choice to sit on your ass and waste more of your life away is yours. But so is the choice to step it up and make your life skyrocket from here and you know you can trust TDD to help you make that jump.</p>
<p>And your first step can begin next week. Allow me to present to you :</p>
<p><span style="text-decoration:underline;"><strong>Triad Of Champions : Triad Thursdays</strong></span></p>
<p>Oh boy, where do I even begin!</p>
<p>After months of discussion and audacious planning, I am excited to finally present to you readers of A Life To Love and Troy Dizon Dating, my passion project, <span style="color:#ffcc00;"><strong>Triad Of Champions</strong></span>. My draft plan for the project is ready and I am excited to realese a lot more info before the weekend begins.</p>
<p>Stay tuned for details coming up in the next post. The first <span style="color:#ff0000;">Triad Thursday</span> is scheduled for next week, 26th November 2009. <span style="color:#ff0000;">Triad Thursdays</span> is a <span style="text-decoration:underline;"><strong>FREE</strong></span> event for all <strong>TDD</strong> and <strong>A Life To Love</strong> enthusiasts. Feel free to bring your friends along.</p>
<p>If I were you, I would clear out my Thursday next week and come on down for this event to experience first-hand, a 24/7 Attractive Culture.</p>
<p>Until then, watch this space!</p>
<p><strong>Live and Love,</strong></p>
<p><strong>Xavier </strong></p>
<p>xav@troydizondating.com</p>
<p>http://alife2love.com/</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Applying TDD in principle if not in practice]]></title>
<link>http://joshilewis.wordpress.com/2009/11/16/applying-tdd-in-principle-if-not-in-practice/</link>
<pubDate>Mon, 16 Nov 2009 21:04:20 +0000</pubDate>
<dc:creator>joshilewis</dc:creator>
<guid>http://joshilewis.wordpress.com/2009/11/16/applying-tdd-in-principle-if-not-in-practice/</guid>
<description><![CDATA[My previous post was about describing the essence of TDD as a specification and direction tool, usin]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>My <a href="http://joshilewis.wordpress.com/2009/11/16/test-driven-development-part-1" target="_self">previous post</a> was about describing the essence of TDD as a specification and direction tool, using non-technical examples. A quick recap: the point of TDD is to know where you going, and how to know when you&#8217;ve achieved your goal.</p>
<p>Several people have told me that TDD is all well and good, but it doesn&#8217;t apply to them, for various reasons. One chap told me he can&#8217;t to TDD because he&#8217;s a &#8216;SQL developer&#8217; (his words). A friend told me he works on a vendor system, which is configured with XSLT files, and there is no tooling to support TDD. Its all very well to use whatever flavour of xUnit you want, but what about those who don&#8217;t have frameworks? What can the SQL, ASP and XSLT progammers and configurers out there do?</p>
<p>This is why it is important to understand the principle of TDD, and not only its practice (and why I think most demonstrations of TDD that I&#8217;ve seen focus too much on the practice).</p>
<p>As long as you have some way to set up a desired outcome, and can compare your actual outcome to your desired, you can perform TDD. You may not get some side benefits like automated regression testing and test coverage, but as mentioned in my previous post, those aren&#8217;t primary benefits. You also might not get the benefits of a decoupled design, since this may not make sense in your application.</p>
<p>You can still convey your intent. You will still have direction and focus. You will still be able to answer the question &#8216;am I done?&#8217;</p>
<p>A nice example of not getting the primary benefit of a decoupled design is the case of TDD in the SQL context. The team in which I&#8217;m currently working is still strongly focused on stored procedure and dataset-based programming. Therefore I&#8217;ve done a fair amount of thinking and playing in the TDD for SQL space. I&#8217;ve come up with a framework based on nUnit and TSQLUnit, but that&#8217;s another point.</p>
<p>I&#8217;ve used this framework to do TDD for stored procedures. One major shortcoming of T-SQL as a language (I feel dirty now) is that there&#8217;s no concept of abstraction. There is no way to break dependencies. If stored proceudre 1 (SP1) depends on user-defined function a (UDFa), there is no way I can test SP1 in isolation to UDFa. I therefore don&#8217;t get the benefit of a decoupled design, but I can still express the intent of my stored procedure, and I can prove when I&#8217;ve satisfied the requirment.</p>
<p>This is a clear case of the tooling failing the technique, but the technique can still be applied in principle. The same should be applicable in many other instances where there either isn&#8217;t tooling for the product (e.g. a vendor&#8217;s product which is configured).</p>
<p>Again, as long as you can create an expectation, and compare your actual outcome to that expectation, you can apply TDD in principle. So if you&#8217;ve previously had a look at TDD and wanted to apply it, but felt a lack of tooling for your particular case, think about how you can apply it in principle.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Test-Driven Development - Part 1]]></title>
<link>http://joshilewis.wordpress.com/2009/11/16/test-driven-development-part-1/</link>
<pubDate>Mon, 16 Nov 2009 19:36:38 +0000</pubDate>
<dc:creator>joshilewis</dc:creator>
<guid>http://joshilewis.wordpress.com/2009/11/16/test-driven-development-part-1/</guid>
<description><![CDATA[I&#8217;ve found Test-Driven Development (TDD) to be pretty much revolutionary in my own software de]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve found Test-Driven Development (TDD) to be pretty much revolutionary in my own software development efforts. Yet I find it is often very poorly explained, and explanations focus too much on the technical aspects of the technique, instead of the &#8216;philosophy&#8217; or principle behind it. I place a lot more value on principles and philosophies over practices, since often practices can&#8217;t be implemented exactly as described, whereas there can still be a takeaway from the philosophy.</p>
<p>In my opinion, TDD is unfortunately named, since it confuses people. The intent of TDD really has nothing to do with testing. Testing is merely the mechanism through which one gains the primary benefits.</p>
<p>My primary TDD mantra is &#8216;TDD&#8217;s not about testing, its about specification&#8217;. In my interpretation, TDD has 2 primary benefits:</p>
<ol>
<li>It forces you to specify the problem you&#8217;re trying to solve very narrowly, and very explicitly.</li>
<li>It promotes a loosely-coupled, modular design, since testable designs are generally loosely-coupled by nature.</li>
</ol>
<p>Most people will state that the aim of TDD is a large proportion of test coverage and automated regression tests. This is not true. Both of these goals are readily achievable without doing test-first TDD; i.e. they can be easily achieved by writing tests <em>after</em> writing code. Test coverage and automated regression tests are very nice by-products of TDD (when its done correctly), but to my mind they are certainly not the primary benefit nor aim of TDD.</p>
<p>I&#8217;d like to explain the first of these primary benefits of  TDD with a non-software related, everyday (somewhat contrived) example. (I&#8217;ll need to think of another contrived example to explain the second.) The reason for a non-software related example is I want you to be able to explain the concept to a non-technical person, like your mother or your CEO (or maybe even your team lead <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  ).</p>
<p>Imagine that I get a crazy idea in my head that I want to become more &#8216;eco friendly&#8217; in my day-to-day life, and contribute less to global warming. My statement of intent, or vision may be something like &#8216;I want to make a personal contribution to the lessening of global warming.&#8217; This statement makes one warm and fuzzy, but on its own, its quite difficult to implement. I call this my strategy.</p>
<p>Good management textbooks and courses will tell you one has to implement strategy through strategic objectives. So in order to implement my strategy of being more eco friendly, I come up with the &#8217;strategic objective&#8217; of reducing my daily carbon emissions.</p>
<p>After some thought about this objective being a little &#8216;hand-wavy&#8217; and hard to measure, I can refine it by phrasing it as &#8216;I will decrease my daily commute petrol usage by 10% by the end of this month&#8217;. The objective now is measurable, and has a concrete time frame. I have a concrete goal towards which I can work, and measure daily progress (my car has a trip computer which indicates current and average fuel consumption). I can easily see whether I have met (or exceeded) this goal next time I fill up my car.</p>
<p>I have progressed from the warm-and-fuzzy but somewhat hand-wavy statement of &#8216;I want to do my bit to decrease global warming&#8217; to something tangible to which I can work towards. I know when I have achieved my goal, without a shadow of a doubt, and I can prove it. I can now brag to my friends about how wonderful I am, and maybe I can even get a tax break or something.</p>
<p>Now that the example is concluded, I&#8217;d like to point out some things about strategic objectives that I learned at university. Strategic objectives (SOs) must be phrased so that they are measurable, and have a time frame. It says only <em>what </em>must be achieved, but not <em>how</em>. The fact that its measurable means that you know when its done.  You don&#8217;t know how to do it (that comes later, at the tactical and operations levels), but you know when its achieved.</p>
<p>If an SO is not measurable, it is considered bad and must be rephrased and rethough. This is akin to designing the SO and implicitly the fulfilment of the SO.</p>
<p>So, an SO is a statement of intent, its a description of a requirement. <em>In x months&#8217; time, we must have sold y units</em>. The fact that it is measurable means  you know when you&#8217;re done, but you can also manage it, analyse it, report on it etc. If its not measurable, rephrase it.</p>
<p>If an SO is not a strong enough statement of intent,will those members at the tactical and operations levels  &#8211; who don&#8217;t operate at all at the strategic level &#8211; be able to interpret it and implement it?</p>
<p>If an SO is not measurable, how can you prove to your board that the strategy has been fulfilled?</p>
<p>The testing aspect of this example is simply asking oneself: &#8216;its now x months down the line, have I sold y units? Its a yes or no answer. Its comparing the actual outcome to the desired outcome.</p>
<p>This example is not test oriented at all. We don&#8217;t create strategic objectives in order to run a somewhat trivial test at the end of the prescribed period. The SO exists as a direction, as a statement of intent, as a specification of the where the business needs to be at some point. Sure the measurment aspect is a big part of the SO, but we don&#8217;t write SOs for the sake of measuring them.</p>
<p>TDD is no different. The point of TDD is not to write tests. TDD uses the test as a mechanism for feedback. Are we done yet? You can know if you&#8217;re done only you know where you&#8217;re supposed to be. I don&#8217;t know if I&#8217;ve made a meaningful contribution to decreasing my emissions until I&#8217;m at the petrol pump. A company doesn&#8217;t know if its fulfiled its strategy until it can prove it sold x units by a certain date.</p>
<p>TDD forces you to make that end-goal explicit, and to start with that end-goal. Businesses don&#8217;t write down strategic sales targets after they&#8217;ve made the sales. They <em>start</em> with the target, then put measures in place to achieve that target. TDD in software development is the same.</p>
<p>Start with your end-goal, stated in the form of tests, usually unit tests. You then know where you going. You can then start to decide how you&#8217;re going to get there.</p>
<p>To use another example, developing without TDD is like driving around with a sat-nav device, ending up somewhere, and post-haste setting that point as your destination.</p>
<p>Unfortunately, the examples I&#8217;ve discussed here don&#8217;t really explain the second primary goal of TDD, a loosely-coupled design. I will try think of an example for this benefit and blog it.</p>
<p>Some more notes:</p>
<p>1: As mentioned, businesses start with strategy and strategic objectives, and implement through tactical and operational implementations. They don&#8217;t run for a couple of months then retrofit their strategy to where they land up. One can state that &#8216;its more important to know where you&#8217;re going, than how to get there&#8217;.</p>
<p>One might also be able to state that &#8216;its more important to know where you&#8217;re going, than actually getting there&#8217;. This statement arises from the following: according to agile principles, one delivers the highest value tasks first. Since TDD tests are written before the code to satisfy them, one might argue that the test is more important than the code written to pass the test.</p>
<p>This can be reinforced by considering software product maintenance. The majority of these efforts is spent in understanding the code written by other developers. TDD tests can be a shortcut to understanding the intent of the code.</p>
<p>Also, as businesses changed, an application&#8217;s code is likely to change too (as should the TDD tests). Essentially, the intent of the code (conveyed by the test) is likely to outlive the code itself.</p>
<p>2: Behaviour-Driven Design (BDD) is an evolution of TDD, which basically has the notion of &#8216;executable specifications&#8217; as its holy grail. Instead of developers having to interpret the end-goal presented to them in some type of specification and translating that into code, the customer of the software (business) should be able to codify their specifications in a language as close to their own natural language which can be executed as code.</p>
<p>3: Good TDD tests should be statements of intent. This is often what is meant as &#8216;tests documenting the code&#8217;.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[TDD Antipatterns]]></title>
<link>http://leaningagile.wordpress.com/2009/11/16/tdd-antipatterns/</link>
<pubDate>Mon, 16 Nov 2009 12:08:00 +0000</pubDate>
<dc:creator>Augusto</dc:creator>
<guid>http://leaningagile.wordpress.com/2009/11/16/tdd-antipatterns/</guid>
<description><![CDATA[Looking for some TDD antipatterns I came across these two resources: TDD anti-patterns catalogue Jam]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Looking for some TDD antipatterns I came across these two resources:</p>
<ul>
<li><a title="TDD Anti-patterns catalogue" href="http://stackoverflow.com/questions/333682/tdd-anti-patterns-catalogue" target="_blank">TDD anti-patterns catalogue</a></li>
<li><a title="Jame Carr anti-patterns catalogue" href="http://blog.james-carr.org/2006/11/03/tdd-anti-patterns/" target="_blank">Jame Carr anti-patterns catalogue</a></li>
</ul>
<p>But why was I looking for this catalogues? Well, I found a several references to a<a title="SLF4J" href="http://www.slf4j.org/" target="_blank"> log</a> framework from the tests of the application I&#8217;m working on. Why on earth would a TDD practitioner generate a log from a test? The only answer I can find is <em>bad practices</em> and I&#8217;m quite sure that the person behind this did this to check the behaviour manually rather than automatically.</p>
<p>What stroke me is that I&#8217;ve seen this before in integration tests in which just the setup took no less than 50 lines of (spaghetti) code. I&#8217;m quite sure that there must be a scenario where is beneficial to invoke a logging framework from a test, but I can imagine one.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Mobility MESH Wireless in Indonesia - Feature ]]></title>
<link>http://gudangwireless.wordpress.com/2009/11/16/mobility-mesh-wireless-in-indonesia-feature/</link>
<pubDate>Mon, 16 Nov 2009 04:20:03 +0000</pubDate>
<dc:creator>gudangwireless</dc:creator>
<guid>http://gudangwireless.wordpress.com/2009/11/16/mobility-mesh-wireless-in-indonesia-feature/</guid>
<description><![CDATA[Mobility MESH Wireless in Indonesia – Next Generation Features Click more information here Multi-rad]]></description>
<content:encoded><![CDATA[Mobility MESH Wireless in Indonesia – Next Generation Features Click more information here Multi-rad]]></content:encoded>
</item>
<item>
<title><![CDATA[Flexible design, Silverlight 3 and TDD]]></title>
<link>http://kisk75.wordpress.com/2009/11/12/flexible-design-silverlight-3-and-tdd/</link>
<pubDate>Thu, 12 Nov 2009 20:59:31 +0000</pubDate>
<dc:creator>kisk75</dc:creator>
<guid>http://kisk75.wordpress.com/2009/11/12/flexible-design-silverlight-3-and-tdd/</guid>
<description><![CDATA[First of all… sorry for not writing at the blog the last days… just been to many things to discuss a]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>First of all… sorry for not writing at the blog the last days… just been to many things to discuss and listen too so I just haven’t prioritized the blog. Sorry for that.</p>
<p>The last two days have gotten better and more topics of interest has been possible to select. I have joined several sessions last days where topic has been Silverlight, flexible design, architecture roles, etc.</p>
<p>Flexible design got my highest attention today and focus on use of Dependency Injections and the framework named MEF. By using this in combination together with a good architecture we can really achieve real flexible design in our solutions and they will be more easy to expand and maintain. This is a real interesting theme we really should put more attention to. I hope we can spend some time on Unity Framework and MEF in the nearest future to learn more.    </p>
<p>More from the speaker can be found on this blog: <a title="http://blog.noop.se/" href="http://blog.noop.se/">http://blog.noop.se/</a></p>
<p>Silverlight 3 has also gotten more focus the last days. It is impressive how much we can do in the UI with almost zero code. By doing good combination of code from developer and use of&#160; “Behaviors” that is a new feature in Silverlight 3. Looks real cool and fun. I think Silverlight is a good option for many ASP.Net solutions now.</p>
<p>Yesterday I also participated on a TDD session with Roy Osherove. Wondered if he had any new things to tell. He showed interesting things about reviews of test from Microsoft products and frameworks. I realize that not only we struggle with TDD in practice – others do also.</p>
<p><strong>Own thinking     <br /></strong>While participating these days I have discussed with others and I believe we could really benefit more on doing more pair-programming. This to learn more and faster from each other and also increase the quality of our work and products. I think this would be a good investment for us in the future and also would improve cooperation between all developers in our teams.</p>
<p>I am willing to suggest as a rule that: “All developers should work in pair for one month doing TDD, discuss solution and design and do review together”. </p>
<p>Well… it is time to stop thinking work for today and celebrate birthday… <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  YES!! I have birthday today… Thank you to everybody who sent message or call me today.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Interview with  MOTHER FLOCKING Producer of FLOCK - Robby Zinchak]]></title>
<link>http://capsulecomputers.wordpress.com/2009/11/12/interview-with-mother-flocking-producer-of-flock-robby-zinchak/</link>
<pubDate>Thu, 12 Nov 2009 07:14:33 +0000</pubDate>
<dc:creator>CapsuleComputers</dc:creator>
<guid>http://capsulecomputers.wordpress.com/2009/11/12/interview-with-mother-flocking-producer-of-flock-robby-zinchak/</guid>
<description><![CDATA[MasterAbbott from Capsule Computers.  Had the complete pleasure to sit down and ask the Mother Flock]]></description>
<content:encoded><![CDATA[MasterAbbott from Capsule Computers.  Had the complete pleasure to sit down and ask the Mother Flock]]></content:encoded>
</item>
<item>
<title><![CDATA[Event Mocking with[out] Rhino Mocks]]></title>
<link>http://blog.coreycoogan.com/2009/11/11/event-mocking-without-rhino-mocks/</link>
<pubDate>Wed, 11 Nov 2009 23:56:32 +0000</pubDate>
<dc:creator>coreycoogan</dc:creator>
<guid>http://blog.coreycoogan.com/2009/11/11/event-mocking-without-rhino-mocks/</guid>
<description><![CDATA[One of the common tasks I come across when doing TDD is mocking events.&#160; I&#8217;m a big fan of]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>One of the common tasks I come across when doing TDD is mocking events.&#160; I&#8217;m a big fan of <a href="http://www.ayende.com/projects/rhino-mocks.aspx">Rhino Mocks</a> and it&#8217;s pretty easy to <a href="http://www.ayende.com/Wiki/Rhino+Mocks+3.5.ashx#Howtoraiseevents">raise an event</a> on a mocked object doing something like this:</p>
<p>_Broker.Raise(x =&#62; x.GetData += null, this, EventArgs.Empty);</p>
<p>This is representative of the most typical examples you&#8217;ll find on the web and this is all fine and good.&#160; However, sometimes the scenario that you need to test is a little more complicated and this method of raising events on a mock object simply won&#8217;t work without too many hassles.</p>
<p><strong>A More Complicated Scenario</strong></p>
<p>A common scenario may be where you are testing something that is subscribing to events that are actually fired by an object a couples levels deep.&#160; For example, you may have an object that sends messages to another object, which is responsible for raising the event.&#160; Hopefully this very simple textual sequence figure will help make things more clear.</p>
<p>Proxy.Execute() -&#62; Broker.HandleMessage() -&#62; Broker.RaiseEvent() -&#62; Gateway.HandleEvent(eventArg)</p>
<p>I want to test that when the Proxy publishes a certain message the Gateway handles the event properly.</p>
<p><strong>Mocking The Old Fashioned Way</strong></p>
<p>My first instinct was to look at how I could accomplish this with Rhino.&#160; After a couple minutes, I realized that this would not be a good way to spend my time.&#160; A better option for me was to mock the old fashioned way.&#160; To do this, I created a <em>MockProxy</em> and <em>MockBroker</em> class that implemented the <em>IProxy</em> and <em>IBroker</em> interfaces.&#160; I can now just write regular C# code to handle how/when to raise those events.&#160; It took only a few minutes to write the code, is intention-revealing and works like a champ.</p>
<p><em>NOTE: I tried to figure out how I could show some sample code without getting into all the gory details but couldn&#8217;t find a simple way, so I&#8217;ll just get right to the moral of the story.</em></p>
<p>When it comes to mocking, follow the KISS principal.&#160; Rhino and other frameworks are there to make our lives easier.&#160; If you are spending time and effort trying to figure out how to mock something in a framework, stop and think about doing it old school.&#160; You&#8217;ll save yourself a load of time and your simple solution should be more readable to others.&#160; You can still create a Rhino mock of your old school mock object (assuming you used virtual methods) for the purpose of asserting expectations, which will provide the best of both worlds.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[The Next Generation MESH in Indonesia - Mobility]]></title>
<link>http://gudangwireless.wordpress.com/2009/11/08/the-next-generation-mesh-in-indonesia-mobility/</link>
<pubDate>Sun, 08 Nov 2009 15:00:58 +0000</pubDate>
<dc:creator>gudangwireless</dc:creator>
<guid>http://gudangwireless.wordpress.com/2009/11/08/the-next-generation-mesh-in-indonesia-mobility/</guid>
<description><![CDATA[see the application : click here ! The wireless world website click here www.gudangwireless.com , bu]]></description>
<content:encoded><![CDATA[see the application : click here ! The wireless world website click here www.gudangwireless.com , bu]]></content:encoded>
</item>
<item>
<title><![CDATA[Buch-Rezension zu "The Art of Unit Testing"]]></title>
<link>http://graberj.wordpress.com/2009/11/08/buch-rezension-zu-the-art-of-unit-testing/</link>
<pubDate>Sun, 08 Nov 2009 12:45:32 +0000</pubDate>
<dc:creator>Johnny Graber</dc:creator>
<guid>http://graberj.wordpress.com/2009/11/08/buch-rezension-zu-the-art-of-unit-testing/</guid>
<description><![CDATA[&#8220;The Art of Unit Testing&#8221; von Roy Osherove ist im Mai 2009 bei Manning erschienen. Das B]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.manning.com/osherove/"><img src="http://graberj.wordpress.com/files/2009/10/artunittesting.jpg" alt="The Art of Unit Testing" title="The Art of Unit Testing" width="150" height="186" class="alignleft size-full wp-image-160" /></a>&#8220;The Art of Unit Testing&#8221; von <a href="http://weblogs.asp.net/ROsherove/">Roy Osherove</a> ist im Mai 2009 bei Manning erschienen. Das Buch behandelt Unit Testing in C#. </p>
<p>&#160;<br />
<strong>Zum Inhalt</strong><br />
<strong>Kapitel 1</strong> zeigt die Basis von Unit Tests. Diese umfasst eine Definition der Begriffe, eine kurze Einführung zu Test-Driven Development (TDD) und eine Abgrenzung gegen Integrationstests. Den nicht alles, was sicht Unit Test nennt, ist auch wirklich einer.</p>
<p><strong>Kapitel 2</strong> hilft einem durch den ersten Unit Test. Nach der Auflistung der Vorteile die ein entsprechendes Test-Framework bringen folgt ein Rundgang durch NUnit. Dieser reicht von der Installation über die Einrichtung eines Test-Projekts zu Namenskonventionen bis hin zur Ausführung der Tests.</p>
<p>Wie man mit <a href="http://de.wikipedia.org/wiki/Stub_%28Programmierung%29">Stubs </a>die Abhängigkeiten aufbrechen kann wird in <strong>Kapitel 3</strong> gezeigt. Das Beispielprojekt hat zu beginn eine direkte Abhängigkeit zum Dateisystem. In 2 Schritten wird der Code so umgebaut, dass die Abhängigkeit aufgelöst werden kann. Mit einer kleinen Hilfsklasse, dem Stub, kann man dann genau die Antwort zurück liefern, die man für den Test der Übergeordneten Klasse benötigt. Dies kann in dem Beispiel sowohl ein Boolean sein wie auch eine Exception des Dateisystems.<br />
Es folgt ein Abstecher ins Thema <a href="http://de.wikipedia.org/wiki/Dependency_Injection">Dependency Injection</a>. Denn der Stub, aber auch die konkrete Klasse mit der Logik, muss ja mit der aufrufenden Klasse verbunden werden. Es werden die Vor- und Nachteile der jeweiligen Ansätze dargelegt, damit man selber das zu seinem Problem passende auswählen kann. </p>
<p><strong>Kapitel 4</strong> zeigt wie man mit Mock Objekten die Interaktion mit der zu testenden Klasse prüfen kann. Mit einem selbst geschriebenen Mock wird das Prinzip erklärt, bevor in <strong>Kapitel 5</strong> das Mock-Framework <a href="http://www.ayende.com/projects/rhino-mocks.aspx">Rhino Mocks</a> erklärt wird. Eine Übersicht der anderen verbreiteten Frameworks (wie <a href="http://learn.typemock.com/">TypeMock</a>, <a href="http://www.nmock.org/">NMock </a>und <a href="http://www.nunit.org/index.php">NUnit.Mocks</a>) rundet das Kapitel ab. </p>
<p>Die Organisation von Tests, Test Patterns und Continuous Integration bilden das <strong>Kapitel 6</strong>, während  <strong>Kapitel 7</strong> die Qualität der Tests behandelt. Lesbarkeit und Verständlichkeit sind Dinge, die auch bei Tests bedacht werden müssen. </p>
<p><strong>Kapitel 8</strong> hilft bei der Integration von Unit Tests in die Firma. Hierbei geht es nicht um die technische, sondern um die organisatorische Ebene. Osherove berichtet über seine Erfahrungen und liefert Antworten zu häufig aufkommenden Fragen und Problemen. </p>
<p>Wie man mit Legacy Code arbeiten kann zeigt <strong>Kapitel 9</strong>. Grosse Projekte ohne wirkliche Unit Tests benötigen spezifische Vorgehensweise. Auch hier werden Vor- und Nachteile der Ansätze aufgezeigt. Der Einsatz von Tools kann einem auch hier das Leben erleichtern. Depender oder NDepend können Abhängigkeiten anzuzeigen, was als Ausgangslage für Unit Tests dienen kann. Für Java Entwickler werden die Tools <a href="https://jmockit.dev.java.net/">JMockit </a>(vergleichbar mit TypeMock) und Vise erwähnt. </p>
<p>Design und Testbarkeit werden noch einmal ausführlich im <strong>Anhang A</strong> behandelt. <strong>Anhang B</strong> bietet eine kompakte Auflistung von Tools und Frameworks aus allen Bereichen von Tests.</p>
<p>&#160;<br />
<strong>Fazit</strong><br />
Ein sehr gutes Buch zur Kunst des Unit Testings. Auf rund 300 Seiten erfährt man unzählige Möglichkeiten zum sauberen testen. Das Buch richtet sich eher an Leser mit Erfahrungen im Bereich Unit Testing. Für Anfänger mag sich nicht immer erschliessen, worin die Vorteile der jeweiligen Ansätze liegen. Hat man sich aber mit den Problemen selber herumgeschlagen, braucht es nicht mehr viele Worte. Ich fand das Buch eine ideale Ergänzung zu <a href="http://graberj.wordpress.com/2009/09/15/buch-rezension-zu-test-driven/">Test Driven</a>.<br />
Der Anhang A hätte ein eigenes, „richtiges“ Kapitel verdient und einige Grafiken hätte man nochmals überarbeiten können. Davon abgesehen ist das Buch sehr gut.</p>
<p>&#160;<br />
<strong>Zum Buch</strong><br />
<a href="http://www.manning.com/osherove/">The Art of Unit Testing with Examples in .NET</a> von Roy Osherove, 2009 Manning, ISBN 978-1-933988-27-6, 320 Seiten</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
