# Wednesday, 15 December 2010
Those hardworking elves at the All in One Code Framework keep releasing more samples. They've added some ASP.NET samples (including a very interesting "get location from IP address" one) and some Windows 7 shell extensions, specifically a preview handler. Ah, the good old .recipe file type - an old friend of mine. But as always the samples are going to save you hours and hours of time.

Here's an index to all the samples for you to explore. You might be a little astonished if you haven't checked it out before, they have:
Slowly but surely the samples are accumulating to live up to the name. This should be the first place you look when you want to take on a new task. Generally speaking, everything is available in native C++, C#, and VB (the exceptions are things you can't do in native C++, like ASP.NET) with the language included in the sample name (look at CppWin7TriggerStartService, CSWin7TriggerStartService, and VBWin7TriggerStartService for example.) And remember, if you don't see what you want - you can ask for it!

Kate

Wednesday, 15 December 2010 10:57:52 (Eastern Standard Time, UTC-05:00)  #    
# Monday, 13 December 2010
At the moment these are announced in the USA only. A full day of client development training for Windows 7, including IE9 and SL OOB. They say:

We will look at application compatibility and transitioning your applications to Windows 7, integrating with the Windows taskbar, developing for IE9, utilizing the cool functionality in the Sensors and Location Platform so that your application better responds to its current environment, leveraging the multitouch capabilities (especially in kiosk scenarios), and creating Silverlight 4 out of browser applications. This event is a unique opportunity, partnering classroom learning with hands-on-labs and leveraging experts to advise you so we can help you “win” with Windows 7.

You bring your own laptop with VS 2010, the Code Pack, the Windows 7 Training Kit, IE9, and Silverlight 4 installed (there are links on the bootcamp page) and do the labs as you go. The training is all free and you'll get hands on experience right while you're there. (It doesn't say so, but my guess is this is all managed code and that the labs are in both C# and VB.)

And if there isn't one near you, you can help arrange one! It's all packaged as an event-in-a-box so all you need is a trainer who'll agree to deliver it and a room to hold it in. But check the dates and locations first -- there are over a dozen sessions scheduled already, so perhaps there's one near you.

Kate

Monday, 13 December 2010 10:40:52 (Eastern Standard Time, UTC-05:00)  #    
# Saturday, 11 December 2010
Back on December 7th, Jason Zander announced the beta of Service Pack 1 for Visual Studio 2010. December announcements can often go un-noticed, but you should pay attention to this one. You can get the beta and start using it in production immediately.

What's in it, and why does a service pack matter, anyway? Well this one brings Silverlight 4 Tools for Visual Studio "into the box", updates some MFC capabilities, and fixes things people raised on Connect. (Remember, complaining about missing features or bugs to your cubicle mates may make you feel better, but raising them on Connect gets them fixed. I should know, I submit things there and they get fixed.) STL has a comment on the VCBlog post that spells out many of the fixes in detail.

Take a few minutes and update your Visual Studio, especially if you're a C++ developer, whether MFC or C++0x (or both, of course.)

Kate

Saturday, 11 December 2010 10:17:49 (Eastern Standard Time, UTC-05:00)  #    
# Thursday, 09 December 2010

Herb Sutter has blogged a "trip report" (except he didn't travel, but anyway) about the November meeting of the C++ Standards Committee. In it, he tells us:

Things are going well and we are on track to complete the Final Draft International Standard (FDIS) for the C++0x standard after the Madrid meeting in March. If that happens and that ballot succeeds, the C++0x standard will be published in 2011.

There are still decisions being made, and I have to say I like the way they're going. I think contextual keywords are wicked smart, and that if compilers can understand them, developers sure can. Compare Herb's two examples:


class [[base_check]] Derived : public Base {
public:
virtual void f [[override]] ();
virtual double g [[final]] ( int );
virtual void h [[hiding]] ();
};
class Derived explicit : public Base {
public:
virtual void f () override;
virtual double g( int ) final;
virtual void h() new;
};

Contextual keywords make the second option possible, and I think it's much better. You can also read about noexcept and the whole exception-checking backstory, as well as rules for generating move constructors and move assignment operators. It's all good.

Kate

Thursday, 09 December 2010 13:24:29 (Eastern Standard Time, UTC-05:00)  #    
# Tuesday, 07 December 2010
Windows 7 developers have tons of cool stuff at their (our) fingertips. There's taskbar integration, the new sensors and location platform, access to devices, and more. Silverlight developers, on the other hand, have so far not been able to get to all of that. Well, now you can! The Native Extensions for Microsoft Silverlight leverages the ability of Silverlight to do COM integration, and puts COM Automation around a collection of Windows 7 functionality so that Silverlight developers can use it. How cool is that?

Because it's on the Code Gallery, you know it's from Microsoft. The first release, Dec 2nd, covers:
  • Windows Sensor API - Integrate sensors:  Accelerometers, Light sensors, compasses, gyroscopes etc. 
  • Microsoft Speech API - Text to Speech (Speech Synthesis) and Speech to Text (Speech Recognition) 
  • Windows Portable Devices API - Enumerate and access content from connected portable devices (cameras, phones, music players, scanners etc.) 
  • Windows 7 Taskbar Integration - Jump lists, overlay icons, overlay progress display, Thumbnail toolbars etc. 
  • Webcam Local Encoding and Window Capture - Encode webcam capture into mp4 (H.264/AAC-LC) media - Capture user interface interaction as video 
  • Window Message Interception - Intercept and act on Window messages sent to the Silverlight OOB host window

This certainly gives Silverlight developers some interesting options! There are some samples that come with the library to show you what you can do, too. You might also be interested in Maor David's blog entry about the library.

Tuesday, 07 December 2010 12:33:24 (Eastern Standard Time, UTC-05:00)  #    
# Sunday, 05 December 2010
I finally caught up some of my PDC-watching and really enjoyed this Herb Sutter talk on C++0x lambdas. I'm well known to be a huge lambda fan. Herb made this talk enjoyable for me by bringing his personality to the table. He showed aspects of C++ that are not exactly elegant, and how using lambdas can make some much neater code possible. Sure, lambdas are "just" syntactic sugar, but they add up to a new way of thinking about writing applications in C++. Well worth watching.

One warning though - I generally download videos and watch them at 1.5 or double speed. I highly doubt you want to do that with this talk - it's dense!

Kate

Sunday, 05 December 2010 11:59:12 (Eastern Standard Time, UTC-05:00)  #    
# Friday, 03 December 2010
Kenny Kerr is back in Canada and back writing about C++. Like a lot of us these days, he's looking at a stripped-down, more modern way to write Windows applications in C++ - no MFC, no ATL, no WTL. Plenty of STL and new C++0x features. I like it! Here's the first installment - stay tuned for the rest of them!

Kate

Friday, 03 December 2010 11:53:59 (Eastern Standard Time, UTC-05:00)  #    
# Wednesday, 01 December 2010
Lately there's been quite a lot of interest on programmers.se about interview questions, and specifically the "coding at the whiteboard" part of the interview. It came up in a discussion of FizzBuzz, in one about "testing" your whiteboard code, and in one about question 11 of the Joel test.

I ask candidates to code at the whiteboard. I ask an intensely simple question, because I am mostly testing for things other than the actual code the person writes. I know, however, that there are places that actually want you to tackle reasonably challenging problems. I came across this blog entry by Diego Dagum (who edits The Architecture Journal, writes architecture columns, and is committed to native C++big time) that walks you through a C++ whiteboard problem that is decidedly non-trivial. What I found interesting is that he starts his "thinking aloud" the same way I would, but then when I would start writing something that worked for valid input, he first started to set out examples of invalid input. And when he wrote the code, it starts by rejecting various categories of invalid input before processing anything. It's cool to see someone thinking differently from me.

One thing really struck me. He spends over a page on the signature of his method - why he called it rtoi, why it returns an unsigned int, why its argument is const, whether it should take a  unicode string or not, why an STL string and not a char*. See how much these problems reveal about a person? That kind of care and precision is not something you can discover by asking a person "how important is it to you that a method signature is chosen with care? Can you give me some examples of naming methods you have done?" Coding in a job interview is about so much more than syntax. Are you prepared for the whiteboard?

Kate

Wednesday, 01 December 2010 21:59:11 (Eastern Standard Time, UTC-05:00)  #