Extend SQLite with Delphi functions

I have a couple of open source projects on the go, one of which is a simple Delphi wrapper for SQLite. Lukas Gebauer has now added experimental support for user defined functions. This lets you in effect extend the SQL understood by SQLite to include your own custom functions, written in Delphi.

To try out the feature, download the wrapper and have a look at the file sqlite3udf.pas.

Technorati tags: ,

ParallelFX: concurrency library for .NET

A few links:

Announcement of CTP on Somasegar’s blog

MSDN article on PLINQ

MSDN article on Task Parallel Library

Joe Duffy – concurrent programming blog

Interesting note in Duffy’s blog about PDC 07 (the one that never was):

Note: some might wonder why we released the articles before the CTP was actually online.  When we originally put the articles in the magazine’s pipeline, our intent was that they would in fact line up.  And both were meant to align with PDC’07.  But when PDC was canceled, we also delayed our CTP so that we had more time to make progress on things that would have otherwise been cut.

Concurrency is a big deal; it’s good to see more library support.

Technorati tags: , , ,

Zoho users logging into other accounts by accident

Zoho users beware. There appears to be a nasty bug whereby a user logs in with their own credentials, but finds themselves logged into another user’s account:

I have the last couple of weeks experienced that I get logged on into another account that I do not know!
I can see the other account documents. Just a few minutes ago I tried to use my own logon but was logged in to the account of <…>

says a user on the Zoho forums.

Zoho says it is fixing this urgently:

We have analyzed the logs and found some race conditions that could happen under high load. We have a fix in, and are continuing to monitor it very closely. We have also launched a complete review of security, so that this type of issue does not recur. We are taking it very seriously and apologize profusely.

Food for thought nonetheless. This is the kind of reason people cite for sticking with on-premise applications. I argue that data is often safer in the cloud, but this kind of incident makes you wonder.

Technorati tags: , ,

Zoho CEO on Flash vs Javascript

Zoho is an online office suite. I was interested in comments from Zoho’s Sridhar Vembu on why it is coded using Javascript rather than Flash. He gives five reasons:

  1. Web standards. “Flash, for all its advantages, sits in a separate space from the browser.”
  2. Open source libraries more widely available
  3. Vector graphics can be done in browsers (SVG, VML)
  4. Mobile support – “one word – iPhone”
  5. Smaller size = faster loading

Note that he is not rejecting Flash in all circumstances; he merely regards it as less suitable than Javascript for his company’s premier product and web application.

Convinced? It’s a fair case, though I suspect you could equally easily make a case for Flash, citing reasons like:

  1. No need to code around browser differences
  2. Faster code thanks to just-in-time compilation
  3. More consistent font rendering across different platforms and browsers
  4. Easier coding of complex effects and layouts

Sridhar’s most compelling point

One way of investigating further is to contrast the Flash-based Buzzword with Zoho Writer. They are very different. Zoho’s user interface is busy and cluttered by comparison, though it has some ambitious features which Buzzword lacks (Insert Layer, for example). Personally I prefer the cleaner UI. But is that really because of Flash vs Javascript, or simply the outcome of different design decisions? Zoho’s apps are like its website, too much stuff thrown at the user. I count 25 products advertised on its home page – fourteen apps, four utilities, one beta, four add-ons, two uncategorised (iZoho and Zoho in Facebook). Overwhelming.

Users don’t care about Flash vs Javascript; they care about usability and productivity.

Another twist is what happens when these apps introduce offline support. Zoho has already done so, using Google Gears, but I don’t much like the implementation. It is modal and intrusive. I want offline synch to happen seamlessly when I hit Save; it should only raise its own UI when there is a conflict. There is also the point that Adobe’s Kevin Lynch made at the Max conference last month (and no doubt elsewhere): it is counter-intuitive to open a browser, when offline, to access a web application. Adobe has AIR, and Mozilla is also working on solutions to this. But to my mind Flash has an advantage here. Think: AIR, web storage, local cache. Whoever gets this right will grab a lead in the online office wars.

Technorati tags: , , , , ,

Performance testing Vista: misleading reporting of inadequate tests.

Is Vista really half the speed of XP? That is what CNET reports here, in an article which does not bother to link to the source of the tests, as far as I can see.

The tests seem to be based mainly on scripting Office through OLE automation. This is certainly interesting, but it would be more helpful to have a performance breakdown, looking at various aspects of OS performance. Otherwise, how do we know whether this is more to do with, say, OLE performance than Vista performance?

Second, Vista has richer graphics than XP. Think of it like a game which offers difference graphics options to suit your hardware. Typically, you can set varying levels of background detail, shadow effects, etc, in order to find the right compromise between appearance and performance. Vista sets this higher than XP by default, so you would expect screen operations to be slower.

Third, Vista’s UAC security imposes a significant performance overhead. Again you would expect that, since it applies additional checks to numerous operations.

You could conduct a more useful test by configuring Vista to work as much as possible like XP. Turn off UAC, turn off Aero, turn off the indexer, turn off visual effects. I would also suggest checking what is running in the background and matching it as closely as possible on the two machines. I would be surprised if the performance difference is so striking after doing these things.

Perhaps you will argue that this is not the real-world experience. In practice, users take the machine as supplied and start using it; they do not open Control Panel and look at Performance Information and Tools, or get rid of all that third-party foistware. It’s a fair point, though on a corporate network admins can set these things on the user’s behalf.

When it comes to real-world performance, I also have gripes about Vista. However, I have little problem with Vista’s overall performance, say when working in Office, aside from Outlook 2007 which is a disgrace. What bugs me is unexpected delays. For example, I click the Start button, then All Programs, then scroll down to a program group and click. Vista just stops. I tried it just now, and it took 12 seconds to open the group I chose. I’ve had to train myself not to keep clicking. What’s going on there?

There are real issues here, but not helped by misleading reporting of inadequate tests.

Buzzword gets word count, easier sharing

Adobe’s online, Flash-based word processor has been revised and now includes word count, handy for journalists and essay writers:


It also has easier sharing: simply copy the URL at the top of the document you are editing to create a link. I intended to demo this here; but cannot because Buzzword does not yet support public sharing. You can only share with other specified Buzzword users identified by their email address. Buzzword says public sharing is “a feature that we’re actively investigating.”

Amusing: I noticed that my document had a number of flagged words, wiggly underlines that indicate likely spelling errors. Two of these unrecognized terms were “Google” and “Zoho”. “Buzzword” on the other hand is in the dictionary.

Technorati tags: , , , ,

Vista myths and reality

CNET’s inclusion of Vista on a list of top ten terrible tech products has drawn some attention. Here’s the blurb:

Its incompatibility with hardware, its obsessive requirement of human interaction to clear security dialogue box warnings and its abusive use of hated DRM, not to mention its general pointlessness as an upgrade, are just some examples of why this expensive operating system earns the final place in our terrible tech list.

Fair? Let’s have a look:

  • Incompatibility with hardware

Not fair. I don’t think Vista is worse in this respect than any other new operating system. I have used Vista from day one and my only outright failure is an aged Umax scanner – that’s across several desktops and laptops.

  • Obsessive requirement of human interaction to clear security dialogue box warnings

Not fair. This is about UAC, right? Which you can turn off if you want. But you won’t see these dialogues often – only if you install software, perform admin tasks, or run badly designed applications like, say, LG PC Suite (I’ve suffered from this one recently).

In all cases UAC is working as designed. After all, the purpose of UAC is not just immediate security, but to force app developers to design apps that do not undermine Windows security.

  • Abusive use of hated DRM

Not fair. I’ve not run into any DRM issues with Vista. Some claim that Vista performance problems are DRM-related but I’m sceptical.

  • General pointlessness as an upgrade

Now this is a tough one. What is the benefit of Vista? Then again, what can you do in XP that you cannot do in Windows 2000? It’s certainly open to argument; but I don’t agree. I prefer Vista; I regard it as more secure; and there are a number of small details that I like, which together add up to a better experience.

What Crave didn’t say

Despite the above, I do have some Vista gripes.

One is performance. The spinning bagel – I see it often. The Windows Explorer loading thermometer – you know, the green bar – what kind of nonsense is that?

Second, audio. This matters to me. And here’s a telling comment to my blog post:

I’m a pro audio user with thousands of dollars invested in MOTU audio interfaces and many years of recording experience. For most of us who use our computers to record, Vista has been a painful lesson. Often we need to run much smaller audio buffers to get lower latency than gamers or home theatre enthusiasts. This is something that was no problem on a well tuned XP machine. Unfortunately Vista has proved itself to be a very poor alternative. Even pro audio apps that register with MMCSS to guarantee CPU time to critical audio threads perform poorly. My feeling is that the move of most of the audio driver components from kernel mode to user mode is at the root of the issues we’re seeing. This move was made to reduce the likelihood that a bad audio driver could cause a BSOD. The trade-off however, has been much worse audio performance at low latency, regardless of how much money you spend on top-shelf audio interfaces.

Third, app compatibility. This is the crux of the matter. Microsoft designed Vista to make life difficult for apps that trample all over the Windows security model. To mitigate this it then has a bunch of stuff that tries to make life better for those apps, but which may cause further problems.

You can think of this as a battle for the future of Windows. If Vista wins, then the bad apps gradually get replaced by good apps, and in a few years the compatibility stuff will become irrelevant and life will be better for Windows users.

Alternatively, if the bad apps win, then users just revert to XP or turn off UAC so that the bad apps continue to work right. What is the way forward for Windows then? I do not know who will win this contest.

Finally, let’s acknowledge that Microsoft put a ton of energy into Vista that has not resulted in any immediate benefit to the user. One energy sink was the years wasted going down the wrong path prior to the notorious reset. The other energy sink is all this UAC and compatibility stuff which makes sense long-term, but not as a “wow! that’s better” experience. Possibly DRM is a third example.

Bottom line: Vista is not as bad as its detractors make out, but not as good as it should be. I know, I’ve said this before.

Technorati tags: , , , ,

Mobile data taking off at last

Excellent article from ARC on mobile data trends, mentioning that Vodafone has just reported a 50% jump in data traffic:

It is the culmination of attractive data pricing, improved usability and mobile demand for Web 2.0 services which is brewing to form the prefect data storm. As data pricing erodes along the same path travelled by voice, operators must now identify ways to tap into revenues from web services or else be left exposed when the data hurricane arrives.

Personally I don’t need convincing; I’ve been a heavy mobile data user for years; I can’t wait for the data price erosion mentioned. Now we are seeing great little apps from Google (Maps, GMail) and others, better mobile web browsers (iPhone etc) and faster data speeds, and the mass market is waking up to the potential for mobile Internet access. It is taking longer than anyone thought it would, but the trend is unmistakable.

Postscript: see Mobile Web- So Close Yet So Far for a more enigmatic view from Michael Fitzgerald at the New York Times:

For now, widespread use of the mobile Web remains both far off and inevitable.

Note that the piece criticizes the iPhone for not supporting Flash.

The dynamics of this are interesting. Flash is sufficiently entrenched that you can say iPhone is bad for not rendering Flash, not that Flash is bad because it does not work on an iPhone. 

Technorati tags: , , ,

.NET Framework for Symbian

Red Five Labs has announced its implementation of the .NET Compact Framework for Symbian, the operating system used (most of the time) by Nokia.

It is currently in beta, and implements only version 1.0 of the Compact Framework, but nevertheless it is an intriguing development.

With this, Mono, Moonlight, and Microsoft’s own implementation of Silverlight 1.1 for Mac OS, .NET is getting more interesting for cross-platform development.

CodeRage II: Windows only, login problems

I was surprised to learn that CodeGear’s online conference is apparently closed to Mac users, or anyone not on Windows:


That’s odd, since the company has Java and Ruby development products that run cross-platform.

Further, even Windows users have had problems logging in. The conferencing software CodeGear is using is limited to 1500 attendees per session, but thanks to a glitch sessions were reported full even when they were not. A message posted to the borland newgroup explains:

It turns out the problem was that only the first 1500 people who registered for CodeRage were successfully registered to attend all of the InterWise events because of a 1500 person limitation for iSeminar events. Unfortunately, this meant that 1500 attendance spots were reserved for those 1500 email addresses even though less than that we’re actually attending. Long story short, I’ve removed all IW registrations from individual events so anyone should be able to get in.  You shouldn’t see anymore “Exceeded max number of participants” error messages unless we really hit 1500 people for any given session.

I had problems myself – I am not sure if it was this limitation, or just the Interwise conferencing software which, like so much out there, appears to be uncomfortable with Windows Vista/UAC and presented a variety of error messages. I didn’t record all the details, but I was constantly being told I had cancelled the setup when I had done no such thing.

Hmmm, I seem to recall technical problems with previous Borland/CodeGear online events as well. Surely it’s time the company got these things right?

Technorati tags: , ,