Three weeks with Windows Phone 7 – a Mac users perspective
It’s been a few weeks since I took up Microsoft’s employee offer of a free Windows Phone 7 (when you renew a 2 year contract) and combined it with AT&T’s offer of buy-one-get-one-free for my wife.
So how have things been going?
Physical
Compared to the iPhone 3G the Focus is much more comfortable.
The larger screen size means a wider and taller phone but with less surround it’s not unwieldy – far from it. In fact the phone sits far more comfortably in my hand than the iPhone did. This is partly because it’s a better match for the size of my hand, partly because it’s a little lighter but mostly I think because the bevel is a lot more subtle and less steep and awkward than the iPhone’s shiny-pebble inspired design.
On the flip side it does look and feel a little cheaper and less solid but a small part of that is because the back of the phone flips off like many other allowing you access to the battery, sim and memory expansion slot. The dedicated back and home buttons below the screen help keep the display clear of chrome and give the apps the space they need.
The major disappointment for me here is the screen. While it is very bright and has great contrast if, like me, you hold it rather close to your face you can see a dithering pattern caused by the unusual LED subpixel arrangement called PenTile on every colour except green. I’ve learnt to hold it a little father away as the text rendering is very nice otherwise but compared to a friends iPhone 4 the screen is a letdown.
User interface
Until you’ve used the Zune-inspired interface (part of an overall design strategy called Metro) it’s a little hard to put it into words. Static screenshots certainly don’t do it justice as it’s all about movement and flow in a way other devices aren’t.
Starting from a tiled home page that gives you a peek into your mail, messages, people and games through a gorgeous combination of animation, text and imagery that keeps the page feeling fresh and alive – a spirit that is carried through the rest of the device – not just with the built-in screens and features but also into many third-party apps (more on that soon).
In a way it feels like a window onto a bigger world behind it instead of a subset of that world crammed onto a small screen. It’s like the difference between a mobile web browser that scales in and out on a whole page versus a mobile-optimized page that lacks detail and finesse.
As many will know my wife and I are primarily based on Apple technology but even after a week with the Focus my wife announced (with a slightly sad face) that her iPhone 3GS felt old – even with iOS 4.1 on it. I have to admit the same feeling. Sure the iPhone is cure but the icon-and-list approach with the odd red circle to indicate some activity now lacks engagement.
Part of Microsoft’s advertising campaign has been the get-in-get-out approach and the home page and email works really well here. So much so that it’s broken my 3 year ritual almost instantly in that I now check my email on my phone each morning when I get up instead of using the laptop to do the same. If I can find a good Google Reader app then the laptop might not open until I get to work.
I had an initial worry when I first turned it on as there were a bunch of AT&T applications and tiles installed however it let me remove all the ones I don’t want or use (e.g. U-Verse) Score +1 for consumers over providers :)
Mac integration
I’m in a minority among friends as I actually like iTunes. It sorts, it plays, it lets me get audiobooks, podcasts and legal music quick and fast. I’ve also used it to rip a fair number of my own tracks from CD and bolstered my collection with tracks from Amazon MP3 sometimes (like their $3.99 Tron: Legacy deal). Sure I wish it allowed plug-ins for different music formats – I have a soft spot for chipmusic – but apart from that it’s been quite pain free.
iTunes however only likes to play with iPods, iPads and iPhones. Other companies have hooked their devices in unofficially in the past and Apple have been sure to quickly break it.
Thankfully Microsoft haven’t let the Mac fans out in the cold and provide the Windows Phone 7 Connector for Mac.
The software does an okay job at sending music and videos from your iTunes library over to your USB connected phone although obviously DRM-protected content isn’t going to work.
What was disappointing however is even “Purchased music” from iTunes won’t actually play on the Windows Phone even though it syncs. I’m assuming this is a bug as there isn’t any DRM here (that is marked “Protected music”) and the file format is Dolby’s own AAC not Apple’s so I don’t see why it shouldn’t work.
It also won’t sync your Mac’s Address Book and Calendar’s directly however there is a way to do this quite easily indirectly – see below.
Contacts
Enter your Facebook name and password and it will fill your contacts from Facebook with each getting their own ‘what’s new’ etc. Like most people this isn’t exactly what I want but I took the opportunity to prune 100 people I never speak to – an option also exists to only supplement existing contacts on the phone with their Facebook pictures and feeds.
It also helpfully pulled in my Gmail contacts and in the cases where I have a contact card in GMail for somebody on Facebook did a good job of joining them up. Some it seems were automatic possibly based on email addresses and full names. Others had recommendation when I went to join that were always correct and in a handful of cases I just had to tell it which ones to join up manually because they had changed their name on Facebook.
In some cases I merged three cards for a single person – their semi-public Facebook profile and photo, their private telephone numbers from GMail and their semi-public Windows Live details for messenger and Xbox.
Finally I added my Outlook/Exchange account – all worked flawlessly and for each account you get to choose whether to bring in contacts and calendars and in most cases mail (but not for Facebook).
The result of all this is that my phone is now the best contact list I have on any device. It combines them beautifully in a way no other device I’ve owned has and not once in the three weeks since I set it up has it got confused, lost details or had sync problems.
Very sweet… unless of course your primary contact information is your Mac’s Address Book as any Mac-owning iPhone owners will be.
Getting Address Book contacts onto Windows Phone
Please forgive the SEO-tuned heading but I didn’t find any useful information online and want to share this simple technique with others :)
You’ll need a GMail account to make this work (it also works with Google Apps for Domains too), simply:
- Copy any important details from your GMail contacts manually into Address Book if you need to
- Wipe out your GMail contacts (you could always backup with Export first if you want but don’t re-import)
- Open the Address Book application and head into Preferences
- Choose the option to sync “On My Mac” with Google and hit configure to enter your GMail details
- Delete the GMail profile from your Windows Phone 7 and then re-add it (otherwise it won’t sync phone numbers)
This means you’ll have your Mac contacts at your fingertip in GMail so make sure your GMail account has a secure password and follow their steps to ensure your account is well protected.
Reception & call quality
I was nervous about getting back into bed with AT&T for another two years. I need coverage at work and home as I don’t have a dedicated phone at either location and many times AT&T had left me with only a single bar to get by.
I am somewhat confused that I get 3-4 bars on the Samsung Focus in both locations and I’ve yet to have the chopping up or disconnecting of calls that I attributed to AT&T when using my iPhone 3G. Stranger still is that when I have had 1 bar (one place in my apartment) I am actually still able to make calls without it cutting out or dropping. My iPhone taught me never to try with 1 bar…
Visual voicemail is gone as I guess that was an Apple exclusive but I’ve only had a handful of voicemail messages over the last 2 years so I doubt i’ll miss it.
Camera
The camera seems pretty good and has some HDR and anti-shake options as standard as well as limited bunch of image effects. It also does video but I haven’t tried that yet.
Marketplace
You sign into this with your Xbox LIVE credentials and once you’re there it’s not a far off experience from the iTunes store except that it has a lot less apps. While it’s good you don’t have to wade through so much junk to find good stuff there are some omissions too like Hulu and for many people they’ll be missing Angry Birds and their favorite games and apps. I also haven’t found a good Windows Phone-like navigation app although the built-in Bing app is no worse than the Google Maps app on the iPhone that occasionally gave me nonsensical (drive into the ocean) or wrong directions (Seattle hotel being off by 2 blocks).
On the plus side some favourite sites have their own apps and they have fully embraced the metro user interface to provide a great experience – these include IMDB, eBay, Facebook, Twitter.
The bad side here is that the marketplace you’ll be presented with is the one your Xbox LIVE account is associated with and once you’ve set-up your phone YOU CAN’T CHANGE IT!
For me this means I can’t get Netflix on my device as my Xbox account is set to USA. Previously Xbox didn’t let you change your country but recently introduced a facility to let you migrate your account to one of several new countries they now support. I’m hopeful they’ll let more general country changes next year as I’m not giving up my 8800 gamer score and cool gamertag (damieng) without a fight.
Summary
There are a whole bunch of extra things I haven’t covered here including the Bing maps, Office docs, Xbox LIVE, Zune and the various apps. I’ll either update this article or post another :)
I haven’t switched my iPhone on in three weeks. There are a few apps I do miss but they’re also on my iPad.
[)amien
Six great new features at Xbox.com
It’s been quite a while since xbox.com had a major update and today sees the launch of the new version with a clean new look and a whole host of new features that our teams here at LIVE engagement have been working on.
There are a whole great new set of features, my favourites are below… note that some of these are not available in non-LIVE locales.
![]()
1. Avatars
Avatars are no longer just for the console but are escaping out onto the web and Windows Phone 7. With the new Avatar Editor you can create your own avatar or modify your existing one with a new easy-to-use interface from your browser.
The new Avatar Marketplace lets you search and find cool items for your avatar to wear and try them on right-there in the search pages. Head on in either by game or by lifestyle (brands) (click the little grid icon to see sub-brands such as your own university’s sports team!).
Because these guys are 3D animated they require Silverlight to be installed on your machine (the streaming videos on xbox.com also require it)
2. Marketplace search & results
A brand new search function means we get much better results than before, fuzzy matching and some dynamic filtering options that appear on the left-hand side letting you dig down into family friendly games (e.g. bt game ratings).
Another cool use is to search for your favourite band and see what tracks and packs they have available. Then head to the game filter on the left to see only the ones that work with your game (e.g. Rock Band, Guitar Hero, Dance Central etc!)
When you visit the product detail page it now shows the images and streaming video inline (goodbye popups) as well as game add-ons showing which games they work with – useful for those music track packs!
3. Hand-picked promotions
Our content teams can now put together collections of themed hand-picked games, add-ons etc. that you can you filter, sort and explore from such as the new Kinect games or family-friendly fun (these will be per-region so might not exist in yours yet).
Gold and family gold members should keep an eye out for Gold exclusive offers or pricing!
4. Streamlined account creation
It’s now easier-than-ever to sign up for a free Xbox live account. Less questions, less steps and we’ll give you a randomly-generated gamertag you can change for free later when you’ve had chance to decide on the perfect name for your game-playing alter-ego. (We’ve seen some fun auto-generated ones during the development cycle including FirmJunk,

5. Compare games with your friends
Okay, you could compare games before but the new UI is better and there’s a cool hidden feature that lets you compare against multiple people at the same time.
To do this head into My Xbox’s Game Center and choose a friend to compare with. Now, notice the url at the top of the page? Put a comma after it and another gamertag to see three… or another comma and a gamertag to see all four (the maximum) side-by-side.
6. Family center
New with this update is the Gold Family Pack which lets you get four gold subscriptions for $99 a year and lots of cool family features including play time reports, gifting points, allowances etc.
There are a whole host of extra features to be seen at xbox.com including mobile-to-web gaming, improved messaging, simplified UI etc. so go check them out!
[)amien
Enums – Better syntax, improved performance and TryParse in NET 3.5
Recently I needed to map external data into in-memory objects. In such scenarios the TryParse methods of Int and String are useful but where is Enum.TryParse? TryParse exists in .NET 4.0 but like a lot of people I’m on .NET 3.5.
A quick look at Enum left me scratching my head.
- Why didn’t enums receive the generic love that collections received in .NET 2.0?
- Why do I have to pass in typeof(MyEnum) everywhere?
- Why do I have to the cast results back to MyEnum all the time?
- Can I write TryParse and still make quick – i.e. without try/catch?
I found myself with a small class, Enum<T> that solved all these. I was surprised when I put it through some benchmarks that also showed the various methods were significantly faster when processing a lot of documents. Even my TryParse was quicker than that in .NET 4.0.
While there is some small memory overhead with the initial class (about 5KB for the first, a few KB per enum after) the performance benefits came as an additional bonus on top of the nicer syntax.
Before (System.Enum)
var getValues = Enum.GetValues(typeof(MyEnumbers)).OfType();
var parse = (MyEnumbers)Enum.Parse(typeof(MyEnumbers), "Seven");
var isDefined = Enum.IsDefined(typeof(MyEnumbers), 3);
var getName = Enum.GetName(typeof(MyEnumbers), MyEnumbers.Eight);
MyEnumbers tryParse;
Enum.TryParse<MyEnumbers>("Zero", out tryParse);
After (Enum<T>)
var getValues = Enum<MyEnumbers>.GetValues();
var parse = Enum<MyEnumbers>.Parse("Seven");
var isDefined = Enum<MyEnumbers>.IsDefined(MyEnumbers.Eight);
var getName = Enum<MyEnumbers>.GetName(MyEnumbers.Eight);
MyEnumbers tryParse;
Enum<MyEnumbers>.TryParse("Zero", out tryParse);
I also added a useful ParseOrNull method that lets you either return null or default using the coalesce so you don’t have to mess around with out parameters, e.g.
MyEnumbers myValue = Enum<MyEnumbers>.ParseOrNull("Nine-teen") ?? MyEnumbers.Zero;
The class
using System;
using System.Collections.Generic;
using System.Linq;
public static class Enum<T> where T : struct {
private static readonly IEnumerable<T> All = Enum.GetValues(typeof(T)).Cast<T>();
private static readonly Dictionary<string, T> InsensitiveNames = All.ToDictionary(k => Enum.GetName(typeof(T), k).ToLowerInvariant());
private static readonly Dictionary<string, T> SensitiveNames = All.ToDictionary(k => Enum.GetName(typeof(T), k));
private static readonly Dictionary<int, T> Values = All.ToDictionary(k => Convert.ToInt32(k));
private static readonly Dictionary<T, string> Names = All.ToDictionary(k => k, v => v.ToString());
public static bool IsDefined(T value) {
return Names.Keys.Contains(value);
}
public static bool IsDefined(string value) {
return SensitiveNames.Keys.Contains(value);
}
public static bool IsDefined(int value) {
return Values.Keys.Contains(value);
}
public static IEnumerable<T> GetValues() {
return All;
}
public static string[] GetNames() {
return Names.Values.ToArray();
}
public static string GetName(T value) {
string name;
Names.TryGetValue(value, out name);
return name;
}
public static T Parse(string value) {
T parsed = default(T);
if (!SensitiveNames.TryGetValue(value, out parsed))
throw new ArgumentException("Value is not one of the named constants defined for the enumeration", "value");
return parsed;
}
public static T Parse(string value, bool ignoreCase) {
if (!ignoreCase)
return Parse(value);
T parsed = default(T);
if (!InsensitiveNames.TryGetValue(value.ToLowerInvariant(), out parsed))
throw new ArgumentException("Value is not one of the named constants defined for the enumeration", "value");
return parsed;
}
public static bool TryParse(string value, out T returnValue) {
return SensitiveNames.TryGetValue(value, out returnValue);
}
public static bool TryParse(string value, bool ignoreCase, out T returnValue) {
if (!ignoreCase)
return TryParse(value, out returnValue);
return InsensitiveNames.TryGetValue(value.ToLowerInvariant(), out returnValue);
}
public static T? ParseOrNull(string value) {
if (String.IsNullOrEmpty(value))
return null;
T foundValue;
if (InsensitiveNames.TryGetValue(value.ToLowerInvariant(), out foundValue))
return foundValue;
return null;
}
public static T? CastOrNull(int value) {
T foundValue;
if (Values.TryGetValue(value, out foundValue))
return foundValue;
return null;
}
}
Usage notes
- This class as-is only works for Enum’s backed by an int (the default) although you could modify the class to use longs etc.
- I doubt very much this class is of much use for flag enums
- Casting from long can be done using the CastOrNull function instead of just putting (T)
- GetName is actually much quicker than ToString on the Enum… (e.g. Enum<MyEnumbers>.GetName(a) over a.ToString())
- IsDefined doesn’t take an object like Enum and instead has three overloads which map to the actual types Enum.IsDefined can deal with and saves runtime lookup
- Some of the method may not behave exactly like their Enum counterparts in terms of exception messages, nulls etc.
[)amien
Anatomy of a good bug report
Working on the .NET Framework was an interesting but often difficult time especially when dealing with vague or incomprehensible bug reports.
Look before you file
Head to Bing, Google, official support sites and bug database if you have access to it (Microsoft Connect, Apple Radar, Bugzilla for Firefox etc.) to see if others have run into this issue. Searching for the error message can yield good results but remove any elements of the message specific to your project (e.g. class names, property names etc.)
Why accept a workaround?
Do not underestimate the value of a solid workaround.
A patch is significant effort for both sides and for re-distributable components like .NET Framework getting the components to the right place can be tough. You’ll need to deploy to your team, build, test and staging environments and, if you distribute software, to all your customers.
This can be especially painful when strictly controlled environments are shared with others and ops teams are hesitant about putting patches or hotfixes into production. Factor in processor architectures, operating systems and language support and weigh it up.
The reasons for this are:
- you may have made a mistake (likely if the software has seen considerable use)
- behave differently to your expectations (the dreaded ‘by design’)
- already be fixed (in the next release and possibly as a patch)
- have an acceptable workaround (why accept a workaround?)
If you are running into problems with developer tools also check out:
- Official forums (MSDN Forums & ASP.NET Forums for Microsoft tools)
- Unofficial respected sites (StackOverflow)
Consider how likely it is you’ve discovered a bug given the complexity of what you are doing, how unusual it is and how mature the software is. Attempting something simple on an established piece of software likely means you’ve made a mistake or misunderstood the documentation.
A good bug report
So you decided to go ahead and report the bug (we all want better software after all).
The essence of a good bug report is having just the right amount of information to identify the bug without any unnecessary detail.
Let’s break it down.
What happened
The most important element is describing what happened and there are four major possibilities.
Error message
You told the software to do something and it displayed an error message instead.
On a good day the error message lets you know why it can’t do what you asked and lets you know what to do to make it work. Given you’re filing a bug report it isn’t one of those days.
The error message is likely cryptic, doesn’t tell you how to get what you want or is just plain wrong. We’ll need that message in its entirety so:
- Copy Windows message box contents as text by pressing control-c when it’s in focus
- When there is a lot of text take a screen print (printscreen on Windows, command-shift-3 on Mac OS X)
- Localized error messages may slow down support responses – switch the app back to their language first
Exceptions
When a piece of a program (called a method or function) can’t do what it claims it throws an ‘exception’ back up to the piece that asked (called) it. This exception is like an error message but with enough lot of technical detail that travels back up the program until something deals with it (known as a catch).
When you see an exception then nothing wanted to deal with it.
You will see an error message that contains the exception and possibly a list of program pieces that couldn’t deal with it. This is called a stack trace and is invaluable to the person investigating your report so include it.
Developers seeing exceptions in their own program need to determine if they should be catching that exception or whether it shouldn’t be occurring. Feel frim the stack trace so your own methods aren’t included but too much is better than too little.
Unexpected behaviour
The software should have done what you wanted but did something you didn’t expect instead.
Report what you thought should happen, what the software did instead, how this is different and the reason why you think it should be that way.
Other people may not agree with your change and in the case of shared programming libraries or frameworks a fix for you can become a break for others that rely on existing behaviour.
Terminated
The software just vanished from the screen without a trace. Crashed, terminated or unexpectedly quit and perhaps took some of your work with it :(
If you’re really unlucky the software that crashed is your operating system. The blue screen of death (BSOD) on Windows, the grey screen on Mac OS X.
Often there are logs left behind you can examine to identify what went wrong.
On Mac OS X fire up Console from Application > Utilities and see what you can find. iPhones, iPods and iPads do this quite often and iTunes will likely offer to send detailed information to Apple who will hopefully share it with the application developer if it’s not their own.
Windows users will want to head to the Event Viewer and find the error and any additional messages that appear to relate to it and included these too.
Steps to reproduce
Ideally the minimal number of steps to reproduce the error every time. You want this to be reliable as possible as companies have limited resources too and won’t spend days trying to reproduce a low-impact bug.
This can be a very important step in understanding the scope of the problem and it’s impact. If you can’t reproduce it in a minimal number of steps there’s always the possibility you’re overlooking some other aspect that could be causing the problem – bad data or rogue code elsewhere!
For an application this may be a data file or a number of manual steps a user must manually perform via the user interface.
For a framework a small self-contained project file with a minimal amount of code to reproduce the failing scenario.
Again here, if you can make the steps clear and ideally in the language of the company producing the software your bug report is not going to hit extra delays.
Environment
Bugs are often sensitive to their environment and you should always include the version number of the software you are using as well as pertinent platform details, including:
- What operating system, version & service pack
- What processor architecture (x86, x64, IA-64)
- What language & locale your machine is running in (e.g. US English (en-US), Brazil Portuguese (pr-BR))
In the specific case of Visual Studio and .NET bugs:
- What version of Visual Studio you are using (including any service packs)
- What processor architecture you are compiling for
- What language and compiler version you are using (e.g. C# compiling for 4.0)
You may need to include details for your desktop or developer machine and details of the server it is connecting to if any are involved.
What you’ve tried
Chances are you tried several things before filing a bug report. Let us know if you tried:
- Alternate routes through the user interface
- Entering data in a different format or order
- A different computer or environment
Letting them know this means they can avoid suggesting things you’ve already tried or waste time trying them too.
[)amien