# Thursday, 21 September 2006

How many Visual Studio Developers know about autoexp.dat? My guess is not many. This file, located in C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger for a typical install, controls how the debugger shows values in the Data Tips, locals window, auto window, etc. The file is yours, it's on your own computer, and you're free to edit it. Here's how to do so for a really simple (and redundant) type, Point:

class Point
{
private:
 int x, y;
public:
 Point (int xx, int yy)
 {x=xx; y=yy;}
 int getx()
 {return x;}
 int gety()
 {return y;}
};

I ran a really simple app that constructed a point, and paused in the debugger for a data tip:

Then I edited autoexp.dat, adding this line:

Point =(<x>,<y>)

I saved it and ran the debugger again, and now the tip looks like this:

You can do this for any class you write. It's your program, you might as well make your debugging life easier.

Oh, if you're wondering why my data tips are actually readable instead of in some tiny 3 point font, I blogged that earlier this summer.

Thursday, 21 September 2006 13:29:07 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 20 September 2006

I find it really surprising how much I am enjoying owning this kettle:

It is just what it appears to be, a glass electric kettle. When the water is at a full boil it is actually more dramatic than this picture shows. Like all modern electric kettles, you lift it off its base, leaving the cord and such behind, to pour. It's faster than the stove, won't boil dry, and it's fun to watch. Who knew?

I got mine at Canadian Tire. It wasn't even the most expensive kettle there.

Kate

Wednesday, 20 September 2006 11:47:12 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 19 September 2006

Some people don't like the different kinds of punctuation in C++. I do. I like having :: and . and -> instead of always dots. And in C++/CLI I really like having ^ instead of overloading * to mean either pointer-to-native-heap or pointer-to-managed-heap. But you know what some people say about C++, don't you? That it looks like comic book characters swearing? Well here's what I say to that:

^%::&++!

Kate

Tuesday, 19 September 2006 12:27:49 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 18 September 2006

Julie blogged this  a while back, and mentioned to me recently that the firm needs someone again. If you know C++ and MFC, know what the .NET Framework can do, and can write English sentences as well as code, then you can live in a lovely place and do some cool work. Check into it (follow the link from Julie's blog) and mention me as well as her when you apply.

Kate

Monday, 18 September 2006 07:05:53 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 17 September 2006

Recently, Jim Allchin (Co-President, Platforms & Services, Microsoft Corporation) posted an open letter to developers. In it he points out that it's one thing to beta test a new operating system (as I and thousands of my closest friends have been doing with Vista) and it's another thing to adapt your applications for a new operating system. For me, there are two important parts to that:

  • What do I have to do to my application to keep it from failing in the new environment?
  • What can I do now to my application so that it will take full advantage of the new environment?

Some Vista-specific examples of this might be "how can I be sure my application will not trigger a bunch of UAC dialogs?" and "will my app have glass?" or "can I get those cool Task Based Dialogs with the blue arrows and stuff?" These are the sorts of things I'll be tackling in some of my upcoming talks. I hope my Vista category will also be useful. My point is, don't wait until Vista ships, then wait to see if any of your clients or customers feel like using it, and then wonder if you have a Vista-ready app. Find out now.

Or as Jim says, "... the opportunity will be tremendous. If you want to ride the wave we're creating with Windows Vista, the best way is to have your application ready by the time we ship! And that is very soon. "

Kate

Sunday, 17 September 2006 15:59:34 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 16 September 2006

In October, Kathleen Dollard is coming to the East of Toronto UG! On October 19th, she'll be talking about Generics. Specifically:

Generics open up new opportunities to increase the robustness of your code, improve its performance, and significantly reduce the total amount of code you write. After a brief introduction to generic syntax, this talk dives into using generics to improve the quality of your code. You'll see how easy it is to shift your current collections to generic collections and learn about new features such as robust sorts, finds, and filters across collections. You'll learn how to write your own generic methods and classes. Finally you'll see how to leverage the spectrum of generic possibilities in a business object hierarchy that reduces the total lines of code by about 50%. You'll walk out of this talk understanding how to use generics to improve your own applications.

This meeting is at the YWCA Durham, so when you register, check the map and make sure you know where you're headed. If you haven't heard Kathleen speak before, you need to be there. Here's a little more about her:

Kathleen Dollard is a consultant, author, trainer, and speaker. She’s been a Microsoft MVP since 1998, wrote “Code Generation in Microsoft .NET” (Apress) and is a regular contributor to Visual Studio Magazine. She speaks at industry conferences such as VSLive, DevConnections, and Microsoft DevDays as well as local user groups. She’s the founder and principal of GenDotNet. Her passion is helping programmers be smarter in how they develop by learning to use Visual Studio, XML related technologies, .NET languages, code generation, unit testing, and other tools to their full capacity. She’s currently working on full life cycle improvements, such as better debugging and capturing business intent in metadata and test definitions. When not working, she enjoys woodworking, snowshoeing, and kayaking depending on the outdoor temperature.

I'll be a little crazed that week getting ready to head to Africa, but I'll be there.

Kate

Saturday, 16 September 2006 15:49:04 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 15 September 2006

Jean-Luc David, newly minted Developer Advisor, returns to the East of Toronto .NET Users Group this month to talk about Atlas, or "Atlas" as the Microsoft guys used to call it, the quotes reminding us all that it's a code name, not a real true blessed-by-marketing-and-the-lawyers name. And now, it's going to be called, sort of, AJAX. Let me quote ScottGu here:

The client-side “Atlas” javascript library is going to be called the Microsoft AJAX Library. This will work with any browser, and also support any backend web server (read these blog posts to see how to run it on PHP and ColdFusion).

The server-side “Atlas” functionality that nicely integrates with ASP.NET will be called the ASP.NET 2.0 AJAX Extensions. As part of this change the tag prefix for the “Atlas” controls will change from <atlas:>to <asp:>. These controls will also be built-in to ASP.NET vNext.

The “Atlas” Control Toolkit today is a set of free, shared source controls and components that help you get the most value from the ASP.NET AJAX Extensions. Going forward, the name of the project will change to be the ASP.NET AJAX Control Toolkit.

Well, whatever it's called (I seem to say that a lot) you can learn more about it at this month's user group meeting. September 26th, 6pm for pizza, 7pm for the presentation, Whitby Public Library. Please register!

Kate

Friday, 15 September 2006 15:43:32 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 14 September 2006

Larry blogs that improving your app's performance means concurrent programming. Not just OpenMP, which is very cool, as he points out elsewhere, but all the hard stuff: "disk contention, memory locks, cache corruption, etc". Still, here's a tempting paragraph from that DevX article:

It's perhaps surprising that C++, with its reputation for difficulty, actually provides one of the easiest ways to exploit multi-core and multiprocessor systems. OpenMP, a multiplatform API for C++ and Fortran, uses compiler instructions to automatically generate all of the support code needed to parallelize code sections. In the simplest case, which is what we're going to focus on for this article, simply wrapping a processor-intensive loop in a #pragma block can lead to about a 70 percent performance increase on a dual-core or dual-processor system and enjoy a similar "free lunch" on the quad-core systems that you build in the future.

That's right. Concurrency is vital, and C++ takes care of one kind of concurrency astonishingly easily. It's true. Later in the article he plops a #pragma just before each of two loops, and his app runs 70% faster. How's that for fun? Go on, read the article, try it yourself.

Kate

Thursday, 14 September 2006 15:26:23 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 13 September 2006

Tomas Restrepo, a C++ MVP, has started a C++/CLI FAQ at http://www.winterdom.com/cppclifaq/. It's a start, and since some questions are starting to be frequently asked, it's a good idea for folks to read through this.

BTW, if you're looking for a more general Visual C++ FAQ, try the multi-MVP effort at http://vcfaq.mvps.org/.

Both recommended. Good work Tomas!

Wednesday, 13 September 2006 15:06:07 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 12 September 2006

According to a summer IT Business article, there is still a battle or maybe there isn't. The headline reads "Java vs .Net: The tug of war continues" while the first sentence of the article is "The religious war between Java and .Net seems to be over." You might be able to guess how I feel from these quotes: 

  • "It's .Net all the way," she said. "I hardly ever get e-mails (from students) asking [whether] they should learn C# or Java any more."
  • "I feel more productive on the .Net side," said Gregory, who also programs in Java. "When I made the jump, it was about the tools in Visual Studio, and the libraries."
  • "I think that every time we have a new batch of libraries and every time the products are improved, people will change (platforms)," said Gregory. "Others say they will stay. And they're both right. Maybe younger developers get caught up in a religious war, but older developers say, 'You go ahead and use whatever you like. I'll be over here getting some work done.'"

That's why I'm a VB.NET and C++ developer after all -- to get some work done.

Kate

Tuesday, 12 September 2006 14:47:25 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 11 September 2006

Scott Meyers has been musing about the most important C++ books, non-book publications, software, and now people. He decides on:

  • Bjarne Stroustrup
  • Andrew Koenig
  • Scott Meyers
  • Herb Sutter
  • Andrei Alexandrescu

You know what? I agree with him. I think it takes some serious nerve to put yourself on a list like that, but his rationale works for me. I'm not sure if the list is in significance order -- if it is, I'd move Herb up a notch or two -- but these are the folks. And four of them were on the speakers list for C++ connections last year. I was honoured, truly, to be on that list with them and need no more than that.

Kate

Monday, 11 September 2006 13:03:13 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 10 September 2006

After a three-year gap, I return to Tech Ed Europe as it returns to Barcelona. Moving it to the late fall has made it much easier to fit into my life. (Not surprisingly, I'll be speaking in the Developers half of the two-week conference.)

My talk is DEV406, Extending Native Code C++ Applications with Managed Code

Managed code programming models and frameworks offer developers a great boost in productivity and code maintainability. This session demonstrates the use of the C++/Common Language Infrastructure (CLI) language binding to access .NET platform features. Rather than re-write applications from scratch to take advantage of managed code, Visual C++ gives developers the ability to enjoy the advantages of managed code whilst still leveraging their existing native code base.

This is the power of C++/CLI - don't port or rewrite, integrate! You're going to love it.

Kate

Sunday, 10 September 2006 12:54:01 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 09 September 2006

I'm thrilled to confirm that I will be speaking at Tech Ed in Sun City again this year!

I'm travelling on South African Airways this time (it's been Lufthansa before) and taking a different route, so there will be some novelty along with the familiarity. I just love the energy at this conference; I can't wait to get there!

My talks:

  • DEV 307: Delving into Visual Studio 2005 Team Edition for Software Developers
  • CLI 315: Windows Vista: Tips and Tricks for Targeting Key Native APIs from Managed Code
  • CLI 402: Modifying Applications to Run on Windows Vista

Kate

Saturday, 09 September 2006 12:46:05 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 08 September 2006

The code camp concept keeps spreading. October 14th will see Code Camp Montreal: it's free, it's bilingual, it's in downtown Montreal. All you need to do is register! Attending will be a great way to meet other developers and to learn as much as you can cram into your brain in a single Saturday. I wish I could be there, I know it will be great.

Kate

Friday, 08 September 2006 12:37:35 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 07 September 2006

As you may know, I'm listed as the leader of the East of Toronto .NET User Group. I'm just a figurehead though, the real work has been done for a long time by Chris Dufour and Jean-Luc David. During my blogging gap, Jean-Luc accepted a job offer from Microsoft Canada and is now a Developer Advisor. That means he looks after me as an RD, and helps with the user group. He's already doing a terrific job, and you'll never guess who our September speaker is :) (Subliminal message, go register for that meeting now, please.)

Kate

INETA | RD
Thursday, 07 September 2006 12:28:51 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 06 September 2006

Sasha Krsmanovic has been working for Microsoft for a very long time, but as a v-, a vendor. This summer they finally made it official and hired him as a regular employee. At the same time he moved roles, so now instead of looking after me as an RD and a user group leader, he's looking after me as an MVP. Works for me!

This is me with Sasha back at realDevelopment06.

Kate

Wednesday, 06 September 2006 12:20:24 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 05 September 2006

One more update about my Dad and then some catching up from the old "stuff to blog" file. My Dad has an inoperable lump. Visually the surgeon says it is cancer, but two biopsies have been negative. This lump was blocking bile ducts, blocking the bowel, and doing various things that cause terrible pain and can kill you within days. His late August surgery moved things out of the way of the lump, leaving him to recover from the surgery (and subsequent abscess) and the weight loss and muscle loss that comes from going over 6 weeks without really eating. He has done an amazing job of that, returning within days to regular bike riding, sailing the 26 foot wooden boat he took around the world, and putting weight back on. He is also figuring out how to balance his pain meds so that he can stay as active as he wants to be.

How long does he have? We don't know. He could have died back in August in that dingy hospital room, wearing just that stupid backless gown and with no comforts of home. Now he is home, with ocean views from every room, his own clothes, his own shower, his bike, his boat, music, his laptop, and family. I hope he has another year or more... but we are all prepared for less. And we are all living as though he has more, much more.

Kate

 

Tuesday, 05 September 2006 11:48:30 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 24 August 2006

I have reached Halifax and seen my dad. He's thin but still Dad. Tomorrow he will be going home because at the moment he doesn't particularly need to be in the hospital. We will take it one day at a time.

Also, I found an online story about our neighbours' fire. It's kind of inaccurate because the number of people is wrong (the front tenant wasn't just one person living alone I don't think) and it leaves out my friends' dog and hamster both (the hamster was apparently mentioned in the TV report) but it has some details for those who are interested: http://www.mykawartha.com/article/3964. An earlier draft at http://www.mykawartha.com/ka/article/3930 has less details but I'll include the link for completeness. You might want to poke around mykawartha.com to see how exciting my life normally gets: a parking lot near our Peterborough office is to be shut down for a while, City of Kawartha Lakes council is trying to fund the renovations needed at the Janetville community centre (where my boy takes martial arts lessons), and somebody (other than me) wrote a book.

My mother is still in Winnipeg so we don't know what was decomposing in one of those row houses yet.

Kate

Thursday, 24 August 2006 23:47:16 (Eastern Daylight Time, UTC-04:00)  #    

Tuesday afternoon my mother called me with a gross and slight horrific story which I am going to share with you now. She lives in a row of 8 little houses in Toronto all connected to each other, 110 years old. For some days or even a week, some of the neighbours have been troubled by a nasty smell, and they were worried that a squirrel or a raccoon had died in their shared attic. Then suddenly on Tuesday two of the houses were infested -- upstairs! -- by worms. And not pink round worms like you would find in your garden. Flat white worms. Eeeeew, right? They called the police. I don't even know the end of the story because she had to leave on a trip (she's teaching a course in Winnipeg) but you know what? It isn't making much on an impact on my life right now.

That's partly because I was headed home to a much fuller house than usual. That same afternoon some neighbours of ours, whose kids are good friends with our kids in that in-and-out-of-each-other's-houses way, took a hard knock. They have rented a tiny shared house to stay while building a new home on land near us, and they lost that rented space in a fire. They also lost, or so it seemed that first afternoon, everything they owned that was not in storage, including all the back-to-school shopping (over $1000) they had just completed. They had no insurance since they were just renting for a few months. Their two children and cat came to our house that day, and have since been joined by a dog and the second cat, who took a while to find. I therefore have four children, two dogs, three cats and a hamster in a 1500 square foot house, and many of the animals can't be in the same room as each other. I spent three hours Tuesday, and Brian spent more like five hours Wednesday, doing things like driving the kids back to the house to look for the cat or to retrieve things, helping the kids run laundry or spray Febreze on things that can't go in the washer, that sort of thing. Now many people have told me that this must be a total disruption and must be driving me to drink. But if anything I am finding it a needed and welcome distraction, and I am actually sleeping better than I have for a week.

And that's because what's really on my mind is my father, in hospital in Halifax.He had major surgery in December, some setbacks in the winter and early spring, but by June was pretty much himself again. However since then he's had some bigger setbacks and has been in and out of the hospital all summer. It's now at the point where the whole family is flying in. My Dad has five kids and we haven't all been in the same room this century so the whole thing is bittersweet. One sister is bringing her infant, another is pregnant. It just doesn't bear thinking about.

And yes, I still have a business. I have clients with mentoring needs, projects going live, new projects starting, Request for Response/Proposal/Services pouring in as the bosses get back from vacation, some very sweet C++ and Vista stuff that I can't wait to tell you about (but will have to) and so much more. I am emailing a lot of those people telling them my sorry tale and that I will talk to them after Labour Day. To my delight they have all said "sure, of course, let's talk then!"

It really is going to be OK, but it's going to be hard work on the way,

Kate

Thursday, 24 August 2006 10:22:04 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 22 August 2006

Blogging is usually a way I talk to people I don't otherwise talk to. Not that friends, family, clients, and staff don't read it -- I know you're there! But there is another group of people I know are reading who I don't normally email, IM, call, see, or send pieces of paper to. And in my life, as in so many lives, things come up, stresses rise, deadlines loom, project work eats all available hours, and the blog starts to suffer.

It starts with missing a few days, then catching up. The "stuff to blog" file is handy here, so when you catch up you clean out the file. Then the number of days you're behind exceeds the number of entries in the file, and besides most of them are just a link and you don't have time to write the three sentences that go with it. So then you don't blog for a while.

When are you likely to start again? When the blog becomes the more efficient way to talk to the people you usually talk to, but don't have time to. Expect the blog to get a little more personal for a while (though there's some technical stuff to clear out of "stuff to blog" as well, or to go dark again. I'll do what I can.

Kate

Tuesday, 22 August 2006 23:02:22 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 12 July 2006

Here's a fun demo of facial recognition software. Using the picture of myself I have on MSN messenger, I tried out (http://www.myheritage.com/FP/Company/tryFaceRecognition.php) the My Heritage facial recognition software. It says I look like

  • 63% Jesse McCartney (no idea who he is)
  • 63% Kate Winslet (that's better, and bonus marks for first name match)
  • 58% Rose McGowan
  • 54% End Blyton (love the books, but hardly a flattering picture of her)
  • 52% Julianne Moore (really? wowza!)
  • 50% Melanie Chisholm
  • 49% Gina Lollabrigida (now you're just being nice)
  • 48% Jennifer Love Hewitt
  • 48% Janie Tienphosuwan
  • 48% Andrew Lloyd Webber (and you were being so nice)

Common thread seems to be cheekbones. I don't see them on me but I sure do on those folks.

Want to try?

Kate

PS: I tried another picture of me and Kate Winslet, Rose McGowan, and (damn) Andrew Lloyd Webber came up again.

Wednesday, 12 July 2006 10:52:47 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 11 July 2006

So if you want your app to behave well on Vista and have no clue where to start, here's a helpful post from Jeremy Mazner that links to a number of screencasts to get you started. How to tell Vista you need admin privs. How not to need admin privs so much. How to use the power APIs (that's volts and amperes power, not only for smart developers power). How to hook into Vista search.

Download them, watch them, make better Vista apps.

Kate

Tuesday, 11 July 2006 09:55:36 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 10 July 2006

Jesper Johansson is a world-reknowned security guy. His talks are always highly rated and people love to hear him tell them how to be safer than they are now. So when he says "please don't turn off UAC", will you listen?

Yes, it's annoying to be constantly authorizing things, especially when you just clicked the button to do whatever it is that needs to be authorized. Some of that is an artifact: it shows up far more often in the early days of a new install because you're busy configuring and administering the system. Some of that is because permission sets may still need tweaking. Changing the time zone was moved into "doesn't need admin privs" while changing the time was not, for example, and there may be actions that are triggering a UAC prompt that shouldn't be. This is what betas are all about, testing developer choices against the behaviour of real users.

The other reason for a lot of UAC prompting is apps that demand privs they shouldn't need, because their developers can't be bothered to use per-user stores, for example. If that's your app, and you're testing it on Vista, you need to change it so it works well on Vista. Not leave it as is so it works fine on Vista-with-UAC-turned-off. That's just "it works on my machine", and my developers aren't allowed to say that. :-)

Kate

Monday, 10 July 2006 09:28:28 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 09 July 2006

Long long ago, I posted a neat drag and drop trick. Here's another. I regularly find myself in a Windows Explorer window, looking at the files it contains, and wanting a command prompt so I can type some command or another. Today it was regsvr32, but it varies. So what I usually do is open a command prompt, Alt-Tab to the explorer window, highlight the path, Ctrl-C, Alt-Tab back to the command prompt, and then leap through all the command prompt nonsense to paste. Bleah.

Here's something quicker. In the command prompt, type "cd ". Then with your mouse click on the symbol before the path in the explorer window:

Drag it into the command prompt and let go. Nice.

Kate

Sunday, 09 July 2006 09:12:04 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 08 July 2006

Conditional breakpoints are cool when you know the value of one variable that is associated with trouble: this only blows up when Xid is 1234. They can also be used to reduce the boredom of single stepping. Say you've got some loop that goes around a few hundred times building up some string or array or something. You don't want to keep going round and round and round... it would be nice to jump ahead to halfway through, for example, and see how things are looking. Now if this is a for loop with a handy named variable, say

for (int i = 0; i<1000; i++)

Then you can use a conditional breakpoint and say "stop when i is 200". Or you could be clever and stop when i % 200 is 0 -- so that's every 200 times. But what if there's no i? What if you're going through a file or a recordset/dataset/resultset and you're going until the end? You don't want to add some fake variable that gets incremented each time through the loop, just so you can set a breakpoint that breaks on certain values of that variable. Instead you want to use the hit count property of the breakpoint. Just right click the red dot and choose Hit Count. There you can set the breakpoint to break whenever it's hit, just the 10th time it's hit, every tenth time (10, 20, 30 etc) or every time after the 10th time Or, of course, whatever number you want instead of 10:

Don't debug the slow way when there are tools to make you so much faster!

Kate

Saturday, 08 July 2006 16:53:13 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 07 July 2006

Conditional breakpoints were another really important tool in solving a recent "only happens at the big installations" bug in a big and complicated C++ application. We wanted to debug the code with as few rebuilds as possible and we really didn't know how parts of it worked at all. Tracepoints helped us to figure out a lot of it in a short time. We didn't have a decent repro case though, so here's what we did:

  • created a script to add an audit table and some triggers that write to it
  • created a script to remove those triggers and the table
  • created a batch file to run a server in verbose mode, and redirect the output to a text file (remembering DOS commands sure can be helpful...   myapp.exe -verbose >logfile.txt was the magic phrase.)
  • wrote some instructions for the support guy to grab a backup of the database, run the first script, run the batch file, let it run all night, then in the morning grab another backup of the database, run the second script, and stop the batch file.

Now we ran some queries on the morning version of the database to confirm that at least one X was missing a Y that should have been calculated overnight. We even had the Xid. Thanks to the tracepoint work of the previous day we knew where to be suspicious. A little digging in the trigger output told us whether the problem was "didn't get added" or "got added, but then got deleted". The last step was conditional breakpoints. These let us say "only stop here when you're processing the X with this Xid."

This really saves time when you just need to drill into what's happening in the case that is going wrong. You get to it by right clicking the red dot or diamond and choosing Condition.

Kate

Friday, 07 July 2006 16:35:26 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 06 July 2006

The mentoring client I helped solve a big hairy bug using tracepoints does work in C# as well. She asked if tracepoints are available in C# and VB.NET too. They sure are!

As well, you can get to them other ways than just right clicking the red dot. There's a breakpoints window (reach it from the Debug menu: Debug, Windows, Breakpoints) that shows you what is set up for each of your breakpoints and tracepoints, and which you can use to enable, disable, delete, and edit breakpoints. You can also double-click a line in this window to go to that line of source:

I like to add that "Language" column when I'm working on a mixed project. Just click the Columns button and make your choices.

Kate

Thursday, 06 July 2006 16:14:51 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 05 July 2006

When you have a "mystery" bug to solve, tracepoints are a vital part of your debugging arsenal. Single stepping and looking through code can be S-L-O-O-O-O-W and if you don't even know what you're looking for, it can consume hours and hours of effort. Tracepoints really speed things up. They're like breakpoints that don't break. In a way, they go back to the old "printf debugging" -- but you don't need to make code changes and recompile to change them.

To set a tracepoint, first set a breakpoint, then right-click on the red dot that appears in the margin and choose When Hit:

In the dialog that appears, click the Print A Message box and edit the starter message you are given. You can include any expression in braces and it will be evaluated when control reaches the tracepoint:

Leave the Continue Execution box checked so that you don't break. Tracepoints are identified by red diamonds instead of red dots:

The output from the tracepoints appears in the output window of your debug session:

You can set up something suspicious, let it run, then pore through the tracepoint output and see what you learn. It's a huge timesaver when you're tackling a "we don't even know where to start" bug. Plus, if the issue is related to threading or async issues in any way (and you know me, I keep preaching we will all be facing async issues eventually) then you don't have to worry that pausing execution suppresses the collisions. I recently helped a client solve a big hairy this-stuff-fails-for-our-biggest-customer-only bug using tracepoints... and a few other tricks I will cover in upcoming posts.

Try it!

Wednesday, 05 July 2006 15:54:34 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 04 July 2006

Is a blog just for reading? Some blogs have way more life in the comments than the original posts (think Mini Microsoft for example, and I'm not saying the original posts are lifeless, just that the comments really take it up a notch) while others (like the one you're reading now) have very few comments. I like to think that people wander off and think about what they read, or go fix the problem in their code (hello all you broke-your-sql-reporting-services-installation people, I see your search terms in my activity list) and think nicely of me.

But here's a rather interesting blog entry. It's one word long. And that word is not all that unusual. Now I love self-reference, Godel, Escher, Bach etc, so I laughed. And I'm not alone. The commenters got it right away, drawing on a long tradition back to Usenet (at least 20 years) and then bringing in some more recent traditions. Good fun for as long as you can stand it.

Kate

Tuesday, 04 July 2006 21:32:03 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 03 July 2006

From the "did you know" department: Aero is (sort of) AERO because it actually stands for "Authentic, Energetic, Reflective and Open".

These are words that can be interpreted however you like. Does authentic mean "not fake" or does it mean "true to the thoughts the user has about how to interact with the OS?" How can a UI be energetic? Does that just mean lots of bright colours, glowing jelly buttons, and animations? What does the UI reflect? And open to what?

I will say this though, they are all positive and pleasant words, and if a team held those words up as goals while working on software for me, I would expect that they would make me pleasant software. In a UI, that's a good thing.

Kate

Monday, 03 July 2006 20:56:43 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 02 July 2006

We've all heard that we shouldn't model ourselves against pictures we see in magazines, because "they're all airbrushed and retouched". But you won't believe how true that is until you check out this portfolio by a fellow who does it for a living. He swaps new pictures in from time to time,  but there's pretty well always some excellent eye bag removing, skin smoothing, and general thinning.

Before:  After:

He has a nice effect on the site: first you see the "after" picture as it was used in print, then when you mouseover you see the original. Wow! Bags pop out under eyes, breasts move down, wattle, wrinkles, and pimples appear. Move the mouse off and they're back to perfection. Just astonishing. He also tackles "the clothes didn't really fit the model" and "the background is all wrong" as well as "they couldn't all come to the studio on the same day" but it's the anti-aging work I found most astonishing.

In case you had any doubt how much hard work it is to do, somebody called Mizuno lays out in a dozen steps or so how to soften up skin features to do just the unpimpling:

Before: After:

The after looks a little fake here in a close-crop, but when you see the whole picture she just looks gorgeous. Now we know.

Sunday, 02 July 2006 20:50:44 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 01 July 2006

Nikola Dudar of the C++ team seems to have decided to catch up his blogging deficit. In a single day he covered:

Plus a meta-post about comments. Keep it up Nikola!

Kate

Saturday, 01 July 2006 20:33:46 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 30 June 2006

Those of you who were interested in my loader lock topic at Tech Ed this year should probably get this whitepaper from Windows Hardware Developer Central (not actually a place I hang out regularly.) It's a downloadable Word document (8 pages) that tackles things like "what you should not do from DllMain" (this list is a page long), deadlocks, and threading considerations (and remember, we are all going to have to tackle threading considerations eventually). While it doesn't say it's C++-specific advice, in what other language could you "Use the memory management function from the dynamic C Run-Time (CRT)" or "Set global pointers to NULL, putting off the initialization of dynamic members"? It even has Vista-specific advice.

Kate

Friday, 30 June 2006 07:14:35 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 29 June 2006

Catherine Heller, Windows Vista Technical Evangelist, is now blogging. She started during TechEd just before her session (one of the very few I attended) and so far has covered tips for interop to native APIs and some Search material. I'm looking forward to more as the summer progresses.

Kate

Thursday, 29 June 2006 07:03:23 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 28 June 2006

Recently the French government launched a geo-portal (GeoPortail en francais) with satellite pictures and maps of France and France-associated places around the world. The detail is pretty cool. Here's Le Château de Chenonceau:

Here's the smaller of the two formal gardens, to the left in the arial shot, as seen from inside the Château:

That one's not from the website, but from my own camera. It gives you a good idea of the scale the satellites can achieve. The building itself is amazing -- it actually spans the river. Worth a detour to experience if you find yourself on The Continent.

Kate

Wednesday, 28 June 2006 15:22:21 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 27 June 2006

The seventh monthly DemoCamp in Toronto will be July 4th at No Regrets in Toronto. It's a pretty simple concept: no-powerpoint-allowed demos of working product, time limit 15 minutes, followed by socializing. And they do this every month! There's room for 150 people, and according to the wiki 90 people are signed up already, so there's probably room for you, too. Watch other people demo (so you can learn how to construct your own super cool 10 minute presentation, and believe me, ten minutes is HARD), see what else is going on in your world, tap into some of Toronto's energy... I can't make this one but I will watch for the August one for sure!

Kate

Tuesday, 27 June 2006 14:43:45 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 26 June 2006

Hugh (hughtrain, cartoons on a business card) MacLeod has written an interesting set of "instructions" on how to be more creative. Many of these directly contradict each other... that's because there's more than one way to be creative. I actually found the summary points more helpful than the more detailed explanations further down the page. But either way, it's a good way to get yourself thinking about thinking. Then later you can relax and not think, and good ideas will come to you. Or at least that's how it works for me.

Kate

Monday, 26 June 2006 14:25:57 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 25 June 2006

Jan Tielens points out a big relief in the next version of SharePoint: setting up alerts for someone other than yourself. I faced this need many times and adapted one of the many web part samples available online to allow administrators to set up alerts for other users.

Little things like this are going to dramatically reduce the number of web parts I have to write. And I like that!

Kate

Sunday, 25 June 2006 14:15:12 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 24 June 2006

The Visual C++ team all gathered together over the last week to hold a "slow chat" with the CodeGuru community. Users posted questions, the team answered them, and conversations ensued. Some of the interesting questions I spotted (it's all still there for you to read through at your leisure):

  • Why have the keyword abstract? Isn't the presence/absence of a pure virtual function enough? Or a private virtual destructor, that would force someone to implement a derived class?
  • What do I gain and lose by compiling my old native app with VC 2005?
  • Will MFC gain classes that wrap Vista-specific functionality?
  • What language does Microsoft use most?

Lots of straight talk from Brandon, Ayman, Tarek, Jon, Steve, and others from the Visual C++ team. Take your time and read it all.

Kate

 

Saturday, 24 June 2006 14:07:07 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 23 June 2006

Visual Studio Tools for Office (VSTO) is a bit of a funny creature. It needs to adapt with each release of Office, and also with each release of Visual Studio. The next version is code named Cypress and it works with either Visual Studio 2005 or with Orcas, and with Office 2007. Charles Sterling blogged the announcement just before TechEd:

Cypress will include the following functionality and release at about the same time as Office 2007:

 

·    Application-level add-ins for the most popular Office applications including Outlook, Excel, Word, PowerPoint, InfoPath and Visio.  This is currently the #1 most requested feature for VSTO – safe loading, unloading, and management of managed add-ins.  I’m thrilled that we’re going to be able to provide this functionality to developers much earlier than anticipated.

·    Office key feature support: programming model and runtime support for Ribbon, Custom Task Panes, and Outlook forms regions.  Office’s new UI contains exciting extensibility opportunities and Cypress will enable VSTO’s simple coding experiences like IntelliSense. 

·   Maintainability and compatibility are core principles for the VSTO team and Cypress will also ensure that your applications built on Office 2003 with VSTO 2005 continue to run with Office 2007. 

 

Cypress is an add-on and is incremental.  It is not, itself a complete Visual Studio product release.  Anyone who has a licensed version of Visual Studio 2005 will be eligible to download Cypress for free.  However, I want to be clear that Cypress is not a super-set of all the VSTO 2005 functionality that was made available for Office 2003 replicated for Office 2007.  As promised, Excel Workbook and Word Document project support for Office 2007 will come on-line in VSTO “Orcas”, and be made available in upcoming “Orcas” CTPs.   Also look for the exciting new VSTO “Orcas” functionality, such as the visual designers for the Ribbon and Custom Task Panes, and Outlook in these “Orcas” CTPs.

There's a Channel 9 video in which KD Hallman and Eric Carter discuss features and goals of Cypress and beyond that's a pretty good starting point.

If you can stand the endless rounds of public betas, CTPs, and trying to work out which versions need each other or conflict with each other, you can have a lot of fun this summer!

Friday, 23 June 2006 13:33:06 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 22 June 2006

One of the huge holes in the current version of SharePoint is workflow. If you have a document that starts out as a draft, and then the author decides it's ready to be approved, and then someone approves it and it goes to a more public status, that's workflow. And it's not supported in the SharePoint (either WSS or SPS) you can "buy" today. (WSS is free with Windows Server 2003, so I put "buy" in quotes.)

This hole is going to be fixed in the next version of SharePoint. The team has a blog and has posted a quick summary of what workflow will be like and just how much will come to you "out of the box." Check this list:

To help people get started with scenarios like these, we’ve taken some common processes we’ve seen in our research and built those workflows into SharePoint Server 2007 out-of-the-box for people to use without IT involvement.These out-of-the-box workflows include:

  • Approval: Routes a document for approval. Approvers can approve or reject the document, reassign the approval task, or request changes to the document.
  • Collect Feedback: Routes a document for review. Reviewers can provide feedback, which is compiled and sent to the document owner when the workflow has completed.
  • Collect Signatures: Gathers signatures needed to complete an Office document. This workflow can be started only from within an Office client.
  • Disposition Approval: Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents.
  • Group Approval: Similar to the Approval workflow, but uses a designated document library and offers a personalized view of the approval process(es) in which a user is participating. This workflow provides a hierarchical organization chart from which to select the approvers and allows the approvers to use a stamp control instead of a signature. This solution was designed specifically for East Asian Markets.
  • Translation Management: Manages document translation by creating copies of the document to be translated and assigning translation tasks to translators.
  • Issue Tracking: Manages the issue tracking process by creating tasks for Active issues assigned to users who own to a given issue. When the task related to an issue is complete hence resolving the issue, the creator of the issue is assigned a review task so that the issue can be closed.

Think about what you will be able to take care of with this! Do you want the beta? Of course you do. And there's a whole new Enterprise Content Management blog to talk about all of this in greater detail, too.

Kate

Thursday, 22 June 2006 13:06:00 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 21 June 2006

There is growing awareness that making software takes a lot more than just making code. Certainly being a developer is much more than being a coder. But as someone who runs a consulting business, I certainly know that for me and for my people to make great code for our clients, we need support from non developers. This isn't just about testing and UI design and documentation either. It's about calling the courier, getting a new mouse when yours dies, making sure there's cold Coke in the fridge all the time, and plenty of paper in the printer. Sure, developers can do all that stuff... but they make more code, bill more hours, and give better advice and mentoring when they don't have to do that stuff. In fact, Joel Spolsky says about 80% of your payroll, in a software development company, should go to people who don't actually develop software. Yikes! Our "overhead" is nowhere near that here at Gregcons, but we do have folks on staff who never ever write code of any sort. It's important to remember what a vital role everyone in a small company plays, whether we bill for their time or not.

Kate

Wednesday, 21 June 2006 12:52:01 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 20 June 2006

Poking around on ZoomIn, I see what it thinks about my company:

The bio stuff is a little out of date, but ok. But wait a minute... apparently over $10 million dollars a year, and almost 330 people, are headed to somewhere in California on a regular basis, instead of here in the lovely Ontario countryside. Can I get a redirect?

Kate

Tuesday, 20 June 2006 14:46:37 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 19 June 2006

This year at Tech Ed USA, the booths had slightly different badge scanning hardware than at past shows. Instead of removing your badge from the holder to be swiped, the boothies could just swipe a bar code on the front. This was used not just at booths, but also for session attendance. Here you see Canada's Technology Triangle guy himself, Dave Totzke, being swiped before my Friday talk:

I know at other TechEds they have used RFID in the badges, and then when you go to do evals you can choose from the sessions you actually attended: makes it easier for attendees and gets an accurate count of attendance. I don't know if session attendance and evals were linked here because I hardly attended any sessions at all. In fact, for those I did attend, I arrived with the speaker before the badge swipers so I never got swiped. I know looking at my own evals they told me how many evals were submitted but not how many people were in the room.

Knowing how many people actually attend sessions and comparing it to how many indicated they would in the scheduling tool helps to put talks into the right rooms... it's as awkward to talk to a cavernously empty room as to a busting-at-the-seams-full one. So I like this. But then, I liked the RFID chip, and I've been told it would never be accepted in North America.

BTW, little piece of language-specific trivia: apparently C++ talks get way more "didn't put it in the schedule" attendees than other languages. Is it because all languages get the same number of spontaneous dropins, and all the C++ folks who planned to attend follow through? Is it because C++ people don't like to use the scheduler? Who knows? I'm just happy that while the number of C++ talks may be less than in previous years, I'm still not in the smallest room.

Kate

Monday, 19 June 2006 21:40:41 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 18 June 2006

Another entry from the VC++ team. This one covers many of the IDE changes I showed in my recent Tech Ed talk. One of the questions that arose in that talk was "why does Visual Studio sometimes appear to freeze when I open a dialog?" Boris Jabes has an answer that explains to me why it's more likely to happen when I'm working in native code.

Kate

Sunday, 18 June 2006 06:30:04 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 17 June 2006

Chris Sells did something pretty cool recently - he went to a printing plant to see how books are printed and bound. He arranged to go on the exact (single) day they were printing HIS book, and he took both his kids and his camera. The result is one tremendously cool blog entry.

If I am ever talked into another book (it could happen :-) ) I think I want to do this too.

Kate

Saturday, 17 June 2006 06:21:02 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 16 June 2006

Joel Spolsky has a nice article today about Bill, inspired by the retirement announcement of course. I loved this story for two reasons. The first is when he started talking about the leap year thing in Lotus 123, I was right there with him -- I had problems with that myself over twenty years ago. The second is the "little girl" sound effects and thought balloons injected into the story. Times change. Companies change. People retire. These things don't necessarily cause each other. Read the story.

Kate

Friday, 16 June 2006 17:12:23 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 15 June 2006

TechEd is about so much more than the sessions and the parties. It's about spontaneous conversations on the bus, in the meal hall, or while waiting somewhere with groups of people. It's about watching other people react to learning something you've known for months or years. It's about finally getting around to learning something yourself that you never had time for. But that's not the whole of it for me.

Three little vignettes are kicking around my head this morning. The first is a memory from another TechEd, in Barcelona three years ago. I remembered this when I was ironing my speaker shirts for this year. In Barcelona, the hotel rooms had no irons in them, so I was headed to the speaker room in a TShirt to iron my speaker shirt. On the way Juval told me this joke:

A group of people are on a plane when the engines cut out and the pilot asks everyone to brace themselves for an emergency landing. There is some screaming and crying, then a woman stands up and yells "we're all going to die! Is there no-one on this plane who can make me feel like a woman one more time?" At that a man in the last row jumps to his feet and runs toward her. As he runs down the aisle he rips off his shirt revealing a handsome physique. She is beaming and the other passengers are distracted from their impending doom. When he reaches her row, he throws the shirt at her and says to her "Quick, IRON THIS!"

This year's TechEd memory will have to be the hotel evacuation Wednesday night. I have heard many variations on the story from those of us who were there, including people who tried to answer their phones, turn off their alarms, and so on. I also enjoyed sharing stories of what we grabbed. I put my laptop in my bag -- after all I still have a session to give -- and threw a few other things in quickly, but left my power supply and other things that would take more than a quick grab. And you better believe I slipped my shoes on and grabbed my badge, where I keep my hotel key. It was a long slow shuffle all the way down from the tenth floor, but I wasn't worried... I couldn't smell or hear anything unusual so I was pretty sure there wasn't much wrong. Turns out a water leak drew down the pressure enough to disable the sprinkler system, and that meant we all needed to get out.

And today's surreal news, from the conference site:

Information About Limited Measles Outbreak in Boston
The Tech·Ed 2006 Planning Team wants to inform you that there has been a small outbreak of measles in the Boston downtown area. The majority of the known cases have been in workers from the John Hancock building in downtown Boston who were not inoculated with the MMR vaccine or had not been exposed to the virus as children. While the risk of exposure to the measles virus while at Tech·Ed is extremely low, the best prevention against the virus is to ensure you have been inoculated. If you are not sure if you have been inoculated, contact your health care provider. Thank you.

I've already had measles, so I'm not worried.

Kate

 

Thursday, 15 June 2006 09:45:18 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 14 June 2006

Over on the Visual C++ team blog, Martyn Lovell muses about MSBuild, renaming all the library DLLs, and STL/CLR, among other things. On that topic, he says:

We’re not finished yet on performance, but in informal testing we’ve seen some exciting results, including a bunch of cases where the magic of templates combined with the C++ optimizer are able to outperform the .NET Base Class Library even in verifiable code. When we envisioned C++/CLI several years ago, these are the kinds of scenarios that we dreamed of, and it’s exciting to see them coming to fruition.

Can't wait!

Kate

Wednesday, 14 June 2006 16:38:50 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 13 June 2006

Here's a quick tip about tips. The default font for data tips, editor tips, and so on is really tiny (8 point):

Especially if you're presenting, you'll want to make it larger:

How's it done? The same Fonts and Colors dialog you use for your regular font setting, but use the dropdown at the top of the dialog:

You can also change Data Tips, the font in the output window and find results window, and plenty more. Experiment a bit!

Kate

Tuesday, 13 June 2006 14:13:10 (Eastern Daylight Time, UTC-04:00)  #