<?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>A Little Off &#187; Uncategorized</title>
	<atom:link href="http://www.bemasher.net/archives/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bemasher.net</link>
	<description>Code, Computers, Photography and Guns</description>
	<lastBuildDate>Mon, 21 Nov 2011 06:38:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>System Memory Analysis</title>
		<link>http://www.bemasher.net/archives/1055?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=system-memory-analysis</link>
		<comments>http://www.bemasher.net/archives/1055#comments</comments>
		<pubDate>Wed, 01 Jun 2011 02:55:50 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Analysis]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[Memory]]></category>
		<category><![CDATA[Newegg]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RAM]]></category>
		<category><![CDATA[System]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=1055</guid>
		<description><![CDATA[Choosing the best RAM for your system can be difficult, as there are a lot of things to consider. Doing comparisons by hand can net you some pretty decent results but picking the best price per capacity per ... can get fairly complicated if you're doing it by hand. A while ago you may remember [...]]]></description>
			<content:encoded><![CDATA[<p>Choosing the best RAM for your system can be difficult, as there are a lot of things to consider. Doing comparisons by hand can net you some pretty decent results but picking the best price per capacity per ... can get fairly complicated if you're doing it by hand.</p>
<p>A while ago you may remember my SSD analysis script<sup>[<a href="http://www.bemasher.net/archives/1055#footnote_0_1055" id="identifier_0_1055" class="footnote-link footnote-identifier-link" title="Choosing an SSD (A more different S)">1</a>]</sup> that scraped HTML from Newegg to calculate scores for each product to choose the best one. I've also recently discovered that Newegg does indeed have an API<sup>[<a href="http://www.bemasher.net/archives/1055#footnote_1_1055" id="identifier_1_1055" class="footnote-link footnote-identifier-link" title="Newegg&#039;s JSON API">2</a>]</sup> that greatly simplifies this whole process<sup>[<a href="http://www.bemasher.net/archives/1055#footnote_2_1055" id="identifier_2_1055" class="footnote-link footnote-identifier-link" title="Even though it was never intended for that what I&#039;m using it for.">3</a>]</sup>.</p>
<p>Once I had explored Newegg's API enough to get the data I needed I set to work to update the SSD script as well as write a few others for HDD's and system memory as well. Of the scripts I wrote the one for system memory turned out to be particularly useful as it made finding great deals very easy. It also illustrated that popular brands may not always be the best deal.</p>
<p>The first major improvement over the previous scripts was the use of threading to make multiple API requests in parallel which sped things up quite a bit. While Python's threading library doesn't allow for parallelism of the CPU<sup>[<a href="http://www.bemasher.net/archives/1055#footnote_3_1055" id="identifier_3_1055" class="footnote-link footnote-identifier-link" title="Python is crippled in this way due to a global interpreter lock.">4</a>]</sup> it does for file I/O. Below is the class used for grabbing urls throughout the script.</p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">threading</span><br />
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">urllib</span><span style="color: #66cc66;">,</span> <span style="color: #dc143c;">urllib2</span><br />
<span style="color: #ff7700;font-weight:bold;">import</span> json<span style="color: #66cc66;">,</span> <span style="color: #dc143c;">re</span><br />
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">Queue</span> <span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">Queue</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">class</span> GetURL<span style="color: black;">&#40;</span><span style="color: #dc143c;">threading</span>.<span style="color: black;">Thread</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: #66cc66;">,</span> urlQueue<span style="color: #66cc66;">,</span> jsonQueue<span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #dc143c;">threading</span>.<span style="color: black;">Thread</span>.<span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">urlQueue</span> <span style="color: #66cc66;">=</span> urlQueue<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">jsonQueue</span> <span style="color: #66cc66;">=</span> jsonQueue<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">def</span> run<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itemNumber<span style="color: #66cc66;">,</span> url <span style="color: #66cc66;">=</span> <span style="color: #008000;">self</span>.<span style="color: black;">urlQueue</span>.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; raw <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">urllib2</span>.<span style="color: black;">urlopen</span><span style="color: black;">&#40;</span>url<span style="color: black;">&#41;</span>.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jsonQueue.<span style="color: black;">put</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>itemNumber<span style="color: #66cc66;">,</span> json.<span style="color: black;">loads</span><span style="color: black;">&#40;</span>raw<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008000;">self</span>.<span style="color: black;">urlQueue</span>.<span style="color: black;">task_done</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
<p>Newegg's API paginates the data as the Android app displays the data directly to the user which means there's no easy way to retrieve all results in one request. So you must make successive calls incrementing the page number until all results for the query have been retrieved.</p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">itemSpecURL <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;http://www.ows.newegg.com/Products.egg/{}/Specification&quot;</span><br />
searchURL <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;http://www.ows.newegg.com/Search.egg/Advanced&quot;</span><br />
<br />
itemList <span style="color: #66cc66;">=</span> getItems<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
<br />
urlQueue <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">Queue</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
jsonQueue <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">Queue</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
items <span style="color: #66cc66;">=</span> <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span><br />
<span style="color: #ff7700;font-weight:bold;">for</span> item <span style="color: #ff7700;font-weight:bold;">in</span> itemList:<br />
&nbsp; &nbsp; specURL <span style="color: #66cc66;">=</span> itemSpecURL.<span style="color: black;">format</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;ItemNumber&quot;</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; urlQueue.<span style="color: black;">put</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;ItemNumber&quot;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> specURL<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; items<span style="color: black;">&#91;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;ItemNumber&quot;</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> item<br />
&nbsp; &nbsp; <br />
<span style="color: #ff7700;font-weight:bold;">for</span> worker <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">xrange</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; t <span style="color: #66cc66;">=</span> GetURL<span style="color: black;">&#40;</span>urlQueue<span style="color: #66cc66;">,</span> jsonQueue<span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; t.<span style="color: black;">setDaemon</span><span style="color: black;">&#40;</span><span style="color: #008000;">True</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; t.<span style="color: black;">start</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
<br />
urlQueue.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
<p>These basic setups are fairly generic and can be used to analyze just about any product from Newegg. Anything beyond this point however is specific to the type of product you're analyzing. This will grab each item's basic data including price as well as it's detailed specifications. I should also note that the parameters passed to the API in <em>getItems</em> is generated using the query builder available in the post about Newegg's API.</p>
<div class="codecolorer-container python default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">speed_re <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">re</span>.<span style="color: #008000;">compile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'DDR<span style="color: #000099; font-weight: bold;">\d</span><span style="color: #000099; font-weight: bold;">\s</span>(<span style="color: #000099; font-weight: bold;">\d</span>+).*'</span><span style="color: black;">&#41;</span><br />
capacity_re <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">re</span>.<span style="color: #008000;">compile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;(<span style="color: #000099; font-weight: bold;">\d</span>+)GB<span style="color: #000099; font-weight: bold;">\s</span><span style="color: #000099; font-weight: bold;">\(</span>(<span style="color: #000099; font-weight: bold;">\d</span>+)<span style="color: #000099; font-weight: bold;">\s</span>x<span style="color: #000099; font-weight: bold;">\s</span>(<span style="color: #000099; font-weight: bold;">\d</span>+)GB<span style="color: #000099; font-weight: bold;">\)</span>&quot;</span><span style="color: black;">&#41;</span><br />
timing_re <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">re</span>.<span style="color: #008000;">compile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'(<span style="color: #000099; font-weight: bold;">\d</span>+-<span style="color: #000099; font-weight: bold;">\d</span>+-<span style="color: #000099; font-weight: bold;">\d</span>+-<span style="color: #000099; font-weight: bold;">\d</span>+)'</span><span style="color: black;">&#41;</span><br />
features <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'Brand'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Model'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'ItemNumber'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Price'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Speed'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Capacity'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Dimms'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Timing'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Voltage'</span><span style="color: black;">&#93;</span><br />
<br />
<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #ff7700;font-weight:bold;">not</span> jsonQueue.<span style="color: black;">empty</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:<br />
&nbsp; &nbsp; itemNumber<span style="color: #66cc66;">,</span> specs <span style="color: #66cc66;">=</span> jsonQueue.<span style="color: black;">get</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; item <span style="color: #66cc66;">=</span> <span style="color: black;">&#123;</span><span style="color: black;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> group <span style="color: #ff7700;font-weight:bold;">in</span> specs<span style="color: black;">&#91;</span><span style="color: #483d8b;">'SpecificationGroupList'</span><span style="color: black;">&#93;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">for</span> pair <span style="color: #ff7700;font-weight:bold;">in</span> group<span style="color: black;">&#91;</span><span style="color: #483d8b;">'SpecificationPairList'</span><span style="color: black;">&#93;</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> pair<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Key'</span><span style="color: black;">&#93;</span> <span style="color: #ff7700;font-weight:bold;">in</span> features:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item<span style="color: black;">&#91;</span>pair<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Key'</span><span style="color: black;">&#93;</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> pair<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Value'</span><span style="color: black;">&#93;</span>.<span style="color: black;">encode</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'ascii'</span><span style="color: #66cc66;">,</span> errors<span style="color: #66cc66;">=</span><span style="color: #483d8b;">'ignore'</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #483d8b;">'Capacity'</span> <span style="color: #ff7700;font-weight:bold;">in</span> item:<br />
&nbsp; &nbsp; &nbsp; &nbsp; capacity <span style="color: #66cc66;">=</span> capacity_re.<span style="color: black;">match</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Capacity'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> capacity:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Capacity'</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> capacity.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Dimms'</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> capacity.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #483d8b;">'Speed'</span> <span style="color: #ff7700;font-weight:bold;">in</span> item:<br />
&nbsp; &nbsp; &nbsp; &nbsp; speed <span style="color: #66cc66;">=</span> speed_re.<span style="color: black;">match</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Speed'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> speed:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Speed'</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> speed.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #483d8b;">'Timing'</span> <span style="color: #ff7700;font-weight:bold;">in</span> item:<br />
&nbsp; &nbsp; &nbsp; &nbsp; timing <span style="color: #66cc66;">=</span> timing_re.<span style="color: black;">match</span><span style="color: black;">&#40;</span>item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Timing'</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">if</span> timing:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Timing'</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> timing.<span style="color: black;">group</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'-'</span><span style="color: #66cc66;">,</span><span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\t</span>'</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">else</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">continue</span><br />
&nbsp; &nbsp; item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'Price'</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> items<span style="color: black;">&#91;</span>itemNumber<span style="color: black;">&#93;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'FinalPrice'</span><span style="color: black;">&#93;</span><br />
&nbsp; &nbsp; item<span style="color: black;">&#91;</span><span style="color: #483d8b;">'ItemNumber'</span><span style="color: black;">&#93;</span> <span style="color: #66cc66;">=</span> specs<span style="color: black;">&#91;</span><span style="color: #483d8b;">'NeweggItemNumber'</span><span style="color: black;">&#93;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">try</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\t</span>'</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: #008000;">map</span><span style="color: black;">&#40;</span><span style="color: #ff7700;font-weight:bold;">lambda</span> x: item<span style="color: black;">&#91;</span>x<span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> features<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">KeyError</span>:<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #ff7700;font-weight:bold;">pass</span><br />
&nbsp; &nbsp; jsonQueue.<span style="color: black;">task_done</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></td></tr></tbody></table></div>
<p>The basic purpose of the above code is to go through each item and format each feature into usable data<sup>[<a href="http://www.bemasher.net/archives/1055#footnote_4_1055" id="identifier_4_1055" class="footnote-link footnote-identifier-link" title="Or at least the data that we&#039;re interested in using for analysis.">5</a>]</sup>. Once the data has been formatted and printed I continue the rest of the filtering and analysis in Microsoft's Excel.</p>
<p>The equation used to calculate a score for each set of system memory is as follows:</p>
<p><center><img src='http://s0.wp.com/latex.php?latex=%5Cfrac%7B%28%5Ctext%7BCapacity%7D%5Ctimes1024%5E3%29%5Ctimes%5Ctext%7BSpeed%7D%7D%7B%5Ctext%7BPrice%7D%5Ctimes+CL%5Ctimes+T_%7BRCD%7D+%5Ctimes+T_%7BRP%7D+%5Ctimes+T_%7BRAS%7D%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;frac{(&#92;text{Capacity}&#92;times1024^3)&#92;times&#92;text{Speed}}{&#92;text{Price}&#92;times CL&#92;times T_{RCD} &#92;times T_{RP} &#92;times T_{RAS}}' title='&#92;frac{(&#92;text{Capacity}&#92;times1024^3)&#92;times&#92;text{Speed}}{&#92;text{Price}&#92;times CL&#92;times T_{RCD} &#92;times T_{RP} &#92;times T_{RAS}}' class='latex' /></center></p>
<p>Currently it looks like G.Skill has the best to offer in the DDR3 memory market if you're looking for a quad-channel set for Sandy Bridge's enthusiast hardware due out in the next quarter<sup>[<a href="http://www.bemasher.net/archives/1055#footnote_5_1055" id="identifier_5_1055" class="footnote-link footnote-identifier-link" title="G.SKILL Ripjaws X Series 16GB (4 x 4GB) 1333Mhz">6</a>]</sup>.</p>
<ol class="footnotes"><li id="footnote_0_1055" class="footnote"><a href="http://www.bemasher.net/archives/927">Choosing an SSD (A more different S)</a></li><li id="footnote_1_1055" class="footnote"><a href="http://www.bemasher.net/archives/1002">Newegg's JSON API</a></li><li id="footnote_2_1055" class="footnote">Even though it was never intended for that what I'm using it for.</li><li id="footnote_3_1055" class="footnote">Python is crippled in this way due to a global interpreter lock.</li><li id="footnote_4_1055" class="footnote">Or at least the data that we're interested in using for analysis.</li><li id="footnote_5_1055" class="footnote"><a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16820231442">G.SKILL Ripjaws X Series 16GB (4 x 4GB) 1333Mhz</a></li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/1055/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Remote Start Desktop</title>
		<link>http://www.bemasher.net/archives/996?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=android-remote-start-desktop</link>
		<comments>http://www.bemasher.net/archives/996#comments</comments>
		<pubDate>Sat, 26 Feb 2011 03:12:40 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[connectbot]]></category>
		<category><![CDATA[Droid 2]]></category>
		<category><![CDATA[Droid 2 Global]]></category>
		<category><![CDATA[ether-wake]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[wake on lan]]></category>
		<category><![CDATA[WOL]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=996</guid>
		<description><![CDATA[After getting my server setup again I've been messing with ssh and all that when it struck me, a clever idea. My router runs Tomato[1] which has a built in SSH server[2] and my phone just happens to be an android based phone which has ConnectBot[3]. My router also supports wake on lan[4] and this [...]]]></description>
			<content:encoded><![CDATA[<p>After getting my server setup again I've been messing with ssh and all that when it struck me, a clever idea.</p>
<p>My router runs Tomato<sup>[<a href="http://www.bemasher.net/archives/996#footnote_0_996" id="identifier_0_996" class="footnote-link footnote-identifier-link" title="As you may have read in a previous post or two.">1</a>]</sup> which has a built in SSH server<sup>[<a href="http://www.bemasher.net/archives/996#footnote_1_996" id="identifier_1_996" class="footnote-link footnote-identifier-link" title="Much like DD-WRT and almost all of the other custom firmwares you can get for most routers these days.">2</a>]</sup> and my phone just happens to be an android based phone which has ConnectBot<sup>[<a href="http://www.bemasher.net/archives/996#footnote_2_996" id="identifier_2_996" class="footnote-link footnote-identifier-link" title="ConnectBot: a SSH client for the Android platform.">3</a>]</sup>. My router also supports wake on lan<sup>[<a href="http://www.bemasher.net/archives/996#footnote_3_996" id="identifier_3_996" class="footnote-link footnote-identifier-link" title="Wake-on-LAN">4</a>]</sup> and this got me thinking a little bit. What if I automated that somewhat into a sort of "remote start" button on my phone for my desktop.</p>
<p>So first thing I did was look up what flavor of WOL client my router used. By default I believe Tomato comes with ether-wake<sup>[<a href="http://www.bemasher.net/archives/996#footnote_4_996" id="identifier_4_996" class="footnote-link footnote-identifier-link" title="I&#039;m using TomatoUSB which has been modified somewhat and I&#039;m not sure if this is part of the modifications or not, though I doubt that it is.">5</a>]</sup>. So I just setup a session on connectbot that ssh's into my router at home and added <em>ether-wake ##:##:##:##:##:## &amp;&amp; exit</em> in post-login automation for the session.</p>
<p>Now, this was great and all but it still required me to enter my password every single time and hit enter as soon as it connected, as it only fills in the command it doesn't automatically execute it<sup>[<a href="http://www.bemasher.net/archives/996#footnote_5_996" id="identifier_5_996" class="footnote-link footnote-identifier-link" title="Which doesn&#039;t really seem all that intuitive to me.">6</a>]</sup>. The next thing that came to mind was just setting up a key pair for key authentication with ssh which would bypass having to enter the password every single time. All I would have to do at this point was enter the password once to unlock the key and then I could just log in whenever I needed to.</p>
<p>After generating the key pair and added the public key to the list of authorized keys for ssh on my router everything worked exactly as I intended. So just for a finishing touch I added a shortcut to my phone's home screen labelled: Wake Audbox<sup>[<a href="http://www.bemasher.net/archives/996#footnote_6_996" id="identifier_6_996" class="footnote-link footnote-identifier-link" title="Audbox is the name of my desktop.">7</a>]</sup>. Now whenever I want to remote start my system I just hit that button<sup>[<a href="http://www.bemasher.net/archives/996#footnote_7_996" id="identifier_7_996" class="footnote-link footnote-identifier-link" title="Assuming that I&#039;ve got the key unlocked otherwise it&#039;ll just ask me for my password.">8</a>]</sup> and then when it connects and enters the command and then I just hit enter. After hitting enter it wakes my system and exits the session.</p>
<ol class="footnotes"><li id="footnote_0_996" class="footnote">As you may have read in a previous post or two.</li><li id="footnote_1_996" class="footnote">Much like DD-WRT and almost all of the other custom firmwares you can get for most routers these days.</li><li id="footnote_2_996" class="footnote"><a href="http://code.google.com/p/connectbot/">ConnectBot</a>: a SSH client for the Android platform.</li><li id="footnote_3_996" class="footnote"><a href="http://en.wikipedia.org/wiki/Wake-on-LAN">Wake-on-LAN</a></li><li id="footnote_4_996" class="footnote">I'm using TomatoUSB which has been modified somewhat and I'm not sure if this is part of the modifications or not, though I doubt that it is.</li><li id="footnote_5_996" class="footnote">Which doesn't really seem all that intuitive to me.</li><li id="footnote_6_996" class="footnote">Audbox is the name of my desktop.</li><li id="footnote_7_996" class="footnote">Assuming that I've got the key unlocked otherwise it'll just ask me for my password.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/996/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proximity of Creativity</title>
		<link>http://www.bemasher.net/archives/944?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=proximity-of-creativity</link>
		<comments>http://www.bemasher.net/archives/944#comments</comments>
		<pubDate>Wed, 15 Dec 2010 06:32:11 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=944</guid>
		<description><![CDATA[Maybe this is just a veiled form of addiction but it seems like my creativity is inversely related to my proximity to a computer[1]. I suppose its a good reason for me to regularly visit a coffee shop[2]. To be continued... Particularly my own computer.It seems like a coffee shop is more useful for thinking [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe this is just a veiled form of addiction but it seems like my creativity is inversely related to my proximity to a computer<sup>[<a href="http://www.bemasher.net/archives/944#footnote_0_944" id="identifier_0_944" class="footnote-link footnote-identifier-link" title="Particularly my own computer.">1</a>]</sup>. I suppose its a good reason for me to regularly visit a coffee shop<sup>[<a href="http://www.bemasher.net/archives/944#footnote_1_944" id="identifier_1_944" class="footnote-link footnote-identifier-link" title="It seems like a coffee shop is more useful for thinking than it is for drinking coffee except that in order to be welcome at one you have to at least purchase the latter.">2</a>]</sup>.</p>
<p>To be continued...</p>
<ol class="footnotes"><li id="footnote_0_944" class="footnote">Particularly my own computer.</li><li id="footnote_1_944" class="footnote">It seems like a coffee shop is more useful for thinking than it is for drinking coffee except that in order to be welcome at one you have to at least purchase the latter.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/944/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Favorite Quotes</title>
		<link>http://www.bemasher.net/archives/909?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=favorite-quotes</link>
		<comments>http://www.bemasher.net/archives/909#comments</comments>
		<pubDate>Sat, 23 Oct 2010 08:44:47 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[quotes]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=909</guid>
		<description><![CDATA["I know you believe you understand what you think I said, but I am not sure you realise that what you heard is not what I meant." - Robert McCloskey "Ours not to reason why, ours not to let 'em die" -Hawkeye "... and my cat's are gonna to be like 'why you so fat?'" [...]]]></description>
			<content:encoded><![CDATA[<p>"I know you believe you understand what you think I said, but I am not sure you realise that what you heard is not what I meant." - Robert McCloskey</p>
<p>"Ours not to reason why, ours not to let 'em die" -Hawkeye</p>
<p>"... and my cat's are gonna to be like 'why you so fat?'" -Ayla</p>
<p>"My name is DJ Phalliz and I'm here to say: Kill your friends, kill them with a knife" - Hannelore</p>
<p>"We look at it this way: if you're not already on broadband with the multitude of options, and you can get broadband (i.e. you're not stranded out in the wilderness) in one way shape or form, you probably just don't really care, and we can make fun of you because you're not reading this post anyway." - Engadget</p>
<p>*cooing baby* "Sorry honey, none of our boobs make milk." - Tara</p>
<p>"Rene Descartes believed that the only thing we could know for certain is that the self exists, but you know what folks, RENE DESCARTES WAS WRONG, because we actually know two things: Thing number 1: existance of self and thing number 2: THEY'RE CALLED PANCAKES MCDONALDS NOT HOTCAKES!" - TheAmazingAtheist</p>
<p>Pete: Isn't Starcraft like the national sport of Korea?<br />
Seung-jin: You guys have Superbowl, we have Starcraft.</p>
<p>"Space is disease and danger wrapped in darkness and silence." - McCoy</p>
<p>"It nicely complemented the organist, a retired high school math teacher who felt that certain attributes of the Lord (violence and capriciousness in the Old Testament, majesty and triumph in the New) could be directly conveyed into the souls of the enpewed sinners through a kind of frontal sonic impregnation." - Cryptonomicon</p>
<p>"I needs to lighten up on the concentration of coffee... I think I can see through walls now..." - Terrill Yuhas</p>
<p>Me: "Honey?"<br />
She Who Must Be Obeyed: "Yes?"<br />
Me: "Have you seen my pistol?"<br />
SWMBO: "Which one?"<br />
Me: "The Springfield XD-45. Looks like the Glock, but bigger and uglier, if such a thing was possible…"<br />
SWMBO: "Nope. Haven’t seen it around." - Mr. and Mrs. Stephenson</p>
<p>"We're shallowly pedantic. | We're purling mittens. | We're pearl miters. | We're purulent mincers. | We're virulent monsters. | We're virtual mobsters. | We're illiterate mormons. | We're literal morons. | We're figurative emperors." - #xkcd topic on irc.foonetic.net</p>
<p>"Shhh... let the ridiculous thought propagate." - Malcolm Forbes</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/909/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kubota Bob Burgers</title>
		<link>http://www.bemasher.net/archives/790?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=kubota-bob-burgers</link>
		<comments>http://www.bemasher.net/archives/790#comments</comments>
		<pubDate>Wed, 30 Jun 2010 00:02:43 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[burger]]></category>
		<category><![CDATA[hamburger]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=790</guid>
		<description><![CDATA[1lb Ground beef//chuck//sirloin (cow of any sort) 1/2 tsp Garlic Powder 1 tsp Onion Powder 1/2 tsp Black Pepper 1 tbsp Worchestershire Sauce 1 tbsp A1 Steak Sauce Mix ingredients thoroughly without ground beef. Then mix into ground beef. Make paddies, then cook to preference. Lightly salt on grill. Better flavor if you let it [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>1lb Ground beef//chuck//sirloin (cow of any sort)</li>
<li>1/2 tsp Garlic Powder</li>
<li>1 tsp Onion Powder</li>
<li>1/2 tsp Black Pepper</li>
<li>1 tbsp Worchestershire Sauce</li>
<li>1 tbsp A1 Steak Sauce</li>
</ul>
<p>Mix ingredients thoroughly without ground beef. Then mix into ground beef. Make paddies, then cook to preference. Lightly salt on grill. Better flavor if you let it "marinade" overnight. Makes 4x decently sized hamburgers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/790/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Las Vegas (Hell-hole if you will)</title>
		<link>http://www.bemasher.net/archives/697?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=las-vegas-hell-hole-if-you-will</link>
		<comments>http://www.bemasher.net/archives/697#comments</comments>
		<pubDate>Sun, 14 Mar 2010 00:15:04 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cars]]></category>
		<category><![CDATA[driving]]></category>
		<category><![CDATA[Las Vegas]]></category>
		<category><![CDATA[roadtrip]]></category>
		<category><![CDATA[Tahoe]]></category>
		<category><![CDATA[trip]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=697</guid>
		<description><![CDATA[There has been a minor hitch in our plans. Originally we were planning to meet Rita//Nolan's parents in Las Vegas for lunch but unfortunately for Rita//Nolan's mom she broke her ankle while rock climbing not more than 2 days before our trip. She just finished having surgery yesterday for a plate and pins to fix [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a minor hitch in our plans. Originally we were planning to meet Rita//Nolan's parents in Las Vegas for lunch but unfortunately for Rita//Nolan's mom she broke her ankle while rock climbing not more than 2 days before our trip. She just finished having surgery yesterday for a plate and pins to fix her otherwise borked ankle.</p>
<p>So when we arrived in Vegas we were still planning to meet Rita//Nolan's dad for lunch especially since he had brought down Teresa//Nolan's snowboarding gear. We got to Vegas, and promptly met Rita//Nolan's dad who still had business to attend to so we wandered down the strip. Suffice it to say almost everything about Las Vegas disgusts and repulses me. The people that frequent there, the places, the abundance of hand-sanitizer all speak volumes about the vile and scum that is Las Vegas. So after wandering around to waste an hour we made our way back to the hotel to meet Rita//Nolan's dad.</p>
<p>He immediately suggested we go to stripburger, which is a burger place on the strip. The first unfortunate thing that happened involved copious amounts of very cold wind. Oh and I forgot to mention the wait. We were told it would be 15 minutes and then waited a little over an hour. As soon as we were seated<sup>[<a href="http://www.bemasher.net/archives/697#footnote_0_697" id="identifier_0_697" class="footnote-link footnote-identifier-link" title="At the worst table in the establishment, next to the street where it was freaking windy and freaking cold.">1</a>]</sup> the first thing i noticed was the lack of space heaters around our table. Every other table had 1 or 2<sup>[<a href="http://www.bemasher.net/archives/697#footnote_1_697" id="identifier_1_697" class="footnote-link footnote-identifier-link" title="Usually two.">2</a>]</sup> space heaters where ours had: NONE.</p>
<p>Other than that food was good. I don't really have much more to say about the establishment than that.</p>
<p>As for exiting the hell-hole we ran into some trouble once we got onto the freeway. There was a car crash on the right which brought everything to a grinding hault as the idiots ahead of us all watched intently as they passed at a speed for 5mph. Once we were passed that we managed to find a gas station further down the road and fuel up before the 5 hour stretch until Falon or Fallon or whatever. Except that once we were on the road Ayla had taken over driving for Rita and missed an exit or took a wrong one or something, so we had ot stop along the shoulder for them to catch up again.</p>
<p>As of now, all is well. I'm writing to you live from my laptop which I've tethered my new phone to. Not exactly tethered but setup and tunneled a SOCKS proxy from my phone to my laptop so I can browse the internet on the road.</p>
<ol class="footnotes"><li id="footnote_0_697" class="footnote">At the worst table in the establishment, next to the street where it was freaking windy and freaking cold.</li><li id="footnote_1_697" class="footnote">Usually two.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/697/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiatus</title>
		<link>http://www.bemasher.net/archives/672?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hiatus</link>
		<comments>http://www.bemasher.net/archives/672#comments</comments>
		<pubDate>Thu, 12 Nov 2009 05:53:40 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=672</guid>
		<description><![CDATA[Sorry I've been pretty swamped with school and things. Hopefully over winter break I'll feel the urge to write again.]]></description>
			<content:encoded><![CDATA[<p>Sorry I've been pretty swamped with school and things. Hopefully over winter break I'll feel the urge to write again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/672/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mary cCmndhd</title>
		<link>http://www.bemasher.net/archives/668?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mary-ccmndhd</link>
		<comments>http://www.bemasher.net/archives/668#comments</comments>
		<pubDate>Sun, 18 Oct 2009 07:54:51 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=668</guid>
		<description><![CDATA[One of the most awesome passages in Cryptonomicon: Lawrence Waterhouse's libido is suppressed for about a week by the pain and swelling in his jaw. Then the pain and swelling in his groin surges into the fore, and he begins searching his memories of the dance, wondering if he made any progress with Mary cCmndhd. [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most awesome passages in Cryptonomicon:</p>
<blockquote><p>
Lawrence Waterhouse's libido is suppressed for about a week by the pain and swelling in his jaw. Then the pain and swelling in his groin surges into the fore, and he begins searching his memories of the dance, wondering if he made any progress with Mary cCmndhd. </p>
<p>He wakes up suddenly at four o'clock one Sunday morning, clammily coated from his nipples to his knees. Rod is still sleeping soundly, thank god, and so if Waterhouse did any moaning or calling out of names during his dream, Rod's probably not aware of it. Waterhouse begins trying to clean himself off without making a lot of noise. He doesn't even want to think about how he's going to explain the condition of the sheets to Who Will Launder Them. "It was completely innocent, Mrs. McTeague. I dreamed that I came downstairs in my pajamas and that Mary was sitting in the parlor in her uniform, drinking tea, and she turned and looked me in the eye, and then I just couldn't control myself and aaaaAAAHHH! HUH! HUH! HUH! HUH! HUH! HUH! HUH! HUH! HUH! HUH! HUH! And then I woke up and just look at the mess." </p>
<p>Mrs. McTeague (and other old ladies like her all around the world) does the laundry only because it is her role in the giant Ejaculation Control Conspiracy which, as Waterhouse is belatedly realizing, controls the entire planet. No doubt she has a clipboard down in the cellar, next to her mangle, where she marks down the frequency and volume of the ejaculations of her four boarders. The data sheets are mailed into some Bletchley Park type of operation somewhere (Waterhouse guesses it's disguised as a large convent in upstate New York), where the numbers from all round the world are tabulated on Electrical Till Corporation machines and printouts piled up on carts that are wheeled into the offices of the high priestesses of the conspiracy, dressed in heavily starched white raiments, embroidered with the emblem of the conspiracy: a penis caught in a mangle. The priestesses review the data carefully. They observe that Hitler still isn't getting any, and debate whether letting him have some would calm him down a little bit or just give him license to run further out of control. It will take months for the name of Lawrence Pritchard Waterhouse to come to the top of the list, and months for orders to be sent out to Brisbane&#8212;and even then, the orders may condemn him to another year of waiting for Mary cCmndhd to show up in his dreams with a teacup. </p>
<p>Mrs. McTeague, and other ECC members (such as Mary cCmndhd and basically all of the other young women) are offended by easy girls, prostitutes, and whorehouses, not for religious reasons, but because they provide a refuge where men can have ejaculations that are not controlled, metered, or monitored in any way. Prostitutes are turncoats, collaborators. </p>
<p>All of this comes into Waterhouse's mind as he lies in his damp bed between four and six o'clock in the morning, considering his place in the world with the crystalline clarity that can only be obtained by getting a good night's sleep and then venting several weeks' jism production. He has reached a fork in the road. </p>
<p>Last night, before Rod turned in, he shined his shoes, explaining that tomorrow morning he had to be up bright and early for church. Now, Waterhouse knows what that means, having spent many a Sabbath on Qwghlm, cringing and blushing under the glares of the locals, who were outraged that he appeared to be running the huffduff equipment on the day of rest. He has seen them shuffling into their morbid, thousand-year-old black-stone chapel on Sunday mornings for their three-hour services. Hell, Waterhouse even <em>lived</em> in a Qwghlmian chapel for several months. Its gloom suffused his whole being. </p>
<p>Going to church with Rod would mean giving in to the ECC, becoming their minion. The alternative is the whorehouse. </p>
<p>Even though he grew up in churches, raised by church people, Waterhouse (as must be obvious by this point) never really understood their attitudes about sex. Why did they get so hung up on that one issue, when there were others like murder, war, poverty, and pestilence? </p>
<p>Now, finally, he gets it: the churches are merely one branch of the ECC. And what they are doing, when they fulminate about sex, is trying to make sure that all the young people fall in line with the ECC's program. </p>
<p>So, what is the end result of the ECC's efforts? Waterhouse stares at the ceiling, which is starting to become fuzzily visible as the sun rises in the west, or the north, or wherever the hell it rises here in the Southern Hemisphere. He takes a quick inventory of the world and finds that basically the ECC is running the entire planet, good countries and bad countries alike. That all successful and respected men are minions of the ECC, or at least are so scared of it that they pretend to be. Non-ECC members live on the fringes of society, like prostitutes, or have been driven deep underground and must waste tremendous amounts of time and energy keeping up a false front. If you knuckle under and become a minion of the ECC, you get to have a career, a family, kids, wealth, house, pot roasts, clean laundry, and the respect of all the other ECC minions. You have to pay dues in the form of chronic nagging sexual irritation which can only be relieved by, and at the discretion and convenience of, one person, the person designated for this role by the ECC: your wife. On the other hand, if you reject the ECC and its works, you can't, by definition, have a family, and your career options are limited to pimp, gangster, and forty-year enlisted sailor. </p>
<p>Hell, it's not even that bad of a conspiracy. They build churches and universities, educate kids, install swingsets in parks. Sometimes they throw a war and kill ten or twenty million people, but it's a drop in the bucket compared to stuff like influenza&#8212;which the ECC campaigns against by nagging everyone to wash their hands and cover their mouths when sneezing. </p>
<p>The alarm clock. Rod rolls out of bed like it's a Nip air raid. Waterhouse stares at the ceiling for another few minutes, dithering. But he knows where he's going, and there's no point in wasting any more time. He's going to church, and not exactly because he has renounced Satan and all his works, but because he wants to fuck Mary. He almost can't help flinching when he says (to himself) this terrible-sounding thing. But the weird thing about church is that it provides a special context within which it is perfectly okay to want to fuck Mary. As long as he goes to church, he can want to fuck Mary as much as he wants, he can spend all of his time, in and out of church, thinking about fucking Mary. He can let her know that he wants to fuck her as long as he finds a more oblique way of phrasing it. And if he jumps through certain hoops (hoops of gold) he can even fuck Mary in actuality, and it will all be perfectly acceptable&#8212;at no time will he have to feel the slightest trace of shame or guilt. </p>
<p>He rolls out of bed, startling Rod, who (being some sort of jungle commando) is easily startled. "I'm going to fuck your cousin until the bed collapses into a pile of splinters," Waterhouse says. </p>
<p>Actually, what he says is "I'm going to church with you." But Waterhouse, the cryptologist, is engaging in a bit of secret code work here. He is using a newly invented code, which only he knows. It will be very dangerous if the code is ever broken, but this is impossible since there is only one copy, and it's in Waterhouse's head. Turing might be smart enough to break the code anyway, but he's in England, and he's on Waterhouse's side, so he'd never tell </p>
<p>A few minutes later, Waterhouse and cCmndhd go downstairs, headed for "church," which in Waterhouse's secret code, means "headquarters of the Mary-fucking campaign of 1944." </p>
<p>As they step out into the cool morning air they can hear Mrs. McTeague bustling into their bedroom to strip their beds and inspect their sheets. Waterhouse smiles, thinking that he has just gotten away with something; the damning and overwhelming evidence found on his bed linens will be neatly cancelled out by the fact that he got up early and went to church. </p>
<p>He is expecting a prayer-group meeting in the basement of a dry-goods store, but it turns out that the Inner Qwghlmians got banished to Australia in droves. Many of them settled in Brisbane. In the downtown they managed to construct a United Ecclesiastical Church out of rough hewn beige sandstone. It would look big, solid, and almost opulent if it were not directly across the street from the Universal Ecclesiastical Church, which is twice as big and made of smooth-faced limestone. Outer Qwghlmians, dressed in dour blacks and greys, and frequently in navy uniforms, shuffle up the wide, time-blackened steps of the Universal Ecclesiastical Church, occasionally turning their heads to throw disapproving looks across the street at the Inner Qwghlmians, who are actually dressed for the season (it is summer in Australia) or in Army uniforms. Waterhouse can see that what really pisses them off is the sound of the music that vents from the United Ecclesiastical Church whenever its red enameled front doors are hauled open. The choir is practicing and the organ is playing. But he can tell from half a block away that something's wrong with the instrument. </p>
<p>The look of the Inner Qwghlmian women in their pastel dresses and bright bonnets is reassuring. These do not look like people who engage in human sacrifice. Waterhouse tries to spring lightly up the steps as if he really wants to be here. Then he remembers that he <em>does</em> want to be here, because it is all part of his plan to fuck Mary. </p>
<p>The churchgoers are all talking in Qwghlmian, greeting each other and saying nice things to Rod, who is evidently well thought of. Waterhouse has no idea what they are saying, and finds it comforting to know that most of them don't either. He strolls into the central aisle of the church, stares down its vault to the altar, the choir behind it, singing beautifully; Mary is there, in the alto section, exercising those pipes of hers, which are framed attractively by the satin stole of her chorister's uniform. Above and behind the choir, a big old pipe organ spreads its tarnished wings, like a stuffed and mounted eagle that's been sitting in a damp attic for fifty years. It wheezes and hisses asthmatically, and emits bizarre, discordant drones when certain stops are used; this happens when a valve is stuck open, and it is called a cipher. Waterhouse knows all about ciphers. </p>
<p>Notwithstanding the pathetic organ, the choir is spectacular, and builds to a stirring six-part-harmony climax as Waterhouse ambles up the aisle, wondering whether his erection is visible. A shaft of light comes in through the stained-glass rosette above the organ pipes and pinions Waterhouse in its gaudy beam. Or maybe it just feels that way, because Waterhouse has it all figured out now. </p>
<p>Waterhouse is going to fix the church's organ. This project will be sure to have side benefits for his own organ, a single-pipe instrument that needs attention just as badly. </p>
<p>It turns out that, like all ethnic groups that have been consistently screwed for a long time, the Inner Qwghlmians have great music. Not only that, they actually have fun in church. The minister actually has a sense of humor. It's about as tolerable as church could ever be. Waterhouse hardly pays attention because he is doing a lot of staring: first, at Mary, then at the organ (trying to figure out how it is engineered) then back to Mary for a while. </p>
<p>He is outraged and offended, after the service, when the powers that be are reluctant to let him, a total stranger and a Yank to boot, begin ripping off access panels and meddling with the inner workings of the organ. The minister is a good judge of character&#8212;a little too good to suit Waterhouse. The organist (and hence ultimate authority on all matters organic) looks to have been shipped over here with the very first load of convicts after having been convicted, in the Old Bailey, of talking too loud, bumping into things, not tying his shoelaces properly, and having dandruff so in excess of Society's unwritten standards as to offend the dignity of the Queen and of the Empire. </p>
<p>It all leads to an unbearably tense and complicated meeting in a Sunday school classroom near the offices of the minister, who is called the Rev. Dr. John Mnrh. He is a stout red-faced chap who clearly would prefer to have his head in a tun of ale but who is putting up with all of this because it's good for his immortal soul. </p>
<p>This meeting essentially becomes a venue within which the organist, Mr. Drkh, can vent his opinions on the sneakiness of the Japanese, why the invention of the well-tempered tuning system was a bad idea and how all music written since has been a shabby compromise, the sterling qualities of the General, the numerological significance of the lengths of various organ pipes, how the excessive libido of American troops might be controlled with certain dietary supplements, how the hauntingly beautiful modes of traditional Qwghlmian music are particularly ill-suited to the well-tempered tuning system, how the king's dodgy Germanic relatives are plotting to take over the Empire and turn it over to Hitler, and, first and foremost, that Johann Sebastian Bach was a bad musician, a worse composer, an evil man, a philanderer, and the figurehead of a worldwide conspiracy, headquartered in Germany, that has been slowly taking over the world for the last several hundred years, using the well-tempered tuning system as a sort of carrier frequency on which its ideas (which originate with the Bavarian illuminati) can be broadcast into the minds of everyone who listens to music&#8212;especially the music of Bach. And&#8212;by the way&#8212;how this conspiracy may best be fought off by playing and listening to traditional Qwghlmian music, which, in case Mr. Drkh didn't make this perfectly clear, is wholly incompatible with well-tempered tuning because of its haunting and beautiful, but numerologically perfect, scale. </p>
<p>"Your thoughts on numerology are most interesting," Waterhouse says loudly, running Mr. Drkh off the rhetorical road. "I myself studied with Drs. Turing and von Neumann at the Institute for Advanced Studies in Princeton." </p>
<p>Father John snaps awake, and Mr. Drkh looks as if he's just taken a fifty-caliber round in the small of his back. Clearly, Mr. Drkh has had a long career of being the weirdest person in any given room, but he's about to go down in flames. </p>
<p>In general, Waterhouse isn't good at just winging it, but he's tired and pissed off and horny, and this is a fucking war, and sometimes you <em>have</em> to. He mounts the podium, dives for a round of chalk, and starts hammering equations onto the blackboard like an ack-ack gun. He uses well-tempered tuning as a starting point, takes off from there into the deepest realms of advanced number theory, circles back all of a sudden to the Qwghlmian modal scale, just to keep them on their toes, and then goes screaming straight back into number theory again. In the process, he actually stumbles across some interesting material that he doesn't think has been covered in the literature yet, and so he diverts from strict bullshitting for a few minutes to explore this thing and actually prove something that he thinks could probably be published in a mathematical journal, if he just gets around to typing it up properly. It reminds him that he's not half bad at this stuff when he's recently ejaculated, and that in turn just fuels his resolve to get this Mary-fucking thing worked out. </p>
<p>Finally, he turns around, for the first time since he started. Father John and Mr. Drkh are both dumbfounded. </p>
<p>"Let me just demonstrate!" Waterhouse blurts, and strides out of the room and doesn't bother looking back. Back in the church, he goes to the console, blows the dandruff off the keys, hits the main power switch. The electric motors come on, somewhere back behind the screen, and the instrument begins to complain and whine. No matter&#8212;it can all be drowned out. He scans the rows of stops&#8212;he already knows what this organ's got, because he's listened and deconstructed. He starts yanking out knobs. </p>
<p>Now Waterhouse is going to demonstrate that Bach can sound good even played on Mr. Drkh's organ, if you choose the right key. Just as Father John and Mr. Drkh are about halfway up the aisle, Waterhouse slams into that old chestnut, Toccata and Fugue in D Minor, except that he's transposing it into C-sharp minor as he goes along, because (according to a very elegant calculation that just came into his head as he was running up the aisle of the church) it ought to sound good that way when played in Mr. Drkh's mangled tuning system. </p>
<p>The transposition is an awkward business at first and he hits a few wrong notes, but then it comes naturally and he transitions from the toccata into the fugue with tremendous verve and confidence. Gouts of dust and salvos of mouse droppings explode from the pipes as Waterhouse invokes whole ranks that have not been used in decades. Many of these are big bad loud reed stops that are difficult to tune. Waterhouse senses the pumping machinery straining to keep up with this unprecedented demand for power. The choir loft is suffused with a brilliant glow as the dust flung out of the choked pipes fills the air and catches the light coming through the rose window. Waterhouse muffs a pedal line, spitefully kicks off his terrible shoes and begins to tread the pedals the way he used to back in Virginia, with his bare feet, the trajectory of the bass line traced out across the wooden pedals in lines of blood from his exploded blisters. This baby has some nasty thirty-two-foot reed stops in the pedals, real earthshakers, probably put there specifically to irritate the Outer Qwghlmians across the street. None of the people who go to this church have ever heard these stops called into action, but Waterhouse puts them to good use now, firing off power chords like salvos from the mighty guns of the battleship <em>Iowa</em>. </p>
<p>All during the service, during the sermon and the scripture readings and the prayers, when he wasn't thinking about fucking Mary, he was thinking about how he was going to fix this organ. He was thinking back to the organ he worked on in Virginia, how the stops enabled the flow of air to the different ranks of pipes and how the keys on the keyboards activated all of the pipes that were enabled. He has this whole organ visualized in his head now, and while he is pounding through to the end of the figure, the top of his skull comes off, the filtered red light pours in, he sees the entire machine in his mind, as if in an exploded draftsman's view. Then it transforms itself into a slightly different machine&#8212;an organ that runs on electricity, with ranks of vacuum tubes here, and a grid of relays there. He has the answer, now, to Turing's question, the question of how to take a pattern of binary data and bury it into the circuitry of a thinking machine so that it can be later disinterred. </p>
<p>Waterhouse knows how to make electric memory. He must go write a letter to Alan instantly! </p>
<p>"Excuse me," he says, and runs from the church. On his way out, he brushes past a small young woman who has been standing there gaping at his performance. When he is several blocks away, he realizes two things: that he is walking down the street barefoot, and that the young woman was Mary cCmndhd. He will have to circle back later and get his shoes and maybe fuck her. But first things first!
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/668/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quote of the Day</title>
		<link>http://www.bemasher.net/archives/661?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quote-of-the-day-2</link>
		<comments>http://www.bemasher.net/archives/661#comments</comments>
		<pubDate>Tue, 22 Sep 2009 08:31:10 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cryptonomicon]]></category>
		<category><![CDATA[neal stephenson]]></category>
		<category><![CDATA[quote]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=661</guid>
		<description><![CDATA[Epiphye Corp.'s business plan is about an inch thick, neither fat nor skinny as these things go. The interior pages are slickly and groovily desktop-published out of Avi's laptop. The covers are rugged hand-laid paper of rice chaff, bamboo tailings, free-range hemp, and crystalline glacial meltwater made by wizened artisans operating out of a mist-shrouded [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Epiphye Corp.'s business plan is about an inch thick, neither fat nor skinny as these things go. The interior pages are slickly and groovily desktop-published out of Avi's laptop. The covers are rugged hand-laid paper of rice chaff, bamboo tailings, free-range hemp, and crystalline glacial meltwater made by wizened artisans operating out of a mist-shrouded temple hewn from living volcanic rock on some island known only to aerobically gifted, Spandex-sheathed Left Coast travel bores. An impressionistic map of the South China Sea has been dashed across these covers by molecularly reconstructed Ming Dynasty calligraphers using brushes of combed unicorn mane dipped into ink made of grinding down charcoal slabs fashioned by blind stylite monks from hand-charred fragments of the True Cross.</p></blockquote>
<p>That is probably the most epic description of anything I've ever read.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/661/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quote of the Day</title>
		<link>http://www.bemasher.net/archives/658?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=quote-of-the-day</link>
		<comments>http://www.bemasher.net/archives/658#comments</comments>
		<pubDate>Sat, 12 Sep 2009 04:44:47 +0000</pubDate>
		<dc:creator>bemasher</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cryptonomicon]]></category>
		<category><![CDATA[military]]></category>
		<category><![CDATA[neal stephenson]]></category>
		<category><![CDATA[quote]]></category>
		<category><![CDATA[story]]></category>
		<category><![CDATA[war]]></category>

		<guid isPermaLink="false">http://www.bemasher.net/?p=658</guid>
		<description><![CDATA[I have a couple of friends that either have already served in the military or are currently serving. And I've noticed one thing in a book I'm reading[1] that seems to be pretty close to what my friends have confirmed. Guys and gals from his high school keep com­ing round to vis­it, and Bob­by soon [...]]]></description>
			<content:encoded><![CDATA[<p>I have a couple of friends that either have already served in the military or are currently serving. And I've noticed one thing in a book I'm reading<sup>[<a href="http://www.bemasher.net/archives/658#footnote_0_658" id="identifier_0_658" class="footnote-link footnote-identifier-link" title="Cryptonomicon by Neal Stephenson">1</a>]</sup> that seems to be pretty close to what my friends have confirmed.</p>
<blockquote><p>
Guys and gals from his high school keep com­ing round to vis­it, and Bob­by soon learns the trick that his fa­ther and his un­cles and grandun­cles all knew, which is that you nev­er talk about the specifics of what hap­pened over there. No one wants to hear about how you dug half of your bud­dy’s mo­lars out of your leg with the point of a bay­onet. All of these kids seem like id­iots and lightweights to him now. The on­ly per­son he can stand to be around is his great-​grand­fa­ther Shaftoe, nine­ty-​four years of age and sharp as a tack, who was there at Pe­ters­burg when Burn­side blew a huge hole in the Con­fed­er­ate lines with buried ex­plo­sives and sent his men rush­ing in­to the crater where they got slaugh­tered. He nev­er talks about it, of course, just as Bob­by Shaftoe nev­er talks about the lizard.
</p></blockquote>
<p>While this quote isn't exactly accurate it does have parts of the truth.</p>
<p>My friends rarely ever talk about what they did or saw when they served and for a good reason too. Typically it's because there's no way we can relate to their experiences and the story or feelings are completely lost on us. Only once did a friend share a story and it was after a somewhat traumatic experience, so it wasn't exactly normal circumstances for him to decide to tell us about it. So next time you see someone who served, thank them and respect them enough not to pry a war story out of them.</p>
<ol class="footnotes"><li id="footnote_0_658" class="footnote">Cryptonomicon by Neal Stephenson</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.bemasher.net/archives/658/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

