<?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-5431077956781893304</id><updated>2011-11-27T15:14:11.877-08:00</updated><category term='I/O'/><category term='sub debs'/><category term='java'/><category term='12xu'/><category term='jre'/><category term='jdk'/><category term='patterns'/><category term='wire'/><category term='programming'/><category term='punk'/><category term='unit testing'/><category term='music'/><category term='eclipse'/><category term='swt'/><category term='anti-patterns'/><category term='software development'/><title type='text'>Confusion and Delay</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-2333870080987593439</id><published>2010-08-05T08:29:00.000-07:00</published><updated>2010-08-05T09:33:11.401-07:00</updated><title type='text'>Using Google Chrome as an external browser in Eclipse on Mac</title><content type='html'>I like Google Chrome a lot, so I'd like to use it as my default browser in Eclipse.  So I do what I'm supposed to do:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;Eclipse-&gt;Preferences-&gt;General-&gt;Web Browser&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Select "Use external Web browser"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Select "New..."&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Name = "Chrome"&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Parameters = "%URL%"&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;But that doesn't work for some reason - not really sure why.  To get it to work I had to use a shell script:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;open -a '/Applications/Google Chrome.app' $1 &amp;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and use that as my executable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-2333870080987593439?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/2333870080987593439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=2333870080987593439' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2333870080987593439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2333870080987593439'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2010/08/using-google-chrome-as-external-browser.html' title='Using Google Chrome as an external browser in Eclipse on Mac'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-6154790089060377710</id><published>2010-04-21T08:45:00.000-07:00</published><updated>2010-04-21T09:00:16.824-07:00</updated><title type='text'>Flex Lesson Learned #1: Preventing mouseOver flash</title><content type='html'>Say you've got this situation:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A complex Flex component you want to act as a button&lt;/li&gt;&lt;li&gt;Too complex to implement as a button with skins&lt;/li&gt;&lt;li&gt;MouseOver/Out behavior involves redrawing/resizing parts of the component&lt;/li&gt;&lt;/ul&gt;I was working on something like this, and couldn't get rid of multiple rapid mouseOver and mouseOut events when mousing over the component.  Eventually I found what looks like a pretty good solution.&lt;br /&gt;&lt;br /&gt;Make the top-level subcomponent (in z-order) of the component a button component with alpha of 0.  Make it cover the precise bounding box you want to be sensitive to mouse events.  (It may be possible to mask the button to achieve non-rectangular mouse regions, but I haven't tried this.)  Put the mouse event listeners on the button only, not the whole component.  Then making the component mouseEnabled="true", mouseChildren="true", and making other subcomponents mouseEnabled="false"  will cause the button subcomponent to catch all the mouseEvents, without the underlying redraws affecting it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-6154790089060377710?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/6154790089060377710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=6154790089060377710' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/6154790089060377710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/6154790089060377710'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2010/04/flex-lesson-learned-1-preventing.html' title='Flex Lesson Learned #1: Preventing mouseOver flash'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-2656509920070492073</id><published>2010-03-10T17:52:00.000-08:00</published><updated>2010-03-10T17:53:25.007-08:00</updated><title type='text'>Code Aesthetics</title><content type='html'>Good code is pretty code.  Ugly code is broken, and should be fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-2656509920070492073?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/2656509920070492073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=2656509920070492073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2656509920070492073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2656509920070492073'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2010/03/code-aesthetics.html' title='Code Aesthetics'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-4905105680401956894</id><published>2010-02-01T21:18:00.000-08:00</published><updated>2010-02-02T08:13:17.108-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><title type='text'>Unit Testing Quiz Part I</title><content type='html'>Here's a question anyone should be able to answer if they're to be considered proficient at unit testing:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Your client asks you to unit test the serialization/deserialization code for a data model class written by their in-house developers.  Since the implementation of the class is sensitive information, you are expected to work without either source code or a description of the serialized form of the model.  All you know is the public API of the model: properties and methods, contracts and invariants.  The client assures you that the serialized models will only be used by the given code, and do not need to be readable by any other application or implementation.  If the class has the methods &lt;code&gt;serialize()&lt;/code&gt; and &lt;code&gt;deserialize()&lt;/code&gt;, for serializing and deserializing the model respectively, describe how you would write unit tests to test these two functions despite the given constraints.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;If I remember I'll post the answer later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-4905105680401956894?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/4905105680401956894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=4905105680401956894' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/4905105680401956894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/4905105680401956894'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2010/02/unit-testing-quiz-part-i.html' title='Unit Testing Quiz Part I'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-1697592205162887246</id><published>2010-01-12T08:38:00.000-08:00</published><updated>2010-04-03T10:56:27.929-07:00</updated><title type='text'>Singletonitis</title><content type='html'>Proposition A: proper OO design exploits polymorphism. &lt;br/&gt;&lt;br/&gt;Proposition B: singletons inhibit polymorphism. &lt;br/&gt;&lt;br/&gt;A &amp; B imply Proposition C: proper OO design excludes singletons (in most cases).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-1697592205162887246?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/1697592205162887246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=1697592205162887246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/1697592205162887246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/1697592205162887246'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2010/01/singletonitis.html' title='Singletonitis'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-7704904447206470649</id><published>2009-12-18T07:05:00.000-08:00</published><updated>2009-12-18T07:07:43.379-08:00</updated><title type='text'>Tree Etiquette</title><content type='html'>Dear Developers (I'm looking at you, Eclipse!),&lt;br /&gt;&lt;br /&gt;When you have an expandable tree UI, always remember to include a "collapse all" button.  Thanks!&lt;br /&gt;&lt;br /&gt;Love and Kisses,&lt;br /&gt;Phil&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-7704904447206470649?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/7704904447206470649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=7704904447206470649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/7704904447206470649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/7704904447206470649'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2009/12/tree-etiquette.html' title='Tree Etiquette'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-5136201759440483048</id><published>2009-11-10T08:37:00.001-08:00</published><updated>2009-11-10T08:38:17.836-08:00</updated><title type='text'>D'oh!</title><content type='html'>Always remember - if you update your path in Windows, you have to restart Eclipse before Eclipse Ant will see the change.  ARGH!  This cost me 2 hours!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-5136201759440483048?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/5136201759440483048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=5136201759440483048' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/5136201759440483048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/5136201759440483048'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2009/11/doh.html' title='D&apos;oh!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-1028562738762361829</id><published>2009-11-10T07:02:00.000-08:00</published><updated>2009-11-10T07:18:35.662-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unit testing'/><category scheme='http://www.blogger.com/atom/ns#' term='patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='software development'/><category scheme='http://www.blogger.com/atom/ns#' term='anti-patterns'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Unit Testing Anti-Patterns</title><content type='html'>This is a presentation I gave recently about Unit Testing Anti-Patterns.  The material is fairly basic, but you'd be surprised at how many professional developers are addicted to very bad practices writing unit tests, and are generally unfamiliar with the basic principles in this presentation.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://filora.com/blog/UnitTestAntipatterns_clean.pdf"&gt;Unit Testing Anti-Patterns (PDF)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-1028562738762361829?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/1028562738762361829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=1028562738762361829' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/1028562738762361829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/1028562738762361829'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2009/11/unit-testing-anti-patterns.html' title='Unit Testing Anti-Patterns'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-7482291211764575229</id><published>2009-11-09T09:17:00.000-08:00</published><updated>2009-11-09T09:19:43.544-08:00</updated><title type='text'>Favorite Lines from the Latest Art Brut Album, "Art Brut vs. Satan".</title><content type='html'>"I can't believe I've only just discovered the Replacements" - "The Replacements"&lt;br /&gt;&lt;br /&gt;"How can we sleep at night when no one likes the records we like?" - "Demons Out!"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-7482291211764575229?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/7482291211764575229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=7482291211764575229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/7482291211764575229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/7482291211764575229'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2009/11/favorite-lines-from-latest-art-brut.html' title='Favorite Lines from the Latest Art Brut Album, &quot;Art Brut vs. Satan&quot;.'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-1760719205571627362</id><published>2009-10-20T07:14:00.000-07:00</published><updated>2009-10-22T07:40:57.138-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='12xu'/><category scheme='http://www.blogger.com/atom/ns#' term='punk'/><category scheme='http://www.blogger.com/atom/ns#' term='sub debs'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><category scheme='http://www.blogger.com/atom/ns#' term='wire'/><title type='text'>12XU?</title><content type='html'>Strangely enough, a band named Sub Debs recorded a song named "12XU" in 1999, that is not at all the Wire song.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-1760719205571627362?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/1760719205571627362/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=1760719205571627362' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/1760719205571627362'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/1760719205571627362'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2009/10/12xu.html' title='12XU?'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-2247967464061659061</id><published>2008-09-07T09:33:00.001-07:00</published><updated>2008-09-07T09:42:04.874-07:00</updated><title type='text'>John McCain, Rogue Cop</title><content type='html'>Everybody loves the maverick cop who plays by his own rules - Dirty Harry, Axel Foley, Mel Gibson, so of course everyone loves The Maverick John McCain.  But don't you think there's a reason they never get to be Chief of Police????&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-2247967464061659061?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/2247967464061659061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=2247967464061659061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2247967464061659061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2247967464061659061'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/09/john-mccain-rogue-cop.html' title='John McCain, Rogue Cop'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-283852654281175075</id><published>2008-07-25T08:24:00.001-07:00</published><updated>2008-07-25T08:24:49.395-07:00</updated><title type='text'>DRM Sucks</title><content type='html'>&lt;div style="border: 0px none ; overflow: auto; margin-top: 25px; min-height: 50px; font-size: 11px; width: 456px; line-height: 16.8px; float: none;"&gt; &lt;a href="http://arstechnica.com/news.ars/post/20080724-drm-still-sucks-yahoo-music-going-dark-taking-keys-with-it.html"&gt;DRM still sucks: Yahoo Music going dark, taking keys with it&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-283852654281175075?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/283852654281175075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=283852654281175075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/283852654281175075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/283852654281175075'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/07/i-love.html' title='DRM Sucks'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-5123498410708754036</id><published>2008-07-15T11:00:00.000-07:00</published><updated>2008-07-15T11:03:37.713-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Holy Bastard Offspring of John Lennon and Bryan Ferry!</title><content type='html'>Brian Eno singing "Tomorrow Never Knows": &lt;a href="http://www.amazon.com/801-Live/dp/B000003S0W"&gt;801 Live&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;As an added bonus, though I haven't yet heard it: &lt;a href="http://www.amazon.com/June-1-1974-Kevin-Ayers/dp/B000006SLW/ref=pd_lpo_k2_dp_k2a_2_img?pf_rd_p=304485601&amp;amp;pf_rd_s=lpo-top-stripe-2&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=B000003S0W&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0DESYGMTBRA7JS9J3107"&gt;June 1, 1974&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-5123498410708754036?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/5123498410708754036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=5123498410708754036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/5123498410708754036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/5123498410708754036'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/07/holy-bastard-offspring-of-john-lennon.html' title='Holy Bastard Offspring of John Lennon and Bryan Ferry!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-4504018410841127706</id><published>2008-07-14T06:53:00.000-07:00</published><updated>2008-07-14T06:54:35.240-07:00</updated><title type='text'>What's up Eclipse?</title><content type='html'>How come a long-running build won't automatically cancel when I hit save?  Why does it block the entire app instead?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-4504018410841127706?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/4504018410841127706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=4504018410841127706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/4504018410841127706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/4504018410841127706'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/07/whats-up-eclipse.html' title='What&apos;s up Eclipse?'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-3945790961890620381</id><published>2008-07-12T18:21:00.000-07:00</published><updated>2008-07-12T18:23:02.573-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>Cool Old Discovery</title><content type='html'>&lt;a href="http://allmusic.com/cg/amg.dll?p=amg&amp;amp;sql=10:gzfyxqr5ldte"&gt;Dream Syndicate&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-3945790961890620381?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/3945790961890620381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=3945790961890620381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/3945790961890620381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/3945790961890620381'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/07/cool-old-discovery.html' title='Cool Old Discovery'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-2104441329057967752</id><published>2008-07-09T11:07:00.000-07:00</published><updated>2008-07-11T19:42:48.082-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='I/O'/><title type='text'>Don't Use java.io.File!</title><content type='html'>One of my biggest gripes with Sun's Java libraries is their I/O implementation, particularly the class java.io.File.  Even worse is its ubiquity in the method signatures of third-party libraries.  Why?  I'll explain.&lt;br /&gt;&lt;br /&gt;Consider an interface that gives you the method &lt;span style="font-family: courier new;"&gt;public void upload(java.io.File file)&lt;/span&gt;, which is supposed to upload a file to a server.  Now suppose you want, instead, to upload some data you created programmatically, or that exists at a remote URL.  Oh no!  Now you have to download that data to a file on your local file system, and upload THAT file.  Ouch! &lt;br /&gt;&lt;br /&gt;Believe it or not, people charge actual money for systems with APIs that work this way. &lt;br /&gt;&lt;br /&gt;This illustrates the real weakness behind using java.io.File in a public API - File is a concrete class that is &lt;span style="font-style: italic;"&gt;directly tied to the native file system&lt;/span&gt;.  You can't mock it for unit testing, you can't substitute a URL.  You're stuck. &lt;br /&gt;&lt;br /&gt;What to use instead?  Well, URLs/URIs are an obvious choice, and work well.  I would recommend actually using java.net.URL instead of String in method signatures, so that the signature explicity indicates what kind of data it wants.  This also means your code won't have to handle or throw MalformedURLException.  Finally, always handling URLs as java.net.URL prevents chains of casting back and forth between String and URL, which often happens when using 2 or more APIs together that aren't consistent in their use of URLs vs. Strings. &lt;br /&gt;&lt;br /&gt;When you're working with internal APIs and you need an actual file object, I'd recommend using &lt;a href="http://commons.apache.org/vfs/"&gt;Apache commons-vfs&lt;/a&gt; instead of java.io.  As the web site says, "Commons VFS provides a single API for accessing                 various different file systems. It presents a uniform view of                 the files from various different sources, such as the files on                 local disk, on an HTTP server, or inside a Zip archive."  For unit testing, the RAM disk implementation is very useful, allowing you to mock output files when necessary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-2104441329057967752?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/2104441329057967752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=2104441329057967752' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2104441329057967752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/2104441329057967752'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/07/dont-use-javaiofile.html' title='Don&apos;t Use java.io.File!'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-738647252661236336</id><published>2008-07-02T05:38:00.000-07:00</published><updated>2008-07-11T19:43:11.790-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='swt'/><title type='text'>Easy Layouts in SWT?</title><content type='html'>I'm trying out a layout engine for Swing and SWT called &lt;a href="http://www.miglayout.com/"&gt;MiGLayout&lt;/a&gt;.  Their claim for it is "MiG Layout makes complex layouts easy and normal layouts one-liners."  We'll see.  So far it seems pretty good.  Here's a snippet of (SWT) code I've written:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;      Label label = new Label(panel, SWT.NONE);&lt;br /&gt;      label.setText("Test Name:");&lt;br /&gt;      label.setLayoutData(new CC().growX(0));&lt;br /&gt;      final Text text = new Text(panel, SWT.BORDER);&lt;br /&gt;      text.setLayoutData(new CC().spanX(2).growX());&lt;br /&gt;      Button button = new Button(panel, SWT.PUSH);&lt;br /&gt;      button.setText("Load");&lt;br /&gt;      Button runButton = new Button(panel, SWT.PUSH);&lt;br /&gt;      runButton.setText("Run");&lt;br /&gt;      runButton.setLayoutData(new CC().wrap());&lt;br /&gt;      browser = new Browser(panel, SWT.MOZILLA | SWT.BORDER);&lt;br /&gt;      browser.setLayoutData(new CC().spanX().growX().growY());&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This gives you something that looks like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_0aD8NbJHPzM/SGt4DHWdUGI/AAAAAAAAABs/KDXh2cegpfM/s1600-h/screenshot.bmp"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_0aD8NbJHPzM/SGt4DHWdUGI/AAAAAAAAABs/KDXh2cegpfM/s320/screenshot.bmp" alt="" id="BLOGGER_PHOTO_ID_5218396588147036258" border="0" /&gt;&lt;/a&gt;And the label, textbox, and buttons on the top row grow/shrink as they should.  Nice.  Definitely worth exploring further.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-738647252661236336?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/738647252661236336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=738647252661236336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/738647252661236336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/738647252661236336'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/07/easy-layouts-in-swt.html' title='Easy Layouts in SWT?'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_0aD8NbJHPzM/SGt4DHWdUGI/AAAAAAAAABs/KDXh2cegpfM/s72-c/screenshot.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5431077956781893304.post-4302956788034185336</id><published>2008-05-16T10:14:00.000-07:00</published><updated>2008-05-16T10:36:58.679-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jdk'/><category scheme='http://www.blogger.com/atom/ns#' term='jre'/><title type='text'>Making java.exe Use a JDK on Windows</title><content type='html'>So let's say you're running an application, such as&lt;span style="text-decoration: underline;"&gt; &lt;/span&gt;&lt;a href="http://sonar.hortis.ch/"&gt;Sonar&lt;/a&gt;, that invokes java.exe directly and doesn't allow you to configure your java path (as far as I can tell, anyway).  Now let's say you want to run in -server mode.  You try it, but what pops up?&lt;br /&gt;&lt;blockquote&gt;Error: no `server' JVM at `C:\Program Files\Java\jre1.6.0_06_\bin\server\jvm.dll'.&lt;/blockquote&gt;Oops.  That's because you're running in a JRE, which doesn't include a server JVM.  So you think, "Ok, well, I'll just fix my PATH variable to point at my JDK."  Maybe you even try setting JAVA_HOME.  But none of it works.  Why not?&lt;br /&gt;&lt;br /&gt;It doesn't work because Java is launched differently these days.  If you look in \WINDOWS\System32, you'll notice that java.exe and javaw.exe are in there.  When you launch java.exe, the copy that gets run is the one in System32. &lt;br /&gt;&lt;br /&gt;If you look at the Properties of the java.exe file in System32, you'll notice it's tagged with the version of the JRE it came from.  When you launch it, then, it looks in the registry for a compatible JRE, and gets resources from that JRE.  The relevant registry key is HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment.&lt;br /&gt;&lt;br /&gt;You'll notice if you fire up regedit and look at the above key that this key defines the value "JavaHome".  Ah, wow, so now Java actually records different JAVA_HOME values for each version of the JRE.   Now look at the value of JavaHome.  You'll notice it points to your stand-alone JRE, not the JDK's JRE.  So the solution is just to change the value to point at &amp;lt;JDK home&amp;gt;/jre.  &lt;br /&gt;&lt;br /&gt;Simple, eh?  Now why isn't this documented anywhere?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5431077956781893304-4302956788034185336?l=confusion-and-delay.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://confusion-and-delay.blogspot.com/feeds/4302956788034185336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5431077956781893304&amp;postID=4302956788034185336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/4302956788034185336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5431077956781893304/posts/default/4302956788034185336'/><link rel='alternate' type='text/html' href='http://confusion-and-delay.blogspot.com/2008/05/making-javaexe-use-jdk-on-windows.html' title='Making java.exe Use a JDK on Windows'/><author><name>Phil</name><uri>http://www.blogger.com/profile/13073512770085239998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
