<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><title type="text">The Eighty-Twenty Solution</title>
<subtitle type="text">It's Just Good Enough</subtitle>

<link rel="alternate" type="text/html" href="http://www.eighty-twenty.net/weblog/" />
<id>tag:www.eighty-twenty.net,2005:e3809a3a65eb0bb2dffc9bca6fb23f03</id>
<generator uri="http://textpattern.com/" version="4.0.5">Textpattern</generator>
<updated>2009-11-14T21:44:32Z</updated>
<author>
		<name>Gordon Weakliem</name>
		<email>gweakliem@yahoo.com</email>
		<uri>http://www.eighty-twenty.net/weblog/</uri>
</author>
<link rel="self" href="http://feeds.feedburner.com/agileprogrammer/sSCw" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
		<author>
			<name>Gordon Weakliem</name>
		</author>
		<published>2009-11-14T18:56:00Z</published>
		<updated>2009-11-14T21:44:31Z</updated>
		<title type="html">Amazon MP3: Let the Buyer Beware</title>
		<link rel="alternate" type="text/html" href="http://www.eighty-twenty.net/weblog/article/117/amazon-mp3-let-the-buyer-beware" />
		<id>tag:www.eighty-twenty.net,2009-11-14:e3809a3a65eb0bb2dffc9bca6fb23f03/c814ac4f683d23801a8e4ed285d39dfd</id>
		<category term="tech" />
		
		<content type="html">
<![CDATA[<p>I <em>love</em> Amazon&#8217;s MP3 download service.  Well, I <em>used</em> to love it.  Until one day this week I downloaded about 10 songs and suddenly realized today that they were gone from my library.  I hunted around and realized what happened: for whatever reason, Amazon gave me a direct link to the MP3 instead of going through the Amazon download application.  Firefox asked if I wanted to open the file in iTunes, I said &#8220;sure&#8221;, so $10 worth of MP3s got downloaded into a tempororay folder and later deleted by some cleanup process, probably Firefox deciding to clean out old downloads.  So, hopeful, I went back to Amazon thinking maybe I could re-download what I&#8217;d lost.  No dice, after 10 minutes of searching, <a href="http://www.amazon.com/gp/help/customer/display.html?nodeId=200154210&#38;#copy">it says so</a>, buried in the help: if you lose track of the music you downloaded, you&#8217;re out of luck.  Or if for some reason, they decide not to stick to the routine they&#8217;ve trained you to expect (the Amazon MP3 downloader, which does a nice job of organizing your music to boot) and you&#8217;re not really paying attention, you can be effectively ripped off: not by anyone in particular, just a victim of circumstance.  I&#8217;m wondering if iTunes does enough tracking on your purchase to let you download a file you&#8217;ve purchased.  That could definitely bring me back to iTunes.</p>

	<p>Who should I be angry at?  Myself, for not paying attention?  Maybe, I do this for a living and should have realized what was happening, but I can&#8217;t imagine that I&#8217;m the first to have this happen to them.  Amazon, for not sticking to the routine I&#8217;d come to expect, and for not standing behind the purchase &#8211; accidents happen, right?  Amazon has a pretty lousy track record as far as returns and customer service, it&#8217;s definitely buyer beware.  Or maybe the music industry, for pushing for <span class="caps">DRM</span> so hard that customers who try to do the right thing.  It&#8217;s not a question of </p>

	<p>I&#8217;ll tell you one thing, it&#8217;s left a bad taste in my mouth.  I don&#8217;t like having a lot of CDs laying around, but on the other hand, I don&#8217;t like losing $10 with the click of a button either.  I&#8217;m going to have to think long and hard before going back to Amazon MP3.  I&#8217;ll know to be more careful next time.  If there is a next time.</p>]]>
</content>
</entry>
<entry>
		<author>
			<name>Gordon Weakliem</name>
		</author>
		<published>2009-10-26T22:06:05Z</published>
		<updated>2009-10-27T21:24:32Z</updated>
		<title type="html">Radio Days</title>
		<link rel="alternate" type="text/html" href="http://www.eighty-twenty.net/weblog/article/116/radio-days" />
		<id>tag:www.eighty-twenty.net,2009-10-27:e3809a3a65eb0bb2dffc9bca6fb23f03/b83821f23c3e7e57718d79c963447e05</id>
		<category term="tech" />
		
		<content type="html">
<![CDATA[<p>The <span class="caps">NYT</span> had a really <a href="http://www.nytimes.com/2009/10/18/magazine/18Pandora-t.html">interesting article on Pandora.com</a>, specifically on the categorization process used by the Music Genome Project.  It&#8217;s pretty interesting to read a bit about the process.  I&#8217;ve been fascinated by Pandora for a year or so.   Like all recommendation systems, the promise is so tantalizing: what if there was a way to predict and recommend music in a really reliable way?</p>

	<p>The reality is somewhat less rosy, as the story points out.  Pandora and Music Genome does really well at building a taxonomy for music, particularly popular music.  It does less well at context.  The issue for me isn&#8217;t so much whether Journey is &#8220;similar&#8221; to Jackson Browne &#8211; musically, that&#8217;s probably true.  But context, particularly lyrically.  Take Pink&#8217;s <a href="http://www.pandora.com/music/song/pink/so+what">So What</a> for instance.  Is that song about &#8220;electronica influences&#8221;, &#8220;punk influences&#8221;, &#8220;mild rhythmic syncopation&#8221;, &#8220;a twelve-eight time signature&#8221;, etc., or is it a song about going out and getting drunk at the end of a bad relationship?  Or, ask yourself how <a href="http://www.pandora.com/music/artist/metallica">Metallica</a> and <a href="http://www.pandora.com/music/artist/dubliners">The Dubliners</a> are related? (they both have covered <a href="http://www.pandora.com/backstage?songPage=1&#38;q=whiskey+in+the+jar&#38;type=song">Whiskey In the Jar</a>).  </p>

	<p>Recommendations can work on more than one axis.  But what I&#8217;ve discovered about Pandora is that while there are those voting buttons, it <strong>is</strong> like the radio: sometimes it&#8217;s more gratifying to just change the channel or switch it off entirely.</p>]]>
</content>
</entry>
<entry>
		<author>
			<name>Gordon Weakliem</name>
		</author>
		<published>2009-10-20T20:08:22Z</published>
		<updated>2009-10-20T20:19:36Z</updated>
		<title type="html">Let the Man Pitch!</title>
		<link rel="alternate" type="text/html" href="http://www.eighty-twenty.net/weblog/article/115/let-the-man-pitch" />
		<id>tag:www.eighty-twenty.net,2009-10-20:e3809a3a65eb0bb2dffc9bca6fb23f03/222aba39dd9eecf9756c3b6a37bb0bfd</id>
		
		
		<content type="html">
<![CDATA[<p>I have to echo James Robertson&#8217;s <a href="http://www.cincomsmalltalk.com/blog/blogView?showComments=true&#38;printTitle=Over_Managed&#38;entry=3433474622">comment about pitching changes</a>.  We&#8217;ve now seen every playoff team blow a game due to a reliever blowing up.  As a Rockies fan, it was extremely frustrating to see blown saves sink the Rockies in the playoffs this year.</p>

	<p>I don&#8217;t think managers realize that there&#8217;s risk in switching out pitchers and that pitchers generally aren&#8217;t effective coming in to face a single batter.  Yet I still see criticism like Dan Rosenheck asking <a href="http://bats.blogs.nytimes.com/2009/10/19/analysis-why-was-cliff-lee-pitching-so-late/">Why Was Cliff Lee Pitching So Late?</a>.  Lee was at about 120 pitches at the end of the 8th inning, so my only question was why he took an at bat in the bottom of the 8th if he didn&#8217;t pitch the 9th.  All I can figure is that Charlie Manuel had a change of heart about pitching the 9th.  To me, Manuel managed Lee perfectly: Lee was having a great game, the Phillies middle relief has been suspect, why take him out?</p>]]>
</content>
</entry>
<entry>
		<author>
			<name>Gordon Weakliem</name>
		</author>
		<published>2009-10-06T03:54:53Z</published>
		<updated>2009-10-06T14:50:21Z</updated>
		<title type="html">Duct Tape on My Mind [2]</title>
		<link rel="alternate" type="text/html" href="http://www.eighty-twenty.net/weblog/article/112/duct-tape-on-my-mind" />
		<id>tag:www.eighty-twenty.net,2009-10-05:e3809a3a65eb0bb2dffc9bca6fb23f03/888df13d06b71bb4f80879dfae9341c1</id>
		<category term="tech" />
		<category term="books" />
		<content type="html">
<![CDATA[<p>The problem with reading too many blogs is that after you read enough on the same subject, you&#8217;ve walked away with so many conflicts and contradictions that the net effect is that after tens of thousands of words, nothing is actually said.  <a href="http://www.joelonsoftware.com/items/2009/09/23.html">Duct Tape Programmer</a>, anyone?</p>

	<p>Some people just have trouble getting Joel&#8217;s conclusion.  For example, Dare says in <a href="http://www.25hoursaday.com/weblog/2009/09/27/DuctTapeProgrammersAndTheCultureOfComplexityInSoftwareProjects.aspx">culture of complexity</a> that &#8220;it&#8217;s OK to create a solution that solves 80% of the problem&#8221;.  <a href="http://www.joelonsoftware.com/articles/fog0000000020.html">No it&#8217;s not</a>, wrote Joel a long time ago.  </p>

	<blockquote>
		<p>&#8220;Convenient though it would be if it were true, Mozilla [Netscape 1.0] is not big because it&#8217;s full of useless crap. Mozilla is big because your needs are big. Your needs are big because the Internet is big. There are lots of small, lean web browsers out there that, incidentally, do almost nothing useful. But being a shining jewel of perfection was not a goal when we wrote Mozilla.&#8221;</p>
	</blockquote>

	<p>That&#8217;s in quotes because Joel was quoting somebody there.  He was <a href="http://www.jwz.org/doc/easter-eggs.html">quoting <span class="caps">JWZ</span></a>.  So the wrong conclusion to draw from Joel&#8217;s message is that &#8220;it&#8217;s OK to ship an 80% solution&#8221;.</p>

	<p>Then <a href="http://blog.objectmentor.com/articles/2009/09/24/the-duct-tape-programmer">Bob Martin</a>  opines &#8220;I found myself annoyed at Joel’s notion that most programmers aren’t smart enough to use templates, design patterns, multi-threading, <span class="caps">COM</span>, etc. I don’t think that’s the case. I think that any programmer that’s not smart enough to use tools like that is probably not smart enough to be a programmer period.&#8221;  To which I say <a href="http://blogs.msdn.com/oldnewthing/archive/2009/09/25/9899238.aspx">oh, really?</a></p>

	<blockquote>
		<p>My exercise to you, commenter &#8220;foo&#8221;, is to come up with a list of all bugs in IUnknown::QueryInterface which Windows should enforce and describe how to enforce it. (If your response is &#8220;You should have designed it differently so these bugs are impossible to write&#8221;, please outline that alternate bug-resistant design. Remember that your design must be language-independent, while still supporting things like tear-offs, aggregation, and remote objects. Oh and it needs to work on typical PC-class computers of the early 1990&#8217;s, which ran at 25MHz with 4MB of memory.) </p>
	</blockquote>

	<p>Is it just me, or does Raymond&#8217;s summation of <span class="caps">COM</span>&#8217;s design constraints sound something like &#8220;be everything to everyone&#8221;?  So, no, <span class="caps">COM</span> doesn&#8217;t seem to fit anywhere into the duct tape programmer&#8217;s toolbox. But on the other hand, <span class="caps">COM</span> is definitely not an 80% solution.  More like a 110% solution.  Either way, I don&#8217;t feel dumb for not remembering enough <span class="caps">COM</span> to fill a postage stamp.</p>

	<p>Now, there&#8217;s <a href="http://www.tbray.org/ongoing/When/200x/2009/09/25/On-Duct-Tape">Tim Bray&#8217;s opinion</a>, which is mostly a defense of unit testing.  But I&#8217;ll just note that <span class="caps">JWZ</span> didn&#8217;t say that unit tests are a waste of time, just that he was under such intense time pressure that he <em>didn&#8217;t have</em> time to write many.  So Joel&#8217;s really out on his own here.  On the other hand, Tim readily admits that he hasn&#8217;t read the <span class="caps">JWZ</span> interview that Joel&#8217;s enthusing over, so maybe his opinion shouldn&#8217;t count for much.</p>

	<p>But at this point, I really have to ask what the fuck is a &#8220;duct tape programmer&#8221; anyway?  It sounds suspiciously like marketing bullshit for people who are chronically predisposed to despise marketing types.  Yet we, programmers, do this to ourselves constantly.  In spite of hearing and acknowledging for years that there is no silver bullet, there&#8217;s never a shortage of people who should know better proclaiming a silver bullet, or silver adhesive-backed cloth in this case.  Judging by the stats in Google Reader (something over 100 people &#8220;liked&#8221; Joel&#8217;s article), we&#8217;re back here again.  So maybe we should get a real definition of a <span class="caps">DTP</span>:</p>

	<ul>
		<li>Favors known technologies.</li>
		<li>Maximizes the ratio of code that delivers direct functionality to support code (ie. production code to test cases)</li>
	</ul>
	<ul>
		<li>Believes that worse is better, i.e. &#8220;a 50% solution is better than a 99% solution&#8221;.</li>
	</ul>

	<p>Screeching tires.  Wait a minute.  Didn&#8217;t I just say that 80% wasn&#8217;t good enough?  Or rather, Joel said that.  <span class="caps">JWZ</span> did too.  Another conclusion negated.  So let&#8217;s say that there&#8217;s some middle ground out there, or maybe an extreme&#8230; either 50% or 99%.</p>

	<p>All these words and nothing is learned.  Surely there must be something to learn here.  How about looking in the conclusion of Joel&#8217;s piece&#8230; oh yes, here it is: &#8220;duct tape programmers are the software world equivalent of pretty boys&#8221;.  That&#8217;s it, they&#8217;re born that way.   Useful conclusion, that.</p>

	<p>The thing is, I&#8217;d guess that <a href="http://jwz.livejournal.com/1096593.html"><span class="caps">JWZ</span> agrees with me</a>, as did <a href="http://gigamonkeys.com/blog/2009/09/28/a-tale-of-two-rewrites.html">Peter Siebel</a>.  Peter&#8217;s take seems to be the better summation.  <span class="caps">JWZ</span> was speaking about his time at Netscape in the context of that time and the conditions of the time.  Recall that in 1994, even just limiting yourself to the Windows platform, Microsoft and Borland had different ideas about how to do window message mapping.  And <span class="caps">JWZ</span>&#8217;s not holding up Netscape as a model of quality code either.   Speaking about maintaining quality in the code base: &#8220;Well, the way we dealt with that was badly. There’s never a time to start over and rewrite it. And it’s never a good idea to start over and rewrite it.&#8221;  </p>

	<p>There&#8217;s also another lesson about going back to the original sources when commenting on a subject, but I&#8217;ll leave that alone.</p>]]>
</content>
</entry>
<entry>
		<author>
			<name>Gordon Weakliem</name>
		</author>
		<published>2009-09-29T16:45:32Z</published>
		<updated>2009-09-30T04:39:54Z</updated>
		<title type="html">Rounding Error</title>
		<link rel="alternate" type="text/html" href="http://www.eighty-twenty.net/weblog/article/111/rounding-error" />
		<id>tag:www.eighty-twenty.net,2009-09-29:e3809a3a65eb0bb2dffc9bca6fb23f03/2801fb9135970dc8e091c01c4940b58b</id>
		<category term="tech" />
		
		<content type="html">
<![CDATA[<p>Quick quiz: what does the following code print?</p>

<pre><code>System.Out.WriteLine(Math.Round(0.5));
</code></pre>

	<p>If you answered &#8220;1&#8221;, <a href="http://msdn.microsoft.com/en-us/library/wyk4d9cy.aspx">that&#8217;s incorrect</a>.  There is a reason for this, it&#8217;s called &#8220;banker&#8217;s rounding&#8221;.  It&#8217;s nicely documented in the <span class="caps">MSDN</span> docs for the function.  It&#8217;s also completely deceptive to the unwary programmer.  We&#8217;re all trained in elementary math to think that Math.Round(0.5) returns 1.  Banker&#8217;s rounding is probably in general a good idea when working with a lot of numbers, but in the simple case where you want to round one number, away from zero is the expected behavior.  As of .NET 2.0, there&#8217;s an option to do this, but it&#8217;s still not the default.  </p>

	<p>The one lesson I got from this is that you can&#8217;t assume anything about your code.  It just reinforced the need for really, really granular unit tests.</p>]]>
</content>
</entry></feed>
