Click here to Skip to main content
15,881,027 members
Articles
Article
(untagged)

A Visit to Redmond - Part 5

Rate me:
Please Sign up or sign in to vote.
4.71/5 (3 votes)
23 Oct 2000CPOL 112.2K   13   22
For those who are curious as to what a hastily scheduled trip to Redmond is like.

Introduction

The week before last I popped on over to Redmond to have a chat with the guys at Microsoft on the future of Visual C++, MFC, and the new .NET world. Instead of presenting a point list of what we can expect in the future, I wanted to give you guys a taste of what a visit to Redmond is like from a personal point of view.

Please be aware that this isn't an in-depth technical treatment of .NET - there are a million magazine articles and a ton of stuff on Microsoft's own site to get the basics. The .NET specific stuff presented here will mostly be new information that I wasn't aware of, and that I felt you guys would be interested in, or was simply a vague thought that came to me while slurping through tubs of Ben and Jerry's Fudge Chocolate Disaster ice cream.

A quick Thanks goes to Dundas Software and Microsoft for making this trip possible.

Part 5 - The Compilers

This was going to be a discussion on the libraries (namely MFC, WTL, ATL etc) but I wanted to talk a little bit more about the compiler.

Personally, I would hate to be working on the Visual C++ compiler. The guys who wrote the C# compiler must, I'm sure, wander around to the dark murky depths of the Visual C++ Compiler Developer's cage and lounge around and talk at length on how nice it is to be able to develop a compiler from scratch for a language that is so compiler friendly (well, compared to VC++). Because of the design of the C# language the C# compiler can process up to 3 million lines of code a minute. I'm also guessing there are no C# compliance hassles for the C# compiler team - though once ECMA gets through with the language there is, of course, no gaurantee that non-compliance may sneak in. A standard is merely a standard, and anyone who chooses to implement a compiler is free to change their implementation to whatever suits them (or their market) best.

This is the main problem with the Visual C++ compiler. It's up to something like its 13th incarnation, and each version is building on previous versions, with each new version being backwards compatible with those previous versions. So if someone, way back in version 2.0 made a bad call on a particular feature, then too bad - future generations are stuck with it or are forced to make horrible workarounds to cope with it. Fixing these non-compliance issues is often non-trivial but the guys at Microsoft are at pains to emphasise that when dealing with non-compliance they work at fixing the most used features first. Obviously there are economic (and time) considerations as well. Microsoft has in the past worked towards imposed deadlines (whether or not they ever met those deadlines is another story) and as the deadlines loomed certain features that were deemed, well, optional, were tossed overboard. They no longer want to work this way, and if it means release dates are strung out a little then that's the way it will be. The focus is on quality, not timeliness. Compliance was always on their minds but never as much as some would like, but they do recognise this and are trying to remedy the situation.

Let me digress and pose a question. Templates seem to be an area where religious fanaticism on compliance is particularly rife, but is this really an issue to most developers? Templates can certainly make life easier for a developer, but what about the developer who takes over the project when the original developer leaves? In the face of increased labor shortages is it really wise to be developing apps using specialised techniques for which you or your company will have serious problems finding developers who can maintain your code? Even if you do find such a developer, that person may charge a premium on their specialised services, and/or may cost more in the long run because of the extra time needed to get fully acquainted (and work) with the templatised code. Maybe I'm just a wuss and like taking the easy route to code writing, so I'd be interested in hearing your points of view.

I asked Ronald about the compiler internals and he said that the compiler gets full rewrites only occasionally. There was a rumour that the compiler code was so spaghetti-like in it's internals that no one - no one - wanted to touch the thing. He said it wasn't quite that bad. The last rewrite for the compiler was for Visual C++ version 4. Each version after this has had various revisions, additions, bug fixes, 'feature' additions (you guys know what I'm talking about) and maybe a #pragma or two to keep things interesting. All in all though, the versions of the C++ compiler we've had since Windows 95 development came into vogue are refinements on the original VC4 compiler.

As with each previous incarnation the latest Visual C++ compiler has even undergone further optimisation. Given that this is around the 13th review of the compiler, with each version gaining incremental, and smaller performance increases over the last version, it is amazing that they have tweaked a further 5% performance out of the compiler.

I've already mentioned some of the newest improvements to the Visual C++ compiler: a new crash recovery feature that allows an application to be restored to its state immediately prior to crashing allowing post mortems to be carried out; 'Edit and Continue' has been improved, and there is now public access to the debug info file

On top of these, there is also now a new /GL switch that allows the compiler to perform global optimisations across all files in a project instead of being confined to per-file optimisations. Given varying applications and files there is expected to be a gain of around 5%-10% speed increase in a typical app. Note that this switch is only a 'final-build' option, since it significantly increases compile time.

The compiler also (with the appropriate switch) now inserts buffer overrun checking code into apps that stops the possibility of buffer overrun attacks. This is a major source of attacks in applications such as internet applications and is the subject of many millions of dollars of investment by companies searching for solutions. By simply recompiling your app in VC7 (with said switch) your application will be protected. If you suspect buffer overruns may occur you can simply add your own buffer overrun event handler as a last-ditch 'I've tried everything' resort. Other problems such as the use of uninitialised variables are treated in a similar manner, and you can include your own handler in your code to take care of any uncaught instances of these.

Finally, there are new Processor Packs that you can add to the environment that allow you to target specific processors, such as Pentium III's, processors with 3D Now! etc. Gone are the days of convoluted inline assembly to target these cases. As more processors come out, more processor Packs will be distributed. Any thoughts on why Microsoft would be adding the ability to target different processors so easily? I'm sure they are just looking after us .

Next Instalment...

The Libraries.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder CodeProject
Canada Canada
Chris Maunder is the co-founder of CodeProject and ContentLab.com, and has been a prominent figure in the software development community for nearly 30 years. Hailing from Australia, Chris has a background in Mathematics, Astrophysics, Environmental Engineering and Defence Research. His programming endeavours span everything from FORTRAN on Super Computers, C++/MFC on Windows, through to to high-load .NET web applications and Python AI applications on everything from macOS to a Raspberry Pi. Chris is a full-stack developer who is as comfortable with SQL as he is with CSS.

In the late 1990s, he and his business partner David Cunningham recognized the need for a platform that would facilitate knowledge-sharing among developers, leading to the establishment of CodeProject.com in 1999. Chris's expertise in programming and his passion for fostering a collaborative environment have played a pivotal role in the success of CodeProject.com. Over the years, the website has grown into a vibrant community where programmers worldwide can connect, exchange ideas, and find solutions to coding challenges. Chris is a prolific contributor to the developer community through his articles and tutorials, and his latest passion project, CodeProject.AI.

In addition to his work with CodeProject.com, Chris co-founded ContentLab and DeveloperMedia, two projects focussed on helping companies make their Software Projects a success. Chris's roles included Product Development, Content Creation, Client Satisfaction and Systems Automation.

Comments and Discussions

 
GeneralPlease come to pointtt tt t !!!! Pin
Azghar Hussain1-Dec-03 20:01
professionalAzghar Hussain1-Dec-03 20:01 
QuestionWhy they said WTL is a mistake? Pin
7-Feb-02 6:07
suss7-Feb-02 6:07 
GeneralCompiler is not a black-box Pin
Feng Yuan (www.fengyuan.com)24-Oct-00 18:34
sussFeng Yuan (www.fengyuan.com)24-Oct-00 18:34 
GeneralRe: Compiler is not a black-box Pin
Jonathan Gilligan24-Oct-00 22:26
Jonathan Gilligan24-Oct-00 22:26 
GeneralTemplates Pin
Ian Kilmister24-Oct-00 11:56
sussIan Kilmister24-Oct-00 11:56 
GeneralRe: Templates Pin
Walter Sullivan24-Oct-00 13:49
Walter Sullivan24-Oct-00 13:49 
GeneralRe: Templates Pin
Aza23-Jan-02 23:37
Aza23-Jan-02 23:37 
GeneralC'mon Chris, you're better than that! Pin
William E. Kempf24-Oct-00 9:18
William E. Kempf24-Oct-00 9:18 
GeneralRe: C'mon Chris, you're better than that! Pin
Chris Maunder24-Oct-00 9:51
cofounderChris Maunder24-Oct-00 9:51 
GeneralTemplate guys are so tense Pin
1-800-VALIUM24-Oct-00 9:59
suss1-800-VALIUM24-Oct-00 9:59 
GeneralRe: Template guys are so tense Pin
William E. Kempf25-Oct-00 4:15
William E. Kempf25-Oct-00 4:15 
GeneralWhy I need better template support Pin
Jonathan Gilligan24-Oct-00 13:26
Jonathan Gilligan24-Oct-00 13:26 
GeneralRe: Why I need better template support Pin
Twain Summerset24-Oct-00 21:38
sussTwain Summerset24-Oct-00 21:38 
GeneralWTL Pin
Christian Andersen25-Oct-00 2:41
Christian Andersen25-Oct-00 2:41 
GeneralRe: C'mon Chris, you're better than that! Pin
William E. Kempf25-Oct-00 4:05
William E. Kempf25-Oct-00 4:05 
GeneralExample does not convince me. Pin
Sito Dekker24-Oct-00 10:53
Sito Dekker24-Oct-00 10:53 
GeneralRe: Example does not convince me. Pin
Chris Maunder24-Oct-00 11:35
cofounderChris Maunder24-Oct-00 11:35 
GeneralRe: Example does not convince me. Pin
Walter Sullivan24-Oct-00 13:46
Walter Sullivan24-Oct-00 13:46 
GeneralRe: Example does not convince me. Pin
William E. Kempf26-Oct-00 3:36
William E. Kempf26-Oct-00 3:36 
GeneralBoost? Pin
Kees Lairstra24-Oct-00 13:10
Kees Lairstra24-Oct-00 13:10 
GeneralRe: Boost? Pin
William E. Kempf26-Oct-00 3:40
William E. Kempf26-Oct-00 3:40 
GeneralRe: C'mon Chris, you're better than that! Pin
Daitya Rakshasa26-Oct-00 22:02
sussDaitya Rakshasa26-Oct-00 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.