<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>You Want IT When? &#187; Design</title>
	<atom:link href="http://www.yuwantitwhen.com/blog/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuwantitwhen.com/blog</link>
	<description>Practical methods for successful software management.</description>
	<lastBuildDate>Mon, 26 Oct 2009 00:54:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Good Design is Important</title>
		<link>http://www.yuwantitwhen.com/blog/2008/08/25/good-design-is-important/</link>
		<comments>http://www.yuwantitwhen.com/blog/2008/08/25/good-design-is-important/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 05:27:00 +0000</pubDate>
		<dc:creator>Bill Miller</dc:creator>
				<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.yuwantitwhen.com/blog/?p=162</guid>
		<description><![CDATA[I just stumbled upon a blog posting by Chad Myers titled "Good Design is not Subjective."  It's hard for me to believe, but apparently this is a controversial subject in the software community today. ]]></description>
			<content:encoded><![CDATA[<p>I just stumbled upon a blog posting by Chad Myers titled &#8220;<a href="http://www.lostechies.com/blogs/chad_myers/archive/2008/08/18/good-design-is-not-subjective.aspx">Good Design is not Subjective</a>.&#8221;  It&#8217;s hard for me to believe, but apparently this is a controversial subject in the software community today.   The thrust of his position is that a good design is characterised by its ability to easily maintain and enhance while a bad design is characterised by its difficulty to maintain and enhance.  A bad design exhibits characteristics of rigidity, fragility, and immobility.  It&#8217;s an interesting article, and it is reminiscent of many of the themes advocated on this blog.  A good design is the essence of agility.   A good developer knows a good design when he sees it.  Read the article.  I&#8217;m sure you&#8217;ll like it.  The comment thread is interesting as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuwantitwhen.com/blog/2008/08/25/good-design-is-important/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Code Yourself into a Corner</title>
		<link>http://www.yuwantitwhen.com/blog/2008/08/05/dont-code-yourself-into-a-corner/</link>
		<comments>http://www.yuwantitwhen.com/blog/2008/08/05/dont-code-yourself-into-a-corner/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 11:19:35 +0000</pubDate>
		<dc:creator>Bill Miller</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Upfront]]></category>

		<guid isPermaLink="false">http://www.yuwantitwhen.com/blog/?p=83</guid>
		<description><![CDATA[Recently, when playing FreeCell to take my mind off an essay I was writing, a thought occurred to me: FreeCell illustrates the value of upfront analysis and design.  On a number of essays on yuwantitwhen.com, I've advocated that doing proper upfront analysis and design on our software projects is the best way to secure success for your projects and to shorten schedules.  Similarly, in FreeCell, I've won more games on the first try when I devoted more time to upfront analysis and developing a strategy.]]></description>
			<content:encoded><![CDATA[<p><img class=" alignleft" style="margin-left: 10px; margin-right: 10px;" title="freecell" src="http://www.yuwantitwhen.com/blog/wp-content/uploads/freecell.jpg" alt="freecell" width="240" height="178" /></p>
<p>I enjoy playing FreeCell.  It&#8217;s a form of stress release for me, sort of like smoking is to some.  Whenever I need a quick break or I&#8217;m looking to take my mind off of something, I&#8217;ll often play a game of FreeCell.  </p>
<p>FreeCell is a puzzle, requiring analysis and strategy to win.  They say every game is winnable, and I believe that it&#8217;s likely to be true.   Whenever I lose a game and I&#8217;m determined to win, I eventually win after repeated retries of the same game.</p>
<p>Recently, when playing FreeCell to take my mind off an essay I was writing, a thought occurred to me: FreeCell illustrates the value of upfront analysis and design.  On a number of essays on yuwantitwhen.com, I&#8217;ve advocated that doing proper upfront analysis and design on our software projects is the best way to secure success for our projects and to shorten schedules.  Similarly, in FreeCell I&#8217;ve won more games on the first try when I devoted more time to upfront analysis and developing a strategy.</p>
<p><span id="more-83"></span></p>
<h2>How to Play FreeCell </h2>
<p>For readers unfamiliar with the game, the objective is to discard all the cards in order starting with Ace to King for all suits.  The game is setup by distributing all the cards face up along eight columns.  Play begins by moving cards to the other columns, the temporary pile, or to one of the four discard piles.  To move a card to another column, the card being moved must be the next sequential card in descending order and must have the opposite color: for example, red must follow black and visa versa, so an 8 of diamonds (red) can only be placed on a column where the top card on the column is a 9 of spades (black) or 9 of clubs (black).   Only 4 cards can move to the temporary pile; any card can move there.  Cards can be removed from the temporary pile to any of the columns or to the discard piles.</p>
<p>The strategy is to move cards to other columns or the temporary pile to build the 4 discard piles in order beginning with Ace.  The game is won when you have moved all the cards to the discard piles, and the game is lost when you cannot move any cards to the temporary pile, to any column, or to any of the four discard piles.</p>
<h2>Approaches to Playing FreeCell</h2>
<p>There are two approaches to playing the game: one, evaluate only the moves that are currently available to you by only evaluating the top cards of each column or the cards in the temporary pile. Let&#8217;s refer to this approach as shallow analysis, or two, evaluate successive moves before deciding on a move.  Let&#8217;s refer to this approach as deep analysis.  While it is possible to win with shallow analysis throughout the game, the probability of winning is low.  I&#8217;ll often start a game with the first approach then after a few moves switch to the second approach to make the game more challenging.  I can&#8217;t recall ever winning a game without doing some amount of deep analysis.   Early deep analysis improves the odds of winning on the first attempt of a game.</p>
<h2>What FreeCell Teaches Us about Software Projects</h2>
<p>Here&#8217;s what the game of FreeCell teaches us about upfront analysis and design.</p>
<ol type="1">
<li><strong>Reworking (refactoring) is expensive and it lengthens schedules.</strong>  When I play using shallow analysis, it takes many more restarts of the game before I finally win it.  To win a game with less restarts &#8211; even zero restarts &#8211; the likelihood increases significantly with quality deep analysis before moving.  Similarly in software, schedules are shorter when the solution is well analyzed and designed before writing code, resulting in less rework or reimplementation.</li>
<li><strong>Anticipating the future results in less rework and reimplementation</strong>.  In FreeCell, evaluating only the first level moves before moving makes it more probable that you leave yourself with no possible moves later in the game.  A player can avoid being locked in a corner with deep analysis before moving.  Similarly a software team can avoid rework and reimplementation by anticipating future requirements or preferably by creating a design that is easily extensible.</li>
<li><strong>Winning every game of FreeCell on the first attempt is possible with deep analysis if it is true that every playing combination is winnable.</strong>  The most difficult upfront investment is on the first move.  It is the most difficult to analyze and to get correct, but if you desire the highest probability of winning &#8212; even certainty of winning &#8212; there is no shortcut to this upfront investment.   Similarly, in software the first release is the most difficult release to analyze.  It&#8217;s a blank sheet of paper.  The possibilities are seemingly infinite.  It&#8217;s not difficult because it&#8217;s a wrong approach; it&#8217;s difficult because it&#8217;s hard.  As in FreeCell, a project team improves their likelihood of success with enough upfront analysis and design.</li>
<li><strong>Starting a game with deep analysis results in faster analysis later.</strong> As a consequence of analyzing a game well, it becomes easier to make successive moves as the game evolves.  Similarly in software when an application is well designed, successive releases of that application become easier and faster.</li>
</ol>
<h2>Summary</h2>
<p>Modern approaches to software development advocate an evolving approach to software construction with shallow analysis as its principle.  They trade deep analysis in favor of faster delivery for today&#8217;s requirements.  While that approach may succeed in creating a quick first release (only if shallow analysis does not lock you in a corner in the first iteration), it is sure to require rework and reimplementation on future releases.</p>
<p>As in the game of FreeCell, upfront analysis and design improves the likelihood of delivering a successful software release.   Deep upfront analysis and design avoids rework and reimplementation, and consequently, it shortens project schedules.   If you are looking to improve the project team&#8217;s chance of success, shorten schedules, and control the budget, deep upfront analysis and design as demonstrated in the FreeCell analogy is a method for securing those objectives.</p>
<p>How much upfront analysis is enough you may ask?  It depends.  How important is it to hit your release date?  How important is it to deliver on budget?  How important is it to secure future releases?   To the degree that these objectives are important to your organization, you invest in enough upfront analysis and design to give yourself confidence commensurate with the importance of hitting your date, meeting your budget, and securing future releases. </p>
<p>This investment is not measured in time; it&#8217;s measured in the quality of analysis and design.   If the investment is too expensive, consider the alternative:  you are more likely to be late, over budget, and hamper future deliveries if you don&#8217;t invest.  Of course, not every project requires high certainty of hitting the date and the budget, and some products never have more than the first release.  For those projects, other approaches may be better.  But, know the tradeoff before you embark on your journey.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuwantitwhen.com/blog/2008/08/05/dont-code-yourself-into-a-corner/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Simple by Design</title>
		<link>http://www.yuwantitwhen.com/blog/2008/04/14/simple-by-design/</link>
		<comments>http://www.yuwantitwhen.com/blog/2008/04/14/simple-by-design/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 01:15:23 +0000</pubDate>
		<dc:creator>Bill Miller</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[BDUF]]></category>

		<guid isPermaLink="false">http://www.yuwantitwhen.com/blog/?p=47</guid>
		<description><![CDATA[Proper up front analysis and design is required, and yes, sometimes it takes longer than we'd all like it to take.  However, when it's done well, architectures are less complex, not more; quality is higher; time to market is faster, and products and teams are more agile.  Proper architectures leverage the resources of the entire organization to deliver solutions to customers.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.yuwantitwhen.com/blog/wp-content/images/mouse.jpg" alt="" width="245" height="162" /></p>
<p>Achieving Agile goals of delivering faster and responding to change quickly is best achieved by designing an architecture that leverages those goals, I reasoned in an essay titled &#8220;<a href="http://www.yuwantitwhen.com/blog/2008/02/15/agile-isnt-a-process/" target="_blank">Agile Isn&#8217;t a Process</a>&#8220;.  Being agile is about leveraging the entire organization and business partners to deliver solutions to your customers. Agility is best achieved when solutions require less IT involvement, not more. </p>
<p>While having a good development process is important and necessary, the Agile process is not well suited to developing agile architectures; an emergent, iterative approach does not offer much when the requirements for solving the problem require an investment in up-front analysis and design. Some would call the investment <em>big</em>, but I would call it <em>proper</em>.  In this essay, I&#8217;d like to offer a real world example to support that original thesis.</p>
<p><span id="more-47"></span></p>
<h2>Criticisms</h2>
<p>It&#8217;s interesting to read some of the criticisms of the article. One reader suggested that an investment in up-front analysis and design results in overly complicated solutions.  George Crews commented, &#8220;It has been my experience that taking a long time to architect software only <strong>guarantees</strong> complex software, not software that will actually work.&#8221; </p>
<p>It&#8217;s a common opinion.  I actually agree with this comment if taking a long time is evidence of having an untalented team working on the problem.  I have found the weaker performers always seem to take longer and develop more complicated solutions. On the other hand, if the team is talented, taking a long time is evidence of a difficult problem, and difficult problems require an investment in time for even talented people to solve well and simply.</p>
<p>Another common criticism is that short iterations reduce risk. Well, it depends.  If the iteration is designed to deliver less, then sure, risk is reduced.  On the other hand, if the short iteration forces the developers to cut corners to deliver within the iteration, risk is increased as requirements are missed and error conditions aren&#8217;t considered in the interest of delivering something quickly.</p>
<p>It&#8217;s also suggested in some blog articles that investing time in a simple but thoughtful architecture compromises present requirements. Big Design Up Front (BDUF) steals time from delivering on the more pressing present requirements.  It&#8217;s said that present priorities require precedence over future needs, and therefore, it&#8217;s suggested to plan just enough for the future.  However, if you expect the product that you are building to have longevity, then the future is a present requirement that should not be ignored.</p>
<p>Of course, the future has to be balanced with the present; there is no formula for this.  Arriving at the right balance between present and future requirements is an art; it is situational (sometimes future requirements have higher priority and sometimes they don&#8217;t), and striking the right balance is usually a sign of a vibrant team, a team where contrasting ideas and opinions are plentiful</p>
<p>There&#8217;s another criticism in the present versus future argument. The position is that analyzing and implementing solutions that anticipate the future requires more time. My experience doesn&#8217;t support this position.  Yes, analyzing and designing a good solution often takes more time to deliver that first working build, but the time lost in getting to that first build is often compensated in delivering the overall solution faster.</p>
<p>Another suggested reason for delivering a working solution faster is that it reduces risk since working code proves out the design.  Risk is increased when the production of working code takes longer, since a flawed solution will be found late in the release cycle, where rework will impact the schedule.  This position is specious.  Up-front analysis and design is a risk mitigation strategy; it doesn&#8217;t increase risk.  I&#8217;ve never seen a design where I could not determine whether it would be successful or not.</p>
<h2>BDUF Example</h2>
<p>In 1991, I was assigned to develop the solution to realize the requirement to internationalize our product.  This product was known as Reuters Terminal.  It was essentially a financial browser for navigating and displaying Reuters&#8217; real-time financial news and information.   Reuters financial network disseminates financial news and information from every market in the world to every financial data center in the world.  Consequently having a product that was in the native language of the local market would be a competitive advantage &#8211; especially at this time when internationalization support in the Windows operating system was just being conceived.</p>
<p>The culture of this team was to do what is pejoratively called today Big Design Up Front, but to us, it seemed like the sensible way to design a good solution and to deliver it to market quickly.  Project initiation to release was approximately six to nine months, and there were many requirements in addition to the internationalization requirements that were delivered in this product release. </p>
<h2>Design</h2>
<p>The architecture was a 3-tier architecture:  The top tier is the application requiring the internationalization support.  The middle tier abstracts the details of each language instance from the application, and the bottom tier is a language driver that captures all the details and nuances of rendering an instance of any particular language for the application. The application resources are linked into the language drivers.  Essentially all the Windows APIs for rendering text, dialogs, and menus are replaced in the middle tier.  Below is a pictorial representation of the architecture.</p>
<p style="text-align: center;"><img src="http://www.yuwantitwhen.com/blog/wp-content/images/languagearch.gif" alt="" width="309" height="167" /></p>
<h2>Benefits</h2>
<p>While the first build may have taken longer than a build if this was implemented with an Agile approach, this approach has considerable advantages over the impetuous need to have a quick first build.  The advantages were. </p>
<ul type="disc">
<li><strong>Increases implemenation parallelism.  </strong>After the interfaces for the language API layer and language driver layer are designed, the implementation can be accomplished in parallel with one or more developers working in the application layer, one developer working in the language layer, and one or more developers working in the language driver layer.  The implementation is highly scalable.</li>
<li><strong>Anticipates future requirements. </strong>The application is to be customized for many languages, and this approach permits support for many languages without obfuscating the code with many macros to selectively link the application for any particular language.  It permits new languages to be released without releasing new versions of the application.  And it permits internationalization to be outsourced without much involvement from the core application team.</li>
<li><strong>Provides the capability to switch between languages at run time.</strong>  With this architecture the application can switch between languages at run time.  This is in part possible because of the architecture.  The application works with the middle tier only, and switching between languages is simply having the middle tier dynamically link to one of the language drivers.  Plus, there&#8217;s essentially very little extra code to support that feature.  It requires the middle tier to activate a different language driver, and the application forces each of the windows on display to repaint.</li>
<li><strong>Makes software configuration management practices easier.  </strong>Since at the application layer the code behaves the same no matter the language, there is no need to merge code while additional languages are in the process of being supported, and since support for new languages are delivered independently of the application, there is no need to manage and control many different versions of the application.</li>
</ul>
<p>Once the internationalization architecture was completed in that first release, the architecture was in place for the lifetime of the application.  Re-factoring is rare when problems are analyzed well.</p>
<h2>Agile Example</h2>
<p>An Agile team has one primary goal: deliver working code in a short iteration.  If these are my goals, I would immediately begin tackling one aspect of the user interface that I can readily begin to internationalize.  Perhaps, one would start reworking all the text writing code in the application to display multilingual.  To begin seeing results quickly, the easiest approach would be to statically link a different resource file.  Then, rewrite the application code wherever LoadString and TextOut are used.   To deliver the solution quicker, one or more developers would be assigned different application modules to internationalize.  While this approach would deliver working code fast, it has some disadvantages. </p>
<ul type="disc">
<li><strong>Code is obfuscated with macros.  </strong>To update the application code for each language, the logic for each language would be selectively compiled with macros to enable the compilation of the code for each specific language.  When enough languages are supported, the language code overwhelms the primary logic in those procedures.</li>
<li><strong>Each module would likely solve the problem a little differently.  </strong>By implementing the solution inline, there is more variability in the implementation when multiple programmers are working on each module.  Even if the same developer were to fully implement the entire solution, there is likely to be variability in the algorithm as the developer converts each module. This makes the product more difficult to maintain.</li>
<li><strong>Quality is lower. </strong>Since the internationalization is completed inline rather than via a one-for-one Windows API replacement, a defect in the inline code may need to be fixed in every place that it&#8217;s been re-engineered, but a defect in the API only needs to be analyzed and fixed once.  Additionally, there&#8217;s more of an opportunity to introduce a different defect in every place that the inline code is touched.<strong></strong></li>
<li><strong>The implementation is less scalable.  </strong>It&#8217;s difficult, if not impossible, to outsource the internationalization development as code merging would be a requirement.  There is even less ability to parallelize development when the same file needs to be re-engineered for each language to support. <strong></strong></li>
<li><strong>Adding new languages is harder.  </strong>As new languages are supported, there will be constant merging of files with work going on to support other features.<strong></strong></li>
<li><strong>Configuration management is more complicated. </strong>Each supported language requires a separate build of the application, and therefore, a separate executable is required for release.  Also, a bug in one language may not be present in another language, so the code base will be changing out of synch with the executables deployed.<strong></strong></li>
</ul>
<p>This is certainly a viable solution with distinct and troubling disadvantages for moving the code base to the future and responding quickly to changing requirements.  Unnaturally forcing a short iteration has disadvantages.  We used to have or own pejorative name for this: BFM, Brute Force Method.  Shortchanging up front analysis and design forces a BFM solution.</p>
<h2>Summary</h2>
<p>When I was implementing this solution with up-front analysis and design, we didn&#8217;t use the words Big Design Up Front.  We called it good analysis and design.  Sure there were engineers who spent too long in analysis and design and arrived at overly complicated solutions, but this had nothing to do with the approach: it had everything to do with the personality of the individual solving the problem.  Placing the blame on BDUF is a case of mistaken identity.</p>
<p>Proper up front analysis and design is required, and yes, sometimes it takes longer than we&#8217;d all like it to take.  However, when it&#8217;s done well, architectures are less complex, not more; quality is higher; time to market is faster, and products and teams are more agile.  Proper architectures leverage the resources of the entire organization to deliver solutions to customers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuwantitwhen.com/blog/2008/04/14/simple-by-design/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
