John Connelly Talks Hull City Plan

Today we had a Rather Useful Seminar from John Connelly of C4DI. He came along and told us about the exciting developments centered around the Hull City Plan. I wish more students had been around to hear all about it. As it is, there are lots of interesting things coming along soon, including a "Three Thing Thing" application development hackathon that we are going to run based on data that the City Plan is making available. 

I reckon everyone who is interested in getting and using data from the area should sign up and get involved. There are lots of problems that are well worthy of an attack based on big data and novel solutions. You can sign up to be kept informed of the plans here

Get a Multimeter. Preferably with a needle...

If you are at all serious about electronics you probably need to get a multimeter. This is a thing that lets you measure electrical items of various kinds, voltage, current and resistance. I got my first one a very long time ago. In fact, they were quite expensive and I actually ended up buying the bits and putting my own box around the thing. 

Nowadays you can get them very cheaply, and they tend to be digital. They show their readings as numbers. This is fine, but I much prefer one with a needle, like the one above. With a needle it is easy to see if something has just gone up or down. With digits you have to start comparing numbers. Most of the time when I'm testing a circuit I'm really checking to see if something is there or not and I don't really need an accurate value.

I thought you couldn't get cheap multimeters with needles on them, but it turns out I was wrong. You can get the above for less than five pounds from here. So I did. It works well enough and I'm already finding it useful to have around the office.

One important note though. As you can see above the dial has settings that indicate that the meter can read up to 1,000 volts. This is true enough, but you really, and I mean really should not be poking those kinds of probes into signals at that level, on account of a mistake making you suddenly, and electrically, not alive any more. For battery voltages and things like embedded controllers its fine, and it can also measure resistance.  But for high voltages I'd suggest you look at much higher specification tools that will have better insulated cables and probes.

Rather Useful Seminars. Please Come Along

RatherUsefulSeminarLogo500.png

Last week our Rather Useful Seminar was a bit quiet.

Sad face.

I really want a good turnout for the one on Wednesday though. It should be very interesting, with John Connelly from C4DI coming along to talk about great plans for Hull as a digital city, followed by the "Rob and Dave" show, all about job finding technique. 

Find out more here: http://www.ratherusefulseminars.com/

Getting Started with Titanfall

I

I started playing with my copy of Titanfall today. Great fun, except for the way that the first skill you seem to have to pick up if you want to pilot a giant killing machine is running sideways on walls, something that I turned out to be spectacularly bad at. However, once I'd got past that obstacle and done my training missions (I found these fairly easy, which was pleasing) it was time for tea, and so I've not actually got into the game bit yet.

But the whole setup looks really, really great fun. Number one son got a copy over the weekend (and an Xbox One to play it on) and I'm looking forward to a few evenings walking a long way behind him watching him kill everything and pick up all the bonuses while I die for no good reason. Just like old days playing Halo together. 

Bristol Lumia Photo Challenge

I was in Bristol today. Very nice it was too. I'd taken my big posh camera and of course my Lovely Lumia 1520. Two of the pictures above were taken by the big posh camera and each is made out of three exposure HDR merges that have been quite heavily re-processed to get the best out of them. One of the pictures comes from my Lumia 1520, loaded from the raw image and given the tiniest amount of adjustment. 

Can you tell which is which? 

You'll Like Girls Like Robots

Girls Like Robots is a neat puzzle game for Windows Phone. It starts simply enough, making sure that girls get to sit next to robots rather than geeks, but as the number of protagonists increases and the arrangements change it can get a lot more head scratchingly difficult. 

The presentation and the background music are fine and dandy too. It is now down to 79 pence in the UK store. I paid quite a bit more for the game and considered it good value, at that price for such a well presented and well realised game it is a bit of a steal. 

An Ultimaker 2 in the Department

I've had my Ultimaker printer for nearly two years now. It was around now in 2012 that I ordered it, and the kit took around 6 weeks to arrive as they were very popular.

I've had a lot of fun with Una the Ultimaker. I've replaced her drive mechanism, print head, pulleys and print bed supports and added end caps and a bunch of other things. And I've printed one or two items as well. I like Una very much and most of the time she rewards me with good looking output.

Mr. Burns seems to approve

Mr. Burns seems to approve

This week our departmental 3D printer arrived. They asked me what to get and of course I said we should get an Ultimaker. But I suggested we get an Ultimaker 2 as this is pre-built and looks to have moved the field on a bit. It took around 6 weeks to arrive as they are very popular, so some things haven't changed I suppose.

I set the new printer up in my office and had it working within half an hour or so of opening the box. It is fundamentally the same as Una, but is much more of an appliance.  It has lost a lot of the "home spun charm" of the original, but replaced this with a slickness that would make it much more viable as a printer that you get because you want to print stuff, rather than tinker with the printer itself.

Some design changes took me by surprise. You now set things like print temperature on the printer rather than in the slicing program. This actually makes a lot of sense, in that you will need to customise your printing for different kinds of fibre and you don't want to re-slice the model every time. The integration with Cura, the program that converts your designs ready for printing, is impressive and once I'd fed the fibre into the machine (the only tricky part of the setup) I was turning out prints that were at least as good as ones from Una. The only real problem for me was that the heated bed was set to a temperature which was much higher than it should be for the PLA plastic I was printing. I turned the temperature down to 60 degrees and things got a lot better. 

I do miss the sense of control that I have with Una. The print display on the Ultimaker 2 just tells you how much time is left on the print, rather than the other useful metrics that I get. However I'd be much happier leaving the new one to print on its own, something that I'm not keen to do with my printer. 

One major improvement with the Ultimaker 2 is the fan arrangement around the print head, which blows cooling air from both sides onto the object being printed, so that there is a better chance of the next print layer being put down onto solid plastic.

I really liked this, so I had a look around to see if I could find something similar for Una. I found this design and so tonight I spent a happy couple of hours installing some new fan ducts along with a pair of very posh fans that are completely silent in operation. I reckon this has made quite a difference to the printed output, the definition on both sides of my owl test piece is now much better than before. Previously the right hand side of the owl face was a bit of a mess because it faces away from the fan. Now things are a lot more symmetrical. 

The next step is to change the fan arrangement on Una to make her a bit quieter. The Ultimaker 2 is very quiet in operation and I want to get rid of the rattling fan that was supplied as part of my kit, and seems to be rattling even more now.

If you want to get a printer that represents state of the art in FDM (Fused Deposition Modelling) printing then I reckon you'll do well with the Ultimaker 2. It produced some of the best prints I've ever seen right out of the box and is a very well presented package. 

The Power of the Poster

We had a Rather Useful Seminar today. Or rather we didn't. I'd sent around emails, blogged about the event and even tweeted. So I thought I was well covered for publicity.

But I hadn't put put up any posters, which turned out to be my undoing as hardly anybody turned up. Oh well. Lesson learned.

I've re-scheduled the event and put up posters. It is now after the talk by John Connelly of C4DI who is coming in next week to give an overview of the digital city plans for Hull.

You. Really. Should. Attend.

This is all part of the lead up to the conference at the start of April. You haven't heard? It's on the poster. You can find out more and sign up here.

Python Wrestling Time Out

PyScripter.PNG

We had our last "Wrestling with Python" event today. For the last six weeks or so we've been teaching teachers how to write Pythong programs. It's been great fun, although as a class they are a bit badly behaved, and I have had to shout at them once or twice to be quiet......

Anyhoo, today everyone who came along got completion certificates and went away happy. Or at least I hope they did. |f you want to find out what we were up to you can download the slides and the lab notes from here.

One of the things that we mentioned was PyScripter. This is a great tool for Python development on the PC. You can navigate your source code and it provides debugging support too. You can put breakpoints into the program, single step through the code and view the contents of variables. It is a free download and makes you into a much more effective developer.  Well worth a look. 

We have some plans for Python games in schools a bit later in the year. It's going to be great fun. 

Stand Up on Friday 21st March

I've mentioned this before, but it is getting closer now.  On Friday 21st of March I'm doing some stand up comedy as part of the Geeks vs. Nerds. You can buy tickets here or on the door. Tickets will also be sold in the Students Union on the Hull University Campus every Thursday and Friday at 12-2pm.

I know my name is not actually on the poster. Maybe next time.....

Update: Unfortunately it looks like the event has been cancelled. I'm very sorry about this. Anyone who has bought tickets can get refunds, go to the site for details. The good news is that I hadn't got around to hiring the clown costume so no money lost.....

Cheque Mate. And Open Day

I was in the bank paying in a cheque  this morning. Ages ago I wrote some stuff about Learning to Program a PIC in C and last week I got what will probably be the last royalty payment as the plan is to open up the content and make it freely available. I'll let you all know when it is released.

Anyhoo I was stood at the machine and looking baffled, as only I can do, and this nice assistant ended up having to come over and point out that the "Payments and Transfers" button was the one you press to pay a cheque in.  Which I found most confusing. Why can't it just be have "PAY IN A CHEQUE" written on it in large friendly letters.

I was thinking about this before I did my talk to the Open Day crowd. They were expecting to hear from someone who is versed in the latest technology and able to bend all machines to his will. Oh well.

Return of the Rather Useful Seminars

RatherUsefulSeminarLogo500.png

We are back with a sequence of presentations that are tailored at the professional world. All the presentations are at the same time as usual, 1:15 on Wednesday, but the venue has shifted to Lecture Theatre A on the ground floor, underneath LTD.

March 12th : Personal Presentation – Rob Miles and David Grey

This seminar is a lead in to our Careers and Internships Conference on April 2nd. The event is aimed at any students who are interested in internship and employment opportunities. We've got a lot of employers who are really keen to meet up with students to discuss ways forward.

For the conference  we expect everyone to be suited up and looking their best. In this session Rob and David will run through tips and tricks to look good in these situations and how to present yourself to the max.

You can sign up for the conference (free business cards, info-pack and mug) at this seminar too. 

March 19th : Open Data in Hull – The City Engine – John Connelly C4DI

Turns out that Hull is a really exciting place to be just at the moment. With the interest in the area generated by the successful City of Culture bid, high performance fibre optic networking, new startup incubators and lots of other things coming together the future is very interesting. One fascinating local development is the ongoing availability of lots of local information from Hull City Council. This has the potential to drive lots of new and innovative application ideas. 

John Connelly has been intimately involved with this huge project and will be talking about how the data is becoming available and how you can get involved. We are planning to run a "Three Thing Thing" competition at the very end of this semester where we will be turning everyone loose on data feeds to see what they can come up with.

March 26th : BBC iPlayer and the Video Factory - Phil Cluff BBC

We love it when our ex students come back and tell us what they have been up to. Phil Cluff graduated a few years ago and is now Principal Software Engineer & Team Lead, FM Media Services at the BBC. If you want to find out how iPlayer works, how it was built and where it is going then you should come along and see. 

April 2nd :  Careers and Internships Conference

This is not a Rather Useful Seminar. But we hope it will be more than just Rather Useful. Especially if you are looking for an internship or a job at some point in your future. You might not know this, but Hull turns out to be quite a hotbed of digital based companies who have a healthy appetite for bright young minds. The aim of the conference is to put these two together and get some sparks flying.

If you are looking at the upcoming summer and thinking it might be good to get something lucrative going in the form of a paid internship, or you are looking at your upcoming future and wondering just what goes on in these parts, then you must, must come along. We've got loads of local employers coming along, we'll have talks on local industry and where it is going and you'll get a free bunch of business cards to pass out while you are there. And a nice ceramic mug to serve as a memento of the occasion when your life changed direction. 

This event will start at 1:00 pm on Wednesday 2nd April and run through until around 4:00 pm. We start in LTA with a keynote and presentations before moving upstairs to 312 for a mini-expo. 

Arduino Fun and Games at C4DI

We had some great fun at C4DI tonight. We were all playing with Arduinos and trying to get lights flashing, make strange buzzing noises (with a little sounder that is part of the kit) and then reading buttons and reacting to input.

C4DI turns out to be a great environment to do this kind of thing. I'm really grateful to them for letting us have access to such a well set up area. It is a great place to do little sessions like this.

I think the mood of the night was best summed up by one chap who had come along to take part. We'd given him one of the loan kits to work with and at the end of the session he handed it back in again because on the strength of the evening he was going to get a device of his own.  

The next session will be on Thursday 3rd of April at the same time, same place. I'll bring along a Mars Bar for the best thing that anyone has made. The fun will start at 6:00 with setup/show and tell, and then we'll begin the practical stuff at 6:30. 

Keep an eye on the Hull Digital Meetup calendar to register for the event. If you want to have a go at the labs you can find all the notes here

Printing Vases with Ultimaker

Some time back I found the "Spiralize" options in the Expert settings for Cura, the slicing program that I use when I'm printing with Una the Ultimaker. This lets you take a solid object and generates a print that just wraps a single layer print round the outside of the object.

It is called "Spiralize" because the print ends up being one long spiral, with the head laying down successive layers as it goes round and round in circles. The print that you get is very thin, rather like a lampshade, but if you use translucent materials (like the  nice transparent fibre from Faberdashery) the results are rather good. 

Python Constructor Trickery

We are still doing our Python evening courses. Today we are learning more about classes. Which seems appropriate for teachers. We have been looking at how to create and manage data in program objects.

It turns out that Python is very laissez-faire when it comes to object construction (just like it is about most things). As a stalwart C# developer I find this all a bit scary. In C# you have to tell the compiler everything about the design of an object that you might like to create. In other words:

class Player

{

public string Name;

public int Score;

}

This is a C# class that I could create to hold details of a player of a game (perhaps golf or cricket). Each instance of the class will hold the name of the player and their score.  The C# compiler has been told to store a string in the Name property and an integer in the Score. So I can create objects that represent the fact that "Fred" has scored 100 runs, or whatever. And C# will make sure that the value of Name is only ever a string and the value of Score is only ever an integer. I like this a lot. It means that it is very hard for me to get my name and score storage into a mess. If I try to store a string where a number should be, for example put the value "Twenty Five" into the Score property,  then my program won't even get to run. 

In Python you can add things to any object at any time and the system pays no attention to the type of the values until a wheel comes off during program execution. 

class Player:

def writeMessage(self):

print('Nobody here but us chickens')

This Python code defines a Player class that just contains a single method that prints the message 'Nobody here but us chickens' when it is called. Fair enough, but not terribly useful. I can create an instance of the class if I want:

p = Player()
p.writeMessage()

These two statements create an instance of the Player class (referred to by p) and then ask it to print its message. Fair enough. If I want to store data in the class I can just set some attributes, and they are added automatically when the program runs. 

p.name = 'Fred'
p.score= 99

Now my instance of Player holds a couple of attributes, the name and the score of that player. I can go on and add lots of other attributes if I like. The problem is that I could end up in a mess. Suppose that I decide to mark one particular player as the captain of the team. I can add an attribute to denote this:

p.isCaptain = True

Now I can tell which one of the players is the captain, right? Well, yes and no. But mostly no and always dangerous. I might now have a situation where only one player (the one that I have marked as captain) has the isCaptain attribute. The rest of the players in my system don't have the attribute set to false, they just don't have the attribute. This will become a problem if my program ever does something like this:

if p.isCaptain:

print('hello captain')

This statement cause the program to crash if it ever encounters a player without the isCaptain attribute. A C# program would not allow this to happen, since you would be unable to create a player that didn't have the isCaptain attribute.

Python programs are easier and quicker to write because you don't have to tell the compiler everything up front, but the penalty is that they are vulnerable to errors that C# programs can't ever have. My way of fixing this is to make a constructor method for player that allows you to set the initial values there:

class Player:

def __init__(self, name, score):

self.name = "" + name

self.score = 0 + score

self.isCaptain = False

The __init__ method (yes, there are two underscores before and after the word init) is given the name and the score values and sets them into the player. It also sets a default value for the isCaptain property. I can now construct a player and set up the attributes in one statement:

p = Player('Fred', 99)

You may be wondering why I have statements like:

self.score = 0 + score

This is the trickery bit. I'm setting the score of the player to whatever the user of my constructor sent in. They could do something stupid like:

p = Player('Fred', 'har har')

In this case the score value is being delivered as a silly string, which is not what I want. But because the constructor tries to add this parameter to the integer value 0 this means that the program will fail and stop with the message:

self.score = 0 + score
TypeError: unsupported operand type(s) for +: 'int' and 'str'

I could write extra code to check for the type and raise my own exception, but this seems somehow simpler. I'm using this in all my Python constructors now. Maybe there's a better way of doing it, but I don't care because my way works for me. 

Number one son reckons that surviving in languages like Python, which are great fun but inherently dodgy, is just a matter of coding standards. This has now become one of mine. 

Computer Science and the Hour of Code

Sunday's paper had a big section on how important it is to learn to program. I agree. There was a lot of kerfuffle a few weeks ago when Lottie Dexter, a Conservative activist hired to manage a "Year of Code" initiative, admitted that she didn't know how to write software. Lots of people got very cross about that and they got even crosser when she went on to say that you can learn how to teach programming in a day or so. 

Oh well.  I think/hope that what she meant to say was that you can learn to do something useful/fun with a program and tell someone about it in one day. And I suppose that you don't need to be an active practitioner of a field to promote it. Nobody seems to expect the head of British Airways to be a qualified pilot. 

You can watch the item on Newsnight here. For me the most unwholesome aspect of the whole interview is offhand manner of the interviewer, Jeremy Paxman, who gives the impression that learning how to instruct the machines that control our lives today is somehow beneath him and that's how it should be. Oh well again. 

Of course if Lottie Dexter had said "Learning to program is very hard, takes ages,  and you need an enormous brain to be able to be able to do it" she would have been in about the same amount of trouble. I reckon I've been learning to program for the last forty years or so, and I wouldn't put myself forward as that much of an expert. But I can get useful things done. And I know (mostly) which things are impossible to do with computers.  

For me the important thing about the whole learning to program business is that if you have a go you know what you can and can't do with computers. You get a feel for what is possible and you are motivated to have a go. And maybe you'll like doing so much that you will decide to learn a bit more....

And with that I present "Rob's Things to Do if you want to learn about computers (or indeed science and technology in general)"

  • Have a go. Go to the hour of code site and have a play.
  • Don't expect to learn everything at once. One of my favourite tweets was from someone who said "It seems to have taken me around 20 years longer than I expected to become a good programmer". It won't take you 20 years to learn how to do be useful with a computer, but just like a great concert pianist is always finding new things in pieces of music and new ways to express them, programming has a lot of art in it and you are always discovering new ways to do things. But you can't ever say you've learned all there is to know about the subject. The good news though is that you don't have to.
  • Have an aim in mind. Programming is all about making things. You can't just learn it in isolation, you have to be building something. Set out to make a silly game, a clever web page, a moving robot, a musical instrument or anything that you find fun and engaging.  I'm presently trying to make some remote controlled table lights for a wedding. I've learned about a whole new branch of embedded technology and I'm still finding out new things. I'm having a great time. And I might even make some lights by the end of it. 
  • Find friends. Working together is much more fun. You can solve problems by just explaining them to each other. Join a group. Start a group. Look for STEM ambassadors in your area and find out what is going on. 
  • Keep it simple. Get something simple working and add things to it. Don't have a huge, complicated idea and then fail to make it work. 
  • Remember it is supposed to be fun. If you start to fret about whether you can make your thing work then take a step back, change what you do, or go and listen to music or play computer games for a while and then come back and try again.

I've no idea how my life would have turned out if my school hadn't pointed me at a teletype connected to a computer all those years ago. But I'm jolly glad they did. Perhaps you should take a look too. 

Using Big Led Panels with Arduino

So last week I found these Big Led Panels at Cool Components. And today I got one working. The wiring was quite fun, pushing jumper wires into connectors.  Turns out that was the easy part though. Once I'd got the hardware connected I had to get the software working. There are a couple of libraries out there that you can just download and use. But they didn't work. 

Whenever I tried a build I got loads of messages about symbols not being present in my code. I'm not sure why, but the build process seems to search the entire library structure for include files and it found some Adafruit_GFX ones in the Robot_Control folder that caused real problems. The solution was just to remove the Robot_Control folder from the Arduino libraries folder. After that the programs built and I got some stunning displays. The picture above, even after some serious tinkerage, doesn't really do them justice. 

This is a bit better, but doesn't really capture the eye-watering brightness of the pixels. The display is quite solid, but my little Arduino Uno is going pretty much flat out just to generate the colours. There was noticeable flicker during the display updates and so I think I need something with a bit more processing grunt to get smooth animation on it.

One plan is to make a coffee table, but I've just found some 8x8 inch picture frames that I think would take a panel very nicely. So maybe I put the panels in frames and turn them into works of art. Either way, great fun is being had....

Rampage Board Game

Rampage is a deeply silly game. Each player is a monster intent on wreaking havoc on a carefully set up gameboard full of  buildings ripe for destruction and citizens ripe for eating. The game moves are great (one of them involves dropping your monster from a great height onto the population underneath), but things are  balanced so that you have to carefully manage the mayhem that you make. 

We had a go tonight and it was great fun. I really like playing board games, and this is one like nothing I've seen before. 

Return of XNA

Now here's a sight for sore eyes

Now here's a sight for sore eyes

I've mentioned this before, but I think it is worthy of mention again (since I've just done it and it works really well). If you are running later versions of Visual Studio (2010, 2012 or 2013) you can now get XNA goodness onto your machine really easily. Download the files from here and then just follow the instructions in the readme. Once you have installed the four components,  run the Visual Studio Extension file (don't do this first, that will end badly) and you can get a cornflower blue screen of your very own. 

Marvelous.