# Saturday, 27 August 2011
I was poking around on CodeProject looking at some developer interviews (they've started these up again with some interesting subjects, so check the recent links) when I spotted An interview with Microsoft's new Visual C++ .NET community liaison - and in March 2002, nearly a decade ago, that was Herb Sutter. Isn't the Internet a handy attic? Check out some of these quotes:

I hope to make a noticeable mark in the product.

C++ continues to be relevant, dominant, and in widespread and still-growing use. The C++ standard and standardization process also continues to be relevant [...] all the vendors, including Microsoft, are there together actively working on the next-generation C++0x standard whose work is now getting underway.

[...] the best numbers I keep seeing put the global developer community at something like 9.5 million people, and those using C++ at about 3 million of that. That's well ahead of Java in nearly all studies I've seen, by the way, usually by a factor of 1.5-to-1 or 2-to-1. [...] The reports of C++'s demise have been, well, "exaggerated."

C++ developers need power and know how to use it. I've always said you should use the best language for the job, and I've used dozens of languages professionally. Depending on how you count languages, I've probably used a dozen professionally in the past year. People who want to write efficient, tight, fast code often tend to choose C++ because it lets you get the job done with powerful code but without sacrificing efficiency. 

People who want mature, stable compilers and tools often tend to use C++ because it's been around a while and the tools and libraries are plentiful and solid. Commercial client-side application development with more than a few screens, most kinds of server-based software, and most kinds of libraries are all done more often with C++ than with other languages, according to the best numbers I've seen and according to my own experience as a developer and as a consultant who shows up at other developers' shops.

Nine and a half years later, I see nothing but good stuff there. I hope all my interviews stand up as well (though I already know they wouldn't) and I'm impressed at the ability to set a goal and meet it. What will the next decade bring?

Kate

Saturday, 27 August 2011 15:53:50 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 25 August 2011
The cone of silence that descended this summer is starting to fray a little. The Visual C++ Team Blog has an entry talking about Productivity features in the IDE. They're willing to talk about:
  • Semantic colorization - this is actually as much font face as it is colour, but anyway function parameters look different from locals, constants you #define'd look different from everything else, and so on.
  • Reference Highlighting - you've seen this in other languages I'm sure - when the cursor is in a variable name, other places in the code with that same variable name are highlighted for you. It can be very helpful.
  • Replacement Solution Explorer - I'm a huge Pro Power Tools fan, and if you've used Solution Navigator, you won't be surprised when you meet the new Solution Explorer. Combination Solution Explorer and Class View is the best way to explain it to a C++ developer.
  • Aggressive IntelliSense - something else you may be familiar with from other languages. I like it.
  • Snippets - oh, yeah!
Apparently there's still plenty more to come! Looking forward to it.

Thursday, 25 August 2011 15:43:15 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 23 August 2011
C++ is a great language for writing applications that will run on a number of platforms. There are compilers for many different platforms, and some powerful libraries you can use. Still, in the end your code needs to talk to the operating system, and that means that most cross platform applications have at least a few little corners where platform-specific code lives. The challenge is how to ensure that your Windows code runs on Windows, your Linux code runs on Linux, etc, without maintaining a number of different branches or hand-merging and splitting every time you deploy.

Being C++, an unspoken requirement in solving this problem is "be as fast as possible". Putting everything through a library and paying for extra indirection, looking up something that cannot change once the program has started executing, is not as fast as possible. You also want developer convenience and productivity. If you support five platforms, and something is the same on four and different on one, copying that code around for the four that are the same is not a productive way to behave. You would like a default behaviour, and then special code for special cases.

Michael Tedder has an intriguing approach using templates. As he says:

Instead of declaring a base interface class with virtual functions then deriving each platform with a different implementation, we declare a class with one template parameter — a platform ID — then specialize it to provide a different implementation for each platform.  The template class is then typedef‘d to expose the specialization for the platform ID being compiled to the application, allowing the implementation to be used without any virtual functions and also allow for inlining of functions as well.

He has some pretty convincing armwaving about using this not for just Windows/Linux/Android but for any hardware differences even on the same operating system - like what kind of graphics architecture you have or anything else that can't change at runtime. It's a good example of how the power of templates makes things possible that would always incur a runtime cost in any other language, or a significant burden on a developer to move code around building custom versions of an application. Worth a read!

Kate

Tuesday, 23 August 2011 14:55:55 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 21 August 2011
Here's an interesting project I came across:




The game is Mastermind, which many people already know. What caught my attention is that it's done in C++ and XAML. To quote Tyler Whitney's blog post,

The Mastermind code sample demonstrates how to create a simple Silverlight storyboard in Expression Blend 3, and then provide the code for the state transitions in Microsoft Visual Studio 2008. You can also see how to create brushes programmatically and how to add a title bar to a Silverlight-based app.

The code is on the Microsoft Code Gallery (only Microsoft Employees can publish there) and Tyler has been updating the article over the summer. Nice way to see how to combine two technologies some people would never thought have combining.

Kate
Sunday, 21 August 2011 14:41:42 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 19 August 2011
I have talked about plenty of C++0x (soon to be known as C++11 or just plain C++) features over the last little while. Here's a nice summary by Danny Kalev of the top features and why they matter. He covers lambdas, auto, the new ways to initialize instances (which hasn't been covered much elsewhere and contribute a lot to readability), suppressing default versions of functions (like constructors for example) or specifically requesting them (how cool is that?), nullptr (which I love because it eliminates a late night drinking argument about "what if someone #defined NULL to 3, would your code still work?", and rvalue references -- and those are just the language changes! His library coverage is super terse, but there are links in it if something (*cough* shared pointer *cough*) catches your attention.

There's no reason for a C++ developer to ignore C++11. This is big stuff, and reading these "what's new" lists from a variety of different people is essential for getting perspective on the changes. So read Danny's list!

Kate

Friday, 19 August 2011 13:51:01 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 17 August 2011
Everyone knows that C++ is the language to use when speed matters. That's just a known fact. So here's a question: if you solved the same problem in both C++ and C#, using the generally available languages (the Standard Library for C++, the .NET Base Class Libraries for C#) and you didn't happen to know which parts of those libraries weren't implemented very efficiently, just wrote your apps -- which would come out faster and by how much?

Think you know? Of course, the answer is "it depends". Debug or Release builds? Laptop or handheld device? Whose implementation of the .NET Framework are you going to use - Microsoft or Mono? What chip are you running on? Oh, and to what extent are you deliberately setting C++ options that emphasize runtime speed? Also, did you choose an algorithm with a lot of generics or templates? C++ has a huge perf advantage there, but lots of benchmarks don't use generics or templates since they are solving one specific problem.

An article on CodeProject leapt into all of this feet-first and did some measuring. Along the way, "Qwertie" proved a universal rule of the internet: nothing will get you the answers you seek faster than posting the wrong answer. Want to know the exact date Bewitched switched Darrens? Find a place that discusses old TV shows and post your belief that there was only one, or that there were seven, or whatever, and people will correct you while the ads are still loading on their copies of the page. When Qwertie posted the first version of the benchmarking article, commenters were quick to say "but you made this mistake, and that mistake, and forgot this other thing" all of which led to a much better article.

Definitely worth a read. It gets you thinking about the things that truly affect performance. Absent-mindedly deploying a Debug build is going to cost you far more performance than your language choice ever will. Using a library in a performance-sensitive situation without understanding whether the library is high-performing or not will too. It's chock full of graphs like this one:




Don't read it to find out the answer to "is C++ faster than C#?" - we already know that. Read it to find out how to make your applications faster.

Kate
Wednesday, 17 August 2011 16:59:15 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 15 August 2011
Months ago, I tweeted "Once you have a hammer, everything looks like a nail" with a link to an interesting article about the times you shouldn't use System.DateTime.Now - sure, you know how to use it, but it's not always the right tool for the job. Keyvan Nayyeri provides a number of alternatives for .NET developers who want to know when something happened, or how long something took. Definitely worth a read.

Then just weeks after that, Susan Ibach gave the SQL side of the story with a blog post about avoiding the DATETIME type if you're using SQL 2008. I saw the headline and thought "what? what else would I keep a date or a time in?". The answer is, either something smaller or something with more precision. Makes sense.

Goes to show, just because you've heard of System.DateTime in .NET or DATETIME in SQL doesn't mean there's no other way to solve your problem. Keep learning!

Kate

Monday, 15 August 2011 16:19:31 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 13 August 2011
When I provide links from this blog, I don't shorten them. When I get a link in an email, I always hover over it to see where it leads, in case it's a phishing email. But when someone emails you a shortened link, or tweets a shortened link, how do you know where it leads? It might be a phishing link. Or it might just be that cat video you've seen too many times already.

Years ago, Joshua Long wrote up a summary of how to see where a shortened link goes before you click it, and he's been updating it pretty regularly. He covers TinyURL, bit.ly and its relatives like on.fb.me, goo.gl, is.gd, and many I've never heard of. There's even a site you can paste a shortened link and get back what it redirects to. Not all links will be worth this treatment, but many will. It's nice to have a summary of how to check them before you follow them.

Kate

Saturday, 13 August 2011 13:56:47 (Eastern Daylight Time, UTC-04:00)  #    
# Thursday, 11 August 2011
I'm pleased to see that Kenny Kerr is writing his C++ column for MSDN again. He's also blogging again and in a recent entry, he provides some really plain-spoken advice to people looking for guidance:

  • "You can of course still use MFC but I do not recommend it as modern C++ can do a better job of supporting the Windows developer."
  • "You should never again use auto_ptr for anything."
So there! I agree with these, especially the auto_ptr one. It was an attempt at a smart pointer that just wasn't smart enough. We have shared_ptr and unique_ptr now and they work in collections and are truly smart pointers. Use them and stop typing delete in your code entirely.

As for MFC, it does fill a need and I certainly wouldn't scrap a working MFC app just because the library is getting old (the facelift a few releases ago helped) but if I was starting a brand new application from File, New Project I would need a good reason to use MFC as my UI framework.

Kate

Thursday, 11 August 2011 13:29:29 (Eastern Daylight Time, UTC-04:00)  #    
# Tuesday, 09 August 2011

People often ask me what Visual Studio Ultimate offers that other versions do not. There's a handy chart on the Microsoft site:

The only problem is, if you don't know what "Architecture and Modeling" includes, it's easy to think there's probably nothing useful in there. So I was pleased to see a blog post by Susan Ibach from Microsoft Canada showing how easy it is to generate a sequence diagram from code, and how that can help you understand code you've inherited from a predecessor. That's one of the diagramming tools included in Visual Studio Ultimate.

Right click in some code, select Generate Sequence Diagram, set some options (does getting a property count? What about calls to methods of String or other .NET Framework classes?) and presto, you have a sequence diagram.




This sort of thing can save you a tremendous amount of time, and that means it can save your organization money. That's why some people buy Visual Studio Ultimate, after all. Having access to a tool like this is one of the ways I can "hit the ground running" when I join a project. If you need to do the same, make sure you're not ignoring a capability you already have.

Kate
Tuesday, 09 August 2011 13:14:15 (Eastern Daylight Time, UTC-04:00)  #    
# Sunday, 07 August 2011

Like a lot of people, I got started on Facebook one way, but now I use it another. And like a lot of people, I haven't quite "cleaned up" from my original start. My rule these days is very clear - Facebook friends are actual friends. People I know and like. In fact, my rule is that we should have shared a meal - ideally a meal and some wine - to be friends on Facebook. If we worked together, or presented at the same conference, and we actually enjoy each other's company, chances are we went for dinner, or lunch, or a beer, at some point. It's a handy rule that makes my decision process easy. I get friend requests all the time from people I don't know, and I just ignore them.

With that audience, my Facebook posts can be pretty personal. What my kids are up to. Pictures of my family and my holidays. Details about travel plans, including whole-family trips that leave my house empty. Sure, I know that what you put on Facebook can be forwarded and shared elsewhere. But I know who I'm sharing with and I trust them to have my best interests at heart. I don't connect my Twitter statuses (which I know are public) to my Facebook ones (which are more private and less frequent) or vice versa.

What I've set up, for people who use Facebook as a news hub, is a public page. Here I post when I'm speaking somewhere, or when a video or article is published. If you "like" this page, my announcements will end up in your news feed. So if you added me on Facebook and never heard back, use the public page instead. I don't post links to all my blog entries there, because I figure you can always subscribe to this RSS. I don't post anything personal either, so if you don't actually care where I'm spending my holidays, you might want to like that page even if we're already Facebook friends.

Kate

Sunday, 07 August 2011 12:50:03 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 05 August 2011
It's worth explaining a few things about me and Twitter. First, I'm @gregcons. There is someone with @KateGregory but it's not me, and whoever it is has never tweeted. I follow several hundred people and several hundred people follow me.  I don't "follow back" when people follow me, unless I happen to recognize the name when Twitter emails me about it. I look at the tweets of people who retweet me or @ me (or who people I follow retweet, or who people I follow are in @ conversations with) and if the tweets look interesting, I follow for at least a while.

I tweet a mixture of personal ephemera (wow, what beautiful weather we're having today), personal stalker-bait (I'm at place x with person y, hey whoever sure was great seeing you today, wow my child just did thing x in place y), and actual technical stuff. The technical stuff might be my own blog entries, my own material being published (a PluralSight course, a Channel 9 interview, a TechEd talk) or a link to someone else's blog entry/interview/talk that I think is interesting. If you want only the technical stuff, my public Facebook feed (more on that in an upcoming post) is a better choice.

I unfollow people for a variety of reasons. People who post a great volume of tweets that are in a language I can't read, or are about things that don't matter to me, just clutter up the stream, so I will unfollow. It's not a value judgement and it's not about the ratio of useful to non useful, just the volume of non useful. (Non useful includes what your cat just did, what airport you just left or arrived at (a few close friends excepted), what you are eating/drinking unless it's inspirationally yummy, coded/veiled potshots at your coworkers, and updates on your car repair or the planning of your wedding.) Since there's a lot of overlap among the people who care about the same stuff as me, I find that when these people post something useful, ten of my friends retweet it anyway, so I won't miss it. People who just post the same thing over and over because they read somewhere that Twitter is ephemeral and people might miss your announcement at 8am so you should do it again and noon and again at 5pm and so on I will usually unfollow also. I don't keep track of who is unfollowing me and I'm not offended if I realize someone has - we all use these things differently and one person may unfollow for too much personal stuff and another may unfollow for not enough personal stuff or not different enough from my other feeds.

I mostly use MetroTwit. This lets me have search columns on myself, my @mentions, and whatever topic I'm interested in according to the news of the day or the event I'm attending. I have a Twitter client on my Windows Phone and A Quick Tweet by Scott Cate as well - it loads super fast because it's for sending tweets, not reading them. I also use the web page from time to time. I always check email before Twitter, so it's not a great way to get hold of me in a hurry.

I don't blog my tweets. I often tweet my blog posts. If something deserves to stick around for a while, I may quickly tweet it, then later write up a blog post about it. Other than that, there's little overlap.

Twitter has turned out to be hugely valuable to me. I find out about breaking news faster than Google News, I hear technical rumours and announcements there first, and I keep in touch with technical friends the world over, as well as my own neighbourhood and my family. I've started my day with smiles from jokes or from just seeing what people I care about are up to, and I've kicked off business conversations, too. It's part of my work rhythm now and it's pretty much the only place I put personal stuff these days. If you're not part of it, consider giving it a try for a week and see what changes for you.

Kate

Friday, 05 August 2011 10:55:18 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 03 August 2011
Here's an article in a pretty mainstream publication - the Economist - that explains why concurrency matters. I used to say "the future is concurrent" but that was then; this is now and it's the present that's concurrent. As the article says,

What was once an obscure academic problem—finding ways to make it easy to write software that can take full advantage of the power of parallel processing—is rapidly becoming a problem for the whole industry. Unless it is solved, notes David Smith of Gartner, a market-research firm, there will be a growing divide between computers’ theoretical and actual performance.

I'll have some more concurrency material over the next little while in this space. Things continue to change pretty rapidly. If you haven't been thinking about concurrency, now's a pretty good time to start.

Kate


Wednesday, 03 August 2011 12:12:50 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 01 August 2011
I consider myself a pretty skilled debugger, and reasonably familiar with the things you can do in Visual Studio (My Visual Studio course Part 1 and Part 2, for example.) Conditional breakpoints, tracepoints in C++ and in C#, breakpoints that only break every 10th time they're reached, customizing the data tip that shows when hovering over one of your own types, making data tips transparent, and plenty more have all been covered here in the blog over the years. But I still come across things I didn't know before, or didn't try before.

Take this blog post by "Daan-Nijs" about the abilities of the watch window. I knew the first one, but the rest are new to me:

  • Changing a value in the watch window
  • Changing a type in the watch window
  • Inspecting an array in the watch window
Then there's re-running or skipping code by dragging the instruction pointer - I only knew I could right click somewhere and say Set Next Instruction. Finally he includes a reminder of how to enable Edit and Continue. All this is for C++, but you're welcome to give some of the techniques a try in other languages and see what happens. Being a faster and more productive debugger will rocket you up the overall productivity leagues like nothing else.

Kate

Monday, 01 August 2011 11:57:45 (Eastern Daylight Time, UTC-04:00)  #    
# Friday, 29 July 2011

Since Tech Ed came and went during my blogging hiatus, I didn't get around to providing links to some of the sessions you might want to see. It's time to correct that omission:

There were other sessions I attended, including a great interactive session that was not recorded called "C++ Renaissance at Microsoft: How the C++ Developers Can Get Involved" with plenty of conversation between Microsoft people and native developers. You might want to do a little searching on the main Tech Ed Video site to see what interests you.

Kate

Friday, 29 July 2011 17:51:36 (Eastern Daylight Time, UTC-04:00)  #    
# Wednesday, 27 July 2011

Today saw the release of the first episode (naturally, Episode 0) of GoingNative on Channel 9. As the introduction says:

GoingNative is a new, monthly show on C9 dedicated to native development and native developers, with an emphasis on modern C++.

You know there's been a lot of talk about the C++ Renaissance. I'm happy to see that phrase get picked up, and I've got another one for you: Modern C++. Or as some folks like to say "not your father's C++". If you think C++ means manual memory management, strings as arrays of characters and a strange cast of global functions, and longing for a library or framework that might rival what .NET has to offer, then you haven't been keeping up with C++. The good news is that it won't take you long to catch up - shared_ptr and unique_ptr, the Standard Library, lambdas and other Modern C++ goodies are easy for both managed developers and longtime native developers to learn.

In Episode 0, Charles Torre (longtime C++ friend) and Diego Dagum (C++ Community lead, blogger, and Tweeter) lay some groundwork and, of course, show code. It's always about the code, right? Then, they ask you to get involved. Whether you're someone who wants to learn about C++, or someone who wants to make sure something about C++ gets taught to others, speak up! And yes, that includes topics on non-Microsoft platforms. Email C9GoingNative - they're using hotmail - or on twitter, follow or talk to @C9GoingNative. (There's a Facebook group, too - whatever way you like to interact is welcome.)

But wait, did that sound like a whole episode? Nope, they grab the camera and head over to see Ale Contenti - one of my favourite team members and one I've done interviews and sessions with before. His talk gets technical fast, which is one of the things I like about him! I too have a soft spot for 6502 assembler :-) and find template meta-programming a bit of a write-only technique. I, too, like "the power the language gives you to make the language bigger with libraries" and think that's part of the appeal of C++ for me. Well, that and the power and performance and control, of course. Are there downsides? Well, there's what Joni Mitchell called "the crazy you get from too much choice" - C++ gives you many ways to do everything, according to your circumstances, and having to decide how to do it, or having to connect two components that made different choices about something as simple as how to represent a string, can be frustating. As well, it's great to be in control, but that does mean that nobody is looking after you. If you're inexperienced (and sometimes, even when you're not) you can make dangerous choices and, as we like to say, shoot your foot off. Security holes and vulnerabilities are important and C++ will let you write bad code, so you need to be aware of best practices. Both Ale and Diego address these points, and you can expect to see more of that in time to come - especially if you ask for it!

Looking forward to next month's show already,

Kate

Wednesday, 27 July 2011 19:55:44 (Eastern Daylight Time, UTC-04:00)  #    
# Monday, 25 July 2011
So, how cool is this? Guy Smith-Ferrier is going to speak at the East of Toronto .NET User Group meeting in August. Why? Because he's the kind of community-oriented person who takes time out of a transatlantic family vacation to speak at a user group, that's why. And his topic sounds like science fiction, but it's real:

Mind Control Your Computer In C#

No really. This isn’t some clever session title. I’m really talking about controlling your computer with your mind. I’m not making this stuff up. This is real. Today. You put on a headset, you use a C# SDK and you control your computer with your thoughts. Yes, you are reading this right – you mind control your computer. It is a reality and it is possible today. Once you’ve gotten over your disbelief consider the applications. Applications for the physically impaired alone are a whole revolution. Not to mention the possibilities for gaming. Want to be shocked and amazed ? Come and see this session.

The meeting is set for August 24th at the Whitby main library. There's something awry with the website at the moment, and everyone who's talented enough to do anything about it is on vacation, leaving only me, but trust me, we're having a meeting and it's going to be a doozy. Guy is a great speaker - he even wrote and recorded a series of videos on how to be a great presenter. He speaks at TechEd and runs events in the UK. And it's our tremendous luck that he'll be in our neighbourhood this summer so make sure you join us to see this session!

Kate

Monday, 25 July 2011 17:38:38 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 23 July 2011
So, you're a C++ programmer? You've written a Windows app or two in your time? Let me propose a little challenge to you. Write one. Only start with File, New and don't let Visual Studio generate any code for you. Write each line of it. Then explain it. No MFC, No ATL. That's what was asked of me a while back, and the result is a six-paper series that has finally arrived on MSDN.

I have to say I really enjoyed the simplicity of the smallest Windows program possible. I also enjoyed making it better, which included making it more of a C++ program and less of a C one. I also covered a little Direct2D, a little COM, and a little "here's some other stuff you're going to want to read." If it's been ages since you wrote a Windows program in C++, or wrote one that wasn't all covered in barnacles from frameworks and libraries you might not want to rely on for simple things, I really suggest you give this series a read - it won't take long and you can use Visual C++ Express if you like - the first chapter includes links and instructions for getting all the tools you need. Better still, if you've never written a Windows in C++, why not give it a try and let me know what you think?

Kate

ps: Never blog that you're not blogging. Never blog about why you're not blogging, no-one cares. Just blog. Right?

Saturday, 23 July 2011 00:39:47 (Eastern Daylight Time, UTC-04:00)  #    
# Saturday, 02 April 2011

Here's yet another C++ team member on Channel 9. Boris starts out reviewing some "old days" things including the Intellisense background I pointed to recently. He explains in more detail why it's so hard to be the C++ team, needing to build an IDE for a language they can't control and that is used by such widely different people. I love that Boris appears to have framed and hung on his office wall someone's comment on a blog post. If you ever wondered whether what you type can make a difference, there's your answer.

With the history and reminiscing out of the way, Boris warms to a topic I haven't heard on Channel 9 before (though I have been hearing it in person) and that's the importance of C++ and specifically the Microsoft toolset, Visual C++, to the games industry. He also talks about how the games industry can be important to all the other developers as well, which I find intriguing. Definitely worth watching and not a rehash of the other C++ videos you may have seen lately.

Kate

Saturday, 02 April 2011 11:07:01 (Eastern Standard Time, UTC-05:00)  #    
# Thursday, 31 March 2011
You go to Tech Ed to learn about technology - developer tools, sysadmin tools, platforms like SharePoint or Windows Phone. But there's more to your work than the nuts and bolts of how to solve a technical problem. Do you use social media effectively? What would an effective use of Twitter or Facebook look like, anyway? Are jobs shifting because of technology? How important is cross-platform development? How important are new platforms? How do you react to big changes in your technical world and direct your own career?

Well, there's a Tech Ed precon Sunday evening that covers that exact topic. And look who's involved: Stephen Rose (Windows Community Manager), Zeus Kerravala (Distinguished Research Fellow and Senior VP, Yankee Group), Richard Campbell (Co-founder of Strangeloop Networks, co-host of .NET Rocks!, host of RunAsRadio, Microsoft MVP, Microsoft Regional Director), Michael Otey (Senior Technical Director for Penton Media’s IT & developer publications, author of SQL Server Developer’s Guide series from Osborne-McGraw-Hill), Tim Huckaby (Microsoft Regional Director, Founder of InterKnowlogy), Michele Leroux Bustamante (Chief Architect with iDesign, Microsoft Regional Director, Microsoft MVP, author of Learning WCF (O’Reilly)), Jennifer Marsman (Principal Developer Evangelist for Microsoft, Central Region), Tara Walker (Microsoft Academic Developer Evangelist), Sean Deuby (Technical Director, Penton Media’s Windows IT Pro Magazine, Microsoft MVP), Paul Thurrott (Senior Industry Analyst, Penton Media’s Windows IT Pro and Supersite for Windows; author of Windows Phone Secrets), John Willis (VP of Training & Services, Opscode), Laura Hunter (Principal Technology Architect for Microsoft IT’s Identity & Access Management team), Yung Chou (Microsoft Senior IT Pro Evangelist, East Region) and Barbara Yamauchi (Microsoft IT program manager for developer tools and IT lifecycle management). Wow! And this is an interactive panel discussion, so you can help to shape the conversation.

There is a small fee ($99) and you have to arrive Sunday afternoon so you'll be able to attend. But it looks like a heck of an evening! Glad to see so many RDs and MVPs on that list.

Kate

Thursday, 31 March 2011 07:50:40 (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, 29 March 2011
The fourth of my Windows 7 development screencasts - Trigger Started Services - has been published. It uses the recipe (also recently published on Code Gallery) to simplify writing a service in managed code that starts only when it is notified by the operating system of a particular trigger. In my screencast I use the example of a USB device being plugged in. There are plenty of other triggers you could use. Adopting a trigger-started approach makes your service:
  • easier to write and install. No sleeping, looping, having a config file to say how long to sleep for, etc.
  • use less CPU when there's nothing to do
  • respond more quickly when there's something to do. It's not in the middle of sleeping for 10 minutes or 2 hours -- it is started the moment the trigger happens.
It's a win all around and if you have a service you should take a look at the available triggers and see if you can convert yours.

Kate

Tuesday, 29 March 2011 07:31:10 (Eastern Standard Time, UTC-05:00)  #    
# Sunday, 27 March 2011
The screencasts for restart and recovery in native and managed code went live before the associated recipe was published. Now the recipe is on Code Gallery ready for you to use. As it says there:

This recipe provides guidance and an easy way to start using these great features in your application, removing any complication of how and where to store your application data.

What’s in the box?

This Restart and Recovery recipe includes:

  • Complete source code of the recipe and its samples
  • Managed .NET assembly
  • C++ header and class files to be included in your C++ application.
  • C#, and C++ test applications
  • Documentation
Give it a try, please!

Kate

Sunday, 27 March 2011 07:21:53 (Eastern Standard Time, UTC-05:00)  #    
# Friday, 25 March 2011
Charles was busy during MVP summit! In addition to interviewing me, he sat a number of MVPs down to talk about C++, being an MVP, and the like. They're from all over the world and they have widely different jobs, but you can see how much they love this stuff. And please notice -- they span a wide age range, too. The stereotype of C++ as the language for the grey haired developers is just a myth. If you wonder why anyone still uses C++, and why it's going to be very good for this industry that there are still C++ experts around, watching these videos will be an eyeopener.

By the way, Alon is also an RD.

Kate

Friday, 25 March 2011 07:15:03 (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, 23 March 2011
As you may have noticed the C++ team is really stepping up the communication lately. There have been hours of Channel 9 videos (I pointed you to some good ones) and Diego has been blogging a lot. Recently he did a long post (with references!) on Intellisense in C++/CLI - why it wasn't in Visual Studio 2010, why it didn't sneak in with SP1, and so on. Here's a level of transparency you just don't see these days:

...we simply underestimated the amount of work it would take to implement C++/CLI in this codebase, and we couldn’t change our plans by the time we realized it. ... In the end it was one of those hard cuts you have to make when dealing with the real world resource and schedule constraints. It turned out that the work was also too much work to fit into SP1. As soon as we wrapped up VS 2010, we started work on C++/CLI IntelliSense, but it wasn’t ready in time for SP1. We realize this wasn’t what you wanted to happen and an explanation doesn’t help you get your work done if you are affected by this, but we want you to know the truth.

Wow. Makes perfect sense and is actually a nicer reason than "we think you don't matter". Yet so few teams will hold their hands up and say this. It happens. It happens to every one of us pretty darn regularly. Kudos to the C++ team for not pretending it was all part of a plan from the beginning to leave it out. And do read the blog to understand just how much they were taking on.

Kate


Wednesday, 23 March 2011 07:04:54 (Eastern Standard Time, UTC-05:00)  #    
# Monday, 21 March 2011
If you listen to .NET-related podcasts, you've probably come across the Pluralcast before. David Starr talks to a wide variety of people and the passion shows, along with the skills. Last year I appeared on the 'cast myself, talking about Visual Studio extensions. Now I'll be doing a small appearance regularly - still talking about Visual Studio and some helpful extensions or whatever else I want to share. There have been three of these so far:

  • #36 - main guest is Scott Allen
  • #37 - main guest is Craig Shoemaker
  • #38 - main guest is Liam McLennan
I hope you enjoy the whole episodes, and learn a little something from them.

Kate

Monday, 21 March 2011 15:31:08 (Eastern Standard Time, UTC-05:00)  #    
# Saturday, 19 March 2011
I'm on Channel 9 a lot right now - partly because some things are getting published that were done a long time ago, and partly because being on campus for the MVP Summit makes it convenient to be interviewed. I love talking to Charles because he really cares about the answers to the questions he asks. So we talked for half an hour about what it means to be an MVP, what C++ is useful for, what I like about C++0x, and that sort of thing. Since Charles started things off by mentioning previous conversations, let me toss in some links to those too - here's the Barcelona conversation (backstory here)and on the couch with the C++ guys (shorter backstory.) You can watch my hair change colour if you watch those oldest-to-newest. Diego was also nice enough to blog about this interview, too, as was John Bristowe of Microsoft Canada.

Thanks for the chat, Charles!

Kate

Saturday, 19 March 2011 19:51:23 (Eastern Standard Time, UTC-05:00)  #    
# Thursday, 17 March 2011

Here's another pair of screencasts to simplify your Windows 7 development. Both cover Restart and Recovery - one is for native developers and the other for managed. As the screencast intros say:

Application Recovery and Restart (ARR) technologies enable developers to customize an application's behavior when Windows Error Reporting(WER) terminates the application due to an unrecoverable error. For example, it enables an application to perform data recovery and cleanup operations such as capturing application state and releasing resources before termination. It also allows developers to specify that WER should automatically restart an application that it has terminated.

I hope they help you do the right thing when your application blows up or the machine reboots.

Kate

Thursday, 17 March 2011 19:38:55 (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, 15 March 2011

You know I blog here a lot about Windows 7 goodies including taskbar integration. One of the questions I get pretty often is how to use tasks to communicate with the running app, such as changing your status, sending a new email, that sort of thing. I mentioned in an aside on another post that this requires launching some other application that communicates with the first instance.

If you'd like to do that, it just got a little easier with the release of a "recipe" from Microsoft that packages up this concept and lets you use it with very little extra code. As it says on the Code Gallery page for the recipe:

This Taskbar Single Instance Recipe allows developers to easily develop applications that use "Messenger Like" tasks that change the state of the currently running instance, allowing it to react to incoming state-change notifications and act accordingly.

This Recipe includes:

  • Native (C++) and managed (.NET) Source code for the Single Instance library
  • Well documented native (C++) and managed (.NET) samples
  • Documentation

To compile and run the recipe and samples the following items are required:

  • Microsoft Visual Studio 2010
  • Windows 7 – Note that only the samples require Windows 7. 

Yes, this recipe is actually two recipes - one native and one managed, and comes with whitepapers explaining how it's done. I mentioned this in my Tech Ed Europe talk on Advanced Windows 7 development and it's finally released for you to use! Enjoy!

Kate

Tuesday, 15 March 2011 19:18:48 (Eastern Standard Time, UTC-05:00)  #    
# Sunday, 13 March 2011

Whenever new stuff appears in the Microsoft universe, native C++ developers can get to it first. That's because they can easily call Windows APIs or COM interfaces or however it's implemented. Managed developers need to wait until the new stuff gets added to the .NET Framework or to a particular managed technology, like WPF. Take taskbar integration, for example: adding tasks and destinations, getting a progress bar or icon overlay on your taskbar icon, and so on. From the very beginning you could interact with the taskbar from native code by making Windows API calls. The Code Pack is a popular managed wrapper from Microsoft that enables those interactions from managed code such as Windows Forms applications. In the early days of Windows 7, WPF developers also used the Code Pack - but now those capabilities are in WPF itself.

Does that mean that native developers get nothing new? On release day they gain the ability to call those APIs and that's that? Of course not. Native developers use frameworks and libraries to build their applications, and those frameworks and libraries in many cases are wrappers for Windows functionality. One of those is MFC and you should know that MFC has support for Windows 7 functionality.

If that's news to you, then watch my screencast on Channel 9 in which I cover jumplists and overlays with lots of demos. It's just one or two lines of code for each of these. Users expect their apps to behave like this. MFC makes it simple.

Kate

Sunday, 13 March 2011 18:58:23 (Eastern Standard Time, UTC-05:00)  #    
# Friday, 11 March 2011

Writing samples and demos is tough. You want them to do more than say "Hello World" or draw a red square, but you want them to be simple enough that people can see the "new stuff" you're demoing (WPF, or Windows 7 taskbar integration) or multi-touch) in amongst the real business logic. It would be neat if they did something actually useful, because then you might keep it around on your machine and use it, but most things that are useful are too big to be demos.

Well here's a sample that lands in the sweet spot: Tasks.Show. You put in your tasks, things from your ToDo list, along with time estimates, and it keeps track of them and shows them to you. I like this view:

It uses touch to let you flick tasks into categories, and has taskbar integration to let you open a specific category, add a task, and so on. All the source code is available so you can see how it's done - it is a demo, after all. You can get more details and screen shots on the Windows Team Blog. Check it out!

Kate

Friday, 11 March 2011 10:31:40 (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, 09 March 2011
I have two sessions in Atlanta:

DEV303 | Modern Native C++ Development for Maximum Productivity

Breakout Session  |  300 - Advanced  |  Developer Tools, Languages & Frameworks

C++0x, the next C++ standard, is almost upon us and it contains the most important updates to the language since the mid-90s. These new features bring more expressiveness and power to the native C++ developer. Microsoft Visual Studio 2010 has added support for some of these key features in order to enable these modern programming techniques. This session clarifies what features are in Microsoft Visual C++ 2010 and what is yet to come. It illustrates how new constructs such as lambda expressions enable better use of existing libraries and how your code can be simpler, safer and faster all at the same time. Also, see how simple it can be to implement concurrency in your application and how Visual C++ 2010 supports the difficult task of debugging parallelized code. If you are itching to show off how C++ is one of the coolest languages on the planet, this talk is for you!
 

DEV304 | Advanced Programming Patterns for Windows 7

Breakout Session  |  300 - Advanced  |  Developer Tools, Languages & Frameworks

Windows 7 development in managed code can be very simple, especially for those using the Windows API Code Pack. But there's more! Your integration with Windows 7 doesn't have to be limited to simple interactions with the new API. This session goes beyond the simple and into aspects of Windows 7 development that have in the past been left for you to explore on your own. See how to create a jumplist with a task that delivers a command to your application, as Messenger and Outlook do. Explore a simple and powerful recipe for connecting to Restart and Recovery with minimal effort. Discover how Trigger Started Services can reduce your power footprint while giving your users better responsiveness. Explore all that libraries have to offer beyond "File Open" and why using a library is a better approach than having a user setting for "save directory."

I'm looking forward to it. If you haven't registered yet, you should!

Kate

Wednesday, 09 March 2011 21:42:23 (Eastern Standard Time, UTC-05:00)  #    
# Monday, 07 March 2011

There are thousands of MVPs chosen by Microsoft for their contributions to technical communities. Eric Ligman says there are over 4,000 and I believe him. So of course nobody could choose a single "MVP of the year". There are several dozen this year, chosen from various technical areas and also for reasons that transcend a single technical area. I was delighted and honoured to be among them this year, and even more so to be joined by two of my fellow MVPs. To quote from an email telling us about it:

...the new 2010 C++ MVPs of the Year are

  • Kate Gregory, for her very active role in promoting modern C++ application development, being among top speakers in some prominent conferences. Kate was also selected by peers (you guys) as C++ MVP of the Year.
  • Marius Bancila – Ovidiu Cucu (shared), for the great job in CodExpert, their C++ community site (in Romanian language).
  • Sheng Jiang, one of the top answerers in our MSDN Forums.
Is that amazing company or what? We were invited to dinner with a number of MS executives and the other MVPs of theyear during the MVP Summit. Here's a picture of us with Diego, the Visual C++ Community PM:




It was a great evening and it was nice to see C++ well represented.

Kate
C++ | MVP
Monday, 07 March 2011 21:16:34 (Eastern Standard Time, UTC-05:00)  #    
# Saturday, 05 March 2011

The pace of C++-relevant video releases on Channel 9 sure feels like it's increased. I watched a few recently (I download them and then watch them in my copious free time) and they happen to fit well with some links I've been carrying around for a while, meaning to share.

Let's start with Herb Sutter talking with Erik Meijer about C++ and whatever else they felt like talking about. The resulting Channel 9 video is a must-watch, and for once I didn't crank it to 1.5x or 2x speed as I usually do with video interviews. When they get into the part about deriving future<T> from T, you might want to pause it and go read Thomas Petchel's post on automatic type deduction. And during the lambdas-and-closures part, let me recommend a quite old post by Eric Lippert and a followup to it that discusses how these things work for C# and how it's a little different in C++.

Then another two-smart-people talk, with Mohsen Agsen and Craig Symonds. It's great to get the high-level perspective of the value of C++ to any software firm. I love that phrase, dark matter, and you may have heard it from me before. After you've watched that one, you need to go immediately to Tony Goodhew's interview where he puts some numbers out that will drop your jaw.

I know, I'm asking for like 2 hours of your life. Even if you don't develop in C++ any more, you should watch these three videos. You really should. Call it industry research if you like. And if you wish you knew a C++ developer, you do :-)

Kate

Saturday, 05 March 2011 11:49:44 (Eastern Standard Time, UTC-05:00)  #    
# Thursday, 03 March 2011
The PDC was a little different last year. It was held on the Microsoft Campus, meaning that only a thousand people could attend, when usually it's 5 times that. But it featured an amazing player that opened the whole conference up to the world. I was one of the 100,000 (yes, 100,000!) who watched online. If you are interested in some of the technical details, there's been a whitepaper released. You can read about it on the Windows Azure Team Blog. Makes sense, since Azure was a big part of the solution.

Kate

Thursday, 03 March 2011 11:41:55 (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, 01 March 2011
Are you doing Scrum? Do you use TFS? Then you should check out Urban Turtle. Brian Harry did (yes, that Brian Harry) and he really liked it - his blog post makes a great introduction. It gives you rich visibility onto your project and lets you work with it your own way. You can download a 30 day free trial to see if there is a good fit with the way your team fits and works.

If you like it, let me give you a tip. If you go to DevTeach in Montreal (which is so worth your while to attend on its own) you will get a 5-user license of Urban Turtle, which means you're effectively going to DevTeach for half price. And you can hear me speak on Windows 7 development, too.

Kate

Tuesday, 01 March 2011 22:55:42 (Eastern Standard Time, UTC-05:00)  #    
# Sunday, 27 February 2011
Here's an interesting blog post. Say you use MFC and are wondering whether anything was added to it in a particular release. What tool would you use for that? How about CppDepend? If you've never used it, seeing how it provides the illustrations for this post should show you the appeal of it. Either way, you're going to learn something.

Kate

Sunday, 27 February 2011 22:11:52 (Eastern Standard Time, UTC-05:00)  #    
# Friday, 25 February 2011
Pete Brown is a WPF guy and I've learned a lot from him. Now I get to watch him learn. Recently he wanted to write an add-in for IE and he decided to do it in C++. You can see how he struggled through it and get some tips of your own in the detailed post he wrote about the experience. I agree with the commenter who said you should only run Visual Studio as admin when you know you're going to do a step (like registration) that requires elevation, and you should run non-elevated the rest of the time, and the one who tweaked the string code to take advantage of being in C++. If you have some tweaks of your own, stop by and add a comment.

Kate

Friday, 25 February 2011 18:20:58 (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, 23 February 2011
People talk a lot about work/life balance. There really is no such thing. They never deserve 50/50 which is what balance implies. But I read an interesting point in this summary of (and link to) a TED talk: over what period of time do you want to achieve some ratio of "work" and "life"? Every day? Most people prefer their weekends to have more "life" than "work". Over every individual week? I think we all would like to have weeks of vacation with no work at all, and most of us accept the occasional "crunch week" with more work than is comfortable. Over a 50 year period? That's not realistic at all. Think about that a bit. Then watch the video.

Kate

Wednesday, 23 February 2011 18:10:38 (Eastern Standard Time, UTC-05:00)  #    
# Monday, 21 February 2011
If you've been to a developer event this century, or if you spend any time on Channel 9, you've probably seen Beth Massi. I read an interesting interview with her by Carla Fair-Wright where she talks about what Microsoft is like, advises young women, and plugs LightSwitch. Did you think she was the I-was-programming-in-BASIC-when-I-was-8 type? Well now you know.

Kate

PS: the whole series is worth a read.

Monday, 21 February 2011 18:03:11 (Eastern Standard Time, UTC-05:00)  #    
# Saturday, 19 February 2011

Imagine an app that you have running under Windows 7 as a desktop app. Now as much as you are enjoying the Windows 7 features it uses, you know there is some functionality there you could offer to people another way. Do you have to just start over to make it into a phone app? What if you want it in a browser? If you write the desktop part in WPF, will that be something you can use when you create the Silverlight code for the browser or phone apps? Well, check this mission statement:

Our goal was to enable seamless and easy sharing of decks among users across different computers. The idea was simple, upload the deck to the cloud, and let the user send a message to whomever the user wants to share the deck with. That message will include a link for the receiving party to click on to launch a web browser and run a Silverlight application that can “play” the shared deck. The Silverlight application dynamically downloads the shared deck and displays that single deck just as it would be displayed on the WPF application. At this point the user can launch any of the 3 games: Learning, Matching, or Memory, with the same user experience as the WPF application.

Sounds like just what you might like to do in some of your apps, doesn't it? Oh yeah, and would you like the code? And a blog post explaining the code? And a video on Channel 9?

Happy to help!

Kate

Saturday, 19 February 2011 17:53:09 (Eastern Standard Time, UTC-05:00)  #    
# Thursday, 17 February 2011
One of the marks of true expertise and skill is making something very difficult look easy and effortless. It can take a long time and a lot of work to give the impression that something is natural and everyday for you. It takes even more work and practice to make something look spontaneous and unrehearsed. This is as true of giving a technical presentation as it is of playing a sport or a musical instrument, dancing, singing, or cooking. Oddly, some people seem to think that presenters are all "just naturals" who don't practice, rehearse, or plan.

There are two problems with thinking that. The first (and the smaller one) is that it doesn't give enough credit to the hours of work that goes into producing that "off the cuff" presentation you so enjoyed. The second (and by far the bigger one) is that it leads you to think that you couldn't be a presenter. And that would be a loss. Presenting, even in the smallest of contexts, makes you better at whatever you're presenting about. If you do a presentation on Windows Phone development or Visual Studio Extensibility or the like, you will know that subject better when the presentation is over. It also generally helps your career, gives you a chance to meet people and help them, and if you're lucky will also get you a chance to travel to marvelous places and meet even more people.

One of the terrific people I've been able to meet thanks to the speaking I've done is Guy Smith-Ferrier. He's really good. He's always been generous with slides and downloads on his website, and he really knows his stuff. And now he's made a series of videos to show anyone - really, anyone! - just what it takes to be a presenter. He covers a number of things I've never seen in talks of this kind, like choosing your topic wisely. They total a little over 2 hours and are well worth your time if you're thinking of trying presenting or (more likely) you wish you could and think you can't. You can watch them on the UGSS site or download them if you prefer (search for speaker.)

Once you've watched these, you will understand what it seems the great speakers just "happen" to be doing. And you can do those things too. You can be a presenter if you want - it's no harder than learning to code. Guy's straightforward way of laying down the truths behind great presentations will take you where you want to go.

Kate


Thursday, 17 February 2011 02:14:42 (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, 15 February 2011
Did you watch the whole "Introduction to STL" series on Channel 9? As I said when part 10 appeared, there is no universe in which this series is really introductory. So when I tell you that Stephan has now started an advanced series, you need to take it seriously. Here's how Charles entices and warns us:

This series, Advanced STL, will cover the gory details of the STL's implementation -> you will therefore need to be versed in the basics of STL, competent in C++ (of course), and able to pay attention! Stephan is a great teacher and we are so happy to have him on Channel 9, and C9 is the only place you'll find this level of technical detail regarding the internals of the STL. There are no books. There are no websites. This is Stephan taking us into what is uncharted territory for most of us, even those with a more advanced STL skill set.

Me, I'm enticed. And I'm watching. You should be too. (But watch the first ten first, or the minute you start to feel lost.)

Kate

Tuesday, 15 February 2011 20:52:02 (Eastern Standard Time, UTC-05:00)  #    
# Sunday, 13 February 2011

I've written about "banned APIs" before - let's start with this link and if you read it, it has a link to a previous post, and go on and follow that link and it has a link to a previous post and so on and so on. To summarize, there are three ways to ensure you are not using banned APIs in your C++ app:

  • You can use the extension I blogged about. It highlights places in code you're editing or typing that calls a potentially unsafe function. That's great if you're typing fresh code,not so great if you just inherited a million lines of C++ and aren't sure if it's vulnerable to buffer overflow attacks.
  • You can compile with /W4, and deal with all the C4996 warnings (and use code analysis or code review or generally find the places that someone has suppressed that warning.)
  • You can include banned.h, which controls whether these unsafe functions are marked deprecated or not
None of that has changed. What I wanted to point out was a recent blog entry from the SDL team alerting us that banned.h has been updated, and I also spotted a video on TechNet (why a developer-focused thing is there I don't know) that shows it in action. If you write C++ code, you should be using one or more of these techniques.

Kate
Sunday, 13 February 2011 20:44:32 (Eastern Standard Time, UTC-05:00)  #    
# Friday, 11 February 2011
If you're a Canadian and you've been thinking of playing around with the Windows Phone Developer Tools, now would be a great time to get started. Microsoft Canada is running something they call the Great Canadian Apportunity, and the grand prize is $10,000. There are plenty of other prizes, too - Xboxen, Kinects, passes to Mesh and more. Joey has some of the details on his blog, and you can check out the main site to get started!




It's on till April 30th. You must be a resident of Canada and over 18 (younger developers need parental permission), not work for Microsoft etc.

Kate
Friday, 11 February 2011 11:57:00 (Eastern Standard Time, UTC-05:00)  #    
# 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)  #