Phil Factor

Phil Factor (real name withheld to protect the guilty), aka Database Mole, has 40 years of experience with database-intensive applications. Despite having once been shouted at by a furious Bill Gates at an exhibition in the early 1980s, he has remained resolutely anonymous throughout his career. See also :

Follow Phil Factor via

04 May 2006
04 May 2006

The Pub Lunch and Programming.

“Werry good poer o’ suction, Sammy,” said Mr Weller the elder, looking into the pot, when his first-born had set it down half empty. “You’d ha’ made an uncommon fine oyster, Sammy, if you’d been born in that station o’ life,”Charles Dickens, The Pickwick Papers One of the great pleasures of programming in a team … Read more
20 April 2006
20 April 2006

Getting data to the browser

Slowly, all the necessary components are slotting into place to allow the developer to bypass the requirement to write traditional PC-based applications, or escape the tyranny of the all-encompassing n-tier distributed systems. AJAX (Asynchronous JavaScript and XML) seemed to appear out of nowhere around the start of 2005. XML is one of the few happy … Read more
13 April 2006
13 April 2006

Selling Oneself Short

A long time ago, I was transformed from resolute geek into a salesman. I’d written an application, commissioned by an international software publisher that subsequently disappeared in a spectacular way. It was an MSDOS program for managing serial communications for people who didn’t like computers much, but had to use them. It was good. Suddenly, … Read more
26 March 2006
26 March 2006

Avoiding the TSQL ‘Convert’ styles.

A recent blog was extolling the advantages of being able to use the CLR routines in SQL Server 2005 to do Microsoft-style date formats, instead of having the fuss and bother of remembering the CAST or CONVERT styles for the various representations of dates It is actually quite easy to do these date formats  in SQL … Read more
20 March 2006
20 March 2006

The Incident of ‘The Two Johns’ -an IT Manager confesses.

…in which Phil Factor takes advantage of the cloak of anonymity to confess to an embarassing mistake As an IT Manager, I used to love doing staff appraisals. These rituals come by different names in different companies, ‘performance reviews’, ‘annual reports’, ‘staff assessments’ and so on. There are periodic crazes for pinning a different name … Read more
01 March 2006
01 March 2006

Palindromic Transact SQL

Palindromes are words or phrases that read the same backwards and forwards. By the same token, Palindromic SQL executes just as well backwards and forwards A phrase such as … “Did I do, O God, did I as I said I’d do? Good, I did” “Marge lets Norah see Sharon’s telegram” “No, son, onanism’s a … Read more
23 February 2006
23 February 2006

I could do it in my sleep

Like many other programmers, I have adapted to a rather cat-like lifestyle of intense activity followed by relative languor. This coincides with the cyclic nature of the industry: Either there is too much work or too little. At the moment, there’s too much work, so I’m tending to work around twelve-hour days, often more. Of … Read more
09 February 2006
09 February 2006

Sir! My dog ate my database.

In asking various colleagues about the disasters or near disasters they have had with databases, I find to my astonishment that I am the only one who has ever, in a moment when my attention wandered, deleted a live database. It is odd, though, how products geared solely to mopping up from database disasters sell … Read more
13 January 2006
13 January 2006

A SQL Limerick

It wasn’t my idea at all. However someone set me the challenge of writing executable code that rhymed and scanned in the form of a limerick. Obviously, the easy trick is to just to write the limerick, assign it to a string and then do text substitution on that striing to convert it into SQL … Read more
04 January 2006
04 January 2006

Unreadable code

Producing unreadable Transact SQL is something of an art form. We all know that the best Transact SQL Style is to make everything elegant and obvious, with explanatory identifiers, liberal comments and deft formatting. It doesn’t always happen, for a number of reasons. One of the more subtle effects of acute caffein poisoning is to … Read more