Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
Friday
Nov042011

The Best Way to Write Programs

Main Board Hi Res

So, how would you represent the arrows?

The Software Development for the First Year C# Programming course this year is a game I have invented. I’ve called it Evil Squash. It even has its own web site:

www.evilsquash.com

The game is very like Snakes and Ladders, but with a twist that makes it a bit like Ludo as well. At the moment we are working on the player movement, which uses a board like the one above. When a player lands on the tail of an arrow they must then follow it to the destination. We have decided that there are three ways that you can implement this behaviour.

  • A whole bunch of conditions that hard wires the arrows into the program
  • An array with a location for each square that provides a redirection to the destination square.
  • An array of “redirects” that holds the behaviour of the 10 arrows

You might want to consider which is the “best” one. To me, the answer is “you can’t say”. Each of them has advantages and disadvantages. Some of them use less memory, some go quicker. Some are easier to test and some are easier to understand.

One of the things that we try very hard to do in the programming course is to get people to think that often there is no “best” way to solve a problem, merely ones that are better than others against certain criteria. We give extra marks to students who manage to use arrays (I’ve nothing against hard wiring the arrows, but I thing showing you can use an array is something that should be rewarded).

Next week we are going to get the player and the “Evil Squash” behaviour sorted, on the way to making a complete game and maybe even some AI powered opponents.

I’m keeping the domain in case we get some good ones (maybe even phone based) that we might want to distribute.

Thursday
Nov032011

Don’t Take Your iPad to Meetings

University Trees

I took my iPad to a meeting today. I do love the device to bits (although the battery life seems to have taken a bit of a hit since I upgraded it to the latest operating system) as it is a great way to consume content. Unfortunately I was reminded again of how hard it is to make good use of it to take notes. While some of those around me were confidently tapping text into their netbooks and laptops I was trying to persuade the shift key to do what I wanted and writing “auto-corrected” rubbish. If I had remembered to bring the Bluetooth keyboard to type text in things might have been easier, but as it was I ended up with a few lines of garbled text. Oh well.

Wednesday
Nov022011

Windows Phone Event at Hull University

DSCF5126

Microsoft are coming to Hull on Wednesday the 16th of November for some intensive Windows Phone Development action.  The event will run from 1:15-5:00pm in Lecture Theatre D in the Robert Blackburn Building. It includes an afternoon tea break, and takeaway pizza at the end.

If you want to find out how you can take your C# skills and apply them the phone, sell you applications and maybe even make some money, then you you should come along.

Spaces are limited so register on EventBrite for free here: http://hullwindowsphonecamp.eventbrite.com/

Tuesday
Nov012011

Leaves on Cottingham Road

University Leaves

Went for a walk this afternoon. Took the camera. Jolly glad I did too.

Monday
Oct312011

Milton Jones in York

Milton Jones at York

Went to see Milton Jones at York last night. Very funny indeed. Nice to see a comedian that sees no need to be anything other than funny. Nothing nasty or rude, just out and out silly laughs.  See him if you can.