My Ambition

As you get older it is best to make sure that you still have a few ambitions left. I've decided that my number one ambition is now to buy Bill Gates a drink. I'd like to be stood next to him at bar at a Preston Foster Appreciation Society meeting (I'm sure that Ian and Pete would let him become a member of the society and as the barmaid pulls his pint of Tetley I could turn to him and say "No, it's OK Bill, I'll get these". And I would.

A Peek at Office 2007

Yesterday I took my life in my hands and upgraded from Office 2003 to Office 2007. Of course I had a backup. Of course...

Anyhoo, unlike the move to 2003, where on the surface things were pretty much the same as before, when you go to 2007, your whole world changes. The file menu has gone, and in its place you have an Office Button which sometimes glows for no reason that I've been able to establish.

In use I'm reminded of when I got to use a posh SLR camera many years ago. The arrangement of the controls seemed rather arbitrary and counter intuitive. Until I started using it. Then I found that the buttons and levers were actually just where you needed them. Someone who knew a lot about the business of taking photographs had put the features on the hardware in just the right way.

Office 2007 is very like this. After a while you find that commands you used to use a lot and had bother finding (undo and the Format Painter in my experience) have been made big, bold and easy to find. The grouping of tools into particular tasks makes it much easier to find what you want to do, and encourages you to try things that you hadn't seen before. I've only used Word and PowerPoint, but they are shaping up very well.

So far I only have one major grouse. Like most people, I use Styles a lot. Therefore I was pleased to see that Styles have been given an overhaul, which much better preview and the ability to sort the list of styles into alphabetical order. Finally.

However, there is one thing which they do seem to have got wrong in a big way. In the old Word you could click on a paragraph and the style of that paragraph would be instantly displayed in the toolbar. In the new Word the styles are shown on a kind of rotating panel which is good because you can see more than one and easily select from those available. But they don't automatically change to show you the style of the paragraph you are presently typing.

Even if you get a full list of the styles on the screen this still doesn't help if the style you are using is not on the part of the list you can see. So when I'm typing there is frequently nothing telling me which style I'm presently using, and I really hate that.

For me this is a major step backwards and almost, but not quite, negates the good things that they have done in this area. Perhaps there is an option you can select which will make this work better. I certainly hope so.

I'll write more about the shiny new bits as I find them.

Put some magic into your life

298266118
Now you can have one....

My all new "Magic Message System" is now available for download. If you've ever wanted a message system as good as the one in Computer Science at Hull University then you can have one... For now. I'm going to make it play videos and do 3D next. And I might not give that version away......

Because it uses Windows Presentation Foundation you will need either Vista or XP with .NET Version 3.0 installed.

So, what does it do? Well, it will display a slideshow of your Flickr pictures and at the same time read messages off an RSS feed reader of your choosing. We are going to use it on our plasma screen in the meeting area.

You can find it here.

Infinite Power

In the pub tonight conversation turned to wind power. It is presently fashionable to put a wind turbine on the top of your house (one of our political party leaders here has got one). Apparently, for the outlay of only fifteen hundred pounds you can get a device which, during a hurricane, produces almost enough electricity to power your hairdryer.

I'm not convinced by this, I think the answer has got to be reducing consumption by insulation and other clever tricks. However, now that you no longer need planning permission to put up a windmill on your roof, I suppose they are going to become fashionable.

However, if they ever become de regeur I have a plan. I'm going to make a balsa wood wind turbine and stick on the roof. Inside I'm going to put a tiny electric motor so that the blades always turning. Always.

Whilst my neighbours bemoan the lack of wind and the fact that they have spent all this money on something which is actually useless I'll be able to point up at my roof and talk about the kilowatts of power that I'm presently generating. Not exactly eco-friendly I suppose. But fun. 

Party Time at the Bank

Some time ago I used know someone who knew someone who worked in a bank. For some reason we were chatting one evening and the conversation got around to "What would you do if someone came in and said 'I've got a gun, give me all your money'?"

Apparently the bank had a special code phrase which was to be used in this situation. The drill was to ask the cashier at the next position "What time is Andy's party?". Apparently the appropriate action involving silent alarms, marked notes and giant falling cages (or whatever) could then be taken.

This has bugged me for years. Viewed from the perspective of the robber this would be highly confusing. I'm presenting the person in front of me with the business end of a firearm, demanding money with menaces and the first thing they do is sort out a few social engagements before getting on with doling out  the cash. At very least this would make me inclined to increase their motivation a bit, perhaps by shooting up the place. Bonkers.

I've since figured out that the code phrase has now been changed slightly. Now, they way that they signal miscreants is by not offering them life insurance, a new mortgage or a car loan as they hand the money over....

Early but not bright

Went into Hull at 7:00 am this morning. Not because of some confusion updating the clocks (that was weeks ago) but to review the papers for BBC Radio Humberside. I've been doing this for a while, and I usually take the camera in case any nice photo opportunities arise.

301733424
Early Hull looking good

I managed to muddle my way through the reviews OK (note to self, you seem to run a bit slow on Mondays - go for other days of the week in future) and with a bit of luck they'll ask me back so I can get up early all over again.

Cortina Nostalgia

02cortina
Ours was maroon

When I was very young (and probably even more impressionable than I am now) my dad bought a Mark 1 Cortina. At the time this was the epitome of style and taste. Nowadays it would be regarded as somewhat primitive. I mean, the dashboard (not the fascia) only had four buttons on it. And nearest thing we had to airbags was an empty crisp packet in the "glove compartment". Which curiously never seemed to have any gloves in it. Ever.

I was reminded of this chunk of my personal history yesterday as I was standing in W H Smiths reading magazines for free. There is one called "Classic Ford" or somesuch, which had numerous pictures of the MK1 Cortina Owner's national rally. They even have their own web site. What memories.

Dragging down Vista

Well, today's the day. I've been involved in the Connect trials of various versions of Vista - even posted a bug report or two - and this morning I got my reward in the form of a free copy of the new operating system. All I had to do was haul my browser over to the download site and grab it. Just me and a few million other people.....

Well, after a few fits and starts during the day I've managed to get a whole DVD's worth of the new magic and I'm starting to install it. I've been generally impressed with the Vista experience and I've been looking forward to getting hold of the genuine article. I was a bit scared when the screen came up with "..this upgrade may take several hours." but as I write this my media PC is running the final version.

Just in time for me to go to bed....

Man with two brains

I've been acting as a customer in our software engineering practicals. Student companies have been interviewing me to find out what is really required, and I've been delightfully vague and unhelpful. Not at all like me, but probably a good learning experience for them.

Thing is, I'm also offering a consultancy service where, for the princely some of 2% of their overall mark, student teams can have a few minutes of my time to comment on their designs. What surprises me is how few teams have come along for a chat, for the potential improvement in the marks this is very good value.

However, one of the teams for whom I'm the customer is coming to see me tomorrow. This means that I'll be commenting on the behaviour of myself, and giving advice on how to deal with me to find out what needs to be done. Very strange.

One Day and Counting

298266118
Now I just need to add the movie playback...

My wonderful new Message Display program has now managed to keep going for a whole day. It is my first ever Windows Presentation Foundation (WPF) program and it is running on Windows Vista RC2 on the machine in my office all hours of the day and night.

Since the real thing is required to run for weeks, and any failures of the system will be very visible (and therefore highly embarrasing) I've embarked on this soak test. The program is running in "dog time" (i.e. around seven times faster than it should) so that the results are better than realistic. Later this week I might dare to go live with it on the big plasma screen.

Sequence of Stupidity

  • October 10th Robert given receipt for hotel booking on Robert's credit card with instructions to "keep it safe so you can use it to claim back the money later".
  • Robert tosses the receipt onto desk on top of huge pile of papers.
  • Receipt stays safe for a couple of weeks or so, drifting around the office.
  • Robert notices the receipt just lying around and decides to address the problem by placing the receipt "somewhere safe".
  • Receipt vanishes.

There's probably a moral to all this, but I'm darned if I know what it is...

Make your own jigsaws

249244108_ef4b99b2b5.jpg
My first ever test..

Moosaic lives! I'm about to embark on a new project and so I'm going round finishing off some old ones. And the first result of this is that you can now download my Moosaic program. This lets you create image jigsaws out of your Flickr pictures and then get them printed onto little bits of card. Fun for all the family and just in time for Christmas..

Find out more here.

Going for a drive

After all the excitement of foreign travel and dodgy planes today we just settled for a litle drive to Durham and back to visit number one son.

On the way there we saw some amazing rainbows, including one which went all the way over the motorway. I'd love to have taken some pictures, but I was driving at the time, which is a bit sad.

When we got to Durham it rained. A lot. And then some more. Number one son showed his local knowledge by getting us lost down an alley on the way to the indoor market. With the torrents of rain, poor lighting and overflowing rubbish bins the place looked like the opening shot from a CSI episode. But fortunately there were no bodies to be found.

After a splendid time talking about nothing in particular and looking at large tellies (an AV upgrade is in the pipeline) we tootled back to warm Hull.

Danger at 300 feet

Well, I'm back home now. The conference was great fun. You can see a video of me here.

The trip back was slightly enlivened by the landing process, which seemed to involve a bit more going up than I remembered from previous flights. Then the captain came on and said that a warning light had come on concerning the undercarriage as we were making our final approach. However, not to worry because he had done the aeronautical equivalent of bashing the dashboard of the plane and things were fine now...

Although it was a bit disconcerting to find all the fire engines lined up alongside the runway when we finally touched down...

TechEd Update

Yesterday and today have been a bit of a blur. I've been to more sessions. Marvelled at the .NET Micro Framework, revelled in the Robotics stuff and been very impressed with the RSS feed talk this morning. I've found time to take a few more pictures too, which is always nice.

293325482
Rather a good sunrise

293326487
Even got the moon in this one

293326214
The Expo centre

293325756
The exhibition floor

293325574
MSP's from around the world.

293325902
If you have met me you will understand the humour in this picture.

There are some more on Flickr.

Tomorrow I give my session. Wish me luck.

C# 3.0 and Stronger Magic

Warning: This is a techie heavy post. If you are after witty prose and belly laughs then I suggest you look elsewhere (but then again - what are you doing here in the first place).

Just been to the presentation by Anders Hejlsberg about what C# will be doing in the future. I took a bunch of notes on the mobile phone which I've tidied up to post here (apologies for typos and spelling errors that got through):

Extensions

You you can add a method to an interface. Then any object that implements the interface can use the method. Extension methods are brought in with the interface by means of a using statement. You can add them to classes too. Serious potential for stupidity/confusion here but also a lot of power. What I call a Spiderman situation (With great power comes great responsibility).... You may end up leaving the impression that your extension is part of C# itself. I wonder if anyone has thought about colour coding the intellisense?

Talking of Intellisense (the bits in Visual Studio which suggest what items you might want to enter at a given point in the code) it seems that it is now part of the language design in that there is an inherent assumption by the language that it will be there for the programmer.

Var

The var keyword lets you simplify the deceleration process. The type of the thing that you are making is inferred from the type of the expression on the right. In this respect it smells a bit like the dim statement in Visual Basic, but there is a bit more to it than that. It underpins a general principle that you can manipulate items for which you have not specifically created a type, but from which the compiler can infer the required information to make sure that your code has integrity.

Lambda Expressions

Lamda expressions let you pass code as a parameter to a method. Sometimes you need to tell a method what to do. In C# you usually need to create a delegate type which you then point at a method which does the job. With a lambda expression you can put the behavior right in place. There is no need to make a delegate.  

Object Initialisers

Object initialisers let you set initial values during declaration of an instance. Can also initialize collections.

Expression Trees 

These are scary. They let me manage code as data. The compiler will produce the tree based on a lambda expression it is given. It ends up as a bunch of atomic actions which you can pass around as data. You can also modify the tree or produce one of your own from scratch. You can also compile these into IL or use them to make things like SQL statements. This is how we get our C# program code mapped into database queries for the Linq stuff.

Automatic Properties

Not sure about these, they just seem to save you typing. They let you create properties directly without needing to produce the get and the set right at the start. Must have both get and set, but you can make set private if you want a read only property. You can also put real methods in later.

Linq Database Access

This is perhaps the jewel in the crown of the C# upgrades. Query expressions use context sensitive keywords to map the query into method calls. This happens during compilation. Linq uses lambda expressions to denote the selection criteria. 

A query result can deliver a result as an  anonymous type (created based on the context of the result required). Because this class implements things like IEnumerable (so you can work through it) you can use the var keyword to create variables to work on the data. C# will be able to infer the required type. This means that you don't need to create loads of classes just to deal with query results.

There were some good code examples which show how queries are mapped onto code. And the other good thing is that if you download the whole thing and play with it yourself.