Mix 11 Keynote Windows Phone Fun

Scott Guthrie at the keynote
Scott Guthrie describing all the new goodies for Visual Studio and Windows Phone Mango.

Went to the Mix 11 keynote today. The new Windows Phone version, codenamed Mango and due for release later this year, looks very good. It seems as if they’ve worked through the wish list from the previous release and just about added everything.

Mango gives task switching, background processing (in a very well managed way), sockets, an on-board database, application powered Live Tile support and some lovely enhancements to the user interface. Furthermore, the emulator enhancements in Visual Studio will make it really easy to simulate the accelerometer and GPS system. And we will also be getting some impressive performance monitoring tools.

Applications will also now be able to use both Silverlight and XNA components in the same program, which will make creating game menus much easier. There was so much stuff I’ve probably forgotten something..

The tools will be available next month, the phones start being upgraded around autumn. This is great news for Windows Phone lovers like me, and anyone who fancies following the easiest path to mobile development that there is.

After the keynote I went for a wander.

Kinect Powered Lazyboy

This is a Kinect controlled LazyBoy recliner. Just move your hands in front of the sensor to move around and even recline the seat. Amazing.

Curious Cloud readings

Over at the Curious Cloud stand they are now getting readings from teams who have devices that are uploading sensor data to the cloud.

Mix 11 Windows Phone Booth Session

BoothAudience
I asked the audience to sit down and look at me as if I’d just said something amazing. They did a great job. Such good sports. I wasn’t intending to produce a panoramic shot, but the stitching seems to have worked quite well. The guy with the accordion is one of the few people out there who has actually bought a copy of Cheese Lander. Make of that what you will.

In the afternoon I got to do my phone session again, as stand-up. Went very well, I was determined to get someone on every seat watching me and by the end I kind of had.

For those of you who made it through to the end, especially the VB developer who went away with a copy of my book, thanks for being there, I’d have felt really silly if I’d just been presenting in front of nobody.

Next stop, Ask the Experts, starring me as an expert. How could that go wrong…..

Mix 11 XNA Madness

Room Left

This is the left hand side of the room. The right hand side were just as good looking. You can find that picture on Flickr, just click through to get there.

Just done my Mix 11 session. Great fun. Needed nerves of steel (or at least corrugated cardboard) when the video projector shut down just at the start. Fortunately the audience was super terrific. And most of them like cheese. Some great questions at the end.

You can find the slides for my session here.

I’ve made a brand new demos site with all the session demos for today, plus loads of other Windows Phone good stuff. You can find it all here:

/demos

I’ll keep this up to date with any new stuff I write, and move some other things in there that are presently hard to find.

If you want to see me go through any of the other demos, catch me at the Windows Phone Booth today at 2:00.

Rube Goldberg and the Micro Framework at Mix

Curious Cloud Poster

I’m going to try and watch the local news over the next few days. I’ll be looking for reports of folks performing strange contortions under street lights and near air conditioning vents. If I do see any, I’ll know what it is about though. They’ll be people taking part in the Rube Coldberg Curious Cloud Contest. The idea is simple enough. You get a magic device that responds to temperature, light and motion. By getting the right conditions of these you can get three lights on the device to come on. This makes you a winner.

It turns out that, with a bit of experimentation, anyone can get the lights to come on (particularly if they take a look at the C# code that powers this .NET Micro Framework based contraption). So the biggest prizes go to those who can make them come on in the most interesting way. Dressed as a chicken perhaps, or using a robot, or on the street. Or all three.

Curious Hardware

The hardware doing all this is pretty impressive. A netDuino board sits at the bottom, talking with a WIFI adapter and a sensor/display board. It captures readings from the sensors to an on-board memory card. When the device is able to detect a WIFI signal it will upload all the recent readings to the Cloud, where anyone can take a look. So, in a package around the size of a cigarette pack we have a .NET capable processor, sensors, data logging and wireless networking.

I got to have an early play with one of the kits, you can find my sensor readings here:

I’ve not found the magic values yet, but I reckon the fun is in the journey.

Colin Miller, of the .NET Micro Framework team, is dishing out complete kits to lucky Mix delegates who want to form a team and want to have a go. He will be on hand from tomorrow in the Connect Lounge (at Shorelines A) dishing out kits for you to play with.

Curious Cloud Box

The kits are beautifully presented, with all you need to get started, including a battery pack so you can take your sensors out and about.  You could even use a Windows Phone app to visualise your results.

Find out more at http://curiouscloudcontest.com when the competition opens tomorrow.

Vegas Shopping

Mandalay

If I ever have a business where I need some of the best sales people in the world I’m going to hire folks from the ‘states. Absolutely. I went shopping today and it experienced the full force sales experience stateside. People in the shops here really want you to have a good day. And they reckon the best kind of day is spent buying their stuff. I went down to one of the Vegas Outlet malls and was bowled over by the people there. In a very expensive kind of way.  I know that you can get good and bad service anywhere in the world, but out here it seems that good far outweighs the bad.

And I found out something new about Las Vegas since I was last here. They now have a Fry’s Electronics. And you can get there on the bus. Fry’s is a big brand across the ‘states. The have warehouse sized shops filled with everything, from individual electronic components up to full blown AV systems. I must have been in there for two hours looking at stuff.

The bus is the one that goes up and down the strip. Seven dollars buys you a day’s worth of travel and it is one of the greatest bargains in this town. The busses are frequent and shiny new.  And the bus station is ace.

Bus Station Panorama
I  call this one “Bus Station Panorama”

Bus Station Tiles
.. and this one is the tiles on the wall

I staggered back late afternoon with my purchases, and then headed out to meet some of the Windows Phone crew for a drink and a bite. Great fun, I met a couple of folks from Boston who’s names I’ve completely forgotten (although I do remember pretty much everything else) and I also met up with the chap who wrote the original version of Farseer. Since he is the man who made “Destruction Golf” possible, I shook him warmly by the hand..

I finally crashed into bed way later than I should have been up, but it it was a really good evening. The conference proper starts tomorrow. With around 20 hours or so of beauty sleep I should be fine…

Going Large at Mix 11 in Las Vegas

Mandalay Morning

One of my frequent refrains to students is that they should write a blog. Not because the world necessarily needs to know what they think, but because the exercise of writing a reasonable amount regularly is extremely good for you. It makes you more able to express yourself.

Some people go all out for physical fitness, which is fair enough I suppose. Having taken a long hard look at my body some years ago (those full length mirrors they put in hotel bathrooms don’t help at all) it dawned on me that it was very unlikely, even with a lot of keep fit, that I could ever make a living from my physique. However, writing did seem to offer possibilities. So I started blogging, and I’ve done so for quite a while now. Every now and then I try to stretch things a bit by forcing myself to write a lot more words than I normally do, and here we are.

While I’m in Vegas, and while I’m still waking up at one in the morning with a head full of cold and words in equal measure, I’m going to write some longer posts about the experience. But there will still be pictures.

I set off yesterday mid-morning, taking off from the ninth best airport in the world, which is just down the road from our house.  On the plane I ended up setting next to a fellow academic, which was nice, and so I was able to spend the time taking shop all the way to Schipol.

Things got even better when I was checking in for the next flight in my journey. One of the people on the check-in desk noticed that I was quite tall and offered to upgrade me to Business Class.  I really like Delta airlines. Last time I flew with them they picked me out and got me a seat with legroom, this time it was a whole new experience. The only problem really was with my attire. I dress for comfort when travelling, so I was in pair of worn jeans and a shirt I’m not that fond of. I didn’t actually resemble a hobo, but a straw hat and a banjo would not have looked out of place in my ensemble.  The lady upgrading me made this point as diplomatically as possible, and so I did tuck my shirt in..

Tips for travel from Rob: if you want to get upgraded it is probably  best to dress a bit smarter for your flight. The other folks in Business Class, who have paid a considerable premium for that status, might not appreciate someone sitting next to them who looks like they just climbed off a tractor. Having said that, I think I just about nailed the “eccentric millionaire” look.

As a consequence of my good fortune the flight to Detroit was excellent, with superb service, amazing food and a chair that you could tip up and down with a little control panel.

At Detroit I had to change planes, but before that I had to actually get into the country. The man at Homeland Security, having got my fingerprints and stuff, then asked some very searching questions about my trip. I told him I was giving a talk at Mix and he asked “Why you?”. I didn’t really have a good answer to this one, saying it was because I know lots of good jokes probably wouldn’t have impressed (and the point itself is debateable). Worst still he might then have asked me to make him laugh, which looked like it would have been tricky. In the end I murmured something like “Microsoft seem to like me” and he let me in.

I then had a Brief Encounter with my case, before handing it back into the system for the transfer to Vegas. In the wonderful Discworld novels one character has a magical trunk called “The Luggage” which follows him everywhere. My case is a bit like that, but in reverse.

I’d brought along my Kindle, which turns out to be an excellent travelling companion. I even managed to use the prototype web browser to check my email while waiting for my flight to be called. It worked fine apart from one tiny problem, which was that for my Outlook web mail it rendered the text as black on black background. But I did manage to buy a book while I was waiting, and then read pretty much all of it on the  way. The book was “An Unsuitable Job for a Woman” by PD James, a well written whodunnit with great descriptions of the characters and locations and a well constructed plot – although I did manage to figure out quite a bit of it. A clue, the person that looks evil sometimes is.

The flight out of Detroit was smooth enough,  but by now my head cold was really kicking in and I spent the whole time sniffling and sneezing my way over the USA.  I must apologise to the people who were forced to sit next to me, although I was relieved, in a perverse sort of way, when the chap on one side immediately produced sniffles and sneezes that put mine to shame. I now have a worrying vision of two transatlantic teams of cold germs ganging up and attacking my sinuses over the next few days. Oh well.

Once I got to Vegas my case did the usual trick of hiding at the back of the plane, so that it was absolutely the last one onto the carousel. I really think it doesn’t like me very much. Then I grabbed a cab to the hotel and crashed out for as long as I could, which turned out to be four hours. So I wandered round the room with the camera and a tripod taking pictures of stuff. I’ve seen them do this in CSI loads of times.

Mandalay Mini Bar
Tempting minibar

Stereo Sinks
Stereo sinks. I’m tempted to try washing a foot in each one at the same time, but I fear this may end badly.

Generous Prizes
Generous prizes for my session. All the way from the UK

Watch and RoomKey
Watch and Room Key

The Mandalay Bay hotel is enormous. The room numbers on each floor have three digits, because they have many hundreds of rooms on each level. My room is number 333, which is the same number as my office at Hull. Coincidence? I think so.

More later.

C# Yield Return Fun

public static IEnumerable YieldFun()
{
    yield return 1;
    yield return 2;
    yield return 3;
}

static void Main(string[] args)
{
    foreach (int i in YieldFun())
    {
        Console.WriteLine(i);
    }
}

If you can tell me what the code above does, you understand how yield return works. If you can’t, read on……

In a C# program you can mark things as implementing the IEnumerable interface (to use this you need to have a using System.Collections; at the top of your program). This means the thing can be enumerated,  i.e. it means that I can get a succession of objects from it.

The best way to work through something that can be enumerated is by using the foreach construction, as shown above. You’ve probably seen foreach when you’ve worked through items in a collection such as a List or an array.  In the above code we are using foreach to work through the enumerable results that the YieldFun method returns. 

The code inside YieldFun looks a bit scary. The yield return keyword combination is followed by the thing that you want to send back for this iteration. In this case I’m just returning a different number each time. What happens when the yield return is reached is that the method stops at that point, returns the result and then, when the foreach asks for the next value, the method wakes up and continues at the next statement. The result of the program is simply the sequence:

1
2
3

If you want to programmatically supply a sequence of items to a consumer then this is  a great way to do it. 

The Rob Miles Roadshow

Next week I’m doing a Mix session all about game development in XNA, stay tuned for some brand new examples and sample code, but unfortunately no new jokes. I’ve just found out that I’m also doing Ask the Experts on Tuesday evening starting at 6:00 pm  (and for once I’m not going to be doing the asking).  They are using a “speed dating” arrangement where we meet up with a bunch of folks for 20 minute slots where we get over the gist of what we are at Mix for. I’ll be doing Windows Phone games (of course) and I’d love to meet you if you come along. Strange this, nothing for years and then two sessions of speed dating in a matter of a weeks.

image

If you are lucky enough to have a Windows Phone you can download the official Mix application which is great. And also mentions me. Search the marketplace for “Mix 11”.

The “Rob Miles Roadshow”™ then rumbles on to TechDays later this month. They also have a really good Windows Phone application too, although this one works best if you can speak Dutch. Search the marketplace for “Techdays”.

DevDays Speaker

I’m doing a session on Windows Phone games, another on the .NET Micro Framework and a third (deep breath) where I’m going to be talking about Windows Phone development in rhyme, just for Geek Night. And I’m also making an appearance at one of the keynotes too. Now, if that’s not a reason to buy a new pair of jeans, I don’t know what is… Find out more here.

Prizes and Rewards with Windows Phone

image

There has never been a better time to be a Windows Phone developer. If you are a UK student you can take part in a Student Competition where you can win prizes just by submitting applications to the Marketplace. Since you can also sell these applications, and it costs you nothing to join the Marketplace if you register via DreamSpark this seems like a pretty good deal. Find out more here.

image

If you are old like me and therefore no longer a student you can instead sign up for the Think.Dev rewards programme and get prizes and rewards for submitting apps. This is open to all Windows Phone developers in the UK and you get stuff for just turning up and submitting apps. I might even win a prize for Cheese Lander (although this is probably unlikely). Sign up here.

Headphone wires aren’t what they use to be

Wires
All I have to do now is solder them onto a plug. Yeah, right.

My lovely (and so expensive I never told number one wife I bought them) Ultimate Ears headphones have broken. The wire that goes into the plug has failed on one of the connections. Being a chap who’s not afraid of hardware (perhaps because I don’t know that much about it) I was happy to get a new plug and solder it on. That is, until I saw what passes for wire these days.

In the Olden Days ™ headphones were wired with the next thing down from mains cable, which could be dismantled and worked on with industrial scale tools. My old Sony phones were much tougher too. They even survived a trip around the robot vacuum, which took a fancy to them one day.

Nowadays, with fancy “litz” cables and stuff it looks like it is pretty much impossible to mend the darned things. And they aren’t even heavy enough to serve as a decent paperweight.

Rob at Mix 11 in Las Vegas

MIX11_BB_I'mSpeakingAt_2

For those of you lucky enough to be going to Mix this year, I’ll be joining you as well.  I’m giving a session on Tuesday 12th of April at 11:30 am in Breakers D. The subject is “XNA Game Studio for Fun, Profit, Danger, Excitement and Windows Phone 7 Games”. There will be all new content, but all old jokes.

I’m also doing a booth session in the Windows Phone Booth (good name that) at 2:00 pm on the same day. Feel free to drop by and say hi. I’ll even sign copies of my book that you’ve bought….

Mega Open Day

Audience
This is some of the audience for our mega Open Day. Great turn out.

It is scary how fast time goes by. We are running towards the end of the  Open Days for this academic year. We are going out with a bang though, the turnout for today’s event was huge. This placed a certain amount of strain on the rooms that we have. We didn’t actually make the design lab bulge, but we came close. Thanks to everyone who came along, hope you had an interesting and enjoyable time with us.

Book Handover

As usual we gave away a copy of my book as a price, here is Warren handing it over. Note that we have now got some copies of the latest version (in all the shops now).

Find out if you are using the Windows Phone Emulator

It is often useful in a Windows Phone program for the code to know whether or not it is running on a real device.  It is actually easy to do this:

  1. Add Microsoft.Phone to the references to your project if it is not already there.
  2. Put the following line at the top of your program.
    using Microsoft.Devices;
  3. You can now write code like this:
    if (Microsoft.Devices.Environment.DeviceType ==
                                                                               DeviceType.Device)
    {
        // we are running on the real phone
    }

You can use DeviceType.Emulator in the test to see if you are running on the emulator.

Some Windows Phones Contain NASA Chips

ChipVersion

Sadly, my phone just contains ordinary chips…. such is life.

It turns out that your Windows Phone 7 device might be worth a lot more than you think, if it contains custom, radiation hardened memory chips, mistakenly installed when it was built.  Apparently, because the part numbers of the memory chips only differ by an H (for hardened) production plants put the highly valuable devices into a number of Windows Phone devices when they were made.

Ivan Felfrit, NASA spokesman, is saying that these chips were originally destined for the next generation of Mars Rovers, Spirit II and Opportunity IV. “We need several sets urgently” he said earlier today, “We have to test the programs on genuine hardware and we also need the devices for endurance testing”. NASA are happy to give you a replacement phone and 10,000 dollars if you have a device with these components inside. They have advanced surface mount labs where they can remove them and install them in Mars Rover prototypes.

To find out if your phone has the chips in it, just to to Settings->About and touch “More Information”. You should see the screen above. If the Chip SOC version is set to 0:36.2.0 you have the NASA chips. Mine above only has 0.36.2.6, which is the standard devices. Either chip works fine, it is just that the NASA ones are worth more, and might be going to Mars. If you think you might have the NASA chips, send an email to i.felfrit@wp7formars.com and he will get right back to you.

30 Minutes in Paris

I went to Paris today. For half an hour. That’s the time it takes a person to sprint from terminal 2C to terminal 2F, jump the security queue and collapse exhausted on seat 10A of the flight out. The lady at the Air Bulgaria desk in Sofia expressed surprise that I was flying from Sofia to Amsterdam today, what with there being no flights in that direction. Fortunately the airline computers were equal to this, and had me going to Paris first, and then to Amsterdam, and then a six hour wait and then a flight back to Hull.

Lovely.

Fortunately I managed to sprint across the airport and made it  just in time. The rest of the journey passed without incident, although Schipol airport is not actually the most inspiring place to spend the best part of a working day.

The whole trip was worth it though. I’ve met some splendid folks and had a great time. I know it is very dangerous to extrapolate a whole race and culture just from the few people from there you happen to meet (I dread to think what would happen if folks started thinking all English people were like me) but I really liked the Bulgarians I met up with (and I saw quite  a few when we were “Speed dating” on Tuesday). They don’t suffer fools gladly. If you ask a confirming question (which I am wont to do), for example “So that means the Airport Shuttle will be leaving at 5:00 am?” they will look at you as if you are an idiot, bearing in mind they have just told you this. Actually, thinking about it, it was a rather idiotic question though…

Bulgarians also seem to have an earnest seriousness when you first meet them, but this quickly turns to riotous humour – which is great.

Nice Beer

We went out for a meal last night. Great food and the beer was really nice but we had to have several glasses just to make sure..

Coffee Stand

Sofia airport coffee at 5:45 am..