    <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  :: The Trial of the Reckless Coder</title>
        <link>https://members.accu.org/index.php/articles/279</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>




<div class="xar-mod-head"><span class="xar-mod-title">Programming Topics + Overload Journal #67 - Jun 2005</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/articles/">All</a>

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

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

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

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

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c145/">67</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c65-145/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c65+145/">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;The Trial of the Reckless Coder</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 02 June 2005 05:00:00 +01:00 or Thu, 02 June 2005 05:00:00 +01:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="article" lang="en">
<div class="titlepage">
<div>
<div class="edition c1"><b>Overload 67</b>: June 2005</div>
<div>
<h2><a name="d0e1" id="d0e1"></a>The Trial of the
Reckless Coder</h2>
</div>
<div class="author">
<h3><span class="firstname">Phil</span> <span class=
"surname">Bass</span></h3>
<tt class="email">&lt;<a href=
"mailto:Phil@stoneymanor.demon.co.uk">Phil@stoneymanor.demon.co.uk</a>&gt;</tt></div>
</div>
<hr></div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e18" id="d0e18"></a>An Arrest Is
Made</h2>
</div>
<p>&quot;Joe Coder, I'm arresting you on suspicion of coding without due
care and attention, and with reckless disregard for the welfare of
other code users.&quot; I had said this many times before, but this time
I was uneasy. Something in Joe's eyes suggested there might be more
to this case than I'd imagined.</p>
<p>I hesitated, suddenly unsure of the words of the standard
caution. &quot;You do not need to say anything, but anything you do say
will be written down and may be used in evidence against you.&quot; It
was the old caution, the one you heard in films and T.V.
programmes. I blundered on, hoping no-one would notice. &quot;Take him
away, sergeant&quot;, I said a little too loudly. At least I'd resisted
the temptation to say &quot;Book 'im, Danno!&quot;</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e25" id=
"d0e25"></a>Interrogation</h2>
</div>
<p>My head was still a little fuzzy from the previous night. Not
enough water in my nightcap, probably; or too much whisky. As we
prepared to interrogate Joe I had forgotten my qualms about the
<tt class="classname">Bound_Callback&lt;Pmf&gt;</tt> class template
[<a href="#Bass">Bass</a>]. &quot;Did you write this?&quot; I asked, showing
Joe the following code:</p>
<pre class="programlisting">
class Observer
{
public:
    Observer(Event&lt;int&gt;&amp; event)
      : callback(bind_1st(memfun(&amp;Observer::handler), this))
      , connection(event, &amp;callback)
    {}

private:
    void handler(int)
    {
        clog &lt;&lt; &quot;Observer's event handler.&quot; &lt;&lt; endl;
    }

    typedef
        Callback::Adapter&lt;void (Observer::*)(int)&gt;::type
        Callback_Type;

    Callback_Type             callback;
    Callback::Connection&lt;int&gt; connection;
};
</pre>
<p><span class="bold"><b>Exhibit 1 - The evidence for reckless
coding.</b></span></p>
<p>&quot;What if I did?&quot; said Joe. &quot;Look, son&quot;, I said gently, &quot;the
copyright notice has your name on it and the version control log
says you checked it in, so there's no use denying it.&quot; Joe
shrugged. He wasn't going to make it easy for me, but the evidence
was solid. &quot;That's a lot of boilerplate code&quot;, I continued. &quot;Is
it?&quot; Joe responded. His voice sounded innocent, but his eyes were
defiant. I wasn't going to waste time in a verbal sparring match,
so I showed him a shorter, simpler alternative:</p>
<pre class="programlisting">
class Observer
{
public:
    Observer(Event&lt;int&gt;&amp; event)
      : callback(event, &amp;Observer::handler, this)
    {}

private:
    void handler(int)
    {
        clog &lt;&lt; &quot;Observer's event handler.&quot; &lt;&lt; endl;
    }

    Bound_Callback&lt;void (Observer::*)(int)&gt; callback;
};
</pre>
<p><span class="bold"><b>Exhibit 2 - Showing consideration for
other code users.</b></span></p>
<p>Joe humphed. He was obviously unimpressed. It was a puzzling
reaction, but I pressed on. &quot;That Bound_Callback template makes
things much easier for the author of the Observer class, doesn't
it?&quot; Joe said nothing, but the expression on his face challenged me
to prove my point. &quot;Doesn't it?&quot; I yelled, banging the desk with my
fist. &quot;Perhaps&quot;, said Joe, unflustered.</p>
<p>&quot;Perhaps?&quot; I exclaimed. &quot;There's no 'perhaps' about it, my
lad...&quot; Joe interrupted me. &quot;Look, granddad, you haven't given me a
specification for the Bound_Callback template, so how can I tell
whether it's useful?&quot;</p>
<p>I had to admit he had a point and wrote this on the
whiteboard:</p>
<div class="sidebar">
<p><span class="bold"><b>Intent</b></span></p>
<p>A bound-callback is a callback that is bound to an event for the
whole of its life. The Bound_Callback&lt;Pmf&gt; class template
implements the bound-callback concept for the common case in which
the callback invokes a member function.</p>
<p><span class="bold"><b>Synopsis</b></span></p>
<pre class="programlisting">
template&lt;typename Pmf&gt;
struct Bound_Callback
  : Callback::Function&lt;typename argument&lt;Pmf&gt;::type&gt;
{
    typedef typename argument&lt;Pmf&gt;::type Arg;
    typedef typename   result&lt;Pmf&gt;::type Result;
    typedef typename   class_&lt;Pmf&gt;::type Class;

    Bound_Callback(Event&lt;Arg&gt;&amp;, Pmf, Class*);
   ~Bound_Callback();

    Result operator()(Arg);
};
</pre>
<p>Note: Here, <tt class="type">argument&lt;Pmf&gt;</tt>,
<tt class="type">result&lt;Pmf&gt;</tt> and <tt class=
"type">class_&lt;Pmf&gt;</tt> are simple class templates with a
nested <tt class="literal">typedef</tt>. They are known as
meta-functions because they take a type parameter (the
pointer-to-member-function type) and 'calculate' another type (the
argument type, result type and class of the member function).
Further information on meta-functions in general and these
meta-functions in particular can be found in [1].</p>
<p><span class="bold"><b>Types</b></span></p>
<p><tt class="type">Pmf</tt> is the type of a pointer to the member
function to be invoked.</p>
<p><tt class="type">Arg</tt> is the type of the parameter of the
member function to be invoked.</p>
<p><tt class="type">Result</tt> is the type of the result of the
member function to be invoked.</p>
<p><tt class="type">Class</tt> is the class of which the function
to be invoked is a member.</p>
<p><span class="bold"><b>Constructor</b></span></p>
<pre class="programlisting">
Bound_Callback(Event&lt;Arg&gt;&amp; event, Pmf pmf, Class* ptr);
</pre>
<p>Stores a reference to <i class="parameter"><tt>event</tt></i>;
copies and stores the pointer-to-member-function <i class=
"parameter"><tt>pmf</tt></i> and the pointer <i class=
"parameter"><tt>ptr</tt></i>; connects <tt class=
"varname">*this</tt> to event.</p>
<p><span class="bold"><b>Destructor</b></span></p>
<p>Disconnects *this from event.</p>
<p><span class="bold"><b>Function Call Operator</b></span></p>
<pre class="programlisting">
Result operator()(Arg arg);
</pre>
<p>Invokes the member function pointed to by pmf on the object
pointed to by ptr passing the value arg and returning any
result.</p>
</div>
<p>I was quite pleased with myself. Joe, however, remained
unimpressed. &quot;Doesn't seem very flexible&quot;, he remarked. &quot;What do
you mean?&quot; I said tetchily, &quot;There's nothing inflexible about
that!&quot;</p>
<p>It was a mistake. Joe stood up, his eyes sparkled and he
attacked my whiteboard specification with vigour. &quot;Well, for a
start&quot;, he said, &quot;the callback function's argument has to be
exactly the same type as that published by the event.&quot;</p>
<p>He scrawled the following example on the whiteboard:</p>
<pre class="programlisting">
// Try to connect handler(int) to Event&lt;short&gt;
class Observer
{
public:
    Observer(Event&lt;short&gt;&amp;)
      : callback(event, &amp;Observer::handler, this)
    {}  // error!

private:
    void handler(int);

    Bound_Callback&lt;void (Observer::*)(int)&gt; callback;
};
</pre>
<p><span class="bold"><b>Exhibit 3 - Implicit conversions not
supported.</b></span></p>
<p>&quot;The event publishes <tt class="type">short</tt> values, the
handler function accepts <tt class="type">int</tt> values and
there's an implicit conversion from <tt class="type">short</tt> to
<tt class="type">int</tt>. You'd expect it to work, but it
doesn't.&quot; There was a hint of triumph in Joe's voice. He must have
seen the puzzled look on my face because he carried on,
patronisingly. &quot;Look, granddad, the <tt class=
"type">Bound_Callback&lt;Pmf&gt;</tt> constructor takes an
<tt class="type">Event&lt;int&gt;&amp;</tt> as its first argument
and we're giving it an <tt class=
"type">Event&lt;short&gt;&amp;</tt>. There's no implicit conversion
from <tt class="type">Event&lt;short&gt;&amp;</tt> to <tt class=
"type">Event&lt;int&gt;&amp;</tt>, so you get a compilation
error.&quot;</p>
<p>He was right. I'd been drawn into an intellectual boxing match
and I was losing on points. Instinctively, I began to defend the
<tt class="type">Bound_Callback&lt;Pmf&gt;</tt> code. &quot;Yeah, but
that's outside the scope of the <tt class=
"type">Bound_Callback&lt;Pmf&gt;</tt> specification&quot;, I countered.
Joe smiled smugly. &quot;My point, precisely&quot;, he sneered.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e177" id="d0e177"></a>The Case for
the Defence</h2>
</div>
<p>I remembered Joe's smugness when the case came to trial and his
defence counsel addressed the jury. &quot;You have heard the prosecution
allege that the defendant has been coding with reckless disregard
for the welfare of other code users. By their own admission, their
case rests almost entirely on the evidence presented in Exhibit 1
and the alternative interface in Exhibit 2 that they have described
as more &quot;user friendly&quot;. The defence, however, will show that
Exhibit 2 is only useful in a rather narrow range of programs -
much narrower, in fact, than Exhibit 1. It is our contention that a
tool of limited applicability shows greater disregard for code
users than one that, in the spirit of C++, allows the user full
freedom of expression.&quot;</p>
<p>The defence barrister was George Sharpe, an old adversary, and
he was revelling in the usual obscure style of language used in
courtrooms across the world. My attention began to wander. I
couldn't help feeling sorry for the jury. Did they understand what
the lawyer was saying? Did they care? Perhaps they were thinking
about what they would have for lunch or whether the neighbour had
remembered to take their dog for a walk. Suddenly, I realised I had
been called for cross-examination.</p>
<p>&quot;Detective Inspector Blunt, how would you define an Event?&quot;
Sharpe always starts with an easy question. I gave the stock
answer, &quot;An Event is a sequence of pointers to functions.&quot; The
barrister repeated my answer as a question. &quot;A sequence of pointers
to functions?&quot; He says he does this for the jury's benefit - to be
sure they understand. But I think it's just to annoy me. &quot;That is
the standard definition&quot;, I said. &quot;I see. And this covers all kinds
of sequence, all kinds of pointer and all kinds of function, does
it?&quot; I answered in the affirmative and Sharpe's questions flowed
smoothly on. &quot;So, for example, a sequence might be a list or a set
or an array?&quot; Before I could answer Sharpe fired another salvo. &quot;A
pointer might be a built-in pointer, an auto_ptr or a shared_ptr?
And a function might be a member function, a non-member function or
a function object?&quot; He wasn't giving me time to think and I sensed
he was preparing a trap. I responded with a cautious, &quot;In
principle, yes.&quot;</p>
<p>There was a pause while Sharpe presented Exhibit 4 to the
court.</p>
<pre class="programlisting">
// A bound callback that calls a member function.
template&lt;typename Pmf&gt;
class Bound_Callback
  : public Callback::Function&lt;typename argument&lt;Pmf&gt;::type&gt;
{
public:
    typedef typename   result&lt;Pmf&gt;::type Result;
    typedef typename   class_&lt;Pmf&gt;::type Class;
    typedef typename argument&lt;Pmf&gt;::type Arg;

    Bound_Callback(Event&lt;Arg&gt;&amp; e, Pmf f, Class* p)
      : event(e), function(f), pointer(p),
        position(event.insert(event.end(), this))
    {}

   ~Bound_Callback() {event.erase(position);}

    virtual Result operator()(Arg arg)
    {
        return (pointer-&gt;*function)(arg);
    }

private:
    Event&lt;Arg&gt;&amp; event;
    Pmf         function;
    Class*      pointer;

    typename Event&lt;Arg&gt;::iterator position;
};
</pre>
<p><span class="bold"><b>Exhibit 4 - A bound callback for member
functions.</b></span></p>
<p>&quot;Now, Detective Inspector, I am sure you recognise this piece of
code.&quot; Sharpe placed a sheet of paper in front of me and continued,
&quot;It is the code you wrote to demonstrate that a bound callback with
a user-friendly interface can be implemented, is it not?&quot; I nodded
and Sharpe pressed on before the judge could remind me to answer so
that the court could hear.</p>
<p>Turning to the jury he explained that the test program for
Exhibit 4 used an <tt class="type">Event&lt;int&gt;</tt> that is a
list of built-in pointers to the abstract base class <tt class=
"classname">Callback::Function&lt;int&gt;</tt>. Then, turning back
to me, he asked &quot;Does this code work for Events that are sets of
pointers to functions?&quot; &quot;No&quot; I replied steadily. &quot;No? Well then,
does it work for arrays of pointers to functions?&quot; I did not
respond. &quot;Does it work for lists of smart pointers to functions?
Does it work for lists of pointers to ordinary C++ functions, or
function objects not derived from <tt class=
"classname">Callback::Function&lt;int&gt;</tt>? Does it work in any
of these situations, Detective Inspector?&quot; I started to say that it
was never intended to be that general, but Sharpe cut me off. &quot;Yes
or no&quot; he demanded. I looked to the prosecution team for support,
but they didn't stir. I turned towards the judge to appeal against
this line of questioning, but he was entirely unsympathetic. &quot;Yes
or no, Detective Inspector Blunt?&quot; thundered Sharpe. &quot;No, it
doesn't support those uses.&quot; I confessed.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e206" id="d0e206"></a>A Brief
Interlude</h2>
</div>
<p>I was livid. It looked as though Joe Coder might get off on a
technicality. More importantly, I had been made to look a proper
Charlie. At the next recess I called the team together and demanded
to know why no-one had anticipated Sharpe's under-hand tactics.
There were no answers. There were plenty of sheepish faces and lots
of excuses, but no answers.</p>
<p>There was an awkward silence. A young police constable tried to
cheer me up. &quot;Sir?&quot; I turned and raised an eyebrow, inviting her to
continue. &quot;Sharpe was talking about <tt class=
"classname">auto_ptr</tt> and <tt class=
"classname">boost::shared_ptr</tt> - smart pointers that manage the
lifetime of their target object.&quot; I didn't see how this was
helping. &quot;Well, sir, that makes no sense. The <tt class=
"type">Bound_Callback&lt;Pmf&gt;</tt> classes are designed to be
members of the <tt class="classname">Observer</tt> class, so their
lifetime is tied to the <tt class="classname">Observer</tt>'s. And,
anyway, you can't put <tt class="classname">auto_ptr</tt>s in
standard library containers.&quot; &quot;I know that, Jenkins&quot;, I snapped,
&quot;you, know that and Sharpe certainly knows that, but do you think
the jury realises it?&quot;</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e231" id="d0e231"></a>The Judge's
Summing Up</h2>
</div>
<p>Justice Bright is renowned for his clear and insightful summing
up. He reminded the jury that the charge was coding without due
care and attention and with reckless disregard to the welfare of
other code users. &quot;In this case, the intentions of the defendant
are crucial.&quot; he explained. &quot;If he believed his fellow programmers
would be best served by generic, but somewhat verbose facilities
for bound callbacks you must find him not guilty. If, on the other
hand, he thought that a more limited, but more user-friendly
facility was better you must find him guilty as charged. In
reaching your verdict you do not need to consider the defendant's
competence as a programmer. Better and worse solutions to the bound
callback problem undoubtedly exist, but we can not condemn a man
for failing to reach perfection nor is it the responsibility of
this court to apply remedies for lack of ability or training.&quot;</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e236" id="d0e236"></a>The Jury
Retires</h2>
</div>
<p>The judge's words were going round in my head as we waited for
the jury to consider their verdict. The case would be decided by
the jury's assessment of the defendant's character, but the
technical question behind the trial remained unresolved. Exhibit 1
illustrates a general, but verbose mechanism for implementing bound
callbacks; Exhibit 2 shows a more limited, but easier-to-use
alternative. Could there be a bound callback that is both fully
generic and easy to use?</p>
<p>I tried to imagine what that perfect bound callback would look
like, but it was too big a problem to solve all at once.</p>
<p>Then I considered some specific Event types:</p>
<div class="orderedlist">
<ol type="1">
<li>
<p>a list of pointers to abstract function objects (the common
case),</p>
</li>
<li>
<p>an array of pointers to simple functions (the simplest case)
and</p>
</li>
<li>
<p>a set of shared pointers to function objects (associative
container + user-defined pointer).</p>
</li>
</ol>
</div>
<p>What would callbacks bound to these types of Event have in
common? How would they differ? And how would they invoke handler
functions of any compatible type? I fell into deep
thought&hellip;</p>
<p>In case 1 the bound callback has to provide a concrete
implementation of the abstract function, its constructor should
insert a new pointer into the list and its destructor should erase
the pointer from the list. This is a generalisation of the code
shown in Exhibit 4. Sketch 1 illustrates the idea.</p>
<pre class="programlisting">
template&lt;typename Event, typename Function&gt;
class Bound_Callback
{
public:
    Bound_Callback(Event&amp; e, const Function&amp; function)
      : event(&amp;e)
      , adapter(function)
      , position(event-&gt;insert(event-&gt;end(), &amp;adapter))
    {}

    ~Bound_Callback() {event-&gt;erase(position);}

private:
    Event*                                 event;
    typename adapter&lt;Event,Function&gt;::type adapter;
    typename iterator&lt;Event&gt;::type         position;
};
</pre>
<p><span class="bold"><b>Sketch 1 - A bound callback for a list of
pointers to abstract functions.</b></span></p>
<p>Here, adapter is a meta-function that generates the type of a
concrete function object and iterator is a meta-function that
generates the list iterator type. This much was clear to me while
waiting for the jury's verdict; the precise details could be worked
out later.</p>
<p>Case 2 is very different. No function object is necessary and
arrays do not support insert or erase operations. Instead, the
callback's constructor could assign a function pointer to an array
element and the destructor could reset that array element to a
pointer to a no-op function. This would look something like Sketch
2:</p>
<pre class="programlisting">
template&lt;typename Position &gt;
class Bound_Callback
{
public:
    typedef typename   target&lt;Position&gt;::type Pointer;
    typedef typename   target&lt;Pointer &gt;::type Function;
    typedef typename   result&lt;Function&gt;::type Result;
    typedef typename argument&lt;Function&gt;::type Arg;

    static Result no_op(Arg) {}

    Bound_Callback(Position p, const Function&amp; f)
      : position(p)
    {
        *position = &amp;f;
    }

    ~Bound_Callback() {*position = no_op; }

private:
    Position position;
};
</pre>
<p><span class="bold"><b>Sketch 2 - A bound callback for an array
of pointers to functions.</b></span></p>
<p>Although they are small class templates there are several
differences between Sketches 1 and 2. In particular, the template
parameter lists are completely different. The data storage
requirements and the constructor parameters are different, too. In
fact the differences are large enough to call into question the
whole idea of a single fully generic bound callback.</p>
<p>In case 3 a concrete function object may need to be created, the
constructor would create a shared pointer and insert it into the
set, and the destructor would erase the shared pointer.</p>
<pre class="programlisting">
template&lt;typename Event, typename Function&gt;
class Bound_Callback
{
public:
    typedef typename element&lt;Event&gt;::type Pointer;

    Bound_Callback(Event&amp; e, const Function&amp; f)
      : event(&amp;e),
        position(event-&gt;insert(make_pointer&lt;Pointer&gt;(f)))
    {}

    ~ Bound_Callback() {event-&gt;erase(position);}

private:
    Event*                         event;
    typename iterator&lt;Event&gt;::type position;
};
</pre>
<p><span class="bold"><b>Sketch 3 - A bound callback for a set of
shared pointers to abstract functions.</b></span></p>
<p>This is similar to Sketch 1 except that a function object is
created on the heap; the make_pointer function template creates the
function object and returns a shared pointer to the new object. An
intelligent make_pointer function could select an intrusive shared
pointer if the user supplies a reference-counted function object,
or a non-intrusive shared pointer otherwise.</p>
<p>In all three cases the bound callback might need to provide a
function adapter to convert the value published by the Event to the
type required by the user-supplied handler function. Sketches 1 and
3 already use a function adapter, so it can be extended for this
purpose. In Sketch 2, a function adapter would have to be
introduced specially. I began to think about merging these sketches
into a single, truly generic bound callback. The three
possibilities took on geometric shapes in my mind. They seemed to
float before me, drifting around like globules of oil in a lava
lamp, rising, falling, merging, splitting. It was relaxing,
soothing.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e286" id="d0e286"></a>Verdict</h2>
</div>
<p>I woke up with a start. My sergeant's hand was shaking my
shoulder. &quot;Inspector, Inspector&quot;, he was saying. &quot;They've reached a
verdict.&quot; I roused myself and went back into the courtroom. The
judge and jury filed in. The clerk of the court went through the
ritual of asking if the members of the jury were all agreed. They
were. &quot;Do you find the defendant guilty or not guilty?&quot; Perhaps it
was my imagination, but the foreman of the jury seemed to pause for
dramatic effect and then said in a clear and confident voice, &quot;Not
guilty.&quot;</p>
<p>So that was it. The prosecution I'd worked hard on for most of
the last 6 months had failed to achieve a conviction. It seemed a
waste. It wasn't a big case, but it had given my team a purpose, a
reason to press on through the humdrum routine of police work, a
feeling of doing something worthwhile. &quot;Oh well, you win some, you
lose some.&quot; I told myself and turned to leave.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e293" id=
"d0e293"></a>Acknowledgements</h2>
</div>
<p>I would like to thank Mary Opie for suggesting the names Blunt
and Sharpe.</p>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e298" id="d0e298"></a>References</h2>
</div>
<div class="bibliomixed"><a name="Bass" id="Bass"></a>
<p class="bibliomixed">[Bass] Phil Bass, &quot;The Curious Case of the
Compile-Time Function&quot;, <span class="citetitle"><i class=
"citetitle">Overload 62</i></span>, August 2004.</p>
</div>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
