<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-362788945979237212</id><updated>2012-01-27T08:14:27.270-08:00</updated><title type='text'>Wabi Sabi Software</title><subtitle type='html'>The Wabi Sabi aesthetic is sometimes described as one of beauty that is "imperfect, impermanent, and incomplete".  This blog is about applying that aesthetic to software, cognition and philosophy.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6407844811837707530</id><published>2012-01-27T08:14:00.000-08:00</published><updated>2012-01-27T08:14:27.278-08:00</updated><title type='text'>Scala version of Log4JFugue, plus revamped website</title><content type='html'>Over the recent holidays I decided to create a Scala version of my Log4JFugue open source music project.  I was able to reduce the 2500 lines of Java to just over 250 lines of Scala!&lt;br /&gt;&lt;br /&gt;Checkout the new &lt;a href="www.log4jfugue.org"&gt;www.log4jfugue.org&lt;/a&gt; as well as: &lt;br /&gt;&lt;a href="http://github.com/btarbox/Log4ScalaFugue"&gt;Scala sources&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'll be giving a talk on the experience of converting a small Java project to Scala at the March meeting of &lt;a href="www.nejug.org"&gt;New England Java User's Group&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6407844811837707530?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6407844811837707530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2012/01/scala-version-of-log4jfugue-plus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6407844811837707530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6407844811837707530'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2012/01/scala-version-of-log4jfugue-plus.html' title='Scala version of Log4JFugue, plus revamped website'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6522678929570683457</id><published>2011-12-07T10:07:00.000-08:00</published><updated>2011-12-07T10:07:57.503-08:00</updated><title type='text'>new article in December PragProg magazine</title><content type='html'>I just had an article published in the December Pragmatic Programmer magazine on &lt;a href="http://pragprog.com/magazines/2011-12/justintime-logging"&gt;&lt;br /&gt;a new approach to logging&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6522678929570683457?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6522678929570683457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/12/new-article-in-december-pragprog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6522678929570683457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6522678929570683457'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/12/new-article-in-december-pragprog.html' title='new article in December PragProg magazine'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-8315589956830114947</id><published>2011-11-18T08:47:00.000-08:00</published><updated>2011-11-18T08:47:35.254-08:00</updated><title type='text'>Writing on a Tablet</title><content type='html'>I do a lot of writing these days, some on my high end Windows laptop with dual 20 inch monitors and some on my 10 inch tablet with Bluetooth keyboard.&lt;br /&gt;&lt;br /&gt;I have surprisingly discovered that I am far more efficient on the tablet.   This is surprising because on the tablet I have much smaller screen (less than 100 square inches versus more than 700 square inches), I don’t have a mouse, and switching from my writing app to email or the web is more involved.&lt;br /&gt;&lt;br /&gt;That last item proves to be the key item.  Because the tablet is primarily not a multitasking device I tend to focus on writing when I’m writing.  The lure of the emails lurking in my system tray is gone.  The other browser windows in my giant multimonitor display do not call to me.   The fact that my tablet can really only do one thing at time is not a limitation it is a benefit.&lt;br /&gt;&lt;br /&gt;While at a certain level this is obvious it’s also interesting given the current debates about multitasking operating systems.  At the same time that some OSs are claiming to be better because of multitasking some of the mainstream OSs are adding features to discourage multitasking!  For example various flavors of Linux have the option to automatically dim all windows other than the active one.  The idea is to reduce the lure of context switching.&lt;br /&gt;&lt;br /&gt;All kinds of current research is showing that humans cannot really multitask, yet we want to pretend that we can.   At the same time, we know that the key to writing is to…well…write.  And as much as we love to write we also love anything that can distract us from writing.  So using a “limited” system to do our writing on is really to our advantage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-8315589956830114947?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/8315589956830114947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/11/writing-on-tablet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8315589956830114947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8315589956830114947'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/11/writing-on-tablet.html' title='Writing on a Tablet'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-3392272495115272947</id><published>2011-11-16T09:15:00.000-08:00</published><updated>2011-11-16T09:15:09.350-08:00</updated><title type='text'>A few minutes with the Kindle Fire</title><content type='html'>I got to spend a few minutes with the Kindle Fire yesterday.  Full disclosure: we have two kindles, an iPad, a smartphone and assorted laptops at home.&lt;br /&gt;&lt;br /&gt;The iPad has almost completely replaced the laptop at home, and with a bluetooth keyboard I do most of my writing on it.  It comes with me to the numerous evening Meetups I attend.&lt;br /&gt;&lt;br /&gt;My kindle comes with me everywhere during the day, because it fits in my pocket which lets me squeeze in lots of spare minutes reading.&lt;br /&gt;&lt;br /&gt;The smartphone has been relegated to making phone calls and checking gmail when out of wifi.&lt;br /&gt;&lt;br /&gt;The KF is agreeably small and light and I could imagine it being with me everywhere.  The screen is clean and crisp.  Some reviewers have complained about slow screen response but I did not encounter that.  Page turns while reading were very responsive and selecting items from the various menus was easy.&lt;br /&gt;&lt;br /&gt;The touch screen made selecting and highlighting text much simpler than on the legacy kindle, so I might pick the KF for technical reading where I do lots of note taking.&lt;br /&gt;&lt;br /&gt;One problem I did encounter was in getting to the menu screen.  Most apps are full screen so to get to the menu and the Home button you have to touch the bottom of the screen.  The location to touch was hard to find.  It often took me lots of touches to bring up the menu resulting in lots of unwanted page turns.  Presumably this would be something one would figure out over time.&lt;br /&gt;&lt;br /&gt;Movies look nice on the KF, though obviously a smaller image than on the iPad.  My kindle reading is largely opportunistic, a few minutes here and there.  While I'm willing to read books a page at time I don't know that I'd want to watch a movie that way.  When I know I might have blocks of time I bring my iPad.  So movies wouldn't be a KF draw for me though they might be for my iPad-less wife.&lt;br /&gt;&lt;br /&gt;Magazines look much better on the KF than on the legacy kindle.&lt;br /&gt;&lt;br /&gt;In the end buying a KF or not depends on what devices you already have and what you want to do.&lt;br /&gt;If you just have a legacy kindle or a smartphone and don't want to do content creation the KF makes sense.  If you just have a iPad but no book reader you might get the KF for its extra portability.&lt;br /&gt;&lt;br /&gt;For my wife who has a kindle plus dumb phone and wants some internet access we have a couple of choices.  We could get a $300 smart phone plus two years of a $30/month add-on data plan; two year cost $1020.  Or a $200 KF, possibly adding on the $79/year Amazon Prime membership.  That seems like an easy choice for us.  Your mileage may vary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-3392272495115272947?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/3392272495115272947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/11/few-minutes-with-kindle-fire.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3392272495115272947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3392272495115272947'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/11/few-minutes-with-kindle-fire.html' title='A few minutes with the Kindle Fire'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-3034196284233152136</id><published>2011-11-03T06:29:00.000-07:00</published><updated>2011-11-03T06:33:04.148-07:00</updated><title type='text'>New article published at Pragmatic Programmers</title><content type='html'>I just had an article published in the Pragmatic Programmer magazine on &lt;a href="http://pragprog.com/magazines/2011-11/root-cause-analysis-from-long-ago"&gt;&lt;br /&gt;the long history of root cause analysis&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-3034196284233152136?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/3034196284233152136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/11/new-article-published-at-pragmatic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3034196284233152136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3034196284233152136'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/11/new-article-published-at-pragmatic.html' title='New article published at Pragmatic Programmers'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-7851422378503521899</id><published>2011-09-30T08:08:00.000-07:00</published><updated>2011-09-30T08:09:14.030-07:00</updated><title type='text'>Kindle Fire replaces SmartPhone not tablet</title><content type='html'>Just had a conversation with my wife about the Kindle-Fire (KF) and had an epiphany.&lt;br /&gt;&lt;br /&gt;KF isn't a replacement for the full tablet, but it is a replacement for the smart phone!&lt;br /&gt;&lt;br /&gt;KF costs $200 plus zero for service contract&lt;br /&gt;smart phone costs $50-$200 plus at least $30 a month for data contract.&lt;br /&gt;&lt;br /&gt;If you mostly use the 'smart' features of the phone for things like email/calendar/games, then it may be very compelling to ditch the cellular data plan, ditch the smart phone, get a dumb phone for making dare-I-say-it phone calls and the KF for email/calendar/etc.&lt;br /&gt;&lt;br /&gt;I think we're going to do that.&lt;br /&gt;&lt;br /&gt;OTOH, if you want a tablet for creating rather than consuming content, you still need a full size tablet, preferably with a keyboard.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-7851422378503521899?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/7851422378503521899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/09/kindle-fire-replaces-smartphone-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7851422378503521899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7851422378503521899'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/09/kindle-fire-replaces-smartphone-not.html' title='Kindle Fire replaces SmartPhone not tablet'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-3331176973990649438</id><published>2011-09-14T06:21:00.000-07:00</published><updated>2011-09-14T06:48:36.684-07:00</updated><title type='text'>Publication Summary</title><content type='html'>I've been asked a few times for a summary of my publications over the last few years so here it is.  &lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2011-09/scala-traits"&gt;Sept 2011 Scala Traits &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2011-08/code-as-dialog"&gt;August 2011 Code As Dialog &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2011-05/catch-the-pig"&gt;May 2011 Catch the Pig! &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://rubylearning.com/blog/2010/10/25/the-value-of-a-personal-bug-log"/&gt; November 2010 The value of a personal bug log&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2010-09/the-key-to-better-software"&gt;September 2010 The Key to Better Software &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2010-06/better-tools-and-training"&gt;June 2010 Better Tools and Training &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://drdobbs.com/database/218100564?fmid=12269"&gt;June 2010 Debugging MySQL Stored Procedures &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2010-05/the-floating-finish-line"&gt;May 2010 The Floating Finish Line &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2010-04/medicine-making-music"&gt;April 2010 Medicine Making Music &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2010-03/testing-as-contract"&gt;March 2010 Testing As Contract &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2009-11/interrupt-mood"&gt;November 2009 Interrupt Mood &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pragprog.com/magazines/2009-09/and-your-bugs-can-sing"&gt;June 2009 ...And Your Bugs Can Sing &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-3331176973990649438?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/3331176973990649438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/09/publication-summary.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3331176973990649438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3331176973990649438'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/09/publication-summary.html' title='Publication Summary'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-5168108012075830664</id><published>2011-08-25T06:45:00.000-07:00</published><updated>2011-08-25T06:47:04.828-07:00</updated><title type='text'>Review of Venkat Subramaniam's new book on Concurrency</title><content type='html'>Programming Concurrency on the JVM: Mastering Synchronization, STM and Actors&lt;br /&gt;by Venkat Subramaniam&lt;br /&gt;&lt;br /&gt;This book should be considered part of a two book series along with Venkat’s 2009 book “Programming Scala: Tackle Multi-core Complexity on the JVM”.  The earlier book was  a relatively short (250 pages versus 852 pages for Odersky’s Scala book), perhaps too short, overview of Scala.  It’s 12 chapters skip over lots of the details in Odersky’s 18 chapter book, and contains only a single chapter on Concurrent Programming.&lt;br /&gt;&lt;br /&gt;By comparison the new book is all about Concurrent Programming models and attempts to be agnostic about the JVM language to be used.  Most examples are first given in Java, then a simpler way is shown to do it in Scala, and then often a short section saying how the example could be done in Ruby.&lt;br /&gt;&lt;br /&gt;The book describes the difficulties of concurrent programming in JVM languages especially given the rise of multi-core processors.  It then describes three “solutions”: the naïve Java approach, Software Transactional Memory and Actors.  It should be noted that the Actors chapter is based on Akka, so if you don’t care for Akka you may not like this book.&lt;br /&gt;&lt;br /&gt;The Power and Perils of Concurrency – This should be an unsurprising recap of well known problems; if you’re reading this book you will almost certainly have run into the problems listed here already.&lt;br /&gt;&lt;br /&gt;Strategies for Concurrency – Talks about ways to divide problems into parts that can be computed independently&lt;br /&gt;&lt;br /&gt;Modern Java/JDK Concurrency – This talks in detail about the changes made to the Java libraries to better support concurrency, specifically things like using ExecutorService rather than “new Thread()” and using Lock vs. synchronized.  Interestingly though the chapter fails to discuss the little known but serious differences between synchronized blocks and methods involving fairness and barging.&lt;br /&gt;Taming Shared Mutability – This chapter begins to offer the Scala kool-aid of mutability is bad.  Reading this chapter is made easier if you’ve already read Goetz’s “Programming Concurrency”.&lt;br /&gt;&lt;br /&gt;Software Transactional Memory – This chapter talks about Clojure’s STM model and how to use it in Java via Akka.  Its an interesting chapter but one that will feel odd if you’re a programmer also coming to terms with non-relational databases.  As databases move away from the transitional transactional model here comes STM bringing transactions to mutable variables.&lt;br /&gt;&lt;br /&gt;Actor-based Concurrency – Actors are basically a message passing schema where immutable messages are passed between lightweight actors (thread-like).  Just as you can use thread pools to reduce the cost of threads there are what amount to actor pools which lighten their cost.  It does require some rethinking to embrace the actor approach.&lt;br /&gt;&lt;br /&gt;Overall this is a fine book that brings quite a lot to the table.   My only reservation would be that if you are a seasoned Java programmer you might take the first four sections as a given and jump right to the Actors approach.  And if you’re not a seasoned Java programmer you probably don’t realize how badly you need this book.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-5168108012075830664?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/5168108012075830664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/08/review-of-venkat-subramaniams-new-book.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/5168108012075830664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/5168108012075830664'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/08/review-of-venkat-subramaniams-new-book.html' title='Review of Venkat Subramaniam&apos;s new book on Concurrency'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-1538783852124926302</id><published>2011-08-24T06:49:00.000-07:00</published><updated>2011-08-24T07:18:14.720-07:00</updated><title type='text'>Books on Scala</title><content type='html'>While the best way to learn a new language is to write in it there is still a great value to reading books on the language.  When I was a C/C++ coder (a long time ago) I made it a point to read every book published on the language.  The benefit of picking up even a single tip on how to use the language I spent 10 or more hours a day in was simply too large to ignore.&lt;br /&gt;&lt;br /&gt;So, I decided to look at the current set of books on Scala.  If you don't know Scala it is a hybrid OO/Functional JVM language.&lt;br /&gt;&lt;br /&gt;Here are the books I found that are either in print or soon to be in print.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th align="left"&gt;Title&lt;/th&gt;&lt;th align="left"&gt;Author&lt;/th&gt;&lt;th align="left"&gt;Length&lt;/th&gt;&lt;th align="left"&gt;Publication Date or Amazon Rating&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Programming In Scala&lt;/td&gt;&lt;td&gt;Odersky&lt;/td&gt;&lt;td&gt;852 pages&lt;/td&gt;&lt;td&gt;4.5 stars&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Programming Scala&lt;/td&gt;&lt;td&gt;Wampler&lt;/td&gt;&lt;td&gt;448 pages&lt;/td&gt;&lt;td&gt;4.5 stars&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Programming Scala&lt;/td&gt;&lt;td&gt;Subramanian&lt;/td&gt;&lt;td&gt;250 pages&lt;/td&gt;&lt;td&gt;4.0 stars&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Beginning Scala&lt;/td&gt;&lt;td&gt;Pollak&lt;/td&gt;&lt;td&gt;320 pages&lt;/td&gt;&lt;td&gt;3.5 stars&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scala In Action&lt;/td&gt;&lt;td&gt;Raychaudhuri&lt;/td&gt;&lt;td&gt;525 pages&lt;/td&gt;&lt;td&gt;(fall 2011 9 of 14 chapters available)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Scala In Depth&lt;/td&gt;&lt;td&gt;Suereth&lt;/td&gt;&lt;td&gt;225 pages&lt;/td&gt;&lt;td&gt;(Winter 2011 8 of 11 chapters available)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;While book length is not a good predictor of quality its hard to see how you can cover a language like Scala in a short book.  In particular "Scala In Depth" looks to be the shortest book!&lt;br /&gt;&lt;br /&gt;Personally my approach to learning Scala was to put Subramanian's book on my right, Odersky's book on my right, and a Scala console in the middle.  I then read the same chapter in each book, working through each and every example in the Scala console.  This way I got the benefit of learning the same concept via the different wording of two top authors...and I forced myself to actually write some Scala.&lt;br /&gt;&lt;br /&gt;For my next Scala reading I'll try Scala In Action simply based on past enjoyment of the "X In Action" books from Manning Press.  None of them have ever let me down.&lt;br /&gt;&lt;br /&gt;I should also mention two other related books:&lt;br /&gt;&lt;br /&gt;"Seven Languages In Seven Weeks" by Bruce Tate (full disclosure: I'm interviewed in the book's chapter on Prolog)&lt;br /&gt;and&lt;br /&gt;"Programming Concurrency on the JVM" by Subramanian.  While not strictly a Scala book it is still very interesting as it introduces Software Transactional Memory and Actors and shows how to use them in various jvm languages.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-1538783852124926302?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/1538783852124926302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2011/08/books-on-scala.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1538783852124926302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1538783852124926302'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2011/08/books-on-scala.html' title='Books on Scala'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-2462916636069016204</id><published>2010-12-19T07:07:00.000-08:00</published><updated>2010-12-19T07:16:57.028-08:00</updated><title type='text'>The most basic failure</title><content type='html'>In this holiday buying season the Kindle and the Nook continue to be very popular, and the battle still ranges over the viability of dedicated e-readers versus general purpose devices like the IPad.&lt;br /&gt;&lt;br /&gt;Poor Sony.&lt;br /&gt;&lt;br /&gt;I own one of the Sony E-Readers and quite like it.  It has many advantages over the Kindle, Nook or IPad and yet its largely forgotten.  I have a theory as to why.&lt;br /&gt;&lt;br /&gt;Sony forgot to give its product a name!  Quick test: what is the name of Sony's e-reader?  Its "E-Reader".  Since thats also the generic term for the device it amounts to not having a name.&lt;br /&gt;&lt;br /&gt;Sometimes having the generic name for the device is a good thing.  Xerox has the generic name for the photocopier.  The important thing however is the timing.&lt;br /&gt;&lt;br /&gt;Its a Good Thing to have your product name &lt;span style="font-style:italic;"&gt;become &lt;/span&gt;the generic name.  Its a Bad Thing however to simply use an existing generic name.&lt;br /&gt;&lt;br /&gt;Imagine a device making introducing an MP3 player and calling it "MP3-Player".  Rather than subsuming all the good will associated with the general product this new device would feel like a cut-rate generic device.  &lt;br /&gt;&lt;br /&gt;I think thats what happened to Sony's device.  You can't even talk about their reader.  I can't tell you how many times people have asked me: "is that a Kindle?".  I say "no, its Sony's Kindle", which is certainly not an answer to warm the hearts of Sony's marketing department.&lt;br /&gt;&lt;br /&gt;I don't know what surprises me more, the fact that Sony forgot to name their device, or that no one seems to have noticed this failure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-2462916636069016204?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/2462916636069016204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2010/12/most-basic-failure.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/2462916636069016204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/2462916636069016204'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2010/12/most-basic-failure.html' title='The most basic failure'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-4975451416892417178</id><published>2010-10-25T06:12:00.000-07:00</published><updated>2010-10-25T06:14:21.067-07:00</updated><title type='text'>Guest Blog over at RubyLearning.com</title><content type='html'>I am the guest blogger over at RubyLearning.com this week.  My article on the value of maintaining a personal bug log is at: http://rubylearning.com/blog/2010/10/25/the-value-of-a-personal-bug-log/.&lt;br /&gt;&lt;br /&gt;Although I'm not a Ruby programmer the RubyLearning blog run occasional articles on learning in general.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-4975451416892417178?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/4975451416892417178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2010/10/guest-blog-over-at-rubylearningcom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/4975451416892417178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/4975451416892417178'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2010/10/guest-blog-over-at-rubylearningcom.html' title='Guest Blog over at RubyLearning.com'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-8094963354599932176</id><published>2010-09-09T09:07:00.000-07:00</published><updated>2010-09-09T09:10:41.593-07:00</updated><title type='text'>Profiled for JavaOne</title><content type='html'>I was recently profiled for the upcoming Oracle JavaOne.  This was because of my open source project Log4JFugue.&lt;br /&gt;&lt;br /&gt;The link is: http://www.oracle.com/us/javaonedevelop/future-of-java-168616.html#tarbox&lt;br /&gt;&lt;br /&gt;It was interesting to sit back and think about what makes using Java interesting.  It also reminded me of the freedom that comes from having an open source project.  If I want to explore using Groovy I don't need to get the approval of a committee I can just do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-8094963354599932176?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/8094963354599932176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2010/09/profiled-for-javaone.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8094963354599932176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8094963354599932176'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2010/09/profiled-for-javaone.html' title='Profiled for JavaOne'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-8422483221766000384</id><published>2010-08-01T08:28:00.000-07:00</published><updated>2010-08-01T08:38:51.333-07:00</updated><title type='text'>Where do you get your Intellectual Stimulation?</title><content type='html'>&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal"&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Arial, sans-serif;font-size:15px;"&gt;Most of us work in jobs that primarily focused on solving an immediate need for existing customer, who needs a quick solution today.  This certainly pays the bills but generally isn't the kind of venue to leads to discussions about to create "software that sings".  Indeed when I used that phrase in a previous article I got comments that even thinking about writing such software was beyond the pale for most people.  &lt;br /&gt;&lt;br /&gt;So, where do people find an outlet for that part of the mind that goes beyond solving the problem for today?  Having just come back from the Atlassian Summit 2010 I can tell you how recharging it was to spend a few (long) days surrounded by people whose mission it was to be better.  One of Atlassian's commitments this year is for their tools to save every developer 15 minutes a day.  It was fun to spend time thinking, arguing, brainstorming about how to change tools and processes to squeeze out an incremental amount of productivity.  And then I went back to work. where  the focus is (as it should be) on the short term deliverable.  I suspect I'm not alone in this regard and wonder how people recharge their batteries.  &lt;br /&gt;&lt;br /&gt;Some years back I  visited The Orchard tea room in Cambridge, England.  This humble tea room hosted Virginia Wolf, Bertrand Russell, Ludwig Wittgenstein and others.  Its as if Edward Tufte, Richard Feynman and Claude Shannon hung out together at the local Starbucks.  Imagine sitting at the next table from that gathering every week!  Without putting myself in such company I wondered if such places existed today where motivated people could gather and discuss their craft.  &lt;br /&gt;&lt;br /&gt;Our conferences and User Group meetings try fill this role but to a very limited degree.  Its tough to have an in depth discussion at a 15,000 person, $5000 JavaOne for example. User Space conferences may be better for this but they're still discrete events rather than something ongoing.   I started wondering about other models such as the JavaPosse.  That's a group of four friends who meet once a week or so and basically spend an hour discussing whatever they find interesting.  While the Apple bashing/praising they engage in has gotten a bit tiring it’s still a very interesting model.  The parts that stand out for me are:&lt;br /&gt;&lt;br /&gt; - its a regular meeting rather than an occasional event&lt;br /&gt; - it happens (mostly) in person.  The four members actually sit together and talk&lt;br /&gt; - it's outside the work venue and not paid for by my employer so I'm not obligated to focus on near term problems/solutions&lt;br /&gt;&lt;br /&gt;I've decided to start a similar group myself, not with the intention of podcasting it but simply to spend some regular time talking with smart people about the craft.  We currently have three members and are carefully thinking about a couple more people.  We're also trying to determine what kind of meeting place we should have.&lt;br /&gt;&lt;br /&gt;I wonder if anyone else has tried something like this or if anyone has other ideas for on-going mental stimulation?&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-8422483221766000384?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/8422483221766000384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2010/08/where-do-you-get-your-intellectual.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8422483221766000384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8422483221766000384'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2010/08/where-do-you-get-your-intellectual.html' title='Where do you get your Intellectual Stimulation?'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-3314473565167118160</id><published>2010-06-21T16:04:00.000-07:00</published><updated>2010-06-21T16:12:27.123-07:00</updated><title type='text'>Follow The Sun versus Chase The Sun</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "&gt;&lt;div&gt;Follow The Sun is the management concept that by spreading your development team across the world you always have someone who is awake and can work on a problem.   In the imagined perfect world Team A works on a problem for their eight hour day and then hands off the partially developed feature to the next team arriving on the next continent.   The idea is based on the notion that developers and software are both fungible assets. (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Fungibility&lt;/span&gt; is the property of a good or a commodity whose individual units are capable of mutual substitution. Examples of highly fungible commodities are crude oil, wheat, orange juice, precious metals, and currencies. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Wikipedia&lt;/span&gt;)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since developer A is equivalent to developer B it just make sense for them to hand off bits of partially developed code to one another. (sic)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the real world this often becomes &lt;i&gt;Chase &lt;/i&gt;The Sun rather than &lt;i&gt;Follow &lt;/i&gt;The Sun.  There are two variations of Chase the Sun.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the first variation all developers are basically expected to be available for questions and support 24 hours a day. Between &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Skype&lt;/span&gt; and text messages and laptops or smart phones we often see developers basically in perpetual on-call mode.  This can actually be effective...until the team burns out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the other variation team A makes a change that breaks the system or changes it significantly, and then goes to bed.  Team B comes to work to find a broken or "different' system and spends their day doing archeology on team A's changes.  Successful or not they try to warn Team C about the state of the system and the changes that they've made in an attempt to resolve the issue.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Each team leaves emails that will be read 18 hours later by the team prior to them in the earth's rotation. Besides being inefficient this variation leads to predictably negative team interactions.  Its just too easy to explain each day's problems as being caused by "them".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Chase the Sun can be changed back into Follow The Sun by following a few simple rules&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;a) developers are not fungible&lt;/div&gt;&lt;div&gt;b) there is enough code that the code also isn't fungible, so not everyone will understand everything&lt;/div&gt;&lt;div&gt;c) geographically dispersed teams can assist each other investigations or in remote pair programming where one team develops and the other tests&lt;/div&gt;&lt;div&gt;d) asking geographically dispersed teams to work on the same code or features is often a recipe for disaster&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-3314473565167118160?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/3314473565167118160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2010/06/follow-sun-versus-chase-sun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3314473565167118160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3314473565167118160'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2010/06/follow-sun-versus-chase-sun.html' title='Follow The Sun versus Chase The Sun'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6510693752969196856</id><published>2010-04-07T07:37:00.000-07:00</published><updated>2010-04-07T07:40:28.964-07:00</updated><title type='text'>April issue of PragPub is out, see my article</title><content type='html'>The April issue of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;PragPub&lt;/span&gt;, the magazine by the Pragmatic Programmers is out, and I have another article in it.  The link to my article is &lt;a href="http://www.pragprog.com/magazines/2010-04/medicine-making-music"&gt;http://www.pragprog.com/magazines/2010-04/medicine-making-music&lt;/a&gt; and the link to the whole issue is &lt;a href="http://www.pragprog.com/magazines/2010-04/content"&gt;http://www.pragprog.com/magazines/2010-04/content&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My article is about an NPR report I heard where some &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;ER's&lt;/span&gt; are using music is a way that seems similar to my open source project Log4&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JFugue&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check it out!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6510693752969196856?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6510693752969196856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2010/04/april-issue-of-pragpub-is-out-see-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6510693752969196856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6510693752969196856'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2010/04/april-issue-of-pragpub-is-out-see-my.html' title='April issue of PragPub is out, see my article'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-1481935093813815887</id><published>2010-03-19T08:42:00.000-07:00</published><updated>2010-03-19T08:43:13.330-07:00</updated><title type='text'>A trick for managing workspaces within Eclipse</title><content type='html'>&lt;div&gt;There are lots of ways to deal with the issue of multiple workspaces within Eclipse.  The way I approach it is to have all of my workspaces live under /opt/workspaces and have them all available at the same time.  This allows me to switch back and forth between projects easily.  It does have a drawback however, but I've found a way around it and thats the topic of this post.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you multiple workspaces open and you use the Cntrl-Shift-T class finder to navigate between classes you will be shown a list of with search results from all of the workspaces.  Chances are you are only actually working in a single workspace at a time.  Wouldn't it be great to only see results from the workspace you are actively working in?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is a drop down arrow in the upper right corner of the Cntrl-Shift-T dialog.  That brings up a "Select Working Set" dialog.  Press "new" and then "Resource" to select just the project you are working on.  From that point on your class searches will be limited to that project.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The one other step to do is in the Project Explorer select the project you are working on and from the right-click popup menu select "go into".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;These two tricks let you have the best of both worlds, context that is limited to your current project along with trivial switching between projects.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-1481935093813815887?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/1481935093813815887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2010/03/trick-for-managing-workspaces-within.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1481935093813815887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1481935093813815887'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2010/03/trick-for-managing-workspaces-within.html' title='A trick for managing workspaces within Eclipse'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-2253031112683299178</id><published>2009-12-27T09:41:00.000-08:00</published><updated>2009-12-27T09:57:44.842-08:00</updated><title type='text'>Groovy XML parser for ITunes Music Library</title><content type='html'>I work in the Video On Demand field and so am very interested in the distribution of content selection.  In other words, which content gets played and how often.&lt;br /&gt;&lt;br /&gt;A few years ago the standard thinking was that most people were watching the small set of popular content.  This was known as the 80/20 rule, that 80% of people were watching 20% of the content.  Then the notion of Long Tail came along which said that although some content would be popular the set of content that got at least some plays (i.e. the long tail of graph) was quite large.&lt;br /&gt;&lt;br /&gt;Being a bit of geek I decided to write a Groovy based program to analyze the data in my ITunes library (even though this week I switched to the Motorola Droid).&lt;br /&gt;&lt;br /&gt;ITunes keeps all of its information about your music, the play counts and so on in a file called library.xml.  This file can get quite large so I decided to go with a SAX XML parser approach to minimize my memory consumption.  The program reads the libary.xml file, extracts the Artist, Song title and play count and emits a csv file that can later be read by Excel.&lt;br /&gt;&lt;br /&gt;The program is shown below:&lt;br /&gt;&lt;br /&gt;import javax.xml.parsers.SAXParserFactory&lt;br /&gt;import org.xml.sax.*&lt;br /&gt;import org.xml.sax.helpers.DefaultHandler&lt;br /&gt;&lt;br /&gt;class MyHandler extends DefaultHandler { &lt;br /&gt;  def tempVal &lt;br /&gt;  boolean expectingArtist        = false &lt;br /&gt;  boolean expectingSong          = false &lt;br /&gt;  boolean expectingPlayCount = false &lt;br /&gt;  String artist &lt;br /&gt;  String song &lt;br /&gt;  Integer playCount &lt;br /&gt;  def outFile = new File('\\musicPlays')&lt;br /&gt;&lt;br /&gt;  void endElement(String namespace, String localName, String qName) {&lt;br /&gt;     if(expectingSong) {       &lt;br /&gt;         song = tempVal       &lt;br /&gt;         expectingSong = false    &lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     if(expectingArtist) {       &lt;br /&gt;          artist = tempVal       &lt;br /&gt;          expectingArtist = false    &lt;br /&gt;     }    &lt;br /&gt;&lt;br /&gt;     if(expectingPlayCount) { &lt;br /&gt;        playCount = Integer.parseInt(tempVal)       &lt;br /&gt;        expectingPlayCount = false&lt;br /&gt;        String thisLine = artist + '; ' + song + '; ' + playCount + "\n"       &lt;br /&gt;        println(thisLine)       &lt;br /&gt;        outFile.append(thisLine)    &lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     if(tempVal.equalsIgnoreCase('Artist')) {&lt;br /&gt;        expectingArtist = true    &lt;br /&gt;     }&lt;br /&gt;     if(tempVal.equalsIgnoreCase('Name')) {&lt;br /&gt;        expectingSong = true    &lt;br /&gt;     }    &lt;br /&gt;     if(tempVal.equalsIgnoreCase('Play Count')) {&lt;br /&gt;        expectingPlayCount = true    &lt;br /&gt;     }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;   public void characters(char[] ch, int start, int length) throws SAXException {       &lt;br /&gt;     tempVal = new String(ch,start,length)   &lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;def handler = new MyHandler()&lt;br /&gt;def reader = SAXParserFactory.newInstance().newSAXParser().xMLReader&lt;br /&gt;reader.contentHandler = handlerdef inputStream = new FileInputStream('\\library.xml')reader.parse(new InputSource(inputStream))&lt;br /&gt;inputStream.close()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This program let me analyze my listening preferences.  Turns out I have about 8000 songs in my library, of which I've listened to about 3200 of them at least once.&lt;br /&gt;&lt;br /&gt;I've listened to about 260 songs at least ten times and about 1000 songs at least five times.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-2253031112683299178?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/2253031112683299178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/12/groovy-xml-parser-for-itunes-music.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/2253031112683299178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/2253031112683299178'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/12/groovy-xml-parser-for-itunes-music.html' title='Groovy XML parser for ITunes Music Library'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-9182862336427990696</id><published>2009-12-09T07:40:00.000-08:00</published><updated>2009-12-09T07:42:06.972-08:00</updated><title type='text'>The Killer App for E-Book Readers is Smell</title><content type='html'>After resisting the Kindle for a long time because of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;DRM&lt;/span&gt; fears (I don't like to be locked in to a single vendor) I got a Sony &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;EReader&lt;/span&gt; a few months ago. I love it, and I'm reading a lot more because its such a nice reading experience.&lt;br /&gt;&lt;br /&gt;Many people have said to me that they are reluctant to go to E-Readers because they miss the smell of books.&lt;br /&gt;&lt;br /&gt;So, I propose E-Book-Smell Strips! These would be strips containing the smell of physical books that you would stick to your E-Reader.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You could even charge more for "Hard Cover Smell"!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-9182862336427990696?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/9182862336427990696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/12/killer-app-for-e-book-readers-is-smell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/9182862336427990696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/9182862336427990696'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/12/killer-app-for-e-book-readers-is-smell.html' title='The Killer App for E-Book Readers is Smell'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-8636420199461948484</id><published>2009-11-04T04:55:00.000-08:00</published><updated>2009-11-04T05:42:46.946-08:00</updated><title type='text'>This month's issue of Pragmatic Programmers Magazine</title><content type='html'>This month's issue of the Pragmatic Programmer's magazine is out and as always it is interesting, and in an unexpected way.  This magazine continues to look at things a bit differently.  For example, there is an article on hand writing a letter...remember when people did that?  Its interesting to look at what has been gained and lost by the transition.&lt;br /&gt;&lt;br /&gt;I have an article in this month's issue on interruptions, specifically interruptions of people who think for a living.  I explore the idea that most current attempts to limit interruptions are doomed to failure because they place the cost of the interruption on the wrong person.  Go read the article to learn more!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-8636420199461948484?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/8636420199461948484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/11/this-months-issue-of-pragmatic.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8636420199461948484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8636420199461948484'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/11/this-months-issue-of-pragmatic.html' title='This month&apos;s issue of Pragmatic Programmers Magazine'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-4518340704874134247</id><published>2009-10-28T17:45:00.000-07:00</published><updated>2009-10-28T17:48:22.837-07:00</updated><title type='text'>Mocks Run Amuck</title><content type='html'>I just spent 2 hours debugging a problem that turned out to be tied to a lazy use of mocks.&lt;br /&gt;&lt;br /&gt;In our core code we have a number of Mock objects defined for the key objects in our system.  These are moderately functional mocks in that they support a fair bit of state.  They are Good.  They should be used.&lt;br /&gt;&lt;br /&gt;I ran into an issue where I believed I was setting some state on a mock, and some later code appeared to be making the wrong decision based on the state of the mock.&lt;br /&gt;&lt;br /&gt;It turns out that someone had needed a mock and didn't bother to see that a really good mock class already existed.  So they created their own completely non-functional mock class, and they made it an inner class of the test class to boot.  So, when I set the state on the mock I was actually calling a no-op method of the bad mock.&lt;br /&gt;&lt;br /&gt;It took me a long time to come to grips with the fact that "my" mock object was misbehaving and not remembering state.  I didn't think of this as an option because I had written that mock class and the state preserving code was trivial.  So trivial that it could not be failing...unless I was actually using someone else' mock object.&lt;br /&gt;&lt;br /&gt;Before writing a class, even a test related class you ought to look around a bit and see if the class already exists.  In this case that's especially easy since the file will be named MockThing.java (or .groovy), and especially since Eclipse can find your class so easily.&lt;br /&gt;&lt;br /&gt;Come to think of it, this new no-op mock class was probably &lt;em&gt;created&lt;/em&gt; by Eclipse.  Normally I'm a fan of tools making it easier to do things, but not when its the wrong thing to do!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-4518340704874134247?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/4518340704874134247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/10/mocks-run-amuck.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/4518340704874134247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/4518340704874134247'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/10/mocks-run-amuck.html' title='Mocks Run Amuck'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-7857016025641263675</id><published>2009-09-09T17:13:00.000-07:00</published><updated>2009-09-09T17:15:36.509-07:00</updated><title type='text'>Recharging Yourself; getting an E-Reader or a netbook</title><content type='html'>Having written several blogs about why I don't like the pricing model of the Kindle book reader I've been very interested to read about Sony's new e-book readers, especially as you can download books to it from your local library.  I've played with the $300 Touch model and quite like it.  The only real competition to it for me is a netbook.  If you're not familar with netbooks, they are basically really small (8 or so inch) laptops with limited disk and memory; designed to view documents and web pages but not really to do authoring.&lt;br /&gt;&lt;br /&gt;The standard discussion goes like this: e-readers are single purpose devices, netbooks are general purpose devices.  E-readers are better for actually reading books but can't do much else.  Netbooks are less suited for reading but can do more.  For techies like us the argument that no one would want to look at an LCD screen for hours at a time is kind of funny since that's what we do all day, every day.&lt;br /&gt;&lt;br /&gt;I was about to get a netbook, especially since much of what I read are PDF versions of technical books from Manning Press or The Pragmatic Programmers, when a senior collegue made the following remark:&lt;br /&gt;&lt;br /&gt;"&lt;em&gt;Brian, we are thought workers, designers, creative people.  We have an obligation to read non-technical material so that we can keep approaching problems from unexpected directions and keep bringing creativity to tasks.  You should get the device that makes reading fiction easier&lt;/em&gt;".&lt;br /&gt;&lt;br /&gt;That really struck me.  So, after posting this entry I'm driving to the Sony store to buy the Touch E-Reader!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-7857016025641263675?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/7857016025641263675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/09/recharging-yourself-getting-e-reader-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7857016025641263675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7857016025641263675'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/09/recharging-yourself-getting-e-reader-or.html' title='Recharging Yourself; getting an E-Reader or a netbook'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-581175988910917347</id><published>2009-09-06T05:39:00.000-07:00</published><updated>2009-09-06T05:42:04.899-07:00</updated><title type='text'>Classes = Structs plus Closures.</title><content type='html'>&lt;p&gt;I was leading our Groovy &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;book club&lt;/span&gt; this week and had an insight. We have Java programmers, C/C++ programmers and script writers so we try to use a wide range of examples to illustrate points.&lt;br /&gt;&lt;br /&gt;We were discussing closures, which can be challenging for people unfamiliar with them.  I was making that point that Closures are Objects which means they are instances of classes.  Particularly, they are basically classes with a (generally) single method and no data members.&lt;/p&gt;&lt;p&gt;That made me think about &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Structs&lt;/span&gt;, which are basically classes without methods.&lt;br /&gt;So, I had the thought that Classes = &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Structs&lt;/span&gt; plus Closures.&lt;/p&gt;&lt;p&gt;I'm not sure if this is a helpful insight yet, but anytime I can think of things in a new way I like to explore it a bit.  I think the C/C++ programmers in the &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;book club&lt;/span&gt; found it helpful, perhaps because they're already used to thinking about different types of objects such as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;structs&lt;/span&gt;. So, thinking about Closures as another kind of class was not such a stretch for them.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-581175988910917347?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/581175988910917347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/09/classes-structs-plus-closures.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/581175988910917347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/581175988910917347'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/09/classes-structs-plus-closures.html' title='Classes = Structs plus Closures.'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-8911568641983648976</id><published>2009-09-03T18:53:00.000-07:00</published><updated>2009-09-03T19:03:52.417-07:00</updated><title type='text'>New issue of Pragmatic Programmer's magazine</title><content type='html'>The third issue of the new magazine PragPub from the Pragmatic Programmers is now available at &lt;a href="http://www.pragprog.com/magazines"&gt;http://www.pragprog.com/magazines&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;In the interest of full disclosure I'll say that I have an article in this issue, so I encourage you to go read the issue just for that.&lt;br /&gt;&lt;br /&gt;If you're a programmer you probably already know about the Pragmatic Programers and likely have some of their books, but you may not know about the magazine.  With authors like Kent Beck, Dave Thomas, Andy Hunt (and me!) it's a worthwhile investment of your time.&lt;br /&gt;&lt;br /&gt;The unexpected thing is that many non-programmers will find a lot of value here as well.  One of the regular columns is called Get A Life and is about the various ways to find balance in life and recharge.  I'm an apprentis instructor at a Tai Chi school and am passing this article around to the staff because it's so relevant.&lt;br /&gt;&lt;br /&gt;Take a few minutes and check out the magazine, especially my article (with Dave Koelle) titled:  "And Your Bugs Can Sing"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-8911568641983648976?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/8911568641983648976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/09/new-issue-of-pragmatic-programmers.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8911568641983648976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8911568641983648976'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/09/new-issue-of-pragmatic-programmers.html' title='New issue of Pragmatic Programmer&apos;s magazine'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6704218884288460009</id><published>2009-08-27T03:26:00.000-07:00</published><updated>2009-08-27T03:27:24.452-07:00</updated><title type='text'>Thinking about levels of Risk and Releases</title><content type='html'>One aspect of releases in the real world that seems to get little mention is the reality of working on more than one of them at a time.  Many of us work in shops with a main branch and then multiple named releases hanging from various places off of the main branch.   This is standard.&lt;br /&gt;&lt;br /&gt;So, the inconvenient truth is that when I make a fix in release 2.3 it probably needs to also go in release 2.3.1, release 2.4 release 3.0 and "main" (whatever you call your root branch).  I tend to think of those as pass through integrations.  Someone made a fix in a past release, likely for a real customer (so it was done quickly) and then wanted to make sure it got propagated to all of the other releases that might correspond to any existing or future customers.&lt;br /&gt;&lt;br /&gt;Now, the awkward question is: do you think the developer ran a full regression test on every release they checked the code into?  Officially we all probably say yes, but in reality the answer is "I made sure it compiles" if you're lucky.&lt;br /&gt;&lt;br /&gt;Depending on your branching strategy and the level of automation of your regression tests you may not need all builds deployable at all times or you may simply not be able to afford it even if you want it.  If your tests are not automated it may simply be too expensive for each checkin to cost a developer-day of regression testing. &lt;br /&gt;&lt;br /&gt;So, the two key questions are: how much risk do you have and how much can you afford?&lt;br /&gt;&lt;br /&gt;A proposed approach to dealing with these questions is as follows.  Each time a developer makes a check in to a branch the risk that the branch has destabilized has increased.by a quantum.  Each time QA runs the regression suite the risk is reduced.  Make the invalid but simplifying assumptions that all checkins add a constant risk and the regression suite reduces the risk to zero.&lt;br /&gt;&lt;br /&gt;Imagine a graphical tool that shows a graph of the accumulated risk associated with each branch.  This would allow you to answer the question of how much risk you have with each branch.  Put another way, it lets you know how much deferred work would be required should any particular branch need to be released.&lt;br /&gt;&lt;br /&gt;The Atlassian tool suite might already do this but I suspect that any development shop with a code management system and decent script writer could create a system for building such graphs.&lt;br /&gt;&lt;br /&gt;Once you have the ability to measure your risk you can make an informed decision about how much to accept.  You might decide that some branches should be regression tested everytime they’ve accumulated x checkins, while other branches only need testing every y checkins.  The point is that &lt;strong&gt;you&lt;/strong&gt; get to decide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6704218884288460009?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6704218884288460009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/08/thinking-about-levels-of-risk-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6704218884288460009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6704218884288460009'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/08/thinking-about-levels-of-risk-and.html' title='Thinking about levels of Risk and Releases'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-7140906360007649533</id><published>2009-08-18T20:03:00.000-07:00</published><updated>2009-08-18T20:05:13.410-07:00</updated><title type='text'>Spark:  The revolutionary new science of exercise and the Brain.  John Ratey, MD</title><content type='html'>This book is strongly recommended reading for anyone who uses their brain.&lt;br /&gt;&lt;br /&gt;This book starts with the assertion that conditioning the body is just a side effect of exercise, and the real benefit is the changes that exercise causes in and on the brain.  Many people have made the case that our current lifestyle doesn't match the conditions we evolved for, but the assumption is that too many caleries and not enough running only effects the heart and lungs.  Ratey argues that part of what we evolved for was hunting and gathering that required speed, stamina, cunning and fine motor control.  We lose &lt;em&gt;all&lt;/em&gt; of that when we're sedentary.&lt;br /&gt;&lt;br /&gt;In a Chicago High School gym class was transformed into exercise class, with emphasis on effort as measured by heart rate monitors.  This allowed even unfit kids to succeed, by working enough to elevate their heart rate.  This school's obesity rate is now 3% compared to the national average of 30%.  They are also setting records for academic performance.&lt;br /&gt;&lt;br /&gt;This book has a lot of chemical names in it and one of the most important is brain-derived neurotrophic factor (BDNF).  BDNF causes an increase in synaptic connections which is how we learn.  This molecule is produced in the hippocampus and studies show the exercise causes an increase in its production.  Ratey calls BDNF "miracle grow" for the brain.  BDNF doesn't make you smarter but it creates an environment conducive to forming new connections.  So, if exercise and then learn something its easier for the brain to encode the learning.&lt;br /&gt;&lt;br /&gt;We used to think that we were born with all the brain cells we'd ever get, but we now know the neurogenisis occurs all the time.  New neurons are born and then have 28 days to get connected into a network.  If they don't they die.  Exercise increases both the rate of nerurogenisis, and the ability of new neurons to make the connections they need to survive.&lt;br /&gt;&lt;br /&gt;Ratey goes on to say that the benefit can be enhanced by combining aerobic exercise with complex activity such as Tai Chi.  "The more complex the motions, the more complex the synaptic connections".  Although these neurons are associated with exercise they can be recruited for other tasks (such as learning)&lt;br /&gt;&lt;br /&gt;When under stress we produce cortisol which tells the hippocampus to selectively process data and memories (so as to focus on the stressor).  While beneficial in the short term, in the long run it actually causes the non-stressor related nerves to degenerate and lose connections.  This makes it harder for the non-stressor memories to be accessed, which can lead to more perceived stress.  Exercise on the other hand causes a reduction in the production of cortisol, which can break the cycle.&lt;br /&gt;&lt;br /&gt;The book does get somewhat repetitive as it explains the positive effect exercise has on the neurochemistry of anxiety, depression, ADHD, addition and aging.  On the other hand you really can’t fault the author for providing so much good news.  Each of these conditions represents a deviation from normal brain chemistry and exercise is a strong force for bringing the brain back into its normal condition of plasticity.  Which is to say, that our brains were designed to be adaptable and exercise creates the right chemical soup for the brain to swim in to enhance the flexibility.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-7140906360007649533?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/7140906360007649533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/08/spark-revolutionary-new-science-of.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7140906360007649533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7140906360007649533'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/08/spark-revolutionary-new-science-of.html' title='Spark:  The revolutionary new science of exercise and the Brain.  John Ratey, MD'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-7464679775099614577</id><published>2009-08-05T06:56:00.000-07:00</published><updated>2009-08-05T06:58:31.405-07:00</updated><title type='text'>Another class of Bugs that Are Hard to Unit Test</title><content type='html'>&lt;div&gt;Imagine the set of classes listed at the bottom of this post.  The point is that we're performing a calculation using an expensive test, but when using a derived class we can make use of an inexpensive test.  Both tests will give the same result but clearly its better to use the inexpensive test if we can.  How can we write a unit test that verifies that we've used the inexpensive test (and used it correctly)?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Several possibilities come to mind.  One option is to write a unit test that times the call to the method.  This is pretty clearly not a good idea as it leaves the results hostage to the load on test system.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Other approach is to embed a flag in the class that gets raised when the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;expensiveTest&lt;/span&gt; method is called.  &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;That's&lt;/span&gt; not a terrible idea but it does put test code in the actual production code.  A slightly better idea is to create a test class that extends &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;BaseThing&lt;/span&gt; and implements the flag in its own version of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;expensiveTest&lt;/span&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;@Test &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;testQuickReject&lt;/span&gt;() {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;i&gt; &lt;/i&gt;&lt;/span&gt;&lt;i&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;DerivedClass&lt;/span&gt; foo = new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;DerivedClass&lt;/span&gt; () {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;                 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;boolean&lt;/span&gt; flag = false;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;                 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;boolean&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;expensiveTest&lt;/span&gt;() {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;                     flag = true;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;                     return super.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;expensiveTest&lt;/span&gt;();&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;                 }&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;             };&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;             foo.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;pickBestThing&lt;/span&gt;();&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;             assert(flag == true);&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;}&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This leads to an observation about the effect of testing on code design.  The approach being taken only works if the expensive test is a separate and thus &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;overridable&lt;/span&gt; method.  If the code representing the expensive test was just a bunch of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;inline&lt;/span&gt; code then there would be nothing for the test class to override.  One could certainly go back and to a Refactor:&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;ExtractMethod&lt;/span&gt; on the code, but if the class had been designed with testing in mind from the start that would not be necessary.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;class &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;BaseThing&lt;/span&gt; {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;   Thing &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;pickBestThing&lt;/span&gt;(List&lt;thing&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;thingList&lt;/span&gt;) {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;      Thing &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;bestThing&lt;/span&gt; = null;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;       for(Thing thing : &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;thingList&lt;/span&gt;) {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;           if(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;quickReject&lt;/span&gt;(thing)&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;               continue;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;           if(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;expensiveTest&lt;/span&gt;(thing))&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;              &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;bestThing&lt;/span&gt; = thing;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;       }&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;       return(thing);&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;  }&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;  &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;boolean&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;quickReject&lt;/span&gt;(Thing thing) {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;        return false;  // no-op method&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;  }&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;}&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;class &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_25"&gt;DerivedClass&lt;/span&gt; extends &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_26"&gt;BaseThing&lt;/span&gt; {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;    &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_27"&gt;boolean&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_28"&gt;quickReject&lt;/span&gt;(Thing thing) {&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;        // some real test that only applies in the derived class case&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;    }&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;}&lt;/i&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-7464679775099614577?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/7464679775099614577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/08/another-class-of-bugs-that-are-hard-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7464679775099614577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7464679775099614577'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/08/another-class-of-bugs-that-are-hard-to.html' title='Another class of Bugs that Are Hard to Unit Test'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-5771121686586139082</id><published>2009-07-30T06:35:00.000-07:00</published><updated>2009-07-30T06:38:45.885-07:00</updated><title type='text'>Sharpening Your Sword</title><content type='html'>&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;We’re recently &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;reinstituted&lt;/span&gt; our technical book club, even though we’re probably now busier than ever before. &lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;I sent an email asking our technical staff if they thought there would ever be a time in the future where we would be less busy.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;If not, were they willing to permanently suspend their own technical growth?&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Interestingly enough that email generated a lot of interest in our book club!&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;Choosing which book to study is an exercise in learning about balancing your needs with the needs of the company and the other developers.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Having recently attended &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;JavaOne&lt;/span&gt; I can think of lots of interesting topics:&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;alternate &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JVM&lt;/span&gt; languages (Groovy, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Scala&lt;/span&gt;, Ruby), frameworks: (Spring &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Roo&lt;/span&gt;, Spring &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;DM&lt;/span&gt;, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;OSGI&lt;/span&gt;, Jigsaw),&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;gui&lt;/span&gt; languages (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;JavaFX&lt;/span&gt;, Flex), tools (Maven, Eclipse goodies), general (“&lt;i style="mso-bidi-font-style:normal"&gt;Concurrency In Practice&lt;/i&gt;”, “&lt;i style="mso-bidi-font-style:normal"&gt;Pragmatic Thinking and Learning&lt;/i&gt;”).&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;To some degree you need to build consensus around the book choice but remember that your choice &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;doesn&lt;/span&gt;’t have to be perfect. You may also find as I did that most people are busy enough to defer the choice to you.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;Having selected the book we’re taking a slightly different approach to studying it than we have previously.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;In the past we all read the book chapters offline prior to the meeting and then discussed the chapter during the meeting itself.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;When questions would arise we’d sometimes open up a laptop and try something but it was largely a text centric discussion.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Since our current book is discussing a language that’s new to most attendees we’re going to be much more laptop and code-centric. Our first meeting in fact will be devoted to getting the language and associated tools installed on everyone’s laptops so that we can all type along with the examples in the book.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The goal is to make this more than an academic exercise.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;We’&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;ve&lt;/span&gt; all attended trainings that were interesting and yet covered technologies that we never touched again.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;We’r&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;e&lt;/span&gt; aiming with the code-centric approach to fairly quickly add this new language to the tool box of our developers and testers.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;Some of the practical steps in that direction include:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Installing the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;IDE&lt;/span&gt; plug-in for the new language&lt;br /&gt;&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Modifying our main system build to compile classes written in the new language&lt;br /&gt;&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Adding a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;HelloWorld&lt;/span&gt; class in the new language to the source tree to ensure that the&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;modified build scripts actually&lt;br /&gt;     work.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;And probably most useful, pick an existing but non-critical bug/feature request in our product to fix by adding a new class in the language.  I think that this set of steps will make the new language real for people.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;As a side comment I say that I like asking interview candidates what books they’re recently read.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;It can be fairly revealing about the ongoing educational habits of the candidate.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;It can also reveal how they react to an unexpected question, and one that they might have answered “wrong”.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-5771121686586139082?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/5771121686586139082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/07/sharpening-your-sword.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/5771121686586139082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/5771121686586139082'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/07/sharpening-your-sword.html' title='Sharpening Your Sword'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6899095413221397232</id><published>2009-07-30T06:33:00.000-07:00</published><updated>2009-07-30T06:35:23.026-07:00</updated><title type='text'>Learning from your unit testing mistakes</title><content type='html'>&lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;By now one hopes that we don't have to convince developers of the need to write unit tests, and to use a tool like &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Cobertura&lt;/span&gt; to enforce some level of code coverage.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;And yet, there are other steps that really ought to be taken, steps that I don't see many development shops taking.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;Even with fairly high levels of code coverage (e.g. 80% or greater), we still find defects in our code.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The galling thing is that we find defects even in the code that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Cobertura&lt;/span&gt; tells us we tested.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;How is that possible?&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;The first step in this process is a painful and often time consuming step, but one that can be very revealing.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The next time a defect gets reported against 'tested' code I suggest you stop and write a unit test that finds that exact defect.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;(Now, many shops require a unit test for all defects so this step isn't new for them, but lots of other shops don't require this step).&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;The next step is the most interesting: reflect honestly on why you did not write that unit test already.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Write down the reason in your engineering notebook (you &lt;i&gt;do &lt;/i&gt;keep an engineering notebook, right?)&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Over time you may detect patterns in the types of tests you do and don't tend to write.&lt;span style="mso-spacerun:yes"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;A fairly common case is where &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;mainMethod&lt;/span&gt;() ought to have a call to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;subMethod&lt;/span&gt;() but doesn't.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The defect is that &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;subMethod&lt;/span&gt;() is not called. Even if you have individual tests that execute every line of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;mainMethod&lt;/span&gt; and &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;subMethod&lt;/span&gt; you will not detect the missing call unless you go further.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Presumably &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;subMethod&lt;/span&gt; accomplished something useful, something that your tests of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;mainMethod&lt;/span&gt; could detect.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;The question really morphs from line coverage to results analysis.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;As sad as it may seem many developers do not really understand that your unit tests are useless until you test the results.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;The following test increases your coverage numbers but doesn't actually test anything&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;@Test&lt;br /&gt;public void &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;myTest&lt;/span&gt;() {&lt;br /&gt;&lt;span style="mso-spacerun:yes"&gt;   &lt;/span&gt;int results = &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;mainMethod&lt;/span&gt;();&lt;br /&gt;} &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;There are static code analysis tools such as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;PMD&lt;/span&gt; that will flag unit tests without asserts.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Try adding one of these to your build…but don’t be surprised if many of your unit tests turn out not to be tests at all.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-pagination:none;mso-layout-grid-align:none;text-autospace:none"&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;A question that has bothered me about at this is what to do about stub modules.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;We sometimes have to implement an interface (a bad interface) that has dozens and dozens of methods, only a few of which are actually necessary.&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Your concrete class has to have stub implementations of the unused methods, which leads to a code coverage decision.&lt;span style="mso-spacerun:yes"&gt;   &lt;/span&gt;You can write unit tests for these no-op methods, but since they don’t do anything you have nothing to test (which may be hard to explain to your static analyzer).&lt;span style="mso-spacerun:yes"&gt;  &lt;/span&gt;Or you can skip testing these modules which may reduce your coverage numbers enough to get your coverage enforcement scripts to complain.&lt;span style="mso-spacerun:yes"&gt;   &lt;/span&gt;I’d like to see an annotation of some sort like @STUB that told &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;Cobertura&lt;/span&gt; to ignore this method or class for calculating its coverage metrics.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6899095413221397232?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6899095413221397232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/07/learning-from-your-unit-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6899095413221397232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6899095413221397232'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/07/learning-from-your-unit-testing.html' title='Learning from your unit testing mistakes'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-1159246754789507111</id><published>2009-06-04T23:44:00.000-07:00</published><updated>2009-06-04T23:48:17.525-07:00</updated><title type='text'>JavaOne Thoughts and Observations</title><content type='html'>It's now the second to the last day of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;JavaOne&lt;/span&gt; 2009 and I've had a chance to reflect a bit on what's been going on. First, I have to talk a bit about my experience as a speaker at the conference.&lt;br /&gt;&lt;br /&gt;- On Tuesday we got interviewed by Java Talk Radio (who knew there was such a thing!); the interview is available at:  &lt;a href="http://www.log4jfugue.org/javaone_interview.mp3"&gt;www.log4jfugue.org/javaone_interview.mp3&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;- I had a conversation with Rod Johnson (&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;inventor&lt;/span&gt; of the Spring Framework) and he later tweeted that he thought Log4&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;JFugue&lt;/span&gt; was a "brilliant" idea.&lt;br /&gt;&lt;br /&gt;- Dave &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Koelle&lt;/span&gt; and I gave our presentation &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;yesterday&lt;/span&gt; and it was extremely well received. The room was full, not a single person left during the presentation, we got laughs and applause in the appropriate places, and several people approached us afterwards asking to collaborate with us.&lt;br /&gt;&lt;br /&gt;- I got to play my Native American Flute during the presentation to illustrate a musical point...and I really enjoyed performing. I think I should do more of that.&lt;br /&gt;&lt;br /&gt;- This morning at breakfast I sat down at a table where some people were already sitting, and I said hello. One of the people looked at me and said "Hey, you're that Log4&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;JFugue&lt;/span&gt; guy!". That was fun, and it turns out the person wants to work with me on some extensions to the product.&lt;br /&gt;&lt;br /&gt;Switching gears to the conference itself several key ideas stand out.&lt;br /&gt;&lt;br /&gt;- cost cutting was painfully present in lots of small ways: the conference backpack was very cheap, the food quality was much reduced from previous years, most of the entertainment was recorded rather than live, and most significantly the conference attendance was way down.&lt;br /&gt;&lt;br /&gt;- there didn't seem to be an overall theme to the conference. I think the official theme was ubiquity but it didn't feel pervasive.&lt;br /&gt;&lt;br /&gt;- no one would touch the question of whether there would be a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;JavaOne&lt;/span&gt; next year...even Larry Ellison who made a guest appearance ducked the question. Its possible that this is due to a "quiet period" required by the upcoming merger but uncertainly is scary.&lt;br /&gt;&lt;br /&gt;- dynamic languages or more generally other languages that run on the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;JVM&lt;/span&gt; continue to gain in popularity. I think this is a really good thing. When I went to school engineers were expected to be fluent in multiple languages (assembler, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;fortran&lt;/span&gt;, pascal, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;prolog&lt;/span&gt;, etc). But after a while it seemed to C/C++ and then Java took over and a generation of programmers grew up thinking that they only had to learn a single language. It feels like things are coming full circle back to the notion of using different tools for different tasks. So Java 7 won't have closures? No worries, just write the method needing the closure in Groovy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-1159246754789507111?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/1159246754789507111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/06/javaone-thoughts-and-observations.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1159246754789507111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1159246754789507111'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/06/javaone-thoughts-and-observations.html' title='JavaOne Thoughts and Observations'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6302328278964278984</id><published>2009-04-07T09:25:00.000-07:00</published><updated>2009-04-07T09:28:51.849-07:00</updated><title type='text'>Super Survey - An idea for a new kind of College Class</title><content type='html'>Super Survey is an idea generated by my somewhat eclectic college education but one that I think might have broad appeal.&lt;br /&gt;&lt;br /&gt;I spent my freshman year at Kenyon College where I expected to be a biology major.  I had placed out of Intro Biology by getting a good score on my Advanced Placement Biology test but somehow got shut out of the next biology class and so ended up taking Intro to Philosophy...and discovered that I loved it.&lt;br /&gt;&lt;br /&gt;I &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;transfered&lt;/span&gt; to Wesleyan University after freshman year and continued to take philosophy classes as well as computer classes.  I spent a junior year semester at Goldsmith's College of the University of London.  All in all I took classes in 14 different departments:&lt;br /&gt;&lt;br /&gt;athletics (fencing)&lt;br /&gt;anthropology&lt;br /&gt;biology&lt;br /&gt;chemistry&lt;br /&gt;economics&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;english&lt;/span&gt;&lt;br /&gt;geography&lt;br /&gt;government&lt;br /&gt;math&lt;br /&gt;music&lt;br /&gt;philosophy&lt;br /&gt;political science&lt;br /&gt;psychology&lt;br /&gt;religion&lt;br /&gt;&lt;br /&gt;I got to thinking that most people didn't get the opportunity to take such a broad range of classes, or if they did it happened during senior year.  I can't imagine only discovering my passion at the end of my college career.&lt;br /&gt;&lt;br /&gt;Super Survey is the simple idea of having each class be the Introductory lecture of a different department.  In a 3 day a week class with a 13 week semester you can exposed to 39 or so departments.  The class would be pass/fail based on attendance so the effort for the students would be low.  Each department only has to give one lecture so the effort for them would be low as well; though they have incentive to make it a good lecture.&lt;br /&gt;&lt;br /&gt;The smaller departments have a special incentive to give a good lecture as they can almost &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;always&lt;/span&gt; use more students.   If a school has more than 39 departments they could ration participation in the class to give preference to the departments with lower enrollment&lt;br /&gt;&lt;br /&gt;When I look at a course catalog I'm struck by the departments I never touched (at least undergraduate), at least that list is shorter than the list of departments where I did study:&lt;br /&gt;&lt;br /&gt;art history&lt;br /&gt;astronomy&lt;br /&gt;dance&lt;br /&gt;history (don't get me started on how badly we teach history, see * below)&lt;br /&gt;linguistics (took post-grad)&lt;br /&gt;physics (took post-grad)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;* In Junior and Senior High School we studied the revolutionary war every year. We never studied any non-US history, and we never studied even US history after the revolution. I can tell you when the War of 1812 happened, and who the Spanish-American war was between, but &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;that's&lt;/span&gt; about the limit of my knowledge. For a high end school system (Winchester, MA) that's pathetic.&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;&lt;em&gt;&lt;/em&gt;&lt;em&gt;When I tried to take history in college I found the classes to have a micro-focus such as "The &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;Japanese&lt;/span&gt; Imperial Court from 1901-1902" (I'm not making up that title). I was looking for (and am still looking for) what I'd call Meta-History...what Jared Diamond writes about...the large scale sweeping trends of history.&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6302328278964278984?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6302328278964278984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/04/super-survey-idea-for-new-kind-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6302328278964278984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6302328278964278984'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/04/super-survey-idea-for-new-kind-of.html' title='Super Survey - An idea for a new kind of College Class'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-3558514170349125902</id><published>2009-03-31T15:55:00.000-07:00</published><updated>2009-03-31T15:58:51.494-07:00</updated><title type='text'>Package Scope, the often forgetten good choice</title><content type='html'>Scoping refers to how software programs control which parts of the system can see which other parts. Back in the day, most things were global which meant that everything could see (and touch) everything else. This made writing the code easy, until you had a variable suddendly change out from under you. You then got to spend long hours finguring out who might have changed it...and you had to look everywhere because everyone had access.&lt;br /&gt;&lt;br /&gt;Programming languages such as Java provide a number of scopes that can be specified to control who can see a particular variable. Ask the average Java programmer how many types of scope there are and they'll probably say three: public, private and protected. Public scope is like the old global...a public object can be seen and touched by anyone. Private scope is basically the opposite...a private object can only been seen by the class that owns it. Conventional wisdom says that most things should be private. Protected scope is a variation on private. A protected variable can be seen the class that owns it or by any class derived from that class.&lt;br /&gt;&lt;br /&gt;Thats the answer you'll get from the average programmer, but its the wrong answer.&lt;br /&gt;&lt;br /&gt;The right answer is that there are four scopes in Java. The scope that most people forget about is package scope. An object with package scope can be seen by any other object in the package. This is a surprisingly useful scope and so its a bit surprising that so many programmers ignore it. Part of the reason for that is that while the other three scopes each have keywords, you get package scope by not specifying any scope. Personally I think the language should have included a package_scope keyword so as to make this clear but thats water under the bridge.&lt;br /&gt;&lt;br /&gt;Why is package scope so interesting?&lt;br /&gt;&lt;br /&gt;Consider a software system with two classes: One and Two. Assume that we want to expose two methods to the outside world "begin()" and "end()". Further assume that each class needed to call a method in the other class. The following is the sort of code that most people would write.&lt;br /&gt;&lt;br /&gt;package sample;&lt;br /&gt;public class One {&lt;br /&gt;  public begin() {&lt;br /&gt;    new Two().internal();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public internal1() {&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;package sample;&lt;br /&gt;public class Two {&lt;br /&gt;  public end() {&lt;br /&gt;    new One().internal1();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public internal2() {&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Most people would tend to make the two internal methods public so that the two classes could use them. The problem with that is that it makes the two internal methods part of the publically accessible API of the overall system. A user of this package has no particular clue that they should or should not call those internal methods.&lt;br /&gt;&lt;br /&gt;A better approach is to remove the "public" in the declaration of the two internal methods. This leaves them at package scope, which is just fine. The two classes are in the same package and so have access to all package scope methods. The two internal methods are now however absent from the publically visible API of the system, which is as it should be.&lt;br /&gt;&lt;br /&gt;So, the rule of thumb should be:&lt;br /&gt;  default to making classes and methods package scope&lt;br /&gt;  make methods only used within a class private&lt;br /&gt;  and, only grudgingly make the hopefully small number of truely public methods be declared as public.&lt;br /&gt;&lt;br /&gt;Your users and maintainers will thank you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-3558514170349125902?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/3558514170349125902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/03/package-scope-often-forgetten-good.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3558514170349125902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3558514170349125902'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/03/package-scope-often-forgetten-good.html' title='Package Scope, the often forgetten good choice'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6179276659816326588</id><published>2009-03-02T13:57:00.000-08:00</published><updated>2009-03-02T14:00:20.396-08:00</updated><title type='text'>My JavaOne proposal was accepted!</title><content type='html'>My proposal to give a talk at JavaOne with my friend David Koelle was just accepted.&lt;br /&gt;We'll be giving the following presentation in San Francisco in June.&lt;br /&gt;&lt;br /&gt;Abstract: Would you like to create Java™ technology-based programs that play or create music but don't know where to begin? Come to this session to learn all about JFugue, an open-souce API that enables you to program music with ease. With its simple but powerful API, new UI components, and cool features, JFugue promotes creative music programming and exploration. For example, what if you could listen to what your application has been trying to say to you? Learn about Log4JFugue, which combines the power of Log4J and JFugue to turn your application's logging into a real-time song. By listening to your application, your pattern-matching brain can detect subtle changes in behavior that would normally be lost in a sea of log messages. The intended audience for this technical session is developers at any level who are interested in writing musical programs or who would like to use more parts of their brain to increase their productivity. In the session • Learn how to get and use JFugue • Learn about some advanced and exciting features of JFugue, including new ones • Learn about Log4JFugue for turning your log files into songs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6179276659816326588?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6179276659816326588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/03/my-javaone-proposal-was-accepted.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6179276659816326588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6179276659816326588'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/03/my-javaone-proposal-was-accepted.html' title='My JavaOne proposal was accepted!'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-5363719244087332070</id><published>2009-02-23T09:47:00.000-08:00</published><updated>2009-02-23T09:49:27.858-08:00</updated><title type='text'>Re-experiencing content, followup</title><content type='html'>I've had several interesting conversations about re-experiencing content since the last post.&lt;br /&gt;&lt;br /&gt;One friend asked about the phenomenon of people getting stuck on a particular content and watching / reading it over and over again.  While this is usually associated with younger children who can watch the same episode of Thomas the Tank Engine multiple times a day, it sometimes occurs with adults as well.  I think these are cases of the person looking for comfort through familiarity.  When life seems unpredictable it can be comforting to revisit a content that won't surprise us.  For small children most of life is unpredictable.   Try to imagine how weird the world must seem before you figure out object permanence!  I know that when I'm sick I'll tend to dig out an old movie to watch.   This might also be why we watch certain movies (&lt;em&gt;It’s a Wonderful Life&lt;/em&gt;) every year at a special time.&lt;br /&gt;&lt;br /&gt;I’d distinguish this from watching a movie a few times to hear or memorize more lines, or to experience it again with the ending already known.  I’ll confess to having watched some Monty Python movies too many times so as to memorize the lines from a scene or two.  Inexplicably this is sometimes viewed as an accomplishment.  :-)&lt;br /&gt;&lt;br /&gt;Another reader wrote me to say: "&lt;em&gt;These are very interesting matters.  I haven't thought about them in an organized way before.  I can watch a movie a few times  (not multiple times, unless there's a lot of time in between).  I've always supposed that the reason I want to listen to music over and over again is that I cannot really retain music--I mean I can remember short songs etc, but I can't unroll a whole symphony in my head, just parts of it, although musicians can replay the whole thing in their heads.  I think I don't have the capacity.  On the other hand, words stick in my head like glue. I have hundreds, maybe thousands, of word things, in my head but not a whole symphony or sonata.  I remember songs, but probably because of the words.  Do you think the content thing may have something to do with one's capacity for enjoying a particular medium? Some people are visual, verbal, or whatever?  Interesting things to ponder&lt;/em&gt;"&lt;br /&gt;&lt;br /&gt;Another person said that for them music could be re-experienced many times because they were different each time they heard the song.  When it was pointed out that they were also different when they re-read a book they said that experiencing a book or movie was more immersive than listening to a song...there was less room for them.  Perhaps listening to music is more of a participative thing while books / movies are more like being an observer?  I don't necessarily share this belief but I can understand it.  After all, I can listen to my ipod while coding at the office but they tend to frown on people watching movies there!&lt;br /&gt;&lt;br /&gt;I wonder how this relates the concepts of Popular vs. Long Tail content?  One school of thought says that most people will be watching the same small set of popular contents (the new “House” or “Heros” or “Battlestar”).  The other school of thought says that most people will be off in their own corner watching their favorite old episode of “I Love Lucy”, “Hogan Heros”, or “F Troop”.  For those of us designing Video Servers the difference matters.  I’ve never heard the issue of whether individuals re-watch a given content brought up in the Popular vs. Long Tail discussions.  Perhaps it should be.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-5363719244087332070?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/5363719244087332070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/02/re-experiencing-content-followup.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/5363719244087332070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/5363719244087332070'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/02/re-experiencing-content-followup.html' title='Re-experiencing content, followup'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-3363517360492834259</id><published>2009-02-15T18:15:00.000-08:00</published><updated>2009-02-15T18:18:20.451-08:00</updated><title type='text'>The Kindle and the cost/payoff of experiencing content again</title><content type='html'>In thinking about the Kindle (Amazon's electronic book reader) I got thinking about a larger question about how people experience content. I'm one of those people who can watch the same movie multiple times, and I tend to accumulate tapes and DVDs of my favorite movies. My wife has never understood this, once she's seen a movie she's done with it and has no interest in seeing it again. We've both tended to think the other one was rather peculiar. We were at a brunch today and I tried to enlist support for my way of thinking but found surprising diversity.&lt;br /&gt;&lt;br /&gt;Some people viewed movies as one-shot experiences but would read a book multiple times, others viewed both movies and books as one-shots, but most people viewed music as something to experience over and over again.&lt;br /&gt;&lt;br /&gt;So I asked people: what's different about experiencing a song from experiencing a movie?&lt;br /&gt;&lt;br /&gt;Several people said that while movies are based on a narrative, they did not see music that way. Several said that they did not feel that songs told a story (some of the others of us found that idea shocking...of course a song tells a story...for us). So for these people a movie is boring the second time around because the know the story but a song is just an experience ... so repeating it is still rewarding...perhaps like eating ice cream? The fact that you've eaten ice cream before doesn't diminish your enjoyment of more ice cream.&lt;br /&gt;&lt;br /&gt;I wonder if there is a different kind of answer underlying this: limited time. I can listen to a song in 2-3 minutes, watching a movie takes about two hours, and reading book might take 5-10 hours. Who has that kind of time for a repeat?&lt;br /&gt;&lt;br /&gt;On the other hand, there is a payoff for getting involved in a long story...you get to know the characters. I tend to dislike short stories because why should I get invest time in a story that won't return my investment? Think of the angst many people feel when a beloved TV series ends (The Sopranos, Friends, Mash, etc). There has been an investment and the end of the story brings an end to the return on that investment. For some of us, re-watching a movie gives us some extra return on the time we spent on the content in the first place.&lt;br /&gt;&lt;br /&gt;The link back to the Kindle for me is that for many people the fact that Kindle does not contain your existing library of books is simply not an issue. Many people view their existing library of books as more or less dead storage; perhaps to be rarely accessed at some time but certainly not in need of ready access. From this point of view loading the Kindle with only new material is just fine. I suspect that this sort of person would also be happy with a Kindle-like device with very limited storage, perhaps only enough to hold the books you were currently reading.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-3363517360492834259?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/3363517360492834259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/02/kindle-and-costpayoff-of-experiencing.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3363517360492834259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3363517360492834259'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/02/kindle-and-costpayoff-of-experiencing.html' title='The Kindle and the cost/payoff of experiencing content again'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6925751882235540012</id><published>2009-01-24T04:40:00.000-08:00</published><updated>2009-01-24T04:42:39.856-08:00</updated><title type='text'>How Digital Cameras remind me of the old B&amp;W days</title><content type='html'>Recently my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Tai&lt;/span&gt; Chi instructor asked me to take pictures of my class for the school's web site. His digital camera has some shutter lag which makes photographing people in motion a hit or miss proposition. So, I took a hundred or more shots, knowing that I only needed a couple of good shoots.&lt;br /&gt;&lt;br /&gt;As I was doing this I was reminded of my old days learning to shoot black and white photos, (which happened long before there was such a thing as digital photography) and I was struck by the similarities.&lt;br /&gt;&lt;br /&gt;I learned photography from an old friend, long since passed away named Christopher &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Resnik&lt;/span&gt;. Chris taught photography from the ground up. We bought 100 foot rolls of 35mm film and made our own film cartridges. Cameras back then were fully manual and Chris wouldn't even let us use a light meter...&lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;preferring&lt;/span&gt; to train our eyes to read the light and determine the exposure. To this day I can look around and know that such and such a day requires an F8, 1/250 second exposure with 400 ASA film. Today most people probably don't even know what those terms mean.&lt;br /&gt;&lt;br /&gt;Since we bought film in bulk and did all of our own darkroom work it was quite inexpensive and so we shoot a lot. Chris used to say that is you got one or two good shots out of a 36 exposure roll you were doing well. When we found an interesting subject we'd take a number of shots of us...from various angles, with various exposures and with various perspectives. We might take whole roll of film on a single subject. Taking 100 &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Tai&lt;/span&gt; Chi shots reminded me of that.&lt;br /&gt;&lt;br /&gt;Back in the days before digital cameras a roll of color film might cost $3-$5 to buy and then perhaps $10-$12 to process. With that price model you were careful how you spent your photos and a roll of film might sit in the camera for months or a year.&lt;br /&gt;&lt;br /&gt;We've now come full circle in a way. Photos are basically free, especially since many people never make prints but instead view their photos on a digital picture frame or online via &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Snapfish&lt;/span&gt; or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;KodakGallery&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;A missing element for most digital photographers however is the culling process. Back in the day, after processing a roll we'd stay in the darkroom evaluating our photos and would throw out 90% of them. We shot 36 pictures of that flower so that we could find the best one, but then we left the other 35 shots on the darkroom floor. Today most digital photographers take the 36 photos, post them all to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;Snapfish&lt;/span&gt; and go on their way. After a few months they have 100s or 1000s of pictures, most of which are awful and have no idea where the dozen or so gems are.&lt;br /&gt;I'm sure there's a metaphor in here for the pace of &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;modern&lt;/span&gt; life but it escapes me. I do however like when life comes full circle.&lt;br /&gt;&lt;br /&gt;For my own pictures, (and I have a 3 year son so I take a lot of pictures), I've developed a culling process. When I plug my digital camera or my IPhone into the computer it creates a new directory where all the pictures go. I then create a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;subdirectory&lt;/span&gt; called so_so_shots. I immediately look at each picture and if it isn't great it gets moved to the so_so_shots directory. Since I'm just moving them rather than deleting them I can be quick and ruthless in the decision. This lets me easily manage a much smaller set of much better pictures.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6925751882235540012?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6925751882235540012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/01/how-digital-cameras-remind-me-of-old-b.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6925751882235540012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6925751882235540012'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/01/how-digital-cameras-remind-me-of-old-b.html' title='How Digital Cameras remind me of the old B&amp;W days'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-1851021789531367177</id><published>2009-01-20T12:17:00.001-08:00</published><updated>2009-01-20T12:23:42.764-08:00</updated><title type='text'>Why I don't want a Kindle yet</title><content type='html'>The Kindle is Amazon's book reader and its an amazing device, but one that I don't want yet.&lt;br /&gt;&lt;br /&gt;The Kindle has an astonishingly readable screen (using electronic ink rather than a display tube or LCD).  This means that once its painted a page there is no electricity needed to maintain the image so its always on, and the battery life is very good.&lt;br /&gt;&lt;br /&gt;So why don't I want one of these cool devices that would let me take all/most of my books with me?  Because Amazon wants me to pay for all of those books again. &lt;br /&gt;&lt;br /&gt;As I look at my book shelves I see hundreds of books, most which were purchased from Amazon.  They know this.  And yet, when I buy a Kindle I have to turn around and repurchase all of those books again if I want to put them on the device.  And I have to pay what amounts to full price.&lt;br /&gt;&lt;br /&gt;When you buy a Kindle Amazon should give you and electronic copy of all they books you've purchased from them, say in the last couple of years.    Until they do something like that the advertising line that you can take all your books with you simply isn't meaningful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-1851021789531367177?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/1851021789531367177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/01/why-i-dont-want-kindle-yet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1851021789531367177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/1851021789531367177'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/01/why-i-dont-want-kindle-yet.html' title='Why I don&apos;t want a Kindle yet'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-3371422003229955083</id><published>2009-01-08T09:45:00.000-08:00</published><updated>2009-01-08T09:52:20.679-08:00</updated><title type='text'>A Tutorial for Adding Groovy to a Java Project</title><content type='html'>I program primarily in Java and have done so for close to ten years. Before that I programed in C++, C, Pascal, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Prolog&lt;/span&gt; (yes, I had a real job using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Prolog&lt;/span&gt;!), and even &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Fortran&lt;/span&gt; and assembler. So I know that languages wax and wane in their importance. So, I decided to add a class or two written in the Groovy language to one of my side projects.&lt;br /&gt;&lt;br /&gt;For those not familiar with Groovy its one of a surprisingly large group of languages whose source code is different from Java, and yet runs on the Java &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;runtime&lt;/span&gt;. Java source code is compiled into Java &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;bytecode&lt;/span&gt; which is executed by the Java Virtual Machine (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;JVM&lt;/span&gt;) on your computer. Groovy source code is also compiled into Java &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;bytecode&lt;/span&gt; which then runs on the very same &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;JVM&lt;/span&gt;. This allows the two languages to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;interoperate&lt;/span&gt; in interesting ways.&lt;br /&gt;&lt;br /&gt;As a starting point for this tutorial I assume you have an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_9"&gt;existing&lt;/span&gt; Java based project, use Ant to build your system and use Eclipse as your development environment. None of that is required for Groovy but it is a fairly standard setup and its what I use, both at home and at work.&lt;br /&gt;&lt;br /&gt;The steps are basically&lt;br /&gt; a) download and install the Groovy &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;GDK&lt;/span&gt;&lt;br /&gt; b) add a how-to-compile-groovy task to your Ant build.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;xml&lt;/span&gt; (the task is included in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;GDK&lt;/span&gt;)&lt;br /&gt; c) add the groovy-all.jar file to your library path&lt;br /&gt; d) add the groovy-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;plugin&lt;/span&gt; to your Eclipse project&lt;br /&gt; e) enable groovy-nature in your Eclipse project&lt;br /&gt; f) write a Groovy class and use it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Overall this should take no more than twenty minutes or so. One of the really cool things is that once you have a Groovy class you can use it from your Java classes just like any other class...your Java code has no idea its using a class written in Groovy.&lt;br /&gt;Now lets look at the steps listed above in cookbook manner.&lt;br /&gt;&lt;br /&gt;a) go to http://groovy.codehaus.org/Download and select the latest stable release (currently 1.5.7). Click on the download link and follow the very simple instructions.&lt;br /&gt;&lt;br /&gt;b) add the following task to your build.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;xml&lt;/span&gt; to define how to compile groovy code: &lt;taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="my.classpath"&gt;You then need to actually compile your groovy source files. A standard build.xml will have a compile target that invokes the javac task compile your java source files. I changed that so the my compile task was empty but depended on java_compile and groovy_compile targets. See the full definition of the groovyc task options here: &lt;a href="http://groovy.codehaus.org/The+groovyc+Ant+Task"&gt;http://groovy.codehaus.org/The+groovyc+Ant+Task&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;c) the Groovy GDK includes a groovy-1.5.7-all.jar file. Add this to your library and execute paths&lt;br /&gt;&lt;br /&gt;d) From Eclipse, select Help, Software Updates, Find and Install, Search for new features to install, next.Now select New Remote Site. Enter Groovy as the Name and http://dist.codehaus.org/groovy/distributions/update as the URL.Press Ok and you should find Groovy added to the list of Sites to include in search. Press Finish.It should find Groovy, check the features you want and press Next.Accept the license terms and press Finish. At this point the plugin will be downloaded and installed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;e) From Eclipse select your proejct, right click and select Groovy-&gt;Add Groovy Nature. Eclipse will now understand files with the .groovy extension.&lt;br /&gt;&lt;br /&gt;f) Remember that any Java file is also a Groovy file, so if you want to start with baby steps just rename one of your java files to have a groovy extension. Eclipse and Ant will recognize it and compile it to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;bytecode&lt;/span&gt; and then allow you to use it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You could then take another small step and remove most of the semi-colons, because Groovy doesn't require them.If your class has import statements from various java packages you can probably remove them as well since Groovy automatically imports them.&lt;br /&gt;&lt;br /&gt;Clearly you then want to write a class that actually uses Groovy features but &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_16"&gt;that's&lt;/span&gt; beyond the scope of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;HelloGroovyInAJavaProjectWorld&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-3371422003229955083?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/3371422003229955083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/01/tutorial-for-adding-groovy-to-java.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3371422003229955083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/3371422003229955083'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/01/tutorial-for-adding-groovy-to-java.html' title='A Tutorial for Adding Groovy to a Java Project'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-440416150027206763</id><published>2009-01-05T18:26:00.000-08:00</published><updated>2009-01-05T18:29:18.810-08:00</updated><title type='text'>Tai Chi, Software Design and simplicity</title><content type='html'>Its always interesting when different aspects of life intersect. In this case &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Tai&lt;/span&gt; Chi, Software Design and simplicity. One of the lessons I've been learning in my &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Tai&lt;/span&gt; Chi studies is the value of simplicity and minimalism. Most of the flaws in my technique end up being attempts to do to much. My motions tend to be too large and often too complex. Such large and complex motions are relatively easy to defeat.&lt;br /&gt;&lt;br /&gt;In software as well there is the truism that the code you don't write doesn't contain any bugs. There are many possible &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;refactorings&lt;/span&gt; that can increase the quality or robustness or performance of a program, but code that no longer exists takes no time to run, doesn't need to be learned and doesn't obscure the structure of a program.&lt;br /&gt;&lt;br /&gt;The trick of course is that simplicity is hard. My &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Tai&lt;/span&gt; Chi &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;Shifu&lt;/span&gt; (instructor) gives me simple instructions from which I somehow deduce complexity. Only after continued study am I sometimes able to get the flash of "oh, &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;that's&lt;/span&gt; all I have to do?" as I see the simple and powerful move hiding inside my attempts.&lt;br /&gt;&lt;br /&gt;Even though I know this to be the case I do not seem to be able apply to new moves I learn. There seems to be need to for the learning to be a process. The simple move doesn't seem to be obvious so I flounder about adding unnecessary nuances.&lt;br /&gt;&lt;br /&gt;This makes more sense to me in software design, perhaps because I've been doing it for so long. In software I do have the ability to move fairly quickly to a simple design, and to spot the extraneous complexity in most designs. In software the simple code path usually seems to leap out of the spaghetti I often encounter.&lt;br /&gt;&lt;br /&gt;One way of looking at this might be via the Dreyfus model of learning (see Pragmatic Programmers). The Dreyfus model describes five stages of skill:&lt;br /&gt;  Novice, Advanced Beginner, Competent, Proficient and Expert.&lt;br /&gt;&lt;br /&gt;Novices need to be given a cookbook description of how to perform a task, while Experts simply do the task and might not even be able to describe how or why they are doing it. The inability to describe why can be a problem. I've had bosses ask me why I think design X is better than design Y. My answer that Design X "sings" or is "beautiful" while Design Y "feels" clunky does not tend to convince them.&lt;br /&gt;&lt;br /&gt;I remember watching a documentary about an about-to-retire Cotton Inspector trying to teach his apprentice how to select the best cotton. The expert said to rub the cotton between your fingers and feel when it was "good". The apprentice had no idea what that meant but it was the best answer the expert could give him.&lt;br /&gt;&lt;br /&gt;I think that most people stay in their comfort zone and thus stay within whatever skill level they've &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;achieved&lt;/span&gt;. While I might claim to be in the expert group in &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_7"&gt;software&lt;/span&gt; design I'm certainly no higher than advanced beginner or competent in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;Tai&lt;/span&gt; Chi. Hopefully this makes me a better instructor as I can relate to the students just starting to study &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;Tai&lt;/span&gt; Chi.&lt;br /&gt;&lt;br /&gt;Whether all of this eases my learning curve with Groovy or &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;Scala&lt;/span&gt; (new computer languages) remains to be seen :-) It does however remind me of the quote by &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;Blaise&lt;/span&gt; Pascal: "&lt;em&gt;I have made this letter longer than usual because I lack the time to make it shorter&lt;/em&gt;".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-440416150027206763?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/440416150027206763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/01/tai-chi-software-design-and-simplicity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/440416150027206763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/440416150027206763'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/01/tai-chi-software-design-and-simplicity.html' title='Tai Chi, Software Design and simplicity'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-8858331389597284963</id><published>2009-01-03T05:45:00.001-08:00</published><updated>2009-01-03T05:49:08.445-08:00</updated><title type='text'>software haiku</title><content type='html'>I wrote this &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;haiku&lt;/span&gt; a couple of years ago to describe the software I was working on and it seems pretty appropriate to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Wabi&lt;/span&gt; &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Sabi&lt;/span&gt;.   For non-software developers spaghetti is an &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_3"&gt;adjective&lt;/span&gt; used to &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;denigrate&lt;/span&gt; code whose logic seems to go in all directions at once with no hope of untangling it.&lt;br /&gt;&lt;br /&gt;Code in Haste no Pattern&lt;br /&gt;Spaghetti's not food for the brain&lt;br /&gt;The mind recoils, I weep&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-8858331389597284963?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/8858331389597284963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2009/01/software-haiku.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8858331389597284963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/8858331389597284963'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2009/01/software-haiku.html' title='software haiku'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-595276760174032703</id><published>2008-12-31T11:24:00.000-08:00</published><updated>2008-12-31T11:29:48.057-08:00</updated><title type='text'>A Cost Model for Anticipatory Design</title><content type='html'>Anticipatory design, as coined by Ron Jeffries, describes the extra effort a software developer might do to anticipate new or changing requirements. It’s interesting to attempt to model the cost of doing such work, particularly in light of XP or Agile methodologies.  The goal is to come up with a rigorous basis for deciding when to do “extra” design up front.&lt;br /&gt;&lt;br /&gt;A key variable in Jeffries model is R, the cost of designing a feature only when it is explicitly needed.  Jeffries explores the cases where R ranges from 1 (implying no extra cost) to 5 (i.e. doing the design later is 5 times more expensive).&lt;br /&gt;&lt;br /&gt;We extend the treatment of R in two directions: scale and variability.  We believe that 5 is by no means the upper bounds on the cost of late design.  We also believe that R comes in at least three variations.&lt;br /&gt;&lt;br /&gt;We believe that there are actually three distinct class of R: R-normal, R-catastrophic, and R-XP. &lt;br /&gt;&lt;br /&gt;R-normal is the R described by Jeffries in which doing the design later incurs a small but noticeable cost.&lt;br /&gt;&lt;br /&gt;R-catastrophic  is the case in which doing the design later incurs a huge cost.&lt;br /&gt;&lt;br /&gt;R-XP is a class surprisingly not described by Jefferies in which doing the design later actually decreases the cost.  This would occur in cases where it turn out that a needed component had already been created by someone else (within the group or as a third party purchase/download).&lt;br /&gt;&lt;br /&gt;The question becames how to quantify the relative frequency of the three classes R and to see how that would change the overall cost equation.  We began by creating a model in which&lt;br /&gt;&lt;br /&gt;R-overall = (R-normal * percent occurrence) +&lt;br /&gt;                    (R-catastrophic  * percent occurrence) +&lt;br /&gt;                    (R-XP * percent occurrence);&lt;br /&gt;&lt;br /&gt;We set R-normal  to 5 (as per Jeffries),  R-XP is set to -5 (i.e. a saving) and R-catastrophic  to a huge value such as 1000 (that is the definition of catastrophe after all).&lt;br /&gt;&lt;br /&gt;Given these conditions the cost of catastrophic changes almost always overwhelms the effect of the R-normal and R-XP components. Only when the frequency of catastrophic change becomes extremely low or the definition of ‘catastrophe’ is set extremely mild do the other components have a real influence on the overall cost. &lt;br /&gt;&lt;br /&gt;The question then becomes: does the practice of delayed design, or XP as a whole, itself influence the occurrence rate of catastrophic design failure?  This would seem to have to be true in order to explain the successes being reported for projects using XP techniques.  It also seems to be implied by Martin Fowler’s seminal work on refactoring.  When discussing design Fowler advocates doing just enough design so that there is confidence that the resulting code would be refactorable.  In other words, do enough design to leave the code resilient to change and thus resistant to catastrophe.  &lt;br /&gt;&lt;br /&gt;The conclusion to draw from this analysis is somewhat against the conventional wisdom.  Our analysis indicates that &lt;strong&gt;the benefit of XP is not so much that it is faster but rather that it is safer! &lt;/strong&gt; XP is often considered a high risk strategy and yet our analysis shows the exact opposite.  Done correctly, XP leads to just enough design to avoid the castrophes that delay or destroy so much projects.&lt;br /&gt;&lt;br /&gt;(portions taken from an unpublished paper written in collaboration with Morgan Creighton, 2001)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-595276760174032703?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/595276760174032703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2008/12/cost-model-for-anticipatory-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/595276760174032703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/595276760174032703'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2008/12/cost-model-for-anticipatory-design.html' title='A Cost Model for Anticipatory Design'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-7697818358439132436</id><published>2008-12-31T07:44:00.001-08:00</published><updated>2008-12-31T07:50:44.957-08:00</updated><title type='text'>one more way to make cell phone vibrate mode more usable</title><content type='html'>I promise this will be my last post about cell phone vibrate mode :-)&lt;br /&gt;&lt;br /&gt;The biggest problem with vibrate mode is that people don't use it.&lt;br /&gt;The second biggest problem, for me, is setting it and then forgetting to unset it which can result in missing calls.&lt;br /&gt;&lt;br /&gt;Currently setting your phone to vibrate mode is binary, you do it or you don't.   Wouldn't it make more sense to tell your phone to go into vibrate mode for the next hour?&lt;br /&gt;&lt;br /&gt;Imagine a configurable go-to-vibrate-mode-for-n-hours option.  Set it for 1, 2 or 3 hours and from then on when you went into vibrate mode it would return to normal mode when the time expired.&lt;br /&gt;&lt;br /&gt;Fewer missed calls...and maybe fewer lost phones.  Ever misplace your phone and then try to call it so you can find the phone by listening for the ring?  This doesn't work if your phone is in vibrate mode (which Murphy tells us will always be the mode its in when you lose it!).  With auto-vibrate-reset this problem goes away.&lt;br /&gt;&lt;br /&gt;Ok, I'll get back to discussing software, cognition and philosophy now.  :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-7697818358439132436?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/7697818358439132436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2008/12/one-more-way-to-make-cell-phone-vibrate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7697818358439132436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/7697818358439132436'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2008/12/one-more-way-to-make-cell-phone-vibrate.html' title='one more way to make cell phone vibrate mode more usable'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-498696449286506427</id><published>2008-12-31T06:00:00.000-08:00</published><updated>2008-12-31T06:21:49.376-08:00</updated><title type='text'>Is Ruby the new "C"?  Decoration vs. Terseness</title><content type='html'>Hopefully the title of this post sounds odd.   Asking if Ruby is the new Java would be more expected, but I want to look at a different aspect of language evolution than just how Ruby compares to Java.&lt;br /&gt;&lt;br /&gt;Way back when I started playing with computers we had lots of languages to choose from, Pascal, Fortran, Lisp, Prolog (my personal favorite for some tasks).  At that time is was standard and expected that an engineer would be fluent in multiple languages.&lt;br /&gt;&lt;br /&gt;One of the aspects of C that is striking is how terse the language can be.   Complex statements such as z = (++x &gt; y) ? m : n; can be written with what &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;Tufte&lt;/span&gt; might call a high data to ink ratio (&lt;a href="http://www.infovis-wiki.net/index.php?title=Tufte%2C_Edward"&gt;http://www.infovis-wiki.net/index.php?title=Tufte%2C_Edward&lt;/a&gt;).   To put this in the modern &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;vernacular&lt;/span&gt;: C has low &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_2"&gt;ceremony, most everything you write matters, there is a low degree of extra tokens needed just to keep the compiler happy.&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;As we moved to a Java based world where many/most engineers seemed to think they only needed to know one language, we found ourselves with a language with a bit more ceremony.  To create a new object I need to say:&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;   MyClass myObject = new MyClass();&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;Thats a lot of tokens just to get a new object.&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;One of the stated advantages of some of the newer languages such as Ruby is that they are low on ceremony.   Sometimes writing fewer token makes the code simpler but sometimes it simply makes it terse.&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;I wonder if somehow we're coming full circle back to the asthetic of C.&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-498696449286506427?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/498696449286506427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2008/12/is-ruby-new-c-decoration-vs-terseness.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/498696449286506427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/498696449286506427'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2008/12/is-ruby-new-c-decoration-vs-terseness.html' title='Is Ruby the new &quot;C&quot;?  Decoration vs. Terseness'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-6164342888694726269</id><published>2008-12-31T05:48:00.000-08:00</published><updated>2008-12-31T05:58:59.540-08:00</updated><title type='text'>Another way to automate cell phone etiquette</title><content type='html'>One approach that some people have proposed to eliminate intrusive cell phone ringing is to jam or &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;shield&lt;/span&gt; an area from the cell phone signal.  Its actually surprisingly easy, but possibly illegal, to block the signal.  A group in Japan has &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;experimented&lt;/span&gt; with adding metal oxides to paint, a wall painted in this way appears to block cell phone reception.&lt;br /&gt;&lt;br /&gt;I think this is the wrong approach, and not just for the standard "what about the doctor who much always be reachable" argument.&lt;br /&gt;&lt;br /&gt;A better approach would be to standardise on a signal / text message / whatever that could be broadcast to a cell phone to request that the phone turn itself into vibrate mode.   Movie theatres, resturants, etc. could simply broadcast this signal and compliant phones would become well behaved.   Considering the venom we have for people who interrupt us with inappropriate cell phone ringing non-compliant phones might soon find themselves at a competitive disadvantage.&lt;br /&gt;&lt;br /&gt;Alternatively, location aware phone like the IPhone could take a pro-active approach an notice their own location.  Imagine being able to configure your IPhone so that whenever you were "near" a location on your Be-Polite-List it automatically went into silent mode.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-6164342888694726269?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/6164342888694726269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2008/12/another-way-to-automate-cell-phone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6164342888694726269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/6164342888694726269'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2008/12/another-way-to-automate-cell-phone.html' title='Another way to automate cell phone etiquette'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-362788945979237212.post-4230786132137963482</id><published>2008-12-31T05:23:00.000-08:00</published><updated>2008-12-31T05:36:25.836-08:00</updated><title type='text'>Bad cell phone etiquette is the cell phone's fault</title><content type='html'>Though its hard to remember life without a cell phone it also hard to imagine not having to complain about bad cell phone &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;etiquette.  As fun as it to complain about people forgetting to set their phones to vibrate in the movies, at dinner, etc., I propose that the solution to this problem is to fix the phone, not the user. &lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;The cell phone is a small computer, and we should offload standard tasks to that computer, and setting your phone to vibrate in certain well known conditions is a standard task.&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;My IPhone for example has a build in Calandar, and is well setup to know about my Google or Microsoft calendar as well.   I think my phone should notice when I'm in a calendar event and automatically set my phone to vibrate mode.  How hard is that?  Imagine your phone being smart enough to know when you're in a situation where a silent ring is more appropriate than an audible ring.&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="blsp-spelling-corrected"&gt;This approach would have the additional benefit of automating the return to audible ringing.  I suspect I'm not the only one who sets their phone to vibrate before going into the movies and then forgets to turn the ringer back on at the end of the movie.  I've missed a lot of calls that way.  Noticing the end of an event and taking appropriate action, turning back on the ringer, is another task we should hand off to the phone.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/362788945979237212-4230786132137963482?l=briantarbox.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://briantarbox.blogspot.com/feeds/4230786132137963482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://briantarbox.blogspot.com/2008/12/bad-cell-phone-etiquette-is-cell-phones.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/4230786132137963482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/362788945979237212/posts/default/4230786132137963482'/><link rel='alternate' type='text/html' href='http://briantarbox.blogspot.com/2008/12/bad-cell-phone-etiquette-is-cell-phones.html' title='Bad cell phone etiquette is the cell phone&apos;s fault'/><author><name>Brian Tarbox</name><uri>http://www.blogger.com/profile/11506285455540985587</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://2.bp.blogspot.com/_IfJY2s7tioA/SVtxlrDyb5I/AAAAAAAAAEM/5HJn9ZZ2xsU/S220/Brian.jpg'/></author><thr:total>0</thr:total></entry></feed>
