<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.lostechies.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Jazzlog</title><subtitle type="html" /><id>http://www.lostechies.com/blogs/jasdeep_singh/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.lostechies.com/blogs/jasdeep_singh/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.lostechies.com/blogs/jasdeep_singh/atom.aspx" /><generator uri="http://communityserver.org" version="4.1.30929.2835">Community Server</generator><updated>2007-04-10T12:49:00Z</updated><entry><title>Ubiquitous Language can be refactored!</title><link rel="alternate" type="text/html" href="/blogs/jasdeep_singh/archive/2007/05/15/ubiquitous-language-can-be-refactored.aspx" /><id>/blogs/jasdeep_singh/archive/2007/05/15/ubiquitous-language-can-be-refactored.aspx</id><published>2007-05-15T18:05:21Z</published><updated>2007-05-15T18:05:21Z</updated><content type="html">&lt;p&gt;&lt;em&gt;Recognize that a change in &lt;/em&gt;&lt;a href="http://domaindrivendesign.org/discussion/messageboardarchive/UbiquitousLanguage.html"&gt;&lt;em&gt;UbiquitousLanguage&lt;/em&gt;&lt;/a&gt;&lt;em&gt; is a change to the model. &lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;Excerpted from &lt;a href="http://domaindrivendesign.org/discussion/messageboardarchive/DomainDrivenDesignBook.html"&gt;DomainDrivenDesignBook&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;We all understand the importance of ubiquitous language as the basis of communication amongst the stakeholders of a project.&amp;nbsp;Often we have had modeling sessions with the business team when we talk UL, yet in the back of our minds we might not like the terms that are being used to describe various&amp;nbsp;entities/value objects/aggregates/services etc in our discussion. Most often than not, we may have resigned to the terms as permanent; sometimes we might not even care. Alright, the point that I am trying to make is that if the domain model equates to code and&amp;nbsp;TDD practitioners seldom think twice before refactoring code (we call it courage bundled with the abilities of Resharper); so why do we hesitate to change the UL?&lt;/p&gt; &lt;p&gt;The UL gets created when the first code is written. It grows as the code grows and gets dirty as more and more crap (no pun intended) gets added to it. And yet, we sometimes undergo massive code refactoring exercises without thinking too much about how that will impact the model. And if its changing the model, its bound to have an affect on UL.&lt;/p&gt; &lt;p&gt;There is always that potential that our model and UL might have a mismatch and I believe every effort should be made to not let that happen. &lt;/p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Ubiquitous+Language+can+be+refactored!&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjasdeep_singh%2farchive%2f2007%2f05%2f15%2fubiquitous-language-can-be-refactored.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjasdeep_singh%2farchive%2f2007%2f05%2f15%2fubiquitous-language-can-be-refactored.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=237" width="1" height="1"&gt;</content><author><name>jssingh</name><uri>http://www.lostechies.com/members/jssingh/default.aspx</uri></author><category term="Ubiquitous Language" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/Ubiquitous+Language/default.aspx" /><category term="Domain Driven Design" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/Domain+Driven+Design/default.aspx" /></entry><entry><title>Self-Documenting Unit Tests</title><link rel="alternate" type="text/html" href="/blogs/jasdeep_singh/archive/2007/04/10/self-documenting-unit-tests.aspx" /><id>/blogs/jasdeep_singh/archive/2007/04/10/self-documenting-unit-tests.aspx</id><published>2007-04-10T16:49:00Z</published><updated>2007-04-10T16:49:00Z</updated><content type="html">&lt;P&gt;We have been practicing agile for more than a few years now and getting better as&amp;nbsp;we move along, or at least that's the goal and a desired expectation from the&amp;nbsp;team; rightfully so since humans typically learn from experience. We jumped on the notion that by going agile, we can certainly reduce the mostly obsolete documents that managers/developers strive to keep current (or not), and fail. So the idea of having self documented code and unit tests sounded encouraging, to say the least. &lt;/P&gt;
&lt;P&gt;The inspiration for this blog entry is &lt;STRONG&gt;not &lt;/STRONG&gt;to comment about the&amp;nbsp;&lt;EM&gt;want&lt;/EM&gt; of having comments within code, since there is unquestionably&amp;nbsp;no need, even though that's a very hot &lt;EM&gt;unresolved&lt;/EM&gt; topic. A very personal opinion, and I agree with folks out there, for having code comments is when you would like to proudly apologize for your work. "&lt;EM&gt;I so am superciliously sorry for writing this code, since I and only I can read it, lest you shall read the comments that I wrote&lt;/EM&gt;".&lt;/P&gt;
&lt;P&gt;The inspiration for this blog entry &lt;STRONG&gt;is&lt;/STRONG&gt; really to better understand how we can write self-documenting code, and very specifically the unit tests. We should take pride in the fact that new developers on the team are easily be brought on board to the design of the system merely by taking a look at the unit tests. In an ideal situation that may be the case, however in reality it's more far fetched than it seems. I personally got baffled last week when I started to delve into a feature of our system developed a few months ago. We have strived to keep our unit tests clean and readable, more so functional. The unit/feature/system design obtained by practicing&amp;nbsp;TDD certainly would make all the sense having known&amp;nbsp;the &lt;STRONG&gt;context &lt;/STRONG&gt;under which&amp;nbsp;it was established. The context is what defines the behavior of the system, it is what goes on to be gloriously enbraced by the domain model and it is what helps determine the overall design of a system.&amp;nbsp;Best practices of appropriately naming variables, methods, classes etc. are all part of establishing a clear context, which in turn provides clarity and the most needed self-documentation.&lt;/P&gt;
&lt;P&gt;In comes &lt;A href="http://behaviour-driven.org/" target=_blank&gt;&lt;FONT color=#669966&gt;BDD&lt;/FONT&gt;&lt;/A&gt; or &lt;A href="http://behaviour-driven.org/" target=_blank&gt;&lt;FONT color=#669966&gt;Behavior Driven Design&lt;/FONT&gt;&lt;/A&gt; and suddenly there is light, literally shone on the context. As my colleague &lt;A href="http://www.agilejoe.com/" target=_blank&gt;&lt;FONT color=#669966&gt;Joe O&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;talks in his &lt;A href="http://www.lostechies.com/blogs/joe_ocampo/archive/2007/03/05/nunit-behavior-driven-development.aspx" target=_blank&gt;&lt;FONT color=#669966&gt;post&lt;/FONT&gt;&lt;/A&gt;,&amp;nbsp;and Scott Bellware&amp;nbsp;exhibits the &lt;A href="http://codebetter.com/blogs/scott.bellware/archive/2006/12/18/156436.aspx" target=_blank&gt;&lt;FONT color=#669966&gt;BDD Extension Methods&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;in Orcas that he has been playing with, and the industry in general, behavior as expressed by context has become the most focussed aspect of writing software, more importantly the unit tests and everything follows suit. &lt;/P&gt;
&lt;P&gt;I firmly believe that "comments within code" issue can never be resolved, however for those like me who would rather write simpler code &lt;A href="http://behaviour-driven.org/" target=_blank&gt;&lt;FONT color=#669966&gt;BDD&lt;/FONT&gt;&lt;/A&gt; is the way to go.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;a href="http://www.dotnetkicks.com/kick/?title=Self-Documenting+Unit+Tests&amp;url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjasdeep_singh%2farchive%2f2007%2f04%2f10%2fself-documenting-unit-tests.aspx"&gt;&lt;img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.lostechies.com%2fblogs%2fjasdeep_singh%2farchive%2f2007%2f04%2f10%2fself-documenting-unit-tests.aspx" border="0" alt="Kick It on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=126" width="1" height="1"&gt;</content><author><name>jssingh</name><uri>http://www.lostechies.com/members/jssingh/default.aspx</uri></author><category term="Orcas" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/Orcas/default.aspx" /><category term="self-documenting" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/self-documenting/default.aspx" /><category term="comments" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/comments/default.aspx" /><category term="BDD" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/BDD/default.aspx" /><category term="agile" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/agile/default.aspx" /><category term="BDD Extension Methods" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/BDD+Extension+Methods/default.aspx" /><category term="inspiration" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/inspiration/default.aspx" /><category term="Behavior Driven Design" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/Behavior+Driven+Design/default.aspx" /><category term="unit tests" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/unit+tests/default.aspx" /><category term="design" scheme="http://www.lostechies.com/blogs/jasdeep_singh/archive/tags/design/default.aspx" /></entry></feed>