I want a trombone

I want a trombone. I've wanted one ever since I saw one in a shop up town at around 11:30 today. And only 99 pounds too. I'm sure that a trombone would give me that air of cool which has so far eluded me. I could be "discovered" in my office playing really cool trombone riffs (if that is what they are called) like Riker in Star Trek Next Generation. Actually, I think that people would know I was playing the trombone long before they opened my office door though.....

Anyhoo. I still want one. Unfortunately my wife has other ideas and instead we have bought some garden furniture. Which cost the same as one and a half trombones (not that I want the half as well). I'm sure I'd work really hard at learning to play it, and it is bound to be easier than the guitar - for a start you can't play more than one note at once so reading the music will be a no brainer. And if I don't get round to practicing it would look even cooler hanging on the wall. Next to my guitar.

How to succeed in a programming course

Spent most of the day marking first year practical work. By gum, some of our students can program. And some should have sought help before submitting. Most people have done enough to pass, which is nice, but they could have done some much better if they had come to see me (or even posted on the forum) when they hit problems.

I can see stuff of real potential, bogged down by little problems. "I would have finished this bit but I couldn't figure out how to do the ......". Some things you don't have to figure out. You are allowed to ask.

If you want to succeed in your programming practicals here are a few good ground rules from someone who's been around the block a few times.


  1. Read other folks code. You can learn a lot from it. And it is not copying (unless you use cut and paste of course)
  2. Think about it before you write it. Just whacking some code in and debugging it into life is a mugs game. Instead, map it out on paper, write a sequence of steps in english which would work for you. Then convert this into your chosen language.
  3. Design for test. Figure out how you are going to prove it works (or doesn't) as you create your solution, not at the end.
  4. Explain your problems to other people. They might not know the answer, but the act of explaining the problem often solves it.
  5. Don't be afraid to seek help. You will not appear stupid. Everyone who can program has been there at some point. And generally programmers like helping each other.
  6. Never give up. Persistance is a recurring theme with good programmers. Having said that, don't be afraid to walk away from the problem for a while. If you've not solved it after 30 minutes it is unlikely that you'll solve it in two hours. Instead take a time out and go and do something else. Nine times out of ten the answer will pop into your head as soon as you stop thinking about the question.

Now, if only I could get the splash screen on my Smartphone app. to work properly.....

Sasser and Viruses

My brother in law has the Sasser virus. His shiny new portable is now seething with the darned thing. I've send him a CD-ROM with a killer program, an anti-virus suite and Zone Alarm, but it is very irritating when these things happen. I keep wondering whether other fields of human endeavour have suffered as much from human stupidity. Did we really have people who, two years after the first railway was invented, decided to have some fun by dropping rocks on the tracks in front of trains just to see what happens? I suppose we did have Luddites, but they smashed the machinery becuase they thought it might take their jobs.

Perhaps in the "Good Old Days" (tm) folks were too busy with the more urgent aspects of staying alive, having a roof over their heads and not dropping dead from whatever plague was doing the rounds. Nowadays most of this is a given, and so there is enough slack in the system for going to Britney concerts and writing viruses (not that people who go to Britney concerts are the virus writers - but you know what I mean).

I've no idea how we solve it. I guess we need to make sure that we have the latest software (if my brother in law's machine had been better prepared before he got it there would not have been a problem). Perhaps we should insist that, just before a machine is shipped or sold over the counter, it is connected to windows update and prepared for the horrible world out there. This would not stop new viruses but it should help things a bit. I for one would think that such a move would give a vendor a nice sales advantage - I'd prefer to buy a machine fully prepped rather than spend a couple of hours of my time bringing it up to scratch.

Disks. Wah!

Spent most of today preparing media for my wonderful "Fullmarks" marking program. This is the all singing, all dancing, annotating masterpiece which will make marking this coursework really easy and fun. The program seems to do everything now, but I'm sure that after 150 labs I'll find something new it needs to do. But back to preparing media. I'd asked the students to submit on floppy disk or CD-ROM. Bad move. Out of 150 submissions, around 20 won't read on my machine.

And I've just remembered that I hate floppy disks. Horrid, creaky things with read errors. And now I hate CD-ROMS as well. Horrid, creaky things with read errors. It might be that my machine in my office is a bit old, but I would have expected better performance than this!

The thing that really annoyed me (hmm, this might just be a rant) was the way that Windows XP (a wonderful operating system in just about every other respect) completely freezes when you put a CD-ROM in the drive. I've no idea why this is, and I know that older versions of the operating system were better in this respect.

Anyhoo, I now have 120 or so things to mark. I'll let you know how I get on.

Oh, and the funny pick and mix display was selling Lego bricks of all things! You could by a cup full of just red ones if you wanted. And the car, count the number of wheels that you can see....


Went to Collectormania yesterday. Caught the bug from number one daughter, who dragged me to the last one in search of hobbits. This time things were a bit quieter, but still very busy. The name of the game starts with getting signatures of notables, in this case two of the Star Trek doctors. I'm not normally that star struck (although I expect people who meet me to be of course). But to meet in real life two people I've seen on the telly and big screen was rather neat, and more than made up for the pain of getting up at 5:15 am to make the three hour drive down to the show.

I also made some careful purchases of collectable items (at least that is how I'm rationalising them), which I'll post details of as soon as I've dared tell my wife what I've bought...

Two Doctors!

Up bright and early to get to the Collectormania event in Milton Keynes, a made up city around three hours from Hull. They have stars of TV and screen signing things and you can get your picture taken with them. Yay! (by the way, I'm fully aware that this may seem a bit sad and geekish, but I'm too old to change - or even care what you might think). I met two Star Treck "doctors", Gates MacFadden and Robert Picardo. I also took some pictures but I'm too tired to tidy them up and post them. That will have to wait until tomorrow.  Now I'm going to watch some telly and stagger off to bed, tired but happy.

The Nightfly

Went shopping today. Major find. Around 20 years ago I bought about the best record ever, "The Nightfly" by Donald Fagan (he of Steely Dan fame). With it being a long time ago the record was a 12 inch vinyl thingy which is now up in the loft (along with the turntable that used to play it). I never got around to buying the CD version. Shame on me. Today I didn't buy the CD version again. Instead I bought a DVD type version which has the original album plus Dolby and DTS remixes. Wonderful. There are one or two classic albums which have been given this treatment and believe me, it is wonderful.

If you've never heard of Donald Fagan (or Steely Dan) I envy you. Because you've got the stuff to look forward to. Get to hear some if you can. Just good stuff with clever lyrics.

Last Blog of the Day

I'm determined to keep my blogging record up to one per day (at least). I've been invigilating today. Two hours sat watching students suffer in an exam. You might find this surprising, but it is quite stressful for the examiner as well. It was all I could do to stop myself from shouting "Right! Now Lets Go Crazy!" when the exam finished. Perhaps I'll do that just before I retire.

The exams were Indian history and Advertising (not the same paper - but it sounds like fun). Everyone seemed to write loads of stuff. Now some lucky lecturer has 100 or so papers to mark. My big exams (i.e. the ones for my modules) start next week. At the moment I'm marking the practical stuff. I'm writing a little program for the Tablet PC which will let me pull out student listings and scribble on them. It then builds a web site for each student with the annotated programs and marks and stuff. Taken me a day and a half so far and it is looking quite good. I'll post the binary when I've got it to beta.

Just had an MSN message from Simon. He is one of my final year project students for next year (I'm just finishing marking last years reports and now we are planning the next ones). I'm hoping for great things, Simon was one of the Imagine Cup UK finalists from Hull. We are trying to hatch a little plan which involves Smartphones. Will be nice if we can get it to work.

And now I'm going to bed. From the land of blog to the land of nod (sorry - but it is a bit late..)

Vital Spoke Blogging Tip

Now, here's a tip for all Spoke bloggers out there. Just before you press the post button on your wonderful words of wisdom, higlight all the text in the window (use CTRL+A to do this) and copy it into the paste buffer (use CTL+C to do this). Then when your wonderful ISP drops the ball and the post doesn't get through, you can simply paste it into the window again without having to retype it all. (use CTRL+V for this).

Actually, there are cut and paste icons on the toolbar at the top, but I'm so old that I can remember the control sequences.

I've just lost a rather long and exciting post that I know I'm too tired to repeat just at the moment, but this tip is more than compensation. It was particularly annoying because I thought "Oh, I wonder if I've time to copy that.." just as the "Page not found" message popped up.

Ho hum. And now CTRL+A and CTRL+C just before I hit post....

The Importance of Knowing Where You Are. And Evil Pixie II

Sometimes I worry about myself. I've got Mappoint working on my Tablet PC. And I've just interfaced my GPS system to it so that it returns position information. I can now sit in my conservatory at my house (the only place I can get a fix on enough satellites) and look at an indicator on the tablet which tells me that I am sitting in my conservatory at my house. And this pleases me very much. Ho hum. The next thing I'm going to do is drive to work with the Tablet on so that I can track myself driving to work. But why you ask. Because.
Been trying to fix the splash screen on my Smartphone. I must be getting closer to the cause of the problem because the evil pixie is now actually resetting my whole computer when I try to debug the Smartphone program.......

C# for Fun and Profit

I've spent a big chunk of today writing my new C# course. We are teaching it to our first year students next session for the first time. C# has replaced Java in my affections for the simple reason that I find it more useful. And I reckon it will be easier to teach. 

It is probably a bit sad to get worked up about how nice a programming language is. I've not actually got to the point where I stop people on the street and to them say things like "And it's got properties! Look at this code here! I can call the set method just by performing an assignment....". However, I fear that the time may be near.

I quite fancy making one of these. Just to get the reaction of the family when I get it out and start making home movies with it. It is worth watching the sample films (especially the last one) just for the super way that the guy has used backing music to really make the clips come alive. And now I want, want, want a copy of the "Take Care of My Cat" soundtrack.

Still No Programming - Firefly Instead

Another day of not writing programs. Did watch some Firefly though. Still quite enjoying it, but it does seem a bit of a missed oportunity. It is/was the next big thing from Jos Whedon, the man who brought you Buffy and Angel. It is supposed to have these much vaunted "story arcs" which run for several episodes (or even seasons). Like Babylon 5. However, in amongst your story arc episodes where the plot moves on (I call these "Luke, I am your father" events) you have to have a bunch of "fillers". And that is where Firefly falls down a bit.

In B5 they had to have fillers too, but theirs explored the future in an original and interesting way. In Firefly I've already seen a "train heist gone wrong" and an "accidental duel with bad guy" episode, both of which could have come out of any number of shows and had no futuristic consideration at all (apart from the fact that the train floated above the rails).

I'm sticking with it for now (and you should take a look too) because the cast and the production values are superb, and the characters and dialogue are well up to Whedon standards, but I just wish he'd got to grips with some SF issues, bearing in mind the thing is supposed to be set in the future. If you want to see it you'll probably have to track down the series on DVD, since the Fox Network did a very good job of "stealth promoting" the show and I think it ended up on at three in the morning or something.

No Programming!

I've done no programming today! But I have moved the lawn, mended the fence and showed number one son how to scrape rust of cars (there is always more rust than you think - even if you allow for this). I also found time to take my first photograph for The Spoke blog:

I call this one Kill Bill and Gas Bill. There may be more later. Now I'm going to watch some Firefly.

Recreational Programming with Bad Pixies

Things that you do for fun are supposed to be fun. Having finished mowing the lawn (or more specifically - looking at the lawn and going "Oh, that can wait until the weekend...") I went back to my nasty cursor problem. Ugh. No fun.

Sometimes when you are writing code you get the feeling that you are doing something which nobody else in the world can do. Except that they can. Then, when things get interesting, other nasties conspire to make the situation even worse.

Having discovered that I have to use an actual phone to make it go wrong properly, I'm now learning the joys of running code in the real device. There is a little pixie in my Smartphone (one day I'll roll out my theory that everything in life is actually controlled by tiny pixies running round and making things work - but that is for later). This pixie is a bad pixie. He (or perhaps she) can tell when I'm getting close to debugging the cause of the problem. And then he (or she) turns off the active sync connection so that the debug session drops dead and I have to restart everything. This has happened too many times to be coincidence (Oh, OK it has happened three times so far).

Bearing in mind that I am supposed to be enjoying doing this (ho ho) I've decided to back off from the problem for a little while and see what the subconscious comes up with (this is actually quite a good debugging technique - if you've got the time).  

Busy? What?

Ha. It rained. No lawn mowing for me. So I did a little coding. As one does. I've hit a problem with the Smartphone. I think that madness beckons. I wanted to create a splash screen for my program which warmly welcomes the user and gives them something to read while the program fires up. So I did this. Even used threads to make it work too.  Go me.

So next I turned my attention to the cursor. When the machine is busy, it is best if it looks that way. Windows CE devices can be made to display this rotating wheel cursor thing while they are thinking. There is a very simple way of getting this busy cursor, you just change the cursor type to look that way. The thing is that this doesn't work on the emulator (the pretend Smartphone that runs in your PC).  I've never managed to get the busy cursor to appear on the PC. However, on the Smartphone I have a different problem. I can't get rid of the thing. I start the program looking busy as the splash screen loads, and then stay looking busy as the program runs. Even if I turn it off. Wah!

There is something nicely symetrical about this of course, but only in a very annoying way. If I figure out how to fix it I'll let you know. If you know how to fix this, let me know and I'll buy you a (virtual) beer.

Recreational Programming

I write programs for fun. Don't ask why. I suppose it is better than fishing, or making kits (incidentally, one of my major ambitions is to go to Paris, buy around 1,000 little statues of the Eiffel tower and then make a model of a matchstick with them).

Anyhoo, at the moment I'm making a little Smartphone application which I can use to track my time. You give it a buch of categories and activities and then it lets you add tasks which have an activity, start time and duration. I got it working last week and now I've started fiddling with it. I've added XML save and restore and I'm thinking about linking it up with a web service so that you can upload your activities and it will print out a report (or even an invoice for your time). And the boss can read web pages to find out what you have been doing.

I'm not sure where this will lead, or even if I'll get it all going, but it has brought home to me just how easy it is to use modern tools to put these kind of things together. I've also learnt some intresting things about using XML which I'll post over the next few days.

But this evening I've got to mow the lawn, so no coding for me tonight...

Blogging Interface

I teach programming. One of the things I teach is interfaces, which are a really neat part of Java and C#. An interface is a bunch of methods which a class can implement. Essentially it is a list of things that the class says it can do. This goes a bit further, in that if a class implements an interface it can not only do those things, but you can regard instances of it in terms of this ability, i.e. if an object implements the ICanPrint interface you can not only ask it to print, but you can regard it as an ICanPrint thing, rather than a Receipt, StockItem, Invoice, Chicken or whatever. This makes things like printer queues easy to manage, in that they simply contain "things that can print" rather than particular kinds of widgets.

Some students have problems with this, although as humans we do it all the time. Talk to me on the phone and you are using my "talk on the phone" interface. Ask me to drive you somewhere and you are using my "driver" interface. As me to tell you a joke and you are going to get my "awful comedian" interface. I can't juggle, so as far as I'm concerned the "juggler" interface is not implemented.

So, what has this to do with anything? Well, I've been wondering about which blogging environment to use in the future, my old, steam, one or this new, spiffy, spoke thing. I can see benefits in both. I like the control that my old blog software gives me, but I love the community aspects of spoke.

It occurs to me that what I need to do is implement a new interface "write blogs for spoke" and have done with it. So that is what I'm going to do. If I think it is too silly for spoke, it goes in the old, steam, blog. If I want to re-write history (which is the ultimate power - believe me) it goes in the old one too. But if I want to talk about computers stuff, and get comments back, spoke is the one for me.

New to the Spoke

I'm kind of auditioning blog hosts at the moment. I'm trying to find out which is the best one to move www.robmiles.com to. At the moment all my innermost thoughts and feelings come courtesy of a little program I downloaded and a small amount of free web space I get with my broadband connection.

The problem is that I've nearly a year's worth of stuff on there to move, and I don't think I'm allowed to blog into the past with Spoke (although I intend to try).

However, The Spoke looks kind of cool, and the people here are neat, and I like the idea of community. So we shall have to see....