Archive for the ‘Development’ Category

How to run VBScript from non-.VBS files

17 April 2007

If your network administrator has prevented you from downloading or running .VBS files, you can get round this restriction by storing your VBScript in files of a different type: for example, .TXT.

(more…)

Amazon S3 and Cardbox

11 July 2006

The project to add Amazon S3 facilities to Cardbox has been completed. (If you’re not familiar with Cardbox then you can read about it here and get a free 1-month trial licence here).

Amazon S3 is storage for the Internet. Secure, reliable and cheap, it can be used to store any amount of data, at any time, and retrieve it from anywhere on the web. There is no sign-up fee and you pay only for the storage you actually use.

In the new build of Cardbox that is released today, we have incorporated the following features to make use of S3:

The Cardbox Server (used in multi-user and networking systems) can be configured to back up your databases automatically, at specified intervals, to your S3 storage space. There is no interruption in service during a backup, because the Cardbox Server can back up a database even if it is in use. You can have a single backup copy of the latest version of each database, or you can have a separate backup made each time that the database has changed.

Cardbox itself has a new command that lets you view your S3 storage space and upload, download or delete files. Apart from managing the Cardbox Server’s backups, this also allows you to make backups of files on your own computer.

Cardbox’s VBScript macro system has been expanded to allow you to manage your S3 storage space programmatically. This offers interesting prospects for the future: for instance, a photographic database that stores and displays each photograph at a reasonable screen resolution while the original full-resolution images are held in an archive on S3.

Amazon S3 and Cardbox

13 June 2006

Amazon S3 is storage for the Internet. Secure, reliable and cheap, it can be used to store any amount of data, at any time, and retrieve it from anywhere on the web. There is no sign-up fee and you pay only for the storage you actually use.

This posting describes how we are enhancing Cardbox to take advantage of the facilities that Amazon S3 offers.

If you don’t already know Cardbox, it’s a fast, straightforward database designed for end users. Anything you can list, Cardbox can store. Its particular strengths are powerful text indexing and the ability to attach photographs and scanned documents to every record. Cardbox is used by everyone from individuals and small businesses to multinationals and United Nations agencies, and there are Cardbox users on every continent including Antarctica. The Cardbox web site tells you more.

(more…)

Keeping databases consistent

9 May 2006

We've been experimenting with using Amazon Web Services to extract book data from Amazon's database and import them into Cardbox. It all fits into a nice little macro and we'll publish the macro in the Knowledge Base in due course. You will be able to type in an ISBN and the macro will fill in all the book details for you. If you have a barcode scanner then you won't even need to type.
In the course of creating the macro we noticed that there was no way for us to get hold of the synopsis that appears on Amazon's book pages. Further investigation showed that the synopsis was available if we looked at amazon.com but not if we looked at amazon.co.uk. A thread on the relevant Amazon forum says, essentially, "this behavior is by design" (to use a favourite phrase of Microsoft's).

We thought we'd investigate further. Here are the details of a book published in the UK, as shown in amazon.co.uk and amazon.com.

amazon.co.uk amazon.com
ISBN 1852851880
Author Halik Kochanski
Title Sir Garnet Wolseley: Victorian Hero
Publisher Hambledon Continuum Hambledon & London
Date 1 July 1999 April 2001
Pages 351 204
Subjects 1833-1913, Biography, Biography & Autobiography, Biography/Autobiography, Biography: historical, General, Generals, Great Britain, Great Britain – History – 19th Century, Historical – General, History, History – General History, Ireland, Military, Military History (General), United Kingdom, Great Britain, Victoria, 1837-1901, Viscount,, Warfare & Defence, Wolseley, Garnet, Wolseley, Garnet Wolseley, 1833-1913, Biography, Biography & Autobiography, Biography/Autobiography, General, Generals, Great Britain, Great Britain – History – 19th Century, Historical – General, History, History – General History, Military, Military History (General), Victoria, 1837-1901, Viscount,, Wolseley, Garnet Wolseley,, Biography & Autobiography / Historical, Wolseley, Garnet Wolseley
Description
(amazon.com only)
"Before leaving England he placed his finger on a map of Egypt at the point now known to fame as Tel-El-Kebir, and said 'That is where I shall beat Arabi'".No Victorian was a greater hero for a longer period than Sir Garnet Wolseley (1833-1913). The leading British general of the second half of the nineteenth century, he personally took part in a significantly influenced every campaign between the Crimea and the Boer War. To Disraeli he was ‘Our Only General’, while to many soldiers and to the public at large he epitomised the virtues they most admired: exceptional personal bravery and an unshakeable belief in the virtues of the British Empire. The phrase ‘All Sir Garnet’ was a guarantee that everything was under control. Seen from another angle, Wolseley’s career reflects a number of weaknesses. To control a global empire Britain had a powerful navy but only a small army. Its ability to deploy a force of limited size throughout the world, almost always against untrained and underequipped native armies, gave the dangerous and ultimately disastrous illusion that Britain was as formidable by land as it was by sea.

Remember, this is the physically identical book. And yet there are significant differences between the entries. Even the number of pages is different!

This is a lesson for anyone planning a system round a database. Never imagine that you can keep the same data in two places. The data will diverge with time. Someone will change one copy and not the other; and then someone else will change the other copy too. After that, it is too late. No-one at Amazon is going to go through hundreds of thousands of inconsistent records, comparing them, checking with the publisher which one is correct, deciding which data to keep. It is simply too expensive. The cost of reuniting disparate data exceeds the cost of entering the data in the first place.

Sometimes organisations with several offices optimistically think that they can keep their Cardbox databases synchronized between sites simply by regularly emailing changes to each other. We know from experience that this always fails in the end, when someone forgets to apply an update, or someone edits something he's not meant to edit. Unless you one site is the "owner" of the data and no-one else is allowed to make any changes at all, the only safe solution is connecting to a Cardbox Server somewhere on the Internet. The Cardbox protocol is efficient, we tell them, and even a dial-up line will work…

Now we can show them that this is not just sales talk. No-one can accuse Amazon of being amateurs but, as this example shows, the hazards of split data afflict even the largest organisations and the damage can be effectively irreparable.

Metał English

24 April 2006

We're embarking on creating a "polyglot" Cardbox. The idea is that you right-click on the Cardbox title bar and get a list of available languages: pick one, and that's the language Cardbox will speak to you in from now on.

We're taking a collaborative route on this. Our idea is that a Latvian-speaking Cardbox user can get a message file from us (it's a big Word document) and fill in a blank column with his translations. He saves his work as a simple text file called cbxm0026.txt and gives it to us. We distribute it free… and suddenly it is possible for any Cardbox user to switch the user interface into Latvian.

There's a łot of cłeverness ïnsïde Cardbox that's needed to make thïs połygłot user ïnterface work, so we need to test ït ałł. How to test ït before any actuał transłatïons exïst?

Look closely at the question and you'll see the answer. Putting double dots on "i"s and slashes through "l"s is readable (as long as your browser can display eastern European characters) and it's a very easy translation to create: just do a couple of search-and-replace commands and you're there.

Of course, we had to call this new dialect of English something. In the end, remembering Mötörhead and Motley Crüe, the name was obvious. If you are a translator working on Cardbox and you right-click on the title bar, you get at least three options: English, English (United States), and English (Metal).

How to improve OpenOffice’s blood supply

9 December 2005

Writing in The Guardian, Andrew Brown wonders why OpenOffice, one of the flagships of the “replace Microsoft with open source” movement, is so bad. It is a question well worth asking, since in most discussions of open source software it is tacitly assumed that we are talking about nothing but a clash of business models and that the software that is on offer from both sides is essentially of equal quality – since if you have enough programmers then they’re bound to produce a product that works, aren’t they?

(more…)

Escape from Windows

5 December 2005

We make our living from a program that runs on Windows. It is my dearest wish to see Cardbox running on something else. Why? – and how can it be achieved?

I am not actuated by great objections to the Evil Empire’s business methods (doubtless this is a moral defect in me) but Windows is crumbling under its own weight. Every time something is wrong, or over-complex, or incomprehensible in Windows, Microsoft add another layer of complexity to cover it up. For example, Windows has a way of requiring rebooting after almost any software update, however trivial it is. We are told that Windows Vista will contain additional programming to avoid this. I have seen this happen before and it is like finding a piece of rotten wood in your house and covering it up with waterproof paint. The rot doesn’t go away but you can’t see what it’s doing any more. The remedy for complexity is to paint more complexity on top… and when Windows finally collapses we don’t want to be buried in the rubble.

This is why the news that Apple is moving to Intel processors is so interesting to us. Most of the press coverage has been to do with the cost and performance implications of the move but the technical point is the really exciting one. It is already possible to run a limited set of Windows programs on Linux, in a limited way, using a software layer called WINE (I’m told that Cardbox 2.0 works under WINE but I don’t know about version 3.0). Now suppose that Apple puts its resources behind its own CIDER project:

  1. Bronze Apple: Get as many Windows programs as you can to run on the Macintosh “out of the box” with no changes. When problems occur, cooperate with the manufacturers to find a way round them that doesn’t harm Windows compatibility. The programs will look more Windows-ish than Mac-ish but at least they’ll work, and a barrier that stops millions of users from even considering the Macintosh will be gone.
  2. Silver Apple: Now that software developers know that there’s a worthwhile market there, put resources into a hand-holding project that will help them produce Mac-aware versions of their programs. No revolutionary rewriting from the ground up, just adaptation to the Mac way of doing things so that a Macintosh user doesn’t have to make allowances for an alien program’s origins.
  3. Golden Apple: Encourage selected developers to go the whole hog and produce dedicated Macintosh versions of their software. The move to Intel makes the move easier technically, and the Silver Apple level will let the developers gauge the market and plan their investments accordingly.

Result: insurance against a possible collapse of Windows, the removal of an artificial market barrier, and, once more and more programs stop being dependent on Windows, a big opportunity for Linux as well.

And what about Linux? The Cardbox Server already runs on both Windows and Linux, but there are three problems with moving Cardbox to Linux as well: no-one uses Linux on the desktop; we can’t write programs for the Linux user interface because there is no one such thing; and no-one wants to pay for Linux software anyway.

The 0th rule of bug assessment

2 December 2005

Larry Osterman’s WebLog at Microsoft refers to an article by Eric Sink called My Life as a Code Economist. Sink’s thesis (endorsed by Osterman) is that it’s not always worth correcting bugs, because it may be cheaper or safer to leave them uncorrected.

Sink constructs a beautiful matrix of characteristics that determine whether you should try to correct a bug.

  1. Severity – When this bug happens, how bad is the impact?
  2. Frequency – How often does this bug happen?
  3. Cost – How much effort would be required to fix this bug?
  4. Risk – What is the risk of fixing this bug?

In good business school style, you plot each bug on a four-dimensional chart and use the chart to determine which bugs you should correct and which you shouldn’t.

But the most important question of all is missing:

Question 0. Do you know exactly what is causing the bug, and how?

If the answer is No, do not rest until the answer is Yes.

(more…)