<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6930256377577147405</id><updated>2012-02-17T04:31:30.185+01:00</updated><category term='Ranorex'/><category term='Code kata'/><category term='Visual Studio'/><category term='Coding Dojo Helper'/><category term='EDF'/><category term='MVVM'/><category term='Prism'/><category term='IoC'/><category term='Unit Test'/><category term='Virtual Earth'/><category term='OpenXDF'/><category term='Bug'/><category term='AJAX'/><category term='ASP'/><category term='MCC'/><category term='Theme'/><category term='Software Architecture'/><category term='book'/><category term='SOA'/><category term='Test Automation'/><category term='Compression'/><category term='Tool'/><category term='LinQ'/><category term='Code'/><category term='MSDN'/><category term='Mix'/><category term='PDC'/><category term='log'/><category term='Scrum'/><category term='Clean Code'/><category term='WPF'/><category term='Blog'/><category term='.NET'/><category term='Silverlight'/><title type='text'>'todo: find a name for Blog-Titel</title><subtitle type='html'>My struggles in becoming a good .NET-developer.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5081906116535234785</id><published>2010-11-14T12:14:00.000+01:00</published><updated>2010-11-14T12:14:57.441+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='Code kata'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Prism'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding Dojo Helper'/><title type='text'>Second sprint experiences of the Coding Dojo Helper</title><content type='html'>The motto of the second sprint was "Visual Studio Integration". On &lt;a href="http://msdn.microsoft.com/en-us/vstudio/vextend.aspx"&gt;Microsofts website about VS-extensions&lt;/a&gt;, there are a lot of resources about extending the IDE. Unfortunately, after navigating around a bit, you quickly land on the boring msdn library pages. As I haven't found any nice tutorials on the web either, I had to find it out by myself: after downloading the &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;amp;displaylang=en"&gt;SDK&lt;/a&gt;, there are new templates in the new project window under the Extensibility-folder. One of them is named "WPF Toolbox Control" and that sounded nice to me and so I took it ;)&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;u&gt;Visual Studio Integration&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/TN5b5xky8fI/AAAAAAAADLU/07GjvRC6BzQ/s1600/VSIX1.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/TN5b5xky8fI/AAAAAAAADLU/07GjvRC6BzQ/s320/VSIX1.png" width="280" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Outline of a WPF Toolbox Control project&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;When you compile the project, you get a simple, empty dockable toolbox window inside of Visual Studio, like the properties-window but without the properties :)&lt;br /&gt;The main classes of the project are the CodingDojoHelperVSExtension*.*-files, which specify the embedding of the extension into Visual Studio and MyToolWindow.cs, which is your entry-point in modifying the toolbox.&lt;br /&gt;As I'm using Prism, my constructor (which is the complete code for MyToolWindow btw) looks like this:&lt;br /&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;Guid&lt;/span&gt;(&lt;span class="Apple-style-span" style="color: #a31515;"&gt;AGloballyUniqueIdentifier&lt;/span&gt;)]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;MyToolWindow&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style="color: #2b91af;"&gt;ToolWindowPane&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;MyToolWindow()&amp;nbsp;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;base&lt;/span&gt;(&lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;this&lt;/span&gt;.Caption&amp;nbsp;=&amp;nbsp;&lt;span style="color: #2b91af;"&gt;Resources&lt;/span&gt;.ToolWindowTitle;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;this&lt;/span&gt;.BitmapResourceID&amp;nbsp;=&amp;nbsp;301;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;this&lt;/span&gt;.BitmapIndex&amp;nbsp;=&amp;nbsp;1;&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;bootstrapper&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;CodingDojoHelper.&lt;span style="color: #2b91af;"&gt;Bootstrapper&lt;/span&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bootstrapper.Run();&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;shell&amp;nbsp;=&amp;nbsp;bootstrapper.Shell;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;shell.Background&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;SolidColorBrush&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;Colors&lt;/span&gt;.Black);&lt;br /&gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;base&lt;/span&gt;.Content&amp;nbsp;=&amp;nbsp;shell;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/pre&gt;In my solution, I now have three projects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;CodingDojoHelper, which has all the logic and UI in it.&lt;/li&gt;&lt;li&gt;CodingDojoHelperDesktop, which references CodingDojoHelper and just provides the main window.&lt;/li&gt;&lt;li&gt;CodingDojoHelperVsExtension, which references CodingDojoHelper and just provides the IDE-integration.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I just need minor tweaks to adapt it to the 2 scenarios (like&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;shell.Background&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;new&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span style="color: #2b91af;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;SolidColorBrush&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;(&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span style="color: #2b91af;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Colors&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.Black);&lt;/span&gt;&lt;/span&gt;&amp;nbsp;instead of an transparent background for the desktop-version). This is really nice and I haven't thought that the integration would be so easy. However, I had two problems to solve:&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_w-DCOVT1BMQ/TN-jeGi7ODI/AAAAAAAADLY/WboSTZXrSEg/s1600/CodingDojoHelper2.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/_w-DCOVT1BMQ/TN-jeGi7ODI/AAAAAAAADLY/WboSTZXrSEg/s200/CodingDojoHelper2.png" width="200" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Digest view with the new amCharts&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Every VS-extension must be compiled with a strong key. This means, every depending library also must have a strong key. It leads to the point, that I even need the strong key of Rhino Mocks, because I'm using the&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;[&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span style="color: blue;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;assembly&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span style="color: #2b91af;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;InternalsVisibleTo]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;-attribute to be able to mock internal classes for unit-testing. Fortunately, Rhino Mocks provides a key callable via&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;Rhino.Mocks.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span style="color: #2b91af;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;RhinoMocks&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: consolas; white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;.StrongName&lt;/span&gt;&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;I had to switch from &lt;a href="http://wpf.codeplex.com/"&gt;WPF Toolkit&lt;/a&gt; to &lt;a href="http://wpf.amcharts.com/"&gt;amCharts&lt;/a&gt; for this reason: the WPF Toolkit is not a published product and therefore, it hasn't got a strong name :( However, I like amCharts more by now :) I don't need to do much designing so that it looks good ^^&lt;/li&gt;&lt;/ol&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;u&gt;New features&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_w-DCOVT1BMQ/TN-6S3nI0tI/AAAAAAAADLc/u5OMZSLllm8/s1600/CodingDojoHelper3.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="150" src="http://1.bp.blogspot.com/_w-DCOVT1BMQ/TN-6S3nI0tI/AAAAAAAADLc/u5OMZSLllm8/s200/CodingDojoHelper3.png" width="200" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Start-screen&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;What else is new in this sprint?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Start-screen:&lt;/b&gt; I've made a start-screen where you can select the target-duration of the TDD-cycles. When the time is up, you'll hear a nasty sound bite like "You weak pathetic fool" from the original Mortal Kombat game! So beware and keep your tests small and do make baby-steps to receive a saying like "Well done" from &lt;a href="http://en.wikipedia.org/wiki/Mortal_Kombat#Storyline"&gt;Shao Khan&lt;/a&gt; himself!&lt;/li&gt;&lt;li&gt;&lt;b&gt;Beautified:&lt;/b&gt; You also have the possibility to set the total duration of the dojo and the number of combatants, that is developers. But these two items are just to show off yet, because they will gain meaning in the next sprint. I downloaded gif-animations of the fighters from an &lt;a href="http://www.animiertegifsgratis.de/"&gt;internet-resource&lt;/a&gt;&amp;nbsp;and used a &lt;a href="http://stackoverflow.com/questions/210922/how-do-i-get-an-animated-gif-to-work-in-wpf/1134340#1134340"&gt;special class&lt;/a&gt;&amp;nbsp;to make them move inside WPF - looks cool 8-) The other cool thing is a storyboard using an ElasticEase that makes the two buttons for modifying the times (which is indeed a styled scrollbar) swing into their new place. At first, I looked in Blend for the easing functions for WPF in vain. But then, I opened a Silverlight-project, build the storyboard there and copied the XAML into my WPF-project. Feels awkward, but works.&lt;/li&gt;&lt;table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; text-align: right;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_w-DCOVT1BMQ/TN-9sEJ1UKI/AAAAAAAADLg/xjF0BMi_8z4/s1600/CodingDojoHelper4.png" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="150" src="http://2.bp.blogspot.com/_w-DCOVT1BMQ/TN-9sEJ1UKI/AAAAAAAADLg/xjF0BMi_8z4/s200/CodingDojoHelper4.png" width="200" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Config-screen&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;li&gt;&lt;b&gt;Config-Screen:&lt;/b&gt;&amp;nbsp;This screen is also new to the Coding Dojo Helper and it was easily integrated with the help of Prism. Unfortunately, I haven't looked into&lt;a href="http://msdn.microsoft.com/en-us/library/gg430861(PandP.40).aspx"&gt; Prism V4 and the new navigation possibilities&lt;/a&gt; - but this is another user story for me in the coming sprint(s).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Styling:&lt;/b&gt;&amp;nbsp;I've done the same (styling with a Silverlight-project and copying the result into a WPF-project) with a Checkbox. That was needed, because the WPF-Checkbox is precompiled and therefore not decomposable into atomic WPF elements like Ellipse etc.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Gif-Editing:&lt;/b&gt;&amp;nbsp;I edited my first gif-image inside of Gimp. The finish him-writing wasn't part of the image. So I opened the gif in Gimp, added 6 frames to it with the text and saved it back. It's as simple as that!&lt;/li&gt;&lt;li&gt;&lt;b&gt;Adorner:&lt;/b&gt;&amp;nbsp;It is now possible to select the keys used to switch a developer and to end the session. I grab the AdornmentLayer, make it 25% transparent and prompt the user to push the new key for it. Luckily, I had to make the same Adorner-job at work last month. So this was a no-brainer ^^&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;The Coding Dojo Helper is now fully functional and we use it at work in our weekly coding dojo sessions. When I finished my third sprint, it should be ready for release :D&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5081906116535234785?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5081906116535234785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2010/11/second-sprint-experiences-of-coding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5081906116535234785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5081906116535234785'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2010/11/second-sprint-experiences-of-coding.html' title='Second sprint experiences of the Coding Dojo Helper'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_w-DCOVT1BMQ/TN5b5xky8fI/AAAAAAAADLU/07GjvRC6BzQ/s72-c/VSIX1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-8424268625487274042</id><published>2010-10-30T08:39:00.000+02:00</published><updated>2010-10-30T13:06:33.149+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code kata'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>Training big refactorings with code katas</title><content type='html'>&lt;div&gt;Recently, we had to refactor some methods out of a class into a new class. In the past, I already made some &lt;a href="http://papamufflon.blogspot.com/2009/07/benefit-for-unit-tests.html"&gt;big refactorings saved by unit tests&lt;/a&gt;. Retrospectively, I must admit that my unit tests back then weren't unit tests but mainly integration tests: although I stubbed away the serial communication, my tests used always all layers of the program. So, instead of mocking C when testing D--&amp;gt;C (uses), I mocked A in D--&amp;gt;C--&amp;gt;B--&amp;gt;A. That means, if you want to refactor B in this chain to B'--&amp;gt;B'', you have to adjust all tests of C and D respectively. This is of course cumbersome.&lt;/div&gt;&lt;div&gt;Thank god, I almost always mock the next layer now, so that refactoring the tests is manageable. I even succeeded to refactor the tests step by step in a TDD-manner having mostly only 1 red test. To be able to do that, the &lt;a href="http://codingdojo.org/cgi-bin/wiki.pl?KataBankOCR"&gt;Bank OCR-kata&lt;/a&gt; has helped me a lot. In this kata, you can do two class-refactor-steps in the first user story. I would like to present the second one in respect to clearly refactor the tests also (it helps a lot if you're familiar with this kata, so feel free to dive into it or even do a test-run for your own before reading further on). &lt;br /&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, serif; font-size: 16px; white-space: normal;"&gt;Code so far:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre&gt;&lt;pre style="font-family: consolas;"&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  private&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt; _bankAccountSplitter;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; BankAccountParser(&lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt; bankAccountSplitter)&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: blue;"&gt;    if&lt;/span&gt; (bankAccountSplitter == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: blue;"&gt;      throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"bankAccountSplitter"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;    _bankAccountSplitter = bankAccountSplitter;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Parse(&lt;span style="color: blue;"&gt;string&lt;/span&gt; bankAccount)&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: blue;"&gt;    if&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(bankAccount))&lt;br /&gt;&lt;span style="color: blue;"&gt;      throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"bankAccount"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;    var&lt;/span&gt; bankAccountNumber = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;StringBuilder&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;    foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; digit &lt;span style="color: blue;"&gt;in&lt;/span&gt; _bankAccountSplitter.Split(bankAccount))&lt;br /&gt;    {&lt;br /&gt;&lt;span style="color: blue;"&gt;      if&lt;/span&gt; (digit == &lt;span style="color: #a31515;"&gt;" _ | ||_|"&lt;/span&gt;)&lt;br /&gt;      {&lt;br /&gt;        bankAccountNumber.Append(&lt;span style="color: #a31515;"&gt;"0"&lt;/span&gt;);&lt;br /&gt;      }&lt;br /&gt;&lt;span style="color: blue;"&gt;      else&lt;/span&gt;&lt;br /&gt;      {&lt;br /&gt;        bankAccountNumber.Append(&lt;span style="color: #a31515;"&gt;"1"&lt;/span&gt;);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;    return&lt;/span&gt; bankAccountNumber.ToString();&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;/pre&gt;Tests so far: &lt;br /&gt;&lt;pre&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;TestFixture&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParserTests&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  private&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt; _target;&lt;br /&gt;&lt;span style="color: blue;"&gt;  private&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt; _bankAccountSplitter;&lt;br /&gt;&lt;br /&gt;  [&lt;span style="color: #2b91af;"&gt;SetUp&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Setup()&lt;br /&gt;  {&lt;br /&gt;    _bankAccountSplitter = &lt;span style="color: #2b91af;"&gt;MockRepository&lt;/span&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt;&amp;gt;();&lt;br /&gt;    _target = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(_bankAccountSplitter);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Ctor_ObjectIsNotNull()&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;    Assert&lt;/span&gt;.IsNotNull(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(_bankAccountSplitter,&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;MockRepository&lt;/span&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt;&amp;gt;()));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Ctor_BankAccountSplitterIsNull_ThrowArgumentNullException()&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;    Assert&lt;/span&gt;.Throws&amp;lt;&lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;&amp;gt;(() =&amp;gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(&lt;span style="color: blue;"&gt;null&lt;/span&gt;));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Parse_Null_ThrowsArgumentNullException()&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;    Assert&lt;/span&gt;.Throws&amp;lt;&lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;&amp;gt;(() =&amp;gt; _target.Parse(&lt;span style="color: blue;"&gt;null&lt;/span&gt;));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Parse_Zeros()&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: blue;"&gt;    var&lt;/span&gt; zeros = &lt;span style="color: #a31515;"&gt;" _  _  _  _  _  _  _  _  _ \n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;                "| || || || || || || || || |\n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;                "|_||_||_||_||_||_||_||_||_|\n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;                "                           \n"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    _bankAccountSplitter.Stub(x =&amp;gt; x.Split(zeros)).Return(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;String&lt;/span&gt;&amp;gt;&lt;br /&gt;    {&lt;br /&gt;&lt;span style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;    var&lt;/span&gt; actual = _target.Parse(zeros);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;    Assert&lt;/span&gt;.That(actual, &lt;span style="color: #2b91af;"&gt;Is&lt;/span&gt;.EqualTo(&lt;span style="color: #a31515;"&gt;"000000000"&lt;/span&gt;));&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  [&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;  public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Parse_AOneAndZeros()&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: blue;"&gt;    var&lt;/span&gt; oneAndZeros = &lt;span style="color: #a31515;"&gt;"    _  _  _  _  _  _  _  _ \n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;                      "  || || || || || || || || |\n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;                      "  ||_||_||_||_||_||_||_||_|\n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;                      "                           \n"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    _bankAccountSplitter.Stub(x =&amp;gt; x.Split(oneAndZeros)).Return(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;String&lt;/span&gt;&amp;gt;&lt;br /&gt;    {&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      "     |  |"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;      " _ | ||_|"&lt;/span&gt;&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;    var&lt;/span&gt; actual = _target.Parse(oneAndZeros);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;    Assert&lt;/span&gt;.That(actual, &lt;span style="color: #2b91af;"&gt;Is&lt;/span&gt;.EqualTo(&lt;span style="color: #a31515;"&gt;"100000000"&lt;/span&gt;));&lt;br /&gt;  }&lt;br /&gt;}&lt;/pre&gt;&lt;/pre&gt;Now I would like to introduce a DigitParser-class which should parse one digit and return a 1-string-representation of it. Therefore, I introduce the interface for it:&lt;br /&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;interface&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  string&lt;/span&gt; Parse(&lt;span style="color: blue;"&gt;string&lt;/span&gt; bankAccountDigit);&lt;br /&gt;}&lt;/pre&gt;&lt;div&gt;Next, I need to inject it into the target. To do that, I take the easiest test and rewrite it using the new interface:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Ctor_ObjectIsNotNull()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;  Assert&lt;/span&gt;.IsNotNull(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(_bankAccountSplitter,&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;&lt;b&gt;                                         MockRepository&lt;/b&gt;&lt;/span&gt;&lt;b&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt;&amp;gt;()&lt;/b&gt;));&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;To make it green, just complete the constructor:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; BankAccountParser(&lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt; bankAccountSplitter&lt;b&gt;, &lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt; digitParser&lt;/b&gt;)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  if&lt;/span&gt; (bankAccountSplitter == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: blue;"&gt;    throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"bankAccountSplitter"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;  _bankAccountSplitter = bankAccountSplitter;&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This makes all other tests red because they do not compile anymore. So, alter the setup-method&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;SetUp&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Setup()&lt;br /&gt;{&lt;br /&gt;  _bankAccountSplitter = &lt;span style="color: #2b91af;"&gt;MockRepository&lt;/span&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;b&gt;  _digitParser = &lt;span style="color: #2b91af;"&gt;MockRepository&lt;/span&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt;&amp;gt;();&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;  _target = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(_bankAccountSplitter&lt;b&gt;, _digitParser&lt;/b&gt;);&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;and one test:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Ctor_BankAccountSplitterIsNull_ThrowArgumentNullException()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;  Assert&lt;/span&gt;.Throws&amp;lt;&lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;&amp;gt;(() =&amp;gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;    new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(&lt;span style="color: blue;"&gt;null&lt;/span&gt;&lt;b&gt;, &lt;span style="color: #2b91af;"&gt;MockRepository&lt;/span&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt;&amp;gt;()&lt;/b&gt;));&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, serif; font-size: 16px; white-space: normal;"&gt;We're green again and ready for a next test: Assert that when passing in a null-DigitParser, an ArgumentNullException will be thrown.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, serif; font-size: 16px; white-space: normal;"&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Ctor_DigitParserIsNull_ThrowArgumentNullException()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;  Assert&lt;/span&gt;.Throws&amp;lt;&lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;&amp;gt;(() =&amp;gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;    new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(_bankAccountSplitter, &lt;span style="color: blue;"&gt;null&lt;/span&gt;));&lt;br /&gt;}&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div&gt;This test is red and becomes green with following code:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; BankAccountParser(&lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt; bankAccountSplitter, &lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt; digitParser)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  if&lt;/span&gt; (bankAccountSplitter == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: blue;"&gt;    throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"bankAccountSplitter"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;  if&lt;/b&gt;&lt;/span&gt;&lt;b&gt; (digitParser == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;&lt;span style="color: blue;"&gt;    throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"digitParser"&lt;/span&gt;);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;  _bankAccountSplitter = bankAccountSplitter;&lt;br /&gt;&lt;b&gt;  _digitParser = digitParser;&lt;/b&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Now comes an interesting step, because we insert an hint into one test how to refactor the sut:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Parse_Zeros()&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  var&lt;/span&gt; zeros = &lt;span style="color: #a31515;"&gt;" _  _  _  _  _  _  _  _  _ \n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;              "| || || || || || || || || |\n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;              "|_||_||_||_||_||_||_||_||_|\n"&lt;/span&gt; +&lt;br /&gt;&lt;span style="color: #a31515;"&gt;              "                           \n"&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;  _bankAccountSplitter.Stub(x =&amp;gt; x.Split(zeros)).Return(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;&lt;br /&gt;  {&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;    " _ | ||_|"&lt;/span&gt;,&lt;br /&gt;  });&lt;br /&gt;&lt;b&gt;  _digitParser.Stub(x =&amp;gt; x.Parse(&lt;span style="color: #a31515;"&gt;" _ | ||_|"&lt;/span&gt;)).Return(&lt;span style="color: #a31515;"&gt;"0"&lt;/span&gt;);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  var&lt;/span&gt; actual = _target.Parse(zeros);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;  Assert&lt;/span&gt;.That(actual, &lt;span style="color: #2b91af;"&gt;Is&lt;/span&gt;.EqualTo(&lt;span style="color: #a31515;"&gt;"000000000"&lt;/span&gt;));&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;All tests are still green, so we're ready to refactor:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Parse(&lt;span style="color: blue;"&gt;string&lt;/span&gt; bankAccount)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  if&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(bankAccount))&lt;br /&gt;&lt;span style="color: blue;"&gt;    throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"bankAccount"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  var&lt;/span&gt; bankAccountNumber = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;StringBuilder&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; digit &lt;span style="color: blue;"&gt;in&lt;/span&gt; _bankAccountSplitter.Split(bankAccount))&lt;br /&gt;  {&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;b&gt;    if&lt;/b&gt;&lt;/span&gt;&lt;b&gt; (!&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(_digitParser.Parse(digit)))&lt;br /&gt;    {&lt;br /&gt;      bankAccountNumber.Append(_digitParser.Parse(digit));&lt;br /&gt;    }&lt;br /&gt;&lt;span style="color: blue;"&gt;    else&lt;/span&gt;&lt;br /&gt;    {&lt;/b&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;      if&lt;/span&gt; (digit == &lt;span style="color: #a31515;"&gt;" _ | ||_|"&lt;/span&gt;)&lt;br /&gt;      {&lt;br /&gt;        bankAccountNumber.Append(&lt;span style="color: #a31515;"&gt;"0"&lt;/span&gt;);&lt;br /&gt;      }&lt;br /&gt;&lt;span style="color: blue;"&gt;      else&lt;/span&gt;&lt;br /&gt;      {&lt;br /&gt;        bankAccountNumber.Append(&lt;span style="color: #a31515;"&gt;"1"&lt;/span&gt;);&lt;br /&gt;      }&lt;br /&gt;&lt;b&gt;    }&lt;/b&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  return&lt;/span&gt; bankAccountNumber.ToString();&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Great, but this can be rewritten easier:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Parse(&lt;span style="color: blue;"&gt;string&lt;/span&gt; bankAccount)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  if&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(bankAccount))&lt;br /&gt;&lt;span style="color: blue;"&gt;    throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"bankAccount"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  var&lt;/span&gt; bankAccountNumber = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;StringBuilder&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; digit &lt;span style="color: blue;"&gt;in&lt;/span&gt; _bankAccountSplitter.Split(bankAccount))&lt;br /&gt;  {&lt;br /&gt;&lt;b&gt;    bankAccountNumber.Append(&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(_digitParser.Parse(digit)) ?&lt;br /&gt;&lt;span style="color: #a31515;"&gt;      "1"&lt;/span&gt; :&lt;br /&gt;      _digitParser.Parse(digit));&lt;/b&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  return&lt;/span&gt; bankAccountNumber.ToString();&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;But now, the last test is red. We haven't stubbed the DigitParser there yet. To do this, I move the stubbing into the setup-method and also add the canned answer needed for the last test:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;SetUp&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Setup()&lt;br /&gt;{&lt;br /&gt;  _bankAccountSplitter = &lt;span style="color: #2b91af;"&gt;MockRepository&lt;/span&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IBankAccountSplitter&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;br /&gt;  _digitParser = &lt;span style="color: #2b91af;"&gt;MockRepository&lt;/span&gt;.GenerateStub&amp;lt;&lt;span style="color: #2b91af;"&gt;IDigitParser&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;b&gt;  _digitParser.Stub(x =&amp;gt; x.Parse(&lt;span style="color: #a31515;"&gt;" _ | ||_|"&lt;/span&gt;)).Return(&lt;span style="color: #a31515;"&gt;"0"&lt;/span&gt;);&lt;br /&gt;  _digitParser.Stub(x =&amp;gt; x.Parse(&lt;span style="color: #a31515;"&gt;"     |  |"&lt;/span&gt;)).Return(&lt;span style="color: #a31515;"&gt;"1"&lt;/span&gt;);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;  _target = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;BankAccountParser&lt;/span&gt;(_bankAccountSplitter, _digitParser);&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;Prepared like this, we tweak the production code a last time ending with&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;string&lt;/span&gt; Parse(&lt;span style="color: blue;"&gt;string&lt;/span&gt; bankAccount)&lt;br /&gt;{&lt;br /&gt;&lt;span style="color: blue;"&gt;  if&lt;/span&gt; (&lt;span style="color: blue;"&gt;string&lt;/span&gt;.IsNullOrEmpty(bankAccount))&lt;br /&gt;&lt;span style="color: blue;"&gt;    throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentNullException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"bankAccount"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  var&lt;/span&gt; bankAccountNumber = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;StringBuilder&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  foreach&lt;/span&gt; (&lt;span style="color: blue;"&gt;var&lt;/span&gt; digit &lt;span style="color: blue;"&gt;in&lt;/span&gt; _bankAccountSplitter.Split(bankAccount))&lt;br /&gt;  {&lt;br /&gt;&lt;b&gt;    bankAccountNumber.Append( _digitParser.Parse(digit));&lt;/b&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  return&lt;/span&gt; bankAccountNumber.ToString();&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;But this is not the end for the tests. Actually, we're just testing if the BankAccountSplitter and the DigitParser are working together correctly. So, instead of the last two tests, we should write:&lt;/div&gt;&lt;div&gt;&lt;pre style="font-family: consolas;"&gt;[&lt;span style="color: #2b91af;"&gt;Test&lt;/span&gt;]&lt;br /&gt;&lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; Parse_SplittedInto2Digits_ConcatenateDigits()&lt;br /&gt;{&lt;br /&gt;  _bankAccountSplitter.Stub(x =&amp;gt; x.Split(&lt;span style="color: blue;"&gt;null&lt;/span&gt;)).&lt;br /&gt;    IgnoreArguments().&lt;br /&gt;    Return(&lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;&lt;br /&gt;    {&lt;br /&gt;&lt;span style="color: #a31515;"&gt;      "foo"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: #a31515;"&gt;      "bar"&lt;/span&gt;&lt;br /&gt;    });&lt;br /&gt;&lt;br /&gt;  _digitParser.Stub(x =&amp;gt; x.Parse(&lt;span style="color: #a31515;"&gt;"foo"&lt;/span&gt;)).Return(&lt;span style="color: #a31515;"&gt;"a"&lt;/span&gt;);&lt;br /&gt;  _digitParser.Stub(x =&amp;gt; x.Parse(&lt;span style="color: #a31515;"&gt;"bar"&lt;/span&gt;)).Return(&lt;span style="color: #a31515;"&gt;"b"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;  var&lt;/span&gt; actual = _target.Parse(&lt;span style="color: #a31515;"&gt;"nonrelevant"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #2b91af;"&gt;  Assert&lt;/span&gt;.That(actual, &lt;span style="color: #2b91af;"&gt;Is&lt;/span&gt;.EqualTo(&lt;span style="color: #a31515;"&gt;"ab"&lt;/span&gt;));&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;This points us to some more tests, I had forgotten initially like what happens when the DigitParser returns null or throws an error? What if the BankAccountSplitter has this behavior?&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This scales pretty well to "real life" code and as said before, the training with this kata has helped me recognize this pattern during my work and the usefulness of it.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-8424268625487274042?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/8424268625487274042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2010/09/training-big-refactorings-with-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8424268625487274042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8424268625487274042'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2010/09/training-big-refactorings-with-code.html' title='Training big refactorings with code katas'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5025710179801373036</id><published>2010-10-07T15:24:00.010+02:00</published><updated>2010-11-14T12:35:04.000+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='Code kata'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Coding Dojo Helper'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>Coding dojo helper - Mortal Kombat Edition</title><content type='html'>&lt;div style="text-align: left;"&gt;A colleague of mine told us that really good developers could do a red-green-refactor-circle in about 90 seconds. This sounds quite fast, but I thought that maybe one day we could achieve that... To help getting a feeling for the time spend doing such a circle, I wrote a tool. This tool should take the time of each developer doing a round and calculate the average time of a complete timebox used for a kata, for instance.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/TK4VeX0uNHI/AAAAAAAADKY/li5GduVrw0w/s1600/blendaudacitygimp.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5525377404365583474" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/TK4VeX0uNHI/AAAAAAAADKY/li5GduVrw0w/s320/blendaudacitygimp.png" style="cursor: pointer; display: left; height: 210px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 210px;" /&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Learned new tools :)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As a kata originally comes from martial arts, the tool got a touch of the famous video game Mortal Kombat ^^ For development, I used &lt;a href="http://www.microsoft.com/expression/products/Blend_Overview.aspx"&gt;Blend&lt;/a&gt;, &lt;a href="http://www.gimp.org/"&gt;Gimp &lt;/a&gt;and &lt;a href="http://audacity.sourceforge.net/"&gt;Audacity &lt;/a&gt;to do the design and learned some new tricks. For example, one can draw an ellipse with Blend and select Object --&amp;gt; Path to convert it into an animation path. This path can be used in a storyboard to make a button go round another control for example:&lt;/div&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/TK3LxudGYkI/AAAAAAAADKI/xfM8-lnnZaQ/s1600/DojoView.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5525296372997579330" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/TK3LxudGYkI/AAAAAAAADKI/xfM8-lnnZaQ/s320/DojoView.png" style="cursor: pointer; display: block; height: 254px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 0px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;The second thing I've learned is to capture keystrokes even if the window isn't active. &lt;a href="http://blogs.msdn.com/b/toub/archive/2006/05/03/589423.aspx"&gt;This article&lt;/a&gt; of Stephen Toub has shown me how to do that. So, if the user presses the Scroll&lt;scroll&gt;-Button, the stopwatch starts. If he has finished his work, he presses the Scroll&lt;scroll&gt;-Button again and the next developer begins to code. At the end of the timebox, one presses the Pause&lt;pause&gt;-Button and the screen changes to show the average TDD-time and a chart listing all times:&lt;/pause&gt;&lt;/scroll&gt;&lt;/scroll&gt;&lt;/div&gt;&lt;a href="http://3.bp.blogspot.com/_w-DCOVT1BMQ/TK3Md-bo5pI/AAAAAAAADKQ/040F11RV62Y/s1600/DigestView.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5525297133200664210" src="http://3.bp.blogspot.com/_w-DCOVT1BMQ/TK3Md-bo5pI/AAAAAAAADKQ/040F11RV62Y/s320/DigestView.png" style="cursor: hand; cursor: pointer; display: block; height: 240px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;Neat, he? This is also the first time I used a &lt;a href="http://en.wikipedia.org/wiki/Distributed_Concurrent_Versions_System"&gt;DCVS&lt;/a&gt;.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_w-DCOVT1BMQ/TK4b8sqgQ5I/AAAAAAAADKg/Lw12eBrxZbM/s1600/hgtortoisekiln.png"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5525384522425713554" src="http://3.bp.blogspot.com/_w-DCOVT1BMQ/TK4b8sqgQ5I/AAAAAAAADKg/Lw12eBrxZbM/s320/hgtortoisekiln.png" style="cursor: pointer; float: left; height: 87px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; margin-top: 0px; width: 99px;" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first attempt was to use &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt;&lt;span class="Apple-style-span"&gt;, &lt;/span&gt;&lt;a href="http://www.blogger.com/github.com"&gt;GitHub &lt;/a&gt;&lt;span class="Apple-style-span"&gt;and &lt;/span&gt;&lt;a href="http://code.google.com/p/tortoisegit/"&gt;TortoiseGIT&lt;/a&gt; as mediator. But as I'm developing this on a company-laptop during my ride home, there were &lt;a href="http://help.github.com/firewalls-and-proxies/"&gt;some difficulties&lt;/a&gt; accessing GitHub and I abandoned this quite fast (I do think there are ways to circumvent this, but I hadn't got the nerves to look for them any further). So I tried &lt;a href="http://mercurial.selenic.com/"&gt;Mercurial&lt;/a&gt;&lt;span class="Apple-style-span"&gt;, &lt;/span&gt;&lt;a href="https://shop.fogcreek.com/Kiln/?sCategory=HOSTEDFB&amp;amp;sStep=stepEnterEmailAddress&amp;amp;HFBnForm=1"&gt;Kiln &lt;/a&gt;&lt;span class="Apple-style-span"&gt;and &lt;/span&gt;&lt;a href="http://tortoisehg.bitbucket.org/"&gt;TortoiseHg&lt;/a&gt; and it worked like a charm. If you want, you can fetch the sourcecode at &lt;a href="http://codingdojo.kilnhg.com/"&gt;codingdojo.kilnhg.com&lt;/a&gt;&lt;span class="Apple-style-span"&gt; &lt;/span&gt;and have a try for yourself if you can master the red-green-refactor-mantra in under 90 seconds. On our first try, we set the alarm to a moderate 3-min-timeout, but did a 4:30 min in average *ouch*. Next time, we'll use a 4-min-timeout and are keen to beat that :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5025710179801373036?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5025710179801373036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2010/10/coding-dojo-helper-mortal-kombat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5025710179801373036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5025710179801373036'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2010/10/coding-dojo-helper-mortal-kombat.html' title='Coding dojo helper - Mortal Kombat Edition'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_w-DCOVT1BMQ/TK4VeX0uNHI/AAAAAAAADKY/li5GduVrw0w/s72-c/blendaudacitygimp.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-3144382102997598822</id><published>2010-09-26T08:03:00.020+02:00</published><updated>2010-10-02T23:35:03.683+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='Code kata'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>Coding dojos</title><content type='html'>At work, we do weekly &lt;a href="http://www.blogger.com/codingdojo.org"&gt;coding dojos&lt;/a&gt; since 2 1/2 months now - and it's great!&lt;div&gt;Every thursday at 11am we meet in front of a computer and start a 1h-timeboxed session. This session consists of 3 parts: discuss kata, code, retrospective.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Discuss kata&lt;/div&gt;&lt;div&gt;First, we decide which kata to start with. If we haven't finished the kata from the week before, we throw away the results and start again from scratch including finding a common interpretation of the requirements (e.g. does an account number consist of 3 or 4 lines). Throwing away the work you have already done is not painful at all. Actually, it is necessary to improve yourself. Seeing direct improvements (e.g. completing a part of the kata which was never touched the week before) is priceless!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This part should be as long as necessary but as short as possible. At the moment, we need more than 10 minutes before writing our first test. I think we can cut that into halves in the coming weeks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Code&lt;/div&gt;&lt;div&gt;&lt;div&gt;At the moment, we work on the &lt;a href="http://codingdojo.org/cgi-bin/wiki.pl?KataBankOCR"&gt;Bank OCR&lt;/a&gt;-kata and haven't finished the first user story yet. Before this kata, we successfully finished the katas &lt;a href="http://katas.softwarecraftsmanship.org/?p=71"&gt;Prime Factors&lt;/a&gt; and &lt;a href="http://codingdojo.org/cgi-bin/wiki.pl?KataRomanNumerals"&gt;Roman Numerals&lt;/a&gt; *proud*. We do the katas (as well as our actual real-code-pair-programming) in a &lt;a href="http://www.gmbsg.com/dotnet-coding-dojo/modes/"&gt;flow-Randori system&lt;/a&gt;:&lt;br /&gt;The first person to be on the keyboard creates the test-project and writes the first test. After that, we play a round of musical chairs and the next developer solves the test. When it's green, he has the chance to refactor the code using baby-steps. Having finished the refactoring, all he has to do now is to write the next test and initiate the next round of musical chairs (which doesn't necessarily needs music to play in the background).&lt;br /&gt;I think doing this kind of system is perfect when you're 4-6 people. Are there more than that, you would probably more likely do the prepari system. But being 10+ developers, I would rather split the group into two halves than having one big group where not everyone can participate.&lt;br /&gt;&lt;br /&gt;Retrospective&lt;br /&gt;About 5 minutes before the deadline, we begin the retrospective and try to find out what was good or what can be better next time. Right now, we're far away from a fast TDD-circle: approximately 5 minutes lasts a red-green-refactor-mantra, which surely can be lowered to 2 minutes.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my opinion, every company writing software should have a regular coding dojo in the calendar. It helps enormously to spread a common coding style. Everyone learns from everyone, be it new keyboard-shortcuts (&lt;crtl&gt;-&lt;w&gt; is my newest) or amazing tools like &lt;a href="http://www.jetbrains.com/resharper/"&gt;R#&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/de-de/vstudio/bb980963.aspx"&gt;Visual Studio Power Tools&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;With coding dojos, it is easy to integrate new team members and guide them in learning TDD. All in all, I highly recommend that!&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-3144382102997598822?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/3144382102997598822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2010/09/coding-dojos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/3144382102997598822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/3144382102997598822'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2010/09/coding-dojos.html' title='Coding dojos'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-660109185103592981</id><published>2010-06-13T10:33:00.003+02:00</published><updated>2010-06-13T12:16:45.215+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><title type='text'>Prism is witchery</title><content type='html'>For my newest project, I wanted to use &lt;a href="http://compositewpf.codeplex.com/"&gt;Prism&lt;/a&gt; to guide us writing a decoupled WPF-application. I started investigating it and was quickly amazed about the module-approach. In our former WinForms-project, we didn't used a framework to guide us building a nice architecture, but developed our own clsForms-class (at that time even with hungarian notation *awkward*) and used even IPC to communicate across process-boundaries.&lt;br /&gt;&lt;br /&gt;I began writing the framework for the new project with heavy guidance of Prism (RegionManager, EventAggregator, DelegateCommands and CommandBehaviors). In the end, we had some modules building a master-detail view with database-access. This was the time when other coworkers started to complain that the architecture is way too complex for such a small application as it is today. We started to discuss how to simplify it and at the end we had a draw in our opinions: some people wanted to keep everything (me included *g*) and some wanted to strip it down to remove Prism, to abolish dependency injection and the IoC container Unity. Our boss had to decide it and spoke to us: "thou shalt remove Prism but keep DI for a better TDD").&lt;br /&gt;&lt;br /&gt;The top-3 reasons why Prism is evil for us* are:&lt;br /&gt;(*) i.e. not for me&lt;br /&gt;&lt;br /&gt;3) Using the app.config for setting up the modules is error-prone and not type-safe.&lt;br /&gt;I told them that we could do it in code also but somehow I got not heared :/&lt;br /&gt;&lt;br /&gt;2) Debugging is too hard.&lt;br /&gt;When you get an exception in a view which will be inserted into a region, you got this Prism-Exception telling you that there was a problem resolving this module for that region. I learned here that you cannot expect everyone to look at inner-exceptions (admittedly mostly at level &gt;5)...&lt;br /&gt;&lt;br /&gt;1) Top reason why Prism is evil: it is too intransparent how the regions get filled (witchery *hooo*).&lt;br /&gt;What can I say? For sure, you have to look at the good documentation at their homepage to get the hang of it. Else it's witchery, yes.&lt;br /&gt;&lt;br /&gt;So we burned it and removed it from our solution with 10+ modules and about 10,000 loc. We needed 5 hours to remove the lightweight Prism-sections completely and substitute it with our own RegionManager-approach (which is basically the same) and with our own DelegateCommand-approach (wich is basically the same) and without the help for commanding of Prism (we now use code-behind to execute the commands). Ah yes, and we copied the EventAggregator out of the Prism-sourcecode and use it now, because our approach would be basically the same...&lt;br /&gt;&lt;br /&gt;Everyone feels better now that the evil is being distroyed.&lt;br /&gt;&lt;br /&gt;What was the problem? We're using a whole bunch of new technologies and paradigms in this project (WPF is new to us, as Entity framework, WCF, Prism, TestDrivenDevelopment and dependency injection). This means a lot to learn and sooner or later, your retentiveness is exhausted. This meant to sacrifice a pawn, in this case it was Prism.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-660109185103592981?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/660109185103592981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2010/06/prism-is-witchery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/660109185103592981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/660109185103592981'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2010/06/prism-is-witchery.html' title='Prism is witchery'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-2488778745032687995</id><published>2009-12-08T16:48:00.003+01:00</published><updated>2009-12-08T17:15:37.389+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code kata'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Another book, another kata</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://pragprog.com/images/covers/original/utc2.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 160px;" src="http://pragprog.com/images/covers/original/utc2.jpg" border="0" alt="" /&gt;&lt;/a&gt;This unit testing book by Andrew Hunt and David Thomas is better than the last one, but I made the mistake? to start reading The art of unit testing in parallel (when I've finished that book, a review will be posted as well). So, nothing bad about the pragmatic book, but nothing good either. It covers NUnit (already with "That") and only strives mock-frameworks. There are a plenty of tips how to write good unit tests, among them mnemonics like "Right BICEP", "A TRIP" and "CORRECT". There is even a Pragmatic unit testing summary in checkbox-format. As if I'll go through all the rules after writing a test *lol*&lt;div&gt;All in all, a good book - but I'm looking forward to "the art".&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Staying by Dave Thomas, I've done his &lt;a href="http://codekata.pragprog.com/2007/01/kata_six_anagra.html"&gt;sixth kata "anagrams"&lt;/a&gt; a few times and I always learned a new shortcut, trick or whatever. I rarely use the mouse anymore and I've downloaded ReSharper (because we're using NUnit instead of MSTest now) and took benefit from the smooth integration of the refactorings. DevXpress had to go unfortunately.&lt;/p&gt;&lt;p&gt;&lt;a href="http://vimeo.com/5873014"&gt;Here&lt;/a&gt;, I've found a nice introductory-video in the principles of coding katas, if you're interested.&lt;/p&gt;&lt;p&gt;&lt;a href="http://vimeo.com/2499540"&gt;Here&lt;/a&gt; is a video about the randori-variation.&lt;/p&gt;&lt;p&gt;Uncle Bob takes this approach a step further and declares coding kata as an art. See him performing the prime factor kata to music! &lt;a href="http://katas.softwarecraftsmanship.org/?p=71"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-2488778745032687995?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/2488778745032687995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/12/another-book-another-kata.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2488778745032687995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2488778745032687995'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/12/another-book-another-kata.html' title='Another book, another kata'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-1873367951057998002</id><published>2009-11-26T19:40:00.003+01:00</published><updated>2009-11-26T19:54:02.584+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><title type='text'>Code katas</title><content type='html'>I just finished my first &lt;a href="http://www.codekata.com/"&gt;code kata&lt;/a&gt; :) I did &lt;a href="http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz"&gt;FizzBuzz&lt;/a&gt;, a very easy one just to get started. I wrote the last code-bit for the last test to past in a quarter of an hour. Therefore, I continued with "stage 2" of the kata.&lt;div&gt;I wanted to make it easy to extend and got lost half the way :( There was a point where I refactored too much without unit testing. This was bad because the bigger the steps the more likely it is you have to go a step backwards.&lt;/div&gt;&lt;div&gt;Luckily, I got my act together and accomplished my plan. The rest was fine and all tests passed.&lt;/div&gt;&lt;div&gt;On a second try, my goal is to don't use the debugger anymore (I needed it twice) and take baby steps.&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-1873367951057998002?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/1873367951057998002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/11/code-katas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/1873367951057998002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/1873367951057998002'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/11/code-katas.html' title='Code katas'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-1902211655029051894</id><published>2009-11-18T09:18:00.005+01:00</published><updated>2009-11-19T09:25:45.381+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='PDC'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>PDC 2009</title><content type='html'>It's &lt;a href="http://microsoftpdc.com/"&gt;PDC&lt;/a&gt; again! Yesterday, I watched the opening-keynote. They spoke about the cloud and the new Visual Studio and how they can interact. A database store, codename Dallas, was shown which tries to unite data from all over the world - surely nice to play around with.&lt;div&gt;About half the time, when talking about the cloud, they showed this list:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1970s: Mainframe&lt;/div&gt;&lt;div&gt;1980s: Client-Server&lt;/div&gt;&lt;div&gt;1990s: Web&lt;/div&gt;&lt;div&gt;2000s: SOA&lt;/div&gt;&lt;div&gt;2010+: Cloud&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We're just working on to get to the 90s, great...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One new feature of VS2010 is intelliTrace, which is a history of the program running via the debugger. I hope we switch to VS2010 soon, because that sounds interesting.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Last year, a lot of sessions were recorded and put online. I hope they'll do it this year alike. Nevertheless, don't forget to watch the second keynote today (17:30 CET) at the website with Scott Guthrie.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;--------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The second keynote was great! Silverlight 4 beta available now! With trusted mode!! File system access!!! *download*&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-1902211655029051894?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/1902211655029051894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/11/pdc-2009.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/1902211655029051894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/1902211655029051894'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/11/pdc-2009.html' title='PDC 2009'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-227278140871787870</id><published>2009-11-16T09:10:00.008+01:00</published><updated>2009-11-16T13:17:17.532+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Test-Driving</title><content type='html'>The plan is to do a 2-week-bootcamp right before christmas to learn / get experience with test driven development (TDD). I already tried to practice it and I must say that it's hard. Though writing tests before you implement feels natural (I somewhere read "developing without testing is like driving a car without fastening your seatbelt"), it is so much contradictory to what I'm used to develop (test last development; if tests at all). Because of that I looked for some help in books.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.manning.com/koskela/koskela_cover150.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 150px; height: 183px;" src="http://www.manning.com/koskela/koskela_cover150.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;From the first one I only read two chapters online: &lt;a href="http://www.amazon.com/Test-Driven-Practical-Acceptance-Developers/dp/1932394850"&gt;Test Driven: Practical TDD and Acceptance TDD for Java Developers&lt;/a&gt; by Lasse Koskela. You can find the chapters &lt;a href="http://www.manning.com/koskela/"&gt;here&lt;/a&gt;. As I'm a .NET-developer, a Java-book is not worth purchasing, I think. However, I mention this book because these two chapters are really good. The first one is about beginning TDD. This is the usual stuff about red, green, refactor by example. The second chapter is the one that enlightend me. It talks about how to integrate the testing in the development-process (eXtreme Programming, that is) with acceptance TDD. The following picture is from Lasse's book and opened my eyes. Never before was the test-integration so clear to me. This is the only way how a developer will write good tests: write an acceptance test and make it green via several unit test driven development-cycles.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_w-DCOVT1BMQ/SwEiA_JsOcI/AAAAAAAAAH8/IniKnKSLei4/s1600/Acceptance+TDD.png"&gt;&lt;img style="float:nonet; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 229px;" src="http://3.bp.blogspot.com/_w-DCOVT1BMQ/SwEiA_JsOcI/AAAAAAAAAH8/IniKnKSLei4/s320/Acceptance+TDD.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5404638428168731074" /&gt;&lt;/a&gt;&lt;div&gt;The other chapters sound interesting - maybe I'll find this book in a library.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.microsoft.com/Learning/Images/Books/Imgt/9780735619487F.gif"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 130px; height: 130px;" src="http://www.microsoft.com/Learning/Images/Books/Imgt/9780735619487F.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;a href="http://www.amazon.com/Test-Driven-Development-Microsoft-NET-Professional/dp/0735619484/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1258371722&amp;amp;sr=1-1"&gt;Test-Driven Development in Microsoft .NET&lt;/a&gt; by James W. Newkirk and Alexei A. Vorontsov is the other book I recently read. I got this book from my good friend Uwe (*winkeWinke*). This book has a foreword by Kent Beck - so this has to be good, I thought. But actually: it isn't :( The first three chapters are OK - the standard-introduction section. Then, the book tries to write a whole example-application with TDD. I must admit, this is courageous - but it fails. I don't think that someone will work through all this code in order to understand how to test a database, a web-service, a web-client, etc. At the end, all tests are more or less the same. I think it is more helpful to learn TDD with your own little project than with this book. By the way, the technology used (ADO.NET instead of Entitiy Framework, ASP.NET Web Service instead of WCF, ASP.NET instead of Silverlight!?) is old...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-227278140871787870?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/227278140871787870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/11/test-driving.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/227278140871787870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/227278140871787870'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/11/test-driving.html' title='Test-Driving'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_w-DCOVT1BMQ/SwEiA_JsOcI/AAAAAAAAAH8/IniKnKSLei4/s72-c/Acceptance+TDD.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-149805058103062354</id><published>2009-11-03T09:10:00.012+01:00</published><updated>2009-11-11T09:20:07.025+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><category scheme='http://www.blogger.com/atom/ns#' term='Scrum'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>2 agile books and one IOException</title><content type='html'>I just finished 2 books about agile development: &lt;a href="http://www.amazon.de/User-Stories-Applied-Development-Signature/dp/0321205685/ref=sr_1_1?ie=UTF8&amp;amp;s=books-intl-de&amp;amp;qid=1257235838&amp;amp;sr=8-1"&gt;User Stories Applied&lt;/a&gt; by Mike Cohn and &lt;a href="http://www.amazon.de/Scrum-Trenches-Enterprise-Software-Development/dp/1430322640/ref=sr_1_1?ie=UTF8&amp;amp;s=books-intl-de&amp;amp;qid=1257235929&amp;amp;sr=1-1"&gt;Scrum and XP from the trenches&lt;/a&gt; by Henrik Kniberg.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://ecx.images-amazon.com/images/I/519UBiB%2BqqL._SS500_.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 160px;" src="http://ecx.images-amazon.com/images/I/519UBiB%2BqqL._SS500_.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Mike Cohn covers all about user stories. As we're just beginning Scrum with a new project, we will be doing a story writing workshop with some business people. So, &lt;a href="http://www.amazon.de/User-Stories-Applied-Development-Signature/dp/0321205685/ref=sr_1_1?ie=UTF8&amp;amp;s=books-intl-de&amp;amp;qid=1257235838&amp;amp;sr=8-1"&gt;User Stories Applied&lt;/a&gt; is probably the right book for that.&lt;/div&gt;&lt;div&gt;After not much blabla and good tips, page 49 describes what to do in such a workshop. He suggests to find the top epic stories and break each down. Page 182pp shows the place of a workshop within the path to begin programming:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) Perform user role modeling&lt;/div&gt;&lt;div&gt;2) Trawl for high-level user stories &lt;-- Start workshop&lt;/div&gt;&lt;div&gt;3) Prioritize stories&lt;/div&gt;&lt;div&gt;4) Refine high- and medium-priority stories&lt;/div&gt;&lt;div&gt;5) Organize stories into groups&lt;/div&gt;&lt;div&gt;6) Create a paper prototype &lt;-- great if we'll reach that in the workshop&lt;/div&gt;&lt;div&gt;7) Refine the prototype&lt;/div&gt;&lt;div&gt;8) Start programming&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I think the hardest thing is to gather the top 25 epics. This will be difficult with people discussing each and every detail don't focusing at the higher level. But as this will be the first workshop, we can still learn if things go astray :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's a passage I liked (about 'why user stories'):&lt;/div&gt;&lt;div&gt;"Humans used to have such a marvelous oral tradition; myths and history were passed orally from one generation to the next. Until an Athenian ruler started writing down Homer's The Iliad so that it would not be forgotten, stories like Homer's were told, not read. Our memories must have been a lot better back then and must have started to fade sometime in the 1970s because by then we could no longer remember even short statements like "The system shall prompt the user for a login name and password." So, we started writing them down." (cf. IEEE 830)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, good book, nice to read and great for looking up user-story-things.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://ecx.images-amazon.com/images/I/51qfxlxbl%2BL._SS500_.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 160px;" src="http://ecx.images-amazon.com/images/I/51qfxlxbl%2BL._SS500_.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The second book I finished is &lt;a href="http://www.amazon.de/Scrum-Trenches-Enterprise-Software-Development/dp/1430322640/ref=sr_1_1?ie=UTF8&amp;amp;s=books-intl-de&amp;amp;qid=1257235929&amp;amp;sr=1-1"&gt;Scrum and XP from the trenches&lt;/a&gt; which is a war story on doing scrum. Lots of hands-ons and lessons-learned stuff. Some parts are interesting like how to handle multiple scrum teams but the most part I heard or read already. If you're new to scrum and agile methods, this is amusing to read (like how to negotiate with the PO). If not, you can scroll over it (as I read it as a free eBook).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And now for the IOException. I made some debug-sessions lately and now and then I came across an IOException just reading "the file exists" when calling GetTempFileName. I loaded old, already released code and even with this *cough* high-quality-code the exception will be thrown. Luckily I found &lt;a href="http://paulmaddox.net/2008/12/net-gettempfilename-throws.html"&gt;this blog-post&lt;/a&gt; dealing with the same problem. Just delete some temp-files (approx. 100,000) and everything works fine now :)&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SvAC-scrqAI/AAAAAAAAAH0/Lw9E2Ign3o0/s1600-h/IOException.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 109px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SvAC-scrqAI/AAAAAAAAAH0/Lw9E2Ign3o0/s320/IOException.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5399819229323831298" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-149805058103062354?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/149805058103062354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/11/2-agile-books-and-one-ioexception.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/149805058103062354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/149805058103062354'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/11/2-agile-books-and-one-ioexception.html' title='2 agile books and one IOException'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_w-DCOVT1BMQ/SvAC-scrqAI/AAAAAAAAAH0/Lw9E2Ign3o0/s72-c/IOException.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-8020496210925484225</id><published>2009-10-22T17:39:00.005+02:00</published><updated>2009-10-22T18:01:33.297+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>Sketchflow</title><content type='html'>We're started a project and are now in gather-requirements-phase. I sketched some UI-views for my module and Alex said: great - can you scan them in so we can discuss them with Uwe from Hamburg?&lt;br /&gt;I remembered that I've heard something about Sketchflow which is build into Expression Blend. Sketchflow is a rapid prototyping software which lets you design new UI-sketches very fast. So I surfed to &lt;a href="http://www.microsoft.com/expression/products/Sketchflow_Overview.aspx"&gt;Sketchflow overview&lt;/a&gt; and thought "well, I'll give it a try". So I downloaded Expression Blend 3 and a Starterkit with some neat videos. While installing, I watched the first one and was impressed what you can do with that piece of software: build your UI using predefined toolsets, add navigation to your sketched application and even gather feedback from various persons via a Sketchflow-player.&lt;br /&gt;After 3 and a half hours of work, I sketched all paper-sketches into Sketchflow and showed it to Alex and Reinhard. Gosh, they were impressed. Here are two screenshots:&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_w-DCOVT1BMQ/SuCADjbB6ZI/AAAAAAAAAHM/_xBwznygflw/s1600-h/Prototype1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 195px;" src="http://2.bp.blogspot.com/_w-DCOVT1BMQ/SuCADjbB6ZI/AAAAAAAAAHM/_xBwznygflw/s320/Prototype1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5395453152126429586" /&gt;&lt;/a&gt;This will be the first screen after a import has finished. They suggested to delete the buttons and integrate the navigation into the colored labels.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SuCADwE2OuI/AAAAAAAAAHU/8TE-GWuBT1w/s1600-h/Prototype2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 195px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SuCADwE2OuI/AAAAAAAAAHU/8TE-GWuBT1w/s320/Prototype2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5395453155523050210" /&gt;&lt;/a&gt;This shows how easy it is to create a rich screen in just a few minutes. If you wish, you can even use real data imported into Expression Blend! And best of all: it makes a lot of fun ^^&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-8020496210925484225?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/8020496210925484225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/10/were-started-project-and-are-now-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8020496210925484225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8020496210925484225'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/10/were-started-project-and-are-now-in.html' title='Sketchflow'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_w-DCOVT1BMQ/SuCADjbB6ZI/AAAAAAAAAHM/_xBwznygflw/s72-c/Prototype1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7915943553121251115</id><published>2009-10-12T16:42:00.002+02:00</published><updated>2009-10-12T17:08:31.497+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><title type='text'>Pair Programming</title><content type='html'>Puh, just finished a pair programming-session with Artem. This was hard work!&lt;br /&gt;We started at about 14:00 and wanted to add some unittests for a class Artem wrote. I already reviewed his code, so I knew it quite good. By the way, one result of the review was "where are the unittests?" - so I maneuvered myself in this position. Anyway, good quality-code needs some sacrifices *heroic*&lt;br /&gt;I took the keyboard and Artem the mouse... No, just kidding. He was sitting beside me keeping an eye on my cursor. So we began with the first function and let Visual Studio build a test-stub and an accessor (yes, I love that!) for us. We discussed what to test for this method and I began to write code for it - easy. Not long afterwards, we found the first inconsistency which wasn't visible in the review and in the productive code either. Fixed it and continued. This went on and on, one unittest after the other. We discussed the relevant parts of the code and enhanced a few places.&lt;br /&gt;But as time goes by, I noticed how unconcentrated I was and that I made more and more typos. What a luck that we almost had all unittests we longed for. So we created the rest and finished that session. It was 16:00 and I was exhausted like never before when writing some code.&lt;br /&gt;I must say, that this was hard, but it was worth for it. You can't get such a tight feedback-loop when doing reviews and you can't produce code just by discussing it in a normal meeting. So, pair programming is great but exhausting!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7915943553121251115?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7915943553121251115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/10/pair-programming.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7915943553121251115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7915943553121251115'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/10/pair-programming.html' title='Pair Programming'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-121443024738192587</id><published>2009-09-04T11:26:00.005+02:00</published><updated>2009-09-04T12:14:06.435+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>CodeRush Xpress</title><content type='html'>Some time ago, I tried ReSharper, but wasn't totally convinced to spend &gt; 100 Euro - so I forgot about it. As I'm doing more and more refactorings (you know, I'm on my way...), I really felt that there could be tools to help me. I read some forums and found CodeRush Xpress. Just have a look at the introductory video &lt;a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/"&gt;here&lt;/a&gt; and you want to work immediately with it.&lt;br /&gt;I discovered that tool the day before I went on a 1-week-no-pc-holiday-trip. As I came back, I was eager to try it and it held all my demands.&lt;br /&gt;I'm using &lt;ctrl&gt; + &lt;alt&gt; + &lt;+ / -&gt; (Selection increase / decrease), the camel-case navigation and &lt;tab&gt; on a variable (show appearance). And of course I'm using &lt;ctrl&gt; + &lt;ö&gt; (german layout) to call the refactorings. It's nice how you get a visual feedback for an upcoming refactoring:&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_w-DCOVT1BMQ/SqDdZIqKESI/AAAAAAAAAHE/FaTcxqvO2X0/s1600-h/DevExpress.png"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 320px; DISPLAY: block; HEIGHT: 173px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5377541378971144482" border="0" alt="" src="http://1.bp.blogspot.com/_w-DCOVT1BMQ/SqDdZIqKESI/AAAAAAAAAHE/FaTcxqvO2X0/s320/DevExpress.png" /&gt;&lt;/a&gt;&lt;br /&gt;There's so much so discover for me. There's also a kind-of mod-community, because the API is open (DXCore) to extend. Great tool!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-121443024738192587?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/121443024738192587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/09/coderush-xpress.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/121443024738192587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/121443024738192587'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/09/coderush-xpress.html' title='CodeRush Xpress'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_w-DCOVT1BMQ/SqDdZIqKESI/AAAAAAAAAHE/FaTcxqvO2X0/s72-c/DevExpress.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5711739486526597034</id><published>2009-08-05T18:15:00.008+02:00</published><updated>2009-08-05T18:44:52.232+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='EDF'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><title type='text'>How to build a collection of Interfaces</title><content type='html'>&lt;p&gt;Here’s the problem: we have some files and some devices which operate with signals. As a signal is one of our main objects, we want to return a collection of signals when opening a file or beginning a communication with a device:&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_w-DCOVT1BMQ/SnmxoGUCrVI/AAAAAAAAAGk/w1FcFx8R58o/s1600-h/SignalProblem0.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 224px; height: 320px;" src="http://2.bp.blogspot.com/_w-DCOVT1BMQ/SnmxoGUCrVI/AAAAAAAAAGk/w1FcFx8R58o/s320/SignalProblem0.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5366515733436214610" /&gt;&lt;/a&gt;&lt;p&gt;But of course, we want to handle each signal the same, so a signal from an EDF-file should be from the same class as a signal from a device. We could define a signal-class in the Main-library like this:&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SnmyHxD5quI/AAAAAAAAAGs/k15K8tpi9g0/s1600-h/SignalProblem1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 183px; height: 320px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SnmyHxD5quI/AAAAAAAAAGs/k15K8tpi9g0/s320/SignalProblem1.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5366516277487184610" /&gt;&lt;/a&gt;&lt;p&gt;But this constructs a circular reference. We could create a converter for each special signal and build a collection in the main-library of all signals:&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_w-DCOVT1BMQ/SnmyqNH6_vI/AAAAAAAAAG0/CoKUq_nxI_o/s1600-h/SignalProblem2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 170px; height: 320px;" src="http://2.bp.blogspot.com/_w-DCOVT1BMQ/SnmyqNH6_vI/AAAAAAAAAG0/CoKUq_nxI_o/s320/SignalProblem2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5366516869135793906" /&gt;&lt;/a&gt;&lt;p&gt;Ouch – ugly. For every signal-type we need one converter. What happens when DeviceSignal changes? Hopefully, we update the corresponding DeviceSignalConverter... Here’s my solution:&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SnmzRVPD-9I/AAAAAAAAAG8/6xjERIgvq7Y/s1600-h/SignalProblem3.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 185px; height: 320px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SnmzRVPD-9I/AAAAAAAAAG8/6xjERIgvq7Y/s320/SignalProblem3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5366517541328124882" /&gt;&lt;/a&gt;&lt;p&gt;We implement all interfaces a signal could be loaded / imported from in the main-signal-class and use generics to simulate a factory. A EDF-dll could have:&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;  public interface ISignal {&lt;br /&gt;      int SamplesPerRecord { get; set; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public class SignalReader&lt;t&gt; where T : ISignal, new() {&lt;br /&gt;      public override ICollection&lt;t&gt; GetSignals() {&lt;br /&gt;          List&lt;t&gt; signals = new List&lt;t&gt;();&lt;br /&gt;          var signal = new T();&lt;br /&gt;          signal.SamplesPerRecord = 3;&lt;br /&gt;          signals.Add(signal);&lt;br /&gt;          return signals;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;&lt;/t&gt;&lt;/t&gt;&lt;/t&gt;&lt;/t&gt;&lt;/pre&gt;&lt;p&gt;The signal in the main-library implements that interface:&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;   public class Signal : ISignal {&lt;br /&gt;       public int SamplesPerRecord { get; set; }&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;We can now call the SignalReader and it returns us a collection of signals we can use:&lt;/p&gt;&lt;pre&gt;&lt;br /&gt;   public ICollection&lt;signal&gt; GetSignals() {&lt;br /&gt;       SignalReader&lt;signal&gt; reader = new SignalReader&lt;signal&gt;();&lt;br /&gt;       return reader.GetSignals();&lt;br /&gt;   }&lt;br /&gt;&lt;/signal&gt;&lt;/signal&gt;&lt;/signal&gt;&lt;/pre&gt;&lt;p&gt;We can implement further signal-readers just by implementing the necessary interfaces into the main-signal-class. In fact, for each reader we created from Signal inherited classes implementing the interface the reader defines. With that construct, we can work without circular references and get a collection of objects we can work with.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5711739486526597034?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5711739486526597034/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/08/how-to-build-collection-of-interfaces.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5711739486526597034'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5711739486526597034'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/08/how-to-build-collection-of-interfaces.html' title='How to build a collection of Interfaces'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_w-DCOVT1BMQ/SnmxoGUCrVI/AAAAAAAAAGk/w1FcFx8R58o/s72-c/SignalProblem0.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-3485546131599302130</id><published>2009-07-08T09:31:00.003+02:00</published><updated>2009-07-08T09:45:52.486+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><title type='text'>Benefit for unit tests</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-GB&gt;From today on I&amp;#8217;m absolutely convinced that unit tests are great.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-GB&gt;The last three days I refactored my current project a lot &amp;#8211; in fact I added 10 classes, deleted 6 and changed 25. If I would have done that in the past without unit tests, I a) wouldn&amp;#8217;t have done that and b) if I really would have done that, it would have probably taken me 2 weeks to realize that my uncontrolled changes aren&amp;#8217;t working and I wouldn&amp;#8217;t get it to work in a reasonable amount of time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-GB&gt;But with my 250 unit tests, I checked every refactoring-step if my code still does what it has to do. And with that, I was absolutely sure about my changes. So, thank you, unit tests!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-3485546131599302130?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/3485546131599302130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/07/benefit-for-unit-tests.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/3485546131599302130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/3485546131599302130'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/07/benefit-for-unit-tests.html' title='Benefit for unit tests'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5004034689067114285</id><published>2009-07-06T10:27:00.004+02:00</published><updated>2009-11-11T09:24:33.400+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Clean Code</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://breathingtech.com/wp-content/uploads/2009/03/cleancode.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 160px;" src="http://breathingtech.com/wp-content/uploads/2009/03/cleancode.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;I just read the german edition of &lt;a href="http://www.amazon.de/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882"&gt;Clean Code from Robert C. Martin&lt;/a&gt;. The introduction made me love this book immediately by a simple &lt;a href="http://www.osnews.com/story/19266/wtfs_m"&gt;drawing&lt;/a&gt;. There are two things I’ll take along from this book:&lt;/p&gt;&lt;p&gt;1) For each function f let f.LinesCount &amp;lt; 20 &lt;/p&gt;&lt;p&gt;2)&lt;span style="FONT: 7pt 'Times New Roman'"&gt; &lt;/span&gt;&lt;span lang="EN-GB"&gt;Comments are evil&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;These two rules need some clarifications of course. In fact, the demand to keep functions below 20 lines is a result of another rule: Don’t mess with abstraction-levels. If you see a function with more than 20 lines, this should be a good indication for a mix of different levels of abstraction.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;The second rule points in the opposite direction of what I’ve learned at university: one tutor said to me that there should be more lines of comment than lines of code, so that another person could easily understand what you wanted to say. Today with C# and Java, this isn’t true anymore. The code itself became the comment. No more cyptic function-calls or Hungarian notation but intuitive named functions and variables telling what they’re doing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;Although I’m still feeling awkward without any function-header-comment, I slowly try to reduce unnecessary comments like this:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;‘ iterate through all alarms&lt;br /&gt;For Each a In m_colAlarms&lt;/pre&gt;&lt;p&gt;And transform it into this&lt;/p&gt;&lt;pre&gt;For Each alarm In _alarms&lt;/pre&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;The difference is not big but the sum of all changes generates a nice picture.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;So, the first dozen chapters are truly inspirational. After that, the book takes a look on bigger examples how to refactor whole classes. This is done step-by-step and after some steps, it’s getting boring. My advice: just read the first 12 chapters and start coding!&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5004034689067114285?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5004034689067114285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/07/clean-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5004034689067114285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5004034689067114285'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/07/clean-code.html' title='Clean Code'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-6804091398668871057</id><published>2009-06-10T19:00:00.007+02:00</published><updated>2009-06-10T19:21:22.312+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVVM'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><title type='text'>What a wonderful world</title><content type='html'>&lt;p&gt;Recently I read a lot about the M-V-VM pattern and I wanted to try it out. So I started small with a WPF-application implementing a listview showing some events related to sleep medicine. I’ve created a simple model with a collection of various data. This model is the data-provider for a ViewModel which is databind to this view:&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_w-DCOVT1BMQ/Si_ntl1t1vI/AAAAAAAAAFQ/37_PL_gxQfY/s1600-h/EventsView.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 175px;" src="http://1.bp.blogspot.com/_w-DCOVT1BMQ/Si_ntl1t1vI/AAAAAAAAAFQ/37_PL_gxQfY/s320/EventsView.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5345746053149611762" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;So far, so good; worked pretty easy. I then read something about the graphical ability of WPF, which should be very bad in displaying a lot of graphical objects. Again, I wrote a sleep-medical-application, but this time showing some random biosignals with events:&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Si_oPf_FDwI/AAAAAAAAAFY/k2IztF2F26s/s1600-h/SignalsView.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 162px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Si_oPf_FDwI/AAAAAAAAAFY/k2IztF2F26s/s320/SignalsView.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5345746635693821698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;The problem here was the very long signal build of thousands of Polyline-segments. And indeed, this brought WPF to its knees. You can’t show some signals with the pure use of WPF-technology. I instead used GDI+ inside of a Canvas-element for the signal and the VirtualCanvas-technique for the events (read &lt;a href="http://blogs.msdn.com/jgoldb/archive/2008/03/08/performant-virtualized-wpf-canvas.aspx"&gt;here&lt;/a&gt; about it). With that I managed to preserve databinding on the modifiable objects (the events): you can move them around and change their duration by dragging their border.&lt;/p&gt;&lt;p&gt;In a second step, I combined the model of the ListView with that of the biosignals and injected it into its ViewModel. Of course, every ViewModel is being unittested – what a wonderful world:&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_w-DCOVT1BMQ/Si_oqOiR5nI/AAAAAAAAAFg/13CrvmHenQk/s1600-h/ChannelsMVVM.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 304px;" src="http://3.bp.blogspot.com/_w-DCOVT1BMQ/Si_oqOiR5nI/AAAAAAAAAFg/13CrvmHenQk/s320/ChannelsMVVM.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5345747094866093682" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-6804091398668871057?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/6804091398668871057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/06/what-wonderful-world.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/6804091398668871057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/6804091398668871057'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/06/what-wonderful-world.html' title='What a wonderful world'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_w-DCOVT1BMQ/Si_ntl1t1vI/AAAAAAAAAFQ/37_PL_gxQfY/s72-c/EventsView.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-8336358540498726435</id><published>2009-06-04T10:29:00.007+02:00</published><updated>2009-06-09T15:52:01.045+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>C#-For and VB.NET-For</title><content type='html'>&lt;p&gt;Yesterday I wondered why on earth my simple VB.NET-For-loop produced an error:&lt;/p&gt;&lt;pre&gt;Dim collection As New List(Of Integer)&lt;br /&gt;collection.Add(1)&lt;br /&gt;collection.Add(2)&lt;br /&gt;collection.Add(3)&lt;br /&gt;collection.Add(4)&lt;br /&gt;collection.Add(5)&lt;br /&gt;&lt;br /&gt;For i As Integer = 0 To collection.Count - 1&lt;br /&gt;  Console.WriteLine(collection(i))&lt;br /&gt;&lt;br /&gt;  If collection(i) = 2 Then&lt;br /&gt;    collection.RemoveAt(i)&lt;br /&gt;  End If&lt;br /&gt;Next&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;I&amp;#8217;m coming from a Java / C#-background, so I tried the same loop in C#:&lt;/p&gt;&lt;pre&gt;var collection = new List&amp;lt;int&amp;gt;();&lt;br /&gt;collection.Add(1);&lt;br /&gt;collection.Add(2);&lt;br /&gt;collection.Add(3);&lt;br /&gt;collection.Add(4);&lt;br /&gt;collection.Add(5);&lt;br /&gt;&lt;br /&gt;for (int i = 0; i &amp;lt; collection.Count; i++) {&lt;br /&gt;  Console.WriteLine(collection[i]);&lt;br /&gt;&lt;br /&gt;  if (collection[i] == 2) {&lt;br /&gt;    collection.RemoveAt(i);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Et voilá, the result is what I wanted. So I made my discovery of the day: C#-For isn&amp;#8217;t VB.NET-For.&lt;/p&gt;&lt;p&gt;In the cold light of day and using the debugger, it seems obvious that the VB.NET-For doesn&amp;#8217;t check the condition on every iteration. It just duplicates the loop as often as it is stated in the For-statement.&lt;/p&gt;&lt;p&gt;The C#-construct is smarter as it checks in every iteration if the condition is true. But if it&amp;#8217;s true that this is the difference between the two Fors, then the C#-loop must be slower. So, let&amp;#8217;s check it out:&lt;/p&gt;&lt;pre&gt;Dim start = DateTime.Now&lt;br /&gt;&lt;br /&gt;For i As Integer = 0 To 1000000000&lt;br /&gt;  ' nothing&lt;br /&gt;Next&lt;br /&gt;&lt;br /&gt;Console.WriteLine(Now.Subtract(start).ToString())&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Vs.&lt;/p&gt;&lt;pre&gt;var start = DateTime.Now;&lt;br /&gt;&lt;br /&gt;for (int i = 0; i &amp;lt; 1000000000; i++) {&lt;br /&gt;  // nothing&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Console.WriteLine(DateTime.Now.Subtract(start).ToString());&lt;/pre&gt;&lt;p&gt;And indeed, the VB.NET-For-loop wins on my system with 3.734s to 4.687s!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-8336358540498726435?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/8336358540498726435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/06/c-for-and-vbnet-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8336358540498726435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8336358540498726435'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/06/c-for-and-vbnet-for.html' title='C#-For and VB.NET-For'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7762635506683564302</id><published>2009-05-17T08:12:00.007+02:00</published><updated>2009-06-09T15:54:46.849+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><title type='text'>Thread-Threat</title><content type='html'>&lt;div&gt;At work, I'm trying to get a software-feature faster by introducing multithreading. We import data from a device and convert it into our format. This is done sequentially at the moment, first importing, then converting. First tests have shown that we can get a benefit of about 30% if we do that in parallel. So I developed a wonderful producer-consumer-queue with a producer-thread and a consumer-thread which gets its data from the producer-thread. So far, so good: all unit-tests with that queue ran successfully.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;However, as soon as I plugged that code into the import-conversion-piece to make it multithreaded, I got System.Runtime.InteropServices.COMExceptions with HRESULTs of -2147467259 (RPC_E_SERVERCALL_RETRYLATER, Unspecified error) or -2147417856 (RPC_E_SYS_CALL_FAILED, System call failed) - (&lt;a href="http://support.microsoft.com/kb/186063/en-us"&gt;here&lt;/a&gt; is a list with automation errors). These errors occured randomly on different parts of the code. But all code-parts had in common that they're calling a VB6-COM-object (well, it's a COMException - what should I expect...).&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Some googling brought me similarities with Office-automation (see &lt;a href="http://stackoverflow.com/questions/99271/c-com-office-automation-rpcesyscallfailed"&gt;here&lt;/a&gt; and &lt;a href="http://www.ureader.com/msg/14781025.aspx"&gt;here&lt;/a&gt; for example). My picture about that problem became clearer and clearer and I sketched that diagram to understand it:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sg-4OikUQXI/AAAAAAAAAFI/URhWoqvwazw/s1600-h/COMException.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 216px; height: 320px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sg-4OikUQXI/AAAAAAAAAFI/URhWoqvwazw/s320/COMException.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5336686643394134386" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Thread A and B are accessing the same COM-object. This access is provided via a RCW (runtime callable wrapper). There is only one RCW for all accesses to that COM-object (read the great article series "&lt;a href="http://msdn.microsoft.com/en-us/library/ms973274.aspx"&gt;Beyond (COM) Add Reference: Has Anyone Seen the Bridge?&lt;/a&gt;" of Sam Gentile for a deeper dive into COM-interop). This means multithreading and COM-interop is no fun.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;What about protecting the access to that COM-interop with a lock? I designed a little construct so that I won't forget to protect any calls to that COM-interop:&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sg-qz1YX1rI/AAAAAAAAAE4/fStRobpObdo/s1600-h/ThreadSafeComInteropClass.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 306px; height: 320px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sg-qz1YX1rI/AAAAAAAAAE4/fStRobpObdo/s320/ThreadSafeComInteropClass.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5336671890936682162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;The wrapper for the COM-interop, ThreadSafeComInterop, offers the COM-interop via a Lock-class. Each time you want to access the COM-object, you acquire the lock. With that, a Monitor enters the lock and exits it not until the lock is disposed. It's neat with the using-construct:&lt;/div&gt;&lt;pre lang="vb"&gt;&lt;br /&gt;Using lock = _interop.Lock&lt;br /&gt;' do something with lock.ComInterop&lt;br /&gt;End Using&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;See that sequence-diagram for further information:&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sg-q5tFYZsI/AAAAAAAAAFA/0pHjdIxkJog/s1600-h/ThreadSafeComInteropSequence.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sg-q5tFYZsI/AAAAAAAAAFA/0pHjdIxkJog/s400/ThreadSafeComInteropSequence.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5336671991788758722" /&gt;&lt;/a&gt;&lt;div&gt;The provider creates the ThreadSafeComInterop by passing the COM-interop to the constructor. The recipient can call the Lock via the using-construct and access the COM-interop via lock.ComInterop. By creating the ThreadSafeComInteropLock, a Monitor.Enter is established on a static lock-object. When finished using the COM-object, the Lock is being disposed and Monitor.Exit is being called to allow other components to access the COM-object.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;This sounds great and tests are showing that the exception-rate is degreasing from 10 tries - 9 exceptions to 10 tries - 1 exception. But unfortunately, this exception is one exception too much. Reading "&lt;a href="http://www.developerdotstar.com/community/automate_excel_dotnet"&gt;Lessons Learned Automating Excel from .NET&lt;/a&gt;" finally convinced me to write the needed parts of the COM-component in .NET.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7762635506683564302?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7762635506683564302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/05/thread-threat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7762635506683564302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7762635506683564302'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/05/thread-threat.html' title='Thread-Threat'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sg-4OikUQXI/AAAAAAAAAFI/URhWoqvwazw/s72-c/COMException.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7250089047665751144</id><published>2009-05-01T19:13:00.009+02:00</published><updated>2009-06-09T15:55:08.124+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>BendingStackPanel</title><content type='html'>&lt;div&gt;I just finished a nice little tool for our Message-module: Message.dll for dummies.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SfswElowBCI/AAAAAAAAACM/dufrEUf_wKc/s1600-h/MessageForDummies.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 304px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/SfswElowBCI/AAAAAAAAACM/dufrEUf_wKc/s320/MessageForDummies.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5330907439303754786" /&gt;&lt;/a&gt;On the right is a ListView with various components of which the trace-level can be altered. In the center of the dialog are 3 Buttons to vary the debug-mode. These buttons are on a StackPanel with a custom-made property "Bend" and overrides to Measure and Arrange. You can bend the StackPanel up to 180 degrees. Here is a picture with more buttons and an ellipse (any UIElement can be added):&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_w-DCOVT1BMQ/Sfsxg8bOHoI/AAAAAAAAACU/8spmO9WafSs/s1600-h/BendingStackPanel.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 235px; height: 271px;" src="http://3.bp.blogspot.com/_w-DCOVT1BMQ/Sfsxg8bOHoI/AAAAAAAAACU/8spmO9WafSs/s320/BendingStackPanel.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5330909025968987778" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;The slider and the TextBlock binds to the BendingStackPanels Bend-property so that you can interactively bend and unbend the panel - looks really cool :) I was amazed how straightforward the development was: it took me just a few hours! Here is the envelope of ideas - nice, eh? ;)&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sfsyu7K7VlI/AAAAAAAAACc/OjPPl6Vt-8w/s1600-h/p1010039.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sfsyu7K7VlI/AAAAAAAAACc/OjPPl6Vt-8w/s320/p1010039.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5330910365662008914" /&gt;&lt;/a&gt;The whole bending-stuff is just class-10 (yes, I looked it up...) sine- and cosine-trigonometry. You can have a look at the code &lt;a href="http://familiemufflon.lima-city.de/BendingStackPanel.cs"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7250089047665751144?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7250089047665751144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/05/bendingstackpanel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7250089047665751144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7250089047665751144'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/05/bendingstackpanel.html' title='BendingStackPanel'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_w-DCOVT1BMQ/SfswElowBCI/AAAAAAAAACM/dufrEUf_wKc/s72-c/MessageForDummies.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7724317603369596797</id><published>2009-04-28T13:29:00.006+02:00</published><updated>2009-04-28T16:46:57.694+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='Clean Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>LoC and FxCop</title><content type='html'>&lt;div class=Section1&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-GB&gt;I was curious on how many lines of codes we are working. There were only nebulous guesses of around 100.000 locs &amp;#8211; but no official ones. So I googled a bit and found &lt;a href="http://cloc.sourceforge.net/"&gt;CLOC&lt;/a&gt;, a counting tool for lines of code. I ran it on my ActiveX- and DotNet-folder and it calculated:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo2'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-GB style='font-family:Symbol'&gt;&lt;span style='mso-list:Ignore'&gt;&amp;middot;&lt;span style='font:7.0pt "Times New Roman"'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-GB&gt;80,000 loc VB.NET and 40,000 lines of comments in VB.NET&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo2'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-GB style='font-family:Symbol'&gt;&lt;span style='mso-list:Ignore'&gt;&amp;middot;&lt;span style='font:7.0pt "Times New Roman"'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-GB&gt;410,000 loc VB6 and 310,000 lines of comments in VB6&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l1 level1 lfo2'&gt;&lt;![if !supportLists]&gt;&lt;span lang=EN-GB style='font-family:Symbol'&gt;&lt;span style='mso-list:Ignore'&gt;&amp;middot;&lt;span style='font:7.0pt "Times New Roman"'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;![endif]&gt;&lt;span lang=EN-GB&gt;20,000 loc C++ and 5,000 lines of comments in C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-GB&gt;The good number of comments in VB6 might result of the huge header we gave each file and a rather big header for each method. In VB.NET this is more dense.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-GB&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;span lang=EN-GB&gt;Another tool on my way to a great developer is &lt;a href="http://msdn.microsoft.com/en-us/library/bb429476(VS.80).aspx"&gt;FxCop&lt;/a&gt;. This program can examine a dll if certain rules are broken. You can select and deselect single rules or whole rule-sections. The rules are made by Microsoft but you can build your own rules and add them. When you run the program, it lists all violation and you can either try to fix them or if you disagree, you can exclude them with a comment.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class=MsoNormal&gt;&lt;img border=0 width="400" id="Bild_x0020_1" src="http://lh5.ggpht.com/_w-DCOVT1BMQ/SfbugTvRLzI/AAAAAAAAAB4/-KalFwjllR4/s800/FxCop.PNG.jpg" alt="FxCop"&gt;&lt;span lang=EN-GB&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7724317603369596797?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7724317603369596797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/04/loc-and-fxcop_28.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7724317603369596797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7724317603369596797'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/04/loc-and-fxcop_28.html' title='LoC and FxCop'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_w-DCOVT1BMQ/SfbugTvRLzI/AAAAAAAAAB4/-KalFwjllR4/s72-c/FxCop.PNG.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7554686352623617540</id><published>2009-04-22T13:53:00.000+02:00</published><updated>2009-04-22T14:12:18.317+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtual Earth'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Moving to blogger</title><content type='html'>I decided to move this blog outside of the MCC-wiki. The content isn't MCC-specific (actually, I deleted the 'hot'-company-stuff) at all and I want to write something about my private projects too.&lt;br /&gt;&lt;br /&gt;So, here it comes: after working a bit with WPF (approx 4 months) and trying ASP.NET (approx 1 month), I started a ASP.NET Silverlight project with the brand new &lt;a href="http://videos.visitmix.com/MIX09/T34F"&gt;Virtual Earth Silverlight Control&lt;/a&gt;. You can add UIElements to the map and give them coordinates so that they will move with the panning of the map. This means a way of possibilities:&lt;br /&gt;&lt;br /&gt;'todo: upload Picture&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7554686352623617540?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7554686352623617540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/04/moving-to-blogger.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7554686352623617540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7554686352623617540'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/04/moving-to-blogger.html' title='Moving to blogger'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7130386580380665247</id><published>2009-04-20T09:00:00.001+02:00</published><updated>2009-05-01T19:47:38.151+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit Test'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>Unit tests and how to trick ExpertsExchange</title><content type='html'>I'm glad I got accustomed to writing tests. It's not fully TDD, but I try to write a test as soon as possible (at least I'm not doing test-last). To never forgot writing a test I divided my IDE into two codeviews:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_w-DCOVT1BMQ/Sfs1Sqkna2I/AAAAAAAAACk/-QZTuS2bpFI/s1600-h/UnitTests.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 316px;" src="http://3.bp.blogspot.com/_w-DCOVT1BMQ/Sfs1Sqkna2I/AAAAAAAAACk/-QZTuS2bpFI/s320/UnitTests.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5330913178704898914" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the upper view is the productive code, in the lower view the corresponding unit tests. If a tests fails, I open the test result in the lower section and can navigate through the error-proven code easily.&lt;br /&gt;&lt;br /&gt;One word on testing events (as I stumbled over it last week): with C# and anonymous methods it's quite &lt;a href="http://haacked.com/archive/2006/12/13/Tip_Jar_Unit_Test_Events_With_Anonymous_Delegates.aspx"&gt;easy&lt;/a&gt; to write tests for throwing events. With VB.NET not supporting anonymous methods, you have to find another way: I'm using &lt;code&gt;TestContext.Properties(TestContext.TestName) = True&lt;/code&gt; at the moment. This code is in my event-handler and changes a TestContext-Property. I think it looks better as using a global variable.&lt;br /&gt;&lt;br /&gt;You know ExpertsExchange? Every time I search something related to coding via Google, I get a hit for ExpertsExchange. But unfortunately, you have to pay for an answer: you only see empty boxes instead of the answer if not being a member. But thank god there is Google cache which has access for a free answer: just scroll down all the way and voilá, the boxes are filled:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sfs1kpTcGGI/AAAAAAAAACs/dubs2XPIUPA/s1600-h/TrickingExpertsExchange.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 226px;" src="http://4.bp.blogspot.com/_w-DCOVT1BMQ/Sfs1kpTcGGI/AAAAAAAAACs/dubs2XPIUPA/s320/TrickingExpertsExchange.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5330913487602063458" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;By the way: I know now how to embed pictures. Google chrome doesn't show the 'upload picture'-frame immediately :/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7130386580380665247?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7130386580380665247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/04/unit-tests-and-how-to-trick.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7130386580380665247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7130386580380665247'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/04/unit-tests-and-how-to-trick.html' title='Unit tests and how to trick ExpertsExchange'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_w-DCOVT1BMQ/Sfs1Sqkna2I/AAAAAAAAACk/-QZTuS2bpFI/s72-c/UnitTests.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-2665614614434623580</id><published>2009-04-09T09:00:00.003+02:00</published><updated>2009-11-11T09:54:16.154+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Public Property Get IntValue() As Long</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://ecx.images-amazon.com/images/I/5138dM4PHnL._SS500_.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 160px;" src="http://ecx.images-amazon.com/images/I/5138dM4PHnL._SS500_.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;I'm reading &lt;a href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321545613"&gt;Framework Design Guidelines&lt;/a&gt; from Microsoft at the moment. Great book, similar to Code complete, but one layer above. All brilliant people of Microsoft have contributed to these guidelines, among them are Anders Hejlsberg (Mr. C#), Paul Vick (Mr. VB.NET) and Phil Haack (Mr. ASP.NET MVC). Anyway, as I'm reading it, I get a different look on our sourcecode. For example, I stumbled over:&lt;br /&gt;&lt;pre lang="vb"&gt;&lt;br /&gt;Public Property Get IntValue() As Long&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Great, isn't it? The more you think about it, the more abstruse it gets. I'll better stop it, I almost feel dizzy ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-2665614614434623580?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/2665614614434623580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/04/public-property-get-intvalue-as-long.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2665614614434623580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2665614614434623580'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/04/public-property-get-intvalue-as-long.html' title='Public Property Get IntValue() As Long'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-8945447425677131272</id><published>2009-04-02T09:00:00.001+02:00</published><updated>2009-06-09T15:55:44.930+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='EDF'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><title type='text'>TimeSpan and EDF</title><content type='html'>I noticed two things while playing with EDF. TimeSpan.TotalSeconds is inaccurate on some computers. Probably the value is calculated by using the ticks-property. Unfortunately, this leads to a double which can have the wrong number. I made a &lt;code vbnet&gt;t = TimeSpan.FromSeconds(3.2)&lt;/code&gt; and got &lt;code vbnet&gt;t.TotalSeconds = 3.1999999999997&lt;/code&gt;. When using that in a calculation and casting the result to an Integer, you can get a wrong number - like me...&lt;br /&gt;&lt;br /&gt;Speaking of wrong numbers brings me to my 2-day-EDF-problem. I desperately tried to create a sup-file made of dummy-EDF-files. The code is actually quite simple: new clsAufzeichnung, Meas_Sections.Add(dummy-EDF-file), SaveAufzeichnung, done. This works when you have set the HeaderLength of the EDF-file - unlike me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-8945447425677131272?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/8945447425677131272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/04/timespan-and-edf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8945447425677131272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8945447425677131272'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/04/timespan-and-edf.html' title='TimeSpan and EDF'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-8840824856135466427</id><published>2009-03-26T08:00:00.004+01:00</published><updated>2009-06-09T15:56:02.324+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><category scheme='http://www.blogger.com/atom/ns#' term='Code'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Pack:=1 and ASP.NET: The beginning</title><content type='html'>Uff, just fighted for two days of getting that byte-array into a structure. There were always strange values starting from a specific property. After a few hours, I found out that there was a off by 1 byte error: if I shift every byte back one byte, I will reach the right result. Code tells more than 1000 words:&lt;br /&gt;&lt;br /&gt;&lt;pre lang="vb"&gt;&lt;br /&gt;Structure Test&lt;br /&gt;  Dim a As Byte&lt;br /&gt;  Dim b As Int16&lt;br /&gt;  Dim c as Byte&lt;br /&gt;End Structure&lt;br /&gt;&lt;br /&gt;Dim handle As GCHandle = GCHandle.Alloc(byteArray, _&lt;br /&gt;                                      GCHandleType.Pinned)&lt;br /&gt;Dim t As New Test&lt;br /&gt;t = CType(Marshal.PtrToStructure(_&lt;br /&gt;                         handle.AddrOfPinnedObject(), _&lt;br /&gt;                         GetType(Test)), Test)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This will give you false values for b and c. This is why: "The default behaviour in the framework is for values in the structure to be aligned at 4-byte boundaries, so values start at FieldOffset 0,4,8,12 ..." (see &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/clr/thread/2f9ffce5-4c64-4ea7-a994-06b372b28c39/"&gt;forum&lt;/a&gt;). To avoid this, use &lt;code&gt;&lt;StructLayout(LayoutKind.Sequential, Pack:=1)&gt;&lt;/code&gt; as a structure-attribute and everything's fine now :)&lt;br /&gt;&lt;br /&gt;Another bad book read: &lt;a href="http://www.amazon.de/Programmieren-ASP-NET-AJAX-Christian-Wenz/dp/3897214806"&gt;Programmieren mit ASP.NET AJAX&lt;/a&gt;. The first chapter is good - everything else just confusing. No good examples. Maybe I didn't get the point - I haven't done anything in ASP.NET yet. I'm watching &lt;a href="http://www.asp.net/learn/videos/#beginners"&gt;now&lt;/a&gt; and the first 6 videos were fine :)&lt;br /&gt;&lt;br /&gt;Ah, I forgot to mention the free first chapter of &lt;a href="http://tinyurl.com/aspnetmvc"&gt;Professional ASP.NET MVC 1.0&lt;/a&gt; from Rob Conery, Scott Hanselman, Phil Haack and Scott "ScottGu" Guthrie - famous bloggers writing a book. I'm curious to read it :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-8840824856135466427?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/8840824856135466427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/03/pack1-and-aspnet-beginning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8840824856135466427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/8840824856135466427'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/03/pack1-and-aspnet-beginning.html' title='Pack:=1 and ASP.NET: The beginning'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-4802697528894633660</id><published>2009-03-20T08:00:00.000+01:00</published><updated>2009-11-04T14:34:00.969+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='Mix'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Mix09 and "The Guide"</title><content type='html'>Right now, &lt;a href="http://live.visitmix.com"&gt;Mix09&lt;/a&gt; is on air. This is a Microsoft developer conference focusing on web development. I bet, you want to see some videos from &lt;a href="http://sessions.visitmix.com/MIX09"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I recently finished &lt;a href="http://www.codeplex.com/AppArchGuide"&gt;The Application Architecture Guide 2.0&lt;/a&gt;. Now I can design every system from a mobile app up to a RIA :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-4802697528894633660?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/4802697528894633660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/03/mix09-and-guide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/4802697528894633660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/4802697528894633660'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/03/mix09-and-guide.html' title='Mix09 and &quot;The Guide&quot;'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5450661734069166223</id><published>2009-03-12T08:00:00.000+01:00</published><updated>2009-04-22T13:51:12.993+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='log'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>log4net and SnippetEditor</title><content type='html'>I recently searched a logging-framework ("there must be some logging-frameworks out there, you must not write your own" - I thought) and stumbled across &lt;a href="http://logging.apache.org/log4net/index.html"&gt;log4net&lt;/a&gt;. It is a port of the log4j logging framework of Apache. It is configurable via xml or via code, claims that it's super-fast and has tons of various output streams. I will use it from now on in my private code-projects, because I haven't got the time to write a Message.dll (our logger here at MCC) for my own.&lt;br /&gt;&lt;br /&gt;I'm already using "prop &lt;tab&gt;" and "dp &lt;tab&gt;" (dp only for C#) frequently and by using Entering and Returning of Message.dll, I wished to have a shortcut for this too. Et voilá, I googled a bit and found the great &lt;a href="http://www.codeplex.com/SnippetEditor"&gt;Snippet Editor&lt;/a&gt;. Veeeery handy. Now I've got "logstart &lt;tab&gt;" for setting up the logger and "loger &lt;tab&gt;" for generating the Entering- and Returning-code for the Message.dll.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5450661734069166223?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5450661734069166223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/03/log4net-and-snippeteditor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5450661734069166223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5450661734069166223'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/03/log4net-and-snippeteditor.html' title='log4net and SnippetEditor'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7174788097542716800</id><published>2009-03-06T09:00:00.000+01:00</published><updated>2009-04-22T13:36:31.252+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVVM'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='IoC'/><category scheme='http://www.blogger.com/atom/ns#' term='MSDN'/><title type='text'>MSDN magazine and Unity</title><content type='html'>&lt;a href="http://en.wikipedia.org/wiki/I_know_that_I_know_nothing"&gt;οἶδα οὐκ εἰδώς, oída ouk eidós!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thank you wikipedia for helping me with my greek. In the last few weeks, I learned so much while considering this and that for the new architecture; my programming-knowledge seems to duplicate with every line I read. Was I completely dazzled all the time?&lt;br /&gt;&lt;br /&gt;Well, I'm reading the &lt;a href="http://msdn.microsoft.com/en-us/magazine/default.aspx"&gt;MSDN magazine&lt;/a&gt; now (in fact, I'm trying to manage to read a tiny part of it) to keep me up to date at least with the MS-world. By the way, in the february-issue, there is a great article about MVVM by Josh Smith.&lt;br /&gt;&lt;br /&gt;One cool new think I learned is &lt;a href="http://martinfowler.com/articles/injection.html"&gt;IoC&lt;/a&gt; of famous Martin Fowler. So I looked at &lt;a href="http://msdn.microsoft.com/en-us/library/cc468366.aspx"&gt;Unity&lt;/a&gt;, a relatively new dependency injection container. Imho a great way for spreading logging and parts of our MCC_Aufzeichnung. Works fine with MVVM as Jason Dolinger &lt;a href="http://blog.lab49.com/archives/2650"&gt;demonstrates&lt;/a&gt;. This video was kind of an eye-opener in the matter of WPF for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7174788097542716800?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7174788097542716800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/03/msdn-magazine-and-unity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7174788097542716800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7174788097542716800'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/03/msdn-magazine-and-unity.html' title='MSDN magazine and Unity'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7285483269688685623</id><published>2009-02-27T09:00:00.000+01:00</published><updated>2009-04-22T13:34:13.188+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>WPF too slow?</title><content type='html'>I'm just looking for a new VSE (= Visual-Control-Element)-design. Using DirectX will propably be overdone but WPF is too slow in a first approach showing 10 signals with 1000 line-segments per Polyline. The overhead is truely too big. So I googled a bit and found a comment of &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/5980d36d-bba2-4179-a9be-acfa50f6cd45/"&gt;Marco Zhou (Zhou Yong)&lt;/a&gt; who proposes using a WriteableBitmap for WPF-GDI-access. Unfortunately, this throws away all the cool stuff of an UIElement, but who needs databinding a static signal anyway?&lt;br /&gt;&lt;br /&gt;Using the aforementioned technique, my sample runs at least as smooth as SOMNOlab :)&lt;br /&gt;&lt;br /&gt;Now let's try to put some UIElement-biosignal-events atop of it and the weekend is near ^^&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7285483269688685623?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7285483269688685623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/02/wpf-too-slow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7285483269688685623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7285483269688685623'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/02/wpf-too-slow.html' title='WPF too slow?'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-2648132527775306298</id><published>2009-02-20T09:00:00.000+01:00</published><updated>2009-11-04T14:34:00.970+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MVVM'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>SOA again, 2 new blogs to read</title><content type='html'>On wednesday, I had to return &lt;a href="http://www.amazon.de/SOA-Webservices-Praxis-Herbert-Burbiel/dp/3772376274/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1235117784&amp;sr=8-1"&gt;SOA und Webservices in der Praxis&lt;/a&gt; of Herbert Burbiel to the bib. Unfortunately, there was a reservation on this book. Anyway, I wouldn't have the time to test this promising ASP.NET-world. I'm really astonished how easy it is to write a webservice or -client with .NET - not a great difference to a normal windows forms application. So, the book is great; however, it uses examples of .NET and Java and makes every step (write a client, write a service, make a db-connection) twice, if not thrice (Java, C# and VB.NET). Actually that showed me that the .NET-way is the right one for me ;)&lt;br /&gt;&lt;br /&gt;On my journeys in the web, I recently found two great blogs about WPF (Windows Forms - someone needs that anymore?), or better say two great minds writing about WPF: John Gossman and Josh Smith. See Karl Shifflett (not John Gossman...) talking about MVVM &lt;a href="http://channel9.msdn.com/shows/Continuum/MVVM/"&gt;here&lt;/a&gt; - I love that guy :) (more to come about MVVM soon!).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-2648132527775306298?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/2648132527775306298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/02/soa-again-2-new-blogs-to-read.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2648132527775306298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2648132527775306298'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/02/soa-again-2-new-blogs-to-read.html' title='SOA again, 2 new blogs to read'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5410804524275022030</id><published>2009-02-16T09:00:00.000+01:00</published><updated>2009-11-04T14:34:00.970+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='LinQ'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Linq in Action, Toolbar</title><content type='html'>Last week I finished &lt;a href="http://www.amazon.com/LINQ-Action-Fabrice-Marguerie/dp/1933988169"&gt;Linq in Action&lt;/a&gt;. It's a great primer on Linq: it covers Linq to Objects, Linq to SQL, Linq to XML and a bit of Linq to DataSet - i.e. everything ;) I read it from the start to the end and I assume this book isn't supposed to be read like this, because in the three main chapters (to Objects, SQL, XML) some basic queries are described again and again. Well, just turn that over :)&lt;br /&gt;&lt;br /&gt;I really liked the chapter about Linq2Sql. It's so easy to use a database-access with Linq. Just make a connection and raise your queries. If you're working with small databases, take that. Although the Entity Framework has the favour of Microsoft, I hope, Linq2Sql will survive to make life easy.&lt;br /&gt;&lt;br /&gt;In the book there are a lot of good examples going beyond the ordinary book-examples. For instance, there are performance-considerations in which cases Linq is significantly slower than "old style" for each and how to overcome the performance loss.&lt;br /&gt;&lt;br /&gt;I read it in German - don't do that if you're tetchy in things of misspellings like me. If you're getting a paycheck for every found mistake like for a &lt;a href="http://en.wikipedia.org/wiki/Knuth_reward_check"&gt;Knuth book&lt;/a&gt;, you will get rich :/&lt;br /&gt;&lt;br /&gt;One thing I missed are ExpressionTrees. They are mentioned only in a small paragraph :(&lt;br /&gt;&lt;br /&gt;And now a big discovery which I haven't seen in all the years I work with Win XP: "Symbolleisten". I accidently dragged my CVS-folder-link from my desktop to the top of the screen and released it. I never ever did that before. Now I have on the right of my desktop a toolbar for the CVS-DotNet-folder and on the left a CVS-ActiveX-folder. Fast access to the components :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5410804524275022030?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5410804524275022030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/02/linq-in-action-toolbar.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5410804524275022030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5410804524275022030'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/02/linq-in-action-toolbar.html' title='Linq in Action, Toolbar'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-700096556070532331</id><published>2009-02-04T09:00:00.000+01:00</published><updated>2009-04-22T13:28:07.786+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><title type='text'>87.24%</title><content type='html'>We recently did a PRC1 (= post release candidate...) survey amongst serveral MCC-coworkers. They were asked to install the setup on their private PCs and do a quick test. We did learn two things:&lt;br /&gt;&lt;br /&gt;1) NTFS isn't the only filesystem. Two of our students used FAT32 to be able to mount the harddrive to their parallel linux-installation. Unfortunately, FAT32 doesn't support hardlinks so that our hardlink.bat fails. The next version will put all dlls and exes into one directory *puh*&lt;br /&gt;&lt;br /&gt;2) Arial Narrow resides only on about &lt;a href="http://www.codestyle.org/css/font-family/sampler-WindowsResults.shtml"&gt;87.24%&lt;/a&gt; of Windows-Installations. I changed the one usage of Arial Narrow to Arial - at least 97.13% coverage...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-700096556070532331?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/700096556070532331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/02/8724.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/700096556070532331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/700096556070532331'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/02/8724.html' title='87.24%'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-3944399512321292417</id><published>2009-01-21T09:00:00.000+01:00</published><updated>2009-04-22T13:25:48.296+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Theme'/><title type='text'>Black and short</title><content type='html'>Did you see the &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=255b8cf1-f6bd-4b55-bb42-dd1a69315833&amp;displaylang=en"&gt;Shortcut Poster&lt;/a&gt; for Visual Studio? It fits nicely on a Din A4-paper (ok, you should have sharp eyes) and it lays now in front of my monitor. For example, do you know CTRL-Tab? Browsing open documents inside VS. Or CTRL-K, CTRL-C: comment the selected lines. Veeeery helpful!&lt;br /&gt;&lt;br /&gt;And now finally I'm cool: I use a theme for my Visual Studio. I wanted to try a black background and ended up on the &lt;a href="http://www.iunknown.com/2007/06/vibrant_ink_vis.html"&gt;VibrantInk&lt;/a&gt;-theme. I use it for about 3 days and I think it's great :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-3944399512321292417?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/3944399512321292417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/01/black-and-short.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/3944399512321292417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/3944399512321292417'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/01/black-and-short.html' title='Black and short'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-2003959269624284714</id><published>2009-01-13T09:00:00.000+01:00</published><updated>2009-04-22T13:24:20.190+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><title type='text'>What Great .NET Developers Ought To Know</title><content type='html'>Recently I browsed a bit in &lt;a href="http://www.hanselman.com/blog/"&gt;Scott Hanselman's Computer Zen&lt;/a&gt; and found a blog-entry reading &lt;a href="http://www.hanselman.com/blog/WhatGreatNETDevelopersOughtToKnowMoreNETInterviewQuestions.aspx"&gt;What Great .NET Developers Ought To Know&lt;/a&gt;. I think this is a fine place to start knowing what you don't know (yet).&lt;br /&gt;&lt;br /&gt;Also look at &lt;a href="http://www.hanselman.com/babysmash/index.htm"&gt;BabySmash!&lt;/a&gt; by Scott Hanselman - a great introduction to WPF and the way to it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-2003959269624284714?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/2003959269624284714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/01/what-great-net-developers-ought-to-know.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2003959269624284714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2003959269624284714'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/01/what-great-net-developers-ought-to-know.html' title='What Great .NET Developers Ought To Know'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-2022066188219649403</id><published>2009-01-09T09:00:00.000+01:00</published><updated>2009-04-22T13:22:26.508+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compression'/><category scheme='http://www.blogger.com/atom/ns#' term='OpenXDF'/><title type='text'>Happy new Year, OpenXDF and Compression</title><content type='html'>We're looking for a better and smarter way to save our data. We discovered the &lt;a href="http://www.openxdf.org/index.php"&gt;OpenXDF-format&lt;/a&gt; which just turned to version 1. The quintessence of the format for me is the differenciation of the signal data, the video data and the rest. So you can use ISerializable to easily serialize all the data (events, patient data, etc.). OpenXDF proposes to add all the files to a compressed file.&lt;br /&gt;&lt;br /&gt;In .net, you can use System.IO.Compression to compress a file but you need extra work to handle files like in a zip archive (see the &lt;a href="http://msdn.microsoft.com/en-us/library/ywf6dxhx.aspx"&gt;Compression Application Sample&lt;/a&gt; for how to do that).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-2022066188219649403?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/2022066188219649403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/01/happy-new-year-openxdf-and-compression.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2022066188219649403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2022066188219649403'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/01/happy-new-year-openxdf-and-compression.html' title='Happy new Year, OpenXDF and Compression'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5984597728430031870</id><published>2008-12-10T09:00:00.000+01:00</published><updated>2009-04-22T13:52:26.512+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ranorex'/><category scheme='http://www.blogger.com/atom/ns#' term='Test Automation'/><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>Ranorex again and Unlocker</title><content type='html'>Now I know what a pre-alpha release means... I wrote several genious automatic tests and once in a while after renaming a test-bundle, all my code-customizations were gone and the standard-generated code was there. Very annoying! I pointed that out in the Ranorex-forum and they advised me to use inheritance. Quite a good tip and works for me :)&lt;br /&gt;&lt;br /&gt;Another tool I don't want to miss anymore is &lt;a href="http://ccollomb.free.fr/unlocker/"&gt;Unlocker&lt;/a&gt;. Whenever you want to delete or rename a folder (e.g. C:\Programme\Weinmann) and a process still has a hold on some files (e.g. Visual Studio, Ranorex Studio or Explorer), you can see that with this tool and even cut off the handle to the file and continue with work :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5984597728430031870?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5984597728430031870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2008/12/ranorex-again-and-unlocker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5984597728430031870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5984597728430031870'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2008/12/ranorex-again-and-unlocker.html' title='Ranorex again and Unlocker'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-2962397867804538971</id><published>2008-12-05T09:00:00.000+01:00</published><updated>2009-11-04T14:32:24.047+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><category scheme='http://www.blogger.com/atom/ns#' term='Ranorex'/><category scheme='http://www.blogger.com/atom/ns#' term='Test Automation'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Book review "SOA?" and Ranorex</title><content type='html'>I recently finished (actually "flew over") the SOA-book: too academic and packed with stuff I don't bother. So don't waste your time with that book.&lt;br /&gt;&lt;br /&gt;Today, I installed &lt;a href="http://www.ranorex.com/"&gt;Ranorex&lt;/a&gt;: a GUI automation testing tool which can generate C#-code (yes! no scripting-bullshit like AutoIt or Workspace Macro Pro). With that, you can easily record test cases and elaborate them enhancing the generated code. One day and I managed to make a setup-test for the VENTIlogic: start WEINMANNsupport, select automatic port-search, create a new patient with !!!random!!! name, start the import, after import start WEINMANNadjust, connect to the device via automatic port-search, load "Werkseinstellungen" and change some parameters. Did I already mentioned the best? You can validate the results - great!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-2962397867804538971?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/2962397867804538971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2008/12/book-review-soa-and-ranorex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2962397867804538971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/2962397867804538971'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2008/12/book-review-soa-and-ranorex.html' title='Book review &quot;SOA?&quot; and Ranorex'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-5807409336448247345</id><published>2008-12-02T09:00:00.000+01:00</published><updated>2009-04-22T13:51:38.606+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tool'/><title type='text'>New look and ISO Recorder</title><content type='html'>New look :) I finally found the "=" characters ;)&lt;br /&gt;&lt;br /&gt;One tool I don't want to miss anymore is &lt;a href="http://isorecorder.alexfeinman.com/isorecorder.htm"&gt;ISO Recorder&lt;/a&gt; (create iso-files for WEINMANNsupport-Setup or SD-card-simulation). It integrates nicely into the context menu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-5807409336448247345?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/5807409336448247345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2008/12/new-look-and-iso-recorder.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5807409336448247345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/5807409336448247345'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2008/12/new-look-and-iso-recorder.html' title='New look and ISO Recorder'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-7442965760327563854</id><published>2008-12-01T09:00:00.000+01:00</published><updated>2009-04-22T13:13:30.059+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SOA'/><title type='text'>I hate select case</title><content type='html'>*Gähn* the SOA-book (&lt;a href="http://www.amazon.de/SOA-Serviceorientierung-Business-Software-Xpert-Press/dp/3540718710/ref=sr_1_12?ie=UTF8&amp;s=books&amp;qid=1228119159&amp;sr=8-12"&gt;SOA?&lt;/a&gt;) is sooo booooring. The business-part is too big. I fought to page 117 of 390 and no software in sight. I'll give it a try at least till 16.12. - on that day I have to return it to the library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-7442965760327563854?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/7442965760327563854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2008/12/i-hate-select-case.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7442965760327563854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/7442965760327563854'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2008/12/i-hate-select-case.html' title='I hate select case'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-9085481924800278524</id><published>2008-11-26T09:00:00.000+01:00</published><updated>2009-11-04T14:32:24.047+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Book review "Essential Software Architecture"</title><content type='html'>Tomorrow I will finish &lt;a href="http://www.amazon.com/Essential-Software-Architecture-Ian-Gorton/dp/3540287132"&gt;Essential Software Architecture&lt;/a&gt;. Ian Gorton uses a real web-project all over the book and it fits surprisingly good in all chapters supporting the content by fabulous examples. Maybe the chapters were constructed around the project because the book itself has a way too much web-related content in my opinion. At the end of the book (actually 1/3 of it), there are chapters presenting one emerging new technology each. Of course MDA and SOA are on board. But what is really interesting is Aspect Oriented Architecture (AOP). My next book will handle SOA - maybe the one after SOA will be about AOP, we'll see :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-9085481924800278524?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/9085481924800278524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2008/11/book-review-essential-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/9085481924800278524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/9085481924800278524'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2008/11/book-review-essential-software.html' title='Book review &quot;Essential Software Architecture&quot;'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-1016295812595355822</id><published>2008-11-19T09:00:00.000+01:00</published><updated>2009-11-04T14:32:24.048+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Book review "Effektive Software-Architekturen"</title><content type='html'>Once more, yesterday I finished a book. This time the afore mentioned &lt;a href="http://www.amazon.de/gp/product/3446228462/ref=sib_rdr_dp"&gt;"Effektive Software-Architekturen"&lt;/a&gt;. Here, views are good explained - finally I got the difference between views and viewpoints :) This book has also lots of checklists and good advices which makes it a bit shallow. Next book I'm reading is Ian Gorton: Essential Software Architecture.&lt;br /&gt;&lt;br /&gt;Here are a few links I want to check out: Buschmann et al 96: A system of patterns, Bass et al: Software architecture in practice, &lt;a href="http://www.objectarchitects.de/objectArchitects/papers/whitepapers/zippedpapers/pacman03.pdf"&gt;pacman03.pdf&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-1016295812595355822?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/1016295812595355822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2008/11/book-review-effektive-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/1016295812595355822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/1016295812595355822'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2008/11/book-review-effektive-software.html' title='Book review &quot;Effektive Software-Architekturen&quot;'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-4110820373292597803</id><published>2008-11-11T09:00:00.001+01:00</published><updated>2009-11-04T14:31:34.023+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Software Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Book review "Handbuch der Software-Architektur"</title><content type='html'>I finished yesterday a book about software architecture: &lt;a href="http://www.amazon.de/Handbuch-Software-Architektur-Ralf-Reussner/dp/3898643727/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1226389029&amp;amp;sr=8-1"&gt;"Handbuch der Software-Architektur"&lt;/a&gt;. It tries to cover all themes of architecture especially with a good comparison to a "real" building-architect. Unfortunately, it becomes very abstract and far away of reality to the end of the book. It's more like a study-book than a real hands-on one. So, don't read it ;)&lt;br /&gt;&lt;br /&gt;Now I'm reading &lt;a href="http://www.amazon.de/gp/product/3446228462/ref=sib_rdr_dp"&gt;"Effektive Software-Architekturen"&lt;/a&gt;. The introduction is very amusing with a comparison between the "Wasserfallmodell", "V-Modell" and agile methods &lt;a href="http://www.amazon.de/gp/reader/3446228462/ref=sib_dp_pt#reader-page"&gt;(hier unbedingt lesen)&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-4110820373292597803?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/4110820373292597803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2008/11/book-review-handbuch-der-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/4110820373292597803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/4110820373292597803'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2008/11/book-review-handbuch-der-software.html' title='Book review &quot;Handbuch der Software-Architektur&quot;'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6930256377577147405.post-397091854882392571</id><published>2008-11-07T09:00:00.000+01:00</published><updated>2009-04-22T12:51:14.780+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MCC'/><category scheme='http://www.blogger.com/atom/ns#' term='PDC'/><category scheme='http://www.blogger.com/atom/ns#' term='Blog'/><title type='text'>The beginning</title><content type='html'>I'll try to produce a blog here about interesting stuff I found on the web. I write this in english because I hope that someone of multilingual-ISS will find an interesting link or idea here. Right now, &lt;a href="http://www.microsoftpdc.com/"&gt;PDC&lt;/a&gt; is over and many high-quality-content screencasts were being generated. &lt;a href="http://channel9.msdn.com/pdc2008/TL12/"&gt;Here&lt;/a&gt; is just one of them about the future directions for MS VB (10 especially): the underscore will finally go away!!! Also look at &lt;a href="http://channel9.msdn.com/"&gt;Channel 9&lt;/a&gt; in general and stay informed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6930256377577147405-397091854882392571?l=papamufflon.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://papamufflon.blogspot.com/feeds/397091854882392571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://papamufflon.blogspot.com/2009/04/beginning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/397091854882392571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6930256377577147405/posts/default/397091854882392571'/><link rel='alternate' type='text/html' href='http://papamufflon.blogspot.com/2009/04/beginning.html' title='The beginning'/><author><name>Tobias Walter</name><uri>http://www.blogger.com/profile/00608224689808794198</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://1.bp.blogspot.com/_w-DCOVT1BMQ/TMv9etk5wEI/AAAAAAAADK0/sa62xSYZRmI/S220/DSC_0452.JPG'/></author><thr:total>0</thr:total></entry></feed>
