Getting the Name of your Windows Phone 8 device

You can name your phone to whatever you like, but how can an app display that name? There isn’t an obvious API for this, but I accidentally discovered an un-obvious API. The quick version is that you can ask getaddrinfo for the canonical network name. Too quick? OK, here is some C++/CX code to show…


Handling Contract assertions on Windows Phone 8

If you are a fan of System.Diagnostics.Contracts and use them on WP8 you may find a problem: when a contract fails, you get no clue why. Here’s how to find out. Firstly lets start with a trivial repro app, take the default WP8 project, add a using System.Diagnostics.Contracts, add a button, then this code:         void TestContract(int arg)…


Native Code on Windows Phone 8: The assert Problem

So there you are, cranking out some new C/C++ (or CX/C++) code on Windows Phone. Its all new, so you add asserts all over the place to make sure its working. You run your app under the debugger to see how far it gets, and boom: it exits for no obvious reason. Turns out assert…


The Best Microsoft Keyboard. Ever. The Natural Keyboard Pro.

Keyboards are a very personal thing. For those of us whose job requires their use basically all day, every day, they are the piece of hardware that we have to be comfortable with. A good keyboard will stay with you for years, decades in fact, but PCs will be upgraded and so will your monitors….