    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Memory For a Short Sequence of Assignment Statements</title>
        <link>https://members.accu.org/index.php/journals/787</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>


        <h2>Journal Articles</h2>


<div class="xar-mod-head"><span class="xar-mod-title">CVu Journal Vol 17, #1 - Feb 2005 + Programming Topics</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c98/">171</a>
                    (9)
<br />

                                            <a href="https://members.accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c65/">Programming</a>
                    (877)
<br />

                                            <a href="https://members.accu.org/index.php/journals/c98-65/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/journals/c98+65/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Memory For a Short Sequence of Assignment Statements</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 03 February 2005 13:16:10 +00:00 or Thu, 03 February 2005 13:16:10 +00:00</p>
<p><strong>Summary:</strong>&nbsp;<p>This is the second of a two part article describing an experiment carried out during the 2004 ACCU conference. The previous part was published in the previous issue of C Vu. This second part discusses how the if statement part of the problem affected subject performance.</p></p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e22" id="d0e22"></a></h2>
</div>
<p>This is the second of a two part article describing an
experiment carried out during the 2004 ACCU conference. The
previous part was published in the previous issue of C Vu. This
second part discusses how the if statement part of the problem
affected subject performance.</p>
<p>The if statement problem can be viewed as either a time filler
for the assignment remember/recall problem, or as the main subject
of the experiment (with the assignment problem acting as a smoke
screen to make it more difficult for subjects to notice any
patterns in the if problems). The reason for this second
possibility is that studies have found patterns in the errors made
by subjects when performing various kinds of deduction tasks.</p>
<p>Given that some kind of filler task had to be performed, your
author decided to take opportunity to try and replicate some of the
error patterns seen in some studies of deduction.</p>
<p>As Table 1 shows, relational operators commonly occur in if
statements.</p>
<div class="table"><a name="d0e32" id="d0e32"></a>
<table summary=
"Occurrence of equality, relational, and logical operators in the conditional expression of an if statement (as a percentage of all such controlling expressions and as a percentage of the respective operator). Based on the visible form of over 3 million lines of C source. The percentage of controlling expressions may sum to more than 100% because more than one of the operators occurs in the same expression."
border="1" cellspacing="0">
&lt;colgroup&gt;
&lt;col width=&quot;33%&quot;&gt;
&lt;col width=&quot;33%&quot;&gt;
&lt;col width=&quot;34%&quot;&gt;&lt;/colgroup&gt;
&lt;thead&gt;
<tr>
<th>Operator</th>
<th>% Controlling Expression</th>
<th>% Occurrence of Operator</th>
</tr>
&lt;/thead&gt;
&lt;tbody&gt;
<tr>
<td>==</td>
<td>31.7</td>
<td>88.6</td>
</tr>
<tr>
<td>!=</td>
<td>14.1</td>
<td>79.7</td>
</tr>
<tr>
<td>&lt;</td>
<td>6.9</td>
<td>45.6</td>
</tr>
<tr>
<td>&lt;=</td>
<td>1.9</td>
<td>68.6</td>
</tr>
<tr>
<td>&gt;</td>
<td>3.5</td>
<td>84.9</td>
</tr>
<tr>
<td>&gt;=</td>
<td>3.5</td>
<td>76.8</td>
</tr>
<tr>
<td>no relational/equality</td>
<td>47.5</td>
<td>-</td>
</tr>
<tr>
<td>||</td>
<td>9.6</td>
<td>85.9</td>
</tr>
<tr>
<td>&amp;&amp;</td>
<td>14.5</td>
<td>82.3</td>
</tr>
<tr>
<td>no logical operators</td>
<td>84.2</td>
<td>-</td>
</tr>
&lt;/tbody&gt;
</table>
<p class="title c2">Table 1. Occurrence of equality, relational,
and logical operators in the conditional expression of an
<tt class="literal">if</tt> statement (as a percentage of all such
controlling expressions and as a percentage of the respective
operator). Based on the visible form of over 3 million lines of C
source. The percentage of controlling expressions may sum to more
than 100% because more than one of the operators occurs in the same
expression.</p>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e118" id="d0e118"></a>Linear
Syllogisms</h2>
</div>
<p>The psychology of deduction uses the terms <i class=
"firstterm">linear syllogisms</i> or <i class="firstterm">linear
reasoning</i> to describe deduction between statements involving
relational operators. The term usually used to describe a
(sub)expression containing a relational operator, in programming
language specifications, is <i class="firstterm">relational
expression</i>.</p>
<p>Linear syllogisms are part of mathematical logic and the skills
associated with being able to make deductions based on relational
information are usually assumed simply to be a component of the
general reasoning ability that people have. However, studies have
found that a number of animals have the ability to adapt their
behaviour to given situations based on relational knowledge they
have acquired. For instance, aggressive behaviour may occur between
two animals to determine which is dominant, relative to the other.
Such behaviour can lead to being injured in a fight and is best
avoided if possible. The ability to make use of relative dominance
information (e.g., obtained by a member of a social group watching
the interaction between other members of the group) may remove the
need for aggressive behaviour during an encounter between two
members of the same group who have not met face to face before
(i.e., the member most likely to lose immediately behaves in a
subservient fashion).</p>
<p>One study [<a href="#Pazymino">Pazymino</a>] allowed a social
dominance hierarchy to become established in several independent
groups of birds (Pinyon jays). Two birds from different groups were
then placed in a cage and given time to establish their relative
social dominance (a process that involves staring, looking away,
chin-up and beg, etc). The interaction of the two birds was
witnessed by a bird belonging to one of the two groups from which
the two birds came (this bird could not participate in any social
interaction with the birds it witnessed). The witness bird had
previously encountered one of the birds in the interaction it
witnessed, but had never seen the other before. The witness bird
was then allowed to interact with the bird from the other group.
Analysis of the social interaction that occurred between the two
birds on their first encounter showed that in those cases where the
witness bird had sufficient information to reliably deduce its
relative social status, it more often behaved in a way consistent
with that social position, than an experimental control that had
not witnessed any interaction.</p>
<p>The results from a related study using Western Scrub jays (a
less social species, closely related to Pinyon jays) showed less
evidence for the ability to make use of relational information.
Those animals that live together in social groups are likely to
have various kinds of relational information available to them. The
benefits of being able to make use of this information appears to
have resulted in at least some social species developing the
cognitive abilities needed to process and make use of this
information.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e141" id="d0e141"></a>Relational
Reasoning in Humans</h2>
</div>
<p>If some animal brains (that don't have what are considered
higher level cognitive reasoning abilities) have developed a
mechanism to combine relational information to create <span class=
"emphasis"><em>new</em></span> information, it is possible that
humans also possess a similar mechanism (this is not to say that
they don't have any other cognitive systems that are capable of
performing the same task). A possible consequence of having such a
special purpose reasoning mechanism is that it may not handle all
relational expressions in the same way (i.e., it is likely to be
optimised for handling those situations that commonly occur in its
owner's everyday life). Some of the studies of human linear
reasoning have found that subjects are slower and make more errors
when the operands in a sequence of relational expressions occur in
certain orders.</p>
<p>One study [<a href="#DeSoto">DeSoto</a>] used a task that was
based on what is known as social reasoning (using the relations
<span class="emphasis"><em>better</em></span> and <span class=
"emphasis"><em>worse</em></span>). Subjects were shown two
premises, involving three people, and a possible conclusion (e.g.,
<span class="emphasis"><em>Is Mantle worse than
Moskowitz?</em></span>). They had 10 seconds to answer <span class=
"emphasis"><em>yes</em></span>, <span class=
"emphasis"><em>no</em></span>, or <span class="emphasis"><em>don't
know</em></span>. All four possible combinations of conclusions
were used.</p>
<div class="table"><a name="d0e172" id="d0e172"></a>
<table summary=
"Eight sets of premises describing the same relative ordering between A, B, and C (people&rsquo;s names were used in the study) in different ways, followed by the percentage of subjects giving the correct answer. Adapted from De Soto, London, and Handel [DeSoto]."
border="1" cellspacing="0">
&lt;colgroup&gt;
&lt;col width=&quot;33%&quot;&gt;
&lt;col width=&quot;33%&quot;&gt;
&lt;col width=&quot;34%&quot;&gt;&lt;/colgroup&gt;
&lt;thead&gt;
<tr>
<th> </th>
<th>Premises</th>
<th>% Correct Responses</th>
</tr>
&lt;/thead&gt;
&lt;tbody&gt;
<tr>
<td>1</td>
<td>A is better than B, B is better than C</td>
<td>60.5</td>
</tr>
<tr>
<td>2</td>
<td>B is better than C, A is better than B</td>
<td>52.8</td>
</tr>
<tr>
<td>3</td>
<td>B is worse than A, C is worse than B</td>
<td>50</td>
</tr>
<tr>
<td>4</td>
<td>C is worse than B, B is worse than A</td>
<td>42.5</td>
</tr>
<tr>
<td>5</td>
<td>A is better than B, C is worse than B</td>
<td>61.8</td>
</tr>
<tr>
<td>6</td>
<td>C is worse than B, A is better than B</td>
<td>57</td>
</tr>
<tr>
<td>7</td>
<td>B is worse than A, B is better than C</td>
<td>41.5</td>
</tr>
<tr>
<td>8</td>
<td>B is better than C, B is worse than A</td>
<td>38.3</td>
</tr>
&lt;/tbody&gt;
</table>
<p class="title c2">Table 2. Eight sets of premises describing the
same relative ordering between A, B, and C (people's names were
used in the study) in different ways, followed by the percentage of
subjects giving the correct answer. Adapted from De Soto, London,
and Handel [<a href="#DeSoto">DeSoto</a>].</p>
</div>
<p>Based on the results (see Table 2) the researchers made two
observations (which they called paralogical principles; cases 5 and
6 possess both, while cases 7 and 8 possess neither):</p>
<div class="orderedlist">
<ol type="1">
<li>
<p><span class="bold"><b>People learn orderings better in one
direction than another</b></span>. In this study people gave more
correct answers when the direction was <span class=
"emphasis"><em>better-to-worse</em></span> (case 1), than mixed
direction (case 2, 3), and were least correct in the direction
<span class="emphasis"><em>worse-to-better</em></span> (case 4).
This suggests that use of the word <span class=
"emphasis"><em>better</em></span> should be preferred over
<span class="emphasis"><em>worse</em></span> (the British National
Corpus [<a href="#Leech">Leech</a>] lists <span class=
"emphasis"><em>better</em></span> as appearing 143 times per
million words, while <span class="emphasis"><em>worse</em></span>
appears under 10 times per million words and is not listed in the
top 124,000 most used words).</p>
</li>
<li>
<p><span class="bold"><b>People <i class="firstterm">end-anchor</i>
orderings</b></span>. That is, they focus on the two extremes of
the ordering. In this study people gave more correct answers when
the premises stated an end term (<span class=
"emphasis"><em>better</em></span> or <span class=
"emphasis"><em>worse</em></span>) followed by the middle term, than
a middle term followed by an end term.</p>
</li>
</ol>
</div>
<p>A related experiment in the same study used the relations
<span class="emphasis"><em>to-the-left</em></span> and <span class=
"emphasis"><em>to-the-right</em></span>, and <span class=
"emphasis"><em>above</em></span> and <span class=
"emphasis"><em>below</em></span>. The <span class=
"emphasis"><em>above</em></span>/<span class=
"emphasis"><em>below</em></span> results were very similar to those
for <span class="emphasis"><em>better</em></span>/<span class=
"emphasis"><em>worse</em></span>. The <span class=
"emphasis"><em>left-right</em></span> results showed that subjects
performed better with a <span class=
"emphasis"><em>left-to-right</em></span> ordering than a
<span class="emphasis"><em>right-to-left</em></span> ordering.</p>
<p>Since this original study additional factors have been
discovered and a number of models have been proposed to explain the
strategies used by people in solving linear reasoning problems,
including:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p><span class="bold"><b>The spatial model</b></span> [<a href=
"#DeSoto">DeSoto</a>][<a href="#Huttenlocher">Huttenlocher</a>], in
which people integrate information from each premise into a spatial
array representing all known relationships.</p>
</li>
<li>
<p><span class="bold"><b>The linguistic model</b></span> [<a href=
"#Clark">Clark</a>], in which people represent each premise using
linguistic propositions (the individual premises are not
integrated).</p>
</li>
<li>
<p><span class="bold"><b>The algorithmic model</b></span> [<a href=
"#Quinton">Quinton</a>], in which people apply some algorithm to
the structure of the linguistic representation of the premises. For
instance, given <span class="emphasis"><em>&quot;Reg is taller than
Jason; Keith is shorter than Jason&quot;</em></span> and the question
<span class="emphasis"><em>&quot;Who is the shortest?&quot;</em></span>, a so
called <i class="firstterm">elimination strategy</i> was used by
some subjects in the study. (The answer for the first premise is
Jason, which eliminates Reg; the answer to the second premise is
Keith which eliminates Jason, so Keith is the answer).</p>
</li>
<li>
<p><span class="bold"><b>The mixed model</b></span> [<a href=
"#Sternberg">Sternberg</a>], in which the information in the
premise is first decoded into a linguistic form and then encoded
into a spatial form.</p>
</li>
</ul>
</div>
<p>The strategy used to solve a given problem has been found to
vary between people. A study by Sternberg and Weil [<a href=
"#Sternberg-">Sternberg-</a>] found a significant interaction
between a subject's aptitude (as measured by verbal and spatial
ability tests) and the strategy they used to solve linear reasoning
problems. However, a person having high spatial ability, for
instance, does not necessarily use a spatial strategy. A study by
Roberts, Gilmore, and Wood [<a href="#Roberts">Roberts</a>] asked
subjects to solve what appeared to be a spatial problem (requiring
the use of a very inefficient spatial strategy to solve). Subjects
with high spatial ability used non-spatial strategies, while those
with low spatial ability used a spatial strategy. The conclusion
made was that those with high spatial ability were able to see that
the spatial strategy was inefficient to select as alternative
strategy, while those with less spatial ability were unable to
perform this evaluation.</p>
<p>If the evaluation of relational expressions in source code is
performed using a cognitive mechanism that has been optimised for
certain kinds of operations, then it is possible that developers'
performance will be worse for some forms of expressions (e.g., the
rate of making mistakes will be greater). The form of the if
statements used in this study was designed to look for differences
in subject performance that depended on the form of the relational
expressions appearing in the control expressions.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e378" id="d0e378"></a>Subject
Motivation</h2>
</div>
<p>When reading source code developers are aware that some of the
information they see only needs to be remembered for a short period
of time, while other information needs to be remembered over a
longer period. For instance, when deducing the effect of calling a
given function the names of identifiers declared locally within it
only have significance within that function and there is unlikely
to be any need to recall information about them in other contexts.
Each of the problems seen by subjects in this study could be
treated in the same way as an individual function definition (i.e.,
it is necessary to remember particular identifiers and the values
they represent, once a problem has been answered there is no longer
any need to remember this information).</p>
<p>Subjects can approach the demands of answering the problems this
study presents them in a number of ways, including the
following:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>seeing it as a challenge to accurately recall the assignment
information (i.e., minimizing <span class="emphasis"><em>would
refer back</em></span> answers),</p>
</li>
<li>
<p>recognizing that <span class="emphasis"><em>would refer
back</em></span> is always an option, but that it is more important
to correctly answer the <tt class="literal">if</tt> statement
question,</p>
</li>
<li>
<p>making no conscious decision about how to approach the answering
of problems.</p>
</li>
</ul>
</div>
<p>Experience shows that many developers are competitive and that
accurately recalling the assignment information, after solving the
<tt class="literal">if</tt> statement problem, would be seen as the
ideal performance to aim for. The experimental format did not allow
for easy debriefing of subjects after they had answered the
questions, and none was performed.</p>
<p>The only applicable instruction given to subjects was:
<span class="emphasis"><em>&quot;Read the variables and the values
assigned to them as you might when carefully reading lines of code
in a function definition.&quot;</em></span></p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e413" id="d0e413"></a>Results</h2>
</div>
<p>The raw results for each subject are available on the study's
web page [<a href="#Jones">Jones</a>].</p>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e421" id="d0e421"></a><tt class=
"literal">if</tt> Statement/Assignment Recall Interaction</h3>
</div>
<p>Answering the <tt class="literal">if</tt> statement portion of
the problem requires time (information held in short term memory
decays over time and unless it is regularly refreshed it will soon
be lost) and use of short term memory resources. If subjects
require more time or use more short term memory resources to answer
some forms of relational expression problem, then performance in
recalling assignment information is likely to be poorer after
comprehending expressions having the <span class=
"emphasis"><em>more complicated</em></span> form. The results
(Figure 1) suggest that such a correlation may exist, at least for
the first eight answers.</p>
<div class="figure"><a name="d0e434" id="d0e434"></a>
<div class="mediaobject c3"><img src="/var/uploads/journals/resources/jones-fig1.png"
align="middle" alt=
"The percentage of would refer back, correct and incorrect answers for each kind of relational expression. The left graph is based on answers to the first eight problems, while the right graph is based on the answers from the ninth and subsequent problem answers. Variation in subject performance is denoted by the error bars, which encompass one standard deviation. The ordering of relational expressions along the x-axis is sorted on the percentage of incorrect answers to the assignment problem, for the first eight if statement problems. H denotes high, M denotes middle, and L denotes low. So &ldquo;H &gt; M M &gt; L&rdquo; denotes &ldquo;high greater than middle and middle greater than low&rdquo;."></div>
<p class="title c2">Figure 1. The percentage of <span class=
"emphasis"><em>would refer back</em></span>, correct and incorrect
answers for each kind of relational expression. The left graph is
based on answers to the first eight problems, while the right graph
is based on the answers from the ninth and subsequent problem
answers. Variation in subject performance is denoted by the error
bars, which encompass one standard deviation. The ordering of
relational expressions along the x-axis is sorted on the percentage
of incorrect answers to the assignment problem, for the first eight
<tt class="literal">if</tt> statement problems. H denotes high, M
denotes middle, and L denotes low. So &quot;H &gt; M M &gt; L&quot; denotes
&quot;high greater than middle and middle greater than low&quot;.</p>
</div>
<p>However, the difference in performance characteristics between
the first eight answers and the ninth and subsequent problems may
have been caused by subjects learning and making use of patterns in
the assignment recall questions (which could reduce the need for
short term memory resources). Alternatively some information
occurred sufficiently often (e.g., the same identifier) that it was
stored in a longer term memory subsystem, where it was not so
susceptible to interference from the <tt class="literal">if</tt>
statement problem.</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage">
<h3><a name="d0e451" id="d0e451"></a><tt class=
"literal">if</tt> Statement Performance</h3>
</div>
<p>This study differed from others on the topic of reasoning in a
number of ways, including:</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>Researchers of human reasoning are usually attempting to
understand the mechanisms underlying human cognition. For this
reason they use subjects who have little or no experience in using
formal mathematical logic. This study was interested in the
performance of subjects in evaluating particular kinds of logical
expressions and subjects were chosen because they had significant
amounts of experience in evaluating the kinds of logical
expressions that occur in source code.</p>
</li>
<li>
<p>The problems used in studies by researchers investigating the
mechanisms of human cognition are usually expressed in forms that
occur in everyday life, i.e., they are natural language
descriptions of everyday situations (e.g., <span class=
"emphasis"><em>&quot;If Jim deposits 50p, he gets a canned
drink.&quot;</em></span>). One of the complications caused by expressing
problems in this form is that the words and phrases used are often
open to multiple interpretations. It is also possible that subjects
will base their answer on expectations they have about how the
<span class="emphasis"><em>real world</em></span> operates
[<a href="#Evans">Evans</a>] .</p>
</li>
<li>
<p>In this study no limits were placed on subjects (De Soto et al.
[<a href="#DeSoto">DeSoto</a>] required that an answer be given
within 10 seconds), the mode of presentation mimicked that
encountered in program comprehension (in the Huttenlocher [<a href=
"#Huttenlocher">Huttenlocher</a>] study subjects heard a tape
recoding of the problem)</p>
</li>
</ol>
</div>
<p>A total of 844 <tt class="literal">if</tt> statement problems
were answered. There were 40 (4.7% of all answers) incorrect
answers, an average number of incorrect answers per subject of 1.
However, the incorrect answers were not evenly distributed across
subjects. The number of incorrect answers did not appear to depend
on the number of problems answered (Figure 2). While performance on
reasoning tasks has been found to decrease with age [<a href=
"#Gilinsky">Gilinsky</a>] , years of experience (which is likely to
be highly correlated with age) does not appear to have been a
factor affecting the number of incorrect answers given to if
statement problems.</p>
<div class="figure"><a name="d0e491" id="d0e491"></a>
<div class="mediaobject c3"><img src="/var/uploads/journals/resources/jones-fig2.png"
align="middle" alt=
"The left graph plots the number of problems answered by each subject against the number of incorrect answers they gave. The bullets are offset from the y-axis to try to show those cases where more than one subject had the same problems answered/incorrect answers pair. The right graph plots the number of years of subject experience against the percentage of incorrect answers they gave."></div>
<p class="title c2">Figure 2. The left graph plots the number of
problems answered by each subject against the number of incorrect
answers they gave. The bullets are offset from the y-axis to try to
show those cases where more than one subject had the same problems
answered/incorrect answers pair. The right graph plots the number
of years of subject experience against the percentage of incorrect
answers they gave.</p>
</div>
<p>Two of the reasons why subject performance could differ across
different forms of relational expressions are:</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>Subjects may have a cognitive <span class=
"emphasis"><em>relational deduction</em></span> mechanism (this may
be actual hardware, i.e., a cluster of brain cells, or software,
i.e., a neural network whose weights have been tuned through
experience) that is optimised for handling problems (i.e., those
that commonly occur in everyday life) that are expressed in a
particular form.</p>
</li>
<li>
<p>The amount of cognitive resources required to solve a relational
expression may depend on the form in which the expression is
presented (this difference might simply be a consequence of how the
human cognitive subsystem handles relational reasoning).</p>
</li>
</ol>
</div>
<p>The paper and pencil format of the experiment meant that it was
not feasible to obtain information on the amount of time taken to
answer each problem.</p>
<p>Although subjects were told: <span class="emphasis"><em>&quot;Treat
the paper as if it were a screen, i.e., it cannot be written
on.&quot;</em></span>, there was nothing to prevent them using any paper
that they happened to have on them as a temporary work area.
Several subjects did write notes on the paper next to <tt class=
"literal">if</tt> statement problems (in one case for all the
answered problems) and the answers to these problems were not
counted. Except for the one case the number of such answers was
very small (in the one case the subject was not included in the
subject count).</p>
<p>The error rates reported by other studies (where subjects read a
problem typed on a card) were: De Soto et al [<a href=
"#DeSoto">DeSoto</a>] 39.2 - 61.7%, Clark [<a href=
"#Clark">Clark</a>] 6%, Potts [<a href="#Potts">Potts</a>] 5%,
Mayer [<a href="#Mayer">Mayer</a>] 4 - 36%, Quinton et al[<a href=
"#Quinton">Quinton</a>] not given, Sternberg et al[<a href=
"#Sternberg-">Sternberg-</a>] 1.7 - 3.5%. A study where subjects
heard a tape recording of the problem [<a href=
"#Huttenlocher">Huttenlocher</a>] reported an error rate of 8 -
19%.</p>
<p>In order to look for patterns in the errors made by subjects it
is necessary to have a statistically significant sample of the
errors made by them. Unfortunately, there were not enough incorrect
answers to the <tt class="literal">if</tt> statement problem (Table
3) to enable any statistically significant analysis to be
performed.</p>
<div class="table"><a name="d0e547" id="d0e547"></a>
<table summary=
"Errors. Number of correct and incorrect responses for the first eight and ninth and subsequent answers (parenthesized value is percentage of incorrect responses). H denotes high, M denotes middle, and L denotes low. So H &gt; M M &gt; L denotes &ldquo;high greater than middle and middle greater than low&rdquo;."
border="1" cellspacing="0">
&lt;colgroup&gt;
&lt;col width=&quot;16%&quot;&gt;
&lt;col width=&quot;17%&quot;&gt;
&lt;col width=&quot;17%&quot;&gt;
&lt;col width=&quot;16%&quot;&gt;
&lt;col width=&quot;17%&quot;&gt;
&lt;col width=&quot;17%&quot;&gt;&lt;/colgroup&gt;
&lt;thead&gt;
<tr>
<th>relational form</th>
<th>correct (first 8)</th>
<th>correct (9th and subsequent)</th>
<th>incorrect (first 8)</th>
<th>incorrect (9th and subsequent)</th>
<th>inccorect (total)</th>
</tr>
&lt;/thead&gt;
&lt;tbody&gt;
<tr>
<td>H &gt; M M &gt; L</td>
<td>34</td>
<td>80</td>
<td>0 (0.0%)</td>
<td>2 (2.5%)</td>
<td>2 (1.8%)</td>
</tr>
<tr>
<td>L &lt; M H &gt; M</td>
<td>38</td>
<td>66</td>
<td>0 (0.0%)</td>
<td>3 (4.5%)</td>
<td>3 (2.9%)</td>
</tr>
<tr>
<td>L &lt; M M &lt; H</td>
<td>37</td>
<td>64</td>
<td>1 (2.7%)</td>
<td>3 (4.7%)</td>
<td>4 (4.0%)</td>
</tr>
<tr>
<td>M &lt; H M &gt; L</td>
<td>40</td>
<td>69</td>
<td>3 (4.7%)</td>
<td>2 (2.9%)</td>
<td>5 (4.6%)</td>
</tr>
<tr>
<td>H &gt; M L &lt; M</td>
<td>40</td>
<td>64</td>
<td>4 (10.0%)</td>
<td>2 (3.1%)</td>
<td>6 (5.8%)</td>
</tr>
<tr>
<td>M &gt; L M &lt; H</td>
<td>28</td>
<td>73</td>
<td>4 (14.3%)</td>
<td>2 (2.7%)</td>
<td>6 (5.9%)</td>
</tr>
<tr>
<td>M &lt; H L &lt; M</td>
<td>41</td>
<td>71</td>
<td>2 (4.9%)</td>
<td>5 (7.0%)</td>
<td>7 (6.2%)</td>
</tr>
<tr>
<td>M &gt; L H &gt; M</td>
<td>39</td>
<td>60</td>
<td>1 (2.6%)</td>
<td>6 (10.0%)</td>
<td>7 (7.1%)</td>
</tr>
<tr>
<td>Totals</td>
<td>297</td>
<td>547</td>
<td>15 (5.0%)</td>
<td>25 (4.6%)</td>
<td>40 (4.7%)</td>
</tr>
&lt;/tbody&gt;
</table>
<p class="title c2">Table 3. Errors. Number of correct and
incorrect responses for the first eight and ninth and subsequent
answers (parenthesized value is percentage of incorrect responses).
H denotes high, M denotes middle, and L denotes low. So H &gt; M M
&gt; L denotes &quot;high greater than middle and middle greater than
low&quot;.</p>
</div>
<p>Possible techniques for producing a greater number of incorrect
answers include: running the experiment for a longer period of time
(it seems reasonable to assume that the number of errors will
increase as the number questions answered increases), or making the
problem more difficult (e.g., using longer sounding
identifiers).</p>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e685" id="d0e685"></a>General
Conclusions</h2>
</div>
<p>It was hoped that the results of this experiment would provide
some insight into subjects' performance in handling short sequences
of assignment and if statements. If the results of this experiment
followed the pattern of behaviour seen in other (non-software
related) experiments, it would be possible to claim that the models
of human cognition created to explain that behaviour were also
applicable here. The following summarises the conclusions:</p>
<div class="variablelist">
<dl>
<dt><span class="term">Assignment information held in working
memory.</span></dt>
<dd>
<p>While there was some correlation between the duration of the
spoken form of the identifiers appearing in assignment statements
and subject performance, the content of long term memory also seems
to play a significant role.</p>
</dd>
<dt><span class="term">Performance differences in evaluating
conditional expressions.</span></dt>
<dd>
<p>The form of relational expression had some impact on assignment
recall performance (figure 1). However, the operand orderings
giving the <span class="emphasis"><em>best performance</em></span>
(i.e., lowest number of errors made when recalling assignment
information) were not the same as those for which subject
<span class="emphasis"><em>performed best</em></span> (i.e., lowest
number of incorrect answers to logic problem) in other studies
[<a href="#DeSoto">DeSoto</a>][<a href=
"#Huttenlocher">Huttenlocher</a>][<a href=
"#Clark">Clark</a>][<a href="#Quinton">Quinton</a>][<a href=
"#Sternberg">Sternberg</a>]. There was insufficient error data
(Figure 2) for any reliable statistical analysis of subject
<tt class="literal">if</tt> statement evaluation performance to be
carried out.</p>
</dd>
</dl>
</div>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e727" id="d0e727"></a>Where
Next?</h2>
</div>
<p>While developers are often exhorted to think about the
<span class="emphasis"><em>meaningfulness</em></span> of
identifiers, when creating new ones, the usability of identifiers
within expressions and statements is rarely considered (apart, that
is, from typing effort). More experiments need to be performed
before it is possible to reliably draw any firm conclusions about
the consequences of using different kinds of identifier spellings
in assignment statements and on developer performance during source
code comprehension. Other experiments might use a greater number of
different character sequences (e.g., abbreviations, or identifiers
containing two known words), randomise the order in which
identifiers appear in the table of assignment answers, or use more
commonly occurring character sequences. Other experiments might
also use different filler tasks.</p>
<p>Source code comprehension involves problem solving and
developers are likely to use a variety of strategies to solve the
problems that arise. The strategies used by developers can affect
even such apparently simple tasks as remembering information about
assignment statements. For instance, while some developers may
choose to remember information about the identifiers appearing in
an assignment using an encoding that involves their spoken form,
other developers may use a different encoding (e.g., an abbreviated
form of the identifier such as its first letter, or the encoding of
the semantics that the identifier represents). Any study of
developer cognitive performance needs to ensure that the subjects
taking part in an experiment are only using their cognitive
resources in a way has been anticipated by the experimenter (even
simple tasks such as counting have been found to require cognitive
resources [<a href="#Camos">Camos</a>]).</p>
<p>The problems used in this study could be answered by subjects
having insignificant amounts of experience in software development
(e.g., undergraduate computer science students). It would be
interesting to compare the performance of inexperienced subjects
against that of subjects having a significant amount of experience.
However, care needs to be taken when using inexperienced subjects
to take into account the possibility of performance improvement
through learning of the underlying coding problem itself.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e742" id="d0e742"></a>Further
reading</h2>
</div>
<p>For a readable introduction to human reasoning see &quot;<i class=
"citetitle">Reasoning and thinking</i>&quot; by Ken Manktelow.
&quot;<i class="citetitle">The Cognitive Animal</i>&quot; edited by M.
Bekoff, C. Allen, and G. M. Burghardt contains 57 short, wide
ranging, essays (of varying quality) on animal cognition.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e753" id=
"d0e753"></a>Acknowledgments</h2>
</div>
<p>The author wishes to thank everybody who volunteered their time
to take part in the experiment and the ACCU for making a conference
slot available in which to run it.</p>
</div>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e758" id="d0e758"></a>References</h2>
</div>
<div class="bibliomixed"><a name="Pazymino" id="Pazymino"></a>
<p class="bibliomixed">[Pazymino] Pazymino, Bond, Kamil &amp;
Balda, &quot;Pinyon jays use transitive inference to predict social
dominance&quot;, <span class="citetitle"><i class=
"citetitle">Nature</i></span>, 430:778-781, Aug. 2004</p>
</div>
<div class="bibliomixed"><a name="DeSoto" id="DeSoto"></a>
<p class="bibliomixed">[DeSoto] De Soto, London &amp; Handel,
&quot;Social reasoning and spatial paralogic&quot;, <span class=
"citetitle"><i class="citetitle">Journal of Personality and Social
Psychology</i></span>, 2(4):513-521, 1965</p>
</div>
<div class="bibliomixed"><a name="Leech" id="Leech"></a>
<p class="bibliomixed">[Leech] Leech, Rayson &amp; Wilson,
<span class="citetitle"><i class="citetitle">Word Frequencies in
Written and Spoken English</i></span>, Pearson Education, 2001</p>
</div>
<div class="bibliomixed"><a name="Huttenlocher" id=
"Huttenlocher"></a>
<p class="bibliomixed">[Huttenlocher] Huttenlocher, &quot;Constructing
spatial images: A strategy in reasoning&quot;, Psychological Review,
75(6):550-560, 1968</p>
</div>
<div class="bibliomixed"><a name="Clark" id="Clark"></a>
<p class="bibliomixed">[Clark] Clark, &quot;Linguistic processes in
deductive reasoning&quot;, <span class="citetitle"><i class=
"citetitle">Psychological Review</i></span>, 76(4):387-404,
1969</p>
</div>
<div class="bibliomixed"><a name="Quinton" id="Quinton"></a>
<p class="bibliomixed">[Quinton] Quinton &amp; Fellows, &quot;Perceptual
strategies in the solving of three-term series problems&quot;,
<span class="citetitle"><i class="citetitle">British Journal of
Psychology</i></span>, 66:69-78, 1975</p>
</div>
<div class="bibliomixed"><a name="Sternberg" id="Sternberg"></a>
<p class="bibliomixed">[Sternberg] Sternberg, &quot;Representation and
process in linear syllogistic reasoning&quot;, <span class=
"citetitle"><i class="citetitle">Journal of Experimental
Psychology: General</i></span>, 109(2):119-159, 1980</p>
</div>
<div class="bibliomixed"><a name="Sternberg-" id="Sternberg-"></a>
<p class="bibliomixed">[Sternberg-] Sternberg &amp; Weil, &quot;An
aptitude x strategy interaction in linear syllogistic reasoning&quot;,
<span class="citetitle"><i class="citetitle">Journal of Educational
Psychology</i></span>, 72(2):226-239, 1980</p>
</div>
<div class="bibliomixed"><a name="Roberts" id="Roberts"></a>
<p class="bibliomixed">[Roberts] Roberts, Gilmore, &amp; Wood,
&quot;Individual differences and strategy selection in reasoning&quot;,
<span class="citetitle"><i class="citetitle">British Journal of
Psychology</i></span>, 88:473-492, 1997</p>
</div>
<div class="bibliomixed"><a name="Jones" id="Jones"></a>
<p class="bibliomixed">[Jones] Jones, Experimental data and scripts
for short sequence of assignment statements study, <span class=
"bibliomisc"><a href="http://www.knosof.co.uk/cbook/accu04.html"
target="_top">www.knosof.co.uk/cbook/accu04.html</a></span>,
2004</p>
</div>
<div class="bibliomixed"><a name="Evans" id="Evans"></a>
<p class="bibliomixed">[Evans] Evans, Barston &amp; Pollard, &quot;On
the conflict between logic and belief in syllogistic reasoning&quot;,
<span class="citetitle"><i class="citetitle">Memory &amp;
Cognition</i></span>, 11(3):295-306, 1983</p>
</div>
<div class="bibliomixed"><a name="Gilinsky" id="Gilinsky"></a>
<p class="bibliomixed">[Gilinsky] Gilinsky &amp; Judd, &quot;Working
memory and bias in reasoning across the life span&quot;, <span class=
"citetitle"><i class="citetitle">Psychology and Ageing</i></span>,
9(3):356-371, 1994</p>
</div>
<div class="bibliomixed"><a name="Potts" id="Potts"></a>
<p class="bibliomixed">[Potts] Potts, &quot;Storing and retrieving
information about ordering relationships&quot;, <span class=
"citetitle"><i class="citetitle">Journal of Experimental
Psychology</i></span>, 103(3):431-439, 1974</p>
</div>
<div class="bibliomixed"><a name="Mayer" id="Mayer"></a>
<p class="bibliomixed">[Mayer] Mayer, &quot;Qualitatively different
encoding strategies for linear reasoning premises: Evidence for
single association and distance theories&quot;, <span class=
"citetitle"><i class="citetitle">Journal of Experimental
Psychology: Human Learning and Memory</i></span>, 5(1):1-10,
1979</p>
</div>
<div class="bibliomixed"><a name="Camos" id="Camos"></a>
<p class="bibliomixed">[Camos] Camos &amp; Barrouillet, &quot;Adult
counting is resource demanding&quot;, <span class="citetitle"><i class=
"citetitle">British Journal of Psychology</i></span>, 95:19-30,
2004</p>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
