{"id":127,"date":"2008-05-05T08:02:36","date_gmt":"2008-05-05T16:02:36","guid":{"rendered":"http:\/\/zuill.us\/WoodyZuill\/?p=127"},"modified":"2008-05-21T08:12:20","modified_gmt":"2008-05-21T16:12:20","slug":"you-cant-test-documents-for-correctness-or-completeness","status":"publish","type":"post","link":"https:\/\/zuill.us\/WoodyZuill\/2008\/05\/05\/you-cant-test-documents-for-correctness-or-completeness\/","title":{"rendered":"You Can&#8217;t Test Documents for Correctness or Completeness"},"content":{"rendered":"<p><strong>[This is part of my series on the <a href=\"http:\/\/zuill.us\/WoodyZuill\/2008\/04\/16\/communication-problems-with-the-waterfall\/\">Communication Problems with Waterfall<\/a>]<\/strong><\/p>\n<p><strong>A common flaw of many develpment documents: You can&#8217;t test them.<\/strong><\/p>\n<p>It is a glaring flaw of the\u00a0typical\u00a0document\u00a0generated in software development\u00a0that\u00a0there is no way to know if it is correct or complete.\u00a0\u00a0 We can do our work diligently and honestly and still end up with a lot of mistakes,\u00a0missing pieces, extra (unneeded) pieces, and misunderstandings.<\/p>\n<p>It would be nice to be able to &#8220;click a button&#8221; and prove that we have collected all the requirements, and that they are exactly what the customer needs and\/or wants, or even that it is what the customer THINKS they need or want.\u00a0 We can&#8217;t test an ER Diagram to prove that it will result in a database that stores everything we need and nothing more than we need, and allows us to create, retrieve,\u00a0and use\u00a0data with all the qualities we expect.\u00a0 We can&#8217;t test object models and sequence diagrams (as far as I know, anyway) to prove our design is useful or good.\u00a0 Well&#8230; you get the idea.\u00a0<!--more--><\/p>\n<p>All of these diagrams and documents are helpful in getting us to think about whatever it is we are working on, but like they say, the proof of the pudding is in the eating, and we don&#8217;t get to eat the pudding\u00a0until\u00a0late in a project if we are following a waterfall approach.\u00a0 By the time most real problems are discovered\u00a0it is very expensive and over-whelming to put things right.\u00a0\u00a0This is part of the &#8220;Fail-Late&#8221; feature of the Waterfall: In Waterfall, risk and problems are\u00a0by nature hidden and therefore get pushed forward to the following phase, and then the phase after that, until you have reached the end.\u00a0 Eventually they are exposed, but not until it is too late to address them in an effective manner.\u00a0\u00a0[I have about 3 pages of notes on &#8220;Fail-Late&#8221;\u00a0that\u00a0I will someday condense and post here if I get the chance.]<\/p>\n<p>We try to\u00a0gain confidence about our documents by being diligent. \u00a0We put processes in place to\u00a0scrutinize them carefully.\u00a0 We\u00a0get as many eyes as possible to go over the documents and make sure everything is correct.\u00a0 We have meetings where people discuss\u00a0what we are trying to communicate in the document as we &#8220;hand them off&#8221; from one phase to another.\u00a0\u00a0We have documents with\u00a0audit trails built in so we can see what has changed over time.\u00a0 We have change control boards and documented work-flow processes\u00a0so we can follow and review and approve\u00a0the changes,\u00a0and so on ad nauseam.\u00a0 No matter how careful we are, there is still a lot of room for mistakes and extra work, and even worse, the nature of the process\u00a0provides opportunity to\u00a0introduce even more mistakes.\u00a0\u00a0And sadly, the mistakes\u00a0and problems become compounded over time as complexity grows.<\/p>\n<p>And still, there is no way to test these documents to determine their correctness or completeness.\u00a0<\/p>\n<p>[Note: I am not speaking about documents that are actually used by the end user or in\u00a0support of the end customer &#8211; such as training materials, help files, deployment instructions, and so on.\u00a0 These are part of the deliverable to the customer and are an important deliverable of our development]<\/p>\n<p><strong>Finger Pointing and the &#8220;Solution&#8221;<\/strong><\/p>\n<p>Even worse, most of the mechanisms put in place to deal with problems when they come up are susceptible to becoming &#8220;finger-pointing&#8221; exercises.\u00a0 These are the things like signing-off on a document, base-lining a deliverable for the next phase, review committees, and handing-off practices that projects using the waterfall usually follow.\u00a0 I won&#8217;t cover those here and now, but perhaps in some future post.\u00a0 The point is that at some point (usually very much later on) in the process we start discovering that something is wrong and we want to find out who is to blame.\u00a0 Hopefully it is someone other than us.<\/p>\n<p>The &#8220;solution&#8221;\u00a0that is often suggested is to do more of the same sort of practices that are causing the problem in the first place.\u00a0\u00a0After the cause is found we then look for a way to keep from making that mistake again &#8211; and that often means we add even more process and control into a system that is already over-burdened by process and control.<\/p>\n<p><strong>Restated: What is the real problem?<\/strong><\/p>\n<p>The Waterfall is a methodology that\u00a0values these\u00a0error-prone\u00a0documents and work-flow processes.\u00a0 However, since\u00a0there is no way to put the documents\u00a0into a test harness or automated user acceptance test suite to\u00a0verify things are good (or to\u00a0expose\u00a0things that are bad) the results are often not acceptable.\u00a0\u00a0 Besides the inability to test these documents,\u00a0the feedback loop is so long and ineffective that discovering\u00a0problems takes a lot of time and only occurs after much of the work is done.\u00a0\u00a0Once problems are exposed the cost of\u00a0correcting them\u00a0is high.<\/p>\n<p><strong>What is the\u00a0solution?\u00a0 Here are a few ideas:<\/strong><\/p>\n<ul>\n<li>Executable Documents: Strive to have documents that are executable tests\u00a0&#8211; such as scenario,\u00a0behavior,\u00a0FIT,\u00a0or\u00a0story Tests, \u00a0or anything else you can click a button to\u00a0run.\u00a0 These tests can\u00a0prove that what you are doing is correct and complete, or quickly expose mistakes and the lack of completeness.\u00a0<\/li>\n<li>Buildable Code: We can test buildable code.\u00a0\u00a0Therefore, lets get\u00a0code as early as possible.\u00a0\u00a0Preferably on the first day we know enough about ANYTHING the project is going to do.<\/li>\n<li>Tests First: Don&#8217;t do work without first putting these tests into place, or at least create them concurrently with the work you are coding.<\/li>\n<li>Continuous Integration: Once tests are passing, they must be kept passing.\u00a0 This is one benefit of CI.<\/li>\n<li>Involve the Users or Customer Early and Often: Get working code into the hands of\u00a0real users or &#8220;user proxies&#8221; as soon as possible.\u00a0 When a &#8220;user expert&#8221; and\/or a Subject Matter Expert can actually see and use some small aspect of the software\u00a0we can get feedback on what we are doing and then steer towards the desired result.\u00a0 This is what guides us to\u00a0real needs, the real requirements,\u00a0quickly.\u00a0 This is one form of the &#8220;feedback loop&#8221; that you hear so much about in the Agile world, and provides a discovery process that makes\u00a0it difficult to leave something out while making it\u00a0easy to verify correctness.\u00a0\u00a0<\/li>\n<li>Create Knowledge: Working, tested, and useable code\u00a0is\u00a0a knowledge creating tool that drives us towards a better understanding of what &#8220;correct&#8221; and &#8220;complete&#8221; means for the application we are writing.\u00a0\u00a0 Risk is often a lack of knowledge, so\u00a0we can drive down risk by increasing knowledge.<\/li>\n<li>Do Only Valuable Things: Try to\u00a0do work the\u00a0customer needs right now.\u00a0 This means the\u00a0code has a chance of getting\u00a0tested in real world scenarios right away.\u00a0 I have found that\u00a0customers put off testing things that they don&#8217;t have an immediate need for.\u00a0 This also\u00a0keeps us from doing things the customer will never need.<\/li>\n<li>Emergent Requirements Gathering, Design, and Architecture: Follow practices that allow your code and application to evolve, so the design can emerge as more is discovered.<\/li>\n<\/ul>\n<p>One final note: We can create and test a prototype, and that can be very useful.\u00a0 Although I rarely see\u00a0prototypes being used, I like prototypes or spikes as a discovery and exploration tool, and they can easily be testable.\u00a0 Prototypes introduce their own set of issues that we can discuss some other time.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[This is part of my series on the Communication Problems with Waterfall] A common flaw of many develpment documents: You can&#8217;t test them. It is a glaring flaw of the\u00a0typical\u00a0document\u00a0generated in software development\u00a0that\u00a0there is no way to know if it is correct or complete.\u00a0\u00a0 We can do our work diligently and honestly and still end [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-agile-stuff","category-waterfall"],"_links":{"self":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":0,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"wp:attachment":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}