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

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

  • Comments 23

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?

Leave a Comment
  • Please add 5 and 7 and type the answer here:
  • Post
  • I don't ever see WpX allowing Win32 API access (as in, calling CE OS APIs).  Maybe native code, but with restricted access to any API, or perhaps no API access at all: pure code only.  However this was done before - getting managed memory to native code, and back, would have to be improved.  Maybe better MMUs have come about since those days.

    That would be doable in my opinion, provided the rest of the API (i.e., Silverlight) was complete.  Right now, the networking API is sub-par, for one.

    Three in a row?

  • Somebody know the actual real, WP7 does not include C++ language support?

  • Somebody know the actual reason why WP7 does not include C++ language support?

  • Please, some love for Native Code on Windows Phone! Silverlight for the UI and native code to do the "dirty" stuff :)

    Also, Game Engines will greately benefit from native code. The Xbox branding on WP7 should be more then just the name. MSFT has the one of the most popular consoles of all times but iPhone is getting all the attention when it comes to games! Please, either step-up the game with XNA or give us more control. If you don't like the result - don't approve the app. That's what your Certification Process is made for!

  • Thanks you all for the comments, guys, and please keep speaking up. The decision of enabling native development in Windows Phone, as well as for games, are to be taken by other teams but in saying this I'm not saying "not my business." I just tell that to let you know that we (the VC++ team) are working with other teams in making that possible. Definitively, your voice is fundamental.

  • I have written a couple of apps for WP7. I have to say the performance really is disappointing (Have apps on other platforms). I would truly love a Native Code for my apps. It would be easier to port my existing apps to WP7!

    Thanks for your effort!

  • Maybe Microsoft is not seeing the big opportunity here. My argumentation:

    - Native Code for iOS is very difficult because the majority of Devs need to learn Objective-C  (I am not a big fan of Objective-C - code looks so ugly)

    - Android has fragmentation issues so you can't use any deep optimizations.

    -> WP7 could allow real clean C++. I promise, I will not overuse pointers ;)

    A man can dream ?

  • Things are starting to move? www.pocketgamer.biz/.../news.asp

Page 2 of 2 (23 items) 12