Blog - Title

October, 2008

Sorting it all Out
Michael Kaplan's random stuff of dubious value
Be sure to read the disclaimer here first!
  • Sorting it all Out

    Je suis prêt

    • 5 Comments

    Happy Halloween, everybody!

    Over on Suzanne Vega's Blog yesterday, in her blog je suis pret!, she describes an interesting phenomenon about language:

    One thing that has been a growing phenomenon on this tour is that at some point in the show, usually before Calypso, I say to Gerry¹, “Are you ready?” And he answers “Je suis pret!²” (I am ready!) At the beginning of the tour the audience chuckled appreciatively, but for some reason every night, in each town, the audience carries this one step further than it was the night before. So lately we have had gasps of admiration sweeping through room, and applause, sometimes stamping of feet.  Last night the audience demanded an encore, and I came onstage saying “Encore? Avec plaisir!⁴” The audience cheered, and I thought guiltily, oh now I have squashed Gerry’s moment, but when I said “Gerry, are you ready?” And he said “Je suis pret!”, it seemed to raise the audience to new heights, as they laughed out loud, yelling, then cheered even louder in a kind of roar. Whew. Wonder what will happen tonight?

    Now you honestly may need to be a celebrity to get people to cheer about it.

    But there are many times when taking the extra time to learn a few phrases in a language can really please people, a lot.

    In the past I have often gone so far in presentations in Amsterdan, Japan, Sweden, and France to have bilingual slides, and to try to say a few phrases in the language.

    This has the additional fun benefit where I have gotten typically subdued audiences in places like Japan to smile and laugh, given my pronunciation deficiencies. In its own way the effort is still very much appreciated, in a manner that they might not express if my pronunciation was perfect.

    I have heard many theories about why this might be the case, and even in the most cynical light (explicit reminded that the natives know the language best) the appreciation is there.

    I was reminded of a bit from an episode of the TV show Angel:

    GWEN: And if that means we do it the hard way… {She starts to remove her gloves}
    GUNN: Uh-uh. Keep your mittens on, sparky.
    GUNN: {calls out} Morimoto-san!
    {Morimoto looks over and acknowledges him and Gunn bows and greets him in Japanese. Surprised, Morimoto rattles off a rapid-paced Japanese response.}
    GUNN: Sorry, didn’t follow that last bit. Shot my entire Japanese vocabulary when I said hello.
    MORIMOTO: The gesture is still appreciated.

    And it really is. A simple gesture can go a long way here - even if it is just to greet and say good evening.

    or to say Je suis prêt....

    Now the missing accent is something I'll talk about another time. Stay tuned. :-)

     

    1 - The Gerry she is referring to is Gerry Leonard, who is touring with her right now in Europe.
    2 - French for "I'm ready!" ³
    3 - Actually it technically should be "Je suis prêt!", I think. But you know we aren't so much with the diacritics here in the US.
    4 - French for "With Pleasure!"

     

    This blg broiught to you by ê (U+00ea, aka LATIN SMALL LETTER E WITH CIRCUMFLEX)

  • Sorting it all Out

    From I SCOOT to IBOT, #2 of ??

    • 10 Comments

    Another post about moving to the IBOT ! :-)

    After I blogged From I SCOOT to IBOT, #1 of ??, I did leave some people hanging, wondering how the evening went.

    How the IBOT was going.

    You know, what lessons I learned, etc.

    And more on the differences between scooting and IBOT-ing. :-)

    I'll start with the trip to the Stumbling Monk for game night on Monday night.

    I took the 545 to Seattle and get off at Terry and Stewart.

    I took the 8:13pm because last time it took me nearly an hour to make it up the hill that is Dennhy Way there, whatwith the sskow trek up the too-steep hill, punctuated by the occasional stop-and-wait-and-hit-the-reset-button dance and all. Not to mention that it really is uphill and the little scooter that could definitely is not a high-speed climber.

    Anyway, I leave the apartment in balance mode, because it is the best one for getting ariund the corner of the jacuzzi right by the door. I might have rethink some positioining eventually, but for now it works.

    I decide to slip down to standard mode for speed as soon as I hit the walk outside the apartment . It's faster (up to 6.8mph!) with a bit less control, but good for wide open spaces when the best thing you can do is move through the pasce and on to some place interesting.

    Then as I go up the hill after 156th heading toward the highway, I move into 4-wheel mode. Slower (max speed 4.8mph), but much better for hills and such. Much more stable since the gyroscopes are on and actively working to keep me upright.

    By the way, did you ever have people telling you to use your inside voice when you were inside, because you were too loud? Well, 4-wheel mode is like really only outside wheels; I have actually brought uo the clearly-done-by-lowest-bidder squares of carpet in building 14 just by turning in that mode. So 4-wheel is not for indoors. :-)

    Anyway, I get to the bus stop, slightly early because I am so used to doing it in the scooter thast I forgot I asm dking something faster now. It's just a few minutes.

    I go into balance mode as I wait. I'm know I'm showing off since I already decided to get on the bus in standard, but I can't help it. It's fun and people love to talk about it. If I enjoy and so do they, then who am I to deprive us? I know I'll get bored eventually, but for now let's have fun.

    Backing on to the bus is as hard as I thought it would be due to the very different steering mechanisms of the scooter and the IBOT. Backing on to the bus had becomes second nature; I was fighting muscle memory now, and even at low speed, the loer amount of control in standard mode is something people clearly aee as thy watch me back and file a bunch of times.

    I'm embarrassed, but I carry on.

    The driver is not sure where to tie me down but I show him the dedicated tie-downs, which I think he liked -- the are easy for him to reach and we are quickly ready to go.

    One person runs onto the bus at the last moment, and now I don't feel as bad for my earlier trouble getting on -- she would have missed the bus had I been more coordinated, by like 45 seconds. :-)

    The front is very uncrowded, with people sitting just behind the spot for wheelchairs. It occurs to me that I would be better off (when there weren't a ton of people on the bus) going on the bus forward, in balance or 4-wheel modes, and turning in place!

    I make the mental note for the return trip, and then we are off.

    I get off the bus in 4-wheel and am mch more coordinated. The bus driver seems much happier with my control, which I am sure he attributes to going forward rather than backward (though I think it was mostly the better mode; standard is not for indoors or tight spaces!

    Anyhow, I Am off now at Stewart and Terry, asnd I slide over to Denny. I look at the hill that I have now climbed many times but never in this vehicle, and I pause wondering what it'll be like.

    Ah well, the only way to find out is to do it -- I had on up.

    I am shocked at how well it is able to maintain as much of the speed that it does going up the hill. I make it to the Stumbling Monk early, and just outside I move into balance mode, full height.

    I remember how tall the bar is, and for the first time I am going to be able to see over it when I order a Belgian beer that I've never heard of.

    The bartender does not recognize me, though he did before. It is the scooter, people remember it. But they remember the IBOT too, and it is easy to see why people wouldn't make the connection!

    Some small talk, people I know start showing up and then throughout the evening people are curious, asking all the usual questions (is this a Segway, how does it stsnd up on two wheels, what if the power runs out, how much did it cost, did Microoft pay for it, how fast does it go, etc.).

    Geeks love it an start getting all tech on it. And Seattle has more geeks per capita than most towns I have been in. Hell, I m one of them!

    We are playing speed Scrabble. My poor finger dexterity works against me but I don't mind. We are having fun which is really what counts. :-)

    When it's time to go, I head out. Straight down Olive Way, the whole way. all the way to the 545. I m on time rather than early, though the bus is late. I pass the time talking to two of my fellow busser folk, one of whom is really mad about her Tarot reading that was rushed because of the people asking too many questions before her. It is interesting just watching the rant so I listen and comment and express outrage at the times that I imagine I would be outraged if I believed in the things she spoke of.

    They love the IBOT, and have their questions too. Still fun, believe it or not!

    I point out that it must have been karma -- if the other two of them had not had a bus that came early which they missed and had I not had a bus that was late, this conversation would never have happened.

    Both of them are delighted at my conclusion and agree very firmly.

    When the bus finally arrives, I think I am about to get hugged or something, but they refrain since they don't want to tip me (I was not really in a hugging-strangers mood, or I would have talked about the gyroscopes; the whole thing put me in mind of Suzanne Vega's recent Hugging and Kissing blog she posted, with the obvious exception that I'm not a celebrity, though I totally understand where she's coming from).

    I go on the bus in balance mode forward, turn in place, get in position, and move to 4-wheel. It is all very fast and people who are watching it clearly think I've done this before. Which

    I haven't but I'm finding my groove, I think. :-)

    All things considered, the IBOT experience of the Stumbling Monk was far superior to the scooter one. Even for a first time; I imagine it is only going to get easier now that I am getting a better handle on modes and when to use them in various situations....

    Of course today there is a team lunch in a place that would require two buses to get to and three buses to get back from, so I am tempted to take the small scooter to work today and put it in someone's trunk. Or use all this saved up energy and go with just a cane, maybe. We'll see.

    Tonight a bunch of us are going to Matador in Redmond. Pop by if you like and come up and say hi, too. Just don't ask to hug me? :-)

     

    This post brought to you by (U+267f, a.k.a. WHEELCHAIR SYMBOL) 

  • Sorting it all Out

    From ____ to ____ to MUI to ELS -- World Ready @ the PDC!

    • 5 Comments

    If you are the PDC in Los Angeles, you may have seen Yaniv Feinberg from the Globalization Services team and Erik Fortune from the Multilingual User Interface team, who did a 75-minute presentation entitled Windows 7: Writing World-Ready Applications. It's description:

    This session centers on globalization features for Windows 7, including sorting and string comparison, locale support, and coverage for new languages, with an eye to helping developers extend their applications to a global user base. This session introduces the Extended Linguistic Services API, the next step in the evolution of globalization support for Windows developers. This session also covers the Multilingual User Interface (MUI) technology inside Windows 7 and .NET, and walks you through an end-to-end look at how to make your application MUI-enabled so that you can easily take your application worldwide and extend your customer base into new language markets.

    If you are not at PDC or you were off "picking your nose in Milo's meadow" when this presentation was done, then never fear, they recorded it and you can watch it off Channel 9 right here.

    You do have to have Silverlight 2.0 installed to watch the video and no download is provided (this was disappointing for me since I always tended to download .WMV files so a) I can watch them at high speed, and b) I can put them on the Zune and watch them without being tied to my machine -- though obviously this is neither Yaniv's or Erik's fault!).

    The presentation is worth a view as it introduces, describes, and demonstrates ELS (Extended Linguistic Services), a framework that in Windows 7 will provided features like language detection, transliteration, and script detection -- doing so, in a way that is in just about every way superior in both simplicity and range of supported languages than virtually all previous Microsoft forays into these areas.

    It also has a good piece about MUI and deployment, which are things I have talked about here many times in the past.

    With that said, I do have couple of criticisms, which I will mention so that you know about them, and also know that I still think the presentation is a worthwhile watch:

    • The title sucks. Writing world-ready applications involves a lot more than a new feature that provides a framework with some cool useful services, and the ability to switch user interface languages. If your application fully integrated both of these items, it would not be properly "World Ready". And one intro slide in each of the two parts is not enough. The title should really have been better.
    • The mix sucks, because the integration of the two features is poor, something that is especially noticeabl when they are presented side by side -- e.g. ELS is designed to be incredibly simple with a minimal API set, while MUI has so many components that the old lady who lived in a shoe would feel your pain trying to figure them all out. The differences like that are very obvious if you look at the presentation.
    Now for simple purposes, we can put the people watching the presentation in four categories:
      1. People like me who think that both of them are so cool they are the bees knees, the wasps nipples, and the erogenous zones of every insect in North America;
      2. People who think that one is so frigging cool that it could reverse global warming, while the other is such a waste that they wondered whether they should throw it in a compost bin or a recycling bin;
      3. People who think that both are so useless that they'd ask for a refund on the PDC of there wasn't a Mark Russinovich talk scheduled later on.
      4. People who were expecting a talk that goes over globalization and localizability, core things that if you don't have then neither of these features they talk about are all that interesting.

    Now of those three categories, #3 is not important since they probably wouldn't have walked into a talk with the title this one had, and #4 is basically my first criticism.

    #1 is a group I can really identify with since I am in it, and I suspect that many of the people who follow this blog also put themselves in #1 either a little or a lot.

    But that category #2 is a real one, and the packaging of these two separate presentations under one title without trying to handle the issue in the session description or with a few words is just weird. And not just in a "men are from Mars, women are from, Venus" kind of way. I mean a "MUI is from Mars, ELS is from Alpha Centauri" kind of way.

    Probably there was no way they would have gotten two full slots at PDC, but they should have handled the packaging better.

    With all of the above said -- this one talk is two solid, independent presentations, either one which is likely interesting enough to you to make watching the whole thing worthwhile even if you qare in that category #2.

    Or, if you are an MUI-o-phile, Erik starts at 26 minutes  and if you want to know about ELS then Yaniv kicks off the whole thing from the beginning, and the Q&A starts at 55 minutes or so. And there is a mention of me and my blog at around 54 minutes if people are into SiaO spotting. :-)

    I am glad that this presentation was made more widely available beyond the PDC, as it is the first view of some very cool new things.

    And I'll be talking about ELS further at some point, no doubt.

    SPOILERS: in the Q&A, Yaniv confirms that ELS is Windows 7 only, and Erik confirms that the new MUI feature of a per-process UI language is also Windows 7 only (the latter is really the only Win7 specific MUI info mentioned in the presentation, but is also very cool. Erik, don't bury your lead next time!).

    This blog brought to you by(U+090f, aka DEVANAGARI LETTER E)

  • Sorting it all Out

    How the @#%&*! does CBS_SORT choose to sort it all out?

    • 3 Comments

    The question was an interesting one:

    My customer has a tree control with nodes sorted using CString::Compare(). In another part of the application he has the same list of names in a combo box that has the CBS_SORT style set. He wants names to appear in both controls in the same order. Currently they do not. We've tried changing the sort algorithm used in the tree to CString::Collate() and tried a few variations of ::CompareString(), but none of those match the ordering used internally with CBS_SORT set (particularly when names have hyphens or numbers).

    The customer does not want to make the combo box owner-draw to override sorting because it will lose accessibility functionality based on this logic:

    • Overriding Sort algorithm requires to do “Owner-Drawn” (http://msdn.microsoft.com/library/bb775921.aspx)
    • Exposing Owner-Drawn Combo Box Items with Accessibility requires CBS_HASSTRINGS style. (http://msdn.microsoft.com/library/ms695697.aspx).
    • Having CBS_HASSTRINGS style causes that the combo box will ONLY use the internal implementation of “Sort” if CBS_SORT is specified, or does not sort the list at all if CBS_SORT is not specified.
    • Cause the control to completely ignore our own implementation of sort.

    Thus, to achieve the task, he expects to know the algorithm used by CBS_SORT inside Combo Box. Is it allowed? If it’s not, is there any other workarounds that can help the customer?

    Many thanks in advance

    This question is interesting on multiple levels, actually.

    First of all, it is about collation, which is always interesting to me. :-)

    Then second it is interesting for the solution, which is of course to take the already sorted list and add it to the Combo Box without the CBS_SORT style, so that it will just be in that order. This way they match and there is nothing else to worry about.

    well, other than the fact that the CString:::Compare (actually CStringT::Compare) order is actually the _tcscmp order, which is basically a binary type if order that is not terribly useful to give to users. They'd almost certainly be happier with just about any kind of linguistic result and probably don't need or want to be exposed to an internal ordering that wouldn't be helpful for them.

    Think of the precedent we have in file names -- the order which NTFS uses to do sorting internally is nothing to do with the order that Explorer uses to sort them when they are being viewed. That order would just confuse any normal, sane person! :-)

    Then of course the question is fascinating for the uestion in the title -- what the hell is the sort order of a Com Box with the CBS_SORT style on it?

    The documentation in this case claims:

    Automatically sorts strings entered into the list box.

    which is not terribly helpful for us, is it?

    There is a good hint in the CB_SETLOCALE message documentation:

    An application sends a CB_SETLOCALE message to set the current locale of the combo box. If the combo box has the CBS_SORT style and strings are added using CB_ADDSTRING, the locale of a combo box affects how list items are sorted.

    Now we're getting somewhere!

    If the order is locale-based, it really suggests a CompareString type thing, doesn't it?

    Of course StrCmpLogical is CompareString-based (ref: What is up with number sorting?), but neither function's ordering matches the CBS_SORT ordering.

    The key is know what is the difference in this case.

    The answer was provided by Jay Krell, who I have mentioned before in the same context (tracking down problems!):

    Reading the code suggests it is roughly equivalent to CompareStringW(ignore case), except that it treats initial left square brackets differently (seriously)....
     
    But if it isn't documented, don't depend on it, of course. (unless you can convince the owners to document it..)

    And no, this is unlikely to ever be documented explicitly -- and no, writing about it here doesn't count as documentation! :-)

    Probably not worth duplicating, but the logic, which I suspect is quite old, has an illuminating comment at the top of the function that describes the thinking:

    * This is a version of lstrcmpi() specifically used for listboxes
    * This gives more weight to '[' characters than alpha-numerics;
    * The US version of lstrcmpi() and lstrcmp() are similar as far as
    * non-alphanumerals are concerned; All non-alphanumerals get sorted
    * before alphanumerals; This means that subdirectory strings that start
    * with '[' will get sorted before; But we don't want that; So, this
    * function takes care of it;

    And then as we all know, lstrcmpi is just a nice thin wrapper around CompareString. And there we go.

    Not such a bad order, really. Though to be honest it looks like a real corner case to me (if one cares about one symbol -- even negatively -- one probably cares about others, so a simple NORM_IGNORESYMBOL probably would have made more sense in the end. But then that's just me. :-)

    The final answer -- you can user CBS_SORT , or choose an ordering you like better. And just go from there....

     

    This blog brought to you by [ (U+005b, aka LEFT SQUARE BRACKET)

  • Sorting it all Out

    Wonder why something is not in the Compact Framework? The answer is in the question!

    • 8 Comments

    Regular reader Jan Kučera, in response to Stripping is an interesting job (aka On the meaning of meaningless, aka All Mn characters are non-spacing, but some are more non-spacing than others), asked in a comment:

    Any way for the .NET Compact Framework people out there? (as the normalization does not seem to be available for them...)

    Yes it is true, Unicode normalization support like System.String.Normalize does not exist in the Compact Framework.

    By the way, I know Jan did not ask the question in the title!

    But I suppose that is why they call it compact, in part -- because they didn't put everything in there. :-)

    One can always do it oneself, I suppose -- Unicode Nornalization can be implemented by anyone!

    And as I mentioned almost four years ago in Normalization and Microsoft -- whats the story?, one can always just call FoldString and get a bunch of the functionality -- just not everything since the tables aren't as up to date.

    Or one could find some third party library and call it. Anyone have a favorite?

    All of this is a lot of work to perform a destructive job like stripping -- note that although I never judged Valerie for her choices vis-a-vis stripping and school, I do tend to judge code that strips out diacritics that actually might contain meaning. Negatively.

    In other words, I may have provided the code to do it (code that to be frank is much better than this code, for several reasons that I'll get into some other time), but I still judge the people who use it.

    This is the very combination of logic and meanness that can drive nice people insane -- good thing I'm not nice! :-)


    This post brought to you by(U+30d4, a.k.a. KATAKANA LETTER PI)

  • Sorting it all Out

    Ready... set... Reboot Redux, part Deux!

    • 1 Comments

    Now it all started with Ready... set... Reboot! back in February of 2005, where the issues of reboot and the default system locale were first discussed.

    And then the follow-up (Ready... set... Reboot Redux), which talks about how sometimes you might even need two reboots to get the right results, due to the fact that words like Bold are sometimes localized as well -- based on system locale. and the way fonts are registered is not really code that people are anxious to muck with.

    For a moment, ignore the lessons of Ready... set... Don't Reboot!, as they are about a different issue. But I'll get back to them in a minute.

    I'd like to take the whole scenario and turn it on its head, if I may.

    You see, we always tell core team members that one of the important issues in localizability is to always expose font settings like the name and the size to localizers, so they can change it when they need to in order to get the expected UI look.

    And that is true.

    Often, the way that it ends up being exposed, when the font is being created in code, is to put them in a string table.

    Okay, nopw the localizer can change them and the code can use them. Great!

    Or maybe not....

    Because there is this Bold/Gras issue -- the system decides which one to expect based on the default system locale, but application resources are by default loaded with the user interface language.

    That string might be Tahoma Bold -- which when localized will never match....

    That means you could reboot a hundred times and never see things the way that the localizer intended!

    If you lpook at the solution from East Asian Font Names...., it won't scale here. Because that is just registering two names if two names are defined in the font.

    But these attributes are not in the font, and do not exist in any runtime query-able form. Not to mention the fact that you would want the system to register every font dozens of times to handle every attribute (bold, italic, bold italic, etc) and every language that localizes them.

    And now getting back to Ready... set... Don't Reboot! for a moment.

    In that blog I talked about how the NLS folks took bold steps to not force a reboot or logoff when the code pages don't change.

    But now here is the kicker -- there are lots of cases (unlike the English/French one) where the code pages don't change but the font attributes localization would -- like French and Danish for example -- this would be a Gras/Fed issue -- and once again a problem that would cause the localizer's intent to never be realized....

    Oops! :-)

     

    This post brought to you by (U+0f28, a.k.a. TIBETAN DIGIT EIGHT)

  • Sorting it all Out

    From I SCOOT to IBOT, #1 of ??

    • 19 Comments

    I thought regular and semi-regular readers might like an update on life with the IBOT, after I blogged about getting one in Cogito ergo cathedra... (I think, therefore IBOT...) a few days ago.

    If you're not interested, then you can leave now. :-)

    This may or may not be a series, it depends on how things go, like whether one seems needed.

    So I went in ready -- like taking the English instructions to baggage handler types on dealing with the IBOT:

    IBOT instructions -- English 

    and the Spanish instructions:

    IBOT instructions -- SPANISH

    printing them both out, then getting them laminated as a nice double-sided sheet -- which I will include with the IBOT, any time I travel.

    Who says Kinko's can't be fun? :-)

    After several instances of baggage handlers at destinations screwing up the scooter in both large and small ways, I decided it would be best not to take chances with a unit that costs more than 25 times as much as the scooter did!

    But anyway, about the transition.

    Obviously we are dealing with two entirely different steering systems:

    • The scooter has a front wheel that can be turned to the left or right via a bicycle-style handlebar and two levers (one to be pushed by each thumb) -- the right lever makes the unit go forward, the left lever makes it go backwards;
    • The IBOT has a joystick with back and forward going back and forward (obviously) and left and right doing zero turning radius turns, counterclockwise and clockwise, respectively.

    Now the differences here are fairly obvious, for the most part.

    In fact, when going forward, a smooth turn under power in the scooter handles a lot like a smooth diagonal push of the joystick.

    Though obviously the combination of the zero turning radius side movement with forward movement can make the joystick handle with a bit more roughness when the movement is not as smooth, something that doesn't happen with the scooter.

    Just something that will get better with practice -- the fact that I no longer have to back into elevators and offices is by itself so cool that I don't miss the finer points of scooter navigation. :-)

    Going backwards is a bit harder though, since the nature of the movements when using the scooter versus the IBOT, which so closely tie together in forward movement, are pretty much reversed when going backward since the nature of the zero turning radius movement is unchanged.

    THUS, going backwards in the scooter while turning the handlebars to the right will move the scooter back to the right, while going backwards in the scooter while pushing the joystick toward the right will actually move the chair to the left.

    At some point I will draw this out or find someone else's drawings, as I don't find the above description to be very satisfying, and not everyone will want to take the descriptions a\and work out the physics for themselves. But in the meantime, just imagine combining a clockwise turn with a backwards movement and think about what way the scooter will be pointing.

    You might see what I mean. :-)

    Or if you have been steering a boat before you will understand this idea. That might be where I get pictures from.

    Tonight I am going to head to the Stumbling Monk for a chess night, in the IBOT. In fact by the time you are reading this if you were waiting anxiously for the 12:01 AM post, I will be on my way home, perhaps after having gone backwards twice to get on the bus, which I am really happy that I will be doing at uncrowded times as I fighting over a year of muscle memory when I do it and I'd just as soon have fewer witnesses, if you know what I mean.

    I can also talk about hills, living in a city whose downtown isn't exactly San Francisco but isn't exactly the flattest part of Kansas City, Kansas either.

    With the scooter, they recommend not more than a 20° incline but to be honest I have done 30° with no trouble. But I have tripped the circuit breaker trying with higher inclines, some of which exist in Seattle. When it happens there is nothing to do but wait 30 seconds, hit the circuit breaker reset, and try again. I have had occasional hills that required doing that 4-5 times while I cursed choosing the wrong street to go on.

    But with the IBOT, the incline is not really so much the issue -- it can handle even steeper inclines. Just take the hill head-on rather than at an angle, an even during training around the streets outside Swedish Medical Center I had steeper inclines. That is a change I'm much happier about, as I'm sure you can imagine. :-)

    I'll probably talk about all of this later.

    For now, I'll move on.

    Let's talk about height.

    When I graduated from high school in 1988 in Philadelphia PA, I stood tall and proud at 5'8".

    A few years later, with the MS I suddenly found standing for long periods of time was harder, yet I did manage to gain a couple more inches so I was able to stand a proud 5'10", when I stood. Perhaps a lare growth spurt, perhaps it was marrying young. The spurt stopped after the divorce, so maybe she was the inspiration. :-)

    Eventually, in the scooter, I found myself looking up to those I used to gaze upon at eye level, in my more diminished 4'1". I even tried to change the height to 4'1" at the DMV, though they said no dice. Aparently even if you are paralyzed driving with hand controls they want a real height, I guess measured lying down. Or estimated. It's not like they weighed me.

    Anyway, now with the IBOT in balance mode and full verticalk extension I am once again 5'8".

    I feel like I just graduated from high school again! In more ways than one. Or something like that.

    Well crap, I could talk about being able to hit 5" curbs and climb over them without blinking or not being blocked by steps. And all of that is cool too.

    Either way, I swear I'd like to find the original doctor who signed the initial NOT MEDICALLY NECESSARY rejection letter -- flying to him if that is what it takes -- wheel up to him in my IBOT in balance mode, and tell him that human dignity may not be medically necessary.

    But health insurance that can't pay for human dignity for those who are sick is stupid, lame-ass health insurance, and it was a pleasure to go over his head to find people who understand that.

    After which I'll break my safety rules and "accidentally" run over his foot. :-)


    This post brought to you by (U+267f, a.k.a. WHEELCHAIR SYMBOL) 

  • Sorting it all Out

    Not only going BACK, but changing how to do it

    • 7 Comments

    Late last week, Jan Kučera asked over in the Suggestion Box (which I am thinking of renaming to Jan's Place, soon!):

    Hello.. I have a short one today: Could I use the MSKLC to make for example the B key to act as backspace key (and if so, how :))?

    Thanks!

    Very good question.

    The quickest answer is just two letters and a punctuatuon mark:

    No.

    The slightly longer answer is:

    No, MSKLC cannot be used to muck with the backspace.

    But this answer, while technically true, has me making an assumption that most people wouldn't make.

    I am treating MSKLC as meaning msklc.exe, rather than the full Microsoft Keyboard Layout Creator installation, while most people would actually assume the latter and not the former.

    Because just as with other blogs that talk aboput the .KLC file and KBUTOOL.EXE, like Pimping your Brazilian keyboard and In case you have a yen to extend your keyboard (or at least want a yen?) and so forth, there is a way to muck around here some....

    You see, there are certain defaiult entries that evry keyboard has, and KBDUTOOL.EXE automatically adds them at build time if they are not already specified in the .KLC file.

    Which means that you could specify them!

    Some of those entries (with their default values on a US keyboard) are:

    0e   VK_BACK   0      0008     0008
    01   VK_ESCAPE 0      001b     001b
    0d   VK_RETURN 0      000d     000d
    53   VK_CANCEL 0      0003     0003
    0f   TAB       0      0009     0009

    and of course you would need to change the scan code in front of each one you wanted to change (like in Jan's case, taking the scan code off the "B" and using that value should do the trick!).

    Make sure to remove any duplicate entries in your own file....

    Now one warning -- since these values tend to never change, the fact that you are changing them may fail in some applications that were assuming they would never change. Whether this is their bug or yours is an interesting philosophical issue but I'm sure you can imagine that you will be at a disadvantage when you argue the point with them.

    The moral of the story of the whole blog is that sometimes it is worth waiting for the longer answer. :-)

     

    This blog brought to you by U+0008, aka BACKSPACE

  • Sorting it all Out

    Silverlight as Esau: selling its implementation for a pot of interface

    • 3 Comments

    Apologies for the biblical metaphor in the title...

    Now I mentioned last week in Shine a Little [Silver]Light that

    Sometime soon I'll talk about the next big question that is likely to be on many people's minds after they look at the slides.

    and with a lead-in like that I figured I should probably start talking.... :-)

    So here we go!

    The hints were in earlier blogs like It's not how big you make it; it's how you make it big (aka Silver let your Light Shine Down), though perhaps not spelled out as explicitly.

    Now I am not going to pretend that I do not find the whole "thin layer around the OS: model to be fascinating as a real case study of the differences between platforms, between expectations, and between (to use the Silverlight marketing word) experiences when it comes to globalization.

    Not to mention issues like the ones raised in Mihai's comment about platform limitations on the Mac in this case, or the interesting coverage of Internationalization in Silverlight from Adrian Cadden's blog.

    But once you move past those really interesting points (never fear, I'll head back into the fascination some other time!), a very interesting fact pops up.

    That fact is that the majority of the work that was done in Silverlight was to avoid doing any actual work!

    That's right -- the huge effort, the fascinating compromises, the intriguing differences are all symptoms of one of the largest attempts to be too lazy (or to be more accurate, too stingy about size!) to do much of anything of substance to provide a consistent and integrated feature set that would behave the same way across all platforms.

    Silverlight sold its consistency birthright provided by .NET for a pot of wrapper.

    You get to see where this leads to problems in some of the posts that are out there now like in the foiurth bullet point in My Wish List For Future Silverlight Release:

    Support for Khmer language. This is a bit personal, since I'm a Cambodian and would like to see some progress for Cambodia IT, as it is stuck between the incompatibilities and supports. Unicode has finalized the Khmer characters standard years ago, and Vista has officially supported it. But .NET, WPF and Silverlight don't render Khmer text correctly, as these technologies don't go well with the Microsoft Uniscribe Engine and GDI+.

    Indeed this would be nice -- but wouldn't providing that support vuiolate this new model of maximum effort in the interface, minimum effort in the implementation that leads to a smaller download, especially if the language is not supported in the platform underneath?

    Sticking with Khmer for a moment (shades of Khmer, and I'll tell you about all the text stacks) and ignoring the implied breaking of the trust suggested in blogs like A whole new spin on the term 'Vertical markets' (aka in SiaO we trust?), it was even years ago when Carlton Pringle talked to me about .NET and Khmer:

    Hi Michael

    We spoke last yeah (via a forum) about Khmer language issues and you did mention you'd be interested in following how things are going in Cambodia with .Net technology and in particular language issues.

    We've launched a .Net Community Site in Cambodia (with sponsorship from MS).  If you're interested please sign up - you could perhaps help to answer some questions about why WPF doesn't support Khmer :-(

    Anyway, best of luck with everything,

    Carlton

    I did sign up back then, though I did not have better answers as to why Khmer was not supported in Avalon (WPF) so I didn't really volunteer them. And though I do have explanations for why that support does not exist in Silverlight (WPF-e), I would hesitate to call those good explanations from the point of view of someone who wanted the support to be there.

    Growing in a new direction that keeps one from being required to do a ton of cross-platform work to support language (choosing instead to wrap what the platform provides) is simultaneously very brave and very cowardly. and how you feel about it may well depend on which side of the divide your language (or your customer's language!) sits.

     

    This blog brought to you by(U+17bf, aka KHMER VOWEL SIGN YA)

  • Sorting it all Out

    Consoling oneself about being unable to set the console font

    • 4 Comments

    The other day, Marjan Venema asked over in the Suggestion Box:

    For Vista we can use the SetCurrentConsoleFontEx API to switch a console window to use Lucida or another font that supports Unicode symbols. Unfortunately there is no similar API for XP (or 2000) for that matter. It does have a GetCurrentConsoleFont, but no Set... equivalent.

    If you have any ideas / solutions for setting the console font on 2000/XP these would be gratefully received!

    Thanks, Marjan

    If only I could provide an answer here, there would be countless people who would be very happy.

    Though I unfortunately have no good news to provide; there is no supported way to do it in prior versions....

    Sorry about that.... ;-(

     

    This blog brought to you by Ā (U+0100, aka LATIN CAPITAL LETTER A WITH MACRON)

  • Sorting it all Out

    Does MS just make up these punctuation-challenged keyboards to piss people off?

    • 5 Comments

    Regular reader Jan Kučera asks over in the Suggestion Box:

    Who does create the keyboard layouts? I'm using the Tamil one, which is nice to play with, yes, but... do people really need to install another layout (and constantly switch between them) just to be able to type question mark, exclamation mark, quotes, colon, brackets... or am I missing something fundamental here?

    The answers to these questions can be found through some careful searching through the Blog. :-)

    The very first question sees it answer in one of the very first blogs (plus or minus a few months), entitled Does MS pull new keyboard layouts out of their @!#$%?.

    The answer to the second question is simpler -- No. Jan is missing nothing, as usual....

    A more detailed answer on the specific problem can be found in later blogs.

    Like the second bullet point in The real problems with keyboard switching, a blog that discusses the most important reasons that the model of switching layouts is not more readily accepted.

    Or the second bullet point in Ideas about loading existing keyboards in MSKLC, a blog intended to be a quick brainstorming for someone authoring a keyboard layout creation tool to look at possible solutions to these problems.

    Or more recently, The built-in attempt to support multi-monolingual keyboards is kinda broken, where I point out the real flaw in the assumption that the switching will be helpful for most people.

    Now I can't claim a ton of progress has been made here beyond someone from Microsoft (well, me) identifying the problem almost three years prior.

    Technically, I did provide a slightly more intuitive attempt at inputting Tamil in Behold the Table Driven Text Service, Part 12 (The knights who say நீ, redux, #2). Though that doesn't do much specifically in this case either. Mainly because I was focusing on other things....

    But working to solve the problems here? Not so much.

    Sorry about that. :-(

     

    This blog brought to you by கு (U+0b95 U+0bc1, aka TAMIL LETTER KA + TAMIL VOWEL SIGN U, aka TAMIL LETTER KU)

  • Sorting it all Out

    Cogito ergo cathedra... (I think, therefore IBOT...)

    • 5 Comments

    Now ordinarily I would apologize to René Descartes for appropriating and re-purposing his quote, but he was not, in the end, all that fond of the particular phrasing of the idea, so....

    I have talked about Dean Kamen's IBOT several times in the past, like in 'It's an iBOT,' I would say. 'Yes you bought it, but what is it?' she would answer.

    And then back in the beginning of the year in NOT MEDICALLY NECESSARY per, by their own description, non-medical people, I talked about my fledgling first attempt to get an IBOT. after it became clear that this was not just a luxury item -- this was something that many people who are currently in powered wheelchairs or scooters really ought to be allowed to consider.

    The news?

    Well, as of today, a mere 10 months after the initial denial, I now have an IBOT!

    Just got it today after being approved in a pass/fail test of my driving ability. Reminded me of that bit from the movie Sahara:

    Rudi: I'm going with you guys, right?
    Dirk: No, you gotta tell Sandecker.
    Rudi: Hold on, how do I cross the border? I never took survival training.
    Dirk: Consider this your course, Rudi.
    Al: Kinda pass/fail, which I always thought was easier.

    Anyway, I passed (luckily enough!).

    Getting back to insurance company adventures, it only had to go through one appeal, which means it was decided at the Premera Blue Cross level (with no help or review by Microsoft, though the fact that it was a Microsoft account might have had some influence, a theory about which I have no supporting data).

    The language of the approval letter made it very clear what was on their mind. I won't quote it here except to say that they wanted to make it clear that this was not to be a precedent that could be used to obtain future approvals for others who needed an IBOT -- the focus was on the unique facts reviewed in the course of the appeal.

    Fair enough.

    But did you ever see the movie The Shawshank Redemption? In particular, this scene:

    ANDY: What is all this?
    HADLEY: You tell me, fuck-stick! They're addressed to you, every damn one!
    {Wiley thrusts an envelope at Andy. Andy just stares at it.}
    WILEY: Well, take it.
    {Andy takes the envelope, pulls out a letter}
    ANDY {reading}: "Dear Mr. Dufresne. In response to your repeated inquiries, the State Senate has allocated the enclosed funds for your library project... "
    {stunned, examines check}
    ANDY: This is two hundred dollars.
    {Wiley grins. Hadley glares at him. The grin vanishes.}
    ANDY {reading}: In addition, the Library District has generously responded with a charitable donation of used books and sundries. We trust this will fill your needs. We now consider the matter closed. Please stop sending us letters. Yours truly, the State Comptroller's Office.
    {Andy gazes around at the boxes. The riches of the world lay at his feet. His eyes mist with emotion at the sight.}
    HADLEY: I want all this cleared out before the warden gets back, I shit you not.
    {Hadley exits. Andy touches the boxes like a love-struck man touching a beautiful woman. Wiley grins.}
    WILEY: Good for you, Andy.
    ANDY: Only took six years.
    {pause}
    ANDY: From now on, I send two letters a week instead of one.
    {Wiley laughs, shakes his head}

    So if there are people out there who are in the same situation vis-a-vis Blue Cross and an IBOT denial, the folks at Independence Technology (the subsidiary of Johnson and Johnson that produces the IBOT) now have more information on the cases that may have a better basis for an appeal.

    There are other insurance company plans (e,g, Aetna's) that specifically disallow the IBOT as a matter of policy, which is eerily ironic since employees of Independence Technology are actually covered by Aetna. I wonder how they would choose to word THAT denial, and how they turn around and justify the policy to the company that makes the units.

    Talk about your very sensitive communications!

    Though luckily, if an employee there should actually need one -- not an unreasonable supposition when one considers how medical "miracles" can sometimes tend inspire people to work for the companies that provide them! -- Independence Technology will self-insure for the unit. Insurance company policy be damned! :-)

    But anyway, I have an IBOT now.

    If you a serf or a Seattle barnights/anti-freeze/chess night/karaoke/relative-o-mine type, you may even see it at some point. I can't give rides to anyone who weighs more than 100 pounds or who is uncomfortable sitting on my lap, but there are rules about people who have never taken the training, sorry....

     

    This post brought to you by (U+267f, a.k.a. WHEELCHAIR SYMBOL)

  • Sorting it all Out

    See? The MSKLC support story is as easy as 1 2 3 4...

    • 1 Comments

    Over in the Suggestion Box, Gene Sorensen asked:

    Dear Michael,

    Thank you for an incredibly helpful tool in the MSKLC, and for your helpful blog. I have two questions related to the MSKLC:

    1. Will the MSKLC install into 64-bit Vista? We are using it in 32-bit Vista, and I know it creates keyboards for 64-bit environments, but will the tool itself install and work in 64-bit Vista? (We need to buy a new computer.)

    2. When installed into 32-bit XP MSKLC warns we will not have access to all features unless we install it into Vista. I cannot find any features missing except access to the new languages and keyboards available in Vista. Are there any other features we are "missing" by using it in XP?

    Thanks again,

    Gene

    For the first question, eve the old version of MSKLC (version 1.3) which could only build x86 keyboard layout DLLs, could be installed and run on 64-bit Windows. and the new version (1.4) can install on 64-bit and build 64-bit keyboard layouts as well. So there should be no problems there at all, whether you author keyboard layouts (a) on 64-bit, (b) for 64-bit, or (c) both on and for 64-bit, you will be just fine with the latest version of MSKLC -- version 1.4.

    For the second question, the warning will indeed show up in these cases:

    Vista or later 

    and it will show up every time unless you both check the Don't show me this again checkbox and don't uncheck the View|Options Remember Settings After Shutdown checkbox (if you don't remember settings then MSKLC won't remember the first checkbox!).

    Actually, this feature existed in the earlier version of MSKLC as well -- if you run it on Windows 2000 you'll get the warning about how if you don't run it on >= XP you won't get all the features....

    Now the new platform (anything >= Vista) gives you several advantages:

    1. As you mentioned, they provide a larger list of keyboards in the File|Load Existing Keyboard list;
    2. They have a larger number of fonts installed for the support of different languages and scripts;
    3. They have a later version of Uniscribe and GDI+ on them, which will again support a larger number of languages an scripts;
    4. The Locale Builder tool, one of two ways to get custom cultures on your machine, only will install its locale on >= Vista, and these items are included in the locale list o MSKLC;
    5. The helpful screen shots in the included CHM file showing how to use MSKLC 1.4 were mostly done using Vista with glass so they will look more like what you are using.

    But if you look at this list you will notice that all of these capabilities (which can make your job easier in authoring layouts) are optional and you can definitely proceed without them if you like.

    There is even a help topic that talks about how you can developer keyboard layouts even if you can't see the characters, by using the Unicode code points (it also shows how you can explicitly choose some other font you have installed that will then help the characters show up properly!).

    You can even use the tool to download later versions of the Unicode standard to get a fuller list of character names, any time you want -- and that can be done on any platform, as long as you have an Internet connection....

    But none of these features are required and I have authored many a layout even on Windows 2000 and then later installed it on Server 2008 with no problems.

    So you miss features, sure. But not ones that have to block you. :-)

     

    This blog brought to you by(U+1234, aka ETHIOPIC SYLLABLE SEE)

  • Sorting it all Out

    Behond the Table Driven Text Service, Part 14 (Don't expect too much from numbers)

    • 1 Comments

    Prior posts in the series:

    Now often the consequences of combining all this information together can get tricky.

    I first mentioned the particular problem in Part 1 -- when I pointed out

    Unfortunately, you can also select a candidate by typing the number on the left. I say unfortunately given the strange interaction between typing numbers and also typing the number used to identify items in a list.

    This is a lesson that was learned the hard way with the Amharic IME in Vista. :-)

    Now I have talked about Ethiopic numbers in the past (like in Why that is positively Ethiopic!).

    If you just type the numbers e.g. 0123456789, you just get the number you type.

    But if you type ', you get into (for lack of an official term) Fidel number mode, defined in TableTextServiceAmharic.txt like:

    "0" = "0"
    "1" = "1"
    "2" = "2"
    "3" = "3"
    "4" = "4"
    "5" = "5"
    "6" = "6"
    "7" = "7"
    "8" = "8"
    "9" = "9"

    "'1" = "፩"
    "'10" = "፲"
    "'100" = "፻"
    "'1000" = "፲፻"
    "'10000" = "፼"

    "'2" = "፪"
    "'20" = "፳"
    "'200" = "፪፻"
    "'2000" = "፳፻"
    "'20000" = "፪፼"

    "'3" = "፫"
    "'30" = "፴"
    "'300" = "፫፻"
    "'3000" = "፴፻"
    "'30000" = "፫፼"

    "'4" = "፬"
    "'40" = "፵"
    "'400" = "፬፻"
    "'4000" = "፵፻"
    "'40000" = "፬፼"

    "'5" = "፭"
    "'50" = "፶"
    "'500" = "፭፻"
    "'5000" = "፶፻"
    "'50000" = "፭፼"

    "'6" = "፮"
    "'60" = "፷"
    "'600" = "፮፻"
    "'6000" = "፷፻"
    "'60000" = "፮፼"

    "'7" = "፯"
    "'70" = "፸"
    "'700" = "፯፻"
    "'7000" = "፸፻"
    "'70000" = "፯፼"

    "'8" = "፰"
    "'80" = "፹"
    "'800" = "፰፻"
    "'8000" = "፹፻"
    "'80000" = "፰፼"

    "'9" = "፱"
    "'90" = "፺"
    "'900" = "፱፻"
    "'9000" = "፺፻"
    "'90000" = "፱፼"

    which will look like this:

    Now although the idea is kinda cool to let you type the European number and have all of the zero forms of the Fidel numbers just show up, the fact that what you are typing and the index numbers for the list are the same thing mean you can't ever type what you are being given the hints for.

    So to use the candidate list in that case, you have to scroll to pick the item or click on it or something like that.

    Plus, when typing numbers the need to constantly accept candidates is also kind of a pain, and it would in retrospect have been better to consider including all of the numbers rather than just the ones with zeroes in them.

    But we were learning; in some ways we still are. :-)

    Now the options for dealing with this are limited, but I'll talk about them soon, though in the end the current definition in the Amharic IME has some real limitations....

    Now to whether there is a bug in the underlying technology that gives hints that you can't use? I may be a philosopher but code clearly isn't, and the code underneath here is just doing what it is told to. So the underlying bug can mainly be in the definition.

    And the moral of the story (and a moral that my friend Cathy could really get behind!) is not to expect too much from numbers!


    This blog brought to you by ' (U+0027, aka APOSTROPHE)

  • Sorting it all Out

    Getting farther from ASCII (on a scale of yellow to Atlantis)

    • 2 Comments

    Mail from Simon is as always (a) funny, (b) important, (c) interesting, or (d) all of the above.

    Hi latest mail was technically in category "C" and it ended up being a little bit of category "A", albeit unintentionally....

    He forwarded me this link, with the subject line "Interesting...".

    Now the poster that shows the distance of so many countries from ASCII:

    FontShop Jenseits von ASCII 

    is indeed quite interesting.

    When he sends me mail with that subject line, he is usually suggesting it may be blog-worthy, of course....

    Though I must admit that I had some fun with the fact that the URL he sent me was actually through a translation site.

    So I asked him what was interesting -- the map, or the fact that he didn't think I'd know what to do with the German link? :-)

    Obviously he meant the former, of course!

    Not to mention the fact that I might have run it through the translator anyway (no matter how much I can puzzle out now in various languages when the topic is one I fully understand, when it comes to a lot of typography stuff I am still merely an egg and thus the backup of a web auto-translation can often give me more information!). :-)

    But the blog (FontShop-Poster: Jenseits von ASCII) and the poster are both really interesting because every example of how far we are getting from ASCII as more and more content from other languages becomes prevalent on the web is a good thing to have.

    Feel free to check the German yourself and see how much you can suss out in regard to the meaning -- then look at the translation to see how well you did (I'm assuming when I say this that you don't know German -- if you do, then you can compare the two and talk about the translation quality!).

    We are pretty freaking far beyond ASCII now. And getting farther all the time....

     

    This blog brought to you by λ (U+03bb, aka GREEK SMALL LETTER LAMDA)

Page 1 of 3 (44 items) 123