<?xml version="1.0"?>
<?xml-stylesheet href="/transform" type="text/xsl"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:bibo="http://purl.org/ontology/bibo/" xmlns:bs="http://purl.org/ontology/bibo/status/" xmlns:ci="https://vocab.methodandstructure.com/content-inventory#" xmlns:dct="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xhv="http://www.w3.org/1999/xhtml/vocab#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" lang="en" prefix="bibo: http://purl.org/ontology/bibo/ bs: http://purl.org/ontology/bibo/status/ ci: https://vocab.methodandstructure.com/content-inventory# dct: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# xhv: http://www.w3.org/1999/xhtml/vocab# xsd: http://www.w3.org/2001/XMLSchema#" vocab="http://www.w3.org/1999/xhtml/vocab#" xml:lang="en">
  <head>
    <title property="dct:title">Working Against the KLOC</title>
    <base href="https://doriantaylor.com/working-against-the-kloc"/>
    <link href="document-stats#EPlJwveaFuxTfB53mIFTbL" rev="ci:document"/>
    <link href="elsewhere" rel="alternate bookmark" title="Elsewhere"/>
    <link href="this-site" rel="alternate index" title="This Site"/>
    <link href="http://purl.org/ontology/bibo/status/published" rel="bibo:status"/>
    <link href="" rel="ci:canonical" title="Working Against the KLOC"/>
    <link href="lexicon/#EzqXIsriaILFcWjXdS7FbI" rel="dct:audience" title="Software Developer"/>
    <link href="person/dorian-taylor#me" rel="dct:creator" title="Dorian Taylor"/>
    <link href="person/dorian-taylor" rel="meta" title="Who I Am"/>
    <link about="./" href="3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="./" href="f07f5044-01bc-472d-9079-9b07771b731c" rel="alternate" type="application/atom+xml"/>
    <link about="./" href="this-site" rel="alternate"/>
    <link about="./" href="elsewhere" rel="alternate"/>
    <link about="./" href="e341ca62-0387-4cea-b69a-cdabc7656871" rel="alternate" type="application/atom+xml"/>
    <link about="verso/" href="3f36c30c-6096-454a-8a22-c062100ae41f" rel="alternate" type="application/atom+xml"/>
    <link about="verso/" href="this-site" rel="alternate"/>
    <link about="verso/" href="elsewhere" rel="alternate"/>
    <meta content="working-against-the-kloc" datatype="xsd:token" property="ci:canonical-slug"/>
    <meta content="Looking back on a particularly challenging episode of my career, I consider the value of conceptual integrity and how it affects the bang-to-buck ratio of writing code." name="description" property="dct:abstract"/>
    <meta content="2009-12-27T03:34:09+00:00" datatype="xsd:dateTime" property="dct:created"/>
    <meta content="working-against-the-kloc" property="dct:identifier"/>
    <meta content="2009-12-27T03:50:38+00:00" datatype="xsd:dateTime" property="dct:issued"/>
    <meta content="2009-12-27T03:55:24+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T06:01:38+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T06:02:56+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T20:35:57+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T20:43:44+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T23:44:27+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T23:45:36+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T23:51:56+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2009-12-27T23:53:47+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2022-05-31T04:18:52+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta content="2022-05-31T15:10:50+00:00" datatype="xsd:dateTime" property="dct:modified"/>
    <meta about="person/dorian-taylor#me" content="Dorian Taylor" name="author" property="foaf:name"/>
    <meta content="summary" name="twitter:card"/>
    <meta content="@doriantaylor" name="twitter:site"/>
    <meta content="Working Against the KLOC" name="twitter:title"/>
    <meta content="Looking back on a particularly challenging episode of my career, I consider the value of conceptual integrity and how it affects the bang-to-buck ratio of writing code." name="twitter:description"/>
    <object>
      <nav>
        <ul>
          <li>
            <a href="//dorian.substack.com/p/coasean-inversion" rev="dct:references" typeof="bibo:Article">
              <span property="dct:title">Coasean Inversion</span>
            </a>
          </li>
          <li>
            <a href="life-after-forecasting" rev="dct:references" typeof="bibo:Article">
              <span property="dct:title">Life After Forecasting</span>
            </a>
          </li>
          <li>
            <a href="document-stats#EPlJwveaFuxTfB53mIFTbL" rev="ci:document" typeof="qb:Observation">
              <span>urn:uuid:3e5270bd-e685-4bb1-b4df-079de62054db</span>
            </a>
          </li>
        </ul>
      </nav>
    </object>
  </head>
  <body about="" id="Eslb4xh-s-WmSfYKa1CZYI" typeof="bibo:Article">
    <p>On my very best days, I have found that I can write <span class="parenthesis" title="These are rare. 500-line days, however, seem to happen much more frequently.">about a thousand lines</span> of clean, efficient, well-documented and reasonably bug-free code. Once primed with a clear objective and having decided on methods for carrying out each of the details, it is remarkably easy to bulldoze through huge swaths of an implementation in one sitting. The challenge is to set up the circumstances that make this possible.</p>
    <aside role="note" id="EmBCV0L4XL6GaY2qe-zfRL">
    <p>Before I quit my last programming job, I tallied up the amount of code I had written during my ten-month tenure. I was careful to omit vacuous lines, generated code, unit tests, inline documentation, commentary, markup and data. This was only extant code as well, as I did not count what I had overwritten in the <a href="http://en.wikipedia.org/wiki/Revision_control" title="Revision control &#x2014; Wikipedia" rel="dct:references">version control system</a>. The result was around <var title="22 KLOC">22,000</var> lines &#x2014; a little over a month's worth of aforementioned <em>best</em> days, or a little over the equivalent of two of such days for each month I was there.</p>
    <p>Not all of the code in my tally was part of the same project, but that which was had similar characteristics. It was a sequence of numerous attempts to articulate disparate, disconnected parts of an unprecedented, poorly-defined and ultimately <em>elusive</em> system. My reason for being there, and the premise upon which I understood I was hired, was to contribute to <em>solving</em> this novel problem. What we never did, though, despite my counsel, was <a href="why-build-software-when-you-can-define-it" title="Why Build Software When You Can Define It?" rel="dct:references">attempt to clearly <em>define</em> it</a>. Instead, we acted as the proverbial blind men encountering an elephant, fiercely pinching and prodding it with tweezers and toothpicks made of code. When I could no longer deny that this was the only accepted way forward, I promptly left.</p>
    <p>Here was the tragedy. Eight months later I ran into one of my former colleagues on the street. Jokingly I asked him how the project was coming along. He said, with a sigh, that they had just completed it two weeks prior, and that the result was <span class="parenthesis" title="By the time I had left, our expectations had already lowered considerably, so they must have been demoted even farther.">less than what they had hoped for</span>. I was there for ten months, and they had been working on it for over five months before hiring me, plus the eight totals 23 &#x2014; nearly <em>two years</em>. Extrapolating my salary over the average number of people involved, accounting for our other responsibilities and eyeballing operational overhead and capital expenditures, I estimate the project cost somewhere between 1.2 and 1.5 million <span class="parenthesis" title="Which, Americans, is strikingly close to your currency, before you start making jokes about pesos or Monopoly money.">Canadian dollars</span>, all to yield a poorly-serviceable result.</p>
    </aside>
    <p>I'm sure the <abbr title="World-Wide Web">Web</abbr> is riddled with lamentations of failed, overrun or otherwise disappointing software projects, as <a href="http://www.standishgroup.com/newsroom/chaos_2009.php" title="Standish Newsroom - CHAOS 2009" rel="dct:references">those tend to be frequent</a>. My intent, however, is to imagine how <span class="parenthesis" title="plus everything I had omitted in the tally">my 22,000 lines</span> could have been put to more productive use, even if the only purpose of some of them would have been to glean new information about how to proceed.</p>
    <p>The astute might remark that <a href="http://en.wikipedia.org/wiki/Source_lines_of_code" title="Source lines of code &#x2014; Wikipedia" rel="dct:references">lines of code</a> is an abysmal metric for programmer productivity, because it is the <em>content</em> of the code that is the source of value, not its <em>quantity</em>. This is <em>exactly</em> my point, because the <em>cost</em> to produce the code is the same or <em>higher</em>, whether it is put to work <span class="parenthesis" title="figuratively">printing money</span> or thrown in the garbage.</p>
    <p>A great deal can be expressed in a thousand lines of code. For instance, an effort equivalent to the one I produced at this company, written in a modern, <a href="http://en.wikipedia.org/wiki/Interpreted_language" title="Interpreted language &#x2014; Wikipedia" rel="dct:references">interpreted language</a>, is more than ample to describe the behaviour of a typical <abbr title="World-Wide Web">Web</abbr>-based product. In a fantastically optimistic scenario, <span class="parenthesis" title="I should note that I have zero interest in my own Web start-up, at least in the conventional sense.">a company's first offering</span> could require no more investment than a few hundred hours on the part of a single person. But much like a novel, film or similar artistic performance, the fantasy lies in underestimating the effort to procure the <a href="stop-guessing-and-get-the-data" title="Stop Guessing and Get the Data" rel="dct:references">information used as raw material</a>, and thus how many times the projected effort is stuck, or repeated.</p>
    <p>Once again, past the margin required to express the desired behaviour, the success of a software project is an issue of <em>content</em>, not <em>quantity</em>. Just as with any other creative endeavour, the ease with which we breeze through the implementation is directly related to how clearly we can envision the result and the path toward it. I suspect that the relative cheapness and novelty of watching software do <em>something</em> often distracts us from taking the necessary and most effective steps to get it to do the <em>right</em> thing. The half-dozen or so people in my story, including myself, ought to have been able to lick our problem in a fraction of the time and cost if we had just figured out, <em>at the outset</em>, <a href="lexicon/conceptual-integrity" title="Conceptual Integrity" rel="dct:references">what to write</a>.</p>
  </body>
</html>
