Failure is not a state, it's an event

I'm not a big fan of trite aphorisms. Today may be the first day of the rest of my life, but putting it that way doesn't really do much for me. But today in a presentation about teaching and learning I saw the phrase "Failure is not a state, it is an event". I didn't get time to jot down the attribution, and the best that the internets can come up with on the matter is this, but I do think that this is a crucial thing to remember.

Never think of yourself as a failure if something you try doesn't work. Just think of yourself as someone who has now got some valuable knowledge along the lines of: "I need to do that differently".

I think you learn more from your failures than your successes. And fear of failure is worse than failure itself. I now allow myself the luxury of trying things that might fail on the grounds that worst case I'll know more than I would by doing nothing. And it is always possible I might succeed.

The Five Knows of Programming

I've been teaching programming for a very long time. I'm still waiting to get properly good at it. In the meantime I'm given to thinking about what it means to learn how to program. I've narrowed it down to five "knows".

  1. Know what the computer does.
  2. Know how to create a program.
  3. Know how to automate a task that you yourself can perform.
  4. Know how to think like a computer.
  5. Know how to structure and manage your solutions.

I've been teaching the First Year course for the last few weeks and I reckon that we are at level 3 at the moment, moving on to level 4. This is a crucial time.

At "Know level three" you can take something you would be able to do yourself and write a program do perform that action. One example we do is deciding whether or not you can see a particular film. If your age is lower than the rating for that film, you can't go in. When you write the program you can imagine yourself selling tickets and deciding whether or not people can come in.

Level 4 is quite different. You have to let go of how you would do a task and try to think how you could make a computer do it. Sorting is a classic example of this. If you gave me 20 numbers to put in descending order I'd be able to do it, but I'd not really be able to tell you how I did it. To write a program to sort 20 numbers you would make it do the task in a way that a human never would (for example bubble sort). This is the hardest part of programming. Up until you hit level 4 you can think you are doing very well. Ifs and loops make sense, as do variables. And you've even written the odd program. And then wham, you suddenly find that you can't do it. And I mean really can't do it. This can be very painful and demoralising.

Today I did a tutorial with the students where we explored the transition from level 3 to 4. The best advice I have on this matter is not to stress if the penny doesn't drop first, second or third time. Don't think of it as a technical problem (I must re-read my notes so that I understand arrays better) but think of it as a "way of thinking problem".

Work with what you know a program can do (stash things in arrays, get them back, work through elements, compare values and do things with them etc) and then try to figure out how these abilities can be used to solve the problem.

Consider lots of related problems: find the biggest item in an array, find the smallest in an array, count how many times the value three appears in an array etc etc and notice how fundamental behaviours (working through the elements of the array in sequence) can be used to solve a whole class of problems. Don't worry if your answers seem complicated to you. You get better with practice, and some things are just tricky to do.

I learned to program a long time ago, but I still remember the worry of "What if I don't get this bit" every now and then. Your best bet is to start early, find friends to discus it with and keep the focus on what you are trying to do. And you'll be fine.

Hull and East Yorkshire Digital Awards at C4DI

Now, that's what I call a well set table....

Now, that's what I call a well set table....

I was very lucky to be invited along to the Hull and East Yorkshire Digital Awards tonight. Actually we went in mob-handed, with bunch of University folks and a whole heap of nominations for people who work in the same place I work.

Adam from Betajester on the big screen...

Adam from Betajester on the big screen...

Adam from Betajester was up for one of the awards which was nice. He didn't quite end up winning it, kudos to him for making it to the glittering final though. We're well proud of you sir as we are of the folks from Lab on a Chip,  Seed Software, Arc software, Vertual and a host of others from the campus. You can find out more about the Hull University success here.

Rory Cellan-Jones announcing winners

Rory Cellan-Jones announcing winners

We had the BBC Technical Correspondent along to run the show, accompanied by his boss, the chairman of the BBC, which was kind of awesome. It was unfortunate that Martha Lane-Stewart was unable to get to the event because she was unwell, it would have been lovely to have heard from her. But we had some great technical chat (favourite fun fact - a third of the optical fibre in England is in Hull - providing high speed data links to homes and businesses) a question and answer session and a quiz which our table very nearly won. If only I'd known that Linked-In was started before Myspace.....

Anyhoo, we staggered out into the night way past my bedtime and went home after an evening of good food and good company, awestruck but the new C4DI premises which hosted the event and were opened today.

I'm looking forward to taking a proper look around the new building sometime soon. In daylight. The future is going to be a very interesting place.

Arduino Kits Going Live

So a couple of weeks ago I got the go-ahead to buy some Arduino kits for our Second Year embedded course. We have been using the Arduino robots and they are nice enough, but a bit too closed for my liking. So I went on-line and tracked down a lovely little Sintron kit on ebay. Twenty Five pounds for loads of bits and bobs.

Tomorrow I'm dishing out the hardware along with a bunch of little plastic bags and a page of sticky labels. Job one will be to use the chart above to put all the components in labeled bags so that we can find stuff later. Job two will be to get some lights flashing and buttons being pressed.

Exciting times.  

Rob on the Road

Every now and then the department lets me go out on the road and do the odd talk. Perhaps I could have phrased that better.....

Anyhoo, I'll be treading the boards in a couple of conferences later this year. I'm not saying you have to go just because I'm presenting but......

On the 11th November I'm doing a session at Future Decoded in London. This will be all about my little programming framework called SNAPS. How I built it, what it does, and why it is such a wonderful companion to a Raspberry Pi running Windows 10.

SNAPS is a big part of my forthcoming new programming text (I just have to write the first three books first - ho ho) and I'm really looking forward to showing it off.

In December I'm heading over to Mons in Belgium to do a session at Dev Day 2015. Again the focus will be on SNAPS, but this time I'm going to take a peek under the hood and explain how you can use some SNAPS implementation magic to help make better Windows apps of your own. And there will be cheese. It's a promise.

Games and Learning

On the face of it the video games Animal Crossing Happy Home Designer and Sunset Overdrive don't appear to have a lot in common. But in one respect they are quite similar. Both make complex demands of their players. Games now have to deal with the fact that rich, complicated gameplay makes it necessary for the player to know stuff.

When I played Sunset Overdrive a while back I was impressed with the design of the tutorial levels and the lengths that the game went to as it made sure you new what all the weapons did and how and where to use them. There was also a well managed introduction to the overall plot and the characters. Playing Happy Home Designer (a fun little title as it turns out) I had a very similar experience. As a player you have to learn how to work in the various design scenarios and this is very well introduced into the narrative.The game even has a cash based system that you can use to learn more things in order to unlock new abilities.

People have been going on about game based learning for years. It's interesting to see that the game makers are getting good at putting the learning into their games too.

Lego Dimensions Fun and Games

I'm a sucker for Lego stuff. I've got a Lego VIP card and everything. I've always liked their computer games too. I've got very fond memories of playing Lego Star Wars on the Xbox 360 with number one daughter. We worked through most of the campaign together and when we got to a difficult bit she'd unplug her controller so that her dad could take over and sort things out. Happy days.

When Lego Dimensions came out it was just a matter of time before I got a copy. The cynical part of me noted how clever it was for them to give you some Lego to build during the inevitable enormous download you have to perform whenever you install a new game these days, but we started playing while the update was being fetched and it worked fine. When the update was finished we just installed it and continued playing.

I've had a go with figure based games before. I had quite a bit of fun with the Disney offering a while back. But the Lego one has a few clever twists. For a start you have to build the character figures themselves which is always fun. There's a little platform that you plug into the console so that the game can tell which playing pieces you are using, but you can put more figures on this than you can with the other games. They've also incorporated the platform into the game in some rather neat ways. To solve some puzzles you have to move people and vehicles around a bit, which is rather neat.

We got the Portal add on as well, which is great fun although we weren't sure what we had to do to complete it.

If you like Lego games you'll like Lego Dimensions. The gameplay is as solid as previous versions with a similar mix of shooting, puzzles and building. The characterisation is great too. The voice acting for the characters is spot on and the script is very funny. There is some nice banter between Batman and Dr. Who in amongst the set pieces.

It looks like it could be a serious drain on the purse though. We kept finding things that we couldn't do because we lacked a character with the appropriate skills. We could of course solve this by going and buying the requisite person, but the sheer variety of items and people makes completeness a very expensive proposition.

But if you can stand the cost, I don't think you'll be disappointed.

Hull Fair in the Golden Hour

Photographers talk of "The Golden Hour". This is the hour around sunrise and sunset when the light from the sun is scattered just so and you get some nice lighting effects. It's not really an hour, and it varies from day to day and where you are on the planet, but if you are going to take pictures of Hull Fair I recommend trying to arrive around 6:00 in the evening when, if the weather is right, you can get a little bit of golden hour goodness.

We went on Wednesday and headed straight for the big wheel. Which this year was really big. I had my fisheye lens for the maximum coverage of the scene and I'm also playing with a plug-in filter for LightRoom (the program I use to import and manage my photos) that converts the fish-eye view into something like a normal wide angle. I'm quite pleased with the results.

Suits and Cyber Security

I've taken to wearing suits at work. This is new sartorial direction for me and is based on my careful observations of fashion trends over the last few years and the realisation that I seem to have bought a bunch of suits recently I really should get some wear from. There is no truth in the rumour that I'm trying to appear more grown up and knowledgeable.

Although if there was, you might think it was working. I was called in to Radio Humberside this morning to make some comments about cyber security and my performance, and probably my suit, resulted in me be called back to appear on local TV talking about the same subject, which was rather nice. If I ever get around to wearing a tie I could probably take over the universe....

Anyhoo, during the TV spot (thanks to Tolu Adeoye for being so patient) I was asked for the three things pieces of advice that I'd give to people worried about being caught up by cyber crime. I thought I'd put them here too:

  1. If someone is on the phone telling you that your bank account/paypal account/home computer/coffee machine is under attack and you need to do something, take time out to double check. These people use a trick where they keep the phone line open during their call to you, and so you think you are using your phone to ring out but you are still talking to them. Use a different phone, go on the web, even walk around to the bank branch and double check.  Ask your neighbor to make the call, or use their phone to call the number on the back of your bank card.
  2. Make sure that you protect your identity online. Pick passwords that are personal to you, but hard for others to guess. Run words together. Something like "HullIsWhereILove" would be pretty hard for someone to guess, particularly if you change one or two of the characters for a digit and make "HulliswhereIl0v3".
  3. Keep your computer up to date. Make sure that you install all the latest software patches when they are released and that you have some kind of software protection .The Windows Defender package that is part of Windows is a good starting point, and will serve you well as long as you are careful.

Code Club Rather Useful Seminar

We had Linda Broughton come to see us today and deliver a Rather Useful Seminar about Code Club. Code Club is an awesome non-profit organisation with the aim of getting more kids into coding. Linda pointed out that this is not just so that they can go into computing (although that would be nice), but it is also because knowledge of code makes you a more effective person. Pretty much everything around us is powered by programs and knowledge of how they are made to work is very useful.

Just before the session started I was a bit concerned as we only had five people in the lecture theatre. But I needn't have worried. Everyone was waiting patiently outside the theatre waiting to come in. We had loads of folks wanting to get involved and so I'm now going to sort out another meeting to make up some teams and match them up with some local schools. I was particularly pleased to see lots of students from the First Year turn up.  

The great thing about Code Club is that they do all the hard work before you even turn up at the school. They'll  give you the content  you need to work with the 9-11 year olds that will be waiting for you. The sessions last an hour or so. The kids who are there have specifically asked to turn up after school and take part and you also work with a teacher from the school. Linda says it works great if a team of three or four are assigned to a given school. That way you can go in "mob handed" to help and don't need to worry if have to miss the odd week due to other commitments.

The first step to getting involved is to sign up on their web site and then register as a STEM Ambassador. Being a STEM ambassador is a great way to get involved in promoting science and technology and it also provides you with a route to a DBS check, which you'll need to work in schools. You can find out more here

 

Sorry is the New Black

22070386526_f4cecf966f_z.jpg

I think the marketing people have discovered the apology as the latest tool to get you to engage with them. I've recently had quite a few companies getting in touch and apologising for not having been in touch with enticing offers. Ebay recently apologised profusely for something that I don't remember them doing and offered a special discount to make things up. Which I'm sorry to say I haven't used.

Robot Recovery

Last Wednesday my balancing robot kind of overbalanced, leapt off the desk and shattered on the floor. You can see the awful damage here. At the time I said that all I'd have to do is design some replacement parts, print them out,  and I'd have him back on his wheels again.

So I have.

Robot Plates.PNG

These are the FreeCad designs for the two plates that were broken. I did some careful measurement, wrote some Python to do the designs (it's a strange way to work, but I like it) and then printed them out and put everything back together. And it all works, which is nice. I think the new pieces are quite a bit stronger than the old ones. And if they break, I can just change one value in the program, run it again and print out some thicker ones..

V. Busy Open Day

On the way out of the carpark I found this leaf on the ground.

On the way out of the carpark I found this leaf on the ground.

We had our first University Open Day of the new academic year today. The place was mad busy and it was nice to see everybody having a good time in the sunshine. I did two talks. I promised to put the pictures up on my world famous (in my world) blog, so here they are.

This is the first cohort being told what to do by Mike

This is the first cohort being told what to do by Mike

..and this is the second, slightly smaller, one.

..and this is the second, slightly smaller, one.


Japanese Vending Machines are Awesome

I'm trying to keep posts that start "When I was in Japan.." to a maximum of one a week. But anyway....

When I was in Japan one of the things that struck me was just how awesome their vending machines are. I'd heard about them before I went, but nothing prepared me for the sheer number of machines. They are everywhere. And you can buy most things from them - including the awesome "Boss Coffee" for less than 200 yen (just over a pound or so). In fact one of the rules of Happy Japan travelling" is to have a pocket full of massively useful 100 yen coins at all times.

The machines seem to always work and never run out of stock. Amazing stuff.

These machines are also ubiquitous. They sell plastic balls containing all kinds of diversions, from superhero models to rear-view mirrors for your desktop. Awesome.

I want a Surface Book, but I'll settle for a Surface Pro 4 Keyboard for now

I watched the Microsoft Devices event on Tuesday expecting some nice stuff. And there was. The new Surface Pro 4 looks like a nice evolution, as does the Microsoft Band. I can't afford a HoloLens and I don't live in the USA, so I'm afraid that's the end of that dream for now.

And then came the Surface Book. I so want one of these. I'd even sell a camera to get one (and I probably will). The way I see it, you get a Surface Pro and a MacBook for the price of one. And the hinge and the docking stuff looks awesome. We've not got a delivery date for the Surface Book in the UK just yet (sad face) but we do have delivery dates for Surface Pro 4 and all of its accessories. So I've placed an order for a Surface Pro 4 keyboard. It will work with my Surface Pro 3, and might even help me convince people I've bought a Surface Pro 4. My blue keyboard still works OK, but the new version has a proper glass touchpad and the reviews all say that the new individual keys have better travel and separation, which is nice.

The only piece of bad news is that the versions of the keyboard sold outside the USA will not have the rather useful fingerprint sensor, which is a bit sad. The new keyboard is the same price as the one it replaces, and I'm getting a bit tired of blue, so I've gone for the nice bright one you can see above.

One other thing, if you have a Surface Pro 3, the new Surface Dock is now also available for pre-order in the UK. This works with Surface Pro 3 and provides a really good selection of ports, including two monitor outputs which is really interesting. I've not ordered one yet though, I'm saving up for that Surface Book....

Suicidal Robots at the Rather Useful Seminar

I did the first Rather Useful Seminar of the semester today. Thanks for turning up and being a great audience folks. I was talking about the joys of just "Making Stuff". We had various flavours of coloured lights, the ThingOMatic and my balancing robot. Which promptly leapt off the desk and smashed itself on the floor.

21835847508_f7ed5b56ae_z.jpg

As I said at the time, "If only I had some kind of device which I could use to 3D printa new part to replace the broken one...". In the next couple of days I'll knock out a design and then get Una to print a new chassis. Only stronger.