PlayStation Vita

image

Apparently it is called a PlayStation Vita because of the associations with speed and life. I must admit the name makes me thing of crisp-bread. And I wasn’t going to get one. Oh  no. With a phone and a Nintendo DS 3D I couldn’t see a reason to own the device. Until I saw it running.

The graphics are very impressive. Like very, very impressive. It really is a PS3 you can carry around with you. I had a go at Ridge Racer (I think I’ve bought that game more times that I’ve bought different copies of Star Wars) and the presentation and graphics were excellent. And I got a cool pair of (surprisingly good) blue headphones as well.

For casual games phones and iPads are great. For something a bit different and the 3D effect the Nintendo DS 3D has a lot to offer. But for hard core gamers I reckon the PS Vita has an awful lot going for it.

Open Day at Hull

P1030311.jpg

Open Days are here again. This is some of the audience who sat through my talk this afternoon. Hope you all had a good time and thanks for braving the elements to come and see what we do at Hull. We are holding more Open days in the next few weeks.

P1030312.jpg

This is Warren handing out a copy of a great book (Oh Yes) to the winner of the prize draw at the end. Those that came along also took home a printed copy of the C# Yellow Book. If you want to find out more about that, and perhaps download other coloured books, you can find them at www.csharpcourse.com

Kinect Fun Labs at Imagine Cup

IMG_7043.jpg

There is a rather interesting new addition to the ranks of the Imagine Cup competitions this year. The Kinect Fun Labs Challenge is out to get you exploring new ways to use the Kinect sensor. The nice thing about it is that at the moment all you need is the idea. The implementation can come later. They are actually giving out 100 Kinect for Windows sensors (these are the special ones that have higher resolution close up and other interesting tweaks) to the ideas they like the best, so that you can realise them and enter the next phase of the competition. Next week there is a Live Meeting all about how it works. If I was still a student, I’d be there.

Imagine Cup

image

We had a meeting today about the Imagine Cup. A whole bunch of our students seem very keen to take part. No idea why. Unless it is the chance to make a name for themselves, win some prizes, have fun making something useful, pick up useful skills, maybe even get to go to Australia and win a chunk of cash….

You should take part too. The Imagine Cup could change your life. I’ve seen it happen. Form a team and sign up here.

Kinect Skeleton Viewer

image

The new Kinect for Windows SDK is now available. It works really well, but they have changed the API slightly (generally it is a lot tidier now). If you want a simple program to get you started using the skeleton data I’ve done a quick conversion of one of the demos in the Kinect book that I’m working on. You can download the project from here. Now all I have to do is update all the other fifty or so demos and the 12 chapters. Lovely.

Chris Wooding and the Ketty Jay

image

If you are looking for a bit of escapist Science Fiction/Fantasy stuff then take a look at Chris Wooding. I’ve just read the first of his Ketty Jay series and it is a rollicking good fun. If you enjoy Harry Harrison, Blake's Seven, Firefly kind of stuff then you’ll like this. A well written take on the “ship of misfits freebooting around falling into danger and adventure” kind of thing with plenty of action and a quite a few laughs.

Tutorials, Objects and References

Snowy Library.jpg

We are doing objects and references in the First Year tutorial today. Great fun. Well, at least I thought so. I asked the class whether big objects in memory have larger references than small ones. They don’t – the size of the tag is always the same – no matter what it is connected to. I went on to explain that a reference tag contains a bunch of information about the thing it is referring to, including the type that it has, for example string, BankAccount, AlienSprite or whatever class you have created.

Then someone asked a great question: “What happens if the type has a very long name? Does the reference tag get bigger?”. Aha! What a great question. The answer is no. This is because the type of a reference is managed in terms of a reference from the tag to the type object that describes that reference. In other words, a reference to a BankAccount will also contain a reference to an object that describes the BankAccount class.

I was very pleased with this question, because it let me start to explain how, by using objects, you can build up structures of data that are genuinely useful. I’ve been explaining structures and objects all week and several times I’ve had the sensible question “What’s the point of objects and references? They just seem to make life harder for us.”  This little allows me to show how easy it is to use references to allow the system running the program to track and mange the type of the objects it is using.

I reckon that a good tutorial is when the students learn something. A great tutorial is when the tutor learns something as well. I’ve now got a lovely new example to use next year…

When is a number not a number?

IMG_5863.jpg

Pop quiz. What would the following C# code do?

float x = 1;
float y = 0;
float result = x / y;
Console.WriteLine(result);
  1. Fail to compile.
  2. Throw an overflow exception.
  3. Print “Infinity”
  4. Cause the universe to explode.

Here’s the thing, the code prints the word “Infinity”. Dividing any floating point variable by zero gives a special result which is encoded into the floating point variable range as “Infinity”. Now what about this?

float y = 0;
float result = y / y;
Console.WriteLine(result);

This time we get the message “NaN”, which means “Not a Number”. Dividing zero by zero does not give a number as a result. There just isn’t a value for this quantity. The value is not as big as as infinity or as small as zero its just, well, not a number. You get the same non-result if you divide infinity by infinity.

The C# runtimes are based on .NET which uses an IEEE (Institute of Electrical Electronics Engineers) standard that contains representations for negative infinity, positive infinity and “not a number”. Calculations in a C# program will produce these results when given dodgy values to work on. This is very important. You might think if you do silly things with numbers in your program you are going to get an exception thrown. Like this would.

int i = 1;
int j = 0;
int Result = i / j;
Console.WriteLine(Result);

Run this code and it throws a “Divide by Zero” exception when it tries to, er, divide by zero. But this does not happen with floating point calculations. This is probably because the range of values for the int type does not include one to represent “infinity”.

The bottom line here is that if you do sums involving floating point values you can’t expect exceptions to be thrown if the calculations go wrong. The good news is that you can use methods provided by the float type to test results of calculations:

if (float.IsNaN(fresult))
    Console.WriteLine("Welcome to the Twilight Zone");

This prints the enigmatic message if the value in fresult is not a number.

Rob on the Road

image

I’m off on my travels again next month. I’m doing sessions about Windows Phone and Kinect at TechDays in Belgium and the Netherlands and then hopping over to SIGCSE in the USA to give some sessions there too.

The plan is to develop and maybe even publish a complete Windows Phone application during one session and then play some rather silly games during the Kinect one. Should be fun.

Crayola ColorStudio Pen

image

Drawing with your fingers on an iPad is fine, but not natural. The Crayola colouring pen gives you something to hold on to as you draw, which is nice. I first thought it was just a pen that works on a touch screen, but there is more to it than that. The pen does something with the connection to the screen (I think it turns it on and off quickly) that enables the software in the iPad to detect when the pen is touching it, and ignore fingers. This means that if you accidently touch the screen with your hand while drawing the program ignores this. If you (or a very small friend) want to get to grips with colouring and free hand drawing the program is worth a look. The pen works fairly reliably, although I had to press quite hard to make it work sometimes.

image

The pen comes with a colouring and drawing application with pictures you can colour in which are quite fun. It has a really nice option you can set. I’ve always wanted something that helps me stay inside the lines..

Lego Star Wars Battle of Hoth

P1030270.jpg

Lego Star Wars Battle of Hoth is a neat little game which they say is for up to four players but works best with just two, light against dark. You take it in turns to move and attack your little Lego snow speeders and AT-ATs in an attempt to wipe out your opponents or storm their defences. It was getting quite strategic until number one son had a run of phenomenal  luck (I suspect the force) and I lost.

Probably not worth the asking price really unless you are a Star Wars fanatic. You could spend around the same amount of money on the Creationary game which has a lot more to it. Having said that, if you have someone little in your family who is a Star Wars nut and you want to get them used to strategy games, perhaps on the way to chess, then it is a good starting point. And being Lego they encourage you to change the rules and board shape to make it more interesting.

Degrees of Fun

p1.jpg

Did my Graduands Marshal thing this morning. As usual I took a picture of the audience and it mostly came out OK, sorry if you are in the blurry part of the audience… There are some more of the other ceremonies on Flickr. Click on the right to find my photostream and take a look. I should have set a faster shutter speed really. I tend to fret about noise (which you get when you make the camera more sensitive to light) whereas I should remember that you can always get rid of noise, but you can’t do anything if the picture is blurred….

Both ceremonies were really good ones, I hope you had a good time if you were there. For me one of the the best bits was finding the chap next to me had a Nokia Lumia 800, and was liking it.

Read Verity Stob

P1030197.jpg

I have a few hero/heroines in my life. One of them is Verity Stob. She has been writing about computers for about as long as I’ve been playing with them. I’ve mentioned her before, and now I’ve discovered to my great joy that she is still writing for The Register. Her piece on exceptions is one of the best I’ve read on the subject. If you have any interest in computers you should read her stuff and treasure it.