<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">

<channel>
	<title>Just Software Solutions Blog</title> 
	<link>http://www.justsoftwaresolutions.co.uk/blog/</link> 
	<description>Software and Website Development</description> 

	<language>en-gb</language> 
	<copyright>Copyright 2007-2010 Just Software Solutions Ltd.</copyright> 

	<managingEditor>Anthony Williams</managingEditor> 

	<webMaster>info@justsoftwaresolutions.co.uk</webMaster><item><title>ACCU 2013 and the C++ Standards Meeting</title><link>http://www.justsoftwaresolutions.co.uk/news/accu-2013-and-c++-standards-meeting.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/accu-2013-and-c++-standards-meeting.html</guid><pubDate>Mon, 06 May 2013 09:38:51 +0100</pubDate><description><![CDATA[
<p>This year's <a href="http://accu.org/index.php/conferences/accu_conference_2013">ACCU
  conference</a> was at a new venue: the Marriott hotel in Bristol. This is a bit closer to home for
  me than the previous venue in Oxford, which made the trip there and back more comfortable. As
  ever, the conference itself was enjoyable, educational and exhausting in equal measure.</p>

<p>This year was also BSI's turn to host the Spring ISO C++ committee meeting, which was
  conveniently arranged to be the week following ACCU, in the same hotel. Having not attended a
  meeting since the last time the committee met in the UK, I was glad to be able to attend this
  too.</p>

<h3>ACCU 2013</h3>

<p>As usual, with 5 tracks running simultaneously, it was hard to choose which sessions to attend. I
  stuck mostly to C++-centric, or general software development sessions, but there were also
  sessions on a wide range of other topics, including Ruby, Java, Scala, Git, C#, testing,
  management and culture, amongst others.</p>

<p>I was invited to contribute to Pete
  Goodliffe's <a href="http://accu.org/index.php/conferences/accu_conference_2013/accu2013_sessions#becoming_a_better_programmer">Becoming
  a Better Programmer</a> panel session, which was well attended and entertaining, as usual for
  Pete's sessions. My contribution on "doing things mindfully" seemed well-received, but wasn't the
  most popular &mdash; that honour went to Seb Rose, though Brian Marick called out Anna-Jayne
  Metcalfe's contribution on "If it ain't broke, do fix it" in the keynote the next morning.</p>

<p>My presentation on "C++11 in the Real World" was also well attended, with some good questions
  from the audience. A couple of people have asked me for my slides: they are available from the
  <a href="http://accu.org/content/conf2013/Anthony_Williams_real_world.pdf">ACCU website</a>.</p>

<h3>ISO C++ committee meeting</h3>

<p>This was a landmark meeting, for several reasons. Firstly, there were over 100 attendees, making
  it one of the most well-attended ISO C++ meetings ever. Secondly, this bumper attendee count was
  complemented by a bumper batch of proposals and position papers to process, which meant that all
  the working groups were pressed for time, and people met for extra sessions in the evenings to try
  and get through them all. Finally, the committee voted to publish a new "CD", starting the formal
  process leading to a C++14 standard.</p>

<p>The meeting was 6 days long, but I was only able to attend for the first 2 days. Unsurprisingly,
  I spent my time in the Concurrency group (SG1). We had a lot of papers to discuss, and some of the
  discussions were quite involved. Ultimately, not many papers were forwarded to the full
  committee, and only one paper other than the basic defect-report fixes was approved.</p>

<p>Lawrence Crowl's paper on Stream Mutexes
  (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3535.html">N3535</a>) was first
  up. The problem this paper is trying to address is ensuring that data written to a stream from
  multiple threads appears in a coherent order &mdash; though concurrent writes to
  e.g. <code>std::cout</code> are guaranteed not to yield undefined behaviour, the output may be
  interleaved in an arbitrary fashion. This got quite a bit of discussion over the course of the
  week, and was eventually submitted as a much-modified paper for writing chunks to a stream in an
  atomic fashion, which was voted down in full committee.</p>

<p>Herb Sutter's late paper on the behaviour of the destructor of <code>std::future</code> (N3630)
  was up next. This is a highly conterversial topic, and yielded much discussion. The crux of the
  matter is that as currently specified the destructor of <code>std::future</code> blocks if it came
  from an invocation of <code>std::async</code>, the asynchronous function was run on a separate
  thread (with the <code>std::launch::async</code> policy), and that thread has not yet
  finished. This is highly desirable in many circumstances, but Herb argued that there are other
  circumstances where it is less desirable, and this makes it hard to use <code>std::future</code>
  in some types of program.</p>

<p>Much of the discussion focused on the potential for breaking existing code, and ways of
  preventing this. The proposal eventually morphed into a new paper (N3637) which created 2 new
  types of future: <code>waiting_future</code>
  and <code>shared_waiting_future</code>. <code>std::async</code> would then be changed to return
  a <code>waiting_future</code> instead of a <code>future</code>. Existing code that compiled
  unchanged would then keep the existing behaviour; code that changed behaviour would fail to
  compile. Though the change required to get the desired behaviour would not be extensive, the
  feeling in the full committee was that this breakage would be too extensive, and the paper was
  also voted down in full committee.</p>

<p>Herb's original paper also included a change to the destructor of <code>std::thread</code>, so
  that the destructor of a joinable thread would call <code>join()</code> rather
  than <code>std::terminate()</code>. This was put up for vote as N3636, but again was voted down in
  full committee.</p>

<p>Like I said, there were lots of other papers up for discussion. Some were concrete proposals,
  whilst others were less complete, asking for feedback on the approach. Only one paper was approved
  for the C++14 time frame &mdash; whilst there was considerable interest in the idea behind some of
  the others, there was disagreement about the details, and nothing else was deemed ready. I look
  forward to seeing the revised versions of some of these proposals when they are ready, especially
  the executors, continuations and parallel algorithms papers.</p>

<p>The paper that <em>did</em> get approved was Howard Hinnant's paper on shared locking
(<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3568.html">N3568</a>), but even
that didn't go through unchanged. I have serious concerns about the <code>upgrade_mutex</code>
proposed in the original paper, and while I didn't manage to get my concerns across via email (this
was discussed after I left), there was not enough interest in including it in C++14. The approved
  paper (<a href="http://isocpp.org/files/papers/N3659.html">N3659</a>) therefore included only <code>shared_mutex</code>
and <code>shared_lock</code>, <em>not</em> <code>upgrade_mutex</code>, which is good. N3659 was also
approved by the vote in full committee, so will be part of C++14.</p>

<h3>Wrap up</h3>

<p>Having the conference and ISO meeting back-to-back was intense, but I thoroughly enjoyed
  attending both. C++14 looks set to be a significant improvement over C++11 &mdash; though the
  individual changes are minor, they offer quite a bit in terms of improved usability of the
  language and library. See the trip reports
  by <a href="http://isocpp.org/blog/2013/04/trip-report-iso-c-spring-2013-meeting">Herb Sutter</a>
  and <a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/the_view_from_c_standard_meeting_april_2013_part_1?lang=en">Michael
  Wong</a>
  (<a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/the_view_form_the_c_standrd_meeting_april_2013_part_2?lang=en">part
  2</a>, <a href="https://www.ibm.com/developerworks/community/blogs/5894415f-be62-4bc0-81c5-3956e82276f3/entry/the_view_form_the_c_standard_meeting_april_2013_part_3?lang=en">part
  3</a>) for more details on the accepted papers.</p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/accu-2013-and-c++-standards-meeting.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/accu" rel="tag">accu</a>,  <a href="http://technorati.com/tag/cplusplus" rel="tag">cplusplus</a>,  <a href="http://technorati.com/tag/standards" rel="tag">standards</a>,  <a href="http://technorati.com/tag/iso" rel="tag">iso</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/accu-2013-and-c++-standards-meeting.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu-2013-and-c%2B%2B-standards-meeting.html&amp;title=ACCU%202013%20and%20the%20C%2B%2B%20Standards%20Meeting"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu-2013-and-c%2B%2B-standards-meeting.html&amp;title=ACCU%202013%20and%20the%20C%2B%2B%20Standards%20Meeting">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu-2013-and-c%2B%2B-standards-meeting.html&amp;title=ACCU%202013%20and%20the%20C%2B%2B%20Standards%20Meeting">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/accu-2013-and-c++-standards-meeting.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>just::thread Pro: Actors Edition released</title><link>http://www.justsoftwaresolutions.co.uk/news/just-thread-pro-released.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/just-thread-pro-released.html</guid><pubDate>Tue, 23 Apr 2013 09:35:12 +0100</pubDate><description><![CDATA[
<p>I am pleased to announce that the first release
  of <a href="http://www.stdthread.co.uk/pro"><code>Just::Thread</code> Pro</a> is here. The Actors
  Edition provides a <a href="http://www.stdthread.co.uk/prodoc/headers/actor.html">framework for
  creating actors</a> that run on separate threads, and communicate via message passing, as well
  as <a href="http://www.stdthread.co.uk/prodoc/headers/synchronized_value/synchronized_value.html"><code>jss::synchronized_value</code></a>
  for synchronizing access to a single object
  and <a href="http://www.stdthread.co.uk/prodoc/headers/concurrent_map/concurrent_map.html"><code>jss::concurrent_map</code></a>,
  a hash map that is safe for concurrent access from multiple threads.</p>

<p>See the <a href="http://www.stdthread.co.uk/pro">overview</a> for more information, or read
the <a href="http://www.stdthread.co.uk/prodoc/">full documentation.</a></p>

<h3>Get your copy of Just::Thread Pro: Actors Edition</h3>

<p><strong><a href="http://www.stdthread.co.uk/order.html">Purchase your
copy</a> and get started now.</strong></p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/just-thread-pro-released.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/multithreading" rel="tag">multithreading</a>,  <a href="http://technorati.com/tag/concurrency" rel="tag">concurrency</a>,  <a href="http://technorati.com/tag/C++0x" rel="tag">C++0x</a>,  <a href="http://technorati.com/tag/C++11" rel="tag">C++11</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/just-thread-pro-released.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-pro-released.html&amp;title=just%3A%3Athread%20Pro%3A%20Actors%20Edition%20released"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-pro-released.html&amp;title=just%3A%3Athread%20Pro%3A%20Actors%20Edition%20released">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-pro-released.html&amp;title=just%3A%3Athread%20Pro%3A%20Actors%20Edition%20released">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/just-thread-pro-released.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>ACCU 2013</title><link>http://www.justsoftwaresolutions.co.uk/news/accu2013.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/accu2013.html</guid><pubDate>Sat, 06 Apr 2013 22:47:10 +0100</pubDate><description><![CDATA[
<p>I'm presenting on "C++11 features and real-world code"
  at <a href="http://accu.org/index.php/conferences/accu_conference_2013">ACCU 2013</a> in Bristol
  on this coming Thursday, 11th April. Here's the abstract:</p>

<blockquote>
  <p>C++11 has many nifty features, but how do they actually impact developers at the code face?
  Which C++11 features offer the best bang for the buck?</p>

  <p>In this session I'll look at a selection of C++11 language and library features that I've found
  of real practical benefit in application and library code, with examples of equivalent C++03
  code.</p>

  <p>The features covered will include the concurrency support (of course), lambdas, and "auto",
  amongst a variety of others.</p>
</blockquote>

<p>Hope to see you there!</p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/accu2013.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/conferences" rel="tag">conferences</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/accu2013.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2013.html&amp;title=ACCU%202013"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2013.html&amp;title=ACCU%202013">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2013.html&amp;title=ACCU%202013">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/accu2013.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>Duplication in Software</title><link>http://www.justsoftwaresolutions.co.uk/design/duplication.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/design/duplication.html</guid><pubDate>Tue, 26 Mar 2013 09:50:03 +0000</pubDate><description><![CDATA[
<p>Much has been said about the importance of reducing duplication in software. For example,
  J. B. Rainsberger has "minimizes duplication" as the second of his
  four <a href="http://www.jbrains.ca/permalink/the-four-elements-of-simple-design">"Elements of
  Simple Design"</a>, and lots of the teachings of the Agile community stress the importance of
  reducing duplication when refactoring code.</p>

<p>Inspired by Kevlin
  Henney's <a href="https://twitter.com/KevlinHenney/status/313606921393434625">tweet</a> last week,
  where he laments that programmers trying to remove duplication often take it literally, I wanted
  to talk about the different kinds of duplication in software. I've just mentioned "literal"
  duplication, so let's start with that.</p>

<h3>Basic Literal Duplication</h3>

<p>This is the most obvious form of duplication: sections of code which are completely
  identical. This most often arises due to copy-and-paste programming, but can often arise in the
  form of repetitive patterns &mdash; a simple <code>for</code> loop that is repeated multiple
  places with the same body, for example.</p>

<h4>Removing Literal Duplication</h4>

<p>The easiest to create, literal duplication is also the easiest to remove: just extract a function
  that does the necessary operation.</p>

<p>Sometimes, though the code is identical, the <em>types</em> involved are different. You cannot
  address this with extracting a simple function, so we have a new class of duplication.</p>

<h3>Parametric Literal Duplication</h3>

<p>Parametric literal duplication can also arise from copy-and-paste programming. The key feature is
  that the types of the variables are different so you cannot just reuse the code from one place in
  another, even if it was a nicely self-contained function. If you eliminate all the basic literal
  duplication, parametric literal duplication will give you sets of functions with identical
  structure but different types.</p>

<p>With the lack of a portable <code>is_ready()</code> function for <code>std::future</code>, it is
  common to test whether a future <code>f</code> is ready by
  writing <code>f.wait_for(std::chrono::seconds(0))==std::future_status::ready</code>. Since <code>std::future</code>
  is a class template, the types of the various futures that you may wish to check for readiness may
  vary, so you cannot extract a simple function. If you write this in multiple places you therefore
  have parametric literal duplication.</p>

<h4>Removing Parametric Literal Duplication</h4>

<p>There are various ways to remove parametric literal duplication. In C++ the most straightforward
  is probably to use a template. e.g.</p>

<pre class="listing">
template&lt;typename T&gt;
inline bool is_ready(std::future&lt;T&gt; f){
    return f.wait_for(std::chrono::seconds(0))==std::future_status::ready;
}
</pre>

<p>In other languages you might choose to use generics, or rely on duck-typing. You might also do it
  by extracting an interface and using virtual function calls, but that requires that you can modify
  the types of the objects, or are willing to write a facade.</p>

<p>Parametric literal duplication is closely related to what I call Structural Duplication.</p>

<h3>Structural Duplication</h3>

<p>This is where the overall pattern of some code is the same, but the details differ. For example,
  a <code>for</code> loop that iterates over a container is a common structure, but the loop body
  varies from loop to loop.e.g</p>

<pre class="listing">
std::vector&lt;int&gt; v;

int sum=0;
for(std::vector&lt;int&gt;::iterator it=v.begin();it!=v.end();++it){
    sum+=*it;
}
for(std::vector&lt;int&gt;::iterator it=v.begin();it!=v.end();++it){
    std::cout&lt;&lt;*it&lt;&lt;std::endl;
}
</pre>

<p>You can't just extract the whole loop into a separate function because the loop body is
  different, but that doesn't mean you can't do anything about it.</p>

<h4>Removing Structural Duplication</h4>

<p>One common way to remove such duplication is to extract the commonality with the template method
  pattern, or create a parameterized function where the details are passed in as a function
  to call.</p>

<p>For simple loops like the ones above, we have <code>std::for_each</code>, and the
  new-style C++11 <code>for</code> loops:</p>

<pre class="listing">
std::for_each(v.begin(),v.end(),[&amp;](int x){sum+=x;});
std::for_each(v.begin(),v.end(),[](int x){std::cout&lt;&lt;x&lt;&lt;std::endl;});

for(int x:v){
    sum+=x;
}
for(int x:v){
    std::cout&lt;&lt;x&lt;&lt;std::endl;
}
</pre>

<p>Obviously, if your repeated structure doesn't match the standard library algorithms then you must
  write your own, but the idea is the same: take a function parameter which is a callable object and
  which captures the variable part of the structure. For a loop, this is the loop body. For a sort
  algorithm it is the comparison, and so forth.</p>

<h3>Temporal Duplication</h3>

<p>This is where some code only appears once in the source code, but is executed repeatedly, and the
  only desired outcome is the computed result, which is the same for each invocation. For example,
  the call to <code>v.size()</code> or <code>v.end()</code> to find the upper bound of an iteration
  through a container.</p>

<pre class="listing">
std::vector&lt;int&gt; v;
for(unsigned i=0;i&lt;v.size();++i)
{
    do_stuff(v[i]);
}
</pre>

<p>It doesn't just happen in loops, though. For example, in a function that inserts data into a
  database table you might build a query object, run it to insert the data, and then destroy it. If
  this function is called repeatedly then you are repeatedly building the query object and
  destroying it. If your database library supports parameterization then you may well be able to
  avoid this duplication.</p>

<h4>Removing Temoral Duplication</h4>

<p>The general process for removing temporal duplication is to use some form of caching or
  memoization &mdash; the value is computed once and then stored, and this stored value is used in
  place of the computation for each subsequent use. For loops, this can be as simple as extracting
  a variable to hold the value:</p>

<pre class="listing">
for(unsigned i=0,end=v.size();i!=end;++i){
    do_stuff(v[i]);
}
</pre>

<p>For other things it can be more complex. For example, with the database query example above, you
  may need to switch to using a parameterized query so that on each invocation you can bind the new
  values to the query parameters, rather than building the query around the specific parameters to
  insert.</p>

<h3>Duplication of Intent</h3>

<p>Sometimes the duplication does not appear in the actual code, but in what the code is trying to
  achieve. This often occurs in large projects where multiple people have worked on the code
  base. One person writes some code to do something in one source file, and another writes some code
  to do the same thing in another source file, but different styles mean that the code is different
  even though the result is the same. This can also happen with a single developer if the different
  bits are written with a large enough gap, such that you cannot remember what you did before and
  your style has changes slightly. To beat the loop iteration example to death, you might have some
  code that loops through a container by index, and other code that loops through the same container
  using iterators. The structure is different, but the intent is the same.</p>

<h4>Removing Duplication of Intent</h4>

<p>This is one of the hardest types of duplication to spot and remove. The way to remove it is to
  refactor one or both of the pieces of code until they have the same structure, and are thus more
  obviously duplicates of one-another. You can then treat them either as literal duplication,
  parametric literal duplication or structural duplication as appropriate.</p>

<h3>Incidental Duplication</h3>

<p>This is where there is code that looks identical but has completely a different meaning in each
  place. The most obvious form of this is with "magic numbers" &mdash; the constant "3" in one place
  typically has a completely different meaning to the constant "3" somewhere else.</p>

<h4>Removing Incidental Duplication</h4>

<p>You can't necessarily entirely eliminate incidental duplication, but you can minimize it by good
  naming. By using symbolic constants instead of literals then it is clear that different uses are
  distinct because the name of the constant is distinct. There will be still be duplication of the
  literal in the definition of the constants, but this is now less problematic.</p>

<p>In the case that this incidental duplication is not just a constant then you can extract separate
  named functions that encapsulate this duplicate code, and express the intent in each case. The
  duplication is now just between these function bodies than between the uses, and the naming of the
  functions makes it clear that this is just incidental duplication.</p>

<h3>Conclusion</h3>

<p>There are quite a few types of duplication that you may get in your code. By eliminating them you
  will tend to make your code shorter, clearer, and easier to maintain.</p>

<p>If you can think of any types of duplication I've missed, please add a comment.</p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/design/">design</a> /] <a href="http://www.justsoftwaresolutions.co.uk/design/duplication.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/software+design" rel="tag">software design</a>,  <a href="http://technorati.com/tag/refactoring" rel="tag">refactoring</a>,  <a href="http://technorati.com/tag/duplication" rel="tag">duplication</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/design/duplication.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fdesign%2Fduplication.html&amp;title=Duplication%20in%20Software"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fdesign%2Fduplication.html&amp;title=Duplication%20in%20Software">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fdesign%2Fduplication.html&amp;title=Duplication%20in%20Software">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/design/duplication.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>just::thread C++11 Thread Library V1.8.2 released</title><link>http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.2-released.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.2-released.html</guid><pubDate>Tue, 06 Nov 2012 09:49:23 +0000</pubDate><description><![CDATA[
<p>I am pleased to announce that version 1.8.2
  of <a href="http://www.stdthread.co.uk"><code>just::thread</code></a>,
  our <a href="http://www.stdthread.co.uk">C++11 Thread Library</a>
  has just been released.</p>

<p>This release adds support for gcc 4.7.2, and consequently official support for Ubuntu Quantal and
Fedora 17.</p>

<p><code>just::thread</code> is now available for the following compilers:</p>

<ul>
  <li>Microsoft Visual Studio 2005, 2008, 2010 and 2012 for both 32-bit and 64-bit Windows,</li>
  <li><a href="http://tdm-gcc.tdragon.net/">TDM gcc 4.5.2 and 4.6.1</a> for both 32-bit and 64-bit
Windows,</li>
  <li>g++ 4.3, 4.4, 4.5, 4.6 and 4.7 (4.7.2 or later) for both 32-bit and 64-bit Linux
    (x86/x86_64), and</li>
<li>MacPorts g++ 4.3, 4.4, 4.5, 4.6 and 4.7 (4.7.2 or later) for 32-bit and 64-bit
  MacOSX.</li>
</ul>

<h3>Get your copy of Just::Thread</h3>

<p><strong><a href="http://www.stdthread.co.uk/order.html">Purchase your
copy</a> and get started with the C++11 thread library now.</strong></p>

<p>As usual, existing customers are entitled to a free upgrade to V1.8.2
from all earlier versions.</p>

<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.2-released.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/multithreading" rel="tag">multithreading</a>,  <a href="http://technorati.com/tag/concurrency" rel="tag">concurrency</a>,  <a href="http://technorati.com/tag/C++0x" rel="tag">C++0x</a>,  <a href="http://technorati.com/tag/C++11" rel="tag">C++11</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.2-released.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-v1.8.2-released.html&amp;title=just%3A%3Athread%20C%2B%2B11%20Thread%20Library%20V1.8.2%20released"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-v1.8.2-released.html&amp;title=just%3A%3Athread%20C%2B%2B11%20Thread%20Library%20V1.8.2%20released">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-v1.8.2-released.html&amp;title=just%3A%3Athread%20C%2B%2B11%20Thread%20Library%20V1.8.2%20released">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.2-released.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>just::thread C++11 Thread Library V1.8.0 vs Microsoft Visual Studio 2012</title><link>http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.0-released.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.0-released.html</guid><pubDate>Thu, 06 Sep 2012 09:37:07 +0100</pubDate><description><![CDATA[
<p>I am pleased to announce that version 1.8.0
  of <a href="http://www.stdthread.co.uk"><code>just::thread</code></a>,
  our <a href="http://www.stdthread.co.uk">C++11 Thread Library</a>
  has just been released.</p>

<p>This release adds official support for Microsoft Visual Studio 2012, as well as providing some
  minor bug fixes and improvements across the board.</p>

<p>Some people have asked how Just::Thread compares to the thread-library support in Microsoft
  Visual Studio 2012, given that VS2012 now provides the new C++11 concurrency headers, so I ran
  some of the Just::Thread tests against the VS2012 library. It turns out that there are quite a few
  places where Just::Thread has better conformance than VS2012, so if you're making heavy use of the
  C++11 thread library then upgrading to Just::Thread is an essential investment.</p>

<h3>VS2012 thread library conformance issues</h3>

<p>Here is a list of some of the areas where Just::Thread provides better conformance than
  VS2012. Some of these can be worked around; others are important for correctly-functioning
  code. This is just a sample, not a comprehensive list.</p>

<ul>
  <li>With the VS2012 library, you cannot use move-only types with <code>std::promise</code>,
  and <code>std::async</code> doesn't work with functions that return move-only types.</li>
  <li>With the VS2012 library, <code>std::thread</code> doesn't work with move-only argument types.</li>
  <li>With the VS2012 library, the <code>wait_for</code> and <code>wait_until</code> functions
    return incorrect values when used with a <code>std::future</code> that comes from
    a <code>std::promise</code>.</li>
  <li>With the VS2012 library, when <code>std::async</code> is used with a launch policy
    of <code>std::launch::async</code>, the destructor of the returned <code>std::future</code>
    instance does not wait for the thread to complete.</li>
  <li>With the VS2012 library, <code>std::unique_lock</code> does not check whether or not it owns
    the lock before calling operations on the underlying mutex, triggering undefined behaviour
    rather than throwing an exception in many cases.</li>
  <li>With the VS2012 library, the <code>std::atomic&lt;&gt;</code> class template cannot be used on
    types without a default constructor.</li>
  <li>With the VS2012 library, <code>std::launch</code> and other strongly-typed enums such
    as <code>std::future_status</code> are emulated with a namespace-scoped enum rather than a
    strongly-typed enum.</li>
</ul>

<p>In all these cases (and more), Just::Thread conforms with the standard.</p>

<h3>Just::Thread optimizations</h3>

<p>Just::Thread also offers various optimizations over the VS2012 thread library such as the
following.</p>

<ul>
  <li>The return value from a task run with <code>std::async</code> is copied/moved fewer times, and
    moved where possible.</li>
  <li>A function object passed to <code>std::thread</code> is copied or moved fewer times.</li>
  <li>The task passed to <code>std::async</code> is destroyed as soon as the task is completed, even
    if there are outstanding futures that reference the result.</li>
</ul>

<p>Again, this is not a comprehensive list. Just::Thread has been carefully optimized to ensure
  common use cases have the best performance possible whilst remaining conformant to the C++11
  standard.</p>

<h3>Get your copy of Just::Thread</h3>

<p><strong><a href="http://www.stdthread.co.uk/order.html">Purchase your
copy</a> and get started with the C++11 thread library now.</strong></p>

<p>As usual, existing customers are entitled to a free upgrade to V1.8.0
from all earlier versions.</p>

<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.0-released.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/multithreading" rel="tag">multithreading</a>,  <a href="http://technorati.com/tag/concurrency" rel="tag">concurrency</a>,  <a href="http://technorati.com/tag/C++0x" rel="tag">C++0x</a>,  <a href="http://technorati.com/tag/C++11" rel="tag">C++11</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.0-released.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-v1.8.0-released.html&amp;title=just%3A%3Athread%20C%2B%2B11%20Thread%20Library%20V1.8.0%20vs%20Microsoft%20Visual%20Studio%202012"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-v1.8.0-released.html&amp;title=just%3A%3Athread%20C%2B%2B11%20Thread%20Library%20V1.8.0%20vs%20Microsoft%20Visual%20Studio%202012">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fjust-thread-v1.8.0-released.html&amp;title=just%3A%3Athread%20C%2B%2B11%20Thread%20Library%20V1.8.0%20vs%20Microsoft%20Visual%20Studio%202012">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/just-thread-v1.8.0-released.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>ACCU 2012 Report</title><link>http://www.justsoftwaresolutions.co.uk/news/accu2012-report.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/accu2012-report.html</guid><pubDate>Thu, 03 May 2012 09:59:57 +0100</pubDate><description><![CDATA[
<p>I'm now back home again from <a
  href="http://accu.org/index.php/conferences/accu_conference_2012">ACCU
    2012</a>. As ever, it was an exhausting, but thoroughly enjoyable
  conference. With 5 tracks it was sometimes very hard to choose
  which session to attend.</p>

<p>There were a surprising number of talks on C, though mostly just to
  confirm that C is a dying language, a "zombie language" as Uncle Bob
  put it, even if there is still a niche or two where it is the best
  fit.</p>

<p>There was also a fair number of sessions on testing, especially TDD
  (even TDD in C), and a few sessions on other agile practices.</p>

<p>However, the big topic of the conference was C++11. Nicolai
  Josuttis ran a full day pre-conference tutorial on the C++11
  library, and then there were sessions on the best and worst features
  of the C++11 library, C++11 for everybody, C++11 for the rest of us,
  C++11 allocators, writing generic code with C++11, the C++11
  concurrency facilities, an interactive C++11 programming session,
  and even a C++11 pub quiz (with free beer!)</p>

<p>The other big topic was concurrency and parallelism, with 6
  presentations, including two by me. Actors and Dataflow seemed to be
  a common theme &mdash; it looks like these ideas are finally
  filtering into the mainstream now that everyone and his dog has a
  multicore computer in their pocket. Not only did Russel, Jason and I
  reference them in our presentations, but several of the developers I
  spoke to had implemented their own actor or dataflow libraries, or
  were interested in using one.</p>

<h3>My presentations</h3>

<p>My own presentations went well. My first one (on Dataflow, Actors
  and High Level Structures in Concurrent Applications, on Thursday
  afternoon) was packed out. There were quite a few interesting
  questions from the audience, and someone told me it was the best
  presentation at the conference, which was really nice to
  hear. Several people asked about slides and the code samples, and I
  promised to make them available. The slides
  are <a href="http://www.justsoftwaresolutions.co.uk/files/dataflow_and_actors.pdf">here</a>
  and the code
  samples <a href="http://www.justsoftwaresolutions.co.uk/files/dataflow_and_actors_code.zip">here</a></p>

<p>My second presentation was the C++11 concurrency tutorial on
  Saturday morning. I was presenting in the first slot after the
  keynotes, and the speakers dinner was the night before, so a lot of
  people had been looking rather the worse for wear in the
  beginning. However, the room was almost full again, and the audience
  seemed to be awake &mdash; yet again there were many interesting
  questions that showed people were paying attention. The slides for
  are <a href="http://www.justsoftwaresolutions.co.uk/files/c++11_concurrency.pdf">here</a>
  and the code
  samples <a href="http://www.justsoftwaresolutions.co.uk/files/c++11_concurrency_code.zip">here</a></p>

<h3>My book</h3>

<p>My <a href="http://stdthread.com/book">book</a> was only published
  a couple of months before the conference, so it was exciting to see
  so many people clutching copies. Apparently the Blackwell's stall
  sold out, which was nice for me, but unfortunate for those that
  didn't manage to get a copy. If you wanted a copy then you can buy
  it
<a href="http://www.stdthread.co.uk/book">direct from Manning</a>, or
from <a href="http://www.amazon.com/exec/obidos/ASIN/1933988770/anthonywilliams">amazon.com</a>,
or <a href="http://www.amazon.co.uk/exec/obidos/ASIN/1933988770/anthonywilliams0b">amazon.co.uk</a>.</p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/accu2012-report.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/accu" rel="tag">accu</a>,  <a href="http://technorati.com/tag/conference" rel="tag">conference</a>,  <a href="http://technorati.com/tag/concurrency" rel="tag">concurrency</a>,  <a href="http://technorati.com/tag/c++" rel="tag">c++</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/accu2012-report.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2012-report.html&amp;title=ACCU%202012%20Report"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2012-report.html&amp;title=ACCU%202012%20Report">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2012-report.html&amp;title=ACCU%202012%20Report">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/accu2012-report.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>ACCU 2012</title><link>http://www.justsoftwaresolutions.co.uk/news/accu2012.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/accu2012.html</guid><pubDate>Wed, 25 Apr 2012 09:52:06 +0100</pubDate><description><![CDATA[
<p>The main sessions of
  the <a href="http://accu.org/index.php/conferences/accu_conference_2012">ACCU
  2012</a> conference start today.</p>

<p>This year I'm presenting two sessions. The first is tomorrow, at
  4pm: <a href="http://accu.org/index.php/conferences/accu_conference_2012/accu2012_sessions#Dataflow,%20actors,%20and%20high%20level%20structures%20in%20concurrent%20applications">Dataflow,
  actors, and high level structures in concurrent applications</a>. In
  this session, I'll be talking about high level approaches for
  writing concurrent architectures including actors and dataflow
  architectures, and giving example code in multiple languages,
  including C++ and Groovy.</p>

<p>My second session is on Saturday at
  11am, <a href="http://accu.org/index.php/conferences/accu_conference_2012/accu2012_sessions#C++11%20concurrency%20tutorial">C++11
  concurrency tutorial</a>. This session will cover how to use the new
  C++11 thread library, as well as various guidelines for avoiding
  race conditions and deadlocks.</p>

<p>Hope to see you there!</p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/accu2012.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/conferences" rel="tag">conferences</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/accu2012.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2012.html&amp;title=ACCU%202012"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2012.html&amp;title=ACCU%202012">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Faccu2012.html&amp;title=ACCU%202012">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/accu2012.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>C++ Concurrency in Action and Just::Thread Discounts</title><link>http://www.justsoftwaresolutions.co.uk/threading/c++-concurrency-in-action-and-just-thread-discounts.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/threading/c++-concurrency-in-action-and-just-thread-discounts.html</guid><pubDate>Wed, 25 Apr 2012 09:40:12 +0100</pubDate><description><![CDATA[
<div class="image" style="float:left">
<a href="http://www.stdthread.co.uk/book/"><img src="http://www.justsoftwaresolutions.co.uk/images/ccia.jpg"
                                                width="226" height="283" alt="C++ Concurrency in Action cover"></a>
</div>

<p>My book <a href="http://www.stdthread.co.uk/book/">C++ Concurrency
    in Action</a> was finally published on 29th February 2012, after 4
    years of work. It's hard to believe that I can actually hold a
    copy in my hand; it's just been files on my computer for so
    long.</p>

<p>My book is a tutorial and reference to the thread library from the
  new C++11 standard. It also provides various guidelines for writing
  and testing multithreaded code, as well as sample implementations of
  thread-safe data structures and parallel algorithms</p>

<p>If you haven't already got a copy, you can order one
<a href="http://www.stdthread.co.uk/book">direct from Manning</a>, or
from <a href="http://www.amazon.com/exec/obidos/ASIN/1933988770/anthonywilliams">amazon.com</a>,
or <a href="http://www.amazon.co.uk/exec/obidos/ASIN/1933988770/anthonywilliams0b">amazon.co.uk</a>. Alternatively,
copies should be available at
the <a href="http://accu.org/index.php/conferences/accu_conference_2012">ACCU
2012</a> conference in Oxford this week.</p>

<h3>Discount on Just::Thread</h3>

<p>If you have purchased the book then send a copy of your receipt or
  other proof of purchase
  to <a href="mailto:info@justsoftwaresolutions.co.uk">info@justsoftwaresolutions.co.uk</a>
  for a 50% discount on a single user license
  of <a href="http://www.stdthread.co.uk">Just::Thread</a>, our
  implementation of the C++11 thread library described in the book for
  Microsoft Visual Studio on Windows, and g++ on Windows, Linux and MacOSX.</p>

<p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/threading/">threading</a> /] <a href="http://www.justsoftwaresolutions.co.uk/threading/c++-concurrency-in-action-and-just-thread-discounts.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/c++" rel="tag">c++</a>,  <a href="http://technorati.com/tag/concurrency" rel="tag">concurrency</a>,  <a href="http://technorati.com/tag/book" rel="tag">book</a>,  <a href="http://technorati.com/tag/multithreading" rel="tag">multithreading</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/threading/c++-concurrency-in-action-and-just-thread-discounts.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fthreading%2Fc%2B%2B-concurrency-in-action-and-just-thread-discounts.html&amp;title=C%2B%2B%20Concurrency%20in%20Action%20and%20Just%3A%3AThread%20Discounts"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fthreading%2Fc%2B%2B-concurrency-in-action-and-just-thread-discounts.html&amp;title=C%2B%2B%20Concurrency%20in%20Action%20and%20Just%3A%3AThread%20Discounts">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fthreading%2Fc%2B%2B-concurrency-in-action-and-just-thread-discounts.html&amp;title=C%2B%2B%20Concurrency%20in%20Action%20and%20Just%3A%3AThread%20Discounts">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/threading/c++-concurrency-in-action-and-just-thread-discounts.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item><item><title>Happy New Year 2012</title><link>http://www.justsoftwaresolutions.co.uk/news/happy-new-year-2012.html</link><author>Anthony Williams</author><guid isPermaLink="true">http://www.justsoftwaresolutions.co.uk/news/happy-new-year-2012.html</guid><pubDate>Tue, 10 Jan 2012 11:15:22 +0000</pubDate><description><![CDATA[
<p>Now the post-holidays rush is over, I'd like to wish you all a Happy New Year!</p>

<p>2011 was another good year for me. Sales of
  <code>Just::Thread</code>,
  my <a href="http://www.stdthread.co.uk">implementation of the C++11
  thread library</a> continue to grow,
  and <a href="http://www.stdthread.co.uk/book">my book</a> is finally
  in typesetting, and nearly ready for printing. We had hoped to get
  it done by the end of 2011, but last-minute corrections scuppered
  that. It should now be done relatively quickly.</p>

<p>It's also been a big year for the C++ community: C++11 is now an
official <a
href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372">ISO
standard</a>. This is the culmination of many years of hard work from
a huge number of people, so it's good to see it finally done.</p>

<h3>Popular articles</h3>

<p>As is my custom, here's a list of the 10 most popular articles and
  blog entries from the Just Software Solutions website in 2011.</p>

<ol>

<li><a
href="http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html">Implementing
a Thread-Safe Queue using Condition Variables</a><br> A description of
the issues around writing a thread-safe queue, with code.</li>

<li><a
href="http://www.justsoftwaresolutions.co.uk/articles/css_menus.html">Implementing
drop-down menus in pure CSS (no JavaScript)</a><br>How to implement
drop-down menus in CSS in a cross-browser fashion (with a teensy bit
of JavaScript for IE).</li>

<li><a href="http://www.justsoftwaresolutions.co.uk/general/importing-windows-into-virtualbox.html">Importing
an Existing Windows XP Installation into VirtualBox</a><br>This
article describes how I recovered the hard disk of a dead laptop to
run as a VM
under <a href="http://www.virtualbox.org">VirtualBox</a>.</li>

<li><a href="http://www.justsoftwaresolutions.co.uk/threading/multithreading-in-c++0x-part-1-starting-threads.html">Multithreading
in C++0x part 1: Starting Threads</a><br>This is the first part of my
  series on the new C++11 thread library. Links to the remaining
  parts are at the end of the article.</li>

<li><a href="http://www.justsoftwaresolutions.co.uk/threading/thread-safe-copy-constructors.html">Thread-Safe
    Copy and Move Constructors</a><br>This is a guest post by Michael
    Spertus on writing copy and move constructors for objects with
  internal locks.</li>

<li><a href="http://www.justsoftwaresolutions.co.uk/threading/multithreading-in-c++0x-part-2-function-objects-and-arguments.html">Multithreading
  in C++0x part 2: Starting Threads with Function Objects and
  Arguments</a><br>This is the second part of my series on the new
  C++11 thread library, which covers using callable objects when
  starting threads, and passing arguments to the thread function.</li>

<li><a
href="http://www.justsoftwaresolutions.co.uk/articles/intrototemplates.pdf">Introduction
to C++ Templates</a><br>My basic introduction to C++ templates.</li>

<li><a href="http://www.justsoftwaresolutions.co.uk/threading/multithreading-in-c++0x-part-8-futures-and-promises.html">Multithreading
  in C++0x part 8: Futures, Promises and Asynchronous Function
  Calls</a><br>This is the eighth part of my series on the new C++11
  thread library, which covers the "futures" mechanism for passing
  data between threads.</li>

<li><a
href="http://www.justsoftwaresolutions.co.uk/threading/thread-interruption-in-boost-thread-library.html">Thread
Interruption in the Boost Thread Library</a><br>A description of the
thread interruption feature of the Boost Thread library.</li>


<li><a
href="http://www.justsoftwaresolutions.co.uk/threading/deadlock_detection_with_just_thread.html">Deadlock
    Detection with just::thread</a><br>This article describes how to
  use the special deadlock-detection mode of
  our <a href="http://www.stdthread.co.uk"><code>just::thread</code>
    C++11 thread library</a> to locate the cause of deadlocks.</li>


</ol>

<h3>What's coming in 2012?</h3>

<p>Will 2012 be even better than 2011? I hope so. As I already
  mentioned,  <a
  href="http://www.stdthread.co.uk/book">my book</a> will finally be
  printed, which will be a big relief for me.</p>

<p>What are you looking forward to in 2011?</p>
<p align="right">Posted by Anthony Williams<br><i>[/  <a href="http://www.justsoftwaresolutions.co.uk/news/">news</a> /] <a href="http://www.justsoftwaresolutions.co.uk/news/happy-new-year-2012.html">permanent link</a></i><br> <small> Tags:  <a href="http://technorati.com/tag/popular" rel="tag">popular</a>,  <a href="http://technorati.com/tag/articles" rel="tag">articles</a> <br>  <div class="g-plusone" data-size="large" data-annotation="none" data-href="http://www.justsoftwaresolutions.co.uk/news/happy-new-year-2012.html"></div> | <a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fhappy-new-year-2012.html&amp;title=Happy%20New%20Year%202012"> Stumble It! <img src="http://www.justsoftwaresolutions.co.uk/images/stumbleupon.png" width=16 height=16 class="sm" alt="stumbleupon logo"></a> | <a href="http://reddit.com/submit?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fhappy-new-year-2012.html&amp;title=Happy%20New%20Year%202012">Submit to Reddit <img src="http://www.justsoftwaresolutions.co.uk/images/reddit.png" width=16 height=16 class="sm" alt="reddit logo"></a> | <a href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.justsoftwaresolutions.co.uk%2Fnews%2Fhappy-new-year-2012.html&amp;title=Happy%20New%20Year%202012">Submit to DZone <img src="http://www.justsoftwaresolutions.co.uk/images/dzone.png" width=16 height=16 class="sm" alt="dzone logo"></a></small></p><p><a href="http://www.justsoftwaresolutions.co.uk/news/happy-new-year-2012.html#makecomment">Comment on this post</a></p><p>Follow me on <a href="http://twitter.com/a_williams">Twitter</a></p>]]></description></item></channel></rss>