<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Sutter's Mill</title>
	<atom:link href="http://herbsutter.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://herbsutter.wordpress.com</link>
	<description>Herb Sutter on software, hardware, and concurrency</description>
	<lastBuildDate>Wed, 24 Jun 2009 00:27:47 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
		<url>http://www.gravatar.com/blavatar/4554b8d24c7f200dc5e2e1b18db1893f?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Sutter's Mill</title>
		<link>http://herbsutter.wordpress.com</link>
	</image>
			<item>
		<title>Answering email about error handling in concurrent code</title>
		<link>http://herbsutter.wordpress.com/2009/06/23/answering-email-about-error-handling-in-concurrent-code/</link>
		<comments>http://herbsutter.wordpress.com/2009/06/23/answering-email-about-error-handling-in-concurrent-code/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 00:27:47 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/06/23/answering-email-about-error-handling-in-concurrent-code/</guid>
		<description><![CDATA[Someone emailed me today asking:
I&#8217;m writing because I&#8217;m somewhat conscious of what I would consider a rather large hole in the parallel programming literature.
… What if one or more of your tasks throws an exception? Should the thread that runs the task swallow it? Should the caught exceptions get stashed somewhere so that the &#34;parent&#34; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=258&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Someone emailed me today asking:</p>
<blockquote><p>I&#8217;m writing because I&#8217;m somewhat conscious of what I would consider a rather large hole in the parallel programming literature.</p>
<p>… What if one or more of your tasks throws an exception? Should the thread that runs the task swallow it? Should the caught exceptions get stashed somewhere so that the &quot;parent&quot; thread can deal with them once the tasks are complete? (This is somewhat tricky currently in a language such as C++(98) where one cannot store an exception caught with the &quot;catch(&#8230;)&quot; construct). Perhaps all tasks should have a no-throw guarantee? Perhaps some kind of asynchronous error handlers might be installed, somewhat like POSIX signals? The options are many, but choosing a strategy is hard for those of us with little parallel programming experience.</p>
</blockquote>
<p>I thought I’d share my response here:</p>
<p>That&#8217;s an excellent question. Someone asked that very question in Stockholm last month at my Effective Concurrency course, and my answer started out somewhat dismissive: &quot;Well, it&#8217;s about the same as you do in sequential code, and all the same guarantees apply; nothrow/nofail is only for a few key functions used for commit/rollback operations, and you’d usually target the basic guarantee unless adding the strong guarantee comes along naturally for near-free. So it’s pretty much the same as always. Although, well, of course futures may transport exceptions across threads, but that&#8217;s still the same because they manifest on .get(). And of course for parallel loops you may get multiple concurrent exceptions from multiple concurrent loop bodies that get aggregated into a single exception; and then there&#8217;s the question of whether you start new loop bodies that haven’t started yet (usually no) but do you interrupt loop bodies that are in progress (probably not), and&#8230; oh, hmm, yeah, I guess it would be good to write an article about that.&quot;</p>
<p>So the above is now adding to my notes of things to write about. :-) Maybe some of that stream-of-consciousness may be helpful until I can get to writing it up in more detail.</p>
<p>I pointed him to Doug Lea&#8217;s <a href="http://www.amazon.com/Concurrent-Programming-Java-TM-Principles/dp/0201310090">Concurrent Programming in Java</a> pages 161-176, &quot;Dealing with Failure&quot;, adding that I haven&#8217;t read it in detail but the subtopics look right. Also Joe Duffy’s <a href="http://www.amazon.com/Concurrent-Programming-Windows-Microsoft-Development/dp/032143482X">Concurrent Programming on Windows</a>, pages 721-733.</p>
<p>If you know of a good standalone treatise focused on error handling in concurrent code, please mention it in the comments.</p>
Posted in C++, Concurrency  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/258/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/258/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/258/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=258&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/06/23/answering-email-about-error-handling-in-concurrent-code/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Break Up and Interleave Work to Keep Threads Responsive</title>
		<link>http://herbsutter.wordpress.com/2009/06/16/effective-concurrency-break-up-and-interleave-work-to-keep-threads-responsive/</link>
		<comments>http://herbsutter.wordpress.com/2009/06/16/effective-concurrency-break-up-and-interleave-work-to-keep-threads-responsive/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 18:09:16 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/06/16/effective-concurrency-break-up-and-interleave-work-to-keep-threads-responsive/</guid>
		<description><![CDATA[This month’s Effective Concurrency column, “Break Up and Interleave Work to Keep Threads Responsive”, is now live on DDJ’s website.
Sorry for the long title; suggestions welcome. I always try to word the title to make it (a) short, (b) active, and (c) advice, but sometimes I’ll settle for two of those, or just one, until [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=256&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This month’s <strong>Effective Concurrency</strong> column, <a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=217801299">“Break Up and Interleave Work to Keep Threads Responsive”</a><strong></strong>, is now live on DDJ’s website.</p>
<p>Sorry for the long title; suggestions welcome. I always try to word the title to make it (a) short, (b) active, and (c) advice, but sometimes I’ll settle for two of those, or just one, until a better suggestion comes along.</p>
<p>From the article:</p>
<blockquote><p>What happens when this thread must remain responsive to new incoming messages that have to be handled quickly, even when we&#8217;re in the middle of servicing an earlier lower-priority message that may take a long time to process?</p>
<p>If all the messages must be handled on this same thread, then we have a problem. Fortunately, we also have two good solutions, both of which follow the same basic strategy: Somehow break apart the large piece of work to allow the thread to perform other work in between, interleaved between the chunks of the large item. Let&#8217;s consider the two major ways to implement that interleaving, and their respective tradeoffs in the areas of fairness and performance.</p>
</p>
</blockquote>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns:</p>
<blockquote><p><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a> (Aug 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a> (Sep 2007) </p>
<p><a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a> (Oct 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a> (Nov 2007) </p>
<p><a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a> (Dec 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a> (Jan 2008) </p>
<p><a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a> (Feb 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a> (Mar 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a> (Apr 2008) </p>
<p><a href="http://ddj.com/architect/207100682">Interrupt Politely</a> (May 2008) </p>
<p><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a> (Jun 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a> (Jul 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a> (Aug 2008) </p>
<p><a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a> (Sep 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a> (Oct 2008) </p>
<p><a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a> (Nov 2008) </p>
<p><a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a> (Dec 2008)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">Measuring Parallel Performance: Optimizing a Concurrent Queue</a> (Jan 2009)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212701484">volatile vs. volatile</a> (Feb 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=214100002">Sharing Is the Root of All Contention</a> (Mar 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=215900465">Use Threads Correctly = Isolation + Asynchronous Messages</a> (Apr 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=216500409">Use Thread Pools Correctly: Keep Tasks Short and Nonblocking</a> (Apr 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=217500206">Eliminate False Sharing</a> (May 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=217801299">Break Up and Interleave Work to Keep Threads Responsive</a> (Jun 2009)</p>
</blockquote>
Posted in Concurrency  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/256/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=256&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/06/16/effective-concurrency-break-up-and-interleave-work-to-keep-threads-responsive/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Truth In Spam</title>
		<link>http://herbsutter.wordpress.com/2009/06/12/truth-in-spam/</link>
		<comments>http://herbsutter.wordpress.com/2009/06/12/truth-in-spam/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 23:59:48 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/06/12/truth-in-spam/</guid>
		<description><![CDATA[This afternoon I was just finishing up my next Effective Concurrency article (it’ll be up in a few days), when some spam email arrived. Just as my fingers’ auto-delete macro was about to fire, I noticed something odd about the name of the attachment and did a double-take:
 
Cool! There must be some kind of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=255&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This afternoon I was just finishing up my next Effective Concurrency article (it’ll be up in a few days), when some spam email arrived. Just as my fingers’ auto-delete macro was about to fire, I noticed something odd about the name of the attachment and did a double-take:</p>
<p><a href="http://herbsutter.files.wordpress.com/2009/06/image.png"><img title="image" style="border-right:0;border-top:0;display:inline;border-left:0;border-bottom:0;" height="178" alt="image" src="http://herbsutter.files.wordpress.com/2009/06/image_thumb.png?w=405&#038;h=178" width="405" border="0" /></a> </p>
<p>Cool! There must be some kind of new truth-in-advertising laws for spammers.</p>
<p>Yes, I know that as programmers we could argue about naming all day long. We could point out that maybe “virusLoader.gif” or “exploit_exploit_muhaha.gif” would be a little better, and argue about the relative merits of camel case and underscores. But there’s no need; I think “runnable.gif” is short, clear, and definitely good enough. (Evidently someone else thought so too, and just shipped it.)</p>
Posted in Friday Thoughts  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/255/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=255&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/06/12/truth-in-spam/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/06/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Dress Re-Hearsal?</title>
		<link>http://herbsutter.wordpress.com/2009/05/22/dress-re-hearsal/</link>
		<comments>http://herbsutter.wordpress.com/2009/05/22/dress-re-hearsal/#comments</comments>
		<pubDate>Fri, 22 May 2009 08:53:00 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/05/15/dress-re-hearsal/</guid>
		<description><![CDATA[An amusing hearse, seen on a neighborhood street:

Here’s a close-up of the license plate:
 
 
Made my morning.
Posted in Friday Thoughts       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=244&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>An amusing hearse, seen on a neighborhood street:</p>
<p><a href="http://herbsutter.files.wordpress.com/2009/04/img-0205.jpg"><img style="display:inline;border-width:0;" title="IMG_0205" src="http://herbsutter.files.wordpress.com/2009/04/img-0205-thumb.jpg?w=360&#038;h=480" border="0" alt="IMG_0205" width="360" height="480" /></a></p>
<p>Here’s a close-up of the license plate:</p>
<p><a href="http://herbsutter.files.wordpress.com/2009/04/temp.jpg"><img style="display:inline;border-width:0;" title="temp" src="http://herbsutter.files.wordpress.com/2009/04/temp-thumb.jpg?w=301&#038;h=237" border="0" alt="temp" width="301" height="237" /></a> </p>
<p> </p>
<p>Made my morning.</p>
Posted in Friday Thoughts  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/244/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=244&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/05/22/dress-re-hearsal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/04/img-0205-thumb.jpg" medium="image">
			<media:title type="html">IMG_0205</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/04/temp-thumb.jpg" medium="image">
			<media:title type="html">temp</media:title>
		</media:content>
	</item>
		<item>
		<title>VS2010 Beta 1 Now Available</title>
		<link>http://herbsutter.wordpress.com/2009/05/20/vs2010-beta-1-now-available/</link>
		<comments>http://herbsutter.wordpress.com/2009/05/20/vs2010-beta-1-now-available/#comments</comments>
		<pubDate>Thu, 21 May 2009 00:43:20 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C# / .NET]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/05/20/vs2010-beta-1-now-available/</guid>
		<description><![CDATA[For those of you who are interested in using or trying Microsoft development tools, I’m happy to report that Visual Studio 2010 Beta 1 is now available.
If you’re interested in:

concurrency and parallel computing, check out the new concurrency runtime (ConcRT) that implements efficient work stealing for scalable code, the Asynchronous Agents Library and the Parallel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=250&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For those of you who are interested in using or trying Microsoft development tools, I’m happy to report that <a href="http://msdn.microsoft.com/en-us/netframework/dd582936.aspx">Visual Studio 2010 Beta 1</a> is now available.</p>
<p>If you’re interested in:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/dd504870(VS.100).aspx"><strong>concurrency and parallel computing</strong></a>, check out the new concurrency runtime (ConcRT) that implements efficient work stealing for scalable code, the <a href="http://msdn.microsoft.com/en-us/library/dd492627(VS.100).aspx">Asynchronous Agents Library</a> and the <a href="http://msdn.microsoft.com/en-us/library/dd492418(VS.100).aspx">Parallel Patterns Library (PPL)</a> for C++, and the <a href="http://msdn.microsoft.com/en-us/library/dd460717(VS.100).aspx">Task Parallel Library (TPL)</a> and <a href="http://msdn.microsoft.com/en-us/library/dd460688(VS.100).aspx">Parallel LINQ (PLINQ)</a> for .NET. And some nifty concurrency debugging and profiling tools, too. </li>
<li><strong><a href="http://msdn.microsoft.com/en-us/library/dd465215(VS.100).aspx">C++0x features</a></strong>, check out the <a href="http://msdn.microsoft.com/en-us/library/dd293608(VS.100).aspx">lambda functions</a> (my fave), move-semantic <a href="http://msdn.microsoft.com/en-us/library/dd293668(VS.100).aspx">rvalue references</a>, the new <a href="http://msdn.microsoft.com/en-us/library/6k3ybftz(VS.100).aspx">auto</a>, its good friend <a href="http://msdn.microsoft.com/en-us/library/dd537655(VS.100).aspx">decltype</a>, and the ever-helpful <a href="http://msdn.microsoft.com/en-us/library/dd293588(VS.100).aspx">static_assert</a>. </li>
<li><strong>functional programming in VS</strong>, enjoy the <a href="http://msdn.microsoft.com/en-us/library/dd553242(VS.100).aspx">F# programming language</a>. </li>
</ul>
<p>Remember this is just a beta and not intended for production use, but there’s a lot of cool stuff to play around with and it should run fine side-by-side with VS2008. Feedback via <a href="http://social.msdn.microsoft.com/Forums/en-US/category/VSPreRelease,netdevelopmentprerelease,visualstudioprerelease,vstsprerelease">forums</a> or <a href="http://go.microsoft.com/fwlink/?LinkID=151484">filing a bug/suggestion</a> is always appreciated. Enjoy!</p>
Posted in C# / .NET, C++, Concurrency  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/250/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/250/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/250/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=250&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/05/20/vs2010-beta-1-now-available/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Eliminate False Sharing</title>
		<link>http://herbsutter.wordpress.com/2009/05/15/effective-concurrency-eliminate-false-sharing/</link>
		<comments>http://herbsutter.wordpress.com/2009/05/15/effective-concurrency-eliminate-false-sharing/#comments</comments>
		<pubDate>Fri, 15 May 2009 18:51:38 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C# / .NET]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/05/15/effective-concurrency-eliminate-false-sharing/</guid>
		<description><![CDATA[This month’s Effective Concurrency column, “Eliminate False Sharing”, is now live on DDJ’s website.
People keep writing asking me about my previous mentions of false sharing, even debating whether it’s really a problem. So this month I decided to treat it in depth, including:

A compelling and realistic example where just changing a couple of lines to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=248&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This month’s <strong>Effective Concurrency</strong> column, <a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=217500206">“Eliminate False Sharing”</a><strong></strong>, is now live on DDJ’s website.</p>
<p>People keep writing asking me about my previous mentions of false sharing, even debating whether it’s really a problem. So this month I decided to treat it in depth, including:</p>
<ul>
<li>A compelling and realistic example where just changing a couple of lines to remove false sharing takes an algorithm from zero scaling to perfect scaling – even when many threads are merely doing reads. Hopefully after this nobody will argue that false sharing isn’t a problem. :-)</li>
<li>How your performance monitoring and analysis tools do and/or don’t help you uncover the problem, and how to use them effectively to identify the culprit. Short answer: CPU activity monitors aren’t very helpful, but cycles-per-instruction (CPI) and cache miss rate measurements attributed to specific lines of source code are your friend.</li>
<li>The two ways to correct the code: Reduce the frequency of writes to the too-popular cache line, or add padding to move other data off the line.</li>
<li>Reusable code in C++ and C#, and a note about Java, that you can use to use padding (and alignment if available) to put frequently-updated objects on their own cache lines.</li>
</ul>
<p>From the article:</p>
<blockquote><p>In two previous articles I pointed out the performance issue of false sharing (aka cache line ping-ponging), where threads use different objects but those objects happen to be close enough in memory that they fall on the same cache line, and the cache system treats them as a single lump that is effectively protected by a hardware write lock that only one core can hold at a time. … It’s easy to see why the problem arises when multiple cores are writing to different parts of the same cache line… In practice, however, it can be even more common to encounter a reader thread using what it thinks is read-only data still getting throttled by a writer thread updating a different but nearby memory location…</p>
<p>A number of readers have asked for more information and examples on where false sharing arises and how to deal with it. … This month, let’s consider a concrete example that shows an algorithm <em>in extremis </em>due to false sharing distress, how to use tools to analyze the problem, and the two coding techniques we can use to eliminate false sharing trouble. …</p>
</blockquote>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns:</p>
<blockquote><p><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a> (Aug 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a> (Sep 2007) </p>
<p><a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a> (Oct 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a> (Nov 2007) </p>
<p><a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a> (Dec 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a> (Jan 2008) </p>
<p><a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a> (Feb 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a> (Mar 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a> (Apr 2008) </p>
<p><a href="http://ddj.com/architect/207100682">Interrupt Politely</a> (May 2008) </p>
<p><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a> (Jun 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a> (Jul 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a> (Aug 2008) </p>
<p><a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a> (Sep 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a> (Oct 2008) </p>
<p><a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a> (Nov 2008) </p>
<p><a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a> (Dec 2008)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">Measuring Parallel Performance: Optimizing a Concurrent Queue</a> (Jan 2009)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212701484">volatile vs. volatile</a> (Feb 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=214100002">Sharing Is the Root of All Contention</a> (Mar 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=215900465">Use Threads Correctly = Isolation + Asynchronous Messages</a> (Apr 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=216500409">“Use Thread Pools Correctly: Keep Tasks Short and Nonblocking”</a> (Apr 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=217500206">“Eliminate False Sharing”</a> (May 2009)</p>
</blockquote>
Posted in C# / .NET, C++, Concurrency, Hardware, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/248/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=248&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/05/15/effective-concurrency-eliminate-false-sharing/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>You Know When Your UI Needs Help When&#8230;</title>
		<link>http://herbsutter.wordpress.com/2009/05/01/you-know-when-your-ui-needs-help-when/</link>
		<comments>http://herbsutter.wordpress.com/2009/05/01/you-know-when-your-ui-needs-help-when/#comments</comments>
		<pubDate>Fri, 01 May 2009 08:39:00 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/05/01/you-know-when-your-ui-needs-help-when/</guid>
		<description><![CDATA[Seen at a gas station:
 


You know your UI has usability issues when people tape multiple signs on your gas pump to help people get through the intricate and error-prone process of purchasing fuel.
Why does the upper note exist? The trouble is that there’s a Debit button but not a Credit button, and so since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=238&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Seen at a gas station:</p>
<p><a href="http://herbsutter.files.wordpress.com/2009/04/img-0220.jpg"><img title="IMG_0220" style="display:inline;border-width:0;" height="480" alt="IMG_0220" src="http://herbsutter.files.wordpress.com/2009/04/img-0220-thumb.jpg?w=360&#038;h=480" width="360" border="0" /></a> </p>
</p>
</p>
<p>You know your UI has usability issues when people tape multiple signs on your gas pump to help people get through the intricate and error-prone process of purchasing fuel.</p>
<p>Why does the upper note exist? The trouble is that there’s a Debit button but not a Credit button, and so since Credit is the default, users need to remember to override the default before swiping the card. People will sometimes naturally forget the special step because there was originally no reminder that this needed to be done, and because most other pumps don’t work that way. One solution would be to print the information prominently near the card reader, thus standardizing the note and making it more visible. A better and simpler solution would be to do what most pumps do: Avoid the opportunity for forgetting to specify the right thing by having both buttons, Debit and Credit, and simply prompting the user to press one or the other after they swipe their card.</p>
<p>But the trouble behind the lower note is even more blatant and, frankly, inexcusable: Is there any good reason not to conditionally print “ENTER PIN” or “ENTER ZIP,” instead of just always printing “ENTER DATA” which is not only unclear but also one of the classic geeky words to avoid in a consumer-oriented UI?</p>
<p>Then again, I’m amazed that in this day and age I still see output like “1 item(s) purchased.” Apparently it’s still more important to write the programmer-friendly <em>printf( “%d item(s)”, count )</em> than the user-friendly <em>printf( “%d item%s”, count, (count==1 ? “” : “s”) )</em>.</p>
Posted in Friday Thoughts  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/238/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/238/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/238/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=238&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/05/01/you-know-when-your-ui-needs-help-when/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/04/img-0220-thumb.jpg" medium="image">
			<media:title type="html">IMG_0220</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Use Thread Pools Correctly &#8211; Keep Tasks Short and Nonblocking</title>
		<link>http://herbsutter.wordpress.com/2009/04/20/effective-concurrency-use-thread-pools-correctly-keep-tasks-short-and-nonblocking/</link>
		<comments>http://herbsutter.wordpress.com/2009/04/20/effective-concurrency-use-thread-pools-correctly-keep-tasks-short-and-nonblocking/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 00:39:00 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/04/20/effective-concurrency-use-thread-pools-correctly-keep-tasks-short-and-nonblocking/</guid>
		<description><![CDATA[This month’s Effective Concurrency column, “Use Thread Pools Correctly: Keep Tasks Short and Nonblocking”, is now live on DDJ’s website.
From the article:
… But the thread pool is a leaky abstraction. That is, the pool hides a lot of details from us, but to use it effectively we do need to be aware of some things [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=245&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This month’s <strong>Effective Concurrency</strong> column, <a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=216500409">“Use Thread Pools Correctly: Keep Tasks Short and Nonblocking”</a><strong></strong>, is now live on DDJ’s website.</p>
<p>From the article:</p>
<blockquote><p>… But the thread pool is a leaky abstraction. That is, the pool hides a lot of details from us, but to use it effectively we do need to be aware of some things a pool does under the covers so that we can avoid inadvertently hitting performance and correctness pitfalls. Here&#8217;s the summary up front: </p>
<p>1. Tasks should be small, but not too small, otherwise performance overheads will dominate. </p>
<p>2. Tasks should avoid blocking (waiting idly for other events, including inbound messages or contested locks), otherwise the pool won&#8217;t consistently utilize the hardware well &#8212; and, in the extreme worst case, the pool could even deadlock. </p>
<p>Let&#8217;s see why. …</p>
</blockquote>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns:</p>
<blockquote><p><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a> (Aug 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a> (Sep 2007) </p>
<p><a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a> (Oct 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a> (Nov 2007) </p>
<p><a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a> (Dec 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a> (Jan 2008) </p>
<p><a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a> (Feb 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a> (Mar 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a> (Apr 2008) </p>
<p><a href="http://ddj.com/architect/207100682">Interrupt Politely</a> (May 2008) </p>
<p><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a> (Jun 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a> (Jul 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a> (Aug 2008) </p>
<p><a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a> (Sep 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a> (Oct 2008) </p>
<p><a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a> (Nov 2008) </p>
<p><a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a> (Dec 2008)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">Measuring Parallel Performance: Optimizing a Concurrent Queue</a> (Jan 2009)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212701484">volatile vs. volatile</a> (Feb 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=214100002">Sharing Is the Root of All Contention</a> (Mar 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=215900465">Use Threads Correctly = Isolation + Asynchronous Messages</a> (Apr 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=216500409">“Use Thread Pools Correctly: Keep Tasks Short and Nonblocking”</a> (Apr 2009)</p>
</blockquote>
Posted in Concurrency, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/245/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=245&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/04/20/effective-concurrency-use-thread-pools-correctly-keep-tasks-short-and-nonblocking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>A Wryly Repurposed Quotation</title>
		<link>http://herbsutter.wordpress.com/2009/04/17/a-wryly-repurposed-quotation/</link>
		<comments>http://herbsutter.wordpress.com/2009/04/17/a-wryly-repurposed-quotation/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 16:31:26 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/04/17/a-wryly-repurposed-quotation/</guid>
		<description><![CDATA[In my travels, I recently came across this empty store with an almost-empty box beside the front door. As seen in Monterey, CA:

Evidently some character had also noticed the empty store with its empty box, and decided to do a little walk-by wry economic commentary via repurposed quotation. Zooming on the once-empty box:
&#160;
Posted in Friday [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=235&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In my travels, I recently came across this empty store with an almost-empty box beside the front door. As seen in Monterey, CA:</p>
<p><a href="http://herbsutter.files.wordpress.com/2009/04/img-0222.jpg"><img title="IMG_0222" style="display:inline;border-width:0;" height="180" alt="IMG_0222" src="http://herbsutter.files.wordpress.com/2009/04/img-0222-thumb.jpg?w=240&#038;h=180" width="240" border="0" /></a></p>
<p>Evidently some character had also noticed the empty store with its empty box, and decided to do a little walk-by wry economic commentary via repurposed quotation. Zooming on the once-empty box:</p>
<p><a href="http://herbsutter.files.wordpress.com/2009/04/img-0223.jpg"><img title="IMG_0223" style="display:inline;border-width:0;" height="240" alt="IMG_0223" src="http://herbsutter.files.wordpress.com/2009/04/img-0223-thumb.jpg?w=180&#038;h=240" width="180" border="0" /></a>&#160;<a href="http://herbsutter.files.wordpress.com/2009/04/img-0224.jpg"><img title="IMG_0224" style="display:inline;border-width:0;" height="240" alt="IMG_0224" src="http://herbsutter.files.wordpress.com/2009/04/img-0224-thumb.jpg?w=180&#038;h=240" width="180" border="0" /></a></p>
Posted in Friday Thoughts  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/235/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/235/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/235/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=235&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/04/17/a-wryly-repurposed-quotation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/04/img-0222-thumb.jpg" medium="image">
			<media:title type="html">IMG_0222</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/04/img-0223-thumb.jpg" medium="image">
			<media:title type="html">IMG_0223</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/04/img-0224-thumb.jpg" medium="image">
			<media:title type="html">IMG_0224</media:title>
		</media:content>
	</item>
		<item>
		<title>New Dates for Effective Concurrency Seminar in Europe: May 27-29, Stockholm, Sweden</title>
		<link>http://herbsutter.wordpress.com/2009/03/30/new-dates-for-effective-concurrency-seminar-in-europe-may-27-29-stockholm-sweden/</link>
		<comments>http://herbsutter.wordpress.com/2009/03/30/new-dates-for-effective-concurrency-seminar-in-europe-may-27-29-stockholm-sweden/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 20:34:36 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Talks & Events]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/03/30/new-dates-for-effective-concurrency-seminar-in-europe-may-27-29-stockholm-sweden/</guid>
		<description><![CDATA[Now that I’m over the icky flu that forced me to postpone the seminar two weeks ago, I’m happy to say that we have new dates: Effective Concurrency (Europe) will be held on May 27-29, 2009, in Stockholm, Sweden. I&#8217;ll cover the following topics:

Fundamentals: Define basic concurrency goals and requirements • Understand applications’ scalability needs [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=228&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Now that I’m over <a href="http://herbsutter.wordpress.com/2009/03/14/postponed-effective-concurrency-europe/">the icky flu</a> that forced me to postpone the seminar two weeks ago, I’m happy to say that we have new dates: <a href="http://webshop.pc-ware.se/Data/FileLibrary/se/effective_concurrency.pdf"><strong>Effective Concurrency (Europe)</strong></a> will be held on May 27-29, 2009, in Stockholm, Sweden. I&#8217;ll cover the following topics:</p>
<ul>
<li><strong>Fundamentals: </strong>Define basic concurrency goals and requirements • Understand applications’ scalability needs • Key concurrency patterns </li>
<li><strong>Isolation &#8212; Keep work separate: </strong>Running tasks in isolation and communicate via async messages • Integrating multiple messaging systems, including GUIs and sockets • Building responsive applications using background workers • Threads vs. thread pools </li>
<li><strong>Scalability &#8212; Re-enable the Free Lunch:</strong> When and how to use more cores • Exploiting parallelism in algorithms • Exploiting parallelism in data structures • Breaking the scalability barrier </li>
<li><strong>Consistency &#8212; Don’t Corrupt Shared State:</strong> The many pitfalls of locks&#8211;deadlock, convoys, etc. • Locking best practices • Reducing the need for locking shared data • Safe lock-free coding patterns • Avoiding the pitfalls of general lock-free coding • Races and race-related effects </li>
<li><strong>High Performance Concurrency:</strong> Machine architecture and concurrency • Costs of fundamental operations, including locks, context switches, and system calls • Memory and cache effects • Data structures that support and undermine concurrency • Enabling linear and superlinear scaling </li>
<li><strong>Migrating Existing Code Bases to Use Concurrency </strong></li>
<li><strong>Near-Future Tools and Features </strong></li>
</ul>
<p>I hope to see some of you there!</p>
Posted in Concurrency, Software Development, Talks &amp; Events  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=228&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/03/30/new-dates-for-effective-concurrency-seminar-in-europe-may-27-29-stockholm-sweden/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>RIP: SD Conferences</title>
		<link>http://herbsutter.wordpress.com/2009/03/24/rip-sd-conferences/</link>
		<comments>http://herbsutter.wordpress.com/2009/03/24/rip-sd-conferences/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 21:55:29 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Talks & Events]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/03/24/rip-sd-conferences/</guid>
		<description><![CDATA[The latest casualties in the technical education world are the Software Development conferences – SD West, SD Best Practices, and Architecture &#38; Design World – which are being discontinued effective immediately, making the SD West that was just held earlier this month the last of its kind. The conferences were run by the same company [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=226&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The latest casualties in the technical education world are the <a href="http://sdexpo.com/">Software Development conferences</a> – SD West, SD Best Practices, and Architecture &amp; Design World – which are being discontinued effective immediately, making the SD West that was just held earlier this month the last of its kind. The conferences were run by the same company that ran some important but now-defunct magazines including <em>C/C++ Users Journal</em> and of course <em>Software Development Magazine</em>, as well as <em>Dr. Dobb’s</em> which still exists but <a href="http://herbsutter.wordpress.com/2008/12/31/the-2008-media-inflection-meet-dr-web-the-new-gorilla/">recently went web-only</a>.</p>
<p>SD, especially SD West, has been a mainstay of the programming conferences world since 1985. I’m going to miss these shows. They were a wonderful gathering place for talks and tutorials by A-list speakers covering many technologies, from C++ to Java to AJAX and more. More personally, Bjarne Stroustrup and I immensely enjoyed giving our two-day Stroustrup &amp; Sutter seminar there several times in recent years, and skipped this year’s event in anticipation of doing a fresh one again next spring. Alas, it’s not to be (at least not with SD).</p>
<p>SD, you will be missed.</p>
Posted in Software Development, Talks &amp; Events  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/226/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/226/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/226/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=226&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/03/24/rip-sd-conferences/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Use Threads Correctly = Isolation + Asynchronous Messages</title>
		<link>http://herbsutter.wordpress.com/2009/03/16/effective-concurrency-use-threads-correctly-isolation-asynchronous-messages/</link>
		<comments>http://herbsutter.wordpress.com/2009/03/16/effective-concurrency-use-threads-correctly-isolation-asynchronous-messages/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 03:06:46 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/03/16/effective-concurrency-use-threads-correctly-isolation-asynchronous-messages/</guid>
		<description><![CDATA[This month’s Effective Concurrency column, “Use Threads Correctly = Isolation + Asynchronous Messages”, is now live on DDJ’s website.
From the article:
Explicit threads are undisciplined. They need some structure to keep them in line. In this column, we&#8217;re going to see what that structure is, as we motivate and illustrate best practices for using threads &#8212; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=223&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This month’s <strong>Effective Concurrency</strong> column, <a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=215900465">“Use Threads Correctly = Isolation + Asynchronous Messages”</a><strong></strong>, is now live on DDJ’s website.</p>
<p>From the article:</p>
<blockquote><p>Explicit threads are undisciplined. They need some structure to keep them in line. In this column, we&#8217;re going to see what that structure is, as we motivate and illustrate best practices for using threads &#8212; techniques that will make our concurrent code easier to write correctly and to reason about with confidence.</p>
</blockquote>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns and the DDJ print magazine issue in which they first appeared:</p>
<blockquote><p><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a> (Aug 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a> (Sep 2007) </p>
<p><a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a> (Oct 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a> (Nov 2007) </p>
<p><a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a> (Dec 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a> (Jan 2008) </p>
<p><a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a> (Feb 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a> (Mar 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a> (Apr 2008) </p>
<p><a href="http://ddj.com/architect/207100682">Interrupt Politely</a> (May 2008) </p>
<p><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a> (Jun 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a> (Jul 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a> (Aug 2008) </p>
<p><a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a> (Sep 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a> (Oct 2008) </p>
<p><a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a> (Nov 2008) </p>
<p><a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a> (Dec 2008)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">Measuring Parallel Performance: Optimizing a Concurrent Queue</a> (Jan 2009)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212701484">volatile vs. volatile</a> (Feb 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=214100002">Sharing Is the Root of All Contention</a> (Mar 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=215900465">Use Threads Correctly = Isolation + Asynchronous Messages</a> (Apr 2009)</p>
</blockquote>
Posted in Concurrency, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/223/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/223/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/223/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=223&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/03/16/effective-concurrency-use-threads-correctly-isolation-asynchronous-messages/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Postponed: Effective Concurrency Europe</title>
		<link>http://herbsutter.wordpress.com/2009/03/14/postponed-effective-concurrency-europe/</link>
		<comments>http://herbsutter.wordpress.com/2009/03/14/postponed-effective-concurrency-europe/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 02:20:30 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Talks & Events]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/03/14/postponed-effective-concurrency-europe/</guid>
		<description><![CDATA[Right now I should be at 40,000 feet somewhere over Baffin Island on my way to Stockholm for Effective Concurrency Europe, but instead I’m in bed with a fever that I’ve had since Wednesday night and still unable to talk. The organizer and I have been staying in touch with flu updates every few hours [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=221&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Right now I should be at 40,000 feet somewhere over Baffin Island on my way to Stockholm for <a href="http://herbsutter.wordpress.com/2009/01/29/effective-concurrency-seminar-in-europe-march-16-18-stockholm-sweden/">Effective Concurrency Europe</a>, but instead I’m in bed with a fever that I’ve had since Wednesday night and still unable to talk. The organizer and I have been staying in touch with flu updates every few hours to see if lots of “TLC and OTC” (tender loving care and over-the-counter drugs) could get me well enough to fly and push through teaching for three days; that usually works, but this time it’s a really nasty one, and we have to postpone.</p>
<p>I’m sorry to have to disappoint this week and for any inconvenience this will surely cause some of you, and I hope that you’ll understand. The organizer has already emailed everyone who has registered to notify you of the cancellation of this week’s dates (this post partly serves as a backup to that email), and we’ll keep you posted as we reschedule. The response has exceeded expectations by a good margin, and I’m grateful for your strong interest and planning to take time away from your schedules to come and talk concurrency with me. I’m still very much looking forward to seeing you there in the near future. (And minus potentially spreading wicked germs.)</p>
<p>Best wishes to you and yours,</p>
<p>Herb</p>
Posted in Talks &amp; Events  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=221&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/03/14/postponed-effective-concurrency-europe/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Free Training For Laid-Off Developers</title>
		<link>http://herbsutter.wordpress.com/2009/02/26/free-training-for-laid-off-developers/</link>
		<comments>http://herbsutter.wordpress.com/2009/02/26/free-training-for-laid-off-developers/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 21:37:59 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Talks & Events]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/02/26/free-training-for-laid-off-developers/</guid>
		<description><![CDATA[Like many areas in the United States, Seattle has recently been hit with layoffs and downsizing in our industry. So it’s quite timely that Steve McConnell’s company Construx, in the Seattle area, is offering free training for laid-off software workers:
After listening to doom and gloom economic reports for the past few months, we decided we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=216&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Like many areas in the United States, Seattle has recently been hit with layoffs and downsizing in our industry. So it’s quite timely that Steve McConnell’s company Construx, in the Seattle area, is <a href="http://forums.construx.com/blogs/stevemcc/archive/2009/02/24/construx-offers-free-training-for-laid-off-software-workers.aspx">offering free training for laid-off software workers</a>:</p>
<blockquote><p>After listening to doom and gloom economic reports for the past few months, we decided we would try to do something to brighten our little corner of the world. Here&#8217;s our official press release about it:</p>
<p><em><strong>Construx Software has designated 25% of its public seminar seats free of charge to software workers who have been laid off. Construx seminars help software professionals improve their technical and managerial skills. Seminar attendees will be more effective when they reenter the workforce. Construx hopes this program will help laid-off software workers reenter the workforce more quickly. </strong></em></p>
</blockquote>
<p>Please read the full article for more details.</p>
<p>I’m very pleased to report that this program will include <a href="http://construx.com/Page.aspx?nid=84&amp;id=108">my next U.S. <em>Effective Concurrency</em> seminar</a> which will be held in Bellevue, WA on July 27-30, 2009. I’ll blog about that seminar again as we get closer, but it’s on the Construx calendar now.</p>
<p>I hope that this will be helpful to some people, and I look forward to seeing some of you in Bellevue.</p>
<h3>Aside: Please Be Professional</h3>
<p>One problem with offering things for free is that people don’t always value them. I was surprised to learn that a surprising number of people who’ve asked for and received this free admission at Construx have been no-shows.</p>
<p>The following should go without saying, but here it is: As a courtesy to Construx and to other attendees, please don’t sign up unless you intend to come, and if something comes up that prevents you from attending please notify Construx. Otherwise, you may be taking the place of someone who would have liked to attend in your place (seating is limited), and Construx is out the cost of food (they provide breakfast and lunch) and printed color binders and such that go to waste.</p>
<h3>Other Free Materials</h3>
<p>Most of you know that <a href="http://www.gotw.ca/publications/index.htm">virtually all the articles and columns I’ve ever written</a> have always been available for free on my own website or via magazine websites (modulo some link rot, sigh). These include all the <a href="http://herbsutter.wordpress.com/2009/02/13/effective-concurrency-sharing-is-the-root-of-all-contention/">Effective Concurrency</a> articles, and my C++-focused “Guru of the Week” and magazine articles.</p>
<p>The only things I’ve written that aren’t legally freely available are the final texts of my books, including translations, to which the publishing company owns the copyright; but the books are based on the same freely-available English articles, and Addison-Wesley/Pearson has never had any issue with those staying available, so the basic material is all there.</p>
<p>But there’s news on the “final book contents” front, too, at least in English: Once my current book(s) on <em>Effective Concurrency</em> is done, Jim Hyslop and I plan to compile a book of the C++ Conversations articles we coauthored in <em>C++ Report</em> and <em>C/C++ Users Journal</em> (thanks again for your patience, Jim!) and I also plain to write a second edition of <em>Exceptional C++ – </em>and both books will be updated for <a href="http://herbsutter.wordpress.com/2008/10/28/september-2008-iso-c-standards-meeting-the-draft-has-landed-and-a-new-convener/">C++0x, which is now feature-complete</a> and undergoing its first round of international review. It’s quite interesting just how often using C++0x language and library features (from <a href="http://herbsutter.wordpress.com/2008/03/29/trip-report-februarymarch-2008-iso-c-standards-meeting/">lambdas</a> to shared_ptrs and concurrency) really help solve the old problems in even more elegant and robust ways… and I’m sure we’ll throw in a couple of new problems and solutions too. My goal is to post these books’ draft Items, perhaps in the form of blog entries, as we write them. But I’m also working with the publisher to see if perhaps we could even post the very final Items in that format with their permission. I’ll post more news about that as there’s something to say.</p>
Posted in C++, Concurrency, Software Development, Talks &amp; Events  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=216&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/02/26/free-training-for-laid-off-developers/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Sharing Is the Root of All Contention</title>
		<link>http://herbsutter.wordpress.com/2009/02/13/effective-concurrency-sharing-is-the-root-of-all-contention/</link>
		<comments>http://herbsutter.wordpress.com/2009/02/13/effective-concurrency-sharing-is-the-root-of-all-contention/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 16:46:00 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/02/13/effective-concurrency-sharing-is-the-root-of-all-contention/</guid>
		<description><![CDATA[This month’s Effective Concurrency column, “Sharing Is the Root of All Contention”, is now live on DDJ’s website.
This article aims to address the root cause behind some frequently made assertions: Statements like “locks kill scalability” and “CAS kills scalability” are mostly true but focus on symptoms rather than causes; and others such as “reader/writer mutexes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=215&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This month’s <strong>Effective Concurrency</strong> column, <a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=214100002">“Sharing Is the Root of All Contention”</a><strong></strong>, is now live on DDJ’s website.</p>
<p>This article aims to address the root cause behind some frequently made assertions: Statements like “locks kill scalability” and “CAS kills scalability” are mostly true but focus on symptoms rather than causes; and others such as “reader/writer mutexes are great for scalability” at minimum need some heavy qualification.</p>
<p>From the article:</p>
<blockquote><p>Quick: What fundamental principle do all of the following have in common?</p>
<ul>
<li>Two children drawing with crayons. </li>
<li>Three customers at Starbucks adding cream to their coffee. </li>
<li>Four processes running on a CPU core. </li>
<li>Five threads updating an object protected by a mutex. </li>
<li>Six threads running on different processors updating the same lock-free queue. </li>
<li>Seven modules using the same reference-counted shared object. </li>
</ul>
<p>Answer: In each case, multiple users share a resource that requires coordination because not everyone can use it simultaneously &#8212; and <i>such sharing is the root cause of all resulting contention</i> that will degrade everyone&#8217;s performance. (Note: The only kind of shared resource that doesn&#8217;t create contention is one that inherently requires no synchronization because all users can use it simultaneously without restriction, which means it doesn&#8217;t fall into the description above. For example, an immutable object can have its unchanging bits be read by any number of threads or processors at any time without synchronization.)</p>
<p>In this article, I&#8217;ll deliberately focus most of the examples on one important case, namely mutable (writable) shared objects in memory, which are an inherent bottleneck to scalability on multicore systems. But please don&#8217;t lose sight of the key point, namely that &quot;sharing causes contention&quot; is a general principle that is not limited to shared memory or even to computing.</p>
<p><strong>The Inherent Costs of Sharing</strong></p>
<p>Here&#8217;s the issue in one sentence: Sharing fundamentally requires waiting and demands answers to expensive questions. …</p>
</blockquote>
<p>Aside: This will be in the first electronic-only Dr. Dobb’s Report, and I’m going to have to get used to Dobb’s being <a href="http://herbsutter.wordpress.com/2008/12/31/the-2008-media-inflection-meet-dr-web-the-new-gorilla/">electronic-only</a>. One consequence of this change that I just discovered today is that an article can go online hours after I correct the proofs. That may seem like it shouldn’t be surprising in the days of blogs, but a magazine isn’t (or at least wasn’t) like a blog. When I wrote for magazines like <em>C++ Report</em> in the late 1990s, the time between submitting the final column manuscript and seeing it in print was about two to three months, depending on the magazine. Since the mid-2000s with Dobb’s, it’s been only one month from proofs to print &#8212; and Dobb’s could have posted the online versions even sooner, but held them back to be semi-synced with the print magazine. Now that the print constraint has disappeared, apparently I can (and, today, did) start work on a Friday morning to find the Dobb’s proofs I corrected the night before already on the web. Nifty. (And thanks again, Deirdre!)</p>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns and the DDJ print magazine issue in which they first appeared:</p>
<blockquote><p><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a> (Aug 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a> (Sep 2007) </p>
<p><a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a> (Oct 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a> (Nov 2007) </p>
<p><a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a> (Dec 2007) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a> (Jan 2008) </p>
<p><a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a> (Feb 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a> (Mar 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a> (Apr 2008) </p>
<p><a href="http://ddj.com/architect/207100682">Interrupt Politely</a> (May 2008) </p>
<p><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a> (Jun 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a> (Jul 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a> (Aug 2008) </p>
<p><a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a> (Sep 2008) </p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a> (Oct 2008) </p>
<p><a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a> (Nov 2008) </p>
<p><a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a> (Dec 2008)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">Measuring Parallel Performance: Optimizing a Concurrent Queue</a> (Jan 2009)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212701484">volatile vs. volatile</a> (Feb 2009)</p>
<p><a href="http://www.ddj.com/go-parallel/article/showArticle.jhtml?articleID=214100002">Sharing Is the Root of All Contention</a> (Mar 2009)</p>
</blockquote>
Posted in Concurrency, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=215&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/02/13/effective-concurrency-sharing-is-the-root-of-all-contention/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Income in Perspective: 2 Bppl @ $3/day</title>
		<link>http://herbsutter.wordpress.com/2009/02/06/income-in-perspective-2-bppl-3day/</link>
		<comments>http://herbsutter.wordpress.com/2009/02/06/income-in-perspective-2-bppl-3day/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 09:17:00 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>
		<category><![CDATA[Opinion & Editorial]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/02/06/income-in-perspective-2-bppl-3day/</guid>
		<description><![CDATA[I just saw a CNN headline that read: “Young workers scrimp to live on $15/wk.” Before reading further, what do you think: Is that stunning and shocking? Or shockingly typical?
The story turned out to be a piece about white-collar workers in China trying to live frugally, spending only 100 Yuan on travel and food during [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=211&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just saw a CNN headline that read: <a href="http://www.cnn.com/video/#/video/business/2009/02/04/chang.china.living.cheap.cnn">“Young workers scrimp to live on $15/wk.”</a> Before reading further, what do you think: Is that stunning and shocking? Or shockingly typical?</p>
<p>The story turned out to be a piece about white-collar workers in China trying to live frugally, spending only 100 Yuan on travel and food during the workweek to conserve funds. Of course, the workers’ actual total expenses and income are higher, because that $15/week figure doesn’t include weekend expenses and other major costs like rent. Even so, the story is considered newsworthy here, and is probably a shock to a number of readers in the western world.</p>
<p>But the headline wouldn’t surprise readers who are familiar with the approximate distribution of income/GDP/wealth in the world.</p>
<p>To illustrate, here are two personal data points from 2006, when my wife and I traveled to Kenya and Zambia to visit friends:</p>
<ul>
<li><strong>Income:</strong> In <a href="http://www.nationmaster.com/country/ke-kenya/eco-economy">Kenya</a>, we were told that being a staff worker at a safari lodge is considered a good job. What does it pay? About $2 per day, for long hours and six-day weeks. This isn’t unusual; in about 30 countries, including Kenya, more than half of the population <a href="http://www.nationmaster.com/graph/eco_pop_und_2_a_day-economy-population-under-2-day">earns under $2 per day</a>. <strong>An estimated two billion people – 30% of the world’s population – live on an income of less than $3 per day.</strong> And $3 per day is about what the attention-grabbing CNN headline implies, though the actual story behind that headline is much less bad.</li>
<li><strong>Cost of living:</strong> But what happens when we consider, not just dollar-for-dollar comparisons, but purchasing power? Isn’t it less expensive to live in less-developed countries? Yes, it usually is, especially for shelter and services – there’s been some talk lately on the U.S. news about retiring in Mexico as a way for older people to save money in this economy – but the difference for the same quality goods is often less than one might think. In Lusaka, the capital of <a href="http://www.nationmaster.com/country/za-zambia/eco-economy">Zambia</a>, we found there were only three grocery stores [*] having similar goods to what we would expect to find in a U.S.-style Safeway, although of course the Zambian stores were much smaller than U.S. stores (more the size of a medium Trader Joe’s) and offered far less selection diversity (something like a factor of 20 fewer varieties or brands). When we visited one of the stores, I picked up a few Western-style items, totaled the price and converted to U.S. dollars in my head, and found that those <strong>comparable products in Lusaka cost nearly the same as we would have paid for the same items in Seattle</strong>. Our local friend replied: “Right, nobody who lives here would ever think of buying a can of soda pop.” Certainly not when a can of <a href="http://www.pepsi.com/">Coke</a> costs a day’s wage for many people, and doesn’t confer any significant nutritional benefit. </li>
</ul>
<p>The gulf between the western- and world-median standards of living is, simply put, vast – and growing. The standard of living that’s normal for most of the planet’s population is well nigh unimaginable to many of us in the western world, and even for those of us who’ve been there, it’s one thing to see it and quite another to really understand what such a life would be like. I don’t claim to.</p>
<p>&#160;</p>
<p>[*] They might well be the only such stores in the country, not just the capital.</p>
Posted in Friday Thoughts, Opinion &amp; Editorial  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=211&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/02/06/income-in-perspective-2-bppl-3day/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency Seminar in Europe: March 16-18, Stockholm, Sweden</title>
		<link>http://herbsutter.wordpress.com/2009/01/29/effective-concurrency-seminar-in-europe-march-16-18-stockholm-sweden/</link>
		<comments>http://herbsutter.wordpress.com/2009/01/29/effective-concurrency-seminar-in-europe-march-16-18-stockholm-sweden/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 20:13:00 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Talks & Events]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/01/29/effective-concurrency-seminar-in-europe-march-16-18-stockholm-sweden/</guid>
		<description><![CDATA[A number of people have asked whether I will be teaching my Effective Concurrency seminar in Europe. The answer is yes:
Effective Concurrency (Europe) will be held on March 16-18, 2009, in Stockholm, Sweden. This is my only public European seminar in 2009. I&#8217;ll cover the following topics:

Fundamentals: Define basic concurrency goals and requirements • Understand [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=210&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A number of people have asked whether I will be teaching my Effective Concurrency seminar in Europe. The answer is yes:</p>
<p><a href="http://webshop.pc-ware.se/Data/FileLibrary/se/effective_concurrency.pdf"><strong>Effective Concurrency (Europe)</strong></a> will be held on March 16-18, 2009, in Stockholm, Sweden. This is my only public European seminar in 2009. I&#8217;ll cover the following topics:</p>
<ul>
<li><strong>Fundamentals: </strong>Define basic concurrency goals and requirements • Understand applications’ scalability needs • Key concurrency patterns </li>
<li><strong>Isolation &#8212; Keep work separate: </strong>Running tasks in isolation and communicate via async messages • Integrating multiple messaging systems, including GUIs and sockets • Building responsive applications using background workers • Threads vs. thread pools </li>
<li><strong>Scalability &#8212; Re-enable the Free Lunch:</strong> When and how to use more cores • Exploiting parallelism in algorithms • Exploiting parallelism in data structures • Breaking the scalability barrier </li>
<li><strong>Consistency &#8212; Don’t Corrupt Shared State:</strong> The many pitfalls of locks&#8211;deadlock, convoys, etc. • Locking best practices • Reducing the need for locking shared data • Safe lock-free coding patterns • Avoiding the pitfalls of general lock-free coding • Races and race-related effects </li>
<li><strong>High Performance Concurrency:</strong> Machine architecture and concurrency • Costs of fundamental operations, including locks, context switches, and system calls • Memory and cache effects • Data structures that support and undermine concurrency • Enabling linear and superlinear scaling </li>
<li><strong>Migrating Existing Code Bases to Use Concurrency </strong></li>
<li><strong>Near-Future Tools and Features </strong></li>
</ul>
<p>I hope to see some of you there!</p>
Posted in Concurrency, Software Development, Talks &amp; Events  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=210&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/01/29/effective-concurrency-seminar-in-europe-march-16-18-stockholm-sweden/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>From the &quot;we know what they meant, but it&#8217;s not what they said&quot; department</title>
		<link>http://herbsutter.wordpress.com/2009/01/16/from-the-we-know-what-they-meant-but-its-not-what-they-said-department/</link>
		<comments>http://herbsutter.wordpress.com/2009/01/16/from-the-we-know-what-they-meant-but-its-not-what-they-said-department/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 18:57:06 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/01/16/from-the-we-know-what-they-meant-but-its-not-what-they-said-department/</guid>
		<description><![CDATA[While walking our dogs recently, we came across several of these signs &#8212; ironically, in front of our neighborhood school.

Posted in Friday Thoughts       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=209&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>While walking our dogs recently, we came across several of these signs &#8212; ironically, in front of our neighborhood school.</p>
<p><a href="http://herbsutter.files.wordpress.com/2009/01/please-clean-up.png"><img height="480" alt="Please Clean Up" src="http://herbsutter.files.wordpress.com/2009/01/please-clean-up-thumb.png?w=360&#038;h=480" width="360"></a></p>
Posted in Friday Thoughts  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/209/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/209/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/209/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=209&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/01/16/from-the-we-know-what-they-meant-but-its-not-what-they-said-department/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2009/01/please-clean-up-thumb.png" medium="image">
			<media:title type="html">Please Clean Up</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: volatile vs. volatile</title>
		<link>http://herbsutter.wordpress.com/2009/01/12/effective-concurrency-volatile-vs-volatile/</link>
		<comments>http://herbsutter.wordpress.com/2009/01/12/effective-concurrency-volatile-vs-volatile/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 09:12:15 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C# / .NET]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/01/12/effective-concurrency-volatile-vs-volatile/</guid>
		<description><![CDATA[This month&#8217;s Effective Concurrency column, &#8220;volatile vs. volatile&#8221;, is now live on DDJ&#8217;s website and also appears in the print magazine. (As a historical note, it&#8217;s DDJ&#8217;s final print issue, as I mentioned previously.)
This article aims to answer the frequently asked question: &#8220;What does volatile mean?&#8221; The short answer: &#8220;It depends, do you mean Java/.NET [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=205&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This month&#8217;s <strong>Effective Concurrency</strong> column, <strong><a href="http://www.ddj.com/hpc-high-performance-computing/212701484">&#8220;volatile vs. volatile&#8221;</a></strong>, is now live on DDJ&#8217;s website and also appears in the print magazine. (As a historical note, it&#8217;s DDJ&#8217;s final print issue, as I <a href="http://herbsutter.wordpress.com/2008/12/31/the-2008-media-inflection-meet-dr-web-the-new-gorilla/">mentioned previously</a>.)</p>
<p>This article aims to answer the frequently asked question: &#8220;What does volatile mean?&#8221; The short answer: &#8220;It depends, do you mean Java/.NET volatile or C/C++ volatile?&#8221; From the article:</p>
<blockquote><p>What does the <b>volatile</b> keyword mean? How should you use it? Confusingly, there are two common answers, because depending on the language you use volatile supports one or the other of two different programming techniques: lock-free programming, and dealing with &#8216;unusual&#8217; memory.</p>
<p>Adding to the confusion, these two different uses have overlapping requirements and impose overlapping restrictions, which makes them appear more similar than they are. Let&#8217;s define and understand them clearly, and see how to spell them correctly in C, C++, Java and C# &#8212; and not always as <b>volatile</b>. &#8230;</p>
</blockquote>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns and the DDJ print magazine issue in which they first appeared:</p>
<blockquote><p><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a> (Aug 2007)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a> (Sep 2007)
<p><a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a> (Oct 2007)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a> (Nov 2007)
<p><a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a> (Dec 2007)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a> (Jan 2008)
<p><a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a> (Feb 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a> (Mar 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a> (Apr 2008)
<p><a href="http://ddj.com/architect/207100682">Interrupt Politely</a> (May 2008)
<p><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a> (Jun 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a> (Jul 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a> (Aug 2008)
<p><a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a> (Sep 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a> (Oct 2008)
<p><a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a> (Nov 2008)
<p><a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a> (Dec 2008)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">Measuring Parallel Performance: Optimizing a Concurrent Queue</a> (Jan 2009)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212701484">volatile vs. volatile</a> (Feb 2009)</p>
</blockquote>
Posted in C# / .NET, C++, Concurrency, Java  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/205/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/205/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/205/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=205&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/01/12/effective-concurrency-volatile-vs-volatile/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Answer to &quot;16 Technologies&quot;: Engelbart and the Mother of All Demos</title>
		<link>http://herbsutter.wordpress.com/2009/01/08/answer-to-16-technologies-engelbart-and-the-mother-of-all-demos/</link>
		<comments>http://herbsutter.wordpress.com/2009/01/08/answer-to-16-technologies-engelbart-and-the-mother-of-all-demos/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 09:59:59 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Opinion & Editorial]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/01/08/answer-to-16-technologies-engelbart-and-the-mother-of-all-demos/</guid>
		<description><![CDATA[A few days ago I posted a challenge to name the researcher/team and approximate year each of the following 16 important technologies was first demonstrated. In brief, they were:

The personal computer for dedicated individual use all day long.
The mouse.
Internetworks.
Network service discovery.
Live collaboration and desktop/app sharing.
Hierarchical structure within a file system and within a document.
Cut/copy/paste, with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=192&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A few days ago <a href="http://herbsutter.wordpress.com/2009/01/05/16-important-technologies-who-demonstrated-each-one-first/">I posted a challenge</a> to name the researcher/team and approximate year each of the following 16 important technologies was first demonstrated. In brief, they were:</p>
<ul>
<li>The personal computer for dedicated individual use all day long.
<li>The mouse.
<li>Internetworks.
<li>Network service discovery.
<li>Live collaboration and desktop/app sharing.
<li>Hierarchical structure within a file system and within a document.
<li>Cut/copy/paste, with drag-and-drop.
<li>Paper metaphor for word processing.
<li>Advanced pattern search and macro search.
<li>Keyword search and multiple weighted keyword search.
<li>Catalog-based information retrieval.
<li>Flexible interactive formatting and line drawing.
<li>Hyperlinks within a document and across documents.
<li>Tagging graphics, and parts of graphics, as hyperlinks.
<li>Shared workgroup document collaboration with annotations etc.
<li><em>Live</em> shared workgroup collaboration with live audio/video teleconference in a window. </li>
</ul>
<h4><strong>A single answer to all of the above: </strong><a href="http://en.wikipedia.org/wiki/Doug_Engelbart"><strong>Doug Engelbart</strong></a><strong> and his ARC team, in what is now known as </strong><a href="http://en.wikipedia.org/wiki/The_Mother_of_All_Demos"><strong>&#8220;The Mother of All Demos&#8221;</strong></a><strong>, on Monday, December 9, 1968.</strong></h4>
<p><img style="margin:0 0 0 10px;" height="387" src="http://sloan.stanford.edu/MouseSite/dce1968conferenceannouncement.jpg" width="290" align="right">Last month, we marked the 40th anniversary of the famous <a href="http://en.wikipedia.org/wiki/The_Mother_of_All_Demos">Engelbart Demo</a>, a truly unique &#8220;Eureka!&#8221; moment in the history of computing. 40 years go, Engelbart and his visionary team foresaw &#8212; <em>and prototyped and demonstrated</em> &#8212; many essential details of what we take for granted as our commonplace computing environment today, including all of the above-listed technologies, most of them demonstrated for the first time in that talk.</p>
<p>This talk would be noteworthy and historic just for being the first time a &#8220;mouse&#8221; was shown and called by that name. Yet the mouse was just one of over a dozen important innovations to be compellingly presented with working prototype implementations.</p>
<p>Note: Yes, some of the individual technologies have earlier theoretical roots. I deliberately phrased the question to focus on implementations because <strong>it&#8217;s great to imagine a new idea, but it isn&#8217;t engineering until we prove it can work by actually building it.</strong> For example, consider hypertext: Vannevar Bush&#8217;s <a href="http://en.wikipedia.org/wiki/Memex">Memex</a>, vintage 1945, was a theorectical &#8220;proto-hypertext&#8221; system but it unfortunately remained theoretical, understandably so given the nascent state of computers at the time. <a href="http://en.wikipedia.org/wiki/Project_Xanadu">Project Xanadu</a>, started in 1960, pursued similar ideas but wasn&#8217;t demonstrated until 1972. The Engelbart Demo was the first time that hypertext was publicly shown in a working form, together with a slew of other important working innovations that combined to deliver an unprecedented <em>tour de force</em>. What made it compelling wasn&#8217;t just the individual ideas, but the working demonstrations to show that the ideas worked and how they could combine and interact in wonderful ways.</p>
<h4><strong>Recommended viewing</strong></h4>
<p>You can watch the 100-minute talk <a href="http://sloan.stanford.edu/MouseSite/1968Demo.html">here (Stanford University)</a> in sections with commentary, and <a href="http://video.google.com/videoplay?docid=-8734787622017763097">here (Google Video)</a> all in one go.</p>
Posted in Hardware, Opinion &amp; Editorial, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=192&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/01/08/answer-to-16-technologies-engelbart-and-the-mother-of-all-demos/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://sloan.stanford.edu/MouseSite/dce1968conferenceannouncement.jpg" medium="image" />
	</item>
		<item>
		<title>16 Important Technologies: Who demonstrated each one first?</title>
		<link>http://herbsutter.wordpress.com/2009/01/05/16-important-technologies-who-demonstrated-each-one-first/</link>
		<comments>http://herbsutter.wordpress.com/2009/01/05/16-important-technologies-who-demonstrated-each-one-first/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 09:48:15 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Opinion & Editorial]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2009/01/05/16-important-technologies-who-demonstrated-each-one-first/</guid>
		<description><![CDATA[We enjoy such an abundance of computing riches that it&#8217;s easy to take wonderful technological ideas for granted. Yet so many of the pieces of our modern computing experience that we consider routine today were at one time unimaginable. After all, back in the early days of computing, we were still discovering what these newfangled [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=191&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We enjoy such an abundance of computing riches that it&#8217;s easy to take wonderful technological ideas for granted. Yet so many of the pieces of our modern computing experience that we consider routine today were at one time unimaginable. After all, back in the early days of computing, we were still discovering what these newfangled room-filling gadgets might eventually become capable of &#8212; who could have known then what using computers would be like today?</p>
<p>Of course, we have these technologies today because some visionaries did know, did imagine them&#8230; and, best of all, built and demonstrated them.</p>
<p>Hence today&#8217;s challenge:</p>
<p><span style="color:#008040;"><strong>Quiz: </strong>For each of the following 16 technologies that have become commonplace in our modern computing experience, give the researcher/team and approximate year that a working prototype was first demonstrated. How many can you answer <em>without</em> a web search?</span></p>
<ul>
<li><strong>The personal computer</strong> for dedicated individual use, that one person can have at their disposal all day long. <em>(Hint: Before the </em><a href="http://en.wikipedia.org/wiki/Altair_8800"><em>Altair</em></a><em> in 1975 and </em><a href="http://en.wikipedia.org/wiki/Apple_I"><em>Apple I</em></a><em> in 1976.)</em></li>
<li><strong>Mouse input with a graphical pointer.</strong> <em>(Hint: Before the <a href="http://en.wikipedia.org/wiki/Xerox_Alto">Xerox Alto</a> at Xerox PARC in 1973.)</em></li>
<li><strong>Internetworks</strong> across campuses and cities. <em>(Hint: Before <a href="http://en.wikipedia.org/wiki/Ethernet">Ethernet</a> at Xerox PARC (again) in 1973.)</em></li>
<li><strong>Discovery of &#8216;who&#8217;s got what service&#8217; in an internetwork.</strong></li>
<li><strong>Using internetworks for live collaboration</strong>, not just file sharing. <em>(Hint: Before </em><a href="http://en.wikipedia.org/wiki/Remote_Desktop_Connection#Remote_Desktop_Connection"><em>RDP</em></a><em> and </em><a href="http://en.wikipedia.org/wiki/Comparison_of_remote_desktop_software"><em>others</em></a><em>.)</em></li>
<li><strong>Hierarchical structure</strong> within a file system and within a document. <em>(Hint: Before </em><a href="http://en.wikipedia.org/wiki/Unix"><em>Unix</em></a><em>.)</em></li>
<li><strong>Cut/copy/paste</strong>, with drag-and-drop.</li>
<li><strong>Paper metaphor for word processing</strong>, starting with a blank piece of paper and the applying  formatting and navigating levels in the structure of text.</li>
<li><strong>Advanced pattern search and macro search</strong> within documents. <em>(Hint: Before MIT&#8217;s </em><a href="http://en.wikipedia.org/wiki/Emacs"><em>Emacs</em></a><em>.)</em></li>
<li><strong>Keyword search and multiple weighted keyword search.</strong> <em>(Hint: Long before <strong><a title="You don't really need a link for Google, do you?" href="http://www.youtube.com/watch?v=Yu_moia-oVI">Google</a></strong> (<a title="You clicked a link for Google?! Really??" href="http://www.yougotrickrolled.com/">alternate link</a>).)</em></li>
<li>Information retrieval through <strong>indirect construction of a catalog.</strong></li>
<li><strong>Flexible interactive formatting and line drawing.</strong></li>
<li><strong>Hyperlinks </strong>within a document and across documents, and &#8220;jumping on a link&#8221; to navigate. <em>(Hint: Before </em><a href="http://www.w3.org/People/Berners-Lee/"><em>Tim Berners-Lee</em></a><em> invented the </em><a href="http://www.w3.org/People/Berners-Lee/WorldWideWeb.html"><em>World Wide Web</em></a><em> in 1989-1990.) (Hint&#8217;: Yes, before </em><a href="http://en.wikipedia.org/wiki/HyperCard"><em>HyperCard</em></a><em> too.)</em></li>
<li><strong>Tagging graphics, and parts of graphics, as hyperlinks.</strong> <em>(Hint: Before </em><a href="http://www.flickr.com"><em>Flickr</em></a><em>.)</em></li>
<li><strong>Workgroup collaboration on a document, including collaborative annotations,</strong> allowing members of a group to use and modify a document. <em>(Hint: Before </em><a href="http://en.wikipedia.org/wiki/IBM_Lotus_Notes"><em>Lotus Notes</em></a><em> and </em><a href="http://en.wikipedia.org/wiki/Wiki"><em>Ward Cunningham&#8217;s Wikis</em></a><em>.)</em></li>
<li>The next step up from that: <strong>Live collaboration on a document with screen sharing</strong> on the two writers&#8217; computers so they can see what the other is doing &#8212; <strong>with live audio/video teleconference in a window </strong>at the same time. <em>(Hint: Not </em><a href="http://en.wikipedia.org/wiki/Skype"><em>Skype</em></a><em> or </em><a href="http://en.wikipedia.org/wiki/Livemeeting"><em>LiveMeeting</em></a><em>.)</em></li>
</ul>
Posted in Hardware, Opinion &amp; Editorial, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=191&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2009/01/05/16-important-technologies-who-demonstrated-each-one-first/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>The 2008 Media Inflection: Meet Dr. Web, the New Gorilla</title>
		<link>http://herbsutter.wordpress.com/2008/12/31/the-2008-media-inflection-meet-dr-web-the-new-gorilla/</link>
		<comments>http://herbsutter.wordpress.com/2008/12/31/the-2008-media-inflection-meet-dr-web-the-new-gorilla/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 00:42:51 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Opinion & Editorial]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/12/31/the-2008-media-inflection-meet-dr-web-the-new-gorilla/</guid>
		<description><![CDATA[[edited 2009.01.15 to add link to DDJ's announcement]
2008 was quite a year, full of landmark events that were certainly historic, if not always welcome.
If I had to pick one technology-related highlight from the past year, it would be this: A notable inflection point in the ongoing shift from traditional media to the web. Given that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=178&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>[edited 2009.01.15 to add link to DDJ's announcement]</em></p>
<p>2008 was quite a year, full of landmark events that were certainly historic, if not always welcome.</p>
<p>If I had to pick one technology-related highlight from the past year, it would be this: A notable inflection point in the ongoing shift from traditional media to the web. Given that that tide is still in progress, why single out 2008? <strong>I think we&#8217;ll look back at 2008, especially the fourth quarter, as a turning point when the web became an <a href="http://en.wikipedia.org/wiki/A-list">A-list</a> media outlet and first started to beat up, and even replace, major legacy competitors in newspapers, technical magazines, movies, and TV.</strong> An inflection point, if you will, where the web clearly stopped being the pencil-necked upstart, and visibly emerged as the new <a href="http://www.constitutionlive.com/wp-content/uploads/mostwanted_lou.jpg">gorilla</a> flexing its advertising-revenue-pumped-up muscles and kicking sand on the others.</p>
<p>In 2008, and particularly in the last month, the web began to outright replace some existing newspapers and technology and programming magazines.</p>
<ul>
<li><strong>December 2008: The first two major city newspapers go web-only or web-mostly.</strong> <a href="http://www.detnews.com/apps/pbcs.dll/article?AID=/20081216/METRO/812160419">The Detroit News</a> and <a href="http://www.freep.com/article/20081216/FREEPRESS/81216032">The Detroit Free Press</a> announced truncated print editions and reduced print delivery. Newspapers in several other cities seem likely to follow fairly soon.</li>
<li><strong>As of January 2009: <a href="http://www.pcmag.com/">PC Magazine</a> is <a href="http://www.pcmag.com/article2/0,2817,2335009,00.asp">going &#8220;digital only.&#8221;</a></strong> After the January issue, the print magazine will disappear. Instead, the content will appear exclusively on the web.</li>
<li><strong>As of January 2009: </strong><a href="http://www.ddj.com"><strong>Dr. Dobb&#8217;s Journal</strong></a><strong> is permanently suspending print publication and<a href="http://www.ddj.com/linux-open-source/212700891"> going web-only</a></strong><strong>.</strong> Some of the content will be available as a new &#8220;Dr. Dobb&#8217;s Report&#8221; section of <a href="http://www.informationweek.com/">InformationWeek</a>. My Effective Concurrency column will continue, and I&#8217;ll continue to blog when new columns go live on the web, so if you&#8217;re reading the column via this blog nothing will significantly change for you.</li>
</ul>
<p>As of next month, the only major technical programmer&#8217;s trade magazines still available in print, that I know of, are platform- and technology-specific ones like <a href="http://www.aspnetpro.com/">asp.netPRO</a> and <a href="http://msdn.microsoft.com/en-us/magazine/default.aspx">MSDN Magazine</a> &#8212; and even those increasingly feature online-only content. For example, from MSDN Mag&#8217;s <a href="http://msdn.microsoft.com/en-us/magazine/2009.01.editorsnote.aspx">January 2009 editor&#8217;s note</a>:</p>
<blockquote><p>As we continue to grow our coverage to keep pace with the rapidly expanding set of technologies, we will often offer content exclusively online at <a href="http://msdn.microsoft.com/magazine">msdn.microsoft.com/magazine</a>. So please check in frequently!</p></blockquote>
<p>Gotta love RSS (and Atom etc.): Every text feed is like a magazine or newspaper column, every blogger a columnist. Every audio/video podcast feed is like a radio or TV series, or a radio station or TV channel. And our feed reader is the new magazine/newspaper, as we subscribe to columnists to make our personal custom newsmagazine. But RSS readers, along with RSS-consuming clients like iTunes, are more &#8212; they&#8217;re our personal selection, not only of the columns we want to read (on whatever topics we want, including the funnies section), but also of the media we want to hear and watch. It&#8217;s increasingly our way to choose the text, audio, and video we want all together. Who knew that a large chunk of the coming media convergence would come in the shape of RSS readers?</p>
<p>And other media are feeling the pressure from Dr. Web, the new gorilla:</p>
<ul>
<li><strong>This week (late December 2008), even cable operator Time Warner pushed web delivery for TV.</strong> Time Warner has had various contract disputes <a href="http://www.nytimes.com/2008/12/31/business/media/31cable.html?ref=media">with Viacom</a> and <a href="http://www.caller.com/news/2008/dec/31/time-warner-kiii-reach-agreement/">some local stations</a>. But as part of the dispute:
<ul>Time Warner will respond to Viacom’s advertisement, [Time Warner spokesman] Mr. Dudley said, by highlighting the availability of television content on the Internet.</p>
<p>“We will be telling our customers exactly where they can go to see these programs online,” Mr. Dudley said. “We’ll also be telling them how they can hook up their PCs to a television set.”</ul>
</li>
<li><strong>During October-December 2008, Netflix&#8217;s Watch Instantly has started to turn into a juggernaut.</strong> It&#8217;s interesting enough that you can watch 12,000+ movies and TV shows streamed over the net to your PC at high quality. As of <a href="http://www.engadget.com/2008/10/26/netflix-finally-brings-watch-instantly-to-macs-via-silverlight/">October 2008, you can get them on your Mac</a>. As of <a href="http://gamerscoreblog.com/press/archive/2008/11/19/562420.aspx">November 2008, on your Xbox</a>. As of <a href="http://blog.netflix.com/2008/12/tivo-dvrs-now-stream-movies-from.html">December 2008, on your TiVo</a>. As noted in one recent <a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2008/12/24/BUR214QV6B.DTL">article</a>:
<ul>&#8220;It&#8217;s a good strategic move,&#8221; said Andy Hargreaves, an analyst with Pacific Crest Securities. &#8220;Netflix sees the world will go digital, no matter what they do. They realize there is more to be lost by waiting than doing it early.&#8221;</ul>
</li>
</ul>
<p>And I won&#8217;t even get started on SaaS: hosted rich GUI apps served up on the web, for example the <a href="http://www.reuters.com/article/technologyNews/idUSTRE4B75MP20081208">December 2008 (again) announcement about Office Online</a>.</p>
<p>Yes, don&#8217;t forget 2008, especially December 2008: The month the first major newspapers moved mostly to the web and abandoned print at least partly; the month that PC Magazine and Dr. Dobb&#8217;s suspended print publication and went web-only; the month Netflix Watch Instantly arrived in the living room on TiVos after hitting Xboxes a fortnight before; the month cable provider Time Warner threatened to tell people to watch TV on the net; and the month even Microsoft announced their intent to deliver significant Office web applications.</p>
<p>I for one welcome Dr. Web, our new Gorilla and media overlord!</p>
<p>Besides, what choice do I have?</p>
Posted in Opinion &amp; Editorial, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/178/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/178/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/178/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=178&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/12/31/the-2008-media-inflection-meet-dr-web-the-new-gorilla/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>TRS-80 vs. Alpha, and Parallel Optimization</title>
		<link>http://herbsutter.wordpress.com/2008/12/19/trs-80-vs-alpha-and-parallel-optimization/</link>
		<comments>http://herbsutter.wordpress.com/2008/12/19/trs-80-vs-alpha-and-parallel-optimization/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 22:49:47 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/12/19/trs-80-vs-alpha-and-parallel-optimization/</guid>
		<description><![CDATA[Lest people get the wrong idea, I enjoy reading Jeff Atwood&#8217;s blog and agree with much of what he writes so entertainingly and provocatively. So far I&#8217;ve only responded when I strongly felt differently about something, which has been a grand total of twice now.
So let me also offer an example of something I wholeheartedly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=177&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Lest people get the wrong idea, I enjoy reading Jeff Atwood&#8217;s <a href="http://www.codinghorror.com/blog/">blog</a> and agree with much of what he writes so entertainingly and provocatively. So far I&#8217;ve only responded when I strongly felt differently about something, which has been a grand total of twice now.</p>
<p>So let me also offer an example of something I wholeheartedly agree with. Yesterday, <a href="http://www.codinghorror.com/blog/archives/001198.html">Jeff cited</a> what is also my own favorite <a href="http://www.amazon.com/exec/obidos/ASIN/0201657880">Programming Pearls</a> figure:</p>
<p>&nbsp;</p>
<blockquote><p>Despite the enduring wonder of the yearly parade of newer, better hardware, we&#8217;d also do well to remember my all time favorite graph from <a href="http://www.amazon.com/exec/obidos/ASIN/0201657880/codinghorror-20">Programming Pearls</a>:
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0201657880"><img style="border-width:0;" height="330" alt="trs80vsalpha" src="http://herbsutter.files.wordpress.com/2008/12/trs80vsalpha.png?w=600&#038;h=330" width="600" border="0"></a></p>
<p><a href="http://www.codinghorror.com/blog/archives/000957.html">Everything is fast for small n</a>.</p>
</blockquote>
<p><font color="#666666">Spot on. If you&#8217;re a professional programmer and haven&#8217;t read <a href="http://www.amazon.com/exec/obidos/ASIN/0201657880">Programming Pearls</a> yet, &#8220;run don&#8217;t walk&#8221; to your bookstore of choice.</font></p>
<p><font color="#666666">Incidentally, just to tie this in to parallel computing as well, Jeff&#8217;s article also cites a nice graph of optimizations that improved NDepend:</font></p>
<blockquote><p>Patrick Smacchia&#8217;s <a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/12/01/lessons-learned-from-a-real-world-focus-on-performance.aspx">lessons learned from a real-world focus on performance</a> is a great case study in optimization. </p>
<p><img height="240" alt="ndepend optimization graph" src="http://www.codinghorror.com/blog/images/ndepend-optimization-graph.png" width="600" border="0">
<p>Patrick was able to improve <a href="http://www.ndepend.com/">nDepend</a> analysis performance fourfold, and cut memory consumption in half. As predicted, most of this improvement was algorithmic in nature, but at least half of the overall improvement came from a variety of different optimization techniques.</p>
</blockquote>
<p><font color="#666666">As I&#8217;ve said many times, measure twice, optimize once: Know when and where to optimize. Profilers are your friend. As </font><font color="#666666"><a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/12/01/lessons-learned-from-a-real-world-focus-on-performance.aspx">Patrick writes</a>:</font></p>
<blockquote><p><font color="#666666">When it comes to enhancing performance there is only one way to do things right: <b>measure</b> and focus your work on the part of the code that <b>really</b> takes the bulk of time, not the one that <b>you think</b> takes the bulk of time.</font></p>
</blockquote>
<p><font color="#666666">And of course, in our ever-more-multicore world, the contribution of parallelization gain will continue to grow and dominate the optimization of CPU-bound code. But as Patrick also notes, realizing that gain is not always trivial:</font></p>
<blockquote><p>While we get the 15% gain from between 1 and 2 processors, the gain is almost zero between 2 and 4 processors. We identified some<a href="http://msdn.microsoft.com/en-us/magazine/cc872851.aspx"> potential IO contentions and memory issues</a> that will require more attention in the future. This leads to another lesson: <b>Don’t expect that scaling on many processors will be something easy, even if you don’t share states and don’t use synchronization.</b></p>
</blockquote>
Posted in Concurrency, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=177&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/12/19/trs-80-vs-alpha-and-parallel-optimization/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2008/12/trs80vsalpha.png" medium="image">
			<media:title type="html">trs80vsalpha</media:title>
		</media:content>

		<media:content url="http://www.codinghorror.com/blog/images/ndepend-optimization-graph.png" medium="image">
			<media:title type="html">ndepend optimization graph</media:title>
		</media:content>
	</item>
		<item>
		<title>Rich-GUI SaaS/Web 2.0 Apps Should Not Be Considered Harmful</title>
		<link>http://herbsutter.wordpress.com/2008/12/17/rich-gui-saasweb-20-apps-should-not-be-considered-harmful/</link>
		<comments>http://herbsutter.wordpress.com/2008/12/17/rich-gui-saasweb-20-apps-should-not-be-considered-harmful/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 01:23:32 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/12/17/rich-gui-saasweb-20-apps-should-not-be-considered-harmful/</guid>
		<description><![CDATA[Yesterday, the ever-popular Jeff Atwood (of Coding Horror fame) wrote an article [*] on how not to write Web 2.0 UIs. Unfortunately, it&#8217;s exactly backwards: What he identifies as a problem is in fact not only desirable, but necessary.

[*] Aside: Jeff, I know you love pictures, but is that particular gratuitous one really necessary? Yes, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=170&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Yesterday, the ever-popular Jeff Atwood (of Coding Horror fame) wrote <a href="http://www.codinghorror.com/blog/archives/000869.html">an article</a> [*] on how not to write Web 2.0 UIs. Unfortunately, it&#8217;s exactly backwards: What he identifies as a problem is in fact not only desirable, but necessary.</p>
<ul>
<li>[*] Aside: Jeff, I know you love pictures, but is that particular gratuitous one really necessary? Yes, I know it&#8217;s CGI, but it made me really hesitate about linking to your post and has nothing to do with your technical point.</li>
</ul>
<p>Jeff observes correctly that when you write an application to run on a platform like Windows and/or OS X, your application should follow the local look-and-feel. Fine so far. But he then repeats a claim that I believe is incorrect, at least today, and based on a fallacy &#8212; and adds another fallacy:</p>
<blockquote><p>[Quoting Bill Higgins]</p>
<ul>
<li>&#8230; a Windows application <font color="#000000">should look and feel like a Windows application, a Mac application should look and feel like a Mac application, and a web application should look and feel like a web application.</font></li>
</ul>
<p>Bill extends this to web applications: <b>a web app that apes the conventions of a desktop application is attempting to cross the uncanny valley of user interface design.</b> This is a bad idea for all the same reasons; the tiny flaws and imperfections of the simulation will be grossly magnified for users.</p>
<p>&#8230;</p>
<ul>
<li>When you build a &#8220;desktop in the web browser&#8221;-style application, <b>you&#8217;re violating users&#8217; unwritten expectations of how a web application should look and behave.</b></li>
</ul>
</blockquote>
<p>There are actually two fallacies here.</p>
<h3>Fallacy #1: &#8220;Look and feel like a web application&#8221;</h3>
<p>The first fallacy is here:</p>
<blockquote><p>a web application should look and feel like a web application.</p>
<p>&#8230;</p>
<p>violating users&#8217; unwritten expectations of how a web application should look and behave.</p>
</blockquote>
<p>These assertions beg the question: What does a web application &#8220;look and feel like,&#8221; and what do users expect? Also, are you talking about Web 1.0, where there is an answer to these questions, or Web 2.0, <em>where there isn&#8217;t</em>?</p>
<p>For Web 1.0 applications, the answer is fairly easy: They look like hyperlinked documents built on technologies like HTML and CSS. That&#8217;s what people expect, and get.</p>
<p>But the examples Bill uses aren&#8217;t Web 1.0 applications, they&#8217;re Web 2.0 applications. For Web 2.0 applications, there are no widely accepted UI standards, and applications are all over the map. Indeed, the whole point of Ajax-y/Web2.0-y applications is to get beyond the current 1.0-standard functionality.</p>
<p>Not only are there are no widely-accepted UI standards, there aren&#8217;t even many widely-accepted UI technologies. Consider how many dissimilarities there are among just Flash, Silverlight, and JavaFX as these technologies compete for developer share. Then consider that even <em>within</em> any one of these technologies people actually build wildly diverse interfaces.</p>
<p>Here&#8217;s the main example these bloggers used:</p>
<blockquote><p>Consider the Zimbra web-based email that Bill refers to.
<p><img height="393" alt="zimbra email" src="http://www.codinghorror.com/blog/images/zimbra-email-small.png" width="602" border="0">
<p>It&#8217;s pretty obvious that their inspiration was Microsoft Outlook, a desktop application.
<p><img height="400" alt="outlook email" src="http://www.codinghorror.com/blog/images/outlook-email-small.png" width="612" border="0"></p>
</blockquote>
<p>But what&#8217;s wrong with Zimbra?</p>
<p>Here&#8217;s a Better Question #1: How could you do better?</p>
<p>And for bonus points, Still Better Question #2: What about OWA? Consider that Microsoft already provides essentially the same thing, with the same approach, in the form of <a href="http://en.wikipedia.org/wiki/Outlook_Web_Access">Outlook Web Access</a>, which looks remarkably like the usual Outlook [caveat: this is an example of why I write above and below that 'most' Web 2.0 apps don't try to emulate a particular OS look-and-feel; this one does]. For example (a couple of sample shots taken from <a href="http://www.microsoft.com/exchange/code/OWA/index.html">this brief video overview</a>):</p>
<ul>
<li><a href="http://herbsutter.files.wordpress.com/2008/12/image.png"><img style="border-width:0;" height="422" alt="image" src="http://herbsutter.files.wordpress.com/2008/12/image-thumb.png?w=640&#038;h=422" width="640" border="0"></a><br /><a href="http://herbsutter.files.wordpress.com/2008/12/image1.png"><img style="border-width:0;" height="425" alt="image" src="http://herbsutter.files.wordpress.com/2008/12/image-thumb1.png?w=640&#038;h=425" width="640" border="0"></a> </li>
</ul>
<p>The rich UI isn&#8217;t a bug, it really is a feature &#8212; a killer feature we&#8217;re going to be seeing more of, not less of, because this is what delivering <a href="http://en.wikipedia.org/wiki/Software_as_a_service">software-as-a-service (SaaS)</a> is all about. Although I use the desktop Outlook most of the time, I like OWA and think it&#8217;s the best web-based email and calendaring I&#8217;ve seen especially when I&#8217;m away from my machine (and I&#8217;ve tried several others, though granted you do need to be using Exchange). I suspect its UI conventions are probably pretty accessible even to non-Windows users, though that&#8217;s probably debatable and your mileage may vary.</p>
<h3>Fallacy #2: &#8220;A web app that apes the conventions of a desktop application is [wrong]&#8220;</h3>
<p>The second fallacy is Jeff&#8217;s comment (boldface original):</p>
<blockquote><p><b>a web app that apes the conventions of a desktop application is attempting to cross the uncanny valley of user interface design.</b></p>
</blockquote>
<p>I think this is flawed for three reasons.</p>
<p>First, the &#8220;uncanny valley&#8221; part makes the assumption that people will find it jarring that the app tries to look like a desktop application. (This concern is related to, but different from, the concern of fallacy #1.) But most such apps aren&#8217;t doing that at all, because they know their users will access them from PCs, Macs, and lots of different environments, and they have to look reasonable regardless of the user&#8217;s native environment. They&#8217;re usually not trying to duplicate a given platform&#8217;s native look and feel.</p>
<p>Second, what they are doing is borrowing from UI components and conventions that already work well in desktop GUI environments, and are common across many of those environments. When you have no standards for Web 2.0 look and feel, then doing the best you can by borrowing from ideas we already know work pretty well isn&#8217;t just okay, it&#8217;s necessary. What else can you do?</p>
<p>Finally, the worst part is this: The whole point of <a href="http://en.wikipedia.org/wiki/Software_as_a_service">SaaS</a> is to deliver desktop-like rich-GUI applications on the web. So what is being labeled &#8216;wrong&#8217; above <em>is the whole point</em> of what we&#8217;re doing as an industry.</p>
<h3>&#8220;SaaS/Web 2.0 on Web 1.0&#8243;: The new &#8220;GUI on DOS&#8221;</h3>
<p>Most SaaS/Web 2.0 applications today look and feel pretty much the way GUI applications looked and felt like on DOS, before technologies like Windows and OS/2 PM existed. Around the late 1980s, people wrote lots of GUI applications that ran on DOS, but we didn&#8217;t have a widely-used common GUI infrastructure that handled basic windows and menus and events, much less standards like <a href="http://en.wikipedia.org/wiki/Common_User_Access">CUA</a> that tried to say how to use such a common infrastructure if we had it. So they each did their own thing, borrowing where possible from what seemed to work well for GUIs on other platforms.</p>
<p>Twenty years ago, everyone writing GUIs on DOS designed the UIs as best they could, borrowing where possible from what they saw worked on platforms like the Macintosh and Xerox Alto and Star &#8212; but the results were all over the map, and would stay that way until a standard environment, followed by standard guidelines, came into being.</p>
<p>Today, everyone writing rich Web 2.0 applications is doing their own thing, borrowing as best they can from Macs and Windows and others &#8212; but the results are all over the map, and will continue to be until there actually is such a thing as a UI standard for rich-GUI web applications. You can see that in the differences between Zimbra and Outlook Web Access. In the meantime, it&#8217;s not just okay to borrow from what we&#8217;ve learned on the desktop; it&#8217;s necessary.</p>
<p>And the question isn&#8217;t whether metaphors users already understand on the desktop will migrate to the web, but which ones and how soon, because it&#8217;s the whole point of SaaS. The industry will soon be going well beyond Google Apps; with offerings like Office Online already announced for the short term, which puts still more rich-client GUI apps like word processors and spreadsheets in the browser (with functionality somewhere between Google Apps and the desktop version of Office).</p>
<p><strong>Zimbra and Outlook Web Access aren&#8217;t examples of poor web app design, but exactly the opposite: They&#8217;re just the beginning of the next wave of rich web apps.</strong></p>
Posted in Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=170&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/12/17/rich-gui-saasweb-20-apps-should-not-be-considered-harmful/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://www.codinghorror.com/blog/images/zimbra-email-small.png" medium="image">
			<media:title type="html">zimbra email</media:title>
		</media:content>

		<media:content url="http://www.codinghorror.com/blog/images/outlook-email-small.png" medium="image">
			<media:title type="html">outlook email</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2008/12/image-thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2008/12/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Measuring Parallel Performance &#8212; Optimizing a Concurrent Queue</title>
		<link>http://herbsutter.wordpress.com/2008/12/02/effective-concurrency-measuring-parallel-performance-optimizing-a-concurrent-queue/</link>
		<comments>http://herbsutter.wordpress.com/2008/12/02/effective-concurrency-measuring-parallel-performance-optimizing-a-concurrent-queue/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 00:00:13 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/12/02/effective-concurrency-measuring-parallel-performance-optimizing-a-concurrent-queue/</guid>
		<description><![CDATA[This month&#8217;s Effective Concurrency column is special &#8212; it turned into a feature-length article. (I don&#8217;t know whether it&#8217;ll officially be called a &#8220;feature&#8221; or a &#8220;column&#8221; in the print issue.) &#8220;Measuring Parallel Performance: Optimizing a Concurrent Queue&#8221; just went live on DDJ&#8217;s site, and will also appear in the print magazine.
From the article:
How would [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=164&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This month&#8217;s <strong>Effective Concurrency</strong> column is special &#8212; it turned into a feature-length article. (I don&#8217;t know whether it&#8217;ll officially be called a &#8220;feature&#8221; or a &#8220;column&#8221; in the print issue.) <strong><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">&#8220;Measuring Parallel Performance: Optimizing a Concurrent Queue&#8221;</a></strong> just went live on DDJ&#8217;s site, and will also appear in the print magazine.</p>
<p>From the article:</p>
<blockquote><p>How would you write a fast, internally synchronized queue, one that callers can use without any explicit external locking or other synchronization? Let us count the ways&#8230;or four of them, at least, and compare their performance. We&#8217;ll start with a baseline program and then successively apply three optimization techniques, each time stopping to measure each change&#8217;s relative performance for queue items of different sizes to see how much each trick really bought us.</p>
</blockquote>
<p>The goal of the article is to see how to measure and understand our code&#8217;s parallel performance and measure the actual effect of specific optimizations. <strong>Disclaimer:</strong> The goal of this article is <strong>not</strong> to write the fastest possible queue in the world (though it&#8217;s pretty good). I&#8217;ve already had plenty of email on recent queue-related columns from people who sent me their &#8220;faster&#8221; implementations; writing lock-free queues seems to be a popular indoor sport. Interestingly, for well of half of the ones I received, a 30-second glance at the code was enough to determine that the code had to be incorrect. Why? Because if it doesn&#8217;t do any synchronization on the shared variables &#8212; if there aren&#8217;t any locks, atomics, fences or other synchronization in the code &#8212; then it has races, which will manifest in practice even on forgiving platforms like x86/x64, and there&#8217;s no need to look further. (For more details, see the September 2008 column, <a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a>. Even some code submissions I received in response to that very article were broken for the same reasons shown in that article.)</p>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns and the DDJ print magazine issue in which they first appeared:</p>
<blockquote><p><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a> (Aug 2007)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a> (Sep 2007)
<p><a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a> (Oct 2007)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a> (Nov 2007)
<p><a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a> (Dec 2007)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a> (Jan 2008)
<p><a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a> (Feb 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a> (Mar 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a> (Apr 2008)
<p><a href="http://ddj.com/architect/207100682">Interrupt Politely</a> (May 2008)
<p><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a> (Jun 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a> (Jul 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a> (Aug 2008)
<p><a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a> (Sep 2008)
<p><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a> (Oct 2008)
<p><a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a> (Nov 2008)
<p><a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a> (Dec 2008)</p>
<p><a href="http://www.ddj.com/hpc-high-performance-computing/212201163">Measuring Parallel Performance: Optimizing a Concurrent Queue</a> (Jan 2009)</p>
</blockquote>
Posted in Concurrency  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=164&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/12/02/effective-concurrency-measuring-parallel-performance-optimizing-a-concurrent-queue/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>(out of order) Effective Concurrency: Writing Lock-Free Code &#8212; A Corrected Queue</title>
		<link>http://herbsutter.wordpress.com/2008/11/02/out-of-order-effective-concurrency-writing-lock-free-code-a-corrected-queue/</link>
		<comments>http://herbsutter.wordpress.com/2008/11/02/out-of-order-effective-concurrency-writing-lock-free-code-a-corrected-queue/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 18:25:16 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/11/02/out-of-order-effective-concurrency-writing-lock-free-code-a-corrected-queue/</guid>
		<description><![CDATA[Oops, I just noticed that I forgot to blog about one recent Effective Concurrency column: &#8220;Writing Lock-Free Code: A Corrected Queue&#8221; which also appeared in the October 2008 print issue of Dr. Dobb&#8217;s Journal.
From the article:

As we saw last month [1], lock-free coding is hard even for experts. There, I dissected a published lock-free queue [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=161&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Oops, I just noticed that I forgot to blog about one recent <strong>Effective Concurrency</strong> column: <strong><a href="http://www.ddj.com/hpc-high-performance-computing/210604448">&#8220;Writing Lock-Free Code: A Corrected Queue&#8221;</a></strong> which also appeared in the October 2008 print issue of <em>Dr. Dobb&#8217;s Journal</em>.</p>
<p>From the article:</p>
<blockquote>
<p>As we saw last month [1], lock-free coding is hard even for experts. There, I dissected a published lock-free queue implementation [2] and examined why the code was quite broken. This month, let&#8217;s see how to do it right.</p></blockquote>
<p>Here is the complete-as-of-this-writing set of links to the published Effective Concurrency columns. As always, the months reflect the magazine print issue dates; they usually hit the web a bit sooner:</p>
<blockquote><p>August 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a>
<p>September 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a>
<p>October 2007: <a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a>
<p>November 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a>
<p>December 2007: <a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a>
<p>January 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a>
<p>February 2008: <a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a>
<p>March 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a>
<p>April 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a>
<p>May 2008: <a href="http://ddj.com/architect/207100682">Interrupt Politely</a>
<p>June 2008: <a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a>
<p>July 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a>
<p>August 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a>
<p>September 2008: <a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a>
<p>October 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a>
<p>November 2008: <a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a>
<p>December 2008: <a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a></p>
</blockquote>
Posted in Concurrency, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=161&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/11/02/out-of-order-effective-concurrency-writing-lock-free-code-a-corrected-queue/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Understanding Parallel Performance</title>
		<link>http://herbsutter.wordpress.com/2008/11/02/effective-concurrency-understanding-parallel-performance/</link>
		<comments>http://herbsutter.wordpress.com/2008/11/02/effective-concurrency-understanding-parallel-performance/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 18:15:29 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/11/02/effective-concurrency-understanding-parallel-performance/</guid>
		<description><![CDATA[Wow, DDJ just posted the previous one a few days ago, and already the next Effective Concurrency column is available: &#8220;Understanding Parallel Performance&#8221; just went live, and will also appear in the print magazine.
From the article:
Let&#8217;s say that we&#8217;ve slickly written our code to apply divide-and-conquer algorithms and concurrent data structures and parallel traversals and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=160&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Wow, DDJ just posted the previous one a few days ago, and already the next <strong>Effective Concurrency</strong> column is available: <a href="http://www.ddj.com/cpp/211800538"><strong>&#8220;Understanding Parallel Performance&#8221;</strong></a> just went live, and will also appear in the print magazine.</p>
<p>From the article:</p>
<blockquote><p>Let&#8217;s say that we&#8217;ve slickly written our code to apply divide-and-conquer algorithms and concurrent data structures and parallel traversals and all our other cool tricks that make our code wonderfully scalable in theory. Question: How do we know how well we&#8217;ve actually succeeded? Do we really know, or did we just try a couple of tests on a quad-core that looked reasonable and call it good? What key factors must we measure to understand our code&#8217;s performance, and answer not only whether our code scales, but quantify how well under different circumstances and workloads? What costs of concurrency do we have to take into account?
<p>This month, I&#8217;ll summarize some key issues we need to keep in mind to accurately analyze the real performance of our parallel code. I&#8217;ll list some basic considerations, and then some common costs. Next month, I have a treat in store: We&#8217;ll take some real code and apply these techniques to analyze its performance in detail as we successively apply a number of optimizations and measure how much each one actually buys us, under what conditions and in what directions, and why.</p>
</blockquote>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns (based on the magazine print issue dates):</p>
<blockquote><p>August 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a>
<p>September 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a>
<p>October 2007: <a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a>
<p>November 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a>
<p>December 2007: <a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a>
<p>January 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a>
<p>February 2008: <a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a>
<p>March 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a>
<p>April 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a>
<p>May 2008: <a href="http://ddj.com/architect/207100682">Interrupt Politely</a>
<p>June 2008: <a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a>
<p>July 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a>
<p>August 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a>
<p>September 2008: <a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a>
<p>October 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a>
<p>November 2008: <a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a>
<p>December 2008: <a href="http://www.ddj.com/cpp/211800538">Understanding Parallel Performance</a></p>
</blockquote>
Posted in Concurrency, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=160&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/11/02/effective-concurrency-understanding-parallel-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Writing a Generalized Concurrent Queue</title>
		<link>http://herbsutter.wordpress.com/2008/10/30/effective-concurrency-writing-a-generalized-concurrent-queue/</link>
		<comments>http://herbsutter.wordpress.com/2008/10/30/effective-concurrency-writing-a-generalized-concurrent-queue/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 14:18:03 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/10/30/effective-concurrency-writing-a-generalized-concurrent-queue/</guid>
		<description><![CDATA[The next Effective Concurrency column, “Writing a Generalized Concurrent Queue”, just went live on DDJ’s site, and also appears in the print magazine.
From the article:
Last month [1], I showed code for a lock-free queue that supported the limited case of exactly two threads—one producer, and one consumer. That&#8217;s useful, but maybe not as exciting now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=150&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The next <strong>Effective Concurrency</strong> column, <strong><a href="http://www.ddj.com/cpp/211601363">“Writing a Generalized Concurrent Queue”</a></strong>, just went live on DDJ’s site, and also appears in the print magazine.</p>
<p>From the article:</p>
<blockquote><p>Last month [1], I showed code for a lock-free queue that supported the limited case of exactly two threads—one producer, and one consumer. That&#8217;s useful, but maybe not as exciting now that our first rush of lock-free coding glee has worn off. This month, let&#8217;s tackle the general problem of supporting multiple producers and multiple consumers with as much concurrency as possible. The code in this article uses four main design techniques: &#8230;</p></blockquote>
<p>I hope you enjoy it. Finally, here are links to previous Effective Concurrency columns (based on the magazine print issue dates):</p>
<blockquote><p>August 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a></p>
<p>September 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a></p>
<p>October 2007: <a href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a></p>
<p>November 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a></p>
<p>December 2007: <a href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a></p>
<p>January 2007: <a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a></p>
<p>February 2008: <a href="http://www.ddj.com/cpp/205900309">Break Amdahl’s Law!</a></p>
<p>March 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a></p>
<p>April 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a></p>
<p>May 2008: <a href="http://ddj.com/architect/207100682">Interrupt Politely</a></p>
<p>June 2008: <a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a></p>
<p>July 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a></p>
<p>August 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a></p>
<p>September 2008: <a href="http://www.ddj.com/cpp/210600279">Lock-Free Code: A False Sense of Security</a></p>
<p>October 2008: <a href="http://www.ddj.com/hpc-high-performance-computing/210604448">Writing Lock-Free Code: A Corrected Queue</a></p>
<p>November 2008: <a href="http://www.ddj.com/cpp/211601363">Writing a Generalized Concurrent Queue</a></p></blockquote>
Posted in Concurrency, Software Development  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=150&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/10/30/effective-concurrency-writing-a-generalized-concurrent-queue/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>September 2008 ISO C++ Standards Meeting: The Draft Has Landed, and a New Convener</title>
		<link>http://herbsutter.wordpress.com/2008/10/28/september-2008-iso-c-standards-meeting-the-draft-has-landed-and-a-new-convener/</link>
		<comments>http://herbsutter.wordpress.com/2008/10/28/september-2008-iso-c-standards-meeting-the-draft-has-landed-and-a-new-convener/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 01:21:37 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/10/28/september-2008-iso-c-standards-meeting-the-draft-has-landed-and-a-new-convener/</guid>
		<description><![CDATA[The ISO C++ committee met in San Francisco, CA, on September 15-20. You can find the minutes here, including the votes to approve papers.
The most important thing the committee accomplished was this:
Complete C++0x draft published for international ballot
The biggest goal entering this meeting was to make C++0x feature-complete and stay on track to publish a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=149&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The ISO C++ committee met in San Francisco, CA, on September 15-20. You can find <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2784.html">the minutes here</a>, including the votes to approve papers.
<p>The most important thing the committee accomplished was this:<br />
<h3>Complete C++0x draft published for international ballot</h3>
<p>The biggest goal entering this meeting was to make C++0x feature-complete and stay on track to publish a complete public draft of C++0x for international review and comment — in ISO-speak, an official Committee Draft or CD. As I <a href="http://herbsutter.wordpress.com/2008/07/04/trip-report-june-2008-iso-c-standards-meeting/">predicted</a> in the summer, the committee achieved that at this meeting. Now the world will know the shape of C++0x in good detail. Here&#8217;s where to find it: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf"><strong>The September C++0x working draft document</strong></a> is essentially the same as the September 2008 CD.
<p>This is “it”, feature-complete C++0x, including the major feature of &#8220;concepts&#8221; which had <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2754.html">its</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2755.htm">own</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2758.pdf">extensive</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2759.pdf">set</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2768.pdf">of</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2770.pdf">papers</a> for <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2773.pdf">language</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2774.pdf">library</a> <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2776.pdf">extensions</a> &#8212; I&#8217;ll stop there, but there are still more concepts papers at the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/#mailing2008-10">mailing page</a> and some more still to come during the CD phase. (If you get the impression that concepts is a big feature, well, it is indeed easily the biggest addition we made in C++0x.)
<p>What&#8217;s next? As I&#8217;ve mentioned before, we’re planning to have two rounds of international comment review. The first of two opportunities for national bodies to give their comments is now underway; the second round will probably be this time next year. The only changes expected to be made between that CD and the final International Standard are bug fixes and clarifications. It’s helpful to think of a CD as a feature-complete beta, and we&#8217;re on track to ship one more beta before the full release.<br />
<h3>And a new convener</h3>
<p>On a personal note, I&#8217;m very happy to see this accomplished at the last meeting during my convenership. I&#8217;ve now served as secretary and then convener (chair) of the ISO C++ committee for over 10 years, and my second three-year term as convener ended one week after the San Francisco meeting. A decade is enough; I decided not to volunteer for another term as chair.
<p>As of a few weeks ago, <a href="http://www.plauger.com/"><strong>P. J. Plauger</strong></a> is the new convener of ISO/IEC JTC1/SC22/WG21 (C++). Many of you will know P.J. (or Bill, as he&#8217;s known within the committee) from his long service to the C and C++ communities, including that he has been a past convener of the ISO C standards committee, past editor of the C/C++ Users Journal, the principal author of the <a href="http://www.dinkumware.com">Dinkumware</a> implementation of the C++ standard library, and recipient of the <a href="http://www.ddj.com/architect/184405608">2004 Dr Dobb&#8217;s Journal Excellence in Programming Award</a>, among various other qualifications and honors. He has been a regular participant at ISO C++ meetings for about as long as they&#8217;ve been held, and his long experience with both the technology and the ISO standards world will serve WG21 well.
<p>I&#8217;m very happy to have been able to chair the committee during the development of C++0x. Now as we move from &#8220;develop mode&#8221; into &#8220;ship mode&#8221; it will be great to have his experienced hand guiding the committee through the final ISO process. Thanks for volunteering, Bill!</p>
Posted in C++  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=149&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/10/28/september-2008-iso-c-standards-meeting-the-draft-has-landed-and-a-new-convener/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Stroustrup &amp; Sutter on C++ 2008, Second Showing: October 30-31, 2008, in Boston, MA, USA</title>
		<link>http://herbsutter.wordpress.com/2008/10/01/stroustrup-sutter-on-c-2008-second-showing-october-30-31-2008-in-boston-ma-usa/</link>
		<comments>http://herbsutter.wordpress.com/2008/10/01/stroustrup-sutter-on-c-2008-second-showing-october-30-31-2008-in-boston-ma-usa/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 03:44:10 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Talks & Events]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/10/01/stroustrup-sutter-on-c-2008-second-showing-october-30-31-2008-in-boston-ma-usa/</guid>
		<description><![CDATA[ This spring at SD West in Santa Clara, Bjarne and I did a fresh-and-updated S&#38;S event with lots of new material.
We don&#8217;t usually repeat the same material, but this time there&#8217;s been such demand that we agreed to do a repeat&#8230; four weeks from today, in Boston. More information and talk descriptions follow.
CONTENT ADVISORY
Again, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=143&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://herbsutter.files.wordpress.com/2008/10/bjarne-and-herb-for-ss.jpg"><img style="border-width:0;" height="151" alt="Bjarne and Herb for S&amp;S" src="http://herbsutter.files.wordpress.com/2008/10/bjarne-and-herb-for-ss-thumb.jpg?w=235&#038;h=151" width="235" align="right" border="0"></a> This spring at SD West in Santa Clara, <a href="http://herbsutter.wordpress.com/2008/01/22/stroustrup-sutter-on-c-march-3-4-2008-in-santa-clara-ca-usa/">Bjarne and I did</a> a fresh-and-updated S&amp;S event with lots of new material.</p>
<p>We don&#8217;t usually repeat the same material, but this time there&#8217;s been such demand that we agreed to do a repeat&#8230; four weeks from today, in Boston. More information and talk descriptions follow.</p>
<h3>CONTENT ADVISORY</h3>
<p>Again, usually our S&amp;S events feature mostly new material, but <strong>this one is almost identical to the material we did in spring 2008 in Santa Clara.</strong> Bjarne is substituting one talk, and will present &#8220;C++ in Safety-Critical Systems&#8221; instead of his talk on C++&#8217;s design and evolution; and we&#8217;ll both be updating to the material to reflect the current state of the draft ISO C++0x standard. But otherwise it&#8217;ll be identical.</p>
<p>So:</p>
<ul>
<li>If you missed our event this spring, here&#8217;s your second chance! It was our highest-rated S&amp;S ever, and in the post-conference survey we asked the question &#8220;Would you recommend this course to a colleague?&#8221; and 100% said yes.
<li>If you already attended this spring and came to all our sessions, you&#8217;ve seen nearly all this material already, but feel free to encourage a friend or colleague to attend who you think would benefit from the material.</li>
</ul>
<h3>The Talks</h3>
<blockquote><p><strong>Wednesday, October 29, 2008 </strong></p>
<p>C++0x Overview (Bjarne Stroustrup)</p>
<p>Safe Locking: Best Practices to Eliminate Race Conditions (Herb Sutter)</p>
<p>How to Design Good Interfaces (Bjarne Stroustrup)</p>
<p>Lock-Free Programming in C++—or How to Juggle Razor Blades (Herb Sutter)</p>
<p>Grill the Experts: Ask Us Anything! (Bjarne Stroustrup &amp; Herb Sutter)</p>
<p><strong>Thursday, October 30, 2008</strong></p>
<p>["Best of Stroustrup &amp; Sutter"] Update of talk voted “Most Informative” at S&amp;S 2007: Concepts and Generic Programming in C++0x (Bjarne Stroustrup)</p>
<p>What Not to Code: Avoiding Bad Design Choices and Worse Implementations (Herb Sutter)</p>
<p>C++ in Safety-Critical Systems (Bjarne Stroustrup)</p>
<p>How to Migrate C++ Code to the Manycore &#8220;Free Lunch&#8221; (Herb Sutter)</p>
<p>Discussion on Questions Raised During the Seminar (Herb Sutter &amp; Bjarne Stroustrup)</p>
</blockquote>
<h3>Registration</h3>
<p>This two-day seminar is getting billing on two different conferences that are running at the same time in the Hynes Convention Center: <em><a href="http://sdbestpractices.com/index.php?option=com_content&amp;task=view&amp;id=23&amp;Itemid=92">SD Best Practices</a></em> and the <em><a href="http://www.cmp-egevents.com/web/escb/supersession">Embedded Systems Conference</a></em>. S&amp;S is technically part of both conferences, which means you can attend S&amp;S via either one&#8230; either</p>
<ul>
<li><a href="http://sdbestpractices.com/index.php?option=com_content&amp;task=view&amp;id=43&amp;Itemid=112"><strong>register via SDBP</strong></a>, or
<li><a href="http://techinsightsevents.com/web/escb/registration"><strong>register via ESC</strong></a> </li>
</ul>
<p>and both ways will include options that include our two-day seminar.</p>
<p>I look forward to seeing many of you in Boston! Best wishes,
<p>Herb  </p>
Posted in C++, Software Development, Talks &amp; Events  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=143&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/10/01/stroustrup-sutter-on-c-2008-second-showing-october-30-31-2008-in-boston-ma-usa/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2008/10/bjarne-and-herb-for-ss-thumb.jpg" medium="image">
			<media:title type="html">Bjarne and Herb for S&#38;S</media:title>
		</media:content>
	</item>
		<item>
		<title>Data and Perspective</title>
		<link>http://herbsutter.wordpress.com/2008/09/30/data-and-perspective/</link>
		<comments>http://herbsutter.wordpress.com/2008/09/30/data-and-perspective/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 18:25:34 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Opinion & Editorial]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/09/30/data-and-perspective/</guid>
		<description><![CDATA[Even genuinely newsworthy topics can get distorted when commentators exaggerate or use data selectively. Here are two recent examples I noticed.
&#8220;This is the worst financial crisis since the Great Depression.&#8221; It&#8217;s true that it&#8217;s bad and even historic, and this sound bite correctly doesn&#8217;t actually claim it&#8217;s as bad as the Depression. I hope it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=137&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Even genuinely newsworthy topics can get distorted when commentators exaggerate or use data selectively. Here are two recent examples I noticed.</p>
<p><strong>&#8220;This is the worst financial crisis since the Great Depression.&#8221;</strong> It&#8217;s true that it&#8217;s bad and even historic, and this sound bite correctly doesn&#8217;t actually claim it&#8217;s as bad as the Depression. I hope it doesn&#8217;t turn out to be in the same league as that; then, people were lining up at soup kitchens. For now, however, Apple is still on track to sell 10 million iPhone 3Gs this year, which says something.</p>
<p><strong>&#8220;Yesterday [Monday, September 29, 2008] saw the worst single-day plunge in Dow Jones history.&#8221; &#8220;It&#8217;s a new Black Monday.&#8221; </strong>Well, these got my attention, because I remember <a href="http://en.wikipedia.org/wiki/Black_Monday_(1987)">Black Monday on October 19, 1987</a> very well. I was working in IT at a major bank, doing software application support for traders and related departments. When I went up to the trading floor that day, I immediately knew something was badly wrong because of the eerie sound as the elevator doors opened &#8212; a sound you never hear during trading hours, and certainly not from a room full of traders standing at their desks: silence.</p>
<p>Yesterday&#8217;s loss of 777 points was stunning as the largest single-day point loss in Dow history. But as a <em>percentage</em> loss that&#8217;s not even in the top 10 Bad Dow Days, all but two of which occurred before 1935. Those two since the Depression occurred on October 19 and 26, 1987, when the Dow lost <strong>22.6%</strong> and then another <strong>8% </strong>of its total value in single sessions, respectively #2 and #9 on All-Time Bad Dow Days list. For perspective, as of this writing the Dow is down 19.8% so far this entire year, and it surely hasn&#8217;t been a good year. Today&#8217;s crisis is already historic and could well get worse yet, of course, but some of us do remember some pretty bad ones in the past.</p>
<p>As good old Sam Clemens said (approximately), there are lies, darned lies, and statistics. Even when the statistics are true, always cross-check them for perspective. Even the best news and the worst news can be overstated, and viewing the same data from multiple angles helps ensure we understand it properly.</p>
<p>&nbsp;</p>
<p>[Edited 9/30 to add: At 22.6%, Black Monday in 1987 was actually the worst Dow Day ever if you don't count "reopening days" after unusual market closures when the markets catch up with events that happened while they were closed. So when was the all-time worst Dow Day ever? Perhaps surprisingly, the answer is not in 1929, though several of the all-time top 10 were in that year. Rather, it was December 12, 1914, when the Dow dropped 24.4% after the markets reopened after being closed entirely for over four months due to the outbreak of World War I. (The markets closed on July 30, two days after Austria-Hungary declared war and a day before Germany did.) That helps put in perspective just how bad October 1987 was, and of course that today's crisis is also pretty bad even if it hasn't beaten those prior records, yet.]</p>
Posted in Opinion &amp; Editorial  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=137&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/09/30/data-and-perspective/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Ralph Johnson on Parallel Programming Patterns</title>
		<link>http://herbsutter.wordpress.com/2008/09/25/ralph-johnson-on-parallel-programming-patterns/</link>
		<comments>http://herbsutter.wordpress.com/2008/09/25/ralph-johnson-on-parallel-programming-patterns/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 02:49:06 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/09/25/ralph-johnson-on-parallel-programming-patterns/</guid>
		<description><![CDATA[A few days ago at UIUC, Ralph Johnson gave a very nice talk on &#8220;Parallel Programming Patterns.&#8221; It&#8217;s now online, and here&#8217;s the abstract:
Parallel programming is hard. One proposed solution is to provide a standard set of patterns. Learning the patterns would help people to become expert parallel programmers. The patterns would provide a vocabulary [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=136&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A few days ago at UIUC, <a href="http://st-www.cs.uiuc.edu/users/johnson/">Ralph Johnson</a> gave a very nice talk on &#8220;Parallel Programming Patterns.&#8221; It&#8217;s <a href="http://media.cs.uiuc.edu/Apresos/seminars/UPCRC/2008-09-19/UPCRC__2008-09-19_02-58-PM_files/flash_index.htm">now online</a>, and here&#8217;s the abstract:</p>
<blockquote><p>Parallel programming is hard. One proposed solution is to provide a standard set of patterns. Learning the patterns would help people to become expert parallel programmers. The patterns would provide a vocabulary that would let programmers think about their programs at a higher level than the programming language. The patterns could steer programmers away from common errors and towards good design principles.
<p>There have been a number of papers about parallel patterns, and one book <em>Patterns for Parallel Programming</em>. None of them have become popular. I think the problem is that parallel programming is diverse and requires more design expertise than traditional software design. Thus, parallel programming experts use more patterns than parallel programming expert. I&#8217;ll critique the existing patterns and explain what I think should be done to make a set of patterns that can be as effective for parallel programming as patterns have been for object-oriented design. </p>
</blockquote>
<p>If Johnson&#8217;s name sounds familiar, it should: He&#8217;s one of the &#8220;Gang of Four&#8221; authors of the seminal book <em><a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612">Design Patterns</a>.</em></p>
<p>Recommended viewing.</p>
Posted in Concurrency  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/136/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/136/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/136/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=136&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/09/25/ralph-johnson-on-parallel-programming-patterns/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency Course: Sep 22-24, 2008</title>
		<link>http://herbsutter.wordpress.com/2008/09/01/effective-concurrency-course-sep-22-24-2008/</link>
		<comments>http://herbsutter.wordpress.com/2008/09/01/effective-concurrency-course-sep-22-24-2008/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 04:34:42 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/09/01/effective-concurrency-course-sep-22-24-2008/</guid>
		<description><![CDATA[The first offering of the three-day Effective Concurrency course in May went very well. We&#8217;re doing it again later this month &#8212; this will be the last offering this year.
Here&#8217;s the brief information (more details below):
3-Day Seminar: Effective Concurrency
September 22-4, 2008Bellevue, WA, USADeveloped and taught by Herb Sutter
This course covers the fundamental tools that software [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=135&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The first offering of the three-day <em>Effective Concurrency</em> course in May went very well. <a href="http://construx.com/Page.aspx?nid=84&amp;id=108">We&#8217;re doing it again later this month</a> &#8212; this will be the last offering this year.</p>
<p>Here&#8217;s the brief information (more details below):</p>
<blockquote><h3><strong><font color="#000080"><a href="http://construx.com/Page.aspx?nid=84&amp;id=108">3-Day Seminar: Effective Concurrency</a></font></strong></h3>
<h4><font color="#000080">September 22-4, 2008<br />Bellevue, WA, USA<br />Developed and taught by Herb Sutter</font></h4>
<p><font color="#000080">This course covers the fundamental tools that software developers need to write effective concurrent software for both single-core and multi-core/many-core machines. To use concurrency effectively, we must identify and solve four key challenges: </font>
<ul>
<li><font color="#000080">Leverage the ability to perform and manage work asynchronously </font>
<li><font color="#000080">Build applications that naturally run faster on new hardware having more and more cores </font>
<li><font color="#000080">Manage shared objects in memory effectively to avoid races and deadlocks</font>
<li><font color="#000080">Engineer specifically for high performance</font></li>
</ul>
<p><font color="#000080">This seminar will equip attendees to reason correctly about concurrency requirements and tradeoffs, to migrate existing code bases to be concurrency-enabled, and to achieve key success factors for a concurrent programming project. Most code examples in the course can be directly translated to popular platforms and concurrency libraries, including Linux, Windows, Java, .NET, pthreads, and the forthcoming ISO C++0x standard.</font> </p>
</blockquote>
<p>Here&#8217;s a summary of what we&#8217;ll cover during the three days:</p>
<blockquote><p><font color="#000080">Fundamentals </font>
<ul>
<li><font color="#000080">Define basic concurrency goals and requirements </font>
<li><font color="#000080">Understand applications&#8217; scalability needs </font>
<li><font color="#000080">Key concurrency patterns </font></li>
</ul>
<p><font color="#000080">Isolation: Keep Work Separate </font>
<ul>
<li><font color="#000080">Running tasks in isolation and communicate via async messages </font>
<li><font color="#000080">Integrating multiple messaging systems, including GUIs and sockets </font>
<li><font color="#000080">Building responsive applications using background workers </font>
<li><font color="#000080">Threads vs. thread pools </font></li>
</ul>
<p><font color="#000080">Scalability: Re-enable the Free Lunch </font>
<ul>
<li><font color="#000080">When and how to use more cores&nbsp; </font>
<li><font color="#000080">Exploiting parallelism in algorithms&nbsp; </font>
<li><font color="#000080">Exploiting parallelism in data structures&nbsp; </font>
<li><font color="#000080">Breaking the scalability barrier </font></li>
</ul>
<p><font color="#000080">Consistency: Don’t Corrupt Shared State </font>
<ul>
<li><font color="#000080">The many pitfalls of locks&#8211;deadlock, convoys, etc. </font>
<li><font color="#000080">Locking best practices </font>
<li><font color="#000080">Reducing the need for locking shared data </font>
<li><font color="#000080">Safe lock-free coding patterns </font>
<li><font color="#000080">Avoiding the pitfalls of general lock-free coding </font>
<li><font color="#000080">Races and race-related effects </font></li>
</ul>
<p><font color="#000080">Migrating Existing Code Bases to Use Concurrency </font>
<p><font color="#000080">Near-Future Tools and Features </font>
<p><font color="#000080">High Performance Concurrency </font>
<ul>
<li><font color="#000080">Machine architecture and concurrency </font>
<li><font color="#000080">Costs of fundamental operations, including locks, context switches, and system calls </font>
<li><font color="#000080">Memory and cache effects </font>
<li><font color="#000080">Data structures that support and undermine concurrency </font>
<li><font color="#000080">Enabling linear and superlinear scaling </font></li>
</ul>
</blockquote>
<p>I hope to get to meet some of you in the Seattle area!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/135/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/135/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=135&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/09/01/effective-concurrency-course-sep-22-24-2008/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Anon on Data</title>
		<link>http://herbsutter.wordpress.com/2008/08/08/anon-on-data/</link>
		<comments>http://herbsutter.wordpress.com/2008/08/08/anon-on-data/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 14:03:01 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/08/08/anon-on-data/</guid>
		<description><![CDATA[The adage, quoted again this week by Bruce Schneier:
The plural of &#8220;anecdote&#8221; is not &#8220;data.&#8221;

But lest we enshrine raw data as holy in itself, another perspective:
And the plural of &#8220;datum&#8221; is not &#8220;proof.&#8221;

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=130&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The adage, <a href="http://www.schneier.com/blog/archives/2008/08/random_killing.html">quoted again this week</a> by Bruce Schneier:</p>
<blockquote><p>The plural of &#8220;anecdote&#8221; is not &#8220;data.&#8221;</p>
</blockquote>
<p>But lest we enshrine raw data as holy in itself, <a href="http://everything2.com/index.pl?node_id=163824">another perspective</a>:</p>
<blockquote><p>And the plural of &#8220;datum&#8221; is not &#8220;proof.&#8221;</p>
</blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/130/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/130/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/130/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=130&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/08/08/anon-on-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Embedded Multicore Development Webinar with Lee, Reinders, and Truchard</title>
		<link>http://herbsutter.wordpress.com/2008/08/06/embedded-multicore-development-webinar-with-lee-reinders-and-truchard/</link>
		<comments>http://herbsutter.wordpress.com/2008/08/06/embedded-multicore-development-webinar-with-lee-reinders-and-truchard/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 19:05:47 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Talks & Events]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/08/06/embedded-multicore-development-webinar-with-lee-reinders-and-truchard/</guid>
		<description><![CDATA[Last month, I was privileged to be part of a panel in a webinar on Embedded Multicore Development moderated by Richard Nass, Editor-in-Chief of Embedded Systems Design, Embedded.com, and the Embedded Systems Conferences. It&#8217;s online and available on demand.
I say &#8220;privileged&#8221; especially because of the stature of the other panelists. These distinguished gentlemen were:

Edward A. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=134&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last month, I was privileged to be part of a panel in a <a href="http://www.techonline.com/learning/webinar/208400266">webinar on Embedded Multicore Development</a> moderated by Richard Nass, Editor-in-Chief of <em>Embedded Systems Design</em>, Embedded.com, and the Embedded Systems Conferences. It&#8217;s online and available on demand.</p>
<p>I say &#8220;privileged&#8221; especially because of the stature of the other panelists. These distinguished gentlemen were:</p>
<ul>
<li><a href="http://ptolemy.eecs.berkeley.edu/~eal/"><strong>Edward A. Lee</strong></a>, Professor and Chair of the EE&amp;CS department at U.C. Berkeley, and known among other things for <a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf">&#8220;The Problem with Threads&#8221;</a>.</li>
<li><a href="http://dobbscodetalk.com/index.php?option=com_myblog&amp;blogger=JReinders&amp;Itemid=29"><strong>James Reinders</strong></a>, the chief concurrency evangelist at Intel and author of the <a href="http://www.amazon.com/Intel-Threading-Building-Blocks-Parallelism/dp/0596514808"><em>Threading Building Blocks</em> book</a>.</li>
<li><a href="http://www.utexas.edu/ogs/alumni/laurels/truchard.html"><strong>James Truchard</strong></a>, the co-founder, President and CEO of National Instruments.</li>
</ul>
<p>It was a fun discussion, and I hope informative.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/134/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/134/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=134&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/08/06/embedded-multicore-development-webinar-with-lee-reinders-and-truchard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Lock-Free Code &#8212; A False Sense of Security</title>
		<link>http://herbsutter.wordpress.com/2008/08/05/effective-concurrency-lock-free-code-a-false-sense-of-security/</link>
		<comments>http://herbsutter.wordpress.com/2008/08/05/effective-concurrency-lock-free-code-a-false-sense-of-security/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 00:31:41 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C# / .NET]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/08/05/effective-concurrency-lock-free-code-a-false-sense-of-security/</guid>
		<description><![CDATA[DDJ posted the next Effective Concurrency column a couple of weeks earlier than usual. You can find it here: &#8220;Lock-Free Code: A False Sense of Security&#8221;, just went live on DDJ&#8217;s site, and also appears in the print magazine.
 
This is a special column in a way, because I rarely critique someone else&#8217;s published code. However, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=131&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>DDJ posted the next <strong>Effective Concurrency</strong> column a couple of weeks earlier than usual. You can find it here: <a href="http://www.ddj.com/cpp/210600279"><strong>&#8220;Lock-Free Code: A False Sense of Security&#8221;</strong></a>, just went live on DDJ&#8217;s site, and also appears in the print magazine.</div>
<div> </div>
<div>This is a special column in a way, because I rarely critique someone else&#8217;s published code. However, mere weeks ago DDJ itself published <a href="http://www.ddj.com/208801974">an article with fundamentally broken code</a> that tried to show how to write a simplified lock-free queue. I corresponded with the author, Petru Marginean, and his main reviewer, Andrei Alexandrescu, to discuss the problems, and they have patched the code somewhat and added a disclaimer to the article. But the issues need to be addressed, and so Petru kindly let me vivisect his code in public in this column (and the next, not yet available, which will show how to do it right).</div>
<div> </div>
<div>From the article:</div>
<blockquote><p>[Lock-free code is] hard even for experts. It&#8217;s easy to write lock-free code that appears to work, but it&#8217;s very difficult to write lock-free code that is correct and performs well. Even good magazines and refereed journals have published a substantial amount of lock-free code that was actually broken in subtle ways and needed correction.</p>
<p>To illustrate, let&#8217;s dissect some peer-reviewed lock-free code that was published here in <em>DDJ</em> just two months ago &#8230;</p></blockquote>
<div>I hope you enjoy it. (Note: Yes, the title is a riff on Tom Cargill&#8217;s classic article <a href="http://www.informit.com/content/images/020163371x/supplements/Exception_Handling_Article.html">&#8220;Exception Handling: A False Sense of Security&#8221;</a>, one of Scott Meyers&#8217; five <a href="http://www.artima.com/cppsource/top_cpp_publications.html">&#8220;Most Important C++ Non-Book Publications&#8230;Ever&#8221;</a>.)</div>
<div> </div>
<div>Finally, here are links to previous Effective Concurrency columns (based on the magazine print issue dates):</div>
<table border="0" cellspacing="5" cellpadding="5" width="555">
<tbody>
<tr>
<td width="114" valign="top">August 2007</td>
<td width="422" valign="top"><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a></td>
</tr>
<tr>
<td width="114" valign="top">September 2007</td>
<td width="422" valign="top"><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a></td>
</tr>
<tr>
<td width="114" valign="top">October 2007</td>
<td width="422" valign="top"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a></td>
</tr>
<tr>
<td width="114" valign="top">November 2007</td>
<td width="422" valign="top"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a></td>
</tr>
<tr>
<td width="114" valign="top">December 2007</td>
<td width="422" valign="top"><a href="http://herbsutter.spaces.live.com/blog/cns!2D4327CC297151BB!342.entry"></a><a title="Avoid Calling Unknown Code While Inside a Critical Section" href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a></td>
</tr>
<tr>
<td width="114" valign="top">January 2007</td>
<td width="422" valign="top"><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a></td>
</tr>
<tr>
<td width="114" valign="top">February 2008</td>
<td width="422" valign="top"><a href="http://www.ddj.com/cpp/205900309">Break Amdahl&#8217;s Law!</a></td>
</tr>
<tr>
<td width="114" valign="top">March 2008</td>
<td width="422" valign="top"><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a></td>
</tr>
<tr>
<td width="114" valign="top">April 2008</td>
<td width="422" valign="top"><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a></td>
</tr>
<tr>
<td width="114" valign="top">May 2008</td>
<td width="422" valign="top"><a href="http://ddj.com/architect/207100682">Interrupt Politely</a></td>
</tr>
<tr>
<td width="114" valign="top">June 2008</td>
<td width="422" valign="top"><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a></td>
</tr>
<tr>
<td width="114" valign="top">July 2008</td>
<td width="422" valign="top"><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a></td>
</tr>
<tr>
<td width="114" valign="top">August 2008</td>
<td width="422" valign="top"><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a></td>
</tr>
<tr>
<td width="114" valign="top">September 2008</td>
<td width="422" valign="top"><a href="http://www.ddj.com/cpp/210600279">&#8220;Lock-Free Code: A False Sense of Security&#8221;</a></td>
</tr>
</tbody>
</table>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/131/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/131/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=131&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/08/05/effective-concurrency-lock-free-code-a-false-sense-of-security/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Server Concurrency != Client Concurrency</title>
		<link>http://herbsutter.wordpress.com/2008/08/01/server-concurrency-client-concurrency/</link>
		<comments>http://herbsutter.wordpress.com/2008/08/01/server-concurrency-client-concurrency/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 21:59:16 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/08/01/server-concurrency-client-concurrency/</guid>
		<description><![CDATA[Today I received an email that asked:

I have recently come across your excellent articles on concurrency and the changes in software writing paradigm. They make a lot of sense, but I am having trouble translating them to my world of Telecom oriented web services, where practically everything is run through a DBMS. It seems to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=118&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I received an email that asked:<br />
<blockquote>
<p>I have recently come across your excellent articles on concurrency and the changes in software writing paradigm. They make a lot of sense, but I am having trouble translating them to my world of Telecom oriented web services, where practically everything is run through a DBMS. It seems to me we get everything “free”, simply by using an inherently concurrent multi-everything beast such as that :-) .
<p>Could you please share your thoughts on the issue in one of your coming blog entries? It seems to me nowadays most complex systems would take advantage of a DBMS, certainly any application that is internet based, telecom oriented, or enterprise level. Be it in C++, Java, or PHP and its ilk, using a DBMS &#8211; often as a sort of message queue – is one of the best practices that ensures parallelism. </p>
</blockquote>
<p><a href="http://herbsutter.files.wordpress.com/2008/08/image1.png"><img style="border-width:0;" height="180" alt="image" src="http://herbsutter.files.wordpress.com/2008/08/image-thumb1.png?w=240&#038;h=180" width="240" align="right" border="0"></a>Sure. At right is a slide I give in talks that summarizes the answer to this question, and I&#8217;ve addressed this and other similar issues in an <a href="http://acmqueue.com/modules.php?name=Content&amp;pa=showpage&amp;pid=332">ACM Queue article</a>.</p>
<p>The problem with taking advantage of multicore/manycore hardware isn’t (as much) on the server, it&#8217;s on the client. When experienced people say things like, &#8220;but the concurrency problem is already solved, we&#8217;ve been building scalable software for years,&#8221; that&#8217;s server or niche-client application people talking. That kind of laid-back sound bite sure isn&#8217;t coming from mainstream client application developers.</p>
<h3>Typical Server Workloads</h3>
<p>On the server:
<ul>
<li>Workloads typically already have <strong>lots of inherent concurrency</strong> (000s or 000,000s of incoming requests for web/dbms/etc. operations), and it&#8217;s easy to launch independent requests concurrently.
<li>Shared data is typically inside <strong>highly structured relational databases</strong> where we have decades of experience with <strong>automatic concurrency control</strong>. The DBMS itself knows how to optimistically run transactions in parallel and control conflicts by escalating row locks to page locks, index locks to table locks, and so on.
<li>The programming model is typically <strong>transactions</strong>, and all the programmer has to know about is to write &#8220;begin transaction; /* &#8230; read/write whatever stuff you feel the need to, then &#8230; */ end transaction;&#8221; which is about as sweet as it gets.</li>
</ul>
<p>We already know how to build somewhat scalable server apps. Sure, it’s still rocket science and takes expert knowledge to do well. But we generally know the rocket science, have experts who can implement it with repeatable success, and have regularly scheduled missions to the “scalable servers” space station. With some care, we can say that the &#8220;concurrency problem is already solved&#8221; here.</p>
<h3>Typical Client Workloads</h3>
<p>The world is very different for typical mainstream client applications (i.e., I&#8217;m not talking about Photoshop and a handful of others), where:
<ul>
<li>Workloads don’t have lots of inherent concurrency. The user clicks one button, and <strong>we have to figure out how to divide the work and recombine it</strong> in order to get the answer faster on many cores.
<li>Shared data is typically in <strong>unstructured pointer-chasing graphs of objects in shared memory</strong> that require <strong>explicit concurrency control</strong>. Note that &#8220;unstructured&#8221; doesn&#8217;t mean there&#8217;s no structure &#8212; of course there&#8217;s some &#8212; but it&#8217;s a gloriously diverse pile of objects and containers, and more like an organically growing shantytown with unplanned twisty little alleys and passages, than the nice rectangular downtown city street plan of a nice rectangular database table.
<li>The programming model to protect shared data is to use error-prone <strong>explicit locks</strong>. You have to remember which locks protect which data, and not to acquire them in inconsistent and deadlock-prone orders.</li>
</ul>
<p>We’re still discovering and productizing the rocket science here. You could say that the tools like OpenMP that we do have now are still at the <a href="http://en.wikipedia.org/wiki/V2_rocket">V-2</a> stage &#8212; they have limited applicability, are somewhat fussy, and don’t always land where you aim them.</p>
<p>But we&#8217;re working on it. Up-and-coming tools like <a href="http://www.threadingbuildingblocks.org/">Threading Building Blocks</a> are like the <a href="http://www-pao.ksc.nasa.gov/history/mercury/mercury.htm">Mercury</a> and <a href="http://en.wikipedia.org/wiki/Venera_program">Venera</a> missions, setting out to reach successively higher goals and repeatability&#8230; and we&#8217;re starting to see what are perhaps <a href="http://www.nasa.gov/mission_pages/apollo/index.html">Apollo</a>- and <a href="http://www.nasa.gov/mission_pages/station/main/">ISS</a>-class missions in the form of <a href="http://msdn.microsoft.com/en-us/magazine/cc163329.aspx">PLINQ</a>, the <a href="http://msdn.microsoft.com/en-us/magazine/cc163340.aspx">Task Parallel Library</a>, and one for native C++ we&#8217;ll be announcing in October at PDC. In part, these tools are trying to see how much we can make client workloads look more like server workloads, notably in providing a transaction-oriented programming model. For example, transactional memory is an area of active research that would let us write &#8220;begin transaction; /* &#8230; read/write whatever memory variables you feel the need to, then &#8230; */ end transaction;&#8221;, and if successful it could eventually replace many or even most existing uses of locks.
<p>We have rightly celebrated some successful &#8216;manned&#8217; flights with client products like Photoshop (parallel rendering) and Excel (parallel recalc) that scale to a number of cores. We’re on the road to, but still working toward, establishing the infrastructure and technology base to enable regularly scheduled commercial flights/shipments of scalable client applications that &#8220;light up&#8221; on multicore/manycore machines.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/118/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/118/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/118/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/118/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/118/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=118&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/08/01/server-concurrency-client-concurrency/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2008/08/image-thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: The Many Faces of Deadlock</title>
		<link>http://herbsutter.wordpress.com/2008/07/31/effective-concurrency-the-many-faces-of-deadlock/</link>
		<comments>http://herbsutter.wordpress.com/2008/07/31/effective-concurrency-the-many-faces-of-deadlock/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 16:37:51 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/07/31/effective-concurrency-the-many-faces-of-deadlock/</guid>
		<description><![CDATA[The latest Effective Concurrency column, &#8220;The Many Faces of Deadlock&#8221;, just went live on DDJ&#8217;s site, and also appears in the print magazine. From the article:
&#8230; That&#8217;s the classic deadlock example from college. Of course, two isn&#8217;t a magic number. An improved definition of deadlock is: &#8220;When N threads enter a locking cycle where each [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=115&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>The latest <strong>Effective Concurrency</strong> column, <a href="http://www.ddj.com/hpc-high-performance-computing/209900973"><strong>&#8220;The Many Faces of Deadlock&#8221;</strong></a>, just went live on DDJ&#8217;s site, and also appears in the print magazine. From the article:</div>
<blockquote><p>&#8230; That&#8217;s the classic deadlock example from college. Of course, two isn&#8217;t a magic number. An improved definition of deadlock is: &#8220;When <i>N</i> threads enter a locking cycle where each tries to take a lock the next already holds.&#8221;<br />
<h5>&#8220;But wait,&#8221; someone might say. &#8220;I once had a deadlock just like the code you just showed, but it didn&#8217;t involve locks at all—it involved messages.&#8221; &#8230;</h5>
</blockquote>
<div>I hope you enjoy it.</div>
<div>&nbsp;</div>
<div>Finally, here are links to previous Effective Concurrency columns (based on the magazine print issue dates):</div>
<table cellspacing="5" cellpadding="5" width="555" border="0">
<tbody>
<tr>
<td valign="top" width="114">August 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a></td>
</tr>
<tr>
<td valign="top" width="114">September 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a></td>
</tr>
<tr>
<td valign="top" width="114">October 2007</td>
<td valign="top" width="422"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a></td>
</tr>
<tr>
<td valign="top" width="114">November 2007</td>
<td valign="top" width="422"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a></td>
</tr>
<tr>
<td valign="top" width="114">December 2007</td>
<td valign="top" width="422"><a href="http://herbsutter.spaces.live.com/blog/cns!2D4327CC297151BB!342.entry"><a title="Avoid Calling Unknown Code While Inside a Critical Section" href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a></a></td>
</tr>
<tr>
<td valign="top" width="114">January 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a></td>
</tr>
<tr>
<td valign="top" width="114">February 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/cpp/205900309">Break Amdahl&#8217;s Law!</a></td>
</tr>
<tr>
<td valign="top" width="114">March 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a></td>
</tr>
<tr>
<td valign="top" width="114">April 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a></td>
</tr>
<tr>
<td valign="top" width="114">May 2008</td>
<td valign="top" width="422"><a href="http://ddj.com/architect/207100682">Interrupt Politely</a></td>
</tr>
<tr>
<td valign="top" width="114">June 2008</td>
<td valign="top" width="422"><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a></td>
</tr>
<tr>
<td valign="top" width="114">July 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a></td>
</tr>
<tr>
<td valign="top" width="114">August 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/209900973">The Many Faces of Deadlock</a></td>
</tr>
</tbody>
</table>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/115/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/115/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=115&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/07/31/effective-concurrency-the-many-faces-of-deadlock/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Constructor Exceptions in C++, C#, and Java</title>
		<link>http://herbsutter.wordpress.com/2008/07/25/constructor-exceptions-in-c-c-and-java/</link>
		<comments>http://herbsutter.wordpress.com/2008/07/25/constructor-exceptions-in-c-c-and-java/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 19:43:04 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C# / .NET]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/07/25/constructor-exceptions-in-c-c-and-java/</guid>
		<description><![CDATA[I just received the following question, whose answer is the same in C++, C#, and Java.
Question: In the following code, why isn&#8217;t the destructor/disposer ever called to clean up the Widget when the constructor emits an exception? You can entertain this question in your mainstream language of choice:



// C++ (an edited version of the original [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=110&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just received the following question, whose answer is the same in C++, C#, and Java.</p>
<p>Question: In the following code, why isn&#8217;t the destructor/disposer ever called to clean up the Widget when the constructor emits an exception? You can entertain this question in your mainstream language of choice:</p>
<table border="0" cellspacing="1" cellpadding="15" width="400">
<tbody>
<tr>
<td width="400" valign="top">// C++ (an edited version of the original code<br />
// that the reader emailed me)<br />
class Gadget {<br />
   Widget* w;</p>
<p>public:<br />
   Gadget() {<br />
     w = new Widget();<br />
     throw new exception();<br />
     // &#8230; or some API call might throw<br />
   };</p>
<p>   <strong>~Gadget()</strong> {<br />
<strong>      if( w != nullptr ) delete w;<br />
</strong>   }<br />
};</td>
</tr>
<tr>
<td width="400" valign="top">// C# (equivalent)<br />
class Gadget <strong>: IDisposable</strong> {<br />
   private Widget w;</p>
<p>   public Gadget() {<br />
     w = new Widget();<br />
     throw new Exception();<br />
     // &#8230; or some API call might throw<br />
   };</p>
<p><strong>   public void Dispose()</strong> {<br />
     // &#8230; eliding other mechanics, eventually calls:<br />
<strong>     if( w != null ) w.Dispose();<br />
     // or just &#8220;w = null;&#8221; if Widget isn&#8217;t IDisposable<br />
</strong>   }<br />
};</td>
</tr>
<tr>
<td width="400" valign="top">// Java (equivalent)<br />
class Gadget {<br />
   private Widget w;</p>
<p>   public Gadget() {<br />
     w = new Widget();<br />
     throw new Exception();<br />
     // &#8230; or some API call might throw<br />
   };</p>
<p><strong>   public void dispose()</strong> {<br />
<strong>     if( w != null ) w.dispose();<br />
     // or just &#8220;w = null;&#8221; if Widget isn&#8217;t disposable</strong><br />
   }<br />
};</td>
</tr>
</tbody>
</table>
<p>Interestingly, we can answer this even without knowing the calling code&#8230; but there is typical calling code that is similar in all three languages that reinforces the answer.</p>
<h3>Construction and Lifetime</h3>
<p>The fundamental principles behind the answer is the same in C++, C#, and Java:</p>
<ol>
<li>A constructor conceptually turns a suitably sized chunk of raw memory into an object that obeys its invariants. <strong>An object&#8217;s lifetime doesn&#8217;t begin until its constructor completes successfully. </strong>If a constructor ends by throwing an exception, that means it never finished creating the object and setting up its invariants &#8212; and at the point the exceptional constructor exits, the object not only doesn&#8217;t exist, but never existed.</li>
<li>A destructor/disposer conceptually turns an object back into raw memory. Therefore, just like all other nonprivate methods, destructors/disposers assume as a precondition that &#8220;this&#8221; object is actually a valid object and that its invariants hold. Hence, <strong>destructors/disposers only run on successfully constructed objects.</strong></li>
</ol>
<p>I&#8217;ve covered some of these concepts and consequences before in <a href="http://www.gotw.ca/gotw/066.htm">GotW #66, &#8220;Constructor Failures,&#8221;</a> which appeared in updated and expanded form as Items 17 and 18 of <em><a href="http://www.amazon.com/exec/obidos/ASIN/020170434X/gotwca-20">More Exceptional C++</a></em>.</p>
<p>In particular, if Gadget&#8217;s constructor throws, it means that the Gadget object wasn&#8217;t created and never existed. So there&#8217;s nothing to destroy or dispose: The destructor/disposer not only isn&#8217;t needed to run, but it can&#8217;t run because it doesn&#8217;t have a valid object to run against.</p>
<p>Incidentally, it also means that the Gadget constructor isn&#8217;t exception-safe, because it and only it can clean up resources it might leak. In the C++ version, the usual simple way to write the code correctly is to change the w member&#8217;s type from Widget* to shared_ptr&lt;Widget&gt; or an equivalent smart pointer type that owns the object. But let&#8217;s leave that aside for now to explore the more general issue.</p>
<h3>A Look At the Calling Code</h3>
<p>Next, let&#8217;s see how these semantics are actually enforced, whether by language rules or by convention, on the calling side in each language. Here are the major idiomatic ways in each language to use an Gadget object in an exception-safe way:</p>
<table border="0" cellspacing="1" cellpadding="15" width="400">
<tbody>
<tr>
<td width="400" valign="top">// C++ caller</p>
<p>{<br />
<strong>  Gadget myGadget;<br />
</strong>  // do something with myGadget<br />
}</td>
</tr>
<tr>
<td width="400" valign="top">// C# caller</p>
<p><strong>using( Gadget myGadget = new Gadget() )<br />
</strong>{<br />
  // do something with myGadget<br />
}</td>
</tr>
<tr>
<td width="400" valign="top">// Java caller</p>
<p>Gadget myGadget = new Gadget();</p>
<p><strong>try {<br />
</strong>  // do something with myGadget<br />
<strong>}<br />
finally {<br />
  myGadget.dispose();<br />
}</strong></td>
</tr>
</tbody>
</table>
<p>Consider the two cases where an exception can occur:</p>
<ul>
<li>What if an exception is thrown <strong>while using myGadget </strong>&#8211; that is, during &#8220;do something with myGadget&#8221;? In all cases, we know that myGadget&#8217;s destructor/dispose method is guaranteed to be called.</li>
<li>But what if an exception is thrown <strong>while constructing myGadget</strong>? Now in all cases the answer is that the destructor/dispose method is guaranteed <strong>not </strong>to be called.</li>
</ul>
<p>Put another way, we can say for all cases: The destructor/dispose is guaranteed to be run if and only if the constructor completed successfully.</p>
<h3>Another Look At the Destructor/Dispose Code</h3>
<p>Finally, let&#8217;s return to each key line of code one more time:</p>
<table border="0" cellspacing="1" cellpadding="15" width="404">
<tbody>
<tr>
<td width="400" valign="top">// C++<br />
<strong>      if( w != nullptr ) delete w;</strong></td>
</tr>
<tr>
<td width="400" valign="top">// C#<br />
<strong>     if( w != null ) w.Dispose();</strong></td>
</tr>
<tr>
<td width="400" valign="top">// Java<br />
<strong>     if( w != null ) w.dispose();</strong></td>
</tr>
</tbody>
</table>
<p>The motivation for the nullness tests in the original example was to clean up partly-constructed objects. That motivation is suspect in principle &#8212; it means the constructors aren&#8217;t exception-safe because only they can clean up after themselves &#8212; and as we&#8217;ve seen it&#8217;s flawed in practice because the destructors/disposers won&#8217;t ever run on the code paths that the original motivation cared about. So we don&#8217;t need the nullness tests for that reason, although you might still have nullness tests in destructors/disposers to handle &#8216;optional&#8217; parts of an object where a valid object might hold a null pointer or reference member during its lifetime.</p>
<p>In this particular example, we can observe that the nullness tests are actually unnecessary, because w will always be non-null if the object was constructed successfully. There is no (legitimate) way that you can call the destructor/disposer (Furthermore, C++ developers will know that the test is unnecessary for a second reason: Delete is a no-op if the pointer passed to it is null, so there&#8217;s never a need to check for that special case.)</p>
<h3>Conclusion</h3>
<p>When it comes to object lifetimes, all OO languages are more alike than different. Object and resource lifetime matters, whether or not you have a managed language, garbage collection (finalizers are not destructors/disposers!), templates, generics, or any other fancy bell or whistle layered on top of the basic humble class.</p>
<p>The same basic issues arise everywhere&#8230; the code you write to deal with them is just spelled using different language features and/or idioms in the different languages, that&#8217;s all. We can have lively discussions about which language offers the easiest/best/greenest/lowest-carbon-footprint way to express how we want to deal with a particular aspect of object construction, lifetime, and teardown, but those concerns are general and fundamental no matter which favorite language you&#8217;re using to write your code this week.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/110/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/110/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=110&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/07/25/constructor-exceptions-in-c-c-and-java/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Research Firms Are Good At Research, Not Technology Predictions</title>
		<link>http://herbsutter.wordpress.com/2008/07/21/research-firms-are-good-at-research-not-technology-predictions/</link>
		<comments>http://herbsutter.wordpress.com/2008/07/21/research-firms-are-good-at-research-not-technology-predictions/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 15:25:43 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Opinion & Editorial]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/07/21/research-firms-are-good-at-research-not-technology-predictions/</guid>
		<description><![CDATA[This story has been picked up semi-widely since last night. I&#8217;m sure this Steven Prentice they quote is a fine (Gartner) Fellow, but really:
The computer mouse is set to die out in the next five years and will be usurped by touch screens and facial recognition, analysts believe.

Seriously, does anyone who uses computers daily really [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=107&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://www.pcauthority.com.au/News/117291,computer-mouse-heading-for-extinction.aspx">This story</a> has been picked up semi-widely since last night. I&#8217;m sure this Steven Prentice they quote is a fine (Gartner) Fellow, but really:</p>
<blockquote><p>The computer mouse is set to die out in the next five years and will be usurped by touch screens and facial recognition, analysts believe.</p>
</blockquote>
<p>Seriously, does anyone who uses computers daily really believe this kind of prediction just because someone at Gartner says so? Dude, sanity check: 1. What functions do you use your mouse for? 2. How many of those functions can be done by pointing at your screen or smiling at the camera: a) at all; and b) with equivalent high precision and low arm fatigue? Of course the mouse, including direct equivalents like the touchpad/trackpad, will be replaced someday. But to notice that people like to turn and shake their Wii controllers and iPhones and then make the leap to conclude that this will replace mice outright in the short term seems pretty thin even for Gartner.</p>
<p>When you read a report from Gartner, Forrester, IDC and their brethren research firms, remember that you&#8217;re either getting real-world data (aka research) or a single analyst&#8217;s personal predictions (aka crystal-ball gazing). Research firms are good at what they&#8217;re good at, namely research:</p>
<ul>
<li>They&#8217;re &#8220;decent&#8221; at compiling current industry market data. Grade: A.</li>
<li>They&#8217;re &#8220;pretty okay&#8221; when they limit themselves to simple short-term extrapolation of that data, such as two-year projections of cost changes of high-speed networking in Canada or cell phone penetration in India. Grade: A-.</li>
</ul>
<p>But when they try bigger technology movement predictions like &#8220;X will replace Y in Z years&#8221; they average somewhere around &#8220;spotty,&#8221; and on their off days they dip down into &#8220;I think you forgot to <a href="http://en.wikipedia.org/wiki/Sanity_test">sanity check</a> that sound bite&#8221; territory. It&#8217;s a pity that some venture capitalists take the research analysts&#8217; word as gospel. Reliability of technology shift predictions: D+.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/107/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/107/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=107&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/07/21/research-firms-are-good-at-research-not-technology-predictions/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Kindling</title>
		<link>http://herbsutter.wordpress.com/2008/07/16/kindling/</link>
		<comments>http://herbsutter.wordpress.com/2008/07/16/kindling/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 01:16:45 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Opinion & Editorial]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/07/16/kindling/</guid>
		<description><![CDATA[Two weeks ago, I broke down and bought a Kindle. I like it:

It&#8217;s a good and well-designed reader, and the experience is much better than the other e-book reading I&#8217;ve done before on phones and PDAs. I like how you when you bookmark a page, you can see it&#8230; the corner of the page gets [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=103&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Two weeks ago, I broke down and bought a <a href="http://en.wikipedia.org/wiki/Kindle">Kindle</a>. I like it:</p>
<ul>
<li>It&#8217;s a good and well-designed reader, and the experience is much better than the other e-book reading I&#8217;ve done before on phones and PDAs. I like how you when you bookmark a page, you can see it&#8230; the corner of the page gets a little dog-ear. [1]</li>
<li>It&#8217;s got a nice <a href="http://en.wikipedia.org/wiki/Electronic_paper">e-paper</a> screen that uses ambient light, not backlight, which makes it readable anywhere just like a printed page &#8212; it&#8217;s even better, not worse, in direct sunlight.</li>
<li>It&#8217;s light and thin and sturdy. Sure beats carrying three or four books on a trip.</li>
<li>It has great battery life. I&#8217;ve only charged it once so far, when I first received it&#8230; since then I&#8217;ve had it for 11 days and read a full book and a half, and it still has 75% of its first charge left. (It helps that I turn the wireless off unless I&#8217;m actively using it.)</li>
<li>Fast, free wireless everywhere in the U.S., without computers or WiFi.</li>
</ul>
<p>But today, it transformed my reading experience.</p>
<p>This morning, I was unsuspectingly reading my feeds in Google Reader as usual, blissfully unaware that the way I read books was about to change. Among other articles, I noticed that Slashdot ran a <a href="http://books.slashdot.org/article.pl?sid=08/07/16/1330221">book review of <em>Inside Steve&#8217;s Brain</em></a> (that&#8217;s Jobs, not Wozniak or Ballmer). The review made me want to read the book. That&#8217;s when the new reality started, because I was interested in the book <em>now</em>, and had time to start reading it <em>now:</em></p>
<ul>
<li>Normally, I would have ordered it from Amazon and waited for it to arrive. But what usually happens then is that the book arrives a week later, and when it gets here I don&#8217;t have time to start it right away or I don&#8217;t quite feel like that kind of book just at the moment&#8230; and it goes on a shelf, with a 70% probably of being picked up at some point in the future.</li>
<li>Today, I searched for the book title on my Kindle, clicked &#8220;Buy&#8221;, and a few minutes later started reading <em><a href="http://www.amazon.com/Inside-Steves-Brain/dp/B0016H97LY/ref=sr_1_1?ie=UTF8&amp;s=digital-text&amp;qid=1216255732&amp;sr=1-1">Inside Steve&#8217;s Brain</a></em> while eating lunch. [2]</li>
</ul>
<p>That convenience isn&#8217;t merely instant gratification, it&#8217;s transformative. I suspect I&#8217;m going to be buying reading even more books now, even though I have a few little nits with the device, such as that the next and previous page buttons are a little too easy to press in some positions.</p>
<p>In other news, the Kindle also supports reading blogs and newspapers and some web surfing, but those are less compelling for me because I tend to do those things in the context of work, which means I&#8217;m already sitting at a computer with a bigger color screen and full keyboard. Maybe someday I&#8217;ll do it on e-paper. Until then, just living inside a virtual bookstore is plenty for me. Kindle + the Amazon Kindle store = iPod + iTunes for books. [3]</p>
<p>Here&#8217;s a <a href="http://www.macworld.com/article/61186/2007/11/kindle.html">useful summary article</a> on Kindle features from a prospective user&#8217;s point of view.</p>
<h3>Notes</h3>
<p>1. The first two books I downloaded? <em><a href="http://www.amazon.com/Design-Everyday-Things-Donald-Norman/dp/0385267746">The Design of Everyday Things</a></em>, which was interestingly apropros to read on a new device like the Kindle with its nice dog-ear feedback and other well-designed features, and <a href="http://www.amazon.com/Foundation/dp/B000FC1PWA/ref=sr_1_1?ie=UTF8&amp;s=digital-text&amp;qid=1216255446&amp;sr=1-1"><em>Foundation</em></a>, which I hadn&#8217;t read in ages.</p>
<p>2. And it cost less than half what the dead-tree version would (though the latter was hardcover).</p>
<p>3. Caveat: I&#8217;m not actually an iPod owner, and I hate how Apple keeps insisting on installing iTunes on my computer just because I have Safari or QuickTime installed <span style="color:#808080;">(mutter grumble evil product-tying monopolies mutter grumble :-) )</span>. But apparently everyone else loves them, and they have indeed changed their industry.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/103/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/103/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=103&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/07/16/kindling/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Hungarian Notation Is Clearly (Good&#124;Bad)</title>
		<link>http://herbsutter.wordpress.com/2008/07/15/hungarian-notation-is-clearly-goodbad/</link>
		<comments>http://herbsutter.wordpress.com/2008/07/15/hungarian-notation-is-clearly-goodbad/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 19:50:26 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/07/15/hungarian-notation-is-clearly-goodbad/</guid>
		<description><![CDATA[A commenter asked:
thread_local X tlsX; ??
Herb, I hope you aren’t backtracking on Hungarian Notation now that you work for Microsoft. Say it aint so…

It ain&#8217;t so. Besides, Microsoft&#8217;s Framework Developer&#8217;s Guide prominently intones: &#8220;Do not use Hungarian notation.&#8221;
Warts like &#8220;tls&#8221; and &#8220;i&#8221; are about lifetime and usage, not type. Here &#8220;tls&#8221; denotes that each thread [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=100&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A commenter asked:</p>
<blockquote><p>thread_local X tlsX; ??
<p>Herb, I hope you aren’t backtracking on Hungarian Notation now that you work for Microsoft. Say it aint so…</p>
</blockquote>
<p>It ain&#8217;t so. Besides, Microsoft&#8217;s Framework Developer&#8217;s Guide prominently intones: <a href="http://msdn.microsoft.com/en-us/library/ms229045.aspx">&#8220;Do not use Hungarian notation.&#8221;</a></p>
<p>Warts like &#8220;tls&#8221; and &#8220;i&#8221; are about <a href="http://en.wikipedia.org/wiki/Object_lifetime">lifetime</a> and usage, not <a href="http://en.wikipedia.org/wiki/Data_type">type</a>. Here &#8220;tls&#8221; denotes that each thread gets its own copy of the value that is constructed and destroyed once per thread that uses it (lifetime) and doesn&#8217;t need to be synchronized using mutexes (usage). As another example of usage warts, I&#8217;ll also use &#8220;i&#8221; for a variable that&#8217;s used as an index or for iteration &#8212; and given that the &#8220;i&#8221; convention goes back to before BASIC, we shouldn&#8217;t try to pin the Hungarian tail on that donkey.</p>
<p>Having said that, though, many people have variously decried and defended different forms of Hungarian, and you may notice a pattern&#8230; they&#8217;re mostly:</p>
<ul>
<li><a href="http://lxr.linux.no/linux/Documentation/CodingStyle">decrying</a> <a href="http://www.research.att.com/~bs/bs_faq2.html#Hungarian">Systems</a>&nbsp;<a href="http://www.codinghorror.com/blog/archives/000023.html">Hungarian</a>, the wildly popularized version which focuses on encoding the type, and </li>
<li><a href="http://www.joelonsoftware.com/articles/Wrong.html">defending</a>&nbsp;<a href="http://safari.oreilly.com/0735619670/ch11lev1sec5">Applications</a> <a href="http://www.joelonsoftware.com/articles/FogBugzIII.html">Hungarian</a>, the originally described version which focuses on encoding the usage.</li>
</ul>
<p>Today, &#8220;Hungarian&#8221; nearly always means <a href="http://en.wikipedia.org/wiki/Hungarian_notation"><strong>Systems Hungarian</strong></a>. The main trouble with Systems Hungarian comes from trying to embed information about a variable&#8217;s <a href="http://en.wikipedia.org/wiki/Data_type"><strong>type</strong></a><strong> </strong>into the variable&#8217;s name by prepending an encoded wart like the venerable sz, pach, ul, and their ilk. Although potentially helpful in a weakly-typed language like C, that&#8217;s known to be brittle and the prefixes tend to turn into lies as variable types morph during maintenance. The warting systems also don&#8217;t extend well to user-defined types and templates.</p>
<p>I&#8217;ve railed against the limitations and perils of Hungarian with Andrei Alexandrescu in our book <a href="http://safari.awprofessional.com/0321113586"><em>C++ Coding Standards</em></a>, where I made sure it was stated right up front as part of &#8220;Item 0: Don&#8217;t sweat the small stuff (or, Know what not to standardize)&#8221;:</p>
<blockquote><p><i>Example 3: Hungarian notation.</i> Notations that incorporate type information in variable names have mixed utility in type-unsafe languages (notably C), are possible but have no benefits (only drawbacks) in object-oriented languages, and are impossible in generic programming. Therefore, no C++ coding standard should require Hungarian notation, though a C++ coding standard might legitimately choose to ban it. </p>
</blockquote>
<p>and with Jim Hyslop in our article <a href="http://www.ddj.com/cpp/184403804">&#8220;Hungarian wartHogs&#8221;</a>:</p>
<blockquote><p>&#8220;&#8230; the compiler already knows much more than you do about an object&#8217;s type. Changing the variable&#8217;s name to embed type information adds little value and is in fact brittle. And if there ever was reason to use some Hungarian notation in C-style languages, which is debatable, there certainly remains no value when using type-safe languages.&#8221;</p>
</blockquote>
<p>There&#8217;s an amusing real-world note later in that article. I&#8217;ll pick up where the Guru is saying:</p>
<blockquote><p>&#8220;I recall only one time when Hungarian notation was useful on a project. &#8230; One of the programmers on the project was named Paul,&#8221; the Guru explained. &#8220;Several months into the project, while still struggling to grow a ponytail and build his report-writing module, he pointed out that Hungarian notation had helped him find a sense of identity, for he now knew what he was&#8230;&#8221; She paused.
<p>I blinked. It took me about ten seconds, and then I shut my eyes and grimaced painfully. &#8220;Pointer to array of <b>unsigned long</b>,&#8221; I groaned.
<p>She smiled, enjoying my pain. &#8220;True story,&#8221; she said.</p>
</blockquote>
<p>It is indeed a true story. I worked with him in 1993. The joke was bad then, too, but at least using Hungarian was more defensible because the project&#8217;s code was written in C. I found it handy at the time, but now that I work in more strongly typed languages I find the type-embedding version of Hungarian more actively harmful than actually useful.</p>
<p>You might call me a Hungarian emigrant, now living happily as an <a href="http://en.wikipedia.org/wiki/Expatriate">expat</a> out in eastern C++ near the Isle of Managed Languages.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/100/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/100/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=100&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/07/15/hungarian-notation-is-clearly-goodbad/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Trip Report: June 2008 ISO C++ Standards Meeting</title>
		<link>http://herbsutter.wordpress.com/2008/07/04/trip-report-june-2008-iso-c-standards-meeting/</link>
		<comments>http://herbsutter.wordpress.com/2008/07/04/trip-report-june-2008-iso-c-standards-meeting/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 16:28:18 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/07/04/trip-report-june-2008-iso-c-standards-meeting/</guid>
		<description><![CDATA[The ISO C++ committee met in Sophia Antipolis, France on June 6-14. You can find the minutes here (note that these cover only the whole-group sessions, not the breakout technical sessions where we spend most of the week).
Here’s a summary of what we did, with links to the relevant papers to read for more details, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=99&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The ISO C++ committee met in Sophia Antipolis, France on June 6-14. You can find <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2697.html">the minutes here</a> (note that these cover only the whole-group sessions, not the breakout technical sessions where we spend most of the week).
<p>Here’s a summary of what we did, with links to the relevant papers to read for more details, and information about upcoming meetings.<br />
<h2>Highlights: Complete C++0x draft coming in September</h2>
<p>The biggest goal entering this meeting was to make C++0x feature-complete and stay on track to publish a complete public draft of C++0x this September for international review and comment &#8212; in ISO-speak, an official Committee Draft or CD. We are going to achieve that, so the world will know the shape of C++0x in good detail this fall.
<p>We&#8217;re also now planning to have two rounds of international comment review instead of just one, to give the world a good look at the standard and two opportunities for national bodies to give their comments, the first round starting after our September 2008 meeting and the second round probably a year later. However, the September 2008 CD is &#8220;it&#8221;, feature-complete C++0x. The only changes expected to be made between that CD and the final International Standard are bug fixes and clarifications. It&#8217;s helpful to think of a CD as a feature-complete beta.
<p>Coming into the June meeting, we already had a nearly-complete C++0x internal working draft &#8212; most features that will be part of C++0x had already been &#8220;checked in.&#8221; Only a few were still waiting to become stable enough to vote in, including initializer lists, range-based for loops, and concepts.
<p>Of these, <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2081.pdf">concepts</a> is the long-pole feature for C++0x, which isn&#8217;t surprising given that it&#8217;s the biggest new language feature we&#8217;re adding to Standard C++. A primary goal of the June meeting, therefore, was to make as much progress on concepts as possible, and to see if it would be possible to vote that feature into the C++0x working draft at this meeting. We almost did that, thanks to a lot of work not only in France but also at smaller meetings throughout the winter and spring: For the first time, we ended a meeting with no known issues or controversial points in the concepts standardese wording, and we expect to &#8220;check in&#8221; concepts into the working draft at the next meeting in September, which both cleared the way for us to publish a complete draft then and motivated the plan to do two rounds of public review rather than one, just to make sure the standard got enough &#8220;bake time&#8221; in its complete form.
<p>Next, I&#8217;ll summarize some of the major features voted into the draft at the June meeting.<br />
<h2>Initializer lists</h2>
<p>C++0x initializer lists accomplish two main objectives:</p>
<ul>
<li>Uniformity: They provide a uniform initialization syntax you can use consistently everywhere, which is especially helpful when you write templates.
<li>Convenience: They provide a general-purpose way of using the C initializer syntax for all sorts of types, notably containers.</li>
</ul>
<p>See <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2215.pdf">N2215</a> for more on the motivation and original design, and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">N2672</a> and <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2679.pdf">N2679</a> for the final standardese.</p>
<h3>Example: Initializing aggregates vs. classes</h3>
<p>It&#8217;s convenient that we can initialize aggregates like this:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">struct Coordinate1 {<br />&nbsp; int i;<br />&nbsp; int j;<br />&nbsp; //&#8230;<br />};</p>
<p>Coordinate1 c1 <strong>= { 1, 2 }</strong>;</td>
</tr>
</tbody>
</table>
<p>but the syntax is slightly different for classes with constructors:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">class Coordinate2 {<br />public:<br />&nbsp; Coordinate2( int i, int j );<br />&nbsp; // &#8230;<br />};</p>
<p>Coordinate2 c2<strong>( 1, 2 )</strong>;</td>
</tr>
</tbody>
</table>
<p>In C++0x, you can still do all of the above, but initializer lists give us a regular way to initialize all kinds of types:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">Coordinate1 c1 <strong>= { 1, 2 }</strong>;<br />Coordinate2 c2 <font color="#0000ff"><strong>= { 1, 2 }</strong></font>; // legal in C++0x</td>
</tr>
</tbody>
</table>
<p>Having a uniform initialization syntax is particularly helpful when writing template code, so that the template can easily work with a wide variety of types.</p>
<h3>Example: Initializing arrays vs. containers</h3>
<p>One place where the lack of uniform initialization has been particularly annoying &#8212; at least to me, when I write test harnesses to exercise the code I show in articles and talks &#8212; is when initializing a container with some default values. Don&#8217;t you hate it when you want to create a container initialized to some known values, and if it were an array you can just write:</p>
<table cellspacing="15" cellpadding="1" width="562" border="0">
<tbody>
<tr>
<td valign="top" width="530">string a[] <strong>= { &#8220;xyzzy&#8221;, &#8220;plugh&#8221;, &#8220;abracadabra&#8221; }</strong>;</td>
</tr>
</tbody>
</table>
<p>but if it&#8217;s a container like a vector, you have to default-construct the container and then push every entry onto it individually:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">// Initialize by hand today<br />vector&lt;string&gt; v;<br /><strong>v.push_back( &#8220;xyzzy&#8221; );<br />v.push_back( &#8220;plugh&#8221; );<br />v.push_back( &#8220;abracadabra&#8221; );</strong></td>
</tr>
</tbody>
</table>
<p>or, even more embarrassingly, initialize an array first for convenience and then construct the vector as a copy of the array, using the vector constructor that takes a range as an iterator pair:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">// Initialize via an array today<br />string a[] = { &#8220;xyzzy&#8221;, &#8220;plugh&#8221;, &#8220;abracadabra&#8221; }; // put it into an array first<br />vector&lt;string&gt; <strong>v( a, a+3 )</strong>; // then construct the vector as a copy</td>
</tr>
</tbody>
</table>
<p>Arrays are weaker than containers in nearly every other way, so it&#8217;s annoying that they get this unique convenience just because of their having been built into the language since the early days of C.</p>
<p>The lack of convenient initialization has been even more irritating with maps:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">// Initialize by hand today<br />map&lt;string,string&gt; phonebook;<br /><strong>phonebook[ "Bjarne Stroustrup (cell)" ] = &#8220;+1 (212) 555-1212&#8243;;<br />phonebook[ "Tom Petty (home)" ] = &#8220;+1 (858) 555-9734&#8243;;<br />phonebook[ "Amy Winehouse (agent)" ] = &#8220;+44 20 74851424&#8243;;</strong></td>
</tr>
</tbody>
</table>
<p>In C++0x, we can initialize any container with known values as conveniently as arrays:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">// Can use initializer list in C++0x<br />vector&lt;string&gt; v <font color="#0000ff"><strong>= { &#8220;xyzzy&#8221;, &#8220;plugh&#8221;, &#8220;abracadabra&#8221; }</strong></font>;<br />map&lt;string,string&gt; phonebook <font color="#0000ff">=<br /><strong>&nbsp; { { &#8220;Bjarne Stroustrup (cell)&#8221;, &#8220;+1 (212) 555-1212&#8243; },<br />&nbsp;&nbsp;&nbsp; { &#8220;Tom Petty (home)&#8221;, &#8220;+1 (858) 555-9734&#8243; },<br />&nbsp;&nbsp;&nbsp; { &#8220;Amy Winehouse (agent)&#8221;, &#8220;+44 99 74855424&#8243; } };</strong></font></td>
</tr>
</tbody>
</table>
<p>As a bonus, a uniform initialization syntax even makes arrays easier to deal with. For example, the array initializer syntax didn&#8217;t support arrays that are dynamically allocated or class members arrays:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">// Initialize dynamically allocated array by hand today<br />int* a = new int[3];<br /><strong>a[0] = 1;<br />a[1] = 2;<br />a[2] = 99;<br /></strong><br />// Initialize member array by hand today<br />class X {<br />&nbsp; int a[3];<br />public:<br />&nbsp; X() { <strong>a[0] = 1; a[1] = 2; a[2] = 99;</strong> }<br />};</td>
</tr>
</tbody>
</table>
<p>In C++0x, the array initialization syntax is uniformly available in these cases too:</p>
<table cellspacing="15" cellpadding="1" width="550" border="0">
<tbody>
<tr>
<td valign="top" width="518">// C++0x</p>
<p>int* a = new int[3] <strong><font color="#0000ff">{ 1, 2, 99 }</font></strong>;</p>
<p>class X {<br />&nbsp; int a[3];<br />public:<br />&nbsp; X() : a<font color="#0000ff"><strong>{ 1, 2, 99 }</strong></font> {}<br />};</td>
</tr>
</tbody>
</table>
<h2>More concurrency support</h2>
<p><a href="http://herbsutter.wordpress.com/2007/11/01/trip-report-october-2007-iso-c-standards-meeting/">Last October</a>, we already voted in a state-of-the-art memory model, atomic operations, and a threading package. That covered the major things we wanted to see in this standard, but a few more were still in progress. Here are the major changes we made this time that relate to concurrency.</p>
<p>Thread-local storage (<a title="N2550" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">N2659</a>): To declare a variable which will be instantiated once for each thread, use the <strong>thread_local</strong> storage class. For example:</p>
<table cellspacing="15" cellpadding="1" width="562" border="0">
<tbody>
<tr>
<td valign="top" width="530">class MyClass {<br />&nbsp; &#8230;<br />private:<br />&nbsp; <font color="#0000ff"><strong>thread_local </strong></font>X tlsX;<br />};</td>
</tr>
<tr>
<td valign="top" width="530">void SomeFunc() {<br />&nbsp; <font color="#0000ff"><strong>thread_local</strong></font> Y tlsY;<br />&nbsp; &#8230;<br />};</td>
</tr>
</tbody>
</table>
<p>Dynamic initialization and destruction with concurrency (<a title="N2550" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">N2660</a>) handles two major cases:</p>
<ul>
<li><em>Static and global variables</em> can be concurrently initialized and destroyed if you try to access them on multiple threads before main() begins. If more than one thread could initialize (or use) the variable concurrency, however, it&#8217;s up to you to synchronize access.
<li><em>Function-local static variables</em> will have their initialization automatically protected; while one thread is initializing the variable, any other threads that enter the function and reach the variable&#8217;s declaration will wait for the initialization to complete before they continue on. Therefore you don&#8217;t need to guard initialization races or initialization-use races, and if the variable is immutable once constructed then you don&#8217;t need to do any synchronization at all to use it safely. If the variable can be written to after construction, you do still need to make sure you synchronize those post-initialization use-use races on the variable.</li>
</ul>
<p>Thread safety guarantees for the standard library (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2669.htm">N2669</a>): The upshot is that the answer to questions like &#8220;what do I need to do to use a vector&lt;T&gt; v or a shared_ptr&lt;U&gt; sp thread-safely?&#8221; is now explicitly &#8220;same as any other object: if you know that an object like v or sp is shared, you must synchronize access to it.&#8221; Only a very few objects need to guarantee internal synchronization; the global allocator is one of those, though, and so it gets that stronger guarantee.</p>
<p>The &#8220;other features&#8221; section below also includes a few smaller concurrency-related items.</p>
<h2>More STL algorithms (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2666.pdf">N2666</a>)</h2>
<p>We now have the following new STL algorithms. Some of them fill holes (e.g., &#8220;why isn&#8217;t there a copy_if or a counted version of algorithm X?&#8221;) and others provide handy extensions (e.g., &#8220;why isn&#8217;t there an all_of or any_of?&#8221;).</p>
<ul>
<li><em>all_of( first, last, pred )<br /></em>returns true iff all elements in the range satisfy pred
<li><em>any_of( first, last, pred )<br /></em>returns true iff any element in the range satisfies pred
<li><em>copy_if( first, last result, pred)<br /></em>the &#8220;why isn&#8217;t this in the standard?&#8221; poster child algorithm
<li><em>copy_n( first, n result)<br /></em>copy for a known number of n elements
<li><em>find_if_not( first, last, pred )<br /></em>returns an iterator to the first element that does not satisfy pred
<li><em>iota( first, last, value )<br /></em>for each element in the range, assigns value and increments value &#8220;as if by ++value&#8221;
<li><em>is_partitioned( first, last, pred )<br /></em>returns true iff the range is already partitioned by pred; that is, all elements that satisfy pred appear before those that don&#8217;t
<li><em>none_of( first, last, pred )<br /></em>returns true iff none of the elements in the range satisfies pred
<li><em>partition_copy( first, last, out_true, out_false, pred )<br /></em>copy the elements that satisfy pred to out_true, the others to out_false
<li><em>partition_point( first, last, pred)<br /></em>assuming the range is already partitioned by pred (see is_partitioned above), returns an iterator to the first element that doesn&#8217;t satisfy pred
<li><em>uninitialized_copy_n( first, n, result )<br /></em>uninitialized_copy for a known number of n elements </li>
</ul>
<h2>Other approved features</h2>
<ul>
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2435.htm">N2435</a> Explicit bool for smart pointers
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2514.html">N2514</a> Implicit conversion operators for atomics
<li><a title="N2535" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">N2657</a> Local and unnamed types as template arguments
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2658.pdf">N2658</a> Constness of lambda functions
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2667.htm">N2667</a> Reserved namespaces for POSIX
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm">N2670</a> Minimal support for garbage collection and reachability-based leak detection&nbsp;
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm">N2661</a> Time and duration support
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2674.htm">N2674</a> shared_ptr atomic access
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2678.htm">N2678</a> Error handling specification for Chapter 30 (Threads)
<li><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2680.pdf">N2680</a> Placement insert for standard containers</li>
</ul>
<h2>Next Meeting</h2>
<p>Although we just got back from France, the next meeting of the ISO C++ standards committee is already coming up fast:
<ul>
<li>September 14-20, 2008: <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2537.html">San Francisco, California, USA</a></li>
</ul>
<p>The meetings are public, and if you&#8217;re in the area please feel free to drop by.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/99/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/99/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=99&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/07/04/trip-report-june-2008-iso-c-standards-meeting/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Choose Concurrency-Friendly Data Structures</title>
		<link>http://herbsutter.wordpress.com/2008/06/27/effective-concurrency-choose-concurrency-friendly-data-structures/</link>
		<comments>http://herbsutter.wordpress.com/2008/06/27/effective-concurrency-choose-concurrency-friendly-data-structures/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 03:02:14 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/06/27/effective-concurrency-choose-concurrency-friendly-data-structures/</guid>
		<description><![CDATA[The latest Effective Concurrency column, &#8220;Choose Concurrency-Friendly Data Structures&#8221;, just went live on DDJ&#8217;s site, and also appears in the print magazine. From the article:
What is a high-performance data structure? To answer that question, we&#8217;re used to applying normal considerations like Big-Oh complexity, and memory overhead, locality, and traversal order. All of those apply to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=98&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>The latest <strong>Effective Concurrency</strong> column, <a href="http://www.ddj.com/hpc-high-performance-computing/208801371"><strong>&#8220;Choose Concurrency-Friendly Data Structures&#8221;</strong></a>, just went live on DDJ&#8217;s site, and also appears in the print magazine. From the article:</div>
<blockquote><p>What is a high-performance data structure? To answer that question, we&#8217;re used to applying normal considerations like Big-Oh complexity, and memory overhead, locality, and traversal order. All of those apply to both sequential and concurrent software.
<p>But in concurrent code, we need to consider two additional things to help us pick a data structure that is also sufficiently concurrency-friendly:
<ul>
<li>In parallel code, your performance needs likely include the ability to allow multiple threads to use the data at the same time. If this is (or may become) a high-contention data structure, does it allow for concurrent readers and/or writers in different parts of the data structure at the same time? If the answer is, &#8220;No,&#8221; then you may be designing an inherent bottleneck into your system and be just asking for lock convoys as threads wait, only one being able to use the data structure at a time.
<li>On parallel hardware, you may also care about minimizing the cost of memory synchronization. When one thread updates one part of the data structure, how much memory needs to be moved to make the change visible to another thread? If the answer is, &#8220;More than just the part that has ostensibly changed,&#8221; then again you&#8217;re asking for a potential performance penalty, this time due to cache sloshing as more data has to move from the core that performed the update to the core that is reading the result.</li>
</ul>
<p>It turns out that both of these answers are directly influenced by whether the data structure allows truly localized updates. &#8230;</p>
</blockquote>
<div>I hope you enjoy it.</div>
<div>&nbsp;</div>
<div>Finally, here are links to previous Effective Concurrency columns (based on the magazine print issue dates):</div>
<table cellspacing="5" cellpadding="5" width="555" border="0">
<tbody>
<tr>
<td valign="top" width="114">August 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a></td>
</tr>
<tr>
<td valign="top" width="114">September 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a></td>
</tr>
<tr>
<td valign="top" width="114">October 2007</td>
<td valign="top" width="422"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a></td>
</tr>
<tr>
<td valign="top" width="114">November 2007</td>
<td valign="top" width="422"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a></td>
</tr>
<tr>
<td valign="top" width="114">December 2007</td>
<td valign="top" width="422"><a href="http://herbsutter.spaces.live.com/blog/cns!2D4327CC297151BB!342.entry"><a title="Avoid Calling Unknown Code While Inside a Critical Section" href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a></a></td>
</tr>
<tr>
<td valign="top" width="114">January 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a></td>
</tr>
<tr>
<td valign="top" width="114">February 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/cpp/205900309">Break Amdahl&#8217;s Law!</a></td>
</tr>
<tr>
<td valign="top" width="114">March 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a></td>
</tr>
<tr>
<td valign="top" width="114">April 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a></td>
</tr>
<tr>
<td valign="top" width="114">May 2008</td>
<td valign="top" width="422"><a href="http://ddj.com/architect/207100682">Interrupt Politely</a></td>
</tr>
<tr>
<td valign="top" width="114">June 2008</td>
<td valign="top" width="422"><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a></td>
</tr>
<tr>
<td valign="top" width="114">July 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/208801371">Choose Concurrency-Friendly Data Structures</a></td>
</tr>
</tbody>
</table>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/98/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/98/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=98&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/06/27/effective-concurrency-choose-concurrency-friendly-data-structures/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Seneca and Shakespeare on Goals and Opportunities</title>
		<link>http://herbsutter.wordpress.com/2008/06/27/seneca-and-shakespeare-on-goals-and-opportunities/</link>
		<comments>http://herbsutter.wordpress.com/2008/06/27/seneca-and-shakespeare-on-goals-and-opportunities/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 10:54:47 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Friday Thoughts]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/06/27/seneca-and-shakespeare-on-goals-and-opportunities/</guid>
		<description><![CDATA[From the ancient dramatist Seneca the Younger:
&#8220;Our plans miscarry because they have no aim. When a man does not know what harbor he is making for, no wind is the right wind.&#8221;

And from the Bard, not to be outdone in metaphors of ships and seas:
&#8220;There is a tide in the affairs of men,Which, taken at [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=95&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>From the ancient dramatist <a href="http://en.wikipedia.org/wiki/Seneca_the_Younger">Seneca the Younger</a>:</p>
<blockquote><p>&#8220;Our plans miscarry because they have no aim. When a man does not know what harbor he is making for, no wind is the right wind.&#8221;</p>
</blockquote>
<p>And from <a href="http://en.wikipedia.org/wiki/William_Shakespeare">the Bard</a>, not to be outdone in metaphors of ships and seas:</p>
<blockquote><p>&#8220;There is a tide in the affairs of men,<br />Which, taken at the flood, leads on to fortune;<br />Omitted, all the voyage of their life<br />Is bound in shallows and miseries.<br />We must take the current when it serves,<br />Or lose our ventures.&#8221;</p>
</blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/95/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/95/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=95&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/06/27/seneca-and-shakespeare-on-goals-and-opportunities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Talking Lambdas with Bill Gates on BBC</title>
		<link>http://herbsutter.wordpress.com/2008/06/20/talking-lambdas-with-bill-gates-on-bbc/</link>
		<comments>http://herbsutter.wordpress.com/2008/06/20/talking-lambdas-with-bill-gates-on-bbc/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 23:37:46 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Friday Thoughts]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/06/20/talking-lambdas-with-bill-gates-on-bbc/</guid>
		<description><![CDATA[[6/25: Added YouTube availability and notes.]
A few weeks ago, the BBC was in town to tape a special interview/documentary on Bill Gates. As part of the footage they got, there&#8217;s a Bill-in-a-technical-review-meeting shot that includes yours truly at a whiteboard presenting an overview-plus-drilldown on C++0x lambda functions. It was a good review; Bill&#8217;s a sharp [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=94&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>[6/25: Added YouTube availability and notes.]</em></p>
<p>A few weeks ago, the <a href="http://www.bbc.co.uk">BBC</a> was in town to tape a special interview/documentary on Bill Gates. As part of the footage they got, there&#8217;s a Bill-in-a-technical-review-meeting shot that includes yours truly at a whiteboard presenting an overview-plus-drilldown on <a href="http://herbsutter.wordpress.com/2008/03/29/trip-report-februarymarch-2008-iso-c-standards-meeting/">C++0x lambda functions</a>. It was a good review; Bill&#8217;s a sharp guy with a broad and deep background and incisive questions.</p>
<p><a href="http://open2.net/money/trailers_summer_08_1.html">Here&#8217;s the trailer</a> and <a href="http://uk.youtube.com/watch?v=2gOrWBPt1bA&amp;feature=related">the program</a> [YouTube]. Some bits of our VC++ team review start around 4:30 of part one and 8:05 of part two, with a few other shots later on. If you watch really closely, you can see a brief flash of a guy in a blue shirt at a whiteboard with code on it in HerbWhiteboardScrawl Sans 60pt, and then Bill gesturing and making comments about simulating lambdas using macros instead of baking them into the language, and variable capture consequences.</p>
<p>The BBC documentary <a href="http://news.bbc.co.uk/1/hi/business/7461783.stm">&#8220;How a Geek Changed the World&#8221;</a> first aired today in the UK on BBC2; I&#8217;m guessing it will repeat. I don&#8217;t know when it will air in the U.S, but as of this writing it&#8217;s <a href="http://uk.youtube.com/watch?v=2gOrWBPt1bA&amp;feature=related">on YouTube</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/94/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/94/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=94&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/06/20/talking-lambdas-with-bill-gates-on-bbc/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Type Inference vs. Static/Dynamic Typing</title>
		<link>http://herbsutter.wordpress.com/2008/06/20/type-inference-vs-staticdynamic-typing/</link>
		<comments>http://herbsutter.wordpress.com/2008/06/20/type-inference-vs-staticdynamic-typing/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 20:02:53 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/06/20/type-inference-vs-staticdynamic-typing/</guid>
		<description><![CDATA[Jeff Atwood just wrote a nice piece on why type inference is convenient, using a C# sample:
I was absolutely thrilled to be able to refactor this code:
StringBuilder sb = new StringBuilder(256);
UTF8Encoding e = new UTF8Encoding();
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();

Into this:
var sb = new StringBuilder(256);
var e = new UTF8Encoding();
var md5 = new MD5CryptoServiceProvider();

It&#8217;s not dynamic typing, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=93&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Jeff Atwood just wrote <a href="http://www.codinghorror.com/blog/archives/001136.html">a nice piece on why type inference is convenient</a>, using a C# sample:</p>
<blockquote><p>I was absolutely thrilled to be able to refactor this code:
<pre>StringBuilder sb = new StringBuilder(256);
UTF8Encoding e = new UTF8Encoding();
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
</pre>
<p>Into this:
<pre>var sb = new StringBuilder(256);
var e = new UTF8Encoding();
var md5 = new MD5CryptoServiceProvider();
</pre>
<p>It&#8217;s not dynamic typing, per se; C# is still very much a statically typed language. It&#8217;s more of a compiler trick, a baby step toward a world of <a href="http://lambda-the-ultimate.org/node/834">Static Typing Where Possible, and Dynamic Typing When Needed</a>. </p>
</blockquote>
<p>It&#8217;s worth making a stronger demarcation among:</p>
<ul>
<li>type inference, which you can do in any language
<li>static vs. dynamic typing, which is completely orthogonal but all too often confused with inference
<li>strong vs. weak typing, which is mostly orthogonal (e.g., C is statically typed because every variable has a statically known actual type, but also weakly typed because of its casts)</li>
</ul>
<p>Above, Jeff explicitly separates inference and dynamic-ness. Unfortunately, later on he proceeds to imply that inference is a small step toward dynamic typing, which is stylistically true in principle but might mislead some readers into thinking inference has something to do with dynamic-ness, which it doesn&#8217;t.</p>
<h3>Type Inference</h3>
<p>Many languages, including C# (as shown above) and the next C++ standard (C++0x, shown below), provide type inference. C++0x does it via the repurposed <strong>auto</strong> keyword. For example, say you have an object m of type map&lt;int,list&lt;string&gt;&gt;, and you want to create an iterator to it:</p>
<table cellspacing="5" cellpadding="5" width="746" border="0">
<tbody>
<tr>
<td valign="top" width="371"><strong>map&lt;int,list&lt;string&gt;&gt;::iterator</strong> i = m.begin();</td>
<td valign="top" width="356">// type is required in today&#8217;s C++, allowed in C++0x</td>
</tr>
<tr>
<td valign="top" width="371"><font color="#0000ff"><strong>auto</strong></font> i = m.begin();</td>
<td valign="top" width="356">// type can be inferred in C++0x</td>
</tr>
</tbody>
</table>
<p>How many times have you said to your compiler, &#8220;Compiler, you know the type already, why are you making me repeat it?!&#8221; Even the IDE can tell you what the type is when you hover over an expression.</p>
<p>Well, in C++0x you won&#8217;t have to any more, which is often niftily convenient. This gets increasingly important as we don&#8217;t want to, or can&#8217;t, write out the type ourselves, because we have:</p>
<ul>
<li>types with more complicated names
<li>types without names (or hard-to-find names)
<li>types held most conveniently via an indirection</li>
</ul>
<p>In particular, consider that C++0x lambda functions generate a function object whose type you generally can&#8217;t spell, so if you want to hold that function object and don&#8217;t have auto then you generally have to use an indirection:</p>
<table cellspacing="5" cellpadding="5" width="744" border="0">
<tbody>
<tr>
<td valign="top" width="371"><strong>function&lt;void(void)&gt;</strong> f = [] { DoSomething(); };<br /><font color="#0000ff"><strong>auto</strong></font> f = [] { DoSomething(); };</td>
<td valign="top" width="356">// hold via a wrapper &#8212; requires indirection<br />// infer the type and bind directly</td>
</tr>
</tbody>
</table>
<p>Note that the last line above is more efficient than the C equivalent using a pointer to function, because C++ lets you inline everything. For more on this, see Item 46 in Scott Meyers&#8217; <a href="http://www.amazon.com/gp/product/0201749629?ie=UTF8&amp;tag=aristeia.com-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0201749629">Effective STL</a> on why it&#8217;s preferable to use function objects rather than functions, because (counterintuitively) they&#8217;re more efficient.</p>
<p>Now, though there&#8217;s no question <strong>auto</strong> and <strong>var</strong> are great, there are some minor limitations. In particular, you may not want the exact type, but another type that can be converted to:</p>
<table cellspacing="5" cellpadding="5" width="749" border="0">
<tbody>
<tr>
<td valign="top" width="372"><strong>map&lt;int,list&lt;string&gt;&gt;::const_iterator</strong> ci = m.begin();</td>
<td valign="top" width="360">// ci&#8217;s type is map&lt;int,list&lt;string&gt;&gt;::const_iterator</td>
</tr>
<tr>
<td valign="top" width="370"><font color="#0000ff"><strong>auto</strong></font> i = m.begin();</td>
<td valign="top" width="360">// i&#8217;s type is map&lt;int,list&lt;string&gt;&gt;::iterator</td>
</tr>
</tbody>
</table>
<table cellspacing="5" cellpadding="5" width="749" border="0">
<tbody>
<tr>
<td valign="top" width="371"><strong>Widget*</strong> w = new Widget();<br /><strong>const </strong><strong>Widget*</strong> cw = new Widget();<br /><strong>WidgetBase*</strong> wb = new Widget();<br /><strong>shared_ptr&lt;Widget&gt;</strong> spw( new Widget() );</td>
<td valign="top" width="361">// w&#8217;s type is Widget*<br />// cw&#8217;s type is const Widget*<br />// wb&#8217;s type is WidgetBase*<br />// spw&#8217;s type is shared_ptr&lt;Widget&gt;</td>
</tr>
<tr>
<td valign="top" width="371"><strong><font color="#0000ff">auto</font></strong> w = new Widget();</td>
<td valign="top" width="361">// w&#8217;s type is Widget*</td>
</tr>
</tbody>
</table>
<p>So C++0x <strong>auto</strong> (like C# <strong>var</strong>) only gets you the most obvious type. Still and all, that does cover a lot of the cases.</p>
<p>The important thing to note in all of the above examples is that, regardless how you spell it, every variable has a clear, unambiguous, well-known and predictable static type. C++0x <strong>auto</strong> and C# <strong>var </strong>are purely notational conveniences that save us from having to spell it out in many cases, but the variable still has one fixed and static type.</p>
<h3>Static and Dynamic Typing</h3>
<p>As Jeff correctly noted in the above-quoted part, this isn&#8217;t dynamic typing, which permits the same variable to actually have different types at different points in its lifetime. Unfortunately, he goes on to say the following that could be mistaken by some readers to imply otherwise:</p>
<blockquote>
<p>You might even say implicit variable typing is a gateway drug to more dynamically typed languages.</p>
</blockquote>
<p>I know Jeff knows what he&#8217;s talking about because he said it correctly earlier in the same post, but let&#8217;s be clear: Inference doesn&#8217;t have anything to do with dynamic typing. Jeff is just noting that inference just happens to let you declare variables in a style that can be similar to the way you do it all the time in a dynamically typed language. (Before I could post this, I see that Lambda the Ultimate <a href="http://lambda-the-ultimate.org/node/2862">also commented</a> on this confusion. At least one commenter noted that this could be equally viewed as a gateway drug to statically typed languages, because you can get the notational convenience without abandoning static typing.)</p>
<p>Quoting from <a href="http://www.research.att.com/~bs/glossary.html">Bjarne&#8217;s glossary</a>:</p>
<blockquote>
<p><a name="Gdynamic-type"><b><font color="#000000">dynamic type</font></b></a> &#8211; the <a href="http://www.research.att.com/#Gtype">type</a> of an <a href="http://www.research.att.com/#Gobject">object</a> as determined at run-time; e.g. using <a href="http://www.research.att.com/#Gdynamic_cast">dynamic_cast</a> or typeid. Also known as <a href="http://www.research.att.com/#Gmost-derived-type">most-derived type</a>.</p>
<p><a name="Gstatic-type"><b><font color="#000000">static type</font></b></a> &#8211; the <a href="http://www.research.att.com/#Gtype">type</a> of an <a href="http://www.research.att.com/#Gobject">object</a> as known to the <a href="http://www.research.att.com/#Gcompiler">compiler</a> based on its <a href="http://www.research.att.com/#Gdeclaration">declaration</a>. See also: <a href="http://www.research.att.com/#Gdynamic-type">dynamic type</a>.</p>
</blockquote>
<p>Let&#8217;s revisit an earlier C++ example again, which shows the difference between a variable&#8217;s static type and dynamic type:</p>
<table cellspacing="5" cellpadding="5" width="749" border="0">
<tbody>
<tr>
<td valign="top" width="371"><strong>WidgetBase*</strong> wb = new Widget();<br />if( <strong>dynamic_cast&lt;Widget*&gt;</strong>( wb ) ) { &#8230; }</td>
<td valign="top" width="361">// wb&#8217;s <strong>static</strong> type is WidgetBase*<br />// cast succeeds: wb&#8217;s <strong>dynamic</strong> type is Widget*</td>
</tr>
</tbody>
</table>
<p>The static type of the variable says what interface it supports, so in this case wb allows you to access only the members of WidgetBase. The dynamic type of the variable is what the object being pointed to <em>right now</em> is.</p>
<p>In dynamically typed languages, however, variables don&#8217;t have a static type and you generally don&#8217;t have to mention the type. In many dynamic languages, you don&#8217;t even have to declare variables. For example:</p>
<table cellspacing="5" cellpadding="5" width="744" border="0">
<tbody>
<tr>
<td valign="top" width="371">// Python<br />x = 10;<br />x = &#8220;hello, world&#8221;;</td>
<td valign="top" width="356">// x&#8217;s type is int<br />// x&#8217;s type is str</td>
</tr>
</tbody>
</table>
<h3>Boost&#8217;s variant and any</h3>
<p>There are two popular ways to get this effect in C++, even though the language remains statically typed. The first is Boost <a href="http://www.boost.org/doc/libs/1_35_0/doc/html/variant.html"><strong>variant</strong></a>:</p>
<table cellspacing="5" cellpadding="5" width="744" border="0">
<tbody>
<tr>
<td valign="top" width="371">// C++ using Boost<br /><strong><font color="#0000ff">variant&lt; int, string &gt;</font></strong> x;<br />x = 42;<br />x = &#8220;hello, world&#8221;;<br />x = new Widget();</td>
<td valign="top" width="356">// say what types are allowed<br />// now x holds an int<br />// now x holds a string<br />// <strong>error</strong>, not int or string</td>
</tr>
</tbody>
</table>
<p>Unlike a union, a variant can include essentially any kind of type, but you have to say what the legal types are up front. You can even simulate getting overload resolution via boost::apply_visitor, which is checked statically (at compile time). </p>
<p>The second is Boost <a href="http://www.boost.org/doc/libs/1_35_0/doc/html/any.html"><strong>any</strong></a>:</p>
<table cellspacing="5" cellpadding="5" width="744" border="0">
<tbody>
<tr>
<td valign="top" width="371">// C++ using Boost<br /><strong><font color="#0000ff">any</font></strong> x;<br />x = 42;<br />x = &#8220;hello, world&#8221;;<br />x = new Widget();</td>
<td valign="top" width="356">
<p>// now x holds an int<br />// now x holds a string<br />// now x holds a Widget*</td>
</tr>
</tbody>
</table>
<p>Again unlike a union, an any can include essentially any kind of type. Unlike variant, however, any doesn&#8217;t make (or let) you say what the legal types are up front, which can be good or bad depending how relaxed you want your typing to be. Also, any doesn&#8217;t have a way to simulate overload resolution, and it always requires heap storage for the contained object.</p>
<p>Interestingly, this shows how C++ is well and firmly (and let&#8217;s not forget efficiently) on the path of <a href="http://pico.vub.ac.be/~wdmeuter/RDL04/papers/Meijer.pdf">Static Typing Where Possible, and Dynamic Typing When Needed</a>. </p>
<p>Use <strong>variant</strong> when: </p>
<ul>
<li>You want an object that holds a value of one of a specific set of types.
<li>You want compile-time checked visitation.
<li>You want the efficiency of stack-based storage where possible scheme (avoiding the overhead of dynamic allocation).
<li>You can live with horrible error messages when you don’t type it exactly right.</li>
</ul>
<p>Use <strong>any</strong> when: </p>
<ul>
<li>You want the flexibility of having an object that can hold a value of virtually “any” type.
<li>You want the flexibility of any_cast.
<li>You want the no-throw exception safety guarantee for swap.</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/93/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/93/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=93&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/06/20/type-inference-vs-staticdynamic-typing/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Stroustrup &amp; Sutter on C++: The Interviews</title>
		<link>http://herbsutter.wordpress.com/2008/06/10/stroustrup-sutter-on-c-the-interviews/</link>
		<comments>http://herbsutter.wordpress.com/2008/06/10/stroustrup-sutter-on-c-the-interviews/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 06:56:17 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/06/10/stroustrup-sutter-on-c-the-interviews/</guid>
		<description><![CDATA[While Bjarne and I were at SD for S&#38;S, we took time out to do an interview together with Ted Neward for InformIT. I just got word that it went live&#8230; here are the links.
On the OnSoftware – Video (RSS):

OnSoftware &#8211; Bjarne Stroustrup &#38; Herb Sutter on the Future of C++ &#8211; Part 1
OnSoftware &#8211; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=92&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>While Bjarne and I were at SD for <a href="http://herbsutter.wordpress.com/2008/01/22/stroustrup-sutter-on-c-march-3-4-2008-in-santa-clara-ca-usa/">S&amp;S</a>, we took time out to do an interview together with Ted Neward for InformIT. I just got word that it went live&#8230; here are the links.</p>
<p>On the OnSoftware – Video (<a href="http://www.podango.com/feeds/feed.php?pid=2066&amp;amid=1&amp;returnType=all">RSS</a>):</p>
<ul>
<li><a href="http://www.podango.com/podcast_episode/2066/75497/OnSoftware_video/OnSoftware__Bjarne_Stroustrup__Herb_Sutter_on_the_Future_of_C__Part_1">OnSoftware &#8211; Bjarne Stroustrup &amp; Herb Sutter on the Future of C++ &#8211; Part 1</a>
<li><a href="http://www.podango.com/podcast_episode/2066/75496/OnSoftware_video/OnSoftware__Bjarne_Stroustrup__Herb_Sutter_on_the_Future_of_C__Part_2">OnSoftware &#8211; Bjarne Stroustrup &amp; Herb Sutter on the Future of C++ &#8211; Part 2</a></li>
</ul>
<p>On the OnSoftware – Audio (<a href="http://www.podango.com/feeds/feed.php?pid=2243&amp;amid=1&amp;returnType=all">RSS</a>):
<ul>
<li><a href="http://www.podango.com/podcast_episode/2243/74759/OnSoftware_audio/OnSoftware__Bjarne_StroustrupHerb_Sutter_on_the_Future_of_C__Part_1">OnSoftware &#8211; Bjarne Stroustrup &amp; Herb Sutter on the Future of C++ &#8211; Part 1</a>
<li><a href="http://www.podango.com/podcast_episode/2243/74758/OnSoftware_audio/OnSoftware__Bjarne_StroustrupHerb_Sutter_on_the_Future_of_C__Part_2">OnSoftware &#8211; Bjarne Stroustrup &amp; Herb Sutter on the Future of C++ &#8211; Part 2</a></li>
</ul>
<p>Enjoy!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/92/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/92/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=92&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/06/10/stroustrup-sutter-on-c-the-interviews/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Memory Model talk at Gamefest 2008</title>
		<link>http://herbsutter.wordpress.com/2008/06/10/memory-model-talk-at-gamefest-2008/</link>
		<comments>http://herbsutter.wordpress.com/2008/06/10/memory-model-talk-at-gamefest-2008/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 06:27:16 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Concurrency]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/06/10/memory-model-talk-at-gamefest-2008/</guid>
		<description><![CDATA[I&#8217;ll be giving a memory model talk at Gamefest in Seattle next month. Here&#8217;s a quick summary:
Memory Models: Foundational Knowledge for Concurrent CodeJuly 22-23, 2008Gamefest 2008Seattle, WA, USA
A memory model defines a contract between the programmer and the execution environment, that trades off:

programmability via stronger guarantees for programmers, vs.
performance via greater flexibility for reordering program [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=91&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ll be giving a memory model talk at <a href="http://www.xnagamefest.com/">Gamefest</a> in Seattle next month. Here&#8217;s a quick summary:</p>
<blockquote><p><strong>Memory Models: Foundational Knowledge for Concurrent Code<br /></strong>July 22-23, 2008<br /><a href="http://www.xnagamefest.com/"><strong>Gamefest 2008</strong></a><strong><br /></strong>Seattle, WA, USA</p>
<p>A <em>memory model</em> defines a contract between the programmer and the execution environment, that trades off:
<ul>
<li>programmability via stronger guarantees for programmers, vs.</li>
<li>performance via greater flexibility for reordering program memory operations.</li>
</ul>
<p>The “execution environment” includes everything from the compiler and optimizer on down to the CPU and cache hardware, and it really wants to help you by reordering your program to make it run faster. You, on the other hand, you want it to <em>not</em> help you excessively in ways that will break the meaning of your code. In this talk, we’ll consider why a memory model is important, how to achieve a reasonable balance, detailed considerations on current and future PC and Xbox platforms, and some best practices for writing solid concurrent code.</p>
</blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/91/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/91/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=91&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/06/10/memory-model-talk-at-gamefest-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>
	</item>
		<item>
		<title>Effective Concurrency: Maximize Locality, Minimize Contention</title>
		<link>http://herbsutter.wordpress.com/2008/05/23/effective-concurrency-maximize-locality-minimize-contention/</link>
		<comments>http://herbsutter.wordpress.com/2008/05/23/effective-concurrency-maximize-locality-minimize-contention/#comments</comments>
		<pubDate>Fri, 23 May 2008 21:53:54 +0000</pubDate>
		<dc:creator>Herb Sutter</dc:creator>
				<category><![CDATA[Concurrency]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://herbsutter.wordpress.com/2008/05/23/effective-concurrency-maximize-locality-minimize-contention/</guid>
		<description><![CDATA[The latest Effective Concurrency column, &#8220;Maximize Locality, Minimize Contention&#8221;, just went live on DDJ&#8217;s site, and also appears in the print magazine. From the article:
Want to kill your parallel application&#8217;s scalability? Easy: Just add a dash of contention.
Locality is no longer just about fitting well into cache and RAM, but also about avoiding scalability busters [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=90&subd=herbsutter&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>The latest <strong>Effective Concurrency</strong> column, <strong><a href="http://ddj.com/architect/208200273">&#8220;Maximize Locality, Minimize Contention&#8221;</a></strong>, just went live on DDJ&#8217;s site, and also appears in the print magazine. From the article:</div>
<blockquote><p><em><img height="119" alt="ec11-fig2" src="http://herbsutter.files.wordpress.com/2008/05/ec11-fig2-thumb.png?w=240&#038;h=119" width="240" align="right"><em>Want to kill your parallel application&#8217;s scalability? Easy: Just add a dash of contention</em>.</em></p>
<p>Locality is no longer just about fitting well into cache and RAM, but also about avoiding scalability busters by keeping tightly coupled data physically close together and separately used data far, far apart. &#8230;</p>
</blockquote>
<div>I hope you enjoy it.</div>
<div>&nbsp;</div>
<div>Finally, here are links to previous Effective Concurrency columns (based on the dates they hit the web, not the magazine print issue dates):</div>
<table cellspacing="5" cellpadding="5" width="555" border="0">
<tbody>
<tr>
<td valign="top" width="114">July 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/200001985">The Pillars of Concurrency</a></td>
</tr>
<tr>
<td valign="top" width="114">August 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/201202924">How Much Scalability Do You Have or Need?</a></td>
</tr>
<tr>
<td valign="top" width="114">September 2007</td>
<td valign="top" width="422"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://ddj.com/cpp/201804238">Use Critical Sections (Preferably Locks) to Eliminate Races</a></td>
</tr>
<tr>
<td valign="top" width="114">October 2007</td>
<td valign="top" width="422"><a title="Use Critical Sections (Preferably Locks) to Eliminate Races" href="http://www.ddj.com/hpc-high-performance-computing/202401098">Apply Critical Sections Consistently</a></td>
</tr>
<tr>
<td valign="top" width="114">November 2007</td>
<td valign="top" width="422"><a href="http://herbsutter.spaces.live.com/blog/cns!2D4327CC297151BB!342.entry"><a title="Avoid Calling Unknown Code While Inside a Critical Section" href="http://ddj.com/architect/202802983">Avoid Calling Unknown Code While Inside a Critical Section</a></a></td>
</tr>
<tr>
<td valign="top" width="114">December 2007</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/204801163">Use Lock Hierarchies to Avoid Deadlock</a></td>
</tr>
<tr>
<td valign="top" width="114">January 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/cpp/205900309">Break Amdahl&#8217;s Law!</a></td>
</tr>
<tr>
<td valign="top" width="114">February 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/206100542">Going Superlinear</a></td>
</tr>
<tr>
<td valign="top" width="114">March 2008</td>
<td valign="top" width="422"><a href="http://www.ddj.com/hpc-high-performance-computing/206903306">Super Linearity and the Bigger Machine</a></td>
</tr>
<tr>
<td valign="top" width="114">April 2008</td>
<td valign="top" width="422"><a href="http://ddj.com/architect/207100682">Interrupt Politely</a></td>
</tr>
<tr>
<td valign="top" width="114">May 2008</td>
<td valign="top" width="422"><a href="http://ddj.com/architect/208200273">Maximize Locality, Minimize Contention</a></td>
</tr>
</tbody>
</table>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/herbsutter.wordpress.com/90/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/herbsutter.wordpress.com/90/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/herbsutter.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/herbsutter.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/herbsutter.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/herbsutter.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/herbsutter.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/herbsutter.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/herbsutter.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/herbsutter.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/herbsutter.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/herbsutter.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=herbsutter.wordpress.com&blog=3379246&post=90&subd=herbsutter&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://herbsutter.wordpress.com/2008/05/23/effective-concurrency-maximize-locality-minimize-contention/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c0ba56bfd231f8f04feb057728975181?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Herb Sutter</media:title>
		</media:content>

		<media:content url="http://herbsutter.files.wordpress.com/2008/05/ec11-fig2-thumb.png" medium="image">
			<media:title type="html">ec11-fig2</media:title>
		</media:content>
	</item>
	</channel>
</rss>