Alastair’s Place

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

Copyright “registration”

James Duncan Davidson on how U.S. copyright law favours large corporations (via Daniel Jalkut).

Thankfully here in the U.K. we don’t need copyright registration, but I think the copyright system is, because of the international nature of copyright infringement, still prohibitively expensive for the users who would benefit the most from it (that is, small businesses like mine). There’s still value in copyright protection, though for software in particular I think it is rapidly being eroded by the rise of Internet piracy and the implicit pro-piracy stance adopted by privacy campaigners and ISPs.

If you prevent enforcement of copyright and systematically stick roadblocks in the way that make it too expensive to clamp down on infringement, there does come a point when the benefits outweigh the “fair use” rights and the fact that your work will eventually enter the public domain. That is, it becomes a one-sided deal and is no longer operating in the favour of the creator.

I am, to an extent, of the opinion that that point has already passed, which is why we’re seeing things like DRM which are only necessary because copyright is not working. DRM and copy-protected files don’t really need copyright in order to function; it could all be handled through the contract between producer and consumer, and in that case fair use rights and the public domain requirement no longer apply—they are solely a feature of copyright, not some more fundamental right as I think people sometimes assume.

The irony is that the people stealing copyrighted material think that copyright is a bad thing (or they tend to say that they do), when at present it actually gives them more rights than they would have without it.

Perhaps High Quality Typography Is Not Dead

The Seed Conference site (via DF) harks back to the typographical masterpieces of yesteryear.

I think I would have made the paragraphs at the top fully justified rather than centred, if only to force the browser to square up the edges, and the very top line of each section is letterspaced a smidge too tightly IMO, but I very much like the sense of style that the page conveys.

Pay the Rent for Your Dead Daughter

This is just awful. The girl’s parents should publish the name of the letting agent concerned; I can’t honestly see any landlords or tenants wanting to be associated with someone who would take this kind of attitude.

Safari 3.1 and Acid3

OK, so I get 75/100 on Acid3 with Safari 3.1, with the following failures:

Failed 25 tests.
Test 01 failed: method [object NodeIterator].nextNode() didn't forward exception
Test 02 failed: expected '[object HTMLElement]' but got 'null' - expectation 13 failed
Test 04 failed: expected 'null' but got '[object HTMLIFrameElement]' - expectation 21 failed
Test 06 failed: expected '[object HTMLTitleElement]' but got 'null' - failed to handle regrafting 
correctly
Test 11 failed: when trying to surround two halves of comment: wrong exception raised; code = 3
Test 13 failed: collapsed is wrong after deletion
Test 18 failed: expected '10' but got '1' - DOCTYPE nodeType wrong
Test 23 failed: no exception for createElementNS('null', ':div')
Test 25 failed: failed to raise exception
Test 26 failed: e1 - parent element doesn't exist after looping
Test 27 failed: e1 - parent element doesn't exist after waiting
Test 38 failed: Value undefined (result of expression p.childNodes[1].replaceWholeText) is not object.
Test 42 failed: expected '1' but got '0' - rule did not start matching after change
Test 44 failed: expected '0' but got '1' - misparsed selectors
Test 46 failed: expected 'none' but got 'uppercase' - case y1 failed (index 25)
Test 59 failed: expected 'submit' but got '' - <button> doesn't have type=submit
Test 65 passed, but took 20ms 
Test 70 failed: UTF-8 encoded XML document with invalid character did not have a well-formedness error
Test 71 failed: expected '2' but got '1' - wrong number of children in #document (first test)
Test 72 failed: expected '3' but got '2' - cssRules isn't live
Test 75 failed: Value undefined (result of expression anim.beginElement) is not object.
Test 76 failed: expected '0' but got '100' - Incorrect animVal value after svg animation.
Test 77 failed: expected '42' but got '65' - getSubStringLength #1 failed.
Test 79 failed: expected '34' but got '33' - SVGSVGTextElement.getNumberOfChars() incorrect
Test 86 failed: calling setMilliseconds() with no arguments didn't result in NaN
Test 92 failed: Function object's prototype's constructor was ReadOnly
Total elapsed time: 0.32s

This compares with the latest Webkit nightly build, which managed a stonking 92/100:

Failed 8 tests.
Test 02 failed: reached expectation 13 when expecting expectation 12
Test 23 failed: no exception for createElementNS('null', ':div')
Test 25 failed: failed to raise exception
Test 26 passed, but took 74ms 
Test 65 passed, but took 17ms 
Test 69 passed, but took 31 attempts.
Test 70 failed: UTF-8 encoded XML document with invalid character did not have a well-formedness error
Test 75 failed: Value undefined (result of expression anim.beginElement) is not object.
Test 76 failed: expected '0' but got '100' - Incorrect animVal value after svg animation.
Test 77 failed: expected '4776' but got '5550' - getComputedTextLength failed.
Test 79 failed: expected '34' but got '33' - SVGSVGTextElement.getNumberOfChars() incorrect
Total elapsed time: 5.31s

Interestingly both of them seem to achieve the scores above plus or minus a point. I’m not sure why that is.

Anyway, pretty impressive, especially given the state of Acid3 rendering on other browsers.

A Whole New Use for Straight Quotes

It seems that the BBC has come up with a whole new use for straight quotes (the image is a link to the article on the BBC News site):

Quotes-for-emphasis.jpg

Yes, folks, apparently they’re now used for emphasis.

It’s pretty depressing to think that this kind of thing made it past an editor at the BBC.

You Don’t Need to Restart

The installer for the new version of MYOB AccountEdge Plus (previously known as MYOB Accounting Plus) restarts the machine.

It’s been irritating me for a while that a lot of software, particularly that written by companies who normally deal with PC software, unnecessarily restarts the machine once it has been installed.

Anyone writing an installer for Mac OS X should take note: You don’t need to restart the machine! In particular:

  • You don’t need to restart after installing an ordinary application. If your application isn’t showing up in Launch Services’ database, you might want to read about Application Registration, but ideally your installer should handle that for you.
  • You normally don’t need to restart after installing a shared library in /Library or /usr/local/lib, provided you handle the case where some existing programs are using an older version. Unless you are using shared memory or IPC in your library, you often don’t need to do anything. If you are doing the latter, you just need to make sure that either (a) the two can co-exist happily, or (b) you get the user to terminate anything that might be using the old version.
  • In most cases, you don’t need to restart after installing a KEXT. Instead, consider using kextload(8) in your postinstall script. If you’re replacing an existing KEXT, just use kextunload(8) to unload it first.
  • You don’t need to restart after adding launch daemons or agents, or if you’re using the older startup items. For launch daemons and agents, just use launchctl(1) to load their plists and start them. For startup items, use SystemStarter(8).
  • You don’t need to restart after installing plug-ins. You might need to restart the program that the plug-ins are for, but please check rather than just assuming because some software may be able to cope with plug-ins being installed (and even removed) at runtime.
  • Remember that Mac OS X provides UNIX-like deletion semantics. That is, you can safely delete a file that is currently in use; anything that has the file open will continue to see the original data until the file is closed.

So please, when you’re building Installer packages, don’t unnecessarily force the user to restart his machine. In particular, if you are not sure whether you need to restart, please ask someone on one of Apple’s many mailing lists or ask Developer Technical Support for their advice.

Don’t just assume that you should restart, because that gives a very bad user experience for your customers; remember, if the user reinstalls their machine from scratch, they may have to install many pieces of software, and if every one of those asks to restart their machine, they are rapidly going to become irritated; even if restarting is optional, end users have no way to know if a restart is necessary.

iPhone Background Communication

Craig Hockenberry (via DF) makes a good point about allowing arbitrary background apps to use the iPhone’s radios.

It seems likely that he’s right about the future direction Apple will take with this. My own preference would be for a generalised events framework, maybe based on the existing notification support. If it supported launch-on-notification, there wouldn’t really be a need for background apps at all, it seems to me. Doing things this way would mean that it was possible to co-ordinate use of the device’s radios in a sensible way, and it would also allow applications to ask to have code run e.g. at a certain time in the future, without having to leave any of their own code running in the background.

MPs’ Expenses

It’s easy to get all het-up over MPs’ expense claims, but it is worth remembering that some of this is here so that it’s possible for anyone to be an MP, no matter how much money they have, which is a laudable aim.

There’s no doubt it is a privilege that has been abused; there have been reports of MPs buying second properties a few minutes away from where they already live, reports of them buying properties that are just as far from Parliament as their main residence, etcetera. Those should clearly be stopped and the people in question censured for behaving in that manner.

iPhone SDK Restrictions

(The iPhone SDK is still under NDA; even though it’s being widely ignored, I’m only going to respond to articles others have published.)

There are a number of commentators, notably Rogue Amoeba, complaining about some of the restrictions Apple has placed on third-party applications.

Of Rogue Amoeba’s list, I agree with one or two of them; it would be nice to be able to run background agents (not full applications), but I think this is the kind of functionality that perhaps should only be made available to people who pay a bit more up-front than the current $99 charge, to discourage any misuse; and access to the host computer and the docking port would be pretty useful too, though perhaps there are security concerns about host access too… I can’t claim to have thought deeply on the matter.

A lot of the others are just crazy. We really don’t want code running on the iPhone to have root access, or to provide access to the entire filesystem. Both of those restrictions are good security features and should discourage people from writing viruses and other malware for the device.

As for the calls from various parties to allow VoIP over the cellular network, it doesn’t actually matter whether Apple does or doesn’t, because no cellular carrier is going to allow them at the network level. I also have my doubts that the call quality would be acceptable, especially as GPRS and EDGE tend to have a substantial latency for IP datagram delivery and VoIP has no built-in support for handling cell hand-off (unlike GSM voice, which works seamlessly in such cases). Moreover, I don’t think it would be fair to expect mobile phone companies to allow people to use their expensive wireless networks for free to provide their customers with a competing service at an artificially low price.