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

<channel>
	<title>Win-Vector Blog &#187; Rants</title>
	<atom:link href="http://www.win-vector.com/blog/category/rants/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.win-vector.com/blog</link>
	<description>The Applied Theorist&#039;s Point of View</description>
	<lastBuildDate>Thu, 29 Jul 2010 17:09:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>R annoyances</title>
		<link>http://www.win-vector.com/blog/2010/03/r-annoyances/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=r-annoyances</link>
		<comments>http://www.win-vector.com/blog/2010/03/r-annoyances/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 18:49:42 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Principle of Least Astonishment]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[R is not your friend]]></category>
		<category><![CDATA[R programming annoyances]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=1407</guid>
		<description><![CDATA[Readers returning to our blog will know that Win-Vector LLC is fairly &#8220;pro-R.&#8221; You can take that to mean &#8220;in favor or R&#8221; or &#8220;professionally using R&#8221; (both statements are true). Some days we really don&#8217;t feel that way. Consider the following snippet of R code where we create a list with a single element [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/11/r-examine-objects-tutorial/' rel='bookmark' title='Permanent Link: R examine objects tutorial'>R examine objects tutorial</a></li>
<li><a href='http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/' rel='bookmark' title='Permanent Link: Relative returns: a banker versus trader paradox'>Relative returns: a banker versus trader paradox</a></li>
<li><a href='http://www.win-vector.com/blog/2008/04/sorting-in-anger/' rel='bookmark' title='Permanent Link: Sorting Used in Anger'>Sorting Used in Anger</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Readers returning to our blog will know that Win-Vector LLC is fairly &#8220;pro-<a href="http://www.win-vector.com/blog/tag/r/" target="x">R</a>.&#8221;  You can take that to mean &#8220;in favor or R&#8221; or &#8220;professionally using R&#8221; (both statements are true).  Some days we really don&#8217;t feel that way.  <span id="more-1407"></span><br />
Consider the following snippet of R code where we create a list with a single element named &#8220;x&#8221; that refers to a numeric vector.  We start with a demonstration of the hard-coded method of pulling the x-value back out using the &#8220;$&#8221; operator.</p>
<pre>
&gt; l &lt;- list(x=c(1,2,3))
&gt; l$x
[1] 1 2 3
</pre>
<p>But suppose we wanted to automate this; that is pass in the name of the value we want in a variable.  We are after all using a computer, so automating a step seems like a reasonable desire.  R supplies a notation for this using the &#8220;[]&#8221; operator.  But something slightly different comes out under the &#8220;[]&#8221; operator than under the &#8220;$&#8221; operator:</p>
<pre>
&gt; varName <- 'x'
&gt; l[varName]
$x
[1] 1 2 3
</pre>
<p>Notice that the printed outputs are slightly different (one echoes "$x" and one does not).  Let's use the "class()" method to see what is actually being returned in each case.</p>
<pre>
&gt; class(l$x)
[1] "numeric"
&gt; class(l['x'])
[1] "list"
</pre>
<p>Completely different return types are returned (in one case a numeric vector in the other a general list, not interchangeable types). </p>
<p>At this point you may think it is time to turn in our "pro" label and call ourselves "newb" (Internet slang for "newbie" or "idiot").  But let's slow down for a bit.   When two views of the same situation disagree (such as the difference in opinion between the authors of R and myself whether the "[]" and "$" operators should return the same type) you at most know that at least one of those views is wrong.  You don't really know if one view is right or even if one view is right which one it is.  I can, however, bring in some additional argument to try and show the design of R is in fact wrong.  The additional argument is <a href="http://en.wikipedia.org/wiki/Principle_of_least_astonishment" target="o">"The Principle of Least Astonishment."</a>  This principle roughly says that it is a mistake to introduce unnecessary differences in outcomes (which to the unprepared user are unpleasant surprises).  There may be some deep (yet obscure) reasons the two operators prefer to return different results.  But the fact you would have to find a way to document and explain these differences really should make one think that this situation is really a mis-design and the "explanation" is really an attempt at a work around.  Or to put it more rudely: there may be an explanation, but there is no excuse.</p>
<p>For another example consider creating a 3 by 3 matrix:</p>
<pre>
&gt; m &lt;- matrix(c(1,2,3,1,1,1,0,0,1),nrow=3,ncol=3)
&gt; m
     [,1] [,2] [,3]
[1,]    1    1    0
[2,]    2    1    0
[3,]    3    1    1
</pre>
<p>Now select the last two rows of the matrix.</p>
<pre>
&gt; m[c(FALSE,TRUE,TRUE),]
     [,1] [,2] [,3]
[1,]    2    1    0
[2,]    3    1    1
&gt;
</pre>
<p>Now (for the punchline) try to select just the middle row of the matrix.<br />
 </p>
<pre>
&gt; m[c(FALSE,TRUE,FALSE),]
[1] 2 1 0
</pre>
<p>Notice that once again (and without warning) the result is subtly different.  I admit that it seems paranoid to worry about such small differences- but when you are debugging a system that should work these are exactly the killing mistakes you are looking for.  In this case the problem is pretty bad.  See what happens if you tried to ask for the dimension of each of these differing returns:</p>
<pre>
&gt; dim(m[c(FALSE,TRUE,TRUE),])
[1] 2 3
&gt; dim(m[c(FALSE,TRUE,FALSE),])
NULL
</pre>
<p>The first case works fine (reports 2 rows and 3 columns).  The second case returns "NULL" (instead of 1 row and 3 columns).   In R NULL is sometimes used as an error-value (instead of throwing an exception) and this value will poison any further conditions or calculations it is involved in.  The main way to deal with the arbitrary introduction of such NULLs is the incredibly tedious uncertain defensive coding practices that we argue against in <a href="http://www.win-vector.com/blog/2010/02/postels-law-not-sure-who-to-be-angry-with/">Postel’s Law: Not Sure Who To Be Angry With</a>.  Such code weakens both programs and programmers.</p>
<p>But what is going on in this example?  Once again we use the "class()" method to inspect the subtly different results.</p>
<pre>
&gt; class(m[c(FALSE,TRUE,TRUE),])
[1] "matrix"
&gt; class(m[c(FALSE,TRUE,FALSE),])
[1] "numeric"
</pre>
<p>The result is disappointing.  For a two-row select R returns a matrix (what we would expect).  For a single-row select R does us the "favor" of converting the result into a vector.  This is a disaster.  A single row matrix is similar to a vector, but even R itself does not support the same set of operations and outcomes on vectors as it does on matrices (for example the failure of the "dim()" method).  It is not safe to further calculate with these results (without by-hand converting the result back to a single row matrix which R can in fact represent).  In my case this created crashing bugs deep in a long running analysis (and was hard to diagnose as the bug was in an "innocent operation" not in a "risky calculation").</p>
<p>All of this has to violate John Chambers' "Prime Directive" for data: "an obligation on all creators of software to program in such a way that the computations can be understood and trusted."  Chambers' opinion being relevant as he is the author of the S language (of which R is an open source re-implementation).  We continue to recommend R, but we also recommend being exceptionally careful when using it (which unfortunately adds time to projects).</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/11/r-examine-objects-tutorial/' rel='bookmark' title='Permanent Link: R examine objects tutorial'>R examine objects tutorial</a></li>
<li><a href='http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/' rel='bookmark' title='Permanent Link: Relative returns: a banker versus trader paradox'>Relative returns: a banker versus trader paradox</a></li>
<li><a href='http://www.win-vector.com/blog/2008/04/sorting-in-anger/' rel='bookmark' title='Permanent Link: Sorting Used in Anger'>Sorting Used in Anger</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2010/03/r-annoyances/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Postel&#8217;s Law: Not Sure Who To Be Angry With</title>
		<link>http://www.win-vector.com/blog/2010/02/postels-law-not-sure-who-to-be-angry-with/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=postels-law-not-sure-who-to-be-angry-with</link>
		<comments>http://www.win-vector.com/blog/2010/02/postels-law-not-sure-who-to-be-angry-with/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 00:38:55 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Postel's Law]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[Worse is Better]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=1394</guid>
		<description><![CDATA[One of my research interests is finding the principles that underly the management of information, complexity and uncertainty. When something as simple as a web-form is called &#8220;technology&#8221; it is time to step back and examine your principles. One principle I am not sure about Postel&#8217;s law. It doesn&#8217;t hold often enough to be relied [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/01/map-reduce-a-good-idea/' rel='bookmark' title='Permanent Link: Map Reduce: A Good Idea'>Map Reduce: A Good Idea</a></li>
<li><a href='http://www.win-vector.com/blog/2010/03/r-annoyances/' rel='bookmark' title='Permanent Link: R annoyances'>R annoyances</a></li>
<li><a href='http://www.win-vector.com/blog/2008/10/something-i-dont-get-about-business-and-bailouts/' rel='bookmark' title='Permanent Link: Something I don&#8217;t get about business and bailouts'>Something I don&#8217;t get about business and bailouts</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One of my research interests is finding the principles that underly the management of information, complexity and uncertainty.  When something as simple as a web-form is called &#8220;technology&#8221; it is time to step back and examine your principles.  One principle I am not sure about Postel&#8217;s law.  It doesn&#8217;t hold often enough to be relied on and when it fails I am not sure who to be angry with.<span id="more-1394"></span></p>
<p>Postel&#8217;s Law (also called The Robustness Principle) comes from RFC 761 &#8220;Transmission Control Protocol&#8221; in 1980 and is: &#8220;Be conservative in what you do; be liberal in what you accept from others.&#8221; (Side note: RFC is the now ironic acronym used to describe Internet standards- the letters stood for &#8220;request for comments&#8221;).</p>
<p>This idea probably worked best where it started- in the TCP/IP world which is where a lot of hairy details of how computers network are handled.  When your goal is the basic establishment of transient communications- success is measured by getting information through and not unnecessarily triggering a failure.  It may be okay to tolerate mistakes here- because they don&#8217;t live long anyway.</p>
<p>Unfortunately, the law works less well other places where it is applied.  The law is a downright hazard in dealing with archiving meaningful data (instead of managing transient signaling protocols). Sometimes the cost of obeying the law far outweighs the potential benefit.</p>
<p>A common arena for Postel&#8217;s law is now HTML, the markup language used to represent the content we view in web-browsers.  In this arena Postel&#8217;s law has had two consequences: one good, one bad.</p>
<p>The good: almost anyone can create a working web-page or even a web-site because modern browsers have been designed to paper around almost every common HTML mistake.  It has been pointed out that this ease of creation and &#8220;worse is better&#8221; (a deep principal due to Richard P. Gabriel see <a target='ext' href="http://en.wikipedia.org/wiki/Worse_is_better">wikipedia: worse is better</a>) has been one of the reasons that HTML out-competed and killed many other ideas.  Philip Greenspun&#8217;s famous <a target='ext' href="http://philip.greenspun.com/panda/html">story</a> of a 10-year-old building web site to get his mother medical attention happened in the sloppy world of HTML and could not have happened in the straight jacket of RDF (Resource Description Framework: the darling of the semantic web).  I would not wish having to actually read or adhere to the incredibly long and irrelevant standards from w3.org (where the ratio of value to pedantry goes to zero) on an enemy.  The web is only interesting due to its content and much of its content was only possible due to low barrier of entry.</p>
<p>The bad: to read HTML you almost have to re-create the entire history of web-browsers.  This is a history of many hostile competitors (Microsoft, Netscape, Opera, WebKit, Mozzila, Google) and billions of dollars.  Reproducing a significant fraction of this history is a significant (and useless) expense.  For the most part I use a permissive parsing library like TagSoup or HTMLTidy but even these miss some things that browsers accept and are far more complicated than the task truly justifies.</p>
<p>Even worse is the cases of XML and RDF.  These are often used for archival storage of semantic data.  That is you may need to read and understand (not just display) data in XML for a long time.  To be liberal in what you accept you have to again master a long set of useless complications (DTDs, namespaces incredibly inept character encoding and escapes) and still get burned by improperly encoded XML (that &#8220;used to work&#8221; because the bugs in the emitted XML matched the bugs in a library that is now out of date).</p>
<p>It is clear in the case of HTML and XML that Postel&#8217;s law&#8217;s cost is too high for what it delivers.  Or at least half of the law is too expensive: no amount of being generous in what we accept makes up for the original data not have been impounded correctly (not being &#8220;conservative in what they do&#8221; and not having checked that at the time it was created).  Some of this is that the producers of the data have no way of telling they are not being &#8220;conservative in what they do&#8221; because the &#8220;generous in what they accept&#8221; libraries they use to debug don&#8217;t tell them they are emitting bad data.  And lets be honest- most systems are not designed for correctness, they are instead debugged until they seem to work.  I would say that in fact HTML is not an example of the power of Postel&#8217;s law but of the pernicious influence of &#8220;worse is better.&#8221; Computer science has not risen to the level of &#8220;software engineering&#8221; we still are a horrible &#8220;fit to finish&#8221; industry.</p>
<p>Frankly for many things we need a simpler &#8220;fail early&#8221; discipline.  Tools need to be better and standards need to be simpler so that if you write something that is wrong it is easy to see why it is wrong and easy to fix it.  Postel&#8217;s law has helped hide the negative impacts of complicated standards, we need to push the cost of complications back on to standards committees.  The need to be &#8220;generous in what you accept&#8221; overly favors large, rich entrenched players who have had the time and resources in incrementally invest in papering around every common mistake.</p>
<p>However, I am not sure if we can throw out half of Postel&#8217;s law or even if we want to.  When Postel&#8217;s law fails it is not clear who to be mad at.</p>
<p>Sun, to kick somebody who is already down, was famous for making elaborate frameworks that correctly and brutally implement many details of RFCs.  Sun&#8217;s Java includes huge frameworks for XML, UTF8 and email that scrupulously implement page after page of useless standard documentation but fail in the wild due to not being &#8220;generous in what they accept.&#8221;  For example Sun&#8217;s GlassFish (which got listed named as one of four or five important assets during Sun&#8217;s various acquisition talks much like the fact the car has cup-holder somehow always gets mentioned in spec sheets) is an &#8220;open source production-quality enterprise software application server.&#8221;  A supposedly major component of the GlassFish is its email component which is a huge unwieldy framework that implements many of the email related RFCs and protocols including IMAP.  Unfortunately for all its hugeness it can not reliably read email folder names from one of the biggest IMAP servers: Google Mail.  Google Mail includes &#8220;against standard&#8221; characters in the protocol and crashes the GlassFish software.</p>
<p>And here is where Postel&#8217;s law fails us: under Postel&#8217;s law both sides are at fault (Sun for failing to be generous in what they accepted, Google for failing to be conservative in what they did).  We can&#8217;t assign only one villain.  We have no proscription of who to ask for a fix.   Postel&#8217;s law seems useful in that if either Google or Sun had followed it the two systems would work.  But the law doesn&#8217;t pick one side to assign blame and help us to efficiently diagnose and fix the problem.  It becomes difficult to find the critical bugs when they are masked by a see of &#8220;acceptable&#8221; bugs.  Take a contrary example: the simpler law &#8220;implement the standard or fix the standard&#8221; would clearly assign blame to GMail.</p>
<p>Similar pain is encountered in Java&#8217;s handling of character encodings like UTF8.  It is hard to move up the stack of artificial intelligence (from words, to concepts, to ideas, to reasoning to consciousness) when you can&#8217;t even reliably transcribe characters.  When faced with bad character sequences (a common occurrence on the web) there is no practical way to get Java &#8220;mostly parse it,&#8221; Java libraries and frameworks authors seem to extract a perverse joy in throwing a program-killing exception (it does not matter if you catch it the library has already stopped doing what you wanted) because they are concerned that a diacritical mark was not properly encoded (web browsers, on the other hand, lose the mark or show some sort of damage near the mistake and blunder on).  And here is were the frustration sets in, how can you make applications that are generous in what they accept when the libraries and frameworks are overly proud and picky?  This, at first, seems like an argument for Postel&#8217;s law- if everybody else (especially the library authors) were generous in what they accepted your life could be easy.  That is certainly one possibility- but I argue it often becomes a matter of semantics to assign blame where there is no pre-existing specification or performance agreement.  In the end you will waste more time dealing with errors that should never have made it to you than the time you save emitting the odd error of your own.</p>
<p>The unit testing people have a somewhat better idea: fail early, fail at the factory where it is cheap to fix.  Don&#8217;t   litter all of your code with indecisive statements like:</p>
<pre>
  Set<String> matches = computeMatches();
  if( matches!=null ) {
     for(String match: matches) {
         ...
     }
  }
</pre>
<p>Instead: write a unit test to document you expectation that the empty set is expressed in single consistent way:</p>
<pre>
   Set<String> matches = computeMatches();
   assertNotNull(matches);
</pre>
<p>And from then on write more confident code:</p>
<pre>
  for(String match: computeMatches()) {
         ...
  }
</pre>
<p>This may seem overly optimistic and overly strict- but I have a point.  One of the few good principles in computer science (and perhaps one of computer science&#8217;s contributions to knowledge, computers are a huge contribution to society- but they were made by engineers) is composition.  A plan for getting from A to B followed by (or composed with) a plan for getting from B to C is a plan for getting from A to C.  Well a correct plan for getting from A to B when composed with a correct plan for getting from B to C, if each of the plans &#8220;is mostly right if the piece after is so nice to fix up a few mistakes&#8221; you really don&#8217;t know what you have.  You may have nothing.</p>
<p>That is my complaint- you can&#8217;t put an a priori bound on how expensive attempting to allow both sides of Postel&#8217;s law will be.  You would like others to paper over your mistakes, but it is becoming too expensive to paper over the mistakes of others.  In the end Postel&#8217;s law is of little help when cleaning up the inevitable mess.</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/01/map-reduce-a-good-idea/' rel='bookmark' title='Permanent Link: Map Reduce: A Good Idea'>Map Reduce: A Good Idea</a></li>
<li><a href='http://www.win-vector.com/blog/2010/03/r-annoyances/' rel='bookmark' title='Permanent Link: R annoyances'>R annoyances</a></li>
<li><a href='http://www.win-vector.com/blog/2008/10/something-i-dont-get-about-business-and-bailouts/' rel='bookmark' title='Permanent Link: Something I don&#8217;t get about business and bailouts'>Something I don&#8217;t get about business and bailouts</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2010/02/postels-law-not-sure-who-to-be-angry-with/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Relative returns: a banker versus trader paradox</title>
		<link>http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=relative-returns-a-banker-versus-trader-paradox</link>
		<comments>http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 22:20:04 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[logarithm]]></category>
		<category><![CDATA[paradox]]></category>
		<category><![CDATA[percent change]]></category>
		<category><![CDATA[relative returns]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=1296</guid>
		<description><![CDATA[Quick Joke. Q: What is the difference between a banker and a trader? A: A banker will try and tell you a 10% loss followed by a 10% gain is breaking even. This is a bit less arcane than some of the issues we usually discuss on the Win-Vector Blog, but it is a fun [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2010/03/r-annoyances/' rel='bookmark' title='Permanent Link: R annoyances'>R annoyances</a></li>
<li><a href='http://www.win-vector.com/blog/2009/07/thievery-considered-harmful/' rel='bookmark' title='Permanent Link: Thievery considered harmful'>Thievery considered harmful</a></li>
<li><a href='http://www.win-vector.com/blog/2009/05/programs-reduced-to-statistics/' rel='bookmark' title='Permanent Link: Programs reduced to statistics'>Programs reduced to statistics</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Quick Joke. </p>
<blockquote><p>Q: What is the difference between a banker and a trader?<br />
A: A banker will try and tell you a 10% loss followed by a 10% gain is breaking even.</p></blockquote>
<p><span id="more-1296"></span><br />
This is a bit less arcane than some of the issues we usually discuss on the Win-Vector Blog, but it is a fun one.  And it does take some effort to disabuse yourself of the banker&#8217;s fallacy.</p>
<p>It turns out that a lot of our instincts about something as simple as ratios is not quite right.  Likely this is because the innate skills of counting leads to a deep understanding of addition and not of multiplication.  Take for example the opening joke: a 10% loss followed by a 10% gain sounds like it should be exactly breaking even.  But in fact it is exactly a 1% loss.</p>
<p>To compute the loss and gain on $100 we would say after the 10% loss we have $100*(1-0.1) = $90.  A 10% gain on this remaining portion would be written as $90*(1 + 0.1) = $99 which, as predicted, is missing a dollar.  An incorrect explanation would be something along the lines &#8220;well the loss was first, so it applied to a larger number than the gain.&#8221; But relative losses and gains work by multiplying and therefore is insensitive to order.  It is a fact that a 10% loss followed by a 10% gain is exactly the same as a 10% gain followed by a 10% loss (which eliminates the attempted explanation).  The correct explanation is the flaw was far earlier than you would think: you should not believe that the opposite of 10% loss is a 10% gain.   To undo the effect of a 10% loss you need just over an 11% gain (a 11.1111111% gain).</p>
<p>For a more dramatic example consider the Dow Jones Industrial Average.  It was at $12827 on January 7th 2008, by March 5th of 2009 it had fallen to $6594 or a 48% loss.  By January 4th 2010 it had experienced a 60% gain relative to March 5th 2009- but that only got us to $10583, still a 17% loss relative to January 7th 2008.  The opposite of 48% loss is in fact 192% gain (which obviously has not happened).</p>
<p>Bankers typically quote interest rates as if they were additive.  Things like points and fees are all added.  This is almost correct for small interest rates.  This nearly right (but actually wrong) language is why we have a bestiary of confusing terms describing interest: simple interest, compound interest and yield.  The bankers need some way to signal which numbers will actually be used for computing your mortgage payments versus which numbers will be used for advertising (and in the US they tended not to tell you many of the more important numbers until they were required to by law).</p>
<p>Traders, on the other hand, are very comfortable with multiplying relative losses and relative gains.  The main trick of achieving such mastery is to convert multiplication into addition.  The way to do this is the log() function (or the logarithm).</p>
<p>The log() function is simple function that has the property that log(a*b) = log(a) + log(b).  For connivence lets pick our notation so that log(10) = 1.  From this we can deduce that it must be the case that:</p>
<p><center><br />
<table>
<tr>
<td><strong>statement</strong></td>
<td><strong>justification</strong></td>
</tr>
<tr>
<td>
log(1000) = 3
</td>
<td>
 because: log(1000) = log(10*10*10) = log(10) + log(10) + log(10) = 1 + 1 + 1
</td>
</tr>
<tr>
<td>
log(1) = 0
</td>
<td>
because: log(1) = log(1*1) = log(1) + log(1)<br />
</tr>
<tr>
<td>
log(0.1) = -1
</td>
<td>
because: 0 = log(1) = log(0.1 * 10) = log(0.1) + 1 .
</td>
</tr>
</table>
<p></center></p>
<p>log() can not be used on zero or negative numbers (at least not if you expect a real number as a result).   For other values we use our calculator.</p>
<p>A trader uses logarithms to think additively  about relative changes (also called &#8220;returns&#8221;).  Breaking even is represented as 0 (our friend log(1)), relative increases are represented as positive numbers and relative decreases are represented as negative numbers.  For example a 10% loss is represented additively using logarithms as log(1- 0.1) = -0.0458.  Now in this logarithm notation the additive opposite of a -0.0458 is in fact (as you would hope) +0.0458.  You can even double check: log(1 + 0.1111111) = 0.0458.  In this notation the mathematics and the language work together- the opposite of a loss is a gain with the same magnitude (and positive sign).</p>
<p>Returning to our initial example: a 10% loss is represented as -0.0458 and a 10% gain is represented as log(1 + 0.1) = 0.0414, so if we add them (how we combing operations in the logarithmic notation) we get -0.0044.  Notice this is not zero, and is in fact equal to log(0 &#8211; 0.01) or a net-loss of 1%.</p>
<p>The point is that even trivial math becomes difficult if you are forced, by language or convention, to work from false premises.</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2010/03/r-annoyances/' rel='bookmark' title='Permanent Link: R annoyances'>R annoyances</a></li>
<li><a href='http://www.win-vector.com/blog/2009/07/thievery-considered-harmful/' rel='bookmark' title='Permanent Link: Thievery considered harmful'>Thievery considered harmful</a></li>
<li><a href='http://www.win-vector.com/blog/2009/05/programs-reduced-to-statistics/' rel='bookmark' title='Permanent Link: Programs reduced to statistics'>Programs reduced to statistics</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CRU graph yet again (with R)</title>
		<link>http://www.win-vector.com/blog/2009/12/cru-graph-yet-again-with-r/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=cru-graph-yet-again-with-r</link>
		<comments>http://www.win-vector.com/blog/2009/12/cru-graph-yet-again-with-r/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 19:25:00 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Rants]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Climate]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Regression]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=1195</guid>
		<description><![CDATA[IowaHawk has a excellent article attempting to reproduce the infamous CRU climate graph using OpenOffice: Fables of the Reconstruction. We thought we would show how to produced similarly bad results using R. If the re-constructed technique is close to what was originally done then so many bad moves were taken that you can&#8217;t learn much [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/11/r-examine-objects-tutorial/' rel='bookmark' title='Permanent Link: R examine objects tutorial'>R examine objects tutorial</a></li>
<li><a href='http://www.win-vector.com/blog/2009/09/survive-r/' rel='bookmark' title='Permanent Link: Survive R'>Survive R</a></li>
<li><a href='http://www.win-vector.com/blog/2010/03/r-annoyances/' rel='bookmark' title='Permanent Link: R annoyances'>R annoyances</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>IowaHawk has a excellent article attempting to reproduce the infamous CRU climate graph using OpenOffice: <a href="http://iowahawk.typepad.com/iowahawk/2009/12/fables-of-the-reconstruction.html">Fables of the Reconstruction</a>.   We thought we would show how to produced similarly bad results using R.<br />
<span id="more-1195"></span></p>
<p>If the re-constructed technique is close to what was originally done then so many bad moves were taken that you can&#8217;t learn much of anything from the original &#8220;result.&#8221;   This points out some of the pratfalls of not performing hold-out tests, not examining the modeling diagnostics and not remembering that linear regression models fail to low-variance models (i.e. when they fail they do a good job predicting the mean and vastly under-estimate variance).</p>
<p>Our article not an article on global warming, but an article on analysis technique.  Human driven global warming is either happening or not happening independent of any bad analysis.  Finding the physical truth is a bigger harder job than eliminating some bad reports (the opposite of a bad report is not necessarily the truth). Bad analyses can have many different sources (mistakes, trying to jump ahead of your colleagues on something you believe is true, trying to fake something you believe is false or be figments of overly harsh critics) and we have not heard enough to make any accusations.</p>
<p>First: load the data (I re-formatted it at bit so <a href="http://cran.r-project.org/">R</a> can read it:<a href="http://www.win-vector.com/blog/wp-content/uploads/2009/12/jonesmannrogfig2c.txt"> jonesmannrogfig2c.txt</a>,  <a href="http://www.win-vector.com/blog/wp-content/uploads/2009/12/data1400.dat_.txt">data1400.dat_.txt</a>   ) , perform the principle components reduction and fit a first<br />
model.</p>
<pre>
&gt; library(lattice)
&gt; d1400 &lt;- read.table('data1400.dat.txt',sep='\t',header=FALSE)
&gt; d1400r &lt;- as.matrix(d1400[,2:23])
&gt; pcomp &lt;- prcomp(na.omit(d1400r))
&gt; plot(pcomp)
&gt; vars &lt;- data.frame(cbind(Year=d1400[,1],d1400r %*% pcomp$rotation),row.names=d1400[,1])
&gt; jones &lt;- read.table('jonesmannrogfig2c.txt',sep='\t',header=TRUE)
&gt; datUnion &lt;- merge(vars,jones,all=TRUE)
&gt; datUnion$avgTemp &lt;- with(datUnion,(NH+CET+Central.Europe+Fennoscandia)/4.0)
&gt; model &lt;- lm(avgTemp ~ PC1 + PC2 + PC3 + PC4 + PC5 ,dat=datUnion)
&gt; summary(model)

Call:
lm(formula = avgTemp ~ PC1 + PC2 + PC3 + PC4 + PC5, data = datUnion)

Residuals:
       Min         1Q     Median         3Q        Max
-0.8811679 -0.2658117  0.0008174  0.2933058  1.0450044 

Coefficients:
              Estimate Std. Error t value Pr(&gt;|t|)
(Intercept)  0.0065252  0.5750696   0.011   0.9910
PC1         -0.0001683  0.0003912  -0.430   0.6679
PC2         -0.0003678  0.0010114  -0.364   0.7168
PC3          0.0003177  0.0014821   0.214   0.8307
PC4          0.0044084  0.0019351   2.278   0.0246 *
PC5          0.0188520  0.0205137   0.919   0.3601
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Residual standard error: 0.4505 on 113 degrees of freedom
  (484 observations deleted due to missingness)
Multiple R-squared: 0.05223,	Adjusted R-squared: 0.01029
F-statistic: 1.245 on 5 and 113 DF,  p-value: 0.2927
</pre>
<p>We used only 5 principle components as modeling variables, because as is typical of principle component analysis- beyond the first few components the components become vanishingly small and unsuitable to use in modeling (see graph pcomp below).</p>
<p><img src="http://www.win-vector.com/blog/wp-content/uploads/2009/12/pcomp.png" width="400"></p>
<p>However, this gave a model with far smaller R-squared than people are reporting, so lets add in a lot of components like everybody else does (bad!).</p>
<pre>
&gt; model &lt;- lm(avgTemp ~ PC1 + PC2 + PC3 + PC4 + PC5 + PC6 + PC7 + PC8 + PC9 +PC10 +PC11 +PC12 + PC13 ,dat=datUnion)
&gt; summary(model)

Call:
lm(formula = avgTemp ~ PC1 + PC2 + PC3 + PC4 + PC5 + PC6 + PC7 +
    PC8 + PC9 + PC10 + PC11 + PC12 + PC13, data = datUnion)

Residuals:
     Min       1Q   Median       3Q      Max
-0.87249 -0.25951  0.03996  0.25055  0.99039 

Coefficients:
              Estimate Std. Error t value Pr(&gt;|t|)
(Intercept)  7.431e-01  1.424e+00   0.522   0.6028
PC1         -1.796e-04  3.665e-04  -0.490   0.6253
PC2         -4.179e-04  9.759e-04  -0.428   0.6694
PC3          3.306e-05  1.430e-03   0.023   0.9816
PC4          3.416e-03  1.803e-03   1.894   0.0609 .
PC5          4.032e-02  1.978e-02   2.039   0.0440 *
PC6         -3.260e-03  2.660e-02  -0.123   0.9027
PC7         -7.134e-02  3.620e-02  -1.971   0.0514 .
PC8         -1.339e-01  7.895e-02  -1.696   0.0928 .
PC9          7.577e-02  5.734e-02   1.321   0.1892
PC10         2.700e-01  5.878e-02   4.594 1.22e-05 ***
PC11         8.562e-02  6.741e-02   1.270   0.2068
PC12        -8.057e-02  1.053e-01  -0.765   0.4461
PC13        -4.099e-02  1.064e-01  -0.385   0.7008
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Residual standard error: 0.4141 on 105 degrees of freedom
  (484 observations deleted due to missingness)
Multiple R-squared: 0.2558,	Adjusted R-squared: 0.1637
F-statistic: 2.777 on 13 and 105 DF,  p-value: 0.001961
</pre>
<p>This is a degenerate model that essentially didn&#8217;t fit (thought the significance on PC10 component fools the fitter, but PC10 can&#8217;t be usable- it is essentially noise).  Graphically we can see the fit is not very useful (despite having  a little bit of R-squared) by looking at the graph of the fit plotted in the region of fitting.  Notice how the fit variance is much smaller than the true data variance even in the region of training data, this is typical of bad regression fits.</p>
<pre>
&gt; dRange &lt;- datUnion[datUnion$Year&gt;=1856 &#038; datUnion$Year&lt;=1980,]
&gt; xyplot(avgTemp + prediction ~Year,dat=dRange,type='l',auto.key=TRUE)
</pre>
<p><img src="http://www.win-vector.com/blog/wp-content/uploads/2009/12/pFitRegion.png" width="400"></p>
<p>Now the statement they wanted to make is that the present looks nothing like the past.  The past is only available through the fit model so what you would hope is that the model looks like the present and then the model itself separates the past and present.  Instead as you see in the graphs above and below this fails two ways: the model looks nothing like the present and the model&#8217;s past looks a lot like the model&#8217;s present.</p>
<pre>
&gt; datUnion$prediction &lt;- predict(model,newdata=datUnion)
&gt; xyplot(avgTemp + prediction ~Year,dat=datUnion,type=c('p','smooth'),auto.key=TRUE)
</pre>
<p><img src="http://www.win-vector.com/blog/wp-content/uploads/2009/12/pBoth.png" width="400"></p>
<p>What we could do to falsely drive the conclusion (which itself may or may not be true, it just is not supported by this technique, model or data) is create the infamous graph where we switch from modeled data in the past to actual data in the present and then act surprised that the two did not line up (which they did at no step during the fitting).  I don&#8217;t have the heart to unify the colors or remove the legend, but here is the graph below:</p>
<pre>
&gt; datUnion$dinked &lt;- datUnion$prediction
&gt; datUnion$dinked[!is.na(datUnion$avg)] &lt;- NA
&gt; xyplot(avgTemp + dinked ~Year,dat=datUnion,type=c('p','smooth'),auto.key=TRUE)
</pre>
<p><img src="http://www.win-vector.com/blog/wp-content/uploads/2009/12/pJacked.png" width="400"></p>
<p>The reason the blue points look different than the others is they came from the average temperature data instead of the model (where everything else came from).  Switching the series is essentially assuming the conclusion that recent past looks very different than the far past.</p>
<p>Essentially this methodology was so poor it could not have illustrated or contradicted recent global warming.  There are plenty of warning signs that the model fitting are problematic and the conclusion illustrated in the last graph can not actually be proved or disproved from this data (the proxy variables are too weak to be useful, that is not to say there are not other better proxy variables or modeling techniques).  The problems of the presentation are, of course, not essential problems in detecting global warming (which likely is occurring and likely will be a drain on future quality of life) but problems found in a single bad analysis.</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/11/r-examine-objects-tutorial/' rel='bookmark' title='Permanent Link: R examine objects tutorial'>R examine objects tutorial</a></li>
<li><a href='http://www.win-vector.com/blog/2009/09/survive-r/' rel='bookmark' title='Permanent Link: Survive R'>Survive R</a></li>
<li><a href='http://www.win-vector.com/blog/2010/03/r-annoyances/' rel='bookmark' title='Permanent Link: R annoyances'>R annoyances</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2009/12/cru-graph-yet-again-with-r/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Should your mom use Google search?</title>
		<link>http://www.win-vector.com/blog/2009/07/should-your-mom-use-google-search/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=should-your-mom-use-google-search</link>
		<comments>http://www.win-vector.com/blog/2009/07/should-your-mom-use-google-search/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 02:30:30 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Tracking Cookies]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=221</guid>
		<description><![CDATA[Today&#8217;s question is: &#8220;should your mom use Google search?&#8221; It it is a good thing that Google has directly told us that their motto is &#8220;don&#8217;t be evil,&#8221; as their systems are subtle and difficult to evaluate. I have two areas of concern. My first concern is: what is going on with the ads on [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/06/yaygda-yet-another-yahoo-google-deal-article/' rel='bookmark' title='Permanent Link: YAYGDA (Yet Another Yahoo Google Deal Article)'>YAYGDA (Yet Another Yahoo Google Deal Article)</a></li>
<li><a href='http://www.win-vector.com/blog/2008/05/is-search-advertising-a-market-for-lemons/' rel='bookmark' title='Permanent Link: Is Search Advertising a Market for Lemons?'>Is Search Advertising a Market for Lemons?</a></li>
<li><a href='http://www.win-vector.com/blog/2009/06/public-service-article-jstor-and-other-useful-research-archives/' rel='bookmark' title='Permanent Link: Public Service Article: JSTOR and other Useful Research Archives'>Public Service Article: JSTOR and other Useful Research Archives</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s question is: &#8220;should your mom use Google search?&#8221;  It it is a good thing that Google has directly told us that their motto is &#8220;don&#8217;t be evil,&#8221; as their systems are subtle and difficult to evaluate.</p>
<p><span id="more-221"></span><br />
I have two areas of concern.</p>
<p><b>My first concern is:</b> what is going on with the ads on Google search?  Are they safe to click on?  Check out this ad (from a Google search page):</p>
<p><center><br />
<img src="http://www.win-vector.com/blog/wp-content/uploads/2009/07/Search1.png" alt="Search1.png" border="0" width="255" height="112" /><br />
</center></p>
<p>Where do you think the link would lead to if you clicked on it?  First guess: &#8220;www.dmb.com/duns&#8221; which is further labeled &#8220;Official Site.&#8221;  This sounds like we would directly link to the venerable company &#8220;Dun and Bradstreet.&#8221;  This is not the case.  The text <i>and</i> the green site are apparently part of the ad.  Hovering the mouse or capturing the link yields the following huge and hard to decipher URL:</p>
<pre>

http://www.google.com/aclk?sa=L&#038;ai=CwmvMvAVpSsyeDpvusAO4y5D8D5aTi3qAv83oDPXK5f0CEAEguVQoA1Dw0pOr-_____8BYMn2-IbIo6AZyAEBqgQdT9AhbH2fVXmJHnIy-TNNj_HkY7JsaGV106RyaVw&#038;num=1&#038;sig=AGiWqtwX5zxePZHhDkpqJBojcybMzKkFSw&#038;

q=http://track.did-it.com/n%3Flid%3D13619863%26tid%3D3fe34bfe02723%26eng_creative%3D3345771492%26eng_keyword%3Dd-u-n-s%2520number%26eng_placement
%3D%26url%3Dhttp://smallbusiness.dnb.com/webapp/wcs/stores/servlet/SmbHome%3FstoreId%3D10001%26cm_mmc%3DGoogle-_-Adword-_-online-_-d-u-n-s%2520number%26LID%3D13619863
</pre>
<p>Can you anticipate where this goes?  You can see the following three URL fragments inside the URL:</p>
<ul>
<li>
<tt>http://www.google.com/</tt>
</li>
<li>
<tt>http://track.did-it.com/</tt>
</li>
<li>
<tt>http://smallbusiness.dnb.com/</tt>
</li>
</ul>
<p>Reading from left to right you can be pretty sure the URL goes to a Google server that uses the rest of the URL as an argument.  We can then assume that this Google server performs some bookkeeping and redirects to <tt>http://track.did-it.com/</tt> .  We can then  further assume that track.did-it.com performs some more bookkeeping and redirects to <tt>http://smallbusiness.dnb.com/</tt>.   Notice the first non-Google URL does not match the advertised URL.  We don&#8217;t know what is encoded into each of these pieces and we are only assuming the track.did-it.com server unpacks the URL from the argument; maybe that is a red herring and it redirects us to somewhere else entirely.</p>
<p>Frankly I have no idea if this really happens.  I do know from experience that Google did re-direct to track.did-it.com because my anti-spyware traps caught this, blocked the page load and issued a warning.  This sort of thing could be a very irritating late night call from Mom- she gets a web-safety warning (anti-phishing, anti-virus, cookie request or something else) from a site she is not on, she is not loading inclusions from (images, scripts, iframes and so on) and she is not knowingly clicking on.  </p>
<p>Is there a finite list of partners that Google allows to re-direct?  Can anybody do this?  Can I produce and place ads with arbitrary redirections?</p>
<p><b>My second concern is:</b> do you even need to click to leave the Google search page?</p>
<p>Check out what happens with a fresh copy of Mozilla Firefox (no plugins and nothing added to the browser) when you search for &#8220;Bing&#8221; on Google:</p>
<p><center><br />
<img src="http://www.win-vector.com/blog/wp-content/uploads/2009/07/Search2.png" alt="Search2.png" border="0" width="682" height="220" /><br />
</center></p>
<p>Let&#8217;s look at that pop-up a little closer:</p>
<p><center><br />
<img src="http://www.win-vector.com/blog/wp-content/uploads/2009/07/Cookie.png" alt="Cookie.png" border="0" width="446" height="160" /><br />
</center></p>
<p>Why would www.bing.com get a chance to set a cookie?  Doesn&#8217;t that only happen in response to a request from my copy of Firefox?  Did some script on the Google search page or some obscure &#8220;web acceleration&#8221; option in Firefox pre-fetch the content of the first Google link or first Google Ad (triggering the cookie request)?  Let&#8217;s not worry too much over cause (Google is the major funding source for Firefox),  but look for possible effects.  Does the destination site (Bing) see traffic from the Google page even if the user never clicked on the link?  Something like that would inflate the already huge stature of Google as a traffic source.  How much of my site&#8217;s &#8220;web traffic&#8221; comes from phantom clicks (from abandoned searches)?  Finally, how safe is it?  How much more than the cookie is being loaded?  What if the site linked to has malware- is this a no-click infection route?</p>
<p>Some of these subtle features are necessary to support an ad network.  But the implementation does not seem minimal.  Allowing hosts to differ from ad content and performing a pre-fetch with every search both expose searchers to additional risk.</p>
<p><strong>EDIT:</strong></p>
<p>Found the prefetch.   A Firefox tag that Google knows to set (see <a href="http://lwn.net/Articles/139725/">What is firefox prefetching?</a>)- and sure enough if I perform Google search using Firefox we see:</p>
<pre><tt>&lt;link rel="prefetch" href="http://www.bing.com/"&gt;</tt></pre>
<p>(and I don&#8217;t see this tag when using Safari).<br />
So that is the mechanism- still wondering how much risk this is to users. Also wondering how much this skews traffic statistics into Firefox&#8217;s and Google&#8217;s favor (I haven&#8217;t seen the prefetch tag on Yahoo search or Bing search).</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/06/yaygda-yet-another-yahoo-google-deal-article/' rel='bookmark' title='Permanent Link: YAYGDA (Yet Another Yahoo Google Deal Article)'>YAYGDA (Yet Another Yahoo Google Deal Article)</a></li>
<li><a href='http://www.win-vector.com/blog/2008/05/is-search-advertising-a-market-for-lemons/' rel='bookmark' title='Permanent Link: Is Search Advertising a Market for Lemons?'>Is Search Advertising a Market for Lemons?</a></li>
<li><a href='http://www.win-vector.com/blog/2009/06/public-service-article-jstor-and-other-useful-research-archives/' rel='bookmark' title='Permanent Link: Public Service Article: JSTOR and other Useful Research Archives'>Public Service Article: JSTOR and other Useful Research Archives</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2009/07/should-your-mom-use-google-search/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Microsoft Store Again</title>
		<link>http://www.win-vector.com/blog/2009/07/microsoft-store-again/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=microsoft-store-again</link>
		<comments>http://www.win-vector.com/blog/2009/07/microsoft-store-again/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 17:39:55 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[Retail]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=212</guid>
		<description><![CDATA[Microsoft is once again going to try its hand at retail stores (for example see the following CNET article). From my experience I think this is going to be horrible. But it does not have to be- Microsoft (if it had the will) could produce a great store that is profitable and improves the world. [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2010/05/must-have-software/' rel='bookmark' title='Permanent Link: Must Have Software'>Must Have Software</a></li>
<li><a href='http://www.win-vector.com/blog/2010/02/living-in-a-lognormal-world/' rel='bookmark' title='Permanent Link: Living in A Lognormal World'>Living in A Lognormal World</a></li>
<li><a href='http://www.win-vector.com/blog/2009/07/should-your-mom-use-google-search/' rel='bookmark' title='Permanent Link: Should your mom use Google search?'>Should your mom use Google search?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Microsoft is once again going to try its hand at retail stores (for example see the following <a href="http://news.cnet.com/8301-13860_3-10287499-56.html">CNET article</a>).  From my experience I think this is going to be horrible.  But it does not have to be- Microsoft (if it had the will) could produce a great store that is profitable and improves the world.  Here is my quick history and wish list.</p>
<p><span id="more-212"></span></p>
<p>Microsoft has tried retail outlets before.  So we have some knowledge of what to expect.</p>
<p>In particular I am thinking of the Microsoft store that was part of the new San Francisco Metreon Mall (opened in June of 1999).  At the time Microsoft had no good reason to produce such a store.  They were not ready for a major consumer product push and didn&#8217;t release the original Xbox until 2001 or the Zune until 2006.  This era was also a gap in their consumer operating system release cycle (Windows 98 was already out, Windows ME didn&#8217;t come out until Q2 2000 and Windows XP Q3 2001).  In 1999 there still were Gateway computer retail stores and Apple Stores were still two years in the future. This Microsoft Store satisfied no discernible need, promoted no major strategy and was deservedly forgotten.  From their own press release the purpose of the store was to sell &#8220;more than 90 items of apparel, desk accessories, office supplies and other items with the microsoftSF logo&#8221; ( see <a href="http://www.microsoft.com/presspass/press/1999/jun99/microsoftsfpr.mspx">presspass</a>).  A fairly low marketing ambition- which predictably failed.</p>
<p>Fast forward to 2009.  A Microsoft store could work, if Microsoft were willing to make a good one.  I doubt they are willing.  Likely they feel hey can easily cut themselves a lucrative slice of retail pie (now that they have major consumer products like Xbox, Zune and Windows Media Center).  This will fail- these are all significant products, but together they don&#8217;t make for an interesting store or cohesive shopping experience or lifestyle pitch.</p>
<p>Instead, imaging the following store.</p>
<ul>
<li>
A Microsoft store where a competent sales staff sells major brand PCs (like a Sony, HP, Leveno and so on).  But for a small mark-up they wipe out the manufacturer&#8217;s defective Windows install and spyware.  They install a clean full version of Windows 7 (or Windows XP).  A store where they consult with you and which version of Office really is best for you and then sell and install this.
</li>
</ul>
<p>Even I would go there (and I use Apple OSX  and Linux almost exclusively). Microsoft is too big an ecosystem to ignore.  We need to be able to buy mainstream (and that means Microsoft) PCs, operating systems and software packages at retail (and not just at box stores).</p>
<p>Let me illustrate my point using the last time I purchased a PC.  After an hour of trying to deal with Leveno&#8217;s atrocious web-site (they really do not want to sell computers retail) I got up and drove to the Metreon Sony Store and purchased a Sony Vaio.</p>
<p>Here is what happened: </p>
<ul>
<li>
The Sony Vaio could not handle the Vista it came installed with.
</li>
<li>
The Sony Vaio came without restore media- making a clean re-install of the operating system impossible.
</li>
<li>
The Sony Vaio  came laden with all kinds of crapware (trial anti-virus software, Internet poker offers).
</li>
<li>
I (later) spent around $400 on Office Professional just to find out I could not uninstall enough of the Sony demo version of Office to get rid of  some sort of killing dependence on &#8220;Contact Manager&#8221; (some sort of enterprise wide service that a home PC would not have).
</li>
<li>
I purchased two old copies of XP.  I used one to reformat the Vaio and donated that to my father in law for web-surfing.  We then used the other copy of XP to host Office Professional (which we really wanted and needed) inside a virtual machine on a hand-me-down Macbook.  End of Microsoft Windows (outside of virtual machines) in our household.  If Windows can do something good we now have no way of seeing it (since we now only run Windows inside a virtual machine, which is unfair to Windows).
</li>
</ul>
<p>A careful reader would say &#8220;this is unfair, it was Sony that was bad not Microsoft.&#8221;  That is correct.  But there really (right now) is no way for an individual consumer to directly deal with Microsoft.  Eliminate some of the wall of stupid between me and Microsoft and I probably would use more of their products.</p>
<p>Here is what I (and probably most other consumers would pay big for).</p>
<ul>
<li>
A Microsoft store that re-sells major brand PCs (Sony, HP so on) that have been opened, re-imaged with a clean OS from Microsoft (not the evil OEMs) and given out with install/restore media.
</li>
<li>
Ability to buy a copy of Office Professional that will work on my PC.  Here is my proposition.  I drop off my PC and $400,  next day I come back and take back only the PC and I have a copy of Office Professional that works and isn&#8217;t whining about a bunch of unresolved dependencies to servers and services I do not own.  I also need to know which version of Office to get (and I know it may cost more than the cheapest one) without reading some impenetrable &#8220;enterprise white paper.&#8221;
</li>
<li>
A store with a staff that lets me safely say &#8220;I don&#8217;t know Dad, maybe you should take it back in to the Microsoft Store.&#8221;  I&#8217;ll pay.  I&#8217;d buy training, support, warrantees, read marketing materials and try product demos
</li>
</ul>
<p>Again, a careful reader would point out that all of these activities are labor intensive and going to be very low margin.  This too can be fixed.  Once Microsoft installers are wasting Microsoft&#8217;s time and money (instead of wasting my time and money) the installers will be fixed.  Installing Microsoft Office could be come as easy as selecting a new application in Ubuntu (my current gold standard in easy installs).</p>
<p>I would welcome and support a good Microsoft retail effort, I just don&#8217;t believe one to be very likely.</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2010/05/must-have-software/' rel='bookmark' title='Permanent Link: Must Have Software'>Must Have Software</a></li>
<li><a href='http://www.win-vector.com/blog/2010/02/living-in-a-lognormal-world/' rel='bookmark' title='Permanent Link: Living in A Lognormal World'>Living in A Lognormal World</a></li>
<li><a href='http://www.win-vector.com/blog/2009/07/should-your-mom-use-google-search/' rel='bookmark' title='Permanent Link: Should your mom use Google search?'>Should your mom use Google search?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2009/07/microsoft-store-again/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Thievery considered harmful</title>
		<link>http://www.win-vector.com/blog/2009/07/thievery-considered-harmful/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=thievery-considered-harmful</link>
		<comments>http://www.win-vector.com/blog/2009/07/thievery-considered-harmful/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 16:18:32 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Finance]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Thieves]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=178</guid>
		<description><![CDATA[A bit of a tempest in finance news involving accusations of sensitive code stolen from a major trading desk. For emerging details see: Special Agent Michael G. McSwain&#8217;s charges Mathew Goldstein&#8217;s Reuters article Zero Hedge blog entry For me this triggers some strong (and sad) personal memories. No matter what inappropriate &#8220;Robin Hood&#8221; intellectual property [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/04/sorting-in-anger/' rel='bookmark' title='Permanent Link: Sorting Used in Anger'>Sorting Used in Anger</a></li>
<li><a href='http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/' rel='bookmark' title='Permanent Link: Relative returns: a banker versus trader paradox'>Relative returns: a banker versus trader paradox</a></li>
<li><a href='http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/' rel='bookmark' title='Permanent Link: A Quick Appreciation of the Sharpe Ratio'>A Quick Appreciation of the Sharpe Ratio</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A bit of a tempest in finance news involving accusations of sensitive code stolen from a major trading desk.  For emerging details see:</p>
<ul>
<li>
<a href="http://static.reuters.com/resources/media/editorial/20090706/Complaint%20--%20Aleynikov.pdf" target="other">Special Agent Michael G. McSwain&#8217;s charges</a>
</li>
<li>
<a href="http://blogs.reuters.com/commentaries/2009/07/05/a-goldman-trading-scandal/" target="other">Mathew Goldstein&#8217;s Reuters article</a>
</li>
<li>
<a href="http://zerohedge.blogspot.com/2009/07/is-case-of-quant-trading-industrial.html" target="other">Zero Hedge blog entry</a>
</li>
</ul>
<p><span id="more-178"></span></p>
<p>For me this triggers some strong (and sad) personal memories.</p>
<p>No matter what inappropriate &#8220;Robin Hood&#8221; intellectual property fantasies you have this (if true) is just wrong. I have never been a huge fan of the <a href="http://www.acm.org/about/code-of-ethics" target="other">ACM Code of Ethics</a> (which does cover this situation, but fails to seriously address much beyond having  responsibilities to your employer) but this sort of incident reminds me why computer science needs some approximation of a shared set of ethics that we can try to refer to.</p>
<p>A particularly sad part of the story that attracted my attention was the reliance on &#8220;bash history&#8221; to try and establish what happened.  Attempting to &#8220;prove&#8221; something using a &#8220;bash history&#8221; is something I have painful experience with.  The &#8220;bash history&#8221; system is incredibly inadequate even for what it was designed for (caching recent commands).  Simply having two shells open can cause non-deterministic overwriting, deletion, clobbering and time disorderings in the history file.  Furthermore bash history has no dates, times, directories or any other contextual hints written into it.  Finally bash history has no hashes, signatures, nonces, sequence numbers or any other device that helps establish authenticity.</p>
<p>Now for my story.  We (by chance) caught somebody walking off with our group&#8217;s entire source tree.  In the end all we had to go on was the bash history.  To hostile eyes bash history is nowhere near what you would call &#8220;forensic grade evidence.&#8221;  Unfortunately for us the theft was intramural, the thief was merely taking the code to another group in the same company to later mine and represent as their own work.  At this point even language worked against us- every time we accidentally said something like &#8220;our code&#8221; (as in the code we produced, not the code we own) we were perceived as being anti-company.  Evil prevailed (the thief was promoted) and I looked stupid for working so hard to try to interpret such low-quality evidence.  But we live in an objective world- just because you can&#8217;t prove something doesn&#8217;t mean there isn&#8217;t some buried ugly truth.</p>
<p>So what was stolen?  Not the code, that moved from one pocket of the corporation that owned it to another pocket of the same corporation.  What was stolen was reputation.  The thief presumably appeared to out-produce both his old colleagues and his new ones (who don&#8217;t have a few absconded person-years of development to draw from).  So an apology to anyone who was asked why they could not code as fast as our escaped &#8220;genius,&#8221; it was certainly not our intent to so equip him.  And a larger apology to the rest of the team, sorry we could not prove the misappropriation of your work.  </p>
<p>Of course Shakespeare said it much better (from Othello):</p>
<blockquote>
<pre>
Good name in man and woman, dear my lord,
Is the immediate jewel of their souls:
Who steals my purse steals trash; ’t is something, nothing;
’T was mine, ’t is his, and has been slave to thousands;
But he that filches from me my good name
Robs me of that which not enriches him
And makes me poor indeed.
</pre>
</blockquote>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/04/sorting-in-anger/' rel='bookmark' title='Permanent Link: Sorting Used in Anger'>Sorting Used in Anger</a></li>
<li><a href='http://www.win-vector.com/blog/2010/01/relative-returns-a-banker-versus-trader-paradox/' rel='bookmark' title='Permanent Link: Relative returns: a banker versus trader paradox'>Relative returns: a banker versus trader paradox</a></li>
<li><a href='http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/' rel='bookmark' title='Permanent Link: A Quick Appreciation of the Sharpe Ratio'>A Quick Appreciation of the Sharpe Ratio</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2009/07/thievery-considered-harmful/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Map Reduce: A Good Idea</title>
		<link>http://www.win-vector.com/blog/2009/01/map-reduce-a-good-idea/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=map-reduce-a-good-idea</link>
		<comments>http://www.win-vector.com/blog/2009/01/map-reduce-a-good-idea/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 20:32:20 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[External Sorting]]></category>
		<category><![CDATA[Map Reduce]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=30</guid>
		<description><![CDATA[Some time ago I subscribed to The Database Column because it would be fun to see what these incredible people wanted to discuss. We owe much of our current database technology to Professor Stonebraker and Vertica sounds like an incredible product. And I definitely want to continue to subscribe. However, the reading experience is marred [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/04/sorting-in-anger/' rel='bookmark' title='Permanent Link: Sorting Used in Anger'>Sorting Used in Anger</a></li>
<li><a href='http://www.win-vector.com/blog/2010/05/must-have-software/' rel='bookmark' title='Permanent Link: Must Have Software'>Must Have Software</a></li>
<li><a href='http://www.win-vector.com/blog/2009/01/exciting-technique-1-the-r-language/' rel='bookmark' title='Permanent Link: Exciting Technique #1: The &#8220;R&#8221; language.'>Exciting Technique #1: The &#8220;R&#8221; language.</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Some time ago I subscribed to The <a href="http://www.databasecolumn.com/">Database Column</a>  because it would be fun to see what these incredible people wanted to discuss.  We owe much of our current database technology to Professor Stonebraker and Vertica sounds like an incredible product.  And I definitely want to continue to subscribe.</p>
<p>However, the reading experience is marred by some flaw in their RSS system that keeps marking the article <a href="http://www.databasecolumn.com/2008/01/mapreduce-a-major-step-back.html">&#8220;MapReduce: A major step backwards&#8221;</a> as a new article.  This causes the article to appear in my RSS reader every few weeks as &#8220;new.&#8221;  This wouldn&#8217;t bother me too much except that the article runs so counter to experience that it is itself offensive.<br />
<span id="more-30"></span><br />
I have no desire to defend Google (the home of MapReduce)- they don&#8217;t need it and are clearly laughing all the way to the bank.  However the points used to kick at MapReduce are so broad and so devalue practitioner experience that they are insulting.  I find the individual arguments offensive and wish to stand against them.  I am not that concerned about the conclusion, use MapReduce or don&#8217;t.  For some things MapReduce is a good tool and for some things it is not.</p>
<p>Let&#8217;s limit ourselves to the 5 primary complaints from the article.  The article (verbatim) says MapReduce is:</p>
<blockquote><p>
1. A giant step backward in the programming paradigm for large-scale data intensive applications.</p>
<p>2. A sub-optimal implementation, in that it uses brute force instead of indexing.</p>
<p>3. Not novel at all &#8212; it represents a specific implementation of well known techniques developed nearly 25 years ago.</p>
<p>4. Missing most of the features that are routinely included in current DBMS.</p>
<p>5. Incompatible with all of the tools DBMS users have come to depend on.
</p></blockquote>
<p>Now let us comment:</p>
<p>1. <strong>&#8220;A giant step backward in the programming paradigm for large-scale data intensive applications.&#8221;</strong>  </p>
<p>Actually, no.  </p>
<blockquote><p>
MapReduce represents a continuity in a stream of ideas that made UNIX great: composable transient tools.  Not everything is a database or data warehouse.  A lot of the grungy UNIX tools (like sort, sed, awk, join) have often been combined to do large scale (at the time) research because they all worked &#8220;out of core&#8221; fairly well.  This makes for a horrible bailing-wire set-up.  However, it often handles problems of a size much larger than would have been possible on the hardware at the time.</p>
<p>In addition the author trots out the  &#8220;it&#8217;s Codasyl all over again&#8221; argument.  This argument refers to the ongoing pain and expense derived  from binding algorithmic details too close to the data representation.  In earlier writing it was a fantastic point that warned that the up and coming object oriented databases were going to be the same nasty pointer chasing nightmares that hierarchical databases had been.  I can see why an author might feel that just saying &#8220;it&#8217;s Codasyl&#8221; could win any argument.
</p></blockquote>
<p>2. <strong> &#8220;A sub-optimal implementation, in that it uses brute force instead of indexing.&#8221; </strong> </p>
<p>MapReduce does not use brute force.</p>
<blockquote><p>
MapReduce uses the idea (one that goes back to merge sort) that parallel traversals (that is: running through two lists in the same order synchronously) are a very powerful technique that can, among other things, produce indices.  MapReduce is so efficient that it has been shown to be competitive with the best large scale sorting algorithms on their home-turf: sorting.</p>
<p>MapReduce looks brutish because it drops a lot of popular design features.  One such feature is trying to speed things up through local caching and combining.  However, on the data that MapReduce is commonly used (free form written text) it is a provable property of the data that local caching is an ineffective complication (due to the heavy-tailedness of the data).  So many of the graceful features missing from MapReduce are actually no help on the types of data it is used on.  There is a certain grace in leaving only only the features that are actually helping.
</p></blockquote>
<p>3. <strong>&#8220;Not novel at all &#8212; it represents a specific implementation of well known techniques developed nearly 25 years ago.&#8221;</strong></p>
<p> A nasty attack.</p>
<blockquote><p>
MapReduce is a good explanation of some merging techniques that have been common knowledge for quite a while.  This is a legitimate expository goal: explaining something everybody already &#8220;knows&#8221; better.  In fact this is very hard to do and considered a legitimate accomplishment in many fields (for example Rota stated it was a legitimate goal in mathematics).  I myself looked at some of my own older code for dealing with very large data sets after reading the MapReduce paper.  I saw that the paper was describing what I was already doing (splitting the data into streams for later re-joining) and explaining it so well that it was now a method and no longer a hack.  When a paper successfully teaches about you something you already &#8220;know&#8221; it is a good work.</p>
<p>The attack is is also inaccurate- the ideas are not  25 years old it is closer to 120 years old.<br />
We could easily trace the lineage of MapReduce back to Hollerith style sorting machines that pre-date general purpose  computers (i.e. going back to before 1889) .  MapReduce refers back to a time when all computation was performed by what we now call external sorting and tabulation.  These 19th century technologies may seem archaic but they were developed in a word similar to ours: worlds where the amount of data is in excess of your conveniently reconfigurable computational resources.
</p></blockquote>
<p>4. <strong> &#8220;Missing most of the features that are routinely included in current DBMS.&#8221; </strong></p>
<p> Unfortunate.</p>
<blockquote><p>
I miss a lot of those features.</p>
<p>However, because MapReduce is such a lean technique I have seen engineers implement their own MapReduce systems in a day (to solve a problem they are working on).  That is they are successfully sorting, joining, indexing and summarizing hundreds of gigabytes of data on a consumer PC within a couple of days of being asked to.  This is from scratch after reading the MapReduce paper.</p>
<p>The &#8220;make versus buy&#8221; decision should not always come out &#8220;make.&#8221;  But it is not wise to artificially bloat up requirements so that the decision can only be &#8220;buy.&#8221;
</p></blockquote>
<p>5. <strong>&#8220;Incompatible with all of the tools DBMS users have come to depend on.&#8221; </strong></p>
<p> Good.</p>
<blockquote><p>
Frankly for a lot of analytic practitioners many DMBS systems and tools have become expensive obstacles in the way getting results.  Yes, we  enjoy humiliating an interview candidate that does not know all of the Codd normal forms (or can&#8217;t remember which of the alphabet soups of OLTP or OLAP is the &#8220;good one&#8221; ) as much as the next person.  But to many of us a lot of these tools and procedures are more obstacles than a solutions.</p>
<p>This may sound nasty, but if were not the case why would companies like Vertica be producing radical new database tools?  The fact is existing DBMS tools were designed for a different type and scale of data than we regularly see on the web (and column oriented database designers seem to share this view).  The situation is so bad that &#8220;roach motel&#8221; is a common analyst&#8217;s slang for &#8220;data warehouse&#8221; (derived from: &#8220;data checks in but it never checks out&#8221;).
</p></blockquote>
<p>This isn&#8217;t meant to be a hagiography of MapReduce, but given that MapReduce has paid the bills I feel it deserves a small show of respect along the lines of &#8220;dance with the one who brung you.&#8221;</p>
<p>MapReduce is not a panacea.  One of the tasks I have hated most in my career was maintaining a seven step MapReduce based system.  I would love to have avoided all the detail fiddling that set-up required.  However, the system paid our bills by performing a calculation that was beyond the scale of simpler methods and it would have been unaffordable to buy a solution.  </p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2008/04/sorting-in-anger/' rel='bookmark' title='Permanent Link: Sorting Used in Anger'>Sorting Used in Anger</a></li>
<li><a href='http://www.win-vector.com/blog/2010/05/must-have-software/' rel='bookmark' title='Permanent Link: Must Have Software'>Must Have Software</a></li>
<li><a href='http://www.win-vector.com/blog/2009/01/exciting-technique-1-the-r-language/' rel='bookmark' title='Permanent Link: Exciting Technique #1: The &#8220;R&#8221; language.'>Exciting Technique #1: The &#8220;R&#8221; language.</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2009/01/map-reduce-a-good-idea/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Something I don&#8217;t get about business and bailouts</title>
		<link>http://www.win-vector.com/blog/2008/10/something-i-dont-get-about-business-and-bailouts/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=something-i-dont-get-about-business-and-bailouts</link>
		<comments>http://www.win-vector.com/blog/2008/10/something-i-dont-get-about-business-and-bailouts/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 20:11:25 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Debt]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=23</guid>
		<description><![CDATA[I don&#8217;t really know what the right answer to the $700 Billion Dollar Bailout Question is (I have not read the bill, and I wonder if the bill really describes what would happen). But the whole situation does remind me of a related question: is it really the end of the world if the &#8220;credit [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/03/it-is-not-all-the-quants-fault/' rel='bookmark' title='Permanent Link: It is not all the quants&#8217; fault.'>It is not all the quants&#8217; fault.</a></li>
<li><a href='http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/' rel='bookmark' title='Permanent Link: A Quick Appreciation of the Sharpe Ratio'>A Quick Appreciation of the Sharpe Ratio</a></li>
<li><a href='http://www.win-vector.com/blog/2008/04/i-know-i-am-the-one-being-a-jerk/' rel='bookmark' title='Permanent Link: I know, I am the one being a jerk'>I know, I am the one being a jerk</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t really know what the right answer to the $700 Billion Dollar Bailout Question is (I have not read the bill, and I wonder if the bill really describes what would happen).  But the whole situation does remind me of a related question: is it really the end of the world if the &#8220;credit markets freeze?&#8221;   It <em>is</em> a disaster if the equity markets tank for a period of longer than a year or so (prevents people from retiring and so on)- but I am not sure if all of the consequences we are being told really follow.<span id="more-23"></span></p>
<p>If the reason to bail-out Wall Street is to &#8220;protect retirement savings&#8221; why not just dump the $700 Billion into Social Security and make Social Security a needs based program?</p>
<p>Here is one story we are being told.  Without the bailout the credit markets freeze.  If the credit markets freeze then &#8220;main street&#8221; is hurt because businesses can not borrow money.  This causes actual economic damage and everybody is really poorer.</p>
<p>I understand the credit markets increase the money supply and generally promote growth.  But it might be okay if they were <em>temporarily</em> unavailable.  My experience in trading is that when you buy or sell in a finance market: most of the time the counter-party in a trade is another hedge fund or speculator- not somebody actually doing anything productive with the money.  So most of transactions lost to a freeze really helped nobody you would care about.</p>
<p>Also, why should businesses always need credit?  Many respected businesses (Apple, Google, Microsoft) have tens of billions in cash reserves and likely do not need credit.  Others (Oracle) have huge cash positions and debt positions as the same time.  I have a feeling that a credit crunch will punish over-extended business that have weird balance sheets more than businesses that run on a sound financial basis.</p>
<p>If you think all businesses have a &#8220;rocket science&#8221; accounting ability (they produce reports that nobody else can understand and we just balance our check books), consider this.  I have regularly seen offers of early payment (net-10 days instead of net-20 days) if a you accept a 10% cut in your bill.  Now if you think of this as a favor you might accept it (a supplier should <em>always</em> be willing to offer 10% off to make a client happier).  If you think of this as a payday loan (which is what it is) the supplier would be paying an interest rate that compounds to 569% annually just to get their money 20 days earlier.  If this is what is considered &#8220;financial engineering&#8221; we do not need it in this world.</p>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/03/it-is-not-all-the-quants-fault/' rel='bookmark' title='Permanent Link: It is not all the quants&#8217; fault.'>It is not all the quants&#8217; fault.</a></li>
<li><a href='http://www.win-vector.com/blog/2008/09/a-quick-appreciation-of-the-sharpe-ratio/' rel='bookmark' title='Permanent Link: A Quick Appreciation of the Sharpe Ratio'>A Quick Appreciation of the Sharpe Ratio</a></li>
<li><a href='http://www.win-vector.com/blog/2008/04/i-know-i-am-the-one-being-a-jerk/' rel='bookmark' title='Permanent Link: I know, I am the one being a jerk'>I know, I am the one being a jerk</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2008/10/something-i-dont-get-about-business-and-bailouts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I know, I am the one being a jerk</title>
		<link>http://www.win-vector.com/blog/2008/04/i-know-i-am-the-one-being-a-jerk/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=i-know-i-am-the-one-being-a-jerk</link>
		<comments>http://www.win-vector.com/blog/2008/04/i-know-i-am-the-one-being-a-jerk/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 17:52:58 +0000</pubDate>
		<dc:creator>John Mount</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Online Libraries]]></category>

		<guid isPermaLink="false">http://www.win-vector.com/blog/?p=16</guid>
		<description><![CDATA[The other day&#8217;s blog post and a recent Andrew Binstock interview of Donald Knuth made me think more about how the ACM is really not serving the interests of computer science. Here is a question from the interview: Andrew: One of the few projects of yours that hasn’t been embraced by a widespread community is [...]


Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/05/programs-reduced-to-statistics/' rel='bookmark' title='Permanent Link: Programs reduced to statistics'>Programs reduced to statistics</a></li>
<li><a href='http://www.win-vector.com/blog/2008/10/something-i-dont-get-about-business-and-bailouts/' rel='bookmark' title='Permanent Link: Something I don&#8217;t get about business and bailouts'>Something I don&#8217;t get about business and bailouts</a></li>
<li><a href='http://www.win-vector.com/blog/2009/01/map-reduce-a-good-idea/' rel='bookmark' title='Permanent Link: Map Reduce: A Good Idea'>Map Reduce: A Good Idea</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The other day&#8217;s <a href="http://www.win-vector.com/blog/2008/04/sorting-in-anger/">blog post</a> and a recent <a href="http://www.informit.com/articles/article.aspx?p=1193856">Andrew Binstock interview of Donald Knuth</a> made me think more about how the ACM is really not serving the interests of computer science.  <span id="more-16"></span></p>
<p>Here is a question from the interview:</p>
<blockquote><p><strong>Andrew: One of the few projects of yours that hasn’t been embraced by a widespread community is literate programming. What are your thoughts about why <a href="http://www.literateprogramming.com/">literate programming</a> didn’t catch on? And is there anything you’d have done differently in retrospect regarding literate programming?</strong></p></blockquote>
<p>Professor Knuth had a good and interesting answer, which I will not go into here.  Also, it was a good question- Literate Programming is a good idea, yet we have only seen weak imitations of it like Doxygen and JavaDoc (which automatically document the syntactic structure of code instead of really helping the programer become an author and explain their meaning and intent).</p>
<p>Mr. Binstock even includes a link to a site promoting the concept.  Lets as the kids these days say &#8220;click through&#8221; and see what awaits us.</p>
<p><img src="http://www.win-vector.com/blog/wp-content/uploads/2008/04/literateprogramming1.gif" border="0" alt="Invitation to Lean an Idea" width="816" height="381" /></p>
<p>This is great.  Literate programing is definitely Web 2.0 (rounded corners, use of light pastels and cool gradients).  This is now, this is modern, sign me on.  The site even has links to original articles by the masters:</p>
<pre>Literate Programming - CACM Series
	Programming Pearls: Literate Programming, CACM (May 1986)
	Programming Pearls: A Literate Program, CACM (June 1986)
	Programming Pearls: Abstract Data Types, CACM (April 1987)
	Announcing Literate Programming, CACM (July 1987)
	LP: Processing Transactions, CACM (December 1987)
	LP: Expanding Generalized Regular Expressions, CACM (December 1988)
	LP: A File Difference Program, CACM (June 1989)
	LP: Weaving a Language-Independent WEB, CACM (September 1989)
	LP: An Assessment, CACM (March 1990)
	The Literate-Programming Paradigm
	Donald Knuth. "Literate Programming (1984)" in Literate Programming. CSLI, 1992, pg. 99.</pre>
<p>Lets click through and see how the Association for Computing Machinery helps disseminate, guide and educate:</p>
<p><img src="http://www.win-vector.com/blog/wp-content/uploads/2008/04/literateprogramming2.gif" border="0" alt="Retraction of the Invitation" width="674" height="612" /></p>
<p>Oh, maybe this is part of why Literate Programming hasn&#8217;t been embraced: the whole purpose of Literate Programming is lost when you keep it a secret.</p>
<p>I am sure I have been a paid ACM member from time to time, but I don&#8217;t remember the online credentials and they have probably lapsed by now.  I tried applying for the free temporary credential (the online form ended up not sending me anything- ACM not so good with the computers).  I can afford pay (yet again) to re-join ACM but why would I want to give my money to support an organization so far from my (and common) academic values?</p>
<p>So in conclusion:</p>
<ul>
<li>Sorry Professor Knuth, you remain one of my heroes, but I&#8217;ll have to get to Literate Programing a bit later.  I would say that the marketing campaign behind Literate Programming has excessive &#8220;breakage.&#8221;</li>
<li>ACM: that was a funny joke,  great head-fake, impeccable comic timing, good fun and I certainly learned something.  Oh, and I will see you in hell.</li>
</ul>


<p>Related posts:<ol><li><a href='http://www.win-vector.com/blog/2009/05/programs-reduced-to-statistics/' rel='bookmark' title='Permanent Link: Programs reduced to statistics'>Programs reduced to statistics</a></li>
<li><a href='http://www.win-vector.com/blog/2008/10/something-i-dont-get-about-business-and-bailouts/' rel='bookmark' title='Permanent Link: Something I don&#8217;t get about business and bailouts'>Something I don&#8217;t get about business and bailouts</a></li>
<li><a href='http://www.win-vector.com/blog/2009/01/map-reduce-a-good-idea/' rel='bookmark' title='Permanent Link: Map Reduce: A Good Idea'>Map Reduce: A Good Idea</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.win-vector.com/blog/2008/04/i-know-i-am-the-one-being-a-jerk/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
