Case Insensitive Strings

Recently I’ve been asked how you can make method find of std::string case insensitive. An obvious solution is to transform the strings to lower case, for instance, and perform the search in lower case. The solution has some inconvenients and a clean and nice solution is defining custom traits that ignore the case. The solution I’m … Read more

Finding an Item in a CTreeCtrl

If you want to find an item in a tree control (CTreeCtrl from MFC) by its name you need a recursive function. Below is a function that does that. How does it work: you pass the text of the item to search, the tree reference and an item in the tree. The function will search … Read more

Redistributable Assemblies, WinSxS and VisualStudio 2005

You might be interested in this topic if you experienced the following problem: developed your VC++ application with Visual Studio 2005, it worked ok on your computer and when you put it on another it does not run, or your application run both on your machine and other machines (without VS 2005 installed), but after … Read more

UNICODE support in the C++ Standard

The Oxford meeting of the ISO C++ standards committee between 15-20 April resulted in new features beeing into the draft paper of the C++0x standard. One of the features refer to Unicode support: a new header, called <cuchar>, was introduced. This header makes available new built-in types char16_t and char32_t, as well as new prefixes … Read more

‘Orcas’ Renamed Visual Studio 2008

Monday, June 4, Microsoft announced during the TechEd 2007 conference in Orlando, Florida, that Visual Studio code-named ‘Orcas’ was renamed Visual Studio 2008. They also announced that a second beta version will be available by the end of the summer, and it will include Visual Studio Shell, which allows developers to create an distribute tools built … Read more

My CodeGuru Articles on LINQ

Recently CodeGuru published the last part of my introductory series of articles on LINQ. Here are the links to the articles: Introduction to LINQ, part 1: LINQ to objects Introduction to LINQ, part 2: LINQ to XML Introduction to LINQ, part 3: LINQ to SQL I hope you’ll enjoy and benefit from the reading.

Write Unmaintainable Code

Every once in a while, I run into this site teaching techniques for writing unmaintainable code. Of course, the hole purpose is to teach exactly the contrary (or at least that’s what I hope). Some of my favorite techniques are: use of single letter variable names, which of course makes searching almost impossible, and even less … Read more

Happy Birthday Star Wars!

Today we celebrate 30 years since Star Wars, A New Hope was released. It is estimated that 1 billion people have seen the movie. Here are my favorite lines from the saga: Obi-wan “Use the Force, Luke”. Leia: “I love you”. Han: “I know!” Vader: “I am your father.” Luke: “No. No. That’s not true! … Read more