{"id":30,"date":"2005-08-16T14:09:38","date_gmt":"2005-08-16T19:09:38","guid":{"rendered":"http:\/\/alarmingdevelopment.org\/?p=30"},"modified":"2005-08-16T14:35:41","modified_gmt":"2005-08-16T19:35:41","slug":"the-currency-of-development","status":"publish","type":"post","link":"https:\/\/alarmingdevelopment.org\/?p=30","title":{"rendered":"The Currency of Development"},"content":{"rendered":"<p>One of the anonymous reviewers of my <a href=\"http:\/\/subtextual.org\/OOPSLA05.pdf\">OOPSLA paper<\/a> made the point, paraphrasing, that the main problem in software development is not the difficulty of programming, but the difficulty of getting a development project to function effectively. This is usually seen as the subject of methodology, with \u00e2\u20ac\u0153extreme\u00e2\u20ac\u009d and \u00e2\u20ac\u0153agile\u00e2\u20ac\u009d methods being the latest trends. My initial reaction to this criticism was to point to the example of spreadsheets, which make a certain class of problems simple enough to be solved by an end-user or power-user themselves, without enduring the trials and tribulations of a professionally staffed development project. Even on such multi-person projects, reducing the programming effort ought to reduce the size of the team and the number of interactions subject to error. However the fundamental point of the criticism remains true: the biggest problem in software development is teamwork. It has occurred to me that the design philosophy of Subtext can contribute to solving this problem. <!--more--><\/p>\n<p>The real problem is that we still haven\u00e2\u20ac\u2122t figured out an effective way to divide the labor of software development. Economists since Adam Smith have pointed to the division of labor as the key to efficiency and progress. To divide labor, there must be commodities to exchange between specialists. A prominent example of such a commodity in software development is the <em>specification<\/em>: an informal description of system behavior, produced by analysts interviewing users, approved by those users, and consumed by the programmers. <\/p>\n<p>Programmers in the real world will tell you that specs aren\u00e2\u20ac\u2122t worth the paper they are written on. They are half-baked informal descriptions that are too abstract to be understood by the users, and too imprecise to be useful to the programmers. They are full of internal inconsistencies and factual errors, because there is no way to test them. They are obsolete the day they are published, because it is too difficult to rewrite them as the system becomes better understood. Things are no better with the other standard commodities of development: project plans, schedules, cost estimates, and documentation.<\/p>\n<p><a href=\"http:\/\/www.extremeprogramming.org\/\">Extreme Programming<\/a> responds to this problem by eliminating the specs and docs and plans, along with the specialists who produce them. There are just users and programmers, collaborating intimately without formal plans. The sole commodity is code, which <strong>is<\/strong> the spec, and the doc, and the tests.  There is much to recommend this approach, but it appears to work best with smaller projects. In Economic terms, it is still cottage industry. The fundamental scaling problem remains: we do not know how to divide up big software projects to allow teams to solve them effectively. <\/p>\n<p>I propose a universal commodity of exchange in software projects; a common currency of development: <strong>examples<\/strong>. Specifically, examples as executable artifacts integrated into the programming language (as in <a href=\"http:\/\/subtextual.org\">Subtext<\/a>), or at least into the IDE (as in <a href=\"http:\/\/subtextual.org\/OOPSLA04.pdf\">EG<\/a>). The key properties of examples are that:<\/p>\n<ol>\n<li>They can visually demonstrate system behaviors of concern to the users.\n<\/li>\n<li>They can be built without coding by analysts or power-users.\n<\/li>\n<li>They can test code, asserting that certain inputs lead to certain outputs.\n<\/li>\n<\/ol>\n<p>Examples essentially formalize use cases, which have proven to be an effective communication medium between users, designers, and implementers. By turning use cases into concrete examples, users gain realistic demos, designers gain automated tools, and implementers gain both a clear specification as well as a test suite. Managers gain the ability to plan and observe work by the satisfaction of examples; implementers can more reliably estimate the work required to satisfy concrete examples. Documenters can base much of their content on the examples. Everyone benefits from keeping the examples in sync with the code, which is required because they are used as tests. Development becomes more efficient because examples help everyone collaborate.<\/p>\n<p>I see two major hurdles to be overcome for examples to function as the common currency of software development. The first hurdle is that although they are formal artifacts, examples must retain the informality and flexibility of use case techniques. Overcoming this hurdle is partly a matter of good usability-engineering, but may also depend on a simple yet general framework for expressing examples that can be adapted to specific application domains. This is a goal of Subtext, but I see no fundamental reason why it can\u00e2\u20ac\u2122t also be done in conventional IDE\u00e2\u20ac\u2122s like Eclipse, given sufficient resources.<\/p>\n<p>The second hurdle is more fundamental: can examples truly replace specifications? Examples concretely describe only a finite subset of behaviors, while specifications can abstractly describe infinite sets of behaviors. <em>Formal<\/em> specifications, written in some machine-analyzable logic, are clearly superior to examples. But formal specification has been one of the great disappointments of software engineering. The dirty little secret is that writing a <em>complete<\/em> formal spec of a system can be as difficult and error-prone as implementing it in code. In practice, we rely on informal specifications. My  conjecture is that <strong>formal examples are better than informal specifications<\/strong>.<\/p>\n<p>I claim that in most cases, a well-chosen set of concrete examples can more effectively communicate an intended abstract behavior than an explicit but informal abstract description. People are quite adept at inferring abstractions from examples, but notoriously poor at understanding and constructing abstractions explicitly. This is one reason that use cases are so successful. But unlike informal specs, examples can actually test whether code satisfies them: they are \u00e2\u20ac\u0153specs with teeth\u00e2\u20ac\u009d. By serving as tests, examples are forced to evolve with the code, avoiding the rapid obsolescence of specs.<\/p>\n<p>We are still free to mix informal specifications with formal examples. Informal commentary on examples could be quite helpful in conveying their intention. The key is to treat such commentary as just that: explanatory comments without proscriptive power. To actually require or disallow some behavior, a concrete example should be formulated that isolates that case. Once we no longer expect specifications to be complete, we are also freed to use lightweight formal techniques that are incomplete, such as <a href=\"http:\/\/alloy.mit.edu\">Alloy<\/a>. Alloy has the singular ability to both find and check models of a specification, within finite bounds. This capability could be used to concisely specify large (but still finite) sets of examples, generating their input states and asserting their outputs.<\/p>\n<p>In summary, I am proposing that formal examples can serve as a common currency for software development. They support collaboration between users, designers, programmers, managers, testers, and documenters. Examples are a unit of exchange that allows the effective division of labor, making us more efficient and enabling us to do bigger things.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the anonymous reviewers of my OOPSLA paper made the point, paraphrasing, that the main problem in software development is not the difficulty of programming, but the difficulty of getting a development project to function effectively. This is usually seen as the subject of methodology, with \u00e2\u20ac\u0153extreme\u00e2\u20ac\u009d and \u00e2\u20ac\u0153agile\u00e2\u20ac\u009d methods being the latest trends. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/alarmingdevelopment.org\/?p=30\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The Currency of Development&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pfEnU-u","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":0,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"wp:attachment":[{"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alarmingdevelopment.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}