<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" gd:etag="W/&quot;DUMERHw6fip7ImA9WxJXFEs.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397</id><updated>2009-06-08T09:23:25.216-04:00</updated><title>cheaphack</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.cheaphack.net/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>102</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/cheaphack" type="application/atom+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">cheaphack</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DUMERHw5cCp7ImA9WxJXFEs.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-3213755933696060863</id><published>2009-06-08T08:52:00.002-04:00</published><updated>2009-06-08T09:23:25.228-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-08T09:23:25.228-04:00</app:edited><title>The Foreign Registration office in Bangalore</title><content type="html">As a foreigner, the government of India requires that I register with the police within a fortnight of my arrival in India.  I have no problem with this &lt;span style="font-style: italic;"&gt;conceptually&lt;/span&gt;; I believe in India's sovereignty, and I think it is within their rights.  However, the implementation of this policy leaves sucks.&lt;br /&gt;&lt;br /&gt;First of all, I admit that I don't speak Kannada, and I don't speak Hindi (or Tamil, Telugu, Assamese, or any of the twenty some official languages of India), but in my defense, I strongly doubt that the cumulative language coverage of the officers would accommodate every citizen of India, and thus the difficult of communications issue is mute.  Let me also qualify this by saying that my company has a liason team, whose mission is to try to make this process much easier for me.&lt;br /&gt;&lt;br /&gt;Nonetheless, I had to visit the foreign registration office (FRO) six times over the last week, and had to pay a $30 fee for late registration.&lt;br /&gt;&lt;br /&gt;(Visit 1) I arrive at the office, sign in, and am handed a bundle of forms.  I don't know why my liason team doesn't keep these forms on file.&lt;br /&gt;(Visit 2) Because of several work engagements, I couldn't start the process until 4:30pm.  The liason and I drive across town to a notary, and then back to the FRO office.  When we get within a block, he tells me to get out and run.  I walk in a 5:25pm, but the clerk swears it's 5:30, that there's nothing I can do, and that he doesn't care that I have to pay a $30 late fee.&lt;br /&gt;(Visit 3) I come back the next day, but I forgot my passport. D'oh&lt;br /&gt;(Visit 4) Later that day, they review my paperwork, highlighting several mundane details.  They hand me the signed form and tell me to go to the other counter.  There, they tell me to sit and wait.  Thirty minutes later, I ask why I'm waiting and he tells me to go back to the first counter.  There, they take my forms, hand me a receipt, and tell me to come the next evening.&lt;br /&gt;(Visit 5) I arrive the next evening, and hand them my receipts.  They tell me to go to the other counter, and the second counter tells me to wait.  Twenty minutes later, I ask why I'm waiting, and they tell me to go back to the first counter.  There, the man gives me a deposit slip, and asks me to take it to the bank down the street, where I must deposit $30.  When I return to the FRO, they give me a receipt and ask me to come back Monday.&lt;br /&gt;(Visit 6) I arrive, sign-in, and deposit my receipt.  He tells me to go to the other counter and ask for Ajita (sp?).  I do so, he looks at it for 30 minutes, then hands it back and tells me to go to the other counter.  Finally, I am a legal resident.&lt;br /&gt;&lt;br /&gt;The other interns have similarly horrifying stories; some were given business visas instead of employment visas; others were given student visas.  These people have a lot more work to do before they can be legally paid within India.&lt;br /&gt;&lt;br /&gt;I'll leave it as an exercise to the reader to replace the FRO office with 100 lines of code in the language of your choice.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-3213755933696060863?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nmwffzmlfqdOOace-z5OkmEjoRY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nmwffzmlfqdOOace-z5OkmEjoRY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nmwffzmlfqdOOace-z5OkmEjoRY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nmwffzmlfqdOOace-z5OkmEjoRY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/3213755933696060863/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=3213755933696060863" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3213755933696060863?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3213755933696060863?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/06/foreign-registration-office-in.html" title="The Foreign Registration office in Bangalore" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CEAHQXg-fCp7ImA9WxJRGE4.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-8240690974248336196</id><published>2009-05-20T11:18:00.001-04:00</published><updated>2009-05-20T11:18:50.654-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-20T11:18:50.654-04:00</app:edited><title>I'm off to India</title><content type="html">I leave for India tonight!  I'll be back in September.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-8240690974248336196?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TMiK6nzcuzN5gtkBxb4LD334eqw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TMiK6nzcuzN5gtkBxb4LD334eqw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TMiK6nzcuzN5gtkBxb4LD334eqw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TMiK6nzcuzN5gtkBxb4LD334eqw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/8240690974248336196/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=8240690974248336196" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8240690974248336196?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8240690974248336196?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/05/im-off-to-india.html" title="I'm off to India" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;C0YHSHYyeip7ImA9WxJRF0U.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-8388865071377240196</id><published>2009-05-19T20:56:00.003-04:00</published><updated>2009-05-19T20:58:59.892-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-19T20:58:59.892-04:00</app:edited><title>Power Steering Fluid Pump, Mercedes-Benz 190E (W201)</title><content type="html">The girlfriend and I spent an hour trying to find the power steering fluid reservior on a Mercedez-Benz 190E (a.k.a. W201).  Even the internet didn't know.  We found it again, in hopes that the next guy finds it easy.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/npj/3547585764/" title="Power Steering Pump; Mercedes-Benz 190E (W201) by nickjohnson, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3346/3547585764_6f23ccd31f_m.jpg" alt="Power Steering Pump; Mercedes-Benz 190E (W201)" height="180" width="240" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is the power steering pump in a Mercedes-Benz 190E (a.k.a W201).  The top of the power steering pump is the power steering reservoir.&lt;br /&gt;&lt;br /&gt;Simply unscrew the black nut on top, and remove the lid.  You should extract the old  fluid using something like a turkey baster (which, of course, you should never use on food again).  Then fill it mostly to the top (owner's manual says 0.6L).&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-8388865071377240196?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hYXQw1g1HmGnitCAEltPWWJXqTM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hYXQw1g1HmGnitCAEltPWWJXqTM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hYXQw1g1HmGnitCAEltPWWJXqTM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hYXQw1g1HmGnitCAEltPWWJXqTM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/8388865071377240196/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=8388865071377240196" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8388865071377240196?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8388865071377240196?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/05/girlfriend-and-i-spent-hour-trying-to.html" title="Power Steering Fluid Pump, Mercedes-Benz 190E (W201)" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;CkIMR349fSp7ImA9WxJRF0U.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-5415765667863157979</id><published>2009-05-19T20:40:00.002-04:00</published><updated>2009-05-19T20:49:46.065-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-05-19T20:49:46.065-04:00</app:edited><title>Good Quote: Le Corbusier</title><content type="html">&lt;blockquote&gt;... Man's stock of tools marks out the stages of civilization, the stone age, the bronze age, the iron age.  Tools are the result of successive improvement; the effort of all generations is embodied in them.  The too is the direct and immediate expression of progress; it gives man essential assistance and essential freedom also.  We throw the out-of-date tool on the scrap-heap: the carbine, the culverin, the growler and the old locomotive.  The action is a manifestation of health, of moral health, of morale also; it is not right that we should produce bad things because of a bad tool; nor is it right that we should waste our energy, our health and our courage because of a bad tool; it must be thrown away and replaced.&lt;/blockquote&gt;&lt;br /&gt;Le Corbusier&lt;br /&gt;in "Towards a New Architecture"&lt;br /&gt;Translated by Frederick Etchells&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-5415765667863157979?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6UXdhTGttcMOwvxc6xSkVh277-I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6UXdhTGttcMOwvxc6xSkVh277-I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6UXdhTGttcMOwvxc6xSkVh277-I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6UXdhTGttcMOwvxc6xSkVh277-I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/5415765667863157979/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=5415765667863157979" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/5415765667863157979?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/5415765667863157979?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/05/good-quote-le-corbusier.html" title="Good Quote: Le Corbusier" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DUAMQXg5eyp7ImA9WxJTGUs.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-7873095006751989659</id><published>2009-04-28T21:12:00.001-04:00</published><updated>2009-04-28T21:16:20.623-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-04-28T21:16:20.623-04:00</app:edited><title>Cute typo: Turing Basin Park</title><content type="html">&lt;iframe marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=turing+basin+park&amp;amp;sll=40.328986,-74.653151&amp;amp;sspn=0.005734,0.013947&amp;amp;ie=UTF8&amp;amp;z=14&amp;amp;iwloc=A&amp;amp;ll=40.33732,-74.65004&amp;amp;output=embed" frameborder="0" height="350" scrolling="no" width="425"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=turing+basin+park&amp;amp;sll=40.328986,-74.653151&amp;amp;sspn=0.005734,0.013947&amp;amp;ie=UTF8&amp;amp;z=14&amp;amp;iwloc=A&amp;amp;ll=40.33732,-74.65004" style="color: rgb(0, 0, 255); text-align: left;"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;br /&gt;&lt;br /&gt;This is supposed to be "&lt;a href="http://www.princetontwp.org/delrar.html"&gt;Turning Basin Park&lt;/a&gt;," but apparently some geek over at google thought "&lt;a href="http://en.wikipedia.org/wiki/Alan_turing"&gt;Turing&lt;/a&gt;" would be more appropriate, given the proximity to Princeton.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-7873095006751989659?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tY9nW4vrF_r2qFgPXioImJIOiZo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tY9nW4vrF_r2qFgPXioImJIOiZo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tY9nW4vrF_r2qFgPXioImJIOiZo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tY9nW4vrF_r2qFgPXioImJIOiZo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/7873095006751989659/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=7873095006751989659" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/7873095006751989659?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/7873095006751989659?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/04/cute-typo-turing-basin-park.html" title="Cute typo: Turing Basin Park" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;CUUEQHs_fip7ImA9WxVUGUw.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-7766841383245181886</id><published>2009-03-24T12:34:00.002-04:00</published><updated>2009-03-24T12:46:41.546-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-24T12:46:41.546-04:00</app:edited><title>walk score -- measuring pedestrian friendlyness</title><content type="html">As I've mentioned before, I don't have a car, don't want one, and don't think that people should have an unquestioned right to drive a car.  I'm an urbanist, and I believe that people should be able to walk to all of their life's necessities, or in the worst case, ride a bike or public transportation.  Since I've moved to Princeton, one of my major complaints has been how inconvenient it is for someone without a car.&lt;br /&gt;&lt;br /&gt;Today, I discovered &lt;a href="http://www.walkscore.com/"&gt;WalkScore&lt;/a&gt; (via the Freakonomics Blog).  It is a google maps mash-up which tries to quantify how walkable an area is according to distance from common necessities, such as grocery stores and bars.  Very clever.  And for comparison:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.walkscore.com/get-score.php?street=douglas+avenue%2C+charlottesville%2C+va&amp;amp;go=Go"&gt;My old neighborhood in Charlottesville&lt;/a&gt;: 85/100 - very walkable&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.walkscore.com/get-score.php?street=dean+st+at+washington+ave%2C+brooklyn%2C+ny&amp;amp;go=Go"&gt;My old neighborhood in Brooklyn&lt;/a&gt;: 88/100 - very walkable&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.walkscore.com/get-score.php?street=king+st%2C+princeton%2C+nj&amp;amp;go=Go"&gt;My current neighborhood in Princeton&lt;/a&gt;: 29/100 - car-dependant&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.walkscore.com/get-score.php?street=washington+square+park%2C+new+york%2C+ny&amp;amp;go=Go"&gt;Washington Square Park, NYC&lt;/a&gt;: 100/100 - walker's paradise.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;It's nice to have some external validation on my opinion of Princeton ;)&lt;br /&gt;&lt;br /&gt;In all fairness to Princeton, if I were to live on &lt;a href="http://www.walkscore.com/get-score.php?street=witherspoon+st+at+spring+st%2C+princeton%2C+nj&amp;amp;go=Go"&gt;Witherspoon at Spring St&lt;/a&gt;, I'd live in Walker's Paradise 95/100, but what grad student can afford that?&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-7766841383245181886?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/iZSMh9fWLt9PiSyS5aapGvdVp44/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iZSMh9fWLt9PiSyS5aapGvdVp44/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/iZSMh9fWLt9PiSyS5aapGvdVp44/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/iZSMh9fWLt9PiSyS5aapGvdVp44/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/7766841383245181886/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=7766841383245181886" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/7766841383245181886?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/7766841383245181886?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/03/walk-score-measuring-pedestrian.html" title="walk score -- measuring pedestrian friendlyness" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total></entry><entry gd:etag="W/&quot;DUMGRHgycCp7ImA9WxVUFUw.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-7264252047929756382</id><published>2009-03-19T22:49:00.001-04:00</published><updated>2009-03-19T22:50:25.698-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-19T22:50:25.698-04:00</app:edited><title>Melting metal in the backyard</title><content type="html">&lt;object type="application/x-shockwave-flash" data="http://www.flickr.com/apps/video/stewart.swf?v=68975" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="226" width="400"&gt; &lt;param name="flashvars" value="intl_lang=en-us&amp;amp;photo_secret=07964178cc&amp;amp;photo_id=3369549902"&gt; &lt;param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=68975"&gt; &lt;param name="bgcolor" value="#000000"&gt; &lt;param name="allowFullScreen" value="true"&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=68975" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&amp;amp;photo_secret=07964178cc&amp;amp;photo_id=3369549902" height="226" width="400"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;a style="left: 0px ! important; top: 15px ! important;" title="Click here to block this object with Adblock Plus" class="rabxmcwcqfpqpwmfakzp visible" href="http://www.flickr.com/apps/video/stewart.swf?v=68975"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://makeprinceton.wordpress.com/2009/03/20/meeting-recap-metal-casting/"&gt;Read more a the MAKE:Princeton blog.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-7264252047929756382?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eDcMOjFN3HQ65CxpRYWunSDi_Es/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eDcMOjFN3HQ65CxpRYWunSDi_Es/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eDcMOjFN3HQ65CxpRYWunSDi_Es/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eDcMOjFN3HQ65CxpRYWunSDi_Es/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/7264252047929756382/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=7264252047929756382" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/7264252047929756382?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/7264252047929756382?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/03/melting-metal-in-backyard.html" title="Melting metal in the backyard" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;A0AFR3g5cCp7ImA9WxVVEko.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-5997947688881633476</id><published>2009-03-05T12:40:00.003-05:00</published><updated>2009-03-05T14:01:56.628-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-05T14:01:56.628-05:00</app:edited><title>Bjarne Stroustrup is so metal!</title><content type="html">&lt;a href="http://www.flickr.com/photos/npj/3331346238/" title="Bjarne Stroustrup is so metal! by nickjohnson, on Flickr"&gt;&lt;img style="margin: 1ex; float: left;" src="http://farm4.static.flickr.com/3618/3331346238_1ef40a4ed6_m.jpg" alt="Bjarne Stroustrup is so metal!" height="180" width="240" /&gt;&lt;/a&gt;On Wednesday, &lt;a href="http://en.wikipedia.org/wiki/Bjarne_Stroustrup"&gt;Bjarne Stroustrup&lt;/a&gt; made a visit to Princeton, and &lt;a href="http://liberty.princeton.edu/"&gt;the Liberty Research Group&lt;/a&gt; scheduled a private meeting with him before his colloquium.  We spent a little over an hour discussing the &lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x"&gt;C++0x&lt;/a&gt; and the future of C++.  Overall, Bjarne is a cool guy, and I had an excellent time talking with him.&lt;br /&gt;&lt;br /&gt;The wikipedia article about C++0x is painfully out of date.  Bjarne mentioned some upcoming features that are hardly mentioned, if at all.  Of these, the ones which took my interest the most were &lt;span style="font-style: italic;"&gt;Concepts&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Axioms&lt;/span&gt;, and the future of static typing in C++.&lt;br /&gt;&lt;br /&gt;I'll disclaim that I haven't read any C++0x standardization documents, not even drafts, so take everything here as a grain of salt.  These are simply my take-away points from the talk.&lt;br /&gt;&lt;br /&gt;Bjarne is concerned that the template feature of C++ does not allow programmers to sufficiently constrain template parameters.  For instance, a sort algorithm may be implemented to operate on a random-access iterator.  However, recall that iterators in the C++ STL do not share a common inheritance (and there are fair arguments that they shouldn't).  C++ templates cannot capture the notion that one of its formals must be a iterator-like type, and so specializing the template against, say a string, will likely yield hundreds of uninformative type errors instead of a simple error stating that we expect an iterator.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One solution to this problem would be to create base iterator classes in order to ensure an interface (this is the approach taken by Java, for instance).  However, one could argue that this is an inappropriate use of inheritance---it's not code re-use, and although we give many concepts the name &lt;span style="font-style: italic;"&gt;iterator&lt;/span&gt;, they really have little in common.&lt;br /&gt;&lt;br /&gt;Some languages use a notion of &lt;a href="http://en.wikipedia.org/wiki/Structural_typing"&gt;structural equivalence &lt;/a&gt;(or, less formally, duck typing) to capture these constraints.  I think this is the appropriate technique.  The earlier example of a sorting algorithm simply requires &lt;span style="font-style: italic;"&gt;some&lt;/span&gt; object which can provide random access to a data structure, and the most direct test for compatibility is whether the interface is a satisfied.  In C++0x, &lt;span style="font-style: italic;"&gt;Concepts&lt;/span&gt; are an implementation of structural equivalence (from the high-level, language view).  In the low-level view, concepts are a special case of templating, and produce multiple implementations of the same code according to the specific type.&lt;br /&gt;&lt;br /&gt;In a C++0x Concept, one can specify the methods which must be supported.  For instance, one may have a Concept named &lt;a href="http://en.wikipedia.org/wiki/Total_order"&gt;TotalOrder&lt;/a&gt;, which must support a less-than-or-equal-to operator.  Many types satisfy the TotalOrder concept, such as int, double, std::string, yet they are not required to have a common ancestor.  In this sense, a concept allows you to communicate many of the traits to a type, without paying the penalty of multiple inheritance.&lt;br /&gt;&lt;br /&gt;But Concepts get cooler.  Although I describe them as a mechanism for structural equivalence in C++, they can also be viewed as &lt;span style="font-style: italic;"&gt;mixins&lt;/span&gt;, since they allow a programmer to specify a default implementation for many methods.  With the prior example of TotalOrder, one could also add default implementations of greater-than, equal-to, etc, operators as functions of less-than-or-equal-to.  In this way, it becomes very easy for programmers to bootstrap support for all operators while writing minimal code.&lt;br /&gt;&lt;br /&gt;Suppose that I implement some class that satisfies TotalOrder.   This information simply means that my class supports comparison operators.  One wonders, however, if these operations actually behave as a total order.   As a counter example, I could write a random number generator  to  produce the result of the less-than-or-equal-to comparison---can a language be made to disallow this?  Or, can a compiler be taught to rely upon deeper qualities of total orders, without having a special case for total orders?&lt;br /&gt;&lt;br /&gt;Axioms allow the programmer to specify additional qualities of operations that transcend simple typing.  For instance, one could write axioms that signify that the less-than-or-equal-to relation is transitive, or that it is always the logical inverse of the greater-than relation.  With axioms, we can state that a sort algorithm not only requires a random-access-iterator, but also that there is a total order of the elements which satisfies transitivity.  The use of concepts and axioms allows us to specify &lt;span style="font-style: italic;"&gt;all&lt;/span&gt; of the constraints of the sort algorithm.&lt;br /&gt;&lt;br /&gt;But how can the compiler use axioms?  It is unlikely that any compiler will ever be able to verify that the listed axioms are true for a given implementation.  Instead, axioms will provide additional transformations to the compiler's arsenal of optimizations.  With support for axioms, many compiler optimizations including &lt;a href="http://en.wikipedia.org/wiki/Constant_folding"&gt;constant-folding&lt;/a&gt; (especially with associativity), &lt;a href="http://en.wikipedia.org/wiki/Strength_reduction"&gt;reduction in strength&lt;/a&gt;, and &lt;a href="http://en.wikipedia.org/wiki/Common_subexpression_elimination"&gt;common-subexpression elimination&lt;/a&gt; can be lifted from the compiler and expressed at the language level.  I think this is really cool.&lt;br /&gt;&lt;br /&gt;I think the notion of concepts and axioms struck home with me because they resemble some of my thinking on one of my side projects.  I've been working on a language for years now (never enough time, alas!) in which I plan to feature structural equivalence in typing for reasons similar to those outlined by Bjarne.  The axioms are a natural extension which I now realize I would like to support as well.&lt;br /&gt;&lt;br /&gt;Finally, before the meeting was over, I had to ask a question about type safety.  Throughout his book &lt;span style="font-style: italic;"&gt;The Design and Evolution of C++&lt;/span&gt;, Bjarne laments the type (un)safety of C.  Repeatedly, and with each new language feature, he attempts to make C++ more typesafe, but is repeatedly foiled by inherited features such as void pointers and unrestricted casting.  So, I asked: &lt;span style="font-style: italic;"&gt;are you ever going to take the plunge and drop support for pointers in C++?&lt;/span&gt;  His answer was intelligent, and showed a great understanding of not simply the technical considerations of C++, but also the political considerations.&lt;br /&gt;&lt;br /&gt;Mr. Stroustrup suggested that he hopes to add more and more features to C++ until type-safe alternatives are available for each and every unsafe aspect of C++.  Once that has happened, he hopes to define a safe subset of C++.  At that point, all existing C++ tools could be given a flag to provide warnings of unsafe features.  This safe sub-C++ will immediately have rich toolchain support, but will be able to provide strong guarantees, such as those provided by ML.  Excellent plan.&lt;br /&gt;&lt;br /&gt;Bjarne is a very interesting person indeed; I recommend you talk with him if you ever have the chance.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-5997947688881633476?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hzFHMp25s0pRNd3AG4rf6QAyLh0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hzFHMp25s0pRNd3AG4rf6QAyLh0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hzFHMp25s0pRNd3AG4rf6QAyLh0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hzFHMp25s0pRNd3AG4rf6QAyLh0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/5997947688881633476/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=5997947688881633476" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/5997947688881633476?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/5997947688881633476?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/03/bjarne-stroustrup-is-so-metal.html" title="Bjarne Stroustrup is so metal!" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></entry><entry gd:etag="W/&quot;Ck8BQn49fip7ImA9WxVWGU4.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-1774119290726200080</id><published>2009-03-01T13:02:00.003-05:00</published><updated>2009-03-01T13:07:33.066-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-01T13:07:33.066-05:00</app:edited><title>A quick thought...</title><content type="html">The other day, Daya and I rode our bikes to the local grocer to buy some groceries.  At the checkout line, we stuffed our groceries into our bags, when the teller asked, "Did you guys ride your bikes here?"&lt;br /&gt;&lt;br /&gt;"Yes," I responded, "How else does one buy groceries?"&lt;br /&gt;&lt;br /&gt;She deducted a dollar from our total, and told us the store offers a ride your bike discount.  The guy in line behind us muttered something to the effect of "I'm glad you're doing your part."&lt;br /&gt;&lt;br /&gt;It's at times like these that I want to say "No!  I'm not being a responsible person; rather, you are being irresponsible!"  Honestly, I think they should add a fee for driving to the grocer, perhaps charge for parking, or make you wear an "I hate the environment" shirt.&lt;br /&gt;&lt;br /&gt;But, I bit my tongue.&lt;br /&gt;&lt;br /&gt;On an unrelated note, &lt;a href="http://en.wikipedia.org/wiki/Bjarne_Stroustrup"&gt;Bjarne Stroustrup&lt;/a&gt; is visiting Princeton CS on the 4th for a 4:15 colloquium.  If you're in the area, you should check it out.  It will be packed.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-1774119290726200080?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FnId64G2jKz_YO3NbKX1lsjgqCs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FnId64G2jKz_YO3NbKX1lsjgqCs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FnId64G2jKz_YO3NbKX1lsjgqCs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FnId64G2jKz_YO3NbKX1lsjgqCs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/1774119290726200080/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=1774119290726200080" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/1774119290726200080?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/1774119290726200080?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/03/quick-thought.html" title="A quick thought..." /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;CUYNRHw_fyp7ImA9WxVQGUg.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-8308798272672375008</id><published>2009-02-06T12:08:00.010-05:00</published><updated>2009-02-06T15:46:35.247-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-06T15:46:35.247-05:00</app:edited><title>Failed reasoning by an Ivy League Grad Student; Engineering and Approximation</title><content type="html">Let me babble for a little bit...&lt;br /&gt;&lt;br /&gt;There was an extended power failure in Princeton last night---for two hours, all three power inlets to the boro went down, and so all the uninterruptible power supplies drove themselves dead.  While the CS department's servers were hooked up to a secondary generator, the servers for my research group went down.&lt;br /&gt;&lt;br /&gt;After power was restored, our machines booted back up, but in the incorrect order.  One of the other students in the group had to go visit them to remount NFS partitions, make sure they all came back up, etc, etc.&lt;br /&gt;&lt;br /&gt;While he was down there, he observed a chirping noise.  Looking around underneath tables and racks, he found the culprit: an uninterruptible power supply that wasn't plugged into the wall, and had nothing plugged into it.  Judging by its position, he decided that this was a power supply for a server that had been of commission for at least a decade.  He reasoned that it took about ten years for the minute inefficiencies in this UPS to drain the battery.&lt;br /&gt;&lt;br /&gt;But, the damned thing was still chirping.  Looking around, he couldn't find a free plug, and so he couldn't restore power to the UPS.  "How can I make this stop chirping?" he asked himself.&lt;br /&gt;&lt;br /&gt;His solution amazes me: &lt;span style="font-weight: bold;"&gt;he plugged the UPS into itself.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now, clearly, &lt;a href="http://en.wikipedia.org/wiki/Second_law_of_thermodynamics"&gt;the UPS isn't going to charge&lt;/a&gt;, and he doesn't dispute that.  He argued, however, that this should be enough to fool the UPS into thinking that it was charging.  In other words, he conjectured that the UPS chirps iff it does not have wall power; he was wrong, because he assumed the UPS engineers had made an approximation they had not.  In actuality, the UPS continued to chirp.  This is because the UPS chirps iff there is a negative change in the charge of the battery.  It takes some time to measure this change, and this is why UPSes will chirp for a short while after you plug them back in.&lt;br /&gt;&lt;br /&gt;Why do I bring this up?  Because it allows for an interesting analysis of approximation, and maybe we can pull out some principles of design.  &lt;span style="font-style: italic;"&gt;What semantics does the chirp noise carry?&lt;/span&gt;  The chirp noise should denote battery discharge.  Under the assumption that the UPS can always charge the battery as fast as it is discharged when plugged in, the UPS would stop chirping when plugged in.  The question is: &lt;span style="font-style: italic;"&gt;do you want to measure the real scenario, or can you get away with measuring symptoms of the scenario?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Engineering is the fine art of approximation.  Approximation is so ingrained into our reasoning that we have mathematical operators to describe it: x &amp;lt;&amp;lt; y means x is &lt;span style="font-style: italic;"&gt;significantly&lt;/span&gt; smaller than y; x -&amp;gt; y means that as the value of x comes &lt;span style="font-style: italic;"&gt;arbitrarily&lt;/span&gt; close to y; epsilon denotes an &lt;span style="font-style: italic;"&gt;arbitrarily&lt;/span&gt; small number; we say a function f is O(g(x)) to mean that as x gets &lt;span style="font-style: italic;"&gt;arbitrarily&lt;/span&gt; large f(x) is bounded by &lt;span style="font-style: italic;"&gt;some&lt;/span&gt; constant times g(x).  The meanings of &lt;span style="font-style: italic;"&gt;significant&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;arbitrary&lt;/span&gt;, and &lt;span style="font-style: italic;"&gt;some&lt;/span&gt; vary wildly by situation.&lt;br /&gt;&lt;br /&gt;Engineers make jokes about it too: a horse is a sphere if it makes the numbers easier; 2+2==5 for very large values of 2.  Approximation is critical, but only where appropriate.&lt;br /&gt;&lt;br /&gt;In the UPS example, the charge of the battery can be measured more or less directly.  In many other circumstances, the real scenario is hard to measure, but symptoms of it are easily measured, and an approximation can be computed from those measurements.  A couple examples come to mind:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You use a compass to find North, but it actually tells you the direction to something that is mostly north of you and very far away.  Sailors have shown that for navigation within a few hundred miles, this is perfectly sufficient.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It is difficult for a robot to measure its exact position in a room, but it can easily measure how much each of its wheels has moved and then deduce its relative position via dead reckoning.  For short distances, the error of this approach is negligible.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;People say you should change your oil every six months or 6,000 miles.  In reality, it's a question of the quality of the oil (how much crud has accumulated?), not how long or how far you've used it.  Oil is cheap and engines are expensive, so this method is successful.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;When structural engineers design a building, they use a &lt;span style="font-style: italic;"&gt;safety factor&lt;/span&gt;---building every piece &lt;span style="font-style: italic;"&gt;n&lt;/span&gt; times as strong as need be---to account for variation in manufacturing, material aging, and unforeseeable events.  Steel is cheap and wrongful-death lawsuits are expensive, so this method is successful.&lt;/li&gt;&lt;li&gt;Software engineering preaches: it's more important that the software works than that it works efficiently; instead of writing in machine code, we use high level languages that favor programmer time over execution time.  Programmer time is expensive, but faster computers are cheap, so this method is successful.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So, next time you design something, take another look at the approximations you are making.  More importantly, look for approximations that you are not yet making.  So long as you are conservative enough to ensure your approximations are right enough, they can save you a lot of effort.&lt;br /&gt;&lt;br /&gt;Maybe your robot can't read GPS, but there are other ways it can geolocate.  Maybe your software cannot successfully identify some event, but if it can be right more often than not, it can pass the final say onto a human operator.  Possibilities are endless.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-8308798272672375008?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nSN-sZgr9vT6YI34YoJXDLPHPww/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nSN-sZgr9vT6YI34YoJXDLPHPww/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nSN-sZgr9vT6YI34YoJXDLPHPww/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nSN-sZgr9vT6YI34YoJXDLPHPww/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/8308798272672375008/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=8308798272672375008" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8308798272672375008?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8308798272672375008?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/02/failed-reasoning-by-ivy-league-grad.html" title="Failed reasoning by an Ivy League Grad Student; Engineering and Approximation" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;DUQFQXw9fyp7ImA9WxVQFUw.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-8084027802031408491</id><published>2009-02-01T14:27:00.004-05:00</published><updated>2009-02-01T14:41:50.267-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-01T14:41:50.267-05:00</app:edited><title>Proposal for a future Interstate Rail Network</title><content type="html">From &lt;a href="http://thetransportpolitic.wordpress.com/2009/02/01/a-future-interstate-rail-network-redux/"&gt;The Transport Politic&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://thetransportpolitic.files.wordpress.com/2009/01/rail-network8.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 312px; height: 200px;" src="http://thetransportpolitic.files.wordpress.com/2009/01/rail-network8.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The transport politic blog has run the numbers and made a proposal for a high-speed train network for the United States.  I think they've done an incredible job, and so I want to mention them here.  Their plan is based upon a few pillars:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;This network would be funded 50--90% by the Fed; compare to roads and highways that are funded 80--90% by the Fed.&lt;/li&gt;&lt;li&gt;This funding would be part of the expected economic stimulus plans.  In this respect, it sounds to me like a big WPA project instead of a bailout.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;A new national authority (which they call NatTrack) will be responsible for acquiring land, building and maintaining tracks, and renting those tracks to service providers such as Amtrak.&lt;/li&gt;&lt;li&gt;They identify the ideal route as one that is (a) shorter than 500 miles, and (b) between two population centers of 100,000 or more.  These numbers were chosen as they [a] typically beat an airplane in overall travel time, and [b] have enough potential customers to maintain the route.&lt;/li&gt;&lt;li&gt;The main network features high-speed (150 mph) trains; this is supplemented by low-speed (70--120 mph).&lt;/li&gt;&lt;li&gt;Their route choices were computed mathematically, under some well-defined assumptions.  At the end of the article, they give numeric scores for each route to justify their choices.&lt;/li&gt;&lt;/ol&gt;Again, this is excellent work.  &lt;a href="http://thetransportpolitic.wordpress.com/2009/02/01/a-future-interstate-rail-network-redux/"&gt;I encourage you to read their article&lt;/a&gt;.  I hope this has a chance.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-8084027802031408491?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1Z729ewcExDxqWnw-m0Gls2YdXM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1Z729ewcExDxqWnw-m0Gls2YdXM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1Z729ewcExDxqWnw-m0Gls2YdXM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1Z729ewcExDxqWnw-m0Gls2YdXM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/8084027802031408491/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=8084027802031408491" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8084027802031408491?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8084027802031408491?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/02/proposal-for-future-interstate-rail.html" title="Proposal for a future Interstate Rail Network" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></entry><entry gd:etag="W/&quot;C0ENSX8yfCp7ImA9WxVQFk4.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-2025909931661499502</id><published>2009-02-01T11:51:00.004-05:00</published><updated>2009-02-02T22:28:18.194-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-02T22:28:18.194-05:00</app:edited><title>Update to pipemiter.rb</title><content type="html">Last week I wrote about &lt;a href="http://www.cheaphack.net/2009/01/easily-miter-tubes.html"&gt;a simple script to miter pipes&lt;/a&gt;.  As soon as I wrote it, I realized about a hundred ways it could be improved, and about a hundred new ways it could be used.&lt;br /&gt;&lt;br /&gt;My first observation was that the old version would fail if the cutting template was too large to fit on one page.  To solve this, I added pagination support---the image will be split across multiple pages, and alignment marks will be drawn at each corner so they can be stitched back together.&lt;br /&gt;&lt;br /&gt;Next, I noticed that &lt;span style="font-style: italic;"&gt;real&lt;/span&gt; pipes have some thickness, i.e. the inner diameter might be significantly smaller than the outer diameter.  As a result, you can now specify an inner diameter, and it will draw a gray curve alongside the black curve of the outer diameter.  This can make it easier to miter thick tubes.&lt;br /&gt;&lt;br /&gt;Also, I realized that one often wants to miter several tubes against one.  In this case, you don't just measure how to cut the smaller tubes, but also where the smaller tubes meet the larger one.  For this reason, the software will now draw a guide for the large tube as well.&lt;br /&gt;&lt;br /&gt;Beyond that, there are numerous little changes to make it easier to use or more fool-proof.&lt;br /&gt;&lt;br /&gt;The script is now in three files:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/pipemiter2.rb"&gt;pipemiter2.rb&lt;/a&gt; - the main executable,&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/units.rb"&gt;units.rb&lt;/a&gt; - handles unit conversion in a not-too-painful way, and&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/postscript.rb"&gt;postscript.rb&lt;/a&gt; - a library for drawing postscript images.&lt;/li&gt;&lt;/ol&gt;Save all of these files to some directory.  Like before, we can either invoke this program from the command line, or in interactive mode.&lt;br /&gt;&lt;br /&gt;You specify a pipe scenario as a single &lt;span style="font-style: italic;"&gt;center pipe&lt;/span&gt; (i.e. the one that doesn't get mitered), and one or more &lt;span style="font-style: italic;"&gt;radial pipes&lt;/span&gt; (i.e. the ones that get cut to fit the center pipe).  The center pipe is simply specified as its diameter (or equivalently, its circumference or radius).  Each radial pipe is specified as 3-D polar coordinates relative to the center pipe.  The characteristics of the radial pipes are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Its (outer) diameter (or equivalently, it's circumference or radius);&lt;/li&gt;&lt;li&gt;Optionally, its (inner) diameter;&lt;/li&gt;&lt;li&gt;Its latitude, i.e. the angle at which it meets the center pipe, where a latitude of 0 means along the equator, and a latitude of +/- 90 means at the north or south pole;&lt;/li&gt;&lt;li&gt;Its longitude, i.e. the angle &lt;span style="font-style: italic;"&gt;around&lt;/span&gt; the center pipe, which defaults to 0; and&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Its projection, i.e. placement along the length of the center pipe.&lt;/li&gt;&lt;/ol&gt;That can be complicated, so lets go through a few examples.  I'm going to write these examples in command line format, but if you don't specify any command line arguments it will go into interactive mode.&lt;br /&gt;&lt;br /&gt;First, the example from &lt;a href="http://www.cheaphack.net/2009/01/easily-miter-tubes.html"&gt;my previous post&lt;/a&gt;:  two toilet paper rolls (1.75" diameter) meet at a 30-degree angle.  All I need to specify is the center  pipe, and the diameter and latitude for the radial pipe:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;$ ./pipemiter2.rb 1.75 1.75 30 &gt;&lt;/span&gt;&lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/eg1.ps"&gt;&lt;span style="font-family:courier new;"&gt;eg1.ps&lt;/span&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Notice &lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/eg1.ps"&gt;the output&lt;/a&gt; is more elaborate than last time.  In particular, it's now a two page document.  The first page shows the cutting profile, and then second page shows the profile on the pipe that you don't cut.&lt;br /&gt;&lt;br /&gt;Let's try something more complicated.  Suppose you wanted to build a sort of tripod-like thing.  You have a center pipe 9-inch in circumference, and you have three 2-inch-diameter &lt;span style="font-style: italic;"&gt;radial pipes&lt;/span&gt;.  Each radial pipe meets the center pipe at a 60 degree angle, and each is evenly spaced along the circumference of the center pipe.  Then you could type something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;$ ./pipemiter2.rb 9in-circ and 2in 60 and 2 60 by 120 and 2 60 by 240 &gt;&lt;/span&gt;&lt;a style="font-family: courier new;" href="http://www.cs.princeton.edu/%7Enpjohnso/eg2.ps"&gt;eg2.ps&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are a few things to note about this line.  First, it specifies the center pipe (&lt;span style="font-style: italic;"&gt;9in-circ&lt;/span&gt;).  Next, it specified the three radial pipes: &lt;span style="font-style: italic;"&gt;2in 60 by x&lt;/span&gt;.  The word &lt;span style="font-style: italic;"&gt;and&lt;/span&gt; goes between each pipe specification, but is completely optional.  Each pipe is specified as its diameter (&lt;span style="font-style: italic;"&gt;2in&lt;/span&gt;), it's latitude (&lt;span style="font-style: italic;"&gt;60&lt;/span&gt;), and its longitude (&lt;span style="font-style: italic;"&gt;by 120&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;by 240&lt;/span&gt;, etc).  &lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/eg2.ps"&gt;The output file&lt;/a&gt; has four pages---a cutting template for each of the radial pipes, and then an alignment template for the center pipe.&lt;br /&gt;&lt;br /&gt;So what's up with the units?  Units are optional, though I often write them for clarity's sake.  Diameter units default to inches, but could also be mm-circ (millimeters of circumference), cm-rad (centimeters of radius), ft (feet), etc.  Length units default to inches, but could also be mm, cm, m, ft, etc.  Angle units default to degrees, but could also be radians.  Once you use a {length, diameter, angle} unit once, all future {length, diameter, angle} units default to that unit, just to save some typing.  When in doubt, type the units.&lt;br /&gt;&lt;br /&gt;So far, we've explained units, diameters, longitude, and latitude.  What about projection and inner diameter?  Notice that, in the previous example, the center points of each radial pipe all lined up along the equator of the center pipe.  The projection parameter moves the center points up or down the length of the center pipe relative to the equator.&lt;br /&gt;&lt;br /&gt;For example, suppose you have a center pipe of 9-inch-circumference, and want to attach five 1-inch-diameter radial pipes to it.   Each of the radial pipes has an inner diameter of 0.5-inches.  Next, suppose that the pipes should be connected at 60, 30, 0, -30, and -60 degrees, and that there should have a projection of +0.4-inch, +0.2-inch, 0-inch, -0.2-inch and -0.4-inch, respectively.  Enter the command,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;$ ./pipemiter2.rb 9in-circ \&lt;br /&gt;and 1in id 0.5 60 by 0 up .4 \&lt;br /&gt;and 1 id .5 30 by 72 up .2 \&lt;br /&gt;and 1 id .5 0 by 144 \&lt;br /&gt;and 1 id .5 -30 by 216 down .2 \&lt;br /&gt;and 1 id .5 -60 by 288 down .4 \&lt;br /&gt;&gt;&lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/eg3.ps"&gt;eg3.ps&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The backslash character tells your shell that the command will span multiple lines.  For each of the radial pipes, I use the &lt;span style="font-style: italic;"&gt;id .5&lt;/span&gt; command to specify the inner diameter of the pipe.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/npj/3244133055/" title="Example of pipe mitering, template by nickjohnson, on Flickr"&gt;&lt;img style="margin: 1em; float: right;" src="http://farm4.static.flickr.com/3522/3244133055_20ebf1db0d_m.jpg" alt="Example of pipe mitering, template" height="180" width="240" /&gt;&lt;/a&gt;&lt;br /&gt;When you look at &lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/eg3.ps"&gt;the output&lt;/a&gt;, you see that each cutting profile additionally has a gray curve.   This gray curve is the shape of the miter along the inner diameter of the pipe---it gives you a few more hints of how to grind the pipes to meet perfectly.  Also note how, on the sixth page, the inner diameter is drawn on the alignment guide.  The projection is specified using &lt;span style="font-style: italic;"&gt;up .2&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;down .4&lt;/span&gt;, and causes the center of each pipe to move up or down the length of the center pipe on the alignment guide.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/npj/3244959506/" title="Example of pipe mitering by nickjohnson, on Flickr"&gt;&lt;img style="margin: 1em; float: left;" src="http://farm4.static.flickr.com/3099/3244959506_cdd42812cd_m.jpg" alt="Example of pipe mitering" height="240" width="180" /&gt;&lt;/a&gt;In case your wondering, that last example looks like this and this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And that's it.  Now you can specify the many-pipes-meet-one scenario, and have cutting and alignment guides automatically generated.  This can make mitering pipes much easier for you.&lt;br /&gt;&lt;br /&gt;Also of note is that this is not limited to mitering pipes.  I've realized that it can be used to make paper/cardboard models, and that those models can be used as molds for plaster or concrete.  I'll talk about pipe sculptures in a future post.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Related: &lt;/span&gt;Commenter Flemming gives a link to &lt;a href="http://www.harderwoods.com/pipetemplate.php"&gt;a similar online tool&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-2025909931661499502?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-WVRUY0fDqC2Dr4rMe4Mjcxaouo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-WVRUY0fDqC2Dr4rMe4Mjcxaouo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-WVRUY0fDqC2Dr4rMe4Mjcxaouo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-WVRUY0fDqC2Dr4rMe4Mjcxaouo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/2025909931661499502/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=2025909931661499502" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2025909931661499502?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2025909931661499502?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/02/update-to-pipemiterrb.html" title="Update to pipemiter.rb" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;AkAGQno_eCp7ImA9WxVQEUw.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-3749510820596534364</id><published>2009-01-27T22:12:00.005-05:00</published><updated>2009-01-27T23:58:43.440-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-27T23:58:43.440-05:00</app:edited><title>Too little, too late: plug-ins for gcc</title><content type="html">The &lt;a href="http://en.wikipedia.org/wiki/GNU_Compiler_Collection"&gt;GCC&lt;/a&gt; Steering Committee &lt;a href="http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html"&gt;announced&lt;/a&gt; that they have created a new license exception that will---among other things---allow for the creation of a &lt;a href="http://en.wikipedia.org/wiki/Plugin"&gt;plug-in&lt;/a&gt; framework in GCC.  In effect it will create a means by which compiler writers, researchers and tinkerers can write additions to the compiler without having to understand the vast majority of GCC.&lt;br /&gt;&lt;br /&gt;I argue this is too little, too late.  &lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;GCC is &lt;a href="http://en.wikipedia.org/wiki/Open_source_software"&gt;open source software&lt;/a&gt;.  This means that they give everyone the blueprints, so anyone can (potentially) go out and modify it to suite their needs.  Such modifications might be fixing a bug, adding a new feature, or making it work slightly better in their situation.  In that respect, GCC has done a wonderful job on providing a platform on which innovation can occur.  But...&lt;br /&gt;&lt;br /&gt;Software can be complicated.  People have dedicated their careers to making software easier to write, understand, modify and maintain, or even prove that software does what it should.  Despite all the effort, there's still no silver bullet.  As software gets more mature---with more features and more compatibilities to maintain---it gets worse.   And as software goes, compilers are typically some of the most complicated to write (not to toot my own horn as a compiler writer).&lt;br /&gt;&lt;br /&gt;GCC suffers from the trifecta of software nightmares.  GCC is as old as I am, and uses ancient techniques such as an &lt;a href="http://en.wikipedia.org/wiki/Register_Transfer_Language"&gt;RTL intermediate representation&lt;/a&gt;.  GCC is feature-rich; its standard release supports at least seven source languages and at least twenty target architectures.  GCC is a compiler.  Take a look inside and you'll find a mind boggling nine hundred eighty four thousand lines of code (according to conservative estimates by &lt;a href="http://www.dwheeler.com/sloc/redhat71-v1/redhat71sloc.html"&gt;David Wheeler&lt;/a&gt; in 2001).  I'm not saying that GCC is bad software, but that it would be very difficult for even the most talented programmer to learn its internals in a short time.&lt;br /&gt;&lt;br /&gt;Software engineers have seen this growth pattern before, and have come up with schemes to try to mitigate this risk.  One such scheme is a &lt;span style="font-style: italic;"&gt;plug-in framework&lt;/span&gt;.   In a plug-in framework,  the original developers present small, clean, easy to understand interface, and then anyone can write a plug-in that talks to that interface.  This plug-in can do everything it needs to do, but it is significantly easier to create a plug-in than it is to modify the original code.   Because of the constraints on the interface, the programmer can be blissfully ignorant of the operation of majority of the software.&lt;br /&gt;&lt;br /&gt;Or, as an analogy: suppose you are a doctor, and your patient has a broken ankle.  It's a really bad break, and you need to operate.  So, you decide to remove all of the patient's skin so you can get to the break.  Oh wait, that would be ridiculous... Instead, you only open up the ankle... much less risk of disturbing something else.&lt;br /&gt;&lt;br /&gt;With compilers, there are some easy ways to support plug-ins.  The easiest is to write the intermediate representation to disk in some form, let the plug-in do whatever to it, and then read it back and verify that it is well-formed.  Implementing this sort of plug-in framework is very little additional work; in any sane software effort, this might be one of the earliest things designed, if for no other reason than convenience during the debugging phase.&lt;br /&gt;&lt;br /&gt;But, for some reason GCC has not supported plug-ins until now.   Twenty five years of software enthusiasts suggesting it, and the project hasn't done it.  Why would GNU ignore feature requests, and even software engineering best practices?&lt;br /&gt;&lt;br /&gt;From the &lt;a href="http://www.gnu.org/licenses/gcc-exception-faq.html"&gt;GCC Exception FAQ&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;...For a while now, the GCC developers have considered adding a plugin framework to the compiler.  This would make it easier for others to contribute to the project, and accelerate the development of new compilation techniques for GCC.  However, &lt;span style="font-style: italic;"&gt;there have also been concerns that unscrupulous developers could write plugins that called out to proprietary software&lt;/span&gt; to transform the compiled code—effectively creating proprietary extensions to GCC and defeating the purpose of the GPL.  The updated exception prevents such abuse, enabling the GCC team to look forward to plugin developments.  &lt;span style="font-style: italic;"&gt;[emphasis is mine].&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;Yes, that is correct.  They were afraid people would write software plug-ins---&lt;span style="font-weight: bold;"&gt;completely separate from GCC&lt;/span&gt;---and that those plug-ins would not be free software.   They think that any software that interacts with GCC should be governed by GCC's license.  In effect, the GNU and the GCC project tried to strong-arm other developers into writing free software.  I'm all for free software, but I think this was (1) a prick move, and (2) the wrong decision from a project management perspective.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why is this a prick move?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In short, I don't like having my hand forced.  Let's ask again: what is open source?  According to the &lt;a href="http://opensource.org/docs/osd"&gt;Open Source Initiative's (OSI) definition&lt;/a&gt; (which is about as close as we'll get to a standard, accepted definition):&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;6. No Discrimination Against Fields of Endeavor&lt;/p&gt;&lt;p&gt; The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.&lt;/p&gt;&lt;p&gt;...&lt;br /&gt;&lt;/p&gt;&lt;p&gt;8. License Must Not Be Specific to a Product&lt;/p&gt;&lt;p&gt;The rights attached to the program must not depend on the program's being part of a particular software distribution. If the program is extracted from that distribution and used or distributed within the terms of the program's license, all parties to whom the program is redistributed should have the same rights as those that are granted in conjunction with the original software distribution. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;9. License Must Not Restrict Other Software&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The license must not&lt;br /&gt;place restrictions on other software that is distributed along with the licensed software. For example, the license must not insist that all other programs distributed on the same medium must be open-source software.&lt;/p&gt;&lt;p&gt;...&lt;br /&gt;&lt;/p&gt;   &lt;/blockquote&gt;Although this definition has been carefully crafted to dodge the question, it seems to me that GNU could not place the no-proprietary-plug-in restriction in their license, and so instead they mutilated their code to discourage such &lt;span style="font-style: italic;"&gt;unscrupulous&lt;/span&gt; behavior.&lt;br /&gt;&lt;br /&gt;But, ultimately, my code is &lt;span style="font-weight: bold;"&gt;my&lt;/span&gt; code, and my code is separate from GCC.   The GCC project cannot accept that, and so they try to prevent me from writing it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why was this a bad project management decision?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For all of the reasons that make plug-ins a good idea, and then some.&lt;br /&gt;&lt;br /&gt;I presented the notion of plug-ins as a best practice---and they are---but realize that all best-practices are just rules-of-thumb.  We could never get universal agreement that GCC is bad code because it doesn't support plug-ins.  In my opinion, the lack of this feature is a flaw in GCC, but there are bigger problems.&lt;br /&gt;&lt;br /&gt;At the end of the day, I don't care if open source software is good code.  Authors can write code however they want to.   But it doesn't mean I'm going to take part in their software project if they are working against me.  &lt;span style="font-weight: bold;"&gt;If you write code to prevent me from participating, then it cannot be open source.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As academics researching compilers (that's fun to say), we have simply moved away from GCC as an experimentation platform.  There are compilers with less restrictive licenses &lt;span style="font-weight: bold;"&gt;and&lt;/span&gt; which encourage third party development.  This, ultimately, is GCC's loss and not ours.&lt;br /&gt;&lt;br /&gt;Take for instance &lt;a href="http://llvm.org/"&gt;llvm&lt;/a&gt;, introduced by Chris Lattner's thesis in 2002. The llvm project not only has better documentation (including howtos on writing plugins), but also has a bit of a social contract.  From &lt;a href="http://llvm.org/docs/LangRef.html"&gt;llvm intermediate representation documentation&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The LLVM code representation is designed to be used in three different forms: as an in-memory compiler IR, as an on-disk bitcode representation (suitable for fast loading by a Just-In-Time compiler), and as a human readable assembly language representation.  This allows LLVM to provide a powerful intermediate representation for efficient compiler transformations and analysis, while providing a natural means to debug and visualize the transformations.  &lt;span style="font-style: italic;"&gt;The three different forms of LLVM are all equivalent.&lt;/span&gt; &lt;span style="font-style: italic;"&gt;[emphasis is mine].&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;Or, in other words "yeah, we're not going to pull that crap."  Because of all of the llvm project's support, llvm is quickly becoming a popular platform for compiler research, and will assuredly overtake it (if it hasn't already).  I'm not saying that we don't use GCC; rather that the next hundred cool optimizations are being developed for other compilers, and will only later be back-ported to GCC.&lt;br /&gt;&lt;br /&gt;In summary, an important part of the management of an open-source software project should be to enable new programmers to enter the project with little initial investment.  GCC has not only missed this opportunity, but actively avoided it.  As a result, GCC has alienated some of the community, and is losing ground to newer open source projects.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-3749510820596534364?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1JyEwMA6I5cB62dOLV1FHy20Z24/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1JyEwMA6I5cB62dOLV1FHy20Z24/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1JyEwMA6I5cB62dOLV1FHy20Z24/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1JyEwMA6I5cB62dOLV1FHy20Z24/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/3749510820596534364/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=3749510820596534364" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3749510820596534364?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3749510820596534364?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/01/too-little-too-late-plug-ins-for-gcc.html" title="Too little, too late: plug-ins for gcc" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;CEYFRX4_eyp7ImA9WxVQFUw.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-5503372597992673415</id><published>2009-01-22T23:26:00.008-05:00</published><updated>2009-02-01T13:15:14.043-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-02-01T13:15:14.043-05:00</app:edited><title>Easily miter tubes</title><content type="html">&lt;span style="font-weight: bold;"&gt;[Update: &lt;a href="http://www.cheaphack.net/2009/02/update-to-pipemiterrb.html"&gt;see version 2&lt;/a&gt;]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Have you ever want to join two tubes at some specific &lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="down" style="display: block;" id="formatbar_CreateLink" title="Link" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);FormatbarButton('richeditorframe', this, 8);ButtonMouseDown(this);"&gt;&lt;img src="http://www.blogger.com/img/blank.gif" alt="Link" class="gl_link" border="0" /&gt;&lt;/span&gt;&lt;/span&gt;angle?  For example, imagine you were building a bicycle frame.  To ensure a good clean weld, you want to miter one of the tubes so that it perfectly fits against the surface of the other.  This, unfortunately, can be a pain in the butt.&lt;br /&gt;&lt;br /&gt;So, I created a quick and dirty ruby script to do the math for me.  I enter the diameter of the two tubes, and the angle at which they should join, and it draws the curve as a postscript document.  I can then print that template, tape it to the smaller tube, and cut along its length.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_S_lLPG9im4k/SXlIj1nOPwI/AAAAAAAAAGo/2tUYtGJLmLg/s1600-h/tp.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 88px; height: 320px;" src="http://1.bp.blogspot.com/_S_lLPG9im4k/SXlIj1nOPwI/AAAAAAAAAGo/2tUYtGJLmLg/s320/tp.png" alt="" id="BLOGGER_PHOTO_ID_5294342617474940674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Say for instance I wanted to join two toilet paper rolls (1.75" diameter) at 30 degrees.  I simply type:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;$ ./pipemiter.rb 1.75 1.75 30 in &gt;tp.ps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or, if you prefer something more guided and interactive,&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;$ ./pipemiter.rb &gt;tp.ps&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;Preferred unit (one of mm, m, ft, in, cm): in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;Outer Diameter of larger pipe: 1.75&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;Outer Diameter of smaller pipe: 1.75&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;Angle of joint (degrees): 30&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and it gives me a postscript document, which looks like this curve on the right.&lt;br /&gt;&lt;br /&gt;&lt;a style="float: left;" href="http://www.flickr.com/photos/npj/3219739014/" title="Perfect 30degree miter by nickjohnson, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3488/3219739014_126ca08719_m.jpg" alt="Perfect 30degree miter" height="240" width="180" /&gt;&lt;/a&gt;As a proof of principle, I tried it out with two toilet paper rolls&lt;br /&gt;(to your left).  They join perfectly!&lt;br /&gt;&lt;br /&gt;The source code for the script is &lt;a href="http://www.cs.princeton.edu/%7Enpjohnso/pipemiter.rb"&gt;available for free&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-5503372597992673415?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Lw5RHO9hgTz8SH5WOdYeveLAU00/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Lw5RHO9hgTz8SH5WOdYeveLAU00/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Lw5RHO9hgTz8SH5WOdYeveLAU00/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Lw5RHO9hgTz8SH5WOdYeveLAU00/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/5503372597992673415/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=5503372597992673415" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/5503372597992673415?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/5503372597992673415?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/01/easily-miter-tubes.html" title="Easily miter tubes" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_S_lLPG9im4k/SXlIj1nOPwI/AAAAAAAAAGo/2tUYtGJLmLg/s72-c/tp.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">9</thr:total></entry><entry gd:etag="W/&quot;CEUDRH88cCp7ImA9WxVRFEo.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-3433676224979658999</id><published>2009-01-20T11:46:00.001-05:00</published><updated>2009-01-20T12:24:35.178-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-20T12:24:35.178-05:00</app:edited><title>Happy OBAMA day!</title><content type="html">Or, more importantly, happy NO MORE BUSH DAY!&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Know that your people will judge you on what you can build, not on what you can destroy.&lt;/blockquote&gt;-O&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-3433676224979658999?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/P7YLdncuAZlQv-SDzgfF3eNJmjc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P7YLdncuAZlQv-SDzgfF3eNJmjc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/P7YLdncuAZlQv-SDzgfF3eNJmjc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/P7YLdncuAZlQv-SDzgfF3eNJmjc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/3433676224979658999/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=3433676224979658999" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3433676224979658999?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3433676224979658999?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2009/01/happy-obama-day.html" title="Happy OBAMA day!" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></entry><entry gd:etag="W/&quot;CkYGRnsyeyp7ImA9WxVTEE0.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-3380720945838082340</id><published>2008-12-22T21:41:00.002-05:00</published><updated>2008-12-22T21:42:07.593-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-22T21:42:07.593-05:00</app:edited><title>This town sucks...</title><content type="html">I get home every night around 9pm.  All I want to do is order some food.  Everything in this town is closed.&lt;br /&gt;&lt;br /&gt;Princeton sucks.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-3380720945838082340?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tqMgs_OdqlKe6uMpt2EoCLzFV8c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tqMgs_OdqlKe6uMpt2EoCLzFV8c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tqMgs_OdqlKe6uMpt2EoCLzFV8c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tqMgs_OdqlKe6uMpt2EoCLzFV8c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/3380720945838082340/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=3380720945838082340" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3380720945838082340?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3380720945838082340?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/12/this-town-sucks.html" title="This town sucks..." /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DUIEQ3o6eip7ImA9WxRbGUw.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-8420513483752038723</id><published>2008-12-10T08:56:00.001-05:00</published><updated>2008-12-10T08:58:22.412-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-10T08:58:22.412-05:00</app:edited><title>What to do about Detroit</title><content type="html">(Caution, politics follow)&lt;br /&gt;&lt;br /&gt;Seth Godin has a brilliant post on what to do about the big three auto makers:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Not only should Congress encourage/facilitate the organized bankruptcy of the Big Three, but it should also make it easy for them to be replaced by 500 new car companies.&lt;br /&gt;&lt;br /&gt;Or perhaps a thousand.&lt;br /&gt;&lt;br /&gt;That's how many car companies there were 90 years ago.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sethgodin.typepad.com/seths_blog/2008/11/what-to-do-abou.html"&gt;Read the rest.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-8420513483752038723?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5FReZhsGy-BHTSE0EIqAAqKA4lA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5FReZhsGy-BHTSE0EIqAAqKA4lA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5FReZhsGy-BHTSE0EIqAAqKA4lA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5FReZhsGy-BHTSE0EIqAAqKA4lA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/8420513483752038723/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=8420513483752038723" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8420513483752038723?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/8420513483752038723?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/12/what-to-do-about-detroit.html" title="What to do about Detroit" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DE4NSHg5eCp7ImA9WxRbF0Q.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-2568471297254505288</id><published>2008-12-08T23:27:00.001-05:00</published><updated>2008-12-08T23:29:59.620-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-08T23:29:59.620-05:00</app:edited><title>JFC it's a hovering muderbot!</title><content type="html">From &lt;a href="http://www.engadget.com/2008/12/08/the-hovering-multiple-kill-vehicle-is-simply-a-waking-nightmare/"&gt;Engadget&lt;/a&gt;,&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Are you ready for a vision of your inevitable end at the hands of a hovering murderbot? Feast your eyes, then, on this video of the Missile Defense Agency's MKV-L -- or as we like to call it, the Multiple Kill Vehicle. The device -- meant to be used in a bundle of missile interceptors deployed by a larger "carrier" -- has apparently just completed its first flight test, so... you've been warned, resistance is futile, he'll be back, and in space no one can hear you scream.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="left: 0px ! important; top: 0px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-04782909113435977 visible ontop" href="http://www.viddler.com/simple/b8fda424/"&gt;&lt;/a&gt;&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="viddler_b8fda424" height="348" width="437"&gt;&lt;param name="flashvars" value="disablebranding=t"&gt;&lt;param name="movie" value="http://www.viddler.com/simple/b8fda424/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.viddler.com/simple/b8fda424/" type="application/x-shockwave-flash" allowscriptaccess="always" flashvars="disablebranding=t" allowfullscreen="true" name="viddler_b8fda424" height="348" width="437"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-2568471297254505288?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/T9GpQOCw1Mn3FE19HmsuOVYepMg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/T9GpQOCw1Mn3FE19HmsuOVYepMg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/T9GpQOCw1Mn3FE19HmsuOVYepMg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/T9GpQOCw1Mn3FE19HmsuOVYepMg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/2568471297254505288/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=2568471297254505288" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2568471297254505288?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2568471297254505288?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/12/jfc-its-hovering-muderbot.html" title="JFC it's a hovering muderbot!" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;D0UARXo8eyp7ImA9WxRbF0Q.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-2970339033353153139</id><published>2008-12-08T22:59:00.001-05:00</published><updated>2008-12-08T23:00:44.473-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-08T23:00:44.473-05:00</app:edited><title>Stop-motion video.</title><content type="html">Not sure if the term ``stop-motion'' even applies, but this is spectacular:&lt;br /&gt;&lt;a style="left: 0px ! important; top: 15px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-04782909113435977 visible" href="http://www.veoh.com/veohplayer.swf?permalinkId=v565784SGcRbg6b&amp;amp;id=anonymous&amp;amp;player=videodetailsembedded&amp;amp;videoAutoPlay=0"&gt;&lt;/a&gt;&lt;embed src="http://www.veoh.com/veohplayer.swf?permalinkId=v565784SGcRbg6b&amp;amp;id=anonymous&amp;amp;player=videodetailsembedded&amp;amp;videoAutoPlay=0" allowfullscreen="true" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="341" width="410"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;Watch &lt;a href="http://www.veoh.com/videos/v565784SGcRbg6b"&gt;Nightmare in the Valley of the Dolls&lt;/a&gt; in &lt;a href="http://www.veoh.com/browse/videos.html?category=category_entertainment"&gt;Entertainment Videos&lt;/a&gt;  |  View More &lt;a href="http://www.veoh.com/"&gt;Free Videos Online at Veoh.com&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And it doesn't seem too hard to make (though getting David Byrne to write the score may be harder).  Perhaps a weekend project...&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-2970339033353153139?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/R_FwKIF5wI9KC9V6iMtZCXYz8j0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R_FwKIF5wI9KC9V6iMtZCXYz8j0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/R_FwKIF5wI9KC9V6iMtZCXYz8j0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/R_FwKIF5wI9KC9V6iMtZCXYz8j0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/2970339033353153139/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=2970339033353153139" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2970339033353153139?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2970339033353153139?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/12/stop-motion-video.html" title="Stop-motion video." /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DkMMSXs6fSp7ImA9WxRUFko.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-1331087106029085747</id><published>2008-11-25T23:38:00.002-05:00</published><updated>2008-11-25T23:41:28.515-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-25T23:41:28.515-05:00</app:edited><title>Only in grad school...</title><content type="html">Last night, the research group and I were up all night working on a paper.  I was modifying some benchmarks to collect another kind of data, and I got to a point where the code didn't work, and I had no idea how to fix it.&lt;br /&gt;&lt;br /&gt;The code boiled down to something like this:&lt;br /&gt;&lt;br /&gt;int x = 0;&lt;br /&gt;&lt;br /&gt;int f()&lt;br /&gt;{&lt;br /&gt; ...&lt;br /&gt; x++;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;  ...&lt;br /&gt;  f();&lt;br /&gt;  ...&lt;br /&gt;  printf("%d\n",x);&lt;br /&gt;  ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;But every time, it would print out zero.  I asked one of the other grad students, and after a few perplexed moments, he came up with the solution:&lt;br /&gt;&lt;br /&gt;"Oh, Nick! You forgot that we loaded the kernel module which drastically changes the semantics of memory."&lt;br /&gt;&lt;br /&gt;Ah... gradschool.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-1331087106029085747?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/8_BYi5-2k9sIrpFwOyMwhuGlPnk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8_BYi5-2k9sIrpFwOyMwhuGlPnk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/8_BYi5-2k9sIrpFwOyMwhuGlPnk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/8_BYi5-2k9sIrpFwOyMwhuGlPnk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/1331087106029085747/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=1331087106029085747" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/1331087106029085747?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/1331087106029085747?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/11/only-in-grad-school.html" title="Only in grad school..." /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;AkADRn47eip7ImA9WxRUFEw.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-1020685508024375546</id><published>2008-11-23T00:27:00.003-05:00</published><updated>2008-11-23T00:39:37.002-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-23T00:39:37.002-05:00</app:edited><title>Amused by SMLtoJs</title><content type="html">I love Standard ML -- its excellent type system finds nearly all of my bugs before I run the code even once, and the idea of restricting side-effects to a small portion of my code makes the whole easier to reason about.  Not to mention, disjoint union types seem to cover 99% of my previous use of object oriented programming.  Runtime performance sucks, but honestly, how frequently does that even matter?&lt;br /&gt;&lt;br /&gt;I hate javascript, even more than I hate perl.  It is a language with no definition.  It is a language with no reference implementation---and even individual implementations are self-inconsistent.  It's a classic example: very little planning went into its beginnings, and the remaining planning only came about after every vendor had pushed their own solutions.&lt;br /&gt;&lt;br /&gt;I recently discovered &lt;a href="http://www.itu.dk/people/mael/smltojs/"&gt;SMLtoJs&lt;/a&gt; -- a compiler that translates &lt;a href="http://en.wikipedia.org/wiki/Standard_ML"&gt;Standard ML&lt;/a&gt; into Javascript.  I can't decide if I'm disgusted or pleased by this.  I'm definitely amused...&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-1020685508024375546?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tiZQ1CF7bsUSk0xbIjdK5IZSBsc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tiZQ1CF7bsUSk0xbIjdK5IZSBsc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tiZQ1CF7bsUSk0xbIjdK5IZSBsc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tiZQ1CF7bsUSk0xbIjdK5IZSBsc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/1020685508024375546/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=1020685508024375546" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/1020685508024375546?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/1020685508024375546?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/11/amused-by-smltojs.html" title="Amused by SMLtoJs" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></entry><entry gd:etag="W/&quot;D0IGRHsyeCp7ImA9WxRVE04.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-2833925389105320149</id><published>2008-11-10T11:33:00.003-05:00</published><updated>2008-11-10T11:45:25.590-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-10T11:45:25.590-05:00</app:edited><title>Cool Plot :: Gibbs Sampling and a (mostly) independant Bayes Network</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_S_lLPG9im4k/SRhie6NfX6I/AAAAAAAAAGg/9GU3AVB5eeE/s1600-h/lf25.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_S_lLPG9im4k/SRhie6NfX6I/AAAAAAAAAGg/9GU3AVB5eeE/s320/lf25.png" alt="" id="BLOGGER_PHOTO_ID_5267068047371231138" border="0" /&gt;&lt;/a&gt;Here's a cool plot  that came up while I was doing a homework assignment.  It is the result of the &lt;a href="http://en.wikipedia.org/wiki/Gibbs_sampling"&gt;Gibbs Sampling algorithm&lt;/a&gt; approximating a 50-50% variable over a billion iterations on a probability space of dimensionality close to 2^25.&lt;br /&gt;&lt;br /&gt;Imagine you have a random coin toss which we'll call the leader. Now imagine you have one or more followers who choose to agree with the leader x% of the time, or disagree otherwise.  Suppose that you can't "see" what the leader chose, but only what the followers have chosen.  Determine the probability distribution of the leader's coin.  We'll call this the leader-follower problem.&lt;br /&gt;&lt;br /&gt;In this particular instance of the problem, the leader's coin is unbiased (50-50%), followers agree with 90% probability, and we have 25 followers.  Each of the followers depends only on the leader and not on each other, and so each follower represents a nearly independent dimension.  I claim that the probability space P(Leader|Followers) is nearly 2^25 in size.&lt;br /&gt;&lt;br /&gt;When we put a Gibbs Sampler to the task, it's performance kind of sucks.  Effectively, it is running a &lt;a href="http://en.wikipedia.org/wiki/Monte_Carlo_method"&gt;Monte-Carlo&lt;/a&gt; simulation of the scenario, and attempting to count the probability distributions over the network.  But, since the space is so large, it cannot effectively explore the whole space, and so there is a lot of error.&lt;br /&gt;&lt;br /&gt;What I find so intriguing about this plot is its smooth upward or downward trends, with sharp turns.&lt;br /&gt;&lt;br /&gt;You can think of any trend away from the solution (50-50%) as a situation in which more than half of the followers disagree with the leader, and any trend towards it as a situation in which more than half agree with the leader.  Since Gibbs Sampling changes one variable at a time, we effectively have a "momentum" effect; once more than half disagree, each one needs to be independently fixed, on at a time, before we can turn around.&lt;br /&gt;&lt;br /&gt;Also observe that the slope of these traces is proportional to the number of followers in disagreement.  This is why the slope tends to flatten out as we reach the extrema.&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-2833925389105320149?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DiigYodHHh0VxV9_a79MZBOcy5A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DiigYodHHh0VxV9_a79MZBOcy5A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DiigYodHHh0VxV9_a79MZBOcy5A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DiigYodHHh0VxV9_a79MZBOcy5A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/2833925389105320149/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=2833925389105320149" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2833925389105320149?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2833925389105320149?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/11/cool-plot-gibbs-sampling-and-mostly.html" title="Cool Plot :: Gibbs Sampling and a (mostly) independant Bayes Network" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_S_lLPG9im4k/SRhie6NfX6I/AAAAAAAAAGg/9GU3AVB5eeE/s72-c/lf25.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DEYFSXc4eCp7ImA9WxRVEks.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-3816584707550038193</id><published>2008-11-09T16:14:00.002-05:00</published><updated>2008-11-09T16:28:38.930-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-09T16:28:38.930-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mods" /><category scheme="http://www.blogger.com/atom/ns#" term="metal lathe" /><category scheme="http://www.blogger.com/atom/ns#" term="modifications" /><category scheme="http://www.blogger.com/atom/ns#" term="lathe" /><title>Modding my minilathe :: Adding locks to the X-,Y-Axes</title><content type="html">I &lt;a href="http://www.cheaphack.net/2008/03/my-minilathe-and-several-mods-thereof.html"&gt;posted before&lt;/a&gt; about a few modifications to my minilathe.  These cheap lathes are fun and accessible to many, but they have a few weaknesses.  Now that I'm taking the &lt;a href="http://commons.princeton.edu/ciee/2008/09/machine-shop-course.html"&gt;machine shop course at Princeton&lt;/a&gt;, and learning a lot more about machine work, I've realized a few more deficiencies.&lt;br /&gt;&lt;br /&gt;In particular, since a lathe provides several degrees of freedom to the tool holder, it's possible for the tool holder to drift along these dimensions while cutting.  Decent lathes provide a locking mechanism along each degree of freedom to prevent this, but for the most part, the minilathe does not.&lt;br /&gt;&lt;br /&gt;My minilathe's tool holder has five degrees of freedom: left-to-right (X), forward-backward (Y), rotation (Theta), compound (Z), and tool orientation (Phi).  The factory stock lathe provides locks for rotation and tool orientation, however the remaining three cannot be locked.&lt;br /&gt;&lt;br /&gt;It turns out it's pretty easy to add locks for the X and Y dimensions.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/npj/3016256715/" style="float:left; margin:1ex; border:0" title="Lathe Mod #9 by nickjohnson, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3054/3016256715_2fd477ed48_m.jpg" width="240" height="180" alt="Lathe Mod #9" /&gt;&lt;/a&gt;To add a lock to the X dimension, one needs only to drill and tap a hold along the X-carriage so that a bolt will press against the X-ways.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/npj/3016256697/" style="float:right; margin:1ex; border:0" title="Lathe Mod #8 by nickjohnson, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3142/3016256697_d62864b689_m.jpg" width="180" height="240" alt="Lathe Mod #8" /&gt;&lt;/a&gt;A very similar approach will work for the Y dimension, though care should be taken to prevent this bolt interfering with the rotation of the tool holder, or from coming in contact with the work piece or chuck.&lt;br /&gt;&lt;br /&gt;The Z dimension is trickier because of the shape of the tool post, and I don't have an answer yet for how to add a lock.  In the best case, I can't figure out how to provide a lock over more than a small region of the Z-travel.  Even then, there are two counterbored holes through the Z-ways (to lock the rotation) which would make this more difficult.  If you have any suggestions, I'd like to hear them.&lt;br /&gt;&lt;br /&gt;Also, I've been putting a lot of thought into rotation.  With a stock minilathe, you have to half-remove the compound to unlock the rotation, adjust the rotation, and then replace the compound.  This is really a pain in the butt, and I've been thinking about a way to add a dial to rotate the tool post.  My plan is to cut threads along the perimeter of the rotation-clamp part, and then add another screw that will slowly rotate the tool holder.  This is still in the works, and I'll let you know when I get it working.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-3816584707550038193?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ESaivsj9AsVNR6rv9OrshA6x-7A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ESaivsj9AsVNR6rv9OrshA6x-7A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ESaivsj9AsVNR6rv9OrshA6x-7A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ESaivsj9AsVNR6rv9OrshA6x-7A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/3816584707550038193/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=3816584707550038193" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3816584707550038193?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/3816584707550038193?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/11/modding-my-minilathe-adding-locks-to-x.html" title="Modding my minilathe :: Adding locks to the X-,Y-Axes" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></entry><entry gd:etag="W/&quot;D08FQH05fCp7ImA9WxRWGEQ.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-636973533881256044</id><published>2008-11-05T09:27:00.002-05:00</published><updated>2008-11-05T09:36:51.324-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-05T09:36:51.324-05:00</app:edited><title>And now...</title><content type="html">[warning: politics follow]&lt;br /&gt;&lt;br /&gt;I'm excited about the results of the election, not because I'm glad that the Democrats won, but for the hope that an opposition party has taken control of the legislature and executive.  The distinction is subtle, and all hinges on whether or not the Democrats will finally step up to the plate and offer a new direction.&lt;br /&gt;&lt;br /&gt;Over the last eight years, I saw the Democratic party crippled.  They were afraid to even speak against Bush for many years after September 11.  More recently, they have felt more free to criticize the Republican Platform, but as far as I can tell, they didn't present any alternative.  Anyone who is surprised that Bush won in 2004 should observe that it was a failing of the Democrats in 2004.&lt;br /&gt;&lt;br /&gt;But now, the future is open.  Obama has inherited a huge mess, and I don't know how well he will be able to deal with it---the war, the economy, and the nations energy policy at large.  I hope they can accomplish something.  I hope we don't just see four years of apologists.&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-636973533881256044?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0o3UiE7dXb20Cul7r0Gd8Oz5bEU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0o3UiE7dXb20Cul7r0Gd8Oz5bEU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0o3UiE7dXb20Cul7r0Gd8Oz5bEU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0o3UiE7dXb20Cul7r0Gd8Oz5bEU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/636973533881256044/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=636973533881256044" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/636973533881256044?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/636973533881256044?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/11/and-now.html" title="And now..." /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry><entry gd:etag="W/&quot;DEUESX04cSp7ImA9WxRWGE0.&quot;"><id>tag:blogger.com,1999:blog-6181310435977891397.post-2047529129187033479</id><published>2008-11-04T08:43:00.001-05:00</published><updated>2008-11-04T08:43:28.339-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-04T08:43:28.339-05:00</app:edited><title>VOTE</title><content type="html">VOTE TODAY&lt;div class="blogger-post-footer"&gt;&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "pub-7340324799078970";
/* 728x90, created 8/4/08 */
google_ad_slot = "1609028911";
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
&lt;/script&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6181310435977891397-2047529129187033479?l=www.cheaphack.net'/&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LrARicaTfGMJrjqarGjq69RRL24/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LrARicaTfGMJrjqarGjq69RRL24/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LrARicaTfGMJrjqarGjq69RRL24/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LrARicaTfGMJrjqarGjq69RRL24/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.cheaphack.net/feeds/2047529129187033479/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=6181310435977891397&amp;postID=2047529129187033479" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2047529129187033479?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6181310435977891397/posts/default/2047529129187033479?v=2" /><link rel="alternate" type="text/html" href="http://www.cheaphack.net/2008/11/vote.html" title="VOTE" /><author><name>Nick Johnson</name><uri>http://www.blogger.com/profile/09742551843387605596</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="09865342803711649075" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></entry></feed>
