Excel Prize Competition

I don't use spreadsheets very much, but every year we have to produce a demonstrators timetable, and Excel is how we do it. I've got a very clever spreadsheet that lets you enter things and automatically highlights cells for the demonstrators, counts their loading and all sorts. I'm quite proud of it.

It uses a named range, called Times, which has all the timeslots in it. This year we have added modules and moved things around, and now the named range does not reflect the part of the spreadsheet that I want it to.

And nothing in Excel 97 would seem to let me change this.

The help, like always, tells me in mind numbing detail how to do things which are either too simple for words or too complex for me to ever want to use. I have that sinking feeling in the pit of my stomach that there is a very easy way to do this (in fact I even remember doing it once many years ago) but I don't know what it is.

Very frustrating.

So, I turn to you, dear reader. You have already shown that you are highly intelligent just by the kind of blogs you read (i.e. this one). So prove this by letting me know how to do this "simple" thing. First answer that works wins a Mars Bar.

XNA Bits and Bobs, and the power of XACT

I've added a new section to the XNA Book part. This is where I put all the little things that I've found out about XNA development. I've discovered a couple of things about using XACT which you might find useful. They are here.

On the subject of XACT (the program that you use to create audio content for XNA games) I've gone from mild loathing to strong affection. Sort of a love affair, but with wavebanks. It lets you do really nice things with your samples, so that you can create complex sound stages with only a few wave files. It will change playback settings each time it plays the same waveform, to make a single sample sound like hundreds of different ones. It will randomly select a sample from a range, so that you get a nice variation in sounds. It will even let you bind variables in your program to settings used for playback, so that the sound can get louder on the left when the spaceship moves to the left.

So far I've only really scratched the surface of the tool (which is all I'll have time to do in the book) but if you want a nice way to add sound to games you should take a look. It is free, supplied as part of the XNA 2.0 developers kit.

Accidental Art

1377990827

I've been playing with XNA for the new book (book news coming soon, along with another chapter). As part of this I investigated the use of layers and transparency and what happens if you draw lots of coloured things on top of each other. I ended up with this rather attractive arty looking display which I've made into a clock.

Having decided that the output looked nice, I then reckoned that from a software point of view the code could be a lot better organised. So I went in and tidied things up, re-factored classes, improved the scaling and made the movement of the layers more realistic. And of course the "proper" version looked rubbish.

I'll be making the clock available on verysillygames.com later on. And you can actually see the clock in action here. It is a bit jerky, but it gives you an idea of how it works.


Video: XNA Groovy Clock

Raw Power

My biggish camera can take pictures in RAW format. This means that rather than compressing and processing the image data when it takes a picture, the camera simply dumps the output of the photo sensor into a file. It results in rather large files (around 14Mb in my case) for each picture but it does represent the epitome of quality, as you get all the data from the picture. It also means that you can do things like white balance compensation (making sure that things don't look yellow, or blue or whatever) after taking the picture, rather than at the time.

I was taking pictures of Seoul at night, and unsure about the white balance, so I took a few RAW pictures as well. The bad news was that when I got home, I now had to convert them into proper images. Fuji, who made my camera, supply a truly horrid set of programs to do this. They don't work very well on Vista, and I've lost the disks, so I thought I was stuffed. Until I found this.

These folks have written an image decoder for Finepix cameras that does everything I want. It is free and it works. If you want to play with RAW images and get the maximum quality from your camera, you should download the program and have a play.

1114663591
Raw Seoul

Jetlagged Software

I'm trying a new trick to deal with jetlag. The name of the game is "get enough sleep to stay sane". This means that if I find myself wide awake at, say 2:00 am in the morning, the trick is to go with the flow, work on something for a little while and then go back to bed.

Snag is, this means that I need something to do in the time. So I've decided to start writing silly software in this situation. I've written a daft little application that I'm now using in Korea on the wonderful Smartphone (which gives me another advantage for the device - if I find something I need to make it do, I can just write a program).

You can find out more here.

Note: I nearly bought "jetlaggedsoftware.com" to go with the product but in the end I backed off. Perhaps I'm (gulp) growing up....

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.