{"id":3062,"date":"2014-10-18T08:00:35","date_gmt":"2014-10-18T13:00:35","guid":{"rendered":"http:\/\/admin.patheos.com\/blogs\/crywoof\/?p=3062"},"modified":"2014-12-23T16:12:37","modified_gmt":"2014-12-23T21:12:37","slug":"with-software-the-code-is-the-design","status":"publish","type":"post","link":"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/","title":{"rendered":"With Software, the Code IS the Design"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><head><meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\"><meta http-equiv=\"content-type\" content=\"text\/html; charset=utf-8\"><\/head><body><p>When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is <i>design<\/i> it.  Some people equate \u201cdesign\u201d with the visual appearance of a product, as in the iconic look of an Apple iMac.  I\u2019m using design in a more technical sense: before you manufacture a product, you need to work out a whole bunch of things:<\/p>\n<ul>\n<li> What it\u2019s supposed to do\n<\/li><li> How it\u2019s supposed to do it\n<\/li><li> What it looks like\n<\/li><li> How it\u2019s assembled out of parts\n<\/li><li> What those parts are\n<\/li><li> Precisely how those parts are shaped, what they are made of, and so forth.\n<\/li><\/ul>\n<p>The end result of a hardware design is a thick stack of drawings (or CAD files, these days) that can be used to actually build the desired hardware.  If you\u2019re going to build one at a time, that\u2019s all you need; if you\u2019re going to build a lot of them, you go on to design and build the machines you need to make the parts efficiently.<\/p>\n<p>Note that the bullet points above are more or less in the order in which you\u2019d do them, going from the most general to the most specific.<\/p>\n<p>Designing a piece of software is very different than designing a piece of hardware; the skill sets are entirely different.  But the steps are similar.  First you understand the need; then you figure out how to meet it; then you break that problem down into pieces; and so on.  The problem is the engineering drawings.  These drawings are how you share the designs for the parts with other people; you wrangle over them and discuss them, and finally agree on them.<\/p>\n<figure id=\"attachment_3065\" aria-describedby=\"caption-attachment-3065\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/wp-media.patheos.com\/blogs\/sites\/384\/2014\/10\/QuillCode.png\" class=\" decorated-link\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/wp-media.patheos.com\/blogs\/sites\/384\/2014\/10\/QuillCode-300x300.png\" alt=\"This is part of the Quill code.  It's also the design for one of Quill's tools.\" width=\"300\" height=\"300\" class=\"size-medium wp-image-3065\"><\/a><figcaption id=\"caption-attachment-3065\" class=\"wp-caption-text\">This is part of the Quill code.  It\u2019s also the design for one of Quill\u2019s tools.<\/figcaption><\/figure>\n<p>Software engineering theorists spend a lot of time thinking about design and how to capture software design with the equivalent of CAD drawings.  Massive graphical languages have been devised to document software designs.  (UML, I\u2019m looking at you.)  And all of them miss the point, which is this:  a hardware design, as documented by a stack of drawings, is a set of information that is isomorphic to the physical hardware to be built.  The two are one-to-one: each part has its drawing and associated data.<\/p>\n<p>But a software\u2019s program code <i>is<\/i> simply information.  The only set of information that\u2019s precisely isomorphic to the finished program without losing essential detail is the finished program.  Any more abstract representation is either a program in its own right, or loses information and hence isn\u2019t a complete design.<\/p>\n<p>Productive software design, in my experience, starts at the top of those bullet items, above, and goes no lower than necessary to get the job done.  If you\u2019ve got multiple developers involved, you break down the problem into pieces and assign them to developers; and they repeat the process from the top for their parts.  You worry about how the parts interact; but you don\u2019t try to capture every bit of the design in some kind of overarching design document, because it\u2019s wasted effort.<\/p>\n<p>I could go on at length about the particulars of a good software design process, what you capture and what you don\u2019t and what matters, but I\u2019ll slide past that for now, to make my main point: the ultimate record of the design of the software is the software\u2019s program code itself.  And that means that the architecture of the software and the things a new developer needs to know need to be, insofar as it\u2019s possible, discoverable from the program code alone.  Oh, you can provide some high-level design documentation; it\u2019s often useful, so long as it\u2019s at a high-enough level that it doesn\u2019t go out of date easily.  For the specifics, though, it\u2019s the code.<\/p>\n<p>And that has implications for how you write your code\u2014at the lines of code level, certainly, but even more in how you break up your code into individual files.<\/p>\n<p>More on that next time.<\/p>\n<\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is design it. Some people equate \u201cdesign\u201d with the visual appearance of a product, as in the iconic look of an Apple iMac. I\u2019m using design in a more technical sense: [&hellip;]<\/p>\n","protected":false},"author":1131,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[530],"tags":[566],"class_list":["post-3062","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-software-development-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>With Software, the Code IS the Design<\/title>\n<meta name=\"description\" content=\"When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is design it. Some\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"With Software, the Code IS the Design\" \/>\n<meta property=\"og:description\" content=\"When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is design it. Some\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/\" \/>\n<meta property=\"og:site_name\" content=\"Cry &#039;Woof&#039;\" \/>\n<meta property=\"article:published_time\" content=\"2014-10-18T13:00:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-12-23T21:12:37+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/wp.production.patheos.com\/blogs\/crywoof\/files\/2014\/10\/QuillCode-300x300.png\" \/>\n<meta name=\"author\" content=\"willduquette\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"willduquette\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/\",\"url\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/\",\"name\":\"With Software, the Code IS the Design\",\"isPartOf\":{\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/#website\"},\"datePublished\":\"2014-10-18T13:00:35+00:00\",\"dateModified\":\"2014-12-23T21:12:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/#\/schema\/person\/ff6351804d01f835d127aa686467fa2c\"},\"description\":\"When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is design it. Some\",\"breadcrumb\":{\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"With Software, the Code IS the Design\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/#website\",\"url\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/\",\"name\":\"Cry &#039;Woof&#039;\",\"description\":\"And let slip the dogs of whimsy!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/#\/schema\/person\/ff6351804d01f835d127aa686467fa2c\",\"name\":\"willduquette\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8075b1526bb772efdba031f0e814158b?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8075b1526bb772efdba031f0e814158b?s=96&r=g\",\"caption\":\"willduquette\"},\"url\":\"https:\/\/www.patheos.com\/blogs\/crywoof\/author\/willduquette\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"With Software, the Code IS the Design","description":"When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is design it. Some","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/","og_locale":"en_US","og_type":"article","og_title":"With Software, the Code IS the Design","og_description":"When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is design it. Some","og_url":"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/","og_site_name":"Cry &#039;Woof&#039;","article_published_time":"2014-10-18T13:00:35+00:00","article_modified_time":"2014-12-23T21:12:37+00:00","og_image":[{"url":"http:\/\/wp.production.patheos.com\/blogs\/crywoof\/files\/2014\/10\/QuillCode-300x300.png"}],"author":"willduquette","twitter_card":"summary_large_image","twitter_misc":{"Written by":"willduquette","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/","url":"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/","name":"With Software, the Code IS the Design","isPartOf":{"@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/#website"},"datePublished":"2014-10-18T13:00:35+00:00","dateModified":"2014-12-23T21:12:37+00:00","author":{"@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/#\/schema\/person\/ff6351804d01f835d127aa686467fa2c"},"description":"When you want to manufacture a new piece of hardware\u2014an engine, say, or a stand mixer, or a washing machine\u2014the first thing you do is design it. Some","breadcrumb":{"@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/2014\/10\/with-software-the-code-is-the-design\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.patheos.com\/blogs\/crywoof\/"},{"@type":"ListItem","position":2,"name":"With Software, the Code IS the Design"}]},{"@type":"WebSite","@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/#website","url":"https:\/\/www.patheos.com\/blogs\/crywoof\/","name":"Cry &#039;Woof&#039;","description":"And let slip the dogs of whimsy!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.patheos.com\/blogs\/crywoof\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/#\/schema\/person\/ff6351804d01f835d127aa686467fa2c","name":"willduquette","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.patheos.com\/blogs\/crywoof\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8075b1526bb772efdba031f0e814158b?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8075b1526bb772efdba031f0e814158b?s=96&r=g","caption":"willduquette"},"url":"https:\/\/www.patheos.com\/blogs\/crywoof\/author\/willduquette\/"}]}},"_links":{"self":[{"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/posts\/3062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/users\/1131"}],"replies":[{"embeddable":true,"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/comments?post=3062"}],"version-history":[{"count":0,"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/posts\/3062\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/media?parent=3062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/categories?post=3062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.patheos.com\/blogs\/crywoof\/wp-json\/wp\/v2\/tags?post=3062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}