<?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>eric the fruitbat &#187; Engineering</title>
	<atom:link href="http://www.cogitolingua.net/blog/category/engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cogitolingua.net/blog</link>
	<description>Sounding out the Noosphere.</description>
	<lastBuildDate>Fri, 03 Feb 2012 23:40:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Documentation for Progress</title>
		<link>http://www.cogitolingua.net/blog/2011/09/23/documentation-for-progress/</link>
		<comments>http://www.cogitolingua.net/blog/2011/09/23/documentation-for-progress/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 00:12:43 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Information Flow]]></category>
		<category><![CDATA[Self]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=771</guid>
		<description><![CDATA[<p>I&#8217;ve noticed in my work recently that documenting my work is one of the most reliable ways of making steady progress. I likely gathered the idea from the internet somewhere, or perhaps from the generous amounts of advice spewed forth from my postdoc. But I do remember, when I was looking up some stuff surrounding [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed in my work recently that documenting my work is one of the most reliable ways of making steady progress. I likely gathered the idea from the internet somewhere, or perhaps from the generous amounts of advice spewed forth from my postdoc. But I do remember, when I was looking up some stuff surrounding the scheme publishing language, <a href="http://www.nongnu.org/skribilo/">skribilo</a> I came across the <a href="http://sydney.edu.au/engineering/it/~jeff/nonpareil/">Nonpareil Project</a>. The author, <a href="http://www.it.usyd.edu.au/~jeff/">Jeffrey H. Kingston</a> has kept a nice <a href="http://sydney.edu.au/engineering/it/~jeff/nonpareil/milestones-1.3">summary log</a> of all the detailed work that goes into such a project. I&#8217;d like to quote a bit, just to give the flavor of the summary:</p>
<blockquote><p>
22 March 2007.  The new version of the type system is compiled and tested today.  This is about 12 days after I started the revision. The next problem, causing a core dump today, is that range types get frozen but are left unresolved at the end of MatchFunction, so we can&#8217;t be sure about coercions and run-time types at that point; we have to defer those until we descend again, during code generation.  So there is some re-thinking and rewriting to do there.</p>
<p>23 March 2007.  Sorting out the relationship between coercions and subtype tests.  This has led to a realization that subtypes have to be tested twice:  once when manifesting, without asking for coercions because they are unavailable in the presence of range types, and once during code generation after range types have all been resolved, at which point an error could occur.  Also privatised expr_rec further, hiding it from its own subtypes.</p>
<p>28 March 2007.  Finally finished working on the relationship between coercions and subtype tests.  There were two problems:  when the upper constraint is a meet type, and when the lower constraint is a variable.  Solutions to both have now been documented, implemented and tested.  The next step is to insert subtype calls, and the resulting coercions, during code generation.
</p></blockquote>
<p>As you can see, it&#8217;s a pretty high-level summary of the coding concerns for that day. This log runs from 2002 to 2008, and documents the progress of the project. Since, I&#8217;ve now moved to WebKit in my Information Flow project, I&#8217;ve also started keeping a similar log. Recording each minor milestone of implementation work. I&#8217;m expecting this log to help me write my thesis, as it will give me remembrance of details that I might otherwise forget.</p>
<p>I&#8217;ve also experienced a secondary benefit from keeping this log. The desire to grow the log, compels me to make progress in my work. I&#8217;m motivated to do tasks, just so I can mark them as done in the log. Additionally, since the log is geared toward recording smaller changes, I can break big todo&#8217;s up into a series of loggable items. I no longer get flummoxed by thinking of the sum total of work that might go into the implementation. Instead, I&#8217;m motivated by smaller tasks, which are easily accomplished.</p>
<p>Finally, the very act of documenting the work, and putting my thoughts into words, has helped to concretize my ideas and concerns. Instead of worrying abstractly about nebulous feelings, I now have mold them into precise explanations. Doing this helps me to realize which aspects are ignorable, and what specific actions I can take to answer the open questions.</p>
<p>Finally, I have a technique that allows me to make steady, targeted progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2011/09/23/documentation-for-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Linguistic Structure</title>
		<link>http://www.cogitolingua.net/blog/2009/06/04/building-linguistic-structure/</link>
		<comments>http://www.cogitolingua.net/blog/2009/06/04/building-linguistic-structure/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 07:54:10 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Mind/Cognition]]></category>
		<category><![CDATA[Punditry]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=220</guid>
		<description><![CDATA[<p>Yesterday, I had an interesting thought. My advisor once made the cultural observation that many people in Computer Science invent their own language and then immediately write a self-hosting compiler. I agree that a compiler is quite a feat of engineering and serves as a nice test case to demonstrate that the language you&#8217;ve invented [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I had an interesting thought. My advisor once made the cultural observation that many people in Computer Science invent their own language and then immediately write a self-hosting compiler. I agree that a compiler is quite a feat of engineering and serves as a nice test case to demonstrate that the language you&#8217;ve invented is powerful enough that it can handle real-world complexity. Unfortunately, this test fails in a few important ways.</p>
<p>First, It doesn&#8217;t actually show as much as you think it might. There is a very strong filter on failed languages. By using this test the author runs the risk of re-designing the language, specifically to insert constructs that help them build the compiler. Now, this isn&#8217;t necessarily a bad thing, except that compiler writing is now a fairly mature field. There are standard abstractions (esp. in the lexing and parsing) that a new language will probably not experiment with. So, the author will usually just build these existing and well-understood abstractions into the new language. Rather than encouraging language experimentation we get more of the same, but with different syntax.</p>
<p>Second, Not all useful languages even have their own compiler. I&#8217;m specifically thinking of the domain specific languages (DSL). Nobody would write an awk interpreter in awk; or a mail engine using sendmail (even if it is Turing Complete). These are languages designed to do a specific task, many of them are quite essential to their respective fields, but none of them are self-hosting. Nor should we expect them to be.</p>
<p>My argument here is that the cultural practice of writing a self-hosting compiler is a big distraction. New languages should be for experimenting with new linguistic constructs. We should be looking toward the DSLs, and incorporating their innovations into our more main-stream languages. Right now, we seem to be optimizing our languages for compiler construction.</p>
<p>I&#8217;d rather see our languages evolve in a different direction. I&#8217;m really eager to witness the birth of an AI. For this to happen though, we need languages for expressing patterns of thought, not patterns of bits. We need the ability to cohesively and flexibly assemble the stuff of thought. I&#8217;m thinking Society of Mind stuff here. We need languages that allow for statistical fuzziness, sloppy associativity, and the ability to construct metaphor.</p>
<p>The linguistic tools that we find useful for building compilers are not necessarily the same tools that will help us build a mind.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2009/06/04/building-linguistic-structure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revisiting Cascade</title>
		<link>http://www.cogitolingua.net/blog/2009/03/17/revisiting-cascade/</link>
		<comments>http://www.cogitolingua.net/blog/2009/03/17/revisiting-cascade/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 00:27:35 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Self]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=158</guid>
		<description><![CDATA[<p>I did an earlier post about finding a decentralized solution to the Cascade Failure problem. I was fortunate enough to explore this topic a bit more in depth by proposing it as my term project for the Distributed Systems class. It took between two and three weeks of work to write a paper and hack [...]]]></description>
			<content:encoded><![CDATA[<p>I did an <a href="http://www.cogitolingua.net/blog/2009/01/09/preventing-cascade-failure-in-networks/">earlier post</a> about finding a decentralized solution to the Cascade Failure problem. I was fortunate enough to explore this topic a bit more in depth by proposing it as my term project for the Distributed Systems class. It took between two and three weeks of work to write a paper and hack together a small simulator to test out some of my ideas.</p>
<p>Since this marks my first attempt at a paper, and I think the results came out rather weak, I&#8217;ll make some brief comments about the process. Because it was a class paper, I spent substantial space and time condensing the other papers on the topic. Studies on the topic are quite sparse, there were really only four such papers, all published later than 2000. So about half of my paper is devoted to repeating their models and observations, followed by an all-too-brief comparative analysis.</p>
<p>The next section introduces some arguments about why the decentralized approach might be doomed to failure. I actually set out with the complete opposite goal, I wanted to find a solution to the problem. But, after many shot-in-the-dark attempts at finding one, I went after an impossibility proof instead. It isn&#8217;t what I would really call a rigorous proof though, it&#8217;s much more intuitive and informal. But I hadn&#8217;t seen the argument made in any other papers, so if I claim a small contribution to the field, this would have to be it.</p>
<p>I actually did follow up the proof, with a section on the methodology for my simulation. I think I was much more detailed about the setup than any of the other researchers were about theirs. I tried, and failed, to repeat the observations of others; so I can&#8217;t claim any guarantees about the accuracy of my model and simulation. I tested several off-the-cuff first-shot attempts at what protocols might help alleviate or stall a cascade, with spectacularly poor results. Every protocol I tried was worse than doing nothing! In fact, far worse than doing nothing! Worse by a factor of 50&#8211;200! So after all that work, I just figured out some stuff that doesn&#8217;t solve the problem, and had to explain why.</p>
<p>I think the best part, though, is the suggestions for Future Work. I&#8217;ll probably always enjoy writing this part, because it&#8217;s nearly impossible for me to get through my work without thinking of other ways to do stuff, or more things to try out.</p>
<p>Basically, it takes forever to write a paper. And as far as the sciences go, the paper really is really only the tip of the iceberg in terms of effort. It summarizes and represents a substantial amount of effort in data, simulation, code, research, analysis, etc&#8230;</p>
<ul>My specific gripes about what could be made easier:</p>
<li>LaTeX gives pretty results, and is the de-facto standard for scientific publication, but it&#8217;s kludgy, hard to use, and has a high learning curve.</li>
<li>There&#8217;s no decent and easy graphing/charting programs. So, it&#8217;s best to invest time into learning one. I had to write python scripts to parse and reduce my data anyway, so I used <a href="http://matplotlib.sourceforge.net/">matplotlib</a>.</li>
<li>And there&#8217;s no such thing as a vector drawing package that beats drawing sketches on napkins. So conventional artists have nothing to fear. It took hours to find, learn to use, and finally produce, a silly little, nearly superfluous, 7-node graph.</li>
<li>Network/Graph visualization tools are also scarce, so I had to write my own, just to double check that the simulation behaved properly. I didn&#8217;t mention any of this kind of effort in the paper though.</li>
</ul>
<p>Anyway, go ahead and have a look at my paper: <a href="http://www.cogitolingua.net/blog/wp-content/uploads/2009/03/cascade_failure.pdf">Cascade Failure in Distributed Networks</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2009/03/17/revisiting-cascade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing Cascade Failure in Networks</title>
		<link>http://www.cogitolingua.net/blog/2009/01/09/preventing-cascade-failure-in-networks/</link>
		<comments>http://www.cogitolingua.net/blog/2009/01/09/preventing-cascade-failure-in-networks/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 08:57:21 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Ideas]]></category>

		<guid isPermaLink="false">http://www.cogitolingua.net/blog/?p=145</guid>
		<description><![CDATA[<p>For some reason I was thinking about the cascade failure problem that I mentioned before my Holiday Hiatus. I discovered that this problem has gone largely unsolved when attending ACSAC &#8217;08, and it&#8217;s been in the back of my mind (and on my whiteboard) since then. I&#8217;ve looked online a bit to see wether any [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason I was thinking about the cascade failure problem that I mentioned before my Holiday Hiatus. I discovered that this problem has gone largely unsolved when attending ACSAC &#8217;08, and it&#8217;s been in the back of my mind (and on my whiteboard) since then. I&#8217;ve looked online a bit to see wether any researchers are attacking the problem, and it seems that very few are. Most of the work is also around containment of the failure rather than prevention. Most of the solutions resemble burning swaths of trees to save the forest from a fire; this disgustingly requires global knowledge of the network. Also, the systems today seem to me to be built rather naively: nodes very simply reroute traffic based on failure, without taking into account the possibility that in so doing they might overtraffic their neighbors, and thus trigger a cascade. There also seems to be a lack of information in textbooks about running networks near capacity (this is desired for efficient utilization of the network, but can drastically increase the probability of cascade).</p>
<p>So, I want to introduce a few constraints and assumptions before I state my rough solution. Assuming the network can be viewed as a graph with nodes and edges, where some goods (power, packets, traffic) is flowing along edges from one node to another, I&#8217;d prefer a solution that used local knowledge (node capacity, and possible neighbor capacities) instead of global knowledge. So I&#8217;ll assume that each node can keep track of how much stuff is flowing through it, and what the traffic patterns actually are; that is: how much stuff goes from edge 1 to edge 2.</p>
<p>In computer networks it is also possible for a node to track the possible re-routings that certain packets can take and still arrive at their destination. (I don&#8217;t know wether this is true of power delivery in the electric grid, but I&#8217;m going to assume that something analogous still holds.) Each node will be responsible for measuring traffic capacity: That is for each stream of traffic, it will keep track of what other edges could have had that traffic routed onto them. Each node will also observe a capacity constraint: It will discourage traffic that cannot be re-routed if the primary edge for that traffic suddenly fails. In this way we can keep a reserve capacity in case of edge failure.</p>
<p>When an edge fails, the node will re-route its current traffic in a load balanced manner along the secondary edges available for that traffic. This will temporarily violate the reserve capacity constraint, but not over-traffic other nodes. [Actually I don't think this is true, unless the node can use capacity info from its neighbors] In this way, outage of a single edge cannot trigger a cascade failure, because enough reserve capacity is always available for the traffic that was allocated to the failed edge.</p>
<ul>
Still to be addressed:</p>
<li>Node failures which can cause multiple simultaneous edge failures.</li>
<li>Characterize the efficiency in terms of what is kept as reserve capacity and theoretical max capacity in the naive systems</li>
<li>Formalize the measurements taken by each node</li>
<li>Investigate push vs pull flows (power grid is demand based, computer networks are push)</li>
<li>Do nodes still need a means of capping their flow? (can the power grid drop packets?) I&#8217;d prefer not to require this.</li>
<li>Specify what each node is to communicate to its neighbors</li>
<li>Investigate the use of probability for multiple node failures (earthquake, software bug). Failures are not generally identically distributed or independent</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2009/01/09/preventing-cascade-failure-in-networks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ACSAC 2008</title>
		<link>http://www.cogitolingua.net/blog/2008/12/18/acsac-2008/</link>
		<comments>http://www.cogitolingua.net/blog/2008/12/18/acsac-2008/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 00:31:42 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Ideas]]></category>

		<guid isPermaLink="false">http://cogitolingua.net/wordpress/index.php/2008/12/18/acsac-2008/</guid>
		<description><![CDATA[<p>So, I went to ACSAC the other week, and sketched out some crazy notes:</p> <p>It seems that nobody is really working on large scale distributed systems reliability. By this I mean things like the Internet and the Power Grid. Both of these are highly distributed systems, where nodes automatically route around local failures. Unfortunately, and [...]]]></description>
			<content:encoded><![CDATA[<p>So, I went to ACSAC the other week, and sketched out some crazy notes:</p>
<p>It seems that nobody is really working on large scale distributed systems reliability. By this I mean things like the Internet and the Power Grid. Both of these are highly distributed systems, where nodes automatically route around local failures. Unfortunately, and probably due to locality of knowledge, cascade failure is still an unsolved issue. Most of the solutions require early detection, and prevent systemic failure by removing of key nodes before things begin to cascade. This is quite similar to bulldozing trees to save the forest. It&#8217;s a sub-optimal solution. It&#8217;s also extremely difficult to automate, as it requires more global knowledge and assumes reliable control system connectivity in order to direct shutdown. It would be much better if each node behaved in such a way as to dampen the &#8216;cascade wave&#8217; while still having only localized knowledge.</p>
<p>In some cases, rebooting becomes an issue. The <a href="http://en.wikipedia.org/wiki/Cascading_failure">graphic on wikipedia</a> shows this quite well, when the center node reboots and becomes the only link in a high-demand chain. In the real power grid not all stations are capable of coming online without a fairly large kick-start from the grid itself. That is, some of the emergency/peak generators require power to start up. In a total network outage, you might find yourself without power for a while, even though you have a generator. Also, the power grid is run as close to maximum capacity as possible (for efficiency reasons) even though this increases the likelihood that a local failure can trigger a cascade.</p>
<p>Also these lines, I&#8217;ve also scrawled that it would be nice if a network protocol could give early warning of DDOS or similar attacks. Is early warning of global events possible in a distributed system with very localized knowledge at each node? given the lack of central authority, who would receive the warning? neighbor nodes? Can the protocol be specified so as to dampen over-traffic attacks? What info must a node disclose about itself in order to prevent a cascade failure (econ, info theory)?</p>
<p><a href="http://en.wikipedia.org/wiki/Whitfield_Diffie">Whitfield Diffie</a> also spoke at the conference. He was nice enough to give explicit Creative Commons permission to record and distribute his speech, if any of us felt so inclined. He gave an off-the-cuff history of cryptography and society, with a focus on how we modify our behavior and adjust our risk-cost tradeoffs as technology changes. He also mentioned that he prefers <a href="http://en.wikipedia.org/wiki/Information_security">Availability to Integrity to Confidentiality</a>; that is, He thinks the rest of the security world has priories reversed.</p>
<p>Some more chicken-scratch:<br />
Is it possible to do a BCC encryption? So that Alice post a single message a public BBS that can be read by both Bod and Charles, but each thinks they are the only recipient. Can this be done (a) transparently (b) in a way that adjusts to addition and removal of members in the group. Secure IRC, IM chat.</p>
<p>The best way to secure computer systems is probably to look toward biology, and create an immune system. Learning, dynamic collection of agents that monitor and repair.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2008/12/18/acsac-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Accurate Speedometer</title>
		<link>http://www.cogitolingua.net/blog/2008/06/15/more-accurate-speedometer/</link>
		<comments>http://www.cogitolingua.net/blog/2008/06/15/more-accurate-speedometer/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 02:18:17 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Ideas]]></category>

		<guid isPermaLink="false">http://cogitolingua.net/wordpress/index.php/2008/06/15/more-accurate-speedometer/</guid>
		<description><![CDATA[<p>I&#8217;ve been sitting on this idea for at least a year, and I&#8217;m not really sure why I haven&#8217;t blogged about it yet. It turns out that car speedometers are not very accurate. In fact, they can be on the order of 10% wrong, with the error more prominent at higher speeds. Typically they work [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been sitting on this idea for at least a year, and I&#8217;m not really sure why I haven&#8217;t blogged about it yet. It turns out that car speedometers are not very accurate. In fact, they can be on the order of 10% wrong, with the error more prominent at higher speeds. Typically they work by counting the revolutions per unit time of the axle, and then some quick math involving &pi;. The odometer is usually measured in a similar fashion. I think that this is a terrible way to measure speed and distance. A much better way would be to have a photo-detector scanning the surface of the wheel. The system would work on the same principles that enable optical mice to detect their motion. It would be more accurate because there&#8217;d be less variation in tire width, and error would not compound at higher speeds. The only real drawback is that mud or dirt might obscure the sensor (but then you can fall back on the existing methods).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2008/06/15/more-accurate-speedometer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bounding Problution.</title>
		<link>http://www.cogitolingua.net/blog/2008/06/03/bounding-problution/</link>
		<comments>http://www.cogitolingua.net/blog/2008/06/03/bounding-problution/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 05:07:21 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Comp*]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Philosophy]]></category>
		<category><![CDATA[Self]]></category>

		<guid isPermaLink="false">http://cogitolingua.net/wordpress/index.php/2008/06/03/bounding-problution/</guid>
		<description><![CDATA[<p>Problutions (noun, pl.): the problems that are an inherent part of solution to a very difficult and complex problem. These problems arise from within the solution itself, and are extrinsic to the original problem.</p> <p>Lately, I&#8217;ve been feeling a bit of ennui, despite preparing for a move to UCI. I&#8217;ve also bits from Minksy&#8216;s Society [...]]]></description>
			<content:encoded><![CDATA[<p>Problutions (<em>noun, pl.</em>): the problems that are an inherent part of solution to a very difficult and complex problem. These problems arise from within the solution itself, and are extrinsic to the original problem.</p>
<p>Lately, I&#8217;ve been feeling a bit of ennui, despite preparing for a move to UCI. I&#8217;ve also bits from <a href="http://en.wikipedia.org/wiki/Marvin_Minsky">Minksy</a>&#8216;s <a href="http://en.wikipedia.org/wiki/The_Society_of_Mind">Society of Mind</a>, <a href="http://en.wikipedia.org/wiki/Stuart_Kauffman">Kauffman</a>&#8216;s <a href="http://www.amazon.com/dp/0195111303">At Home in the Universe</a> which got me thinking:</p>
<p>Some of the problems in life are complicated, sure. But, that doesn&#8217;t mean a large brain is worth developing. Bacteria are enormously successful, by volume, mass, sheer number, range of environments, pretty much any way you measure evolutionary success, they&#8217;ve outdone us humans by several orders of magnitude. Yet, they have no brains, no language, no society, no bureaucracy, no wars, etc. When faced with the problem of finding and exploiting an evolutionary strategy, simple solutions are very effective. And it really gets no simpler than a bacterium, and no more effective than horizontal gene exchange. Furthermore brains come at a very high cost: cranium is needed for protection, it consumes an immense amount of resources (in humans it accounts for about 1/3 of the basal metabolic rate), and cognition brings with it a host of other psychiatric problems. So I&#8217;m wonder if we aren&#8217;t over-optimized in some way. If we might be some evolutionary dead-end (requiring a genetic scientist to take over), that our history is one of evolution trying out bigger and bigger brains in a <a href="http://en.wikipedia.org/wiki/Red_Queen's_race">race with the Red Queen</a>.</p>
<p>So, accursed with my big brain, I kept thinking:<br />
There must be a general principle going on here. Life presents insoluble problems, evolution attempts solution by expanding computational hardware. I get the feeling that there must be a relationship between the computational complexity<sup>1</sup> of a problem and that of it&#8217;s solution. In general given a problem, we should be able to at least bound the computational resources that would be needed to solve it, a bound on the complexity of solution. I figure that this has got to be formalizable in a manner akin to the <a href="http://en.wikipedia.org/wiki/Minimum_description_length">Minimum Description Length</a> or <a href="http://en.wikipedia.org/wiki/Kolmogorov_complexity">Kolmogorov complexity</a>. At any rate, it ought to be useful to compute these bounds, because then we can have both an estimate of how difficult it will be to engineer a solution, and an indicator of when we&#8217;ve over-invested down a dead-end.</p>
<hr width=10%>
1. I don&#8217;t mean to mention the official computational hierarchy here. I mean something more practical, complexity in the engineering sense.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2008/06/03/bounding-problution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Dryer Protocol</title>
		<link>http://www.cogitolingua.net/blog/2008/03/18/the-dryer-protocol/</link>
		<comments>http://www.cogitolingua.net/blog/2008/03/18/the-dryer-protocol/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 01:20:02 +0000</pubDate>
		<dc:creator>erich</dc:creator>
				<category><![CDATA[Comp*]]></category>
		<category><![CDATA[Engineering]]></category>

		<guid isPermaLink="false">http://fruitbat.kicks-ass.net/wordpress/index.php/2008/03/18/the-dryer-protocol/</guid>
		<description><![CDATA[<p>I&#8217;m becoming increasingly interested in systems engineering, but still don&#8217;t really know much about the subject. One thing that I read about recently (though I completely forgot where) was about how to choose a robust cooperation protocol, using the communal clothes dryer as an example.</p> <p>In a system there&#8217;s often more that one way of [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m becoming increasingly interested in systems engineering, but still don&#8217;t really know much about the subject. One thing that I read about recently (though I completely forgot where) was about how to choose a robust cooperation protocol, using the communal clothes dryer as an example.</p>
<p>In a system there&#8217;s often more that one way of doing things, or more that one way of ordering the things that need to be done. When it comes to drying your clothes, we have the two basic strategies:</p>
<ol>
<li><b><code>EmptyLintFirst</code></b><br />
	The program can first empty the lint trap, and then dry the clothes.</li>
<li><b><code>EmptyLintLast</code></b><br />
	The program can first dry the clothes, then empty the lint trap and leave it clear for the next agent to use.</li>
</ol>
<p>So, obviously, both of these strategies will work with themselves quite well. If everyone follows the <code>EmptyLintLast</code> protocol then the lint trap will always be clear when you begin to dry your clothes. So, how to choose between the two strategies? First we set up a cost function for when things go wrong, one that reflects the actual system cost. For this example, we&#8217;ll charge 1 minute for emptying the lint trap, if it was already clean, and 60 minutes for drying clothes with a dirty lint trap. Then we ask the all important question: In a mixed system what is the associated cost for each strategy?</p>
<ol>
<li><code>EmptyLintFirst</code><br />
	Half the time the <code>EmptyLintLast</code> guy will have left a clean lint trap, so, being simple-minded folk, we clean it again at a penalty of 1 min. But the trap is always clean when we go to dry the clothes, so no penalty there.<br />
	Total cost: 0.5 minutes.</li>
<li><code>EmptyLintLast</code><br />
	Half the time the <code>EmptyLintFirst</code> will have left a dirty lint trap, so we end up with soggy clothes for a penalty of 60 minutes. But the trap is always dirty when we go to clean it, so no penalty there.<br />
	Total cost: 30 minutes.</li>
</ol>
<p>Clearly the <code>EmptyLintFirst</code> is the more robust of the two strategies, not only does it work if everyone follows this strategy, but it also has a much lower cost in the mixed environment. Most of the time in software development, the setup and initialization cost (cleaning the lint trap) is much less than the actual computation cost (drying the clothes), so it clearly pays to always initialize your environment prior to using it, even if you think it&#8217;s unnecessary, it&#8217;s an incremental cost that buys you a more robust and reliable system. And since you can&#8217;t depend on that junior programmer (or yourself) to always clean up the environment after using it, you save yourself maintenance nightmares down the road.</p>
<p>So from Systems Engineering 101: </p>
<ol>Robust Protocol Selection</p>
<li>List all the alternative ways of performing the task.</li>
<li>Associate a cost for when each thing can go wrong.</li>
<li>Evaluate each of the alternatives in a mixed environment.</li>
<li>Choose the protocol with lowest cost.</li>
</ol>
<p>If the cost analysis results in a tie, then adjust the cost function to arbitrate some differences.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cogitolingua.net/blog/2008/03/18/the-dryer-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

