I said to Emily yesterday that if the weather is nice on Sunday we'd probably head for Hornsea.
It is and we did. Of course I took the camera.
I said to Emily yesterday that if the weather is nice on Sunday we'd probably head for Hornsea.
It is and we did. Of course I took the camera.
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.
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.
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.
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.
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.
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.
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.
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.
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:
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.
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()
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'
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:
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:
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.
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)"
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.
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 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.
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.
Last night we had a Developer Meetup at C4DI. I really like these, they give you a chance to find out what other folks do with their computers.
First up was Jon Polling, speaking on behalf of the Ruby programming language. I didn't know much about Ruby, but I know quite a bit more now. It looks like a great way to build applications, particularly the way that you can reuse code by importing Ruby "gems" that have been written by other folk. It looks like it would be perfect for writing server based stuff, although there are also toolkits for Android and ios. The syntax of the language looks interesting too, the way that you can integrate frameworks was very impressive. For me personally it looks like a solution to a problem I don't have at the moment, but if I ever have to write a hosted solution I'll be taking a closer look.
Next up was Steve Bowman talking about Continuous Integration. This was another very interesting talk. To understand what it was about you have to first think about how people write software.
If there are several people working together they will have central code repository which holds the latest version of all the code being written. If Ethel wants to work on the menu system she will check out the code for that module, make some changes, test them, and then check her code back in again.
Every now and then a complete new version of the system is built from the code and tested. Sometimes this build process or one of the tests will fail and "break the build". Breaking the build by checking in dodgy code is seen as a bad thing, and usually involves the guilty person having to buy everyone donuts for the next week.
The problem with this model is that there can be quite a delay between the breaking changes being checked in and the fault being detected. If you only build a new version every day or so it can take a while to notice that something is broken and if there have been a large number of changes in that time it can take a while to figure out the cause of the problem.
Continuous integration involves you having a build server which is constantly scanning your code base for changes, rebuilding your solution and testing each time new content arrives. Faulty code is detected very quickly, the person checking in the faulty code (along with the rest of the team) will get an error report within minutes.
Steve gave a demonstration of the system in action, and explained that the build server doesn't have to be one of your own computers, you can actually do all your building in the cloud by renting some space and spinning your own build server there. This also allows the build process to scale if you have a very large system and lots of developers.
Apparently people like Google, Amazon and Facebook do this kind of thing a lot. It is common practice to create and even deploy their latest code with bits of the user interface "switched off". Then, when all your tests in the field turn out OK you can switch on the new features.
You can get started with Continuous Integration for free. Steve recommended the TeamCity platform which is free for up to 20 projects. He also made the point that the approach works very well even for an individual developer. It looks very interesting, I think I'll have a go with this.
The third talk of the evening was by John Connolly. This was all about the awesome work that is going on between C4DI and Hull City Council. For me this was a follow on from a Meetup in 2012 when Adam Jennison and Benjamin Welby talked about plans to make available the huge amounts of data held by the council. It seems that things have moved on a bit since them. C4DI and the Council are now working together on the "City Engine" which will provide a central point of access to all this lovely data. We are so going to have to run some hackathons with this stuff, stay tuned for a proper Three Thing Thing event built around making the most of open data.
Finally Mike said a quick word about our Hardware Meetup next week. We are going to be firing up some Arduinos and seeing what we can do with them. Stay tuned for more details.
To me this all looks like the "Perfect Storm of Fun". We've got C4DI and Platform Expo providing a great environment for startups from games to data mining. We've got Hull City of Culture in 2017 to aim at, with the potential for all kinds of interesting things, and we've got the council making available tons of data to that can be combined to make ground breaking applications and services. Truly a very interesting time to be in Hull.
This year for the 08120 Programming 2 course I'm providing two coursework options. The first, as chosen by a SurveyMonkey poll, is to create a management system for the "Banjos4Hire", the only banjo hire shop in the country. The second option is a game with the title "Alien Banjo Attackers from Space". The gameplay will involve shooting musical notes at invading banjos whilst avoiding the "strum of death". I mentioned on Twitter that I could use some artwork for the game and I got this sent through from Orb 12.
We had another Open Day today. A slightly more select gathering than the last jam-packed one. I showed off my Windows Phone remote controlled coloured light to good effect, and then I went on to mention to folks that, for some reason, I had bought one of these:
It is a whacking great big display panel, like the ones you see on the side of buildings. It is 7.5 inches across and contains 1,024 RGB leds in a 32x32 matrix. I've been playing with light panels for a while, and this one is awesome.
The only snag is that, unlike the Adafruit Neopixel devices that I'm familiar with, on this one the led's don't remember the colour they've been asked to display. The computer controlling the panel must constantly light rows of leds in turn. repeatedly switching them to the required colour for a while before moving on to the next. If you do this fast enough you get the appearance of a steady image. This is hard work for the controlling computer, one panel would pretty much tie up an Ardunio completely. But the good news is that there are a couple of really interesting controller chips that I've been looking for a reason to play with which should be able to drive this, and more, panels.
First up is the Parallax Propellor, which should give me eight parallel processor cores, one of which should be able to drive a single panel. I've found a device on eBay and I'm looking forward to having a play when it arrives.
The other (and much more interesting) device is brand shiny new. It is from XMOS, a company in Cambridge, and builds on expertise from ARM and Transputer to deliver a multi-cored device which has as its focus high performance, zero latency and total determinacy. In other words you can be sure that you will get processing power when you need it, and you can be absolutely sure how long something will take to complete. This, coupled with the raw power that is on offer would seem to make it perfect for driving these panels.
You can pick up development kits (with a processor, some inputs and outputs and access to the hardware) for around ten pounds from Farnell in the UK. The board looks quite spiffy and if you are into embedded you really should get one to play with I reckon. The XMOS web site makes it really easy to buy the board if you are in the USA, but the UK links are more tricky to track down. You can find it on the Farnell site here.
The funny thing is that I mentioned my ongoing obsession with bright coloured lights and this was seen to be a good thing by folks present at the open day. My ultimate plan, a coffee table with four of these panels in the surface, was actually lauded as a good idea. We shall see.....
I've been looking at little headphone amplifiers for a while. These are things that do a better job at driving your 'phones than the overworked, made for a price, components you find in most things with headphone outputs. To be fair, the output of my Lovely Lumia 1520 sounds splendid, particularly if I plug it into an amplifier, but as someone with pretensions to High Fidelity (tm), I thought that a little extra amplification might make things even better.
And then I found this on Tindie. I think I'm becoming addicted to Tindie, in that they have lovely stuff and buying from all over the world is very easy. Apart from the pesky import duty thing of course.
I must admit that the packaging had me won over before I looked into the quality of the electronics. The device is packed into an Altoids tin (you can choose your design) and the board is beautifully made and assembled. The total price, including import duty, is well less than a video game, and listening tests have revealed (at least to my ears) a more solid bass and clearer midrange to the sound.
If you are into sound quality, want a bit more volume to your music, or like the idea of having a tin packaged gadget like this, then I reckon they are well worth the money.
I found out something kind of interesting today. Turns out that if you print things which are 1 mm above the print surface they don't actually print very well. I'd designed a little plastic lid with mounting pillars and placed them on the base, but i'd left a gap of 1 mm underneath the pillars, so the poor printer tried to print them in the air, with "hilarious" consequences.
Thinking about this, it would be great if the design programs displayed shadows because if I'd seen the gap underneath the pillars I could have fixed it straight away.
I was going to have a play with Tearaway for the PS Vita today. I picked up a cheap copy yesterday. But since I seem to have lost the charger and the magic Vita cable that it uses, I'm going to have to wait a bit. Oh well.
I'm quite a fan of pinball. Not very good at it, but quite a fan. I've payed with the Pinball Arcade program on my PS Vita, but today I got a copy for the PS 4. And it is ace. It really works well on the big screen, and the implementation of the Twilight Zone table is really, really, good. I've actually played the real table quite a lot, and the emulation is very faithful. I reckon it is slightly easier than the real deal, but that is not a bad thing as far as I'm concerned.
On a big screen the program looks very good. I'm not sure how much of the rendering power of the PS4 is actually being used by the game, but it looks very good with faithful reflections of the table design in the ball is it whizzes around,and no hint of slowdown when you get some multiball action.
The only criticism I can make is that the game sound effects don't sound very good through "proper" speakers. This is more to do with their origins as eight bit samples I suppose, but it does detract a bit from the game. I think a bit of judicious filtering on them to remove the slightly rough sound might be a help.
But if you are into pinball, and want to try out loads of tables and get something very close to a real experience, then this is a really good bet.
In case you were wondering, this is what creativity looks like. At least in my part of the house....
Just found this in Word 2013. I wonder how it did that?
This is the audience from today. You can see that they are all budding students, as the lecture room has filled up from the back...
We had another great audience for the Open Day today. Lots of good questions, free food and drink, and of course we gave away a Raspberry Pi to one lucky winner.
One thing did come out of discussions though and I thought I'd clarify it here. I put a lot of emphasis on programming in the introductory talk that I do. I see this as reasonable, because a lot of Computer Science is the business of telling the computer what to do, and programming is all about that.
But what I didn't make clear is that you don't need to be able to program before you start our course. We teach you everything from first principles (and in fact the Yellow Book is written that way) and so if you have never programmed before you don't need to worry.
One of the best parts of my job is saying to students "You must have been coding for a while" and having them reply "No, I only started learning in September..."
Thought for the Dazed
I used to be indecisive. But now I'm not so sure..