<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Todd Schiller - mental model</title><link href="https://toddschiller.com/" rel="alternate"></link><link href="https://toddschiller.com/feeds/tag/mental-model.atom.xml" rel="self"></link><id>https://toddschiller.com/</id><updated>2015-02-16T00:00:00-05:00</updated><subtitle>Human ✘ Artificial Intelligence</subtitle><entry><title>Combating information failure during software development</title><link href="https://toddschiller.com/blog/information-failure-software-development.html" rel="alternate"></link><published>2015-02-16T00:00:00-05:00</published><updated>2015-02-16T00:00:00-05:00</updated><author><name>Todd Schiller</name></author><id>tag:toddschiller.com,2015-02-16:/blog/information-failure-software-development.html</id><summary type="html">&lt;p&gt;Developer productivity is a product of program understanding,
a developer's (1) mental model, and (2) access to information for
refining that model.&lt;/p&gt;
&lt;p&gt;Former Defense Secretary Donald Rumsfeld's famous intuition is
actually roughly correct for understanding program understanding:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are known knowns. These are things we know that we know. There …&lt;/p&gt;&lt;/blockquote&gt;</summary><content type="html">&lt;p&gt;Developer productivity is a product of program understanding,
a developer's (1) mental model, and (2) access to information for
refining that model.&lt;/p&gt;
&lt;p&gt;Former Defense Secretary Donald Rumsfeld's famous intuition is
actually roughly correct for understanding program understanding:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are known knowns. These are things we know that we know. There
are known unknowns. That is to say, there are things that we know we
don't know. But there are also unknown unknowns. There are things
we don't know we don't know.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Because software development involves constant decision-making, it's
also important to consider whether information is discoverable —
that we can, when required, make &amp;quot;known unknowns&amp;quot; become &amp;quot;known
knowns&amp;quot;. This yields three dimensions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Awareness:&lt;/strong&gt; does your (the developer's) mental model consider the
information?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Presence:&lt;/strong&gt; is the information present with the software (i.e., known)?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Computability:&lt;/strong&gt; can you compute and update the information
automatically (i.e., knowable)?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Across these dimensions, there are six situations that occur during
software development:&lt;/p&gt;
&lt;!-- markdownlint-disable MD060 --&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Situation&lt;/th&gt;
&lt;th&gt;Aware?&lt;/th&gt;
&lt;th&gt;Present?&lt;/th&gt;
&lt;th&gt;Computable?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Unknown Unknowns&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Uncomputable Information&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Stale / Misplaced Information&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Developer-Supplied Information&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Uncomputed Information&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Maybe&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Perfect Information&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;!-- markdownlint-enable MD060 --&gt;
&lt;br/&gt;
In general, to increase the quality of information available,
you must supply additional information in the right form. The
information you supply signals intent, and can serve as
machine-checked documentation (with the right tools).
&lt;p&gt;The rest of this post describes the six situations, providing some
intuition behind their causes. It starts with Level 0, the most
dangerous level.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Level 0: Unknown Unknowns.&lt;/strong&gt; Properties of which the developer is
unaware. These typically occur when you have not anticipated a
use case, or do not understand a platform well enough to be
aware of potential issues. Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Thread-safety&lt;/li&gt;
&lt;li&gt;The (unintuitive) behavior of Javascript's operators&lt;/li&gt;
&lt;li&gt;Argument aliasing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;This is the worst situation to be in.&lt;/em&gt; If and when your software
crashes, your only hope is to re-create and observe &lt;em&gt;the effects&lt;/em&gt; of
the behavior. Because the behavior is not part of your mental model,
you won't know how to observe it directly.&lt;/p&gt;
&lt;p&gt;You eliminate &amp;quot;unknown unknowns&amp;quot; by expanding your awareness in two
ways: (1) experience, and (2) a broad exposure to software engineering
topics and frameworks. For most types of software, &lt;em&gt;your mental model doesn't
need to be
complete!&lt;/em&gt; You just need to be aware of potential &amp;quot;gotchas&amp;quot; so that
you can direct your development and debugging.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Level 1: Uncomputable Information.&lt;/strong&gt; Properties of which the developer is
aware, but does
not have an easy way of deciding automatically. Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The correctness of a sorting algorithm implementation&lt;/li&gt;
&lt;li&gt;Program termination&lt;/li&gt;
&lt;li&gt;How clients use your library&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Level 2: Stale / Misplaced Information.&lt;/strong&gt; Information that either might be
out-of-date
or is not present with the development artifact. Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Design decisions made by a developer who was fired&lt;/li&gt;
&lt;li&gt;Documentation for an old version of an API&lt;/li&gt;
&lt;li&gt;Requirements captured in an email thread&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you have no way of telling which information is accurate, you're
back at &amp;quot;Level 1: Uncomputable Information&amp;quot;. If you have no way of
telling if the information is complete, you're back at &amp;quot;Level 0:
Unknown Unknowns&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Level 3: Developer-Supplied Information.&lt;/strong&gt; Information that is
up-to-date, but the developer has no easy way of knowing how a
change might affect that information. Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A written proof of an algorithm&lt;/li&gt;
&lt;li&gt;Class documentation&lt;/li&gt;
&lt;li&gt;Renaming a field in a dynamically-typed program&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you don't update this information when making a change, you'll
quickly find yourself at &amp;quot;Level 2: Stale Information&amp;quot;. By instead
capturing information in a machine-readable form, you can instead
approach &amp;quot;Level 4: Uncomputed Information&amp;quot;.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Level 4: Uncomputed Information.&lt;/strong&gt; Information that can be computed
automatically, but is
not yet available for the current version of the program. Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Non-incremental compilation (e.g., compiling a C++ program)&lt;/li&gt;
&lt;li&gt;A long-running test suite&lt;/li&gt;
&lt;li&gt;A long-running static analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When a failure occurs, you might be back at &amp;quot;Level 3:
Developer-Supplied Information&amp;quot; or &amp;quot;Level 2: Stale / Misplaced
Information&amp;quot;. For example, if a test fails, you need to be able to
determine (1) if the failure is valid, and (2) if so, how to modify
the program and/or test suite.&lt;/p&gt;
&lt;p&gt;For many types of information, you can effectively bring yourself to
&amp;quot;Level 5: Perfect Information&amp;quot; by applying the
&lt;a href="https://en.wikipedia.org/wiki/Pareto_principle"&gt;Pareto principle&lt;/a&gt;. In
the case of a long-running test suite, for example, you might
&lt;a href="http://digitalcommons.unl.edu/cgi/viewcontent.cgi?article=1018&amp;amp;context=csearticles"&gt;prioritize the execution order of the test suite&lt;/a&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;strong&gt;Level 5: Perfect Information.&lt;/strong&gt; Information that is up-to-date and is updated
automatically whenever the developer makes a change. Examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Incremental compilation with type checking&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Continuous_test-driven_development"&gt;Continuous testing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cs.washington.edu/node/4042"&gt;Speculative analyses&lt;/a&gt; that
compute the effects of a change before you even make the change&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Remember that to increase the quality of information available, you
must supply additional information. For example, typed languages
require type annotations; more-detailed type analyses (e.g., the
&lt;a href="http://checkerframework.org"&gt;Checker Framework&lt;/a&gt;) require yet more
(and more precise) annotations.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Program understanding depends on information awareness, presence, and
computability. The next time you hit a wall programming or debugging,
take a step back and ask: &amp;quot;where is the information failure?&amp;quot; By
answering this question, you can set yourself and your team up to be more
productive.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This post is based on an early framing of my PhD research. As part of
my research, I designed the &lt;a href="http://cupidplugin.com"&gt;Cupid framework&lt;/a&gt;
for giving developers immediate insight into their project and team.&lt;/em&gt;&lt;/p&gt;
&lt;style scoped&gt;
	.entry-content table {
		width: 600px;
	}
	.entry-content th {
		border: 1px solid;
		padding: 5px;
	}

	.entry-content td {
		border: 1px solid;
		padding: 5px;
	}

	blockquote p {
		font-size: 1em;
	}
&lt;/style&gt;
</content><category term="Software Engineering"></category><category term="information"></category><category term="mental model"></category><category term="software development"></category></entry></feed>