GoingNative: a New Channel 9 Show Dedicated to Native Development

GoingNative: a New Channel 9 Show Dedicated to Native Development

  • Comments 51

imageGoingNative is a new, monthly show on Channel 9 dedicated to native development and native developers, with an emphasis on modern C++. In our inaugural episode, we keep things light and easy as we introduce you to what we're doing, why we're doing it, and how it will go down.

The main goal of episode 0 is to introduce the cast of characters, including your hosts Charles Torre and Diego Dagum, and to present some ideas of how we think this show will be organized and executed. For example, Diego and Charles will typically construct the show, iterate through some code demos of varying complexity, converse with native developers from Microsoft and across the industry, and then destruct the show. 
In this first episode we do talk about and demo a few new C++ features (shared_ptr, lambdas, auto) and have a conversation with Ale Contenti - development manager of VC's front-end compiler, libraries, and IDE.

[You can play around with the demos in this episode by downloading the free VC++ Express IDE]


Table of Contents (click time code links to navigate player accordingly)

[00:09] Charles and Diego construct the show and talk about modern C++ (how 'bout that set, eh?)
[07:27] Diego demos shared_ptr
[10:01] Charles and Diego chat briefly about C++ lambdas
[10:32] Diego demos lambdas
[12:13] Charles and Diego chat briefly about C++ auto keyword (seen in the lambdas demo)
[13:30] Charles and Diego talk about the audience and how you can help us fly this plane
[15:32] Charles interviews Ale Contenti
[26:35] Charles and Diego destruct the show ( it won't usually take this long Smiley )

 

Go native!

  • Wish I didn't know you, and you don't know me, a-ha: They provided header initializer_list so it would indicate that initializer list would be supported, wouldn't it?

  • @wish and by the way aren't those compilers you mentioned free?

  • @grumpy What it means is that .NET should be avoided if one cares about app performance.

    And yes, ANY .NET code will slow down app for the reason that ANY .NET code requires ENTIRE .NET env to be running.

  • I agree that we should ask the VS team to improve the performance of VS without restricting their choice as to how exactly to do it. As long as the performance is good, I don't care whether it is .NET or not. I don't think 'Knowing me knowing you, a-ha' would care either. He just thinks .NET is part of the problem, that's all.

  • @PleaseFixYourBugs actually I do care, this is why (it is my response to sbi when he said here visualstudio.uservoice.com/.../2059755-move-forward-and-bring-back-vs-ui-written-in-nativ that he didn't care about what language is being used):

    "@sbi I see where you’re coming from but I think we need to care which language, reason being if we want results to become better and better, we need languages to continue to develop(become better and better). For that we need people who are passionate enough about a language to see how far they can take it. It is important for a language to be in constant use and to be promoted. Otherwise it will stagnate and eventually die. That’s why they re-wrote VS. Fortunately it backfired, proving that .NET is inadequate for such tasks. C++ rules and rocks!"

  • For the record, I think that .NET is part of the problem as well, as 'Knowing me knowing you, a-ha' does.

    I have been writing managed code since the very beginning of .NET, I still remember when .NET was called NGWS. I used to hold what seemed to be a pretty common view that managed code might at first come out slightly slower than the equivalent unmanaged code, but that this does not matter because managed code is much faster to write and thus if you spend the extra time profiling and optimizing it, you will make up for the performance difference and possibly even make managed code faster than its unmanaged counterpart. Well, boy, was I wrong. This turned out to not be the case at all.

    First, managed code is only visibly faster to write than unmanaged code if your project is small. If your project is large, the speed with which you can add features or fix bugs depends mostly on how the project is structured, not on whether your code is managed or unmanaged. You can write in C++ or in C# and it does not matter, what matters is how many logical pieces of code you have to modify or account for. Of course, if you care about the structure of your project (and you should), you can create perfectly good structure in unmanaged code, with about the same effort as in managed code.

    Second, you can, of course, profile and try to optimize the heck out of managed code which is slower than you want it to be. But, the truth is, very soon you are going to hit a certain performance ceiling which will be very hard to overcome without either radically changing the design or the algorithm, or rewriting the critical path in unmanaged code. You *can* choose to change the design or the algorithm sometimes, but that would be pretty rare, because *normally* the algorithm is already the fastest available, and the design is not all that bad either, and a number of other features in the product depend on the design already, and thus changing it will take a lot of time, etc. So, *normally* you are going to rewrite the critical path in unmanaged code. Which kind of makes the point.

    If your application contains places where the performance of the code is going to make a difference (almost all applications do), chances are, these places will end up written in C++. If your application is also reasonably large (say, 250k+ lines), you aren't going to enjoy any of the 'rapid development' benefits from writing managed code over unmanaged. Which makes one wonder, why use managed code at all...

    In sum, can the VS team make VS2010, say, as fast as VS2005 while still using .NET? Sure. If they set out to do this, will .NET be more of a help or a hindrance? We'll never know, because obviously the VS team won't say anything bad about .NET ever. From my experience, however, .NET would be a hindrance.

    @Knowing me knowing you, a-ha: Point taken.

  • @Reza

    The only way how to get better performance from VS2010 is to disable Microsoft Intelisense completely (Options/Text Editor/C++/Advanced/Disable Database=true). It is totaly useless for big and even middle code bases. MS simply didn't fullfiled the promises about new shiny fast intellisense here. New intellisense is a crap and if you work on some serious project, not on the children toys, it only gets you a few days to realize it. You said you are already using Visual Assist so you won't loose any completition features. As for resource editor you can still use it - see the workaround here: connect.microsoft.com/.../solution-resource-view-empty-when-option-disable-database-c-is-set-to-true

    Some more speedup during compile time can be achieved by disabling generation of all these .bsc, .sdf files. The solution conversion wizard seems to leave the settings turned on although there have probably no use in VS2010.

    Use /MP option in your builds

    Hope it helps

  • By the way, another common view on the performance of managed code I used to share, which turned out to be much too optimistic: that the performance of JITted managed code would eventually be better than the performance of compiled unmanaged code, because a JIT compiler can take into account the information that a regular compiler does not have -- the architecture of the machine, the amount of RAM, the relative performance of the IO interfaces, etc, etc -- and produce code that would be optimal with respect to these factors.

    This did not happen at all.

    How exactly it did not happen:

    * the regular compilers started emitting different function bodies optimized for different processor architectures, transparently,

    * the amounts of RAM, relative IO rates and everything else turned out to be too generic to micro-optimize for,

    * the ultimate way to achieve better performance, parallelization of the task to many cores, turned out to give its best if the code is specifically rewritten for that by a developer, with non-trivial tuneups (eg, for memory access patterns in GPGPU kernels) making a huge difference in the final performance.

    As usual, life turned out to be way more complex (and interesting!) than people thought it would turn out to be.

  • @Tomas Pecholt

    First thanks for the suggestions. I knew about the resource editor workaround but what about the events editor, add class, class view and class wizard? Disabling code browsing database means loosing all those features that we had back in VC6. We can't even double click buttons to edit it's handler. The most important reason for us to upgrade to VC10 was to enhance developers productivity and look what we achieved.

    And of course like I mentioned before, the compiler and the library are great but the IDE is almost useless.

    @grumpy

    Thank you. I'm going to give it a try on windows 7 x86 this week but I doubt any major difference.

  • Reza,

    My solution to VS slowness was a new i7 computer with a 6GB SSD for a primary disk.

    Good luck.

  • KMKY> They provided header initializer_list so it would indicate that initializer list would be supported, wouldn't it?

    That was my fault. See: connect.microsoft.com/.../the-initializer-list-header-in-the-vc10-release-candidate

  • Stephan, So my title for this bug I've filled fits even better...

    On top of that we, what is it? bit under a year before next release already been told that one of the coolest (arguably) features WON'T be implemented.

    That's why I tried to ask you Stephan if you could tell us, not just me but entire C++ community which is supposed to be so important for VS team, which features from C++11 will be implemented in Very Slow 2012 but as you've explained, you've been told that you cannot talk about it.

  • I am a silent reader of this blog but Knowing me knowing you, a-ha is obviously trying to provoke people.

    You do realize it is beyond Stephan's pay grade to make such announcements right?

    Simply be patient and announcements will come in time.

    And on the other hand no one at Microsoft is forcing you to use Visual Studio as your C++ IDE.

  • Reza

    I think the perfect solution doesn't exist. And I don't think i7 with SSD disk would make it usable for me with intellisense turned on because we are working with many milions of LOC here. So what I did was disabling intellisense and installed Visual Assist. That solved most of my problems. I don't care classwizard and events editor don't work. They didn't work in previous versions too. I am used to maintain MESSAGE_MAP manually and it's not a big burden. This is the best what I found.

  • @Viktor Firstly I want to assure you that I do not want to provoke anyone. I'm just being direct in my correspondence. And I'm being direct in hope to get direct answers/responses. As you hopefully went through my posts here or on connect you must've see that I'm always being polite and as courteous as necessary. I also use sometimes strong words, but those are used in extreme situations when I feel that extreme situation needs extreme "treatment".

    Secondly if you go through my "dialog" with Stephan you'll see that I'm being polite, and I cannot see where the "provocation card" pops up from.

    And I think the most importantly when you're saying:

    "And on the other hand no one at Microsoft is forcing you to use Visual Studio as your C++ IDE." I just want you to note that when I (and my company I work for) ALREADY have been using VS for a long time and I (and my company I work for) ALREADY spent substantial amount of money, I feel that I AND ALL USERS DO HAVE A RIGHT to expect high quality product for such a price and also I AND ALL USERS DO HAVE A RIGHT to express my dissatisfaction with a product which we purchased for a substantial amount of money. Don't you think that it makes sense?

    Regards

Page 3 of 4 (51 items) 1234