Alastair’s Place

Software development, Cocoa, Objective-C, life. Stuff like that.

Marrakech

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 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.

Marrakech was amazing. 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).

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ït Benhaddou, 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.

I have a large pile of photos that I need to go through. I might post a few somewhere—we’ll see.

Path MTU Problems

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 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’ MTU values are higher than the link between the routers.

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.

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.

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

There are some tools you can use to investigate if you think this problem is happening to you; scamper seems to be particularly useful. e.g.

alastair$ sudo ./scamper -c "trace -M -P ICMP" -i 10.0.1.1

will display the MTU at each point along the route from your machine to 10.0.1.1.

Or you can “just” 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.

iPhone Versus iPhone 3G

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’t appear to be very well finished. I’d have rounded the edges off a bit more; they seem too sharp to me.
  • 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.
  • The iPhone 3G is physically slightly larger, and the display has a slightly larger border as a result.
  • 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.
  • The touch screen on the 3G seems slightly more responsive.
  • iPhone 3G seems like it might be a little quicker than the original. This is just subjective, I haven’t measured or looked at the devices in it, so it may well be entirely imaginary.

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.

Discounts

OK, so our website finally supports discounts. It’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 because it involved updating some of the important tables in our database, but it all seems to have gone OK… only one “observation” from a customer so far, and I believe that problem is now fixed.

On the Effect of Piracy

To all the doubters out there who think that piracy doesn’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’t work, but that hasn’t stopped the distribution of the broken cracked copies, which are likely to damage peoples’ data.

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 a drop of nearly 30% since the illegal copies first appeared. Yes, that’s right, 30%.

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’re working on the users’ disks, leaving them with potentially serious filesystem damage. Filesystem damage for which we will be blamed, though it’s not our fault in the slightest.

FUD and Extremism From the FSF

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 fee to Apple, and Apple does reserve the right to reject applications if they don’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.

I think the most objectionable parts are where the article says things like

iPhone exposes your whereabouts and provides ways for others to track you without your knowledge.

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.

There is also a claim that

[Fairplay] prevents you from installing free software -- software whose authors want you to freely share, copy and modify their work.

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.

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’t it FSF that made the point that Free Software was free as in speech and not necessarily as in beer? And isn’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?

The go on to say that

Jobs would have us believe that all of these restrictions are necessary.

and he’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’s significantly harder to publish iPhone malware without getting caught than it is to publish malware for other mobile devices.

And as for the theory that Apple is

a single greedy, dishonest and secretive entity

well I think “johns”, whoever he is, needs to grow up. Apple is, of course, a business and is out to make money. That’s what businesses do. But they don’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’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’s a great shame that the FSF seems intent on promoting this jaded and inaccurate view of the world.

It’s also a bit rich FUDding someone else and then accusing that other entity of being dishonest.

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’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.

I certainly won’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).

FSF, you’ve lost my support.

Heh. Someone Tried to Crack iPartition 3

Someone tried to crack iPartition 3. Unfortunately for users of this cack-handed crack, they got it wrong and so the “cracked” version is liable to stuff up your disk.

I don’t understand why anyone would be stupid enough to attempt this, actually. I mean, tampering with the code of a copy protected disk utility is a bit like tampering with a nuclear weapon. The person most likely to get hurt is you.

But hey, dumb-ass cheapskate software pirates, by all means destroy your data with pirated copies. Just don’t come crying to us when it happens… we didn’t give them to you and we didn’t tamper with them.

Web Account Security

For those who don’t already know, Marko Karpinnen just had someone steal his Apple ID by sending a message to Apple implying that he’d changed e-mail address and forgotten his password.

Shocking as this may be, it really highlights a serious problem with current methods of identifying people, both off and on-line.

Marko is understandably unhappy about this, and suggests that Apple should have checked that it was him “by comparing the information in their personal profile”. Yet most information about most of us, particularly prominent developers like Marko, is publicly available (for instance via WHOIS or via a variety of other means). I’m quite sure that, even if Apple had done those kinds of checks, they could be readily defeated by someone with the gall to try this kind of thing in the first place.

The fact is that we need an identity system that is not based on people’s personal details, or this kind of thing is going to happen all the time.

Happy Birthday to Me

Yes folks, I just hit the big three-oh. No longer am I a twentysomething :-(

Seems only yesterday I left primary school…