Jupiter and Static Class Members

I put some of my lectures up on YouTube last week and it was great to get a comment on one of them. Kostas was wondering why I spend so much time explaining how static works, and even dragging the Planet Jupiter into the explanation, when a memory diagram would do the job much more efficiently. 

Well, yes and no.

The problem with diagrams like these is that people think that they just have to learn the diagram to pass the exam and therefore pass the course. But I don't want them to do that. I want them to know what "static" means, and when to use it in a program.

I use Jupiter as a context because it might stick in the memory. It turns out that the planet puts out a lot of radio static and that static on the radio is kind of like an echo of the big bang. So it has always been here. Just like static members of a class. They don't need instances to exist. As long as the class exists, the static members exist. So you can use static methods to perform tasks without needing to make an instance (for example data validation) and you can use static properties to hold values that need to be stored once only for the class. 

My idea is that folks can go from Jupiter, to static, to always here, to methods and properties and they'll have a handle on what it all means and how to use it. Which I think is better than a diagram.

A Windows 10 Tablet for 35 pounds? Yes please.

I was in the embedded labs last week and the conversation turned to computers. As it is wont to do. One chap mentioned a 7inch Windows tablet they'd just picked up from ebuyer for the princely sum of thirty five quid. I was intrigued. Of course I bought one. It came in the less than deluxe packaging you can see above, but it seems to be dead ringer for the Linx tablet that I got a while back for twice that. It has 1G of RAM And 32 G of internal storage, plus an SD card slot and an HDMI output. 

For the price it is astonishing. Much is made of the amazing value offered by the Raspberry Pi, which gives you the internals of a computer for around 25 quid. This gives you the internals, plus a power supply, screen, WiFi connection and battery for only ten pounds more. It works very well too.

My plan is to use it on a robot and link it via Bluetooth to the motors and sensors. Should be fun. As I write this the tablet is happily downloading Windows 10 for its upgrade from Windows 8. If you are after an ultra-cheap but useful tablet you could do a lot worse.

Update: I apologise to anyone who doesn't use the proper coins of the realm and mistook the title of this post to refer to the weight of the tablet. Fear not. It isn't made of granite and can be lifted easily by one hand.

BJSS at Hull

BJSS are a great bunch of folks. I can say that because I've met quite a few of them. They came over to Hull from Leeds to run a programming challenge event type thing in our computer labs. With free pizza and drinks. It was excellent. They posed an interesting task and the students who came along set about solving it. Then they wandered around giving comments and advice on coding and having chats about CVs etc. 

It was great to have a professional perspective on problem solving. I even had a little go myself, until my natural laziness took over and I reverted to chatting with the BJSS folks about board games and stuff.  As you do. 

The students that came along had a great time, and any time BJSS want to come by it would be lovely to see them again. 

Programming 2 Stealth Videos

I've started recording some of the first year lectures as screencasts, Just to see how it turns out. I joked with the class that I'd only tell the people that came to the lectures where the videos are, but this is probably not very helpful. Anyhoo, you can find the first one here and I've set up a channel here for the rest.  They're a bit rough and ready, being recorded straight from the Surface using Camtasia and the built in microphone, but they might be of interest to C# students at Hull. 

I'll keep posting them for the rest of this semester. The only slight snag for me is that it takes around four hours to render each captured session so I've got to create a workflow that I can use to do this. 

Say Hello to Dit Lexaragez

I've been writing the next lab assignment for our programming course. We are creating a Bank, rather like the one in the Yellow Book.  Anyhoo, we've got as far as making some test data for the system that we are building. Demonstrations of massive account databases are all very well, but it is best if they have more than two or three accounts in them. 

It's best if all the fake accounts have different names, so I started playing with ways to make names programatically. I ended up using a method based on a very popular daytime TV show in the UK. See if you can guess the name of the show. 

My method works because names are frequently made up of the sequence “consonant – vowel –consonant” – for example “Rob”. All my method does is pick a random consonant, followed by a random vowel and then a random consonant. For longer names it just adds more vowel-consonant pairs on the end. 

static Random testRand = new Random(1);

static string vowels = "aeiou";

static string consonants = "bcdfghjklmnprstvwxz";

static string pickRandomLetter(string input)
{
    return input[testRand.Next(input.Length)].ToString();
}

static string makeTestName (int parts)
{
    string result = pickRandomLetter(consonants).ToUpper();

    for (int i=0; i < parts; i=i+1)
    {
        result = result + pickRandomLetter(vowels);
        result = result + pickRandomLetter(consonants);
    }
    return result;
}

static string makeFullTestName()
{
    return makeTestName(testRand.Next(1, 4)) + " " +
        makeTestName(testRand.Next(2, 6));
}

This is the C# that we are using for the lab. I fired it up and the first name that came out was "Dit Lexaragez" which I think is a great name. The names have a vaguely "off-planet" feel that I really like. I've suggested that people might like to fiddle with the letter sequences to modulate how much of each letter you get (you probably don't really want 'z' to appear as frequently as 't' and maybe allow some names to start and/or end with vowels.

I love it when a really simple bit of code produces really interesting behaviours. 

In the future, your TV will know where you live

I bought a little TV today. It's a "Smart" TV and rather nice. I plugged it in and did the setup thing. It started by asking for a network connection and, once connected, quizzed me about my name, address and lots of other things before doing the tuning thing and finally showing me a picture. 

I guess this is the way the world is these days. If I watch loads of DIY shows then perhaps I'll start getting emails from paint companies, or seeing adverts for orbital sanders appearing around the web pages I visit. I'm not sure if this is a good thing, or a bad thing. But it is definitely a thing.  We are going to be surrounded by lots of devices that are spying on us and sending stuff back to build up the ever growing databases that are held on each of us. 

I wonder how much of the attractively low price I paid for the TV is subsidised by cross-marketing deals that the manufacturer has in place for all this information they are planning to gather. I didn't have the nerve to select "Not agree" to any of the licence terms that I encountered on my way to BBC 1. Perhaps if I had rejected some of the conditions I'd be asked to stump up some cash to pay for me opting out and wanting a little privacy. 

I kind of hanker for the days when things where everything was dumb and nobody knew (or cared) what you were watching. Perhaps in the future you'll be able to buy a "personality" remote control that you can leave by the telly when you go out. This will select all the posh channels you'd like people to think you watch so that you can watch a few episodes of "Man vs Food" without your TV thinking ill of you. 

Admissions Afternoon with Added Pi

Thanks for being patient for the cameraman folks

Thanks for being patient for the cameraman folks

Another bumper Open Day today with loads of people coming along to see us. Thanks for coming folks, hope you enjoyed your visit. At the end of the afternoon we have a little prize draw and give away a Raspberry Pi and all the trimmings. I was asked for details of what we give away as the prizes, you can find our Prize Briefing Sheet here.

Snaps.Rocks goes live

snaps.PNG

I bought a domain name today. I do this every now and then. I say that getting a domain name is cheaper than getting a tattoo, and much easier to get rid of when you get bored with it. 

I now have snaps.rocks (it was cheap) and at the moment it points to a holding page on these hallowed pages. The latest version, with the Snaps gaming framework built in, will be going live in a few days. Such excitements. 

The Internet of Things at C4DI

Tonight I headed off to the C4DI for a developer meetup. It was nice to see a few folks I'd not met up with in a while, and even nicer to see that a few of our students had made it along to the meetup. These are really good events to get along to. You get to mix with local developers, drink free beer and see what's going on in software development. 

And you get to find out where the C4DI is, in a lovely and fast growing part of town. 

The talk was from Glynn Bird, a Developer Advocate from IBM. He gave a lovely talk about  the Internet of Things; starting with what constitutes an IoT device (a clue - it's not a clockwork gas meter) and moving on to future trends. Glynn reckoned that although IoT devices in the home sound fun- after all, who wouldn't want an internet connected kettle? - it is in the field of industry where they have the most potential.

We now have the ability to sprinkle connected sensors around any production process, from farming to nuclear power stations, and then use vast cloud based systems to crunch the resulting torrent of data. This should lead to huge improvements in the way that we do things as we use data that previously was either unavailable or discarded or just plain too hard to work with.

Glynn talked about MQTT (Message Queue Telemetry Transport), a lightweight mechanism for routing data from sensor to client and suggested some technology (node-red and CouchDB - along with CloudAnt) that look very interesting

Very thought provoking stuff, with some great discussion at the end. Glynn is a fascinating chap to listen to - and he has a very useful website too. 

There are some very interesting meetups coming down the tracks. Anyone can go along, and everyone should. Sign up here

Azure Rather Useful Seminar from Caitlin and Peter

Caitlin and Peter looking relaxed at the start

Caitlin and Peter looking relaxed at the start

Caitlin and Peter, two of our students,  gave a Rather Useful Seminar today all about Azure. I like it when students give seminars. There are a few good reasons for this:

  • students tend to know what is relevant to other students and can pitch the material accordingly
  • It's a great experience for the students to actually give a presentation to an audience
  • I don't have to do any talking, I can just sit and watch

Anyhoo, they showed us how easy it is to build a cloud based service that your program can then use, and that all this cloudy goodness is available for free via Microsoft DreamSpark

At the end of their talk I asked for a show of hands for anyone interested in learning more, and perhaps taking part in an Azure jam session in one of our labs. Pretty much every hand in the room went up. Including mine. 

So, in the next week or so we'll see about booking one of our labs for an hour or so and having a go at building a web application from scratch. Should be fun.

Thanks to Caitlin and Peter for putting Azure into context so nicely. 

Final Year Project Interim Demonstrations

The department is trying something new this year. Each of our Final Year project students is being asked to give an interim demonstration of their project to their second supervisor at around the project mid-point. The students see a lot of their first supervisor, but they don't usually see the second supervisor until later in the project, when they are involved in the final viva and the assessment.

This year I'm getting to see all the projects for which I'm second supervisor. I wasn't convinced at the start, what with the nightmare of fitting a whole new bunch of meetings into an already crowded diary, but I must admit it has been really useful. I've seen some really great work, and some that could be made great by a strong focus on the important elements.

When considering things like this I'm much more impressed by an "end to end" demonstration of a working system with "n" features than a half-way demonstration of a system with "n*2" features. If you are making a game, it should be playable all the way to the end, with a high score table and a chance to play again. If you are making a product you should be able to  run through an entire scenario of whatever transactional behaviours the product provides. If you are performing research you should have the theory, the things you are going to do to prove/disprove the theory and some outcomes to look at which drive the conclusions. And it is worth trimming the scope so that you can achieve this.  

Writers have this thing where they talk about "killing your favourite children" which means that they have to discard a great piece of text out because it doesn't actually add anything to the work. The text might be funny, or poignant or interesting - but if it doesn't fit the context it has to go.

During the meetings we were encouraging students to take a look at their projects and do something similar. This isn't to say that they should not get credit for work that doesn't end up in the finished deliverable. My advice is to write these up in the report and then document the process by which you decide to leave them out in order to focus on the core of the work. In fact, I reckon that getting a handle on your project and dropping features that will make you fail is actually strong evidence of real professional ability. And in real life you can always save these for version 2.0 anyway. 

Rob != Winner

Well, my suspicions were correct. Three minutes of unfocussed content does not a Famelab winner make. Even if you add a gadget.

I got the email today saying that I've not made the top six. I'm actually quite relieved about this. From what I saw of the entrants we have some proper science folks who are keen on presenting the subject that they are passionate about. The local final is in Hull soon. You can find out more here, and I'd advise you to go along if you can.

Ruined by Alvin and Dexter

Alvin and Dexter are an add on for the wonderful Ticket to Ride board game.  

You can use them with any version of the game. They are a thwarty type thing you can use to stop your opponents from building train lines to particular cities. 

I was kind of excited to see how they work so we had a go with them today.  And they were promptly used by everyone else to stop me from building anything and making sure that I came a really poor last place. (at least, that's what I'm telling myself)

Oh well. There's always next time...

Printing Green Cheese for 100% Students

I've been giving awards for the best performance in First Year labs and exams. Last week I gave awards to the top five or so exam scores. When it came to the practical work I had a bit of a problem, what with ten students getting 100% in the work - which is awesome by the way folks. 

Anyhoo, it means that Una the 3D printer has been busy for a large chunk of today dropping out perfectly formed pieces of green cheese for next Monday's lecture....

Research Rather Useful Seminar

Yesterday, before the excitement of FameLab, we had our first Rather Useful Seminar of the new semester. It was all about research. The thinking behind seminar was that folks don't necessarily understand what research is all about at a university.  So Darryl gave a talk about what you do.  You can find his slides here

Turns out that you can get started during your Final Year project, if you pick a project that is allied to our research efforts. Then you follow a trajectory into postgraduate study, finally emerging with a PhD. The system works, because lots of our PhD graduates are home grown Hull students. 

Darryl did a great talk, but for me the best talk was the one that followed, when one of our PhD students, John,  gave a session about  his research into the effectiveness, or not, of telemedicine technology. For me the absolute best bit was the discussion at the end, where we had all levels of the department, from First Year students all the the way to Readers in the subject discussing the best way to analyse the data and what it really meant. 

We should do more of these.