Enabling AHCI on Vista

I’ve recently set up a server with Ubuntu, in the course of which I learned that Linux SATA RAID works best if you set the controller to AHCI in the BIOS. Typically this defaults to IDE.

More on Ubuntu later, but what if you dual boot with Windows Vista, or just want to enable AHCI on your Vista box?

Vista works fine with AHCI, and you will not run into problems with a new install. However, if you change this setting underneath an installed Vista, it will likely blue-screen on you. The trick is to edit the registry setting here:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci

Edit the Start key and change its value to 0. Then shut down, change the BIOS to AHCI, and reboot. All going well, Vista will detect the change, install new drivers, ask you to reboot once more, and it’s done.

Microsoft has a knowledgebase article on this, number 922976, though curiously it is not currently available in English. Perhaps that means there is some risk involved, or that Microsoft do not think you should fiddle with a working system. Consider yourself warned. However, the article is available in French, and Wikipedia suggests that English-speaking folk read it via Babelfish:

http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=fr_en&url=http%3A%2F%2Fsupport.microsoft.com%2Fkb%2F922976%2Ffr

This link enables me to confirm the benefits of AHCI:

AHCI provides several functionalities for peripherals SATA, in particular, the hot connection and the management of the food.

Technorati tags: , , , , ,

ThoughtWorks Mingle is released

ThoughtWorks has released Mingle, an agile software collaboration tool.

I spoke to Martin Fowler from ThoughtWorks about this and other topics earlier this month; I will be reporting in more detail on this shortly. As I understood it, Mingle was born out of frustration with other collaboration products that were found to be inflexible or lacking in usability. It is one of the first software products from ThoughtWorks, which in the past has focused on software development and consultancy.

Usability in this context is not a matter of “if you’re smart, you can figure out how to use it”. Rather, it is about minimising effort so that the balance tips in favour of people wanting to use it, rather than doing it because they have to. I do not know yet if Mingle achieves this, but I think this is the intention. See 10 reasons why Mingle.

Mingle optionally integrates with the Subversion source code repository. It is based on the concept of all-purpose items called cards, and also includes wiki pages.

Mingle is a commercial product, but free for small teams (up to 5 users) and not-for-profit organizations.

I’ll be installing later today, on a new Ubuntu server (which has given me a few RAID problems).

Technorati tags: , , ,

How big a problem is Click Fraud?

According to the latest Click Fraud Index, 15.8% of clicks on pay-per-click ads are fraudulent, rising to 25.6% if you look solely at content networks, such as Google Adsense.

This is a can of worms. Almost any question you can ask is hard to answer with confidence.

What is the real level of click fraud? Google’s Shuman Ghosemajumder says that estimates such as the Click Fraud Index are overstated. In addition, a proportion of the fraudulent clicks are detected by Google and not charged for. Which leads to another question –

How many fraudulent clicks are actually charged to advertisers? Google says very few – but they would. Intriguingly, it also apparently discounts content network ads on the grounds that there is more fraud there:

We know there is a more direct incentive for fraud on the content network and we do much more to protect advertisers, ban bad publishers, and improve ROI through SmartPricing discounts. As a result, average ROI on our content network is nearly the same as on Google.com. Yes, you read that right. ROI is the same on average – and not by accident, but because we automatically provide discounts to advertisers to make it so.

Is that not a tacit admission that advertisers are paying for some fraudulent clicks? It sounds like that to me – Google discounts all the clicks to compensate for for the fact that some are bogus.

How is click fraud detected? Some of this is obvious – rapidly-repeated clicks from the same IP number, for example, and clicks from known botnets. As I understand it, the Click Fraud Network goes further by attempting to analyze the activity after the click has landed. However, nobody is going to publish the exact algorithms they use, for fear of helping the fraudsters (and giving away secrets to competitors).

What about clicks from unknown botnets? What about click fraud programmed skillfully enough to replicate likely human behaviour? I’m sure the fraud detection is imperfect; the question is, how imperfect?

Probably the best way to figure this out would be to penetrate the criminal underworld that executes the fraudulent clicks and discover their techniques. Even this would not catch the casual fraud – for example, someone who goes into an Internet cafe from time to time and clicks on a few ads on their sites.

How can advertisers audit their bills? Difficult, because as I understand it the agencies (such as Google) do not supply enough detailed information. You would need the exact time and IP number of every billed click, which you could then match to your log records, analyze behaviour, and check out against known compromised IP numbers. There is a general lack of transparency.

About the only thing you can measure is results. In other words, attempt to correlate sales against ad expenditure. Google says the same – watch your ROI. The reason advertisers meekly accept a certain (unknown) level of fraud is because they feel it is worth it. After all, there is waste in every other form of advertising – TV viewers who skip ads, print ads that are never opened, etc. 

That’s all very well, but the main difference with click fraud is that it is not just waste, it is also fraud. How many people are getting prosecuted? Another question that I can’t answer, but I suspect, nowhere near enough.

UK Mix07 announced

Microsoft is holding a mini-Mix in London, September 11-12. It appears to be focused on Silverlight, Expression and Windows Live, and speakers include Scott Guthrie of ASP.NET fame (but now with wider responsibilities) and Danny Thorpe of Delphi fame (but now at Microsoft and working on Windows Live APIs).

Windows Vista and Office 2007 may have under-delivered, but this stuff is pretty interesting; worth a look if you can make it. Of course I’m particularly interested in the Day 2 session called “Sneek peeks”.

It’s a while after Mix in Vegas earlier this year, but Microsoft’s Daniel Moth says there will be new content.

Technorati tags: , , ,

LINQ: “Customers are massively confused”

I’ve just completed an article for Hardcopy magazine on database APIs – it’s for a forthcoming issue so the piece is not online yet. I interviewed Mark Troester, senior manager of product marketing at DataDirect, and he gave me some interesting comments on LINQ (Language Integrated Query), Microsoft’s new database extensions for the .NET Framework.

There’s a lot of confusion out there because there is LINQ to SQL and LINQ to the entity model, and the LINQ to SQL stuff that has just got released in beta is specific to SQL Server, so Microsoft needs to do some work in terms of getting things better organized. I think their argument would be that they need a lot of flexibility, but from what we see when we talk to customers, people are just massively confused.

As I continued my research I could see what he meant. What I think is the official home page has plenty of resources, but it’s a bit of a mess. If you click the link to the FAQ – actually a forum post – you find it dates from March 2006 and talks about DLINQ, which is now an obsolete term (I think). The project overview is pretty good, but gets you deep into Lambda Expressions and Extension Methods without mentioning important practical issues like the fact that LINQ to SQL seems to be exclusive to SQL Server. This unfortunate fact is confirmed by Microsoft here:

Q: It was mentioned that there is currently no LINQ to SQL support for Oracle or MySQL databases.  Will it be possible for developers to implement their own SqlProvider implementations for these database engines?
A: We don’t really have a provider model or provider writers’ SDK in this release (Orcas). So it is possible to build a LINQ provider similar to LINQ to SQL; but unfortunately, in this release, we won’t be able to offer much to make that as simple as we would like.

Of course you could still use LINQ to DataSet with Oracle or MySQL data … see why it gets confusing?

By contrast, I like Granville Barnett’s Introducing LINQ series (though not the pop-up ads), which takes a hands-on approach, as does Scott Guthrie’s LINQ to SQL series (the link is to part 5, but it references the other articles).

I also highly recommend Matt Warren’s blog post on The Origin of LINQ to SQL and the interesting comments.

LINQ looks compelling; I hope Microsoft manages to improve the clarity of its LINQ information soon.

PHP Zend Framework will go visual

I spoke to some of the guys at Zend on the launch of the Zend Framework, a class library for PHP. I wrote this up for The Register.

The Zend Framework is a non-visual library, but I asked whether it will handle visual controls in future. I was told that it will: Zend’s Zeev Suraski spoke about a forthcoming “Visual Component Model” along with “WYSIWYG tools” (though WYSIWYG is always a stretch with web applications).

Of course I was reminded of Delphi for PHP and its Visual Component Library. If Zend achieves its aim of making the Zend Framework something of a standard in the PHP community, that will be a blow for CodeGear’s product, unless somehow it could be re-worked to become a Zend Framework IDE. It seems to me that Zend’s framework has better chances than CodeGear’s. The documentation is incomparably better, and my early experiments suggest that the quality is good.

It is also interesting to see that the Zend Framework has built-in support for Google services.

Fixing an over-sleepy Toshiba Portege M400 running Vista

Long-term readers may recall my experiments with Vista on a Toshiba Portege M400 Tablet. Since then I’ve kept the drivers up to date as new versions appeared. The machine is stickered “Windows Vista Capable.”

It’s been OK though the annoying problem with the machine not waking from sleep persisted. Although this may sound a minor issue, it is really not good, as you can lose data. By default the laptop sleeps after a fairly short interval of non-use. I set it to hibernate instead, which works, but waking from hibernation is slower. The symptom of the sleep problem is that when you try to resume, the machine seems to start up but the screen stays blank. It’s a known issue on several Toshiba machines, and sometimes fixable by twisting the display, or toggling the display on and off, but I found that often did not work. On one occasion when trying to resume from sleep, the screen stayed dark but the CPU fan went into overdrive, making such a racket that heads turned at the conference where I was taking notes. Embarrassing.

Of course I wanted to fix the problem. Updating BIOS and drivers didn’t seem to make any difference, but I found this tech note on Toshiba’s US site, which refers to “Blank screen after waking from standby state” and says:

A firmware upgrade for a component on the computer’s main circuit board corrects this problem. This upgrade must be performed by a Toshiba Authorized Service Provider (ASP).

I called support but the UK folk denied all knowledge of the fix, and when I referred to the tech note, said that it probably would not apply to a UK machine (though I’m doubtful that there is much difference). To be fair, my local Toshiba service centre did offer to look at it, but I was busy and didn’t want to hand over the machine immediately.

Two other things happened which forced my hand. First, the FireWire port became unreliable. Second, someone knocked the machine off a coffee table, and when it fell on the carpet part of the base snapped off, leaving a jagged edge. Ouch.

I sent the machine away for a new base, adding that I would also like the FireWire and resume problems fixed under warranty. I paid for the base, of course, but Toshiba honoured the warranty on the FireWire problem, which fortunately I’d reported before the accidental damage.

No word about the resume issue, but the engineer decided that fixing the FireWire port required a new motherboard. Got the machine back, and guess what? No resume problem. So far, it wakes from sleep perfectly. I know this is nothing to do with drivers, because I removed the drive with Vista on it before sending the machine away, and refitted it on return with no changes.

I didn’t enjoy the damage to my expensive laptop, but it’s good to have it working properly with Vista.

Technorati tags: , ,

Family.Show – an excellent WPF demo app

Microsoft’s Tim Sneath drew my attention to Family.Show, which he describes as “our first end-to-end reference sample for WPF”. This genealogy application was made public three months ago, but I had not tried it before. Source code is available, and there is a white paper [XPS] about how it was developed.

The application feels a little unfinished, but nevertheless it is excellent. I started the application and without reading any documentation started entering my family details. I enjoyed the results and carried on longer than I had intended. It scales beautifully, both when you resize the main window, and when you use the zoom control. Another neat feature is the time slider, which lets you change the current year. As you go back in time, everyone’s age goes down and people not yet born fade into the background.

WFP applications are unlike what we know as Windows applications. This is partly because they don’t use standard Windows controls, and partly because WPF encourages a different approach. It is more like a Flash application, and requires design skills to build.

The paper is also a good read. Family.Show apparently uses XML Serialization to persist its genealogy files. I’m not sure this is wise, though I’m open to being convinced. I’d be inclined to use an old-fashioned relational database, which I suspect would perform better with large files. Another problem with XML Serialization is that it can be brittle when you want to revise the objects.

I am always interested in performance, and a tip from the paper is worth highlighting. This is the huge benefit of virtualizing the ListView control, which means it doesn’t bother instantiating elements that are not visible. The team found sorting 32 times faster, filtering 70 times faster, and memory use 75% less when using a virtual list.

An interactive cookery book for your kitchen computer

You don’t have a kitchen computer? Me neither, but it seems inevitable that someone will figure out how to do this nicely and in a way that will work for a mass market. This is one proposal, using Windows Media Center. I like the concept, but this looks too expensive for most of us.

Years ago I worked in book publishing, and had vague plans for an electronic cookery book. I liked the idea of a book that could answer the question: “What can I cook with the ingredients I have to hand?” An interactive cookery book is better still. User comments and recommendations, corrections (apparently a large number of printed recipes actually have errors and don’t work if you try to follow them), greater variety, filter by requirements such as “vegetarian” or “low-calorie”, etc.

Still, I suppose the question is: why bother with a Media Center PC and a special application, when you can just use Google, print out your recipe, get it as grubby as you like while preparing your gourmet masterpiece and then chuck it away at the end? The recipe, that is 🙂

Technorati tags: ,

Simple RAD tools from industry giants fly below the radar

Oracle and IBM are not normally names you associate with simple, highly productive software development tools. Arguably, it is the over-complexity of J2EE that left the door open for Microsoft .NET as well as nimbler open-source options like PHP and Ruby on Rails. Still, let me mention two tools that demonstrate how even these giants are devoting attention to productivity. IBM’s Project Zero is the first:

The Project Zero environment includes a scripting runtime for Groovy and PHP with application programming interfaces optimized for producing REST-style services, integration mash-ups and rich Web interfaces.

Groovy is a dynamic language for the Java Virtual Machine, and an interesting option for agile development on the Java platform, though it is perhaps getting overshadowed by JRuby.

And what about Oracle Application Express (or APEX)? This seems to be a well-kept secret at Oracle, though its users love it. Once known as HTML DB, it lets you write applications declaratively. A snag is that you have to know PL/SQL if you want to extend it with custom components. That said, APEX has a couple of big advantages. One is that it is a web services client, so you can integrate it with other web applications. Second, it is ideal for hosted development:

Oracle Application Express enables a single database to host large numbers of users.  Users work in a dedicated work area called a workspace.  This flexible architecture enables a single database instance to manage thousands of applications.

It all sounds strangely similar to what Salesforce.com is doing. Salesforce.com also calls its platform APEX, runs on Oracle, and was founded by former Oracle executive Mark Benioff.

A difference is that Salesforce.com says its APEX platform is the future of web development and will host your application for you, while Oracle markets Application Express as an alternative to Microsoft Access for small departments.

IBM is equally reticent about Project Zero. I couldn’t find it mentioned on the developerWorks site.

It is much easier for startups to promote new models of software development.