<?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>Patrick Dubroy &#187; programming</title>
	<atom:link href="http://dubroy.com/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://dubroy.com/blog</link>
	<description>programming, usability, and interaction design</description>
	<lastBuildDate>Wed, 21 Apr 2010 18:05:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Are short methods actually worse?</title>
		<link>http://dubroy.com/blog/method-length-are-short-methods-actually-worse/</link>
		<comments>http://dubroy.com/blog/method-length-are-short-methods-actually-worse/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 21:12:32 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2009/03/09/method-length-are-short-methods-actually-worse/</guid>
		<description><![CDATA[I ran across an interesting post on programming.reddit called Anecdote Driven Development, or Why I Don't Do TDD. The article focused on testing, but what I found most interesting was the part about how long a method or function should be. I've believed for a long time that shorter methods AREN'T better, but here is some actual, empirical evidence to justify that claim.]]></description>
			<content:encoded><![CDATA[<p>I ran across an interesting post on <a href="http://www.reddit.com/r/programming">programming.reddit</a> called <a href="http://use.perl.org/~Ovid/journal/38616">Anecdote Driven Development, or Why I Don&#8217;t Do TDD</a>. The article focused on testing, but what I found most interesting was the part about how long a method or function should be:</p>

<blockquote>
  <p>I recently wrote some code for Class::Sniff which would detect &#8220;long methods&#8221; and report them as a code smell. [...] 
  Ben Tilly asked an embarrassingly obvious question: how do I know that long methods are a code smell?</p>
  
  <p>I threw out the usual justifications, but he wouldn&#8217;t let up. He wanted information and he cited the excellent book <a href="http://www.amazon.com/Complete-Microsoft-Programming-Steve-McConnell/dp/1556154844">Code 
  Complete</a> as a counter-argument. I got down my copy of this book and started reading &#8220;How Long Should A Routine Be&#8221; 
  (page 175, second edition). The author, Steve McConnell, argues that routines should not be longer than 200 lines. Holy 
  crud! That&#8217;s waaaaaay to long. If a routine is longer than about 20 or 30 lines, I reckon it&#8217;s time to break it up.</p>
  
  <p>Regrettably, McConnell has the cheek to cite six separate studies, all of which found that longer routines were not only 
  not correlated with a greater defect rate, but were also often cheaper to develop and easier to comprehend.</p>
</blockquote>

<p>I&#8217;d never heard this before, but this is great, because it verifies what I&#8217;ve believed for a long time&#8230;</p>

<h3>That which obscures my code is bad</h3>

<p>Last year I wrote a post called <a href="http://dubroy.com/blog/2008/05/06/if-this-is-object-calisthenics-i-think-ill-stay-on-the-couch/">If this is Object Calisthenics, I think I’ll stay on the couch</a> where I argued (among other things) that making your methods as short as possible is NOT a good idea. My justification was that it just makes the code more complicated: &#8220;That which obscures my code is bad.&#8221; But this is even better&#8230;actual empirical evidence.</p>

<p>I don&#8217;t have a copy of Code Complete, so I did a bit more research to see if I could find the actual studies. I found a good summary <a href="http://www.augustana.ca/~mohrj/courses/2003.fall/csc220/lecture_notes/routines.html">here</a> (links added by me):</p>

<blockquote>
  <p>McConnell cites the findings of several studies of the correlation between the size of routines and the cost 
  and/or fault rate of routines. Some findings which favor longer routines are:</p>
  
  <ul>
  <li>Routine size is inversely correlated with errors, up to 200 lines of code. [Basili and Perricone, 1984]</li>
  <li>Larger routines (65 lines of code or more) are cheaper to develop per line of code. [<a href="http://portal.acm.org/citation.cfm?id=9802">Card, Church, and Agresti, 1986</a>; <a href="http://portal.acm.org/citation.cfm?id=78165">Card and Glass, 1990</a>]</li>
  <li>Routines with fewer than 143 source statements (including comments) had 23% more errors per line of code than larger routines. [<a href="https://www.cs.umd.edu/~basili/publications/journals/J42.pdf">Selby and Basili, 1991</a>]</li>
  <li>Routines averaging 100 to 150 lines of code need to be changed least. [<a href="http://portal.acm.org/citation.cfm?id=65481">Lind and Vairavan, 1989</a>]</li>
  </ul>
</blockquote>

<p>Hmmm. It looks like the studies are all about 20-25 years old. I wonder if &#8212; or how &#8212; the results would apply now. I took a quick look at the papers (the ones I could get my hands on), and the programming languages used were: Fortran [Card '86], Pascal and Fortran [Lind '89], and a mix of custom languages (one being PL/1-like) and assembly [Selby '91].</p>

<p>Does anyone know of any more current results? (<a href="http://third-bit.com/">Greg</a>?) It would be interesting to see if this can be shown with more modern languages. But intuitively, it makes sense. In her book <a href="http://books.google.com/books?id=jNka_Fi-dB8C&amp;pg=PA269&amp;dq=design+complexity+really+involves+two+aspects+software+engineering">Software Engineering: Theory and Practice</a>, Joanne Atlee summarizes it nicely:</p>

<blockquote>
  <p>Card and Glass (1990) point out that the design complexity really involves two aspects: the complexity within 
  each component and the complexity of the relationships among components.</p>
</blockquote>

<p><strong>By making your methods shorter, you&#8217;re just trading one kind of complexity for another.</strong></p>

<hr />

<p><strong>Update:</strong> In the comments, Stephane Vaucher pointed to a much more recent study (from 2002): <a href="http://www.cistel.com/free_expertise/publications/Cistel-2002-01.pdf">The Optimal Class Size for Object-Oriented Software</a>. They point out that the conclusion that shorter methods are more error-prone is misleading, at best:</p>

<blockquote>
  <p>The observed phenomenon of smaller components having a higher fault density is due to an arithmetic artifact.
  First, note that the above conclusions were drawn based exclusively on examination of the relationship between 
  fault <em>density</em> versus size [...] However, by definition, if we model the relationship between any variable X and 1/X, 
  we will get a negative association as long as the relationship between size and faults is growing at most linearly.</p>
</blockquote>

<p>Another way of putting it is: short methods may have more defects <em>per line</em>, but they still have fewer defects overall. There may be a justification for not making methods too short, but these studies do not provide one.</p>

<p>The one sure thing is that <strong>the more code you write, the more bugs you will have.</strong> </p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/method-length-are-short-methods-actually-worse/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Could visualization help make better software?</title>
		<link>http://dubroy.com/blog/could-visualization-help-make-better-software/</link>
		<comments>http://dubroy.com/blog/could-visualization-help-make-better-software/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 17:59:09 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[infoviz]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/12/18/could-visualization-help-make-better-software/</guid>
		<description><![CDATA[Writing software is incredibly hard. Every programmer knows this. The software we write is complex, unreliable, and difficult to maintain. And this isn&#8217;t a new thing &#8212; the term &#8220;the software crisis&#8221; was coined in 1968. 

The thing about software is that it&#8217;s remarkably easy to write a program that mostly works. And it&#8217;s difficult [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Writing software is incredibly hard.</strong> Every programmer knows this. The software we write is complex, unreliable, and difficult to maintain. And this isn&#8217;t a new thing &#8212; the term &#8220;the software crisis&#8221; was coined in <em>1968</em>. </p>

<p>The thing about software is that it&#8217;s remarkably easy to write a program that <em>mostly</em> works. And it&#8217;s difficult to tell the difference between a quick hack and a stable, reliable, and robust system, because the software development process produces almost no visible artifacts.</p>

<p>When you look at a building, it&#8217;s easy to get a quick sense of how well-built it is. Which of the two buildings below would you rather be in during a heavy storm?</p>

<div align="center">
<a href="http://flickr.com/photos/seier/1244185274/"><img id="image230" src="http://dubroy.com/blog/wp-content/uploads/2008/12/glass1.jpg" alt="&quot;christiania, glass house, august 2007&quot; by seier+seier+seier on Flickr" /></a>
<a href="http://flickr.com/photos/london/382065084/"><img id="image231" src="http://dubroy.com/blog/wp-content/uploads/2008/12/glass2.jpg" alt="&quot;This incredible house was featured in WIRED magazine!&quot; by jonrawlinson on Flickr" /></a>
</div>

<p>Besides the program itself, the only visible artifact of the software development process is the source code. And that is only viewed by the programmers, through the tiny lens of the text editor. <strong>What if we could make the entire process more visible?</strong></p>

<p>I&#8217;m thinking of visualizations along the lines of the <a href="http://www.visualcomplexity.com/vc/project.cfm?id=392">comparison of system calls in Linux/Apache and Windows/IIS</a> that I posted a while back. But this is just one idea. What other ways could we visualize <a href="http://c2.com/xp/CodeSmell.html">Code Smells</a>? (Maybe we could actually smell them!)</p>

<p>Aside from visualizing various aspects of the source code itself, could we show how well tested a piece of software is? We could show how many tests were run recently, what their results were, how good the code coverage is, the number of crashes encountered in the field, etc. With projectors and LCD displays being so cheap these days, there&#8217;s no reason a development team couldn&#8217;t have a few displays dedicated to these kinds of visualizations.</p>

<p>What do you think? Could this help improve the quality of software? What if companies openly published these kinds of things?</p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/could-visualization-help-make-better-software/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Actually, this IS your father&#8217;s text editor</title>
		<link>http://dubroy.com/blog/actually-this-is-your-fathers-text-editor/</link>
		<comments>http://dubroy.com/blog/actually-this-is-your-fathers-text-editor/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 21:26:27 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[hci]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/07/09/actually-this-is-your-fathers-text-editor/</guid>
		<description><![CDATA[This week, I&#8217;m doing all my coding on a borrowed MacBook. It&#8217;s the most time I&#8217;ve ever spent doing development on a Mac. I&#8217;ve done a bit here and there on my Mac Mini, but usually I just use that for web browsing, downloading episodes of Degrassi High, and such.

Of course I needed a text [...]]]></description>
			<content:encoded><![CDATA[<p>This week, I&#8217;m doing all my coding on a borrowed MacBook. It&#8217;s the most time I&#8217;ve ever spent doing development on a Mac. I&#8217;ve done a bit here and there on my Mac Mini, but usually I just use that for web browsing, downloading episodes of Degrassi High, and such.</p>

<p>Of course I needed a text editor, so I figured I&#8217;d give <a href="http://macromates.com">TextMate</a> a try since it&#8217;s highly recommended by many Mac hackers. My first impression has been good. It&#8217;s a got a nice, simple, no-frills interface, some slick built-in themes (Espresso Libre ftw!), and the bundles come in pretty handy.</p>

<p>I&#8217;ve found a few small things that have thrown off my rhythm though. The regular find command (&#8984;-F) doesn&#8217;t do an incremental search, and hitting Enter again doesn&#8217;t bring up the next match. Yes, I know about Ctrl-S, but geez, I gave up Emacs like <em>eons</em> ago, and I&#8217;m just <em>so</em> used to typing Ctrl-F (on Windows) or &#8984;-F (on the Mac) to search. And I want it to work that way in <em>every</em> application. </p>

<p>Another thing that I miss is the way the Home and End keys work on Windows: they move the cursor to the beginning and end of the line. On the Mac, they take you to the beginning and end of the file, which you can also do on Windows by hitting Ctrl-Home and Ctrl-End. I really miss the Windows behaviour, because it&#8217;s my favourite way to nuke a line or a whole section of code: whack Home, then hold down Shift and use the arrow keys to select the lines you want to kill.</p>

<p>Anyways, the point of this post is not to complain about TextMate, because it is a fine piece of software, and I&#8217;m sure it won&#8217;t take long for me to adapt. But this experience got me thinking about the whole experience of programming in a text editor, and made me realize that this hasn&#8217;t really changed much in 30 years.</p>

<h2>Where&#8217;s the innovation?</h2>

<p>In 2008, on almost every operating system, your choices for a text editor are roughly the same:</p>

<ul>
<li>vi, the <em>modal</em> editor for UNIX-loving, bearded hackers</li>
<li>Emacs, the <em>non-modal</em> editor for LISP-loving, bearded hackers</li>
<li>Some kind of <a href="http://en.wikipedia.org/wiki/WIMP_(computing)">WIMP</a>-y editor, for everyone else. Sure, there are plenty of &#8220;choices&#8221; in this category, but it&#8217;s like the choice between Coke, Dr. Pepper, and root beer: they&#8217;re still all sugary, caramel-coloured beverages. TextMate, Eclipse, Visual Studio, Notepad, etc. &#8212; the actual act of <em>editing text</em> is almost exactly the same in all of them. These guys basically work like your standard WYSIWYG word processor, with a few extra features for coding.</li>
</ul>

<p>Now let&#8217;s go back 30 years, to 1978. I wasn&#8217;t <em>breathing</em> 30 years ago, let alone coding, so I had to go to Google for a little history lesson. But as I understand it, here were your choices in 1978:</p>

<ul>
<li>a line editor like <a href="http://en.wikipedia.org/wiki/Ed_(text_editor)">ed</a>, which I&#8217;ve been told was roughly like trying to write with a pen tied to the end of a metre stick</li>
<li>vi, the modal editor for UNIX-loving, bearded hackers</li>
<li>Emacs, the non-modal editor for LISP-loving, bearded hackers</li>
<li>Some kind of WIMP-y editor, if you were lucky enough to be working at Xerox PARC</li>
</ul>

<p>So where&#8217;s the innovation?</p>

<p>At this point, you might be thinking, who cares? Emacs/vi/TextMate is good enough. The thing is, the text editor is still the <strong>primary user interface for coding</strong>. That&#8217;s why some people get so religious about their preference. It just seems weird to me that there have been so few attempts to try something truly new. And I find it hard to believe we reached the pinnacle of programming UIs in 1978.</p>

<h3>A few ideas</h3>

<p>Most editors are just as good for writing a blog post or screenplay as they are for writing code. But the structure of code is completely different. You rarely open up a source file and read it from beginning to end. But most programming environments seemed to be designed for that kind of workflow.</p>

<p>In the end, I think that&#8217;s the real kicker: most programming languages are file-based. For some reason, we seem to be so attached to coding in plain text with 80-character lines. If you drop this assumption, things start to get a bit more interesting. But that only takes us to where Smalltalk IDEs were at in the 80s.</p>

<p>Anyways, most of the dynamic languages aren&#8217;t <em>inherently</em> file-based. By that I mean that it&#8217;s not too difficult to interface with the interpreter without using text files. So that&#8217;s not a good excuse.</p>

<p>Here are a few things I&#8217;d love to experiment with in a programming environment:</p>

<ul>
<li><p>Better support for random access. The structure of code is more like hypertext than it is like a book. </p></li>
<li><p>Richer annotations. Comments take up valuable screen space. It would be nice to be able to have more unobtrusive comments in the code. This would also allow you to do things like have a discussion thread about a section of code, link to other relevant methods, etc. Even something as simple as comments that auto-wrap to the width of the window would be a nice touch.</p></li>
<li><p>Better support for looking at several sections of code at the same time. Some editors (including Emacs) allow you to split the window into several viewports. That&#8217;s a start, but it could be improved upon I think. That reminds me, I&#8217;ve been meaning to try <a href="http://en.wikipedia.org/wiki/Acme_(text_editor)">Acme</a> for a while.</p></li>
<li><p>Tighter integration between the editor and the runtime. One example is having your editor be able to tell you &#8220;every time you&#8217;ve run this method, this variable has been of type X&#8221;. Another example is if your editor visualized code paths &#8212; maybe you could overlay a heat map on top of the source code for profiling purposes</p></li>
<li><p>Explicit support for exploratory programming. When I code in Python, I like to keep an interactive console open, where I can try out little snippets of code. With a bit of tweaking (e.g., not tossing out my entire method when I make a syntax error on the last line), I could see this becoming a primary way to write code.</p></li>
</ul>

<p>What do you guys think? What are your favourite programming editors/environments, and why? Any other ideas about how programming UIs could be shaken up?</p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/actually-this-is-your-fathers-text-editor/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>One fine day at meshU</title>
		<link>http://dubroy.com/blog/one-fine-day-at-meshu/</link>
		<comments>http://dubroy.com/blog/one-fine-day-at-meshu/#comments</comments>
		<pubDate>Wed, 21 May 2008 01:02:45 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/05/20/one-fine-day-at-meshu/</guid>
		<description><![CDATA[I just got back from meshU, a one-day conference focused on design and development for the web. I went on a bit of a whim; the student tickets were only 30 bucks, and there were lots of interesting speakers. Well, it was a good decision &#8212; the three talks I saw were well worth the [...]]]></description>
			<content:encoded><![CDATA[<p>I just got back from <a href="http://www.meshconference.com/meshu/">meshU</a>, a one-day conference focused on design and development for the web. I went on a bit of a whim; the student tickets were only 30 bucks, and there were lots of interesting speakers. Well, it was a good decision &#8212; the three talks I saw were well worth the price.</p>

<p><em>(As an aside, I see that I&#8217;ve been added to Patrick Mueller&#8217;s <a href="http://planet-oti.muellerware.org/">Planet OTI</a> aggregator. OTIers, read on! Today&#8217;s post contains at least two OTI connections.)</em></p>

<h3>Avi Bryant: Turning the Tables: Moving Beyond Relational Storage</h3>

<p>The first talk I attended was by <a href="http://www.avibryant.com/">Avi Bryant</a> of <a href="http://dabbledb.com/">Dabble DB</a> fame. Avi talked about <strike>why</strike> <em>how</em> not to use a RDBMS. There&#8217;s been a lot of interest lately in alternatives to the relational database &#8212; <a href="http://incubator.apache.org/couchdb/">CouchDB</a>, <a href="http://aws.amazon.com/simpledb">Amazon SimpleDB</a>, and <a href="http://labs.google.com/papers/bigtable.html">Google BigTable</a> being the most famous examples.</p>

<p>Avi mentioned that there are two main cases where it&#8217;s advantageous to have something <em>other</em> than a relational database. First, if your dataset is massive, as with Google. In this case, it&#8217;s just not feasible to use a RDMS. The second case is if your dataset is really just many small, independent datasets, in which case it might be simpler and more scalable to use an alternative technique.</p>

<p>At the end of the talk, Avi demoed <a href="http://ruby.gemstone.com/">MagLev</a>, which is a Ruby interpreter built on top of a Smalltalk VM (OTI connection #1). This was <em>really</em> cool, not just because it&#8217;s Ruby running on top of Smalltalk. It was cool because MagLev can transparently persist heap objects to disk, and distribute them to other VMs, either locally or running on other machines. For example, you can define a function in one VM, and then call it from another VM. Wow. As far as I know this was the first time MagLev has been shown in public, but there&#8217;s going to be <a href="http://en.oreilly.com/rails2008/public/schedule/detail/4351">a talk at RailsConf 2008</a>.</p>

<h3>Daniel Burka: Iterative Design Strategies</h3>

<p>The second talk I attended was by <a href="http://deltatangobravo.com/">Daniel Burka</a> (OTIers probably know Daniel&#8217;s brother Peter). Daniel is the lead designer for <a href="http://digg.com">Digg</a> and a co-founder of <a href="http://pownce.com">Pownce</a>. Daniel gave a great talk on iterative design strategies. You can check out the slides <a href="http://www.slideshare.net/dburka/daniel-burka-iterative-design-strategies">here</a>.</p>

<p>It was really interesting to hear some of Daniel&#8217;s stories from Digg. He said that one of the times that they redesigned the comments, they were getting a lot of negative feedback from users. But they also noticed that under the new system, stories were getting more comments than ever before. So although there was a vocal minority who weren&#8217;t happy with the design, it was an overall success. The moral of the story is that you need to look at the implicit feedback as much as the explicit feedback.</p>

<p>Another thing I took away from Daniel&#8217;s talk was that I should read <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&amp;location=http%3A%2F%2Fwww.amazon.com%2FHow-Buildings-Learn-Happens-Theyre%2Fdp%2F0140139966&amp;tag=dubroycomblog-20&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">How Buildings Learn</a> by Stewart Brand. I&#8217;ve had this recommended to me enough times that I&#8217;ve finally decided to buy it.</p>

<h3>John Resig: Building Interactive Prototypes with jQuery</h3>

<p>John Resig is the creator of <a href="http://jquery.com">jQuery</a>, &#8220;the write less, do more Javascript library&#8221;.
This talk was pretty timely for me. I just started using jQuery a few weeks ago for a Firefox extension that I&#8217;m writing, and I&#8217;m pretty much in love with it. So it was practically guaranteed that I would like this talk, since it was further demonstration of all that is awesome about jQuery. I did learn one new thing from the talk &#8212; I&#8217;d never heard of the <a href="http://www.malsup.com/jquery/form/">jQuery Form Plugin</a> before, and it is really cool as well. </p>

<p>I&#8217;m not sure what more I can say about this one. If you&#8217;re a web developer, or a designer who codes a little, you should seriously check jQuery out.</p>

<hr />

<p>So that was my day. $30 well spent at <a href="http://www.meshconference.com/meshu/">meshU</a>. Thanks to the organizers: <a href="http://www.markevanstech.com/">Mark</a>, <a href="http://www.mathewingram.com/work/">Mathew</a>, <a href="http://www.robhyndman.com">Rob</a>, and <a href="http://stuart.blogware.com/">Stuart</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/one-fine-day-at-meshu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>If this is Object Calisthenics, I think I&#8217;ll stay on the couch</title>
		<link>http://dubroy.com/blog/if-this-is-object-calisthenics-i-think-ill-stay-on-the-couch/</link>
		<comments>http://dubroy.com/blog/if-this-is-object-calisthenics-i-think-ill-stay-on-the-couch/#comments</comments>
		<pubDate>Tue, 06 May 2008 14:56:33 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/05/06/if-this-is-object-calisthenics-i-think-ill-stay-on-the-couch/</guid>
		<description><![CDATA[Via <a href="http://weblog.raganwald.com/">Raganwald</a>, I saw this post by Andrew Birnstock: <a href="http://binstock.blogspot.com/2008/04/perfecting-oos-small-classes-and-short.html">Perfecting OO's Small Classes and Short Methods</a>. The post is a summary of an essay by Jeff Bay called Object Calisthenics, from the new Pragmatic Programmers book <a href="http://www.pragprog.com/titles/twa/thoughtworks-anthology">The ThoughtWorks Anthology</a>. "Object Calisthenics" is supposedly an exercise to get you to write better object-oriented code. Reading through the suggestions, I couldn't decide if the article was serious or not.]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://weblog.raganwald.com/">Raganwald</a>, I saw this post by Andrew Birnstock: <a href="http://binstock.blogspot.com/2008/04/perfecting-oos-small-classes-and-short.html">Perfecting OO&#8217;s Small Classes and Short Methods</a>. The post is a summary of an essay by Jeff Bay called Object Calisthenics, from the new Pragmatic Programmers book <a href="http://www.pragprog.com/titles/twa/thoughtworks-anthology">The ThoughtWorks Anthology</a>.</p>

<p>&#8220;Object Calisthenics&#8221; is supposedly an exercise to get you to write better object-oriented code. Reading through the suggestions, <strong>I couldn&#8217;t decide if the article was serious or not</strong>. From Andrew&#8217;s summary:</p>

<blockquote>
  <ol>
  <li><p>Use only one level of indentation per method. If you need more than one level, you 
  need to create a second method and call it from the first. This is one of the most important constraints in the exercise.</p></li>
  <li><p>Don’t use the ‘else’ keyword. Test for a condition with an if-statement and exit the routine if it’s not 
  met. This prevents if-else chaining; and every routine does just one thing. You’re getting the idea.</p></li>
  <li><p>Wrap all primitives and strings. This directly addresses “primitive obsession.” If you want to use an integer, 
  you first have to create a class (even an inner class) to identify it’s true role. So zip codes are an object not 
  an integer, for example. This makes for far clearer and more testable code.</p></li>
  </ol>
</blockquote>

<p>From what I can tell, this really is serious. These are supposed to be the object-oriented equivalent of chin-ups, designed to whip you into shape to write better OO code.</p>

<p>This strikes me as so bogus, I can&#8217;t even begin to describe it.</p>

<p>I&#8217;m not against OO: I&#8217;m a huge fan of Smalltalk, and I cut my programming teeth at <a href="http://en.wikipedia.org/wiki/Object_Technology_International">one of the oldest object-oriented development shops</a>. In fact, I keep thinking of something that <a href="http://inside-swt.blogspot.com/">Steve Northover</a> used to say to me when I was on my first work term at OTI:</p>

<p><strong>&#8220;That which obscures my code is bad.&#8221;</strong></p>

<p>If you&#8217;ve ever seen a large body of code that adheres to The One True OO Style<small><sup>TM</sup></small> &#8212; like say, Smalltalk class libraries &#8212; you&#8217;ll understand that almost every step you take towards &#8220;true OO&#8221; is just another way of obscuring the meaning of your code. If you break your code up into 10 different methods, then that&#8217;s 10 different places I have to look to figure out what is going on. You&#8217;re just writing spaghetti code by a different name. If you&#8217;re building a very large library, then maybe, just <em>maybe</em>, the additional flexibility is worth it.</p>

<p>I think Paul Graham sums it up best in his essay <a href="http://paulgraham.com/noop.html">Why Arc Isn&#8217;t Especially Object-Oriented</a>:</p>

<blockquote>
  <p>My own feeling is that object-oriented programming is a useful technique in some cases, 
  but it isn&#8217;t something that has to pervade every program you write. You should be able to 
  define new types, but you shouldn&#8217;t have to express every program as the definition of new types.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/if-this-is-object-calisthenics-i-think-ill-stay-on-the-couch/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>The *real* reason you want a multiple monitor setup</title>
		<link>http://dubroy.com/blog/the-real-reason-you-want-a-multi-monitor-setup/</link>
		<comments>http://dubroy.com/blog/the-real-reason-you-want-a-multi-monitor-setup/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 18:02:33 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[the brain]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/03/28/the-real-reason-you-want-a-multi-monitor-setup/</guid>
		<description><![CDATA[Despite the fact that there is little evidence that using multiple monitors will make a programmer substantially more productive, many coders will <em>subjectively</em> claim that they can't live without a second display. Why do people feel so strongly about the issue? And is it possible that the <em>perception</em> of efficiency is just as important as real efficiency?]]></description>
			<content:encoded><![CDATA[<p>Despite the fact that there is little evidence that using multiple monitors will make a programmer substantially more productive, many coders will <em>subjectively</em> claim that they can&#8217;t live without a second display. Why do people feel so strongly about the issue? And is it possible that the <em>perception</em> of efficiency is just as important as real efficiency?</p>

<h3>The Scientific Angle</h3>

<p>A few months ago, I experimented for a while with a dual-monitor setup. My main computer is a 14&#8243; Thinkpad, and I connected to either a 24&#8243; widescreen LCD (in <a href="http://www.dgp.toronto.edu/">my lab at U of T</a>) or my 20&#8243; widescreen at home. After a while, I found that I wasn&#8217;t really seeing the &#8220;obvious benefits&#8221; that some people rave about. </p>

<p>I had heard about studies that supposedly proved that you can be up to 50% more productive by adding a second display. In my post <a href="http://dubroy.com/blog/2008/01/25/multiple-monitor-productivity-fact-or-fiction/">Multiple-Monitor Productivity: Fact or Fiction?</a> I looked at these studies, and concluded that in some isolated tasks &#8212; like cutting and pasting, or working with a large spreadsheet &#8212; you can see a significant benefit if you add a second monitor. But for most programming tasks, the benefits are going to be minimal (but still there).</p>

<p>After another study was recently published by some researchers at the University of Utah, <a href="http://codinghorror.com">Jeff Atwood</a> took the time to put together a summary of the studies of all the studies we could find &#8212; a <a href="http://www.codinghorror.com/blog/archives/001076.html">&#8220;a one-stop-shop for research data supporting the idea that, yes, having more display space <em>would</em> in fact make you more productive&#8221;</a>. In case you couldn&#8217;t tell, Jeff is a big fan of multi-monitor setups:</p>

<blockquote>
  <p>I have three monitors at home and at work. I&#8217;m what you might call a true believer. 
  I&#8217;m always looking for ammunition for fellow developers to claim those second (and maybe even third) 
  monitors that are rightfully theirs under the Programmer&#8217;s Bill of Rights.</p>
</blockquote>

<h3>The Subjective Claims</h3>

<p>If you read the comments on Jeff&#8217;s article, you&#8217;ll see that, despite the lack of empirical evidence that <em>programming</em> tasks will significantly benefit from multiple monitors, many programmers are pretty attached to idea: </p>

<ul>
<li><p><a href="http://www.codinghorror.com/mtype/mt-comments-renamed.cgi?__mode=red&amp;id=49145">Leon Mergen</a>: &#8220;People who claim there is no benefit (or little benefit) in programming with multiple monitors, obviously haven&#8217;t really expercienced it.&#8221;</p></li>
<li><p><a href="http://www.codinghorror.com/mtype/mt-comments-renamed.cgi?__mode=red&amp;id=49140">SB</a>: &#8220;Have you ever actually <em>used</em> (like, for many months/years) multiple LCDs? &#8230; I don&#8217;t know how a programmer could go from multi-LCD setup to single display &amp; not claim some, even if minor, productivity dropoff.&#8221;</p></li>
<li><p><a href="http://www.codinghorror.com/mtype/mt-comments-renamed.cgi?__mode=red&amp;id=49144">Brian</a>: &#8220;I personally find that in my case having a second monitor is ALWAYS more convenient and increases productivity.&#8221;</p></li>
</ul>

<p>This morning I finally ran across a paper which talks about these subjective benefits. Jonathan Grudin&#8217;s <a href="http://research.microsoft.com/pubs/69810/tr-2000-94.pdf">Partitioning Digital Worlds: Focal and Peripheral Awareness in Multiple Monitor Use</a> has some interesting insights. Grudin interviewed 18 people who used multiple-monitor setups, and came to the conclusion that:</p>

<blockquote>
  <p>A second monitor improves efficiency in ways that are difficult to measure yet can have 
  substantial subjective benefit.</p>
</blockquote>

<p>One of his interesting observations was that it&#8217;s not just about the screen real-estate, it&#8217;s also about the <em>partitioning</em> (emphasis mine):</p>

<blockquote>
  <p>A strong demonstration that multiple monitors can be more about partitioning than about increasing 
  space is provided by the <strong>two participants who dock their constantly synchronizing palmtop computers 
  next to their desktop monitors</strong>. One keeps his calendar visible on the palmtop, the other keeps email visible. 
  <strong>The increase in space provided by the palmtop display is not significant</strong> and there is no information on the 
  palmtop that is not available to the desktop computer. <strong>The value is in having instant access to a
  resource in a known location in peripheral vision.</strong></p>
</blockquote>

<p>This the same <a href="http://www.codinghorror.com/blog/archives/000012.html">conclusion that Jeff made after seeing the results of a small, informal multiple monitor productivity study</a>: two monitors is better than one large monitor.</p>

<p>Another interesting finding in Grudin&#8217;s paper was just how much people hate to use the taskbar or Alt-Tab to switch windows:</p>

<blockquote>
  <p>Given the ease of minimizing and restoring windows, why bother with a second monitor? Repeatedly, people 
  indicated that they considered it a relief not to have to use buttons, “escaping from the need to Alt-Tab.” 
  The ability to avoid a few keystrokes is welcomed with great subjective enthusiasm, although it might be 
  difficult to objectively measure an efficiency gain.</p>
</blockquote>

<h3>Perception vs. Reality</h3>

<p>To me, this really captures what the argument&#8217;s all about. <strong>It&#8217;s not necessarily about <em>actually</em> being more productive &#8212; <em>perceived</em> productivity is just as important.</strong> It reminds me of <a href="http://www.asktog.com/TOI/toi06KeyboardVMouse1.html">Bruce Tognazzini&#8217;s famous finding on the relative speed of the mouse vs. the keyboard</a>:</p>

<blockquote>
  <p>We’ve done a cool $50 million of R &amp; D on the Apple Human Interface. We discovered, among other things, 
  two pertinent facts:</p>
  
  <ul>
  <li>Test subjects consistently report that keyboarding is faster than mousing.</li>
  <li>The stopwatch consistently proves mousing is faster than keyboarding. </li>
  </ul>
  
  <p>This contradiction between user-experience and reality apparently forms the basis for many user/developers’ 
  belief that the keyboard is faster.</p>
</blockquote>

<p>In my experience, many people who love multiple monitors are the same people who are obsessed with knowing every keyboard shortcut in their text editor, and who can&#8217;t live without <a href="https://addons.mozilla.org/en-US/firefox/addon/39">mouse gestures in Firefox</a>.</p>

<p>Don&#8217;t get me wrong. Even if the benefits are unproven, minimal, or even non-existent (as in the mouse vs. keyboard case) &#8212; it doesn&#8217;t really matter. <strong>The most important thing is that you, as a programmer, have the tools that you <em>want</em> to do your job.</strong> I definitely don&#8217;t question the productivity benefits of being happy.</p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/the-real-reason-you-want-a-multi-monitor-setup/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>A Hierarchy of Needs for Code</title>
		<link>http://dubroy.com/blog/a-hierarchy-of-needs-for-code/</link>
		<comments>http://dubroy.com/blog/a-hierarchy-of-needs-for-code/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 00:44:10 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/02/27/a-hierarchy-of-needs-for-code/</guid>
		<description><![CDATA[A couple weeks ago, I trekked through another Toronto snowstorm all the way up to the Canadian Film Centre. Normally I&#8217;m a downtown snob and don&#8217;t go north of Bloor, but I made an exception this time because my friend Geneviève was demoing a project at the CFC Media Lab.

A Hierarchy of Needs for Design

While [...]]]></description>
			<content:encoded><![CDATA[<p>A couple weeks ago, I trekked through another Toronto snowstorm all the way up to the <a href="http://www.cfccreates.com/">Canadian Film Centre</a>. Normally I&#8217;m a downtown snob and don&#8217;t go north of Bloor, but I made an exception this time because my friend Geneviève was demoing a project at the CFC Media Lab.</p>

<h3>A Hierarchy of Needs for Design</h3>

<p>While I was there, I happened across a copy of <a href="http://www.amazon.com/gp/product/1592530079?ie=UTF8&amp;tag=dubroycomblog-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1592530079">Universal Principles of Design</a>. It&#8217;s a really cool book which describes 100 design principles: from general-purpose concepts like Ockham&#8217;s Razor and the 80/20 rule, to specific techniques like Iconic Representation (&#8221;the use of pictorial to improve the recognition and recall of signs and controls&#8221;). It&#8217;s kind of like a universal set of design patterns.</p>

<p>I only had a chance to flip through the book for a few minutes, but I really liked what I read. And <a href="http://www.jnd.org/recommended_readings.html">Donald Norman recommends it</a>, for what it&#8217;s worth.</p>

<p>One of the principles that I really liked was Hierarchy of Needs. Inspired by <a href="http://honolulu.hawaii.edu/intranet/committees/FacDevCom/guidebk/teachtip/maslow.htm">Abraham Maslow&#8217;s famous psychology theory</a>, the authors proposed a Hierarchy of Needs for design:</p>

<blockquote>
  <p>A design must serve the low-level needs (e.g., it must function), before 
  the higher-level needs, such as creativity, can begin to be addressed.
  Good designs follow the hierarchy of needs principle, whereas poor designs may 
  attempt to meet needs from the various levels without building on the lower levels 
  of the hierarchy first.</p>
</blockquote>

<div align="center">
<a href="http://dubroy.com/blog/wp-content/uploads/2008/02/hierarchy.png">
<img id="image193" src="http://dubroy.com/blog/wp-content/uploads/2008/02/hierarchy-small.PNG" alt="Design Hierarchy of Needs" /></a></div>

<h3>What about the code?</h3>

<p>This got me thinking about coding. As a programmer, you are designing not only the product itself, but also the code. For the end product (the software that you are producing) the Design Hierarchy of Needs can be applied. But what about the code? <strong>What would a hierarchy of needs for code look like?</strong> Here&#8217;s what I came up with, but I&#8217;d like to hear what everbody else thinks.</p>

<p>Keep in mind that this is a hierarchy of importance, with the lower levels being more important. <strong>It&#8217;s most definitely not a sequence of steps.</strong></p>

<div align="center"><a href="http://dubroy.com/blog/wp-content/uploads/2008/02/programming-hierarchy.png">
<img id="image196" src="http://dubroy.com/blog/wp-content/uploads/2008/02/programming-hierarchy-small.PNG" alt="Hierarchy of Needs for Code" /></a></div>

<ul>
<li><strong>Functionality:</strong> If your code doesn&#8217;t work, there&#8217;s no point in optimizing that inner loop, or refactoring it to be infinitely flexible.</li>
<li><strong>Reliability:</strong> Any software developer worth his salt knows that there&#8217;s a big difference between code that &#8220;works&#8221;, and code that is ready to be shipped. After your code is functional, you need to make sure that it is reliable. Run it through your unit tests, run it overnight, run it on grandma&#8217;s computer.</li>
<li><strong>Maintainability:</strong> Can other people understand the code? Can <em>you</em> understand the code? When bugs are discovered, you need to be able to fix a bug and be confident that you won&#8217;t be causing more bugs in the process.</li>
<li><strong>Extensibility:</strong> Is your code adaptable to meet new requirements? If your code is extensible, you will be able to grow and adapt your software to meet the changing needs of your customers. If not, you might have to throw it out and start from scratch.</li>
<li><strong>Elegance &amp; Efficiency:</strong> If you are sure you are meeting the other levels of need, <em>then and only then</em> should you worry about making your code fast and beautiful. Unfortunately, many people get hung up on this level instead of focusing on the more basic needs.</li>
</ul>

<p>What do you guys think? Anything you&#8217;d change about it?</p>

<hr />

<p><em>Related: Andrew McKinlay wrote about <a href="http://thesoftwarelife.blogspot.com/2008/01/programming-hierarchy-of-needs.html">A Programming Hierarchy of Needs</a>, and Oliver Steele proposed <a href="http://osteele.com/archives/2008/01/programmers-pyramid">The Programmer’s Food Pyramid</a>. Kathy Sierra, whose blog <a href="http://headrush.typepad.com/creating_passionate_users/">Creating Passionate Users</a> I sadly miss, also tackled the user hierarchy of needs, and asked <a href="http://headrush.typepad.com/creating_passionate_users/2007/01/what_comes_afte.html">What comes after usability?</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/a-hierarchy-of-needs-for-code/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Multiple-Monitor Productivity: Fact or Fiction?</title>
		<link>http://dubroy.com/blog/multiple-monitor-productivity-fact-or-fiction/</link>
		<comments>http://dubroy.com/blog/multiple-monitor-productivity-fact-or-fiction/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 18:50:52 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[hci]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/01/25/multiple-monitor-productivity-fact-or-fiction/</guid>
		<description><![CDATA[It seems to be accepted wisdom, especially in programming circles, that more screen real estate makes you more productive. I&#8217;ve heard claims that you can increase your productivity by up to 50% just by adding a second display. After four months of using a big-ass LCD for development, I recently switched back to a 14&#8243; [...]]]></description>
			<content:encoded><![CDATA[<p>It seems to be accepted wisdom, especially in programming circles, that more screen real estate makes you more productive. I&#8217;ve heard claims that you can increase your productivity by up to 50% just by adding a second display. After four months of using a big-ass LCD for development, I recently switched back to a 14&#8243; laptop screen. And you know what? I don&#8217;t feel like I&#8217;ve missed a stride. So I decided to take at the facts behind the claim that more screen real estate makes you more productive.</p>

<h3>The Claims</h3>

<p>Jeff Atwood writes <a href="http://www.codinghorror.com/blog/">an excellent blog on programming and human factors</a>, and he is an unabashed fan of multiple monitors. In his post <a href="http://www.codinghorror.com/blog/archives/000012.html">Multiple Monitors and Productivity</a>, he writes that using multiple monitors &#8220;is really a no-brainer for any developer who values his or her time.&#8221; He stresses the fact that it&#8217;s not purely about screen real estate &#8212; he recommends using two or three smaller displays rather than one huge one. The reason is that with bigger displays, the window management actually gets more complicated. This is what Jeff calls <a href="http://www.codinghorror.com/blog/archives/000928.html">The Large Display Paradox</a>.</p>

<p>Joel Spolsky is another well-known champion of a multiple-monitor setup for programmers. In <a href="http://www.joelonsoftware.com/articles/fog0000000043.html">The Joel Test: 12 Steps to Better Code</a>, he advocates giving your programmers the best tools money can buy. And according to Joel, this means multiple monitors:</p>

<blockquote>
  <p>Debugging GUI code with a single monitor system is painful if not impossible. If you&#8217;re writing GUI code, two monitors will make things much easier.</p>
</blockquote>

<p>It&#8217;s not just Jeff and Joel. Take a look at the discussion thread on the Slashdot article <a href="http://developers.slashdot.org/article.pl?sid=03/10/09/137232&amp;mode=thread&amp;tid=137&amp;tid=196">Multiple Monitors and Productivity</a>, or <a href="http://ask.metafilter.com/31977/Where-can-I-find-case-studies-on-productivity-gains-from-dual-monitors-for-developers">Ask Metafilter: Where can I find case studies on productivity gains from dual monitors for developers?</a>. Even the New York Times published an article on <a href="http://www.nytimes.com/2006/04/20/technology/20basics.html?ei=5090&amp;en=6fc17b9bf54ea2ef&amp;ex=1303185600&amp;adxnnl=1&amp;partner=rssuserland&amp;emc=rss&amp;adxnnlx=1145537733-/Kdyvqpu0/eVBVNBYUcsqg">The Virtues of a Second Screen</a>:</p>

<blockquote>
  <p>Survey after survey shows that whether you measure your productivity in facts researched, alien spaceships vaporized, 
  or articles written, adding an extra monitor will give your output a considerable boost — 20 percent to 30 percent, according 
  to a survey by Jon Peddie Research.</p>
</blockquote>

<h3>My Doubts</h3>

<p>I definitely agree that for some tasks, it&#8217;s really helpful to have some extra screen real estate. If you&#8217;re a graphic designer, you probably don&#8217;t want to be peering at your poster layout through a 13&#8243; keyhole. But for programmers, how many tasks actually benefit from more screen space? If I need to look at API documentation while I&#8217;m coding, I have no problem switching to another window to start writing my code. And on my 14&#8243; widescreen laptop screen, there&#8217;s more than enough room to compare two pieces of code side-by-side:</p>

<p><a href="http://dubroy.com/blog/wp-content/uploads/2008/01/sidebyside.png">
<img id="image185" src="http://dubroy.com/blog/wp-content/uploads/2008/01/sidebyside-small.PNG" alt="Side by side code" />
</a></p>

<p>In the end, I think it&#8217;s a case of micro-optimization. There are lots of small tasks that can be made slightly more efficient if you have a second monitor. <strong>But these tasks are not the real bottlenecks to programmer productivity.</strong> If you were a writer, would you expect to increase your productivity if you could avoid changing sheets of paper in your typewriter?</p>

<h3>The Evidence</h3>

<p>So what about the actual hard evidence? Let&#8217;s take a look at the studies that supposedly show this increase in productivity.</p>

<p>An article on the Microsoft Research site entitled <a href="http://research.microsoft.com/displayArticle.aspx?id=433">Two Screens Are Better Than One</a> claims that researchers &#8220;found a tool that can increase your productivity by 9 to 50 percent and make your work day easier.&#8221; Since the article didn&#8217;t actually cite the studies, I had to do a little digging. I found a paper called <a href="http://research.microsoft.com/pubs/64317/interact2003-productivitylargedisplays.pdf">Toward Characterizing the Productivity Benefits of Very
Large Displays</a> which found <strong>a 9% improvement in a series of tasks that involved cutting-and-pasting and scanning a document for information.</strong></p>

<p>Not bad, actually. A 9% improvement in tasks that are highly applicable to programming. But on the other hand, how much time do you actually spend in a typical day doing these kinds of tasks? And how much time do you spend typing, whiteboarding, talking to your co-workers, and just staring into the distance and thinking about a problem? Let&#8217;s be generous and assume that you spend a quarter of your day performing tasks like in the study. So by using a bigger display, you might be able to improve your productivity by about 2.5%. Remember, studies have shown more that a rock-star coder can be an order of magnitude more productive than your average joe <sup><a href="#footnote1">1</a></sup>. Do you think these guys are more productive because they can cut and paste faster?</p>

<p>Okay, so we know where they got the 9%. What about the 50%? &#8220;Further studies showed even greater increases &#8211; at times up to 50 percent for tasks such as cutting and pasting.&#8221; Aha, there it is again. Cutting and pasting. Well, if your job includes 7.5 hours a day of cutting and pasting, then maybe you can cut that down to 5. You might make it a bit longer before you stab yourself in the eye due to the mind-numbing boredom.</p>

<p>Another study I&#8217;ve seen cited a few times is the <a href="http://images.apple.com/displays/pdf/cinemadisplay30report.pdf">The 30 inch Apple Cinema HD display productivity benchmark</a> by Pfeiffer Consulting. This study showed that a 30&#8243; display made users significantly more productive than a 17&#8243; display. But the tasks were mostly designer centric, except for a task that involved manipulating a large spreadsheet, and one of combining several Word documents into another document (cutting and pasting again!).</p>

<h3>Conclusion</h3>

<p>After looking at the studies, I think it&#8217;s fair to say that some tasks can be made significantly faster if you have more screen real estate. On the other hand, I think it&#8217;s clear that <strong>most programmers are not going to be 50% more productive over the course of a day just by getting a second monitor.</strong> The tasks that can be improved are not the bottleneck to programmer productivity.</p>

<p>On the other hand, if you just can&#8217;t live without your dual- or triple-monitor setup, fine! I definitely agree that it can be nice sometimes. I personally find it difficult to manage the extra screen real estate, but that&#8217;s just me. If you&#8217;re a developer and you want a dual-monitor setup, then that should be reason enough for your boss to buy one. As <a href="http://www.joelonsoftware.com/articles/fog0000000043.html">Joel says</a>:</p>

<blockquote>
  <p>Top notch development teams don&#8217;t torture their programmers. Even minor frustrations caused by using underpowered 
  tools add up, making programmers grumpy and unhappy. And a grumpy programmer is an unproductive programmer.</p>
</blockquote>

<p>Just don&#8217;t think that by adding a second monitor, you&#8217;ll start coding circles around the guy on his ThinkPad.</p>

<hr />

<p><a name="footnote1">&#91;1&#93;</a>: The fabled &#8220;10 fold difference&#8221; in programmer productivity is a discussion for another day. If you want to dive in, you could start with Jeff Atwood&#8217;s post on <a href="http://www.codinghorror.com/blog/archives/000072.html">Skill Disparities in Programming</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/multiple-monitor-productivity-fact-or-fiction/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>What interaction programming is, and why it matters</title>
		<link>http://dubroy.com/blog/what-interaction-programming-is-and-why-it-matters/</link>
		<comments>http://dubroy.com/blog/what-interaction-programming-is-and-why-it-matters/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 19:56:05 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[hci]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2008/01/18/what-interaction-programming-is-and-why-it-matters/</guid>
		<description><![CDATA[

I&#8217;ve just started reading Harold Thimbleby&#8217;s Press On: Principles of Interaction Programming, kindly lent to me by Greg Wilson. I&#8217;ve just finished reading the introduction, but one thing stands out to me already. Maybe you noticed it already: the subtitle of the book is Principles of Interaction Programming.

What the hell is Interaction Programming?

I don&#8217;t know [...]]]></description>
			<content:encoded><![CDATA[<p><img id="image182" src="http://dubroy.com/blog/wp-content/uploads/2008/01/presson.jpg" alt="Cover of &quot;Press On: Principles of Interaction Programming&quot;" style="float: left; margin-right: 1em;"/></p>

<p>I&#8217;ve just started reading Harold Thimbleby&#8217;s <a href="http://www.amazon.com/Press-Interaction-Programming-Harold-Thimbleby/dp/0262201704">Press On: Principles of Interaction Programming</a>, kindly lent to me by <a href="http://www.third-bit.com/">Greg Wilson</a>. I&#8217;ve just finished reading the introduction, but one thing stands out to me already. Maybe you noticed it already: the subtitle of the book is Principles of <strong>Interaction Programming</strong>.</p>

<h3>What the hell is Interaction Programming?</h3>

<p>I don&#8217;t know about you, but until I picked up this book, I&#8217;d never heard the term <em>interaction programming</em>. As far as I can tell, it&#8217;s a term that Thimbleby made up. According to him:</p>

<blockquote>
  <p>Interaction programmers are computer scientists using their specialist skills to design, analyze
  and program interactive devices used by people.</p>
</blockquote>

<p>I really like this term because it captures the fact that <strong>the interaction is inextricably linked with the internals of the system</strong>. We already have lots of terms to describe the study of the interaction between people and computers (human-computer interaction, usability, interaction design, and user experience, just to name a few). But these terms all seem to imply that you have a system and you have a user, and all you need to do is design the interaction between the two. Thimbleby&#8217;s view is that these terms are primarily concerned with &#8220;what things look and feel like, rather than how they work inside.&#8221; Using the term <em>interaction programming</em> challenges the view that the interface is created by designers and the functionality is implemented by programmers.</p>

<h3>Why interaction programming matters</h3>

<p>I&#8217;m definitely not arguing that there is anything wrong with interaction design, user experience, or choose-your-preferred term. There are certainly lots of talented people out there who play a very important part in developing usable interactive sytems without have intimate knowledge of the implementation details. But there are also many programmers who have the skills and desire to make the interaction a concern in every step of the development (see <a href="http://www.codinghorror.com/blog/">Jeff Atwood</a>, <a href="http://www.37signals.com/svn/">37 Signals</a>, etc.). </p>

<p>It seems to be well accepted now that we should consider usability during all phases of a product&#8217;s development, but Thimbleby stresses that interaction programming should also be an integral part of the process:</p>

<blockquote>
  <p>Much of the initiative for better design can come from clear engineering creativity, knowledge,
  and perspectives based on sound computer science principles. [...] Programmers can come up
  with solutions that would have escaped users or designers with limited technical knowledge;
  programmers can be more creative and more central in all areas of interaction design than
  anyone suspected.</p>
</blockquote>

<h3>Ich bin ein Interaction Programmer</h3>

<p>I&#8217;ve always found it hard to describe what I&#8217;m interested in. I love coding, but I also care a lot about how people interact with computers. Yet I wouldn&#8217;t consider myself to be designer, since I don&#8217;t have the background or experience. Thanks to Harold Thimbleby, now I can express it pretty well: <strong>I&#8217;m an interaction programmer</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/what-interaction-programming-is-and-why-it-matters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two outta three ain&#8217;t bad</title>
		<link>http://dubroy.com/blog/two-outta-three-aint-bad/</link>
		<comments>http://dubroy.com/blog/two-outta-three-aint-bad/#comments</comments>
		<pubDate>Tue, 09 Oct 2007 12:49:13 +0000</pubDate>
		<dc:creator>Patrick</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://dubroy.com/blog/2007/10/09/two-outta-three-aint-bad/</guid>
		<description><![CDATA[Leah Culver, the lead developer of Pownce, posted the slide deck from her talk at FOWA 2007: Pownce &#8211; Lessons learned. I learned a few interesting things about Pownce:


It&#8217;s build on Django.
They use Amazon S3.
Their desktop client is built using AIR.


By a freaky coincidence, these points happen to correspond to some links I wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>Leah Culver, the lead developer of <a href="http://pownce.com">Pownce</a>, posted the slide deck from her talk at FOWA 2007: <a href="http://www.leahculver.com/2007/10/08/pownce-lessons-learned-fowa-2007/">Pownce &#8211; Lessons learned</a>. I learned a few interesting things about Pownce:</p>

<ol>
<li><p>It&#8217;s build on <a href="http://django.com">Django</a>.</p></li>
<li><p>They use <a href="http://aws.amazon.com/s3">Amazon S3</a>.</p></li>
<li><p>Their desktop client is built using <a href="http://labs.adobe.com/technologies/air/">AIR</a>.</p></li>
</ol>

<p>By a freaky coincidence, these points happen to correspond to some links I wanted to share with y&#8217;all.</p>

<h4>The Django Book</h4>

<p><a href="http://www.djangobook.com/">The Django Book</a>, is a free, online Django reference. The book is still in beta (yes, they apparently do that for books now), and they&#8217;ve got a cool UI for commenting on specific paragraphs, and viewing those comments. Here&#8217;s what <a href="http://www.djangobook.com/en/beta/chapter01/">Chapter 1</a> looks like:</p>

<p><img id="image144" src="http://dubroy.com/blog/wp-content/uploads/2007/10/djangobook.png" alt="The Django Book - Comment UI" /></p>

<p>To view comments for a section, or to add a new comment, you click on the corresponding yellow dialog bubble on the left. For sections that don&#8217;t have any comments yet, a subtle, translucent bubble appears when you mouse over the margin.</p>

<h4>Amazon S3 Service Level Agreement</h4>

<p><a href="http://aws.typepad.com/aws/2007/10/amazon-s3-at-yo.html">Amazon S3 now has a service level agreement</a>, guaranteeing 99.9% uptime. Lots of people have been raving about the Amazon Web Services arsenal, especially <a href="http://aws.amazon.com/s3">S3</a> (storage) and the <a href="http://aws.amazon.com/ec2">Amazon Elastic Compute Cloud (aka EC2)</a>. It should be even more attractive to developers now that they have a guarantee.</p>

<h4>AIR</h4>

<p>Okay, this one&#8217;s a bit of a stretch.</p>

<p><a href="http://labs.adobe.com/technologies/air/">Adobe AIR (Adobe Integrated Runtime)</a> is a runtime environment for desktop applications based on Flash, HTML, and Ajax. It&#8217;s direct competitor to Mozilla&#8217;s <a href="http://wiki.mozilla.org/WebRunner">WebRunner</a>. If you&#8217;re interested in WebRunner and you live in Toronto, you might want to check out the <a href="http://fsoss.senecac.on.ca/2007/">Free Software and Open-Source Symposium</a> at Seneca College later this month. Mark Finkle of the Mozilla Corporation <a href="http://starkravingfinkle.org/blog/2007/10/fsoss-workshops-and-webrunner/">will be doing a workshop on desktop-enabling web apps</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dubroy.com/blog/two-outta-three-aint-bad/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->