Sometimes both the question and the answer can suck

by Michael S. Kaplan, published on 2006/12/15 03:18 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/12/15/1292469.aspx


Some questions that people may ask are good indications that the person asking is about to be making a mistake.

Like if someone asks how one might build a bomb, the question sucks for all kinds of reasons. And the ready availability of the answer also sucks, to the point where it really is a toss up of which sucks more.

Or like the other day, when the question was:

Is it possible to get a list of all the date and time formats supported in XP and Vista?

Now certainly there is technically an answer (at least for all the built in data that Microsoft provides), at sites like this one.

But this is not a very good site to have out there in my opinion, and not a very good way to answer the question, at the end of the day. And to be honest, as a question it generally indicates that some bad engineering is about to take place.

Because in almost all cases the actual intended use works against the best interests of customers.

There are six problems with the site in general and how people might try to use it in particular, all of which can (and usually do) apply to the person asking the question:

  1. At any time, the current user can modify their date and time formats to something outside of the built-in lists;
  2. The date and time formats can be (and in the past, on occasion have been) updated in service packs or hot fixes;
  3. ELKs can be released which would add entirely new locales to the list;
  4. Custom locales can be installed, which once again would add entirely new locales to the list;
  5. One day there will be a new version of Windows that will probably provide new locales if history is any kind of indication;
  6. The specific site above lists neutral locales which really do not currently exist in Windows from an NLS standpoint, which means some of the data there is not an accurate picture of Windows NLS information for the version it purports to be representing.

In other words, the list does not (and cannot) provide a fully scoped list of either every single locale on a machine or all of the possible formats within any given locale.

So it is a really bad idea to rely on this data as either locales to test (since an actual machine's results can and may vary) or locales to rely on for a supported list (since the actual list can and may also vary) or even an attempt top try and provide the range of possibilities (since a hell of a lot more is possible).

There is no good substitute for using the NLS API to work with whatever the default user locale might be, and there are in fact many bad substitutes one can build with such a list. Relying on such a list is a guaranteed way to have less than complete coverage.

Since the only other effective purpose is to try to copy Windows data for another platform (which I think is a bit obnoxious if not as illegal as copying a Rand McNally map and selling it, for just about the same reason) will also suffer from this incompleteness problem, I honestly wouldn't even recommend it for THAT. Because if you truly do plan to "steal" the collection of data, the engineer in me would really want to push people to add a bit more rigor to their process and capture the data more fully.

Does this mean that the data will be taken down?

Probably not, because:

But it really is not a good question, and the answer is to be honest not so good either. SIAO gives them both thumbs down....

 

This post brought to you by 𒁁 (U+12041, a.k.a. CUNEIFORM SIGN BAD)


Dean Harding on 15 Dec 2006 3:45 AM:

Looks like one of those questions where the answer should really by "why do you want to know?" rather than a direct answer...

Adam on 15 Dec 2006 8:50 PM:

Sounds like a mild form of the I'm not sure what to use to pound the nails in. Should I use an old shoe or a glass bottle? question to me.

Michael S. Kaplan on 15 Dec 2006 9:51 PM:

Hey Dean -- I agree! Though in the end that just buys time, since their answer will invariably be something bad (as I put it, bad engineering about to happen!).

Michael S. Kaplan on 15 Dec 2006 9:55 PM:

Hey Adam -- that is indeed what is going on, though some might argue that since (in the example I gave):

that my saying that both the question and the answer suck may not count as "mild" in everyone's mind....

gripper on 16 Dec 2006 2:24 AM:

I agree all software shouldn't blow up or choke when its running on an "unexpected" language...

However, there are specific cases where such as list could still prove useful - such as authoring an install bootstrapper that calls an installer package that only includes a limited set of translated resources. If someone has Language A, but tries to install a program that only includes resources for Language B, C, and D... it would be helpful to know what the LCIDs are for the included languages... and then building a selection box using these values, and then choosing a "default" language if the system is out of the range of included resources. Unless there is a better way to do it... I'm open to suggestions?

Just my two cents as someone stuck in the magical and perilous world of installation programs.

Michael S. Kaplan on 16 Dec 2006 2:35 AM:

Hey gripper -- not sure how the scenario you are talking about requires a list of date formats in every locale, right?

Adam on 16 Dec 2006 5:25 AM:

Michael > I'd say a question that can be described as "sucking" is pretty mild compared to the kind of question that gets a "You need to stop building things for money until you understand the basics of construction." response :-)


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.

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