See that version there? It is going down, man! #1

by Michael S. Kaplan, published on 2007/07/31 02:45 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/07/30/4143574.aspx


When I first started working in Windows and for several years, I did not really act by default like a member of the Windows team -- I kept looking at problems like an outsider and it was an effort of will to look at things from the inside.

For the most part this was very helpful since it helped me to be able to point out times that people were missing out on some external developer scenarios.

But slowly that viewpoint faded, and while I did not forget the work I did before, the viewpoint changed.

Add to that the times that specific scenarios are not ones you have been thinking about, because they did not occur to me and no one else mentioned them.... and if you don't think of them and they aren't in th spec and no tester puts in a bug about them, then how is one supposed to keep them in mind?

I'll now give a good example of this. :-)

When I talked about the recommended process for using the NLS version information to figure out when to re-index, first back in What makes a string meaningful? and then in Collation data - must be stable, but it must not stand still, I was thinking about components that worked on that version of Windows and moved forward when Windows did. That process:

  1. Any time the major version is incremented, you should re-index no matter what, and
  2. Any time the minor version is incremented, you should re-index for any entry where IsNLSDefinedString used to return FALSE (in case it now returns TRUE or different results due to part of the string now being defined)

This is all well and good, but there are a few scenarios that are not covered here:

This puts a cat among the pigeons, doesn't it?

Not impossible, by any means.

But also not currently described in the docs or here at SIAO Plaza.

I'll let this simmer for a bit and I'll come back with the additional rules in the morning.

You have a few hours if you want to take a guess on one or all of them, or somewhere in between.

Winners of this contest can read this blog free, for life! :-)

 

This post brought to you by (U+17af, a.k.a. KHMER INDEPENDENT VOWEL QE)


Dean Harding on 31 Jul 2007 6:48 AM:

Well, I'd say if the major version changes *either way* you should re-index.

If a minor version changes backwards, you probably have to re-index as well. Because otherwise, you basically have to re-index strings that *now* return FALSE for IsNLSDefinedString and you couldn't do that without scanning them all -- so you may as well just re-index everything.

To be honest, though, I don't see how you could have done anything differently. If you wanted to skip the "re-index on minor version decrement", I believe you would have to change IsNLSDefinedString so that it returned the minimum version that the string would have been defined in, and I can't imagine how big the data file would have to be to make that possible :-)

jon on 31 Jul 2007 7:13 AM:

You have been assimilated. Resistance was futile.


Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2007/09/08 2001, a Correctness Odyssey (aka What's the matter with Ü?)

2007/07/31 See that version there? It is going down, man! #2 (aka Everybody WYNNs)

go to newer or older post, or back to index or month or day