This past week, I participated in a backstage conversation with the community interested in Windows Phone 7. It a very strange experience for me, which you will understand when you watch the video. Between lights going out, phones ringing, and talking to a screen for an hour, it was most certainly novel. I enjoyed it thoroughly and look forward to doing another. Lots of great questions from the community. Have a watch and let me know how I can help you.
Courtesy of the fine folks at Remix Atlanta, I found myself being interviewed by the very Southern-courteous Celia Dyer for TechDrawl. They’ve finally posted it. The audio was best we could manage given the space we had, and the impromptu recording. Enjoy.
One of the hardest things about shipping software is shipping software. During the final testing phases for our Windows Phone Developer Tools CTP refresh, we discovered a bug that will impact developers using some existing “transparent Silverlight” assemblies (Microsoft & 3rd party) in their Windows Phone applications. So we had a choice to make: 1) pull back the release to fix the underlying problem (which may have taken up to two weeks given where the actual problem exists and how the engineering & test work required to validate the fix didn’t cause other regressions), or 2) shipping what we had with relatively simple work around.
I like to tell everyone who will listen to me that my job is to be the number one and loudest advocate for our Windows Phone developer experience. Since so many of you have already updated to the recently released Visual Studio 2010 final release, I didn’t want our community to wait any longer for access to the updated Windows Phone tools. We feel confident that this issue impacts only a small subset of Windows Phone developers, but we want to be as transparent as possible about this issue, and get the word out about the work around as quickly as possible.
The Bug – System.IO.FileLoadException
When loading assemblies that make up an application, the Windows Phone OS checks their digital certificates. There are 3 types of assemblies:
1) Those included with the phone – these are signed with a Windows Phone cert
2) Those that are provided by other SDKs – these are transparent Silverlight assemblies, and are generally signed with some other cert
3) Those that are built as part of your app – these are your source code, and in this release they aren’t getting signed
In one of those “d’oh” moments, we found that the loader, in this iteration of the Windows Phone Developer tools, fails to load assemblies that are signed with non – Windows Phone specific certificates. So any signed SDK assembly will fail to load. This issue will surface if you are trying to use transparent assemblies from toolkits such as the Silverlight SDK (e.g. to use the RSS capabilities found in System.ServiceModel.Syndication.dll).
The problem is specific to this release of the Windows Phone Developer Tools. It will be fixed in a future update.
It’s very rare that Passion, Talent, and Opportunity line up. When it does, you ring the effing bell. Starting next Monday, I am going to be moving over to the Windows Phone 7 team, working on the developer experience.
The common theme in all of my work to date in my return to Microsoft has been the developer. Developers, developers, developers. [call me Monkey Boy Jr??] So when I was presented with the opportunity to work on the developer experience for Windows Phone 7, I had to take it. This position feels like a once in a career kind of deal, and I couldn’t be more excited. You know it’s the right role when you are part excited, part scared, and the mix ratio keeps shifting.
As for the blog, this new role will mean more posts here about mobile. Also, if you are a mobile developer, I want to hear from you. You can follow me on twitter, and I am always watching the hash tags #WP7 and #WP7Dev.
Windows Phone 7 301 Redirect Bug
I checked with the Windows Phone 7 team before putting this post out, and got the OK to write about it. I hit this bug when building out my FriendLinks Windows Phone 7 application, and was surprised to find it was a bona fide bug and not a problem with my coding skills. If there was a default value in the constructor for any new project I start, it would look something like:
codingErrorResponsibilty == this.programmerName;
In any event, here’s the cruxt of the bug. If you are using HttpWebRequest developing on Windows Phone 7, and you get a 301 redirect returned from the web server, and that web server sets a cookie, the current build (as of 03/16/10 at Mix10) of Windows Phone 7 will throw an exception.
In the case of my applications, I was trying to determine the title of the page as defined by the “<title></title>” tags for a given URL. The function I wrote for this was:
It’s pretty exciting to be at Mix10 right now. There’s a ton of buzz around Windows Phone 7. I got a chance to hang with some of the team (thanks AI), and they let me load my FriendLinks application onto a working phone, and it worked straight away. Very cool. Here’s a link to my first post about building this Windows Phone 7 app.
Today at Mix10, Microsoft released the developer tools for Windows Phone 7 Series. I’m excited about seeing what apps will get built now that there is general availability of the Windows Phone dev tools. That’s general availability, as in for everyone!
Charlie Kindel (if you aren’t, you really should follow him) was nice enough to get me access to the tools about 3 weeks ago, despite the fact that he and his team have had plenty on their plate since going public with WP7. I have spent some time in the last few winks building and tinkering.
A little background on my dev skills. I can write basic applications, and have been known to favor Python when trying out new ideas. I have dabbled a bit with our ASP.NET MVC (MVC v2 just released – way to go guys!!) and taught myself enough C# to be dangerous. What coding I do, I do for fun and in my free time. I call it my nocturnal nerdiness, and have been logging some of my projects using the n00bnotes tag. Prior to 3 weeks ago, I had never written one line of Silverlight (or WPF for that matter) code, nor any XAML. I was really excited to have the opportunity to build apps for this mobile platform, as I once tried to get along with iPhone development, and while it’s clear that Apple has created tools that developers seem to love, I couldn’t get along with ObjectiveC. That’s a me issue, and not a statement about ObjectiveC. I get along famously with Python, but me and Ruby are not friends. That’s just the way my brain works.
With that as a preamble, I wanted to share what I have created in just the last 3 weeks, working largely in what spare time I could find when not doing my day job or dealing with an recalcitrant 8 month old girl who refuses to sleep. The main thing I want people to take away from this is that it in incredibly easy to built apps for Windows Phone 7. If I can figure it out, anyone can. The team has delivered a great development experience built on top of Visual Studio Express. When you fire up the development environment, everything you need is there and you are ready to go. It was a pretty painless experience to get the environment up and running, and it includes templates for Silverlight apps as well as XNA games. While I have only been able to deploy to an actual phone once, the emulator felt like a software version of the phone.
Over the next few days of Mix10, I am going to put up a few posts about my experiences with the development tools, highlighting some of the blockers I hit, how I solved them, and for some of them, how I should have solved them, which I eventually fixed during code refactoring.
In the meantime, I wanted to share a link to the current version of the code. This is my FriendLinks application, built for Windows Phone 7 [UPDATE: 3/24/10 – oh the joy of forgetting to remove commented code with your twitter pass. Ooops…code updated.] You will need the development tools in order to open, edit view. The only disclaimer I make is that the code works. Not all of it is pretty, and in some places I haven’t gone back to fix things I fixed elsewhere (i.e. walking XML for Bit.ly versus for Twitter).
This specific post is about some of the things that gave me the biggest problems in getting started. The app that I built is pretty simple. It’s meant to allow you to connect to Twitter, pull down your friend timeline, and parse the timeline looking for URLs sent by people you follow. I use Twitter for content discovery, and this is my ultimate time waster app. When you click on a link the listbox, some additional calls are made via the Bit.ly API, and the TweetMeme API, to get additional information like the number of retweets that article has, the title of the page referenced and the number of clicks as tracked by Bit.ly.