<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jonathan Birge</title>
	
	<link>http://scripts.mit.edu/~birge/blog</link>
	<description>Monkey #121643810 reporting for duty...</description>
	<pubDate>Wed, 03 Dec 2008 15:19:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<image><url>http://www.feedburner.com/fb/images/pub/fb_pwrd.gif</url></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/JonathanBirge" type="application/rss+xml" /><feedburner:emailServiceId>1953166</feedburner:emailServiceId><feedburner:feedburnerHostname>http://www.feedburner.com</feedburner:feedburnerHostname><item>
		<title>Are long bear market rallies history?</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/472824803/</link>
		<comments>http://scripts.mit.edu/~birge/blog/are-long-bear-market-rallies-history/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 20:06:59 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Economics]]></category>

		<category><![CDATA[investing]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=636</guid>
		<description><![CDATA[Ok, last financial post, I swear.
I&#8217;ll try my hand at the dangerous game of internet financial prognostication, here. I have no clue what&#8217;s going to happen on the market, but I&#8217;d just like to point out something that I haven&#8217;t seen anybody really talk about yet. For all the talk about comparing this present market [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, last financial post, I swear.</p>
<p>I&#8217;ll try my hand at the dangerous game of internet financial prognostication, here. I have no clue what&#8217;s going to happen on the market, but I&#8217;d just like to point out something that I haven&#8217;t seen anybody really talk about yet. For all the talk about comparing this present market to the 90% bear market of the early 30s, there is one huge, obvious difference: information moves a lot faster today, and we have much more extensive &#8220;instrumentation&#8221; on the worlds economies. Not only does the flow of information mean that markets will adjust quicker, but the liquidity provided by ubiquitous electronic trading and derivatives means that market swings will occur on a much shorter time scale. Perhaps most importantly, we have much more universal access to economic data than ever before. This means that price information and the beginning of deflation have become apparent much quicker, and to a wider audience, than they did during the great depression.</p>
<p>The upshot of all of this, if I&#8217;m right (which is a big if), is that we may never see the kind of months long rallies that occured during the bear market that started in 1929. Maybe they&#8217;ll just last a few days, or maybe a couple of weeks. A corrolary of this is that volatility will be much higher than in the aftermath of the 1929 crash. This may be one explanation for why we&#8217;ve seen historic levels on the CBOE volatility index (VIX). Usually the VIX peaks around 40 or 50, but these days we&#8217;re seeing sustained levels around 70.</p>
<p>So, while I&#8217;m going out on a limb, if you&#8217;re sitting on cash and tempted to try to time the market and ride the rally we&#8217;re currently in, you might want to rethink it. In this day of electronic data and trading, I think the aftermath of the financial crisis will be an extended period of volatility that will eclipse anything the market has seen in its entire history. This crisis may have put the final nail in the coffin in the foolish academic theory of &#8220;efficient markets,&#8221; but that doesn&#8217;t mean the markets can&#8217;t be inscrutible and chaotic for an extended period.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=MLQHO"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=MLQHO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=hkBXo"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=hkBXo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=ICRio"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=ICRio" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=B3G6o"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=B3G6o" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/472824803" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/are-long-bear-market-rallies-history/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/are-long-bear-market-rallies-history/</feedburner:origLink></item>
		<item>
		<title>Schwarzenegger to nation: Let’s drag out the recession as long as possible, ok?</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/472067495/</link>
		<comments>http://scripts.mit.edu/~birge/blog/schwarzenegger-to-nation-lets-drag-out-the-recession-as-long-as-possible-ok/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 04:46:53 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Economics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=645</guid>
		<description><![CDATA[(Sorry for the flurry of exceedingly boring economics posts, but I&#8217;m a bit preoccupied.)
The central cause of the current recession (or maybe depression) was the overextension of credit, especially in the housing sector. So, how do you get out of that kind of jam? Foreclosures and time. Those that can&#8217;t afford their homes will have to [...]]]></description>
			<content:encoded><![CDATA[<p>(Sorry for the flurry of exceedingly boring economics posts, but I&#8217;m a bit preoccupied.)</p>
<p>The central cause of the current recession (or maybe depression) was the overextension of credit, especially in the housing sector. So, how do you get out of that kind of jam? Foreclosures and time. Those that can&#8217;t afford their homes will have to lose them, and the banks will get back as much as they can, allowing their balance sheets to be repaired up to a point. Those that can afford their houses will just have to stop taking on more debt, and begin the process of paying off the principle to the point where the loan is rightside up. This will eventually lead to healthy bank balance sheets, and thus the resumption of normal (but hopefully not excessive) lending that will get industry moving again.</p>
<p>If you really wanted to screw with the country, what would be the worst thing you could do? Halt foreclosures and/or slow down the repayment of debt. And yet that&#8217;s exactly what Arnold &#8220;I am here from the future to destroy your economy&#8221; Schwarzenegger has just proposed. He has asked that state lawmakers impose a 90 day moratorium on foreclosures. That <em>sounds </em>really good, but another way of saying it is that it&#8217;s a three month state imposed time window wherein banks will not be able to repair their balance sheets. Given that California is ground zero for the housing bubble, this is pretty significant, and in my amateur opinion is tantamount to extending the recession by at least three months. It&#8217;s also a slippery slope, and given that it&#8217;s highly unlikely a farm hand living in a $750k house (yes, true anecdote) will be able to suddenly improve his cash flow in 90 days in the middle of a recession, I can&#8217;t imagine the moratorium will do anything besides delay the day of reckoning.</p>
<p>It would also be the height of selfishness for Californians to use the power of their state government to clog up the <em>nation&#8217;s</em> financial system in order to avoid having to deal with the consequences of their feckless consumerism. Where California goes, so goes the country, and that includes really bad ideas. I expect other states, such as Nevada, to follow suit with similar populist legislation. Hopefully the Feds will clamp down before this gets out of hand, because otherwise I can see economically illiterate do-gooder state legislators launching the mother of all depressions by bringing down our entire financial system through a morass of legislation designed to prevent banks from clearing bad credit.</p>
<p>Why is foreclosure considered such an anathema, anyway, at least compared to the prospect of having our entire financial system collapse? People will be released of their debt burden, with the only consequence for their foolishness being that for the next seven years they&#8217;ll have to rent an apartment at a much cheaper monthly payment than they had before. I can&#8217;t imagine that&#8217;s such a bad thing, especially when the alternative is for the credit crunch to deepen, an outcome that would have potentially dire consequences for everybody. Given that the Fed has been only marginally successful in freeing credit markets, the last thing we need is for states to push the other way by obstructing the neccesary process of clearing out bad debt through default.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=7JuDO"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=7JuDO" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=DuPTo"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=DuPTo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=B2vdo"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=B2vdo" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=vFB6o"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=vFB6o" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/472067495" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/schwarzenegger-to-nation-lets-drag-out-the-recession-as-long-as-possible-ok/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/schwarzenegger-to-nation-lets-drag-out-the-recession-as-long-as-possible-ok/</feedburner:origLink></item>
		<item>
		<title>The famous L. Tureaud recommends going short equities</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/461990310/</link>
		<comments>http://scripts.mit.edu/~birge/blog/the-famous-l-tureaud-recommends-going-short-equities/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 16:58:20 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Economics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=608</guid>
		<description><![CDATA[ 
I envision Bernanke in a headlock in one arm, screaming &#8220;Ok, ok, we over inflated!&#8221; with Paulson in the other, choking &#8220;Let go, can&#8217;t breathe! Ack. Fine! We lied about TARP! Ok?&#8221;
]]></description>
			<content:encoded><![CDATA[<p> </p>
<div id="attachment_609" class="wp-caption aligncenter" style="width: 461px"><a href="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/11/mr-t-i-pity-the-foo.jpg" ><img class="size-full wp-image-609" title="I pity the fool..." src="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/11/mr-t-i-pity-the-foo.jpg" alt="Mr. T understands that massive deleveraging will lead to an extended depression." width="451" height="617" /></a><p class="wp-caption-text">Mr. T understands that massive deleveraging will lead to an extended depression.</p></div>
<p>I envision Bernanke in a headlock in one arm, screaming &#8220;Ok, ok, we over inflated!&#8221; with Paulson in the other, choking &#8220;Let go, can&#8217;t breathe! Ack. Fine! We lied about TARP! Ok?&#8221;</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=Rj7bN"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=Rj7bN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=QAdNn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=QAdNn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=zZTgn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=zZTgn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=jXEJn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=jXEJn" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/461990310" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/the-famous-l-tureaud-recommends-going-short-equities/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/the-famous-l-tureaud-recommends-going-short-equities/</feedburner:origLink></item>
		<item>
		<title>Gold will not neccesarily go up during deflation</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/461500343/</link>
		<comments>http://scripts.mit.edu/~birge/blog/why-gold-will-not-neccesarily-go-up-during-deflation/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 04:50:39 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Economics]]></category>

		<category><![CDATA[boring]]></category>

		<category><![CDATA[gold]]></category>

		<category><![CDATA[investing]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=617</guid>
		<description><![CDATA[Many financial commentators, including the usually on-the-spot Mish Shedlock, have been saying for quite some time that gold will go up in a deflationary environment. Their argument is that gold is money and money does well in deflation. I would be willing to wager that Mish has more understanding of economics while half asleep than I [...]]]></description>
			<content:encoded><![CDATA[<p>Many financial commentators, including the usually on-the-spot <a href="http://globaleconomicanalysis.blogspot.com/2008/11/i-like-gold-here.html" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/globaleconomicanalysis.blogspot.com');">Mish Shedlock</a>, have been saying for quite some time that <a href="http://www.financialsense.com/editorials/phillips/2008/1121.html" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.financialsense.com');">gold will go up</a> in a deflationary environment. Their argument is that gold is money and money does well in deflation. I would be willing to wager that Mish has more understanding of economics while half asleep than I will ever hope to have, and so I assume he&#8217;s just being simplistic and inprecise with his words. However, people then repeat it often enough, and it takes on a life of its own. There are many people explicitly claiming that the price of gold should rise during both deflation and inflation. Empirical evidence to the contrary gets brushed aside by either (a) claims that the gold paper market (COMEX) is being manipulated or (b) we&#8217;re in a temporary period of gold falling due to hedge fund deleveraging.</p>
<p>However, straightforward logic will tell you that gold should not neccesarily go up in price during deflation. Yes, it&#8217;s money, but so are dollars! And since gold is always priced in units of somebody&#8217;s money, why should it always go up? Sure, it will increase in <em>value</em>, relative to other assets, during deflation, but without other factors to consider there is no reason to expect it will increase in <em>price</em>. After all, the Yen is money, so shouldn&#8217;t it go up during deflation? Obviously, every currency cannot go up relative to every other currency, and so, too, the price of gold will not automatically go up during deflation.</p>
<p>So the <em>real </em>question is this: is gold an attractive currency relative to the dollar? I&#8217;d argue it depends on the stuation. If you expect the deflation to be caused by lower demand for goods despite an increase in the money supply, you might consider gold a more stable value. But there are inherent disadvantages to gold, such that all things being equal, cash wins: You can&#8217;t pay debts with gold, and none of your future expenses are priced in units of ounces of the stuff. There&#8217;s no way to make gold disappear, but in our fractional reserve system, fiat currency can vanish during a period of debt destruction. If I were confident of such a monetary deflation persisting I&#8217;d personally want to keep my wealth in the ever scarcer fiat currency, not a form of money that&#8217;s dug out of the ground and hoarded by metric tons in central bank vaults around the world.</p>
<p>I certainly agree that it&#8217;s <em>possible </em>for gold to go up during deflation, and that if ever there were a situation where it should, it&#8217;s perhaps now. All I&#8217;m saying is that the idea that gold will <em>always </em>go up during deflation is as nonsensical and meaningless as saying the Euro will always go up during deflation. It depends on the situation. I think the best argument for holding gold during a period of deflation is simply the expectation that the government will soon do everything in its considerable power to reinflate the currency.</p>
<p>(Disclaimer: Lest anyone think I&#8217;m the typical antigold zealot sniping at the bugs, I&#8217;m actually long a significant portion of my meager grad student portfolio in GG and DGP.)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=cYk6N"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=cYk6N" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=p2eHn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=p2eHn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=33hnn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=33hnn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=JBs3n"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=JBs3n" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/461500343" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/why-gold-will-not-neccesarily-go-up-during-deflation/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/why-gold-will-not-neccesarily-go-up-during-deflation/</feedburner:origLink></item>
		<item>
		<title>Can congress really do that?</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/452590368/</link>
		<comments>http://scripts.mit.edu/~birge/blog/can-congress-really-do-that/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 05:53:38 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=582</guid>
		<description><![CDATA[I suppose another benefit of our troubles is the bright light being shone on the sausage factory of Washington. Apparently our courageous &#8220;leaders&#8221; in congress are trying to divert billions of dollars from the bank bailout at the even more hopeless cause of our automobile industry (labor and Detroit being two of the most special [...]]]></description>
			<content:encoded><![CDATA[<p>I suppose another benefit of our troubles is the bright light being shone on the sausage factory of Washington. Apparently our courageous &#8220;leaders&#8221; in congress are trying to divert billions of dollars from the bank bailout at the even more hopeless cause of our automobile industry (labor and Detroit being two of the most special of the Democrat&#8217;s special interests) by revising the intent of the law after the fact. From today&#8217;s WSJ:</p>
<blockquote><p>&#8230;This decision was made easier by the fact that the Big Three&#8217;s balance sheets have made even sympathetic Washington spenders worry about throwing money at a bankruptcy. <strong>Democrats decided it would be better to direct the funds in a way that allowed them to later deny fault.</strong></p>
<p>The plan? Make it the Bush administration&#8217;s responsibility to give Detroit cash &#8212; namely by claiming after the event that the $700 billion rescue package for financial institutions was in fact a rescue package for auto makers. <strong>This was attempted with several hilarious &#8220;colloquys&#8221; &#8212; pre-scripted dialogues between members that were quietly inserted into the Congressional Record after the vote, all aimed at rewriting the &#8220;intent&#8221; of the law. Say, this one, from Oct. 1</strong>:</p>
<p>Michigan Sen. Carl Levin: &#8220;As Treasury implements this new program, it is clear to me from reading the definition of financial institution that auto financing companies would be among the many financial institutions that would be eligible sellers to the government. Do you agree?&#8221;</p>
<p>Connecticut Sen. Chris Dodd: &#8220;Yes, for purposes of this act, I agree that financial institution may encompass auto financing companies.&#8221;</p>
<p>Fun. Meanwhile, Democrats passed $25 billion in aid for Detroit, though under the careful guise of &#8220;green&#8221; funds to help it meet new fuel-efficiency standards.</p></blockquote>
<p>Damn. I&#8217;m becoming fairly convinced that in the long run history will look upon the likes of Dodd and Pelosi and Barney Frank and Bush in pretty much all the same light: fools and crooks, all. These are the guys that sat by term after term letting the federal defecit grow and grow while they bought votes with the money. They let the government enable our massive dependency on debt through the Federal Reserve; we talk about the finance &#8220;industry&#8221; as a private enterprise that got out of hand, but <a href="http://en.wikipedia.org/wiki/Fractional-reserve_banking" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">fractional reserve banking</a> doesn&#8217;t happen without the government as a neccesary and willing partner. The buck stops (literally) at our government.</p>
<p>These corrupt traitors did much to help get us into this mess, and now we are trusting them with trillions (when all is said and done) to get us out? Having Barney Frank and Chris Dodd in charge of congressional finance committes during a crisis is like opening the cockpit door of a plummeting 747 to find, well, Barney Frank and <a href="http://en.wikipedia.org/wiki/Chris_Dodd" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Chris Dodd</a>. Those two lawyers have about as much training in finance as they do in flying heavy transport aircraft. And their incompetence would be tolerable were it not for their corruption and allegience to the finance industry. It&#8217;s like the fox guarding the hen house, if the fox were a dull weasel.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=hfieN"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=hfieN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=OuqYn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=OuqYn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=orPhn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=orPhn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=bm5dn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=bm5dn" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/452590368" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/can-congress-really-do-that/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/can-congress-really-do-that/</feedburner:origLink></item>
		<item>
		<title>The bright side of the financial crisis</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/449256102/</link>
		<comments>http://scripts.mit.edu/~birge/blog/the-bright-side-of-the-financial-crisis/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 07:22:22 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=533</guid>
		<description><![CDATA[As anybody who reads this or knows me is acutely aware, I&#8217;m an eternal optimist. So, even though our financial system is collapsing around us, I see this as a potentially positive development for America.
It is only when things are bleak that people are sufficiently motivated to change. We saw that last Tuesday, as red [...]]]></description>
			<content:encoded><![CDATA[<p>As anybody who reads this or knows me is acutely aware, I&#8217;m an eternal optimist. So, even though our financial system is collapsing around us, I see this as a potentially positive development for America.</p>
<p>It is only when things are bleak that people are sufficiently motivated to change. We saw that last Tuesday, as red states turned blue with anger over the direction of the country. More importantly, I think we&#8217;re seeing the beginning of something even more productive than the electing of a figurehead for change. The magnitude of the crisis seems to be finally waking people up to the fact that our issues are not just due to one feckless moron who was elected president, but are systemic and of a magnitude that defy simplistic partisan finger pointing.</p>
<p>As depressing as this crisis is, the resulting national depression is&#8211;at last&#8211;our first rational act as a population in a long time. We <em>should</em> be depressed, but at least take comfort in that it is the first step of the recovery. I&#8217;m sorry to succumb to the overused addict metaphors in describing our country&#8217;s borrowing and economic discipline, but I do think that one absolutely valid similarity is that sometimes you just need to hit bottom in order to see the truth and take responsibility for yourself.</p>
<p>Well, America, as we sit weeping in $7 trillion of our own vomit, with the Chinese holding back our hair and telling us &#8220;Keep borrowing, you&#8217;ll feel better,&#8221; I think it&#8217;s safe to say: Congratulations, fellow citizens, we&#8217;ve hit rock bottom. Now, it&#8217;s tempting to try to escape back into the bottle (and congress is trying desperately to help us with that) but sometimes when the mind fails the body has a wisdom of its own. We just can&#8217;t keep any more credit down, no matter what we try, even the really good stuff from the Fed&#8217;s acronymic stash. So, we do what any good problem drinker does who is trying desperately to stretch the metaphor, and drunk dial an ex-girlfriend at 2 am. Except, as these things go, all our friends are junkies, too, and they&#8217;re all worse off than we are. All we get is a message from their Swiss roomate that they&#8217;re in rehab in Reykjavik and can&#8217;t hang around with us any more. We&#8217;re on our own.</p>
<p>So there&#8217;s nothing to do but buck up and change our ways, and the first place to start is with more cliches. &#8220;The night is always darkest before the dawn.&#8221; I&#8217;m not sure who first uttered that phrase, or what terrible situation prompted them to try to cheer somebody up with it, but it should come with a disclaimer: Dawn not guaranteed in the case of nuclear winter. Rock bottom is really only a call you can make in retrospect. It could, after all, just be the beginning of the dying process. We can use the troubles of the day as a motivation to finally clean up our collective act, or we can use it as a springboard for a spiral into degeneracy and looting. We can tighten our belts and sacrifice, or we can pass off our problems to future generations in the form of further debt, unsustainable bubble economics, or confiscatory taxes on decreasing pockets of wealth. We can chant &#8220;Yes we can&#8221; or we can quietly do.</p>
<p>What other revelations has the clarity of desperation brought? For one, that while we may have always been capitalists, and always will be, we&#8217;ve recently become merciless and stupid capitalists. Unfortunately, capitalism, even at its best, says nothing more than that markets find equilibrium <em>subject to their constraints</em>. We&#8217;ve forgotten that the constraints are in our control. If we consider it fair game to freely trade with countries that essentially allow slavery, then our free markets will eventually price labor at slave wages. Capitalism is a ruthless optimizer; it is brutally efficient at pricing but not so good at valuing. I think we may finally see that.</p>
<p>What gives me hope that we&#8217;ll choose the right path is that, as hokey as this might sound, Americans are often at their best when the going is toughest. We saw it briefly after 9/11, before our government went insane and declared martial law; we saw it, believe it or not, during Katrina, as Americans donated $2.6 billion of their own money while FEMA squandered their taxes, and over a million volunteers later moved in to supplement an incompetent federal response. There&#8217;s not a single country in the world whose citizens are more voluntarily generous than Americans. The common theme is that we are at our best when we depend on ourselves, not politicians. A culture of letting the government take care of us is slowly supplanting a culture of taking care of each other and ourselves; I hope part of hitting rock bottom is that we quit letting politicians be our enabler, and start taking care of ourselves. As Obama says, I am my brother&#8217;s keeper. </p>
<p>I&#8217;d like to see GM bailed out by Americans buying their shitty cars, not by Federal loans. I&#8217;d like to see inner city poverty decreased not by welfare but because enterprising Americans start factories in Detroit to employ the unemployed, and other Americans buy the overpriced goods from those factories because they say &#8220;Made in the USA.&#8221; I&#8217;d like to see us start putting some effort into paying attention to the actions and ethics of those we do business and bank with, and not foolishly expect some government drone to be effective at doing so in our stead. I&#8217;d like to see Americans able to afford homes because we bear the temporary pain of letting their prices fall, not because congress bails out a few homeowners in 2009 at the expense of homeowners in the years 2010-2040. I hope we make healthcare truly more affordable by suing doctors less and using resources more wisely (coverage for Viagra?) not by falling for the false and unsustainable affordability of simply having somebody else pay for it.</p>
<p>You can criticize me for being naive in trusting citizen action over government fiat, but I think the greater naivete is thinking we can solve our problems without it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=bQI5N"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=bQI5N" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=TBqpn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=TBqpn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=AU2Yn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=AU2Yn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=BhYBn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=BhYBn" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/449256102" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/the-bright-side-of-the-financial-crisis/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/the-bright-side-of-the-financial-crisis/</feedburner:origLink></item>
		<item>
		<title>Massachusetts decriminalizes owning pot, but not selling it</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/447074391/</link>
		<comments>http://scripts.mit.edu/~birge/blog/massachusetts-decriminalizes-owning-pot-but-not-selling-it/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 03:54:04 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<category><![CDATA[alaskan thunderfuck]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=564</guid>
		<description><![CDATA[In their infinite wisdom, the voters of Massachusetts chose to decriminalize the use of pot, but not the sale of it. You get caught with one ounce or less of the chronic, you lose the pot and get a $100 fine. That&#8217;s it. Basically, using pot is now considered on par with parking in a [...]]]></description>
			<content:encoded><![CDATA[<p>In their infinite wisdom, the voters of Massachusetts chose to decriminalize the use of pot, but not the sale of it. You get caught with one ounce or less of the chronic, you lose the pot and get a $100 fine. That&#8217;s it. Basically, using pot is now considered on par with parking in a handicapped spot, and I hear it&#8217;s even more fun. I have no problem with it being decriminalized, and wish that we&#8217;d just drop this ludicrous war on drugs (which is really a war on drug users) and legalize everything. However, by decriminalizing owning one ounce, we basically are saying that we&#8217;ll still send poor kids to jail for selling it, but rich guys buying it just get a slap on the wrist. So this will drive up the demand for pot, causing more dealers to get caught and sentenced. I&#8217;m sure the people supporting the bill weren&#8217;t intending to pass an incredibly regressive resolution, but that&#8217;s the thing with unintended consequences.</p>
<p>Come on, Massachusetts. Grow a pair and just legalize pot. The war on drugs is doing far more damage to our society than drugs ever could. You&#8217;d have to be taking a lot of them not to see that.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=Q2nIN"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=Q2nIN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=24cNn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=24cNn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=eNx1n"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=eNx1n" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=GMVXn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=GMVXn" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/447074391" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/massachusetts-decriminalizes-owning-pot-but-not-selling-it/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/massachusetts-decriminalizes-owning-pot-but-not-selling-it/</feedburner:origLink></item>
		<item>
		<title>On the Obama victory</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/443835882/</link>
		<comments>http://scripts.mit.edu/~birge/blog/on-the-obama-victory/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 01:13:30 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<category><![CDATA[Obama]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=539</guid>
		<description><![CDATA[Let me start by saying that I&#8217;m very happy that Obama won over McCain, and I think it&#8217;s wonderful that so many people were compelled into action on behalf of their country. It&#8217;s also inspiring to see Democracy in action, an entire country throwing out a set of leaders without a drop of blood spilled. [...]]]></description>
			<content:encoded><![CDATA[<p>Let me start by saying that I&#8217;m very happy that Obama won over McCain, and I think it&#8217;s wonderful that so many people were compelled into action on behalf of their country. It&#8217;s also inspiring to see Democracy in action, an entire country throwing out a set of leaders without a drop of blood spilled. I&#8217;m looking forward to seeing what Obama will do, and more importantly, what he&#8217;ll ask of us.</p>
<p>But as you might expect, I&#8217;m also a lot less excited about this than other people who wanted to see McCain lose. The cult of personality that has sprung up around Obama among young people worries me, and I&#8217;m not sure it bodes well. For a group of people who hold religious zealots in such contempt, when Obama supporters gather it makes Baptist revivals look rational and sober. The students at Harvard were beside themselves last night, running around screaming and chanting his name. (One undergrad dislocated her knee during the ensuing revelry.) It was a bit scary, seeing Cambridge turn into Caracas during a Chavez rally.</p>
<p>That&#8217;s not the kind of country we are supposed to be. We don&#8217;t worship our leaders in America, we tolerate them. We don&#8217;t chant the name of our next president, we start making fun of him on SNL before he&#8217;s even in office. We don&#8217;t expect miracles of change to come through leaders, we expect progress to come from us and for our policians to get out of the way.</p>
<p>Obama will come to power, and inevitably not that much will really change. Of that I&#8217;m certain. It&#8217;s always that way. We have a campaign, and with all the focus-grouped advertising and inspiring speeches, we forget that a president can&#8217;t magically create jobs, or make oil cheaper, or reduce the cost of healthcare. The presidency is a small rudder on a huge boat. You can hold up a million signs that say Change, but when you put them in the water, they don&#8217;t do much to move a ship like America. The government can shift money around, and can turn insurance premiums into taxes, but it can&#8217;t change the great forces at work in the world. It can&#8217;t stop the fact that Chinese workers are 100 times cheaper than American labor, it can&#8217;t make the banks start lending again, and it can&#8217;t make MRI&#8217;s suddenly affordable. It can&#8217;t magically fix underperforming schools, or rejuvenate inner cities beset by crime.</p>
<p>I&#8217;m not suggesting nothing will get done. Policy certainly matters, and in the short term the government can be greatly effective in shifting burdens around. But I am saying that whatever will happen, it most certainly is not worth getting this excited about it. If America is to prevail over its problems, it will require ugly solutions, hard work, brutal sacrifice, a bit of luck, and a lot of time. It won&#8217;t come from jawboning about change and patting ourselves on the back for finally electing a guy who can put together a sentence.</p>
<p>I hope that I&#8217;m wrong, and that last night&#8217;s orgy of self-congratulation was just the relief of a long eight years finally being over. I hope that there hasn&#8217;t been a shift in the national cultural skepticism about politicians and the role of government. In my mind, nothing will bring about our failure quicker than the idea that our success lies in the hands of our politicians.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=c8TfN"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=c8TfN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=6TDTn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=6TDTn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=zFJ4n"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=zFJ4n" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=2SLpn"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=2SLpn" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/443835882" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/on-the-obama-victory/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/on-the-obama-victory/</feedburner:origLink></item>
		<item>
		<title>The bailout, part II</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/419984176/</link>
		<comments>http://scripts.mit.edu/~birge/blog/the-bailout-part-ii/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 23:40:20 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Economics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=526</guid>
		<description><![CDATA[Did I say bailout? I meant rescue. Here is an excerpt from one of the smartest financial writers I know of, Mish Shedlock:
To stimulate lending, the bailout plan will attempt to recapitalize banks. The method of recapitalization is best described as robbing Taxpayer Pete to pay Wall Street Paul. In essence, money is taken from [...]]]></description>
			<content:encoded><![CDATA[<p>Did I say bailout? I meant rescue. Here is an excerpt from one of the smartest financial writers I know of, <a href="http://globaleconomicanalysis.blogspot.com/2008/10/essence-of-rescue-plan.html" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/globaleconomicanalysis.blogspot.com');">Mish Shedlock</a>:</p>
<blockquote><p>To stimulate lending, the bailout plan will attempt to recapitalize banks. The method of recapitalization is best described as robbing Taxpayer Pete to pay Wall Street Paul. In essence, money is taken from the poor (via taxes, printing, and weakening of the dollar) and given to the wealthy so the wealthy supposedly will have enough money to lend back (at interest) to those who have just been robbed.</p>
<p>All this talk about Strategy, Implementation, Recruitment, Procurement, operations, compliance, and other details masks the essence of the plan. And even though &#8220;<span>A program as large and complex as this would normally take months &#8212; or even years &#8212; to establish</span>&#8220;, the Secretary for Financial Stability is going to ramrod something through as quickly as possible.</p>
<p>Unfortunately, no matter what seat of the pants strategies they come up with, I can guarantee in advance that the unforeseen consequences of whatever decisions they make, simply will not be any good. Besides, it is axiomatic that plans to rob Peter to pay Paul, can never really work in the first place, regardless of how much time is spent crafting them.</p></blockquote>
<p>This is not to say that it won&#8217;t work overall, as this plan at least finally addresses the fact that what banks need is capital, not access to credit. In fact, this is the first article of Mish&#8217; that wasn&#8217;t outright beligerent in calling Paulson and the Fed complete fools, so I guess that is as close to an endorsement as you&#8217;ll get. But it&#8217;s just sad that the masters of the universe screw up royally, and poor people will disproportionately pay the price. It&#8217;s also sad that this further concentrates Chinese power over the American economy as they will be undoubtedly financing a lot of this.</p>
<p>感谢你，我荣幸的主人！</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=fzvuM"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=fzvuM" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=c5cum"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=c5cum" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=b2Ohm"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=b2Ohm" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=dcbDm"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=dcbDm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/419984176" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/the-bailout-part-ii/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/the-bailout-part-ii/</feedburner:origLink></item>
		<item>
		<title>Taxing the poor to bail out Wall Street</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/408880090/</link>
		<comments>http://scripts.mit.edu/~birge/blog/taxing-the-poor-to-bail-out-wall-street/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 03:47:55 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Economics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=517</guid>
		<description><![CDATA[It has been assumed that the cost of the putative bailout will be born by taxpayers. However, since that the Fed and Treasury will pay for it with debt and by printing money, the people who will pay for it are anyone who holds dollars. Given that the final cost could end up in the [...]]]></description>
			<content:encoded><![CDATA[<p>It has been assumed that the cost of the putative bailout will be born by taxpayers. However, since that the Fed and Treasury will pay for it with debt and by printing money, the people who will pay for it are anyone who holds dollars. Given that the final cost could end up in the trillions, the result will be quite a bit of that hidden tax called &#8220;inflation,&#8221; as all the debt and new money dilutes the currency. Inflating the currency is actually a very regressive tax, however. Poor people generally have to live month-to-month, and thus aren&#8217;t able to save and invest money, holding most of their wealth in cash. They also don&#8217;t have access to as high yielding investments as the rich. Most importantly, they occupy jobs which are usually the last to see inflationary wage increases filter down to them (which is as it &#8220;should be&#8221; or otherwise inflation wouldn&#8217;t work so effectively as a hidden tax).</p>
<p>So, this bailout of Wall Street is going to be disproportionately paid for by the working poor. Good job congress.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=jpBdM"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=jpBdM" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=PZoZm"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=PZoZm" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=ZteXm"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=ZteXm" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=TlKrm"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=TlKrm" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/408880090" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/taxing-the-poor-to-bail-out-wall-street/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/taxing-the-poor-to-bail-out-wall-street/</feedburner:origLink></item>
		<item>
		<title>One trillion dollars spent without a single vote</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/400011342/</link>
		<comments>http://scripts.mit.edu/~birge/blog/one-trillion-dollars-spent-without-a-single-vote/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 18:07:00 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<category><![CDATA[libertarians]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=505</guid>
		<description><![CDATA[Here is an e-mail I just got from the Libertarian party, suggesting that perhaps we should be a little more upset than we are with the bailout. Even if you&#8217;re not normally inclined to listen to the Libertarians, I think they have a point here. A trillion dollar bailout to avoid a financial disaster? That [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an e-mail I just got from the Libertarian party, suggesting that perhaps we should be a little more upset than we are with the bailout. Even if you&#8217;re not normally inclined to listen to the Libertarians, I think they have a point here. A trillion dollar bailout to avoid a financial disaster? That <em>is</em> a financial disaster, and one being paid for by the wrong people!</p>
<blockquote><p>Like most Americans, I&#8217;m sure you were glued to the news about the &#8220;financial crisis&#8221; and the government&#8217;s &#8220;fix&#8221; for the problem.  You probably heard that the government was going to come in and save the mortgage industry by bailing out failing corporations.  And, you probably heard both Barack Obama and John McCain say that this bailout was necessary, and good for the economy.</p>
<p>What you probably didn&#8217;t hear was that it was going to cost up to $1 trillion dollars, and you were responsible for this money.</p>
<p>&#8220;American taxpayers will come up with the money,&#8221; says the New York Times.</p>
<p>Such a number is hard to conceptualize if you&#8217;re not the government. So, in order to show you just how much $1 trillion dollars really is, we&#8217;ve put together these figures:</p>
<p>One trillion dollars ($1,000,000,000,000) is enough money:</p>
<ul>
<li>To buy everybody living in Los Angeles at least one Lamborghini Gallardo. </li>
<li>To buy 88,052, 394&#8242; custom mega yachts; enough to stretch around ¼ of the world. </li>
<li>To buy everyone living in Belize and Malta a Manhattan apartment.</li>
<li>To get half of the Democratic Party into a fundraiser for Barack Obama at the $28,500 admission price. </li>
<li>To give one out of every two men in the United States a Men&#8217;s Presidential Rolex watch.</li>
<li>To buy every woman in the United States a Tiffany Diamond Starfish Pendant.</li>
<li>To get two Mitsubishi 73&#8243; HDTVs for every household in America.</li>
<li>To buy four copies of The Office: Season Four on DVD, to every person on earth.</li>
<li>To send everybody in America on an all-inclusive vacation to Tahiti (and some people can stay a few extra days).</li>
</ul>
<p>AND&#8230;</p>
<p>$1 trillion is enough money for everyone in Buffalo, NY to buy their own 65-acre island in Panama.</p>
<p>This is how much the government is going to cost you (roughly $3,278 for every man, woman and child in the United States).</p>
<p>Barack Obama is for it.  John McCain is for it.</p>
<p>But, Bob Barr and Libertarian Party are against it.</p>
<p>&#8220;No one voted to pour taxpayer funds into Wall Street,&#8221; says Bob Barr, the Libertarian Party&#8217;s presidential nominee, &#8220;and no one voted for the government to take over an insurance company.  If the Federal Reserve can spend as much money as it desires to bail out any company that it desires, is there anything that it cannot do with taxpayer funds?</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=33U0L"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=33U0L" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=vQbgl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=vQbgl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=rBWBl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=rBWBl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=FnDbl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=FnDbl" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/400011342" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/one-trillion-dollars-spent-without-a-single-vote/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/one-trillion-dollars-spent-without-a-single-vote/</feedburner:origLink></item>
		<item>
		<title>The far Left and Palin: “The irony! It burns!”</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/400011343/</link>
		<comments>http://scripts.mit.edu/~birge/blog/the-far-left-and-palin-the-irony-it-burns/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 18:06:47 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=476</guid>
		<description><![CDATA[One can credit the academic far Left with the current climate of gender politics, where the difficult goal of equality has largely been forgotten and in its place we have the expedient of reverse sexism. So, it is an irony that must be pretty damn savory to those on the Religious Right that the same identity [...]]]></description>
			<content:encoded><![CDATA[<p>One can credit the academic far Left with the current climate of gender politics, where the difficult goal of equality has largely been forgotten and in its place we have the expedient of reverse sexism. So, it is an irony that must be pretty damn savory to those on the Religious Right that the same identity politics invented by the Religious Left have led millions of independent women across the country to rally behind McCain simply because they can identify with the profoundly unqualified Sarah Palin as one of them. From a recent <a href="http://www.washingtonpost.com/wp-dyn/content/story/2008/09/11/ST2008091101260.html" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.washingtonpost.com');">Post article</a>:</p>
<blockquote><p>&#8220;She justifies what we do every day,&#8221; said Beth Tweddle, who works in sales and carried a sign she drew herself, saying &#8220;We [heart] Pit Bull Palin.&#8221; Tweddle was already a McCain supporter, she said, &#8220;but Sarah just energizes us and got us out here because she does what we do, she lives like we do.&#8221;</p>
<p>We don&#8217;t live in an age of looking up to authority anymore. We don&#8217;t cotton to the idea that there are people who are our betters. In this time of &#8220;American Idol,&#8221; bedroom bloggers and the belief that experience, knowledge and education don&#8217;t necessarily mean a whole lot, Palin is a symbol, a statement that anyone can make it if he or she really tries.</p>
<p>Karla Rupp, a real estate agent, went to see Palin on behalf of her three children, especially the one who has multiple disabilities and is in a nursing home. Val Lewis couldn&#8217;t stay away &#8212; &#8220;that&#8217;s how empowering it is to have Sarah up there. I have four children; she has five. And we get it done.&#8221;</p>
<p>&#8230;</p>
<p>&#8220;She&#8217;s just as flawed as we are,&#8221; Tweddle said. &#8220;It&#8217;s not the fact that she&#8217;s a woman but the way she does it all. And let me tell you: There&#8217;re more American parents with unwed pregnant teenaged children than American parents with Harvard grads. She&#8217;s real.&#8221;</p>
<p>For hours, I walked through the crowd talking to people, mostly women. Again and again, I heard variations on this idea: &#8220;She&#8217;s more like us than Obama, McCain or any of the others,&#8221; as Rupp put it. &#8220;She knows what we go through.&#8221;</p>
<p>&#8230;</p>
<p>Most people I spoke to readily conceded that Palin lacks experience with or knowledge of many important national and foreign issues. But, as Allison McGarvey, a teacher who lives in Stafford County, said, Palin is &#8220;a courageous woman, and what she doesn&#8217;t know, she can learn quickly. Let&#8217;s face it, no president knows all the issues. Anyway, I don&#8217;t see how a candidate can pick one stand and just stick to it. The world situation changes every day. It&#8217;s their moral and ethical background that&#8217;s important.&#8221;</p>
<p>&#8230;</p>
<p>Like many at the rally, Victoria Robinson-Worst sees Palin&#8217;s lack of experience as an asset. &#8220;I know people who have experience who are totally incompetent,&#8221; said Robinson-Worst, who lives in Loudoun County, designs wedding flowers and raises two children. &#8220;And I know people who have no experience who step in and get it right. I mean, women can do amazing things.&#8221;</p></blockquote>
<p>Yup. They sure can.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=gZsvL"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=gZsvL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=Okbml"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=Okbml" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=ukznl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=ukznl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=IX4al"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=IX4al" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/400011343" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/the-far-left-and-palin-the-irony-it-burns/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/the-far-left-and-palin-the-irony-it-burns/</feedburner:origLink></item>
		<item>
		<title>Apple’s iPhone 2.1 software: Lipstick on a pig</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/391006321/</link>
		<comments>http://scripts.mit.edu/~birge/blog/apples-iphone-21-software-lipstick-on-a-pig/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 21:06:23 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=486</guid>
		<description><![CDATA[Among the myriad problems the 2.1 firmware was supposed to solve was poor 3G reception. How did Apple achieve this? Apparently by simply artificially displaying more bars, at least in part: In their release notes for the update, they list &#8220;improved accuracy of the 3G signal strength display.&#8221; That&#8217;s just corporate speak for &#8220;we can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Among the myriad problems the 2.1 firmware was supposed to solve was poor 3G reception. How did Apple achieve this? Apparently by simply artificially displaying more bars, at least in part: In their release notes for the update, they list &#8220;improved accuracy of the 3G signal strength display.&#8221; That&#8217;s just corporate speak for &#8220;we can&#8217;t fix these pieces of junk, but we don&#8217;t want to pay for a recall, so we&#8217;re going to just fool you into thinking your phone is working properly.&#8221;</p>
<p>Sure enough, I now get five bars of 3G signal in my office, where I used to get one or two! However, when I try to make a 3G call, the audio is warbled (is if packets are being constantly dropped) and it eventually either drops the call entirely, or switches back to standard GSM. All while showing five bars of 3G signal until it dies! Five bars of lies and deceit.</p>
<p><ins datetime="2008-09-13T01:00:13+00:00">Update: Using my wife&#8217;s 2.0.2 iPhone 3G, I can confirm that Apple has, in fact, done little to nothing to improve the 3G reception beyond the psychological bromide of increasing the number of bars displayed. Holding the phones side by side, she gets one bar and I get five. However, download times for web pages are virtually identical (i.e. slow).</ins></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=h6mvL"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=h6mvL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=PeM5l"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=PeM5l" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=clMWl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=clMWl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=mYRwl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=mYRwl" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/391006321" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/apples-iphone-21-software-lipstick-on-a-pig/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/apples-iphone-21-software-lipstick-on-a-pig/</feedburner:origLink></item>
		<item>
		<title>More news from the iPhone public beta: Don’t count on the alarm!</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/388845515/</link>
		<comments>http://scripts.mit.edu/~birge/blog/more-news-from-the-iphone-public-beta-dont-count-on-the-alarm/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 17:20:58 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=472</guid>
		<description><![CDATA[I had plenty of time to write this, because I missed class today. The reason I missed class was that my iPhone&#8217;s alarm never went off.
When I woke up this morning, my first thought was &#8220;You know, I feel way too good for a guy who&#8217;s only gotten four hours of sleep.&#8221; I then clicked [...]]]></description>
			<content:encoded><![CDATA[<p>I had plenty of time to write this, because I missed class today. The reason I missed class was that my iPhone&#8217;s alarm never went off.</p>
<p>When I woke up this morning, my first thought was &#8220;You know, I feel <em>way </em>too good for a guy who&#8217;s only gotten four hours of sleep.&#8221; I then clicked the home button on my iPhone to check what time it was. I was not happy, not happy at all, to find that it was thirty minutes past the start of class and two hours after the alarm was supposed to go off.</p>
<p>As if to mock me, the alarm then finally starts to go off!</p>
<p>I checked online, and <a href="http://www.everythingicafe.com/forum/general-discussion/alarm-feature-failed-7968.html" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.everythingicafe.com');">this is happening to other people</a>, too. Apparently, if anything else triggers a notification (like a text message or calendar notification) the alarm will not fire until those notifications are seen. I&#8217;m not sure if this is what happened to me (I was pretty groggy) but it fits the observations of others that when an alarm is missed, it suddenly goes off when you wake up the iPhone.</p>
<p>So, we can add one more bug to the list of reception problems, crashing apps, crashing browser, etc. in the Apple public beta test that is the iPhone 3G.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=MhquL"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=MhquL" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=9QGDl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=9QGDl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=Tt7ul"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=Tt7ul" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=bSNcl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=bSNcl" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/388845515" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/more-news-from-the-iphone-public-beta-dont-count-on-the-alarm/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/more-news-from-the-iphone-public-beta-dont-count-on-the-alarm/</feedburner:origLink></item>
		<item>
		<title>Text messages cost more than sending postcards!</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/388711714/</link>
		<comments>http://scripts.mit.edu/~birge/blog/text-messages-cost-more-than-postcards/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 14:30:02 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=464</guid>
		<description><![CDATA[The going rate for a text message is now $0.20, up from $0.05 a year or so ago, a puzzling increase given that every underlying component of communications technology has become cheaper over that time. Given that a text message is billed both for sending and receiving (which should be criminal) this means that it [...]]]></description>
			<content:encoded><![CDATA[<p>The going rate for a text message is now $0.20, up from $0.05 a year or so ago, a puzzling increase given that every underlying component of communications technology has become cheaper over that time. Given that a text message is billed both for sending and receiving (which should be criminal) this means that it costs a total of $0.40 to complete a text message between parties. It would be cheaper to buy a postcard, print out that message on the postcard, and then have the USPS physically carry that postcard 3000 miles across the country and deliver it right to somebody&#8217;s doorstep.</p>
<p>OMGWTF?!?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=BDH1L"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=BDH1L" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=d6jpl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=d6jpl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=ioKzl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=ioKzl" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=QQWYl"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=QQWYl" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/388711714" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/text-messages-cost-more-than-postcards/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/text-messages-cost-more-than-postcards/</feedburner:origLink></item>
		<item>
		<title>Functional Programming and F#: Newton Basin Fractal Example Code</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/377174521/</link>
		<comments>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-newton-basin-fractal-code/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 14:30:40 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[f-sharp]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=354</guid>
		<description><![CDATA[NB: The recent release of the F# CTP breaks much of this code. I will update this page as soon as I get a chance, but please be aware that if you copy the code in as-is, it will not work.
I think the best way to appreciate how efficient F# is, especially for numerical analysis, [...]]]></description>
			<content:encoded><![CDATA[<p><ins datetime="2008-09-23T04:40:12+00:00">NB: The recent release of the F# CTP breaks much of this code. I will update this page as soon as I get a chance, but please be aware that if you copy the code in as-is, it will not work.</ins></p>
<p>I think the best way to appreciate how efficient F# is, especially for numerical analysis, is to show an implementation of a short program. The following is a bare-bones application which computes the basins of attraction for a Newton fixed point iteration which finds the roots of a polynomial in the complex plane. This computation is threaded across all available processors, and is a stand alone (albeit absolutely minimal) Windows application. The entire program is less than 50 lines, a testament to F# with respect to numerics and the .NET framework with respect to the GUI.</p>
<p>Briefly, Newton&#8217;s method is an iterative way to solve for the zeros of nonlinear functions. You start with an initial guess, and based on the local slope of the function, you make a refined guess for the root by following the slope all the way to zero. Unless the function really is a line this guess will be wrong, of course, but hopefully a little more accurate than where you started. If you start close enough to a root, repeated applications of the approximation will end up converging to the correct answer to arbitrary precision. If you start far away from one, however, you could end up at a root far away from your starting point, or you might never converge. It turns out that the map of where you end up as a function of where you start is a fractal, and a rather beautiful one for many equations. Below is a screen shot of the final program. Visible in the task manager is the nearly full usage of both cores of the processor during the render. (Click for a bigger version.)</p>
<div id="attachment_398" class="wp-caption aligncenter" style="width: 410px"><a href="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/08/newton-basin-screenshot.png" ><img class="size-full wp-image-398" title="newton-basin-screenshot" src="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/08/newton-basin-screenshot.png" alt="Screenshot of Newton Basin application, showing the nearly full use of both cores during the render." width="400" height="250" /></a><p class="wp-caption-text">Screenshot showing the nearly full use of both cores during the render.</p></div>
<p>The program below will iterate through up to 32 steps of Newton&#8217;s method on an arbitrary polynomial, starting at a grid of points in the complex plane. It shades each point based on the location of the final root found, with the hue determined by which root is converged to and with the brightness determined by how many steps were required. I&#8217;ll go through most of the functions, explaining each and pointing out how functional programming techniques are used. I do not claim this program is a highly efficient implementation! The main point was to illustrate several aspects of F#. It is however, pretty fast and makes use of multiple threads. In fact, the ease with which this program was parallelized is one of the main points I am trying to illustrate, and is made possible by the immutability of data in F# (and the <a href="http://www.ffconsultancy.com/products/fsharp_for_numerics/index.html" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ffconsultancy.com');">Flying Frog Numerics</a> library, a review of the which will be the subject of my final post on F#).</p>
<p><span id="more-354"></span></p>
<p>Below I&#8217;ve listed segments of code followed by brief explanations of each.</p>
<p> </p>
<pre>// program to plot newton basins for a polynomial in the complex plane
#light</pre>
<pre>// Load libraries
#r @"C:Program FilesFlyingFrogflyingfrog.numerics.dll"</pre>
<pre>// open some namespaces
open System
open Drawing
open Windows.Forms
open Math
open FlyingFrog</pre>
<p>This is just boring namespace and library loading code. The <a href="http://blogs.msdn.com/dsyme/archive/2006/08/24/715626.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.msdn.com');">#light syntax</a> allows us to use abbreviated notation for many F# constructs, and seems to be the common usage. For example, it lets you forget about most end of line indicators. It kind of makes me wonder why they don&#8217;t just make #light the default and force you to use #heavy when you don&#8217;t want it, though I suppose the way language development works, that ship has sailed into the waters of backwards compatibility. The cost for the light syntax is that whitespace becomes significant, and you must indent your code correctly for the compiler to know what&#8217;s up. On the whole, this saves typing and makes for more readable code so I&#8217;ll stick with the #light syntax. Frankly, I&#8217;ve never actually seen anybody <em>not</em> use the light syntax.</p>
<p> </p>
<pre>// tail recursive auxilary function for polynomial evaluation
let rec polyval_aux (ps:float list) (x:Complex) (xpow:Complex) (accum:Complex) =
  match ps with
  | [] -&gt; accum
  | c::psrest -&gt; polyval_aux psrest x (x * xpow) (accum + (c $* xpow))</pre>
<pre>// evaluate polynomial with coefficients given by ps at x
// the highest order coefficient is last
let polyval ps x =
  polyval_aux ps x (Complex.Create (1.,0.)) (Complex.Create (0.,0.))</pre>
<p>This is the recursive polynomial evaluation function that I spoke about in the previous post. The first function does all the work, and the second is just a wrapper that provides for a simpler call. (The use of recursion and pattern matching makes for a very simple imlementation, but for very large polynomials there are much more efficient ways to implement this that minimize the number of multiply operations.) The pattern matching facility of F# not only allows for a easy way to think about the control code (the two cases being those with empty lists and those with at least one entry) but it also simultaneously creates local variables (the first element &#8220;c&#8221; and the remaining elements in &#8220;psrest&#8221;) to be used within the second case. This is perhaps one of the most elegant aspects of F#: if you need to bother to specify a certain pattern of elements as a special case, then it&#8217;s likely you&#8217;ll want to use the specific instances of those elements. You thus specify your local variables at the same time that you specify your control code. Very elegent, useful and eminently readable. Pattern matching is by far my favorite aspect of F#.</p>
<p> </p>
<pre>let polyderiv (ps:float list) =
  match ps with
  | [] -&gt; []
  | lowcoef::pshigh -&gt;
    List.mapi (fun k pcoef -&gt; float (k+1) * pcoef) pshigh</pre>
<p>Since Newton&#8217;s method needs the derivative of a function, it will be handy to have a function which takes a polynomial and computes its derivative (which is just another polynomial). As with the previous functions, this takes a polynomial expressed as a list of coefficients and outputs another list of coefficients. (This function is also explained in better detail in the previous post.) The main part of this function illustrates the use of the higher order function List.mapi, which iterates over a list, applying a function to each element (presuming a nonempty list). The function here is defined anonymously, using the fun keyword. Another nice aspect of F#&#8217;s pattern matching is that the compiler ensures you cover all corner cases. In this case, the compiler will consider it a syntax error if you don&#8217;t include the [] case.</p>
<p> </p>
<pre>let maxcount = 32  // how many iterations before we give up on convergence</pre>
<pre>let rec fixed_point_count_aux f k (x : Complex) =
  let f_x = f x  // evaluate function
  if ((f_x = x) || (k &gt; (maxcount - 1))) then
    (x,k)
  else
    fixed_point_count_aux f (k+1) f_x</pre>
<pre>let fixed_point_count f (x : Complex) =
  fixed_point_count_aux f 1 x</pre>
<p>This set of functions simply iterates a function on a complex number, feeding the output back into the input, until either a fixed point is reached (to machine precisions) or maxcount iterations are completed. Additionally, a counter is kept of the total iterations. Naturally, the iteration is handled by a recursive function which starts by computing the given function on the current complex number. It then checks if the output of the function differs from the input or if the number of iterations (k) has exceeded maxcount. If so, it returns a &#8220;tuple&#8221; consisting of the final value and the iteration count. Otherwise, it calls itself with the updated complex number and the incremented iteration count. The second function is a wrapper for the first, which simply handles calling the auxiliary function with an initial iteration count of one.</p>
<p>Notice that we can define the fixed point iteration code completely generally and without knowledge of the fact that we&#8217;re going to be using it with Newton iterations. (In fact, if this weren&#8217;t such a simple implementation, it could be made into a library function, complete hiding all the details.) All we need to do now is supply the function &#8220;f&#8221; to be used, which we do below. Notice how much encapsulation is possible with functional programming without having to use a single object.</p>
<p> </p>
<pre>let newton_iter f df (x : Complex) =
  // compute derivative at x
  let (dfx : Complex) = df x
  // if the derivate is finite, compute step
  if (dfx.Magnitude = 0.) then x else x - (f x)/(df x)</pre>
<pre>let newton_fixed_point_fun p = newton_iter (polyval p) (polyval (polyderiv p))</pre>
<p>The first function above performs a general Newton iteration given a function &#8220;f&#8221; whose root we seek, given a function &#8220;df&#8221; which computes its derivate, and a starting guess &#8220;x&#8221; given as a complex number. For convenience, we also define a function which takes a polynomial and uses a curried version of newton_iter to return a function which takes a complex number and performs a Newton iteration for that polynomial. If we repeatedly apply this function to an approximate guess for a root, it will converge to the exact root. The newton_fixed_point_fun routine takes care of generating the derivative function needed, by using our polyderiv function.</p>
<p> </p>
<pre>// compute display color from fixed point count result
let result_to_color (x : Complex, k : int) =
  let mag = float (maxcount - k) / (float maxcount)
  let angle = x.Phase
  let compg = int (255.*mag*(Math.Sin(angle)/2. + 0.5))
  let compb = int (255.*mag*(Math.Sin(angle + 6.28/3.)/2. + 0.5))
  let compr = int (255.*mag*(Math.Sin(angle + 2.*6.28/3.)/2. + 0.5))
  Color.FromArgb(compr, compg, compb)</pre>
<p>Now we&#8217;ve got some utility functions to define. We need some way to display the results of each Newton solution at each point in the complex plane. The above function takes the output of fixed_point_count, which is a tuple consisting of the final point reached and the number of iterations required, and returns a Windows Color object. The details of this function aren&#8217;t very interesting, but the idea is that if a root is found from a given starting point, the pixel corresponding to that starting point will be colored based on which root it is, and with a brightness proportional to how quickly Newton&#8217;s method converged to it. If Newton&#8217;s method never converges, it will be black.</p>
<p> </p>
<pre>let linspace (low, high) n =
  let index_to_real k =
    low + (high - low)*(float k)/(float (n - 1))
  Array.map index_to_real [| 0 .. (n-1) |]</pre>
<p>Another utility function. The way the computation will proceed is that each pixel in the output window will represent a value in the complex plane. We thus need a way to go from the pixel index to the number it refers to. This is done by linspace, which takes a low and high value, and the number of pixels n, and creates an array of n floats spanning from low to high. This kind of thing would usually have to be done with for loops in an imperative language like C. However, in F# it is done with the Array.map higher-order function, which applies a given function to an array. In my opinion, this is a much more conceptually satisfying way to do it, and one with far less potential for programmer errors.</p>
<p>This example also illustrates a very powerful aspect of functional programming: subfunctions. The index_to_real function which is passed to Array.map is defined inside linspace, and thus it can use all the local variables (and arguments) in linspace. This makes for much clearer usage in the map function.</p>
<p> </p>
<pre>// main computational function to evaluate single line of fractal in parallel
let compute_line f realparts imagpart =
  let cvals = Array.map (fun realpart -&gt; Complex.Create(realpart,imagpart)) realparts
  Parallel.Array.map f cvals</pre>
<p>The function compute_line is the heart of the program. It runs the Newton fixed point iterations for one single raster line of the fractal, distributing the computation over all available cores. It takes three arguments: the function &#8220;f,&#8221; a list of floats which represent the real part of the starting values at each pixel, and the single float which is the imaginary part of the starting values. (Since we&#8217;re doing a single horizontal line, the imaginary part stays the same.) The function &#8220;f&#8221; will be a curried version of the fixed_point_count function that we will define later, and it will return the aforementioned tuple which summarizes the results of the Newton iterations.</p>
<p>The first line of the function creates a list of complex values, representing the starting points of the Newton iterations. Then we simply call &#8220;f&#8221; on each complex value. Pretty simple, huh? What&#8217;s really cool is that by using Parallel.Array.map, a function in the Flying Frog Numerics Library, the computation is automatically threaded, distributing the computation over all available cores or processors. How can this be so simple? Why don&#8217;t we need to worry about thread safety? The reason this is possible is that every single variable used in the computation of the fractal is immutable. There&#8217;s no way for one thread to have side effects on the others. Now, in the case of this example program, the thread safety would be pretty trivial even in C#. However, the point here is that no matter how complex the algorithm, if you use immutable data structures in F# you will always be assured of thread safety. By simply typing the nine characters &#8216;Parallel.&#8217; (and paying Flying Frog for the library, of course) you can turn a serial algorithm into a parallel one. This is a simple example, but there is a lot more coming along these lines. Microsoft, for all they get wrong, is really doing a good job staying on the ball with the seachange embodied by the move to many-core processors.</p>
<p> </p>
<pre>// Create a bitmap the size of the rectangle and fill it using
// the fixed_point_count function "f" which generates a tuple from a complex
let format = Imaging.PixelFormat.Format24bppRgb
let make_bitmap_of f r_range i_range (r : Rectangle) =
  let bitmap = new Bitmap(r.Width, r.Height, format)
  let realparts = linspace r_range r.Width
  let imagparts = linspace i_range r.Height
  // aux function to compute line and write to bitmap
  let do_line ki imagpart =
    // run computation over raster line
    let results = compute_line f realparts imagpart
    // turn results into colors
    let colors = Array.map result_to_color results
    // set bitmap pixels to colors
    Array.iteri (fun kr color -&gt; bitmap.SetPixel(kr,ki,color)) colors
  // iterate over the imaginary parts, computing each corresponding line
  Array.iteri do_line imagparts
  bitmap</pre>
<p>The function make_bitmap_of comprises the main GUI routine, and creates a bitmap given a function &#8220;f&#8221;, the real and imaginary ranges over which to run the computation (expressed as tuples) and a rectangle representing the desired size of the bitmap. Nothing really interesting happens here, though. After some helper variable initialization and the creation of the blank Bitmap object, an auxiliary function do_line is defined that is designed to be used with Array.iteri. The function do_line will be run over a list of the imaginary parts representing each line of the fractal bitmap. It thus takes an index value and a float representing the imaginary part. It then runs compute_line and puts the results into a variable. Then, result_to_color is applied to each of the result tuples to generate a list of Color objects, which are then used to set each pixel color in the bitmap object.</p>
<p> </p>
<pre>// Resize the form by replacing and rerendering the bitmap
let resize f r_range i_range (b : Bitmap ref) (w : #Form) _ =
  b := make_bitmap_of f r_range i_range w.ClientRectangle;
  w.Invalidate()</pre>
<pre>// Paint the form by drawing the bitmap
let paint (b : Bitmap ref) (v : #Form) (e : PaintEventArgs) =
  let r = e.ClipRectangle in
  e.Graphics.DrawImage(!b, r, r, GraphicsUnit.Pixel)</pre>
<pre>// Create a form that visualizes a bitmap that is rendered by the
// function "f"
let plot_newton f r_range i_range n =
  let form = new Form(Text="Newton Basins", Visible=true) in
  form.Size &lt;- new Size(n, n);
  let r = form.ClientRectangle
  let bitmap = ref (new Bitmap(r.Width, r.Height, format))
  form.Paint.Add(paint bitmap form);
  form.ResizeEnd.Add(resize f r_range i_range bitmap form);
  form.KeyDown.Add(fun e -&gt; if e.KeyCode = Keys.Escape then form.Close());
  form</pre>
<p>This is just a bunch of boring .NET GUI code, which I&#8217;ll just leave as is for the sake of brevity. All I want to point out here is how relatively little of it is needed. This is not just a credit to .NET, but also to F# for its facile creation of callbacks. This code handles creating the window and setting callback functions to handing updating the fractal upon the window being resized, and to allow the user to quit by typing the escape key. Not much of a GUI, for sure, but it gets the job done. I think the .NET &#8220;form&#8221; object is the only mutable data structure in the entire program. (This snippet was essentially stolen wholesale from Jon Harrop.)</p>
<p> </p>
<pre>// *** run example ***
// create interesting polynomial
let ps = [-1.0;0.01;-0.01;0.0;0.0;1.0]
// create core function to run Newton's method
let newton_test = fixed_point_count (newton_fixed_point_fun ps)
// range to be used for both real and imagary parts to define plane
let range = (-2.25,2.25)
// create Windows form
let form = plot_newton newton_test range range 256</pre>
<pre>#if COMPILED
do Application.Run(form)
#endif</pre>
<p>Finally, the core application code. This is the stuff that would be inside the main() function in a C program, except that F# lets you just start writing code in a random file and figures (quite rightly) that if you bothered to write some code, you probably want it to run after you compile it. This generates the following fractal (click to see at high resolution):</p>
<div id="attachment_405" class="wp-caption aligncenter" style="width: 303px"><a href="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/08/newton-basin-fractal.png" ><img class="size-medium wp-image-405" title="newton-basin-fractal" src="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/08/newton-basin-fractal.png" alt="Newton basin fractal generated for a polynomial with five roots arrayed in a circle around the origin." width="293" height="300" /></a><p class="wp-caption-text">Newton basin fractal generated for a polynomial with five roots arrayed in a circle around the origin.</p></div>
<p>I hope this walk-through was at least somewhat useful in explaining some of the idioms of functional programming, and in particular those of F#. If anything requires better explanation, please send an e-mail or write a comment below. (Note: if you want to run this without the use of the FlyingFrog Numerics library, just delete the open command pertaining to it, and delete the &#8220;Parallel.&#8221; namespace prefix in the compute_line function.)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=DGpMaK"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=DGpMaK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=XfhDLk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=XfhDLk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=0FRnIk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=0FRnIk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=eRIupk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=eRIupk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/377174521" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-newton-basin-fractal-code/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-newton-basin-fractal-code/</feedburner:origLink></item>
		<item>
		<title>Functional programming and F#: Introduction</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/375803347/</link>
		<comments>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 03:16:25 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[f-sharp]]></category>

		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189</guid>
		<description><![CDATA[Computer programmers sometimes mistake brevity for elegance, especially when discussing the relative merits of programming languages. Haskel partisans, for example, love to show how one can implement QuickSort in one line of inscrutable gibberish that looks like somebody had an epileptic seizure with the caps lock on. Haskell is a great language, but not because [...]]]></description>
			<content:encoded><![CDATA[<p>Computer programmers sometimes mistake brevity for elegance, especially when discussing the relative merits of programming languages. Haskel partisans, for example, love to show how one can implement <a href="http://www.haskell.org/haskellwiki/Introduction#Quicksort_in_Haskell" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.haskell.org');">QuickSort in one line of inscrutable gibberish</a> that looks like somebody had an epileptic seizure with the caps lock on. Haskell is a great language, but not because it saves you some typing. If being concise is really all that important, one might as well define a new programming language called ZipC, whose &#8220;compiler&#8221; is defined as &#8220;gunzip -c $1 | gcc&#8221;. You&#8217;ll get some really concise and &#8220;elegant&#8221; programs out of that, I&#8217;m sure! I&#8217;m usually pretty wary of academic languages like Lisp and ML, which often put computer science orthodoxy above usability. I&#8217;m just not interested in investing the time to learn a new language just so that I can save some typing and use cute tricks. The time saved is likely to be more than offset by the inefficiency of maintaining competence in multiple special purpose languages.</p>
<p>F#, however, is the first new language in a long time that I&#8217;ve felt is worth taking the time to learn. Developed by Microsoft research in England, F# is a functional language with roots in ML. Unlike many academic functional languages, however, F# is a pragmatic mix of imperative object oriented programming and functional constructs. Instead of forcing a paradigm on you, it simply makes several available. It can also leverage the full .NET framework, and is thus just as capable of implementing a GUI as it is an abstract recursive algorithm. It produces code that&#8217;s about as fast as C#, and it should only get faster with improvements in its CLR compiler and in .NET&#8217;s JIT compiler. A novel aspect of F# (in the context of .NET languages) is that it can be used as an interactive scripting language from within Visual Studio, allowing for interactive data visualization.</p>
<p>After working with it for a month or so, I find it to be a highly productive and expressive language, especially for numerical algorithms. It manages to be concise and high-level while maintaining coherence and readability. Well-written functions in F# are easier to follow and debug, relative to C++ or C#, and there are fewer opportunities for bugs to begin with. More than just cute syntax, it&#8217;s a language that actually encourages you to <em>think</em> differently. Programs implemented well in F# are a closer representation of the underlying concept and thinking, and are less obscured with with mundane details. Perhaps the best argument of all is empirical: the test program I wrote to compute fractal Newton basins worked the first time I compiled it, something that virtually never happens to me with C or C++.</p>
<p>In this post, I&#8217;ll provide a rough overview of functional programming and F#. There are <a href="http://research.microsoft.com/fsharp/starting.aspx" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/research.microsoft.com');">much better introductions</a> out there, but I nonetheless wanted to write this as a way to help myself learn about functional programming. I also figure F# is new enough that many of the people who read this blog might have not yet heard of it, and any small additional exposure this great language gets is worth it. This is not meant to provide a tutorial that will bring you up to speed on F#, but is intended to give you enough of an idea about it that you can decide whether or not you want to learn more.</p>
<p>In a <a href="http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-newton-basin-fractal-code/" >follow up article</a>, I&#8217;ll step through a short program in F# which uses some of the example functions I define below to implement a parallel computation of some pretty fractals generated by running Newton&#8217;s method for polynomial roots in the complex plane. In a third post, I&#8217;ll talk about some of the libraries available to speed up F# development. Because of the functional nature of F#, libraries written for F# can do some pretty impressive things. For example, the fractal generator detailed in the next post uses a third-party library function that handles all the details of multithreaded task parallelization through the surprisingly simple use of higher-order functions. In fact, parallelizing the program required typing exactly nine characters.</p>
<p><span id="more-189"></span></p>
<p>If you&#8217;d like to experiment with F#, you will first need some version of Visual Studio. I&#8217;m not sure if one of the free Express versions will work. (Someone please let me know if they have the answer to this.) The <a href="http://research.microsoft.com/fsharp/fsharp.aspx" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/research.microsoft.com');">F# compiler</a> is freely available from Microsoft Research, and integrates nicely with VS 2005. It is also reported to run under <a href="http://www.mono-project.com" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mono-project.com');">Mono</a> on Mac OS X and Linux, though I haven&#8217;t verified this myself.</p>
<h3>Functions as variables</h3>
<p>A functional language is characterized by several key ideas. The core notion is that functions are fundamental objects, on par with variables. They can thus be passed to, and returned by, other functions. This enables some very efficient and conceptually satisfying ways of expressing algorithms, as we&#8217;ll see shortly. A functional language does nothing C or C# can&#8217;t do (sometimes in the hype of a new language, it&#8217;s easy to forget the old Church-Turing thesis) it&#8217;s just that it can often do so much more simply and in a way that is often closer to the way we think.</p>
<p>One oddity in F#, and your first hint that you&#8217;re dealing with a different kind of language, is the way function calls are defined. In a sense, an F# function really only ever takes one argument. To get a function to take multiple arguments, you are essentially writing a function which takes a single argument and returns another function which takes the second argument (and so on). For example, a built-in function which adds two integers ( + ), is listed in F# as having type (int -&gt; int -&gt; int). The interpretation of this odd notation is that it&#8217;s a function which takes an integer and returns a function of type (int -&gt; int), which is itself a function which takes an integer and returns an integer. Perhaps a simpler way to think about this type is with the bracketed notation(int -&gt; (int -&gt; int)). When you write</p>
<p><code>z = ( + ) x y</code></p>
<p>what is happening, at least conceptually, is that the compiler greedily evaluates ( + ) x, which returns a function, and then it applies that function to y. (Don&#8217;t worry, F# also has infix syntax for binary operators so you can also just write the familiar z = x + y.)</p>
<p>One consequence of this is that you can do things like define a new function which increments an integer by 2 in terms of the ( + ) function with the following syntax</p>
<p><code>let incrtwo = ( + ) 2;;<br />
let shouldbethree = incrtwo 1;;</code></p>
<p>This technique of making functions with multiple inputs from a chain of higher-order functions which each take single arguments is known as <strong>function currying</strong>. Granted, it&#8217;s pretty pointless in this static example, but consider the following interactive F# fragment:</p>
<p><code>&gt; let makeincrementor s = ( + ) s;;<br />
val makeincrementor : int -&gt; (int -&gt; int)<br />
&gt; let incrbyfive = makeincrementor 5;;<br />
val incrbyfive : int -&gt; int<br />
&gt; incrbyfive 6;;<br />
val it : int = 11</code></p>
<p>The first line defines a function which takes an integer and returns a new function which increments its input by a run-time defined value s. The second applies this to define a new function which increments an integer by 5. So, function currying can be used to generate new functions dynamically. One exciting aspect of F# being a .NET language is that, in theory, this allows for a nice clean syntax for automatically generating specialized <em>compiled</em> functions on the fly during run time. (If anybody knows whether or not this already actually happens, please leave a comment with the answer.)</p>
<p>All functions in F# are inherently curried functions. Fortunately, there is syntax to write such functions without having to keep track of this fact. You can simply write</p>
<pre>let myplus x y = x + y</pre>
<p>and you automatically have a curried function of type (int -&gt; int -&gt; int). The fact that it will assume you want integer types all around is part of the <strong>automatic type inference</strong> of F#, which you will find to be both a blessing and a curse in practice.</p>
<p>The use of functions as arguments to other functions allows for tremendous abstraction, and certain &#8220;design patterns&#8221; which are no more than conceptual models in imperitive languages can actually be implemented as actual library routines in functional languages. One very powerful example of so called <strong>higher-order functions</strong> is the F# List.mapi function. It takes two arguments: a function and a list. The function is called repeatedly with two arguments: an integer representing the index into the list and the corresponding element of the list, creating a new list by looping over all elements of the initial list. A loop with an incremented local variable is one of the most common idioms in all of programming. How many times have you typed in the same for loop construct in C or C#? And how many times have you accidentally typed in the termination condition incorrectly, or missed a corner case?</p>
<p>As an example of how this is used in F#, below is a function which computes the derivative of a polynomial, passed in as a list of coefficients, ps, in ascending order:</p>
<p><code><span style="color: #0000ff;">let</span> polyderiv (ps:float list) =<br />
<span style="color: #0000ff;">match</span> ps <span style="color: #0000ff;">with</span><br />
| [] -&gt; []<br />
| lowcoef::pshigh -&gt;<br />
List.mapi (<span style="color: #0000ff;">fun</span> k pcoef -&gt; float (k+1) * pcoef) pshigh</code></p>
<h3>Pattern Matching</h3>
<p>This example also uses another common idiom in functional programming: <strong>pattern matching</strong>. Program branch and control can often be handled very elegantly by matching an expression against a list of potential patterns. In the example function above, there are two possible situations. If the list is empty, we return an empty list. Otherwise, the list matches against lowcoef::pshigh, which is syntax for &#8220;take the first element as the local variable lowcoef and the remaining elements (if any) as pshigh.&#8221; This illustrates another powerful aspect of pattern matching: one simulaneously branches control while assigning relevent local variables to be used in the corresponding branch. Not only is this pattern matching approach more powerful and conceptually intuitive than if/then or switch statements, it also has the added side benefit of doing the work of local variable creation. After all, if you are bothering to treat a given pattern as a special case, you probably need to use at least one of the elements that match that pattern.</p>
<p>The last line uses the List.mapi higher order function applies an <strong>anonymous function</strong> to each coefficient (except the first), which simply multiplies the coefficient by its cardinal order in the list. Anonymous functions are to the function type what numerals are to the integer type: Just as you can write 3 + 7 without having to make two variables to hold each value, likewise you can just write a function without having to assign it a label. This makes for very efficient use of higher-order functions like List.iter or List.mapi, where a simple function to be given to them as argument can be defined on the spot. A curried function is also commonly used as an anonymous function.</p>
<h3>Immutable Data</h3>
<p>Another key idea, and one that is very odd at first, is the notion of <strong>immutable data</strong> structures. In most cases, when you declare a &#8220;variable&#8221; in F# you are really just creating a label for a value, and nothing more. You can reassign a new value to that label, but it&#8217;s just pure syntax. This seems like a huge impediment, but in practice it&#8217;s surprisingly not so, especially in the typical idioms of functional programming. If this doesn&#8217;t make sense yet, don&#8217;t worry, it will when you see more example code. For now, just consider immutable data structures to be like variables which can never be written to by pointer. Immutable data allows the compiler to do some unique optimizations and makes for efficient use of memory; if you create a new list that is the concatenation of two other lists, for example, no new memory needs to be created as the new list is simply composed of references to the immutable lists composing it. It also can make concurrent programming much more straightforward: provided you can express your algorithm in terms of immutable data structures, there&#8217;s no need to worry about locks as each thread can&#8217;t possibly have side effects that would affect the others. Having code that is automatically thread-safe makes programming concurrent algorithms much more straightforward. As many-core processors loom on the horizon, F# seems a rather timely language.</p>
<h3>Recursions</h3>
<p>The last functional programming aspect I&#8217;ll talk about is <strong>recursion</strong>. Mathematical induction is a natural way of thinking about many algorithms, and thus recursion is therefore a natural way to implement them that is concise and easily verified as correct. The typical example is computing the Fibonacci sequence: if you know the last two Fibonacci numbers, you just add them to get the next one. A recursive algorithm to compute the nth number would call itself with a request for the (n-1)st and (n-2)nd number and then add them together, with control code in the function for handling the base cases of n = 0 and n = 1. As a concrete example, and in keeping with the polynomial theme, here is a rather ugly function which uses recursion to evaluate a polynomial at a given value:</p>
<p><code><span style="color: #0000ff;">let</span> rec polyval_aux (ps : float list) x xpow accum =<br />
<span style="color: #0000ff;">match</span> ps <span style="color: #0000ff;">with</span><br />
| [] -&gt; accum<br />
| coef::psrest -&gt; polyval_aux psrest x (x * xpow) (accum + (coef * xpow))</code></p>
<p>The rec keyword signifies to the compiler that this function calls itself, so it had better not try to evaluate the right hand side to greedily. This function certainly isn&#8217;t the most computationally efficient way to do this (though it is rather memory efficient) but it&#8217;s a simple example of a recursive function, one that implements two more common idioms: tail recursion and <strong>continuations</strong>. Tail recursion is the idea that if the complete final value of the function is simply the function called again, the stack only has to keep track of one function call at a time. It&#8217;s probably not a big deal here, but in cases where the function is recursively called a great number of times, it can matter.</p>
<p>You can also see one of the consequences of immutability: we have to keep passing the state of the computation. The arguments of the function are: a list <code>ps</code> of the polynomial coefficients, the value &#8220;x&#8221; at which to evaluate them, followed by two utility arguments which keep track of the state of the computation in the form of the current, a simple form of continuation. The values of &#8220;x&#8221; raised to increasing powers are passed on in &#8220;xpow,&#8221; and the running sum of the polynomial is kept in accum. Pattern matching is used as before, except now we use the head of the list, computing its contribution to the polynomial before passing along the remaining terms to the function again. When nothing is left, the accumulated sum is simply returned. The extra arguments are ugly, of course, so we use this as an auxilary function, to be called from the following wrapper function:</p>
<p><code><span style="color: #0000ff;">let</span> polyval ps x =<br />
polyval_aux ps x (Complex.Create (1.,0.)) (Complex.Create (0.,0.))</code></p>
<p>I think the above implementation of polynomial handling routines has two advantages over a similar set of functions in C. First, it&#8217;s really hard to screw up with stupid mistakes, like misallocation of arrays or bad referencing. Second, the intent of the code is more apparent, as the details of loops and counters have been hidden in the library functions. (Though I understand the intent may not be entirely transparent if you&#8217;re not used to the F# yet.)</p>
<p>If you&#8217;d like to learn more about F#, a couple good places to start are the <a href="http://www.ffconsultancy.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ffconsultancy.com');">Flying Frog consultancy</a> and <a href="http://www.microsoft.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.microsoft.com');">Microsoft Research</a>. In the <a href="http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-newton-basin-fractal-code/" >next post</a>, I&#8217;ll present a stand alone Windows program that computes Newton basin fractals in 50 lines. Following that, I&#8217;ll finish by writing about some of the nascent resources that are starting to crop up for F#, in particular the excellent graphics and numerical libraries under development at Flying Frog.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=wKd3OK"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=wKd3OK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=0Eg1lk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=0Eg1lk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=1qRJsk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=1qRJsk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=wryJTk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=wryJTk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/375803347" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/</feedburner:origLink></item>
		<item>
		<title>Edwards did have an affair? I can’t believe it!</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/360045818/</link>
		<comments>http://scripts.mit.edu/~birge/blog/edwards-did-have-an-affair-i-cant-believe-it/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 04:28:26 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=338</guid>
		<description><![CDATA[Ever since I found out Al &#8220;We&#8217;re all going to die&#8221; Gore&#8217;s mansion requires its own small spotted owl-fired power plant to heat the pool, I&#8217;ve started to suspect politicians may be duplicitous as a group. So I&#8217;m not surprised to find out yet another politician turns out to be a falsely sincere hypocrite. No, [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since I found out Al &#8220;We&#8217;re all going to die&#8221; Gore&#8217;s mansion requires its own small spotted owl-fired power plant to heat the pool, I&#8217;ve started to suspect politicians may be duplicitous as a group. So I&#8217;m not surprised to find out yet another politician turns out to be a falsely sincere hypocrite. No, the real news here is that the National Enquirer was right about something! They scooped all the major media outlets for this story. Now how did <em>that</em> happen?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=nuveQK"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=nuveQK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=oVAdKk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=oVAdKk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=wwmM3k"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=wwmM3k" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=OnVGuk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=OnVGuk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/360045818" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/edwards-did-have-an-affair-i-cant-believe-it/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/edwards-did-have-an-affair-i-cant-believe-it/</feedburner:origLink></item>
		<item>
		<title>Weird city</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/357826654/</link>
		<comments>http://scripts.mit.edu/~birge/blog/weird-city/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 22:43:14 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Random]]></category>

		<category><![CDATA[weird]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=311</guid>
		<description><![CDATA[This is one of the more amazing things I&#8217;ve ever seen a human do. I&#8217;m so glad that hyper-creative people like this guy exist on the planet. I&#8217;m equally glad I&#8217;m not inside this dude&#8217;s head&#8230;
walking from blu on Vimeo.
]]></description>
			<content:encoded><![CDATA[<p>This is one of the more amazing things I&#8217;ve ever seen a human do. I&#8217;m so glad that hyper-creative people like this guy exist on the planet. I&#8217;m equally glad I&#8217;m not inside this dude&#8217;s head&#8230;</p>
<p><object width="400" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=426929&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://www.vimeo.com/moogaloop.swf?clip_id=426929&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"></embed></object><br /><a href="http://www.vimeo.com/426929?pg=embed&amp;sec=426929" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.vimeo.com');">walking</a> from <a href="http://www.vimeo.com/blu?pg=embed&amp;sec=426929" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.vimeo.com');">blu</a> on <a href="http://vimeo.com?pg=embed&amp;sec=426929" onclick="javascript:pageTracker._trackPageview('/outbound/article/vimeo.com?pg=embed&amp;sec=426929');">Vimeo</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=yrrXGK"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=yrrXGK" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=EcuUnk"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=EcuUnk" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=eZQGek"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=eZQGek" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=nPjmck"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=nPjmck" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/357826654" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/weird-city/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/weird-city/</feedburner:origLink></item>
		<item>
		<title>How to quit your job with an iPhone 3G</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/350518526/</link>
		<comments>http://scripts.mit.edu/~birge/blog/how-to-lose-your-job-with-an-iphone-3g/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 14:00:28 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=279</guid>
		<description><![CDATA[In ten easy steps:

Purchase an &#8217;R&#8217; rated movie from the iTunes music store.
Pause movie during particularly noisy sex scene, preferably one involving farm animals.
Turn off phone.
Go to important meeting with your entire staff, including boss.
Turn off ringer using mute switch and put phone to sleep.
Think you&#8217;re safe.
Innocently pull out headphones from jack, momentarily shorting out badly [...]]]></description>
			<content:encoded><![CDATA[<p>In ten easy steps:</p>
<ol>
<li>Purchase an &#8217;R&#8217; rated movie from the iTunes music store.</li>
<li>Pause movie during particularly noisy sex scene, preferably one involving farm animals.</li>
<li>Turn off phone.</li>
<li>Go to important meeting with your entire staff, including boss.</li>
<li>Turn off ringer using mute switch and put phone to sleep.</li>
<li>Think you&#8217;re safe.</li>
<li>Innocently pull out headphones from jack, momentarily shorting out badly designed mechanism in jack used to sense the remote play switch.</li>
<li>Remain blissfully unaware that you&#8217;ve just set a chain reaction in motion which will destroy your career.</li>
<li>Sit in stunned horror a few seconds later as sounds of impure love eminate loudly from your shirtpocket in the middle of your boss&#8217; presentation, despite the silent switch being on.</li>
<li>Run back to office in tears to polish up resume.</li>
<li>(Optional.) Write Steve Jobs an angry letter about how good design includes more than just polished metal.</li>
</ol>
<p>(No, this didn&#8217;t happen to me. At least not exactly. It wasn&#8217;t a meeting, it was a seminar. And my boss wasn&#8217;t there, thankfully. And instead of farm animals, it was far worse: it was emo music.)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=km6n7J"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=km6n7J" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=FL0Yaj"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=FL0Yaj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=KfOFOj"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=KfOFOj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=Z4jA6k"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=Z4jA6k" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/350518526" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/how-to-lose-your-job-with-an-iphone-3g/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/how-to-lose-your-job-with-an-iphone-3g/</feedburner:origLink></item>
		<item>
		<title>iPhone 3G initial impressions</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/348086042/</link>
		<comments>http://scripts.mit.edu/~birge/blog/iphone-3g-initial-impressions/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 05:48:55 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Reviews]]></category>

		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=249</guid>
		<description><![CDATA[
Last Friday (through means which I&#8217;m too embarrassed to publicly discuss) I got an iPhone 3G. Here are my initial impressions after using it for a couple of days.
Screen. Visually, it&#8217;s near perfect. Bright and with sufficient field of view. The only problem I have with it is that sometimes my finger just won&#8217;t slide over [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_255" class="wp-caption aligncenter" style="width: 245px"><a href="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/07/iphone-maps.jpg" ><img class="size-medium wp-image-255 " style="margin-top: 2px; margin-bottom: 2px;" title="iPhone maps" src="http://scripts.mit.edu/~birge/blog/wp-content/uploads/2008/07/iphone-maps.jpg" alt="iPhone maps" width="235" height="300" /></a><p class="wp-caption-text">iPhone maps</p></div>
<p>Last Friday (through means which I&#8217;m too embarrassed to publicly discuss) I got an iPhone 3G. Here are my initial impressions after using it for a couple of days.</p>
<p><strong>Screen</strong>. Visually, it&#8217;s near perfect. Bright and with sufficient field of view. The only problem I have with it is that sometimes my finger just won&#8217;t slide over its surface. I don&#8217;t know if I&#8217;m just some sort of physical mutant, or if I&#8217;ve got weird finger chemistry, but sometimes it&#8217;s just unusable as a touch screen as my finger sticks to it, especially if the screen has just been cleaned. It seems that the screen was designed to work best when covered by a thin layer of grime from you fingers. I just don&#8217;t get why everybody loves this so much, but I guess I&#8217;m just weird. This problem was solved by getting a matte protective anti-glare film for the screen. The display isn&#8217;t as sharp, but its finally a pleasure to use the touch screen. I recommend you play with the iPhone in the store for a while and actually use it (try scrolling and dragging) to make sure you like dragging your finger across polished glass a million times a day.</p>
<p><strong>3G network</strong>. This is a bit of a disappointment. As many many other people have found, the 3G reception is poor, and a huge battery killer. With 3G turned on I can&#8217;t get through a full day without having to recharge. Where I live in Cambridge the signal is so bad that calls will degrade and occasionally drop. It fluctuates between zero and three bars. Cambridge ain&#8217;t exactly the middle of nowhere, however, and I expect AT&amp;T&#8217;s network is better than the iPhone&#8217;s performance would indicate. From <a href="http://www.pcmag.com/article2/0,1895,2325523,00.asp" target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.pcmag.com');">what I&#8217;ve heard</a>, this is a problem with the iPhone; an AT&amp;T 3G phone from another manufacterer will often have five bars sitting right next to an iPhone with one.</p>
<p>I will say this, though: when it works, it&#8217;s quite fast, and I usually see speeds of around 1 Mb/s. Fortunately, you can disable 3G from the phone settings, but unfortunately there&#8217;s no way I can disable the $10 a month extra I&#8217;m paying for it. From all my previous experiences with Apple, I knew I was asking for trouble by buying the first batch of anything. Apple brutally punishes early adopters like no other company.</p>
<p>If there&#8217;s an excuse for this poor performance, it&#8217;s the near engineering miracle Apple had to pull off to get everything to work. In one tiny package, the iPhone contains GPS, multi-band 2.5G, multi-band 3G, WiFi, and Bluetooth radios. That&#8217;s a lot of RF going on in one place, and they all have to share antennas. I&#8217;m kind of amazed it works at all, frankly.</p>
<p><strong>Data integration.</strong> For now, the iPhone only integrates natively with iCal (on a Mac), Outlook and Exchange. Fortunately, if you use Google calendar, there is a wonderful solution available from <a href="http://www.nuevasync.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.nuevasync.com');">www.nuevasync.com</a>. The folks at NuevaSync have essentially built an Exchange server that can pull your contacts and calendar from various online services (Google and Plaxo, for now) and make it available from the industry standard Exchange protocol. A brilliant idea, and a very timely one given the release of the iPhone 2.0 software which allows for Exchange integration and push. When I (or my wife) edit a calendar item online, it instantly appears on the iPhone.</p>
<p><strong>App Store</strong>. As everybody predicted, there is a plethora of putative social networking revolutions, with trendy names like beepo and blue lemmingster, etc. But there are some surprisingly good apps available, and it seems the best ones are free. Some highlights: Bloomberg has an app gives you access to beautiful stock charts and a live news feed. AOL Radio provides dozens of live streaming radio channels across several genres, and it works over the cell network.</p>
<p>As Apple opens up the API more and more, I think the biggest impact of the iPhone will be as a new development platform for connected mobile applications. The most powerful applications of the phone are those which use the wireless broadband to connect to remote information and computing resources. It&#8217;s very satisfying, for example, to be out walking around outside and yet have access to the terabytes of satellite photos in Google Maps. On a more frivolous level, there is Shazamm, a program that will tell you the name and artist of virtually any song based on a 15 second sample played into the phone. One of the most interesting examples of the mobile-to-cloud computing paradigm is Jott, an app which will transcribe dictated notes. It records and compresses your voice at the iPhone, and then sends it to India where it is transcribed by a person and then sent back to your phone as text.</p>
<p>I&#8217;m looking forward to seeing what other kinds of applications are enabled by having a computer in your pocket with an always-on broadband internet connection. The iPhone isn&#8217;t so much a phone in this context as it is a rich mobile interface to remote supercomputers (and underpaid Indians).</p>
<p><strong>What&#8217;s missing.</strong> Cut and paste, for one. Video conferencing. Live mobile TV, such as AT&amp;T makes available on some of their other cell phones. Flash support in the browser. The ability to read PDFs anywhere but within an e-mail attachment or from a webpage. Push Gmail.</p>
<p><strong>What&#8217;s just plain bad.</strong> The third from worst design flaw I&#8217;ve seen is that turning off the sound doesn&#8217;t actually turn off all sounds. Music can still play through the speaker in certain cases, and not all apps respect the mute setting. The second worst is that when you unplug the headphones, the phone sometimes turns on whatever music you were last playing in the iPod software (it fools the phone into thinking you momentarily hit the play button on the headphone remote). The absolute number one design flaw is that the second and third worst flaws can combine, so that you can end up blaring music in the middle of a lecture just by pulling out your headphones. I presume Apple will fix this in an update.</p>
<p>The 2.0 software feels like an early beta. The interface is often unresponsive, taking a few seconds to do something as simple as open a field for editing (the contacts program, of all things, is the worst offender). The browser crashes fairly regularly, and I&#8217;ve even hung the phone one or twice trying to watch a video podcast. It&#8217;s the first phone I&#8217;ve ever owned that crashes more than my laptop&#8230;</p>
<p>The battery life is rather poor. I haven&#8217;t gotten the phone to make it through the day yet, though a lot of that maybe that I leave the WiFi on. Regardless, I have no idea how Apple can claim five hours of 3G usage. Maybe that&#8217;s if you&#8217;re standing on the top of a cell tower.</p>
<p><strong>Summary.</strong> Were it not for some of the aforementioned issues, it would be a truly remarkable piece of technology, especially in terms of the wonderful interface. It&#8217;s more enjoyable to use than a computer for most small tasks like checking e-mail. While I really love the iPhone in many ways, I have to admit that it&#8217;s clearly not worth the money when you factor in the plan. Of course, I&#8217;m kind of loath to return it at this point. It&#8217;s a kind of irrational psychology that is probably responsible for most of Apple&#8217;s revenue, I suspect: In the end, it&#8217;s just <em>cool</em>, and it would be hard to go back to klunky, even if klunky gets the jobs done for half the price. Look-and-feel counts for more than anybody (certainly I) would like to admit. Steve Jobs is a genius for being so cynical as to truly plumb the limits of this. So, I&#8217;m gonna stick with my heavy, big, overpriced, crashy, no-battery-life, embarass-me-in-meetings iPhone. Because it&#8217;s just so goddam fun to scroll around with a flick of your finger!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/JonathanBirge?a=fFpA0J"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=fFpA0J" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=nMUWaj"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=nMUWaj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=O3Yfpj"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=O3Yfpj" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/JonathanBirge?a=i9y44k"><img src="http://feeds.feedburner.com/~f/JonathanBirge?i=i9y44k" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/JonathanBirge/~4/348086042" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://scripts.mit.edu/~birge/blog/iphone-3g-initial-impressions/feed/</wfw:commentRss>
		<feedburner:origLink>http://scripts.mit.edu/~birge/blog/iphone-3g-initial-impressions/</feedburner:origLink></item>
		<item>
		<title>Fifteen things I know about God</title>
		<link>http://feeds.feedburner.com/~r/JonathanBirge/~3/343243221/</link>
		<comments>http://scripts.mit.edu/~birge/blog/fifteen-things-i-know-about-god/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 14:00:36 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
		
		<category><![CDATA[Philosophy]]></category>

		<category><![CDATA[god]]></category>

		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=158</guid>
		<description><![CDATA[Despite a long history of really tortured attempts at a so-called ontological argument for God, which usually involve some sort of lame circular logic along the lines of &#8220;something perfect wouldn&#8217;t fail to exist, so God must exist,&#8221; logic cannot be used to prove God exists, let alone understand its full nature. I like Hume&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Despite a long history of <a href="http://www.authorhouse.com/BookStore/ItemDetail.aspx?bookid=2105" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.authorhouse.com');">really tortured attempts</a> at a so-called ontological argument for God, which usually involve some sort of lame circular logic along the lines of &#8220;something perfect wouldn&#8217;t fail to exist, so God must exist,&#8221; logic cannot be used to prove God exists, let alone understand its full nature. I like <a href="http://www.philosophyofreligion.info/?page_id=17" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.philosophyofreligion.info');">Hume&#8217;s argument</a> that there&#8217;s no such thing as an a p