The Madness of XAML

Spent a whole evening achieving virtually nothing. I'm writing a little program for the plasma display in our new, spiffy, meeting area in the middle of the department (if you think that this means I'm a lot better at starting projects than finishing them- Icon Invaders, Moosaic etc etc then you are probably right - but this one needs to be done pronto and I'll get round to the others later).

Little know fact: Pronto was Tonto's younger, and much more punctual, brother.

Anyhoo, I'm using WinFX which is very nice. Got the latest versions of .NET 3.0 and all the trimmings and I can make swooshy windows now. I even managed to figure out how to read the RSS feed that is going to provide the data source for the display, and unpick the data from it that I want.

Then I try to put messages in the WinFX containers that hold my text. Now I'm using my usual learning technique here, which is to use Intellisense and MSDN and not read any books. Bad move. Simply couldn't figure out how to get text onto the control. Unlike old style windows components, which have a Text property, WinFX is much more complicated. It has FlowDocument and Paragraph and Block and all kinds of paraphernalia. But no Text property. After a lot of messing about I found that there is an InLines property which does pretty much what I want and lets me add strings of text to the display. Hurrah.

But the really good news (which probably makes the 90 minutes of cursing and swearing worthwhile) is that it will do all the formatting for me using Xaml cues in the string to lay out the text.

Which means that whilst it has taken me ages to do the easy bit, the hard bit should be really easy. If you see what I mean.

I'll post the program in source form once I've got it working.

Jane Eyre vs Aeon Flux

Tonight in the Miles household, for your viewing pleasure:

  • Downstairs number one wife was watching improving cultural content based on literary classic : Jane Eyre
  • Upstairs I was watching brain rotting science fiction tosh : Aeon Flux

I've seen Jane Eyre a few times. Once you have worked out that her surname is actually pronounced "Air" and reached the four magic words "Reader, I married him" (hope this doesn't give to much away folks) you have taken pretty much everything away from the story that you need.

Although, having said that, and sat through Aeon Flux (which also has its pronunciation problems) I have noticed some similarities between the two:

Male Lead : both of them have a male protagonist who may/may not be a baddie (you guess). Both males have equally dodgy hairstyles and stupid names. Rochester sounds like something from a sixties heist movie ("Tonight we steal the Rochester Diamonds...") and don't get me started about having an evil overload with the first name Trevor. Both of them looked like they were thinking of getting sideburns too.

Plot : Actually there isn't that much in common here. However, they do both have big explosions now and then. And both of the male leads have crazy people trying to kill them.

Female Lead : OK, so Jane Eyre doesn't have skin tight leather clothing and access to futuristic weaponry. But she does wear those dresses that reach all the way to the floor and let her move about like a Dalek with no obvious means of propulsion. I just hope that she can climb stairs. Of course Aeon Flux doesn't actually climb stairs at all, she would use a double somersault flip with a half twist up the banister rail in case the stairs vanished when she was half way up them.

Happy Ending : (plot spoiler alert - though if you read the bold bit it is probably too late) Both have a happy ending. Despite being shot a great deal (but missed an improbably huge number of times) Aeon ends up in a happy clinch with her man. In Jane Eyre something equally unlikely happens, when her new husband mysteriously regains his sight after having married her.

So there you are. Stay tuned for more cultural insights. Once I've finished watching the Simpsons.

Cheap, Great XBOX 360 Game

If you are in the UK, and are in the market for a good XBOX 360 game for less than 13 quid, toddle down to HMV and pick up a copy of Amped3 which is in their sale at the moment.

It is a snowboarding game. And a very good one. Some games feel kind of churned out. But with Amped3 I got the feeling that the development team really enjoyed themselves. A lot. They have taken the "silly" control and turned it all the way up to 11. Oh, there is lots of good snow. And very pretty mountains. And lots of things to do. And a nicely judged difficulty curve. But the thing that really does it for me most of all is the quality of the cut scenes and the challenges. These are just bonkers. I've only seen two, but the first one, "Wienerland", is worth the price of the game alone, and I'm definitely going to work my way through the rest of them, just to see what they are like.

If I had paid fully price for this game I would not have been dissapointed. I only didn't get it because I'm not mad about snowboarding games particularly. However, I am well happy if they are as mad as this one.

And at the price, a steal.

Evil Jag Drivers

Boy did it rain this afternoon. Heavy stuff. The little dimple in the road near our house filled up with water to make a mini-ford. There was a Fiesta parked in it. A Ford in a ford. How poetic. Not that that poetry was really on my mind as I trudged up the road to the chip shop to fetch Friday tea.

As I was walking along the pavement, trying to avoid the puddles that actually went over my shoes, I noticed a big Jaguar car approaching. The driver wasn't slowing down for the dimple in the road, in fact he was speeding up. Just as he reached me the awful truth dawned. He was heading for a pool of water in the gutter that I was just passing. He went past at speed and with the evident intention of soaking me to the skin.

Which he nearly succeeded in doing. Fortunately, thanks to some fancy footwork on my part, he only managed to drench my trousers. The only good thing that came out of this was that he then drove at speed into our little ford, sending a jet into the air reminiscent of the water splash at Disney world. Unfortunately his car kept going, but I hope it was a nasty shock for him.

But is it a bug?

I noticed a little "foible" of Windows when I was writing my Moosaic program. Windows provides a lovely way that you can load an image into a program. You just go:

Bitmap b = new Bitmap ( filename );

This goes off to the filename and gets you a shiny bitmap which contains your picture. However, it also leaves open the connection to the file, so that if you try to delete the file you get an error saying the file is in use. I don't think that it is. I've just read an image from it, that is all.

This is rather frustrating if you want to reuse a temporary image file. In the end I had to use a stream to read the file, which I could then properly let go of..

StreamReader streamReader = new StreamReader( filename );
Bitmap b = new Bitmap( streamReader.BaseStream );
streamReader.Close();

This is messy, but works in that the file is released. I'm wondering if I've found a bug or a feature...

Moosaic Takes Shape

One of "Robert's Rules" is:

Any software development takes longer than you think, even if you allow for this.

Of course, having a day job as well has kind of hampered development...

So I've not finished the Moosaic program just yet. But it is looking quite tidy:

249244108
Coming to a setup program near you....

I've got the image download and the grid selection just about sorted, Now I just need to get the tile output done and we will be in business.

At it again

Came in tonight with an urge to write some code. Just as soon as I'd finished watching "Harvey". Wonderful old film staring James Stewart. Anyhoo, I'm going to write another Flickr program, this time to create lots of little images from a single Flickr picture. The idea is that you can make mosaics to have printed out on little cards.  I've called it my "Moosaic" program (not my idea I'm afraid).

I've got so far and run out of steam for tonight(must be my age). Should have it going tomorrow.....

Cheap Games

I thought it might be worth putting down some hints on cheap places to get XBOX 360 games. If you don't want the hassle of mail order you might find these useful.

I've found that specialist places like Game tend to sell at full price. The cheapest place to buy XBOX 360 games on the high street is actually a music store; Music Zone (which has shops in most cities in the UK) quite often has titles at 10 pounds less than the "usual" price, i.e. 39 quid rather than 49. If you don't have a Music Zone shop in your town, the next good place to look is WH Smiths. They quite often have games at around five pounds cheaper than other sellers. If you use Smiths, make sure you have a points card, as these can save you even more cash.

I was thinking about the price of games. 49 quid does seem rather steep, but I remember paying 48 for the very first version of Destruction Derby for the Playstation 1 (quite a good game in it's time)around ten years ago, and money seemed to go a lot further then....

Speed Meeting

We had a staff meeting today. Over in fifty minutes. Amazing. Kudos to the chairman, and the idea of sending out all the reports electronically in advance. I'd taken the Tablet PC in so that I could even have the notes on the screen (and doodle on them, just like in the old days with paper). I thought I was being high tech and kewl.

So much for being ahead of the game. I counted four other tablets and laptops in use during the meeting. At least I'd turned the sound down on mine, heh.

Holiday Hereford

I like being on holiday. We have a special bolt hole that we retreat to for a week or so. We've been coming here for quite a few years and it is always nice.

247710338
They always have some flowers in the cottage

Today we went off to Hereford, a market down a few miles down (or is it up) the road. They were having an art exhibition in the library (I'm a sucker for these). There was some stuff by local artists, including a lass called Jane Eccles. For some reason I really liked her stuff. One day when I am rich (but not necessarily famous) I'll get one of her paintings.

 247710594
Hereford has a cathedral

247710140
When we got back the countryside was kind enough to give us a super sunset. 

Getting Lively

I've launched another section of the site. This is concerned with my Teaching Fellowship Award. The University of Hull very generously gave me a fellowship award last year and I've been preparing materials on this for some time. We have now reached the stage where I can take some of the wrappers off and start making parts of the project available for other people to play with.

You can find out more here.

Oh, and I need a logo. Any ideas people?

Lively Learning Introduction

Welcome to the Lively Learning part of the site. This is where I'm going to post information about the Lively Learning resources which I'm producing as the output of my University of Hull Teaching Fellowship award.

I'm presently half way through the award period, and have developed the first phase of the work. You can find out what it is all about here.

This journal will document project progress.

I will soon be releasing a kind of Technology Preview of the Marking Assistant program for anyone with a Tablet PC to download and play with. Download releases will be announced in this journal and posted here. There is also a discussion forum here.

RSS feeds for Lively Learning can be found here.

Introduction

This document sets out the reasoning behind the “Lively Learning Materials” project and the state presently reached in the development. If you have any questions on the project, or wish to get involved, you can send me an email or add a post to the discussion.

Motivation

The motivation for the project came with the realisation of the usefulness of E-Learning systems, and the frustration of trying to use them in our teaching situation. Whilst it is easy to create and deploy resources and assessments the material itself is rather inflexible once delivered, and the marking process involves sitting at a system and processing submitted work.

In the Department of Computer Science we are changing the way that we perform assignment marking. Rather than work through submitted material “off line” we now spend time with each student discussing their submission and explaining the reasons behind the mark that is ultimately awarded.

We have found that students gain a lot from this process, but it has not been very easy to integrate it into the use of an E-Learning system to distribute and manage coursework. Also, we have found that the learning materials that are deployed are hard for the students to customise for their own use.

As Information Technology practitioners we have also noticed the arrival of mobile devices, notably the Tablet PC and Ultra Mobile PC which show considerable potential in this area, so the initial aim of this work is to build a test d to determine how useful such devices will be for performing marking assessment.

Later this project will consider how such devices can be used by students to customise the resources that they receive.

Approach

When considering the approach to be taken, a number of ground rules were set out. These were intended to ensure that what is produced is useful in the widest possible range of contexts. Any systems that are created must be capable of operating in a small scale, individual, manner, but they must also be scaleable to large installations. Whilst it must be possible to integrate with existing E-Learning systems they must not be tied to any particular system. This has led to a “pluggable” software design and data storage based on the XML file format.

Current Status

The underlying framework for the learning resources has been designed and deployed as part of the Marking Assistant program. This is a Tablet PC/Ultra Mobile PC application which is specifically designed for us in laboratory systems, where work is being assessed with the student. It has a number of features which make it especially suitable for pen driven use. The application will be used for student assessment in the first year programming course in the Department of Computer Science.