eZ430 Chronos Wireless Watch
/I really want one of these. I’m not surprised they have sold out.
Rob Miles on the web. Also available in Real Life (tm)
I really want one of these. I’m not surprised they have sold out.
I was doing a lecture on our Software Engineering course today. We were talking about UML (Unified Modeling Language) and how to map language specific features (for example C# properties) onto UML diagrams (if you want to find out more about this you can go here for some useful ideas).
Anyhoo, I thought it would be a good idea to show an example of a property in action so I wrote some C# on the board:
Rob.Age = 21;
The idea was to start an instructive discussion about the difference between fields and properties in C# objects. I asked the class to consider the statement and comment on it. A hand at the back shot up. “What do you think the statement means?” I asked. The reply came straight back “That you’re a liar”.
Thanks for that.
While we were in Berlin we went into the gift shop attached to Legoland Berlin. One new Lego product is the Lego nameplate. It comes with a bunch of shapes and an alphabet design you can use to make letters:
If you want one of your own you can find it here.
I really like Live Mesh. This is a Microsoft file synchronisation thingy where selected folders on your machine are reflected onto the Live Mesh storage out in the cloud, and also onto other machines that run the Live Mesh add-in. It runs quietly in the background and doesn’t seem to intrude much on normal life (unless you are daft enough to make changes to files on two different machine before connecting them both to the network – at which point you will have to resolve a bunch of conflicts).
I’ve got all my courseware for the current year stored on Live Mesh. You get up to 5G of space on the server behind the system and this is plenty for a year’s worth of PowerPoint slides and Word documents.
The really good news for me is that I now no longer care which machine I’m using. As long as I allow it a few minutes to “catch up” with the latest versions (if I’ve not used that particular machine for a while) then I can use any device. The net result of this is that I no longer carry the same laptop to and from work.
I guess I could have used an external drive for this, but I’m always afraid of dropping/losing/having stolen the device which holds the only copy of my stuff. Live Mesh means my data is held on multiple machines, as well as on the central server.
However, my bag is now much lighter and easier to carry, and this means that I’m missing out on some exercise and will probably gain some weight as a result.
But I reckon it is worth it.
My kind of meeting.....I was doing a tutorial this morning and I had just run the program when all the power in the building went off. The students present were most impressed, they had never seen a program that could turn off all the lights.
Fortunately (or unfortunately) it turned out that it wasn’t my code. The power came back on after five minutes or so, and later on we got an email saying that owing to problems at the local sub-station we would have to shut down the university and leave early as “any delay could cause catastrophic problems”.
I had this vision of people standing around a pair of glowing wires and someone playing the Scotty role and saying things like “I dinnae think she’ll take much more captain..”
Unfortunately it meant postponing my 4:15 VB lecture. Sorry about that folks, we were going to learn all kinds of interesting things about file paths too….
danah boyd (deliberate lower case here) is a researcher who ponders how the networks are changing our lives and the way we do things.
She is the co-author of a book which contains a set of case studies that investigate how different people live, learn and work around the networks of the 21st century. I’ve just started working my way through it, and I’m finding it very interesting.
Sometimes it seems to me that progress is made on the basis of one step forwards and two steps back. Today the DAB radio in the kitchen stopped working. It didn’t go a bit mushy (which is what the old analogue FM one did). Instead it went all staccato, and finally expired completely. I’ve had this happen before. I think it doesn’t like trees full of wet leaves, or something. Never mind, I thought, we can get digital radio on our TV.
Except we can’t. Some trickery at FreeView has seen all our TV channels break and move around, so that now the radio stations hardly work and I had to buy a new tuner to get the Media PC in the living room to work at all.
I wish (and remember this is a gadget person talking here) that we didn’t always move into new technology before we have actually got them as good as the ones they are replacing. Music players have only recently caught up with my old walkman, in that they now have the ability to resume playing where they left off. Digital radio (and TV for that matter), were sold on the basis of more channels (which I don’t really want) and better quality (which was a lie).
Oh well, I suppose they will catch up eventually. We dug out the old analogue radio and that seems to work.
Had to go home today. Flying on Friday 13th. Can’t see a problem with that. But first a last trip to TechEd.
I could have won this, but in the end I didn’t.
We went to the last session of all, which was a great presentation about using constraints and automated test to improve program reliability. Anyone who has talked to me about programming for more than a couple of minutes will know that I am very keen on Test Driven Development, but it is rather a chore to write the tests, and often you just want to add elements to the code so that the resulting system will not let you make a mistake. If an age can’t be negative why not just have a way of putting that into the code?
.NET Version 4.0 includes Contracts that let you set out things like this, and looks like a great extension to the framework. Find out more here. If you want to write your unit tests automatically you could take a look at Pex which will run your code, watch what it does and then generate suitable test behaviours. It even goes as far as making fake versions of built in library functions to properly replicate a testing environment.
All this is very interesting. I also went along to some sessions on the new dynamic elements being added to C# which let it bind more easily to languages which “make up” typing as they run. This is a great way to knit solutions out of lots of cooperating objects but goes against the grain of a strongly typed language like C#. It seems to me that we are travelling into the future in two directions at once. On one hand we have dynamic systems that fit themselves together as you use them (great for web mashups etc) and on the other we have systems that are strongly typed, constraint powered and properly tested (great for nuclear power stations).
Oh, and the flight home was fine, albeit a little windy.
I went to a session today about F#, which is a functional language. This is a very interesting way to write programs and is now entering the mainstream as part of Visual Studio 2010. Well worth a look.
I also had a wander round the exhibition hall, which is huge.
These folks are doing really interesting stuff. They have developed a way to take state diagrams (a nice graphical way of showing the behaviour of a system) and use these to produce code. They can even animate the state diagram and allow you to set breakpoints in the application controlled by it. Great for embedded control, and just about anything controlled by a state machine. Which is just about anything really. Great Stuff.
I didn’t have a go, but I really wanted to…
After my TechEd session I thought we’d go out and celebrate in style. The style I imagined was a bit strange, in that we’d found out that there was a very strange bar near the hotel which had a rather strong toilet theme. This theme extended to food served in potties and drink in sample glasses….
This is us toasting another good day in Berlin. thanks to Adam for the snap
We were going to have the food too, but our nerve failed and so we went out and got a burger instead.
I did my final session of this TechEd today. I was on at 5:30, in session slot 13, but in the end pretty much everything worked. Thanks to everyone who came along, I hope you all had a good time and learned something useful. I’ve put the slides and all the demo programs up on Skydrive so feel free to download them and have fun. For some reason I forgot to take a picture of the audience, but then since you all know what you look like anyway I suppose this is not much of a loss…..
You might want to take a look at the other sites which are linked from my post from yesterday.
Did my first TechEd 2009 session today. Students and XNA. What could go wrong? Well, fortunately, nothing much as it turned out – except for one of my demos getting a tiny bit stuck. The audience was great, and I took a picture of them all:
On the left….
..in the middle..
…and on the right
Thanks for being a great audience folks. I hope you enjoyed it.
After my bit we were joined by some other TechEd speakers and we had a really good question and answer session.
If you want to find the links to my stuff, you can find silly games content at www.verysillygames.com
You can find my Yellow Book on C#, and my Orange Book on Java to C# at www.csharpcourse.com
I will be posting the slides for the session, along with all the sample code, on this blog after my session on Wed.
I’ve been preparing my TechEd sessions today. I’m doing two, one to Microsoft Student Partners (in a couple of hour or so) and one Interactive Session to the general conference. If you are here in Berlin please come along, I’d love to see you.
Since the session is about creating XNA games for the Zune HD not surprisingly I’ve been doing a bit of creating games for the Zune HD. I got my AlbumShaker running really nicely, and I thought I’d try running it on the original Zune players. I wasn’t expecting much, but I was really surprised to find that performance was quite acceptable, with the albums bouncing around the screen most satisfactorily. The program doesn’t seem to mind that it is running on one of the older devices, the game just gets “central” settings from the accelerometer. I even added some code to read the Zune pad, which emulates a gamepad thumbstick. This worked fine, except for a couple of issues.
Using the XNA Gamepad to Slow your Zune Game Down
The code for the album shaker makes a bunch of album sprite instances and then calls Draw and Update behaviours on every instance. The first version of my game called the GamePad.GetState method for each of the fifty or so albums on the screen. This did horrible things to performance. For some reason reading the Zunepad is very slow. I assumed that the pad would be read for a a given clock tick, and then that value cached for use in the game. This is not so. I got a huge performance improvement by reading the state once for all the albums and then picking up this value in each album.
Using the XNA Accelerometer to Make your Zune Game wobble
I was so pleased with my speedup on the original Zune I thought I’d do something similar with the accelerometer input, so I changed the game so that it read the accelerometer once and then cached that for use by all the items in that update. This had a really strange effect, where sometimes the items flickered madly about. I’m not sure why this happens, it is as if the GetRotation method on the AccelerometerState object actually corrupts the state in some way.
I only know that if you get a “fresh” reading for each item you want to input the game works fine. And this doesn’t seem to slow the game down either, which is nice.
So the moral of this is that it is fine to cache the gamepad settings (and in fact on the Zune this might make your game go faster) but the accelerometer values should not be cached..
TechEd started today. I went to a very good session on Windows Azure first thing. Then I had to go off and sort out some presentation related bits and bobs, which was a bit of a pain as there were a couple of other sessions I wanted to see. However, once the day’s work was done we headed off the the Brandenburg gate to see the Mauerfall event.
This was a celebration of the 20th anniversary of the fall of the Berlin wall by the toppling of an enormous row of domino-like blocks that stretched for over a kilometre. They had all kinds of heads of state there, a full orchestra and a live appearance by Bon Jovi.
The inside of the station
The outside of the station
A nice view across the river
On the way to the gate
Waiting by the wall
We found a good spot near the food and drink stands and began to wait. And it started to rain. And rain. After two hours in the rain I found that most of the things I had with me that I thought were waterproof, like my coat and shoes, were not. After three hours in the rain everything was wet. After four hours everything was wet and very cold. And then it started, We had speeches from the great and the good, music, and the blocks duly fell on cue. It was a great evening, even though I have never been so cold and wet.
Today we wandered over to the TechEd Conference centre to register.
This is the front of the centre. Very big. However, the most surprising thing was the sheer scale of everything around this part of Berlin. It must be the conference centre of Europe. All around there are enormous halls set out for these kind of sessions.
Next we ventured into uptown Berlin again. Peter wanted to climb to the top of the Bundestag. So we did.
On the way we took in the Sony Centre, which is absolutely huge.
On top of the Bundestag they have this amazing glass dome with mirrors inside that reflect down onto the parliament below. Very impressive.
This is the view from the top of the Bundestag at the blocks they are assembling as part of the 20th anniversary celebrations of the end of the Berlin wall.
Tomorrow the conference itself starts properly.
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.