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

<channel>
	<title>Hyperextended Metaphor &#187; computer science</title>
	<atom:link href="http://innocuous.org/articles/tag/computer-science/feed/" rel="self" type="application/rss+xml" />
	<link>http://innocuous.org</link>
	<description>Richard Tibbetts on Various Topics</description>
	<lastBuildDate>Sat, 12 Feb 2011 14:19:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Proactive Assumption Violation: Avoiding Bugs By Behaving Badly</title>
		<link>http://innocuous.org/articles/2010/11/14/proactive-assumption-violation-avoiding-bugs-by-behaving-badly/</link>
		<comments>http://innocuous.org/articles/2010/11/14/proactive-assumption-violation-avoiding-bugs-by-behaving-badly/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 03:38:46 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/11/14/proactive-assumption-violation-avoiding-bugs-by-behaving-badly/</guid>
		<description><![CDATA[Bugs are a fact of life in software, and probably always will be. Some bugs are probably unavoidable, but a lot of bugs can be avoided through good architecture, defensive programming, immutability, and other techniques. One major source of bugs, especially frustrating bugs, is non-deterministic behavior. Every programmer has experienced bugs which don&#8217;t reproduce, which [...]]]></description>
			<content:encoded><![CDATA[<p>Bugs are a fact of life in software, and probably always will be. Some bugs are probably unavoidable, but a lot of bugs can be avoided through good architecture, defensive programming, immutability, and other techniques. One major source of bugs, especially frustrating bugs, is non-deterministic behavior. Every programmer has experienced bugs which don&#8217;t reproduce, which require a special environment, or special timing, or even just luck to make happen. To avoid these bugs, programmers learn to favor determinism, making sure their software behaves the same way every time.</p>
<p>But sometimes a little extra non-determinism can help to avoid bugs. When designing a library the specification may contain caveats which the implementation does not exercise. If a program only ever uses one implementation, or doesn&#8217;t exercise the full range of behaviors while testing, then the program may depend on behaviors which are an artifact of the implementation. When an alternative implementation is used, or circumstances exercise other behaviors, then the program will exhibit bugs. What I would like to suggest is that instead the implementation proactively violate any assumptions the client might have, by deliberately and non-deterministically taking advantage of all the caveats in the interface specification. This will force clients to code defensively, and help to eliminate this class of bugs.</p>
<p>For example, an interface for Set might include iteration, but say that iteration order is unspecified. Most Set implementations, like Java&#8217;s HashSet, will iterate in a stable order if the set doesn&#8217;t change. The order might even be consistent from one run of the program to the next. But if programs depend on iteration stability, substituting a different implementation, such as one based on a <a href="http://en.wikipedia.org/wiki/Splay_tree" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">splay tree</a>, will introduce bugs. If instead the implementation of Set iteration deliberately returned a different iteration order each time, then programs would be unable to depend upon it.</p>
<p>For a real-world example, consider the standard C function <a href="http://opengroup.org/onlinepubs/007908799/xsh/memcpy.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/opengroup.org');">memcpy</a>. According to the specification, if the source and destination buffers overlap, behavior is undefined. But what does undefined really mean? Recently, <a href="http://article.gmane.org/gmane.comp.lib.glibc.alpha/15278" onclick="javascript:pageTracker._trackPageview('/outbound/article/article.gmane.org');">Linux switched to a new memcpy implementation</a>, one which copies backwards (high bytes first, low bytes last), because it is faster on modern hardware. The result is a dramatic change in overlapping buffer behavior, leading to difficult to isolate bugs like <a href="https://bugzilla.redhat.com/show_bug.cgi?id=638477" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugzilla.redhat.com');">Red Hat Bug 639477: Strange sound on mp3 flash website</a>. The bug was eventually <a href="https://bugzilla.redhat.com/show_bug.cgi?id=638477#c31" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugzilla.redhat.com');">tracked down to memcpy using valgrind</a>. But if the original memcpy had been more deliberately harmful in the case of overlapping buffers, than bugs like this would not be created in the first place.</p>
<p>Another place where this comes up is thread safety. Many APIs are not thread safe, but the results of using them in a thread-unsafe way are benign, or unlikely. Take the Java DOM API for XML documents. This is not a thread safe API, which is not surprising for a complex mutable data structure. What is a bit surprising is that even just reading the Java DOM from multiple threads can have unintended consequences. This is because of a cache for reuse of Node objects, and the failure mode is that very occasionally accessor functions return null when they are called from multiple threads simultaneously. Debugging a program that was suffering from this behavior took several hours, because the undesirable behavior is very infrequent. Is there a way we can apply the principle of proactive assumption violation to make this sort of bug less common?</p>
<p>System that cope with infrastructure faults by degrading their behavior are another case where proactive assumption violation can reduce bugs later. NoSQL databases are well known for taking approaches like eventual consistency in order to offer better performance and availability. But that means that when the system is under heavy load or suffering from partial outages, consistency may take a long time to resolve. I ran into this as a user of Netflix the other night. My television and my laptop had two different ideas of what my current Netflix queue contained; my television couldn&#8217;t see the recent updates. It turns out there is even a <a href="http://www.slideshare.net/adrianco/no-sq-lfornetflix" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.slideshare.net');">slide deck from Netflix</a> describing the architecture choices that led to my undesirable user experience. Most of the time things are consistent enough that I wouldn&#8217;t see this asynchrony. But when I do see it, as a user there is no obvious way to get around it or even to know that it is happening. Would a NoSQL infrastructure that let consistency drift more often end up with better average user experience?</p>
<p>Clients of interfaces often make assumptions about how those interfaces work, assumptions that are explicitly or implicitly not part of the spec. But if implementations of the interface don&#8217;t violate those assumptions, then programs can be developed which require them to be true. This leads to unexpected and expensive bugs if and when those assumptions are violated. One solutions is for implementations to deliberately violate these assumptions, for no other reason than to force clients of their interface to future-proof. The result is more work up front for programmers, but fewer bugs in the long run.</p>
<p>What do you think about proactive assumption violation? Is it a technique you have ever used? Have you experienced bugs which would be avoided if others had employed proactive assumption violation?</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/11/14/proactive-assumption-violation-avoiding-bugs-by-behaving-badly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Platonic Browser Session Management</title>
		<link>http://innocuous.org/articles/2010/07/26/platonic-browser-session-management/</link>
		<comments>http://innocuous.org/articles/2010/07/26/platonic-browser-session-management/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 05:04:01 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/07/26/platonic-browser-session-management/</guid>
		<description><![CDATA[Firefox just crashed, and when I restarted it I was informed that it had some trouble reopening my 115 tabs. Understandable, but I went ahead and clicked the button that encouraged it to try harder. The result, after consuming what would have been several thousand dollars of computer time back when they charged for it, [...]]]></description>
			<content:encoded><![CDATA[<p>Firefox just crashed, and when I restarted it I was informed that it had some trouble reopening my 115 tabs. Understandable, but I went ahead and clicked the button that encouraged it to try harder. The result, after consuming what would have been several thousand dollars of computer time back when they charged for it, is that I&#8217;m back in the mess I made myself, with an unmanageable collection of pages open, covering topics like faucets, washing machines, coffee brewing, JVMs, whatever else came out of Google Reader, and the research I was doing for this post.</p>
<p>Our civilization has had tabbed interfaces since <a href="http://en.wikipedia.org/wiki/Tab_(GUI)#History" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">1988</a>. Mainstream browsers (well, Mozilla) have supported tabbed browsing since 2001. As tabbing has become more mainstream, as the web has gotten more complex, and as computers have gotten fast enough to handle dozens of open web pages, people have opened more and more tabs. The result is that nearly everyone knows the experience of &#8220;just having to close some tabs&#8221; before you reboot, or so you can get on with more important work. It&#8217;s easy to overwhelm yourself with the amount of content you can have open in tabs, and clearing it out is often an archeological experience spanning the last week or month of your web activities.</p>
<p>Browser tab management represents the greatest software usability challenge of our time. We are all facing information overload of one form or another, and this is an opportunity to improve the way people find, consume, retain, and manage information. Lately we are seeing a lot of attempts at innovation here, from Chrome&#8217;s tear-away tabs and performance optimization, to Firefox extensions like <a href="https://addons.mozilla.org/en-US/firefox/addon/5244/" onclick="javascript:pageTracker._trackPageview('/outbound/article/addons.mozilla.org');">Ctrl-Tab</a>. Most recently today we saw <a href="http://www.azarask.in/blog/post/tabcandy/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.azarask.in');">Tab Candy</a>, a preview of new functionality in <a href="http://www.mozilla.com/en-US/firefox/beta/features/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mozilla.com');">Firefox 4</a>.</p>
<p>I&#8217;ve often said that I&#8217;ll switch to the first browser that doesn&#8217;t make me feel guilty for having 100+ open tabs. Looking at Tab Candy and other innovations, I see that we are moving in the right direction. But there are still many aspect of the problem that aren&#8217;t being sufficiently addressed.</p>
<ul>
<li>Application-oriented tab organization &#8211; Many of the sites I use today are really applications, whether it is Google Docs, Facebook, or Amazon. Taking application behavior into account, and helping me to avoid opening the same heavy application (e.g. gmail) multiple times is part of getting tab management correct.</li>
<li>Automatic tab organization &#8211; Systems like Tab Candy require that users manage tabs. But wouldn&#8217;t it be better if tabs were managed and grouped automatically?</li>
<li>Managing the tab/bookmark continuum &#8211; Leaving something open in a tab, or opening it in a tab, is often a way of deciding to come back to it later. Bookmarks accomplish the same thing, but most people&#8217;s bookmarks are themselves a usability nightmare. Automatically migrating tabs into bookmarks and bookmarks back into tabs might be the solution to a lot of these tab problems.</li>
<li>Excursion and history management &#8211; Web browsing isn&#8217;t a linear process, the way browser history would have you think. It is at least a branching tree, which tabs support. But often the process of web browsing is a product itself, as when researching a new subject or deciding on a purchase. Being able to not only manage the process as it is happening, but also to archive it for later resumption or reference, would improve the efficiency of many browser tasks.</li>
<li>CPU efficiency &#8211; An implementation detail to be sure, but one of the obstacles to running with 100+ tabs is the CPU load of all the little Javascripts. Some way to manage this, pausing or closing pages which are not visible, is likely to be required.</li>
</ul>
<p>As you can see, there is still plenty of room for improvement in the browser interface, particularly around large numbers of tabs. What other cutting edge stuff have you seen? What would you like to see implemented?</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/07/26/platonic-browser-session-management/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DEBS 2010 Highlights</title>
		<link>http://innocuous.org/articles/2010/07/18/debs-2010-highlights/</link>
		<comments>http://innocuous.org/articles/2010/07/18/debs-2010-highlights/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 02:49:09 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[event processing]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/07/18/debs-2010-highlights/</guid>
		<description><![CDATA[I spent the first half of last week at DEBS 2010 at King&#8217;s College in Cambridge, UK. It was a great conference, many good papers and interesting attendees. As usual some of the best ideas came from the hallway sessions. But I&#8217;d like to provide some pointers to my favorite papers of the conference:

David Jeffery&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>I spent the first half of last week at <a href="http://debs10.doc.ic.ac.uk/" onclick="javascript:pageTracker._trackPageview('/outbound/article/debs10.doc.ic.ac.uk');">DEBS 2010</a> at King&#8217;s College in Cambridge, UK. It was a great conference, many good papers and interesting attendees. As usual some of the best ideas came from the hallway sessions. But I&#8217;d like to provide some pointers to my favorite papers of the conference:</p>
<ul>
<li>David Jeffery&#8217;s <a href="http://portal.acm.org/citation.cfm?id=1827418.1827447&amp;coll=portal&amp;dl=GUIDE" onclick="javascript:pageTracker._trackPageview('/outbound/article/portal.acm.org');">keynote</a> on Betfair&#8217;s event driven architecture, past present and future. David presented not only on the performance challenges of running the core betting exchange, but also on the soft benefits. Thanks to their event driven architecture, Betfair is able to do more experimentation with less disruption, and be more agile as an organization.</li>
<li>Dan O&#8217;Keeffe presented <a href="http://portal.acm.org/citation.cfm?id=1827418.1827429&amp;coll=portal&amp;dl=GUIDE" onclick="javascript:pageTracker._trackPageview('/outbound/article/portal.acm.org');">Reliable Complex Event Detection for Pervasive Computing</a>, a system for compensating for missing data. Most importantly, it lays out a selection of strategies that developers can select and the system can use to automatically choose the correct approach, based on wether the system should be optimistic, pessimistic, or something in between.</li>
<li><a href="http://www.cs.cornell.edu/projects/quicksilver/public_pdfs/DEBS-CRC.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cs.cornell.edu');">Quilt: A Patchwork of Multicast Regions</a> was presented by one of the local students on short notice, because the author was not able to attend due to visa problems. This is especially frustrating when the paper is so interesting and the analysis quite strong. Quilt is a system for combining multiple delivery mechanisms to achieve efficient wide area distribution. Combining overlay-network based protocols with &#8220;patches&#8221; of true multicast where available, Quilt optimizes message routing for efficiency, reliability, and latency.</li>
<li><a href="http://portal.acm.org/citation.cfm?id=1827418.1827459&amp;coll=portal&amp;dl=GUIDE" onclick="javascript:pageTracker._trackPageview('/outbound/article/portal.acm.org');">An Approach for Iterative Event Pattern Recommendation</a> which was also presented by a colleague rather than one of the authors due to visa issues. The paper describes a system for recommending event patterns to domain experts based on their initial attempts to define the pattern. In a controlled user study, the recommendation system substantially reduced the time taken by users to define novel patterns. It was good to see a real user study of a programming efficiency system, but there is lots of room for further measurement.</li>
<li><a href="http://portal.acm.org/citation.cfm?id=1827418.1827460&amp;coll=portal&amp;dl=GUIDE" onclick="javascript:pageTracker._trackPageview('/outbound/article/portal.acm.org');">Experiences with Codifying Event Processing Function Patterns</a>, presented by the author Anand Ranganathan, dealt with a different kind of pattern. In systems using Ranganathan&#8217;s system, developers build template network flows, annotated with tags to define what components can be used in the flow. Any component that matches the inputs, outputs, and tags can be inserted into the template, and all possible template instantiations represent a domain of valid applications. End users are able to search this combinatorially large domain with a flexible interface, to find and instantiate applications that meet their needs.</li>
</ul>
<p>There are many great papers and talks not listed here. Obviously my own bias shows, as does the fact that I didn&#8217;t attend every talk or read every paper.</p>
<p>Unfortunately most of the links go to the ACM portal, which doesn&#8217;t offer public access. My frustration with and thoughts on the future of academic publishing will have to wait for a future post. I recommend googling the titles and finding them on author pages if you can. Or ping me and I can send you papers.</p>
<p>Next year the conference will be hosted in New York by IBM research. Whether you attended or not, if you have any feedback on how to make the conference more appealing, I&#8217;m happy to hear it.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/07/18/debs-2010-highlights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Normal Accidents and Stock Market Crashes</title>
		<link>http://innocuous.org/articles/2010/06/14/normal-accidents-and-stock-market-crashes/</link>
		<comments>http://innocuous.org/articles/2010/06/14/normal-accidents-and-stock-market-crashes/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 15:31:14 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[finance]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/06/14/normal-accidents-and-stock-market-crashes/</guid>
		<description><![CDATA[In the weeks since the precipitous and brief stock market crash on May 6th, I have found myself answering questions about it from people outside the capital markets and discussing it with insiders on many occasions. While I have some thoughts about what went on, I&#8217;m often unable to satisfy people&#8217;s desire to blame a [...]]]></description>
			<content:encoded><![CDATA[<p>In the weeks since the precipitous and brief stock market crash on May 6th, I have found myself answering questions about it from people outside the capital markets and discussing it with insiders on many occasions. While I have some thoughts about what went on, I&#8217;m often unable to satisfy people&#8217;s desire to blame a single precipitating cause. I think what is going on is that too few people understand the nature of complex systems and what is called a &#8220;normal accident.&#8221; Given the sophistication of the markets, the number of safety checks and balances, as well as the complexity of the implementations, it is not surprising that events such as May 6th happened, nor should people think it is possible to entirely eliminate them.</p>
<p>Normal Accidents (or as wikipedia calls them &#8220;<a href="http://en.wikipedia.org/wiki/System_accident" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">System Accidents</a>&#8220;) are major failures caused by unintended and unexpected interactions of many small failures. The term was coined by Yale professor <a href="http://www.yale.edu/sociology/faculty/pages/perrow/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.yale.edu');">Charles Perrow</a> in his book <a href="http://www.amazon.com/exec/obidos/ASIN/0691004129/innocuousorg-20/ref=nosim/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amazon.com');">Normal Accidents: Living with High-Risk Technologies</a>. Complex systems fail for complex reasons. In systems engineered for safety and redundancy the failures that do happen require many contributing factors. Perrow&#8217;s focus was on large industrial systems, such as power plants, chemical plants, aircraft, shipping, and military operations. TIme and again we see complex failures in places like Three Mile Island, the Challenger shuttle, or BP&#8217;s current oil spill.</p>
<p>In a normal accident, the contributing factors come from many areas and often many organizations. Errors result from poor regulation, lack of training, operator error, specification errors, mechanical failures, lax maintenance, poor morale, organizational structures, economic incentives, and many other areas. Because systems are tightly coupled, many of these factors are able to mutually reinforce one another to lead to systemic failure. The resulting cascade of failures can look like a Rube-Goldberg machine in it&#8217;s complexity.</p>
<p>In these tightly coupled systems, potential-normal-accidents are happening all the time. Systems are too complex to be entirely without failures. However, in the common case these partial failures are caught and resolved quietly. In fact, these near misses are an opportunity to understand the unintended failure modes of the system. Rather than build once and deploy, safety must be a continuous process of improvement and understanding. Systems aren&#8217;t stable and they are not deployed in a vacuum. As they evolve, failures and near misses must be examined and used to drive improvements.</p>
<p>Software, especially modern networked software, dramatically increases the incidence of normal accidents. As anyone who has ever created, deployed, and debugged software knows, it is common for individual software bugs to have all the characteristics of a normal accident all by themselves. Add together software written by multiple different organizations connecting over a network and it&#8217;s a wonder anything works at all.</p>
<p>Getting back to the events of May 6th, the &#8220;<a href="http://en.wikipedia.org/wiki/May_6,_2010_market_event" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Flash Crash</a>&#8220;, they are best explained as a system accident. People have tried to blame one cause or another, from a fat fingered trader or a faulty brokerage system, to investor agitation over Greek debt and high frequency trading firms going wild, to the NYSE hybrid market system, bugs in other members of the national market system, and outdated circuit breaker regulations. Without going into detail about all these potential causes, I&#8217;d like to suggest that the most likely explanation is that all of these causes, together, are what created the exceptional failure of market prices, broken trades, and finger pointing. No one cause is really more precipitating than any other, and apportioning blame is much less important than understanding in detail what happened.</p>
<p>It is impossible to eliminate normal accidents as we increase the complexity of our systems. The best we can do is to learn from accidents, and from near misses, to introduce the kind of slack in our systems that will protect us from the worst accidents. Learning requires transparency. But in systems which cross organizational and regulatory boundaries, with billions of dollars and reputations at stake, transparency is going to be a challenge.</p>
<p><i>PS: If you&#8217;re interest in learning more, I suggest this</i> <a href="http://www.hq.nasa.gov/office/codeq/accident/accident.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.hq.nasa.gov');"><i>NASA powerpoint on normal accidents</i></a><i>.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/06/14/normal-accidents-and-stock-market-crashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>End of the World Insurance: the Financial Halting Problem</title>
		<link>http://innocuous.org/articles/2010/05/02/end-of-the-world-insurance-the-financial-halting-problem/</link>
		<comments>http://innocuous.org/articles/2010/05/02/end-of-the-world-insurance-the-financial-halting-problem/#comments</comments>
		<pubDate>Mon, 03 May 2010 01:30:35 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[theory]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/05/02/end-of-the-world-insurance-the-financial-halting-problem/</guid>
		<description><![CDATA[In computer science, the halting problem is very well known. The problem states that it is impossible to build a software program that can analyze other software programs to determine if they will eventually terminate, or halt. This is a useful problem to understand, because many software problems that look possible at first can be [...]]]></description>
			<content:encoded><![CDATA[<p>In computer science, the <a href="http://en.wikipedia.org/wiki/Halting_problem" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">halting problem</a> is very well known. The problem states that it is impossible to build a software program that can analyze other software programs to determine if they will eventually terminate, or halt. This is a useful problem to understand, because many software problems that look possible at first can be reduced to the halting problem and thus demonstrated to be impossible. It&#8217;s common to hear someone say &#8220;actually, that seems like a halting problem&#8221; when discussing compiler optimization, program analysis, and related problems in computer science. This is much like a physicist might say &#8220;but that&#8217;s perpetual motion.&#8221;</p>
<p>In the sphere of financial derivatives, our civilization has recently come to understand that there are a whole class of financial products which look attractive, and perform reasonably well some of the time, but which eventually fail. The most obvious of these are the <a href="http://www.investopedia.com/terms/c/creditdefaultswap.asp" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.investopedia.com');">credit default swaps</a> of the latest crisis. But other examples include <a href="http://www.investopedia.com/terms/p/portfolioinsurance.asp" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.investopedia.com');">portfolio insurance</a>, made famous in the 1987 market crash. The problem with these products is that they are designed to protect the buyer against losses in all circumstances, even when the market is behaving badly. But when the market is behaving badly, it can behave very badly. These products reduce to <a href="http://blogs.reuters.com/felix-salmon/2010/02/08/citi-reinvents-end-of-the-world-insurance/" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.reuters.com');">end of the world insurance</a>. When the world is ending, who is left to pay out the insurance?</p>
<p>I think there is a useful parallel to the halting problem. If your new financial product can be used as end of the world insurance, it probably will be. And since end of the world insurance is fundamentally flawed, it should raise questions about what your product is really accomplishing.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/05/02/end-of-the-world-insurance-the-financial-halting-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synthetic Biology and Big Ball of Mud</title>
		<link>http://innocuous.org/articles/2010/04/04/synthetic-biology-and-big-ball-of-mud/</link>
		<comments>http://innocuous.org/articles/2010/04/04/synthetic-biology-and-big-ball-of-mud/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 03:25:38 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[biology]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/04/04/synthetic-biology-and-big-ball-of-mud/</guid>
		<description><![CDATA[Researchers at the MIT OpenWetWare project are attempting to engineer Synthetic Biology, creating reusable and composable biological components that can be combined to create useful organisms. In the process, they are discovering that biological systems don&#8217;t follow the same patterns of good architecture familiar to us from software.
In software engineering, architecture is perceived as critical [...]]]></description>
			<content:encoded><![CDATA[<p>Researchers at the <a href="http://openwetware.org/wiki/Main_Page" onclick="javascript:pageTracker._trackPageview('/outbound/article/openwetware.org');">MIT OpenWetWare</a> project are attempting to engineer <a href="http://www.eecs.mit.edu/bioeecs/SyntheticBio.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.eecs.mit.edu');">Synthetic Biology</a>, creating reusable and composable biological components that can be combined to create useful organisms. In the process, they are discovering that biological systems don&#8217;t follow the same patterns of good architecture familiar to us from software.</p>
<p>In software engineering, architecture is perceived as critical to the success of a large implementation project, and also to the ongoing maintenance of the code created. Since software is very expensive, there is a lot of focus on architecture, choosing the right architecture, and making sure that the architecture is faithfully executed. Some of the biggest changes in software in the last 30 years, like object oriented programming and service oriented architecture, have come about because of a need for clearer architecture in ever larger collections of software that run modern life.</p>
<p>Architecture analysis also extends to describing anti-patterns, those things which do not work and are to be avoided. Probably the most famous anti-pattern is the <a href="http://www.laputan.org/mud/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.laputan.org');">Big Ball of Mud</a>. A big ball of mud is what you get when software has evolved for many years without any clear architecture, where all abstraction barriers and divisions of responsibility have eroded in the interest of expediency and incremental functionality. The interesting thing about big balls of mud is that as a rule they work, and they are remarkably common. It can be very difficult to maintain them, almost maddening. But as long as they are economically valuable enough to justify their care and feeding, they tend to persist.</p>
<p>What people fail to realize about big balls of mud is that they represent a certain kind of efficiency. Maybe not efficiency from a top down, best way to solve the problem kind of approach. But every change is efficient in its own way. Engineers, either fearful of breaking the system or just lazy, make the smallest possible modifications, or the ones they are best able to understand. Abstractions are violated, variables and identifiers are reused, values are overloaded. All of these changes represent efficiently as much as they represent &#8220;bad&#8221; software engineering.</p>
<p>Biological systems follow the same pattern. Because of the pressures of evolution, they are filled with abstraction violations, repurposed functionality, and tight coupling. The mechanics of genetics and evolution drive change, and generally result in the smallest possible sufficient change. Tight coupling leads to efficiency and reuse. Like a big ball of mud in software, the system is difficult to understand by decomposing it into parts. Like these software systems, complex biological systems are filled with shortcuts that work most of the time, implementation details that blossom into major behaviors.</p>
<p>Read Montague covers this in his recent book <a href="http://www.amazon.com/exec/obidos/ASIN/B001A5Q3WS/innocuousorg-20/ref=nosim/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amazon.com');">Your Brain is (Almost) Perfect: How We Make Decisions</a>. The original title was the clever <a href="http://www.amazon.com/exec/obidos/ASIN/B001A5Q3WS/innocuousorg-20/ref=nosim/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amazon.com');">Why Choose This Book</a> (bringing to mind Abbie Hoffman&#8217;s <a href="http://www.amazon.com/exec/obidos/ASIN/156858217X/innocuousorg-20/ref=nosim/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amazon.com');">Steal This Book</a>). While most of the narrative focused on decision making in the face of limited information, the overriding principle that Montague argues from is that biological systems favor efficiency above all else. He argues that to make more efficient computers, they will need to emulate both the frailties and the strengths of biological systems.</p>
<p>As a student of programming languages and programming methodology, I&#8217;m intrigued by the potential for developing software systems that are highly efficient due to their high degree of coupling. The closest thing currently available is whole program analysis like the <a href="http://repetae.net/computer/jhc/" onclick="javascript:pageTracker._trackPageview('/outbound/article/repetae.net');">Haskell Jhc compiler</a> or the <a href="http://gcc.gnu.org/wiki/LinkTimeOptimization" onclick="javascript:pageTracker._trackPageview('/outbound/article/gcc.gnu.org');">GCC Link Time Optimizer</a>. However, while both of these systems consider the whole program for optimization, neither is likely to produce a highly coupled or minimal program. For that the state of the art is the <a href="http://en.wikipedia.org/wiki/Superoptimization" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">superoptimizer</a>, either the <a href="http://portal.acm.org/citation.cfm?id=36194" onclick="javascript:pageTracker._trackPageview('/outbound/article/portal.acm.org');">original superoptimizer from 1987</a> or more recent attempts like <a href="http://krr.cs.bath.ac.uk/index.php/TOAST" onclick="javascript:pageTracker._trackPageview('/outbound/article/krr.cs.bath.ac.uk');">TOAST</a>. In a superoptimizer, the entire space of potential programs is searched to find the shortest implementation of a given function. This can be very helpful in core tight loops, but exhaustive search is only helpful for very simple functions. None of these compare to the results of millions of years of evolution.</p>
<p>But what if we had something comparable to millions of years of evolution, but for software? For example, if we had nigh-infinite computational power available inexpensively by using cloud servers in off hours, how could we take advantage of it. To me, the interesting question is not how to build an evolution machine, but rather how to constrain it so that the result is a program you find useful.</p>
<p>In biology and bioengineering, the approach is called forced evolution. There are a variety of techniques, but the one I&#8217;m familiar with works for cases where you want to produce chemical X from source chemical Y. First, a bacteria is engineered by any means necessary that has a biological pathway that can survive by producing X from Y, however inefficiently. Next, all other ways for the bacteria to survive are knocked out, by disabling the genes that make those pathways work. Finally, the organism is left to reproduce and evolve in a Y-rich environment. Hopeful those organisms which best optimize the Y-&gt;X pathway are the ones that reproduce more and come to dominate in this environment. The result should be a bacteria much more efficient than could have been designed from scratch, at least using current bioengineering.</p>
<p>Can we use forced evolution to build better software? I think this breaks down into two parts. First, can we make this work? The place where evolution of simple bacteria has the advantage is in parallel computation. Each instance of the bacteria not only has its own variant of the software but also implements its own instance of the hardware to run it. Right now computational resources, even for simple compute jobs, are still many orders of magnitude more expensive than biological resources. That said, they are falling fast. 1 minute of compute on EC2 is fourteen-hundredths of a cent, the spot price, for low-priority computation, is a third of that, and the price of a fixed amount of computation is falling steadily. This kind of workload is quite happy to take advantage of modern parallel processors. Force evolution of computational processes might be economical before we know it.</p>
<p>The second questions is, assuming all that works, would we want the software it produced? Today, scientists are spending vast resources trying to understand the wetware developed by natural evolution, The worst software systems are quite simple in comparison. I would expect software created by evolution to be quite opaque. More worryingly, it might be sensitive to various characteristics of the machines or environment in which it evolved. The software would likely contain dead code, unexercised race conditions, unprotected parallel data access, and many other artifacts of unrestrained expedient modifications. A simple unit test suite, even with perfect coverage, would not be able to catch all these issues. We would need a stricter environment, a set of limitations on the solution space or tests for the result that would cull badly behaved implementations, rather than allowing them to take over.</p>
<p>If we could figure out how to control the correctness and environmental sensitivity of evolved software, then we could also control it for designed software. Given that most designed software rapidly trends towards big ball of mud, the most immediate benefit of any work in this area might not be controlling pseudo-biological processes, but in controlling the human driven processes, keeping them from getting out of hand.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/04/04/synthetic-biology-and-big-ball-of-mud/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Project Euler, MIT Mystery Hunt Edition</title>
		<link>http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/</link>
		<comments>http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 03:52:32 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[MIT]]></category>
		<category><![CDATA[Programming Languages]]></category>

		<guid isPermaLink="false">http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/</guid>
		<description><![CDATA[The MIT Mystery Hunt starts this Friday at noon, and I&#8217;ll be participating seriously for about my 10th year. In the hunt, teams solve a collection of puzzles to discover the location of a gold coin hidden somewhere on campus. The puzzles may be numerous (sometimes over 100), are generally provided without instructions (except when [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.mit.edu/~puzzle/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">MIT Mystery Hunt</a> starts this Friday at noon, and I&#8217;ll be participating seriously for about my 10th year. In the hunt, teams solve a collection of puzzles to discover the location of a gold coin hidden somewhere on campus. The puzzles may be numerous (sometimes over 100), are generally provided without instructions (except when they are provided with <a href="http://members.bellatlantic.net/~devjoe/dk2/dk2.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/members.bellatlantic.net');">painfully explicit instructions</a>), and the overall structure of the hunt is also unknown at the start. Hunt is nearly always finished before Monday, but during the 60 hours starting Friday at noon, many highly capable teams, some with several dozen members, will try their hardest to solve some very challenging puzzles.</p>
<p><a href="http://projecteuler.net/" onclick="javascript:pageTracker._trackPageview('/outbound/article/projecteuler.net');">Project Euler</a> is a neat website that presents a series of computer science problems suitable for students and non-students to practice the skill of writing algorithms to solve numerical puzzles. It&#8217;s a great way to learn a new programming language, or just to kill time in a mentally engaging way.</p>
<p>Two of the peculiarities of the MIT Mystery Hunt are that the puzzles are drawn from a wide range of domains, and that there are no restrictions on what resources can be brought to bear on a puzzle. The result is both puzzles that are explicitly about software (e.g. perl program cryptograms) as well as puzzles that are best solved by writing some kind of program. Many of my favorite puzzles over the years have come from this category. Some hunts have few, some hunts have many, but every year there is a call to write some kind of software solution to a puzzle.</p>
<p>The programming skills required to write puzzle solving programs in high pressure situations are different from those normally required to write software, and so it can be useful to practice them. I have collected and categorized here all of the software puzzles since the 2000 hunt. In most cases, I recommend attempting to solve the puzzle, knowing that software is likely the best way. But because the solutions are available, if you are stumped it can still be interesting to read the solution and attempt to duplicate it in software. In most cases the solution is linked from the puzzle page; where it is not I have provided a link. The categories here are presented from least elegant to most elegant, in my opinion. Feel free to jump around and do puzzles which you find attractive.</p>
<h2>Just Decompile It<br /></h2>
<p>A useful trick is to decompile any java applet or flash thing that you are given in a puzzle. The answer might just be in a string constant, though more likely it will just give you a different puzzle to solve.</p>
<ul>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/maze/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Maze (2005)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/4/4_7.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">String Theory (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/R/7_175/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Gnireenigne Lab (2003)</a> This reverse engineering puzzle is pretty challenging. Only one team solved it during the longest hunt on record.</li>
<li><a href="http://web.mit.edu/puzzle/www/02/green/B/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Cubology (2002)</a> Unfortunately decompiling this one doesn&#8217;t really help, but what the hey. (<a href="http://web.mit.edu/puzzle/www/02/green/B/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
<li><a href="http://web.mit.edu/puzzle/www/08/twisty_little_passages/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Twisty Little Passages (2008)</a> Not quite decompilation, but pulling the whole maze down to your local machine is the best way to handle this puzzle.</li>
</ul>
<h2>MIT Computing</h2>
<ul>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/kuala_lumpur/some_trolleys_named_lust/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Some Trolleys Named Lust (2006)</a> The title clues Moira, the computer system that does configuration management for MIT Athena, which has command line utilities named after characters from A Streetcar Named Desire. This puzzle contains components which are no longer online, so you are limited to reading through the solution.</li>
</ul>
<h2>Mathematical Manipulation and Brute Force Enumeration</h2>
<p>Many search problems can be solves on modern hardware with brute force enumeration, or maybe slightly smart enumeration.</p>
<ul>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/bars_of_soap/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Bars of Soap (2005)</a> Unfortunately the puzzle isn&#8217;t available, only the solution, though it still provides a useful programming exercise.</li>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/ginormous/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Ginormous (2005)</a> Prime factorization is always a fun thing to do with numbers.</li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/2/2_5.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">The Road Signs Of Unspeakable Chaos (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/01/phase3/7/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Mathophobia (2001)</a> (<a href="http://web.mit.edu/puzzle/www/01/Solutions/mathophobia.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
</ul>
<h2>Text Manipulation</h2>
<p>Sometimes a program is the easiest way to do a bulk text manipulation. Particularly when you need to experiment with various transforms, or might need to do them repeatedly. This includes basically all cryptograms, which I am not including here, though software often comes in handy solving them.</p>
<ul>
<li><a href="http://www.mit.edu/~puzzle/07/puzzles/blather/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Blather (2007)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/buenos_aires/decode_this/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Decode This (2006)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/buenos_aires/long_division/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Long Division (2006)</a> Not so much text manipulation as diagram manipulation, but you can get the diagram as postscript, which makes it easy to extract the data. Doesn&#8217;t help you figuring out the algorithm, but it does make trying out variations easier.</li>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/shotgun_wedding/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Shotgun Wedding (2005)</a> Gene sequencing also comes up occasionally. There are some pretty simple text matching algorithms that turn out to be critical parts of that work.</li>
<li><a href="http://web.mit.edu/puzzle/www/04/timbuktu/h2H/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Lost (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/04/neotokyo/gE5/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Reminders World (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/Training/tp-c.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Whoa &#8212; I have a Migraine! (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/02/round8/02/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Famous First Words (2002)</a> (<a href="http://web.mit.edu/puzzle/www/02/round8/02/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
<li><a href="http://web.mit.edu/puzzle/www/00/set2/1/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Lions and Tigers and Bears (2000)</a> My first attempt to solve a puzzle with software, this one wasn&#8217;t very successful, partly because of the challenge of getting the grid and the source data accurately input, and partly because of a slow algorithm. The fact that computers were notably slower in 2000 might have also been relevant. I think the most powerful machine available to me was an <a href="http://en.wikipedia.org/wiki/Ultra_5/10" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Ultra 10</a>. In the end people doing it by hand finished first. (<a href="http://web.mit.edu/puzzle/www/00/set2/1/Solution.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
</ul>
<h2>File Identification and Manipulation<br /></h2>
<p>Many puzzles require you to identify files, or to do interesting manipulations to entire files. Often both at the same time. Sometimes the files are programs written in other languages.</p>
<ul>
<li><a href="http://www.mit.edu/~puzzle/09/puzzles/hyperextensions/PUZZLE/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Hyperextensions (2009)</a></li>
<li><a href="http://www.mit.edu/~puzzle/09/puzzles/surgical_files/PUZZLE/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Surgical Files (2009)</a> This puzzle triggered a programming language race, between Perl and Haskell. The race ended in a tie, but I learned some cool Haskell tricks from a teammate in the process.</li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/paris/white_noise/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">White Noise (2006)</a> Being able to manipulate audio files with programs or tools is also important.</li>
<li><a href="http://web.mit.edu/puzzle/www/04/neotokyo/3wX/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Noise in the Air (2004)</a> Knowing your off the shelf cryptography tools (ie, openssl) is sometimes helpful</li>
<li><a href="http://web.mit.edu/puzzle/www/04/vegas/gR3/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Two-Timer (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/2/2_7.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">A Problem With Printing (2003)</a> This is probably my favorite mystery hunt software puzzle. It&#8217;s written in the postscript language, which is a great language for puzzlers to know, and makes use of the peculiarities of that language.</li>
</ul>
<h2>Programming Language Identification and Cryptograms</h2>
<p>Many puzzles come down to identifying obscure or not very obscure programming languages. One thinng to be on the lookout for is knitting notation, which can often look like a programming language. Of course, writing programs is often still more efficient than knitting an actual object. Adding complexity, often the programs you are given are cryptograms, or otherwise obfuscated.</p>
<ul>
<li><a href="http://www.mit.edu/~puzzle/08/tragedy/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mit.edu');">Tragedy (2008)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/06/puzzles/kuala_lumpur/badness_10000/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Badness 10000 (2006)</a> Unfortunately no longer online, but I like the structure. You can read the solution.</li>
<li><a href="http://web.mit.edu/puzzle/www/05/setec/square_mess/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Square Mess (2005)</a> presents you with a machine language and a set of constraints on the notation used for a program in it.</li>
<li><a href="http://web.mit.edu/puzzle/www/04/yukon/Kiz/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Who&#8217;s There (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/04/timbuktu/LsD/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Sixty Degrees of Separation (2004)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/04/pirates/2K2/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">What Do You Do With A Genteel Sailor (2004)</a> <a href="http://web.mit.edu/puzzle/www/04/timbuktu/LsD/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');"></a></li>
<li><a href="http://web.mit.edu/puzzle/www/03/www.acme-corp.com/teamGuest/Training/tp-q.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Whoa &#8212; I Know Knitting! (2003)</a></li>
<li><a href="http://web.mit.edu/puzzle/www/02/round7/__/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">A Nugget of Wisdom (2002)</a> (<a href="http://web.mit.edu/puzzle/www/02/round7/__/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
<li><a href="http://web.mit.edu/puzzle/www/02/round2/05/Puzzle.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Use of Gothicism Considered Harmful (2002)</a> (<a href="http://web.mit.edu/puzzle/www/02/round2/05/Solution.txt" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">answer</a>)</li>
</ul>
<h2>Honorable Mention</h2>
<p><a href="http://web.mit.edu/puzzle/www/06/puzzles/washington/blue_steel/" onclick="javascript:pageTracker._trackPageview('/outbound/article/web.mit.edu');">Blue Steel (2006)</a> You can try to solve, but you probably just want to read the solution. It will remind you not to think so hard sometimes.</p>
<p><i>[Edited 2010-01-11 to add Twisty Little Passages (2008). Feel free to add other missing puzzles in the comments.]</i></p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2010/01/10/project-euler-mit-mystery-hunt-edition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Algorithms for the 21st Century</title>
		<link>http://innocuous.org/articles/2006/09/28/algorithms-for-the-21st-century/</link>
		<comments>http://innocuous.org/articles/2006/09/28/algorithms-for-the-21st-century/#comments</comments>
		<pubDate>Fri, 29 Sep 2006 02:51:17 +0000</pubDate>
		<dc:creator>tibbetts</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[algorithms]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://new.innocuous.org/articles/2006/09/28/algorithms-for-the-21st-century/</guid>
		<description><![CDATA[Went to a talk at MIT tonight, by Stephen C Johnson, a researcher at The Mathworks. The talk was sponsored by the Greater Boston ACM. The paper, Algorithms for the 21st Century, was presented at Usenix 2006. The general thrust was how computer architecture has drifted from the idealized model used in most algorithms classes, [...]]]></description>
			<content:encoded><![CDATA[<p>Went to a talk at MIT tonight, by <a href="http://yaccman.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/yaccman.com');">Stephen C Johnson</a>, a researcher at <a href="http://www.mathworks.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mathworks.com');">The Mathworks</a>. The talk was sponsored by the <a href="http://www.gbcacm.org/website/semInfo.php?id=1115" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.gbcacm.org');">Greater Boston ACM</a>. The paper, <a href="http://yaccman.com/papers/a21/Alg21.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/yaccman.com');">Algorithms for the 21st Century</a>, was presented at Usenix 2006. The general thrust was how computer architecture has drifted from the idealized model used in most algorithms classes, in significant ways. The major focus was on the memory subsystem, and how caching can effect algorithmic performance. By looking at the behavior of very simple algorithms, we can see fairly complex variations in performance, by factors as high as 60 times worse. This in turn implies that the performance of complex algorithms will be even more diffi<br />
cult to characterize.<br />
One big take-away is that the built-in cache management schemes of modern memory systems are pessimal for certain algorithms. This actually sounds quite a bit like the complaints against operating system disk buffer/virtual memory management by database authors. Database algorithms, because they often have large storage access requirements that can be characterized in advance, benefit from managing their own buffers. Similarly, it seems like scientific computing (eg, Matlab), which wants to manipulate gigabytes of memory in very structured ways, would benefit from direct management of caching. Of course, cache management needs to run at processor-speed, unlike disk buffer management, so writing heavyweight algorithms is inappropriate. Unfortunately, the talk did not discuss any recommendations for extentions to enable management. I wonder if something as simple as being able to mark a page as no-cache in the TLB would be sufficient.<br />
My other take-away is that computer science researchers don&#8217;t understand computers nearly enough. The presenter, while familiar with processor design and memory architecture, wasn&#8217;t really able to explain the behavior of these simple algorithms in their entirety. I&#8217;m always bothered when I encounter this lack of understanding. On some level it seems that it should be possible to fully understand computer systems. After all, they are developed by humans, and to a first approximation their behavior is deterministic and well defined. Unfortunately, they change rapidly, and so any abstract models we develop are shortly invalidated. Fundamentally, this is what makes computer science difficult.</p>
]]></content:encoded>
			<wfw:commentRss>http://innocuous.org/articles/2006/09/28/algorithms-for-the-21st-century/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

