Motorola Game Development Challenge

If you have nothing better to do this summer (and who doesn't) you might fancy having a go at the MotoDev game development challenge. You can write your game in Java, or even user C# and managed code to enter in the Windows category. Closing date is in the middle of August.

If you want some ideas about how to get started, you can always have a look at my articles on Smartphone programming with Cheese on MSDN.

Slide 7 Rocks

Today is Slide 7 day. Slide (Students Learn Innovative Developer Expertise - or something - we picked the name because the domain name was available) is run by Microsoft the Academic team at Microsoft UK in Reading. They put on sessions about professional development and get a bunch of students to turn up. This year it was all about connected applications.

569600107
Our posse on the way into the Mother Ship....

I took a minibus full of folks from Hull to join the hundred or so others that had made their way from all over the country for the show.

And the show was good. There was a slight dip in quality after lunch, when I did my bit on Web Services, but the rest of the material was top notch. There were sessions on Web 2.0 (where we discussed the question of what Web 2.0 actually is), ASP, Windows Live and Orcas. And then a great talk at the end on Sliverlight.

People, you should find out more about Silverlight. You should also sign up for Popfly since this is mucho funo. I've been playing a bit with my Popfly account and it makes it dangerously easy to develop impressive applications.

569116224
My Audience (most of the students were next door, but we manage to make more noise than them...)

569601983
Mingling at the BBQ

At the end we had a BBQ and a great time was had by all. There will probably be a Slide 8, you should get your name down for it if there is...

Ed Dunhill, the Microsoft bod who made it all happen (Kudos Ed) is going to post all the slides and other material on his blog.

Then, after a five hour rumble up the motorway it was home in time for bed.

Bring on Happy Hour

Imagine you are going on a journey. You get the car out, and then nip back into the house to fetch your luggage. When you get back outside you find that your car has driven itself off to the garage to sort out a problem with one of the wheel trims and it will be there for the next couple of hours.

I don't think that many drivers would put up with this. But computer users get it all the time.

This morning I needed to use a computer that I hadn't turned on for a while. For some reason I thought this was not going to cause me problems. How wrong I was. When the machine woke up it decided to upgrade its Java installation.

Now, I don't use Java very much, I only added the runtimes so that I could run some programs that I needed to take a look at. Java is a nice enough language, it is just not one that I use any more. I certainly don't need an update. Particularly one which takes the thick end of half an hour, and which seems to lock up the machine while the update completes.

Nothing strikes fear into my heart more than the phrase "New updates are ready to install". This usually means that I have to fire up my other computer so I can get some work done whilst checking on the updating machine for buttons that I need to press. You can't just go off and have a coffee, oh no, because as soon as you turn away from the machine it pops up a spurious dialogue box which you have to click on to start the download of the download downloader or somesuch rubbish.

We really need to get a handle on this kind of thing, the tail has started wagging the dog I reckon. I know you can get the machine to do updates at midnight, but this means leaving the machine on overnight, which I'm not always keen to do and is probably not a very efficient thing to do from an environmental point of view.I get really cross when I fire up my machine and all kinds of dross gets to run before I can see my email.

I think there should be a kind of "happy hour" on a machine when it first wakes up. Rather than starting up all the updates, sidebars, screen savers, sync centers, search indexers, de-fragmenters, bluetooth managers and god knows what else, for the first hour of use a machine should just concentrate on running the programs that I start. Once things have settled down, and I'm sitting there wondering what key to press, then the operating system can start gradually introducing the things that can be left to catch up later. Should be easy enough to add and it would make lots of people happier. Including me.

Lectures, Scary Security, FPL, XNA and Sound Bites

Today has been busy. Oh yes. It started with an unexpected lecture. We are now in week 11 of the semester, with teaching supposed to have finished at the end of week 10. But the first year students wanted more, and so I went off at 9:15 to deliver. Actually, it worked quite well, in that I was able to go through the quiz that I set last week.

Then it was back to the labs to get ready for our XNA event. Andy Sithers from Microsoft had come over to formally hand over the XBOX 360s they have given us to help with our XNA teaching in the first year. We had to set them up in the lab for the pictures, and get some stuff working. Simon Dickson and Phil Cluff from our first year came in to show of what they have been doing.

Then, after a quick lunch the presentation tool place. We all contorted ourselves into the best position for the perfect shot for the papers. Danielle Cod from Radio Humberside interviewed our head of department, Andy, Simon and Phil and finally me, in search of the perfect soundbyte. You can grab the resulting two minute piece here. Much to my dismay they seem to have left Andy and Warren on the cutting room floor.....

478789493

This picture kind of captures the event. In the back Warren Viant, our head of department, is being recorded whilst Andy Sithers ponders the code and Simon grapples with debugging and being interviewed all at the same time....

After all this we had to dash off to an event that I had pretentiously entitled our "Software Symposium". (Did you know that symposium used to mean drinking session?). Anyhoo, the event started with a double headed presentation from Robert Hogg of software developers Black Marble and Ed Gibson who is Chief Security Advisor for Microsoft UK. The topic was safety and computers.

I'd heard bits of it before at the Black Marble event last year, but it was obviously news to the audience, who sat silently as Robert and Ed laid it on the line about just how scary things are. I managed to be both petrified about what was going on out there and relieved that Robert and Ed are going around spreading the word and engaging budding software developers with the problems posed by the wonderful connected world we live in.

The point they made forcefully and effectively is that the big problems are not down to technology, they are down to people. If we don't keep our software up to date and we allow ourselves to be bamboozled into giving passwords to cunning callers then no amount of code is going to help.

Next, and on a somewhat lighter note, the Seedlings, our Imagine Cup winning team, gave us a presentation of their entry. The First Programming Language they are working on is aimed to engage everyone with the kind of problem solving techniques that will allow them to use a computer to best advantage, whether or not they end up writing programs.

Then after a closing address from Andy Sithers of Microsoft, about the value of competition and the usefulness to students of just plain taking part, it was time to zoom off and try to find a recorder for the radio broadcast.....

Busy day.

Drunk with Readers

I've been using a new mechanism to make sure that the readership of these august pages is holding up (not sure what you are holding up actually, but from here it looks like your hands need washing).

Anyhoo, I've been using this new service from Google Analytics, which lets me see who has been visiting the page, what time they came, whether they were wearing a tie, etc, etc. It is very powerful. It has lots of things you can use to evaluate the effectiveness of advertising and page design, see how far most people go through your content and the like. Most people seem to arrive at my site, take one look at the opening page and then vanish at speed.

Such is life.

If you run a proper web page which actually has serious intent you should take a look at the service, I can see how it could be very useful.

There is talk of a new version, which will let you find out how many people have visited your web site on the way back from the pub. That is going to be called "Google Paralytics".

PDF Output from Vista

I'm a happy bunny. The weather is good. The book is written. And I've got a working PDF output program for Vista.

Perhaps I'm setting my sights a bit low; other people might wish for riches or movie star looks whereas I'm happy with a bit of sunshine, a few pages of text and Primo PDF.

Mind you, according to a survey this week the key to happiness is maintaining low expectations...

Threading with Forms

Some of our students have been having fun with threading and forms (there is a lab out there at the moment which can be solved by creating a thread which performs a task).

Threads are great, because you can send them off to do something while you get back to responding to the user, or whatever. Snag is, when another thread tries to dicker with the contents of a form this ends in tears, as the Windows system is very picky about actions like this. There is a way round the problem though, and so I've written a little sample application which shows you how to do it.

It creates a form which has a single button on it. When you press the button it creates a worker thread and fires it off in another class to do something. When the something finishes it then calls back into the form to change the text in a label on that form. You can use this as a model for whatever you fancy doing with threads. You can find the code here.

The Rob and Jon Show

Today was the day that Jon and I sang for our supper, so to speak. We were the "international" part of an international discussion of computer games and curriculum. I talked about XNA and Jon talked about Skill Set Accreditation. We both only had five minutes to fill, which is both a blessing and a curse. Not much time for bad things to happen, but hard to fit everything in. In the end it all went swimmingly. And there are pictures.

413197045
Gathering for the conference

413197205
Need a haircut

413197341
Had a haircut

413197574
A bit of abstract stuff

413197656
Flags

413199358
Off for a walk

413200808
This is what makes the cable cars work....

 

413201619
Nice Church

413201961
Wires

413203022
Refueling

413203290
Bikes

413203692
I love this kind of stuff...

413203823
Down on the wharf. Ask Jon about the lens he nearly bought...

413204301
Work that lens....

413204437
I've no idea what the boat is called. But it looks nice

413204768
"Love Songs" album cover shot....

413205135
Our hotel is about under that flag...

413206366
Nice sky

413206459
..and just one more...

Cheesy Wotsit Challenge

I've been giving the first XNA lectures to students this week. This is actually a world first; the first time ever that XNA has been used to teach C# to first year students in Hull by a tall bloke who needs a haircut.

Anyhoo, it has gone pretty well. I had a few minutes spare at the end of the lecture so I showed the students "Hot Salad Death With Cheese". I've given them the source of the code and offered a bag of Walkers crisps as a prize for the person who produces the best game based on it. If you fancy a go you can pull the files down from here.

21st Century Displacement Activities

In the old days, when I had a bunch of marking to do I would go off to the union shop and spend ages choosing a suitable red pen. I'd try each of those on sale at least once and then carefully weigh up the heft of the pen, the quality of the ink colour, the feel of the writing action and so on. I could usually pass quite a while doing these activities, not actually doing anything towards getting the marking done, but feeling good about the fact I was in fact making progress. When of course I wasn't.

Spool forward a few years and I can't do this any more. Some of the stuff doesn't use a pen at all, everything happens on the computer. But I still need my displacement activities. Fortunately the computer, if it is nothing else, is a wonderful source of potential displacement.

I've been marking stuff submitted via Class Server. This has the option for the marker to create six pre-formed text items which can be inserted into the student comments. Thing is, six is nothing. I've got loads more than that. Loads. It really hurts to type the same kind of thing over and over, but I need more than six. More like sixty. So, I built PasteMaster to do this for me. It took me around an hour to build, which is probably longer than I spent choosing pens, but I think it is worth it.

PasteScreen

You can type the comments into the text fields and then when you press the button they are inserted into the block at the bottom. You can edit the text at the bottom and add new bits, and everything you add is also placed in the paste buffer, so you can drop the whole report into any windows app. It remembers the comments from last time you ran it, and there are 6 pages of 12 comments that are colour coded and you can flip between.  I managed to set up a page of comments about each of the deliverables I was asking for, so that I could pull out pre-formed bits where appropriate and save myself quite a bit of typing.

(I was going to add a "randomise" button which would pull a comment out of a textbox on each frame and make a random response, but I thought this might be dangerous....)

Anyhoo, it works a treat and saved me a fair bit of typing. Of course, I could have used Notepad, but I think it would have been a bit harder to do and I would not have had the fun of making Pastemaster work.

If you fill out forms with pre-formed responses, or you do the kind of marking that I do, you might like a copy. If so, let me know.... 

New Soul

One of my favourite books since forever is "Soul of a New Machine" by Tracy Kidder. It recounts the story of an attempt by a bunch of engineers to build a new microcomputer for an ungrateful company.

Whilst the technology described is now very elderly (the book was originally published in 1981) the story of what drives engineers to create is still bang up to date. So, get the book and read it. Even (or perhaps especially) if you know nothing about computers.

Then spool forward 26 years in time and read Dreaming in Code. I've not got it yet myself yet, but a review which compares it to "Soul" is good enough to get me onto the Amazon site and flashing my credit card.

Travels with a GPS Logger

I'm writing some software which works with GPS. It is for the .NET Micro Framework book and will let you use a Micro Framework based device to log and display location information (assuming I can find a copyright free source of aerial maps).

Anyhoo, it occurred to me that I'm going to need some test data for the system so today, as we drove about East Yorkshire dropping people off and getting free food of friends and family, we took the Samsung Q1 with the Microsoft GPS sensor and a little program to capture the data stream. If you want to relive last night's epic journey from Howden to York you will soon be able to do this. Oh yes.

Micro Framework Sample Chapters

You may not know I'm writing a book (there must be some people left on the planet that I've not told yet). Anyhoo, I am. Writing a book. (makes a change from colouring them in I suppose)

The book is about embedded development using the .NET Micro Framework. This is something I'm very excited to be involved with. I reckon the framework could do wonderful things for the process of writing code for very small processors (the kind you find in remote controls and other small computer controlled devices). It makes embedded code more reliable and easier to write. Wonderful stuff.

If you want to read bits of the book before it gets printed, and even pass comment on them, you can take a look here.

XNA Launch Event

We got up nice and early and headed for the university. Unfortunately, thanks to traffic, we were a bit later arriving on campus than I wanted, but still in time to do a bunch of interviews for the press.

The morning talks were all about how the XNA technology works and how it fits into to the games industry. The answers, by the way, are very well and very well. It is really easy to use and, whilst not yet applicable to "top of the range" games is going to find increasing favour in the games industry as they come to terms with just how much easier it makes things.

Then it was lunch, another interview, and then time for my bit. The talk seemed to go OK, the audience were polite enough to laugh at most (but not all of) my jokes. You can find the presentation, complete with clip art, here.

Then Peter Molyneux gave his session. Which was excellent. The most important thing that came out of his talk was the emphasis that he places on communication skills. You should be good at your part of the game production process. You should be brave enough to take your ideas and champion them passionately. But you also need people skills. If you can't persuade, argue, admit when you are wrong and keep as many people happy as possible during the rollercoaster ride that is game development then you are going to have a hard time. That was very good to hear. At Hull we push those aspects of professional development very hard indeed, and it was good to hear one of the best game creators in the business echo them for me.

We even made the BBC News.

And then we got in the magic bus for the trip home.

322105529
One of these students has won an XBOX 360 at the XNA launch event. Can you use your powers of observation to discover which one?

Pitch me a Snake

I've spent a very happy day in the labs marking student work. Normally I hate marking. Exam scripts send me into a cold sweat. But this was much more fun. Rather than dead trees I was looking at live code. Each of our students in the first year was given 15 minutes to pitch their Snake game. And there have been some super ones. We are going to open up the "wherewouldyouthink hall of fame" and put some of these programs up there for download. Great stuff.

Next semester we are going to take the snake game and move it onto an XBOX. And I reckon we will be the first people in the world to do this in an undergraduate course at first year level.

Ed Gibson is "The Man"

Today we went up to Bradford for a rather special talk. The folks at Black Marble arrange seminars for IT professionals (you'll never guess who's giving the next one) and today they had managed to get Ed Gibson over to talk about Computer Security. Ed is quite a chap, an ex FBI guy who is now Microsoft UK's chief security advisor.  So a bunch of students and myself boarded a magic bus to Bradford.

We were lucky enough to meet up with Ed. before the talk. Thanks to my super advanced planning I managed to get everyone to the venue around 90 minutes early, and so we had plenty of time to sit around a roaring fire in the hotel bar and chat. Ed turned up and the first thing he did was buy everyone a drink. My kind of guy.

Then, after some superb sandwiches courtesy of Black Marble it was time to get down to the serious business of the evening. And it is serious. Ed has been there, done that, and told us some truly scary stories. For me the most interesting thing that emerged from his talk is that the computer fraudsters don't want your bank details. They want your bandwidth. If they can get enough machines on the net under their control they can pretty much take down any server, anywhere. Unless you pay them big money.

At some point we will have laws that extend far enough to catch the perpetrators and enough systems out there hard enough to resist the attacks that can turn your home PC into an agent of the bad guys. However,  until then the rule has got to be keep your system up to date. Don't think of computer crime as a "soft" crime with no real victims. The people who do it are in there for the cash, very organized and totally ruthless.

Ed made some good points on a broad canvas. The speaker that followed him zoomed right down into the low level detail. He showed how breathtakingly easy it is to attack a system. One of my programming rules is "build yourself a nice place to work". What I means is make sure that it is very easy to create, build and test the systems that you are writing. It never really occurred to me that hackers would do the same.

We were shown a tool which used SQL injection (basically a way of putting database commands into the text you feed into a web page) to stripmine entire company databases. I knew about the technique, but I never thought there would be such advanced tools for this kind of thing. The next thing that we were shown fair took my breath away. It involved changing the way that the .NET Framework itself works.

Imagine that a developer has got some permissions set on a program. And they want to stop users from pressing certain buttons on certain screens. The Forms library that ships with Windows will do this for you. With a simple property change you can disable a button. If the button is disabled it turns grey and the user can't press it. Job done.

Unless someone changes the guts of .NET so that this property change no longer works. By just changing one particular byte in the right library file a nasty person who has access to your machine can make every single button work all the time. So simple, sooo scary.

Admittedly you'd have to do something rather stupid to let someone else run their program on your machine in the first place, but the result of this is that even securely written code can now be totally banjaxed by being hosted on a corrupted system. Amazing stuff. Simple yet brilliant. And a very worthy follow on to the talk from Ed.

This was a superb evening. Kudos to Black Marble, Ed and his associate (who's name I've forgotten I'm afraid). All the students had a great time, with some pretty deep conversations on the bus on the way back. This was the first Black Marble event I've been to. It will not be the last...

And with that, I'm just going to update my virus scanner...

Robs Laws

I was talking in a Software Engineering lecture today about "Rob's Laws" amongst other things. I think it is time these were finally written down.

  1. Any given computer is too slow. No matter how fast you think it is when you get it, after a while you will think it is too slow.
  2. Any given project will take longer than you think. Even (or especially) if you allow for this. The only exception to this rule is a project you won't get paid for, or one where you have massively misunderstood the requirement and are therfore doomed.
  3. A program that is useful will have bugs in it. The only programs that can be proved to be correct are too small to do anything that you might want.
  4. A highly successful, fully working, system which contains hardware components will just about always have a massive "kludge" somewhere in the middle of it. This is the bit that has to be there, otherwise it won't work. Nobody will completely understand why it has to be there, or what it does, but they do know that if you take it out the system stops working.
  5. A customer will never ring you up and tell you their program is working fine. Never. If the phone rings, it is always bad news. Silence either means they haven't got round to testing it yet, or it is working fine. At the point where you think it has gone quiet for long enough for it to be definitely working the phone will ring and they will tell you they've just got around to testing it and have found something they don't like.
  6. As soon as you assume something about what the customer wants you are doomed. For sure.

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.