# Sunday, 15 June 2008

This fall there will be a PDC. Yay! What will it be about? Some hints are starting to emerge. I predict you will hear the word Cloud a lot. I predict things I blog about pretty regularly will get some serious coverage. I predict I will be there. That one's a sure bet actually ... I'm registered and everything.

http://microsoftpdc.com/

Yeah, I know, LA again, but hey! It's the PDC! How bad can that be?

Kate

Sunday, 15 June 2008 23:35:01 (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
# Saturday, 14 June 2008

I watch a lot of videos. Technical interviews and webcasts, mostly. I'm not much of a YouTube person. Channel9, DNRtv, the DVDs with all the TechEd sessions on them, that's what I watch. And I watch on planes and in hotel rooms, to pass the time, or because there's one specific thing I want to learn. But I am an impatient person. Especially when I'm alone, I just cannot go slow. So I love that I can speed videos up with Windows Media Player.

It's not a simple option to find. You click Now Playing, then Enhancements, then Play Speed Settings. And presto, you control your impatience level:

I generally live at 1.4. This gets you through a 1 hour video in 43 minutes with really no loss of understandability. I might slow it down to 1.0 during a demo if I want to take notes and capture the code or the steps as the demo proceeds. I move up to 2.0 if the person is explaining something I already know. This is one way to make that huge pile of stuff you are trying to catch up with just a little more bite sized. As well, because you really have to concentrate at 1.4, I don't do that continuous partial attention thing where the video is playing but I'm checking my email, answering a few things, IM-ing two people and the hotel room TV is on CNN all at the same time, and then -surprise!- I can't really remember much of what I just watched. By really really watching for half or 3/4 of the time, I really learn what I set out to learn. Works for me.

Kate

Saturday, 14 June 2008 22:20:27 (Eastern Daylight Time, UTC-04:00)  #    Comments [1]
# Friday, 13 June 2008

I mentioned in an earlier post that applications with manifests that require Administrator privileges will show up with an overlay icon of the shield on their exe icon in Windows Explorer. Applications with manifests that deny needing Administrator privileges will not get the icon. What about applications without manifests? Well, among other things some Vista heuristics come into play. I found some really old executables (15 year old games) and did a little experiment. Obviously these are manifestless apps. I copied Tetris.exe and renamed the copy Setup.exe. That's all I did. The timestamp is still unchanged. But there's a fairly obvious difference as a result of the rename:

If the file name contains Setup, Patch, or some other magic strings then you will get the overlay and you will be prompted for elevation consent when you run it. (If you're curious, Tetris plays just the same elevated.) Then something fun happens. After you run a file called Setup.exe, if your program files directory is unchanged, your registry is unchanged, your System32 directory is unchanged etc, something is probably wrong. Well, not if you're just playing Tetris, but if the plan was to install something, there's a good chance it didn't install. So Vista says:

If you let it try again, it actually uses Group Policy to store extra information about this application - including whether it needs to elevate or not, should be lied to about Windows version, and other settings you can find on the Compatibility tab of the properties:

Why do you care? You care if Vista has wrongly guessed that an app of yours needs to elevate, and prompts you every time. Understanding these heuristics gets you closer to being able to clear away that overlay icon for your not-administrative-at-all application.

Kate

Friday, 13 June 2008 21:45:22 (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
# Thursday, 12 June 2008

How can you avoid the UAC prompt for applications you frequently run? Well, you could turn off UAC entirely, but that's a bad plan. There are two ways: one is realistic and feasible, and one much less so.

The less feasible one is that you could re-enable the Administrator account (not just some account you happen to have that is in the Adminstrators group, but the actual Administrator account) and log on as that. Pretty much everything you do will be elevated and you won't be prompted about it. But I don't want to do that. I want to log on as me. Plus, I kind of want to control my prompt-noprompt life, or we're right back to malware using my powers without me knowing.

So here's my solution. Get yourself an elevated command prompt (Start menu, spot a command prompt shortcut, right click, Run as Administrator.) Consent once and for all (till your next boot) to elevating that prompt. Now everything you launch from there is elevated, no prompt. Don't believe me? Try regedit. Try notepad. Then try, say, editing your hosts file with that notepad. Cool, no?

Leave the elevated command prompt open, and use it whenever you want to do something elevated. No prompting. You have to type the name of the app (Visual Studio is devenv, which you will care if you're still using 2005.) But pretty painless.

Kate

Thursday, 12 June 2008 21:28:29 (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
# Wednesday, 11 June 2008

If you've ever watched Star Trek: The Original Series you know it had a trope or a meme where an "away team" would beam down to the planet and suddenly one of them would be killed. Usually vapourized or dragged off by a yeti or somesuch. And as my four year old once said to me "Red people fall down. Not red people don't fall down." This is also known as the redshirt phenomenon. To this day, when I see three main characters (on any show) plus some guy we've never seen before, someone is sure to call that guy out as a red shirt just as the suspenseful music starts to rise.

Well, Matt Bailey has run the math. Are red-shirted crewmen more likely to die than yellow or blue shirts? Indubitably. But - is it good news or bad news, redshirt-wise, if the episode also features what I've always referred to as Kirk putting his boots on, though strictly speaking he does that after the plot point Matt refers to as "meeting" alien women. See how some solid data analysis and well chosen visuals can truly illustrate the redshirt phenomenon on Star Trek, at least for TOS. The powerpoints alone are worth the click.

Kate

Wednesday, 11 June 2008 18:53:20 (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
# Tuesday, 10 June 2008

Have you seen the Deep Zoom example with the Hard Rock Cafe artifacts? It's pretty darn cool. If you don't have Silverlight and would like to see why it's cool, there's a video on the Mix blog. But I love the zooming into Virtual Earth example I was just sent. It's a CodePlex project, so you can be part of it. It can take a while to load so be patient. I showed it to someone who said that Google Earth did that, but requires downloading and installing an application. If you already have Silverlight, you don't need anything else to use this. I like that.

Kate

Tuesday, 10 June 2008 18:43:49 (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
# Monday, 09 June 2008

I've been carrying this link around for a while and it seems like a good time to share it. Rico Mariani knows a LOT about performance and why it's important. And he knows that many of us no longer care. We trust optimizers and runtimes and frameworks and auto-caches and such to take care of things for us. Sometimes, we're right to do that. Other times, we're not. Thinking about games will naturally make you think about performance.

Kate

Monday, 09 June 2008 18:24:50 (Eastern Daylight Time, UTC-04:00)  #    Comments [0]
# Sunday, 08 June 2008

One of the questions I got in the booth at Tech Ed was about First Chance Exceptions. The attendee was getting these messages in the output window in Visual C++ warning about "first chance exception" and was concerned about it. A long-long-neglected neuron fired. I think I ran an article in a journal I edited 10 or so years ago in which Mike Blaszczak covered this. And I think the bottom line was "don't worry." So I ran a quick search and found this knowledge base article that indeed says "don't worry." The debugger gets the exception first, before your code. It just writes to the screen that it got it. Then your code handles the exception and life goes on as before. If your code doesn't handle the exception, then the debugger gets it again, and then perhaps something interesting happens. But first chance exceptions are nothing.

Having a long memory for tiny details is handy sometimes.

Kate

Sunday, 08 June 2008 18:20:53 (Eastern Daylight Time, UTC-04:00)  #    Comments [0]