Sorcerer's Apprentices

by Matt 29. March 2007 17:46

I think I'm turning into a Kim Cameron fanboy. My last post was in response to one of his and I've sent everyone at work links to his identity delegation posts (this "transducer" post is just brilliant).

And here I am quoting him again. This comes from his original comments on British schools fingerprinting their children, but it's a great analogy that fits many situations.

This is one of those cases where ignorance breeds Sorcerer’s Apprentices who act without the slightest knowledge that there will be consequences to what they do.

Something just made me want to cut out and keep this.


Privacy and security. My information, not yours.

by Matt 28. March 2007 18:35

I think it's because I work in a bank more than any kind of OCD type reason, but lately, I've been getting more and more paranoid about privacy and security, and more and more concerned about the evident lack of respect by companies and governments to an individuals rights in this regard.

Example: I wanted to find the phone number for my local garage, so looked up the number for Audi in the Yellow Pages. My garage wasn't listed, but a national help line was. They provided me with the number I was after and then asked me for my name and postcode. Totally inappropriate. Personal, private data that has nothing to do with the matter in hand is being collected. I refused, but I'd bet that most people would just answer without thinking about it.

This is a minor example of the misuse of identity, so you can imagine how upset I am following this post by Kim Cameron; British schools are finger printing children, without the consent of their parents. This is just wrong. It's a complete invasion of privacy, and (speaking as a relatively new and definitely protective dad) I'd be outraged if my daughter were finger printed at school without my consent (not that I'd give it).

Kim sums it up nicely: "this one goes beyond silly to abusive".

Go read the post. It's an extraordinary thing. The follow up post is slightly less emotional and shows how this act manages to break four of the Laws of Identity in one go. That's no mean feat. It also shows how the government was giving tips on fingerprinting children. "Make sure children are calm". Creepy.


Great Virtual PC keyboard shortcut

by Matt 27. March 2007 16:51

Just found this, and had to share. In Virtual PC, when you hit alt + tab, you get the alt-tab window of the guest OS (unsurprisingly). This is a bit of a pain when you alt-tab to a VPC by mistake and then want to alt-tab back to whatever you were doing on your host.

When you're in a VPC, hit ctrl + alt + tab to bring up the host's alt-tab window. Marvellous.


Yet another desktop manager. In 3-flippin-D!

by Matt 25. March 2007 17:06

Blimey. Here's an impressive virtual desktop manager. Proper 3D rotating cube and everything.

Windows just hasn't gotten the hang of virtual destkops. Technically, it's been in NT forever, but it's just never really caught on. It's a given in Unix-world, but not in Windows. This might be the one to convert to me.



More reasons to move to WDS 3

by Matt 16. March 2007 19:12

Yeah, Microsoft have released the SDK for WDS3.x. They're just trying to make me move away from 2.x.

(Recap: 2.x runs as a program in your logged in context. Your RSS feeds are available from COM objects in your context. 3.x runs as a service. Not in your context. Ah. No RSS feeds for you, Mr Index.)

And they've just thoroughly updated the 3.x docs on MSDN too. Including the secret sauce for indexing stuff that's only available in the user's logged in context...

As if that's not enough to tempt you away from 2.x, they've removed the finally blocker by releasing WDS 3.01 - group policy support has now been re-implemented (it's in 2.x, but didn't make the cut for 3.0). Because you enterprise types are really just dying to upgrade, aren't you?

Of course, this doesn't scare me. I've got my VPC. I don't need no steenking secret sauce. I'm sticking with 2.x.

(Simply because I know it's going to be able to get at the rss feeds, while 3.x might still go wrong.)

But the upgrade will be sooner rather than later...


Windows Desktop Search

0.0.1 better than 2.6.5

by Matt 14. March 2007 18:48

At the end of November, Microsoft updated Windows Desktop Search from 2.6.5 to 2.6.6. Now, eagle eyed readers might remember that there was a bug in 2.6.5 - after registering your protocol handler, WDS doesn't automatically start indexing. According to the post in the MSDN forums, this was going to get fixed in 2.6.6.

Add to that the fact that I had a sneaky feeling registration wasn't working right (and because I had to do a lot of VPC messing about anyway) I thought I'd have a closer look.

The MSDN docs for registration don't mention the search manager object, and list a load of registry keys to do it all manually. Registry Monitor to the rescue, and it looks like neither 2.6.5 nor 2.6.6 write the protocol handler details to HKLM when using the search manager. This means you'll need to install your protocol handler for each user on the system.

Of course, that's not very useful seeing as WDS doesn't look at the HKLM key document. It does look at HKLM\Software\Microsoft\Search\ProtocolHandlers (note Search instead of RSSearch) but the format is different. I think this is a Sharepoint registry key, so I'd be reluctant to use if WDS (mainly because we not writing a plugin for Sharepoint, but for WDS). Interestingly, once it is written under HKCU, WDS will also search for it explicitly in that Sharepoint key above.

And to make things a bit more confusing, the HasRequirements and HasStartPage values documented on that MSDN page don't appear to be read, either.

So, let's look at that other bug. On a clean 2.6.5 system, if I register the protocol handler, it gets queried for ISearchProtocol, and Init is called, and that's it. It's only after I restart WDS or choose to rebuild the index does ISearchProtocol::GetDefaultCrawlScope get called, and I can set the default root URL. Some time after that, ISearchProtocol is queried, as is IUrlAccessor, and everything looks good.

Under 2.6.6, there's not much difference. The useless call to ISearchProtocol before having set up the default URL doesn't happen. Other than that, it's all exactly the same - I only get to set the default URL after restarting the program or rebuilding the index.

So, I'm sure that we can really say that the bug is fixed.

And seeing that the registry doesn't seem to work as expected, I'll be glad to move up to version 3.


Windows Desktop Search

Managed snobbery

by Matt 13. March 2007 17:17

Scott Hanselman has been accused of being a managed snob. Surprisingly for Mr Hanselman, he seems to revel in it:

If being a Managed Code Snob is wrong, I don't wanna be right.

I say "surprisingly" because I wouldn't expect Scott to fall into the "if all you've got is a hammer, everything looks like a nail" mentality.

Now, I'm being slightly oblique here, because Scott's really responding to FUD-like comments on poor performance. But I think it's important to remember that being a managed snob when it comes to addins has consequences. By implementing an addin as managed code when it doesn't explicitly support a managed API, you're changing the shape of the application. You're forcing that application to take a dependency on .net.

And if the user has explicit knowledge of this, knows and accepts the consequences, then more power to your elbow. But that's not for the developer to decide.

Here's a great example of how a COM object was implemented in .net and used in an application that didn't natively support .net, and how it caused serious problems and several days of frustration. Yes, that's another link to Scott's blog; let's just pause to appreciate the irony. How much did the .net productivity and maintainability help here?

Not everything's a nail. Pick the right tool for the job.

And for future reference - and because anyone who knows me knows I can't leave stuff like this alone - performance of .net is very impressive, but I've not yet seen a .net desktop app that starts up as quickly or is as responsive as a native app. And maintainability alone is never a good reason to write in .net. You can write bad code in any language. Maintainability comes from well structured code and lots of tests.


It never rains...

by Matt 10. March 2007 18:49

And of course, just to demonstrate that the universe actually does understand irony (*), Microsoft have just released the SDK for WDS 3.x.

Some very interesting things here. The usual suspects for querying (OleDB and, even a handy command line app.

The indexing section includes an example implementation of IFilter, and a rather useful ATL style C++ class called IFilterImpl to take a lot of work from you.

There's also a really impressive registry shell namespace extension which includes a protocol handler. Yep, with this example, you can search the registry from the Start menu. I think the nice thing about this sample is the way it's so integrated. The shell stuff leans on the new Vista property store and the protocol handler indexes the shell folder, rather than the registry itself.

(And I rather think there's a little secret in that example too. One that will come in very handy when I'm ready to migrate from the user mode 2.x to the service-based 3.x...)

I think I'm going to get a lot of use out of a couple of the samples in the management section too. One seems able to query and set what urls are included or excluded or set as roots. But the killer is a simple example that queries the index (based on the command line) and notifies the index that the urls have been deleted. Hence, they'll get removed from the index, the source will get crawled again, and the items will get re-indexed. Very useful.

(*) The irony only really being obvious if you read my post of 15 minutes ago.


Windows Desktop Search

Back to the grindstone

by Matt 10. March 2007 18:33

Yeah, I guess it has been a little while since I last looked at the RSS protocol handler. There have been a number of reasons. Let me list them for you, I can tell you're dying to know.

  1. Real Life.
  2. Work.
  3. The release of WDS 2.6.6
  4. The release of Visual Studio 2005 SP1
  5. The release of IE7, and therefore the RSS Platform, which might mean a breaking change to the beta SDK I was going to be using
  6. The feeling that I needed to reset my VPC and start again. I'd just fiddled with too many registry settings.

I mean, who relishes the thought of having to do that much VPC maintenance? I intended to get round to it, but we all know about good intentions and roads being paved, etc. But I've had an email (thanks Sanin) that's given me a prod, so I'm updating my VPC even as we speak.

Adding more fuel to my laziness, the MSDN docs have been updated. The 3.x docs are still pitiful, but the 2.x ones are much more interesting. I expected them to be pretty much a copy of the old MSN docs, but there's more stuff. There's more info on querying the index (including the WDS Browser Helper Object, which allows a website to perform a query via script).

And then there's a whole heap of interesting goodness about "Developing Protocol Handler Add-ins". Not masses of new information, but a couple of useful snippets that mean changes to what I've already covered, such as:


When you want to add a new data store, you'll need to select a name to identify it that does not conflict with current ones. We recommend this naming convention: companyName.scheme.

Which of course makes sense, but means I've got to go back and change it. This really isn't helping. But the real kicker is in the section on installing and registering protocol handlers. This version of the docs details what registry keys to write. It doesn't mention using the COM object to register at all. I don't know why, but I have a sneaky suspicion it's because the COM object doesn't register the protocol handler in HKLM, only HKCU, so other users won't get it. And looking into that was going to be awkward, seeing as I'd already registered.

See what I mean? Lots of little housekeeping jobs to do.

And perhaps more importantly, I was beginning to bore myself with those articles. They were just a little bit dry and preachy. I needed to write some code. I needed to make use of that lovely syntax highlighter plugin for Windows Live Writer. More than that, I needed a Plan.

I think I've got one now. But first, that housekeeping.


Windows Desktop Search

When will Sidebar be useful?

by Matt 8. March 2007 17:48

So, LifeHacker has picked up on the AmbientClock. Seeing this again, especially with their focus of using it in a Google gadget made me think that this is exactly the kind of gadget that could finally make the Vista Sidebar useful.

I've been running the Sidebar since I got Vista, and I'm still not really sold on it. I'm still failing to see what use these gadgets/widgets/whatever are. I think it just adds to the information overload. Most of the gadgets I've seen either give you access to information that's already easily available (such as battery status - already next to the clock) or that you just don't really need (CPU meter springs to mind. If I'm concerned about my CPU usage, I'll look in Task Manager to see what is actually slowing my machine down).

My current line up includes a weather gadget (I can look out the window, thanks), the standard RSS feed viewer (all the headlines are truncated, and it's not the nicest reading experience). I've got a BBC radio gadget, which is rather nice, but just doesn't see much use. The default clock is nice, and is probably why the Sidebar has stayed as long as it has. The nearest I've got to a killer app (at least in theory) is a clipboard ring. But it's kinda dull looking, and only supports text, and I haven't actually used it yet. I like the idea though.

An AmbientClock Sidebar gadget hooked up to your Windows Calendar (or Outlook) could be pretty impressive. So why is this different? The clock's already available, as is the calendar information. And the answer is I dunno. But there's a lot of this gadget stuff about - those users can't all be wrong. Right?




Month List


Comment RSS