<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Alastair&apos;s Place</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/" />
    <link rel="self" type="application/atom+xml" href="http://alastairs-place.net/atom.xml" />
   <id>tag:alastairs-place.net,2009://1</id>
    <link rel="service.post" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1" title="Alastair's Place" />
    <updated>2009-01-03T12:02:01Z</updated>
    <subtitle>My place. My thoughts. My stuff.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.01</generator>
 

<entry>
    <title>Big spike in spam?</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2009/01/big_spike_in_sp/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=271" title="Big spike in spam?" />
    <id>tag:alastairs-place.net,2009://1.271</id>
    
    <published>2009-01-03T12:02:01Z</published>
    <updated>2009-01-03T12:02:01Z</updated>
    
    <summary><![CDATA[Has anyone else noticed a big spike in spam recently? In 2008 hardly any spam got past my filters, but in the first few days of 2009 I&rsquo;ve managed to accumulate over 90 junk mails(!)...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Life" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[Has anyone else noticed a big spike in spam recently?  In 2008 hardly any spam got past my filters, but in the first few days of 2009 I&rsquo;ve managed to accumulate over 90 junk mails(!)]]>
        
    </content>
</entry>

<entry>
    <title>Grrrr&#8230; zombie processes from Apple Mail</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/12/grrrr_zombie_pr/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=270" title="Grrrr&amp;#8230; zombie processes from Apple Mail" />
    <id>tag:alastairs-place.net,2008://1.270</id>
    
    <published>2008-12-17T12:40:23Z</published>
    <updated>2008-12-17T12:40:23Z</updated>
    
    <summary><![CDATA[I don&rsquo;t know if anyone else has noticed, but as of the 10.5.6 update, Apple Mail now creates a zombie AddressBookSync process every time you send an e-mail. If you send enough e-mails, you&rsquo;ll find that your process table is...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>I don&rsquo;t know if anyone else has noticed, but as of the 10.5.6 update, Apple Mail now creates a zombie AddressBookSync process <em>every time you send an e-mail</em>.</p>

<p>If you send enough e-mails, you&rsquo;ll find that your process table is full and your machine just won&rsquo;t work properly.</p>

<p>Filed as <tt><a href="rdar://6451715">rdar://6451715</a></tt>.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Finally fixed one of our servers!</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/12/finally_fixed_o/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=269" title="Finally fixed one of our servers!" />
    <id>tag:alastairs-place.net,2008://1.269</id>
    
    <published>2008-12-11T16:21:54Z</published>
    <updated>2008-12-11T16:21:54Z</updated>
    
    <summary>One of our servers has been playing up since back in June when something caused it to stop responding to Server Admin. The only hint was mysterious errors on the system console, such as Jun 23 10:19:16 server servermgrd[303]: Got...</summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>One of our servers has been playing up since back in June when <em>something</em> caused it to stop responding to Server Admin.  The only hint was mysterious errors on the system console, such as</p>

<blockquote class="code"><pre>
Jun 23 10:19:16 server servermgrd[303]: Got error -9845 for SSLHandshake
Jun 23 10:19:16 server servermgrd[303]: Exception in threadListen: Socket: Connect failed
</pre></blockquote>

<p>Server Admin&rsquo;s error message wasn&rsquo;t much help either; it just insisted that there was no server at that address (not true).</p>

<p>In the end it turned out that a certificate, together with its private key, had somehow ended up in the System keychain.  And <kbd>servermgrd</kbd> stupidly picks up any such certificate (presumably at random, as I certainly didn&rsquo;t specify which one to use anywhere) and tries to use it when performing an SSL negotiation.</p>

<p>Deleting this rogue certificate from the System keychain seems to have fixed the problem and I can now admin the server again with Server Admin, rather than having to use the command line and a text editor.</p>]]>
        
    </content>
</entry>

<entry>
    <title><![CDATA[Who&rsquo;s behind Macserialjunkie?]]></title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/11/whos_behind_mac/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=268" title="Who&amp;rsquo;s behind Macserialjunkie?" />
    <id>tag:alastairs-place.net,2008://1.268</id>
    
    <published>2008-11-24T13:10:08Z</published>
    <updated>2008-11-24T13:10:08Z</updated>
    
    <summary><![CDATA[Thankfully for Mac developers everywhere, Macserialjunkie (aka MSJ) has been down for quite a few days now. Interestingly, though, I notice that it&rsquo;s now being hosted directly in IP space belonging to Infinite Technologies. For those who don&rsquo;t know, Infinite...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>Thankfully for Mac developers everywhere, Macserialjunkie (aka MSJ) has been down for quite a few days now.</p>

<p>Interestingly, though, I notice that it&rsquo;s now being hosted directly in IP space belonging to Infinite Technologies.  For those who don&rsquo;t know, Infinite Technologies are colluding with the people running MSJ.   How do I know this?  Well, because we complained about MSJ to the ISP that they were using, who told us that it was being hosted by one of their clients and passed on our complaint.</p>

<p>In response, I got an e-mail from Ganesh Rao, who styles himself &ldquo;Head of Network Operations/Network Architect&rdquo;:</p>

<blockquote class="email">
<table class="headers">
<tr><th>From:</th><td>Ganesh Rao</td></tr>
<tr><th>Subject:</th><td>Re: macserialjunkie.com</td></tr>
<tr><th>Date:</th><td>17 July 2008 17:26:42 BST</td></tr>
<tr><th>To:</th><td>Alastair Houghton</td></tr>
</table>
<hr />
<p>Hello Mr. Houghton,</p>

<p>And how are you related to this site or its activities?</p>

<p>Kind Regards,<br />
Ganesh Rao<br />
Head of Operations/ Network Architect</p>

<p>Infinite Technologies<br />
FF-2, #17, 5th Main<br />
Airport Road<br />
Bangalore 560 017</p>

<p>W: www.InfiniteTech.in<br />
P: +91.991-697-1255<br />
E: <i>[redacted]</i></p>
</blockquote>

<p>Seems friendly enough, right?  Well I explained what MSJ was and what id did and that I didn&rsquo;t think that any ISP that claimed to be supportive of copyright should be hosting such a website.  Ganesh replied:</p>

<blockquote class="email">
<table class="headers">
<tr><th>From:</th><td>Ganesh Rao</td></tr>
<tr><th>Subject:</th><td>Re: macserialjunkie.com</td></tr>
<tr><th>Date:</th><td>22 July 2008 22:15:03 BST</td></tr>
<tr><th>To:</th><td>Alastair Houghton</td></tr>
</table>
<hr />
<p>Hello,</p>

<p>I contacted the webmaster, nothing of what you claim that the site hosts is true.</p>

<p>Please let me know if you have any proof to back your claims.</p>

<p>Kind Regards,<br />
Ganesh Rao<br />
Head of Operations/ Network Architect</p>

<p>Infinite Technologies<br />
FF-2, #17, 5th Main<br />
Airport Road<br />
Bangalore 560 017</p>

<p>W: www.InfiniteTech.in<br />
P: +91.991-697-1255<br />
E: <i>[redacted]</i></p>
</blockquote>

<p>I found that quite offensive&mdash;basically Ganesh Rao was calling me a liar&mdash;and I said so.  Eventually the conversation ended with</p>

<blockquote class="email">
<table class="headers">
<tr><th>From:</th><td>Ganesh Rao</td></tr>
<tr><th>Subject:</th><td>Re: macserialjunkie.com</td></tr>
<tr><th>Date:</th><td>23 July 2008 14:28:29 BST</td></tr>
<tr><th>To:</th><td>Alastair Houghton</td></tr>
</table>
<hr />
<p>Hello,</p>

<p>You are too confident Mr. Houghton. Do you think your the first and only one trying to do this?</p>

<p>If as you assume this is going to be easy, your mistaken. We have connections with multiple Swedish ISPs. If we feel any discomfort from you, transferring data over to one of them and shredding this one wouldn't be too hard. You'll now end up fighting a case in Sweden, and perhaps some other country after that. Quite frankly - I don't see a point with this.</p>

<p>And to answer your question directly: no action will be taken on the site :)</p>

<p>Your best bet (and most economical) will be to contact the webmaster and have content you find uncomfortable removed.</p>

<p>Kind Regards,<br />
Ganesh Rao<br />
Head of Operations/ Network Architect</p>

<p>Infinite Technologies<br />
FF-2, #17, 5th Main<br />
Airport Road<br />
Bangalore 560 017</p>

<p>W: www.InfiniteTech.in<br />
P: +91.991-697-1255<br />
E: <i>[redacted]</i></p>
</blockquote>

<p>Notice that the tone has changed <em>completely</em>.  Originally Mr. Rao was trying to make it seem as if he had no relationship with Macserialjunkie.  But in this final e-mail the relationship is obvious. He talks about how &ldquo;<em>we</em>&rdquo; have connections with multiple Swedish ISPs, and about how easy it would be to transfer the data over to one of them.</p>

<p>Anyway, after forwarding this to the upstream ISP, it seems that action was eventually taken to kick MSJ off the servers they were using.  It has, of course, resurfaced, but this time at 94.100.27.140, which (surprise surprise) is registered to none other than Infinite Technologies and in particular Mr. Ganesh Rao:</p>

<blockquote class="code">
<pre>
OrgName:    RIPE Network Coordination Centre
OrgID:      RIPE
Address:    P.O. Box 10096
City:       Amsterdam
StateProv:
PostalCode: 1001EB
Country:    NL

ReferralServer: whois://whois.ripe.net:43

NetRange:   94.0.0.0 - 94.255.255.255
CIDR:       94.0.0.0/8
NetName:    94-RIPE
NetHandle:  NET-94-0-0-0-1
Parent:
NetType:    Allocated to RIPE NCC
NameServer: NS-PRI.RIPE.NET
NameServer: SEC1.APNIC.NET
NameServer: SEC3.APNIC.NET
NameServer: TINNIE.ARIN.NET
NameServer: NS.LACNIC.NET
Comment:    These addresses have been further assigned to users in
Comment:    the RIPE NCC region. Contact information can be found in
Comment:    the RIPE database at http://www.ripe.net/whois
RegDate:    2007-07-30
Updated:    2007-08-07

# ARIN WHOIS database, last updated 2008-11-23 19:10
# Enter ? for additional hints on searching ARIN's WHOIS database.
% This is the RIPE Whois query server #2.
% The objects are in RPSL format.
%
% Rights restricted by copyright.
% See http://www.ripe.net/db/copyright.html

% Note: This output has been filtered.
%       To receive output for a database update, use the "-B" flag

% Information related to '94.100.27.0 - 94.100.27.255'

inetnum:        94.100.27.0 - 94.100.27.255
netname:        INFINITE-TECH
descr:          INFINITE-TECH
country:        NL
admin-c:        ITGR-RIPE
tech-c:         ITGR-RIPE
org:            ORG-ITPL2-RIPE
status:         ASSIGNED PA
mnt-by:         ITECH-MNT
mnt-lower:      ITECH-MNT
mnt-domains:    ITECH-MNT
mnt-routes:     ITECH-MNT
source:         RIPE # Filtered

organisation:   ORG-ITPL2-RIPE
org-name:       Infinite Technologies
org-type:       OTHER
address:        Postbus 964
address:        5000 AZ, Tilburg
address:        The Netherlands
remarks:        +--------------------------
remarks:        Abuse Complaints = Email Only
remarks:        Technical Support = Email & Phone
remarks:        +--------------------------
abuse-mailbox:  abuse@infinitetech.in
mnt-ref:        ITECH-MNT
mnt-by:         ITECH-MNT
source:         RIPE # Filtered

person:         Ganesh Rao
address:        PO Box 964
address:        Tilburg, 5000 AZ
address:        The Netherlands
phone:          +31-(0)13-2202617
fax-no:         +1 (408) 856-2445
abuse-mailbox:  abuse@infinitetech.in
remarks:        +--------------------------
remarks:        Head of Operations
remarks:        Technical / Sales / Abuse Dept.
remarks:        +--------------------------
nic-hdl:        ITGR-RIPE
mnt-by:         ITECH-MNT
source:         RIPE # Filtered

% Information related to '94.100.16.0/20AS35017'

route:          94.100.16.0/20
descr:          PL-SWIFTWAY-20080709
origin:         AS35017
mnt-by:         swiftway-mnt
source:         RIPE # Filtered
</pre>
</blockquote>

<p>Their new upstream ISP appears to be <a href="http://www.swiftway.co.uk/" class="external">Swiftway</a>, a Polish firm that for some reason uses a UK domain name for its site.  It seems unlikely that hosting MSJ is something that is allowable under Swiftway&rsquo;s <a href="http://www.swiftway.co.uk/en/Legal,Acceptable_Use_Policy" class="external">Acceptable Use Policy</a>, since it (MSJ) clearly is used &ldquo;<em>to distribute&#8230;material in violation of applicable law&#8230;in a manner that will infringe the copyright&#8230;of others</em>&rdquo;.</p>]]>
        
    </content>
</entry>

<entry>
    <title>OpenRadar</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/11/openradar/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=267" title="OpenRadar" />
    <id>tag:alastairs-place.net,2008://1.267</id>
    
    <published>2008-11-17T11:53:52Z</published>
    <updated>2008-11-17T11:53:52Z</updated>
    
    <summary><![CDATA[OpenRadar (via Rentzsch) looks like a great way for us developers to share information about bug reports we&rsquo;ve filed with Apple. Or it would be if it weren&rsquo;t falling foul of the limits on the Google App Engine beta :-)...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Cocoa" />
    
        <category term="Cool Stuff" />
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p><a class="external" href="http://openradar.appspot.com/">OpenRadar</a> (via <a class="external" href="http://rentzsch.com/notes/openRadar">Rentzsch</a>) looks like a great way for us developers to share information about bug reports we&rsquo;ve filed with Apple.</p>

<p>Or it would be if it weren&rsquo;t falling foul of the limits on the Google App Engine beta :-)</p>]]>
        
    </content>
</entry>

<entry>
    <title>Perverse</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/11/perverse/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=266" title="Perverse" />
    <id>tag:alastairs-place.net,2008://1.266</id>
    
    <published>2008-11-04T13:43:55Z</published>
    <updated>2008-11-04T13:43:55Z</updated>
    
    <summary>For some time now the government has been banging on at the banks to pass interest rate cuts on to consumers. This, it seems to me, would be perverse (as indeed are interest rate cuts in the first place). We...</summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>For some time now the government has been banging on at the banks to <a href="http://news.bbc.co.uk/1/hi/uk_politics/7708313.stm" class="external">pass interest rate cuts on to consumers</a>.</p>

<p>This, it seems to me, would be perverse (as indeed are interest rate cuts in the first place).  We arrived in the current economic mess as a direct result of interest rates that were too low over a sustained period because of a failure to take into account the boom in the housing market, both here and in the United States; had the banks not been busy shifting the risk onto others, perhaps money would not have been lent inappropriately even under those conditions, but the combination of the two has turned out to be a disaster for the world economy.</p>

<p>The fix for these problems is twofold.  It was clear that the only way to solve the crisis in the banking sector was recapitalisation, whether through mergers, takeovers, outside investment or&mdash;preferably as a last ditch alternative&mdash;state investment in banks.  The alternative would be to allow banks to go bust, taking peoples&rsquo; savings with them; this is political suicide and therefore unthinkable to the modern political class, not to mention terribly unpleasant for the people whose money would be lost.</p>

<p>But the underlying problem of the overheating housing markets on both sides of the Atlantic can only be tackled by taking real estate prices into consideration when setting interest rates.  And, to date, the Bank of England has still not been instructed to include house prices in the measure of inflation it is supposed to be working to keep at a low rate.</p>

<p>We should not be making rate cuts at the moment, let alone forcing lenders to pass on those rate cuts to consumers.  To make rate cuts when the problem is excessive debt and when housing is still significantly overpriced is simply madness.</p>]]>
        
    </content>
</entry>

<entry>
    <title>McCain spam</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/11/mccain_spam/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=265" title="McCain spam" />
    <id>tag:alastairs-place.net,2008://1.265</id>
    
    <published>2008-11-04T13:16:39Z</published>
    <updated>2008-11-04T13:16:39Z</updated>
    
    <summary><![CDATA[Is anyone else receiving spam from the John McCain campaign? Thus far, my company has received no fewer than three spam e-mails from johnmccain.com (and yes, I&rsquo;m pretty certain they originate with the McCain campaign itself, and not with some...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>Is anyone else receiving spam from the John McCain campaign?  Thus far, my <em>company</em> has received no fewer than three spam e-mails from johnmccain.com (and yes, I&rsquo;m pretty certain they originate with the McCain campaign itself, and not with some spammer out to discredit the Republican presidential candidate).</p>

<p>This is annoying for three reasons:</p>

<ul>
<li>The e-mail address to which these are being sent <em>cannot</em> have been collected in a legal manner.  Why?  Because it&rsquo;s one of our customer contact e-mail addresses, that&rsquo;s why.  <em>We don&rsquo;t give it out to people so that they can send us marketing e-mail.</em></li>

<p><li>We aren&rsquo;t American.  <em>i.e. we don&rsquo;t even have a blasted vote!</em></li></p>

<p><li>It&rsquo;s illegal to send spam into the European Union.  Yet here we have an example of the American <em>establishment</em> flouting E.U. law.</li><br />
</ul></p>

<p>Anyway, Mr. McCain, whoever is doing your e-mail campaign is doing you and your party a disservice.  Spamming people isn&rsquo;t going to make them vote for you; it&rsquo;s going to make them vote for someone else.  Probably Barack Obama.</p>

<p>(Of course, some may say, well, so much the better.  I don&rsquo;t really have an opinion on who the United States should elect as their next president.  I suspect it will be Obama, and I hope therefore that he turns out to be a good choice for the American people.)</p>]]>
        
    </content>
</entry>

<entry>
    <title>Protecting MPs from their voters</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/10/protecting_mps/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=264" title="Protecting MPs from their voters" />
    <id>tag:alastairs-place.net,2008://1.264</id>
    
    <published>2008-10-30T14:45:41Z</published>
    <updated>2008-10-30T14:45:41Z</updated>
    
    <summary><![CDATA[It seems that over-the-top privacy &ldquo;concerns&rdquo; are now going to mean that we won&rsquo;t know where our MPs live. To my mind, this is highly undemocratic. If there is a problem with MPs&rsquo; security, we already have a solution&mdash;posting a...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Life" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>It seems that over-the-top privacy &ldquo;concerns&rdquo; are now <a href="http://news.bbc.co.uk/1/hi/uk_politics/7699923.stm" class="external">going to mean that we won&rsquo;t know where our MPs live</a>.</p>

<p>To my mind, this is highly undemocratic.  If there is a problem with MPs&rsquo; security, we already have a solution&mdash;posting a policeman outside their home.  But without knowing MPs&rsquo; home addresses, telephone numbers etcetera, there will be no way for their constituents to contact them in an emergency.</p>

<p>It seems to me that some MPs have forgotten that their primary duty is to serve their constituents, and that they are <em>supposed</em> to make themselves accessible, <em>not inaccessible</em>, to those same people.</p>

<p>If MPs are not going to be required to publish their personal contact details, then they should be required instead to provide a method of contacting them <em>directly</em> that is guaranteed to work 24 hours a day, 7 days a week, 365 days a year.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Running Xcode unit tests from the command line</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/10/running_xcode_u/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=263" title="Running Xcode unit tests from the command line" />
    <id>tag:alastairs-place.net,2008://1.263</id>
    
    <published>2008-10-24T15:49:05Z</published>
    <updated>2008-10-24T15:49:05Z</updated>
    
    <summary><![CDATA[For some time now, Xcode has included support for unit testing via an integrated copy of Sen:te&rsquo;s OCUnit. On the face of it, this is a great feature as it lets you easily write unit tests and straightforwardly integrate them...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>For some time now, Xcode has included support for unit testing via an integrated copy of Sen:te&rsquo;s <a class="external" href="http://www.sente.ch/software/ocunit/">OCUnit</a>.  On the face of it, this is a great feature as it lets you easily write unit tests and straightforwardly integrate them into the Xcode build process.</p>

<p>Unfortunately, there is very little documentation in Xcode itself relating to the unit testing feature.  In fact, all I can find is the pointlessly short <a class="external" href="http://developer.apple.com/documentation/developertools/Conceptual/UnitTesting/UnitTesting.html">Xcode Unit Testing Guide</a>.</p>

<p>It&rsquo;d be <em>really</em> handy if the various <code>STAssert</code> macros were documented in the API documentation; constantly having to open up the <code>SenTestCase_Macros.h</code> header file is a bit of a pain, frankly.  Since it&rsquo;s now possible to put third-party docs into the Xcode Documentation window, perhaps someone will take the time to document the various macros?</p>

<p>But it isn&rsquo;t nearly as much of a pain as the fact that there is no explanation anywhere of how to run your unit tests from the command line, or indeed how to debug a failing unit test.</p>

<h3>Running <kbd>otest</kbd> from the command line</h3>

<p>Trying to run a unit test from the command line can be a real headache.  Especially if the machine you&rsquo;re testing on happens to be 64-bit capable, because when you try to run <kbd>otest</kbd> from the command line, OS X will choose the 64-bit variant, which probably won&rsquo;t match the test bundle.  Either way, if you&rsquo;ve tried this and you <em>haven&rsquo;t</em> seen error messages like &ldquo;no suitable image found&rdquo; or &ldquo;GC capability mismatch&rdquo;, frankly you&rsquo;ve been very lucky.</p>

<p>The best way to show how to avoid these problems is probably to give an example, so here goes:</p>

<blockquote class="code"">
<tt>$ </tt> <kbd>find . -name '*.octest'</kbd><br />
<tt>./build/Debug/MyTests.octest</tt><br />
<tt>$ </tt> <kbd>export OBJC_DISABLE_GC=YES</kbd><br />
<tt>$ </tt> <kbd>arch -i386 /Developer/Tools/otest ./build/Debug/MyTests.octest</kbd>
</blockquote>

<p>The first line finds the test bundle.  You don&rsquo;t really need to do this every time (or at all, if you know where it is already).</p>

<p>The second line disables GC; this is optional, but if the code you are testing doesn&rsquo;t support GC and the version of <kbd>otest</kbd> on your system was build with GC enabled, you need to disable it as shown here or you&rsquo;ll get a &ldquo;GC capability mismatch&rdquo; error.  If you&rsquo;re seeing &ldquo;GC capability mismatch&rdquo; and your code is build to require GC, you probably need to update your version of Xcode (3.1.1 comes with an <kbd>otest</kbd> that does work with GC) or if that isn&rsquo;t an option you could build a suitable <kbd>otest</kbd> binary yourself.</p>

<p>The third line is where things really get interesting.  You can&rsquo;t rely on just running <kbd>otest</kbd>, since the system you&rsquo;re running on might choose the wrong architecture for your test bundle.  Fortunately Apple has provided the <kbd>arch</kbd> command (see <a href="x-man-page://1/arch">man 1 arch</a>), which lets you ask for a <em>particular</em> architecture when running something from the command line.  In the example, I asked for 32-bit x86, but I might just as well have asked for any number of other things.</p>

<p>If you&rsquo;re unlucky enough to be trying to debug a <em>framework</em> unit test, you&rsquo;ll also be having problems at this point with the system not finding the framework.  To fix this, you can add something like</p>

<blockquote class="code">
<tt>$ </tt> <kbd>export DYLD_FRAMEWORK_PATH=`pwd`/build/Debug</kbd>
</blockquote>

<p>to the above set of commands.</p>

<h3>Running your unit tests in GDB</h3>

<p>OK, so we know now how to run the unit tests from the command line.  How do we get them to run in GDB?  Simple.  Something like</p>

<blockquote class="code">
<tt>$ </tt> <kbd>gdb -arch i386 /Developer/Tools/otest</kbd>
<tt>GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)<br />
Copyright 2004 Free Software Foundation, Inc.<br />
GDB is free software, covered by the GNU General Public License, and you are<br />
welcome to change it and/or distribute copies of it under certain conditions.<br />
Type "show copying" to see the conditions.<br />
There is absolutely no warranty for GDB.  Type "show warranty" for details.<br />
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ...... done<br />
<br />
(gdb) </tt>
</blockquote>

<p>Notice the <kbd>-arch i386</kbd> at the top&#8230; that sets the architecture, which you need to do at the GDB command.  Then we proceed as before, but this time using GDB commands rather than shell script</p>

<blockquote class="code">
<tt>(gdb) </tt> <kbd>set environment DYLD_FRAMEWORK_PATH=/Users/alastair/Source/UnitTestTest/build/Debug</kbd><br />
<tt>(gdb) </tt> <kbd>set environment OBJC_DISABLE_GC=YES</kbd><br />
<tt>(gdb) </tt> <kbd>set args ./build/Debug/MyTests.octest</kbd><br />
<tt>(gdb) </tt> <kbd>run</kbd><br />
</blockquote>

<p>Again, the <tt>DYLD_FRAMEWORK_PATH</tt> and <tt>OBJC_DISABLE_GC</tt> steps are both optional and whether you need them or not depends on your particular circumstances.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Marrakech</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/10/marrakech/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=262" title="Marrakech" />
    <id>tag:alastairs-place.net,2008://1.262</id>
    
    <published>2008-10-23T18:55:46Z</published>
    <updated>2008-10-23T18:55:46Z</updated>
    
    <summary>It’s been ages since I last posted on my blog. Far too long, I tend to think. Anyway, I recently went on holiday to Marrakech for a week, staying in a charming little riad just inside the medina walls. I’d...</summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Life" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>It’s been ages since I last posted on my blog.  Far too long, I tend to think.</p>

<p>Anyway, I recently went on holiday to Marrakech for a week, staying in <a href="http://www.riadmimouna.com" class="external">a charming little riad</a> just inside the medina walls.  I’d describe the accommodation as basic but very pleasant; the staff were friendly, polite and helpful, and aside from the day when the Moroccan government turned the water off everything was pretty good, I’d say.</p>

<p>Marrakech was <em>amazing</em>.  Very different from anywhere I’ve been previously.  I think it’s become a bit tourist-oriented these days and I also think it’s been largely spoiled by the availability of cheap motorbikes and motorcycles (which the locals drive at breakneck speed through the souk and just about everywhere else as well).</p>

<p>That said, there’s still plenty to see and do, both in Marrakech itself and in the surrounding area.  I think my favourite place was <a href="http://en.wikipedia.org/wiki/Aït_Benhaddou" class="external">Aït Benhaddou</a>, where I maintained my tradition of accidentally putting my foot in the nearest river/stream/pond.  Fortunately it was nice and warm, so it dried out quickly.</p>

<p>I have a large pile of photos that I need to go through.  I might post a few somewhere—we’ll see.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Path MTU problems</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/09/path_mtu_proble/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=261" title="Path MTU problems" />
    <id>tag:alastairs-place.net,2008://1.261</id>
    
    <published>2008-09-17T15:20:52Z</published>
    <updated>2008-09-17T15:20:52Z</updated>
    
    <summary>Rainer Brockerhoff has just changed ISP and is having what sound like MTU problems. These are increasingly common and there is a lot of misunderstanding about what causes them and why. Essentially the problem is that some types of network...</summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p><a href="http://twitter.com/rbrockerhoff/statuses/924527429" class="external">Rainer Brockerhoff</a> has just changed ISP and is having what sound like MTU problems.  These are increasingly common and there is a lot of misunderstanding about what causes them and why.</p>

<p>Essentially the problem is that some types of network link have a smaller limit on the maximum packet size than others.  Originally, machines used to simply assume the worst and only transmitted packets of up to 576 octets in size.  This was quickly changed so that hosts using TCP/IP negotiate the maximum segment size during connection set-up.  However, if there are routers between the two hosts, it is possible that the hosts&rsquo; MTU values are higher than the link between the routers.</p>

<p>If that happens, one option is for the routers to fragment the packets.  Unfortunately this has several negative effects and has occasionally been deliberately blocked to prevent various types of Denial of Service attack.</p>

<p>A better approach, therefore, would be for the hosts to attempt to discover the MTU of the network path over which they are communicating.  To do this, they transmit large packets with the DF (Do not Fragment) flag set.  When a router receives such a packet, it is supposed to reply with an ICMP message indicating that the packet was too large and cannot be forwarded.  When such a message arrives, the sending host can reduce the MTU of the link as appropriate and retry.</p>

<p>And herein lies the problem.  Some sysadmins apparently don&rsquo;t realise that <em>ICMP messages are required for correct operation</em> and block all of them.  Or maybe they just block the one required for path MTU discovery.  Either way, doing this breaks things <em>badly</em> and leads to all kinds of weird symptoms that people tend to blame on end users and their ISPs.</p>

<p>There are some tools you can use to investigate if you think this problem is happening to you; <a href="http://www.wand.net.nz/scamper/" class="external">scamper</a> seems to be particularly useful. e.g.</p>

<blockquote class="code"><code>alastair$ </code><kbd>sudo ./scamper -c "trace -M -P ICMP" -i 10.0.1.1</kbd></blockquote>

<p>will display the MTU at each point along the route from your machine to 10.0.1.1.</p>

<p>Or you can &ldquo;just&rdquo; set the MTU on your machine to a lower value.  Unfortunately it is usually tricky to configure a special MTU for accessing the Internet and the usual Ethernet MTU for the rest of your network, and in order to avoid problems you really should have the MTU settings the same for all hardware on your network segment.</p>]]>
        
    </content>
</entry>

<entry>
    <title>iPhone versus iPhone 3G</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/07/iphone_versus_i/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=260" title="iPhone versus iPhone 3G" />
    <id>tag:alastairs-place.net,2008://1.260</id>
    
    <published>2008-07-30T16:51:56Z</published>
    <updated>2008-07-30T16:51:56Z</updated>
    
    <summary><![CDATA[First thoughts on iPhone 3G: I prefer the metal back on the original iPhone. I do understand, though, that it has a negative impact on radio performance and hence battery life. The metal buttons on the iPhone 3G don&rsquo;t appear...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Cool Stuff" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>First thoughts on iPhone 3G:</p>

<ul>
<li>I prefer the metal back on the original iPhone.  I do understand, though, that it has a negative impact on radio performance and hence battery life.</li>
<li>The metal buttons on the iPhone 3G don&rsquo;t appear to be very well finished.  I&rsquo;d have rounded the edges off a bit more; they seem too sharp to me.</li>
<li>The silent mode switch is significantly stiffer on the 3G.  I think I prefer the original feel, but I understand that some people kept knocking it, so maybe the change is necessary.</li>
<li>The iPhone 3G is physically slightly larger, and the display has a slightly larger border as a result.</li>
<li>The colour temperature of the display has indeed been adjusted.  This is a Good Thing, as I always thought the original iPhone was too blue.</li>
<li>The touch screen on the 3G seems slightly more responsive.</li>
<li>iPhone 3G seems like it might be a little quicker than the original.  This is just subjective, I haven&rsquo;t measured or looked at the devices in it, so it may well be entirely imaginary.</li>
</ul>

<p>Of course, the GPS and 3G features will be useful, particularly in the part of the U.K. where I live because EDGE coverage is patchy so with my original iPhone I ended up having to rely on GPRS which is pretty slow by comparison to EDGE, never mind 3G data.  3G, on the other hand, has pretty wide coverage here in the U.K.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Discounts</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/07/discounts/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=259" title="Discounts" />
    <id>tag:alastairs-place.net,2008://1.259</id>
    
    <published>2008-07-30T15:26:22Z</published>
    <updated>2008-07-30T15:26:22Z</updated>
    
    <summary><![CDATA[OK, so our website finally supports discounts. It&rsquo;s a little trickier than it sounds, actually, since we have to worry about VAT which rather complicates matters. I was a bit worried about having to make the changes to the site...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>OK, so our website <em>finally</em> supports discounts.  It&rsquo;s a little trickier than it sounds, actually, since we have to worry about VAT which rather complicates matters.</p>

<p>I was a bit worried about having to make the changes to the site because it involved updating some of the important tables in our database, but it all seems to have gone OK&#8230; only one &ldquo;observation&rdquo; from a customer so far, and I believe that problem is now fixed.</p>]]>
        
    </content>
</entry>

<entry>
    <title>On the effect of piracy</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/07/on_the_effect_o/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=258" title="On the effect of piracy" />
    <id>tag:alastairs-place.net,2008://1.258</id>
    
    <published>2008-07-22T17:14:41Z</published>
    <updated>2008-07-22T17:14:41Z</updated>
    
    <summary><![CDATA[To all the doubters out there who think that piracy doesn&rsquo;t hurt the bottom line of small software companies, I say this. Our products have recently been subject to an attempt (albeit a flawed one) to crack the protection. It...]]></summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
        <category term="Work" />
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>To all the doubters out there who think that piracy doesn&rsquo;t hurt the bottom line of small software companies, I say this.  Our products have recently been subject to an attempt (albeit a flawed one) to crack the protection.  It didn&rsquo;t work, but that hasn&rsquo;t stopped the distribution of the broken cracked copies, which are likely to damage peoples&rsquo; data.</p>

<p>Nor does the fact that these cracked versions could do serious damage dissuade people from downloading them, apparently.  We can see from our daily sales figures <em>a drop of nearly 30%</em> since the illegal copies first appeared.  Yes, that&rsquo;s right, 30%.</p>

<p>The worst thing though, worse even than losing 30% of our business to these jerkoffs, is that because the crack was done by an incompetent, the programs could terminate at any time while they&rsquo;re working on the users&rsquo; disks, leaving them with potentially serious filesystem damage.  Filesystem damage <em>for which we will be blamed</em>, though it&rsquo;s not our fault in the slightest.</p>]]>
        
    </content>
</entry>

<entry>
    <title>FUD and extremism from the FSF</title>
    <link rel="alternate" type="text/html" href="http://alastairs-place.net/2008/07/fud_and_extremi/" />
    <link rel="service.edit" type="application/atom+xml" href="http://alastairs-place.net/movabletype/mt-atom.cgi/weblog/blog_id=1/entry_id=257" title="FUD and extremism from the FSF" />
    <id>tag:alastairs-place.net,2008://1.257</id>
    
    <published>2008-07-18T10:17:48Z</published>
    <updated>2008-07-18T10:17:49Z</updated>
    
    <summary>The FSF has published an article entitled 5 reasons to avoid iPhone 3G. Ironically, given the fuss they made about Microsoft FUDding Linux, this article is a blatant attempt to FUD Apple. Sure, iPhone developers have to pay a one-off...</summary>
    <author>
        <name>alastair</name>
        <uri>http://alastairs-place.net</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://alastairs-place.net/">
        <![CDATA[<p>The FSF has published an article entitled <a href="http://www.fsf.org/blogs/community/5-reasons-to-avoid-iphone-3g" class="external">5 reasons to avoid iPhone 3G</a>.  Ironically, given the fuss they made about Microsoft FUDding Linux, this article is a blatant attempt to FUD Apple.</p>

<p>Sure, iPhone developers have to pay a one-off fee to Apple, and Apple does reserve the right to reject applications if they don&rsquo;t meet the requirements stipulated in the SDK license agreement.  And sure, iPhone does support DRM, something the FSF has been campaigning against for some time, but something the FSF is ill qualified to talk about as it does not, in fact, have any problems of its own with software, music or movie piracy.</p>

<p>I think the most objectionable parts are where the article says things like</p>

<blockquote style="font-style: italic">
iPhone exposes your whereabouts and provides ways for others to track you without your knowledge.
</blockquote>

<p>which is nothing less than blatant and unjustifiable scaremongering.  Yes, the iPhone 3G has GPS.  But in order for an application to use it, the user must agree to a message displayed by the phone.  That is, the user is explicitly asked whether to allow an application access to their location.</p>

<p>There is also a claim that</p>

<blockquote style="font-style: italic">
[Fairplay] prevents you from installing free software -- software whose authors want you to freely share, copy and modify their work.
</blockquote>

<p>which is total bunk.  If authors of Free Software choose to provide a build for the iPhone (and to do that, only a single developer need pay the license fee), they can submit their application to the App Store and Apple will distribute it for free and allow users to install it.</p>

<p>And sure, anyone who wants to modify the application will need a developer license, which they have to pay for.  Why is this suddenly a bad thing?  Wasn&rsquo;t it FSF that made the point that Free Software was free as in speech and not necessarily as in beer?  And isn&rsquo;t it also the case that for many platforms those people who build their own versions of Free Software products require the use of commercial tools of some sort?</p>

<p>The go on to say that</p>

<blockquote style="font-style: italic">
Jobs would have us believe that all of these restrictions are necessary.
</blockquote>

<p>and he&rsquo;s right.  They are.  Why?  Because otherwise the iPhone would be full of viruses and other malware within a few months.  The way Apple has chosen to do things does have some disadvantages, but it has the major advantage that it&rsquo;s significantly harder to publish iPhone malware without getting caught than it is to publish malware for other mobile devices.</p>

<p>And as for the theory that Apple is</p>

<blockquote style="font-style: italic">
a single greedy, dishonest and secretive entity
</blockquote>

<p>well I think &ldquo;johns&rdquo;, whoever he is, needs to grow up.  Apple is, of course, a business and is out to make money.  That&rsquo;s what businesses do.  But they don&rsquo;t do it solely for their own benefit; you and I hold shares in businesses, both directly and indirectly (through our bank accounts, our pensions, and a wide range of other investments).  If they make a profit, we benefit.  Likewise, if we don&rsquo;t like how they behave, we can turn up at their AGM, or demand that those who represent our interests do so, and demand that they change their behaviour.  This modern notion that big business is the Big Bad Wolf is borne out of ignorance, and it&rsquo;s a great shame that the FSF seems intent on promoting this jaded and inaccurate view of the world.</p>

<p>It&rsquo;s also a bit rich FUDding someone else and then accusing that other entity of being dishonest.</p>

<p>When I was a student, I used to think I agreed with some of the goals of the FSF.  Maybe even most of them.  In recent years though, they seem to have become more and more extreme and I now find myself wishing that they would either go back to their roots and forget about all these new things they&rsquo;re complaining about, many of which have little or nothing to do with the original Free Software idea, or just pack it in and leave the rest of us the hell alone.</p>

<p>I certainly won&rsquo;t be supporting them in future, and I have no intention of contributing to any of their projects (as I have occasionally in the past).</p>

<p>FSF, you&rsquo;ve lost my support.</p>]]>
        
    </content>
</entry>

</feed> 

