# Monday, September 30, 2024

It's been 7 years since I was at Meeting C++ and I'm really looking forward to it. There are great keynotes planned and the schedule as a whole is full of talks I want to hear! I'm doing The Aging Programmer and hope it lands as well in Berlin as it has elsewhere. As always, I find it hard to believe there are too many C++ conferences for me to be at all of them, and I'm making an effort to try to mix things up from year to year and not just go to "the usual places" every time. It's good to see some speakers I haven't seen for a while, and be introduced to ideas I haven't been following.

There's still time to get your tickets! I hope to see you there.

Kate

Monday, September 30, 2024 2:54:39 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, September 08, 2024

Tomorrow I head to Norway for NDC Techtown. And now I'll be doing two talks there! I'm adding Naming is Hard to my scheduled Aging Programmer. There probably isn't time for you to register and travel there, but if you'll be there, plan to see both my talks!

Kate

Sunday, September 08, 2024 1:36:32 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, July 26, 2024

We work on the conference for a year, maybe more than a year, because we start thinking about "next year" before we've even had this year. Then it starts, and it's wonderful, and suddenly it's the last day.

We kicked off the day with a wonderful keynote by April Wensel about compassion and how bringing warmth and caring into your software development practices makes better code, not just happier people. Then I went to Tina Ulbrich's Throwing Tools at Ranges which had a lot of numbers and data for those who worry ranges bring performance issues.

A CppNorth tradition is that we don't provide lunch every single day, wanting to send attendees out into Toronto to experience the downtown neighbourhood. Day 3 was the "go out" day for lunch and from what I heard in the afternoon, people liked it, as they have other years. After lunch I went to Where There Is A Loop There is an Algorithm by Peter Lorimer and Fatemeh Jafargholi. I really liked how Fatemeh connected something I said about memorable catchphrases like "better safe than sorry" to algorithms and their names.

Then another Conor Hoekstra "so many languages" talk, Composition Intuition II. It was a careening ride between "heh, I can actually follow this, that is kind of neat" and "what?!?". Conor takes some of the mystery out of jargon words you hear other people use and helps to bring concepts from esoteric languages ("this one was written for winning code golf challenges") into our regular lives.

Then came perhaps the most anticipated break of the conference: The Canadian Snacks Break!

Butter tarts, nanaimo bars, maple cookies, and little bags of Hickory Sticks! You won't forget where you are at this conference!

We wrapped up with a keynote from Tony Van Eerd that appeared for a while to have only one slide (but actually had 86) and a lot of philosophy and thinking. To do a good job of abstraction, you need to think about what a thing is, and what the properties of a thing are, and Tony led us through that very skilfully. Definitely one to chew on on the way home.

And with that I was on the way home. Into the GO station that literally connects to the Microsoft building:

And on the train, with one well-timed selfie-with-the-venue:

See you all next year! You can even buy your tickets right now for a huge discount to use this year's budget, if you like!

Kate

Friday, July 26, 2024 7:58:57 AM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, July 25, 2024

Day 2 at CppNorth started with Lightning Talks! But first I had to walk to the venue. When I drive around, I'm used to a flagger making cars stop from time to time to let a construction vehicle proceed. But this was my first sidewalk flagger:

The lightning talks were terrific, as they so often are. Funny, helpful, educational, often all 3. Pier-Antoine Giguère was our high-energy MC and really shone. I don't have any pictures because I was paying attention to all the talks!

Then it was Chandler Carruth, one of my fellow Carbon leads, with How Designing Carbon with C++ Interop Taught Me About C++ Variadics and Overloads, a talk I definitely enjoyed. There was plenty of code in both languages.

The audience seemed to enjoy it, too. After lunch I went to Hiding your Implementation Details is Not So Simple by Amir Kirsh, who has a gentle teaching style I really like. Then it was Mitigating the Intellectual Anxiety Associated with Learning the C++ Programming Language by Emmanuel Danso Nyarko from CppAfrica. If you've ever worried about C++'s reputation for being "the language for smart people" this talk will show you just how real it is. The reality of what jobs are available in Africa controls what languages people will learn. With no high-paying fintech or envy-of-your-friends gamedev employers, why would someone take on something they think is incredibly difficult?

This also applies to what is in the standard library. Seasoned C++ developers with lots of community folks to talk to can figure out how to build a UI. Different projects will make different choices - use Qt or some similar C++ framework, put a not-C++ frontend on a C++ engine, or some of the other choices of various age and success. But how does someone without that community navigate those choices and get started? Why doesn't the standard library help with that in any way at all other than "console apps" with keyboard input and text output?

Then I went to see Sohaila Ali, a very poised 17 year old with years of experience in hackathons and other contests and conferences, talk about career from that youth perspective. The audience was very engaged and the conversation after the talk was lively and enlightening.

Alas, as that talk wrapped up I had to do as I mentioned in my keynote and accept my own limitations. After a very full day of interesting talks I needed to cut the input for a while so I did not see Eric Wastl's keynote. I look forward to the recording, because I heard it was good.

One more day to go!

Kate

Thursday, July 25, 2024 7:59:18 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, July 24, 2024

Monday morning started with a short walk to the venue. The first few minutes were against the flow of Toronto commuters pouring off a GO train and walking to nearby offices, which was quite an experience. But on reaching the 44th and 43rd floors, the reward was an amazing view!

I was worried about whether this year's food would be able to match the wonderful food we had our first two years, at a hotel. Well, it's been just as good and even better at times. Here's the morning pastries and fruit:

I had the opening keynote again this year. Here's the empty room after my tech check:

My talk went really well. This was the first time I had ever given it. I really wanted to reach the younger people, and I believe I did, to make sure they are aware there are things they can do early on to build up resources that will help you have a happy and healthy old age, and program for as long as you want to. I'll blog a link to the recording when it's live. Here's a picture from Twitter:

After my talk, I attended "C++ is a MetaCompiler" by Daniel NikPayuk. He had terrific outlining on his slides.

I urge everyone who is doing a talk to bake all their highlighting and "notice here that" into the slides themselves. Show the code, then advance or build or whatever you call it in your slide tech, so that the thing you want to show people is highlighted in some way. A coloured background like this works fine. Talk to it, then advance to the next thing. This is quicker than anything you might do with a mouse or other tool on the fly, it looks neater, it is guaranteed to be on the recording (pointing with your hand or a laser pointer never is), and the slides themselves remind you of the things you wanted to point out on them! I learned a lot from Daniel this week, starting in this talk but not ending there.

Then I watched Beginner's Mind, Expert's Mind by Dawid Zalewski. This talk was literally about minds in a way I wasn't expecting and it was very good. Highly recommended.

After lunch (spent mostly goggling at the amazing views, but the food continued to be very good) I went to "Software Engineering Completeness : Knowing when you are done and why it matters" by Peter Muldoon and "Meandering Through C++ to Create ranges::to" by Rud Merriam. I really enjoyed both of these, one for having no code at all but understanding how code fits into the big picture, and the other for having a lot of code and opinions about that code.

Then I went back to the hotel for a nap so that I could attend the Belonging Dinner in the evening. Negar Farjadnia talked about living as your authentic self and how even if there are a lot of barriers to that, putting in the effort to overcome those barriers and reach a place where you can live authentically brings huge rewards, not just in being happier but in many other aspects of your life.

What a first day! Super pleased with how it went!

Kate

Wednesday, July 24, 2024 11:32:40 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, July 23, 2024

Sunday I travelled to CppNorth in Toronto. It started for me with a bus trip:

After the bus, I had an hour on the train and then a 5 minute walk to the conference hotel, the Royal York. I waited for my room to be ready and was pleased to be able to see the venue from the hotel:

It's the blue glass building with the diamond shapes on the side. Going back and forth between the venue and the hotel is quick and easy.

That evening we had a small reception to pick up our badges. I liked these pronoun pins:

I also enjoyed the Northern Lights image on the badges. I met people who were here in previous years, new speakers, and old friends I am happy to see many times a year. Everyone was eager and ready to learn. It's a great start to the week for sure!

Kate

Tuesday, July 23, 2024 3:01:08 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, May 21, 2024

I really enjoy speaking at NDC Techtown in Norway. The airport is pleasant and easy to navigate, the trains are reliable, and it's a quick walk from the train station to the hotel, which is right at the venue. Plus the other speakers are always amazing, so I have a jam-packed two days of sessions to attend. Many years ago I decided to only speak at conferences where I would want to watch sessions, and it improved my life tremendously!

This year I'll do The Aging Programmer. This is a new talk that should be helpful for even the youngest programmers amongst us, because when it comes to planning for a happy old age doing what you enjoy, it's never too late, and it's also never too soon.

See you there! You've got three more days to order Early Bird tickets!

Kate

Tuesday, May 21, 2024 11:07:23 AM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, May 13, 2024

I am really starting to look forward to CppNorth. We're in a new venue this year, the Microsoft Canada offices! They have a lovely suite of presentation rooms that they make available to community groups like ours. The program is chosen, and we're working on the schedule. In the meantime you can see the speakers and their talks. If you're ready, register now! You can also book a room at the conference hotel, the Royal York. It's an easy walk from Union Station to both the conference and the hotel as you can see from this map showing all three.

For those who would fly to Toronto, there's a train called the UP between Union Station and YYZ. You should plan to come a little early so you can do some sightseeing before the conference. There's a see-and-do channel on the conference discord that will give you some great ideas.

I'm honoured to do the opening keynote again. This year's topic: The Aging Programmer. Eyes, wrists, memory, stamina ... so many things we rely on can get weaker as we age. That doesn't mean you can't keep going if you want to. I'll talk about it.

See you there!

Kate

Monday, May 13, 2024 4:39:01 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, May 09, 2024

On January 8th, 2004, I got an email from the MVP Lead for Visual C++ at Microsoft, asking if I would like to be an MVP. After checking to see what that meant, I said yes, and was accepted into the program. I was renewed every year, and at some point after half a year, making just over 20 years coming up at the end of June. I'm still the only MVP called Kate.

I went out for MVP Summit that first year, and some RD stuff at the same time. Here's a production still from "Red Chair Green Wall" - the plan had been to greenscreen in some image related to where we each were from, but then in the end, we didn't. I'm including it to show how much younger I was then!

I've decided not to renew this year. Usually, people making this announcement do so because they're no longer doing the sorts of things MVPs do. But I'm still teaching, speaking, helping folks online, writing the occasional book, helping to run a conference, and all the technical things as well. What's changed isn't so much me, it's the program. I always valued my connection to the Visual C++ team very highly. These days, the team maintains those connections with developers whether they are MVPs or not. Events like Pure Virtual C++, among other things, can keep me informed as well or better than the program can. The MVP program is all Azure this and AI that and exciting details and announcements about conferences that just aren't relevant to me. I'm sure they are useful and exciting tools and events, for someone. I am focused on my little piece of the world and don't need more information on the stuff I've decided to ignore.

Joining the program was definitely life changing. I had some wonderful times, learned things I really needed to learn in as quick and enjoyable a way as you can imagine, met terrific people and raised my professional profile. I would do it all again in a heartbeat. I'm just not going to keep doing it, because for me personally the benefits are dwindling.

I'm truly grateful to John Perry, for bringing me into the program, to Karen Young for inspiration and funny stories, to Sasha Krsmanovic for everything, to Sim Chaudhry for cheer and support, and to Betsy Weber for being the last one standing. Most of all, I'm grateful to my fellow C++ MVPs, and the Canadian MVPs from all technologies, for being great people to spend time with and learn from. There are too many to mention -- I hope you all know you really made a difference.


Sure, I could have cropped it a little tighter, but then you wouldn't see the picture in the background of me with Bill Gates :-) What a marvelous pair of decades!

Kate

Thursday, May 09, 2024 3:02:29 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, August 31, 2023

During CppNorth, I took a few minutes away from the conference to do an interview for Pluralsight. The host was my dear friend Julie Lerman and we had a great time. We talked about my courses, #include <C++>, CppNorth, Carbon, and a lot more.

I thought you might like to see a few "production stills" of how I set up the space to do the recording. It's always a challenge in a hotel room to get good light, keep the bed out of frame, and be reasonably near an available power plug. I did it!

Yes, I have my ring light clipped to a lampshade. And I brought the light, my good mike, and my mike stand to Toronto with me in my suitcase. Getting the laptop up high enough and at the right angle involved a little foraging in the room :-)

This was the view from my chair. (That desktop background is the view out of the Bridge of Sighs, in Venice.)

And here's the final video.It's about seventeen minutes; please do share the link with others.

Kate

Thursday, August 31, 2023 11:04:11 AM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, August 27, 2023

The recordings from ACCU have been appearing over the last few weeks and now both of my talks are up:

  • C++ And Beyond: Discussion is a panel discussion with Vittorio Romeo, Kevlin Henney, Nico Josuttis, and me, moderated by Bryce Lelbach. The fun starts just six minutes in when Nico declares C++ "fundamentally broken." Still, there is some positive and hopeful content. We should think about the languages we use and what we want from them. C++ is a language that changes, which has consequences, both good and bad.
  • Become a Better Programmer by Using Words and Ideas From Casual Gaming is my closing keynote. Not a lot of syntax in here, but a new way of looking at some of the things you do at work, and how to approach those, that you may find helpful.

Going to conferences in person has many advantages, and I'm glad we're solidly back to doing that. But for the ones you can't attend, you can at least watch the sessions, and I highly recommend that you do.

Kate

Sunday, August 27, 2023 11:57:22 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, August 18, 2023

The agenda for the Qt World Summit has now been released.

I'll be doing a half-hour version of a talk I've given only once before, "Am I a Good Programmer?" Many people have told me this is something they worry about pretty often.So at the end of November, we can discuss it together.

I've been lucky enough to speak in Berlin at several different conferences and I'm looking forward to being back there again. Would you like to join me? You can even get a discount of 10% if you use the code QtWS23_Kate -- register here.

Kate

Friday, August 18, 2023 12:32:58 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, July 20, 2023

Day 3 began with a terrific keynote from Jessica Kerr, I can write the code. But getting something done is another matter. I was so thrilled when she agreed to come and do a keynote, and this one didn't disappoint. I took pictures of several slides, always a good sign.

After a break it was time for Tony Van Eerd with Value Oriented Programming Part V: Return of the Values. There was plenty of pop culture here but also some darn good advice about making good abstractions, and what's good about them. Then out for lunch again ... I deliberately chose something different on my second trip to the market.

The afternoon started with Conor Hoekstra and New Algorithms in C++23. Conor makes these things look easy -- perhaps they actually are? Then the closing keynote, from Timur Doumler, called Contracts, Testing, and the Pursuit of Well Defined Behaviour. We sure have plenty of undefined behaviour to deal with:


I enjoyed this keynote too -- they were all good.

And then it was time to say goodbye to this lovely venue and this lovely conference for another year.


Being all on a single floor this year made it super easy to meet people, have chats, enjoy the breaks, and so on. One thing I noticed this year was that some people brought their children. This was just lovely! Parents are quite capable of knowing if their child can sit quietly and be in a session, and it was great to see that in action. I hope bringing children to conferences is something I see more often in the future.

Kate
Thursday, July 20, 2023 4:26:00 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, July 18, 2023

Another amazing day in Toronto! Let's talk about what sessions I went to so far.

I started with Patrice Roy's Moving an Existing Project to C++ 20 for Fun, Beauty… and Results!. The first part set up a problem and showed some C++17 code to handle it. I was a little impatient during this part, because it was a lot of code and I would have done some of it differently (because I am doing C++20 which is the point of the talk) but I did notice that it was carefully written to be fast and readable. Then the fun started as things got shorter, simpler, and (proven with some measuring) faster using C++20 goodies.

Next was Ben Deane with Calendrical C++: std::chrono, History, Mathematics and the Computus. This very entertaining talk took a problem few of us really face in code (when is Easter next year?) and used it to show off what chrono can do with dates. Probably my favourite slide was the one to show when Thanksgiving is. When you get to it, you'll see why.

The first break of Day 1 was the "Canada Snacks" -- see the published menu for details. I've never put a blackberry on a Nanaimo bar, but they certainly were delicious.

I enjoyed And Then() Some(T) by Victor Ciura a lot, even though I had to duck out early. If you would say no to "are you using higher order functions today?" this is the talk for you. Because you almost certainly are, and knowing that will make a lot of things easier to understand.

For the last talk of Day 1 I had planned to attend Rud Merriam's A Journey into Ranges, Views, Pipelines, and Currying but some last minute schedule juggling as speakers ran into travel problems put it up against Timur Doumler with C++ and Safety. Safety is a timely topic, so I'll wait for the video to watch Rud's talk. Timur did an interesting review of what the word "safety" even refers to, why governments are starting to have an opinion, and whether C++ can ever be proven safe -- and why you should care.

We wrapped up the day with the conference dinner, a nice mix of old friends and new, speakers and not, and good food. I enjoyed the conversations a lot!

Day 2 started with a keynote from Ben Deane, Optimizing for Change. Some excellent advice in this talk even if I did find the dark background a bit of a challenge on some of the code slides.

I had an online meeting I couldn't miss, so I didn't go to another morning session. After my call I walked over to the St Lawrence Market to get some lunch. I wish more conferences were fully in the towns where they are held, and made it simple for attendees to walk out and experience a little sunshine and access a wider variety of food options.

The afternoon had more tough choices, but I went to Why Good Code is Relative by Daniel Withopf. A good summary of why you can't "just write it the fast way" and some solid code samples about how to actually follow advice like "avoid heap allocations."

Then I went to Get() into Retroactive Static Reflection by Vincent Tourangeau. This was a slideless talk, bopping around in a lot of surprisingly-readable code that showed how to get properties, introspection, and a lot of other things you think C++ doesn't have -- and all with C++11. I know I'll be watching the video when it's out because there were a few moments where I wanted to rewind and see something again!

For my last session of Day 2 I went to Writing C++ to Be Read by Vincent Zalzal. I really enjoyed this talk! It's the sort of talk I would give, but Vincent included a number of excellent points I had not made or heard before. He also had fantastic slides, with highlights to point out the parts he wanted to draw attention to, and good examples.

That left the Lightning Talks. Wow, these were so good! As always, some were funny, some showed something we needed to learn, and some were highly personal. I've seen a lot of lightning talks and I always get a lot from them. But I don't remember lightning talks from student volunteers and members of the organizing committee anywhere else. Worth staying up for!

Next, one more day!

Kate



Tuesday, July 18, 2023 7:03:11 AM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, July 17, 2023

So great that the second year of CppNorth has really happened, and started so darn well, too!

We started planning year two even before year one had happened, with a "next year" folder, and never really stopped. If you thought it was challenging to plan and host a conference with a pandemic still underway, that's nothing compared to doing the same thing during -- what are we calling it? -- an "economic downturn"? Getting attendees and sponsors took a lot of work, and luckily a pile of people who aren't me did that work.

Me, I showed up on Day 1 and did a keynote. I really enjoyed it, too. I'll post again when the video is up ... if you're an attendee you should be able to get the slides any time now.

This is 90 minutes of "stuff I've learned" like "Take Notes in Meetings" and "Always Take a Moment to Check" (aka Shift Left but for people) and the like. Many people told me it was helpful, which is very reassuring.

Kate

Monday, July 17, 2023 11:34:57 AM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, July 15, 2023

I had a lot on my plate when the MVP renewals appeared July 6th, but I'm delighted to number myself among this illustrious group again. I'm never worried that I haven't done enough for the C++ community, but I do sometimes worry if the C++ community is the target audience for the program any more. Still, I suppose it must be, since they renewed me.

I updated my profile on the MVP site a little.

Kate

Saturday, July 15, 2023 10:10:05 AM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, June 17, 2023

From time to time I think it's wise to summarize the courses I have on Pluralsight. There is a link on the side you can use to get a free trial if you want to take any of these. Because I redo most of the courses each time a new version of C++ becomes widespread, there are quite a few courses with similar names. Here's a quick summary.

If you are using the latest version of a major compiler, you are on C++20. These courses have been updated for C++20:

  • C++ 20: The Big Picture This is an overview covering "what is C++?" and "what is it used for?". If someone has suggested you learn it, start here to understand why you might want to. The title means that it's up to date to C++20, not that it only covers C++20. The actual content is equally applicable to older versions of the language.
  • C++20 Fundamentals is more properly "the fundamentals of C++ including things that were introduced in C++20". This is an introduction to the ideas, syntax, and standard library. At seven and a half hours it can't cover absolutely every corner of the language, but it does cover what you need to call yourself a C++ programmer, and get started writing real code. This course assumes you already know how to program. If you don't, try Learn to Program with C++ 17 which will cover the building blocks of programming languages like loops, functions, and objects while teaching the C++ syntax and library. Afterwards, you can take Fundamentals to fill in any gaps.
  • C++20 Algorithms Playbook again covers up to and including C++20, so plenty of things that have been around for decades, but it does have a lot of content that is C++20 only, because ranges made such a big difference here. If you're not on C++20 yet, take the C++17 version, listed below. Both versions are designed to convince you to stop writing raw loops and start using the many useful functions provided in the standard library. I demystify iterators and show you the benefits of using library code instead of rolling your own.
If you're not on C++20 and are wondering if you should be, try What's New in C++20. It will show you what you have to gain by updating to the latest version of your compiler (and how to try things out if your compiler doesn't support something yet.)

If you're on an older version and can't move, you should still use the latest iteration of Fundamentals. There's very little C++20 only material in there, and it's all signposted, so you can just move past that part if you need to. For the algorithms course, Beautiful C++ 14: STL Algorithms is the older version that doesn't have all the ranges additions.

Some of my courses are really not version specific, but apply to particular kinds of work you might need to do.
I plan to update everything for C++23 when the compilers have support for the new features. There are a few things coming I'm really looking forward to!

Kate

Saturday, June 17, 2023 2:51:47 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, June 16, 2023

Time for an update on the conferences I'm doing in 2023.

In April I did the closing keynote at ACCU, Grinding, Farming, and Alliances How words and ideas from casual gaming can make you a better programmer. My idea here is that certain things you are fine with in games, like "daily housekeeping", don't feel the same in your job. If you could feel better about them, you might be happier or more successful. Also, games pull on strengths like altruism and responsibility to get you to do things -- can your job do the same? Can your harness that to be more successful (however you define success) or happier at work? This talk was recorded and I expect it on the ACCU Youtube channel some time in June.

Next up will be "my own" conference, which is to say the one dearest to me as well as geographically nearest, CppNorth. There's still time to register for this: it will be in Toronto at the King Edward Hotel. July 17th and 18th are preconference workshops, and the 19th, 20th, and 21st are three jam packed days of sessions with evening activities Sunday, Monday, and Tuesday. If you live in and around Toronto this is your chance to see famous speakers (and discover some new ones) without having to fly a long way. I recommend you get a hotel room though, so you can truly immerse yourself in the conference while you're attending. My keynote is Steps To Wisdom: some tips I want to share with you that I earned through hard experience.

In September I'll be returning to NDC Techtown, this time to deliver the closing keynote on Day 1. These days I choose conferences based on many factors and small friendly ones like CppNorth and NDC Techtown really appeal to me. Both attract very good speakers and I expect to learn things -- I know I did last year!

In November I'll be doing something I haven't done before -- I recommend doing something new at least once a year no matter how old you get. In this case it's Qt World Summit in Berlin, where I will have a small keynote. I look forward to new people and new ideas from this experience, and hope to reach some people who haven't heard me speak before.

It's not too soon to think about the 2024 season, for me anyway. If you'd like me to speak at your conference, you can see many of my previous talks on my YouTube playlist. Please check my Speaker Kit for the details of my preferences.

See you at a conference, I hope!

Kate

Friday, June 16, 2023 4:00:49 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, August 03, 2022

I've been working away for the last few months completely overhauling my C++ Fundamentals course at Pluralsight. Of course I updated everything for C++20, but I also added a module on error handling options, tweaked most demos, and lightened the overall look and feel. I'm really happy with how it turned out.

Here's the table of contents:

Leaving pointers almost till the end may seem like a shock, but this is how I teach C++ these days and it really works well.

As always, if you need a trial code, look for the image in the sidebar here to get a free trial and give it a whirl! I had a great time writing and recording it and hope you enjoy watching it.

Kate

Wednesday, August 03, 2022 11:18:49 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, February 25, 2022

Maybe you hadn't heard? There's going to be a C++ conference in Toronto this summer. It's very exciting! I'm helping to arrange it. We've got a great venue (the King Edward) and are busy building a program right now that includes breakouts, workshops on concurrency, generic programming, and game development, plus entertainment in the evenings and plenty of special extras. I want to see Canadian C++ programmers well represented, and hope we attract people from further afield as well. Toronto in the summer is warm, fun, and light well into the evening.

Toronto downtown

Right now, the early bird price of $925 is in effect. After we announce the full program in April, the regular price will be $1250. So you can save a lot of money if you trust us to put together a great conference program for you (and we will!). You'll save enough to be able to pay for the speaker dinner, a conference Tshirt, and so on. And you'll let us know that we'll get the attendees we need to put on a great show.

Registering early helps us do things like make deposit payments to our vendors. We don't have a surplus-from-last-year, because this is our first year. So support from the community will really help. Why not check your schedule for the third full week of July (the conference is the 17th to 20th, and there are two-day workshops over the weekend of the 15th/16th) and arrange now to join us?

Kate

Friday, February 25, 2022 3:31:14 PM (Eastern Standard Time, UTC-05:00)  #    
# Monday, February 21, 2022

I have missed conferences for a long time now. I did a few online talks, but it's not the same, not at all. This year, ACCU are holding their conference as a hybrid event. This means while many will gather in Bristol for all the networking, friendship, serendipity, and other benefits of being in person, others will join us online. I think that is great: for many people traveling to a conference is not an option -- for reasons of money, physical limitations, visa restrictions, and so on -- and being able to attend online is terrific for anyone who can't travel to the conference. For me, it feels safe now to travel. I have traveled twice during the pandemic: to Singapore in Feb 2020, when it was underway but hadn't really reached Canada yet, and to Singapore again in Nov 2020 for urgent family business, complete with two 14 day quarantines and multiple tests. I'll be taking all possible precautions, and I think it's going to be safe.

The schedule has been published and my talk will be Friday afternoon. I've booked my plane tickets and hotel room, and am starting to build out the list of talks I plan to attend and people I want to meet. By the way, Guy Davidson will also be there (doing a keynote, in fact) so if you're hoping to get your copy of Beautiful C++ signed, that's a good opportunity! I think there will probably be a table for #include <C++> but even if there isn't, watch our for our shirts and say hi!

I'm going to talk on Abstraction Patterns: things I've learned to spot in code that show a missing abstraction. Unlike the sort of "business objects" that you design at the start of a greenfields project or a major expansion, you don't need deep business knowledge and a long meeting with a business analyst to design these: the code will show you what to do. Come and see what I've found and if it can help you.

Kate

Monday, February 21, 2022 5:00:30 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, November 05, 2021

It's true! I helped to write a book! Another book! (Do not ask me what this brings the total to, I truly do not know.) This one is about some of the C++ Core Guidelines.

Opinions vary on when it will be available: maybe the last week of 2021, maybe early 2022. You can pre-order from the publisher if you can't wait. There will be both an ebook and a paper version.

It's Guy Davidson who wrote it really; I have been a sort of editor and suggester and inspirer most of the time. If you liked my CppCon 2017 talk, 10 Core Guidelines You Need to Start Using Now, you will love this book, and not just because it's three times as many guidelines. Guy has included explanations of the 30 guidelines we chose, along with plenty of examples, the occasional diagram, and stories that put them into context and show you why it matters how you write certain constructs and why you should avoid some aspects of the language entirely. We are delighted that both Bjarne Stroustrup and Herb Sutter, who edit the Core Guidelines, reviewed the book, gave us helpful comments on the text, and wrote a foreword and an afterword for us as well.

I learned things writing this. You will learn things reading it. It may well change the way you approach code. That is one of our goals. The other is to get you trusting the guidelines and dipping into them when you have decisions to make about how to implement something. If these 30 are useful and good (and they are!) then imagine what else is waiting for you when you're ready!

 Please spread the word far and wide.

Kate

ps: the full title is quite a mouthful. We're thinking of RainbowFlower as a nickname for the book. What do you think?

Friday, November 05, 2021 1:40:38 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, August 31, 2021

This summer has featured a lot of personal busy-ness and not a lot of work things to announce. One nice thing that has happened is my renewal as an MVP.

According to various "kate bio.txt" files kicking around my hard drive :-), I was first awarded in January 2004. So it will be a while yet until the blue 20 year marker arrives. The program has changed a lot over the years, but it's still relevant to me and a great source of information from the Visual C++ team.

Kate

C++ | MVP
Tuesday, August 31, 2021 5:12:05 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, May 17, 2021

In April, I did my Naming is Hard talk at ACCU 2021. I'm getting better at doing talks online and handling interactions, at least I think I am :-). The recording is now online, so if you weren't at the conference, you can watch the talk. Being there is still better, even when it's digital - being able to chat to other attendees and the presenter is always going to be better than just watching a recording.

I added the talk to my youtube playlist of conference talks, so if you like that one and want some more, take a look!

Kate

Monday, May 17, 2021 8:19:53 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, August 06, 2020

At the start of the lockdown, Pluralsight made its huge curriculum free to help those who were suddenly needing new skills to find a new job during the pandemic. I saw a huge number of views of my C++ course for those who don't already know how to program. It was ironic, because I was busy updating that course, a process that is finally complete.

Please check it out on Pluralsight. The new course is called Learn to Program with C++. (The similar-but-not-the-same Learn How to Program with C++ is the old one.) Here's what I did to the 6+ year old course:

  • redid all the demos in the latest compilers (Visual Studio Community Edition on Windows; Clang on Ubuntu and Mac)
  • added more Ubuntu and Mac versions of demos and tested EVERYTHING on all the compilers
  • moved content to slides and then just demonstrated it in the demo, instead of trying to explain concepts during long demos where there's no typing or other "demo" action
  • took a more "modern C++" approach wherever I could
  • improved the names in my sample code, trying not to have a,b,c and the like if I could
  • added some explanation of "make" and removed rather a lot of "how to get Visual Studio to be nicer" because it does that itself now

Plus I just generally tweaked samples, slides, and demos throughout the whole course based on comments I've had from new learners since the original publication. It's a better course.

People often say that C++ cannot possibly be taught as a first language, but that's wrong. Modern C++ is not that hard. This course is a little over 5 hours long and covers most of the syntax and punctuation you need, functions, classes, type safety, using templates from the STL like vector and string, and even touches on const and RAII. If you want to learn C++ for whatever reason, don't let someone else tell you that you must go and learn some "scratch" or starter language first before coming back to what you really want to learn.

If you already know one programming language, and concepts like "if" or "loop" then you don't need this course. C++ Fundamentals Including C++ 17 is for you. It covers even more syntax, punctuation, library, and design aspects of the library.

As always, if you don't have a Pluralsight subscription, you can get a ten day trial by clicking the big white square on the blue sidebar of this blog. Enjoy!

Kate

Thursday, August 06, 2020 1:50:16 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, June 09, 2020
This year is very strange, but conferences are still happening. And they aren't all free, either. Perhaps there's a conference you'd like to go to, and being online makes it almost feasible for you, but you can't afford the conference fee? If you're a member of an under-represented group in C++, you might win a scholarship to C++ on Sea in July or CppEurope in just two weeks. (I'm speaking at C++ on Sea, so if you win, you'll hear my talk.) The scholarships are arranged by #include <C++> and the application process is pretty easy. Please let us know a little about your background: perhaps you're part of a gender minority,  a racial minority, or in some way you feel that there are less people like you in C++ than there are in the world. If you work somewhere that pays to send you to conferences, this isn't the program for you: this is for people who maybe aren't working, or who are working somewhere that sends other team members to conferences, but not you. Your application should show us that, so we can decide to send you.

More details, including a list of conferences we've sent applicants to in the past, and testimonials from recipients, are on the scholarship page.

Want to contribute? We're ok for these two conferences. But when face to face conferences start again, we'll be raising money for admissions, plane tickets, hotel rooms, and all the other costs that keep people away from the life changing and career changing benefits of conferences. Remember our site for when that is necessary.

Kate

Tuesday, June 09, 2020 6:22:16 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, May 28, 2020

Lately a lot of people have been asking me for help as they write C++ code. I’m usually happy and able to help. There are times, though, when I either cannot help, or choose not to help. I thought it might be helpful to explain some of these a little. It’s quite likely that other members of the community have a similar set of guidelines in their heads for when they do and don’t help people with code.

Warning: this is long. I think it's worth reading it all. You want a TL;DR? It’s this: if you want free mentoring and consulting from successful people, you can have it! All you need to do is ask. But if you expect your helpers to do most of the work in helping you, and to take instruction and direction from you, you’re going to get a lot less help than if you know how to be helped effectively.

The first choice is where and how you ask. People often email me, message me on LinkedIn, DM me on Twitter, DM me on the #include <C++> Discord, and so on hoping to get personalized, instant, one-on-one help from me. That’s not a good use of my time. I prefer to help in places where others will see the question and the answer. That helps more people. It also enables more people to help – so it produces better advice as well as helping those people learn and grow. Often, I learn from the times when other people chime in. So I encourage you to post on StackOverflow (if you have the sort of just-one-question, just-one-right-answer problem that fits there), or on the #include <C++> Discord, or some other public place where a number of people can see the question and the answer over time.

The rest of the issues have to do with how much work the person expects me to do, or how much they save me. Think about how you ask the very first thing you ask. Compare “here is a zip of all the files in my project can you tell me what’s wrong with it?” to “here is a link to an online compiler (Godbolt, wandbox, etc) showing a compiler error on line 43 that I don’t understand. Can you tell me how to fix that error?” Expecting someone to install things, trawl through multiple files, guess your question, and then solve your problem and explain it all to you is really too much. At least tell people what your problem is! Often people ask for help saying something like “it’s not working” or “what’s wrong with this?” and I don’t even know if it’s a compiler error or a runtime error or running fine but calculating the wrong answer. So before you post on the discord, for example, try to have a single crisp question, not just “help, it’s not working.”

  • Show us your code, and your errors. And not as screenshots! You can copy the code into an online compiler like Godbolt or Wandbox, or if it’s less than 20 lines or so, paste it into the chat window – but please learn how to format it as code when you do that. Copy and paste the errors as text. That makes them much easier to read, and lets us copy and paste parts of them while explaining things to you. If you can’t show your real code because of how big it is or because it’s work-related, create a tiny example that shows the same problem and show us that. Stack Overflow has some tips on how to do that.  Whatever you do, do not free-type some code into the chat window that you think is the same as your problem, and then whenever people point out missing semi colons or undeclared variables, reply “oh yeah, that’s not really my code it’s just something I typed to give you the general idea.” Compilers (and runtimes) are picky and asking for help with something that’s vaguely like your real code (but not really) is pointless.

Now let’s assume you manage to get a conversation going with someone who is trying to help you. They solved that compiler error, for example, but now you have another one. As part of this process, I often make suggestions to people that they reject. I think they believe the suggestions are to make things easier for themselves in the long run, because they say things like “I can do that once it’s working.” I then have to spend a lot of effort explaining that I want them to do these things so that I can help them get it working. These suggestions include:

  • Write good variable (and function) names. If your variables are all called i, n, c, r, s, and so on – I don’t know what they represent. If I ask you to change those to words like next, rate, total, and so on, or to words you think of yourself, that’s because I can’t understand your code (I don’t know the problem you’re trying to solve) without some help. Good names aren’t a someday thing that you paint over working code once it’s all good. They are how you make code other people can read. And you’re asking me to read this code. Make it readable.
  • Use a debugger. When I ask “have you looked in the debugger to see the value of a before the loop?” an answer of “I don’t know how to use the debugger and I don’t have time to learn that today” is a great way to end our conversation. Real programmers use the debugger. We don’t have some magical compiler-simulator in our heads that can read code and tell you if it compiles or not, and we don’t have a magical runtime-simulator either. Sure, maybe I can tell at a glance that a is 0 before the loop and that’s why it’s not working, but in that case I would tell you so. It’s more likely that I want you to quickly check and see if it’s 0 or not. When you refuse to debug, you’re making it so much harder to help you. You need to learn to use whatever debugger is available to you, and you will probably save enough time today to make up for the time it takes to learn it.
  • Add some tests. You don’t have to go learn a whole unit testing framework. But if you’re writing a function to do whatever, work out by hand what it does for simple values, and write a test harness that passes it those simple values. Then you can debug the test harness and see what the function returns and confirm whether or not it works for simple values. Whether you’re reversing a string in place, calculating the Fibonacci sequence, calculating sums of things, whatever, you should be able to think up simple test cases and test your code with them. And eventually, you should be writing tests as you write your code. It’s a good habit you can build now.
  • Break up big things. You don’t have to embrace full OO or write functional programs, but don’t give me 1000 lines of code and ask me to load it into my head. Write some functions. Heck, throw in some comments and some blank lines. Show the structure of your code so it’s not a wall of text.
Some other good behaviours that will take you a long way:

  • Try the substitutions people tell you to try. A lot of times, people who are having a hard time don’t want to learn a new thing. I run into that situation all the time myself. I’m already frustrated and I’ve spent longer than I meant to and I can’t understand any of it, I don’t want you to tell me to go learn yet another thing right now. I have gained some wisdom over the years though, and it includes this: sometimes jettisoning all that half-understood not-really-working mess and doing something simpler is the best way forward. If someone tells you that vector would be better here, and offers you a few lines of code to use, just digging in your heels and refusing to try it isn’t going to lead you into learning. If you’ve got a problem because you’re trying to manage memory yourself by hand but you forgot about copying and so on, then using a smart pointer, or dropping the pointers altogether and using an object on the stack, is going to make a whole pile of work just fall away. The person advising you to try this knows how much effort it will save. You don’t, that’s why you came for help. It’s really frustrating to see a beginner insist on doing something the hard way (for no benefit), do it wrong, and refuse to accept any help other than “here is the precise and exact code to do that thing the hard way.” I don’t want to do things the hard way any more: why would I type out all the code for you?
  • Try things that don’t matter to you, if the person who is helping you tells you that your code is harder to read the way you have it. Things like initializing member variables in a constructor with the : syntax, not between the braces, or adding some using statements – these may not matter to you, but making things too hard for a busy helper may mean that helper is too busy to help today. Or ever. I don’t want to teach you bad habits, I don’t want to teach you to “pretty things up” only once it’s working, and I don’t want to exhaust myself reading difficult code to spare you the trouble of doing the right thing. Also, when a person asks for advice but never takes any of it because they’re sure it’s not actually relevant to their problem, eventually the advice-giver will stop giving it. It’s pointless.
  • Write your own code. If I tell you “the problem is that you’re not initializing x” don’t ask me to edit your code for you or paste in the new version of the function or whatever. You need to understand what you’re doing and that comes from writing the code yourself. If you don’t understand how to fix a problem that someone has told you about, ask them “how do I fix that?” If you can’t understand their answer, say “I don’t know what [whatever] is, can you explain it or show me?” Don’t just ask “what would that line of code look like?” That feels like you’re asking me to even do the typing for you.
  • Work with whoever is talking to you. Maybe when you first ask, one person has a couple of thoughts, and those are good, but while you’re changing your code to see if that works, someone else chimes in. That’s great. It’s a group chat. Don’t tell them that you’re working with the first person or anything like that to reject their help. Consider all the suggestions you get. If you’re talking to someone and then they stop, that’s cool too. Many people pop into chat for 5 or 10 minutes waiting for a conference call to start, or while they’re eating lunch, and don’t stay long. People get called away from their keyboards. Don’t start pinging the person trying to bring them back or ask if they have any more thoughts or saying you’re still stuck. You can tell the room or channel as a whole that you’re still stuck. Maybe someone else will have some ideas. Your problem may end up solved over an hour or so with three different people. That’s a win!

I know, that’s a lot of advice. Thing is, you can get a lot of help from strangers on the internet, if you ask the right way. If you ask the wrong way, most people will just shrug and say “looks like you have a problem” and move along. They won’t even tell you why they’re not helping you! To get the marvelous free help, and to truly join the community, you have to put in a little effort. Trust me, it’s worth it!

Kate

Thursday, May 28, 2020 4:26:40 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, January 08, 2020

Every once in a while, I make a big change in how I plan and manage my speaking engagements. Early in the last decade, I decided to speak only at conferences I would happily pay to attend, and that improved my life dramatically. Instead of trying to justify a week away from home and the office in which I would try to keep up on emails from a hotel room or a hallway couch, while surrounded by people who didn't care about the stuff I cared about, I started looking forward to a week of learning and growing, of coming home knowing more than when I left, and of meeting my heroes and getting to see my friends.

While this was an important change, it was only a change in my decision criteria, and not in my overall process of deciding where to speak. I would get an email, or see a tweet, or otherwise become aware that a conference was going to happen, and then I would decide, on a case-by-case basis, if I wanted to submit to that conference. Sometimes I would have to decline because I had already submitted to another one at roughly the same time, without realizing the overlap. In mid 2019, I changed that. I listed out all the C++ conferences I knew of, and roughly when they happened. Then my partner and I went through the list, noting when various family events are happening, when we want to go on vacation, and other "big rocks" that conferences have to fit around. We talked about how many conferences I wanted to speak at, and whittled down the list to that many.

Now, as each conference opens a Call for Papers, if it's on my list, I submit, and if it's not, I don't. Of course, my talks aren't always accepted. I set myself a goal to speak at two non-C++ conferences in 2020. I was invited to one, but after I agreed they changed their dates and that conflicted with something else I had accepted. I submitted to another and they declined my talk. But one has accepted, and I have accepted another invitation, so I will be speaking at two non-C++ conferences for sure.

Expect to see me at:

  • January, Montreal: CUSEC 2020 (Canadian University Software Engineering Conference) - keynote (and a Meetup while I'm in town, come ask about technical speaking)
  • March, Bristol, UK: ACCU - Naming Is Hard, Let's Do Better
  • May, London, UK: SDD - Naming and Emotional Code
I have submitted to some for June and onwards, but haven't heard, so I'm not mentioning them, nor the ones I've decided not to submit to. That's not fair to anyone. I might do as many as 7 conferences by the time the year is over, and that's a lot. Plus user group talks whenever I can.

So is there any point inviting me to speak at your conference? Well, sure. It might match up with something else (at least one conference I added to my list because I could combine it with another trip that was already planned) or be so compelling that I will find a way to fit it in. Or it might end up on my list for next year -- I like this advance planning so I'm going to keep doing it. As always, remember that I do have requirements for any speaking engagement, so if you invite me, please let me know you've read that and meet them.

If you're at any conference I am speaking at, please do find me and say hi! It's one of the most important parts of any conference for me.

Kate
Wednesday, January 08, 2020 1:25:46 PM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, November 28, 2019

I'm thrilled to announce my latest Pluralsight course:

Here are the modules:

  • Course Overview
  • Modern C++
  • Standard Library Containers
  • Lambdas
  • Standard Library Algorithms
  • Move Semantics
  • Exceptions
The course picks up where C++ Fundamentals Including C++ 17 leaves off and puts you in a good place to take Beautiful C++: STL Algorithms or other C++ courses. As always, if you want a free 10 day trial, click the large white box on the side of this blog page.

Hope you enjoy it!

Kate

Thursday, November 28, 2019 10:22:03 AM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, July 25, 2019
CppCon is approaching again and my calendar is FULL. The schedule may change and there are things still to be added, but the current plan is:
  • On Sunday, I am doing a preconference workshop (you can still get a spot) with John Lakos and Andrei Alexandrescu
  • After the precon I hope to relax at the TShirt dinner. Pack a Tshirt that says C++ (or bring your badge, or a piece of paper on which you wrote C++ yourself) and choose a restaurant from the list that should be published by the time we all get to Colorado. When you arrive, ask where the other C++ Tshirt people are, and make some new friends! I'll be tweeting my plans just before I head out.
  • Then it's back to the shiny new venue for the Registration Reception. Even if you're on East Coast time like me, make an appearance, see some friends or some of your heroes, there will probably be treats, and you'll be all set for the morning. Knowing the venue a bit is going to make you sleep better, and having your badge already will let you sleep longer.
  • Monday I will be attending talks and spending time at the exhibitor table for #include<C++>, an organization working to make the C++ community more welcoming and inclusive. Come by and get a sticker! Buy a shirt! And you know, attending talks and hanging at the #include table is what I'll be doing all 5 days.
  • If I manage to stay awake, I'll go to The Committee Fireside Chat after dinner. If there is something you always wanted to ask the people who create the C++ standard, here's where that happens.
  • Tuesday and Wednesday it's talks, talks, talks! I predict I will go back to my room for a nap at least once. It's a strategic choice that lets you actually experience the post-nap talks instead of drowsing through them and needing to watch the recording in the end.
  • Wednesday night is the #include<C++> dinner and panel! You can register for this on Eventbrite as part of registering for the conference. I'll moderate a discussion about some of what we've achieved in just two years, and what some of us would like to see next.
  • Afterwards it's Lightning Talks. Everyone loves the Lightning Talks, they're always fantastic. I will try my best to stay up for them.
  • If I can, I'll come super early on Thursday and Friday for recordings of CppChat. And stay all day for talks, of course.
  • Thursday night is the Speaker's Dinner. And there's a planning meeting after that. But I might need an early night, because...
  • Friday morning I have my one breakout session: Naming is Hard: Let's Do Better. And like last year, a lot of really good content is on Friday. Don't even think of leaving early. Fly home Saturday morning, you won't regret it.

See why I call CppCon an intense conference? 12 or 13 hours a day, every day. And no time for sightseeing! But oh my goodness the things I will learn, the people I will meet, and the fun I will have. See you there!

Kate

Thursday, July 25, 2019 8:02:09 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, July 14, 2019

On July 14th, 2017, Guy Davidson tweeted what he thought was a passing pun:

But when I saw the tweet, I thought, yeah, why isn’t there?

And in that moment, #include was born. We got together at CppCon and again at Meeting C++ where Guy did a lightning talk on inclusion. We were off and running. At that time we had a channel on the cpplang slack, but that didn’t work out well: a change of owners of the slack to someone who was less interested in preventing harassment and abuse, coupled with slack’s fundamental design tenet that people having trouble with bad behavior on a slack channel can always go to their mutual boss (which doesn’t work on public servers that bring strangers together) resulted in #include being pretty much driven off the slack and forming our own server elsewhere, on discord.

The original channels on the discord were all about the work of running #include. How can we get conferences to have a code of conduct? How can we help employers to write job ads that will attract all kinds of applicants, not just people who closely resemble the ones they already have? But we couldn’t stop talking about C++ so we added a channel for that, and then another for something else technical, and another, … and things really started to grow.

By April 2018 we were about a dozen organizers and very few people who weren’t organizers. But now we have over 2300 members and over 70 channels. People are getting help with C++ problems they face, recruiting helpers for projects, getting advice about speaking or attending conferences, and much more.

Our original goals were pretty low key really:

  • To encourage under-represented people to speak, to apply for jobs, to stay in this industry
  • To get conferences to have a code of conduct (we hadn’t even thought about enforcement)
  • To get employers to value diversity somewhat, and to provide some resources to conferences and employers

We thought it would be nice to have some stickers and Tshirts made, and have a table at conferences where we would urge people to join our discord and try to make our industry more welcoming. Well, that worked! We’ve had tables at major C++ conferences the world over and you can be sure to find a smiling person to talk to, whether they’re officially “working the table” or not.

We’ve seen these shirts at conferences and user groups around the world, at C++ standards meetings, and on a lot of speakers and influencers. We think they send a strong message to attendees that the world is full of friendly and welcoming people who will not exclude you because you are different in some way. If you want one, we have a US-based store and a European store, or you can find us at a conference near you. We try to diffuse the stickers around the world – if you run a user group and are going to be at a conference, get in touch with one of us (the conference channel on our discord would be the best place) to see if you can get a handful of stickers to take home and give out at the group.

Last year at about this time, someone asked if we were interested in partnering with the Women in Tech Fund to get women to CppCon. We sure were! The conference donated tickets at below their catering costs, and we raised $4000 to cover travel and accommodation for our scholarship winners. It was a big success and we keep doing it at conference after conference. Right now we’re raising for CppCon again – this year not just women, but anyone who is under-represented in the C++ community, can apply. If your employer isn’t sending you, why not see if we can?

This is a lot more than we had originally planned to do. A number of us started insisting on a Code of Conduct before agreeing to submit talks to a conference, and suddenly it seems all the C++ conference have good Codes of Conduct now, with real enforcement too. There’s a best practice gaining popularity of introducing the Code of Conduct team at the start of the conference too. We started handing out pronoun stickers to put on badges, and not only do lots of people take them (please take one even if your gender is obvious, it makes life easier for those whose isn’t) but some conferences have even started including a pronouns field on badges. We’ve built this amazing friendly community on the discord where people are learning and growing and becoming leaders in the C++ community at large. We’ve seen talks and demos and forms and web sites changed after we pointed out that a particular wording or example wasn’t welcoming and inclusive. People generally want to be welcoming and inclusive, they’re just not sure how to do it, so our strategy of providing really specific unsolicited advice has worked well. And probably the thing I’m most proud of is the people – actual breathing humans – we have sent to conferences. Going to a conference is career-changing, especially when you’re relatively inexperienced. You can meet your heroes, ask questions, learn a ton, make connections, get advice, and re-energize your connection to this industry and your job. Already I am seeing former scholarship winners on stage, donating to the current fundraiser, and finding their voices on Twitter and our discord. It’s amazing. I want to pinch myself some days.

The people who form the core of #include support and encourage each other. Many of us have given talks we would never have otherwise given. I won’t speak for her, but I expect the jaw dropping and enlightening Deconstructing Privilege talk that Patricia Aas has been giving could be one of them. If you haven’t watched it, you should. A lot of what we’re doing at #include is “privilege lending” – using our positions to ask for things to make people with less privilege feel welcome. We’re also teaching people who’ve been spared some hardships about the realities some other people face. Often this is all it takes for things to change quite quickly.

We’ve also done a lot of lightning talks and internal corporate presentations about #include and what we’re trying to do, but it seems like none of them ever get recorded and uploaded. Rest assured, we’re still working hard to move the needle when it comes to inclusion in the C++ community.

What’s next? Well, we’d love to start seeing child care available at C++ conferences. We’d love to see other developer communities doing some of what we’re doing, and we’re going to keep learning from other developer communities too. We’re seeing things like quiet rooms, pronouns on conference badges, and food labelling becoming the norm. And we’d love to get suggestions from anyone who feels excluded from conferences, training, job opportunities, and online communities. Join the discord and join the conversation, or find us on Twitter. See you there!

Kate

Sunday, July 14, 2019 6:46:26 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, June 28, 2019

I just published a small course on Pluralsight called Advanced Debugging with Visual Studio 2019. It covers IntelliTrace and Code Map, two features that are only in the Enterprise Edition of Visual Studio. Many people don't know about them, so I put together a quick introduction.

Here are some of my other current courses:

  • Visual Studio 2019 Getting Started - what you need as a new user of Visual Studio to start using it. There are a variety of other Visual Studio courses, and pretty much all of the material from my 2017 one is still applicable, so don't take just this one or you'll be missing some really powerful techniques.
  • Beautiful C++: Updating Legacy Code - I really enjoyed writing this course and if you maintain old C++ code, I think it will make your life a lot easier. It discusses both specific patterns to update (and why) and overall strategic approaches (not mechanically replacing every incidence of one pattern with a newer pattern.)
  • C++ Fundamentals Including C++ 17 - this is the go-to course for developers who want to learn C++ today. Whether you never did any, or did some a decade or two ago, this course will cover the syntax, library, and best practices you need. If you've never programmed in any language, try Learn How to Program with C++ instead.
  • Using Stack Overflow and Other Stack Exchange Sites - we all go to Stack Overflow when we're stuck. But a lot of us are bad at it, because it doesn't work like other sites. Take a little time to improve this skill and you'll get better and faster answers. You might even become one of those high-rep users who others admire!
  • Beautiful C++: STL Algorithms - Stop writing raw loops and you will get more readable code with less effort. The library has so much waiting for you and this course will help you make sense of it all.
There are more, but if you take all of these, you'll be in a strong place as a C++ developer. (BTW, only the Visual Studio courses require Visual Studio. All the others work with any development environment you prefer.)

Kate

Friday, June 28, 2019 9:39:32 AM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, May 06, 2019

In early April I was lucky enough to go to Bristol in the UK for the annual ACCU conference. This has been an aspirational conference for me, one I attended before speaking at and am always delighted to attend. This year I was invited to keynote, and it turned out to be the closing keynote, which meant I was not done with all my talks until the conference was over! Nevertheless I enjoyed the week tremendously.

I flew to England overnight Saturday night. People often ask me how, given the fatigue issues I have left over from the whole surviving incurable cancer thing, I am able to travel. One reason is that when I travel, I only travel on travel days. I don’t try to work at the airport, on the plane, etc. I read a book or listen to music or just relax. On overnight flights, I sleep. I also schedule a few days to adjust to the time zone without having to think hard or meet important deadlines, like finishing my talk. On this trip, I spent two days visiting Cardiff, which is actually where I was born, with my sister who is planning to move there. It was marvelous fun watching a family explore and discover their new home town, and going to places I have seen on TV or in pictures.

Tuesday I did a private corporate talk about #include<C++> and diversity issues. It was very well received and I might offer it to other companies as a result. I always buy a train pass when I go to the UK and it got a good workout on this occasion. Back in Bristol I was able to relax and know I was ready for the conference.

After a lovely opening address by Russel, we had an illuminating keynote from Angela Sasse.  Security can’t be left until the end or handled by a separate group who fight the developers. Afterwards I took some time to meet up with more friends and spend some time at the #include table. After lunch, a very good talk from Jonathan Boccara on reading unfamiliar code.  I loved the map analogy and the way he showed using a call stack to increase your mapped area. Then a workshop from Gail Ollis on Helping Developers to Help Each Other which really brought home to me once again how important tactile artifacts – things you can pick up, put down, wave around, put next to each other and so on – can be to encourage open and complete communication.  The recording stops when the hands on part starts – just one of those things you can only get by attending in person. The talks wrapped up with Lightning Talks and I did one – my first time doing so at ACCU. I was not able to stay up for the evening reception beyond a quick “hey! Great to see you!” to a handful of people. There were plenty of talks I couldn’t get to – recordings for me to watch later!

Day 2 started with a Herb Sutter keynote.   I’ve read the paper but was really happy to hear it as a talk, and to hear the motivations behind enabling more people to use the whole language.  Then I needed some down time before my talk right after lunch. I gave an updated version of “Nothing” and as always at ACCU got some great questions that will go into the next version of the talk – or some other one.  Then I kept to tradition by doing the Pub Quiz, entertaining as always for the don’t-write-this-at-work code and marveling at how some folks know a lot of dark corners! Another round of lightning talks and an early night, meaning I couldn’t attend the Bristol Girl Geeks dinner as I had planned.

The Day 3 keynote was low on code and high on insight as Paul Grenyer talked about growing a community while dealing with the ups and downs of life in general.  Then to a fascinating talk by Dom Davis about communicating, with significant meta content that I really enjoyed.  I spent the lunch break at the #include table, and then dove into a variety of little talks – 15 and 20 minute ones. I was starting to tire and didn’t pay as much attention as I should have, but let me recommend Alex Chan’s reminder that the tech we build can hurt people when it’s being used as designed.  I took a break to be ready for the Conference Dinner where I was able to catch up with old friends and meet a few new ones.

Finally Day 4. I started with Kevlin Henney and a talk with a similar title to my “Nothing” but very different content.  Another break, another lunch at the #include table, and then some down time before my closing keynote. I updated the beginning of this talk since the C++ on Sea keynote, and I think this improves it. More great questions after and I think more material to work in there somehow. Then the close of the conference, a certain amount of hanging around not wanting it to end, and up to my room for another early night and to get ready to go.

Sunday all I did was take the train to the airport, fly home (sleeping a little on the plane) and drive home. A lot to process, as always after ACCU. And when I got home, a lot to catch up on, which is why this has taken a few weeks to write up!

Kate

Monday, May 06, 2019 6:57:37 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, November 20, 2018

My latest Pluralsight course is live!

I start by talking about strategy - what parts to update, what general approach to take, and so on. Then I present a number of specific tactics, like using the preprocessor less and the compiler more, actually using C++ instead of just C, and using C++ features that were added in C++ 11, C++ 14, and C++ 17. I show you code examples for the changes I am suggesting, and explain why specific changes produce code that is more readable, understandable, and maintainable.

As always, if you don't already have a Pluralsight subscription, feel free to click the large white box in the margin and start a free trial. I hope you like the course, and tell your friends about it too!

Kate

Tuesday, November 20, 2018 11:39:33 AM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, September 15, 2018
Oh my, I am doing a LOT at CppCon. Here's a list:
  • On Sunday, I am doing a preconference workshop (I believe it's sold out now) with Scott Meyers and Andrei Alexandrescu
  • After the precon I will relax at the TShirt dinner. Pack a Tshirt that says C++ (or bring your badge, or a piece of paper on which you wrote C++ yourself) and choose a restaurant from the list on that page. When you arrive, ask where the other C++ Tshirt people are, and make some new friends! I'll be tweeting my plans just before I head out.
  • Then it's back to the Meydenbauer for the Registration Reception. Even if you're on East Coast time like me, make an appearance, see some friends or some of your heroes, there will probably be cake, and you'll be all set for the morning. Knowing the venue a bit is going to make you sleep better, and having your badge already will let you sleep longer.
  • Monday I will be attending talks and working a shift at the exhibitor table for #include<C++>, an organization working to make the C++ community more welcoming and inclusive. Come by and get a sticker! Buy a shirt!
  • If I manage to stay awake, I'll go to Grill the Committee after dinner.
  • Tuesday I have a session called What Do We Mean When We Say Nothing At All? and it's at 9 sharp - but you'll have been in the building for Open Content at 8, won't you? Grab a coffee and come find out how nothing can say a lot.
  • Tuesday night is the #include<C++> dinner and panel! Buy your ticket now, everyone is welcome. You do not need to be a CppCon attendee.
  • Then it's back to the Meydenbauer after dinner for Lightning Talks. Everyone loves the Lightning Talks, they're always fantastic.
  • Wednesday I'll arrive early because there are 3 sessions I want to watch at 9 (thankfully all the talks are recorded)
  • My keynote is at 10. I'm a bit nervous, but I'm mostly looking forward to it.
  • Right after that, I have a panel about interop with managed code.
  • Then I'm going to relax and listen to talks for the rest of the day, and go to the Planners Dinner. And more Lightning Talks afterwards.
  • Thursday I have no talks to give, shifts to work, or panels to be on. I'll be a free attendee ... until the Speaker's Dinner. And there's a planning meeting after that.
  • Friday is JAMMED with talks. And if you live locally, come on down and attend some because it's the open day. I have marked 11 talks in three time slots as ones I want to attend. Not sure that's going to work, exactly.
See why I call CppCon an intense conference? 12 or 13 hours a day, every day. But oh my goodness the things I will learn, the people I will meet, and the fun I will have. See you there!

Kate

Saturday, September 15, 2018 12:26:26 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, September 03, 2018

Next year, I'll be keynoting a new C++ conference, C++ on Sea. I'm really looking forward to it. A little while ago, they ran a "tweet why you want to go" contest for a free ticket, and said that if the winner already had a ticket, the conference would help the winner give away the ticket.

Can you guess where this is going? I won the ticket. I already have one, so you can win mine. Here's what you need to do:

  • Choose a way to "give back" to your community before, during and after attending. This might be blogging, tweeting, hosting a local meetup where you talk about what you saw and recommend specific talks for others to watch later, or even activities at the conference like giving a lightning talk.
  • Gather supporting links - to your blog, your repo, your YouTube Channel, the meetup site, and so on
  • If your plan won't fit in a tweet, put it somewhere that it will fit. Include lots of links - I want people to find your blog, channel, meetup etc even if you don't win
  • Tweet me (@gregcons) with your plan or a link to it. I will retweet. Focus on what you will give if you are able to attend the conference.(It's not that I don't care whether you are deserving or can't afford to go or whatever, I do, but I am going to focus on how you will share your good fortune with others.)
  • If you're not on Twitter, post on my public Facebook page. You can't just email me because the idea is to promote those links to blogs, channels, meetups, and suchlike.

That's it! I'll choose someone, probably by filtering to everyone who is offering to do something generous and then randomly choosing one, but I reserve the right to choose the single person who comes up with the most amazing plan. I'll tell the conference that you get my ticket.

Fine print: this is just admission to the conference. Not travel or hotel. Not paid time off work. You'll need to cover that yourself. I suggest that telling your boss you won the ticket because of your community involvement might be quite helpful as far as that is concerned :-). And while I can't force you to keep your promise, I will remember if you do, and that will probably be a good thing for you over and above the rewards of doing those good things for the community.

Good Luck!

Kate

Monday, September 03, 2018 12:32:39 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, June 09, 2018

Here's what's coming up over the next few quarters:

  • August 27-30: NDC Techtown (two talks)
  • Sept 23-29: CppCon (preconference day; main conference talks not yet announced)
  • Oct 18th-19th: Pacific++ (two talks)
    • Submissions are still open so if you want to join me in Sydney as a presenter, get on that!
  • Nov 15th-17th: Meeting C++ - I will not be speaking here (I just can't fit it in), but I want you to know it's happening
  • Feb 4th-6th 2019: C++ on Sea (keynote at this brand new conference)
  • April 2019 - ACCU (nothing announced yet, but I plan to be there)

I consider it an absolutely marvelous problem that there are so many C++ conferences I can't go to them all! There are a number of smaller conferences that draw primarily from one country or region, and more meetups than I can keep track of. I'm open to talking at a meetup if I happen to be traveling to a city for business anyway, but I don't think I can get up above 5 or 6 conferences a year, especially if some of them involve keynotes, plenary sessions, or workshop days. It's a lot of work!

Hope I get to see plenty of people in these various places,

Kate

Saturday, June 09, 2018 4:24:48 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, May 08, 2018

I had a very busy March and April, with travel and with preparing for those trips. So I forgot to mention that my latest Pluralsight course is now live! It's called C++ Fundamentals Including C++ 17 and it's an update of my C++ Fundamentals course. Here's what I changed:

  • I made most of the demos a lot smaller, by breaking them into pieces or by putting some of the material on slides instead
  • I made the slides less text-heavy, again mostly by splitting them up
  • I added diagrams to explain things that needed them
  • I added some C++ 14 and 17 content
  • I switched to a consistent "const after" style (aka east const)
  • I double checked every line of code for good style and consistency

I'm really pleased with the result. If you've already taken C++ Fundamentals you probably don't need to take it again, but I hope you'll recommend to others that they take the new one. I think it makes learning C++ less daunting than some other approaches do.

Kate

ps: don't have a Pluralsight subscription? There's a link over there ------->  for a free trial.

Tuesday, May 08, 2018 5:27:06 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, February 13, 2018

The schedule for ACCU has now been released, and the Feb 20th early bird registration deadline is approaching, so I thought it was a good idea to mention my session there.

Simplicity: not just for beginners

Many people say that simple code is better code, but fewer put it into practice. In this talk I’ll spend a little time on why simpler is better, and why we resist simplicity. Then I’ll provide some specific approaches that are likely to make your code simpler, and discuss what you need to know and do in order to consistently write simpler code and reap the benefits of that simplicity. Code samples will be in C++ and some material will be C++-specific.

I'll be joined by dozens of amazing speakers and the topics will be wide-ranging. It's not all C++, and I'm looking forward to a little mind-expanding from some session I didn't expect to do so. The pub quiz and lightning talks will also be good fun. April 11th to 14th in Bristol - will I see you there?

Kate

Tuesday, February 13, 2018 7:07:13 PM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, October 19, 2017
In 2016 I didn't speak at conferences because I was ill. I really enjoyed getting "back in harness" at CppCon this year (my Guidelines talk has been uploaded already, if you missed it) and I am happily looking forward to my next two conferences.

In Berlin I will deliver one of the keynotes for Meeting C++. It will be one of those opinionated talks with stories in it, plus code of course. I love giving those kinds of talks and they're typically well-received, so I am expecting to have a great time. This will be my first time at Meeting C++ and I know it will be a great conference.

The next week, I will be at the 2017 C++ and System Software Summit in Beijing. 8 tracks and over 500 attendees; this is a big conference. I've never been to Asia before, so I am very excited to meet a lot of new people (and some I've known for a while, the speaker circuit is like that) as well as seeing new places and experiencing a new conference.

I'm still thinking about what I will submit to ACCU for the spring. I prefer to do a new talk for each conference or at least to update existing talks dramatically. I will need to make up my mind before I leave for China!

Kate

Thursday, October 19, 2017 8:08:43 AM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, September 23, 2017

This week, I’ve been in Salt Lake City for the Pluralsight Author Summit and the first-ever PluralsightLIVE event. What a great time! This is my first time on a plane in over two years, and it is terrific to be out traveling again.

Pluralsight takes great care of its authors and that started with a lovely box of goodies in my room the first night.

Tuesday we all got together to hear about the past growth and future vision for Pluralsight, and to get a sneak peek at some things that would be announced later in the week. And of course, for Aaron to get a selfie with the authors!

In the afternoon, we had open sessions where we learned from some Pluralsight staff we don’t normally get to meet, and from each other. What makes you a great author in the eyes of your editor and the other people who help to get your material published and live? How can you get your courses recorded faster? Geeky talk about microphones and other tools of our trade, of promo videos on YouTube, and so many other things we all really wanted to talk about.

PluralsightLIVE itself started Tuesday night with a reception in the partner pavilion and an evening event I wasn’t able to stay up for.

That's my shirt being printed on the spot for me!

That's the very popular candy dispenser array.

I’ve been to a LOT of conferences and most of them look pretty generic. Here there was just so much effort showing: the fun activities like huge Jenga, Connect 4, and similar games, the couches everywhere (with power and USB ports so you could charge whatever you needed to charge), the large easy-to-spot-and-read signage, and more. It was clear the organizers were really caring about the wellbeing and happiness of all the attendees.

There were a lot of keynotes. Wednesday and Thursday both had keynotes the whole morning, and Thursday also had an afternoon keynote. These were entertaining, inspirational, educational, and really worth my time. I was especially looking forward to Joel Spolsky on Wednesday morning and he didn’t disappoint. He was funny and open. He also announced that Stack Exchange users will all get 60 free days of Pluralsight training. I hope some of them use it to take my Stack Exchange course! Then he liked my tweet afterwards so that was fun.

(If you want to take one of my courses, and don't have a subscription, there's a grey rectangle over the right that says Author: click it and you can get a ten-day free trial.)

When I wasn’t in keynotes, I was meeting other attendees and Pluralsight authors. Many of the authors are friends I haven’t seen in far too long, so it was tough to tear myself away, but I forced myself, because meeting learners is what this week was about for me. It was especially helpful to talk to managers and team leaders who want to know how their people are using their subscriptions. The Pluralsight IQ announcement [link] was very well received both by learners who wanted to show off their scores, and managers who wanted to track a team’s progress.

I took the C++ assessment, but I zipped through it a little too quickly and some questions needed more thought than I gave them. Still, I did ok:

After I tweeted my results, a whole pile of my C++ tribe also got their scores, and I even outscored a few! (Plus, I think they found a few bugs in the assessment – I’m going to get them fixed.)

The afternoon keynotes on Thursday wrapped up with Michelle Obama talking about diversity, education, children, and much more. I hadn’t heard her speak before other than sound bites on the news, and I was really impressed. She was warm and funny and willing to show irritation or frustration as well as the polished pleasantness I was expecting.

Next year’s dates have already been announced: the week of August 26th, 2018. I’m planning to be there. If you take Pluralsight courses (and come on, you should be taking Pluralsight courses) then consider it too. There was a lot of good content in a wonderful atmosphere, a chance to meet all kinds of interesting people, and a few days to put learning and growing front and centre – time well spent for me.

Kate

Saturday, September 23, 2017 9:50:51 AM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, September 11, 2017

This year's innovation at CppCon is a Meet the Speakers Dinner Thursday night. It's pretty expensive ($100) because the venue is charging a lot for it, but here's your chance to relax over dinner with many of the speakers from CppCon. If you've registered for the conference but haven't bought a dinner ticket yet, please do! We want to meet attendees and this is a great way to do it. I've been an attendee at speaker dinners at other conferences and I have to say it's always been a highlight of the conference for me. Career advice from Bjarne himself over (excellent) dessert? Yes please!

I can't guarantee you Bjarne (or even me) but you will be asked if there's someone you want to sit with, and the organizers will do their best to accommodate you.

Monday, September 11, 2017 4:01:06 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, July 21, 2017

I am happy to announce that my submission to CppCon has been accepted!

10 Core Guidelines You Need to Start Using Now

The C++ Core Guidelines were announced at CppCon 2015, yet some developers have still never heard of them. It's time to see what they have to offer for you, no matter how much C++ experience you have. You don't need to read and learn the whole thing: in this talk I am pulling out some highlights of the Guidelines to show you why you should be using these selected guidelines. For each one I'll show some examples, and discuss the benefit of adopting them for new code or going back into old code to make a change.

Beginners who find the sheer size of the language and library daunting should be able to rely on the Guidelines to help make sane choices when there are many ways to do things. Experienced C++ developers may need to leave some of their habits behind. Developers along this spectrum could benefit from seeing what the Guidelines have to offer, yet the guidelines themselves are just too big to absorb all at once. My examples will be chosen to be beginner-friendly and the focus will be on what's in it for you: faster code, less bugs, and other tangible benefits.

I am so looking forward to seeing "my tribe" again in Bellevue this year. I'm going on the field trip too! If you haven't registered yet, get on that!

Kate

Friday, July 21, 2017 1:03:59 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, January 04, 2017

I had to curtail my activities pretty dramatically in the second half of 2016, even in areas like mailing list participation or answering questions on StackOverflow. I was beginning to wonder if I would qualify for Visual C++ MVP again without conference talks or some of my other usual activities. No-one should ever assume they will be awarded; the program is always changing and our lives are always changing, so anyone can find themselves out of sync with the requirements of a program. However, I'm happy to learn that I have been renewed for 2017 and will continue to be part of this active community.

Looking forward to a terrific 2017,

Kate

Wednesday, January 04, 2017 12:08:17 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, September 16, 2016
It has been a very busy summer for me. Mostly it's been great, with family visits from all over the world and the wedding of my oldest child. But there have been some challenges, too. Without going into details, I've had to cancel plans to speak at (and even attend) CppCon. This is really sad - CppCon was the largest C++ conference ever when it started in 2014, and has grown remarkably ever since. It's a place where I learn new things, make new friends and contacts, and meet old friends for a wonderful week of laughter, in-jokes, and brain-stretching.

I am hoping that within a few months, I'll be "back in the saddle" again and planning a 2017 full of speaking and learning. In the meantime, I'll be following #CppCon on twitter, and watching the YouTube channel for new videos - the plenaries and keynotes get up really fast. If you're not there in person, be there virtually like me!

Kate

Friday, September 16, 2016 10:59:08 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, April 29, 2016

I've started a C++ column in Visual Studio Magazine. I'm sure you've read plenty of C++ columns in your time - I sure have! I wanted this one to be a little different. So, here's what I've decided to do. For each column, I choose a guidelines from the C++ Core Guidelines, and then explain it. But the twist is that I'm not going through the guidelines from top to bottom - I'm picking guidelines whose explanations require a little language knowledge.

The first column just sets the stage and explains what I'm doing, and gives you a link to the Guidelines. The second, Don't Cast Away Const, explains the guideline, but also the consequences of const-correctness, a typical situation where you might find it hard to stay const-correct when you make a performance tweak to a running system, and the correct use of the mutable keyword. Not bad for explaining a four-word guideline!

I have a number of columns already written and plans to write more. Please check them out and spread the word!

Kate

Friday, April 29, 2016 5:17:26 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, March 24, 2016
My latest Pluralsight course is live! It's called First Look: C++ Core Guidelines and the Guideline Support Library and it introduces the guidelines and why you might want to use them, as well as some preliminary tool support. As always, if you need a free trial, use the link in the sidebar on the right.

Pluralsight courses now have trailers. This is my first course with one and it turned out a lot better than I expected. You don't need a subscription to watch the trailer - just go to the course page, and over on the right side there are these downward pointing triangles next to time lengths. Click the one for Course Overview which is 1m 49s, and you'll see one entry under it that also says Course Overview 1m 49s.



Click that and the player will open and play the trailer. I did the voice recording, and some Pluralsight elves put together visuals (some are excerpts from demos) around it. I like it! Let me know what you think.

Kate
Thursday, March 24, 2016 1:10:15 PM (Eastern Standard Time, UTC-05:00)  #    
# Monday, February 29, 2016

I’ve been hearing that the new search and browse functionality on Pluralsight isn’t working for everyone, and that the sheer volume of courses makes some hard to find. So I thought I’d make a list of my current courses in the hope of simplifying things for those who want to learn something specific.

Visual Studio 2015: Essentials to the Power-User

This is the most recent Visual Studio course and it starts at the beginning and goes well past what most people know about Visual Studio. I’m confident that even if you use Visual Studio every day, you’ll learn something in this course that will make you more productive.

What's New for C++ Developers in Visual Studio 2015 Preview

This course was based on the preview, but works well against the RTM version of Visual Studio 2015. It’s C++-focused and just shows you what’s new compared to Visual Studio 2013.

Using StackOverflow and Other StackExchange Sites

Most developers find StackOverflow results whenever they do a web search for a particular error message, or some API they’re having trouble using. Many of them tell me that when they try to sign up and actually ask and answer questions, they have an unpleasant experience. Often, it’s because their mental model of the site does not match the way it actually works. This course will show you how it works, so you can get the answers you need and not feel rejected or hurt by the way these sites work.

Learn How to Program with C++

This course is aimed at people who have never programmed before. If you’ve programmed, in any language, consider C++ Fundamentals instead. If you don’t believe anyone can learn C++ as a first language, I’m ready to argue with you. Modern C++ is a simple and useful language that a beginner can learn and use well.

C++ Advanced Topics

This course is for the material I couldn’t fit into C++ Fundamentals. It’s presented as a number of things I want you to do, or stop doing, when you write C++ today:

  • Avoid Manual Memory Management
  • Use Lambdas
  • Use Standard Containers
  • Use Standard Algorithms
  • Embrace Move Semantics
  • Follow Style Rules
  • Consider the PImpl Idiom
  • Stop Writing C With Classes

C++ Fundamentals  and C++ Fundamentals - Part 2

These courses were written in 2011 but hold up well. Here is where you’ll learn the basic syntax of the language and how everything works, including templates, pointers, lambdas, and exceptions. Watch both parts to learn the whole language, then dive into C++ Advanced Topics to round out your C++ knowledge.

I have other courses – on older versions of Visual Studio, for example, but these are the “big” ones for me at the moment. I hope this list helps you to find them. And remember, if you need a free trial, use this link. Click Subscribe, then Start 10-Day Trial, and you’ll be all set.

Kate

Monday, February 29, 2016 12:19:13 PM (Eastern Standard Time, UTC-05:00)  #    
# Monday, December 07, 2015

The first keynote at CppCon this year was Bjarne Stroustrup (who invented the C++ language) announcing the C++ Core Guidelines. They are on Github and once he announced them, as Herb Sutter reported in the second keynote the very next day, they quickly became a trending topic across all languages. Here is a description of the guidelines from there:

The C++ Core Guidelines are a collaborative effort led by Bjarne Stroustrup, much like the C++ language itself. They are the result of many person-years of discussion and design across a number of organizations. Their design encourages general applicability and broad adoption but they can be freely copied and modified to meet your organization's needs.

The aim of the guidelines is to help people to use modern C++ effectively. By "modern C++" we mean C++11 and C++14 (and soon C++17). In other words, what would you like your code to look like in 5 years' time, given that you can start now? In 10 years' time?

The guidelines are focused on relatively higher-level issues, such as interfaces, resource management, memory management, and concurrency. Such rules affect application architecture and library design. Following the rules will lead to code that is statically type safe, has no resource leaks, and catches many more programming logic errors than is common in code today. And it will run fast - you can afford to do things right.

To me, these guidelines are the key to getting across my fundamental message that C++ does not have to be hard, scary, complicated, or dangerous. The language may still say “it’s your foot!” but the guidelines, and the tools they can drive, are quite the opposite.

You probably know that Visual Studio has a static analyser built in. (You should, anyway, I’ve blogged about it.) It will catch things like this:

    int* p = nullptr;
    *p = 10;   

But it doesn’t mind things like this:

    int arr[10];        
    int* p2 = arr;

Two lines, two violations of the guidelines – I’m not initializing any of the elements of arr, and then I am using its address as a regular old pointer. Now, there’s nothing wrong with regular old pointers – some people have got quite a hate on for them with the rise of genuinely smart pointers, but pointers are fine. Using pointers to control lifetime isn’t fine, because it’s impossibly difficult. But pointers themselves are fine. What’s not fine here is the “decay” of an array into a pointer – folks from other languages don’t expect that at all, and some marvelous bugs have hidden behind this simple bit of helpfulness from the compiler. So there’s a guideline that says don’t do that. Specifically:

(I’m giving you a picture of code because if you want to copy and paste you should go to the live, always updated, guidelines on github.)

This guideline is part of a “profile” – a particular set of rules that are designed to be enforced and that are supported by tools. Well, when I say tools I might be overstating the case a little. There’s just one tool at the moment, but that could be enough!

This tool, C++ Core Checker, is on the NuGet Gallery. You don’t have to get it from there though. You get it, and use it, from inside Visual Studio 2015. Any version will do. If you don’t use Visual Studio normally, just get and install the Community Edition, which is free and is ok to use for commercial purposes, from https://www.visualstudio.com/ . (Need the fine print? if you’re using it as a person, you can do whatever you like. If you work for a company with less than 250 PCs and less than a million dollars US in revenue, again you and up to 4 of your coworkers can use it for whatever you like. If you work for an “enterprise” company then any and all of the employees can still use it for learning purposes or to work on open source.) Note that Visual C++ isn’t part of the Typical install, so you’ll need to choose Custom and select Visual C++:

So once you have Community Edition or some edition of Visual Studio, make a console application and put in the two bad lines of code. Build it and then also run static analysis on it (On the Analyze menu, choose Run Code Analysis, On Solution.) You won’t get any warnings or errors. That’s your pre-guidelines life. You’re doing something inappropriate and nobody is telling you.

Now, add the checker to your solution. This is solution-by-solution, not a change to how Visual Studio does static analysis. On the Tools menu, choose NuGet Package Manager, Package Manager Console. In the console window that appears, type Install-Package Microsoft.CppCoreCheck and press enter. You will see output like this:

Attempting to gather dependencies information for package 'Microsoft.CppCoreCheck.14.0.23107.2' with respect to project 'ConsoleApplication1', targeting 'native,Version=v0.0'
Attempting to resolve dependencies for package 'Microsoft.CppCoreCheck.14.0.23107.2' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Microsoft.CppCoreCheck.14.0.23107.2'
Resolved actions to install package 'Microsoft.CppCoreCheck.14.0.23107.2'
Adding package 'Microsoft.Gsl.0.0.1' to folder 'c:\users\kate\documents\visual studio 2015\Projects\ConsoleApplication1\packages'
Added package 'Microsoft.Gsl.0.0.1' to folder 'c:\users\kate\documents\visual studio 2015\Projects\ConsoleApplication1\packages'
Added package 'Microsoft.Gsl.0.0.1' to 'packages.config'
Successfully installed 'Microsoft.Gsl 0.0.1' to ConsoleApplication1
Adding package 'Microsoft.CppCoreCheck.14.0.23107.2' to folder 'c:\users\kate\documents\visual studio 2015\Projects\ConsoleApplication1\packages'
Added package 'Microsoft.CppCoreCheck.14.0.23107.2' to folder 'c:\users\kate\documents\visual studio 2015\Projects\ConsoleApplication1\packages'
Added package 'Microsoft.CppCoreCheck.14.0.23107.2' to 'packages.config'
Successfully installed 'Microsoft.CppCoreCheck 14.0.23107.2' to ConsoleApplication1
PM>

This changes your project settings so that analysis runs this Core Checker for you. Repeat the analysis step and this time the new tool will run and you will get output like this:
------ Rebuild All started: Project: ConsoleApplication1, Configuration: Debug Win32 ------
  stdafx.cpp
  ConsoleApplication1.cpp
  ConsoleApplication1.vcxproj -> c:\users\kate\documents\visual studio 2015\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe
c:\users\kate\documents\visual studio 2015\projects\consoleapplication1\consoleapplication1\consoleapplication1.cpp(9): warning C26494: Variable 'arr' is uninitialized. Always initialize an object. (type.5: http://go.microsoft.com/fwlink/p/?LinkID=620421)
c:\users\kate\documents\visual studio 2015\projects\consoleapplication1\consoleapplication1\consoleapplication1.cpp(10): warning C26485: Expression 'arr': No array to pointer decay. (bounds.3: http://go.microsoft.com/fwlink/p/?LinkID=620415)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Where it says "type.5" and there's a link, that's to the specific rule in the "type" profile that this code breaks. And where it says "bounds.3", the same - I showed a picture of bounds.3 up above.

Isn’t that great? Come on, it’s great! The tool will add more rules as we move through 2016. I’m going to have a lot more to say about the Guidelines as well. But this is a great place to start.Why not point it at some of your own code and see what happens?

Kate

Monday, December 07, 2015 1:54:57 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, September 26, 2015
Back when I first started going to conferences, the schedules typically ran 9 or 9:30 to 4 or 4:30. I used to bring a book to read in the evenings in case I didn’t like what was on TV. Then I started getting invited to dinners and parties and planning meetings and conference days got a lot longer for me. But what I’ve noticed recently is that conference days are getting a lot longer for everyone. People have come all this way and are willing to pack a lot into each day. I’m writing this on the last day of CppCon where there is content starting at 8am and running until 10pm. There's even content over the two hour lunch break! That’s a long day, and a bunch of them in a row makes for a long long week. So here are some tips for how to handle that kind of week. I’m going to be specific to CppCon, because I think a lot of my readers should attend it, but other conferences will have equivalents to everything I’m mentioning here; I’ll let you do the mapping yourself.

First, have a schedule. Weeks before the conference, mark out what talks you want to attend. Have a goal of selecting two talks in most time slots. Then if your first choice is not as good as you expected, or the room is full and you don’t want to stand, you know exactly where to go for your second choice. Have that schedule in your pocket – on your phone, or on a piece of paper – so you have no lost time figuring out where to go. (CppCon uses Sched, which mails you each day's schedule in the morning, making it easy to have with you.) Don’t be the person who shows up at 9 only to learn there were sessions at 8. Check the schedule at least once a day during the conference in case things are being added. Tip: things are being added, you can count on it.

Second, plan ahead to take care of the physical body that is carrying your brain from session to session. It’s really a simple matter to have a few granola bars and a bottle of water in your bag. If you miss a snack, you can still have something to eat or drink. Bring a light sweater in case you are in the cold room. Bring some painkillers if you might get a headache from sitting somewhere loud. Bring whatever little comforts you need to keep yourself from getting whiny and leaving early to go to your peaceful hotel room and watch TV. (That said, there’s always one day in a one-week conference where I go back to my room for an afternoon nap. It’s the only way I can stay functional during long and intellectually-intense days. Just make sure you’re doing it for a brain recharge and not for something you could have avoided by bringing a small item with you to the conference centre.)

Third, think about how you’re going to take notes. A paper notebook? Bring a spare pen, too. Your phone? Your laptop? Or are you just going to immerse yourself in the experience and use the videos if you want to check something later? Whatever your plan is, bring what you need to be able to use it. Power is always a challenge at conferences – I like to bring an external battery for my phone so it can charge in my bag. Think about what your bag is going to weigh and consider leaving the laptop at the hotel and getting by with a phone and some paper for notes. It’s really liberating not to be lugging a heavy bag, in fact surprisingly so.

Fourth, before you arrive (at the latest, on the plane to the conference) write up your goals for the conference. Do you want to meet people? Specific people, or some number of people, or people from a particular industry? Do you want to learn something specific? (Perhaps this is the year to understand SFINAE, or be able to follow along in a talk that includes template meta programming, or “get” those Haskell jokes people are always telling.)  Maybe you want to tell people about something? Tweet some number of times? Blog some number of times?  Have a plan. Have goals. Check yourself against these goals each morning, and adjust your plan for the day if you need to, so that you move towards those goals each day.

When you arrive at the conference, scout out the amenities. Where are the bathrooms? Are there tables and chairs? Are there tables and chairs with power? On Day 1, pay close attention to the food and drink pattern. Is coffee always available, or only at certain times? Where does the food appear? Knowing this will take away any worry you may be carrying around that you may miss something and not get another chance at it. It will also save you from taking extras of things and lugging them around all day when you don’t really need them. I also like to work out patterns related to what rooms I’ll be in – that I’ll be on the same floor all afternoon, for example. It just makes me feel a little more settled and centred.

Looking after your body doesn’t stop with what you planned and what you brought. I start each day with 5 minutes of stretching which makes a big difference to how I feel all day. I also try to use the stairs instead of the escalators – less lining up and it makes me feel better too. I go ahead and eat the snacks, many of which are not part of my normal day (brownies in the afternoon? bag of chips at lunch?) but not to excess. CppCon has fruit and other options that are not all about fat, sugar, and caffeine, and it’s often a smart choice to go with those rather than the straight-up treats. Try not to get too far from normal. If you normally have 5 cups of coffee a day, then you can do that during the conference, but if you’re a one-cup-a-day person, perhaps don’t go beyond 2 or 3 a day while you’re here. Same advice for alcohol – if you dramatically increase your consumption over the course of the week, you’re likely to feel uncomfortable by the time Thursday or Friday rolls around. The one thing you should be sure to take in more of than usual is water – whether you’re eating more sugar than usual, drinking more caffeine and alcohol than usual, or just walking a lot more than usual from room to room in a conference centre, extra water is what you need to compensate. If you grab a bottle of water at a snack break, hang on to it when it’s empty – typically most conference rooms have a watercooler or bubbler by the door where you can refill that bottle whenever you want. Can’t stand water? Bring something to flavour it with – pick up some powders or drops at home and try them out to see which one you like. It’s way more efficient than hanging around hoping that this is the break they have juice at, or leaving the conference centre on a half hour walk for a convenience store.

As the conference goes on, be aware of how you are spending your time. For example, if you check your email during a session, but then take a peek at Twitter, and then at your personal Facebook – are you even really in the session anymore? Don’t be afraid to leave if this is not the session for you. You can go to another one, or talk to other attendees out in the hall, or go back to the hotel for a one hour nap. Almost anything is better than ignoring a speaker and killing time on your laptop or phone. And if you’re not prepared to leave, then perhaps you just need to start paying more attention to the session – assuming it’s material you actually are interested in. Take a look at those goals you wrote. Have you tweeted recently? Blogged? Learned that thing? Met enough people? Will staying in this session and listening meet your goals, or should you go out to the hall and work on a goal? Are you just chatting with your own coworkers, or someone you’ve known for years? Building and strengthening relationships is great, of course. That doesn’t mean that discussing the football game with your cubicle-mate is a good use of your time at a place you flew 5 hours to attend. Maybe you can walk around and find a way to join a conversation with a speaker or someone else you wouldn’t normally meet. Just standing there listening can be very enlightening even if you don’t end up saying much.

If you’re not normally a tweeter, blogger, or talker-to-strangers, a conference is a great place to start. There are immediate benefits. Perhaps your question will be answered, or your point will be repeated and quoted, or you’ll make a new friend or business connection. This will give you reinforcement for doing that, of course. As you meet your goals, make a record of that, so you can easily answer questions about what you learned or accomplished during the conference. Consider writing a summary when you’re done – for yourself, or for whoever funded the trip. A chronological structure is natural – Monday morning I went to a talk called X and learned Y or met Z, at lunch Monday I talked to A and B who encouraged me to look into C, Monday afternoon I went to a talk on C – but be sure to have an executive summary that reads a little less like a diary. Start writing it during the conference and polish it on the trip home. Once you get back to the office, writing that summary is going to get harder and harder, so don’t put it off.

Attending conferences is a great way to boost your career – when you do it well you learn a lot in a short time, meet luminaries of your industry and people just like you, raise your profile and your confidence, and have a wonderful time. When you do it poorly, you get tired, hungover, lonely, overwhelmed, and bored. Put in the effort to plan and prepare, and you will be in a great position to reap the rewards.

Saturday, September 26, 2015 11:39:17 AM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, June 11, 2015

One of the CppCon sponsors, Bloomberg, is running a contest for students in university or college and giving away trips to attend CppCon2015 in September in Bellevue, Washington:

The series of seven weekly challenges will kick off on June 22, 2015, and each week contestants will be provided a different set of problems to solve via Bloomberg’s cloud-based CodeCon platform. Each week’s winner will earn a trip to CppCon in September. The list of seven winners will be announced and notified via email on August 5.

Interested? You should be. CppCon is a great experience for students and one you won't soon forget.

Kate

Thursday, June 11, 2015 3:38:34 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, January 13, 2015

ACCU has announced the schedule for their 2015 conference in Bristol, so I can announce that it includes me!

James and I are adding quite a lot of material, so if you saw this talk at CppCon, you should probably come and see it again at ACCU. Alternatively, you could come to the conferences and watch one of the conflicting talks and take excellent notes, because I really wish I could be at those as well!

I first went to ACCU two years ago, spending my own money for travel and the registration fee. I enjoyed it immensely and learned a lot, so it's a real thrill to be speaking there this year. I can't wait!

Early bird rates last till the end of February. Register as soon as you can, and I'll see you there.

Kate

Tuesday, January 13, 2015 12:48:48 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, August 12, 2014

Earlier this year I flew to Utah for the Pluralsight Author Summit. Spending time with such a great collection of my friends and colleagues, and learning more about how to make a great course, was the real reason for the trip, but I got up early one morning to record a Play by Play video with Geoffrey Grosenbach. He has a genuine skill of getting you to demonstrate your own thought processes aloud and I've enjoyed watching other people's Play by Play sessions a lot.

Geoffrey had arranged for some ancient C++ code for me to poke around in. Mike Woodring came through with the sample code from his 1997 book with Aaron Cohen, WIN32 Multithreaded Programming. Seventeen-year old code it may have been, but it turned out not to be quite as ugly as I would have liked. Still, we put it through its paces a little and talked about how I approach this sort of task.

It came out to about 90 minutes overall so if you have a chance to watch it, let me know what you thought!

Kate

Tuesday, August 12, 2014 1:34:43 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, August 03, 2014

How fun is this going to be? (A lot!)

I'm going to speak at this next February! One of my big deciding factors was the other speakers. Erik Meijer, Greg Young, Michael Feathers, me, and one speaker still to be named. It's a small gathering to talk about software engineering. I'm still working on precisely what my two talks will cover, but expect it to include C++, legacy code, best practices, being "modern" in your C++, and related topics. Two days of intensive geekery wrapped around two days visiting the Bahamas! Space is still available so why not consider it? Brought to you by the Code on the Beach people, so you know they know how to do this.

Kate

Sunday, August 03, 2014 10:04:10 AM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, August 02, 2014

It's just around the corner - the largest C++ conference EVER with over one hundred talks!

And two of those talks I'll be doing with James McNellis. We had such a good time presenting together for Microsoft Virtual Academy that we decided to do it again. How do these sound?

Modernizing Legacy C++ Code

C++ is a programming language with a long, storied history spanning over three decades--four if one includes its C ancestry. The C++ language has undergone many changes during that time, compiler technology has advanced substantially, and computers today are very different from the computers of decades past. But despite all of these advances, there's an awful lot of C++ code in use today that looks like it was written in the 1980s. In some cases, the code was written in the 1980s and it's still in use; in other cases, it's recently-written code that just doesn't use modern style.

In this talk, we'll discuss some of the problems with legacy code, and review some practical techniques for applying principles of modern C++ to gradually improve the quality of legacy code and improve maintainability and debuggability. We'll show how some very small changes to code can yield huge benefits.

Making C++ Code Beautiful

Ask a non-C++ developer what they think of C++ and they'll give the language plenty of compliments: powerful, fast, flexible, and "the language for smart people". But along with that you are likely to hear ugly, complicated, hard to read, and "the language for smart people". Is it possible to write beautiful C++? Not arcanely elegant or wickedly compact, but readable, clear, expressive - beautiful! We say it is, and we want to show you how.

In this session, you'll see how to turn pages of "comic book characters swearing" into code you'll be proud to call your own. By making your code express your intent, using the power of new language and library functionality, and leaving hard-to-read constructs out of your vocabulary, you can give your code a makeover that will stand the test of time.

If you're not registered yet, there's still time! All five days cost $995 and there are one and two day passes available for less. You're going to want to meet and learn from the stars of C++ - check the full session list to read all about it.

Kate

Saturday, August 02, 2014 2:37:09 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, February 23, 2014

I was invited to speak to some Imagine Cup contestants in Calgary and delighted to accept. I spoke to the teams informally for quite a while about judging and judges and general team tips. I was really happy to see some teams from previous years so I could hear what happened after they entered. If you're a student (undergrad or grad) and would like to enter, there is theoretically still time, but realistically it would have been better to start several months ago since you do have to build working software. Why not take a look at the contest (there are over a million dollars in prizes, and you can get a cool trip somewhere and meet some industry high flyers) and start pulling together a team for next year? There's a pretty good introduction for Canadians on the Microsoft Canada blog.

For those of you who were at the sessions, here are the slides I used in the afternoon. I talked about the new C++ features and why they matter, and demoed C++ AMP as a great motivator for using C++. (I wanted to upload the pptx files, but they're too big for the blog, so I've exported PDFs.)

Kate

GregoryCppAMP.pdf (1.65 MB)

Cpp11and14.pdf (556.51 KB)

Sunday, February 23, 2014 1:17:11 PM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, November 28, 2013

In a word, it was exhausting. But it was also cool from a technical point of view. Here's a still of us I grabbed from the video recording:


The screens in front of us are touch screens. I forgot how much fun it is to demo Hilo on a touch screen. Here's how it looked from my side (sorry about the lunch mess):

And a better view of all three cameras:

You can see that part of my job was to imagine people who wanted to learn C++ on the other side of those cameras. And finally, here's James hard at work getting something onto the demo machine:

I believe this picture immortalizes the moment he tweets about here:



Great day and good fun. Hope everyone learned a lot!

Kate
Thursday, November 28, 2013 6:41:15 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, November 27, 2013

Channel 9 has all 7 pieces of the MVA Day I did with James McNellis available online now!

We went very fast through this one day introduction. If you'd like a slightly saner pace, please check out my Pluralsight courses, C++ Fundamentals and C++ Fundamentals - Part 2. If you're not a programmer, and you'd like to "begin at the beginning" with C++, try Learn How to Program with C++. There is a free trial for the Pluralsight courses to get you started.

Kate

Wednesday, November 27, 2013 2:44:23 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, November 23, 2013
The C++ Jumpstart full day event on Tuesday was a blast! James and I really enjoyed ourselves and from the looks of the chat room, so did the attendees. We had literally thousands of people registered for the event and in a few weeks the recording should be available (check http://www.microsoftvirtualacademy.com/Live-Training-Events for a recording link - scroll past Live Events to Recorded Events) for even more people to view.

Kate

Saturday, November 23, 2013 1:44:50 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, November 22, 2013
I've been busy this fall with the release of Visual Studio 2013. One of the things I've been working on is live now: a new Pluralsight course. I focused on new things that matter to C++ developers, whether that's compiler support for language changes (hello, variadic templates!) or IDE changes that were implemented for C++ as well as "the other languages". Here's the description:

The C++ Language and the Standard Library both changed dramatically with the release of C++ 11. Some of these features were not implemented until Visual Studio 2013, and those are presented in this course. You'll learn about variadic templates, improvements in constructing and initializing variables, and rawnstring literals. In addition a number of productivity boosting enhancements in debugging, editing, and using libraries are in this version and you will learn how to take advantage of them.

If you don't have a Pluralsight subscription already, there's a free trial available, so please check it out!

Kate

Friday, November 22, 2013 1:36:27 PM (Eastern Standard Time, UTC-05:00)  #    
# Monday, November 18, 2013
Are you joining us tomorrow for a one-day introduction to C++ at Microsoft Virtual Academy? (No? There's still time to register.) Then you might want the sample code we'll be using. We're probably going to go too fast for you to actually follow along in your copy of Visual Studio, but you can try. I've attached a zip of the code to this post.

Kate

Demos.zip (164.55 KB)
Monday, November 18, 2013 2:22:01 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, November 12, 2013
A lot of people (a lot) have asked whether the November 19th session (a whirlwind tour of C++ for those who don't know it) will be recorded. I'm happy to confirm that it will be. On the Live Events Page for Microsoft Virtual Academy you will see both future and past events. Here you can register for our session, and about two weeks afterward a link will appear on this page to let you watch the recording.

Please help spread the word to people you know who want to learn C++!

Kate

Tuesday, November 12, 2013 7:53:21 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, November 06, 2013

If you know someone who wants to get started using C++, and has done at least a tiny speck of programming in other languages (so I don't have to explain what a loop is) then you might want to point them at this free online event:

C++: A General Purpose Language and Library
Attention developers: here’s a painless way to learn the basics of C++ from the ground up, whether you’re updating legacy code or writing brand new, efficient, and high-performance code for new platforms like phones and want to take advantage of C++. You’ll learn the fundamentals of the C++ language, how to use the language and its Standard Library effectively, and how to use the Visual Studio environment for developing C++, including debugging, exploring code, and understanding error messages. This is your starting point for building software in C++.

James McNellis (of the Visual C++ team) and I will spend the day walking through the fundamentals of the language and the Standard Library. We're going to have a great time. Please send us some beginners to keep us company!

Kate

Wednesday, November 06, 2013 5:07:07 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, October 02, 2013

In yesterday's session, I showed a Windows 8 store app that loads an image and then draws an animated ripple over it.

If you would like to get the code, and more importantly the documentation that explains the code, it's on Codeplex. Mixing and matching a little DirectX into your Windows 8 C++/CX app is remarkably easy, so why not take a quick look?

Kate

Wednesday, October 02, 2013 2:45:36 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, October 01, 2013

Were you at my session today?

If so, you might want this code. If not, I am not sure the code will help you much :-)

Kate

Demo1.zip (1.37 MB)
Tuesday, October 01, 2013 11:01:53 AM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, March 28, 2013
The week of April 8th, I'll be in Bristol, UK, attending ACCU. I'm looking forward to it tremendously - there is a great lineup of sessions and I only wish I could have spared the time to stay on for the C++ committee meetings that will follow it. I am, however, making the most of my time in that delightful city. Having enjoyed Guy Smith-Ferrier's presentations in several different locations, including my own East Of Toronto .NET User Group, I can now turn the tables and present at his.

Of course I want to do a C++ talk. But it's not a C++ group. So to be fair, I've decided to do two talks:

First, Use All of Visual Studio to Become a Better Developer

Most developers know how to use Visual Studio to do the basics of being a developer. You can create a solution, add projects to it, edit code, and run it. Easy, right? In this session, I want to show you how to be a better developer by using parts of Visual Studio you might not know about. Save hours of debugging time, move around your code more smoothly and don't lose your place, see what you want to see and find what you need to find. Demos will be in C# with Visual Studio 2012.

Second, C++ in 2013 – Why on earth?

There are so many languages a developer could use today. Yet some developers still use C++. Some developers are learning C++ when they already know C# and other younger languages. This session will show you why that is happening, and why you might want to learn the new C++ yourself. It's nothing like the C++ you remember, and it can be a very useful language for you to know.
 Please do register for these, and I hope to see you there!

Kate

Thursday, March 28, 2013 11:55:53 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, January 04, 2013

Over the last few weeks, I've been accumulating links to appearances of mine, and it seems like a good idea to share these.

  • OReilly webcast: This is a reasonably horrible recording (sound quality and video size) of a webcast I did back in August. It shows why C++ AMP is so cool and why you might care about it. I recorded it to promote the book but I'm not very happy with how it turned out. You'll probably do better with the recording of my Tech Ed talk.
  • Pluralsight interview: This is specifically about my Using Visual Studio 2012 course. You can download the audio or read the transcript as you prefer.  My favourite quote from the conversation:
It’s not just like, oh, I saved five seconds. I can go home five seconds earlier today. It’s that you’re less likely to forget what you were doing because you don’t have to put so much time into the mechanics and you just stay in flow. And to me, that’s a ramping up of two or three times the amount of code I can produce when I use everything the tool has to offer.
  • Dot Net Rocks panel at DevIntersection: Here Scott Allen, Michele Leroux Bustamante, Woody Pewitt, and I discuss whatever we feel like, with occasional leading questions from Carl and Richard, and some Canadian whisky too.

Even though I haven't been blogging much, I have been doing a lot, and I hope these links will help you to discover some of it.

Kate

Friday, January 04, 2013 5:58:45 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, November 20, 2012

While I was in Nashville as part of the Dot Net Rocks Roadtrip, we recorded an episode of The Tablet Show. The recording is online now and I'll have to give it a listen myself to remember what we talked about - Hilo, for sure, and C++ AMP, and just generally why C++ can be a great choice for tablet development.

Kate

Tuesday, November 20, 2012 1:30:44 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, November 16, 2012

Don McCrady, who with Jim Radigan did an inspiring talk on performance at Build this year, has blogged about a proof-of-concept project that adds C++ AMP to CLANG and LLVM using OpenCL underneath instead of using DirectX the way Visual Studio does. This is super cool! As Don says:

When Microsoft announced C++ AMP back in June 2011, we told you that we would release the C++ AMP specification under the Microsoft Community Promise – essentially opening up the specification to allow any C++ compiler implementer to add C++ AMP to their compiler. Shevlin Park serves as an example of the platform portability potential intended by the Community Promise.

Do read Don's post and follow the links to learn more about Shevlin Park. The praise for C++ AMP as a programming model, and the likelihood that multiple compilers will support it, should make you feel all warm and fuzzy about learning it. You might even want to use my book to do so :-)

Kate


Friday, November 16, 2012 1:19:40 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, November 03, 2012

Day 4 was the first time I started to experience what some others had been complaining about with not being able to get into the room for a popular talk. I guess I'll just have to watch the recording.

I remembered to take some pictures of the signage that directed us around to help cope with being in two different buildings plus the tents:



And the map on the ground outside the building:




There were also people holding giant arrows to point attendees towards lunch or shuttles or whatever. It would have been extra-ordinarily difficult to get lost.

Herb's session Friday was everything it had promised to be. I just love the idea of http://isocpp.org/ and I intend to make good use of it when people ask me "getting started" questions.

Finally I had to accept it was ending. They were even tearing the tent down already:




I used the airport WiFi to download sessions to watch on the way home. Good week, Microsoft!

Kate
Saturday, November 03, 2012 12:11:03 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, November 02, 2012

One of the stickers for the badge this year was to attend an 8:30 session. I achieved that by going to Alive with activity: Tiles, notifications, and background tasks which, to be honest, I chose as much to see what Kraig Brockschmidt is doing lately as to learn about tiles and toast. But I'm glad I went, because it was a very good talk.

I've come to Redmond so many times, but I never particularly noticed the colours changing. This week they've been spectacular. I had some meetings in other buildings so I was able to get out of the giant lines at least long enough to take pictures of the giant lines :-)




And yes, it rained, but they were ready for that:




I really like the vibe that came from being on campus. Speakers tended to get up from their desks, jump on a shuttle or walk over, pull on the shirt and talk to us. I really got the sense we were being welcomed into their home.

I also went to Tips for building a Windows Store app using XAML and C++: The Hilo project - how could I not, since I was on the project. Excellent summary of some hard-learned lessons and one you should totally download and watch.

Kate
Friday, November 02, 2012 12:00:10 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, October 31, 2012
Build this year is less focused on announcing things (though the Windows phone and native C++ material is brand new) and more on drilling down into topics that we've had a year to experiment with and want some deep study on. Most of the speakers are from product teams. What's fun for me is that most of the attendees are very motivated and here to learn.

I'm also enjoying how full the rooms are for C++ sessions. Here's Tarek's Day 1 session:



BTW, that was session 3-000 demonstrating that (a) the sessions are numbered using zero-based indexing and (b) the C++ sessions were first on the list.

And here's the C++ performance talk from right after the keynote this morning:



This room was standing room only. It's possible all the C++ talks were, I don't always sit at the back where I can see whether people are standing back there or not. And you may not be able to tell from the picture but there were plenty of young developers there too.

There was also a nice session on Project Austin which is a lovely reference app showing how to use DirectX in a Windows Store app. You can get the code from Codeplex and take a look at it yourself or just use it to take beautiful notes on a tablet.

Speaking of reference apps, Hilo (which I've written about before) is now an official sample in the SDK and on the Dev Center. There's a Hilo session here at Build too. Within a day or two these links should have recordings and slides for you to download.

Want to know more about C++ at Build? Here's less than two minutes on just that topic. If you can, please watch Herb's talk on Friday. It promises to be exciting!

Kate

Wednesday, October 31, 2012 7:45:47 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, October 30, 2012
I arrived in Seattle Sunday night and filled Monday with meetings, then lined up to register for Build. I'll spare you the photos of the giant lineup that everyone else seems to have taken, and show you these delicious cupcakes from the welcome reception:



For me the most exciting part of the lineup was the revised session schedule I was handed, with lots of sessions on writing Windows Phone 8 apps in native C++. I cheerfully added them to my schedule along with all the existing sessions on C++. (The sessions are recorded so check them out yourself!)

And I ended up at dinner with a lot of geeks. We were unable to resist a little side by side comparison of our phones:




It sure made me want a 920 - good thing it turns out I'm getting one :-)

Kate
Tuesday, October 30, 2012 4:47:06 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, October 27, 2012

I really enjoyed my evening in Nashville. It was fun answering the question: C++ - Why on earth? I think I even convinced a few of you.

Of course the biggest Nashville attraction for me is my friend Billy Hollis:

Look what a luxurious meeting room they have! Couches and tables and general comfort. And yes, I got to see the inside of the RV:

If I got you interested in C++, you might like some links:

Thanks for the visit, and I hope to be back!

Kate

Saturday, October 27, 2012 5:31:18 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, October 20, 2012

Is the C++ Renaissance real? Well I'll tell you one thing: conference organizers are way more receptive to all-day C++ sessions than they used to be :-). I'll be doing yet another one this year. This time it's in Las Vegas Dec 9th, as part of DevIntersection. Here's the abstract:

PRECON04: C++ in 2012: Modern, Readable, Safe, Fast (9:00 AM - 4:00 PM)
C++ is gaining momentum as a development language, so whether you've never used C++ or stopped using it a decade ago, it may be time to brush up on your skills. With a new standard release providing new keywords and capabilities, C++ is a featured language for many of the new Microsoft technologies and enables some amazing speed-ups of your application using libraries like PPL and C++ AMP. What's more, Visual Studio offers tools to native developers that have only been available for managed developers in earlier versions. This all-day workshop will show you what all the fuss is about and give you the skills you need to understand the advantages of C++ today and how to start applying those benefits to your application.

If you're an experienced and current C++ developer, you may not need to come to this session. But if you were thinking you needed a refresher, here's a great way to get one, and at the same time look at some of the cool new stuff that is available to you once you know C++. If you've never written a line of C++ code in your life, but you're solid in C# or Java so you know the basic syntax (if, while, etc) you should be able to follow this session, though it won't teach you all the fiddly bits of C++ syntax and make you a C++ developer from scratch. It should, however, give you the inspiration you might need to go and learn all that fiddly syntax, and understand why we have it.

The workshop costs an extra $399 for conference attendees and will cover a lot of ground: new language and library goodies in C++11, ALM Support for C++ developers in Visual Studio 2012, a quick taste of some PPL and C++ AMP power, and plenty of advice on best practices and modern C++ style.

I hope to see you there! Don't forget, if you register for the conference before Nov 1st, you'll get a tablet!

Kate

Saturday, October 20, 2012 8:01:13 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, October 17, 2012

Here's an amazing grand finale to the Dot Net Rocks Roadtrip this year -a full on developer conference in Las Vegas, Dec 9th - 12th.

I love this answer to "What is DevIntersection?"

This three-day conference marks the final stop on the USA leg of the .NET Rocks! Visual Studio 2012 Launch Road Trip! DevIntersection is a developer conference PLUS the recording venue for the last stop of the three-month road trip hosted by Richard Campbell and Carl Franklin. We're bringing together some of the best speakers (and our personal friends) for a conference that is relaxed and educational, plus forward looking as you and your company start to figure out what to do with Windows 8 and Visual Studio for the next few years. Our attendees tend to be .NET software developers plus other members of their teams. DevIntersection is an educational onsite conference for anyone who is attached to a .NET development programming project who is looking to use Visual Studio to develop apps for desktop, web and mobile platfoms.

I have two breakout sessions - one on C++ AMP and one on developing for the Windows Store in C++. No .NET in either one of them; this is a conference for expanding your horizons, after all.

For $1595 you get three full days of sessions. And if you register in October (hurry!) you will also get a new tablet. Build sold out in hours, so this is your chance to get access to deep and current information for developers across the Microsoft ecosystem. See you there!

Kate

Wednesday, October 17, 2012 1:52:31 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, October 15, 2012

Hilo is a reference project written in C++/CX for Windows 8 by the Patterns and Practices team. I was delighted to be part of this project and think it turned out very well. I use the Hilo codebase to remind myself how to do certain things when writing a Windows Store app in C++ (something I'm in the middle of doing for another project.) The accompanying document is rich in best practices for Windows 8 development, async work, modern C++, unit testing, and more. Now the latest version has been released, updated for Windows 8 RTM.

Hilo itself is a photo viewer. Before you roll your eyes, bear with me. I actually think it's better than the one that ships with Windows 8. It shows you some of your pictures as a sort of overview:

Click on one to interact with it. You can right-click to bring up both the app bar at the bottom and a nice strip-navigation control at the top:

If you want to see something cool, use Cartoon Effect. This leverages C++ AMP to cartoonize the picture. I've shopped this image a little to reduce the width (pulled the appbar in from the edges) but the cartoon work was done by Hilo - and super quickly.

If you have any thoughts of writing Windows Store apps, and C++ is a possibility for you, get over to Codeplex, download the Hilo code and the .chm file, and get reading!

Kate

Monday, October 15, 2012 1:17:12 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, September 28, 2012
I’ve been writing a book, though I swore I wouldn’t write any more books, and it’s finally done! You can buy a Kindle version from Amazon or an e-book directly from O’Reilly today. The paper copies will be ready in about a week and you can order them from O’Reilly or Amazon. The book is published by Microsoft Press, but O’Reilly handles the actual production of the books.


 I’ve got a page dedicated to the book with links for you to buy it, get the code, submit errata, and whatever else you might want. (If you think something’s missing, comment here and I’ll try to take care of it.)

Kate
Friday, September 28, 2012 2:50:54 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, September 26, 2012

I love writing courses for Pluralsight. I have quite a few and am working on more right now. They like to interview their authors about each course. Here's one about my latest for them. If you’ve done the whole course you won’t learn anything new from the interview, but if you’re curious about writing what we’re now calling Windows Store applications for Windows 8 using C++ and Visual Studio, perhaps this interview will help you decide whether it’s something you want to learn. There’s a transcript as well as an audio link.

Kate

Wednesday, September 26, 2012 2:13:20 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, July 02, 2012
I'm headed to Australia tomorrow (I won't get there till Thursday though) and I'm going to be doing some C++ talks while I'm there. Both are aimed at folks who haven't been keeping up to date on all that's been happening in the world of C++ over the last few years.

On Tuesday, July 10th, I'll do a free Tech Breakfast on the new features of the C++ language in the standard once called C++0x and now called C++ 11. I'll demonstrate how a lot of these features are already in Visual Studio 2010 and some in Visual Studio 2012. It runs from 9am to 11 am in Sydney, and you do need to pre-register.

Then all day Wednesday, July 11th, I'll do a course on modern C++ development with Visual Studio 2010 and 2012. I'll cover language changes, tool changes, drill into my favourite feature - lambdas - and show some of the cool things they enable, and give you some advice on best practices for writing C++ today. This course costs $300 Australian and will be held in Sydney just once.

I realize many people who read my blog don't need to come and learn this material. But perhaps you know someone who does? There is room in both sessions for more people - and I want to reach as many people as possible, so please spread the word! Registration links for both session are on the SSW page announcing them.

Kate

Monday, July 02, 2012 10:47:22 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, June 26, 2012
As I am soon to discover first-hand, Australia is a very long way from North America. So when Adam Cogan makes the trip, he often extends his stay to see more people or places. Last September when we all gathered for //build/, Adam tacked a mini Canada tour onto his North American stay and we got together for a quick chat near my home. Part of it was filmed and (after a long delay to cope with the sound issues) is now available on the SSW TV site.

We talk about C++ and why it has advantages over managed code in some cases, about C++ AMP, and about tablets, leading to this moment:



It's just a 7 minute video, so give it a listen!

Kate
Tuesday, June 26, 2012 2:18:02 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, May 29, 2012

I've been putting my schedule together for the talks I want to attend at Tech Ed North America and Tech Ed Europe this year. While I wasn't looking, a bunch more C++ content was added.

In Orlando:

Plus some language agnostic sessions that chose to put C++ in their session descriptions, which is a new thing these days.

Now as it happens, Tech Ed North America is sold out, so if you're not registered yet, you have three choices: join the waiting list, watch these sessions online, or get your boss to agree to a slightly larger T&E budget and head to Tech Ed Europe in Amsterdam just two weeks later. There we will have:

  • PRC08, my all day Monday precon: C++ in Visual Studio 11: Modern, Readable, Safe, Fast
  • DEV316, Tuesday at 4:30 pm: Application Lifecycle Management Tools for C++ in Visual Studio 11 by Rong Lu
  • DEV368, Wednesday at 2:45 pm: Visual C++ and the Native Renaissance by Steve Teixeira
  • DEV322, Thursday at 8:30 am: Building Windows 8 Metro style Apps with Visual C++ 11 by Rong Lu
  • DEV367, Thursday at 4:30: Building Windows 8 Metro Style Apps With C++ by Steve Teixeira
  • DEV334, Friday at 1:00 pm: C++ Accelerated Massive Parallelism in Visual C++ 11 by me

(Europe doesn't have direct links to the sessions, but they do allow links to the search for C++.) I'll have to miss Steve's talk because Rong and I are going to Belgium, so that one I'll be watching online. 

One way or another, please attend or watch these sessions. There's a lot of new stuff happening!

Kate

Tuesday, May 29, 2012 5:31:56 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, May 28, 2012
I am having a very lucky year. I've been nominated and accepted as a judge at the Worldwide finals of the Imagine Cup. I love being around students, and everything I've heard about Imagine Cup tells me that the energy, excitement, and creativity is marvelous to be part of. While I'm there, I decided to stay an extra day (July 11th) so I can offer my one-day C++ training to those who can't make it to Tech Ed in Orlando or Amsterdam. Here's what I'll cover:
  • Modern C++ with the Standard Library
  • Application Lifecycle Management for Visual C++ 11
  • Leveraging Lambdas for the PPL and C++ AMP
  • Best practices for C++ developers today

This is not a free session, but the price is even lower than the Tech Ed precons since I don't have travel expenses to get down there and see you all. If you live in Australia, please register and take advantage of this chance to come and learn what's been going on with C++ while you weren't looking! And if you don't, I'd appreciate it if you could spread the word to those who do.

Kate

Monday, May 28, 2012 9:04:29 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, May 27, 2012
Some people really go above and beyond for community. They have an idea, and then they make it happen. Take Marc Gregoire, for example. Our names are similar, and we both care about community, C++, and related topics, but we've never met. That didn't stop him from emailing me to see if I would do a user group talk while I was nearby for Tech Ed Europe. Of course I would! And then he arranged for Rong Lu from the C++ team to come and do one as well. Marc has done all the work of getting the room, the travel arrangements, you name it. All I have to do is take a short scenic train ride, and talk about a topic I'm excited about. That part is easy. The organizing part is hard.

It's going to be a very fun evening. I'm going to talk about C++ AMP, and Rong will cover what's new in VC++ 11. I've seen her speak before, and I know you're going to enjoy it. Be there, Wednesday June 27th at the Microsoft offices in Brussels. (I was kinda hoping for Tuesday, so I could make a joke, but Wednesday will be fine.) You need to register, so please do!

Kate


Sunday, May 27, 2012 8:49:12 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, May 26, 2012
This report is well overdue, I know. On April 17th I spoke at the first meeting of the Toronto C++ User Group! The room was PACKED:



And as you can see, there's quite an age range represented. The space was provided by bNotions. It was lovely and airy, and I was thrilled to hear their commitment to community across a variety of technologies:



Once I got started, my challenge was to give the one hour version of this talk, and not the six-hour one I plan to do at my Tech Ed precons in June. Here I am in action (thanks Eran for wandering the room with my camera throughout the talk) explaining the new ranged-based for:




The next meeting will be shared with the North Toronto .NET User Group, covering Windows 8 development in native C++. Yes, the .NET folks want to hear about this, too! I'll see you there June 4th, right?

Kate
Saturday, May 26, 2012 8:36:18 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, May 10, 2012
So much C++ news going on lately. Time to clear my queue:

It's hard to keep up with it all! Especially when I'm on a book deadline :-)

Kate

Thursday, May 10, 2012 10:06:29 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, April 13, 2012
The times for my sessions at Tech Ed North America and Tech Ed Europe have been announced.

  • PRC08 - C++ in Visual Studio 11: Modern, Readable, Safe, Fast is Sunday, June 10th in Orlando, 10am to 6pm. This is the session for those who've been ignoring C++ and are wondering why they keep hearing about it. Please encourage your friends to attend.
  • DEV334 - C++ Accelerated Massive Parallelism in Visual C++ 11 is Tuesday, June 12th in Orlando, 10:15am - 11:30 am. This session will show you what C++ AMP is all about.
  • PRC08 - C++ in Visual Studio 11: Modern, Readable, Safe, Fast is Monday, June 25th in Amsterdam, 9am to 5pm. The same material as in Orlando, just saving some travel time and costs for attendees :-)
  • DEV334 - C++ Accelerated Massive Parallelism in Visual C++ 11 is Friday , June 29th in Amsterdam, 1pm - 2:15 pm. Again, same material, different continent.

If you or those you influence are not yet registered for the conference in general, and the preconferences in particular (they cost extra and require you to arrive early, so plan ahead) please take care of that as soon as you can. Here are some helpful links:

North America


Europe

Hope to see you in one place or the other!

Kate
Friday, April 13, 2012 4:02:44 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, March 26, 2012

How's this for a renaissance? People are starting C++ user groups!

  • The Jerusalem .NET/C++ User Group will cover both topics. They've had their first meeting already.
  • The Central Ohio C++ User Group has also had its first meeting and will meet monthly.
  • In Austin Texas they're calling it the C++ Meetup and the description sounds a lot like a user group
  • The Belgian C++ User Group has its first meeting in April

It's so much fun to see this excitement springing up. There seem to be two popular topics for first meetings: either "What's new in C++ 11" or "Writing Windows 8 Apps". I think these two things arriving together - the huge language and library improvements (and the unexpected synergy of the language changes and the library changes) with the chance to write for Windows 8 in C++and XAML - is producing much more interest than there used to be.

And now the fun is spreading to Toronto! No, I'm not founding the group - I'm surely not the only C++ developer in Toronto after all. But I am honoured to be speaking at the first event on April 17th right downtown (pretty much Yonge and Bloor.) I'd love to dive deep into C++ AMP, or show how the Consumer Preview of Windows 8 is easier to code for, but I think I should begin at the beginning, so my talk is titled What happened in C++ 11 and why do I care? and has this abstract:

C++, both the language and the libraries that come with every compiler, is defined by an ISO standard. The latest version of the standard, generally known as C++ 11 after its approval last fall, was optimistically called C++0x throughout the multi-year process that led to its adoption. Many of the language changes (new keywords, new punctuation, new rules) and library changes (genuinely smart pointers, threading, and more) have already been implemented by vendors who were following the standards process closely.
In this session Kate will introduce and demonstrate many of the highlights of C++11 including lambdas, auto, shared_ptr, and unique_ptr. These are all supported in Microsoft’s Visual Studio 2010. You can see how to make your code more readable and expressive, easier to update, more correct (less bugs and memory leaks) and faster, not by trading off among those possible constraints but by adopting modern C++ which gives you improvements in all four areas at once. If you’ve been ignoring the Standard Library, for example, you must see how lambdas make all the difference and open a world of productivity to you.
A sneak peek of the next version of Visual Studio will show you even more C++11 goodness.

If you've looked at my Pluralsight courses, you'll know that my biggest challenge is going to be fitting this into an hour plus Q&A. This will be an overview, an overture if you like, and should whet your appetite for the meetings to come!

Please register as soon as you can, please spread the word, and I hope to see you there!

Kate
Monday, March 26, 2012 8:29:02 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, March 23, 2012

My C++ precon, an all-day session about modern C++, has had a slight title change and is now called PRC08, C++ in Visual Studio 11: Modern, Readable, Safe, Fast. The content is still the same. My high level outline is:

  • Modern C++ with the Standard Library (demo of strings, shared pointers)
  • Application Lifecycle Management for Visual C++ 11
  • Leveraging Lambdas for the PPL and C++ AMP
  • Best practices for C++ developers today
This is all day the Sunday before Tech Ed Orlando starts, June 10th. You don't have to be registered for Tech Ed to attend a pre-con. It's a great way to get caught back up on what's been happening with C++ over the last decade or so. It's really not the language you remember. I plan to show you what's fun and amazing about it. Forget all that pointer-to-pointer-to-pointer and manual memory management stuff you may remember, and get ready to see how C++ can be simple, fast, and genuinely useful in some surprising ways.

Kate


Friday, March 23, 2012 11:12:51 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, March 14, 2012
People keep on releasing interviews with me. If you're willing to listen to them, I'm more than willing to keep on talking. There's remarkably little overlap in all of these.

On The Tablet Show, Richard and Carl (yes, that Richard and Carl) asked me about C++ in this wacky new world of Windows 8. We had the usual freewheeling conversation and covered a lot of ground in 49 minutes.

For PluralSight, Fritz asked me questions about my latest course, and the industry in general. This one's just ten minutes, and there's a transcript if you'd rather read than listen.

Kate

Wednesday, March 14, 2012 2:56:58 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, March 13, 2012

In recent years the speed at which Tech Ed session recordings have appeared has increased dramatically. I can now sometimes watch a missed session while I am still at the conference, in time to seek out the speaker and ask questions if I want to. But one thing that hasn't changed is that the precons, the all-day sessions held the day before the conference starts, are not recorded. Whether you attend one or not, you can't watch afterwards.

This has two consequences. First, if you want to see what's been happening to C++ lately and why people who've ignored it for the last ten years are suddenly interested again, you have to register (Orlando, June 10th or Amsterdam, June 25th) and you have to come and listen to me live. Second, if you do that, you want to take plenty of notes because you won't be able to just watch the video again later if there was a part where you got caught up in something on Twitter and just weren't listening.

Here's what I'm going to do to reduce the note-taking burden for my attendees. (I can't speak for other precon presenters, but you're welcome to ask them.) I will put a number of useful bits and pieces for you to download, using credentials I'll give out on the day. These will include:

  • The PPT decks I will use to present, with some notes added to some slides
  • Written demo scripts for all demos with exact step-by-step instructions (occasionally, it might just say “show the for loop and explain what it is doing”, but if there is code to be added or edited, it is in the script, if there is an option to be set the exact menu choices are in the script, etc.)
  • Zip files of starting points for all the demos and ending points too

During the precon itself, I will collect Live IDs from attendees who would like to be added as a user to a subsite on  my “hosted TFS” preview page, which I am using as a sandbox. This makes it possible to play around with the new ALM features without having to get a site all set up. I am not sure what will happen to this preview site by Tech Ed time, but I’m presuming it will continue to exist all through 2012. That’s the site I intend to use during the ALM (module 2) section of the precon.

I also intend to record each demo in advance – I typically record all my talks when I’m practicing for length and I have a pretty good mike that I use for my PluralSight courses. It's not much effort to edit them so that you can use them for a reference. I would have put this in the bulleted list but I don't want to 100% promise that I'll get them all nicely edited in time. I hope to provide them.

Specifically for module 4, Best Practices, I am planning to write a short paper that makes the same points in prose – sentences, code snippets etc – and if it's ready in time, I'll bring printouts of that paper to the session (leave me a comment if you think that would be useful.) It will be on my web site eventually, but I am trying to push myself to get it written before Tech Ed so it can be at the precon.

Anything else you think would help to reduce the note-taking burden? It's a full day, and a lot of us are out of practice receiving information in pieces of that size. Let me know!

Kate

Tuesday, March 13, 2012 5:18:55 PM (Eastern Standard Time, UTC-05:00)  #    
# Monday, March 12, 2012
It's been a week-and-a-bit that the beta of Visual Studio 11 has been out. I'm using it more than Visual Studio 2010 at the moment - in both Windows 7 and Windows 8, and for C++ projects exclusively at the moment. (Say what you will about the C++ Renaissance, but the fraction of my consulting, writing, and coding that is C++ has taken a major uptick in the last  6 or so months.) I'm getting used to the look, and I'm certainly motivated to use more keyboard shortcuts :-)

Herb has a nice blog post that summarizes the C++ features in this release. You can read the details there, I'll just summarize briefly:
  • Complete Standard Library for C++ 11. Especially the async and threads stuff. Standard!
  • Some more language C++ 11 features. Range for is the big one here.
  • C++ AMP. You know I care about this one!
  • The continuation (.then) syntax of PPL, which makes WinRT asynchronicity much more readable.
  • Windows 8 - both C++/CX and WinRL

And there will be more coming, sooner than "Visual Studio 12" whenever that might be. There will be out of band releases with more goodies as they get finished. If you care what gets done (and released) in what order, you can tell the team. I took the survey myself - I care about uniform initialization, defaulted constructors, and then some other bits and pieces at lower priority. Since they aren't just going to gather them all up and release them a few years from now, order matters. Share your opinion, and you're more likely to get what you want.

Monday, March 12, 2012 11:09:18 AM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, March 11, 2012

Recently the Tech Ed people interviewed me for a profile that is now live. You can read it on their blog. We are all starting to work our way towards being ready for June. The content catalogs are partially public for both Tech Ed North America and Tech Ed Europe. If you search on C++, you'll find more than just my precon, by the way.

North America:

Europe:

Who is giving those talks? Well I am doing the precons in both places - that's official. And I wrote the abstracts for the other two talks, so I'm pretty sure I'm giving those too. I would love to see you there. And if you have colleagues who are coming to Tech Ed who really don't "get" why C++ is different these days, please encourage them to join me for the all-day precon that answers precisely that question.

Kate

Sunday, March 11, 2012 1:48:45 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, March 10, 2012

I've been working on another C++ course for Pluralsight to complement the C++ WinRT/Windows 8/Metro course I did as well as the two-part C++ Fundamentals course (part 1, part 2). It's finished and live!

The topics I cover are:

  • Avoid Manual Memory Management
  • Use Lambdas
  • Use Standard Containers
  • Use Standard Algorithms
  • Embrace Move Semantics
  • Follow Style Rules
  • Consider the PImpl Idiom
  • Stop Writing C With Classes

I had a real blast writing this - while I was editing it I could hear my own enjoyment of parts of it. I hope you enjoy it too. A Pluralsight subscription is such a bargain - buy one for the topics you simply MUST learn for work, then use it on your own time to learn all those other things that you think you might benefit from. (I recommend Annual Plus - $500 gets you the sample code and offline viewing, all you can learn for a year.) Whether C++ is "must learn for work" or "I hear it's different know, wonder if it could help me" for you, I hope you find it helpful. Please let me know!

Kate

Saturday, March 10, 2012 2:36:17 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, February 08, 2012
I've been excited about C++ AMP since it was first announced back in June. What's C++ AMP? It stands for Accelerated Massive Parallelism and it's about harnessing thousands of cores on accelerators like GPUs. You can speed up some applications by a factor of 10 or more. Not 10%, 10x. And you don't have to learn some C-like language, you get to work in C++. It's done almost entirely with libraries, which means you can use C++ AMP from a variety of applications, including Metro apps for Windows 8.

If you check my Concurrency category you'll see I've been writing code (and words) for months now. I just haven't been putting those words here on my blog. Instead, they're going into a book, for Microsoft Press! Soon, I will have some chapter drafts available for review. If you're interested, I've set up a page with some details, and some links for those who want to learn more.

There's increasing media coverage, including Peter Bright at ars technica and Darryl Taft at eWeek, and last week the spec was released to the public under the Microsoft Community Promise license. This means other compiler vendors can implement C++ AMP in their own compilers, allowing even more developers access to heterogeneous hardware and massive speedups for data parallel calculations. Herb Sutter mentioned it in the Day 2 keynote at GoingNative, the Visual C++ Blog included a link, and Soma blogged about it too.

Dive in! There's a lot to learn. And plenty of samples to play with. I'll post updates here as I go.

Kate

Wednesday, February 08, 2012 8:48:48 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, February 07, 2012

The minute this was announced, I knew I had to go.

Two days of "C++ today and tomorrow" with the bright lights of C++ today? Just try and keep me away! I'm so glad I was there - it was AMAZING and FANTASTIC and just generally wonderful. For me, personally, seeing so many old friends was a big part of it. The C++ team, other C++ MVPs, people I went to university with, and so on. It was also wonderful to see so many young people - including speakers, but also attendees, who were clearly in their 20s (and a few who were obviously in their teens.) After Chandler's talk I told someone "we can retire now: the future of C++ is in good hands." The speakers were not "the usual suspects" at a Microsoft event either. At a panel at the end of the second day, someone asked about C++ and the cloud and one of the answers was to indicate three speakers sitting next to each other: "Microsoft guy, Facebook guy, Google guy. Where isn't C++ in the cloud?" While that was a great cloud answer, I think it also highlights how inclusive this was - it was a C++ conference held at Microsoft, not a Microsoft conference.

Some fun quotes I happened to write down:

  • “if it’s that ugly, it must be good” - Bjarne, on why some newbies imitate horrible code written long ago by their heroes
  • “write C-style code, expect C-style errors” - Bjarne again
  • “we know where bugs hide” – Bjarne (they hide in large tracts of complicated code)
  • "dot dot dot is where the fun begins" - Andrei
  • "real code is not supposed to fit on slides" - Andrei
  • "this is legal" - Andrei (we needed to be reassured since it rarely looked legal)
  • "if you're using new or delete, you're doing it wrong" - Herb (it's true!)

And Chandler's talk was very much a 2012 talk, with lolcat-like interjections and Simpsons references and even a how-agile-is-this update with a picture of Oscar Wilde in reference to Andrei's earlier off-the-cuff description of some template error messages (aka template barf) as being "a small novel by Oscar Wilde." The humour level was very high, much of it self-deprecating - no-one, not even the coiners of the terms, thinks RAII or SFINAE are great names, but what the heck, they're the names we use.

Even the little things here were so well done. Herb opened the conference by dedicating it to Dennis Ritchie, which I found extraordinarily touching and appropriate. He opened day 2 by celebrating the 20 year anniversary of Microsoft C7 which was C++ 1 for them, with Visual C++ appearing in the next release. There on the podium was the two foot long, 44 pound box, with multicoloured plusses all over it, in which it shipped.

And what was inside? A lot of books, and a lot of 3.5" floppies (I took this picture earlier, before the box headed to campus):

There are 5 or 6 floppies in each bag and apparently each bag had a part number of its own.

This conference was far more than a trip down memory lane, of course. It was a two-day Valentine from Microsoft to the C++ community, a demonstration of the "new growth" in modern C++ and the power and capability that is there for those who are prepared to start using the new features, and a chance for all of us to accelerate the learning we have to do. I so hope you were able to be there, or to catch the energy by watching it live and following tweets from those of us who had to share the bon mots and the fun. But if not, the on-demand videos are almost all there now. Here are the links:

Bjarne Stroustrup: C++11 Style

Hans Boehm: Threads and Shared Variables in C++11

Stephan T. Lavavej: STL11 – Magic && Secrets

Andrei Alexandrescu: Variadic Templates are Funadic

Panel: The Importance of Being Native (Bjarne, Andrei, Herb, Hans) 

Herb Sutter: C++11, VC++11 and Beyond

Chandler Carruth: Clang - Defending C++ from Murphy's Million Monkeys

Andrei Alexandrescu: Static If I Had a Hammer

Bjarne Stroustrup and Andrew Sutton: A Concept Design for C++

Panel: Ask Us Anything! (all speakers)

Fair warning: both of Andrei's talks, and the Concepts talk, are hard. This is cool new stuff that we are all learning about. There is no shame in pausing, rewinding, and giving something a second listen. Look, Chandler was running through pitfalls and problems that Clang catches, and showed some code with a problem I couldn't spot. A few minutes later in the Q&A, Bjarne asked him to clarify just what the problem was. Made me feel better!

Chances are you won't be able to watch any of these on fast forward, or skip any of them. So I'm asking you to invest 12 hours of your life to watch all of them. Do it! You won't regret it!

Kate

PS: They gave us shirts (it's all about the shirts for developers) with real code on the back and this on the front:



Highly appropriate. Of course, it's not a comeback for those of us who never left. But still...
Tuesday, February 07, 2012 12:19:41 PM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, January 12, 2012
Perhaps not a great surprise, but today the precons for Tech Ed North America were announced and mine is there too. It's well described in the previous blog post and I'll be doing the same material at both events. So if Orlando, June 10th works better for you than Amsterdam, June 25th, terrific and I'll see you there! Registration is now open.

Kate

Thursday, January 12, 2012 10:57:42 AM (Eastern Standard Time, UTC-05:00)  #    
# Monday, January 09, 2012
Yay! Today I got news that registration is open for Tech Ed 2012 in Amsterdam, and with it confirmation that my preconference has been accepted! This is great news for anyone who loves C++, because it's a C++ all day preconference! The title is C++ in 2012: Modern, Readable, Safe, Fast and here's the abstract:

C++ is gaining momentum as a development language, so whether you’ve never used C++ or stopped using it a decade ago, it may be time to brush up on your skills. With a new standard release providing new keywords and capabilities, C++ is a  featured language for many of the new Microsoft technologies and enables some amazing speed-ups of your application using libraries like PPL and C++ AMP. What’s more, Visual Studio offers tools to native developers that have only been available for managed developers in earlier versions. This all-day session will show you what all the fuss is about and give you the skills you need to understand the advantages of C++ today and how to start applying those benefits to your application.

Now, if you're an experienced and current C++ developer, you may not need to come to this session. But if you were thinking you needed a refresher, here's a great way to get one, and at the same time look at some of the cool new stuff that is available to you once you know C++. If you've never written a line of C++ code in your life, but you're solid in C# or Java so you know the basic syntax (if, while, etc) you should be able to follow this session, though it won't teach you all the fiddly bits of C++ syntax and make you a C++ developer from scratch. It should, however, give you the inspiration you might need to go and learn all that fiddly syntax, and understand why we have it. I am also hoping there will be a number of relevant breakout sessions you'll want to attend after getting a taste of what C++ developers can do, though we have to wait a little longer to find out about those.




I'm still working on the exact content, but my first draft outline looks something like this:
  • Modern C++ with the Standard Library (demo of strings, shared pointers)
  • Application Lifecycle Management for Visual C++ 11
  • Leveraging Lambdas for the PPL and C++ AMP
  • Best practices for C++ developers today

This is 9am - 5pm (all day) the Monday before Tech Ed Europe starts, June 25th. You can register for the precon and Tech Ed now. And tell your friends! I would love to see a TON of registrations to ensure continued C++ content at Tech Eds around the world.

Kate

PS: Yes, I know that Tech Ed US is a few weeks before Tech Ed Europe. You didn't miss the US announcement; you shouldn't have to wait much longer for it though.

Monday, January 09, 2012 8:29:14 PM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, December 15, 2011
The second part of my C++ Fundamentals course is now live on the Pluralsight site. This one covers:

  • The Standard Library - string, collections, and the like
  • Lambdas - perhaps my favourite C++ 11 feature
  • Exceptions - every C++ developer needs to understand exceptions
  • Understanding Legacy Code - here's where you'll find out how C++ earned its reputation
These four modules build on the material I covered in part 1:

  • Context - to set the stage
  • Tools - Visual Studio and Visual Studio Express
  • Fundamental Types
  • User Defined Types
  • Flow of Control
  • Operators
  • Templates
  • Pointers
  • Pointers, Inheritance, and Polymorphism
One of the things I like best about this material is that char* strings and all the special cases to deal with them don't show up until the last module of part 2. Ditto the kinds of arrays you may have first learned. The kinds of gyrations C-style arrays and C-style strings put C++ programmers through are a large part of why people think C++ is hard. With std::string, std:vector, and other goodies from the Standard Library, C++ really isn't hard. Honestly!

Kate

Thursday, December 15, 2011 4:51:31 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, September 17, 2011

Oh my goodness. What a week that was!

Here's how I thought I would do my first summary. Links to videos, discussions of sessions I either went to or tried to go to (more on that in a moment) along with my tweets from the ground, as it were.

My first real tweet Tuesday morning (8:37 California time) was announcing that my PluralSight C++ Fundamentals course had gone live. Then the keynote started. Here are my tweets and retweets along with the time into the keynote I said them:

  • 6 minutes: #bldwin totally dominating my stream SS doing a good intro to lean back computing
  • 37 minutes: RT @dseven WinRT API'S are natively built into Windows and built to reflect in different languages - C/C++ and .NET. #bldwin
  • 42 minutes: Starting at 8PM today, Seattle time, you can download all of the code that attendees at BUILD received. t.co/nuTuwga
  • 43 minutes: RT @wkrwk Did anyone notice the UI during the VSE 11 demo is the classic Windows UI? #bldwin
  • 48 minutes: #bldwin VS vNext demo is breaking twitter = no hope of following it all
  • 50 minutes: RT @andrewbrust Expression Blend is still Grey on Black. It could use a little "fast and fluid," frankly. #bldwin
  • 51 minutes: Store menu in VS?? #bldwin #wholenewworld
  • 58 minutes: RT @rhundhausen Desktop (#x86) apps can be listed in the #windows8 store as well #bldwin
  • 61 minutes: RT @ayus :))) RT @timheuer The Red Shirt is dominant even when not present. #bldwin @scottgu
  • 79 minutes, @EdgarSanchez retweeted @rickasaurus asking "I'm interested in hearing more about this new GPU offloading API. Any links? #bldwin" and I answered "Check my blog as the week goes on for GPU stuff"
  • 80 minutes: RT @marypcbuk Sinofsky: that gaming PC looks like ice. Angiulo: more like lava, it converts 700w of power to 4.7 teraflops like 3,500 Cray XMPs #bldwinPlatform for Metro style apps
  • 87 minutes: RT @Pete_Brown Dude just cracked open a laptop on stage and showed the electronics. Can't beat that #bldwin #geek
  • 100 minutes: RT @andrewbrust When will we admit Sinofsky's doing a great job? He's working hard, not just presiding. #bldwin
  • 120 minutes: RT @ronnipedersen If you have an iPad, don't watch the build keynote… It'll make you feel like you have bought a C64 #bldwin
  • 127 minutes: RT @jonbrasted It is a great day to be a Windows developer. #bldwin #trbbuild

The download surprised me, I didn't think it would be ready for people to try on any old hardware. And the hardware demo was very very good. And sure, I was on instant messenger back to the office saying "it's official" when the rumour was finally confirmed that we were getting tablets. But mostly, I really liked what I saw and wanted to know more, which is what keynotes are all about.

After eating something completely unmemorable, I found my way to the overflow room, always a little more casual and a good place to find "the cool kids". I had already met a number of old friends in the huge keynote session and before it, but here were more. I'll just give you the links to the Big Picture sessions. They are all very good.

  • 8 traits of great Metro style apps - a truly excellent session by a presenter who cares deeply about the topic. I tweeted a lot less during this one because it required more active listening.
  • Platform for Metro style apps - another very good session during which I just retweeted some other people's "Hey, this stuff is C++" reactions and a link to the session planner app for the phone, which I used heavily.
By this time people were starting to "get it" (including me) and the excitement level was rising. Here's just what I retweeted:
  • @coridrew #bldWin is really, really, really making me want to //BUILD/ Windows apps #BestConferenceNameEver #WhoKnew
  • @briannoyes Add ref from js project to C++ library - really empasizes this is running native #bldwin
  • +@fignewtron iPad limited in many ways to consumption - Windows 8 is production and consumption on many devices. Sales numbers decide winner. #bldwin
  • @mcakins Wow, the silence from Apple's camp is deafening! Windows rocks once more! Its 1995 all over again! #bldwin

One more session: Tools for building Metro style apps - I was getting tired at this point. It was a lot to take in. People were lined up the length of the convention centre for tablets. I knew there were enough for all of us, so I went back to my room to edit my pointers module for the PluralSight course so it could "tack on" to the end of the published course. While videos rendered, I had a little back and forth on Twitter with people who had noticed how much fun I was having, and others who were playing with their tablets already. I slipped out to pickup the tablet about 7:30 but didn't open it till the module was done. Then:

  • 10:48 pm: got major piece of work done ... yielding to temptation ... tablet here i come #bldwin
  • 10:57 pm: How's that for fast setup? Everything's installed.... Trying visual studio next
  • 11:11 pm: Just wrote a Win8 C++ app on the tablet with touch keyboard. Built and ran first time. #winning
That's right, I didn't even set up the bluetooth keyboard. People cite Visual Studio as an app you couldn't possibly use with touch. I wouldn't want to do it all day, but I did it! Then I played a bit more.

Day 2 started with another whole keynote. C++ was front and centre here. Some tweets:
  • 17 minutes: RT @seesharp 3D graphics debugging at the pixel level in DirectX. Unreal. #bldwin
  • 33 minutes: RT @bgervin killer strategy for MS to help developers make HTML apps for iOS and Android #bldwin
  • 34 minutes: RT @tpdorsey RT @EisenbergEffect […] in C++, you can write your own WinRT library, which when built, can be used by C++, C#, VB and JS.
  • 34 minutes: RT @jmorrill This new COM and C++ version is not _anything_ like what you think it is. From what I can tell so far...effing amazing!!!!
  • 49 minutes: Loved it RT @MichaelDesmond Zander shows off the new image editor in VS11 as he works on a C++ DirectX game.
  • 54 minutes: RT @shycohen Moving a VHD while the machine is running is cool. Moving a live VHD is even cooler! :) Will enable amazing things in the future. #bldwin
  • 82 minutes: most tattoos ever in an MS keynote
  • 95 minutes: RT @seesharp WOAH. Did not expect Steve Ballmer today. Everyone was starting to leave already. Woah! #bldwin
  • 97 minutes: RT @carafone 500,000 downloads of #win8 already! #bldwin
  • 98 minutes: RT @LACanuck And #Win8 was downloaded 500K times in 12 hrs RT @mashable: RIM Has Sold Just 490,000 PlayBooks - on.mash.to/nEu0dU #bldwin
  • 102 minutes: That's what these keynotes were missing! Turns out it's a great time to be a developer. I was worrying, no-one had told me yet #bldwin
  • 105 minutes: I've been paid to program since 1979. Keynotes tell me at least once a year it's a great time to be a developer. And they're right. #bldwin
Then it was time for simultaneous breakouts, and that meant choices. You can search the sessions list as well as I can. The C++ ones are not to be missed. These are happy people who are delighted to tell us what's been going on, and they're proud of it, too. At 3:13 I tweeted "Went quiet because i am massively engaged with C++ content in packed rooms. Small break between sessions to say "wow!" #bldwin #happycamper". The remainder of the afternoon was super confusing. People were jumping to conclusions, correcting each other, having opinions about the death of this that and the other. Because C++/Cx (the language extension you use to call WinRT) looks a lot like C++/CLI, people thought it was managed, but it's not, it's all native code and C++ Metro apps get a perf boost from that. The understanding that something amazing and powerful still has COM at the core began to grow. People were reporting trying to use Windows 8 gestures on their iPads and on nontouch screens, showing that the team has made some very intuitive choices. One tweet of mine I want to repeat: "Big props to Aleš Holeček for joining in the Q&A in the last C++ talk of the day when the questions got really Windows-y. Impressed. #bldwin". Even if you're not a C++ developer, download that session and watch the Q & A.

Day 3 started with being turned away from a C++ session, and so going to a different C++ session that was on at the same time. Several people from the C++ team made the trip with me, giving me a chance to tell them how impressive all this was. Meanwhile on mailing lists, people who weren't onsite and were 12 - 24 hours behind as they waited for session videos to go live were echoing the confusion and dismay of yesterday. It was hard to be patient with them. It's going to make sense, I wanted to tell them. Just hang in there! I took a small break from sessions to watch (and help with) the C++ part of Channel 9 Live (I am still waiting for links to the recording, because I couldn't hear everything they said and I want to) and then to Herb's second talk - again the room jammed full and dozens turned away, Don Box (who had earlier reminded us COM is still love) blurting out his admiration for Herb as a speaker and the great content, and the terrific line, "We protect against Murphy, not Machiavelli". What a time to be a C++ developer!

Day 4 kicked off with kind words from Daniel and a chance to hand out paper copies of the whitepaper I recently blogged. I got some quiet time with various smart people who told me their thoughts on all this. I'm still synthesizing it all. I also was downloading videos like a mad thing. I came home with 22 hours of video to watch and since then have grabbed another 15 or so. Some people began to realize they had over-reacted. Some excellent blogs began to appear - Doug Seven, for example, had several sensible things to say.

And then it was time to go. Glenn Ferrie tweeted "Writing C++ in the airport #bldwin #WinRT" and that summed up the week for me. I have a lot of watching, coding, thinking, reading and talking to do so I can establish what all this means. But hey, why not join me? It's a great time to be a developer!

Kate
Saturday, September 17, 2011 4:42:01 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, September 15, 2011
Word is starting to get out about C++ AMP, which appeared out of nowhere at a conference remarkably few Microsoft developers were paying attention to, because it was a hardware conference. There was information available in June, enough to get some of us excited:

I got into this right away and have been playing with code and doing a little writing. This is the kind of technology that changes things more than you might think. By leveraging the GPU, your code might run 10x faster, 50x faster, or even 100x faster. And for you to be able to do that from C++, using familiar C++ constructs, and a debugger and profiler in Visual Studio? That means everyone can do it.

Well, not quite everyone. You do have to learn how to parallelize your algorithms. The syntax of using the GPU (or some other heterogeneous computing resource) is not hard at all. The computer science of knowing your work is data parallel can be hard. But let me show you "not hard". Consider this code to add a pair of one-dimensional array:

void AddArrays(int n, int* pA, int* pB, int* pC)
{
    for (int i=0; i<n; i++) 
    {
            pC[i] = pA[i] + pB[i];
    }
}

Compare that to this:

#include <amp.h>
using namespace concurrency;
 
void AddArrays(int n, int * pA, int * pB, int * pC)
{
    array_view<int,1> a(n, pA);
    array_view<int,1> b(n, pB);
    array_view<int,1> c(n, pC);
 
    parallel_for_each(
        c.grid, 
        [=](index<1> idx) restrict(direct3d)
        {
            c[idx] = a[idx] + b[idx];
        }
     );
}

It's all C++ and it's all pretty readable. And this code runs on the GPU and can be WAY faster (and use less power, meaning your data centre is cheaper or your battery lasts longer) just like that.

Recently Daniel Moth has published ten blog posts drilling into some details. They will help if you've decided to start using AMP and want to know how. But before you do that, you might like to read a little background on why heterogeneous computing matters, what other options you might have for doing it, and why C++ AMP is what you want to use. I've done a small whitepaper on just that and would love you to read it and let me know what you think.

Kate



Thursday, September 15, 2011 9:15:16 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, September 13, 2011
I've been writing a course for Pluralsight that covers the fundamentals of C++ - types, expressions, basic syntax stuff, templates, pointers, polymorphism - and it has gone live! During BUILD access to it is free. It uses Visual C++ Express, so you don't need to buy any tools to follow along. Lots of buzz at BUILD about C++, so if you want to see if it's a language you could use, here's a great way to find out.

I have more material coming on this, and some Windows 8 - specific material. This is just background. If you think you need to get up to speed on C++, here's how to do it. Let me know what you think.

Kate

Tuesday, September 13, 2011 12:41:14 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, August 29, 2011
For a long time now, whenever anyone asks me about support for particular C++0x (oh sorry C++11 :-) ) features in a given compiler, I've sent them to the list Scott Meyers maintains. The format is kind of strange because it's exported from a spreadsheet, but the information is invaluable.  If you'd like to see more compilers covered, try the wiki at apache. Scott does gcc and Microsoft Visual C++; the wiki adds compilers from Intel, IBM, Oracle, and so on. You  might be surprised to see the variations in coverage. Expect new versions to continue to add support as soon as possible.

Kate

Monday, August 29, 2011 4:08:39 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, August 27, 2011
I was poking around on CodeProject looking at some developer interviews (they've started these up again with some interesting subjects, so check the recent links) when I spotted An interview with Microsoft's new Visual C++ .NET community liaison - and in March 2002, nearly a decade ago, that was Herb Sutter. Isn't the Internet a handy attic? Check out some of these quotes:

I hope to make a noticeable mark in the product.

C++ continues to be relevant, dominant, and in widespread and still-growing use. The C++ standard and standardization process also continues to be relevant [...] all the vendors, including Microsoft, are there together actively working on the next-generation C++0x standard whose work is now getting underway.

[...] the best numbers I keep seeing put the global developer community at something like 9.5 million people, and those using C++ at about 3 million of that. That's well ahead of Java in nearly all studies I've seen, by the way, usually by a factor of 1.5-to-1 or 2-to-1. [...] The reports of C++'s demise have been, well, "exaggerated."

C++ developers need power and know how to use it. I've always said you should use the best language for the job, and I've used dozens of languages professionally. Depending on how you count languages, I've probably used a dozen professionally in the past year. People who want to write efficient, tight, fast code often tend to choose C++ because it lets you get the job done with powerful code but without sacrificing efficiency. 

People who want mature, stable compilers and tools often tend to use C++ because it's been around a while and the tools and libraries are plentiful and solid. Commercial client-side application development with more than a few screens, most kinds of server-based software, and most kinds of libraries are all done more often with C++ than with other languages, according to the best numbers I've seen and according to my own experience as a developer and as a consultant who shows up at other developers' shops.

Nine and a half years later, I see nothing but good stuff there. I hope all my interviews stand up as well (though I already know they wouldn't) and I'm impressed at the ability to set a goal and meet it. What will the next decade bring?

Kate

Saturday, August 27, 2011 3:53:50 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, August 25, 2011
The cone of silence that descended this summer is starting to fray a little. The Visual C++ Team Blog has an entry talking about Productivity features in the IDE. They're willing to talk about:
  • Semantic colorization - this is actually as much font face as it is colour, but anyway function parameters look different from locals, constants you #define'd look different from everything else, and so on.
  • Reference Highlighting - you've seen this in other languages I'm sure - when the cursor is in a variable name, other places in the code with that same variable name are highlighted for you. It can be very helpful.
  • Replacement Solution Explorer - I'm a huge Pro Power Tools fan, and if you've used Solution Navigator, you won't be surprised when you meet the new Solution Explorer. Combination Solution Explorer and Class View is the best way to explain it to a C++ developer.
  • Aggressive IntelliSense - something else you may be familiar with from other languages. I like it.
  • Snippets - oh, yeah!
Apparently there's still plenty more to come! Looking forward to it.

Thursday, August 25, 2011 3:43:15 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, August 23, 2011
C++ is a great language for writing applications that will run on a number of platforms. There are compilers for many different platforms, and some powerful libraries you can use. Still, in the end your code needs to talk to the operating system, and that means that most cross platform applications have at least a few little corners where platform-specific code lives. The challenge is how to ensure that your Windows code runs on Windows, your Linux code runs on Linux, etc, without maintaining a number of different branches or hand-merging and splitting every time you deploy.

Being C++, an unspoken requirement in solving this problem is "be as fast as possible". Putting everything through a library and paying for extra indirection, looking up something that cannot change once the program has started executing, is not as fast as possible. You also want developer convenience and productivity. If you support five platforms, and something is the same on four and different on one, copying that code around for the four that are the same is not a productive way to behave. You would like a default behaviour, and then special code for special cases.

Michael Tedder has an intriguing approach using templates. As he says:

Instead of declaring a base interface class with virtual functions then deriving each platform with a different implementation, we declare a class with one template parameter — a platform ID — then specialize it to provide a different implementation for each platform.  The template class is then typedef‘d to expose the specialization for the platform ID being compiled to the application, allowing the implementation to be used without any virtual functions and also allow for inlining of functions as well.

He has some pretty convincing armwaving about using this not for just Windows/Linux/Android but for any hardware differences even on the same operating system - like what kind of graphics architecture you have or anything else that can't change at runtime. It's a good example of how the power of templates makes things possible that would always incur a runtime cost in any other language, or a significant burden on a developer to move code around building custom versions of an application. Worth a read!

Kate

Tuesday, August 23, 2011 2:55:55 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, August 21, 2011
Here's an interesting project I came across:




The game is Mastermind, which many people already know. What caught my attention is that it's done in C++ and XAML. To quote Tyler Whitney's blog post,

The Mastermind code sample demonstrates how to create a simple Silverlight storyboard in Expression Blend 3, and then provide the code for the state transitions in Microsoft Visual Studio 2008. You can also see how to create brushes programmatically and how to add a title bar to a Silverlight-based app.

The code is on the Microsoft Code Gallery (only Microsoft Employees can publish there) and Tyler has been updating the article over the summer. Nice way to see how to combine two technologies some people would never thought have combining.

Kate
Sunday, August 21, 2011 2:41:42 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, August 19, 2011
I have talked about plenty of C++0x (soon to be known as C++11 or just plain C++) features over the last little while. Here's a nice summary by Danny Kalev of the top features and why they matter. He covers lambdas, auto, the new ways to initialize instances (which hasn't been covered much elsewhere and contribute a lot to readability), suppressing default versions of functions (like constructors for example) or specifically requesting them (how cool is that?), nullptr (which I love because it eliminates a late night drinking argument about "what if someone #defined NULL to 3, would your code still work?", and rvalue references -- and those are just the language changes! His library coverage is super terse, but there are links in it if something (*cough* shared pointer *cough*) catches your attention.

There's no reason for a C++ developer to ignore C++11. This is big stuff, and reading these "what's new" lists from a variety of different people is essential for getting perspective on the changes. So read Danny's list!

Kate

Friday, August 19, 2011 1:51:01 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, August 17, 2011
Everyone knows that C++ is the language to use when speed matters. That's just a known fact. So here's a question: if you solved the same problem in both C++ and C#, using the generally available languages (the Standard Library for C++, the .NET Base Class Libraries for C#) and you didn't happen to know which parts of those libraries weren't implemented very efficiently, just wrote your apps -- which would come out faster and by how much?

Think you know? Of course, the answer is "it depends". Debug or Release builds? Laptop or handheld device? Whose implementation of the .NET Framework are you going to use - Microsoft or Mono? What chip are you running on? Oh, and to what extent are you deliberately setting C++ options that emphasize runtime speed? Also, did you choose an algorithm with a lot of generics or templates? C++ has a huge perf advantage there, but lots of benchmarks don't use generics or templates since they are solving one specific problem.

An article on CodeProject leapt into all of this feet-first and did some measuring. Along the way, "Qwertie" proved a universal rule of the internet: nothing will get you the answers you seek faster than posting the wrong answer. Want to know the exact date Bewitched switched Darrens? Find a place that discusses old TV shows and post your belief that there was only one, or that there were seven, or whatever, and people will correct you while the ads are still loading on their copies of the page. When Qwertie posted the first version of the benchmarking article, commenters were quick to say "but you made this mistake, and that mistake, and forgot this other thing" all of which led to a much better article.

Definitely worth a read. It gets you thinking about the things that truly affect performance. Absent-mindedly deploying a Debug build is going to cost you far more performance than your language choice ever will. Using a library in a performance-sensitive situation without understanding whether the library is high-performing or not will too. It's chock full of graphs like this one:




Don't read it to find out the answer to "is C++ faster than C#?" - we already know that. Read it to find out how to make your applications faster.

Kate
Wednesday, August 17, 2011 4:59:15 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, August 11, 2011
I'm pleased to see that Kenny Kerr is writing his C++ column for MSDN again. He's also blogging again and in a recent entry, he provides some really plain-spoken advice to people looking for guidance:

  • "You can of course still use MFC but I do not recommend it as modern C++ can do a better job of supporting the Windows developer."
  • "You should never again use auto_ptr for anything."
So there! I agree with these, especially the auto_ptr one. It was an attempt at a smart pointer that just wasn't smart enough. We have shared_ptr and unique_ptr now and they work in collections and are truly smart pointers. Use them and stop typing delete in your code entirely.

As for MFC, it does fill a need and I certainly wouldn't scrap a working MFC app just because the library is getting old (the facelift a few releases ago helped) but if I was starting a brand new application from File, New Project I would need a good reason to use MFC as my UI framework.

Kate

Thursday, August 11, 2011 1:29:29 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, August 01, 2011
I consider myself a pretty skilled debugger, and reasonably familiar with the things you can do in Visual Studio (My Visual Studio course Part 1 and Part 2, for example.) Conditional breakpoints, tracepoints in C++ and in C#, breakpoints that only break every 10th time they're reached, customizing the data tip that shows when hovering over one of your own types, making data tips transparent, and plenty more have all been covered here in the blog over the years. But I still come across things I didn't know before, or didn't try before.

Take this blog post by "Daan-Nijs" about the abilities of the watch window. I knew the first one, but the rest are new to me:

  • Changing a value in the watch window
  • Changing a type in the watch window
  • Inspecting an array in the watch window
Then there's re-running or skipping code by dragging the instruction pointer - I only knew I could right click somewhere and say Set Next Instruction. Finally he includes a reminder of how to enable Edit and Continue. All this is for C++, but you're welcome to give some of the techniques a try in other languages and see what happens. Being a faster and more productive debugger will rocket you up the overall productivity leagues like nothing else.

Kate

Monday, August 01, 2011 11:57:45 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, July 29, 2011

Since Tech Ed came and went during my blogging hiatus, I didn't get around to providing links to some of the sessions you might want to see. It's time to correct that omission:

There were other sessions I attended, including a great interactive session that was not recorded called "C++ Renaissance at Microsoft: How the C++ Developers Can Get Involved" with plenty of conversation between Microsoft people and native developers. You might want to do a little searching on the main Tech Ed Video site to see what interests you.

Kate

Friday, July 29, 2011 5:51:36 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, July 27, 2011

Today saw the release of the first episode (naturally, Episode 0) of GoingNative on Channel 9. As the introduction says:

GoingNative is a new, monthly show on C9 dedicated to native development and native developers, with an emphasis on modern C++.

You know there's been a lot of talk about the C++ Renaissance. I'm happy to see that phrase get picked up, and I've got another one for you: Modern C++. Or as some folks like to say "not your father's C++". If you think C++ means manual memory management, strings as arrays of characters and a strange cast of global functions, and longing for a library or framework that might rival what .NET has to offer, then you haven't been keeping up with C++. The good news is that it won't take you long to catch up - shared_ptr and unique_ptr, the Standard Library, lambdas and other Modern C++ goodies are easy for both managed developers and longtime native developers to learn.

In Episode 0, Charles Torre (longtime C++ friend) and Diego Dagum (C++ Community lead, blogger, and Tweeter) lay some groundwork and, of course, show code. It's always about the code, right? Then, they ask you to get involved. Whether you're someone who wants to learn about C++, or someone who wants to make sure something about C++ gets taught to others, speak up! And yes, that includes topics on non-Microsoft platforms. Email C9GoingNative - they're using hotmail - or on twitter, follow or talk to @C9GoingNative. (There's a Facebook group, too - whatever way you like to interact is welcome.)

But wait, did that sound like a whole episode? Nope, they grab the camera and head over to see Ale Contenti - one of my favourite team members and one I've done interviews and sessions with before. His talk gets technical fast, which is one of the things I like about him! I too have a soft spot for 6502 assembler :-) and find template meta-programming a bit of a write-only technique. I, too, like "the power the language gives you to make the language bigger with libraries" and think that's part of the appeal of C++ for me. Well, that and the power and performance and control, of course. Are there downsides? Well, there's what Joni Mitchell called "the crazy you get from too much choice" - C++ gives you many ways to do everything, according to your circumstances, and having to decide how to do it, or having to connect two components that made different choices about something as simple as how to represent a string, can be frustating. As well, it's great to be in control, but that does mean that nobody is looking after you. If you're inexperienced (and sometimes, even when you're not) you can make dangerous choices and, as we like to say, shoot your foot off. Security holes and vulnerabilities are important and C++ will let you write bad code, so you need to be aware of best practices. Both Ale and Diego address these points, and you can expect to see more of that in time to come - especially if you ask for it!

Looking forward to next month's show already,

Kate

Wednesday, July 27, 2011 7:55:44 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, July 23, 2011
So, you're a C++ programmer? You've written a Windows app or two in your time? Let me propose a little challenge to you. Write one. Only start with File, New and don't let Visual Studio generate any code for you. Write each line of it. Then explain it. No MFC, No ATL. That's what was asked of me a while back, and the result is a six-paper series that has finally arrived on MSDN.

I have to say I really enjoyed the simplicity of the smallest Windows program possible. I also enjoyed making it better, which included making it more of a C++ program and less of a C one. I also covered a little Direct2D, a little COM, and a little "here's some other stuff you're going to want to read." If it's been ages since you wrote a Windows program in C++, or wrote one that wasn't all covered in barnacles from frameworks and libraries you might not want to rely on for simple things, I really suggest you give this series a read - it won't take long and you can use Visual C++ Express if you like - the first chapter includes links and instructions for getting all the tools you need. Better still, if you've never written a Windows in C++, why not give it a try and let me know what you think?

Kate

ps: Never blog that you're not blogging. Never blog about why you're not blogging, no-one cares. Just blog. Right?

Saturday, July 23, 2011 12:39:47 AM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, April 02, 2011

Here's yet another C++ team member on Channel 9. Boris starts out reviewing some "old days" things including the Intellisense background I pointed to recently. He explains in more detail why it's so hard to be the C++ team, needing to build an IDE for a language they can't control and that is used by such widely different people. I love that Boris appears to have framed and hung on his office wall someone's comment on a blog post. If you ever wondered whether what you type can make a difference, there's your answer.

With the history and reminiscing out of the way, Boris warms to a topic I haven't heard on Channel 9 before (though I have been hearing it in person) and that's the importance of C++ and specifically the Microsoft toolset, Visual C++, to the games industry. He also talks about how the games industry can be important to all the other developers as well, which I find intriguing. Definitely worth watching and not a rehash of the other C++ videos you may have seen lately.

Kate

Saturday, April 02, 2011 11:07:01 AM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, March 27, 2011
The screencasts for restart and recovery in native and managed code went live before the associated recipe was published. Now the recipe is on Code Gallery ready for you to use. As it says there:

This recipe provides guidance and an easy way to start using these great features in your application, removing any complication of how and where to store your application data.

What’s in the box?

This Restart and Recovery recipe includes:

  • Complete source code of the recipe and its samples
  • Managed .NET assembly
  • C++ header and class files to be included in your C++ application.
  • C#, and C++ test applications
  • Documentation
Give it a try, please!

Kate

Sunday, March 27, 2011 7:21:53 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, March 25, 2011
Charles was busy during MVP summit! In addition to interviewing me, he sat a number of MVPs down to talk about C++, being an MVP, and the like. They're from all over the world and they have widely different jobs, but you can see how much they love this stuff. And please notice -- they span a wide age range, too. The stereotype of C++ as the language for the grey haired developers is just a myth. If you wonder why anyone still uses C++, and why it's going to be very good for this industry that there are still C++ experts around, watching these videos will be an eyeopener.

By the way, Alon is also an RD.

Kate

Friday, March 25, 2011 7:15:03 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, March 23, 2011
As you may have noticed the C++ team is really stepping up the communication lately. There have been hours of Channel 9 videos (I pointed you to some good ones) and Diego has been blogging a lot. Recently he did a long post (with references!) on Intellisense in C++/CLI - why it wasn't in Visual Studio 2010, why it didn't sneak in with SP1, and so on. Here's a level of transparency you just don't see these days:

...we simply underestimated the amount of work it would take to implement C++/CLI in this codebase, and we couldn’t change our plans by the time we realized it. ... In the end it was one of those hard cuts you have to make when dealing with the real world resource and schedule constraints. It turned out that the work was also too much work to fit into SP1. As soon as we wrapped up VS 2010, we started work on C++/CLI IntelliSense, but it wasn’t ready in time for SP1. We realize this wasn’t what you wanted to happen and an explanation doesn’t help you get your work done if you are affected by this, but we want you to know the truth.

Wow. Makes perfect sense and is actually a nicer reason than "we think you don't matter". Yet so few teams will hold their hands up and say this. It happens. It happens to every one of us pretty darn regularly. Kudos to the C++ team for not pretending it was all part of a plan from the beginning to leave it out. And do read the blog to understand just how much they were taking on.

Kate


Wednesday, March 23, 2011 7:04:54 AM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, March 19, 2011
I'm on Channel 9 a lot right now - partly because some things are getting published that were done a long time ago, and partly because being on campus for the MVP Summit makes it convenient to be interviewed. I love talking to Charles because he really cares about the answers to the questions he asks. So we talked for half an hour about what it means to be an MVP, what C++ is useful for, what I like about C++0x, and that sort of thing. Since Charles started things off by mentioning previous conversations, let me toss in some links to those too - here's the Barcelona conversation (backstory here)and on the couch with the C++ guys (shorter backstory.) You can watch my hair change colour if you watch those oldest-to-newest. Diego was also nice enough to blog about this interview, too, as was John Bristowe of Microsoft Canada.

Thanks for the chat, Charles!

Kate

Saturday, March 19, 2011 7:51:23 PM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, March 17, 2011

Here's another pair of screencasts to simplify your Windows 7 development. Both cover Restart and Recovery - one is for native developers and the other for managed. As the screencast intros say:

Application Recovery and Restart (ARR) technologies enable developers to customize an application's behavior when Windows Error Reporting(WER) terminates the application due to an unrecoverable error. For example, it enables an application to perform data recovery and cleanup operations such as capturing application state and releasing resources before termination. It also allows developers to specify that WER should automatically restart an application that it has terminated.

I hope they help you do the right thing when your application blows up or the machine reboots.

Kate

Thursday, March 17, 2011 7:38:55 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, March 15, 2011

You know I blog here a lot about Windows 7 goodies including taskbar integration. One of the questions I get pretty often is how to use tasks to communicate with the running app, such as changing your status, sending a new email, that sort of thing. I mentioned in an aside on another post that this requires launching some other application that communicates with the first instance.

If you'd like to do that, it just got a little easier with the release of a "recipe" from Microsoft that packages up this concept and lets you use it with very little extra code. As it says on the Code Gallery page for the recipe:

This Taskbar Single Instance Recipe allows developers to easily develop applications that use "Messenger Like" tasks that change the state of the currently running instance, allowing it to react to incoming state-change notifications and act accordingly.

This Recipe includes:

  • Native (C++) and managed (.NET) Source code for the Single Instance library
  • Well documented native (C++) and managed (.NET) samples
  • Documentation

To compile and run the recipe and samples the following items are required:

  • Microsoft Visual Studio 2010
  • Windows 7 – Note that only the samples require Windows 7. 

Yes, this recipe is actually two recipes - one native and one managed, and comes with whitepapers explaining how it's done. I mentioned this in my Tech Ed Europe talk on Advanced Windows 7 development and it's finally released for you to use! Enjoy!

Kate

Tuesday, March 15, 2011 7:18:48 PM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, March 13, 2011

Whenever new stuff appears in the Microsoft universe, native C++ developers can get to it first. That's because they can easily call Windows APIs or COM interfaces or however it's implemented. Managed developers need to wait until the new stuff gets added to the .NET Framework or to a particular managed technology, like WPF. Take taskbar integration, for example: adding tasks and destinations, getting a progress bar or icon overlay on your taskbar icon, and so on. From the very beginning you could interact with the taskbar from native code by making Windows API calls. The Code Pack is a popular managed wrapper from Microsoft that enables those interactions from managed code such as Windows Forms applications. In the early days of Windows 7, WPF developers also used the Code Pack - but now those capabilities are in WPF itself.

Does that mean that native developers get nothing new? On release day they gain the ability to call those APIs and that's that? Of course not. Native developers use frameworks and libraries to build their applications, and those frameworks and libraries in many cases are wrappers for Windows functionality. One of those is MFC and you should know that MFC has support for Windows 7 functionality.

If that's news to you, then watch my screencast on Channel 9 in which I cover jumplists and overlays with lots of demos. It's just one or two lines of code for each of these. Users expect their apps to behave like this. MFC makes it simple.

Kate

Sunday, March 13, 2011 6:58:23 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, March 09, 2011
I have two sessions in Atlanta:

DEV303 | Modern Native C++ Development for Maximum Productivity

Breakout Session  |  300 - Advanced  |  Developer Tools, Languages & Frameworks

C++0x, the next C++ standard, is almost upon us and it contains the most important updates to the language since the mid-90s. These new features bring more expressiveness and power to the native C++ developer. Microsoft Visual Studio 2010 has added support for some of these key features in order to enable these modern programming techniques. This session clarifies what features are in Microsoft Visual C++ 2010 and what is yet to come. It illustrates how new constructs such as lambda expressions enable better use of existing libraries and how your code can be simpler, safer and faster all at the same time. Also, see how simple it can be to implement concurrency in your application and how Visual C++ 2010 supports the difficult task of debugging parallelized code. If you are itching to show off how C++ is one of the coolest languages on the planet, this talk is for you!
 

DEV304 | Advanced Programming Patterns for Windows 7

Breakout Session  |  300 - Advanced  |  Developer Tools, Languages & Frameworks

Windows 7 development in managed code can be very simple, especially for those using the Windows API Code Pack. But there's more! Your integration with Windows 7 doesn't have to be limited to simple interactions with the new API. This session goes beyond the simple and into aspects of Windows 7 development that have in the past been left for you to explore on your own. See how to create a jumplist with a task that delivers a command to your application, as Messenger and Outlook do. Explore a simple and powerful recipe for connecting to Restart and Recovery with minimal effort. Discover how Trigger Started Services can reduce your power footprint while giving your users better responsiveness. Explore all that libraries have to offer beyond "File Open" and why using a library is a better approach than having a user setting for "save directory."

I'm looking forward to it. If you haven't registered yet, you should!

Kate

Wednesday, March 09, 2011 9:42:23 PM (Eastern Standard Time, UTC-05:00)  #    
# Monday, March 07, 2011

There are thousands of MVPs chosen by Microsoft for their contributions to technical communities. Eric Ligman says there are over 4,000 and I believe him. So of course nobody could choose a single "MVP of the year". There are several dozen this year, chosen from various technical areas and also for reasons that transcend a single technical area. I was delighted and honoured to be among them this year, and even more so to be joined by two of my fellow MVPs. To quote from an email telling us about it:

...the new 2010 C++ MVPs of the Year are

  • Kate Gregory, for her very active role in promoting modern C++ application development, being among top speakers in some prominent conferences. Kate was also selected by peers (you guys) as C++ MVP of the Year.
  • Marius Bancila – Ovidiu Cucu (shared), for the great job in CodExpert, their C++ community site (in Romanian language).
  • Sheng Jiang, one of the top answerers in our MSDN Forums.
Is that amazing company or what? We were invited to dinner with a number of MS executives and the other MVPs of theyear during the MVP Summit. Here's a picture of us with Diego, the Visual C++ Community PM:




It was a great evening and it was nice to see C++ well represented.

Kate
C++ | MVP
Monday, March 07, 2011 9:16:34 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, March 05, 2011

The pace of C++-relevant video releases on Channel 9 sure feels like it's increased. I watched a few recently (I download them and then watch them in my copious free time) and they happen to fit well with some links I've been carrying around for a while, meaning to share.

Let's start with Herb Sutter talking with Erik Meijer about C++ and whatever else they felt like talking about. The resulting Channel 9 video is a must-watch, and for once I didn't crank it to 1.5x or 2x speed as I usually do with video interviews. When they get into the part about deriving future<T> from T, you might want to pause it and go read Thomas Petchel's post on automatic type deduction. And during the lambdas-and-closures part, let me recommend a quite old post by Eric Lippert and a followup to it that discusses how these things work for C# and how it's a little different in C++.

Then another two-smart-people talk, with Mohsen Agsen and Craig Symonds. It's great to get the high-level perspective of the value of C++ to any software firm. I love that phrase, dark matter, and you may have heard it from me before. After you've watched that one, you need to go immediately to Tony Goodhew's interview where he puts some numbers out that will drop your jaw.

I know, I'm asking for like 2 hours of your life. Even if you don't develop in C++ any more, you should watch these three videos. You really should. Call it industry research if you like. And if you wish you knew a C++ developer, you do :-)

Kate

Saturday, March 05, 2011 11:49:44 AM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, February 27, 2011
Here's an interesting blog post. Say you use MFC and are wondering whether anything was added to it in a particular release. What tool would you use for that? How about CppDepend? If you've never used it, seeing how it provides the illustrations for this post should show you the appeal of it. Either way, you're going to learn something.

Kate

Sunday, February 27, 2011 10:11:52 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, February 25, 2011
Pete Brown is a WPF guy and I've learned a lot from him. Now I get to watch him learn. Recently he wanted to write an add-in for IE and he decided to do it in C++. You can see how he struggled through it and get some tips of your own in the detailed post he wrote about the experience. I agree with the commenter who said you should only run Visual Studio as admin when you know you're going to do a step (like registration) that requires elevation, and you should run non-elevated the rest of the time, and the one who tweaked the string code to take advantage of being in C++. If you have some tweaks of your own, stop by and add a comment.

Kate

Friday, February 25, 2011 6:20:58 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, February 15, 2011
Did you watch the whole "Introduction to STL" series on Channel 9? As I said when part 10 appeared, there is no universe in which this series is really introductory. So when I tell you that Stephan has now started an advanced series, you need to take it seriously. Here's how Charles entices and warns us:

This series, Advanced STL, will cover the gory details of the STL's implementation -> you will therefore need to be versed in the basics of STL, competent in C++ (of course), and able to pay attention! Stephan is a great teacher and we are so happy to have him on Channel 9, and C9 is the only place you'll find this level of technical detail regarding the internals of the STL. There are no books. There are no websites. This is Stephan taking us into what is uncharted territory for most of us, even those with a more advanced STL skill set.

Me, I'm enticed. And I'm watching. You should be too. (But watch the first ten first, or the minute you start to feel lost.)

Kate

Tuesday, February 15, 2011 8:52:02 PM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, February 13, 2011

I've written about "banned APIs" before - let's start with this link and if you read it, it has a link to a previous post, and go on and follow that link and it has a link to a previous post and so on and so on. To summarize, there are three ways to ensure you are not using banned APIs in your C++ app:

  • You can use the extension I blogged about. It highlights places in code you're editing or typing that calls a potentially unsafe function. That's great if you're typing fresh code,not so great if you just inherited a million lines of C++ and aren't sure if it's vulnerable to buffer overflow attacks.
  • You can compile with /W4, and deal with all the C4996 warnings (and use code analysis or code review or generally find the places that someone has suppressed that warning.)
  • You can include banned.h, which controls whether these unsafe functions are marked deprecated or not
None of that has changed. What I wanted to point out was a recent blog entry from the SDL team alerting us that banned.h has been updated, and I also spotted a video on TechNet (why a developer-focused thing is there I don't know) that shows it in action. If you write C++ code, you should be using one or more of these techniques.

Kate
Sunday, February 13, 2011 8:44:32 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, February 09, 2011
At the end of January, the busy bees at All-in-One (OK, they're not bees, they're Microsoft engineers) released even more samples including Azure, setting a hotkey that Windows will route to your app even if it doesn't have focus, detecting if the machine has been locked (with Windows+L) or unlocked, downloading multiple files with ftp, and many more. As always these are in VB, C#, and almost all of them are also in native C++.

In fact, there are just so darn many samples right now that it's getting harder to find the one you want. What a great problem to have! So they've released a sample browser to help you search and browse and generally get your hands on the code that will solve your problem and move you on to the next part of your day.

What are you waiting for? Go get it!

Kate

Wednesday, February 09, 2011 11:41:05 AM (Eastern Standard Time, UTC-05:00)  #    
# Monday, February 07, 2011
The architectural tools in Visual Studio Ultimate are fantastic. Often, people think they're just for for managed code, though. Not so! Here's a page on MSDN that shows how you can use Layer Validation to validate your architecture. You'll need the Modelling and Feature Pack and parts are a little fiddly, but it can be done!




No reason to assume the architecture tools are not for C++ developers, too.

Kate
Monday, February 07, 2011 11:08:49 AM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, February 05, 2011
Adding concurrency to an existing application can be remarkably simple. I have a demo where I change a for loop to a parallel for and -poof!- the app gets faster. The hard part of that demo is knowing that a given loop is ok to parallelize, that it doesn't matter what order things are done in as long as they all get done once. And, of course, knowing that the loop in question is responsible for your execution time. Making the right decision is the hard part - typing the code is easy.

With that in mind, you need advice about choosing your structures and algorithms. Here are some handy things that may help you. On the native parallel programming blog they will help you choose your parallel sort. And on the VC++ blog, it's all about the parallel containers. If you're going to write parallel code (and let's face it, eventually you will) you need to read this sort of thing.

Kate

Saturday, February 05, 2011 10:42:30 AM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, February 03, 2011
Here's a useful blog entry from Nish that shows how simple it can be to handle what at first seems an intractable problem - how to get an unmanaged array into a managed array. The marshaller doesn't know the size of the array, but as long as you pass the length as a parameter, you can create the array yourself and copy the contents over. Not hard at all, once you know.

Kate

Thursday, February 03, 2011 10:25:52 AM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, February 01, 2011

Like a lot of folks, I have a Windows Phone and I enjoy it a lot. I've filled it up with (free) games and they pass the time quickly when I have to wait in line or otherwise have an empty minute or two. C++ MVP Marius Bancila had the same experience, but unlike me he responded by writing a version of the game in MFC so he could play it on his own PC as well as on a phone.

You can get the source from his blog post, and another post and its comments (mostly in Romanian - Bing Translate is your friend there) have a nice discussion of performance issues. After all, whenever two or more C++ programmers gather together, someone is going to have an opinion about performance. Take a look for yourself!

Kate

Tuesday, February 01, 2011 6:45:11 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, January 28, 2011

Despite this rather famous xkcd comic, most developers would rather spend as little time compiling as possible:

But most of us how no clue why a build takes as long as it does, or how to make a project build faster. I mean sure a Clean and then a Rebuild will take longer than an incremental build. But beyond that, which is quicker - a debug build or a release build? Debug puts more information in, but it doesn't optimize - which wins? Does it make a difference if you keep Visual Studio up all day or if you close and re-open it from time to time? Are there options you can set that make your builds faster? All this and more is covered in remarkable detail in a new blog post from the Visual C++ team. You need to read it.

Kate

Friday, January 28, 2011 6:36:46 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, January 26, 2011
Not everyone knows that the Windows SDK includes a C++ compiler and linker that you can use if you don't have Visual Studio installed. Of course, Visual Studio Express is free, and you could use that to compile and link C++ apps. The advantage of using the tools that come with the SDK is that you don't have to install and configure a lot of stuff to get started. On a new machine that may appeal to you.

Gus Class has posted a super-quick 3 minute video that shows how to compile one of the SDK samples using only the tools that come with it. I just wanted to elaborate on one thing. The SDK installs, by default, under Program Files. As you probably know UAC prevents applications from writing to any folder under Program Files unless the application is elevated. That's why Gus launches an elevated command prompt in this video. If you don't want to elevate your command prompt, you'll need to move the sample folders and adjust your path accordingly.

Three minutes. Worth a watch. It's always good to have some tricks up your sleeve on a new machine.

Kate

Wednesday, January 26, 2011 6:25:57 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, January 22, 2011
The revisions to the C++ standard, headed to producing a new C++ standard which is still nicknamed C++0x, are proceeding at their stately pace, and will for months yet. But since a number of compilers are supporting more and more of the functionality and syntax, which are pretty much locked down now, we can adopt much of it today. (I don't know why some people are running around claiming that because the standard isn't released yet, no-one should be using any of it, but when you bump into such people, you can send them to me.)

I came across an interview with Bjarne Stroustrup, the father of C++, at CodeGuru. If you're wondering why the standard is so far behind schedule, what the very first C++ developer thinks about the very newest C++ developers (undergrad students), and how risk feels to a standards committee, then you will enjoy reading this, as I did. The lambda syntax on the first page isn't quite right, but you can fix that up if you need to. There are plenty of lambda examples here in my blog.

Give it a read!

Kate

Saturday, January 22, 2011 10:52:40 AM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, January 20, 2011
One of the things C++ developers have had for ages is a way to see a function's return value in the debugger, even if it isn't kept in a local variable. For example, see tip 29 in this list of Visual C++ tips for VC++ 6.0 - a product released 12 or 13 years ago! Managed developers would like this ability, too. Jared Parsons, from Technical Strategy Incubation, points to a set of requests, and explains why it appears that VB has it already. (And you thought VB6 legacy support wasn't going to help you!)

Take a look and see what you think. Would it be worth the possible performance hit?

Kate

Thursday, January 20, 2011 10:28:24 AM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, January 18, 2011
I don't think I ever linked to this Tech Ed Europe talk. Ale Contenti talked about Application Lifecycle Management (ALM) features for C++ developers. Now it's featured on the Visual C++ Blog. There are useful links in the comments, also.



I saw the talk live and I liked how personal Ale made it. If you wonder whether any large C++ projects rely on Team Foundation Server, you could hardly have a nicer example than this one!

Kate
Tuesday, January 18, 2011 10:10:32 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, January 12, 2011
Since midsummer I've been watching the "STL on STL" series accumulate on Channel 9. The lectures appeared as "part 1 of n", "part 2 of n" and so on until, in the bleak midwinter, part 10 of 10 appeared, so they must be done. Here are some links to them all:

There really isn't any universe in which the material this series covers can be called Introductory. When Stephan has finished introducing you to the STL, you will know an awful lot. And in this century, knowing the STL is a vital part of being a C++ developer. Many developers are scared of it: they think it's difficult and complicated. And to be honest, it can be. There's an awful lot going on and there is a lot to learn. Watching these videos, you can see how much Stephan LIKES this material, likes this library, and he's clearly not scared of it or trying to impress you with how difficult it is. He wants you to know all this. And if you follow along (and even do the homework!) you will catapult yourself forward in your STL knowledge and abilities. Take the time to do it, you won't regret it.

Kate

Wednesday, January 12, 2011 9:33:08 AM (Eastern Standard Time, UTC-05:00)  #    
# Monday, January 10, 2011

The Visual C++ team, in addition to tweeting and blogging regularly, is now accumulating a week's worth of links and stories at a time and publishing them at paper.li. If you don't compulsively check in to the C++ world every day, it can be a great way to stay in touch. Even if you do, you might discover a source you're weren't checking before. It's a little less obtrusive than other ways of sharing links, I think. Check out the C++ Weekly and the team blog post introducing it.

Kate

Monday, January 10, 2011 8:44:04 AM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, January 08, 2011
The voting is open at the Tech Ed site for you to express your preferences on possible sessions. My experience indicates that submissions not shown here can still end up being sessions, and certainly not all submissions shown here will be accepted, but obviously a strong interest from the public in a session will increase its chances of acceptance. With that in mind I thought I'd show you the results of a few searches.

First, C++:

These have orange plusses on them because I've added them to my preferences. You'll see a grey square you can click to add them to yours.

Next, Windows 7 development. Let's try Code Pack:

And finally the intersection of WPF and Windows 7 searches (I had to crop the shot by hand, there's no handy search that returns just these):


If you want to be sure that Tech Ed USA offers sessions you'd like to attend, the power is in your hands. (Disclaimer: some - but not all - of the submissions I am showing you here are my own.) Make your feelings known. And see you in Atlanta (I hope) in May!

Kate
Saturday, January 08, 2011 10:14:11 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, December 31, 2010
I was lucky enough to be part of a spirited email discussion recently on the topic of exceptions. And luckier still that Diego Dagum, the new C++ Community PM, has summarized it on the VC team blog. You should enjoy reading the "best practices" we worked our way around to, like:
Most MVPs agreed that, despite not being illegal in C++, throwing primitive types like int, long, etc., or similarly Windows-based ones like HRESULT, etc. is a coding horror as inabilities to catch those in the proper place will make the application crash with a hard post-investigation to determine where they are being originated.

Of course, we ended up talking about checked exceptions, one of the things I really hated about Java personally, and RAII which is a critical way of thinking if there are exceptions flying around your app. STL joins in with a comment that could be worth gold to someone dealing with SEH:

I strongly recommend AGAINST using the /EHa compiler option. Either /EHs or /EHsc should ALWAYS be used, with /EHsc being preferable (it's faster because it assumes that extern "C" functions won't emit exceptions - while technically permitted by the Standard, sane code should never attempt to do such a thing, so giving up that ability is worth the performance gain).

And I am sure the comments will continue to grow and the conversation continue. This is how we all get better, by discussing and sharing and occasionally defending our practices. It's a must-read.

Kate

Friday, December 31, 2010 8:01:25 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, December 21, 2010
According to Darryl Taft, the top languages for next year (and this may surprise you) are going to be Java, C, and C++. You're probably all ready to disagree, but understand the criteria:

... the workhorse languages such as C and C++ continue to remain at the top end of the software development landscape in terms of language use and job potential (despite growing more slowly and even decreasing, according to some sources). Moreover, this list is not intended to highlight the hot, hip new languages on the horizon, but to focus on where programmers can go to look for work.

There's a large body of work being done in languages that are not new, or hot, or trendy, but that have been around for long enough to develop a body of developers and libraries that enable getting things done. The volume of code that will not be ported to new and exciting languages, and will be maintained in its current language for years and decades, will always outweigh the volume of code that is being written from scratch right now or being ported. If you want a job, knowing an "old workhorse" language is a good thing.

Darryl profiles 18 languages in all: Java, C, C++, C#, JavaScript, Perl, PHP, VB, Python, Ruby, Objective-C, ActionScript, Groovy, Go, Scala, Erlang, Clojure, and F#. That is an awful lot of curly brackets, a very high placement for Objective-C given that it really does only one thing, and a fair dose of hot/new/trendy once you get past the top ten. Worth a read!

Kate


Tuesday, December 21, 2010 1:50:01 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, December 17, 2010
It's over 200 pages long, and over four years old, but I just heard about it recently. A long, dense discussion of whether certain C++ features (templates, namespaces, RTTI, etc) have a performance cost, and how to write code that incurs as little performance cost as possible. Its official name: ISO/IEC TR 18015:2006(E)  Technical Report on C++ Performance. In addition to runtime performance, it also touches on compile slowness, the "brittle base class" problem, and the different performance characteristics of various STL collections and algorithms. If you care about the speed of your C++ code, you should read this, even if some of it is already familiar to you.

I'd like to give some kind of "Restrained Understatement" award to this sentence:

Template meta-programming  and  expression  templates  are  not  techniques  for novice programmers, but an advanced practitioner can use them to good effect.
To be clear about where these authors are placing the "advanced" bar, I don't use meta-programming, I consider it too advanced for me. And I have 20+ years of C++!

The whole report is platform independent (though embedded systems are discussed separately) and compiler independent, too. I wish it were updated for C++0x, but I guess that will have to wait until C++0x is settled :-). There's a 14 page bibliography, and you would do well to read many of them, though my source for the link winkily pointed out another possible paper. That one is old enough to get a driver's license, but I think you might enjoy reading it anyway. As the introduction begins:

It is important to understand how your programming language is implemented. Such knowledge dispels the fear and wonder of “What on earth is the compiler doing here?”; imparts confidence to use the new features; and provides insight when debugging and learning other language features. It also gives a feel for the relative costs of different coding choices that is necessary to write the most efficient code day to day.
It's only 23 pages long, and concludes:
... we have considered many of the significant C++ run-time implementation issues. We see that some wonderful language features are almost free, and others can incur significant overhead. These implementation mechanisms are applied quietly for you, behind the curtains, so to speak, and it is often hard to tell what a piece of code costs when looking at it in isolation. The frugal coder is well advised to study the generated native code from time to time and question whether use of this or that particularly cool language feature is worth its overhead.
Good advice, in 1994 or 2010.

Kate

Friday, December 17, 2010 11:34:31 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, December 15, 2010
Those hardworking elves at the All in One Code Framework keep releasing more samples. They've added some ASP.NET samples (including a very interesting "get location from IP address" one) and some Windows 7 shell extensions, specifically a preview handler. Ah, the good old .recipe file type - an old friend of mine. But as always the samples are going to save you hours and hours of time.

Here's an index to all the samples for you to explore. You might be a little astonished if you haven't checked it out before, they have:
Slowly but surely the samples are accumulating to live up to the name. This should be the first place you look when you want to take on a new task. Generally speaking, everything is available in native C++, C#, and VB (the exceptions are things you can't do in native C++, like ASP.NET) with the language included in the sample name (look at CppWin7TriggerStartService, CSWin7TriggerStartService, and VBWin7TriggerStartService for example.) And remember, if you don't see what you want - you can ask for it!

Kate

Wednesday, December 15, 2010 10:57:52 AM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, December 11, 2010
Back on December 7th, Jason Zander announced the beta of Service Pack 1 for Visual Studio 2010. December announcements can often go un-noticed, but you should pay attention to this one. You can get the beta and start using it in production immediately.

What's in it, and why does a service pack matter, anyway? Well this one brings Silverlight 4 Tools for Visual Studio "into the box", updates some MFC capabilities, and fixes things people raised on Connect. (Remember, complaining about missing features or bugs to your cubicle mates may make you feel better, but raising them on Connect gets them fixed. I should know, I submit things there and they get fixed.) STL has a comment on the VCBlog post that spells out many of the fixes in detail.

Take a few minutes and update your Visual Studio, especially if you're a C++ developer, whether MFC or C++0x (or both, of course.)

Kate

Saturday, December 11, 2010 10:17:49 AM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, December 09, 2010

Herb Sutter has blogged a "trip report" (except he didn't travel, but anyway) about the November meeting of the C++ Standards Committee. In it, he tells us:

Things are going well and we are on track to complete the Final Draft International Standard (FDIS) for the C++0x standard after the Madrid meeting in March. If that happens and that ballot succeeds, the C++0x standard will be published in 2011.

There are still decisions being made, and I have to say I like the way they're going. I think contextual keywords are wicked smart, and that if compilers can understand them, developers sure can. Compare Herb's two examples:


class [[base_check]] Derived : public Base {
public:
virtual void f [[override]] ();
virtual double g [[final]] ( int );
virtual void h [[hiding]] ();
};
class Derived explicit : public Base {
public:
virtual void f () override;
virtual double g( int ) final;
virtual void h() new;
};

Contextual keywords make the second option possible, and I think it's much better. You can also read about noexcept and the whole exception-checking backstory, as well as rules for generating move constructors and move assignment operators. It's all good.

Kate

Thursday, December 09, 2010 1:24:29 PM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, December 05, 2010
I finally caught up some of my PDC-watching and really enjoyed this Herb Sutter talk on C++0x lambdas. I'm well known to be a huge lambda fan. Herb made this talk enjoyable for me by bringing his personality to the table. He showed aspects of C++ that are not exactly elegant, and how using lambdas can make some much neater code possible. Sure, lambdas are "just" syntactic sugar, but they add up to a new way of thinking about writing applications in C++. Well worth watching.

One warning though - I generally download videos and watch them at 1.5 or double speed. I highly doubt you want to do that with this talk - it's dense!

Kate

Sunday, December 05, 2010 11:59:12 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, December 03, 2010
Kenny Kerr is back in Canada and back writing about C++. Like a lot of us these days, he's looking at a stripped-down, more modern way to write Windows applications in C++ - no MFC, no ATL, no WTL. Plenty of STL and new C++0x features. I like it! Here's the first installment - stay tuned for the rest of them!

Kate

Friday, December 03, 2010 11:53:59 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, December 01, 2010
Lately there's been quite a lot of interest on programmers.se about interview questions, and specifically the "coding at the whiteboard" part of the interview. It came up in a discussion of FizzBuzz, in one about "testing" your whiteboard code, and in one about question 11 of the Joel test.

I ask candidates to code at the whiteboard. I ask an intensely simple question, because I am mostly testing for things other than the actual code the person writes. I know, however, that there are places that actually want you to tackle reasonably challenging problems. I came across this blog entry by Diego Dagum (who edits The Architecture Journal, writes architecture columns, and is committed to native C++big time) that walks you through a C++ whiteboard problem that is decidedly non-trivial. What I found interesting is that he starts his "thinking aloud" the same way I would, but then when I would start writing something that worked for valid input, he first started to set out examples of invalid input. And when he wrote the code, it starts by rejecting various categories of invalid input before processing anything. It's cool to see someone thinking differently from me.

One thing really struck me. He spends over a page on the signature of his method - why he called it rtoi, why it returns an unsigned int, why its argument is const, whether it should take a  unicode string or not, why an STL string and not a char*. See how much these problems reveal about a person? That kind of care and precision is not something you can discover by asking a person "how important is it to you that a method signature is chosen with care? Can you give me some examples of naming methods you have done?" Coding in a job interview is about so much more than syntax. Are you prepared for the whiteboard?

Kate

Wednesday, December 01, 2010 9:59:11 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, November 27, 2010
People say you can't get unit test support from Visual Studio for native code. That's not strictly true. Your tests will need to be managed code, but that doesn't mean the code you're testing needs to be.

As I hope you know, it's super easy to call native C++ code from C++/CLI - include the header, link to the lib. So here's the deal. Make yourself a lib that holds all the code you want to test. This can be completely native code, no problem. Build your UI (or your web services layer or your service or server or whatnot, I don't mean by UI an actual interface that a user clicks and types to, I just mean the part of your app that consumes your business logic) in native code if you like. Or in managed code, that's cool too. Then create a C++/CLI test project that includes the header for the logic, and links to the lib. There you go.

For the gory details including precisely what menu items to select and how to set up the project, John Socha-Leialoha has you covered. I love his conclusion:

After so many years writing in C#, I never thought I would enjoy C++ programming again. I was wrong. Using TDD to write C++ code is almost as nice as writing C# code, and I’m really enjoying the experience.

Kate

Saturday, November 27, 2010 2:20:05 PM (Eastern Standard Time, UTC-05:00)  #    
# Friday, November 19, 2010
One of my track chairs at Tech Ed Europe was Christian Binder. Christian always makes sure there is C++ content at Tech Ed Europe and this year he sat down with Ale Contenti to talk about Microsoft's commitment to C++, which is stronger than ever right now. You might be a little surprised to hear C++ called "the innovation language" but c'mon - if a new API is added to Windows, you can just use it right away from C++, but from some other languages you might have to wait for something to be released that will help you, right?

Christian blogged about the interview in German, but the interview itself is in English. Worth a listen!

Kate

Friday, November 19, 2010 4:48:05 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, November 13, 2010

Wow, these things get up there fast! My sessions were very well received and I had such a great time doing them! In the order I delivered them, they are:

  • Women In Technology Panel - Claudia Woods, Freena Eijffinger, Paula Januszkiewicz, and Rhonda Layfield joined me to take questions from the audience and talk about what was on everyone's mind. There's really no video - just the title slide for the whole hour. Please listen!
  • The Windows API Code Pack: Add Windows 7 Features to Your Application - This one includes screen capture so you can follow along in the demos. You can also download the powerpoints from this page, and as I mention in the talk, the demo code is the samples that come with the Code Pack.
  • Modern Programming with C++0x in Microsoft Visual C++ 2010 - I had a great time delivering this talk even though it was the first time I delivered this version of it. The attendees responded by putting the talk in the top ten for the whole conference - thankyou! It, too captures the screen and slides, and you can download the powerpoints.
  • Advanced Programming Patterns for Windows 7 - Another talk I was doing for the first time and I enjoyed it too. If you'd like the sample code, stay tuned - I will blog when the recipes are released. The slides are with the video of the screen and slides.

If you came in person, thank you! If you couldn't be there, please watch the videos and leave me a comment. Speaking on technical topics really is the most fun you can have standing up, and I can't do it without audiences.

Kate

Saturday, November 13, 2010 8:41:15 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, November 05, 2010

You may have noticed that the fall tour I'm doing features morning talks that go till about 11:30, and evening talks that start at 6pm. I've decided that between those two, I'll spend the afternoon in a coffee shop and host an "on the road coffee and code". As I explain on the Coffee and Code page I keep for this purpose, this is really informal. Just stop by, say hi, we can talk about whatever you like. If you were at the morning session, you might want to just walk with me from the venue to the coffee shop and continue the conversation. Or if you're coming to the evening session, you might want to try to find me during the afternoon to ask something specific, then head to the venue together. Or maybe you have a topic to discuss that has nothing to do with Building Awesome Windows 7 Applications in managed code: a C++ question, or an extending Visual Studio 2010 question, or whatever. That's great, and the Coffee and Code format is just the place for us to have that chat.

Levitating coffee cup from microsoft.ca/office  Ancient laptop from microsoft.ca/office

If you live or work near the venues for the fall tour, I'd appreciate your suggestions (by email or twitter) for where to hold these. Obviously we need wifi, power, and a table we can hog for most of the day. My default choice is Starbucks, but if you know a better one that I can easily walk to, please tell me about it. Once I've chosen the location I can finalize the times.

Looking forward to meeting everyone,

Kate

Friday, November 05, 2010 11:10:46 AM (Eastern Standard Time, UTC-05:00)  #    
# Monday, November 01, 2010

Here's something that happens to me a lot. I'm working on a project that is mostly Technology A, but I need a little Technology B. I want a sample or two to show me what it can do. I search the web, but often find mostly things written by people who don't know what they're doing and are posting their (possibly flawed) code into question-and-answer forums. I search MSDN, but often the newest technologies don't have their samples yet. I also remember to check if the All-in-One Framework people (I blogged about their coding standards document earlier) have anything. And if I still get nowhere I start asking people I know if they have one.

Well, now those helpful folks at All-in-One are kicking it up a notch. And remember, they cover all technologies and languages related to Microsoft tools. (Want to know more about them? Here's a fun video.)

And this goes back to one of my earliest blog posts - what you want may be what I need to give. Imagine it's your job to decide what samples to write. How are you ever going to find out what developers out in the big wide world want samples of? You could come up with a great idea and then find out people already had all the samples they needed for that. So that person wants ideas for samples. And here you are needing a sample. See how that works?

Just visit the wiki page and follow their instructions. It's a tad more complex than "shoot me an email and tell me what you need" and for good reason. Give it a whirl if there's something you need!

Kate

Monday, November 01, 2010 10:40:23 AM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, October 24, 2010
Hilo, the reference application project from the C++ team that doesn't use MFC or the .NET Framework, is back with another sample. You've seen nice graphics in the way photos are treated, a ribbon UI, and now you can see social media integration with Flickr uploads, touch support, and Windows 7 jumplist support. And remember, all the code is available for you to explore and learn from.



Take a look and see what you think. If you want to know how to build a modern UI and a modern set of functionalities (like web services) then this is the reference application for you.

Kate
Sunday, October 24, 2010 2:23:59 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, October 22, 2010
The wheels of the standards committee, I have said more than once, do grind slowly, but exceedingly fine. Apologies to probably Longfellow, though I might be mistaken. Anyway, progress continues on the next version of the standard and there are some details still to settle. Anthony Williams has written a nice summary of the October Mailing (in preparation for a November Meeting) along with some helpful links. He points out that generating move constructors (as compilers do today for copy constructors), as required by the Final Committee Draft (FCD) could break some existing code, so discussions are planned on restricting (or dropping) this implicit generation. I  like knowing that people are putting this level of thought into language changes instead of just issuing a Breaking Changes list and expecting me to go edit my code accordingly.

He also highlights situations where people are deliberately throwing exceptions from a destructor (gasp! I know!) and their working code will break unless they change it say they intend to throw exceptions from their destructor. You would think that this was a tiny population of people, and that marking their code in this way is no big deal, but C++ philosophy is that working code with defined behaviour should continue to be working code with defined behaviour in the latest version of the language. As you can see, that can really be a challenge sometimes.

If you're a C++ person, I challenge you to read the papers Anthony links to. If you can't understand a word of them, you're missing a lot of what C++ is these days. While talk of "implicit invariants", rvalues, and a "throwing move" may take some effort to decipher, I think it's worthwhile. C++ is a language in which performance and correctness are both paramount. That's why the developers are expected to manage lifetimes themselves, explicitly state whether they want shallow or deep copies, and so on. Template libraries simplify much of this (shared_ptr and unique_ptr are the death knell for the characters d-e-l-e-t-e in my code) but understanding those lifetime issues, understanding rvalues and lvalues, understanding when temporaries are created and deleted are all fundamental to being a C++ developer. Understanding those things lets you write better C++ code than you otherwise would. I know there are other languages in which your understanding doesn't matter because it is always done the same way. I also know that the control offered by C++ enables performance gains in specific situations where the developer knows better. These things can both be true at once, and can make other languages a better fit for certain developers or for certain business problems. They are also what makes C++ a better fit for some developers and some business problems. But if you don't have those understandings, if you don't want to control your application at that level, then why are you using C++? Use something simpler that can't be controlled the way C++ can.

For those who are using C++ "on purpose", who are "unrepentant" as I say in other of my talks, knowing the language at this level is key to being good at it. Would you say that "Implicit Move Must Go" or not?

Kate


Friday, October 22, 2010 1:52:41 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, October 16, 2010
Jennifer Marsman has built a very nice list of Windows 7 developer resources. Of course, she had me at Code Pack (the very first item she lists as a matter of fact), but she carries on, drilling into both native and managed scenarios, covering libraries, SDKs, training materials, UX guidelines, samples, blogs - even Twitter handles!

There is a LOT of material out there and it's a little bit fragmented. This is a great post to help you find your way around. Remember, if you have a Windows app, it should be a Windows 7 app!

Kate

Saturday, October 16, 2010 1:07:42 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, October 14, 2010
According to Wired, C++ was born October 14th, 1985, with the publication of the first official reference guide by Bjarne Stroustrup. That's 25 years ago! I've still been "working in C++ since before Microsoft had a C++ compiler", as I like to say at the start of any C++ sessions I deliver. While that is a long time, it's not the full 25 years the language has existed - not quite, anyway.

Wired marks the anniversary with an interview with Bjarne. If you're curious about what kind of computer he uses day to day (a small Windows laptop) or what music he likes to listen to, now you can find out. Or this advice for young programmers:

Know your fundamentals (algorithms, data structures, machine architecture, systems) and know several programming languages to the point where you can use them idiomatically.

I'd call that "simple but not easy", as much advice is. C++, of course, is neither simple nor easy, but it is incredibly rewarding to those who take the time to learn it and use it well, and I hope it will continue to do so for at least another 25 years.

Kate

Thursday, October 14, 2010 11:10:13 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, October 06, 2010

The Tech Ed Europe Session Catalog has been updated with my third talk. In the order they're happening, I have:

WCL322 - The Windows API Code Pack: Add Windows 7 Features to Your Application

DEV311 - Modern Programming with C++0x in Microsoft Visual C++ 2010

WCL329 - Advanced Programming Patterns for Windows 7

The first two I blogged earlier, but the third is new. Here's the abstract:

Windows 7 development in managed code can be very simple, especially for those using the Windows API Code Pack. But your integration with Windows 7 doesn't have to be limited to simple interactions with the new API. This session goes beyond the simple into aspects of Windows 7 development that have, in the past, been left for you to explore on your own. See how to create a jump list with a task that delivers a command to your application, as Messenger and Outlook do. Explore a simple and powerful recipe for connecting to Restart and Recovery, with minimal effort. Discover how Trigger Started Services can reduce your power footprint, while giving your users better responsiveness. Explore all that Libraries has to offer beyond "File Open", and learn why using a library is a better approach than having a user setting for "save directory."

It's going to be a great week!

Kate

PS: About the fourth item you might see under my name ... stay tuned! :-)

Wednesday, October 06, 2010 5:38:21 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, October 04, 2010

I started paying attention to "app compat" around the time Vista was in beta. It stands for Application Compatibility and refers to all the various techniques for ensuring that an application continues to work when it's moved to a new environment, such as from XP to Vista or to Windows 7. Some of these techniques involve changing the source code of the application and rebuilding it, but others don't. And paradoxically, in order to be good at those no-writing-code techniques it helps if you're really a good developer. It really helps if you have strong skills in areas that the .NET Framework generally hides away or abstracts from you.

There are folks whose job it is to solve app compat problems. It's the kind of job that really appeals to me, where you aren't exactly sure how things are going to go each day when you get up, and you think on your feet and react to what you find. And now there's an opening to be such a person if that interests you. Aaron Margosis writes:

The job is basically to figure out why applications that are important to the customer and that work on earlier versions of Windows (typically running as admin) no longer work on Windows 7, and then to get the apps to work correctly without reducing security posture and (typically) without seeing or touching source code. Don’t worry – we will teach you the tricks.If you enjoy problem solving on the Windows platform, you will love this job.

Interested? Have some experience writing Windows apps in native C++ or C? Know a little about how Windows works? Think that being handed unknown problems and asked to fix them is more fun than a regular job? Then read the blog post and apply!

Kate

Monday, October 04, 2010 5:29:10 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, September 16, 2010

It took a while for the session catalog to update online, but it's official now:

DEV311 - Modern Programming with C++0x in Microsoft Visual C++ 2010

Session Type: Breakout Session
Track: Developer Tools, Languages & Frameworks
Speaker(s): Kate Gregory
Why wait for the C++ committee to finish the specification when you can enjoy much of the power of C++0x today! C++0x, the next C++ standard, is almost upon us and it contains the most important updates to the language since the mid-90s. It even accepts the existence of multiple threads for the first time in the history of the language. Needless to say, these new features bring more expressiveness and power to the native C++ developer. Visual Studio 2010 has added support for some of these key features in order to enable these modern programming techniques. This session clarifies what features are in Visual C++ 2010 and what is yet to come. It illustrates how new constructs such as lambda expressions enable better use of existing libraries and how your code can be simpler, safer and faster all at the same time. If you are itching to show off how C++ is one of the coolest languages on the planet, this talk is for you!

WCL322 - The Windows API Code Pack: Add Windows 7 Features to Your Application

Session Type: Breakout Session
Track: Windows Client
Speaker(s):Kate Gregory
Accessing new Windows 7 features is a challenge from managed (.NET) code. The level of interoperability required is out of reach for many developers. The Windows API Code Pack for the Microsoft .NET Framework is a sample library you can use in your own projects today that provides access to new user interface features (taskbar jumplists, libraries, sensor platform and more) as well as "behind the scenes" features that make your applications more aware and responsive (restart and recovery, power management and more.) Discover a shortcut to Windows 7 development for Microsoft Visual Basic and Visual C# programmers and get started today.

I've done talks with these titles and abstracts before, but I'm not repeating those this time. I'm rejigging the demos pretty substantially and generally rewriting the talks. Register now, and I hope to see you there!

Kate

Thursday, September 16, 2010 11:19:56 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, September 10, 2010

Intel and Microsoft are offering free training:

Learn directly from Intel and Microsoft when you attend this free one-day course on parallelism and threading. This is a great opportunity learn about threading your applications for multi-core platforms. This course is targeted for Windows* C++ developers using Microsoft Visual Studio*.

The performance benefits of application parallelism on modern computing platforms will come from threading software. Learn how to develop software that utilizes many cores! Familiarity with threads is helpful, but not required (target is beginning- to intermediate-experience with threads, experts would not benefit as much from this course). 

They are going to cover concepts of parallelism plus instructor-led demos of Intel Parallel Advisor, Microsoft PPL, and Visual Studio 2010.

Sound good? The dates are coming up soon:

  • 20-Sept-2010 Montreal
  • 22-Sept-2010 Chicago
  • 28-Sept-2010 San Francisco
  • 29-Sept-2010 Seattle / Bellevue
Register as soon as you can!

Kate
Friday, September 10, 2010 9:29:16 AM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, August 29, 2010
I somehow missed this John Robbins blog post from back in May. He calls out an excellent presentation on writing data structure visualizers presented at BoostCon 2010. Here's the title slide:



Oh yes, this is a fun talk. I wish I had a recording, but the slides alone are entertaining and useful. I am already planning to put some of this code into practice, and I must find time to check the other talks, too. The links are in John's blog post.

Kate
Sunday, August 29, 2010 5:43:29 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, August 25, 2010

I mentioned Hilo when it was first released. This is a cool project doing Windows 7 development in native C++ with no frameworks - not MFC, for example - so you can really see just how it is done. It's not just code, it's also a walkthrough of their design thoughts, and explanation of that code.

The next application, Hilo Annotator, is ready. It features a ribbon, it uses the Windows Imaging Component, Direct2D, and so on. While you probably don't need an image annotator, you may find the code useful in your own applications. And remember, this is all native C++ code.

Your best place to start is the Visual C++ Team Blog entry about it. It's rich in links and has a nice screenshot too.

Kate

Wednesday, August 25, 2010 3:38:57 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, August 23, 2010

Have you ever heard of the All-in-One Framework? Well I hadn't. They've been around for about 18 months. Back in February, on their first anniversary, they described themselves like this:

...this initiative [has been] developed by the CodeFx Project Group to an "all-in-one code framework" that includes more than 300 code samples, covers almost all Microsoft development technologies, ranks 18th among 13000 open source projects on CodePlex, received numerous kudos from customers, proved its values in real support incidents, and created a lot of win-win opportunities within the corporation.

It looks like the participants are all Microsoft employees and they're collecting pieces of code for any language and platform that can be used to solve real world problems. On the CodePlex site, they elaborate:

Microsoft All-In-One Code Framework delineates the framework and skeleton of Microsoft development techniques through typical sample codes in three popular programming languages (Visual C#, VB.NET, Visual C++). Each sample is elaborately selected, composed, and documented to demonstrate one frequently-asked, tested or used coding scenario based on our support experience in MSDN newsgroups and forums. If you are a software developer, you can fill the skeleton with blood, muscle and soul. If you are a software tester or a support engineer like us, you may extend the sample codes a little to fit your specific test scenario or refer your customer to this project if the customer's question coincides with what we collected.

For example, they've written a summary of the ways to call native C++ code from managed code. You can find the pieces elsewhere, but having them all together makes it easier for you to compare and contrast. They often blog additions as they are completed.

Now as you can imagine, a big team creating hundreds of samples needs some sort of vision and structure to keep things consistent. That's where the style guide comes in. And now you can download it from CodePlex. It's an 87 page Word document that covers everything you might wonder about, for both native and managed code, including tabs-vs-spaces (no tabs, please), how much to comment (as I blogged recently and not so recently), Hungarian Notation (use it in native code if you must, but it's a relic; do not use it in managed code), smart pointers (yes, but don't bring in all of ATL for them - I look forward to this section being updated for C++0x), the right way to implement IDisposable, and an especially nice section on Interop at the end.

I don't care what language you work in - this is a document you should at least skim. It could settle some arguments at the office, improve your code, and spare you from some horrible bugs. Download it, won't you?

Kate

Monday, August 23, 2010 3:26:16 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, August 07, 2010
I got a call this week from a recruiter who is trying to find senior C++ developers for a firm with a growing need. He has placed people with them in the past and it's worked out well and they want more. They write performance-sensitive applications for the financial industry and need someone who's comfortable with templates, and has experience with applications that process high volumes of data. If you're interested, drop me an email and I'll forward it to him for you. Good luck!

Kate

Saturday, August 07, 2010 12:46:31 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, July 16, 2010

I've had a chance to watch a number of the videos from the Windows Summit - an online event to help you with Windows development of all kinds. You can learn more about it and register at the main summit site, or check the lists of sessions for developers. The only trick is that once you've registered, you need to go to a different site to actually watch the sessions. Once you know that (and there is a link on the main site) you're all set.

I've been getting "Windows 7 for Developers" training since before the first public beta, so I had seen a lot of this before. But several sessions were noticeable improvements from the way that material had been covered in the past, and none of them were poorly done, so I recommend this as a way to learn the concepts that are important to anyone writing for Windows 7, and to learn the advantages that Windows 7 can offer to you as a developer and to your users.

I saw three different approaches to code in the sessions I watched:

  • Full on demos with Visual Studio involved
  • Code on the PowerPoint slides, and links to resources that include code demos
  • Mention the name of the API but don't show how to use it
I also saw a mix of native and managed code, with some sessions going all the way to the native side of the spectrum and some all the way to the managed side. Most of the sessions mentioned the Code Pack, of course, and call out a link to it in their resources.

Even if you know all about the taskbar, maybe you could learn about power management, or background services, using sensors, or writing location aware applications? It's really worth taking a look around.

Kate

Friday, July 16, 2010 1:46:01 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, June 26, 2010
If you use the Microsoft Visual C++ debugger, the team would like to hear from you. They have a quick (6 questions!) survey they would like you to take. Here's the survey, and the team's post about it, if you'd like to leave them a comment.

Kate

Saturday, June 26, 2010 7:25:31 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, June 16, 2010
I've written about banned APIs before - for security reasons some C Runtime functions like strcpy should not be used, and instead you should use replacements like strcpy_s that perform some checking before trusting the strings they're handed. You might also know that I really like the extension capabilities in Visual Studio 2010.

So how can I resist a Visual Studio extension that gives you wigglies if you use a banned API?


You even get a handy tooltip suggesting replacements. This is a must-install for any C++ developer. You can get zip of the source (you'll need the Visual Studio 2010 SDK to build it) with a prebuilt VSIX in it from the Security Development Lifecycle blog. It doesn't seem to be on the Visual Studio Gallery yet, but it should be! If you haven't met the VSIX format yet, prepare to be pleasantly surprised - it's a self contained one step installation vehicle for a Visual Studio extension. Just double click it and Visual Studio does the rest.

Kate
Wednesday, June 16, 2010 12:03:40 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, June 10, 2010

Another terrific Tech Ed has come to a close. I never really got used to the weather in New Orleans, but I loved the food, I loved that we could walk to just about every dinner or party, and I loved the locals I met. I would have liked a little less walking within the convention centre itself - that building is a mile long and I had to go the whole length and back several times each day!

I have a few pictures from inside for you.

This is the "RD couch" in the community area. Good for hanging out while waiting to be on Channel 9. As you can see, non-RDs were hanging out here too.

The table for the Code Pack was giving away copies of the Code Pack on these slightly bizarre USB keys. I meant to keep one for myself but got carried away handing them out at my session (along with cards for a free trial of the Pluralsight On Demand! library). Also the shot-glass-on-a-string-of-beads is pretty brilliant for New Orleans swag. "Give it a shot!" they say.

This is the room for my C++ talk. That's Juval Lowy, who spoke right before me, up on stage. You can see he did a pretty good job of filling the room, which holds 1000. I got somewhat less than that, but was happy with the turnout and the evals for the C++ talk. Both my talks are available online already, by the way, which is astonishingly quick.

I love the "face time" with Microsoft people (including "my" product teams as well as folks in marketing, developer outreach and education, and so on), with my fellow RDs, MVPs, INETA folks, and speakers of all stripes, and with attendees. Booth duty, where you spend long minutes shifting your weight from foot to foot praying someone will come by, is a bit like of box of chocolates. An eager attendee comes forward, meets your eye, smiles ... for every "can you tell me where to find the blinky Windows 7 pen?" there is a good solid question or expression of interest in my actual technology. I got one question on Wednesday from someone who just wanted to know what booth to go to for it to be answered, only to learn it was this booth and that in fact I was probably the only person in building who could have answered it. I sure liked that one!

Next year, Atlanta:

But I may not have to wait a year for another Tech Ed experience. :-)

Kate

Thursday, June 10, 2010 10:09:42 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, June 02, 2010
I posted a quick hit on MFC and Windows 7 back in April, mentioning the ribbon and showing you how simple icon overlays and jump lists are. Now Marian Luparu has a nice long article in Visual Studio Magazine. He covers tabbed thumbnails, the ribbon, multi-touch, jump lists, and shell integration for your own thumbnails, preview, and search integration. Then he manages to mention graphics and animation APIs and parallelization. Can't argue with his conclusion:

Overall, Windows 7 is an exciting release for developers. With thousands of new Windows APIs made available to native coders, Windows 7 provides an enhanced experience for desktop applications.Visual Studio 2010 is the IDE of choice to take advantage of the Windows 7 platform. With enhancements in MFC and the ATL and the addition of new IDE Designers and Wizards, Visual C++ 2010 gives you the opportunity to be on the cutting edge in terms of leveraging OS functionality.

Check it out!

Kate



Wednesday, June 02, 2010 2:09:59 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, May 27, 2010

Update: fixed the link. Thanks, Hanako Izumi.

C++0x is finally becoming real to me. I started demoing some C++0x features over a year ago; but now here is Visual C++ 2010 and it's just packed full of goodness. Does it have everything? No. Does any compiler? Good question.

Here is a handy table from the C++ team about what Visual C++ 2010 supports. The MSDN blog redesign seems to have borked the table a little, but the colours should probably be all you need if you know that the last column is VC10. Use View Source if you must know more. Scott Meyers keeps a spreadsheet, and is nice enough to export it out to the public web, covering gcc and VC, with handy links to more details on the features or a substitute (usually something from Boost) you can use if it's not there. He has plenty of helpful links on the cover page, too. There's also a wiki with less detail, but covering more compilers.

If you're wondering about the state of the standard, and whether x is going to end up being A, B, or C, your best bet is to read Herb Sutter's blog. He posted when the Final Committee Draft (FCD) was text-complete, and a pointer to how anyone can comment on it if they wish to.

If you haven't been paying attention, now's the time to catch up!

Kate

Thursday, May 27, 2010 1:39:39 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, May 21, 2010

The C++ team gave me a heads up about a neat new initiative called Hilo. Here's a quick description:

“Hilo” is a series of articles and sample applications that show how you can leverage the power of Windows 7, Visual Studio 2010, and Visual C++ to build high performance, responsive rich client applications. Hilo provides both source code and the written guidance that will help you design and develop compelling, touch-enabled Windows applications of your own.

The articles are on MSDN - the first is there now - and the code is on Code Gallery.

I like this section from the article:

The rich user experience of Windows 7 is best accessed through a powerful, flexible language, and that means C++: by using C++ you can access the raw power of the APIs for Windows 7. To build the Hilo sample applications, all you need is Visual C++ Express and the Windows SDK for Windows 7, both of which are available as free downloads.

Hilo applications show how to design and develop an application for Windows 7. But while the code showcases the APIs for Windows 7, it is not wedded to any particular application framework. Instead, Hilo implement a lightweight common application layer that directly uses and highlights the APIs rather than obscuring them. This common application layer is used to support all of the Hilo applications. It illustrates the best practices for developing Windows applications, and while it is not complete—it was designed simply to provide the features needed by the Hilo applications—it does show the best practices used in designing re-usable frameworks and can be extended to provide additional features.

Looking forward to reading more!

Kate


Friday, May 21, 2010 10:52:48 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, May 19, 2010

A colleague of mine who is not near Toronto has a client in Toronto who needs .NET developers. They would like to start out with a contract position and it could become permanent if it's a good fit for everyone. Here's the job description:

Position: Senior Programmer / Analyst

Pay: $7,500 per month contract (negotiable)

Applicant must be an expert or proficient in:

  • MFC
  • ATL
  • COM
  • .NET Framework  /  C#
  • .NET Services
  • Microsoft SQL Programming

Experience in the following areas would be helpful but not required:

  • WCF
  • WPF/SilverLight
  • ASP.NET
  • Visual SourceSafe
  • Mechanical engineering experience

Responsibilities:

The primary responsibility is to modernize a legacy C++ distributed application. This may include a redesign and possible rearchitect of the application. The final application should be an n-tiered application. The tiers would ideally be:

  • WPF/Silverlight  as the presentation layer
  • A business layer with business components (C#) exposed via WCF
  • A data layer

Where necessary, COM components can be preserved.

Other responsibilities include:

  • Move image files from file database to SQL database
  • Document the application
  • Handle ongoing change requests.

Someone who moved from C++ to C# but didn't forget their C++ would be perfect. They are looking for more than one person so it sounds like a fairly meaty project. This is strictly onsite work, no remote work, which is why I mentioned where they are (east of the DVP; west of Pickering.)

Anything you email to me about this I will forward to my colleague who will in turn forward it to the Toronto folks. Good luck!

Kate

Wednesday, May 19, 2010 4:19:23 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, May 13, 2010

Stack Overflow is an amazing resource. It's a place to ask questions and get them answered, but it's a lot more than that. Like any other online community, people get to know each other and some of them start to relax and have fun. In that spirit came the question "What is, in your opinion, the most surprising, weird, strange or really "WTF" language feature you have encountered?" with over two hundred answers. The current highest-voted answer is how C++ is fine with:

10[a]

(for some array a) and it just means the same as

a[10]

I also like the Javascript answer, in which a commenter points out that "111" - -"222" gives 333 and "111" + "222" gives "111222". And another answer I blogged about eighteen months ago. You could spend far too long reading all these and laughing.

Kate

Thursday, May 13, 2010 8:36:27 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, May 07, 2010

Jani Jarvinen (a Finnish C# MVP) wrote a nice article about using sensors with Windows 7. He mixes and matches .NET 4.0 and Code Pack capabilities, and has links to plenty more information. I like the screenshots and the step by step approach. Windows 7 really does make this so much easier than it used to be. He gets you started with both an ambient light detector and some simple location code.

A little more exotic approach comes from "gleat" who has a Code Project article using a Wiimote as the accelerometer. He starts out simple - here's how to download and install the driver - and then goes into writing a client in C#, leveraging Code Pack of course. But then he says hey, were you wondering how to write a driver? and wham! you're hip deep in C++. It's all well explained, though, so if you want to learn more about this, what a terrific way to start.

If all of this is making you wish you had Windows 7 somewhere to play with, but you don't want to buy it, don't have an MSDN subscription, don't qualify for BizSpark etc, then what you need is a free 90 day evaluation of Windows 7, right? I found that link on this handy Doug Turnure blog post from earlier this year that includes some video links I hadn't seen before. Have fun!

Kate

Friday, May 07, 2010 12:14:02 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, May 05, 2010

I was just looking up the session codes for my Tech Ed talks next month (my flight to New Orleans leaves a month today, at about this time actually) and spotted something unexpected:

DEV316 | Modern Programming with C++0x in Microsoft Visual C++ 2010
Session Type: Breakout Session

Track: Developer Tools, Languages & Frameworks
Speaker(s): Kate Gregory
Level: 300 - Advanced
Why wait for the C++ committee to finish the specification when you can enjoy much of the power of C++0x today! C++0x, the next C++ standard, is almost upon us and it contains the most important updates to the language since the mid-90s. It even accepts the existence of multiple threads for the first time in the history of the language. Needless to say, these new features bring more expressiveness and power to the native C++ developer. Visual Studio 2010 has added support for some of these key features in order to enable these modern programming techniques. This session clarifies what features are in Visual C++ 2010 and what is yet to come. It illustrates how new constructs such as lambda expressions enable better use of existing libraries and how your code can be simpler, safer, and faster all at the same time. If you are itching to show off how C++ is one of the coolest languages on the planet, this talk is for you!

WCL316 | The Windows API Code Pack: Add Windows 7 Features to Your Application
Session Type: Breakout Session
Track: Windows Client
Speaker(s): Kate Gregory
Level: 300 - Advanced
Accessing new Windows 7 features is a challenge from managed (.NET) code. The level of interoperability required is out of reach for many developers. The Windows API Code Pack for the Microsoft .NET Framework is a sample library you can use in your own projects today that provides access to new user interface features (taskbar jumplists, libraries, sensor platform, and more) as well as "behind the scenes" features that make your applications more aware and responsive (restart and recovery, power management, and more.) Discover a shortcut to Windows 7 development for Microsoft Visual Basic and Visual C# programmers and get started today.

The first digit carries meaning, but the last two don't. So I don't really know how they both got to be 316. Since I often have trouble remembering my session codes, this should halve the effort for me :-).

Kate

PS: I checked whether the Brian rule still applies. You can too, by just dropping down the "Speaker" box on the session catalog page. I'm happy to report there are 9 Brians and I reached 9 obviously female names (ignoring Alex, Chris etc) while I was still in the C's. Good news, in my opinion!

Wednesday, May 05, 2010 1:54:51 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, May 01, 2010

On Thursday night I was the surprise mystery guest for the St Louis installment of the .NET Rocks Roadtrip. What a fun little jaunt that was! We recorded an episode of .NET Rocks, (talking about Windows 7, C++, and educating developers) then Carl and Richard both did very interesting presentations. I had seen parts of Richard's before, but Carl's was all new to me and I will just say if you live in the half of the roadtrip that hasn't happened yet, you really need to make an effort to be there and be part of it!

Here's a blog entry by Nicholas Cloud, and another by Brian Williams, and a picture by fallenprogrammer of us getting set up.

The next morning featured breakfast at Cracker Barrel (an experience) and then a ride to the airport in the RV for me and Kindler Chase, who had joined them in Tulsa, before they headed Chicago-wards. It sure was fun to be part of it!

Kate

Saturday, May 01, 2010 8:22:11 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, April 27, 2010

MFC had some Windows 7 support starting with the release in between Visual Studio 2008 and Visual Studio 2010. There was a ribbon, for example, though there was no designer. In Visual Studio 2010 there is a ribbon designer, very nice, and tons of UI fun as well. In this post I'd like to focus on some MFC support for taskbar interactions. Any idea what these two lines of code do?

HICON i = LoadIcon(NULL,IDI_WARNING);
SetTaskbarOverlayIcon(i,L"Warning");

Here's the visual evidence:

Yep, you load an icon and then you set it as an overlay icon on your taskbar. Nice and simple.

How about this:

m_jumplist.InitializeList();
m_jumplist.AddTask(L"http://images.bing.com",L"",L"Bing",L"",0);
m_jumplist.CommitList();

You need to know that m_jumplist is a member variable of type CJumpList - a new type in MFC. Here's what that code causes:

This is remarkably little code to be all up to date and modern, isn't it?

If you want more info on C++ and Visual Studio 2010, here's a nice article by Sumit Kumar and a Channel 9 talk with Pat Brenner. Enjoy!

Kate

Tuesday, April 27, 2010 11:28:09 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, April 23, 2010

I like to introduce myself, in C++ circles, by mentioning I was using C++ before Microsoft had a C++ compiler. It's often interesting to watch people try to handle the concepts behind the sentence - mostly, that for some languages you can buy compilers from more than one vendor. And once upon a time, C++ existed as a language, and Microsoft sold compilers, but it didn't have a C++ one yet. Then eventually (OK, in 1992) the C product Microsoft sold became a C/C++ product (compiler, linker, debugger etc) and then the next year Visual Studio came along and with it Visual C++. And Visual C++ 1 included the Microsoft Foundation Classes 2, so that for a while the version numbers of Visual C++ and MFC were out of sync. Eventually there was a version skip to catch up (there was no Visual Studio 3). For quite a while we all worked with Visual C++ 1.52c and every speck of that version number was significant. So as you can see, the version of a product is not a simple question with one answer.

So, here we are, welcoming Visual Studio 2010. Lots of people called it Dev10 while it was under construction. But was the 10 short for 2010? It was not. It was just 10, as in the number after 9. Visual Studio 2008 was 9, and Visual Studio 2005 was 8. You can see these numbers on the shortcuts to your sln files, by the way:

OK,so VC8 means Visual C++ 2005? Basically. As long as you realize that it doesn't mean version 8 of the compiler. Because the C compiler transitioned into the C/C++ compiler, the version numbers came with it. VC8 includes version 14 of the compiler. Confused yet? If so, you're in good company. Here's a tabular explanation, though it only goes back a decade. You want more details? Wikipedia has them, of course. Me, I am going to enjoy Dev10 and watch for news of Dev11.

Kate

Friday, April 23, 2010 9:08:34 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, April 13, 2010

Is it a good omen when mornings start out beautiful? I think it might be:

Normally, when I go to a conference, the first day is a little slow. I might go to the keynote, or I might not. If I do, I wander in to the back row 5 minutes before it starts (hey, I'm leaving plenty of seats for the paying attendees) with my coffee in my hand. So reaching the keynote room at 7am, full of pep and vigour, was fun!

I really liked the story the keynote demos told. If you haven't seen it yet, it's available online. The demos start with simple productivity boosts like multi-monitor support, Intellisense for Javascript, and so on, then move to some amazing C++ updates including Windows 7 support (yes, the demo went boom, but if you watch closely you'll see it was just that the app was still running, preventing a successful rebuild.) Then you see "SharePoint F5", a huge pain-saver for anyone, like me, who does SharePoint development. Over a dozen manual steps done for you when you press F5, and you can run SharePoint right on your laptop. But they're not done yet -- here comes an Azure demo with the Windows Phone 7 emulator and a real phone, and then Team Foundation Server and a ton of exciting new Application Lifecycle Management features in Visual Studio including (no kidding) time travel. Wow! I hope you all enjoyed it as much from the seats as I did from backstage.

No sooner was the keynote over than I was headed for the Channel 9 stage to record half an hour of Q&A with Twitter people.

That's available online too. And if you want more, some of the sessions are appearing on Channel 9, too. Not filmed on site, but the content matches. Get your Visual Studio 2010 from MSDN downloads, or if you're not a subscriber you can take the Professional Edition for a test drive.

Kate

Tuesday, April 13, 2010 11:38:04 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, April 09, 2010

This trip to the launch gets more exciting by the minute! Check this out:

The Channel 9 team will be broadcasting live, unscripted, and 100% interactive from DevConnections 2010 in Las Vegas as part of the Visual Studio 2010 and Silverlight 4 launches.

Join us Monday April 12th, from 8AM (PST) for Bob Muglia's VS2010 Launch keynote then stay tuned for more than seven hours worth of Visual Studio 2010-themed demos, interviews and panel discussions on Channel 9 Live.

. . .

Day 1 Schedule April 12th 2010 (Pacific time)

8:00 AM DevConnections 2010 Day 1 Keynote.

10:00 AM Welcome to VS2010: Doug Handler and Brian Randell with Dan Fernandez.   

10:30 AM Live Q&A with Bob Muglia, President Server & Tools Division with Dan Fernandez.

11:00 AM VS2010: Native Code. Kate Gregory and Richard Campbell with Charles Torre.   

11:30 AM VS2010: Managed Code. Lisa Feigenbaum, Tim Ng Dustin Campbell with Charles Torre.

. . . then some other people, who I love, but I can't paste it all in here. . .

To be part of it, use Twitter with @ch9live somewhere in your message. We'll see it and that's all it takes to join the conversation!

I count 11 Regional Directors (many of whom are also MVPs) on the guest list. What a way to spend the day!

Kate

Friday, April 09, 2010 11:27:02 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, April 05, 2010

I am so looking forward to seeing New Orleans for the first time. I am pretty sure this is my tenth Tech Ed North America. I have two sessions, one for native C++ developers and one for managed developers who want to use Windows 7 features. No surprise if you read my blog regularly, I suppose.

The C++ talk is called Modern Programming with C++0x in Microsoft Visual C++ 2010 and the abstract reads:

Why wait for the C++ committee to finish the specification when you can enjoy much of the power of C++0x today! C++0x, the next C++ standard, is almost upon us and it contains the most important updates to the language since the mid-90s. It even accepts the existence of multiple threads for the first time in the history of the language. Needless to say, these new features bring more expressiveness and power to the native C++ developer. Visual Studio 2010 has added support for some of these key features in order to enable these modern programming techniques. This session clarifies what features are in Visual C++ 2010 and what is yet to come. It illustrates how new constructs such as lambda expressions enable better use of existing libraries and how your code can be simpler, safer, and faster all at the same time. If you are itching to show off how C++ is one of the coolest languages on the planet, this talk is for you!

The Windows 7 one is The Windows API Code Pack: Add Windows 7 Features to Your Application and the abstract is:

Accessing new Windows 7 features is a challenge from managed (.NET) code. The level of interoperability required is out of reach for many developers. The Windows API Code Pack for the Microsoft .NET Framework is a sample library you can use in your own projects today that provides access to new user interface features (taskbar jumplists, libraries, sensor platform, and more) as well as "behind the scenes" features that make your applications more aware and responsive (restart and recovery, power management, and more.) Discover a shortcut to Windows 7 development for Microsoft Visual Basic and Visual C# programmers and get started today.

Registration is open, so plan to be there!

Kate

Monday, April 05, 2010 11:13:40 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, April 01, 2010
C++ developers generally care a lot about how fast their code runs. In many cases that's the reason they wrote the application in C++. Every release of C++ development tools (compiler, optimizer, linker etc) typically has some effort invested in producing code that runs faster, even if that means the tool itself runs slower. It's tempting to think that the gains would have levelled off by now - after all, C++ has been around for a very long time. But a recent post by Lin Xu of the C++ team shows how you can take you 2008 project and rebuild it in 2010 (using the right options of course) to see up to a 16% speed increase with no code changes by you. Lin also discusses the extent to which this will slow your build process.

Visual Studio 2010 and Visual C++ have a TON of important new features for native developers, which I'll cover shortly. But let's just start with this one - faster applications - for the moment.

Kate

Thursday, April 01, 2010 5:58:13 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, March 24, 2010
Today is Ada Lovelace Day, a day to celebrate the women of software. I've blogged about it before, and it seems like a good springboard to get started again. There's a nice post over on Toronto Girl Geek Dinners, too. I have been trying to go to an event there for at least 6 months, maybe a year - seems it's always on a day I'm out of town or otherwise unavailable. April 5th might work out - I hope it does.

What have I been doing for the last almost-4-months? Working hard. Speaking, mostly on Windows 7 things. Planning future speaking gigs. Writing code - real code - in VB, C#, and yes, C++. Some using STL and some using MFC as it happens. Project managing, which can be many times more satisfying than coding but also many times more frustrating. Tweeting (yes, I did - and I tweet personal stuff as much as technical stuff so if you don't care for that you don't need to feel obliged to follow me.) Publishing videos. All of these things will get blog posts of their own over the next little while.

Stay tuned!

Kate

Wednesday, March 24, 2010 8:46:38 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, November 10, 2009

Yesterday was the first day of Tech Ed. I went to Marian Luparu's talk on Visual C++ 2010. He did mostly demo, and showed a ton of hot new C++ features.

If you missed this one (it was the very first talk of the conference) be sure to look for the recording.

After lunch I headed out to be part of the anniversary celebrations. Despite the rain, it was a great outing, and the crowds were very orderly. I had a bratwurst and took a few pictures:

No place I'd rather be.

Kate

Tuesday, November 10, 2009 7:04:25 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, October 21, 2009

I remember, back in the day(*), being so confused about NULL. At first I thought it was a keyword, a special value of some kind. Then I learned it was just the same as 0. Or maybe 0L. I worked with people who said it was wicked to use it, and you should always type the 0 yourself. I worked with people who said it was wicked not to use it, because it made your intentions clear to humans. I even worked with people who used it in for things other than pointer-setting or pointer-checking. I argued with people who thought if(p) was or was not more clear than if (p != NULL) and, late at night when we'd been drinking, about what would happen if some other value than numerically zero meant "null pointer" and what that would do to the world's code, and how to write our code so that could never hurt us.

But that was long ago. These days I've pretty much internalized NULL (and for the record, I'm an if(p) gal) and no longer think about it. One of the reasons I don't have to think about it is that I don't write a template library that's used by millions of developers. If I did, I might have to worry about template-argument-matching and how compilers are supposed to deal with being given an int and knowing to match that up to a Something* -- but then again, only if the int has the value of zero. It's been a pretty clever trick for a really long time, but with the advent of perfect forwarding in C++0x (thanks to rvalue references) it just becomes impossible to always pull off that trick. Luckily, the same language changes that led to rvalue references also held the solution - the literal nullptr that isn't an integer with the value 0, but actually represents a pointer-to-anything that isn't pointing anywhere right now.

For the gory details, a wonderfully transparent look at how the team decides what to do in a release and what to hold for later, as well as some delightful glee at being able to do stuff, some amazing understatement ("somewhat arcane" indeed) and moments later "the world explodes!" you have to watch STL on nullptr. BTW, he deliberately pronounces it null-putter so people can tell he's not saying "null pointer" which would still be NULL. He even gets into nullptr vs nullptr in the land of /clr and how the double underscore (seriously) rides to the rescue. Major whiteboard action and in the end you'll know a little more about why the magical STL (the library) works, why it's faster in VC++ 2010, how the team (including the human STL) thinks and works, and the insides of my favourite language.

Kate

* that would be before Microsoft had a C++ compiler, over 20 years ago. Four and a half years ago I reflected that I was very close to having 20 years of C++ experience.

Wednesday, October 21, 2009 9:49:40 AM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, October 17, 2009
As C++ developers, we have a lot of options about how to link to libraries we use. We read sometimes that if we link statically, we will have more work to do if there's ever a security hole in the library, since we'll have to redeploy our app rather than just relying on the users to get the new library and use it dynamically. There's a great example of that in the ATL story that is now just wrapping up. A problem was discovered in July, and emergency updates were promptly released - just a day before the guys who discovered the problem spoke about it publicly. An article that same day pointed out that the error was almost a typo - an extra & in an expression - and warned that the patches "do not automatically fix software that was developed using the buggy ATL. Instead, vendors -- Microsoft as well as third-party firms -- must use the patched Visual Studio to recompile their code, then distribute the new, secure software to users." Well finally, Microsoft has finished their part of it with updates for the parts of Office that were using the old ATL. Have you done all of yours?

Kate

ps: love the "related twitters" at the bottom of the article - people may not tweet about the Active Template Library very often, but they sure do mention a certain airport / city that uses the same abbreviation :-)

Saturday, October 17, 2009 12:13:47 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, October 15, 2009
Inspired by the Visual Studio Documentary, Rico Mariani is writing his own history. So far he's up to 8 parts and they make for great reading. He goes into some of the technical challenges the teams faced, and talks about cancelled and sidelined projects along the way. He's made a category for it so you can read the whole thing start to finish ... but I'm reading as he goes and not waiting till it's done. Do read in order though, starting at Part 1.

Kate

Thursday, October 15, 2009 11:34:46 AM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, October 09, 2009

You have to see these. Roughly half an hour each, featuring an RD and at least one former RD, it’s a cast of luminaries and also has some funny-looking-back archival footage. I learned a few things, remembered a whole bunch more, and smiled and laughed a lot. Check them out. Apparently there’s a whole series to follow with the full interviews with all those folks. I like this chronologicallish approach with different interviews interwoven, but I’m sure I’ll watch the long ones too when they come out.

Here’s who’s in it:

  • Anders Hejlsberg
  • Soma Somasegar
  • Dan Fernandez
  • Alan Cooper
  • Bill (archive footage)
  • Tim Huckaby
  • Tony Goodhew
  • Dave Mendlen
  • Jeff Hadfield
  • Jason Zander
  • Mardi Brekke
  • Dee Dee Walsh
  • Scott Guthrie

They are both on Channel 9 (and read the comments too): Part 1 and Part 2.

Kate

Friday, October 09, 2009 9:23:24 AM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, August 22, 2009
I've done several Tech Ed talks, in Europe and the US, in which I've demoed lambda expressions, a new language feature coming in C++0x and implemented in Visual Studio 2010. If you missed your chance last year to watch my Tech Ed Europe talk, it's still available on page 3 of the "last year's highlight's" page. But that's 80 minutes and covers more than just lambdas. If you would be up for investing a tenth of that time, try this Channel 9 piece featuring Thomas Petchel. He's obviously VERY familiar with the STL and he illustrates perfectly how writing dinky little functions to initialize arrays can be tedious and time consuming, and how lambdas make them faster. If you watch that and like what you see, go ahead and give my Tech Ed talk a listen as well.

Kate

Saturday, August 22, 2009 9:23:29 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, August 12, 2009
There was a bit of a kerfuffle in the C++ standards world in mid July arising from the summer meeting of the ISO C++ committee. Agreement couldn't be reached on how to implement concepts. In the end it was decided not to include them in the next version of the standard.

What are concepts? They improve the experience for template consumers. C++ templates are amazingly powerful, but using them can involve a lot of guesswork and a lot of swearing. They're pretty easy to write, and just by typing a line of code you create a requirement, a pre-requisite, for anyone who wants to use your template. If you write a template that takes two instances of class T called t1 and t2, and then somewhere it says t1 + t2 or t1 < t2, then your template can only be used with types T that have the operator + or the operator <. Anyone who uses it for some other type is going to get an error message that might be useful, but might be your typical nasty template-related error message. That makes templates easy to write, but hard to consume. Short of actually reading through the code for the template, you can't know before you try compiling whether or not your consuming code actually meets the requirements for using the template.

Generics in .NET deal with this through constraints - the generic writer identifies the interfaces that must be implemented by any type that will use the generic - IComparable or IEnumerable etc. If you want to use the generic, you  implement the interface, and the compiler will help you get that done with readable error messages.

So that was the heart of concepts. Some sort of decoration you would put on your template to say "here is what I expect of those that use me." How important are they in general, and how important to C++0x?
  • concepts’ presence or absence in C++0x just won’t make much difference to most users - Herb Sutter
  • [concepts were yanked out and that is] a major setback for C++, but not a disaster - Bjarne Stroustrup
  • removing them was our best available option both for C++0x and for concepts as a language feature - Doug Gregor
  • Not the end of the world, but disappointing nevertheless - Alex Fabijanic
What do I think? I think that template consumers fall into two large categories - those who consume templates they wrote themselves, and those who consume the STL. If you wrote it, I hope you know what it needs, and if it's the STL, well you can paste your opaque error message into a search engine and someone's blog will tell you what you need to add to your class to use that template. I don't think there are a lot of people consuming poorly documented and sparsely used templates. I agree that concepts could result in that sector growing some day, but that few developers are walking around wishing for them or feeling the pain of not having them. I'm sure it's a disappointment to everyone who put so much work in to them, and who will continue to work on them towards inclusion in a future version of the standard, but the rest of us can relax and get ready to see the other C++0x goodies included in a standard where x might actually fit in a hex digit.

Kate

Wednesday, August 12, 2009 2:59:55 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, August 10, 2009



Of course the most important sessions at PDC couldn't possibly be announced yet. The best are the ones that are TBD in the session list and schedule right up until the keynote. That's how you know something big is going to be announced. Imagine something where just hearing its code name, just knowing who was going to give the sessions, or even a single sentence of description would spoil the whole announcement. Those are the sessions you go to PDC for, so it's a bit like a Christmas present ... you can't know in advance what it will be.

But it's a four day conference with a lot of sessions and some of them can be announced in advance. I can see that this year some folks have decided to have slightly more interesting session titles (along with the more traditional titles):
  • Zero to Awesome in Nothing Flat: The Microsoft Web Platform and You
  • Windows Workflow Foundation 4 from the Inside Out
  • Windows Identity Foundation Overview
  • Windows 7 and Windows Server 2008 R2 Kernel Changes
  • Using Classification for Data Security and Data Management
  • Under the Hood with Microsoft SharePoint 2010 Programmability
  • The State of Parallel Programming
  • The DirectX 11 Compute Shader
  • Simplifying Application Packaging and Deployment with Microsoft SQL Server 2008 R2
  • Petabytes for Peanuts! Making Sense Out of “Ambient” Data.
  • Microsoft Visual C++ 2010: The "Accelerated" Way of Building Applications
  • Microsoft Unified Communications: Developer Platform Futures
  • Microsoft Silverlight Roadmap and Futures
  • Microsoft Silverlight 3 Advanced Performance and Profiling Techniques
  • Manycore and the Microsoft .NET Framework 4: A Match Made in Microsoft Visual Studio 2010
  • Development Best Practices and Patterns for Using Microsoft SQL Azure Databases
  • Developing xRM Solutions Using Windows Azure
  • Developing .NET Managed Applications Using the Office 2010 Developer Platform
  • Developer Patterns to Integrate Microsoft Silverlight 3.0 with Microsoft SharePoint 2010
  • Data Programming and Modeling for the Microsoft .NET Developer
  • Building Applications for the Windows Azure Platform
  • Automating “Done Done” in the Dev-to-Test Workflow with Microsoft Visual Studio Team System 2010
  • Accelerating Applications Using Windows HPC Server 2008

My favourite title in there is definitely "Manycore and the Microsoft .NET Framework 4: A Match Made in Microsoft Visual Studio 2010" but there are other contenders for sure. As for the topics themselves, I think many of us have still not given concurrency/parallelism/manycore the attention it deserves, and all of us are guilty of compartmentalizing what we learn about so I bet you have probably ignored something (Silverlight, or SharePoint, or Azure, or the full power of VSTS). That means these sessions alone will make us better devs. If these titles are enough to get you signed up, do it now while you can get a $500 (US) discount - from $2095 for the whole conference (except workshops) down to $1595 until Sept 15th. Wait till Labour Day to start bugging your boss about it and the discount will be gone, plus the plane tickets will be more expensive. (Oh, if you're a student or teacher, you pay only $595, which gives you an astonishing way to get head and shoulders above those around you.)

There are also some seriously intelligent workshops scheduled:
  • Getting the most out of Silverlight 3
  • Patterns of Parallel Programming
  • Developing Quality Software using Visual Studio Team System 2010
  • Architecting and Developing for Windows Azure
  • Microsoft Technology Roadmap
  • Software in the Energy Economy
  • Developing Microsoft BI Applications - The How and The Why
Four of those seven workshops are being given by RDs, meaning you'll get real world experience along with the technical product knowledge. What a way to get caught up on something you weren't paying attention to!

Going to conferences is getting harder and harder to justify in this climate. But that doesn't mean you stop going to conferences - it means you only go to those that are relevant to your work and offer amazing value (content, people, atmosphere, and otherwise-unavailable bits) in return for your registration fee, travel, and time away from work. The PDC offers just that for devs on the Microsoft stack. It's the only conference I've ever paid my own money to get to. Be there!

Kate
Monday, August 10, 2009 11:49:32 AM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, August 06, 2009
If you like to learn how to do things from material that is longer than blog posts, and videos don't work for you, then you probably still buy books. Here's one you might be interested in:



Authors, in case you can't quite read it there, are Yochay Kiriaty, Laurence Moroney, and Sasha Goldshtein. I am often tempted to link to every post Yochay makes - they are detailed, and useful, and crammed with more links. If you're developing for Windows you should be reading his blog and that's that. I read Sasha's blog regularly, too, and he is constantly coming across things I would never have thought of. I may not need that information that day, but reading it makes me a better developer. Both of them give attention to both managed and native code for extra points from me. Laurence is more a Silverlight guy, but I'm going to read his blog for the next little while anyway.

I haven't seen a preview of the book yet, but it's due Sept 30th, and you know the content will be good. A pound and a half of developer good stuff :)

Kate
Thursday, August 06, 2009 8:49:51 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, July 29, 2009
I didn't even know there was a Visual Studio Project Team blog, but the entries lately sure have been C++ relevant:
Brian Tyler says "Our areas of responsibility are those surrounding projects and solutions in Visual Studio - specifically the C++, C# and VB project systems - but we're involved in other code bases in those areas as well." and explains that he's going to start the blog with these C++ topics because the conversion of the VC++ project system from VCBuild to MSBuild was a major effort in VS 2010.

I'm really happy about the VC directories thing. It made moving projects from one machine to another very brittle that things like which version of a header file you got were machine-specific instead of project specific. The blog as a whole is a must-read if you're going to do any C++ work in Dev10.

Kate

Wednesday, July 29, 2009 10:05:26 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, July 23, 2009

I admit it, I read my referrer logs. I want to see what kinds of searches bring people here, or who is linking to me. I think a lot of the single word searches (women, or shirt, or december) are blog spammers looking for posts to spam on. And some are clearly my name, names of my friends or folks I blog about, conferences I'm speaking at. The majority is things I know about, things for which I want to be your expert source: /clr:pure, windows 7 taskbar, uac manifest file, marshal_as and so on. Yay.

But this one was just plain odd: c++ standard limerick. Really? So I repeated the search, and found this:

When writing a specialization,
be careful about its location;
or to make it compile
will be such a trial
as to kindle its self-immolation.

OK, it's not spaced like that in the standard. But who'da thunk it?

Kate

Thursday, July 23, 2009 7:48:20 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, July 17, 2009

It's been a while since I did a series of posts on debugging tips:

So here is not so much a tip as an announcement. You see , it's no coincidence that my examples for conditional breakpoints were numbers (some index into a structure is greater than 346, or Xid is 1234.) Until now, you couldn't really use strings in conditional breakpoint expressions. But the cool news is that, starting with Visual Studio 2010, you can!

You can't just call arbitrary functions including your own foo(whatever), but you can call a pretty impressive list of variants on strlen and strcmp. The details on are Habib Heydarian's blog. Just one more reason to want Visual Studio 2010!

Kate

Friday, July 17, 2009 12:27:15 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, June 21, 2009

Some simple truths about elevation (as in UAC):

  • A process, once running, cannot elevate itself. You are launched elevated or not.
  • A non elevated process can launch an elevated one. The easiest way is to make a separate exe and embed a manifest, then launch it with ShellExecute.
  • An elevated process, once running, cannot "drop back down" to being elevated. As in the first bullet, you are launched elevated or not.

There are some incredibly complicated ways to launch an elevated process but I don't use them because they are incredibly complicated. But you might have noticed there's a symmetry problem there. Can an elevated process launch a non elevated one? My first answer would be "it doesn't matter, because you shouldn't." My paradigm is that your core app should be non elevated, if at all possible, and if it has one or two admin-ish features, those should be refactored into a separate manifested exe that is launched (from a UI component decorated with the shield), does its stuff and gets out.

However, a case can be made for having some sort of admin app that wants to leverage some other installed application, like Internet Explorer, that could possibly be using a malicious plugin or the like. This admin app would be smart to do its leveraging with a non elevated instance of that application. So how can you do it? Well, according to Aaron Margosis, it's a seven step process in native code. Managed code is left as an exercise for the reader.

If you care, now you know how to do it. And even if you don't care, the symmetry is restored.

Kate

 

Sunday, June 21, 2009 5:30:28 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, June 19, 2009

If you already know what NDepend is, all you really need to know is that you can now point CppDepend at some big legacy C++ codebase and start to get your arms around all that code a bit better. If you have vaguely heard about NDepend but weren't really listening because you're a C++ programmer, it's time to change that. You can start by reading an analysis of MFC that uses CppDepend to answer questions like what fraction of member variables have names that start m_ (answer: about half) or what kind of coupling the key classes tend to live with.

Beatiful visualizations and genuine insight. Sure, you're not going to refactor MFC yourself, but imagine pointing all this at your own library!

Kate

Friday, June 19, 2009 2:47:30 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, June 13, 2009

Early this spring I delivered several sessions of training for Microsoft. It was for ISVs who wanted to get rolling on Windows 7 as quickly as possible. It's good material that covers a mix of managed and native development to take full advantage of new APIs, new features, and new power in Windows 7. It relies on the Windows API Code Pack and some custom-written wrappers for Windows 7 functionality that isn't in Code Pack at the moment. And now it's available to anyone who wants it.

If you couldn't come to one of the courses I taught, consider this the next-best thing.

Kate

Saturday, June 13, 2009 9:18:13 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, May 28, 2009

Stephan has blogged some breaking changes to the STL in beta 1 of VS 2010. These are breaking in the sense that your old code, which worked, might not work when you move it to the latest release. I had this with a demo (not real code) that didn't bother #including <iterator> because it was including something else that included it etc. So my old code wouldn't build in Dev10. Simple enough fix to add the #include.

That alone (4 simple problems, and how to fix them) makes the post worth reading. But it's also a fantastic example of the transparency and visibility the team blog provides. Look at this sentence:

In VC10 Beta 1, I added operator->() to CAdapt, allowing v[i]->Something() to compile unchanged. 

Not "we added". Not "it was decided to add". Not "some faceless decider, whose motives and reasoning are not accessible to the mere mortals who just read our decisions, added". Simply "I added". Stephan, STL, a real person whose posts we can recognize by font alone, added an operator. I think as C++ developers we are a very lucky lot, to have this kind of window into how and why the tools change as time goes by.

The conversation continues in the comments, btw. On the C++ team blog, if a post interests you, you should always read the comments too. Folks ask stuff and team members (not always those who posted the original) answer.

Kate

Thursday, May 28, 2009 9:33:33 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, May 20, 2009

I just could not keep from laughing when I read parts of this Register column on C++0x. And that's good, because that's what Verity no doubt had in mind. And it's mostly accurate, though not a good first reference on C++0x. I would recommend the Wikipedia page or the many excellent entries on the Visual C++ team blog (sorry about the order) to learn what it's really all about. But let's say you have actually read and understood what STL has to say about rvalue references - well done! Your reward for that will be to understand the humour in the Register piece :-). And if you haven't understood rvalue references, well all you really need to know is that they let template writers and library writers make their code "smokin' fast" for you.

Kate

Wednesday, May 20, 2009 3:43:46 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, May 18, 2009

I have pretty well always sucked in air through my teeth when I see calls to memcpy. So much of the time it's a marker of premature optimization and a developer who is sure "my code is faster than what the stupid compiler emits". Even when that's not what's going on, it's so darn vulnerable to things changing size over the decades. It just scares me. As result, there isn't much (or even any?) of it in my code, so I'm not directly affected to read that memcpy() is joining the ranks of the "you shouldn't use it" functions, along with strcpy etc.

I blogged about strcpy and some cousins being replaced with more secure versions five years ago. (I had not thought it was that long, but it turns out it was.) Now it's memcpy's turn. The Security Development Lifecycle blogs this, and shows you how to deprecate things yourself. It's probably no surprise to be told you should use memcpy_s instead. There's a scary list of security bugs that are apparently due to misuse of memcpy that memcpy_s would have caught, so if you are an memcpy user, change your ways!

Kate

Monday, May 18, 2009 3:33:06 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, May 06, 2009

I've made another appearance on DotNetRocks with Carl and Richard. Some links from the show:

And of course, the show itself. I dare you to listen at 1.4 or double speed.

Kate

Wednesday, May 06, 2009 7:57:02 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, March 05, 2009

A quick glimpse of what you'll find if you search for C++ on the Tech Ed Sessions page:

I'm looking forward to it once again!

Kate

Thursday, March 05, 2009 2:52:05 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, February 28, 2009

I've been doing some training lately and of course conference season is on the way, so I'm starting to think once again about the mechanics of talking to audiences. One relatively recent change in audience is the popularity of Twitter. It is starting to create a far more public backchannel, one that even the presenter (or the presenter's colleagues) can read and respond to during the talk.

Private, even secret, backchannels are nothing new. I've been on many a conference call where 5 or 6 of us are on Messenger discussing the call itself (and we probably wouldn't want the speaker to read what we were typing.) I've also been in physical meetings where a small group of people are privately discussing the meeting itself, whether co-ordinating who will say what when, or just aimless snarking and wondering when we can leave.

But a public backchannel, maybe even one you have an obligation to monitor, is a very different beast. Some folks, like Olivia Mitchell on Tamar Weinberg's blog, think it's all-good all-round: better for the audience, the presenter, the world as a whole. Presenters just have to learn new reflexes: when your audience suddenly starts typing and looking at their screens, it doesn't mean you've lost them, just that you're so interesting and the information is so important that they feel the need to share with the world immediately. Ira Basen is not so sure, especially if the tweets are negative and going out in public before the talk has even finished and without asking the presenter any questions.

Different conferences will probably lead to different conventions and habits. I can imagine a lot of tweeting from a keynote where things are being announced or demo'd for the first time. But if I'm doing an hour on C++ 0x features, I can't really see why "OMG Lambdas r AWESOME" can't wait until the talk is over. "Now showing capturing the whole stack by reference" doesn't seem like a likely tweet. I can tell you that I'm not going to have a window open on my screen where I'm following "my channel" and that if you want to ask me a question, it's going to involve speaking aloud, at least for now. That said, it's a good idea to think about the impact of wireless internet in every room and instantly-constructed channels on speaking, on conferences, and on the way we all share information. I think there will be more room-switching early in talks if people learn that someone else is really doing a great job, and attendees may demand more agility in scheduling repeats and extra sessions on topics that were well received. As always, we live in interesting times.

Kate

Saturday, February 28, 2009 11:01:19 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, February 13, 2009

You know the blog, now watch the Channel 9 video featuring Damien Watkins, Rick Molloy, and Don McCrady. I like this one because they talk about how they ended up changing their minds over the course of development, moving from a language-based approach to a libraries-based one. They get into why that's better and what C++ 0x features they needed to make it possible. A nice way to spend a little under an hour.

Kate

Friday, February 13, 2009 4:20:06 PM (Eastern Standard Time, UTC-05:00)  #    
# Monday, February 09, 2009

We all face times when we have a picture and we want the text. Maybe we have a printout we can scan, but we don't have one of those cool photocopiers that scans to a true text format like PDF or XPS. Maybe we took a screenshot during a web cast and don't want to retype all the code. That sort of thing. There used to be OCR in Word, but in Word 2007 it seems to have disappeared. No worries though, it resurfaced in One Note.

Here's a screenshot from a private web cast last summer (the actual content is in a recent Visual C++ team blog, so no worries about revealing super secret info):

Now, I open a new One Note document, paste this jpg into it, then right-click:

 

You can hit paste right in One Note if you like, but it tries to capture formatting etc. I pasted into Notepad and got this:

Some samples
structXfl;
void meow(constX&)cout<<”meowconstX&):Copying.”<<endI;}
void meow(X&&) cout << “meow(X&&): Moving.’ <<endl;}
XfooOIreturn XO;}
const X bar() return X(); }
mt main()
Xa;
constXb;
meow(a); I/Copying
meow(b); I/Copying
meow(fooO); ii Moving
meow(barO); II Copying
}

OK, it needs some spaces, and it's not too smart about {} or //, but it's quicker than typing it all yourself. And if you have a boatload of ordinary typed text (say a paragraph from a printed RFP that you want to quote in an email to various folks, or a powerpoint presentation) then it's even more accurate. And it's probably on your machine already!

Kate

Monday, February 09, 2009 5:58:44 PM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, February 01, 2009

While I was in Redmond I met Alon Fliess, who like me is a C++ MVP and is exploring Windows 7 (and Vista before it) from a native point of view as well as a managed one. About two months ago he mused about the "rebirth" of C++ in these times, not just because some of those operating system APIs are easier to get to from native code, but also because of new native capabilities (the continued MFC updates, the native Web Services library, the concurrency services) that just keep being added to the arsenal available to C++ programmers. (He has some helpful links in the blog post - you could also search through here if you like.)

I think it's a good point. If you know C++, now's a good time to use it. If you don't, then hang around (at least virtually) with those who do - we can point out some cool things. And thanks to the magic of interop, wrappers, and C++/CLI, perhaps we can make some of those cool things a little easier to get to from managed code.

Kate

Sunday, February 01, 2009 9:12:13 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, January 21, 2009

Continuing my theme of 2008 in review, the year was interesting because it featured the breaking of two rules I have long held to be utterly true. These rules are cynical and depressing and people generally do not want to believe them. I am known for my optimism and yet I assure you these rules are true and you cannot escape them:

  • There is no such thing as a “slow yes”.
  • You will never get paying work (or a sale) from that guy you sat next to on the airplane.

Let’s start with the mythical “slow yes.” All there really is in this world is the “fast yes”, the “fast no”, and the “slow no”. I am sure you have been asked to give somebody a donation, or to buy something, that you didn’t really want to give or buy, and so you said “can you send me a letter about that?” or “can you send me a proposal?” when what you really meant was “can I please get off the phone so I don’t have to face saying no to you?” It’s a “slow no.” We have all done this. Yet for some reason when we are trying to get the sales (or the donations, or to be hired) we get off the phone and tell our co-workers or family or whatever, “Success! He wants me to send a proposal!” or “Score! They’ve got nothing now, but he wants me to phone back in a month!”

I have been a consultant for over 20 years. When people want to hire our firm to help with a problem they’re experiencing, they hire us. Sometimes there’s an RFP to respond to, sometimes they need to show a written proposal to someone, but generally they say “I want you to do this” and then we talk about paperwork. When people don’t particularly want to hire us (and usually that’s because the conversation was my idea, and I am trying to sell work to people who were minding their own business) they ask for proposals, or they say “well, we would have to have a meeting about that but I’m really busy this week so how about I call you in two or three weeks?” This is the start of the “slow no”. They won’t ever say “no” or “go away” but they won’t ever give you work either. You can spend days and weeks and months thinking you are “working on sales” because you are emailing these people and asking if there’s been any change, you’re sending these people generic proposals (because you don’t know their specific problem, and that in turn is because they haven’t told you a problem they want you to solve, and you know why that is? They don’t have a problem they want you to solve), and you’re updating your tickle lists, all of which sure as hell feels like work, but is not in fact accomplishing anything.

So when I finally learned this lesson (and I believe I read it somewhere, and fought it for a while, and then came to know it was true) my life got simpler. I rarely phone or email strangers (or even former clients) and try to pester them into giving me work. If for some reason I do, and they’re not very interested in hiring us, I don’t put a lot of time and effort into trying to persuade them otherwise. I assume that people who want to hire us will make the effort to do so. This has lowered my stress tremendously.

But you know what they say about the exception that proves the rule? We got an RFP from some people we didn’t know, through a third party who felt we’d be good for it. It was highly specific about what technology to use – an Access application distributed as a single file to be installed on each workstation, a SQL backend to be shared by all these workstations, no offline story, a VB6 application to run in the system tray and notify you if another user added something to the shared repository you should know about, that sort of thing – and our first guess of effort doing it their way was well over (perhaps even double) what the third party believed was their budget. So we wrote back and declined to bid. Months later, we heard they were putting it out again. So we asked if it was ok to ignore all their tech specs and submit a solution to the underlying business problem, which was well described in their material. They said go ahead, so we did: suggesting a SharePoint store, some workflow to handle their special business rules, and some Reporting Services goodness for the managers. Total cost including buying all the SharePoint licenses at full retail was less than the whispered budget, and we were pulling in a raft of features that they had on their wishlist for v2 such as email notifications when things were changed. It was a great proposal.

Great or not, it got no response. After about 2 or 3 months I wrote to confirm that we didn’t get it. And was told “actually, we haven’t decided yet.” I imagined a conversation in a boardroom somewhere with one person saying “can she not read? We clearly said SYSTEM TRAY!” and another saying “look how much more solution to our problems we will get for the money!” Some more months went by and you know what? We got the gig. Well over a year from the first RFP to being hired for the project. It’s underway now. I will point out that although this was a slow yes, it didn’t get to yes as a result of pestering actions on my part. I patiently waited (while working on other stuff for real clients) and these guys came to me when their process had worked its way through to a decision.

The second rule that sales people need to learn is that those “hey cool your product sounds perfect for us why don’t you drop me an email” conversations on the plane just do not, in general, lead to sales. Again, the guy just wants to be nice and to go away in a pleasant and positive way. Pestering Mr 13B to see if he’s ready to pull the trigger on the order that will save your year may feel like work, but it isn’t getting you anywhere. If Mr 13B wanted your product, he would have taken your card, and he would have emailed you the minute he got his laptop on the network. That silence and absence of emails from Mr 13B is basically “he’s just not that into you” or in this case, your product.

That said, here’s the story that breaks the rule. Sasha, my MVP lead, spent some time last year in a customs lineup, and got chatting with the fellow next to him in line. That fellow needed some mentoring or consulting from a senior person with solid C++ and project management skills who could suggest a good architecture for his new product, and then help to get it built. Sasha took the guy’s card and sent me one of those “X, meet Y” emails. A conversation ensued, followed by meetings, and the end result: the product is very clever and I am delighted to be part of the team that is building it. We ended up with no C++ in the product, but that doesn’t worry me at all. It meets a genuine business need and supports the way people in that business need to do their jobs. And my client would not have found me if he wasn’t willing to chat to a complete stranger about the software he was trying to build.

I still say the rules are true, despite the specific exceptions I met this year. Or more accurately, that the smart way to live your life is as though these rules are true. Selling consulting services is not like selling timeshares or couches. You can’t bully people into it or catch them in a moment of weakness and trick them into saying yes. They have to want to choose you to solve their problems. That isn’t something you can persuade them to want by “following up” every two weeks. So I just plain do not do that. Some folks who I like and haven’t worked with for a while get a note sometimes (especially if I come across something that reminds me of them) but I don’t set out to make people buy our services. I don’t lose sales by spending less time “working on sales” and I certainly don’t lose sleep. If anything it frees my time to talk to people who genuinely want our help. That’s way more fun anyway.

Kate

Wednesday, January 21, 2009 10:14:22 PM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, January 20, 2009

Anyone who blogs on technical topics soon notices they get a lot more hits if they wander into non technical areas for a post or two. That’s just because there are more non technical people out there, searching for tips on stain removal or coupons for TGI Fridays, than there are people who want to know how to get a manifest on an executable or how to write a C++/CLI wrapper for native code or what’s coming in Visual Studio 2010. That’s why my top ten posts last year are:

1 - XPS Document Viewer – Nov 19th 2006
I guess people are still getting XPS documents and don’t know how to read them. OK. Not sure why my page would be the one that over 7000 people find, but what the heck, the information is still valid.


2 - Reading Office 2007 files – Nov 23rd 2006
Also from two years ago but people still need to know this. I send people this link whenever I get one of those “I can’t read your attachment because I’m not on Office 2007 yet” replies to an email. I didn’t send it out 4000 times though, so I guess a lot of people are searching for this stuff.


3 - Try Www.mappoint.com – August 18th 2004
I read recently that people don’t seem to realize they can type URLS into the address bar on their browsers, and have their home pages set to search engines, and actually type entire URLS into search boxes so they can click the result. I would deny this could happen, except many years ago I had a client who did just this, so I know there really are people who do this. I also can’t think of any other reason why over 2500 people would read a four year old post comparing MapPoint to MapQuest given that everybody these days uses either maps.google.com or maps.live.com.


4 - Introduction to Workflow in SharePoint 2007 – June 22nd 2006
Yep, workflow was a hugely important addition to SharePoint. We’re loving it in the SharePoint project we’re doing now. Again this is a topic that must surely be better covered somewhere else though. Still almost 2500 people stopped by to learn about workflow – I hope they followed the link to learn more, and learn something a little more recent – say from after the product was released?


5 - How to earn a million Aeroplan miles – Oct 1st 2005
Now this is really non-technical, but it caught my attention and I guess plenty of other people’s too. I have some other blog entries from time to time about Aeroplan miles, but I don’t really cover how to earn them. For that I highly recommend Flyertalk’s Aeroplan forum.


6 - Batch-convert Visual Studio 2005 projects to Visual Studio 2008 – Dec 17th 2007
The most recent entry yet in this top ten. It makes sense that something that gets hits all year does better than something that wasn’t even around for the first half of 2008. And this is a useful tip I haven’t seen many other places. All those searching people should just subscribe to John Robbins – searching only helps you if you know something exists and want to find it. Smart blogs like John show you things you hadn’t imagined existing.


7 - Another Way to Get the Shield on a Button (or Anywhere Else) – Jan 30th 2008
Finally, something from 2008 in the 2008 top ten! And this is a good tip from Daniel Moth. Remember, the shield on a menu item or button doesn’t bring up the UAC prompt any more than putting ... on a menu item brings up a dialog. And nothing puts the shield there for you if you trigger a prompt any more than something puts the ... for you when it sees you have code to show a dialog. All of this is just sensible developer tradition that helps users feel comfortable with the software they’re using. So please play along and help people know what to expect.


8 - Don't compile MFC apps with /clr:pure – Jan 17th 2007
This one seemed like a no-brainer – MFC includes native stuff, /clr:pure means I don’t have any native stuff, but I was getting emails asking for help and this kept turning out to be the issue. So I blogged it. A lot of my blog topics are the answers to random emails I get from people who are looking for help. This way an extra 1500 or so people saw the answer in 2008.


9 - Hot Laptop? Here's a tip – May 14th 2006
It’s still good advice for working with an overheating laptop. I’m not sure if the searchers all had that problem or were using “hot” more metaphorically.


10 - Adding a manifest to a Vista application – Oct 3rd 2006
This is mostly a link over to Catherine Heller’s Visual Studio 2005 instructions, except that I really wanted to call out how much less work it was for Visual C++ compared to C# and VB.NET. Anyway it’s all a ton easier with Visual Studio 2008 these days.


What else can I tell you from my stats? I got almost a million visits over the year, and they averaged 2.71 requests – meaning most folks clicked around a bit once they arrived. That’s heartening. In 2008 I set myself a goal to blog every day. I didn’t achieve that – there were several long gaps in there – but I did post 135 times. I still like the quote from my post on June 1st, resuming after a four-month gap: “Blogging, like speaking at a Quaker meeting, is something one must do only if the spirit moves one.” I’m looking forward to having my spirit move me hundreds of times in 2009.

Kate

Tuesday, January 20, 2009 10:07:58 PM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, November 26, 2008

I mentioned Andy's blog a few entries ago. Now he is selling some funny shirts to raise money for two deserving charities: one that treats and prevents blindness and another that provides low cost prosthetic feet. Excellent causes.

  

You know you want one...

Kate

 

Wednesday, November 26, 2008 10:39:09 AM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, November 23, 2008

Because Visual C++ is a great tool for making Windows applications (and has been for well over a decade) a lot of the Visual C++ users I meet are Koolaid drinkers like myself. We use Microsoft tools to write software for a Microsoft platform, and a fair number of us use Word and Outlook and Powerpoint and rarely touch an application that didn't come from Redmond. But one of the cool things about C++ as a language (contrasted to VB and C# for sure) is that it is also used by people who don't use any Microsoft tools, or who use Visual Studio but nothing else, and people who are not developing for Windows. These people are not drinking the Koolaid and their opinions can be very helpful. They keep track, for example, of which standards features have been implemented in which compilers.

I came across this article on the future of C++, and the article itself didn't have much extra information for me (though the insight into the "bias" of StackOverflow was interesting.) But the comments! Wowza. I'll be reading Andy's blog from now on, and I recommend you read at least this post. It's a good one.

Kate

Sunday, November 23, 2008 9:14:21 AM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, November 22, 2008

Soma is blogging about C++ again. I liked this quote:

Over the years, we have heard a lot of C++ developers refer to the old days of Visual C++ 6.0 as the glory days of Visual C++ tools.  Many of the comments reminisce about the snappy and productive IDE.  With Visual C++ 2010, we strive to create a new benchmark for Visual C++ IDE productivity.  We will couple this IDE with our superior support for the C++ language and significant improvements to the libraries.

He talks about Intellisense, the build system, tools for exploring a large codebase, the native Parallel Patterns Library (PPL), lambdas, and MFC updates. There really is a ton going on in Dev10. A lot of it was covered at PDC so if you haven't watched those videos yet:

https://sessions.microsoftpdc.com/public/timeline.aspx search for "C++", "MFC", and "native". Enjoy!

Kate

Saturday, November 22, 2008 9:05:57 AM (Eastern Standard Time, UTC-05:00)  #    
# Sunday, November 16, 2008

Also on Code Gallery, in addition to the Vista Bridge, you can find an interesting bit of guidance for those developing Windows 7 applications. This is 43 pages of "what is special about Windows 7" written for developers. Curious about touch and multi touch? Ink? The new taskbar, ribbon, jump lists? Libraries? How to handle previews and thumbnails for your file type? Wondering what Windows Web Services are and how they differ from WCF? (quick answer - WCF is managed, Windows Web Services is native C++ - expect more on that from me when life calms down a little.) It's all in here, with plenty of screenshots. From here you will know where you want to drill more deeply, and you will know the names of features, which is usually key to figuring out how to use them.

http://code.msdn.microsoft.com/Win7DeveloperGuide is a good starting point, and you can join discussions and so on. The Downloads tab will get you the document in Word or XPS format.

Kate

Sunday, November 16, 2008 7:51:18 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, November 14, 2008

Tech Ed draws to a close and the website of videos gets updated. This is a general-access-no-login-required highlights site. The mechanism for extracting individual links seems broken, so I'll show you what to click on:

Thursdays wrapup includes footage of the Norway country party (North American speakers typically pick a country to visit for country drinks, and my gang chose Norway) and the Speaker Idol finals (I was recruited as a last minute replacement judge for the finals only.) Speaker Idol impresses me every year because it shows all of us (speakers, track chairs, etc) people who are really good but have not spoken at Tech Ed before. How good? I have a session in the top ten this year, and one of the very few people who is outscoring me is last year's Speaker Idol winner, Jeff Wharton.

The afore-mentioned session in the top ten is here, the full video. Doesn't seem to be downloadable, so set aside 80 minutes and learn about shared_ptr and lambdas. The abstract is inaccurate - I didn't do anything on STL/CLR or marshalling - that was last year. The attendees didn't seem to mind that I tossed out half my planned talk and replaced it with content that had been announced at the PDC :-).

There are 63 videos all told (though 5 are from last year) and they range from a few minutes long to, well, 80 minutes. See what you missed, and maybe see you next year!

Kate

Friday, November 14, 2008 7:39:38 AM (Eastern Standard Time, UTC-05:00)  #    
# Monday, November 10, 2008

There is an older, deeper meaning for "cut and paste" and this sticker, on the laptop of a member of the C++ team, shows it nicely. The sticker was a gift, btw - somebody made it for the team member. I like it.

Kate

Monday, November 10, 2008 10:14:09 AM (Eastern Standard Time, UTC-05:00)  #    
# Thursday, November 06, 2008

Jesse Kaplan gave a GREAT talk at PDC called Managed and Native Code Interoperability: Best Practices. I really enjoyed it, and it actually covers a great deal of ground. Sure, some of the diagrams expressed concepts I have expressed before, but that's a vote of confidence as far as I'm concerned.

This is a dense talk that assumes a fair amount of background knowledge, but well worth the hour to watch. And then he plugged my marshal-as site, too!

Dude, you had me at "interop boundary" and it just got better from there. But this was a great finish!

Kate

Thursday, November 06, 2008 8:10:34 AM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, November 01, 2008

One of my demos (OK, more than one) for my upcoming Tech Ed Europe talks is a console application. I find when you're doing complicated concepts like C++ templated code, that adding the plumbing to talk to a Windows application (whether MFC, Windows Forms, WPF or whatever) can obscure what's going on. Generally speaking people can follow cout << i << endl; just fine and it reduces the header files and so on that are needed to use the sample.

I had one problem though - on this machine, when debugging a console application I couldn't get the Properties of the command prompt to come up when stopped at a breakpoint, and of course the command prompt disappears as soon as the program finishes running. I could change the properties in the command prompt you get for "start without debugging" but they had no effect on the debug one. The font was too tiny to use in a presentation:

Here's what I did. I brought up any old command prompt, right-clicked in the title bar, and chose Defaults instead of Properties. This affects every command prompt on your machine at once. I switched to Lucida Console and a bigger size, and closed the command prompt, then debugged my console application again:

Do I care that the font is now big in all my other command prompts? Not really. I suppose if I did I could deal with their properties one by one.

Kate

Saturday, November 01, 2008 11:01:15 AM (Eastern Standard Time, UTC-05:00)  #    
# Friday, October 31, 2008

An interesting thing happened towards the close of Thursday's MFC session at PDC. Damien Watkins was taking questions, and as so often happens, some of the questions were really more comments or suggestions, feature requests and so on. It's rare for the speaker to be the person who can act on these requests. Normally we're reduced to saying "send me an email and I'll forward it to the right people." Sadly, very few attendees do that. I know it takes a great deal of initiative and even courage to ask a question at a big conference (I do remember my pre-speaker days) and when asked to send email instead, that is sometimes too high a hurdle. As a speaker I can try to make a note of it, but if it's outside my area I may not write down the most important word of the request and that may leave the team unable to respond.

So during Thursday's session, after the third or fourth "OK, I'll pass that along," Damien volunteered:

I know you're thinking "he's just nodding his head and not paying any attention", but if you're using the mike it's all getting recorded. Everybody back on the team says "hey, as soon as it's online, let us know so that we can go ahead." It is getting recorded so it's all going back.

After the talk, Damien told me that they recorded the MVP Summit sessions and replayed them frequently to hear the attendee comments in context and with precision. For the PDC talks, when they need to share comments with another team, it's as simple as sending them a URL and a minute mark and asking them to listen. In fact I've done that myself this week when asking a question of someone in Redmond who couldn't attend - I sent the URL to the talk, a screenshot of the slide, and the minute mark. One of the easiest followup emails to compose ever. It really makes it possible for the conversation to continue long after the conference. I hope the trend spreads to all my conferences.

Kate

Friday, October 31, 2008 7:43:37 AM (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, October 29, 2008

Even those of us who are here can't see all the sessions we want to. I have three and four stacked across in most timeslots - and then I might end up spending that timeslot getting some vital "face time" with an RD or blue badge I don't otherwise get to see. But never fear, they're online within about 24 hours of happening! And what's more, you don't have to be registered to see them!

So, that Parallel native C++ talk that put me in the overflow room? http://channel9.msdn.com/pdc2008/TL25/ - watch the video, download the deck. The terrific Boris Jabes talk I lined up for? http://channel9.msdn.com/pdc2008/TL13/ - same deal. The MFC talk that hasn't even happened yet? The page is waiting at http://channel9.msdn.com/pdc2008/PC26/ and the video should probably show up Friday.

Want to find some more? https://sessions.microsoftpdc.com/public/timeline.aspx. This is just an amazing thing to do. It really increases the value for me of being here because it lowers my stress and worry about choosing the right session. It lets me concentrate on going to talks where I want to meet the speaker or ask the speaker a question, on going to the Labs and Lounge area to meet product team folks, and on enjoying the experience instead of frantically taking notes (or snapping pictures of demos).  I think this makes me MORE likely to attend future PDCs, believe it or not.

Kate

Wednesday, October 29, 2008 10:57:45 AM (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, October 28, 2008

An astonishing thing happened to me on the afternoon of Day 1. I went to the room for the "Parallel Programming for C++ Developers in the Next Version of Microsoft Visual Studio" talk, and the redshirt guarding the entrance said "the room is full you have to go to the overflow room." I tried logic with her "It's a C++ talk! It's can't possibly be full!" but she chose to believe her own eyes. So I walked the hundred miles or so to the overflow room, which itself became full. The audience really enjoyed seeing how simple it can be to take advantage of multicores using templated functions. Lines and lines of boilerplate goo disappear into a library instead of your code, which means people might actually do this. Nice stuff.

Having learned my lesson, I lined up immediately for "Microsoft Visual C++: 10 Is the New 6." The room filled up just as fast:

I don't think I had heard Boris Jabes present before. He was very good indeed. The slide you see in this picture lays out the mission statement for "Dev10", the next version of Visual Studio, as far as the C++ team is concerned: Make VC10 the most productive IDE for native development. Then he proved it to us. Since it was the last talk of the day, people stayed with questions for a long time afterwards. I really enjoyed listening in on those.

Tuesday started with a keynote that really impressed me. Azure is amazing but the gritty details are not there yet. But Windows 7 - it's on the hard drive! It's real! So they showed it to us. Then they started talking about client development. Ray pointed out a number of advantages of writing a Windows application instead of (or as part of a suite that also has) a web app.

I loved the Windows 7 demo. Lots of features there I really want right now. I love Vista, but this is even nicer. And I hear the stability is great already so you could really use it. Julie plugged the Engineering 7 blog I've plugged myself.

Scott Guthrie said C++ five times. I don't think I've ever heard him say it once before.

 

Don't worry, he talked about managed code too. You may think of ScottGu as "the web guy" but he gave client development in general, whether C++ or WPF, some serious love in this talk. Great announcements too - grid control for one!

Want one more inside joke explained? (I just love the RD alias for this sort of stuff!)

David Treadwell's shirt had 0x007FFF embroidered on it. Think of it as 00 7F FF. RGB. Go try it in some HTML. Then think back to Day 1.

Update: better picture of the shirt by Angus Logan. Subtle-as-a-brick demo of the colour by Steve Clayton.

Missed the keynote? Based on the URL to day 1, try http://channel9.msdn.com/pdc2008/KYN02/

Kate

Tuesday, October 28, 2008 1:41:07 PM (Eastern Standard Time, UTC-05:00)  #    
# Saturday, October 25, 2008

My Tech Ed Europe sessions are confirmed (have been for a while actually) so I had better tell you about them:

See you there!

Kate

Saturday, October 25, 2008 1:18:39 PM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, October 23, 2008

Actually I know what it is ... it's a large code base, fully available, very graphical, and with reasonable performance demands. So many years ago, Vertigo ported Quake II to managed C++ to show how performant the app was and how easy it was to integrate something that is quick to do in managed code - a partially transparent bad-guy locator if I remember correctly. That was five years ago, before C++/CLI, so it was a thicket of underscores and general hard-to-read misery.

About a year ago, Greg Dolley did it to C++/CLI. And then in January of this year he did Quake III Arena.

Well, now Julien Frelat has done it in Silverlight! He was apparently inspired by someone who did it in Flash. This is Quake I, but he has plans for II. Adam Kinney has an interview and video.

What else can Quake be ported to?

Kate

Thursday, October 23, 2008 7:29:20 PM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, October 22, 2008

Rico, who like me wonders from time to time "am I old?", muses about how things tend to come on around again. Is C++ too old to bother learning now? Rico says no. But he also says:

...the real need facing C++ programmers is somewhat the same as what faced COBOL programmers say 25 years ago.  It's not that the language is out of joint -- it isn't.  I mean, ok maybe you like or don't like COBOL syntax but that doesn't doom a language and surely C++ syntax is not the zenith of wonderfulness.  But that isn't what's holding C++ programmers back.  The biggest problem, at least in my opinion, is one of accessing new/modern runtime features that may have a different programming environment from the context of an existing environment.

Now, what does that translate to in terms of action items for you? Good question.

Kate

Wednesday, October 22, 2008 7:01:38 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, October 21, 2008

As you know if you attended the talks at Tech Ed USA and Tech Ed Europe, or listened to me on DotNetRocks, MFC now supports a Ribbon user interface. You can take some MFC application you haven't touched for a decade or more, add a few lines of code, leave all your command handlers and such untouched and -tada!- you can have a user interface from this century.

But it's one thing for me to demo for you what a tiny amount of code it takes to add a ribbon, and another for you to design a sensible ribbon that will lead your users effortlessly through your UI. Some guidance has now been released. For example, they are very clear that this is a bad ribbon:

There are tons of images and annotations to help you devise something your users will enjoy using. Please read it before doing any Ribbon work, whether in MFC or not.

Kate

Tuesday, October 21, 2008 5:09:44 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, October 18, 2008

Some schedules I have flagged with "must attend" in my calendar:

TL13 Microsoft Visual C++: 10 Is the New 6
Boris Jabes

Get more done. The next version of Visual C++ is all about improving developer productivity for large-scale applications. Learn about the IntelliSense and browsing experiences, changes to the project and build system, project-less browsing, collaboration through remote symbol indexing, and custom visualization of symbolic information.

Tags: Advanced, Languages

PC26 Microsoft Visual Studio: Building Applications with MFC
Damien Watkins

The next release of MFC will provide encapsulations around a number of new Windows platform features. With this functionality you can easily build applications that integrate into features such as desktop search, application restart and recovery functionality, leverage the new Windows UI metaphors such as Live Icons and Rich Preview. These features represent one of the most significant updates to MFC in years. Come learn the details on all these new classes so you can rapidly build Windows applications that stand out from the crowd.

Tags: Advanced, Visual Studio

TL25 Parallel Programming for C++ Developers in the Next Version of Microsoft Visual Studio
Rick Molloy

Build more responsive C++ programs that take full advantage of multicore hardware. We demonstrate how the new Parallel Pattern Library (PPL) enables you to express parallelism in your code and how the asynchronous messaging APIs can be used to separate shared state and increase your application's resilience and robustness. Finally, we take a look at some of the new capabilities of C++0x and Visual Studio to help you efficiently code and debug your multi-threaded applications.

Tags: Advanced, Parallelism, Visual Studio

Kate

Saturday, October 18, 2008 2:32:09 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, October 17, 2008

The concept of "a whole bunch of thingies" is a vital one in just about every programming language. Some languages support it right in the language itself. For example in C++ you can have an array of integers, or Employee objects, or Customer pointers. And when you use an array, you know that it's a continuous block of memory, and it's possible to interact either with just one element of the array or with the entire array. VB has arrays, and so does C#, and while the syntax is different between them, the essential concepts are not.

The thing is, an array is only the simplest and most accessible way to say "a whole bunch of thingies". It's important that you learn other ways to express that concept - typically by using a class of some sort that someone has written to represent it. There are a ton of these depending on whether order matters to you, does insertion speed matter more than traversing/iterating speed, and so on. Some folks, having learned one way to say "a whole bunch of thingies", look at all the other options, roll their eyes up into their heads, and stick with the one way they know.

This is bad. Not just because your code could be faster, neater, and easier to write, but also because arrays are really poorly suited for certain tasks. They especially hamper parallel programming - and you know that the future is concurrent, right?

Eric Lippert has written a cogent and compelling explanation of why arrays are rarely the right choice, and what you should do instead. It's written, naturally, from a C# perspective, but it's applicable to C++ and VB too. It boils down to this: Object Oriented Programming is the norm. Start trusting object writers. Use a class that someone else wrote and provided with your compiler, and you'll be a happier developer. And if you don't have some neurons fire over the phrase "considered harmful", here is a history lesson on that.

Kate

Friday, October 17, 2008 2:07:24 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, October 13, 2008

Believe it or not, this code (snipped from something larger) compiles:

  unsigned int c = ( o-----o
                     |     !
                     !     !
                     !     !
                     o-----o ).area;
  assert( c == (I-----I) * (I-------I) );
  assert( ( o-------------o
            |L             \
            | L             \
            |  L             \
            |   o-------------o
            |   !             !
            !   !             !
            o   |             !
             L  |             !
              L |             !
               L|             !
                o-------------o ).volume == ( o-------------o
                                              |             !
                                              !             !
                                              !             !
                                              o-------------o ).area * int(I-------------I) );

Not only does it compile, the asserts succeed. What's more, o is not some instance of a class, and neither is I. As you might imagine, there's some bizarro stuff behind this. Templates, operator overloads, ... it's all reasonably silly and impressive at the same time. Needless to say, the ! and -- operators do not "do as the ints do" in this case.

The files you need are at http://www.xs4all.nl/~weegen/eelis/tutorial.cpp and http://www.xs4all.nl/~weegen/eelis/analogliterals.hpp. There's an explanation of sorts at http://www.xs4all.nl/~weegen/eelis/analogliterals.xhtml but my IE7 refused to load it, so I saved it on my machine and renamed .xhtml to .html. To test the code I used VS 2008, made a Win32 console app and just pasted the body of Eelis' main into my generated main, and the body of the header into an empty header file. No strange settings required and no warnings on compile.

Try it yourself!

Kate

 

Monday, October 13, 2008 7:52:20 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, October 08, 2008

I know, I know, what could we possibly learn about C++ in 2008 by reading yet another interview with Bjarne? Well, as it turns out, I did learn some new things, so you can too. Like that the name was chosen to be short because some folks were calling C "old C" to distinguish it from "C with Classes" which was too long to say often. And after quite rightly disclaiming that "what would you do differently if you could do it over" is an unanswerable question, he answers among other things "I would have developed templates (key to C++ style generic programming) before multiple inheritance (not as major a feature as some people seem to consider it) and emphasized exceptions more." Wow! Or how about this quote:

If you look at some of the most successful C++ code, especially as related to general resource management, you tend to find that destructors are central to the design and indispensable. I suspect that the destructor will come to be seen as the most important individual contribution -- all else relies on combinations of language features and techniques in the support of a programming style or combinations of programming styles.

Another way of looking at C++'s legacy is that it made abstraction manageable and affordable in application areas where before people needed to program directly in machine terms, such as bits, bytes, words and addresses.

I do love destructors and deterministic destruction, can't deny it. The article is definitely worth a read!

Kate

Wednesday, October 08, 2008 8:24:43 AM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, October 06, 2008

Strange Maps has, well, a strange map of the island of San Serriffe. Here's a snip of it:

Semi-colonial, indeed!

Kate

Monday, October 06, 2008 2:41:26 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, October 03, 2008
This pair of podcasts snuck onto the web over the summer. This was a single interview that's been split into two parts, both pretty large files (over a hundred meg.) I talk about C++, Vista, the marshaling library and marshal-as.net, the MFC update, and plenty of other things I've blogged about here before.

Let me know what you think!

http://www.informit.com/podcasts/episode.aspx?e=3a744e05-7893-408d-91de-d73b77ddb832

http://www.informit.com/podcasts/episode.aspx?e=fc209a80-bdd7-42b4-b555-514ce882178b

These are MP4 files. The web page bugged me to install QuickTime and I did and that's what played them. You may have your own preferences - there are download links on each page.

Kate

Friday, October 03, 2008 9:20:07 AM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, September 25, 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, September 25, 2008 8:47:15 AM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, September 21, 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, September 21, 2008 8:17:44 AM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, September 15, 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, September 15, 2008 5:06:49 PM (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, September 13, 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, September 13, 2008 11:26:18 AM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, September 07, 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, September 07, 2008 10:03:39 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, September 03, 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, September 03, 2008 9:52:03 AM (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, July 02, 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, July 02, 2008 12:21:01 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, July 01, 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, July 01, 2008 11:24:58 AM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, June 29, 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, June 29, 2008 9:38:12 AM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, June 26, 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, June 26, 2008 9:44:07 PM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, June 24, 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, June 24, 2008 7:56:13 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, June 22, 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, June 22, 2008 1:54:08 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, June 20, 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, June 20, 2008 10:29:37 PM (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, June 08, 2008

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

Having a long memory for tiny details is handy sometimes.

Kate

Sunday, June 08, 2008 6:20:53 PM (Eastern Daylight Time, UTC-04:00)  #    
# Friday, June 06, 2008

In addition to the talks with C++ in the title (3 of them) and with C++ or a related word in the abstract (3 more) I listed in an earlier posting, I spotted this in a Tech Ed deck:

Heh. That sure isn't C#. What talk is it?

MBL302 Building Windows Mobile Applications That Work with Windows Vista Sync Center

The new Sync Center in Windows Vista will become the hub for all data synchronization between the PC, Mobile Devices, and online services. Take a closer look at the development framework, as well as the end-user experience that Sync Center helps create. This session dives into the code you need to write in order to plug your application into the Sync Center user interface. If you're writing an application for Windows today that has any synchronization components, you should not miss this session.
 
The speaker has a blog entry that states his pro-C++, pro-COM position unambiguously:
This is easy, this is Windows software development like it has been for at least 10 years. It is well defined, well known and well supported...go and learn C++ and COM, it is how many of the Windows Vista features are exposed to developers and with good reason. If you are not prepared to learn how to program your computer then you should question why you are in the software development business.
I think easy might be an overstatement, but I do certainly agree that "old style" programming techniques still have real value in the Vista universe. Keep your skills sharp!
 
Kate
 
Friday, June 06, 2008 9:20:52 AM (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, June 05, 2008

How many C++ talks are there at Tech Ed this year? Well if you just run your eye down the titles, you'll see these:

MBL202 Maximizing the Usability and Compatibility of Your Mobile Microsoft Visual C++ Application

This session is targeted towards native (C++) developers. The next version of Windows Mobile will have a radical new look, with lots of new common controls and UI capabilities. This session helps you understand what you can do today to minimize backward compatibility issues. We also share many tips and best practices for improving the usability and overall quality of your mobile applications.

TLA327 Parallelize Your Microsoft Visual C++ Applications with the Concurrency Runtime

Introducing concurrency into native Visual C++ applications has long been the domain of true experts and gurus. Yet, as the hardware industry shifts toward multi-core and manycore processors, all developers will need to be able to write robust and scalable parallel applications. As part of its work on Visual C++ and Visual Studio, the Parallel Computing Platform team is building a key set of technologies that will enable the development of such applications. In this talk, we explore libraries for expressing concurrency, a set of messaging APIs that allow developers to consistently build parallel applications that are robust and resilient, and a shared user mode runtime for scheduling and for coordinating system resources. Come learn about these exciting new technologies that will help bring concurrency to the masses.

TLA403 Microsoft Visual C++ 2008 for Unrepentant C++ Developers

Visual C++ 2008 is packed full of changes for those who prefer the C++ language syntax and power. This session covers STL/CLR, the new extensible marshalling library, and changes coming in the C++ standard, specifically TR1. If templates don’t scare you, Boost has intrigued you, and you’re the one everyone turns to for mixing managed and native code, this session is for you.

But there are others, they just don't have C++ in the session title.

TLA321 Microsoft Visual Studio 2008 IDE Tips and Tricks

Harness the power of the 2008 IDE using new tips and tricks used by top Microsoft MVP developers and Microsoft employees. We look at new keyboard shortcuts, new options, the powerful "Quick Command" system, macros, tweaking IDE performance, and more that will make any developer using Visual Studio instantly more productive. The entire session is hands-on inside the IDE and applicable to any language, including Microsoft Visual Basic, Visual C#, and Visual C++. If you've been using Microsoft Visual Studio 2005 or have never touched Visual Studio, you're guaranteed to walk away a VS power user.

WIN312 Windows Presentation Foundation and Legacy Code

Yes, legacy (MFC/Win32) applications can interoperate with a Windows Presentation Foundation (WPF) user interface. Companies that have large Microsoft Visual C++ codebases can modernize their legacy applications by giving them a contemporary user interface. They can do this without having to rewrite the core of their codebase. This talk presents "best practices" for how to modify an application so that the native code operates correctly with a new WPF-based managed user interface. The talk covers such questions as "Can MFC applications move to use WPF," "Does it make more sense to rewrite or upgrade the UI," and "How do you design an interop solution between MFC/Win32 and WPF?” As the talk unfolds, it includes a number of "do's" as well as "don'ts."

TLA326 MFC Updates for Microsoft Visual Studio 2008 and Beyond

This session demonstrates the new features added to MFC in Visual Studio 2008, including support for Windows Vista Common Dialogs, Vista Common Controls, the 2007 Microsoft Office system look and feel (including support for an Office Ribbon-style interface), Office and Visual Studio-style Docking Toolbars and Tabbed Documents.


If you're here and you missed one of these, grab the slides on CommNet and see if you can find the speakers on site. If you didn't come to Tech Ed this year, consider ordering the DVD of all the sessions.

Kate

(note to self: add "C++" to abstract of any future MFC talk I deliver :-).)

 

 

 

Thursday, June 05, 2008 9:05:40 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, June 03, 2008

It's one hour till my first breakout session. There isn't time enough to start anything, like actual work from the office at home. It's pointless to worry about my session - I'm well prepared for it anyway but if I wasn't, there isn't time to add a demo or change the deck or anything like that. I just have to sit and wait. It's one of my poorest skills. So I sit and stew instead, which is nowhere near the same thing.

But if you're reading this, and it's not 4:45 yet, come on to S230C and learn about MFC Updates. Why not?

Kate

Tuesday, June 03, 2008 3:48:23 PM (Eastern Daylight Time, UTC-04:00)  #    
# Monday, June 02, 2008

I've been talking with attendees already and thought I would share some ideas I've been passing along. Planning is key to getting the most out of this week. The last thing you want is to be wandering the endless halls of a huge convention centre wondering where you should go next.

Start by planning your sessions with the schedule builder. You should put at least two sessions into almost every slot. Here's why: some of the sessions you plan to go to will not be right for you. They will be too introductory, or too advanced. They will cover just one little part of a technology that you don't know enough about, or a giant overview when you've already decided to concentrate on one corner. This should be clear about 5 minutes into the talk, and then what you need to do is leave. The slides will be on CommNet or the attendee DVDs, so you can get your overview or introduction later. But this hour of your life spent in the same room with someone who knows the topic needs to be spent carefully. So you quietly leave, and head to the other session you planned for this time slot. There really isn't time for you to start flipping through the catalog for possibilities once you've already ducked out. On the other hand, if the session you chose is amazingly great, stay, and plan to get the slides for the other talk instead.

As the week goes on, you'll learn the leveling codes. Every session has a code like TLA326 (my Tuesday afternoon talk.) TLA means Tools and Languages, which is appropriate since my talk is about MFC updates the team has just delivered. the "26" part doesn't really mean anything, it's just an identifier, but the 3 is the most important part of the session code. It means this is a 300 talk. These talks are advanced level, for experienced developers. They are supposed to include:

  • Drilling into how a Product / Technology is designed 
  • Real world examples
  • Complex coding, known issues and workarounds (sample code/examples)

Compare that to a 400 level talk (like my TLA403 late Friday.) These are expert level, and likely to have:

  • Advanced coding considerations/challenges
  • Design considerations/challenges
  • Architecture considerations/challenges
  • Troubleshooting techniques at the debug level

The best description I've heard is that a 400 level talk will make your head hurt, in a good way. But really you just have to start attending talks and then you will start to see the difference. You will also start to recognize key phrases in talk titles and abstracts such as A Lap Around and know what to expect from that session.

The next tip is that sooner or later you will have a timeslot with no sessions. Maybe you ducked out of one, and then ducked out of your second choice too. That's OK! Head down to the lowest level and wander by the product team booths in the TLC, or the Community Lounge, or do a Hands On Lab. These things are often the most important part of Tech Ed. More on that later!

Kate

Monday, June 02, 2008 10:48:37 AM (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, January 29, 2008

Yes! Finally one of my favourite conferences comes to one of my ... er ... nearest cities! DevTeach, star of Montreal and recently Vancouver, is coming to Toronto and bringing many of my friends and colleagues with it. I’m speaking there too... the sessions are at http://www.devteach.com/Session.asp. My talk needs it’s abstract tweaked but the title is good: What's New in Visual C++ 2008. Register before February 1st for the early bird deal. As always, Jean Rene is offering deals to user group members and other community people, so check with your contacts if you have any.

If you’ve never been to a technical conference before, and you aren’t sure anyone would pay travel and hotel for you to go to one, DevTeach is a great way to prove the value of conferences to yourself and your boss. World class speakers (many of whom will be delivering on the same topics at much bigger and more expensive conferences just a few weeks after DevTeach), topics that are relevant to your work right now, and a marvellous delegate-friendly atmosphere combine to attract attendees and speakers – why not you?

Kate

Tuesday, January 29, 2008 11:50:23 AM (Eastern Standard Time, UTC-05:00)  #    
# Monday, January 28, 2008