Alastair’s Place

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

Why “Road Pricing” Is a Bad Idea

Here in the U.K., our government has been making noises about “road pricing”, by which they mean a new tax based on the number of miles of road (and the types of road) that you travel using your car.

They claim that this will reduce congestion, however in order to appreciate the real effect of such a scheme you must keep in mind that:

  • Most Britons live away from where they work. This a result of industry consolidation, and of government policies such as the promotion of out-of-town shopping and industrial estates.
  • Congestion happens primarily during “peak periods”, i.e. the times at which people travel to and from work.
  • There is often little or no public transport provision to get people from residential areas to company premises. Even where there is public transport, it often takes a tortuous route, meaning that it takes much longer than travelling by car.

In other words, most of the people affected by road pricing will have little choice other than to pay the tax.

Not only that, but here in the U.K. we already have a pay-by-the-mile road taxing scheme, in the shape of one of the most extreme fuel taxing regimes of any country in the world. Not only does the government take around 50 pence per litre for unleaded petrol, but we actually pay VAT on the fuel tax!. So, of the typical 95 pence per litre we get charged for unleaded petrol today, around 14 pence is VAT, then there’s another 50 pence of fuel duty on top of that, so our government takes 64 pence of the money we pay for every litre of fuel. That’s a whopping 67.5% of the cost of petrol here.

Let’s consider for a moment what that means; say your car does 30 miles per gallon. There are 4.546 litres in an Imperial gallon (not a U.S. gallon, so please don’t try to correct me :–)), so that works out at an effective tax rate of about 10 pence per mile (more for a gas-guzzler). And all this without complicated vehicle tracking systems, extra paperwork, extra loopholes, or indeed any new laws from government.

So, if we effectively already have a by-the-mile charging scheme, why does the government think its new “road pricing” idea is the way to go? Put simply, because the public has already protested at the exorbitant taxes placed on fuel. Our government knows it would never get away with hiking the rate to the kinds of levels that it would like.

And in any case, raising fuel duty or imposing road charging schemes is unlikely to do very much to prevent congestion. Most of the people creating the congestion are simply trying to get to work, and they will continue to try to get to work under almost any conceivable tax regime. Public transport is not fit for purpose; from an employer’s perspective, it cannot deliver employees to the company’s offices reliably and on-time. From an employee’s perspective, it is dirty, unreliable, slow and often late; try to use such a service to get to many jobs in the U.K. and you would be sacked. Indeed, the situation is so bad that in Newbury, Vodafone runs its own bus services!

Increasing fuel duty or creating an expensive-to-operate road pricing scheme in the U.K. can therefore have only one result: inflationary pressure on the pound. The idea that it will have any significant effect on congestion is laughable.

PDFs and NSToolbar

One of the nicest new features in OS X 10.5 (Leopard) is resolution independence. Not only does this pave the way for a zoom feature that doesn’t pixellate as you zoom in, providing a better user experience for partially sighted users, but it also means that as display panel resolutions climb, the Mac OS X UI will stay a usable size and will just start to look much nicer.

So, Apple are trying to encourage developers to make their apps resolution independent. The problem with that, of course, is that it means everything must scale nicely (even to non-integer scale factors), and bitmaps just don’t do that easily. As a result, they’re suggesting that we draw several sizes of bitmap and stick them together into a multi-resolution TIFF.

That’s one way to go, certainly, but it does multiply the effort somewhat; drawing icons is hard enough without having to draw them several times at different scales and detail levels.

Anyway, some of us would rather use vector graphics where possible. (There have been some remarks about this already from the “you should use bitmaps” camp, which was later clarified after some criticism; it isn’t my intention to go into the pros and cons here).

So, away you go, changing your icons for vector graphics (probably PDF, on Mac OS X). For me, this was all working wonderfully, until I hit a stubborn problem. One of my toolbar icons, which looks like this

Go

was being rendered with a white square behind it whenever it was disabled or highlighted; i.e. like this

Go (Disabled) with a nasty white square behind it

This, of course, looks really bad, and I couldn’t work out why it only affected some icons and not others. Anyway, if you’re struggling with the same problem, a workaround is to call -setAlpha: on your NSPDFImageRep, giving the argument YES. The result in my case is that the problem went away:

Go (Disabled)

For people inside Apple, I’ve filed a bug report: rdar://4996913.

Inspector Designs

I’m currently pondering the merits of the two common designs of inspector window, i.e. these two:

Finder’s Get Info panel   Pages’ Inspector

Finder-style “segmented” inspectors use disclosure buttons to show or hide individual segments, whereas the iWork-style inspectors use a toolbar or a strip of buttons to control which page is visible. There are some applications (such as OmniGraffle, which used to use a fancier version of the Finder-style approach) that use a combination of the two techniques.

I’ve started a new page on Cocoadev if anyone would like to express their views on the matter.

How Childish

This made me laugh. The people at info-pull.com (probably LMH) have apparently tried to use their firewall to block me from seeing their site (see the last post on that thread; it’s a firewall rule from their server).

The only reason I can think of for doing this is that they don’t want me to see the bug reports they’re publishing on MoAB, perhaps because they’re worried that some of them might not be accurate and I might pick them up on it.

Of course, I can still see the entire info-pull site, no problem at all, so the only effect of their attempt to block me is that they look childish. Without any proof, LMH will probably claim that I’m lying and can’t really see his site, so here’s a screenshot from today (this hasn’t been edited at all, and came from behind the connection that they’d tried to block):

Incidentally, whilst we’re looking at this page, has anyone else noticed how LMH/info-pull/MoAB are asking for “donations”?

Dumb Programming From Aspyr

When I bought Quake 4 for the Mac, I found that it didn’t work from my normal user account. Why? Well…

If, after you first try to run the game, you look in ~/Library/Application Support/Quake4, you’ll see a folder called q4base. Inside this folder is a bundle, game.so.bundle. The trouble is that Aspyr, who put it there, clearly think that a bundle should contain a folder called contents. It shouldn’t. The folder should be called Contents (note the capital letter ‘C’). And inside it should be a folder called MacOS, not a folder called macos.

Before you say “well you shouldn’t be using a case-sensitive filesystem”, which is exactly what Aspyr said when I reported it to them, my Mac is not using case-sensitive HFS+. My home area is on a server, however, and that server is using a case-sensitive filesystem. Aspyr tried to claim that this wasn’t supported by Apple, but of course it is… Apple make a big song and dance about how good Mac OS X is at integrating with other systems, and most Unix-like server systems use case-sensitive filesystems.

Anyway, you’d hope that they’d fix this problem, as it’s only a case of renaming a couple of files, right? But no, it’s still not fixed in the just released Prey Demo. So, if you want to get Quake 4, or Prey, or either of the demo versions working and your home area is case sensitive, here’s what to do:

  • Run the game once. It will display its splash screen and then terminate (because it can’t load the bundle, because the bundle is invalid, because the names of the internal folders are wrong).
  • Go to ~/Library/Application Support/name of game/q4base.
  • Right-click game.so.bundle.
  • Choose “Show Package Contents”.
  • Rename “contents” to “Contents”.
  • Open the “Contents” folder.
  • Rename “macos” to “MacOS”.
  • Run the game.

The most stupid thing about this entire business is that the one case-sensitivity bug in these games was added by Aspyr! The Windows programmers involved with them got it right, but the Mac programmers, whose operating system does support case-sensitive filesystems, got it wrong.

(By the way, if you use this technique, you’ll need to re-apply it if you download an update for either game.)

No Hope of iPhone Development?

From an article on Newsweek:

“You don’t want your phone to be an open platform,” meaning that anyone can write applications for it and potentially gum up the provider’s network, says Jobs. “You need it to work when you need it to work. Cingular doesn’t want to see their West Coast network go down because some application messed up.”

I’m not sure I really understand this remark. There are other programmable smartphones, and you can get GSM adapters for some PDAs as well. None of those seem to worry network operators.

iPhone and Trademarks

Well the new Apple iPhone is certainly a thing of beauty. Of course, there are lots of rumours flying around about it already, though the release has at least killed off some of the previous rumours about the device by giving us some of the facts.

The fact that it’s running OS X is interesting, to say the least, especially as it seems likely that it’s uses an ARM family CPU. With luck, Apple will let some of us third-party developers write software for it, but we’ll see.

The news that Cisco is suing Apple over the trademark, which the two companies were apparently negotiating, is also interesting. If I had to guess, Apple probably decided to take its chances rather than paying up when it noticed all of these:

http://iphone.com/
http://www.comwave.net/CDN/iPhone/index.htm
http://linkstochina.com/RingChina/iPhone.html
http://founderna.com/iphone/
http://www.iph.net.nz/
http://www.taptarget.com/products/iphone.html
http://www.teledex.com/index.cfm?page=LP_3&crid=9

It only took me a couple of minutes to find that lot. I’m sure there are many more as well.

The thing about trademarks is that they’re only worth anything if you actually defend them. If I were Apple’s lawyers, I’d have to ask why we should be paying Cisco to license the name when quite clearly there are plenty of other companies who haven’t licensed it from Cisco either, many of whom (unlike Apple) are actually competing with Cisco’s products.

Update: it seems that Cisco may not actually have complied with USPTO regulations and as such the trademark registration may have lapsed. Even if it hasn’t lapsed, the article makes it sound even more likely that Cisco only started using the iPhone name because they knew Apple would want it.

Saturn Again

Yes, it’s Saturn again :–)

This time though I’ve got a much better picture of it—and I only processed this quickly; I think I could make it better still if I spent more time on it.

For comparison, I’ve put my previous effort side-by-side with this one

Another Saturn.jpg A picture of Saturn, still annoyingly blurry.

I think you’ll agree, the difference is obvious.

Happy New Year!

Happy New Year.

Not much more to say really :–)