# Monday, 29 September 2008

Let's see ... 50% early bird discount from an already low price (500 for 2 days, 250 for 1, discounted to 250 and 130 for the next two weeks so act fast), a full version of Visual Studio Professional, a full version of Expression Web, the DVD set from Tech Ed 2008, and a coupon for $100 off a DevTeach registration. That's not counting the eval versions of VSTS and Expression Studio. Holy Smoke, this would be a cost effective thing to attend if you didn't even go to any sessions! But the sessions are listed, and they are good ones. Need to know how to build a real application in WPF? Use the ASP.NET AJAX extensions in your web app? Use controls and styles in Silverlight? Lock down your SQL server? This is the conference for you. Local, inexpensive, timely, ... and a bag of goodies.

Plan to be there. And that includes doing a little reading first ... these sessions don't start at "what is this Visual Studio you speak of?" so there's a resource list to get you ready to attend.

Monday, 29 September 2008 12:12:39 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 28 September 2008

Richard told me about this "get" a while back but I missed the release of the show. Soma is the senior vice president of the Developer Division at Microsoft, and leads the teams responsible for providing tools and developer platform technologies targeted at developers, designers and teams involved in software development. This includes Visual Studio for professional developers, Visual Studio Team System for software development teams, Visual Studio Express and Popfly for non-professional developers and hobbyists, and Expression Studio for designers. That's a lot of responsibility, and if you use Visual Studio then Soma's opinions matter to you. He talks to Carl and Richard about how he got to where he is now (he's been at Microsoft almost 20 years, and part of the attraction was the Seattle weather, which makes sense if you know he was in Buffalo when he took the job.) The interview is full of behind-the-scenes glimpses into how decisions get made ... a fascinating conversation. Read and enjoy!

Kate

Sunday, 28 September 2008 11:48:30 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 27 September 2008

Tim Stall wrote an interesting post about test harness code that exposes your possible multithreading bugs, and the performance costs of preventing those bugs with the C# lock keyword. And he linked to quite an old article by Mike Stall (don't ask me if there's a connection between the two, I've never met either of them) that I really liked. It buckets threading bugs according to how difficult they are to reproduce, understand, and fix. My favourite entry in the list is the last one:

10) Stuff that's provably unsolvable, but for which customers demand a solution anyways.

Been there, done that, alas no Tshirt.

Kate

Saturday, 27 September 2008 09:21:37 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 26 September 2008

The PDC site is full of announcements (and there will be more in the days to come, based on some emails I've received) so there are even more reasons to attend than before. The number one reason to come to PDC is to LEARN. Well some topics just don't fit into 75 minutes, and attending 3 different 75 minutes sessions by 3 different speakers who may or may not have co-ordinated their coverage is a strategy that might work if you're lucky, but might not work either. Enter the PDC Symposia - co-ordinated coverage of the two MUST LEARN topics this year - concurrency and cloud computing. Don't worry, you don't pay any extra or anything, just choose to attend these sessions on the last day.

The second reason to go to the PDC is to GET THE BITS. PDC has always been the place to get the fresh-out-of-source-control latest build of something that won't see beta for a long time yet. It's already been announced that those bits will include Windows 7 and will come on an external drive, not a big stack of DVDs. Cool!

The third reason to go to the PDC is to MEET PEOPLE. An utterly astonishing array of executives and wonder-brains are giving the keynotes. As well, the speakers are essentially all internal Microsoft people who've been working to create the technologies they're showing you. And the attendees are a cross section of developers and architects who really care about staying ahead of the curve and learning what's coming before it comes. A single lunch with any of these folks could change your life, or at least your job.

Register while you can! And if you see me there, say hi!

Kate

Friday, 26 September 2008 09:13:49 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 25 September 2008

Steve, a former C++ guy and current PCP guy, tells stories very well... just three of the reasons I like him. He blogs very infrequently, but when he has an update it's worth reading. This one is funny and informative. Plus, it features links to videos of presentations about the Parallel Computing Initiative. I've linked in the past to videos in English that are hosted on a page in French, so I know you can all handle it. Consider it Canadian Content even though the videos are from Paris. Go, read, watch, you'll enjoy it.

Kate

Thursday, 25 September 2008 08:47:15 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 24 September 2008

Billy is one of my heroes. He knows how to solve problem with software and he knows how to speak his mind. Here he is talking about WPF and Silverlight - shiny new ways of making applications, that work best in the hands of someone who's been making applications a long time and knows a thing or two about users and user interfaces. If you missed him on DNR TV, here's that episode. This one lets you see what he's talking about - highly recommended.

Kate

Wednesday, 24 September 2008 12:54:45 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 23 September 2008

I love reading Internet histories. Some say it's because I was around for most of it :-) but not so! The Internet was 20 years old when I started using it almost 20 years ago. Here's a nice summary that starts with the idea of packet switching and goes through iTunes, PayPal, MySpace and YouTube. It's a good read.

Kate

Tuesday, 23 September 2008 12:11:50 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 22 September 2008

FreeRice is a strange little game that asks you what words mean. Does rejuvenate mean bewilder, pierce, evade, or restore? As you play, it assigns you a score, the higher the better, and also tracks the number of grains of rice that will be donated to the United Nations' World Food Program.

If you get a question right, you are asked harder and harder questions. The first time I tried this, I got the first 25 words in a row correct and then missed flagitious. I noodled around for a while and my score was around 49. They say over 48 is rare. Months later, with some time to kill online, I tried it again and my score topped out around 53. Wow.

They say "FreeRice has generated enough rice to feed more than two million people since it started in October 2007" although I guess that means two million people one meal each, it's still pretty impressive. And they've added subjects like Math and Chemical Symbols, though I haven't tried those. Give it a whirl, it's fun!

Kate

Monday, 22 September 2008 09:24:02 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 21 September 2008

One of the most mind-clearing features of C++, C#, VB, and their ilk are exceptions. Rather than constantly checking a cascading series of return values, looking for false, -1, null, and whatever other error-signalling values you made up on the day you were writing the code, you can write relatively clean and neat code knowing that catastrophic errors (we have no more memory, the file you just chose from a list no longer exists, apparently I'm not allowed to write to the hard drive at all) will be handled. In C++, the "unwinding the stack" aspect of exceptions, with the memory cleanup and destructor-calling done for you, is a big part of writing clean code that is also memory-leak-free.

But have you ever thought about what happens to half-constructed things when an exception goes off? That is, when the constructor throws an exception before its work is done? I have had people tell me "oh simple, never throw an exception in a constructor." Wrong! A major motivation for the existence of exceptions is the existence of methods (like constructors) that don't have a return value to check. The rule you're half-remembering is "never throw an exception in a destructor" and the reason for that is to prevent weirdness when an exception triggers an unwinding and some destructors and then one of them throws another exception.

So what does happen to a half constructed object when an exception is thrown in the constructor? Who better to ask than Herb Sutter? He shows how C++, C#, and Java all answer this question... and his commenters toss in some other languages too.

Kate

Sunday, 21 September 2008 08:17:44 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 20 September 2008

Others have noticed this (Alexey Govorin, for example) but I tend to forget about it until just before I'm going into a meeting and feel that an export of work items would be helpful. I have some queries set up in VSTS that include the bug description. Here's how they look in Visual Studio.

Description is quite a long field, and when I open the query in Excel (didn't know you could do that? Right click the query in the Team Explorer pane) I see this:

Some, but not all, of the Descriptions are coming up all ####. Now this is what Excel does when something is too long for the column width. So it makes sense to look at things like widening the column, turning on Wrap Text, and the like. But the quickest thing that works for me is this: select the column. On the ribbon, drop down the formatting choice and choose Number. Not Text, which is what I would expect, but Number. Presto - I see all my Description entries.

Why does this work? I have no idea. But I hope this helps someone else.

Kate

Saturday, 20 September 2008 08:02:17 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 19 September 2008

Microsoft Canada is trying something different this fall and winter. A paid conference featuring material from this year's TechEd USA, delivered by excellent local speakers and coming to a city near you. Some cities have two day events, others a single day.

  • Toronto, October 29th and 30th
  • Montreal, November 6th and 7th
  • Ottawa, November 27th
  • Winnipeg, December 4th
  • Calgary, December 10th and 11th
  • Halifax, December 17th
  • Vancouver, January 21st and 22nd

What will the talks be like? What will it cost? Will there be cool swag? The web site doesn't really say right now, but I've been told the talks will be actual TechEd talks, the speakers will be industry leaders (my friends and colleagues, maybe me if we can make the dates work), and there will be 5 or so tracks, meaning over 30 sessions, so something for everybody. The early bird discounts will be substantial, so watch that web site for updates!

Kate

Friday, 19 September 2008 16:54:42 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 18 September 2008

Some time ago a prospect called me to ask if I could help him solve a really frustrating problem. He had some software that was working and that he had delivered to dozens of clients, but sometimes it froze. It featured a lot of timers and he thought the problem was that one of them stopped firing, but he wasn't really sure. Could I do a code review for him and find where he had been stupid or sloppy to cause this problem?

So this is an intriguing concurrency problem, because multiple overlapping timers are not something you can definitively test, so I answered him "sure, send me the code." He sent it along and unfortunately it was really quite well written. That's unfortunate because I couldn't point to some obviously sloppy or stupid code and say "fix this and all will be well." We gave him some advice about how to gather problem information from users when they reported that one of the clock/timers "froze", and wished him luck.

Months later he came back, saying that it was a distinguishable subset of his clients that were having the problem, and please could we look again? He sent us the source code, as well as a deploy package that had gone to the most recent client to experience the problem. At first, we couldn't build his source code, because he had a whole pile of custom controls and funny license files and so on. So while we were waiting for him to send us things, we played with the executable. We couldn't make it misbehave. If repro cases don't come easily I usually switch to reading the code and imagining what could cause what I'm seeing, but when that doesn't work I'm back to trying for a repro. We were hoping it was having some sort of leak - memory, handles, something like that - which was freezing or hanging it. Repeated perusals of the source code convinced us the timers were a red herring, leaving mystery leaks as our best guess.

Did you know you can get Task Manager to show you more than just memory and CPU usage for your applications? On the View menu, choose Select Columns:

Then check off what you want, such as Handles and GDI Objects. Now watch while the application runs:

In this case, the deployed application didn't have a memory or handle leak, but it did seem to have a GDI Objects leak. The count kept going up, and never went down. We even discovered a way to make it go up -- there were buttons in the UI forming a toolbar of sorts, and they had a special effect as you moused over them and moused off again. Every time we caused the special effect to fire, the GDI Objects count would go up. This is the sort of thing that's impossible for developers to repro, because we don't idly wave our mouse back and forth along a toolbar wondering which button we should click. We test for like 5 minutes and say "looks ok to me." But we had been told that the freezes generally only happened when the application ran longer than usual - 4 hours rather than the usual 2 or 3. So we were hoping for some sort of leak that generally had no consequence, but could kill you if you waited long enough. So having learned how to drive the count up, we sat there waving the mouse around and driving it up. When we drove it past 10,000 - the application froze. Yay! Repro!

So we went into the source to reproduce it under the debugger - but the version we built from the source he sent didn't show the same behaviour - the GDI Objects count was well behaved and went up and down a little bit, never getting anywhere near 1,000 never mind 10,000. And interestingly, the source code he had sent us just used regular buttons in that toolbar like area. Aha! I blame the special button.

I asked him, since I didn't have the source for the version that was freezing, to tell me more about the button and where it came from. He told me the name and the URL from which it was downloaded. I went there and got a version number and file name, and confirmed he was running the most recent version available from that site. He also told me that now that I mentioned it, the only folks who'd reported freezing were the folks for whom he'd included the special button. So I knew it had to be the culprit. Time for some searching. Several people claimed that control had a "memory leak" problem. What's more, the developer of the control had released a newer version, which hadn't been mirrored over to the URL our guy found it from.

I told him all this, he went and got the newest version of the control, built the solution, and indeed the GDI count is now well behaved, and no-one has been able to make the application crash, freeze, or hang ever since. (I sat on this story for a few months to be sure.) So there you go, problem solved! I wouldn't have thought it was possible when we started. The moral for me is to use all the tools you have, and to use them fully. This problem was solved with Task Manager, an insistence on trying to reproduce the problem, and Live Search. Phew!

Kate

Thursday, 18 September 2008 16:39:56 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 17 September 2008

A recruiter called me looking for an architect. I would be a good fit for the job if I was available - I have tons of Internet programming experience, architect systems all the time, services and desktop among others, and as for quiet confidence and entrepreneurial spirit, those describe me just fine. But I'm not available. It occurred to me that a reader of my blog might be. So if you're interested, please contact the recruiter. Good luck!

A software firm (30 people) in downtown Toronto is looking for a full-time architect to help build its next generation of Email System.

The organization is a divsion of a large U.S. based firm with a CEO with a track record of successful entrepreneurial start-ups and exits.

The firm develops applications within Microsoft Exchange and requires an architect with the following skills:

  • A high-level design capability as well as the willingness to be hands-on within the development cycle
  • Experience building applications within Microsoft Exchange, using MAPI, Active Directory
  • Experience building applications around Microsoft Outlook
  • Service oriented backend infrastructure
  • SMTP expertise
  • Desktop application and integration development experience

The right person should have a passion for coding and building systems, have quiet confidence as well as an entrepreneurial spirit.

If you are interested, or know of someone that might be appropriate, please contact Mike Fox at mfox@brightlightsinc.com or 416-406-1777.

Kate

Wednesday, 17 September 2008 18:05:25 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 16 September 2008

Here’s a free and useful add on for Office 2007. It enables “save as PDF” from a variety of Office products. Here’s what Save As looks like in Word 2007 now that I have it installed:

No muss, no fuss. No products that make my computer hang :-).

Kate

Tuesday, 16 September 2008 07:23:38 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 15 September 2008

At the moment I only have one fall speaking commitment settled and it’s one of my favourites - Tech Ed Developers Europe. Barcelona will be warm, both in the temperature sense and the personal interaction sense (though I do predict exposure to pocket-picking, bag-lifting, and other forms of theft once again). The attendees will be energetic and appreciative. The other speakers will be fun to hang around with. The ancillary events will be fun fun fun.

My topics are the Vista Bridge, and some new C++ features. We’re still working on the abstracts and titles, so I’ll post an update when they’re locked.

See you there!

Monday, 15 September 2008 17:06:49 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 14 September 2008

This year we FINALLY get a PDC. I have been looking forward to it for a long time, but booked my attendance and my flights during one of this year’s blogging hiatuses (hiati?). If you are responsible for any kind of strategy or planning, if you are starting a project that will take several years to finish and you want to use the latest technology while you’re building it, or if you just love making software and can’t wait to see what’s next, then the PDC is for you.

http://www.microsoftpdc.com/

It’s the last week of October, in Los Angeles (the only thing about it I don’t really like) and it will just cram your brain with information you actually can’t use to write code quite yet -- but that you really need to plan your own roadmap over the next few years. If you want to know something about a product that is already shipped (say, Visual Studio 2008) then this is not the conference for you. Even if your area of interest is software that is mostly written, maybe has a CTP out already, and will be released during 2008, then again, PDC is not really going to help you. PDC is about stuff that is just starting now. PDC is about getting a big headstart on those who waited till a product was released or a public beta was available. Here’s the list using their own keywords (the numbers are how many sessions are on that topic)

Ad Platform [2]
ADO.NET [3]
ASP.NET [9]
Cloud Services [27]
Dynamics CRM [3]
Entity Framework [3]
Expression [2]
HPC [1]
Hyper-V [2]
Identity [8]
IIS [2]
Internet Explorer [2]
Languages [8]
LINQ [4]
Live Mesh [5]
Live Platform [11]
Office [4]
Oslo [6]
Parallelism [7]
SharePoint [3]
Silverlight [11]
SQL Server [14]
SQL Server Data Services [6]
Sync Framework [2]
TFS [3]
Unified Communications [3]
Velocity [1]
Virtual Earth [1]
Visual Studio [13]
VSTS [6]
WCF [6]
WF [8]
Windows 7 [5]
Windows Home Server [2]
Windows Mobile [2]
Windows Server [1]
WMI [1]
WPF [5]
XNA [1]

Wow - 27 sessions on cloud stuff? Pay attention.

I also chose a random session so you could get an idea of the level of conversation PDC is for:

Unified Communications: Futures

Kyle Marsh, Chris Mayo

In this session we unveil the future of Microsoft Unified Communications (UC) technologies. Be among the first to see the UC roadmap, watch the new features in action, and walk though the code that makes it all possible. Come see how you can deliver breakthrough applications by embedding rich presence, build click-to-call features including voice and video, create communication workflows using speech and IM, and integrate Microsoft Exchange 2007 features and data.

Tags: Advanced, Unified Communications  

This is one of the few conferences in the world that I get myself to (that's right, my own money) as an attendee. I'm not there to speak, work a booth, or be on a panel. I'm there to learn, and you should be too. See you there!

Kate

Sunday, 14 September 2008 11:39:29 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 13 September 2008

Or put another way, is VB just C# without semi colons? Well, yes and no. If you work in the big wide world of many different programming languages, frameworks, libraries, and operating systems then C# and VB are so close as to be almost indistinguishable. They both have great support from Visual Studio, they both produce managed code that runs on the CLR, they call the same framework functions, they have keywords for the same CLR concepts, and they both have a community of support, sample code, tutorials and the like. But those communities aren’t twinned – some samples are available only in VB, and others only in C#. For historical reasons there are a lot of C# programmers inside Microsoft, and perhaps that’s why VB samples can be a bit thin on the ground.

This less-than-100%-overlap between the samples, tutorials, and so on for the two languages results in people who are proficient in one language trying to read (or worse, write) in the other. Sometimes a great C# developer will be asked "where’s your VB sample? Quick, translate your C# one right away!". Other times a great VB developer will be trying to write their own VB code while reading samples or tutorials written in C#. It can go in the other directions, too.

But although these two languages have a great deal in common, they are different, and in more than just syntax. There are features in each that aren’t in the other. There are natural idioms, too. Idioms are a way of writing things that are natural to one language or identifiably belong to one language. Choosing an example not from the VB/C# world, but from C++ or C, it used to be just so normal to write

if (p=SomeFuncThatMightReturnNull())
{
//do something that relies on p not being null
}

That’s C++, and a deliberate single equals sign. I am assigning p the return value from the function. Then I am testing that value. (Quibble: I am testing what the = operator returns, which is the value just assigned for all well written = operators.) If it’s not null, we’ll do the stuff in the braces. Sometimes I used to come across this instead:

p=SomeFuncThatMightReturnNull();
if (p)
{
//do something that relies on p not being null
}

Or even

p=SomeFuncThatMightReturnNull();
if (p != null)
{
//do something that relies on p not being null
}

Now these other ways of doing it aren’t wrong, they will compile and work, but they demonstrate a lack of familiarity with C++ idioms, with a C++ way of thinking. They are usually written by people who aren’t very comfortable with pointers.

Similarly, in VB, I have seen more than once this sort of thing:

        Dim retval As Boolean = False
        If x > y Then
            retval = True
        Else
            retval = False
        End If
        Return retval

Again, that’s not wrong exactly, but it’s not what I like to write. I prefer just:

        Return (x > y)

Sometimes people say I write C++ in VB, because that's a very C++ way of writing things. But I find it not just easier to read -- it's less bug-prone. (Copy and paste errors like having True in both clauses, for example, will make you crazy.) I know that it’s kind of a C++-ish way to express myself, but it feels natural to me and it works. People who are less comfortable working with Booleans tend to prefer the first, more verbose way. They can see the whole thing laid out for them. It’s not wrong, just different.

Well, it turns out those who try to write VB when they’re proficient in C# are likely to run into a lot of differences in thinking and expression when they take on that task. It might be syntax tripups, missing the use of a helpful VB feature that isn’t in C#, or just writing code that doesn’t use the VB idioms. Kathleen Dollard has amassed a huge list (77 at the moment) of things you should know if you want to write VB code. Required reading for C# people who have to write VB, entertaining for those who like VB, and what's more, plenty of experienced VB developers could learn a thing or two from it (I did.)

Kate

Saturday, 13 September 2008 11:26:18 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 12 September 2008

Vista gets a lot of bad press it doesn’t really deserve. For example, it crashes way less than XP for me. Some applications behaved oddly at first (primarily because of UAC and Virtualization) but I have either learned workarounds, such as running the app elevated, or upgraded or replaced the apps that were causing trouble. The slow file copy thing drove me insane, but SP1 took care of that. I really have very few complaints left about my computer, and the ones I have are aimed at specific applications (yeah, Outlook 2007, I am looking at you when I say that, and Adobe, don’t think not meeting my eyes will keep you out of my bad books) rather than the operating system.

Still, who wouldn’t want to make their operating system run faster and smoother? Here are some helpful thoughts and guides:

Windows Vista Performance and Tuning. A downloadable paper from Microsoft. Simple stuff here like choosing the right power management plan, using ReadyBoost, tweaking your search settings, and so on. Worth a read.

Vista Annoyances Resolved. Despite being annoyingly spread over 9 pages (see what taking ads does to you?) it has some good stuff. You’ll see explanations of SuperFetch, ReadyBoost, restore points, and more.

Roundtable with Mark Russinovich. An upcoming special roundtable on Vista Performance. Send your questions in ahead of time, then tune in for answers.

Learn a little, enjoy your daily computing life more.

Kate

Friday, 12 September 2008 19:21:46 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 11 September 2008

The Tech Ed Online folks have kicked off a Women in Technology page. They’re aggregating blogs, videos, news, profiles and more. Take a look around – I’ve added it to my favourites.

Kate

Thursday, 11 September 2008 10:23:01 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 10 September 2008

Take a look at this map from Jeff LaPorte:

I wonder if this shows some sort of era-of-adoption effect, where folks in the US had widespread Internet access so they got started with AIM and never switched, then Canada and Australia picked up Messenger, and other places see a popularity of even more recent clients? Or perhaps it’s an artefact involving what kind of people use a messenging-interop solution? Whatever the mechanism, I’m a typical Canadian I guess since I use Messenger.

Kate

Wednesday, 10 September 2008 10:19:43 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 09 September 2008

Whenever an application blows up and offers to send information to Microsoft, please please say yes. On Vista it’s described as “checking for a solution” to make it more obvious what’s in it for you.

Sometimes, when you send this information to the giant Windows Error Reporting mother ship, you get a response that your blowup was caused by a known problem, and a link you can click for more information. That doesn’t happen to me very often, which I guess means I am among the first to find problems in shipping software. But that doesn’t mean you can’t benefit from the fix when the developers finally get around to acting on the reports they get from the WinQual program. Here is something you should do every month or so if you can remember.

First, bring up Problem Reports and Solutions. It’s on the control panel, or just click Start and type Problem, then press enter. You’ll see something like this:

Click View Problem History on the side. You will see a list of stuff that has blown up on your computer over the months.

Interesting, isn’t it? Click the Select all box at the top, and also Check Again For Solutions to Other Problems. Now click the Check for Solutions button. It will go and have a think:

It might also ask you if it can send extra info for some blowups, I always say yes. In for a penny in for a pound eh?

Then, the cool part. New solutions!

Click a link and you’ll get some more info with a link straight to the page that lets you get the update or latest version or whatever that specifically fixes the problem you had on your computer.

You can clear your problem history, but I am not sure why you would. You never know when a fix will show up for a problem you already had.

Kate

Tuesday, 09 September 2008 10:14:33 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 08 September 2008

Check out http://www.easyduplicatefinder.com/  - it has tracked down all the identical demos, powerpoints etc all over my C drive in quite a short time. I haven’t let it do the deleting yet, but the finding is worth a lot to me (I can delete for myself once they’re found.) Three gig of duplicates and that’s without looking on the networked shares where I store things when I’m done!

Kate

Monday, 08 September 2008 10:05:35 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 07 September 2008

The guys call me a regular now, and I suppose I am. Here’s another hour of rambling and fun covering Vista (especially the Vista Bridge) the Vista things you’re not allowed to implement in managed code, C++, the MFC update, concurrency, and whatever else popped into my head while we were talking.

KateP>

Sunday, 07 September 2008 10:03:39 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 06 September 2008

Imagine you have a bug that happens only in production. You connect to the production server and do a whole pile of exploring, and now you think you know what you need to tweak on your dev box to reproduce the problem and get started on fixing it. Or perhaps you are half way through figuring something out on your own machine and you need to hand over to another developer. Maybe you just want to switch to your laptop because you’re leaving the office. There are many reasons why you might want to copy breakpoints between computers. As you may know, they are kept in a .SUO file (Solution User Options I believe) in your solution folder.

But heavens above, do not try to copy that file from one machine to another! As John Robbins says:

The .SUO file is the bane of your existence. Nearly all the problems you encounter with Visual Studio are the result of a corrupt .SUO file. Sadly, it seems all it takes to corrupt the .SUO file is your heart beating. In other words, whenever you have Visual Studio crash, refuse to debug, or behave strangely it's the .SUO file's fault. Whenever anyone asks me about strange Visual Studio behavior, my instantaneous response is "Delete the .SUO!"

So John took care of this with his own add-in. You can save a set of breakpoints into a little file. You can then move the file between machines and use it to set all those same breakpoints on another machine. Or, probably even more fun, you can set aside the 20-some breakpoints, tracepoints, conditionals and so on that you painstakingly set up for bug A, save them and then clear them all, set different ones for the drop-everything-urgent bug B, and then when B is fixed you can get all your old breakpoints back and return to working on A. John is giving the add-in away, it works for both native and managed code, so go on, get it now.

Kate

Saturday, 06 September 2008 10:01:09 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 05 September 2008

One of the persistent myths of managed code is that you can’t have a memory leak if you’re a C# or VB developer. You really can. In this intriguing post, Sasha Goldshtein asks "Is it a managed or a native memory leak?" and then shows you some clues to lead you towards an answer.

Kate

Friday, 05 September 2008 09:58:05 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 04 September 2008

While I was at Tech Ed Developers (US) this summer, I spoke with Craig Shoemaker for his Pixel8 podcast. We talk about UI, and Vista, and the usual things. I have some distinguished company in this interview but if you don’t want to listen to Ted Neward you can zip ahead to the 18 minute mark for me.

Kate

Thursday, 04 September 2008 09:56:06 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 03 September 2008

In case you were worried that Microsoft efforts like the Parallel Framework (PFX) would be aimed only at managed developers, leaving native developers sitting at the little kids table again, take a look at the Parallel Programming in Native Code blog. It hasn’t been updated terribly often, but perhaps some feedback would encourage them (or is it just Rick?) to keep it current :-). The one downer: "this is technology we're currently exploring and I don't have any ship or CTP dates to announce." Stay tuned, I suppose.

Kate

Wednesday, 03 September 2008 09:52:03 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 02 September 2008

Tech Ed Developers (Europe) is spotlighting a number of the top sessions from last year, free for anyone to watch. Mark Russinovich (on Wikipedia, his blog) knows more about the internals of Windows than anyone else who’s allowed out in public, and in this session, The Case of the Unexplained... (rated 5 stars out of 5 by attendees), he covers various mystery bugs and how he tracked them down. I’m slightly disappointed that some of the stories ended "so I logged a bug with that team" – I would have loved it if these were all fix-your-config stories, but still to see the techniques is very cool, and if your own code is causing the mystery CPU spike or resource leak, you will really benefit from the tools and approaches Mark shows. Sure, it was at the IT Pro half of Tech Ed, but developers need to know this stuff too!

I would like this stage someday. It's the Barcelona keynote stage, used for wildly popular breakouts also.

Kate

Tuesday, 02 September 2008 09:41:47 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 01 September 2008

At Tech Ed Developers (Europe) last November I spoke with Lori Grosland about Woman In Technology topics, life, the universe, and everything for just over ten minutes.

http://microsofttech.fr.edgesuite.net/TechEdOnline/Videos/EU_1_lgrosland_kgregory_FB_500.wmv will take you directly to the video, or try http://www.mstechedonline.com/library/Library.aspx and search for Kate. If you use that second approach, also try clicking the Women in Technology Link to see lots of other videos from the fish bowl and the WIT lunches at Tech Eds around the world.

Kate

Monday, 01 September 2008 09:38:22 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 02 July 2008

I enjoyed meeting some friends from the C++ team at Tech Ed and taking a turn in the booth. Li Shao and Marian Luparu were there when I was, and plenty of customers came by. Now you can read a nice summary of the customer conversations on the C++ team blog. The comments keep the conversation going. They are reading, so go ahead and join in!

Kate

Wednesday, 02 July 2008 12:21:01 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 01 July 2008

If you have some native code that you have sweated long and hard to create, and now you want to make a shiny new user interface using managed code (WPF probably) or expose the engine to web services (WCF probably) or the like, I hope you know how to do that. Most of the interop discussion out there is focused on that direction. But what if you have a native application and you want to use some cool capabilities from the .NET Framework? Most people really only know how to do it through COM. Your native code can pretend the .NET object is a COM component. But there are other options.

I've referred before to reverse P/Invoke - this is when a .NET delegate is made into a native callback function and handed to native code. It works, but in a way it's still managed-calling-native since the managed code has to start things off by making the delegate and handing it over.

There is a third way. It's a little complicated, but I bet it's faster performing than COM interop, and parts of it could be automated. Essentially, you wrap a C++/CLI managed class around some C# or VB managed class, and then you wrap a native class around that using gcroot<>. It's all explained with diagrams and samples by Sasha Goldshtein. Take a look!

Kate

Tuesday, 01 July 2008 11:24:58 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 30 June 2008

Justin Etheredge made an interesting point about code readability. He asks us to compare these two functions:

public static int GetNextSize(int i)
  {
    //multiply it by four and make sure it is positive
    return i > 0 ? i << 2 : ~(i << 2) + 1;
  }
 
public static int GetNextSize(int i)
  {
    return Math.Abs(i * 4);  
  }

They do the same thing. One might be faster to execute if there was no such thing as an optimizer. But bit twiddling is notoriously hard to read and maintain. In the comments you can see people saying "don't those two actually return different values?" And that's really his point. Human beings have to read your code and maintain it. They have to understand it. And if you pre-optimize, if you decide that bit shifting is faster than multiplying, you make like harder for everyone after you. Since that might include you yourself, a few years from now, think twice about it. Write readable code. Let optimizers optimize. People time is way more expensive than CPU time.

Some folks think this is a good rule for staff, but that consultants who charge by the hour should go with the clever code. Generally they have two reasons for this. First, they worry that if they write the simple code, someone will look at it and ask "how much an hour did I pay for that!?!?!".  I don't fuss about that, I just think "one dollar for hitting it with a hammer...". Second, they look forward to being brought back every time any changes need to be made to that code, since they're the only ones who understand it. I think that's shortsighted. Once the client realizes you've done that, you'll never get to work on any new projects for them. I'd rather work on a steady stream of new stuff than be stuck bugfixing old stuff for people who resent that I tricked them with my cleverness. And when I do have bugfixing to do, I appreciate being able to read what I wrote :-).

Kate

Monday, 30 June 2008 09:57:31 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 29 June 2008

Lately some people I know have been revisiting the "why are so many Microsoft samples in C#" question. They are VB programmers, and they're just not feeling the love. Man, I know how that feels :-). Several recommendations of Instant VB reminded me that I had been meaning to try Instant C++. This is a $139 product that converts C# to C++/CLI (there is also a version to convert VB to C++.) There's a demo available, and it serves as an excellent example of what is both good and bad about code converters. Here's a comparison of the source and converted code for a demo I use to illustrate UAC in Vista programming:

Sure, it's boring as all get-out to change string to System::String^, though I would probably have done a using for the namespace and just said String^. (In fact, there's a using namespace System; in there already, but the converter doesn't seem to take advantage of it by omitting namespaces.) But there is so much here I don't like. First, I'm a String^ s person, not a String ^s person. Then there's how it handles the using. Hello? Stack semantics anyone? No? And where's my project file? I pointed this at a .csproj file, but I don't seem to get a .vcproj file in return, so I'll need to create a project and add the converted code into it. That's probably ok if I just want to convert sample code to paste into my real project, slightly less ok if I wanted to convert the sample project and test it.

Still, if you're using a relatively new technology, and you need to get to it from C++/CLI because you're writing a wrapper for legacy code or the like, and you get SOOOOO BOOOORED going through samples changing . to :: and new to gcnew and adding ^, then this is a cool tool to save you hours of that kind of thing. Just don't skip the step where you actually make it read like proper C++ code.

Kate

 

Sunday, 29 June 2008 09:38:12 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 28 June 2008

Because I graduated from the Faculty of Engineering at the University of Waterloo, I got an email about their participation in Go Eng Girl!, a province-wide initiative to show girls in Grades 7 through 10 what engineering is all about. If Waterloo isn't the closest university to you, go ahead and see if something nearer is also participating. I suspect, though, that many of us would like our daughters to take engineering at Waterloo if they're to take it anywhere - the reputation is excellent. (Remain calm if you support another institution; I also have a graduate engineering degree from Toronto and have worked alongside excellent engineers from a variety of universities, so let's not go there. And no, I haven't forgotten the weather in Waterloo.)

Looks like you can register online just before school starts again in the fall. Bookmark the site and check it out closer to the date.

Kate

Saturday, 28 June 2008 21:59:19 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 27 June 2008

Seriously, once you have installed SP1 of Vista, if you have any more troubles with it, you can get technical support for free.

Free unlimited installation and compatibility support is available for Windows Vista, but only for Service Pack 1 (SP1). This support for SP1 is valid until March 18, 2009. Chat and e-mail support is available only in the United States and Canada.

(Phone support I guess is available worldwide.)

If something still won't work for you on Vista, drop them an email or open a chat session, and get it sorted out. It's free, so why not?

Kate

Friday, 27 June 2008 21:52:02 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 26 June 2008

This delightful article by Maria Blees slipped by me during my most recent blogging hiatus. It presents a handy framework to run unit tests on native code, some macros to hook you into VSTS code coverage, and some excellent guidance on the reality of testing and refactoring. It also recommends some nice resources. (How fun is it to read a plea (in a pdf she recommends) for designing to be testable and not to put real code in your event handlers, then realize it's from six years ago?) If you write C++ code, go read this article now. It has plenty of real meat in it, and concludes with this paragraph:

My goal has been to show that unit testing native C++ can be easy, fun, and you can get started right now. To give you an idea of the power of WinUnit, take a look through the TestWinUnit project, where I used WinUnit to test itself. Those examples are completely real world and will show you advanced usage you can apply to your own unit tests. If you've been struggling with your native C++ unit testing, WinUnit makes it easy—and any time you can make testing easy, you're far more likely to actually do it.

Mission accomplished, Maria!

Kate

Thursday, 26 June 2008 21:44:07 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 25 June 2008

Before Vista, you could right-click a shortcut, executable, or whatnot and choose Run As ... to run that item as another user. 99 44/100 of the time you wanted to run it as your administrative account, if you were one of the 3 people on the planet who had an administrative account. Occasionally, you were borrowing someone's computer and wanted to run something that relied on Windows integrated security, for which you wanted to be yourself. And more relevantly for me, you might want to demonstrate how Windows integrated security worked, say by having 3 or 4 browsers open that were all authenticated (to Windows itself) as different users.

So if any of that rings a bell for you, you want ShellRunAs. It's free, it's from Microsoft, and it works on Vista.

Kate

Wednesday, 25 June 2008 21:31:10 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 24 June 2008

P/Invoke (aka DllImport) signatures are not the world's most fun things to create. You start with a native declaration, and then hand-map native types to the equivalent (you hope) managed types. If at all possible, you head to www.pinvoke.net and look up the API you are calling and paste in whatever some kind soul put on the wiki. If not, well you have some mechanical work to do.

But now the Interop team has a little tool for you! Look up the API you want, choose a language, click the Generate button and -tada!- your declaration is ready to be copied and pasted. (Even has doc comments explaining the params.) Not calling a well-known API (maybe it's your own code from a native project?) No problem, paste in your native C++ signature and translate. Need to go the other way around (what native signature corresponds to a managed one?) No problem.

Sweet. The code it generates isn't pretty (for example it doesn't add any using/Imports statements, so everything gets the full dotted name every time, and everything is explicitly declared) but then again, who reads generated code? Stick a comment in front of it saying you generated it and leave it alone. Even if it needs a little hand tweaking now and again (and I honestly don't know whether it does or not) it will still save a TON of time. It's on CodePlex, so go get it.

Kate

ps: The list of APIs is in a XML file, and I noticed the Vista-only ones I tried (restart and recovery related mostly) weren't found, so if you wanted to make a contribution to the project...

Tuesday, 24 June 2008 19:56:13 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 23 June 2008

I said I would post it when I got it.

Wow. Almost as amazing to me as being in a picture with Bill is being friends with so many of the others in the picture. What a day that was.

Kate

ps: I know it looks like most of us are all wearing the same light blue shirt. We're not. Stephen, Scott, and I are all wearing Tech Ed speaker shirts, because we were speaking that day. Across the front row, Dave is wearing his Culminis shirt (it's a slightly different blue) and Morgan her INETA shirt. Dan is actually in a white shirt that is reflecting Morgan's shirt. Unfortunately I can't remember whether John (behind Morgan) was wearing a speaker shirt for sure, but I think so.

Double ps: updates from Rob Zelt and John Holliday.

Monday, 23 June 2008 18:28:29 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 22 June 2008

So imagine you have some managed code, and it calls some other managed code, and that lower level code tries to do something that requires a certain level of code access security. Maybe it wants to write to the files system, or open a network connection, for example. You probably know that there is a stack walk to make sure that everyone has the appropriate permissions. But what if that stack includes some native entries? Managed code called native code (maybe with P/Invoke; maybe with IJW-style C++ interop) and then the native code called managed code (probably with COM interop though there is also "reverse P/Invoke" I suppose. What happens then? Shawn Farkas knows. The whole blog is good reading if Code Access Security and the way the runtime actually works are things you should know more about, but haven't investigated. Bite size pieces of intruiging questions, along with definitive answers. Nice.

Kate

Sunday, 22 June 2008 13:54:08 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 21 June 2008

When I interview people, I throw them lots of softball questions. One of them is "why should I hire you?". Some people think this is a scary and difficult question. On the contrary, it means "here is your invitation to tell me why you are right for this job. Feel free to brag as much as you like. I will now listen while you tell me what is good about you. Extra credit if you have some clue about what is valuable to me." Interview questions just don't get any softer. Yet some people blow it. They answer a different question, usually "why is it important to you that you can work here?" but occasionally "why do you want to be employed?". Fascinating information may come out of your mouth, but it isn't what I asked for. This of course means that I learn something else from your answer - something about your attention to detail, your ability to think of my needs instead of your own (and if you join us, to think of client needs), and your grasp of the business picture here.

Another question that terrifies people is "tell me your biggest weakness." I generally don't ask this because you just get "well I am a perfectionist, I must have all my work complete and beautiful" or "I work too hard I am so devoted" or "my brilliance shines so brightly that it scares others" or the like - bragging disguised as modesty. I already have a question which prompts you to brag. But the other thing is that not all weaknesses are things you actually need to improve or fix. For example, I sing poorly. I have arranged my life so that this doesn't matter. I would never raise it in a job interview. (If I was interviewing for Canadian Idol, it would be a big deal though, wouldn't it?)

If you do get this question, you want to provide an answer that is honest, that identifies something relevant to your workplace, and where you can say what you are doing about it, but more importantly what you need from them about it. "I work long hours and can tire myself when I get caught up in an exciting project. I really value firms that track overtime hours and give me an extra day off from time to time to acknowledge those long days and let me recharge my batteries." "I have very high standards and when I was younger every client got a Cadillac even if we bid a Pinto. I have learned the importance of requirements and project plans to keep my work in scope and make sure I solve the problem we are tackling in the time we have allowed, but it's still a weakness that I can be vulnerable to scope creep." "I think very quickly and solve problems faster than most people, but I can forget to make sure my colleagues are with me and that we have consensus. I work best in an atmosphere where at least one person can keep up when my mind takes off, and remind me to explain my thoughts to everyone."  These answers genuinely reveal something about yourself that would be a fatal flaw in some companies. The thing is, if they're true (and not something you made up thinking this was the "please brag" question) then you don't want to work in those companies. Revealing this weakness will save you from a miserable job. They also set a requirement on the interviewer. Will you give me time off when I have been working long hours? Will you have the discipline and project management to help me stay in scope? Am I doomed to be the smartest person in the room every time? Let the firm assure you (if they can) that they will be a good fit for you.

Take some time to think about your true weaknesses. Lack of experience, impulsive or overly rigid actions, ignoring procedures or refusing to ever deviate from them, freezing out slower thinking colleagues or never making a decision or offering an opinion without checking with everyone else first, skillset that's a little old fashioned, slow learner, new thing junkie, continuous partial attention, tendency to go dark, hesitant to ask for help, afraid of public speaking, horrible grammmar and spelling, everyone has something. Take your time and construct a reply that honestly states your true weakness, then explains the environment you need to thrive given that you are this kind of person. If you like, include something about how you are strengthening that part of yourself already, if you are. Or if that's just who you are (like my singing) don't pretend you plan to fix it. Resolve not to work for firms that can't support you in your weak areas. Never pretend just to get employed.

Kate

Saturday, 21 June 2008 22:54:44 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 20 June 2008

Well, to be honest, the BBC probably didn't sit down and say "We hear Herb Sutter and the gang are going to show Bill Gates all about their plans for lambda functions in C++0x, we have got to get on a plane and capture footage!" They were probably like everyone else "blah blah retiring blah blah career retrospective blah blah dig out those embarrassing old photos" but they happened to capture this meeting. And I actually quite liked the entire episode, really. It's an hour long, stuck up on YouTube as 6 ten-minute segments and a 6 minute one (As each ends you'll get links to the next.) The review meeting with the C++ team gets splonked in repeatedly in between the stuff you've heard a million times about the founding and the dropping out and the early big sales and so on. But there are things I hadn't heard, like just when that picture of everyone looking impossibly young, geeky, and hairy was taken, or how they re-enacted it years later. It's an entertaining and informative recap.

I spotted Herb, Soma, Bill Dunlap, and Ronald Laeremans in the meeting. Any sharper-eyed people who can provide more names?

Kate

Friday, 20 June 2008 22:29:37 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 19 June 2008

Jim Bolla has a list of questions to ask someone you're thinking of working for. Some of them are just kind of warmups to get everyone in the mood, and honestly I would expect the employer to volunteer stuff like "what our organization does" and "how IT helps us do that more effectively" in the little speechy bit at the beginning. But absolutely, if you get to the "do you have any questions" part and you still aren't clear on what the company does, it would be very wise to ask. After that we get into some really good stuff. If you're unfortunate enough to be interviewed by HR you may not be able to push hard on their source control or continuous integration strategy, but you will want to. These are the details that add up to whether you will like the job or not. I know because I come in to mentor these people when they are unhappy and unproductive, and these are the things I end up telling them to change :-).

Kate

Thursday, 19 June 2008 22:18:03 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 18 June 2008

Recently, a young man who has just completed his post secondary education (programming etc) asked me for help connecting to local communities. He's looking for work and he knows from experience that networking and connections are vital. But out of the college atmosphere, it's not always clear where to find people. I suggested user groups, of course. For those of you who live vaguely north-and-east of Toronto, as I do, I suggest:

  • The East of Toronto .NET Users Group. I founded it because I didn't like driving all the way to Mississauga for user group meetings. Chris Dufour runs it brilliantly. Expect speakers from Microsoft, INETA speakers from all over North America, me once or twice a year, plus pizza for everyone and door prizes for a handful of folks each meeting. Meetings are generally in Oshawa or Whitby.
  • Durham Personal Computer User's Club. More consumer focused than developer, but industry speakers do come and you will meet geeky people in the area. I recognize several names on the speaker list as possible employers of new graduates. They meet in Courtice.
  • The Kawartha section of CIPS. Enterprise focused in many cases, IT Pro material as well as developers, and excellent networking opportunities. Meetings are generally in Peterborough and once a year (in January) they specifically hold a meeting for upcoming graduates to talk about employment topics.

It's quite likely that there are Java or PHP or Ruby user groups nearby; if you know of any please leave a comment. Unfortunately most groups suspend meetings for the summers, so it may be a while until they are meeting again. Still, meeting other people is the best way to find a job you will love. Remember, when someone is looking to hire, they aren't doing you a favour - they're meeting their own needs. They will count themselves lucky they met you, or were introduced to you.

Kate

Wednesday, 18 June 2008 22:09:47 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 17 June 2008

A long time ago, C++ MVP Bruno van Dooren started a new job. He blogged about why the procedures they follow are important:

We make medicine. Ours is injected directly into the bloodstream of patients who are already weakened by their condition. It goes without saying that there is absolutely no room for making mistakes. Any possibility for error has to be eliminated.

Most of us don't have stakes quite that high, but we work in environments where mistakes should not happen. And yet, they do. And more importantly, every once in a while a cascade of mistakes (I typed something in error, then I didn't run the tests because it was such a small change, then someone else just copied without checking etc etc) means that something bad actually happens "in production". Our procedures are designed to prevent this - the bad cascade happens when people don't follow procedures.

I've found that everyone sets procedures aside some of the time. Heck, if you have something wrong in production at 7pm Friday night, you don't leave it like that because you can't raise a second person to sign your release form, you fix it, and you do the release form Monday. And some procedures seem to be always ignored, which is a sign (when I have my I Own The Company Hat on) that they should be changed. But what interests me is that some people almost always ignore procedures, even good and helpful procedures that everyone else follows. Why would that happen?

I don't have a lot of data on this. People don't like to sit down for an open and honest chat with their boss about why they don't do things the approved way. In fact, most folks who never follow procedure go to some trouble to make it look as though they do follow it. What's more, once I become aware that someone routinely ignores a procedure and hasn't come forward to suggest it should be changed, our opportunities for conversation tend to dwindle, since they're usually busy with a new employer :-). But it seems to come down to one of three things:

  • The procedure takes a little extra time. The person is selfish or lazy or both, and skips that time. The pain the procedure saves is not their own, so they would rather have the time to either do other work and look very productive, or relax at work and have more free time. Sometimes this is a cue to me to reduce the time that the procedure adds, but not always. If you had a developer who took the read only flag off all source files so as not to be bothered with the time it takes Visual Studio to check those files out on edit, would that be OK?
  • The person doesn't know or understand the procedure, or doesn't believe that management will change the procedure if they come forward and suggest a better way. This is why we all suffer through endless "presenting the new procedure" meetings. How else can you tell people? How else can you make people believe? Thing is, I don't know anyone who was actually convinced by a "presenting the new procedure" meeting. I do better by following it myself (tough, because for many tasks in the firm I only get near them in those emergency "I'll do the forms tomorrow" situations) and by paying strict attention to whether others are following. I also need to be more transparent about "presenting the new procedure that was changed because X convinced me this new way is quicker but still prevents errors".
  • The person has discovered a way to do the tasks that is quicker or easier, and still prevents errors, (or maybe that prevents more errors, or whatever) but actively doesn't want the rest of the firm to know it. A sort of "I'm all right Jack" approach that makes that person more productive and perhaps more promotable, but does the firm as a whole no service. I often find out about this only long after the person has "left to pursue other opportunities" since hoarding information and increasing your personal success only are not paths to promotion with me, and this behaviour tends to show up consistently in many things the person does.

Of the three, the hoarding one is the hardest to deal with as a manager. Believe me, you will get more gold stars for having the idea that made your whole department faster than you will for being the fastest in your department. Even if, after your new procedure is implemented, you are somehow second fastest, I will know whose brain is saving/making me money.

Kate

Tuesday, 17 June 2008 07:53:23 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 16 June 2008

So you have your app on Vista now and it's working great. It needs to elevate maybe? Or part of it does? And do you cringe a little when you see that An Unidentified Program Wants Access To Your Computer super-scary version of the UAC consent prompt? Would you like to stop being called Unidentified Publisher? Well then you need to sign your application. But how do you do that? How much does it cost? Isn't it hard?

I seem to only have questions in this particular post. Well John Robbins has answers. Check it out. Try it. Let me know if it worked for you.

Kate

Monday, 16 June 2008 23:47:47 (Eastern Daylight Time, UTC-04:00)  #    
# 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)  #    
# 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)  #    
# 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)  #    
# 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)  #