<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Paul's techie blog</title>
    <link>http://blogofpaul.merecomplexities.com/articles</link>
    <pubDate>Fri, 22 May 2009 06:26:04 GMT</pubDate>
    <description>Paul's blog.</description>
    <language>en-gb</language>
    
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://paulwilson.blogspot.com/atom.xml" type="application/rss+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><item>
      <title>Smart Tests Are Dumb Tests</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/ubJxNFKZLRI/266</link>
      <description>&lt;p&gt;&lt;a href="http://www.kropserkel.com/horse_head_pillow.htm" style="float:right;"&gt;&lt;img src="http://blogofpaul.merecomplexities.com/assets/johnny-bravo-small.jpg" title="Johnny Bravo" alt="Johnny Bravo" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A question I hear a lot is &amp;#8220;don&amp;#8217;t you find your test code is pretty much a copy of your production code?&amp;#8221;  Digging deeper we this kind of test.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
def test_counts_the_correct_number_of_words
  sentence = "The quick brown fox jumps over the lazy dog."
  expected_number_of_words = sentence.scan(/\w+/).size
  analyser = SentenceAnalyser.new(sentence)
  assert_equal expected_number_of_words, analyser.word_count
end
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Here&amp;#8217;s what I&amp;#8217;d write.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;
def test_counts_the_correct_number_of_words
  assert_equal 9, 
    SentenceAnalyser.new("The quick brown fox jumps over the lazy dog.").word_count
end
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;The more work we make our tests do, the more likely we are to introduce mistakes in the test code; this can be especially dangerous if we use the same algorithm as in the production code as we can make the same mistake in both places.  And that&amp;#8217;s apart from the second test being shorter and easier to understand.&lt;/p&gt;
&lt;p&gt;So remember, kids, keep your tests dumb to keep them smart.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/ubJxNFKZLRI" height="1" width="1"/&gt;</description>
      <pubDate>Fri, 22 May 2009 06:26:04 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/266</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/266</feedburner:origLink></item>
    <item>
      <title>Technical Debt or When Metaphors Attack</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/BqcXNbBWQNo/265</link>
      <description>&lt;p&gt;&lt;a href="http://www.kropserkel.com/horse_head_pillow.htm" style="float:right;"&gt;&lt;img src="http://blogofpaul.merecomplexities.com/assets/horsehead.jpg" title="horse&amp;#39;s head" alt="horse&amp;#39;s head" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Technical Debt is a powerful metaphor: it describes code-quality shortcomings in financial terms; until the debt is paid off we pay interest, meaning that it takes longer to implement new features.  It&amp;#8217;s a useful metaphor, but has limits.  A few weeks ago I was annoyed when  a whole room of Agile consultants took seriously the idea of &amp;#8220;borrowing on code-quality&amp;#8221; to get a start-up off the ground, and then repaying the debt later (presumably by hiring consultants).  All my experience tells me that this is a disastrous strategy.   Such debt becomes incredibly expensive to pay off &amp;#8211; expensive in real cash.&lt;/p&gt;
&lt;p&gt;Ward Cunningham coined the Technical Debt metaphor.  He describes (&lt;a href="http://www.youtube.com/watch?v=pqeJFYwnkjE"&gt;on video&lt;/a&gt;) producing code without a complete understanding of the problem, as accumulating technical debt.  By writing the code early we increase our understanding of the system: as long as the debt is repaid, this is prudent borrowing.  It&amp;#8217;s quite like a business borrowing to invest in capital equipment and using the increase in revenue to pay off the debt.&lt;/p&gt;
&lt;p&gt;Metaphors are natural and useful thinking-tools.  A good metaphor, though, can be dangerously seductive.  We can be tempted to use it beyond its applicability.  A metaphorical vehicle cannot fully describe its topic: they need to differ for it to be a metaphor rather than a description.&lt;/p&gt;
&lt;p&gt;Recently Brian Marick &lt;a href="http://twitter.com/marick/status/144520758"&gt;suggested&lt;/a&gt; that metaphorical reasoning could be improved by listing  ways in which the metaphor differs from its topic.  Financial debt is easily quantifiable; technical debt is not.  Borrowing on code quality to get your product out quickly is more like begging favours from the Mafia than taking out a business loan.  The repayment terms are unknown, except that they will be entangling, larger, and more horrific than you can imagine.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/BqcXNbBWQNo" height="1" width="1"/&gt;</description>
      <pubDate>Sun, 05 Apr 2009 19:00:38 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/265</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/265</feedburner:origLink></item>
    <item>
      <title>New blog location</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/p-hHZRXqWdI/264</link>
      <description>&lt;p&gt;Because I can, I&amp;#8217;ve decided to move my blog to &lt;a href="http://blogofpaul.merecomplexities.com"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m hoping that it will be mostly seamless, with the &lt;a href="http://www.feedburner.com/"&gt;Feedburner&lt;/a&gt; &lt;span class="caps"&gt;RSS&lt;/span&gt; feed and redirects taking away the pain.  If it isn&amp;#8217;t, sorry.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/p-hHZRXqWdI" height="1" width="1"/&gt;</description>
      <pubDate>Thu, 12 Mar 2009 13:45:05 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/264</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/264</feedburner:origLink></item>
    <item>
      <title>iPhone TDD using Google Toolbox and iphone_testify</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/IIwls6aJWpQ/263</link>
      <description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;p&gt;Previously, &lt;a href="/assets/2009/01/giving-up-on-rbiphonetest.html"&gt;we&amp;#8217;d decided to switch&lt;/a&gt; from using  Rbiphonetest to using &lt;a href="http://code.google.com/p/google-toolbox-for-mac/"&gt;Google toolbox for Mac&lt;/a&gt; code.  It&amp;#8217;s about time we got started.&lt;/p&gt;
 &lt;p&gt;To begin with we&amp;#8217;ll just set up an iPhone project for testing.  This will include automatically running all the tests every time &amp;#8211; just like autotest.&lt;/p&gt;
 &lt;h2&gt;Setting up the files&lt;/h2&gt;
 &lt;p&gt;Of course you&amp;#8217;ll need to be running &lt;span class="caps"&gt;OS X 10&lt;/span&gt;.5 (Leopard) and the latest iPhone &lt;span class="caps"&gt;&lt;span class="caps"&gt;SDK&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;
 &lt;p&gt;Fire up XCode and create an iPhone OS project. (For the purposes of this example it doesn’t matter what type; a Utility app is as good as any). I&amp;#8217;ve written a &lt;a href="http://github.com/paulanthonywilson/iphone_testify/tree/master"&gt;Ruby Gem&lt;/a&gt; to help getting all the files in place, so we may as well use those. From the terminal go to your new application directory.&lt;/p&gt;
 &lt;p&gt;First we&amp;#8217;ll install the gem.  If you haven&amp;#8217;t already you will need to  to add github as a gem source.  (If you can&amp;#8217;t remember just enter &lt;em&gt;gem source&lt;/em&gt; and see if github is listed).&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
sudo gem update --system
gem source -a http://gems.github.com
&lt;/code&gt;&lt;/pre&gt;
 &lt;p&gt;Either way, install the gem.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
sudo gem install paulanthonywilson-iphone_testify
&lt;/code&gt;&lt;/pre&gt;
 &lt;p&gt;Then run the &lt;em&gt;iphone_testify&lt;/em&gt; command.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
iphone_testify
&lt;/code&gt;&lt;/pre&gt;
 &lt;p&gt;This adds the google unit testing code to the google_testing directory, creates a directory for the UnitTests.  There&amp;#8217;s also a &lt;em&gt;Rakefile_&lt;/em&gt; and an &lt;em&gt;autoiphonetest.rb&lt;/em&gt;, and we&amp;#8217;ll get round to those later.&lt;/p&gt;
 &lt;h2&gt;Setting up XCode&lt;/h2&gt;
 &lt;p&gt;There&amp;#8217;s a few things you need to do in XCode.  The gem doesn&amp;#8217;t do this yet, but I&amp;#8217;m working on it.&lt;/p&gt;
 &lt;p&gt;Create a new Target called Unit Test.  Right click on &lt;em&gt;Targets&lt;/em&gt; in the left pane.  Choose an &amp;#8220;iPhone OS&amp;#8221; Application target and call it &amp;#8220;Unit Test&amp;#8221;.&lt;/p&gt;
 &lt;p&gt;&lt;img title="adding an xcode target" src="/assets/objc_unit_testing_tutorial/adding_xcode_target.png" alt="adding an xcode target" /&gt;&lt;/p&gt;
 &lt;p&gt;Right click on the &lt;em&gt;Unit Test&lt;/em&gt; target and choose &amp;#8220;Add&amp;#8212;&amp;gt; Existing Files&amp;#8221;.  Select all the files in the &lt;em&gt;google_testing&lt;/em&gt; directory (or at least all the .h and .m files).&lt;/p&gt;
 &lt;p&gt;&lt;img title="add google files" src="/assets/objc_unit_testing_tutorial/adding_google_testing_files.png" alt="add google files" /&gt;&lt;/p&gt;
 &lt;p&gt;(If you&amp;#8217;re feeling tidy, which I hope you are, you probably want to add these to a &amp;#8220;google_testing&amp;#8221; group as well.)&lt;/p&gt;
 &lt;p&gt;Right click on the &lt;em&gt;Unit Test&lt;/em&gt; target again, to add a  &amp;#8220;new run script build phase&amp;#8221;.&lt;/p&gt;
 &lt;p&gt;&lt;img title="add new build phase" src="/assets/objc_unit_testing_tutorial/new_build_phase.png" alt="add new build phase" /&gt;&lt;/p&gt;
 &lt;p&gt;Set the script to be &lt;em&gt;google_testing/RunIPhoneUnitTest.sh&lt;/em&gt;.&lt;/p&gt;
 &lt;p&gt;&lt;img title="build phase run script" src="/assets/objc_unit_testing_tutorial/run_script.png" alt="build phase run script" /&gt;&lt;/p&gt;
 &lt;p&gt;Add a group in which to keep your unit tests.  Right click on the group and set the path to be &lt;em&gt;UnitTests&lt;/em&gt;, so that the test classes will go where we expect on the file system.&lt;/p&gt;
 &lt;p&gt;&lt;img title="unit tests group" src="/assets/objc_unit_testing_tutorial/unit_test_group.png" alt="unit tests group" /&gt;&lt;/p&gt;
 &lt;p&gt;That&amp;#8217;s all a bit of faff.  I am hoping to automate the xcode part: you can stay tuned by watching &lt;a href="http://github.com/paulanthonywilson/iphone_testify/tree/master"&gt;iphone_testify&lt;/a&gt; on Github.&lt;/p&gt;
 &lt;h2&gt;Write a test&lt;/h2&gt;
 &lt;p&gt;Let&amp;#8217;s write a dummy test, just to get us started.  Right click on your &lt;em&gt;UnitTests&lt;/em&gt; group and add a new file (&lt;em&gt;iPhone OS Cocoa Touch Classes &amp;#8211; NSObject subclass&lt;/em&gt;).  Let&amp;#8217;s call it &lt;em&gt;BlahTest.m&lt;/em&gt;.  Add it only to the &lt;em&gt;Unit Test&lt;/em&gt; target. Uncheck &amp;#8220;Also create BlahTest.h&amp;#8221;: you don&amp;#8217;t need a header.&lt;/p&gt;
 &lt;p&gt;&lt;img title="adding dummy unit test" src="/assets/objc_unit_testing_tutorial/add_unit_test.png" alt="adding dummy unit test" /&gt;&lt;/p&gt;
 &lt;p&gt;Edit the &lt;em&gt;BlahTest.m&lt;/em&gt; to extend SenTestCase:-&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
#import "../google_testing/GTMSenTestCase.h" 

@interface BlahTest : SenTestCase
@end

@implementation BlahTest

@end
&lt;/code&gt;&lt;/pre&gt;
 &lt;p&gt;Note that we&amp;#8217;ve included the interface definition in the implementation file: there&amp;#8217;s nothing to stop you using a separate header file, but there&amp;#8217;s not a lot of point.  Let&amp;#8217;s add a failing test.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
@implementation BlahTest

-(void) testSomething{
    NSString *actual = @"hello matey";
    STAssertEqualStrings(@"hi mate", actual, nil);
}

@end
&lt;/code&gt;&lt;/pre&gt;
 &lt;h3&gt;Run through XCode&lt;/h3&gt;
 &lt;p&gt;The tests are &amp;#8216;run&amp;#8217; as part of the build and failures are reported as build failures.  In XCode set the target to &amp;#8220;Unit Test&amp;#8221; and build.&lt;/p&gt;
 &lt;p&gt;&lt;img title="failing test in xcode" src="/assets/objc_unit_testing_tutorial/xcode_failing_test.png" alt="failing test in xcode" /&gt;&lt;/p&gt;
 &lt;h3&gt;Run through Rake and &lt;em&gt;autoiphonetest.rb&lt;/em&gt;&lt;/h3&gt;
 &lt;p&gt;Running &lt;em&gt;iphone_testify&lt;/em&gt; also provides you with a Rakefile for building/running the test target.  From the command line in your project directory just run&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
rake
&lt;/code&gt;&lt;/pre&gt;
 &lt;p&gt;&lt;img title="failing test in rake" src="/assets/objc_unit_testing_tutorial/rake_failing_test.png" alt="failing test in rake" /&gt;&lt;/p&gt;
 &lt;p&gt;Even better, run&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
./autoiphonetest.rb
&lt;/code&gt;&lt;/pre&gt;
 &lt;p&gt;This will build/run the unit tests evertime a change is detected in the &lt;em&gt;Classes&lt;/em&gt; or &lt;em&gt;UnitTests&lt;/em&gt; directory.  The automatic running of unit tests does wonders for flow.&lt;/p&gt;
 &lt;p&gt;The &lt;em&gt;rake&lt;/em&gt; and &lt;em&gt;autoiphonetest.rb&lt;/em&gt; builds will inform you of the state of the tests using &lt;a href="http://growl.info"&gt;Growl&lt;/a&gt;: to take advantage of this you will need to have &lt;a href="http://growl.info"&gt;Growl&lt;/a&gt; and &lt;a href="http://growl.info/extras.php"&gt;growlnotify&lt;/a&gt; installed.  In order to work around a bug in &lt;em&gt;growlnotify&lt;/em&gt;, you need to enable &amp;#8220;Listen for incoming network connections&amp;#8221; in the &lt;em&gt;Network&lt;/em&gt; pane of the &lt;em&gt;Growl&lt;/em&gt; &lt;em&gt;System Preferences&lt;/em&gt;.&lt;/p&gt;
 &lt;p&gt;Now we&amp;#8217;re set up running with &lt;em&gt;autoiphonetest.rb&lt;/em&gt;, let&amp;#8217;s fix our test and see our pass notification; I&amp;#8217;ll leave the test fixing as an exercise for the reader.&lt;/p&gt;
 &lt;p&gt;&lt;img title="passing" src="/assets/objc_unit_testing_tutorial/autopass.png" alt="passing" /&gt;&lt;/p&gt;
 &lt;p&gt;That&amp;#8217;s it for now.  In our next instalment we&amp;#8217;ll look at building up or Twitter application using &lt;em&gt;Objective-C&lt;/em&gt; unit tests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Corrected a couple of bugs:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The target must be called &lt;em&gt;Unit Test&lt;/em&gt; (not &lt;em&gt;Unit Test&lt;strong&gt;s&lt;/strong&gt;&lt;/em&gt;) to work with my gem&lt;/li&gt;
	&lt;li&gt;I ought to have used &lt;em&gt;STAssertEqualStrings&lt;/em&gt; for comparing strings (not &lt;em&gt;STAssertEquals&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/IIwls6aJWpQ" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 22 Apr 2009 10:27:53 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/263</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/263</feedburner:origLink></item>
    <item>
      <title>Escaping Post Parameters in Cocoa/Cocoa-touch (iPhone)</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/NXVO73c9hA4/261</link>
      <description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;p&gt;So it turns out that you need to &lt;span class="caps"&gt;&lt;span class="caps"&gt;URL&lt;/span&gt;&lt;/span&gt; encode your Post parameters if you&amp;#8217;re doing a &lt;span class="caps"&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt;&lt;/span&gt; Post from your Objective-C.  Who knew?  Well probably everyone who has a passing knowledge of &lt;a href="http://tools.ietf.org/html/rfc3986"&gt;rfc3896&lt;/a&gt;.  I guess I&amp;#8217;m just used to browsers and frameworks doing the work for me.&lt;/p&gt;
 &lt;p&gt;You&amp;#8217;d think that the &lt;a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#//apple_ref/occ/instm/NSString/stringByAddingPercentEscapesUsingEncoding:"&gt;stringByAddingPercentEscapesUsingEncoding&lt;/a&gt; method on NSString would be just the ticket.  Nope.  The two characters you most need to escape, ampersand and plus (&amp;#38;+), are not escaped.  What to do?  Well you could copy this code I&amp;#8217;ve just added to &lt;a href="http://twitterlink.merecomplexities.com"&gt;Twitterlink&lt;/a&gt;.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
-(NSString*)currentMessageUrlEncoded{
  CFStringRef encoded = CFURLCreateStringByAddingPercentEscapes(
    kCFAllocatorDefault, 
    (CFStringRef) self.currentMessage, 
    nil, 
    @"&amp;amp;#38;+", 
    kCFStringEncodingUTF8);  
  return [((NSString*) encoded) autorelease];
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(Thanks to &lt;a href="http://www.blog.montgomerie.net/Blog/Blog/Blog.html"&gt;Jamie Montgomerie&lt;/a&gt; for &lt;a href="https://twitter.com/th_in_gs/statuses/1245045280"&gt;confirming&lt;/a&gt; that I was doing the right thing with the autorelease).&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/NXVO73c9hA4" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 11 Mar 2009 23:32:01 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/261</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/261</feedburner:origLink></item>
    <item>
      <title>Giles Bowkett Slapdown</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/_D3LQ3GRQLM/262</link>
      <description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;blockquote&gt;Judging unit testing by its ability to find bugs is like judging your pet dog by his or her ability to spin webs and manufacture silk out of his or her ass.&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://gilesbowkett.blogspot.com/"&gt;Giles Bowkett&lt;/a&gt; commenting on a particularly &lt;a href="http://abstractstuff.livejournal.com/60388.html"&gt;idiotic blog post&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/_D3LQ3GRQLM" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 11 Mar 2009 23:32:01 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/262</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/262</feedburner:origLink></item>
    <item>
      <title>Stunted Framework for Java stubbing</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/nGuSwVyH5KA/258</link>
      <description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;p style="float:right;"&gt;&lt;a href="http://www.flickr.com/photos/09traveler/1324756576/"&gt;&lt;img src="/assets/bonsai.jpg" alt="Bonsai tree" /&gt;&lt;/a&gt;&lt;/p&gt;
 &lt;p&gt;I&amp;#8217;ve always liked Michael Feather&amp;#8217;s concept of  &lt;a href="http://www.artima.com/weblogs/viewpost.jsp?thread=8826"&gt;stunted frameworks&lt;/a&gt;.  I write a lot of code that could be re-used, but it is tailored to specific projects.  Adding hooks, and configuration to make the stuff more generally useful and releasable as open-source just feels like too much hassle.  I wouldn&amp;#8217;t mind, so much but I don&amp;#8217;t want to add bulk and complications to the code &lt;em&gt;I&amp;#8217;m&lt;/em&gt; working on.  In any case, the chances of it matching everyone else&amp;#8217;s edge cases are slim.&lt;/p&gt;
 &lt;p&gt;Look &lt;a href="http://www.megginson.com/blogs/quoderat/2005/01/31/sax-the-bad-the-good-and-the-controversial/"&gt;what happened to David Megginson&lt;/a&gt; when he wrote &lt;a href="http://www.saxproject.org/"&gt;&lt;span class="caps"&gt;SAX2&lt;/span&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;people were screaming for all kinds of esoteric stuff that about 12 people in the world care about (i.e. entity boundaries) &amp;#8230;.. &lt;span class="caps"&gt;&lt;span class="caps"&gt;SAX&lt;/span&gt;&lt;/span&gt; ended up with all kinds of new, optional interfaces in the distribution anyway, so it’s quite nightmarish for a new user trying to figure out what matters and what doesn’t.&lt;/p&gt;
&lt;/blockquote&gt;
 &lt;p&gt;It recently occurred to me that &lt;a href="https://github.com/"&gt;Github&lt;/a&gt; is an excellent mechanism for distributing stunted frameworks.  To that end I&amp;#8217;ve just added (a tiny) one for writing stubs in Java, by providing partial implementations to an interface.  I first &lt;a href="/assets/2005/07/easy-peasy-mock.html"&gt;wrote about it&lt;/a&gt; in 2005 and have since then used it on many Java projects in lieu of more sophisticated mocking libraries.&lt;/p&gt;
 &lt;p&gt;For more information go to the project at &lt;a href="http://github.com/paulanthonywilson/dummy-proxy/tree/master"&gt;http://github.com/paulanthonywilson/dummy-proxy/tree/master&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/nGuSwVyH5KA" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 11 Mar 2009 23:32:01 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/258</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/258</feedburner:origLink></item>
    <item>
      <title>My command line prompt with Git</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/rqOf-aj-dD0/259</link>
      <description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;p&gt;All the cool kids these days like to have the current &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt; branch as their command-line prompt.  Call me old fashioned, but I like to know my current directory as well. As showing the full path can get ridiculous, I just want the directory name. &lt;/p&gt;
&lt;p&gt; This is what I ended up with in my .profile:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
export PS1=\
'$(echo $PWD| sed s/.*\\\///) \
$(git branch &amp;amp;&amp;gt;/dev/null; if [ $? -eq 0 ];\
 then echo "(\[\033[00m\]$(git branch | grep ^*|sed s/\*\ //)) ";\
 fi)\$\[\033[00m\] '

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(The Git part was copied from the Internet somewhere &amp;#8211; I forget where.).&lt;/p&gt;
&lt;p&gt;This is what it looks like:&lt;/p&gt;
&lt;p&gt;&lt;img src="/assets/git_prompt.png" alt="git prompt" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/rqOf-aj-dD0" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 11 Mar 2009 23:32:01 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/259</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/259</feedburner:origLink></item>
    <item>
      <title>Giving up on Rbiphonetest</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/qSLlfjvoeok/260</link>
      <description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;p style="float:right;"&gt;&lt;a href="ww.flickr.com/photos/thetruthabout/2706992575/"&gt;&lt;img title="U Turn" src="/assets/u_turn.jpg" alt="U Turn" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;I&amp;#8217;ve enjoyed using and writing about Dr Nic&amp;#8217;s &lt;a href="http://github.com/drnic/rbiphonetest/tree/master"&gt;Rbiphonetest&lt;/a&gt;.  It&amp;#8217;s been cool being able to at least do the testing point of iPhone development in Ruby, which is far more succinct, &lt;span class="caps"&gt;&lt;span class="caps"&gt;DRY&lt;/span&gt;&lt;/span&gt;, and expressive than Objective-C.  It&amp;#8217;s also handy to be able to take advantage of Ruby&amp;#8217;s mature testing frameworks.&lt;/p&gt;&lt;/p&gt;
 &lt;p&gt;I&amp;#8217;ve even been able to test the iPhone&amp;#8217;s UI widget interactions, which Rbiphonetest is not supposed  to do: it needed a hack, but it was a clever hack &amp;#8211; and that&amp;#8217;s the problem.  Rbiphontest is a clever experiment, but it seems to have run its course.  Anywhere off the standard path (UI, Catagories, creating one model in another) is strewn with traps and difficulties.  Even Dr Nic seems to be &lt;a href="http://stackoverflow.com/questions/195820/test-driven-design-for-iphone-native-apps#277777"&gt;discouraging its use&lt;/a&gt;.&lt;/p&gt;
 &lt;p&gt;So expect more blog entries about Rbiphonetest.  What I will be writing are some tutorials on doing iPhone &lt;span class="caps"&gt;&lt;span class="caps"&gt;TDD&lt;/span&gt;&lt;/span&gt; using the &lt;a href="http://code.google.com/p/google-toolbox-for-mac/"&gt;Google toolbox for Mac&lt;/a&gt;.  I&amp;#8217;ve got something like &lt;a href="http://www.zenspider.com/ZSS/Products/ZenTest/#rsn"&gt;autotest&lt;/a&gt; running with it already.  Stay tuned.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/qSLlfjvoeok" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 11 Mar 2009 23:32:01 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/260</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/260</feedburner:origLink></item>
    <item>
      <title>Twitterlink available on Apple's Appstore</title>
      <link>http://feedproxy.google.com/~r/PaulsTechieBlog/~3/0RfcFAVdaWs/254</link>
      <description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://twitterlink.merecomplexities.com/"&gt;&lt;img src="http://twitterlink.merecomplexities.com/icon.png" alt="Twitterlink" style="float:right;" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="/assets/2008/12/iphone-tdd-with-rbiphonetest-ii-posting.html"&gt;Talking of Twitter&lt;/a&gt; clients, my first iPhone  application &amp;#8211; Twitterlink &amp;#8211; is now available on the AppStore.  It is a simple beast with one purpose: it enables posting shortened URLs from iPhone&amp;#8217;s Safari web-browser to Twitter.&lt;/p&gt;
&lt;p&gt;You can download Twitterlink from the app store &lt;a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=300090117"&gt;here&lt;/a&gt; (app store link), or read a little more about it &lt;a href="http://twitterlink.merecomplexities.com/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s free for now.  I will be putting the price up to (gasp) £0.56 ($0.99) soon.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PaulsTechieBlog/~4/0RfcFAVdaWs" height="1" width="1"/&gt;</description>
      <pubDate>Wed, 11 Mar 2009 23:32:01 GMT</pubDate>
      <guid isPermaLink="false">http://blogofpaul.merecomplexities.com/articles/254</guid>
    <feedburner:origLink>http://blogofpaul.merecomplexities.com/articles/254</feedburner:origLink></item>
  </channel>
</rss>
