Saturday Open Day

Today we had our first University Saturday Open Day of the Semester. We had it on a Saturday, what are the chances eh? Anyhoo, we had good turnout, and I did two talks which seemed to go OK (at least from my point of view). Thanks for being a good audience folks.

IMG_5051.jpg 

IMG_5099.jpg

I took the pictures at the very start, apologies to those who arrived after the snaps. There was an hour gap between the two talks, so I went out with the big camera and took some pictures that I could play around with later. I’m very into the “Painterly 2” tone map from Photomatix at the moment…

IMG_5056_7_8.jpg

This the library looking cool.

IMG_5074_5_6.jpg

Marketing in the flowerbeds..

IMG_5052_3_4.jpg

This is “The Great White Way” that runs down the campus.

Thanks to everyone who came along, hope you found the experience worth the journey. For those of you that fancy coming to see us in the future, we’ll be doing exactly the same thing (even down to the jokes) on Saturday the 13th of October. Drop me a line if you fancy coming along and I’ll ensure you get a “Red Carpet Welcome” which might even involve a small piece of red carpet.

Sneaky First Year Programming Lab Fun

IMG_4899_900_901.jpg

We had all the First Year students in for their first lab today. As part of the fun we ask the students to find the bug in this piece of C# code, which is supposed to add two numbers together.

   1:  static void Main()
   2:  {
   3:      Console.WriteLine("This program adds two numbers together");
   4:      Console.Write("First Number : ");
   5:      string number1Text = Console.ReadLine();
   6:      int number1 = int.Parse(number1Text);
   7:      Console.Write("Second Number : ");
   8:      string number2Text = Console.ReadLine();
   9:      int number2 = int.Parse(number2Text);
  10:      int result = number1 * number2;
  11:      Console.WriteLine("Sum is : " + result );
  12:  }

Lots of people found the error straight away. But some people (usually the more advanced programmers) didn’t. I had reports describing problems with number parsing, the range of the input values, crashes caused by entering text instead of numbers, and all sorts of things like that. But the real problem is much, much simpler.

The program says it adds two numbers. But the statement at line 10 which works out the result actually does a multiplication rather than an addition. Which means that the program is completely correct, runs fine, but does the wrong thing. This is a surprisingly common problem with programs. You can write a program that is perfect, works a treat, but doesn’t do what the customer wants. And you will not get paid/get fired as a result.

The nice thing about this “sneaky” lab for me is that it worked on two levels. Those learning how to program can see how the computer follows a sequence of statements, executing each in turn. If the statement is wrong, the output is wrong. Those who can program a bit have hopefully learnt that it is a good idea to read the specification when you start writing code…..

Undergraduate Welcome Party

IMG_4987.jpg

It’s amazing what people do when you say “Act happy”.

Today we had the Welcome Party for the new undergraduate students. Great fun. I took the big camera and grab some snaps. As an experiment I’m taking the tiny camera to the one next week, to see what difference it makes to the pictures.

IMG_5021.jpg

We had a new toy this time. a six car digital Scalectrix. We had a computer timing laps and running quick races to find the fastest drivers. Went rather well, although the cars took a bit of a pasting. By the end all but one were still running though. We had some blankets around the corner bits to hopefully reduce the damage.

IMG_5016.jpg

Something bad in the process of happening…

IMG_5019.jpg

This is photographic evidence of the first sub-three second lap…

IMG_5026.jpg

These guys won the quiz.IMG_5028.jpg

These folks came secondIMG_5030.jpg

And the Malteasers go to these folksIMG_4995.jpg

Thanks to Freeside for bringing their multi-player game along. Worked really well.

We are actually going to use the Scalectrix in the teaching this semester. We will be interfacing Gadgeteer devices to the data stream that it produces and trying to make some embedded code that reads the controllers and drives the cars. Should be fun.

Thanks to everyone for coming along, sorry about some of the questions in the quiz….

There are some more pictures on Flickr. Click through any image to find the Photostream.

Project Deliverables

IMG_0558-Edit.jpg

I really like having the students back on campus. I was talking to Cameron about Seed projects. He is on the fourth year of our MEng course and he will be developing a project for a proper customer as part of his course this year. He was asking for any tips about project management. I told him that the best way to regard a project like this is to consider that the outcome of the work should not be a product, it should be a happy customer. If you think you are making a Stock Control System then you will focus on the technical deliverables and probably get them working, but you might not provide what the customer wants. If you think about the problem in terms of making “Wonder Widgets” happy about the way they are now able to manage their stock that puts a different perspective on the job.

This doesn’t mean that you have to do everything the customer wants, including washing their car. What it means is that you should engage with the customer as much as you can (or they will let you) when you are building the solution. We have found that the best Seed projects are the ones where the customer really gets involved with the team making their solution. The best way to do this is to make it easy for the customer to work with you. Bring things to meetings to talk about and leave with lists of things to do. And keep the cycle as short as the customer will let you. Thinking “We’re OK, we saw the customer last month” is kind of dangerous, in that this is the way you end up with a half working solution to the wrong problem.

Welcome To Hull 2012

IMG_4917_8_9.jpg

That reminds me, must get down there and stock up before my first lecture…

Welcome to Hull for new students. And welcome back to everyone else. Firstly I must apologise for the horrible weather. My fault entirely. I washed both cars yesterday. Fool.

Anyhoo, each year I put up a bunch of tips for new students, so here goes for 2012:

  1. Make sure that you have all your updates installed on your system. It doesn’t matter whether it is a Windows PC, a Mac or a Linux netbook. Find out how to check for updates and get everything up to date. At some point you will want to connect your machine up to a campus network of some kind, and if you don’t have all the latest security patches you may be vulnerable to infection.

  2. Do something about viruses. At the very least make sure that your Windows PC has Microsoft Security Essentials installed and running, that the databases are up to date and that you run scans at regular intervals. If you really want to install an anti-virus program don’t feel obliged to spend a lot of money, the AVG free anti-virus program is good and will cost you nothing. Get it from http://free.avg.com/. Please don’t spend huge amounts on some of the more expensive ones. The benefits are dubious and they also have annual renewal charges too.

  3. Take a backup of your machine and leave it somewhere safe (perhaps even at home). Find out how to use the backup software on your machine and take a copy of everything. Use one of these cheap external hard disks that you can pick up for around 35 pounds or so from places like http://www.ebuyer.com/ or Staples, or even Tesco. That way if it all goes horribly wrong when you get to university you can recover your precious music, videos and other stuff. Once you have the backup habit, take a full one one every month or so.

  4. Don’t spend huge amounts on software just yet. Most universities (including ours at Hull) have deals that get you some programs that you need cheaply. Take a look at https://www.dreamspark.com/ for free Microsoft stuff and http://students.autodesk.com/ for free Autodesk stuff (great for 3D design).

  5. The same goes for books. In the computing field they are rather expensive, and you don’t want to pay a lot for a book and then find out that it is only used for a small part of the course. You can check the books out in the library, and you might also find that there is a second hand book sale on your campus where you can pick up the required volumes from other students quite quickly. You might also want to form a little cartel with fellow students to share books between each other and spread the expense (this is also neat because it can also give you a ready made study group). Hull students will get a printed copy of my C# Yellow Book (daffodil edition). Anyone else can get it free from http://www.csharpcourse.com/

  6. Get a usb memory stick (actually, if you are a Hull Computer Science student we’ll be giving you one of these later this week) . Keep backups of all your work on it. You can also use it to take files into the university to work on. You will get some filespace on the university network, but it will not be an enormous amount, and having your files always with you is useful. Put a file on the drive with your contact details (just your name and phone number) so that if you lose the drive people can find out who to return it to.

  7. Get some free on line storage. I like Windows Live Skydrive: http://skydrive.live.com/. This gives you 7 GBytes of space which you can access from anywhere on the web via a browser. You’ll need a Windows Live account to use this. Skydrive will also sync files across multiple computers, although I’ve found that that DropBox has better multi-platform support and also keeps track of file generations. Take a look at DropBox at http://www.getdropbox.com/. Unfortunately you only get 2G of Dropbox space for free. You can also use Google Drive: https://drive.google.com

  8. Make sure you have insurance for all your nice toys. It would be terrible if they got stolen or damaged before they were insured. Take a look at cover from student specialists like Endsleigh:

    https://www.endsleigh.co.uk/student/student-insurance/

    (if anyone knows any cheaper deals feel free to let me know and I’ll update this post)

  9. Start blogging. Good writing skillz, like wot I have, are very valuable and make you a much more employable person. Sign up at Hull Computer Science Blogs: http://hullcompsciblogs.com/ and start putting your word out and building your brand.

  10. Don’t worry. Really. You’ll be fine. And it will stop raining. Probably in April.

Una makes some Rockets

IMG_4950-Edit.jpg

Una the Ultimaker is now really coming into her own. Especially now I’ve put the little blue locking device in the right way round on her print head so she doesn’t push our her Bowden tube half way through every print. I’ve found this super Rocket Retro on ThingUniverse and I’m working my way through the coloured fibres that I got from Faberdashery in their multi-coloured pack. They rather cunningly sent me some Jade Green translucent fibre along with my order, which looks amazing. It is a bit wasted on a rocket but I’ve printed a thin sided vase with it which looks really nice. So now of course I’m going to have to order some more.

Pi Powered Tabletop Gaming Machine

image

Firebox do this amazing “arcane arcade table”. It is basically a MAME (Multi-Arcade Machine Emulator) PC underneath a 26 inch TFT monitor and with a tricked out sliding joypad thing. It looks very nice. It also costs 4,000 pounds. Wah.

But a Raspberry Pi costs 30 quid and has MAME support. A monitor shouldn’t come in at much more than 100 quids (assuming I can’t find one lying around somewhere). IKEA do coffee tables at around a tenner, and so I reckon it should be possible to get something going for a lot less (how about a twentieth) than the cost of the “amazing” one.

Ever since I saw Jon Purdy’s tabletop Galaxian machine I’ve kind of fancied having a machine like this in the living room. Even number one wife kind of approves, as long as it is not too big and not in the middle of the room. The only tricky bit is making the bezel and inlaying the screen into the tabletop. That has to be done properly, but perhaps if a bunch of folks got together we could have some made.

Anyone fancy having a go?

Three Thing Game Autumn 2012

image

Followers wanted….

Three Thing Game is coming. With new Bank of Thingland money, improved auction action and all round added wonderfulness, including the MonoGame team who will be coming along for the weekend and giving some sessions on porting XNA games to Windows 8. Thanks so much to Lee Stott from Microsoft for sorting that out.

You can find out more by reading this wonderful blog, going to www.threethinggame.com (which in a strange kind of way links you back to this blog) or by following the all new, highly shiny, ThreeThingGame on Twitter.

And stay tuned for some riveting hardware developments for the competition which might (or might not) actually include riveting.

Una the Ultimaker Lives

IMG_4793.jpg

I’ve decided to give my 3D printer a name. I’ve come up with “Una the Ultimaker”, because it is about the only name I know that begins with ‘U’. Ursula didn’t seem right and, like most people of my generation, I’ve always had a bit of a thing for Una Stubbs. Anyone who can make Cliff Richard movies worth seeing has got to be OK in my book. You’ll find her now doing sterling work in Sherlock.

But I digress. Last Friday Una got herself into a bit of a pickle. Her Bowden Tube (the tube that delivers the plastic fibre to her extrusion head) popped off the fitting when she was printing. This caused cable to her temperature sensor to come off and she got dangerously close to over heating. The problem was caused by a plug of plastic that had formed in the printing head. This is only the second time I’ve had a problem like this but it is a well known issue with 3D printers. Fortunately the folks at Ultimaker have been working on this and have just released a new “hot end kit” that has been specifically designed to address this problem. Anita at Ultimaker posted a kit out to me in double quick time and I spent this evening fitting it.

I had to strip down the entire print head and rebuild it, which was great fun. I first built the original print head just long enough ago that I’d forgotten all the little things you can do wrong, like forgetting to fit the fan cable before you assemble the whole thing and then finding that you have to take everything to bits again…

But the good news is that having put the new print head on it does seem to work a lot better. It has been designed with flanges that should reduce leaks as well. I celebrated by printing another twisty vase and it has come out better than just about anything I’ve ever printed. With a bit of luck I can now get on and make some new cases for bits and bobs.

IMG_4782.jpg

This is Una in her natural habitat, along with a well earned cup of tea for me..

Reading your Gas Meter with Gadgeteer

IMGP0058.jpg

One of my favourite cartoons when I was a kid was a picture of a bloke in a uniform wearing the logo of the Gas Company, with a notepad and pen in his hands and looking exhausted. Someone says to him “You look tired” and he replies “So would you be if you’d just done 100 meters”.

Funny eh? Peter doesn’t want to have to wait until his gas supplier tells him how much gas he has used, he wants to know instantly the effect of having that hot bath. You can find out how he is using Gadgeteer to read meters safely by reading this.

More On Broken Software

IMG_4611.jpg

It’s not as if I’ve been lying awake at night worrying about writing software (OK, perhaps slightly) but I have been pondering the “Is everything broken?” question a bit. And I’ve come to the conclusion that, at the end of the day it probably is, but then again it doesn’t really matter that much.

All of the terrible examples that are quoted are irritations in the great scheme of things. Nobody has been hurt, nobody is going hungry because of them and if the worst thing that happens to you in your life is that you can’t put any more music on your iPhone then I really, really, want a life like yours. True, it is annoying that things don’t always work as they should, and true, it would be nice if people felt moved to provide higher quality than they sometimes do, but at the end of the day stuff mostly works, and that is the important thing.

Technology now lets us do things (albeit imperfectly) that we just could not do before. It is also a great leveller. The Queen might have an iPhone that is covered in precious stones (although she might deem that a bit tacky) but she can’t do anything with it that you can’t do with yours. Although she might not worry as much about roaming charges as you do. The best phone in the world, whatever that is, can be obtained by literally millions of people, not just one or two. And, what’s more, anyone can make programs and sell them on the devices, providing a path to riches that just wasn’t there in the past.

I think, at the end of the day, we are always going to be upset with the status quo, and want it to be better. I vividly remember reading a piece some time back that was written by a retired general type. He was moaning about the way young people were more useless and lazy than he was in his day, and how their lack of discipline and application would lead to the collapse of civilisation as he knew it. Turns out he was a retired general from the Roman Army and was writing this a few thousand years ago.

The best thing to do is to take these issues on board, try to move things on a bit and give our children something even more fantastic to complain about when they get to our age.

On Broken Software

IMG_4097_8_9.jpg

Both Scott Hanselman and John Batelle have been having problems with their software over the last week. Both their posts are well worth a read.

Years and years ago Gerry Weinberg wrote "If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilisation". Not much has changed since.

It's always more fun (and more lucrative) to make and sell new stuff than it is to mend broken old stuff. And software lets you sell stuff that isn't finished. Unlike things like bridges: "Hey, that doesn't reach the other side!", and buildings: "Hey, where's the top floor?", many faults in programs take a lot longer to show up.

With a program you can leave out error handling, load testing and all the other boring bits that make a program properly useful and still ship a product that will sell by the boatload. With a bit of luck not that many people will notice. Of course, you could spend a lot more money and time getting it right. Snag is, I don't think that anyone would stay in business today making completely perfect software that took ten times as long to write as the current state of the art. People will go for new and shiny over old and working most of the time I'm afraid. I don't think I've ever seen an Engadget post about a new version of a product that is exactly the same as the old one, but works properly.

I’ve been writing software for an unfeasibly long time and some of it has wound up in the hands of proper users. I pre-date objects, Test Driven Development and pair programming. I wasn’t there when the loop was invented, but I I think I saw it in the papers. When I write a program I worry about everything, particularly what could go wrong. To me “The Happy Path” is an aside. I’m spending all my time fretting about “What happens if the response never comes back?” or “What if I get millions of these when I only asked for five?”.

It drove me nuts when I found out that the standard input/output libraries in C didn’t actually check the length of what was given to them, making the potential for buffer overrun part of the run time experience. I wrote my own input validation suite. I put it in all my products. I added timeouts everywhere. I didn’t particularly do this as part of a methodology, I just did it because it seemed sensible at the time, rather like a builder would make the ground floor before starting second floor. My programs hardly ever went wrong. Even the really big ones.

As a person who also teaches programming I try very hard to make sure that students take this approach when they write code. We start with defensive techniques and move on from there. As soon as you have a need for a number (say perhaps the age of your customer) then start to worry about how it might go wrong, become negative, very large, or change by more than 1 after a year. I don’t see this as tied to any particular methodology, I just see it as common sense, and I really want my students to have the same mind-set when they write their programs.

Modern development environments give you a lot more tools for making products that can be more reliable. Of course, the flip side is that the products can also do a lot more and that the demand for new, innovative solutions delivered in record time has never been greater. For me the only really good news is that where it is important to get code really right, for example in cars, airplanes and nuclear reactors, the software industry does seem to be able to deliver properly working systems, albeit slowly, and at great expense.

For the rest of us, I think it is as much our fault as anyone else’s that we are in this situation. We are keen to queue up for the next iPhone when the one that we have doesn’t actually work properly. Until we start only buying software that really works (and probably paying more for it) then this is how things are going to stay.

Castle Howard

IMG_4344_5_6-Edit.jpg

I don’t think that Castle Howard is really a castle. But it is a great place to go and see. It is a country residence on a grand scale, the kind of thing it takes several generations of “unbelievably richness” to come up with. We’ve visited it on and off over many years and once saw Bryan Ferry play live there. That was a good night, that was. It is also famous as the place where “Brideshead Revisited” was filmed. Twice.

Today we went for another visit, and I took the big camera along. We also did something we never normally did when we took the kids. We paid extra to have a look inside the house itself.

IMG_4679_80_81.jpg

This kind of puts our hall to shame….

IMG_4398_399_400-Edit.jpg

This is what they have instead of a garden shed.

IMG_4733_4_5.jpg

They seem to have lots of flat screen TVs, but they are all stuck on one picture…

If you are looking for a nice day trip (around 75 minutes from Hull) I can strongly recommend it.

Tekken me back to my youth..

image

Well, not really “Tekken me back to my youth”, as that was long gone when I got my PSX (Playstation 1) and took part in my first “King of Iron Fist Tournament”. But it was a great game. And now I can play it on my PS Vita. Which is really growing on me. I’ve actually finished Uncharted and now I’ve discovered that a lot of PSX back catalogue is available for tiny prices. I used to love Tekken 1. I liked it so much that I actually got the game music off the game disk (in those days you could do that) and and I still have it lying around on the phone. I did the same for Ridge Racer and also Destruction Derby. In fact with these games you could even swap out the disk during gameplay and have different music accompanying your driving/fighting/crashing action.

If you fancy some nostalgic fun for not very many pennies, you can also get these games, along with the first Tomb Raider from the Playstation Store. And next week we get the Vita version of Little Big Planet, which I’m just about to pre-order.

Visual Studio Express 2012 for Windows Desktop

image

The new Visual Studio 2012 Express is very nice to use. I’m even liking the funky dark colour scheme. But the fact that all you can create with it are Metro apps is a bit of a bind. However, Microsoft have now released Visual Studio Express 2012 for Windows Desktop. It lets you use the fancy new version of Visual Studio 2012, complete with SHOUTY MENU BAR, to create desktop applications in C#, C++ and Visual Basic.

Incidentally, if you want to put the menu bars back to how they used to be, Deborah will tell you how. She writes a really good Visual Studio blog with some very useful tips on the program.

Tempting Fate

image

Last night at my talk I mentioned viruses and nasty programs. I mentioned that I used the Windows Defender part of Microsoft Security Essentials. I also said that I hardly ever get problems with this kind of thing as the only programs I install come from boring places and I don’t go to strange web sites and click “OK”.

Of course, this morning Windows Defender popped up an alert. I’d been searching for some drivers for my Canon printer yesterday and inadvertently visited one of these nasty “driver archive” sites who try to sell you drivers that you can get for free from the manufacturer. And they had given me a little present, as you see above. Good news is that it was a doddle to remove. I left the machine doing a full scan when I went off to a meeting and all is well.

Windows Dev Center Open for Business

image

I’ve just registered as a Windows 8 “Metro Style” developer. It went very smoothly, most of the stuff carried over from my Microsoft account. For the princely sum of 32 pounds a year I now have the ability to publish Windows 8 applications to the world. I wonder if the world is ready for a “Metro Style” Cheese Lander?

You can sign up here.

Hull to get 4G Phone Coverage

image

I don’t often shout “Yay!” while I’m watching BBC Look North. But today I did. They announced that Hull is one of the 16 cities in the UK that will be getting 4G network coverage before Christmas, courtesy of the phone network EE, which is being set up out of the merged Orange and T-Mobile networks. The news is even better for me, because the new Nokia phone that I’m presently coveting, the Lumia 920, has LTE support and should work on this new, superfast network.  So, Yay! indeed.