Monthly Archives: September, 2005

Quickipedia

Tom Coates gave a talk earlier this morning and mentioned that he didn’t have an entry on Wikipedia. By lunchtime, someone in the room had created one for him.

Tom’s from the BBC, is a very nice guy, and has a good blog here, by the way.

VoodooPad

This is just another plug for VoodooPad, one of the Mac apps that has a permanent place in my Dock.

I mentioned it a while ago as a general note-taking utility; I find I haven’t used it very much for that, but there is one situation where it works very well for me; taking notes in conferences. Creating lots of short pages, one for each talk, very easily, finding pictures of the speakers on the net or taking them on a camera as I go along and just dragging them onto the pages, typing in URLs that are mentioned and having them automatically become links. Having just enough text formatting for the task, and so forth – it’s great.

And best of all, it has a Spotlight adaptor which means that I can find any page in any of the documents using Spotlight. This size of page is a good granularity for search results, I find, and yet because I write notes for a whole conference in one file, I don’t need to create lots of little files and think of lots of filenames.

Our Social World

I’m at Our Social World, an interesting conference about blogging and other forms of social networking which also is conveniently within cycling distance of my home.

We were all encouraged to bring laptops and we’re all, of course, being very ‘social’ – IMing each other, posting entries like this, and so forth. It’s bizarre to see posts popping up in my RSS feeds from people just the other side of the room. It’s fun, if you’re at a conference, to type its name in quotes into Technorati. The challenge here is to get the balance between being electronically social and just chatting to the person next to you.

iPod Nano


Like the small size of the iPod shuffle but wish it had a display? Today, Apple announced the iPod Nano, and the Mini has quietly vanished from the Apple site.

Oh, and there’s a Motorola phone with iPod functionality, but we’ve known about that for so long that it would be pretty unexciting even if you could get it from anybody other than Cingular.

It is the only phone I’ve seen with stereo speakers, though!


Definition

from my brother Simon:

Riders of Rohan

A wild and noble people who ride their steeds with pride across the plain, defending their realm against the evil of the two towers, dressed in stylish, light-weight, quick-dry travel wear.

Those not from the UK may be confused : click here

How BitTorrent works

I knew the fundamental idea behind BitTorrent, the file-distribution system – that after some initial seeding every BitTorrent client provides uploads as well as downloads and so you can distribute much more data more quickly without ridiculously heavy loads on one server.

But I’ve just been reading Bram Cohen’s paper and so have a bit more of a grasp of the behind-the-scenes operation, which is really quite clever. Here’s a very simplistic overview:

Files are distributed by creating a .torrent file and putting it on a web server. The .torrent file includes information about the file, its name, length, checksums and so on, and also the URL of a tracker. This is a very simple server which knows abut the machines currently downloading the file (henceforth known as peers). When your client starts downloading a file, it connects to the tracker, gets added to the list, and receives back a random selection of other peers also downloading the file. It can then go off and talk to those peers.

Files are downloaded in pieces, each typically a quarter of a megabyte in size. Your client connects to several peers and finds out from them which pieces of the file they each currently have. It can then start downloading different pieces from different peers; it doesn’t have to get the pieces of the file in order. Whenever you have a complete piece, it’s added to the list of pieces you can make available to others. Often the traffic will be two-way: you’ll be downloading one piece from a peer while uploading a different piece to them.

The overall amount of data downloaded across the system must equal the overall data uploaded – every download has to come from somewhere! So, as a very rough approximation, you can download data as fast as you make it available for upload. This isn’t quite the case, because people often leave their clients running for some time after the download has finished, either because they’re good citizens or because they’re off having a cup of coffee. Others can therefore get more download capacity. Also at particular times, you’ll see the speed of your downloads or uploads fluctuate for a few minutes, though it roughly balances out over time.

A disadvantage of the system as a whole is that if, like many of us, you have a much faster downstream connection than upstream, your bittorrent download is likely to happen at something closer to your slower upstream speed. The advantage, though, is that if the file you’re downloading is at all popular, you’re likely to get it in a much more reliable way than a regular web download, you won’t be limited by the capacity of the originator’s server link, and they won’t end up paying a fortune in bandwidth charges.

There are lots of clever bits which I haven’t touched on here. For example, if you’re connected to several peers, how does your client decide which piece of the file to download next? Answer: it normally downloads the rarest one, the one which fewest of the others have, thus helping to redress the balance. Cute, eh? There’s also stuff related to starting up, to finishing, to finding new peers etc, but for more details have a look at the paper linked to above. All in all, a very nice system.

Specifications

I’m reading a book edited by Joel Spolsky and came across this nice footnote:

This reminds me of my rule: if you can’t understand the spec for a new technology, don’t worry; nobody else will understand it either, and the technology won’t be important.

Mac OS X and Subversion

Non-geeks can skip all of this!

Subversion is a very nice version-control system which fixes many of the problems with its predecessor, CVS. You can use, for example Martin Ott’s packages to get an up-to-date copy for your Mac. There’s some support for it in XCode, and in general it works very nicely on the Mac as long as you don’t mind using the command line. I haven’t found a Mac GUI for it yet that I like; the best is SvnX and frankly, that’s not saying much, though I applaud Dominique Peretti for doing something.

Anyway, there is one thorny issue on the Mac. Many things which appear to be files in the Finder are in fact directories – ‘bundles’, they’re officially called. In the past, they were mostly just used for applications, but an increasing number of document formats are now bundles as well. Apple’s Pages and Keynote packages are examples.

When you check a directory tree out of Subversion onto your local disk, a hidden ‘.svn’ directory is created in each directory in the hierarchy. That’s where subversion keeps its stuff. Having this in a document bundle does not upset an application; they normally just ignore it. But some apps assume (reasonably) that they’re the only ones interacting with the bundle. If you open a document in Pages, change something and then save the doc, it will overwrite the directory with a new one and in the process delete and .svn directories within it, which will confuse Subversion if you then try to check it back in. The latest version of Keynote doesn’t do this; it reuses its old directory, but it’s unusual in that respect – most things which create bundles will cause a problem if that bundle is managed using Subversion.

There are manual fixes for this (see ‘Things to watch out for’ at the bottom of this page, for example), but it’s very inconvenient if you do this often. Especially if your bundle includes multiple subdirectories because you’ll need to do it for each one.

Probably the right way to fix this is for Subversion to be able to view certain directories as untouchable, and store the information about them within the .svn directory of the parent. An alternative would be to tar and un-tar all such directories behind the scenes and check them in and out of the repository as if they were a single file. I discovered a thread from about three years ago discussing this, but I don’t think anything was done.

I’m really hoping that Apple, having made a major step forward in file systems by making them searchable, will be the first to introduce decent version control at a fundamental level. Well, the first since VMS, anyway.

Interesting patents – the Munch Box

munch box

Here’s one I came across by accident. In 1979, Susan E Brownlow patented a small ‘cool box’ in the shape and size of a cigarette packet. There’s a removable section at the bottom which you can put in the freezer, and the box is insulated so that you can carry it in your pocket and the contents are kept cool.

The motivation? People giving up smoking need something to chew on which doesn’t include too many calories. Carrot sticks are apparently good. But how do you carry carrot sticks around with you all day and keep them fresh and crunchy?

Florida madness comes to the UK

Oh dear. Someone in the UK has been prosecuted for using an open wifi connection. Three questions occur to me here:

  • If you connect to someone’s network by accident, like my aunt, are you liable for prosecution?
  • In any incident, does the owner of the network have to press charges?
  • Is there a way to say ‘I believe in sharing my resources and any passer-by is welcome to use this network?’ We should establish a convention, perhaps like including ‘open’ in the network name.

© Copyright Quentin Stafford-Fraser