EMB207 Putting Your Big Ideas onto Tiny Devices with .NET

3027386728

Plenty of toys....

Well, the presentation has been and gone. Thanks so much to everyone who turned up and gave me such a good audience. And a special call-out for the tech support guys who let me set up my toys last night and leave them in the room, still working.

I've put all the sample code here, so if you really do want to make a set of Christmas tree lights that flash red when you make a blog post (and who doesn't) then you can download my code and get started.

3026553141

Ready to go. Note Fairy lights....

I promised some links during the presentation:

You can download the Micro Framework here.

You can find out more about the framework here.

The Dare to Dream Different contest is here.

You can find out abut the Spark program here.

It Lives!

Thanks to Ian, and his breadboarding skills, we now have a working prototype.

3018204245
With this, we can rule the world....

Everything went very smoothly really. In fact it worked first time - which always makes me nervous. Sure enough, later on it started to behave stupidly, which we tracked to a floating output enable signal. Now I just have to get it to Barcelona without breaking it.

Although I will be bringing it into the department on Tuesday to demonstrate as well.

Little Big Planet vs. .NET Micro Framework

Today I bought a copy of Little Big Planet for the PS3. It is supposed to be wonderful. It lets you create fantastic contraptions in a virtual world. It is still in the bag, unopened.

Because I've been playing with the .NET Micro Framework. It lets you create fantastic contraptions in the real world.

3018930582
Circuit design. Actually produced in a pub.

I'm making up a hardware/software system for TechEd 2008 in Barcelona next week, where I'm presenting a session called "Putting your Big Ideas onto Tiny Devices with .NET". I can't tell you what it is yet for two reasons:

  1. It is totally top secret.
  2. I might not be able to get it to work

Suffice it to say that the above circuit is crucial to successful completion of the project. I'm having a whale of a time bashing out the code in Visual Studio and deploying it to the target device.

Tomorrow we build the hardware...

.NET Micro Framework 3.0 is Now Out

While we are talking about Version 3.0 of stuff we find that the third version of the .NET Micro Framework is also available. This one is very interesting, because it with it the mouthwatering prospect of being able to develop for the embedded platform using the Express versions of Visual Studio. It runs in Visual Studio 2008, including the free ones. This is wonderful news for hobbyists, as it means that you just need to get some hardware and you are away writing C# code for your tiny device. Go and get it (again for free) here.

And don't forget to enter the DareToDreamDifferent contest.

Bond Fire Night

Went out to see "Quantum of Solace", the new Bond film.  Didn't really fancy watching anything outdoors, what with the truly horrible weather. So it was off to Vue in the middle of Hull for fireworks of the indoor kind.

We drove through what seemed to be a "Festival of Bad Driving" to get to the theatre, what with death wish cyclists, deranged lane changers and someone who seemed to want to race me round the car park, our nerves were pretty shredded before the film started....

I wasn't sure what to expect. Some of the critics have been a bit "ho hum" about this one, but I think is because the novelty of a new Bond is starting to wear off as Daniel Craig beds into the part. They may have a point about the plot, which seems to have reverted back to standard Bond faire, with sinister world domination types coming back to the fore.

Having said that, the whole thing was done with conviction and style and everybody played their role very well. It was definitely a bit bleak though, if you are looking for smug type endings with Bond and babe under a fur rug somewhere in the sun you are going to be disappointed. But if you are looking for another good action thriller, you won't be.

Running Windows 7 for Fun and Profit

At the PDC last week we all got given "The Goods", in the form of a hard disk full of software and a bunch of dvds with Windows 7 on them. They are heavily marked "For testing purposes only" since we are some way from a Beta release of Windows 7 and you really aren't supposed to use the system for real work.

I thought I'd give it a go anyway. So tonight at 7:00 pm I started an upgrade install on my main Vista machine. I didn't go for a clean install, life's too short for re-installing all those applications. At 10:30 the upgrade had just about finished and I was able to get my first flavour of Microsoft's new system.

It works. It works fine. I'm using my MacBook (which might make for interesting times if I ever try to boot back into OS X) and all my hardware has been detected with no problems. Since the current test release is based on Vista I wasn't expecting driver trouble and so far I've not had any. Setting up the monitors was a bit fiddly, but I soon managed to get them arranged how I like. And after a slight kerfuffle with the login for Outlook I've now got a very good place to work that does all the things it used to.

The whole machine seems a lot more zippy, with applications opening much more quickly and running very well. I've not really had much chance to play with any of the new features, but I don't think I'm going to have a problem living with this test release. If you were at PDC and are thinking about putting Windows 7 on your machine I'd say go for it.

Best Practices from 'Hard Code'

I picked up a book while I was at PDC. it is a best practice book for software developers. And it is excellent. I really like Steve McConnell and the stuff that he writes but "Hard Code" from Eric Brechner (writing as the deliberately provocative "I M Wright") is just as solid on technique, and has a really good line in snappy titles and no-nonsense talk. (one of the early articles is called "Development schedules, flying pigs, and other fantasies")

The content is based on articles written by Eric for in-house magazines at Microsoft. The intention was to spark debate about what you should be doing when you try to construct systems out of software, and the best ways to make sure you do it right.

If you write code for a living, or are a student learning how to write code for a living, or just want to find out what makes developers go tick (and probably cuckoo as well) then this is a great book to get. Strongly recommended.

Jet Travel Sock Conundrums

One of the daftest things I ever did was to get a set of socks with days of the week on them. I have now of course become fixated with wearing the correct socks on each day, lest some horrible sock-date-related misfortune becomes me as a result.

Today I'm flying back to the UK, losing a few hours of my life in an aluminium tube and crossing a dateline. In short, I take off on Friday and land on Saturday. I have two pairs of socks, one pair marked Friday and the other Saturday. This leaves me several options:

  1. Wear the wrong day and suffer whatever vicissitudes that fate decides to deal out as a consequence.
  2. Wear one sock marked Friday and the other Saturday. This should mitigate the effects of fate somewhat. It would of course leave me with another pair of odd socks that I could never wear again.
  3. Change my socks at midnight on the plane, which could lead to some consternation amongst my fellow passengers.
  4. Wear no socks at all.
  5. Stop worrying and get a life.

Hmmm. Tricky.

PDC Wrap Up

This is my last night in LA. The PDC has finished and I'm squeezing things into the suitcase. But I thought I'd put down a few things which I've seen over the week, which has been as excellent and inspiring as usual.

Microsoft Surface

I want a Surface device. Want, want want. I've had a chance to play with one, I'm even in the Surface community, which means that I can download and play with the surface simulator, which lets me create applications and run them on my PC.

If you've not seen Surface you are in for a treat. Nobody would say it is portable, think coffee table with a 24" flat screen TV laid on top, but the things it can do are amazing. Thanks to a bunch of cameras beneath the display it can see and track multiple finger inputs along with objects tagged with a kind of dotty barcode. The  way that you can move and manipulate objects on the screen is truly wonderful, and a massive pointer to the fact that the days of the mouse as an input device are definitely numbered.

I went to a Surface presentation and also had a chance to play with the software and the device itself. You can't say that version 1 of the hardware is going to find its way into every home and office, but when the technology develops, and it will, you will find that all the software interfaces that you will need to make the best of this way of working will be tried, tested and in the operating system.  Find out more here.

Home Server

You might not have heard of Windows Home Server. It tends to only be available when you buy the server hardware that powers it. It provides resilient, scalable storage for all your data at home, and can also be used to tie all the machines in your house into a unified network.  What I hadn't realised is just how it makes itself available to systems outside your house. You can set up a proper, secure, remote access which you can use to access applications running in your own personal "cloud". I'm not sure if anyone will want to go quite that far, but they might like to get access to all their home media when away from home. Find out more here.

Oslo

Don't know what Oslo is? Neither did I until yesterday when I went to a session because Boss seems to be interested in this stuff, and he knows a good thing when he sees it. Oslo is a great way to build line of business applications. It is a modelling language (also confusingly called M) which lets you express the design of your application in a way that lets the data do the talking. Because the starting point of your new application must be a good understanding of the information that underpins it you end up writing much less program code. And that has to be a good thing.

For me the great thing was that all the stuff I'm presently hammering into my second year students (yes, that's all you fighting with the "Make It Yours" specification) about establishing the scope and then moving onto the design of the underpinning data fits very nicely with Oslo. Find out more here.

C# Futures

C# is my favourite programming language in all the world. For now. The new version promises to be even favouriter. It promises something that is really interesting, dynamic types.

Up until now C# has been very strict about what you can do with what. This is all to the good, in that it stops your program asking an object to do something that it doesn't have a behaviour for. The C# compiler will refuse to run a program until it can determine in advance that everything the program tries to do will end up being possible.

Unfortunately this gets in the way when you are trying to combine objects in a looser way. More modern languages have a much more relaxed approach to this kind of thing, finding behaviours dynamically as the program runs. In the dynamic programming world you don't actually have to be a duck to fit in. As long as you have a quack method you can be treated like one.

In a really superb talk Anders Hejlsberg showed how programmers will be able to mark objects as having a dynamic type which is resolved at run time. This all happens in a way that preserves type safety, meaning that C# can mix it with languages like Javascript without making the code more dangerous.

This is all being built on a new version of the runtime for .NET which will also underpin other dynamic languages like Iron Python and Ruby.

But the best bit, the very best bit, is the way that soon the C# compiler will be componentised so that it can be driven from within your program. This brings an old school Basic flavour to the language, where you can type in lines of C# and have them compiled and run before your eyes. This was amazing. A fifty line program produced what looks suspiciously like a C# interpreter. Watch this for more.

Coding 4 Fun

I also met up with Andy Sterland and James Lissiak from Hull (now with Microsoft) who were manning the Coding4Fun stand and telling everyone about their Unreal Tournament fun and games. They had been given white coats to wear.

2980382465

There is no truth to the rumour that they arrived in a green van.

Dan Fernandez was kind enough to give me a white coat as well, on condition that I write something for Coding4Fun in the future. I'm very pleased with it, and plan to wear it for special lectures at Hull.

Don Box, Chris Sells and Azure

Azure is the new Windows Framework for Cloud Computing. Don Box and Chris Sells are two of the best programming presenters I have ever seen. They put together a session that set out neatly how much fun you can have writing code and running it in the cloud. if you get the chance to see the vide of this session you should.

2984240564

Chris and John getting started

Multi-Touch Input

Multi-Touch input in Windows 7.0 and Surface are heading in similar directions and will eventually meet up in a later version of Windows Presentation Foundation. If you really want to work with multi-touch perhaps the best way to would be to get hold of a rather spiffy Touch Smart from HP. I had a go at the lab which shows how Windows messages are managed with multiple touches. Me being me, I had to fiddle with the code a bit.

2983384977

Drawing with added jaggies.

The MicroFramework

It was great to see the Micro Framework on the exhibition floor, with even more hardware and the new Dare To Dream Different challenge. Which you really must enter.

11MicroFramework

Down on the Micro Framework stand.

They were showing off the new board that the 100 top entries for the contest will get to play with. This is an absolutely superb piece of hardware with lovely colour touch screen, network connection and all sorts. Lucky finalists will also get inertial sensors and wireless communications with which to realise their idea. I'm going to get a bunch of entries from Hull, some silly and loads sensible.

Swag

2981240588

We say that these trips are all about finding out about new technology, meeting the best experts in the field and learning new things, but actually, they are all about swag. Above is a snapshot of the swag process. I seem to have ended with around 10 T-shirts, two books, a slinky spring, a solitaire game, a flashing bouncy ball, a dot matrix badge computer and a screaming flying monkey. Not bad.

PDC Research Keynote and Boku

Today was the third day of "keynote" presentations. These are big impressive events, but I must admit that a lot of today's left me a little deflated. The best bit was the description of the way that computer research is informing work on the behaviour of diseases such as Aids. Apparently it is not just a question of computers providing data processing power to crunch data, it is the way that advancing knowledge in the behaviour of software systems is informing the work on the virus. That was fascinating.

Less compelling was the presentation of Boku, a new development that purports to teach programming to kids. (Rant warning: I feel strongly about this one)

Before he introduced the item, Rick Rashid told the audience how his kids are finding out how to use Visual Studio to create software. This is a good plan. They are learning something which will be genuinely useful in their future.

Boku doesn't use conventional tools or notations. You get to control funky shaped creatures in brightly coloured landscapes and make them zoom around and shoot at each other. The language is what I call "sort of" programming in that you do learn that you can put into place things that control what stuff in the game does, but I'm at a loss to understand how you could ever transfer any skills attained doing this into a real, problem solving, situation with a proper language in use today. I really can't see even Rick Rashid feeling that he would be doing his kids a favour by pointing them at things like this.

I'm probably missing the point here, but I don't see how this will engage future students with Computer Science.  It looks like it might be fun to play, and it sure looked great fun to create, but at the end of the day I feel strongly that Computer Science is about solving problems in the real world, and I don't think that Boku gives any kind of useful lead on that. Modern computer games have significant problem solving as part of the gameplay and I really don't think you have to make any half way house products like this I'm afraid.