This is as days pass by, by Stuart Langridge

Redaction of comments

I have a page wherein I ranted about Carphone Warehouse. It attracted lots and lots of comments, most of which were just randomly obscene for the sake of it. Eventually, Carphone Warehouse themselves contacted me and asked if I'd remove comments that they found offensive, and I said I would. They sent me the following missive:
I refer our discussion over the phone a week ago in regards to the webpage of your website www.kryogenix.org which is/was about The Carphone Warehouse (CPW). Please accept my apologies for the delay in replying. As discussed, we believe that numerous comments posted on this page are defamatory. These statements are not true and are not supported by any facts. The fact that they are posted by alleged CPW employees or former employees makes the matter even more dangerous, and readers of these statements may believe that they are a true reflection of CPW's workplace, and more importantly, CPW's work ethic. We noted for instance comments implying that if your face does not fit you cannot progress at CPW. Other statements implied that CPW was only driven by money with no concern for its customers or employees. These statements are intolerable and we would appreciate your willingness to withdraw them from the webpage. The webpage contains 246 comments, which are numerated. For convenience I will only refer to the numbers appearing in front of each statement. For clarity, the statement number one is the one that was posted on 25 February 2005 at 11.05am. Please remove the following statements: 7/ 18/ 10/ 15/ 17/ 20/ 21/ 23/ 25/ 26/ 35/ 36/ 37/ 41/ 107/ 121/ 130/ 134/ 151/ 153/ 156/ 157/ 158/ 163/ 165/ 170/ 177/ 178/ 179/ 183/ 184/ 188/ 198/ 209/ 213. Furthermore, we have also noted statements that were insulting and degrading. It is totally unacceptable that our employees' names are disclosed in the comments. We therefore, demand that you remove these statements as well: 13/ 18/ 28/ 29/ 31/ 38/ 120/ 161/ 162/ 166/ 185/ 186/ 187/ 217/ 219/ 222/ 232/ 235. As explained on the phone, we accept that people are entitled to express their views about CPW. However, there are limits to this freedom. Certain comments are extremely insulting and degrading and have caused shock amongst some of our employees. We would prefer to see the entire webpage closed. I am looking forward to hearing from you. Thank you for your help in this matter.
I've redacted practically all the comments on the page. On the one hand, there is the voice in my head telling me that I should fight the power and that this is an abrogation of free speech. On the other hand, I just don't care enough to be bothered about defending a group of people who are clearly just looking for a place to vent. A brief history: I closed off comments on the post some time back, after it got up to 250 comments. Someone emailed me and left a comment on another post asking me to open it back up so conversation there could continue, because it "was helping a lot of people". I took, and still take, the view that this site is mine, and I run it for my benefit; it's not here to provide people with a general discussion forum. There's other examples of that here too; I've closed off commenting on a post I made being amused about Schroedinger's Cat because it became a discussion forum for people whose cats had died, and on my how to be rich and famous post after it became a place for people to post their phone numbers looking for talent agents. So, I said that if the Carphone Warehouse employees set themselves up another place to talk about this, I would add a comment directing people to that new place, which seemed to me to be a reasonable compromise. They did so, and I did so. However, I just checked that forum, and it no longer exists. I believe that you should fight the power. This has been something of an ethical dilemma for me, primarily because, well, first they came for the people who complained about Carphone Warehouse and I did not speak out because I did not complain about Carphone Warehouse. I don't mind holding the torch and standing up for my beliefs. I think, though, that my desire to do ethical good ends where I'd be maintaining a fight on behalf of a bunch of people who are clearly not interested in doing it themselves (they created some other forum and let it lapse) and fighting for a position (whether CPW are a good firm internally) about which I have neither information nor interest. Have I caved in to the Man? Should I have done things differently? Answers in comments, because I have comments on all my posts until they prove to be a liability. Incidentally, my emailed response to them said:
I've removed most of the comments on that page, including all that you specified. I'm a little concerned, though: we seemed to have a reasonable conversation, in which you made a request to which I agreed, and now I receive an email containing phrases like "we therefore, demand that you remove these statements". Do you not feel that using heavy-handed legal terminology and making demands of people who have already agreed to help you will be counter-productive? It certainly made me consider going back on our agreement because you did not feel you could be gentlemanly about it.

Scripting Linux desktop applications

Hubert Figuere writes about scripting Linux desktop applications:
All the dirty work would be done within the scripting engine. It is the interface between the language and the IPC mechanism, and it implements the scripting protocol. The scripting interface will arbitrate, allowing to control several applications from one single script.
What he's describing there, broadly, is what the Windows Scripting Host does, I'd say. I don't think it should be JavaScript. Now, I'm a JavaScript guy, and I've written a book on it, so I like the language a lot. But it doesn't have any primitives for doing things like writing a file, which means you have to provide all that. It makes it awkward to write scripts in it on Windows, and it makes it awkward to write scripts in it in Mozilla, because essentially the fact that you're using JS is irrelevant; what you have to program to is the API you provide. The JavaScript gets lots of extra objects made available to it, and everyone has to learn about those objects, which is way harder than just learning JS itself. Writing a file using JavaScript and the Windows Scripting Host looks something like this:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var fp = fso.CreateTextFile(savefile);
fp.WriteLine("Blah blah blah");
fp.Close();
Writing a file using JavaScript inside Mozilla (which uses XPCOM) looks something like this:
var file = Components.classes["@mozilla.org/file/local;1"]
		.createInstance(Components.interfaces.nsILocalFile);
	file.initWithPath( savefile );
	if ( file.exists() == false ) {
		alert( "Creating file... " );
		file.create( Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 420 );
	}
	var outputStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
		.createInstance( Components.interfaces.nsIFileOutputStream );
	outputStream.init( file, 0x04 | 0x08 | 0x20, 420, 0 );
	var output = document.getElementById('blog').value;
	var result = outputStream.write( output, output.length );
	outputStream.close();
To be honest with you, I think that the AppleScript approach is a better one than the MS COM/Mozilla XPCOM approach. In COM, each app exports an API, and you talk to that API. In AppleScript you talk to the app as if you're a user of it. Personally, I'd like to see someone bash on Dogtail (http://people.redhat.com/zcerza/dogtail/) until it's a generic scripting thing. The advantage you get with using Dogtail, which goes through the X accessibility APIs, is that apps do not have to provide a programming API explicitly. Every application on Mac OS, as I understand it, is automateable through AppleScript. Most applications on Windows are not programmatically controllable. Microsoft apps normally are, but third-party apps aren't. If you have to provide a separate programming API for your app then (a) that's extra work for the hackers, and (b) that's extra documentation required. Even more so than just using an app, an app's programming interface is useless without documentation, and documentation is one thing that the open source community does not do well. Let's take Dogtail, or something like it, and make it do the work for us. If Dogtail can do most of the stuff we need, then adding JavaScript bindings for it would be pretty easy by comparison.

Distributed backups to friends

It ought to be possible to have a backup system with the following characteristics:
  1. You download a backup client and run it. It asks for a backup group name and a password. It is cross-platform, or at least ported to Linux, Mac OS X, and Windows. It also asks how much space you're prepared to devote to backups.
  2. You choose directories and files to back up by finding them in your file manager and tagging them as "For backup".
  3. That's then all the user interaction that there is.
The way the backup actually works is that:
  • It takes the stuff you want to back up, and creates a big backup file out of it, every night.
  • It breaks the file up into bits, using the PAR stuff from parchive.sourceforge.net. This means that to recover your backup, you need some but not all of the bits, so if some bits get lost it doesn't matter.
  • It then ships the bits out to other people in your backup group and stores it on their systems, not on yours, giving you off-site backups.
That would make it very easy for a group of people to do mutual backups without having to think very hard about it.

Implementation thoughts

You'd need a server somewhere, to store password details for backup groups and to co-ordinate shipping the data around (since everyone's likely to be behind a firewall). No-one should ever see or know about this server, though. There is no "sign-up procedure"; to create a new backup group, you just run the client and provide a backup group name and password. That's all. You don't have to sign up on the web or explicitly invite anyone into the group; anyone with the username and password can join. There's nothing in the above about how to restore from a backup, I know. That needs some kind of UI, but I'm not sure what that should be. It needs to warn you if there's not enough space out there on the group to back up all the stuff you're trying to back up. Some kind of algorithm which demands that if you want to back up N megabytes you have to offer 3N megabytes of space to the group or something. There should be some rsyncness in it. If not much has changed, it shouldn't need to send much out to the group. However, this might be complex, because the previous backup is in scattered bits, and you don't want to do incremental backups because then you need the full backup as well. Backups must be encrypted, because they're stored on someone else's machine. There will probably need to be some kind of UI to provide a passphrase or similar. This also makes rsyncness difficult. I think this would be a really useful project. The key point, the absolutely critical point, is that the client must be as described above: it just asks you which backup group you're in and that's all. No ten pages of options, no need for you to tell it who else is in the group or to maintain a list of who that is or where you want backups to go. If it's in any way difficult, it won't get used, and then no-one has backups. Wish I had time to write this. The big problem that needs solving is how to have the rsyncness in it, so that it only ships changes around rather than a full backup every night. Other than that, it's all doable, and not all that difficult.

S3 is onlinedrive

Amazon's new S3 online storage service is what I was talking about when I spoke of "online drives" a little while back, a place to store your data. There's a clone of S3 called Park Place, so the "run your own servers" part is now handled. What's missing is integration into applications. That's something that someone should get onto with the greatest of speed; take your favourite web app that creates things and build some integration so it can save data onto your own personal S3 space (whether S3 itself or your own Park Place at an arbitrary URL). Then submit your patch to the upstream people so they incorporate it, or release a GreaseMonkey script to do it in the interim.

Truncated text

A minor little web experiment: truncated text. Resize the window and it wraps the text in a div so that only the first line shows.

No more nakedness

And back to a styled website. I need to do a new style; this one's starting to bore me.

Naked day

Today I am naked and proud of it.

This website belongs to Stuart Langridge. Contact details are available. Don't eat yellow snow. Valid HTML5, at least in theory, except for the bits that aren't because I'm that futuristic that I'm ahead of the spec, oh yes. HTML5 help from Bruce Lawson, among others. Fonts from the superb FontSquirrel. End.