<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://codebetter.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Scott Bellware [MVP]</title><link>http://codebetter.com/blogs/scott.bellware/default.aspx</link><description>The sure way to predict the future is to invent it</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><item><title>SetUp and Teardown Methods in Test Classes</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/21/168390.aspx</link><pubDate>Sat, 22 Sep 2007 03:39:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:168390</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Jim Newkirk is blogging about &lt;a href="http://jamesnewkirk.typepad.com/posts/2007/09/why-you-should-.html"&gt;the down side of setup and teardown methods&lt;/a&gt; in test classes, and why you shouldn&amp;#39;t use them.&lt;/p&gt;
&lt;p&gt;Setup and teardown methods attract entropy faster than an outsource programmer with his first patterns book.&lt;/p&gt;
&lt;p&gt;Jim&amp;#39;s &lt;a href="http://jamesnewkirk.typepad.com/posts/2007/09/announcing-xuni.html"&gt;new framework&lt;/a&gt;, xUnit.NET doesn&amp;#39;t have primitives for setup and teardown, although it sounds like there are mechanisms that could be used to accomplish the same kind of thing.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/rosherove/archive/2007/09/21/xunit-net-aims-to-be-the-next-nunit-but-it-s-too-soon.aspx"&gt;Roy feels&lt;/a&gt; that &lt;a href="http://weblogs.asp.net/rosherove/archive/2007/09/21/xunit-net-aims-to-be-the-next-nunit-but-it-s-too-soon.aspx"&gt;xUnit.NET&lt;/a&gt; isn&amp;#39;t quite there yet.&amp;nbsp; I think that Roy&amp;#39;s perspective will be reflected by lots of folks who have become used to NUnit (et al) over the past six years.&lt;/p&gt;
&lt;p&gt;I think that Jim is on the right track, but I&amp;#39;m the kind of guy that feels that a test class&amp;#39;s greatest responsibility is to document behavior in the clearest possible way, even if that means sacrificing design qualities best reserved for functional code - like reuse.&lt;/p&gt;
&lt;p&gt;Unit test patterns in .NET can learn a lot from RSpec, where setup and teardown methods, as well as test methods themselves, are kept small - tiny, actually - by breaking up multiple test classes into smaller, more focused modules.&lt;/p&gt;
&lt;p&gt;An RSpec context (&amp;quot;Describe&amp;quot; block) doesn&amp;#39;t have a direct equivalent in .NET and NUnit, but the spirit of a test context can still be achieved.&lt;/p&gt;
&lt;p&gt;A context is typically smaller than an xUnit test class.&amp;nbsp; Because it&amp;#39;s smaller, it avoids a significant contributor to test class entropy.&lt;/p&gt;
&lt;p&gt;Here are a couple practices that I use in RSpec to keep entropy at bay that are also applicable to unit testing practices in .NET: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don&amp;#39;t put anything in a setup method that doesn&amp;#39;t pertain to every test method in the test class&lt;/li&gt;
&lt;li&gt;If you have stuff in a setup method that doesn&amp;#39;t pertain to each test method, break up the test class into multiple test classes where the instance members initialized in the setup pertain to each test method in the new test classes.&lt;/li&gt;
&lt;li&gt;These new, smaller test classes are test &amp;quot;contexts&amp;quot;.&lt;/li&gt;
&lt;li&gt;Keep related contexts in the same file.&lt;/li&gt;
&lt;li&gt;When you get four or five test methods in a single context, consider whether the test methods are related to the same concern.&amp;nbsp; If they&amp;#39;re not, break up the context.&lt;/li&gt;
&lt;li&gt;Name contexts for the concern.&lt;/li&gt;
&lt;li&gt;Name test methods to describe the experience of the concern under test, not the implementation of either the test or the functional code.&lt;/li&gt;
&lt;li&gt;If you can&amp;#39;t see the setup method on the same screen and in the same glance as the test methods, break up the context.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The problem with setup methods has to do with solubility.&lt;/p&gt;
&lt;p&gt;Loading setup methods up with initialization that doesn&amp;#39;t pertain to each test method and having test classes the scroll on out of sight saps solubility.&lt;/p&gt;
&lt;p&gt;If you really want setup behavior in xUnit.NET, I bet you can figure out a way to make that happen.&amp;nbsp; However, Jim and Brad are giving you a chance to reconsider your own testing practices in light of their extensive experience, and in light of emerging beliefs about unit testing and test-driven practices as they continue to evolve based on the discoveries of some of the field&amp;#39;s most persistent explorers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Test-Driven+Development/default.aspx">Test-Driven Development</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Solubility/default.aspx">Solubility</category></item><item><title>SOA, BI, Events, and Push</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/21/168371.aspx</link><pubDate>Fri, 21 Sep 2007 16:27:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:168371</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Arnon talks about event-based BI:&lt;br /&gt;&lt;a href="http://www.infoq.com/articles/BI-and-SOA"&gt;http://www.infoq.com/articles/BI-and-SOA&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is exactly what I&amp;#39;ve been thinking about for our Rails / .NET integrated solution.&amp;nbsp; I thought that this architecture would be received as heresy.&amp;nbsp; I&amp;#39;m stoked to see that folks like Arnon are out in front (of my efforts at least) blazing a path.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>My Credo</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/12/167857.aspx</link><pubDate>Wed, 12 Sep 2007 06:46:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:167857</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I never believe that anything I do is correct until I subject it to the to inquiry, &amp;quot;How is this wrong?&amp;quot;&lt;/p&gt;
&lt;p&gt;I believe that everything I do is suspect.&amp;nbsp; This is my point of departure for every single line of code I write.&amp;nbsp; Over the past few years this inquiry has become instinctual.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>Write Specs to the Experience Rather than the Implementation</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/09/167747.aspx</link><pubDate>Mon, 10 Sep 2007 02:29:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:167747</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;This post is a place-holder for a longer post with examples, but I&amp;#39;ve been sitting on this one for months, so I thought I&amp;#39;d just toss it out there for what its worth.
&lt;/p&gt;
&lt;p&gt;Unit testing practices often make no bones with writing test names that describe the implementation.&amp;nbsp; You see signs of this when programmer-speak shows up in test names.&amp;nbsp; More egregious words like &amp;quot;returns&amp;quot; and &amp;quot;calls&amp;quot; and &amp;quot;invokes&amp;quot; and &amp;quot;raises&amp;quot; and &amp;quot;throws&amp;quot; litter the test names.&amp;nbsp; In more subtle cases, the test names describe the code in the test method itself.&lt;/p&gt;
&lt;p&gt;Behavior-driven test names, or specification names, should describe the experience of the user of the, even if the immediate use is another piece of code.&lt;/p&gt;
&lt;p&gt;For example rather than using &amp;quot;...throws an exception&amp;quot; in a test name, you could say, &amp;quot;...is not allowed.&amp;quot;&lt;/p&gt;
&lt;p&gt;You might think that this will lead to tests that are less discoverable, but it doesn&amp;#39;t work out that way in practice.&amp;nbsp; When I follow stick to good test code practices and patterns all around, I end up with code that is as discoverable, and often more discoverable than if I tired to capture in the test name that which is already in the test code.&lt;/p&gt;
&lt;p&gt;This means having a &lt;i&gt;single concern per test&lt;/i&gt;. This often equates to having &lt;i&gt;one assert per test&lt;/i&gt;, but the &lt;i&gt;one assert per test&lt;/i&gt; rule is a poor choice of language that doesn&amp;#39;t express the essence of the problem directly, and depends on the programmer to already know what the rule is rather than rely on how the rule is commonly expressed by those who already know it instinctively (a common problem in agile development).&lt;/p&gt;
&lt;p&gt;It also means keeping setup code focused on a single concern and not using too many mocks.&amp;nbsp; And it means a whole lot of stuff that is probably too subtle to describe than it is to demonstrate in code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Behavior-Driven+Development/default.aspx">Behavior-Driven Development</category></item><item><title>TDD is About Not Knowing</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/09/167738.aspx</link><pubDate>Mon, 10 Sep 2007 00:32:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:167738</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The greatest obstruction to grokking Test-Driven Development is the assertion that a developer makes to himself about how right his plans are for a solution.
&lt;/p&gt;
&lt;p&gt;The essence of TDD is a suspension of our belief that we know what we&amp;#39;re doing, and a submission to a structured process of exploration and elaboration of ideas.&lt;/p&gt;
&lt;p&gt;No matter how certain I am that a conception of a design is right, I test the assumption against reality through TDD.&amp;nbsp; I inevitably find that the higher level of my design ideas withstand TDD scrutiny, but the fine-grained atomic design assumptions don&amp;#39;t pass muster with any great regularity.&lt;/p&gt;
&lt;p&gt;Because of this, I rarely even try to conceive of low level design ideas up front.&amp;nbsp; I know that by fleshing them out though a process of specification with code that I end up with a good result in good time, and the result is frequently better than what I had assumed, and often in surprising ways that open me up to new avenues of learning and understanding in programming and design.&lt;/p&gt;
&lt;p&gt;Most good developers refute TDD&amp;#39;s viability, and yet many excellent developers practice it diligently, and claim that they went from being good to excellent because of what they learned with TDD.&lt;/p&gt;
&lt;p&gt;I think that the difference between a good developer and an excellent developer is the excellent developer&amp;#39;s willingness to not know, an openness to explore, and faith in skills that guide solutions to good ends even when the end is not known at the outset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Test-Driven+Development/default.aspx">Test-Driven Development</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>Agile Doesn't Have the Answers</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/09/167734.aspx</link><pubDate>Mon, 10 Sep 2007 00:03:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:167734</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Agile doesn&amp;#39;t have a One True Answer for software development.&amp;nbsp; Agile gives you a structured way to seek feedback on your on-going exploration.&lt;/p&gt;
&lt;p&gt;A predisposition to believe in a One True Answer for anything is one of the worst hindrances to grokking agile development.&lt;/p&gt;
&lt;p&gt;Because many methodologies that came before agile were delivered as answers to problems rather than means to effective explore problems - including the methodology itself - folks are still getting hung up on out-dated habits that themselves act as obstructions to agile development&amp;#39;s essence.&lt;/p&gt;
&lt;p&gt;Agile development isn&amp;#39;t a &amp;quot;solution&amp;quot; to anything unless it&amp;#39;s done in a way that encourages exploration and has a strong focus on harvesting feedback.&lt;/p&gt;
&lt;p&gt;When I hear folks say, &amp;quot;...and so we turned to agile because we thought it could solve our problems,&amp;quot; I hear the predispositions of a generation of methodologies that were sold as solutions rather than as inquisitions.&lt;/p&gt;
&lt;p&gt;Agile will show you more problems than you ever thought you had before you start to see some progress against these problems.&amp;nbsp; And that progress will come from your open exploration of the truth of your problems rather than from a cork board with index cards, ten-minute daily meetings, and monthly deliveries.&lt;/p&gt;
&lt;p&gt;Agile doesn&amp;#39;t deliver answers, it only offers you a way to create a safe place to ask hard questions and the permission to try find the answers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category></item><item><title>Smurf... er, Scrum</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/09/167733.aspx</link><pubDate>Sun, 09 Sep 2007 23:32:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:167733</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I started doing something recently that I wish in retrospect hadn&amp;#39;t occurred to me, because now I can&amp;#39;t stop.&lt;/p&gt;
&lt;p&gt;I was at a presentation recently where the speaker used to word &amp;quot;scrum&amp;quot; as a prefix for everything that his team does.&amp;nbsp; At some point it occurred to me that, for some folks, &amp;quot;scrum&amp;quot; had become the System.Object of terms.&lt;img style="margin:5px;float:right;" src="http://codebetter.com/blogs/scott.bellware/smurf.jpeg" width="150" height="113" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;This led me to reflect on the only other culture that I knew of that has a universal word: The Smurfs!&amp;nbsp; As soon as this regretful thought crossed my mind, I started subconsciously replacing &amp;quot;scrum&amp;quot; with &amp;quot;smurf&amp;quot; every time I heard the word.&lt;/p&gt;
&lt;p&gt;Smurf Room.&amp;nbsp; Daily Smurf.&amp;nbsp; Smurf Planning.&amp;nbsp; Etc, etc, etc.&amp;nbsp; And unfortunately, I find myself snickering now when I hear someone talking about scrum for the absurdity of it all.&amp;nbsp; Kinda like imagining your audience in their underwear.&lt;/p&gt;
&lt;p&gt;So, if you and I are ever having a conversation about scrum and I start snickering, please don&amp;#39;t assume that I&amp;#39;m laughing at you for your interest in scrum... I&amp;#39;m just having an inner moment of smurfrette&amp;#39;s disorder.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category></item><item><title>Yesterday's Agile</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/09/02/167421.aspx</link><pubDate>Mon, 03 Sep 2007 04:16:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:167421</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Been thinking about what&amp;#39;s next for agile development...&lt;/p&gt;
&lt;p&gt;TDD is still young, but not as young as it was.&amp;nbsp; BDD is creating greater artifact, process, and team unification opportunities for test-first programming in an agile process.&amp;nbsp; Some of tomorrow&amp;#39;s practices are already starting to appear, but there&amp;#39;s a possibility, as is usual with all things human, that today&amp;#39;s agile activists can either be tomorrow&amp;#39;s agile activists or tomorrow&amp;#39;s agile friction.&lt;/p&gt;
&lt;p&gt;Agile development has only had one generation of progress.&amp;nbsp; If the second generation is just around the corner, then today&amp;#39;s agilists&amp;#39; identification with the practices that they are known for may be the very weight that slows the transition.&lt;/p&gt;
&lt;p&gt;The transition to the second generation of paradigms of any old thing in any old lifetime is a difficult transition.&amp;nbsp; The transition to a second generation paradigm is the event that brings people face to face with the impermanence of the ways and means that they may have likely become identified with in the first and only generation.&amp;nbsp; Getting to tomorrow&amp;#39;s agile will be as much or more of a process of letting go as it will be a process of acquiring additional - sometimes historically contradictory - knowledge and practices.&lt;/p&gt;
&lt;p&gt;So, will today&amp;#39;s TDD celebrities in the .NET world be able to let go of the practice that has become a big part of their identities and move forward with an eye toward progressiveness as they did in 2001 when NUnit started many journeys into unit testing, TDD, and greater agile?&lt;/p&gt;
&lt;p&gt;What will tomorrow&amp;#39;s agile practices be?&amp;nbsp; Will we have the energy to move forward with verve and vigor as we did back in the day?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Commentary/default.aspx">Commentary</category></item><item><title>Monorail vs. Rails Isn't a Meaningful Question</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/08/07/166539.aspx</link><pubDate>Wed, 08 Aug 2007 01:55:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:166539</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Monorail vs. Rails doesn&amp;#39;t seem like much of an interesting question.&amp;nbsp; In our work recently at Dovetail, we found that a much more interesting question is something like, &amp;quot;Should we be building forms-over-data web apps on .NET?&amp;quot;&lt;/p&gt;
&lt;p&gt;If I have to build a web app on .NET, I&amp;#39;d use Monorail... but I&amp;#39;m beginning to see the use of .NET for most web apps along the lines of the proverbial use of a bazooka to swat mosquitoes.&amp;nbsp; I can see a possible (or likely) future, where I will not ordinarily choose to use .NET to build a web app unless I was forced to do so... assuming that .NET isn&amp;#39;t significantly overhauled at some point.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;ve gotta build a web app on .NET, then Monorail and the Castle Project is could very well be your project&amp;#39;s saving grace, and you should really consider trying it out before you build another web app on &amp;quot;raw&amp;quot; ASP .NET and webforms.&lt;/p&gt;
&lt;p&gt;From my perspective now, Monorail is to ASP .NET as ReSharper is to Visual Studio.&amp;nbsp; Without Monorail, ASP .NET seems a bit primitive, incomplete, and not just a little odd considering how hard ASP .NET as a web app framework tries to pretend that it&amp;#39;s not a framework for building apps on the web.&amp;nbsp; Before VB, folks were built business apps using C++.&amp;nbsp; If ASP .NET remains fixated on its current course, I wouldn&amp;#39;t be surprised if ASP .NET will be to Rails as C++ became to VB.&amp;nbsp; My own experience of Rails points to .NET being overkill for most of what we need to build most web apps.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s a question that I&amp;#39;ve been floating in my community lately: &amp;quot;What assumptions lead you to believe that .NET is the right framework to build web apps on?&amp;quot;&amp;nbsp; One of the more common answers can be boiled down to something like, &amp;quot;Because we made a lot architectural decisions up front that we can&amp;#39;t correct now, and because of this the mosquitoes we&amp;#39;re swatting are now as big as elephants... which are more effectively swatted with a bazooka.&amp;quot;&lt;/p&gt;
&lt;p&gt;So, if you&amp;#39;re building web apps on .NET, what leads you to assume that you shouldn&amp;#39;t be building on Monorail?&amp;nbsp; And even more fundamentally, if you&amp;#39;re building web apps on .NET, what leads you to assume that you should be building on .NET?&lt;/p&gt;
&lt;p&gt;There are reasons for either of the three choices, but we technologists often fail to actually make a choice as much as we choose not to choose for not being even aware of our choices.&amp;nbsp; How do you know that you&amp;#39;re using the best, most productive tools?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Ruby+and+Rails/default.aspx">Ruby and Rails</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Web/default.aspx">Web</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>Accountability: Behavior-Driven Development's Other Leg</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/08/07/166503.aspx</link><pubDate>Tue, 07 Aug 2007 07:23:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:166503</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Accountability is a huge part of agile development.&amp;nbsp; Behavior-Driven Development (BDD) drives accountability deep into development by having developers maintain the language of the business through the continuum of development process artifacts from user stories, through specifications, and into the application code.&lt;/p&gt;
&lt;p&gt;BDD tools support accountability by surfacing specification documents from the executable descriptions of the application that developers have incrementally created through the plain-old Test-Driven Development process with a BDD framework like RSpec.&lt;/p&gt;
&lt;p&gt;Stakeholders rarely get a glimpse into the stuff that developers are doing until shippable functionality is shipped, at which point, the software speaks for itself.&amp;nbsp; But simply having working software in-hand isn&amp;#39;t always enough, if it were, the drive for ever better acceptance testing tools and practices wouldn&amp;#39;t exist.&lt;/p&gt;
&lt;p&gt;Part of our accountability to stakeholders rests in proving that we implemented what they assumed we would implement, and that we understood their requirements in the same way that they understand them.&lt;/p&gt;
&lt;p&gt;In BDD, developers engage customers in a feedback dialog in the language of the business.&amp;nbsp; A customer would say, &amp;quot;I want you to implement X in such-and-such a way,&amp;quot; and the developer replies, &amp;quot;I understood that you&amp;#39;re asking me to implement X in such-and-such a way.&amp;quot;&amp;nbsp; This is partly what it means to say that &lt;i&gt;a story is a placeholder for a conversation&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;Using a BDD framework, developers write executable versions of the customer&amp;#39;s user stories and the acceptance criteria of those stories, and does so using plain business language.&amp;nbsp; If the customer were to read the executable specifications that were written by the developer, he should recognize the requirements that he laid out.&lt;/p&gt;
&lt;p&gt;The BDD specifications become part of the feedback dialog, except that they do so in the form of a report that is generated from them specification code rather than from a conversation.&amp;nbsp; The report doesn&amp;#39;t replace conversations, but it does support the dialog and it gives concrete testimony to the developer&amp;#39;s understanding of the requirements at the time that he implemented them.&lt;/p&gt;
&lt;p&gt;A stakeholder can read the specification document and gain the confidence that the developer understood the requirements, or that he misunderstood them.&amp;nbsp; As long as the developer strives for an ability to capture the specifications in clear and sensible language, a stakeholder will recognize his business behaviors and processes in the spec doc.&lt;/p&gt;
&lt;p&gt;Subsequently, when the developers discipline themselves to write executable specifications in the language of the business, they are caused to think through the wording of a specification and this causes them to be constantly immersed in the consideration of the domain and the domain language.&amp;nbsp; Class libraries and API&amp;#39;s that emerge from this kind of consideration typically have a much greater affinity to the business domain that the application serves, and this is also a form of accountability.&lt;/p&gt;
&lt;p&gt;By ensuring that the application code respects the domain language, the application code is more recognizable and thus easier to understand, which makes it easier to learn and easier to change and to maintain.&amp;nbsp; Keeping the software code true to the domain is a critical part of an application&amp;#39;s resilience to change and resistance to rot.&amp;nbsp; From a BDD perspective, respecting the domain language is as fundamental a design principal as testability.&lt;/p&gt;
&lt;p&gt;BDD instills a 360 degree accountability feedback loop.&amp;nbsp; Stakeholders write stories; they add acceptance criteria to the stories; developers talk to stakeholders to understand to business of the story and to get an earful of the domain language; developers capture the acceptance criteria in domain language as executable specifications using a BDD tool; developers implement the application code using practices and patterns like Domain-Driven Design that further respect and enforce the domain language; stakeholders are given access to a report that is generated from the executable specifications that are themselves based on the domain model, and this report is used to vet the developer&amp;#39;s understanding of what was to be built.&lt;/p&gt;
&lt;p&gt;A specification document is a developer&amp;#39;s way of saying, &amp;quot;I heard you ask me for &lt;i&gt;this&lt;/i&gt;, and &lt;i&gt;this&lt;/i&gt; is what I built (handing the user the spec document).&amp;nbsp; Have I correctly advocated your needs to the software?&amp;quot;&lt;/p&gt;
&lt;p&gt;The spec document along with working software to play with as well as some form of customer acceptance test give the customer a tremendous amount of confidence that the developers are building the right thing, and that communication between customer and developer is unfettered.&amp;nbsp; This feedback also helps the developer to built better and more accurate abstractions, and doing so through the plain-old Test-Driven Development processes helps him build the right thing in the right way according to solid design principals.&lt;/p&gt;
&lt;p&gt;Through BDD stakeholders and developers work to remain accountable to each other for the clarity of communication that ensures successful product development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Agile/default.aspx">Agile</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Behavior-Driven+Development/default.aspx">Behavior-Driven Development</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>Is this What it Means to be an MVP?</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/07/18/165763.aspx</link><pubDate>Wed, 18 Jul 2007 06:58:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:165763</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;John commented:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dude, if you&amp;#39;re going to continue to take potshots at MS every chance you get, why do you want to be a *Microsoft* Valued Professional? You&amp;#39;re not valuable to them at all at this point. It&amp;#39;s like a BMW dealership hiring someone that wants to talk about Mercedes all of the time.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is this really what folks see as the role of MVP&amp;#39;s?&amp;nbsp; If this is indeed the role that the MVP program expects me to play, then there has been some miscommunication, and I would indeed be bound to return the award on principle.&lt;/p&gt;
&lt;p&gt;By point:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if you&amp;#39;re going to continue to take potshots at MS every chance you get, why do you want to be a *Microsoft* Valued Professional?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I appreciate having been awarded as an MVP for the past four years.&amp;nbsp; I work hard to not end up &lt;i&gt;wanting&lt;/i&gt; to be an MVP.&amp;nbsp; I accept the award for the reasons that I was told that I was given the award, but I don&amp;#39;t pander after it, and I don&amp;#39;t retrofit my principles with convenient Redmond-sized loopholes to ensure that I continue to receive it. MVP&amp;#39;s aren&amp;#39;t supposed to be talking heads. We&amp;#39;re supposed to be independent. In fact, independence is part of our charter as I understand it, and as it&amp;#39;s expressed by the moto, &amp;quot;Independent experts. Real world answers.&amp;quot;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You&amp;#39;re not valuable to them at all at this point&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If dissent is not valuable, and of my dedication to an almost unending effort in community facilitation in my region and abroad isn&amp;#39;t valuable, then you might be right.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It&amp;#39;s like a BMW dealership hiring someone that wants to talk about Mercedes all of the time&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Does the public really believe that MVP&amp;#39;s are supposed to toe the line and be on-message as Microsoft employees are?&amp;nbsp; Is an MVP measured by his or her willingness to merely &lt;i&gt;pretend&lt;/i&gt; to be an independent expert and yet remain on call to wax favorably about Microsoft whenever it serves Microsoft&amp;#39;s agenda?&lt;/p&gt;
&lt;p&gt;This is really distressing.&amp;nbsp; This image of the MVP program is about as satisfying as infotainment when you&amp;#39;re hankering for journalism.&lt;br /&gt;&lt;br /&gt;The definition of an MVP from the MVP site on the Microsoft support website says, &amp;quot;&lt;b&gt;Microsoft Most Valuable Professionals (MVPs) are exceptional technical community leaders from around the world who are awarded for voluntarily sharing their high quality, real world expertise in offline and online technical communities. Microsoft MVPs are a highly select group of experts that represents the technical community&amp;#39;s best and brightest, and they share a deep commitment to community and a willingness to help others.&lt;/b&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;If this is no longer applicable, I&amp;#39;d really appreciate if someone from the MVP program would ping me and let me know, because the MVP program that I feel honored to be a part of is the one that stands by this credo, not one whose consent can be bought for the mere price of an MSDN subscription and four nights of lodgings is Seattle every year.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been a Microsoft Most Valuable Professional since January of 2004. I will remain a Microsoft Most Valuable Professional for as long as the Microsoft support divisions sees fit to give me the award... or until the MVP program transforms in fact into the perverted army of shills that John apparently believes it ought to be.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Community/default.aspx">Community</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Commentary/default.aspx">Commentary</category></item><item><title>Are Rails' Model Objects "View Model Objects"? (and some questions about non-generic subdomains)</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/07/17/165701.aspx</link><pubDate>Tue, 17 Jul 2007 05:06:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:165701</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Should we assume that the model objects that we build and use in user interfaces to be reusable in other application layers and services?
&lt;/p&gt;
&lt;p&gt;I&amp;#39;m still chewing on the idea of Ruby on Rails as a web front end to a clean data model where the heavy-lifting, &lt;i&gt;enterprisey&lt;/i&gt; part of the app is written on .NET or J2EE.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m looking at Ruby on Rails as the &lt;i&gt;Visual Basic 6 of the 21st century&lt;/i&gt;.&amp;nbsp; It&amp;#39;s a means for the Mort persona to get data out of forms and into a &lt;i&gt;local application database &lt;/i&gt;that is modeled to fit the needs of the application&amp;#39;s user interaction services, like a web UI for example.&lt;/p&gt;
&lt;p&gt;From this perspective, the Rails&amp;#39;s model objects are primarily a model layer used for the UI.&amp;nbsp; They&amp;#39;re not exactly a presentation model (thanks for the clarification, &lt;a href="http://codebetter.com/blogs/jeremy.miller/default.aspx"&gt;Jeremy&lt;/a&gt;... by the way, due to the high quality technical support you provide, I&amp;#39;ve decided to sell your cell phone number to the highest bidder on eBay :), and they may not be a generically reusable model.&amp;nbsp; In fact, I&amp;#39;m really wondering if it&amp;#39;s truly possible to create a model that can be meaningfully-reused within architectural partitions of the same logical application.&amp;nbsp; And if that&amp;#39;s the case, then a light-weight model that does a really great job of specifically serving the UI might very well be a really good thing.&lt;/p&gt;
&lt;p&gt;A couple of folks commented that using Rails would mean maintaining the same business rules on two platforms.&amp;nbsp; I&amp;#39;m not sure sure that I&amp;#39;m convinced that this is the case in practice.&lt;/p&gt;
&lt;p&gt;Rails&amp;#39; DSL for model object business rules is awfully good for user interaction services validation, and this is what makes me think of Rails model objects as view (UI) model objects.&amp;nbsp; Creating Rails&amp;#39; model objects and business rules is really trivial.&amp;nbsp; Yes, I know that I&amp;#39;m suggesting something that &lt;i&gt;might&lt;/i&gt; violate DRY if the user interaction model rules intersect with the rules for the same entities as implemented on another platform and used in other contexts, but I&amp;#39;m not convinced that this intersection is sufficiently large (in all cases) to worry about it.&lt;/p&gt;
&lt;p&gt;Model objects have different rules for different contexts.&amp;nbsp; The rules applied to the UI might not be the same rules applied to asynchronous event processing and out-of-process, high-yield services.&amp;nbsp; If they&amp;#39;re not, and if I&amp;#39;m set on using the same type library in both parts of the architecture, then I need a way to configure the rules at run time, which means&amp;nbsp; that I need a rules framework and a configuration schema so that I can vary the behavior of instances of the same types used in orthogonal contexts.&lt;/p&gt;
&lt;p&gt;On the other hand, I could simply build a non-generic subdomain for the specific needs of the specific representations of the model in specific architectural partitions.&amp;nbsp; I mean, it&amp;#39;s not hard to generate some model objects to represent a clean data model.&amp;nbsp; That&amp;#39;s certainly true for Rails ActiveRecord and quite true for Castle ActiveRecord as well.&lt;/p&gt;
&lt;p&gt;Yikes!&amp;nbsp; What if the data model elements used in the UI aren&amp;#39;t even the same elements that I need in the enterprisey partitions?&amp;nbsp; If I choose to reuse a C# domain model in the UI and in the enterprisey stuff, am I doing the right thing?&amp;nbsp; I may just be pushing round pegs into square holes (yes, I&amp;#39;m deliberately inverting this metaphor).&amp;nbsp; If the data models are different, and if the business rules are different, should I be using a generic domain model?&lt;/p&gt;
&lt;p&gt;And what if the needs of one part of the app change?&amp;nbsp; Do I run different versions of the same types in different parts of the architecture so that I can achieve my .NET domain model assembly reuse goals?&amp;nbsp; Is this the right set of design pressures to yield to?&lt;/p&gt;
&lt;p&gt;What if Rails&amp;#39; model objects are really just &lt;i&gt;view model&lt;/i&gt; objects?&amp;nbsp; If they are, I can start to treat Rails the way I treated Visual Basic and Visual FoxPro... I can treat it as RAD... but a more evolved RAD... a RAD for a subsequent era of software maturity.&lt;/p&gt;
&lt;p&gt;In a software ecosystem that includes Rails, it&amp;#39;s just a tool to get data from HTML forms into an application database, to do so with a dead-simple programming model, and with assumptions of responsible, partitioned architecture, with lots of good AJAX interactivity and asynchronicity, and with a declaritive description language that I believe suits the objectives and responsibilities of the Real Mort.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Ruby+and+Rails/default.aspx">Ruby and Rails</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>Considering Ruby on Rails and Interop: Developer Skills</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/07/16/165644.aspx</link><pubDate>Mon, 16 Jul 2007 05:06:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:165644</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;We sell an enterprise product, and that product is customized by our customers.&amp;nbsp; More precisely, our product is customized by day coders.&lt;/p&gt;
&lt;p&gt;If I put Monorail and Windsor in their hands and tell them to go forth and code IoC and ORM with NHibernate after giving them some guidance and training, will they be enabled or mortified.&lt;/p&gt;
&lt;p&gt;I think that ASP .NET Web Forms are more complicated than they need be and that Monorail does a good job of simplifying web application development, and that it does all the right things for me.&amp;nbsp; I&amp;#39;m sometimes concerned about how effectively we will be able to transfer that knowledge to our customers&amp;#39; developers.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think that falling back to ASP .NET Web Forms is the right thing.&amp;nbsp; Monorail&amp;#39;s got the right stuff.&amp;nbsp; But does Ruby on Rails have &lt;i&gt;righter&lt;/i&gt; stuff?&lt;/p&gt;
&lt;p&gt;There&amp;#39;s no shortage of books on Rails and there are implementation and training partners.&amp;nbsp; Over simple data models, and clean UI&amp;#39;s built for well-designed task flows, Rails might very well be easier for day coders to grok.&amp;nbsp; I don&amp;#39;t know if that&amp;#39;s categorically true, and it will depend quite a bit on the complexity of the model Rails&amp;#39; data fetching approach which I haven&amp;#39;t looked too deeply into.&lt;/p&gt;
&lt;p&gt;Then again, I might be underestimating our customer&amp;#39;s staff.&amp;nbsp; Maybe they will grok IoC and NHiberate sufficiently.&amp;nbsp; And then again, maybe I shouldn&amp;#39;t require them too.&lt;/p&gt;
&lt;p&gt;Monorail has been a great framework to work with so far, and we haven&amp;#39;t even scratched the surface yet.&amp;nbsp; But dammit, it should be a lot easier than it is to move data from a form to a database, and do it in a way that&amp;#39;s easily testable.&amp;nbsp; I can get the testability from Ruby without the IoC, but Rails isn&amp;#39;t NHibernate.&lt;/p&gt;
&lt;p&gt;So... do I need NHibernate?&amp;nbsp; Can I design a model that simplifies storage and representation sufficiently so that it isn&amp;#39;t obligatory?&lt;/p&gt;
&lt;p&gt;If I can make the model simple enough so that I can leverage Rails, I can build the parts of the app that need to be easily customized in what might very well be a simpler set of tools.&amp;nbsp; It&amp;#39;s possible that my team might get their work on the UI done faster and that we can spend more time on parts of the app that aren&amp;#39;t customizable, are more complex, and that deliver a significant chunk of our value proposition.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not saying that the UI is a trivial piece of the system, but the .NET stuff in the backend that will indeed make use of Windsor and more than likely will make use of NHibernate is some serious business.&amp;nbsp; I&amp;#39;d like to simplify the front end if I can - even simpler than Monorail - if that&amp;#39;s possible.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m debating with myself here.&amp;nbsp; I&amp;#39;d be very interested to hear from folks who&amp;#39;ve built non-trivial stuff in Rails.&amp;nbsp; I&amp;#39;d especially like to understand more about their architectural choices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Ruby+and+Rails/default.aspx">Ruby and Rails</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>Considering Ruby on Rails and Interop: Model Code and Data Access</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/07/15/165643.aspx</link><pubDate>Mon, 16 Jul 2007 03:43:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:165643</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I&amp;#39;m concerned that if I build my application&amp;#39;s front end on Ruby on Rails that I&amp;#39;ll end up needing to create and maintain yet another model layer and data access layer for the parts of the application that don&amp;#39;t run in the web process, like out-of-process event processing services, for example.&lt;/p&gt;
&lt;p&gt;The developer in me wants to use the NHibernate layer that I&amp;#39;m familiar with rather than use ActiveRecord in the UI and NHibernate in the rest of the app.&amp;nbsp; The C# model classes I create can ostensibly be re-used and shared between the web app and other parts of the app that aren&amp;#39;t the web app.&amp;nbsp; If I use Rails, I&amp;#39;ll have a model coded in Ruby and a model coded in C#.&amp;nbsp; These models will require mapping to the database and I&amp;#39;ll need to test and maintain &lt;i&gt;both&lt;/i&gt; of those going forward.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m wondering if my assertions about using the model classes in other parts of the application - parts that aren&amp;#39;t part of the web app - is an unfounded assumption rather than a foregone conclusion.&lt;/p&gt;
&lt;p&gt;What if the model that I use in a web UI isn&amp;#39;t a sufficiently generic subdomain that it can be reused.&lt;/p&gt;
&lt;p&gt;I do data access through the model code in concert with NHibernate.&amp;nbsp; What if the data access needs of parts of the app outside of the web UI aren&amp;#39;t the same as the web UI&amp;#39;s needs.&amp;nbsp; I wouldn&amp;#39;t get the reuse that I&amp;#39;m assuming I can.&amp;nbsp; I might force my web app&amp;#39;s model and data access into an event processing service, for example, but would it be the right thing to do?&lt;/p&gt;
&lt;p&gt;If I reuse the same model and data access code in parts of apps that represent orthogonal concerns, will I be bringing over business rules that don&amp;#39;t make sense or aren&amp;#39;t applicable to all of those concerns?&amp;nbsp; If so, would an ActiveRecord model suffice for the web app.&amp;nbsp; Moreover, would it better serve the web app, and more yet, would it better serve the developers of the web app, and the developers at or customers&amp;#39; sites that customize the app?&lt;/p&gt;
&lt;p&gt;The overall question that I&amp;#39;m driving at here is whether Rails is a good enough front end for an app and whether my presumptions and prejudice about model code reuse are keeping me from making use of a simpler, more developer-friendly framework for forms over data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Ruby+and+Rails/default.aspx">Ruby and Rails</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item><item><title>Considering Ruby on Rails and Interop: Transactions</title><link>http://codebetter.com/blogs/scott.bellware/archive/2007/07/15/165623.aspx</link><pubDate>Sun, 15 Jul 2007 18:10:00 GMT</pubDate><guid isPermaLink="false">d21fbbc9-c112-4f32-ad14-95939a2c53d4:165623</guid><dc:creator>ScottBellware</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;My usual reason for outright dismissing an app with a Rails front end centers on System.Transactions ability to continue a distributed transaction that was started in a web app process into a workflow.&amp;nbsp; Since WF supports System.Transactions through compensating activities, I don&amp;#39;t want to give up the ability to issue a rollback on a transaction and have that carry through anything done with a workflow.&lt;/p&gt;
&lt;p&gt;The problem with the last sentence is the word &amp;quot;anything&amp;quot;.&amp;nbsp; It&amp;#39;s so damned vague that its meaningless from a tangible design perspective.&lt;/p&gt;
&lt;p&gt;One of our customers could put literally anything into play when our application executes a workflow hook at significant state changes coded into the app.&amp;nbsp; I can&amp;#39;t really guarantee that &lt;i&gt;anything&lt;/i&gt; put into play in a workflow can support a rollback, or even if it would be sensible to make it support atomic transactions.&lt;/p&gt;
&lt;p&gt;I literally can&amp;#39;t think of anything that we&amp;#39;re using workflow for that doesn&amp;#39;t require a more robust compensation mechanism than a System.Transactions rollback.&amp;nbsp; In fact, the scenarios that I&amp;#39;m aware of the require compensation also require user intervention. This means that the compensation task flows also require user interfaces, which in turn means that compensation would probably be better served as entirely different use cases with different workflows.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have a lot of confidence that I need to or even should support using distributed transactions in customer-customizable workflows where that transaction is managed in an execution context that is intended to be synchronous and API-oriented rather the asynchronous and message-oriented.&lt;/p&gt;
&lt;p&gt;Distributed transactions don&amp;#39;t seem like a good reason to dismiss Rails as a web front end.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Ruby+and+Rails/default.aspx">Ruby and Rails</category><category domain="http://codebetter.com/blogs/scott.bellware/archive/tags/Design/default.aspx">Design</category></item></channel></rss>