C++ Renaissance: First Symptoms of Contagion in Traditionally Non-Native Teams

You may already know Pete Brown but if you don’t, I’ll briefly introduce him here: he’s, like me, a Community Program Manager with Microsoft but while I’m focused on C/C++ languages and the Visual C++ tool, he’s devoted to client-side development technologies (mainly WPF and Silverlight, with some Windows Phone 7 and XNA, a bit less of HTML and JavaScript –Rey Bango covers these two web techs- and a bit of C++ as well, although this last hasn’t happened for months, if not years (even before last December, when there was no C++ Community PM at all). In his own words:

My C++ is slightly more rusty than an old tractor left in the back field for most of the century.

He recently had a problem to solve, he needed a fast, smart way to collect online resources for his own weekly report: the Windows Client Developer Roundup which, among others, inspired our Visual C++ Weekly. The tedious part in his case was to copy/paste titles with some special format, while eliminating some tracking stuff in the companion URL. That for each of the 25 links he includes per week.

He decided to create a browser add-in to deal with this all at once. Hopefully his solution will also serve to you if you need something similar, if you were planning to create an add-in or at least if you’d never considered that chance and his approach inspires you for any other problem you were having in browsing web pages.

But I’m not to reproduce his whole post here, just wanted to highlight the two main reasons why he chose ATL (and C++) and not any of the techs he’s more used to.

One of his reasons is very rational:

You can create add-ins using .NET and Script, but both have significant limitations as well as performance concerns. If you want to write an add-in of any complexity, you’ll almost certainly want to write it in C++.

This demonstrates that Pete thinks as an architect when solving problems: he’s just not tied to the technologies he masters but he privileges the most adequate solution for a given problem. This principle applies, of course, for us as well: we should prefer alternative technologies to C++ when more adequate to solve a specific problem.

The other reason adds some emotional component:

I specifically wanted to do this in C++. No, not because I hate myself, but because I’m starting to see a resurgence of interest in C++.

Well, I said emotional although mixed emotions in any case: how is that about hating oneself if someone chooses C++, Pete? Hot smile In the same sentence, however, he opens the door to some hope when talking about a resurgence of interest in C++. He wanted to give C++ an opportunity to delight him back like before the rise of managed languages.

I haven’t talked to Pete for months. We used to report to the same manager a while ago when I was editorial director of MSDN Magazine but since I moved to Microsoft building 41 (where the Windows C++ team “lives”) I lost all contact with him. Looks like if he sees some C++ resurgence out there, it wasn’t me! Smile

Love is in the air so, dear readers, blog followers and C++ lovers in general: let’s keep beating our drum. Even louder. This is not about supplanting managed languages with C++, but just putting C++ back in the place it deserves as preferred technology to fully get the power and performance a platform features.

His solution may not have been the best as himself prevents:

Keep in mind, I’m relearning C++. If I did something dumb, don’t hesitate to (nicely) point it out in the comments, especially if it’s something other people shouldn’t repeat in their own code.

He finally states

Works On My Machine.

Period. Angel

He just got three (3) comments by the time I’m writing this, what makes sense to me as I don’t believe that a huge crowd of C++ developers follow his blog. Why don’t we help him tune up his C++ background by signaling areas of improvement? That may pay back if Pete feels encouragement to keep addressing us as one of his audiences in the near future.

His approach is posted here: http://10rem.net/blog/2011/02/22/creating-an-internet-explorer-add-in-toolbar-button-using-cplusplus-and-atl.

Is this signaling that we’ll start seeing more C++ flirting from other community PMs?