Enforcing Source Code Standards using Visual Studio: enhancing the C++ code wizards.

It has been a long while that I was planning on writing an article about the Visual Studio wizards and more particular, the c++ wizards. It was even before I started this web log. At that time not that much information was available, so I had to dig deep into the wizard code of Microsoft. But this helped me learn a lot to.
Today, there are some interesting articles available about the code wizards. But I still found some information at that time that I haven’t found anywhere else yet. So I would like to share it with you.
And that is why I still wrote my article, all though it is somewhat shorter than planned because I didn’t feel like repeating the available information.

Continue reading

Learning C++

While updating an application from visual studio 6.0 to Visual Studio.NET 2003, I think I have discovered a new way of learning C++, allthough somewhat expensive it really gets your hands dirty:

  • Install Visual Studio 6.0
  • Install Visual Studio .NET 2003
  • Get yourself a copy of the C++ standard
  • Write a program in C++ using the 6.0 version, writing as few code as possible
  • Import the project in the .NET version
  • Compile the program
  • Using the standard, try to explain every compilation error

Success… 🙂

Who is using… C++ Template Metaprogramming

The first timei’ve read about template metaprogramming was thanks to Andrei Alexandrescu (http://erdani.org/). I was just starting to actively use C++ at my job, so i wanted to know everything there is to know about it. I had read several books on C++, from entry level books which initiate you in its most basic syntax to ones that introduce you to higher concepts like the STL.

But know i felt ready to enter the next level: actively using template programming. I read two books: first ” C++ Templates: The Complete Guide ” by David Vandevoorde and Nicolai M. Josuttis and then ” Modern C++ Design: Generic Programming and Design Patterns Applied ” by the above-mentioned Andrei Alexandrescu. I think it’s fair to say that to most people reading this last book, it opens a complete new view at programming with C++. But i also think that most people think of it as being hard.

So i started asking myself:
Who is using template metaprogramming in his day to day programming?
And by “using” i mean:
– using the existing libraries (Loki library, Boost MPL, other)
– making use of template metaprogramming techniques in their own code.
What are you using template metaprogramming for?
Is the company you work for into constructing C++ libraries , or are you using it inside your company’s product?
Looking back at your usage scenario, do you think it’s worth it?
Template Metaprogramming being hard, i often wonder if it’s worth the trouble? I mean: what is i constructed some nifty use of the technique but most programmers don’t really understand what’s going on, did i not create a maintenance nightmare instead of solve one? So if you used it, would you use it again? If you used it, did you factor it out after having being sick of explaining 1000 times your code.

In short: what is your opinion on Template-Metaprogramming? Is it realy usefull or is it “C++ macho-ïsm” (Look what i can do with C++!!!).

Thanks.