# Wednesday, 09 February 2011
At the end of January, the busy bees at All-in-One (OK, they're not bees, they're Microsoft engineers) released even more samples including Azure, setting a hotkey that Windows will route to your app even if it doesn't have focus, detecting if the machine has been locked (with Windows+L) or unlocked, downloading multiple files with ftp, and many more. As always these are in VB, C#, and almost all of them are also in native C++.

In fact, there are just so darn many samples right now that it's getting harder to find the one you want. What a great problem to have! So they've released a sample browser to help you search and browse and generally get your hands on the code that will solve your problem and move you on to the next part of your day.

What are you waiting for? Go get it!

Kate

Wednesday, 09 February 2011 11:41:05 (Eastern Standard Time, UTC-05:00)  #    
# Monday, 07 February 2011
The architectural tools in Visual Studio Ultimate are fantastic. Often, people think they're just for for managed code, though. Not so! Here's a page on MSDN that shows how you can use Layer Validation to validate your architecture. You'll need the Modelling and Feature Pack and parts are a little fiddly, but it can be done!




No reason to assume the architecture tools are not for C++ developers, too.

Kate
Monday, 07 February 2011 11:08:49 (Eastern Standard Time, UTC-05:00)  #    
# Saturday, 05 February 2011
Adding concurrency to an existing application can be remarkably simple. I have a demo where I change a for loop to a parallel for and -poof!- the app gets faster. The hard part of that demo is knowing that a given loop is ok to parallelize, that it doesn't matter what order things are done in as long as they all get done once. And, of course, knowing that the loop in question is responsible for your execution time. Making the right decision is the hard part - typing the code is easy.

With that in mind, you need advice about choosing your structures and algorithms. Here are some handy things that may help you. On the native parallel programming blog they will help you choose your parallel sort. And on the VC++ blog, it's all about the parallel containers. If you're going to write parallel code (and let's face it, eventually you will) you need to read this sort of thing.

Kate

Saturday, 05 February 2011 10:42:30 (Eastern Standard Time, UTC-05:00)  #    
# Thursday, 03 February 2011
Here's a useful blog entry from Nish that shows how simple it can be to handle what at first seems an intractable problem - how to get an unmanaged array into a managed array. The marshaller doesn't know the size of the array, but as long as you pass the length as a parameter, you can create the array yourself and copy the contents over. Not hard at all, once you know.

Kate

Thursday, 03 February 2011 10:25:52 (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, 01 February 2011

Like a lot of folks, I have a Windows Phone and I enjoy it a lot. I've filled it up with (free) games and they pass the time quickly when I have to wait in line or otherwise have an empty minute or two. C++ MVP Marius Bancila had the same experience, but unlike me he responded by writing a version of the game in MFC so he could play it on his own PC as well as on a phone.

You can get the source from his blog post, and another post and its comments (mostly in Romanian - Bing Translate is your friend there) have a nice discussion of performance issues. After all, whenever two or more C++ programmers gather together, someone is going to have an opinion about performance. Take a look for yourself!

Kate

Tuesday, 01 February 2011 18:45:11 (Eastern Standard Time, UTC-05:00)  #    
# Sunday, 30 January 2011
There are some really amazing WPF applications out there, and many of them are extraordinarily beautiful. I am not very good at making beautiful applications, though the WPF themes help avoid the "grey boxes on a grey background" look I usually achieve. Now if you want to develop an application that presents a whole new paradigm, there should be someone on your team who really "gets" user experience and how colours work together and so on. But what if you just want to make the same sort of apps you've always made, using the latest technology instead of something a little older? You want to think the way you thought when you were doing Windows Forms, for example, and use the same tools, but end up with a WPF application or a Silverlight application.

Well, Pete Brown has an interesting blog post speaking directly to this kind of developer. He makes the case that for these kinds of applications, you don't need to add a designer to the team. Plenty of screenshots to support his theory - see what you think. I think I agree, myself. Because the post was last year, there's lots of interesting conversation happening in the comments, too, so be sure to read those while you're there.

Kate

Sunday, 30 January 2011 18:48:22 (Eastern Standard Time, UTC-05:00)  #    
# Friday, 28 January 2011

Despite this rather famous xkcd comic, most developers would rather spend as little time compiling as possible:

But most of us how no clue why a build takes as long as it does, or how to make a project build faster. I mean sure a Clean and then a Rebuild will take longer than an incremental build. But beyond that, which is quicker - a debug build or a release build? Debug puts more information in, but it doesn't optimize - which wins? Does it make a difference if you keep Visual Studio up all day or if you close and re-open it from time to time? Are there options you can set that make your builds faster? All this and more is covered in remarkable detail in a new blog post from the Visual C++ team. You need to read it.

Kate

Friday, 28 January 2011 18:36:46 (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, 26 January 2011
Not everyone knows that the Windows SDK includes a C++ compiler and linker that you can use if you don't have Visual Studio installed. Of course, Visual Studio Express is free, and you could use that to compile and link C++ apps. The advantage of using the tools that come with the SDK is that you don't have to install and configure a lot of stuff to get started. On a new machine that may appeal to you.

Gus Class has posted a super-quick 3 minute video that shows how to compile one of the SDK samples using only the tools that come with it. I just wanted to elaborate on one thing. The SDK installs, by default, under Program Files. As you probably know UAC prevents applications from writing to any folder under Program Files unless the application is elevated. That's why Gus launches an elevated command prompt in this video. If you don't want to elevate your command prompt, you'll need to move the sample folders and adjust your path accordingly.

Three minutes. Worth a watch. It's always good to have some tricks up your sleeve on a new machine.

Kate

Wednesday, 26 January 2011 18:25:57 (Eastern Standard Time, UTC-05:00)  #