<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Shape of Code &#187; ACCU</title>
	<atom:link href="http://shape-of-code.coding-guidelines.com/tag/accu/feed/" rel="self" type="application/rss+xml" />
	<link>http://shape-of-code.coding-guidelines.com</link>
	<description></description>
	<lastBuildDate>Sun, 29 Jan 2012 23:49:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The complexity of three assignment statements</title>
		<link>http://shape-of-code.coding-guidelines.com/2009/04/15/the-complexity-of-three-assignment-statements/</link>
		<comments>http://shape-of-code.coding-guidelines.com/2009/04/15/the-complexity-of-three-assignment-statements/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 01:29:14 +0000</pubDate>
		<dc:creator>Derek-Jones</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ACCU]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[human memory]]></category>
		<category><![CDATA[identifier]]></category>

		<guid isPermaLink="false">http://shape-of-code.coding-guidelines.com/?p=95</guid>
		<description><![CDATA[Once I got into researching my book on C I was surprised at how few experiments had been run using professional software developers. I knew a number of people on the Association of C and C++ Users committee, in particular the then chair Francis Glassborow, and suggested that they ought to let me run an [...]]]></description>
			<content:encoded><![CDATA[<p>Once I got into researching <a href="http://www.knosof.co.uk/cbook">my book on C</a> I was surprised at how few experiments had been run using professional software developers.  I knew a number of people on the <a href="http://www.accu.org">Association of C and C++ Users</a> committee, in particular the then chair Francis Glassborow, and suggested that they ought to let me run an experiment at the 2003 ACCU conference.  They agreed and I have been running an experiment every year since.</p>
<p>Before the 2003 conference I had never run an experiment that had people as subjects.  I knew that if I wanted to obtain a meaningful result the number of factors that could vary had to be limited to as few as possible.  I picked a topic which has probably been the subject of more experiments that any other topics, <a href="http://en.wikipedia.org/wiki/Short-term_memory">short term memory</a>.  The <a href="http://www.knosof.co.uk/cbook/accu04.html">experimental design</a> asked subjects to remember a list of three assignment statements (e.g., <code>X = 5;</code>), perform an unrelated task that was likely to occupy them for 10 seconds or so, and then recognize the variables they had previously seen within a list and recall the numeric value assigned to each variable.</p>
<p>I knew all about the factors that influenced memory performance for lists of words: word frequency, word-length, phonological similarity, how <a href="http://en.wikipedia.org/wiki/Chunking_(psychology)">chunking</a> was often used to help store/recall information and more.  My variable names were carefully chosen to balance all of these effects and the information content of the three assignments required slightly more short term memory storage than subjects were likely to have.</p>
<p>The results showed none of the effects that I was expecting.  Had I found evidence that a professional software developer&#8217;s brain really did operate differently than other peoples&#8217; or was something wrong with my experiment?  I tried again <a href="http://www.knosof.co.uk/cbook/accu06.html">two years later</a> (I ran a non-memory experiment the following year while I mulled over my failure) and this time a chance conversation with one of the subjects after the experiment uncovered one factor I had not controlled for.</p>
<p>Software developers are problem solvers (well at least the good ones are) and I had presented them with a problem; how to remember information that appeared to require more storage than available in their short term memories and accurately recall it shortly afterwards.  The <em>obvious</em> solution was to reduce the amount of information that needed to be stored by simply remembering the first letter of every variable (which one of the effects I was controlling for had insured was unique) not the complete variable name.</p>
<p>I ran <a href="http://www.knosof.co.uk/cbook/accu07.html">another experiment</a> the following year and still did not obtain the expected results.  What was I missing now?  I don&#8217;t know and in 2008 I ran a non-memory based experiment.  I still have no idea what techniques my subjects are using to remember information about three assignment statements that are preventing me getting the results I expect.</p>
<p>Perhaps those researchers out there that claim to understand the processes involved in comprehending a complete function definition can help me out by explaining the mental processes involved in remembering information about three assignment statements.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fshape-of-code.coding-guidelines.com%2F2009%2F04%2F15%2Fthe-complexity-of-three-assignment-statements%2F&amp;title=The%20complexity%20of%20three%20assignment%20statements" id="wpa2a_2"><img src="http://shape-of-code.coding-guidelines.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://shape-of-code.coding-guidelines.com/2009/04/15/the-complexity-of-three-assignment-statements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding the &#8216;minimum&#8217; faulty program</title>
		<link>http://shape-of-code.coding-guidelines.com/2009/03/17/finding-the-minimum-faulty-program/</link>
		<comments>http://shape-of-code.coding-guidelines.com/2009/03/17/finding-the-minimum-faulty-program/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 00:43:07 +0000</pubDate>
		<dc:creator>Derek-Jones</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ACCU]]></category>
		<category><![CDATA[compiler testing]]></category>
		<category><![CDATA[grammar]]></category>
		<category><![CDATA[mentoring]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[test generator]]></category>

		<guid isPermaLink="false">http://shape-of-code.coding-guidelines.com/?p=91</guid>
		<description><![CDATA[A few weeks ago I received an inquiry about running a course/workshop on compiler writing. This does not does not happen very often and it reminded me that many years ago the ACCU asked if I would run a mentored group on compiler writing, I was busy writing a book at the time. The inquiry [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I received an inquiry about running a course/workshop on compiler writing.  This does not does not happen very often and it reminded me that many years ago the <a href="http://www.accu.org">ACCU</a> asked if I would run a mentored group on compiler writing, I was busy <a href="http://www.knosof.co.uk/cbook">writing a book</a> at the time.  The inquiry got me thinking it would be fun to run a compiler writing mentored group over a 6-9 month period and I emailed the general ACCU reflector asking if anybody was interested in joining such a group (any reader wanting to join the group has to be a member of the ACCU).</p>
<p>Over the weekend I had a brainwave for a project, automatic compiler test generation coupled with a program source code minimizer (I need a better name for this bit).  Automatic test generation sounds great in theory but in practice whittling down the source code of those programs that result in a fault being exhibited, to create a usable sized test case that is practical for debugging purposes can be a major effort.  What is needed is a tool to automatically do the whittling, i.e., a test case minimizer.</p>
<p>A simple algorithm for whittling down the source of a large test program is to continually throw away that half/third/quarter of the code that is not needed for the fault to manifest itself.  A compiler project that took as input source code, removed half/third/quarter of the code and generated output that could be compiled and executed is realistic.  The input/reduce/output process could be repeated until the generated source was considered to have reached some minima.  Ok, this will soak up some cpu time, but computers are cheap and people are expensive.</p>
<p>Where does the test source code come from?  Easy, it is generated from the same yacc grammar that the compiler, written by the mentored group member, uses to parse its input.  Fortunately such a <a href="http://search.cpan.org/~dcoppit/yagg-1.4001/yagg ">generation tool</a> is available and ready to use.</p>
<p>The beauty is using the same grammar to generate tests and parse input.  This means there is no need to worry about which language subset to use initially and support for additional language syntax can be added incrementally.  </p>
<p>Experience shows that automatically generated test programs quickly uncover faults in production compilers, even when working with language subsets.  Compiler implementors are loath to spend time cutting down a large program to find the statement/expression where the fault lies, this project will produce a tool that does the job for them.</p>
<p>So to recap, the mentored group is going to write one or more automatic source code generators that will be used to stress test compilers written by other people (e.g., gcc and Microsoft).  Group members will also write their own compiler that reads in this automatically generated source code, throws some of it away and writes out syntactically/semantically correct source code.  Various scripts will be be written to glue this all together.</p>
<p>Group members can pick the language they want to work with.  The initial subset could just include supports for integer types, if-statements and binary operators.</p>
<p>If you had trouble making any sense all this, don&#8217;t join the group.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fshape-of-code.coding-guidelines.com%2F2009%2F03%2F17%2Ffinding-the-minimum-faulty-program%2F&amp;title=Finding%20the%20%26%238216%3Bminimum%26%238217%3B%20faulty%20program" id="wpa2a_4"><img src="http://shape-of-code.coding-guidelines.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://shape-of-code.coding-guidelines.com/2009/03/17/finding-the-minimum-faulty-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

