Winning Prizes with Tags of Fun

design

I’ve decided to use the Tags of Fun at our 5:15 Friday lectures. Today I took along the latest incarnation, housed in an attractively designed black and white box that is just a bit too small to hold the batteries properly.

But it worked fine. Everyone who had hung on to their tags from the welcome party was able to sign in and win prizes, in this case plastic owls and some nougat from the fair. And most of the names were right too, which was nice.

I’m going to refine the design, week on week, to expand what the reader does, and maybe make a second one that will make signing up for prizes even easier.

Above you can see the Gadgeteer configuration of the device. The printer is plugged in when I need to make labels for tags, the Bluetooth lets the device talk to my Windows Phone. By Christmas it should be an amazing system. But that might be Christmas 2020……

All the Fun of Hull Fair 2013

IMG_7840_1_2.jpg

Hull Fair is in town. We didn’t manage to make it last year, what with one thing and another and horrible weather. Today though we thought we’d go for it. I took the big camera and cunningly concealed it underneath my jacket, so that I looked like any other heavily pregnant middle aged tall bloke.

We just went on the big wheel to take pictures and then on Hook a Duck to win a teddy. Then we bought some nougat and headed off for a pie at Fudge just down the road.

IMG_7995.jpg

Indeed.

Printing the Weather Forecast in 3D

DSC02977.jpg

We had a good audience for the first Rather Useful Seminar. Some of them were fresh from a first year lecture and must have been feeling a mite peckish. But they stayed to the end and I hope they enjoyed it. The talk was very similar to the one I did last year, but there was a twist at the end, when I printed the weather forecast as a plastic object. Again, I brought along Una the Ultimaker, and again she behaved herself very well.

I’ve become quite intrigued with the idea of generating objects from software, and it occurred to me that with the FreeCad tool having a Python interpreter in it, we should be able to do something interesting. I’d no idea how to use Python to read a weather forecast but fortunately Catalin George Festila has done it here. So I took his methods which use the Yahoo weather feed and prints it out and made a few changes.

def weather_for_zip(zip_code):
    url = wurl % zip_code +'&u=c'
    dom = minidom.parse(urllib.urlopen(url))
    forecasts = []
    for node in dom.getElementsByTagNameNS(wser, 'forecast'):
        forecasts.append({
            'date': node.getAttribute('date'),
            'low': node.getAttribute('low'),
            'high': node.getAttribute('high'),
            'condition': node.getAttribute('text')
        })
    ycondition = dom.getElementsByTagNameNS(wser, 'condition')[0]
    return {
        'current_condition': ycondition.getAttribute('text'),
        'current_temp': ycondition.getAttribute('temp'),
        'forecasts': forecasts ,
        'title': dom.getElementsByTagName('title')[0].firstChild.data
    }

This is the code that he wrote that fetches the weather information from the Yahoo weather service and creates a list of objects that contain a forecast item for five days. The forecast information contains the highest temperature for each day, and that’s what I’m going to use to control the height of each of the columns that I print.

def main():
    a=weather_for_zip("UKXX0476")
    noOfReadings=5
    # find range of temperatures
    highest = float(a['forecasts'][0]['high'])
    lowest = highest
    for i in range(noOfReadings):
        v = float(a['forecasts'][i]['high'])
        if highest < v:
            highest = v
        if lowest > v:
            lowest = v
    # make some blocks 
    plinthThickness = 3.0  
    blockWidth=5.0
    blockDepth=5.0
    blockStartHeight = 5.0
    heightRange = 20.0
    rangeScale = heightRange / (highest - lowest)
    x=0.0
    y=0.0
    plinth = Part.makeBox(blockWidth*noOfReadings,blockDepth, \
        plinthThickness, Base.Vector(0,0,-plinthThickness))
    for i in range(noOfReadings):
        v = float(a['forecasts'][i]['high'])
        blockHeight = blockStartHeight + rangeScale * (v - lowest)
        block = Part.makeBox(blockWidth,blockDepth, \
            blockHeight, Base.Vector(x,y,0))
        plinth = plinth.fuse(block)
        x = x + blockWidth

    Part.show(plinth)
    Gui.SendMsgToActiveView("ViewFit")
    Gui.activeDocument().activeView().viewAxometric()

main()

The Yahoo zip code for Hull in the UK is UKXX0476. This code fetches the weather forecast data and then finds the largest and smallest temperature values (something which should be familiar to first year students). It then makes a row of five blocks, each of which has a height set by the temperature for that day. I’ve re-written it from the demonstrated code so that the coordinates make a bit more sense. The width and depth values map onto the x and y directions, with height being the z value. The code creates a little plinth and fuses a series of blocks onto the plinth. The length of each block is the temperature for that day.

forecast

 

This is the object that was produced by FreeCad. It represents the temperatures 12, 16,14, 17 and 16 degrees, which is the rather chilly forecast for the next few days. I sliced the design using Cura and then, after a bit of kerfuffle I managed to print out the temperature plot.

DSC02989.jpg

The weather forecast. And a tiny owl.
I printed it out really tiny (all of the dimension values above are in mm) but I reckon it came out quite well. I’ve since found a flaw though, in that you can’t tell which way round it is supposed to be read. Of course I could add an arrow or emboss some text to make it easier to use.

I must admit that I can’t see a huge demand for physical manifestations of the weather forecast, but I hope it brought home to folks how easy it is to grab information and turn it into something tangible. There is a lot of scope for random patterns and generating objects from mathematical formulae. And, as you can see above, it is very easy to do. I made an offer that if anyone uses Python to make an interesting object I’d be quite happy to print it out for them.

You can find the slide deck here. At the end Peter was kind enough to show some videos of his printer in action. You can find out all about the “Richmond” 3D printer at his blog here.

3,000 Followers on Twitter. Sometimes.

image

I’m pleased (and a bit surprised) to find that I now have over 3,000 followers on Twitter. I’ve been close to the magic number for a while now, but it seems that there have been a bit of un-following going on where I’m concerned (or perhaps some Twitter spam-bots have been shut down). All I can say is that this has caused my numbers to bounce around the magic figure for a few days, but now I really can say that I’ve made it past the magic number.

I wonder if I should tweet about it?

Time Travel with Windows Phone

Untitled

Apparently there are people who will believe that a software upgrade will make your phone waterproof. The “Preview for Developers” application for Windows Phone doesn’t actually turn your phone into a Tardis, but it does allow it download future versions of the Windows Phone operating system for testing. That way you can make your applications work with the latest versions of Windows Phone before they are released to the general public. It also means that you can use upcoming new features like Drive mode and application management.

Untitled

You can now terminate applications from the the App-Management screen (hold down the Back key to open this). Although why anyone would want to terminate the wonderful VoiceMusic application is a mystery to me.

Improving your University Timetable

image

This year the university is making available an electronic version of the timetable for all staff and students. It is best described as “a work in progress” because that is what it is. Lots of wonderful things are promised for the future, including Outlook integration and proper, personalised timetables. But for now it is a bit unwieldy to use.

Which is not good enough for Tom, one of our students, who has built a Python program that reads the data and then lets you display your timetable and do all the things that you’d really want to do with it. You can find out about it here.

Incidentally, I found his blog post via http://hullcompsciblogs.com/

This has a bunch of good student blogs, and if you are from Hull and starting blogging you can ask them to add yours to the syndication.

Saturday Open Day

DSC02964.jpg

First sitting

DSC02973.jpg

Second sitting

Up until now we’ve been very lucky with the weather for our open days. Not so today. The weather dial has flipped over to “horrible” and seems to be stuck there. However, we did have quite a few brave souls who made it through the wind and wet to come along to see us. I did a couple of presentations and showed off my Cubelets And why not.

Thanks to both bunch of folks for being great audiences, laughing at my jokes and even going “Wooo” when I uttered the immortal words “robmiles.com”.

Adobe Creative Cloud for Academics

image

If you are thinking of spending some money on a new camera, then welcome to the club. I’m always thinking of spending some money on a new camera. But before you buy a camera you might want to think about investing in some software to make the best of the camera you already have.

I’m a big fan of Photoshop Lightroom as a way of getting pictures out of the camera, tweaking them a bit and then managing where they are stored. It also has very good integration with Photoshop itself, along with lots of other plugins that can do lovely things with your pictures (for example Photomatix Pro for High Dynamic Range work).

Some time ago (in fact around a month and a day before a new version came out) I bought a copy of Photoshop. I’m proud to be able to say that I know what nearly a quarter of the buttons do now. But I really want the newest version, because that works best with the RAW files (images direct from the sensor) that my cameras produce.

Now you can’t really buy Photoshop any more. Instead you rent it by the month. Up until now I’ve not been that keen on that model, I much prefer owning things. However, in a world where (no – this is not  a movie trailer) new versions of cameras and software come out at least once a year, renting makes quite good sense. Particularly as they have a deal at the moment where students and academics can get pretty much all of Adobe software for around fifteen pounds a month by signing up for a Creative Cloud subscription.

People spend more than that on cigarettes, and for your money you get access to the latest versions of Photoshop, Illustrator, Acrobat Pro, Dreamweaver and lots of other things that would probably be useful if I knew what they did. The offer is open until the 27th of October. Well worth a look.

Nokia Glance Background Pictures

DSC02959.jpg 

One of the many nice things about having a Nokia phone is that it provides “glance” content. This is stuff that appears on the screen when the phone is locked. The display is not very bright and seems to have a negligible effect on battery life, but it does add a lot of value. Currently the glance content is just the time and the charge status, but hopefully over time it will extend to include missed calls and alarms, and maybe even calendar details.

However, right out of the blue, Nokia have released a beta version of a program that lets you put pictures on your glance screen. The application ships with a few pre-set pictures, including the rather nice tiger above, but you can also process your own and add them to the four that cycle round. If you have a Nokia phone that is running the GDR 2 release (this is being rolled out at the moment) then you really should grab a copy and have a play it really is rather neat. You can get the program here.

3D Printing Fun at C4di

3DPrint (2 of 3)-Edit.jpg

Well, that was fun. Peter, David, Helen, Paul and myself all got together to talk about 3D printing and scanning at C4di. I took along Una, my Ultimaker printer, David, Helen and Paul took along their 3D scanner and MakerBot printer and Peter showed off his “Richmond” printer.

Within no time the place was full of the smell of hot plastic and the sound of machines whirring away. We had a huge audience (in that there were lots of people, not that they were giants) and they seemed to really enjoy finding out about 3D printing. I started things rolling, with a quick zoom through my presentation about how I got into making things and then Peter followed up with a talk about how he came to design and build his own 3D printer from scratch. As you do.

Finally David rounded off with a description of how 3D printing and scanning technology is being used in his business and how it will undoubtedly develop in the future. Helen and Paul were showing off their modelling and scanning skills and the whole thing ended with lots of happy people wandering round, taking a look at the technology and getting to grips with it. Without getting their hands burned.

Thanks to Jon Moss for setting up the session and C4di for hosting it.

Postgrad Party Fun

DSC02919.jpg

We had our Postgraduate Welcome party today. Some of the same attractions as lst week’s Undergraduate paty, including the Occulus Rift, which I had a go with and turns out to be great fun.  We had the racing cars. And some of the same quiz questions.

DSC02925.jpg

These folks came first and were very pleased with their prize. As they should be.

DSC02929.jpg

These are the folks that came second.

DSC02931.jpg

And this is the “Malteaser” team who came third. But they did get two boxes…

My favourite question from the quiz was this:

image

Any ideas?

Goldfrapp –Tales of Us

image

I used to like buying old style vinyl records. There was something rather nice about going into the record store and coming out with a  twelve inch slab of plastic in a large sleeve. Of course that’s not how we consume our music these days.

I got this album for “free” because I’ve got my phone tied in with the Xbox Music “All you can eat for ten pounds a month” deal. Nothing physical moved anywhere. And I haven’t got a nice album sleeve to look at. But the music is splendid.

I’ve always liked Goldfrapp. No two of their records sound the same. If you like ambient, tuneful, stuff you’ll love it.

Hornsea Mere on Sunday

IMG_7576_7_8.jpg

After lunch the weather was lovely, so we thought it might be nice to go out to Hornsea Mere for a walk and take some photographs. So we did.

New students, if you are looking for a nice place to go with mum and dad when they drop round to see you, then I can recommend it. The coffee shop has had an overhaul and does a really nice line in scones and cream. It is around 25 minutes from Cottingham, you can feed the ducks and then go and have a look at the seaside.

IMG_7546_7_8.jpg

You can even hire a boat and splash about a bit.

Breaking Games

DSC02902.jpg

When number one wife (she calls me “husband zero”) got her iPhone a while back one of the first things we got for it was Scrabble. The implementation was slick and it worked a treat. She played a lot.

She doesn’t play as much now. Not because her word powers have diminished, but because the game has “upgraded” itself to the point where it has become a pain to play. Before she can fire up a quick game of digital word wrangling she now has to fight past loads of login screens offering a chance for her to take on players from all over the world. She doesn’t want to do that. She wants to do what she has always done, which is play a quick game of Scrabble against the computer.

I hate it when things upgrade themselves to the point of uselessness. The game also acquired a cheery little sidekick who would tell you after each move the one you should have made and how many points you have lost as a result of not being as clever as it is. This turns out not to be particularly motivating. We managed to turn that off. And avoid all the different new board and tile designs which are now available (and will be for sale soon I have no doubt).

But as for the forced login, that one I’ve been unable to get rid of. The menu system seems to be designed to make you feel unsociable and isolationist, just because you want a quiet game of Scrabble. Ugh.

Learning from My Mistakes

DSC02905.jpg

Today was the first foray into the labs with the new First Year group. A splendid bunch of folks. Last year I blogged about the sneaky thing we did with the sample program. It worked so well that we did it again this year. But of course there is always something more….

At the end of the lab we have a silly test, with one or two sensible questions. It’s there get everyone used to the test environment and it works quite well. One sensible question asks you to identify the problem that broke the program. It’s a multiple choice question with lots of stupid possibilities, along with the answer “The program used a multiply operator instead of divide". Actually the mistake is that it used a multiply operator instead of a plus. It was originally a genuine mistake. But I’ve left it in because it us actually quite useful.

Quite a few people spotted this mistake in the question and came and told us about it. One or two didn’t bother because they assumed the knew what we meant. Please don’t ever do this. If you find what looks like a mistake in something to do with the course, and you just assume you know what has happened you might be heading for trouble. Please, please, please let us know if you see anything that looks wrong in stuff that we give you.

To refer to the post on Wednesday, we do an awful lot of planning. Because it is crucial. But we also know that stuff happens that we don’t think of, which can break our careful plans. So we need to be told if something might not be right so that we can fix it if required.

Oh, and thanks to all the students who turned up and worked hard. Everyone I saw was chugging through the exercises very nicely. The real teaching starts next week. It’s going to be fun..

Busy Thursday

The Thursday of the first week of the year is always a very busy day for me. This year I thought I’d find a way of making it even busier. This is how it panned out.

6:15 Get up and dressed, out of the house by 6:35 and heading for Radio Humberside to do the newspaper reviews. Vastly speed up my departure by forgetting to take my lunch or clean my teeth.

7:00 Arrive at the studio and start reading through the papers and making notes.

7:40 Do my thing. Talk about Moore’s Law and The Silk Road which I found in the papers. Mention that I’m looking forward to meeting the new First Year this morning. (It’s true).

8:05 Back at the office. Work to finish off scanning and packing all the “Tags of Fun”.

DSC02913.jpg

8:39 Tags done. Head to the union shop to pick up the prizes for the Welcome Party Quiz. Also buy toothbrush and toothpaste. Make sure they are not on the prize receipts so I don’t end up fiddling my expenses. Need to remember not to give the toothbrush away as a prize. Might send the wrong message to the recipient.

9:00 Back at the office. Now need to sort out the software to make the system work. Just have to add the behaviour to read the tag and authorise the drink purchase. Plug in the tag reader and open up Visual Studio.

9:45 Software working, now need to put everything into the box. Discover that the holes that I had designed into the case are too large, and the bolts don’t grip them. Ah well, there is always duct tape.

9:50 Open new toothbrush prior to cleaning teeth. Find I have bought one with soft bristles by mistake. I usually use a hard one, to match the water in Hull. Also notice that the toothbrush is pink. Oh well.

19:51 Clean teeth using a beaker of water in my office while hiding down the side of the glass office door, so people walking down the corridor don’t see me foaming at the mouth and call for medical assistance.

10:06 Give a quick talk to new the First Years Certificate Level students. Talk about the importance of building a brand while you study. Strongly plug / (wooh). Also mention http://www.threethinggame.com/ and http://www.ratherusefulseminars.com/ (which seem to mysteriously link back to www.robmiles.com). David Parker suggests that I mention http://hullcompsciblogs.com/ too, as that brings together lots of Hull Computer Science blogs, and also contains a link to http://www.robmiles.com/

10:20 Back in the office. Finish of the Welcome Party Quiz questions. Feel slightly guilty about a couple of the questions, but leave them in anyway.

12:00 Start to distribute the “Tags Of Fun” to the supervisors. Everybody is pleased to have them, but slightly confused as to that they are for.

12:15 Go buy lunch. Egg and bacon sandwich. Works for me. Also strawberry flavoured milk.

12:25 Send out an email to all staff explaining how the “Tags Of Fun” work.

12:50 Get an email from Yiannis suggesting that there might be people at the party who won’t have tags.

12:55 Update software and program thirty “blank” tags.

13:30 Print answer sheets for the quiz. Then write some course bits and bobs.

14:30 Meet new supervisees. Great folks.

15:00 Start preparing for the Welcome Party.

16:15 Party Opens. We have Wii U, 10 seat Xbox 30 from Platform Expos, a guitar game with real guitars from Brian, multiplayer games from FreeSide and an Occulus Rift from Hive. And free drinks and sandwiches.

DSC02871.jpg

Multi-player actionDSC02886.jpg

Discussions

17:45 Do quiz. Seems OK.

18:30 Announce winners.

DSC02889.jpg

These folks came first, and are looking quite cool about it. Or it might just be general depression about the quality of their prize (I spent all the money on RFID tags…)

DSC02892.jpg

These folks came second (actually they got the same score as the other team,  but in this situation the team withe fewer members wins out)

DSC02895.jpg

These folk made third place. I told them to really work those Jaffa cakes (not a phrase you hear much in polite conversation).

19:30 Clear up and tear down. Very surprised (and pleased) to find that the bar staff really like the “Tagomatic”. Much easier than dealing with paper tickets that have to be handed out and checked. One says “Of course, we’d should expect you do make something like that. You are Computer Science after all.” Feel v. pleased about that.

19:55 Get in car to drive home. Start playing “The Long Way Home” from Breakfast in America. Loudly.

20:05 Roll into drive exactly as “Lord is it Mine” finishes. Spooky.

21:00 Write blog.

The Opposite of Planning

Untitled

“Plans are Useless. Planning is crucial”. I really like this statement. I reckon it boils down to the fact that even if you plan stuff carefully there is a very good chance that it will all go wrong. But it also says that if you don’t plan, things are even worse.

I reckoned I’d planned carefully enough. I had all the bits on hand to make the tags, I got the software mostly working on time. I was held up with a bug of mine that I blush to think about now, perhaps it will be the basis of a blog post in later days.

Anyhoo, the only thing missing was the little plastic envelopes that I’d ordered a couple of weeks ago to put the tag, and the name of the lucky owner, into. But they were bound to arrive in time, weren’t they?

No. So tonight we got to spend a chunk of time sticking bits of papers onto tags with bits of freezer labels that I’d “liberated” from the kitchen.  I know some of the labels will drop off, but it is the best I can do.

Number one wife gave me some sage advice. “Why didn’t I get some at the weekend, just in case?”. Indeed.

And I just know the little bags will arrive tomorrow.

“Tags of Fun”

Tag400

Regular readers of this blog (and yes there are some) may remember back in March when I made “The Door of Mystery”. This was an RFID tag powered raffle management system based on the .NET Gadgeteer. It worked very well when we used it for the Red Nose Day Lecture in Rhyme, and the people who bought tags to take part rather liked having them around, and hung on to them.

Which got me thinking. I’d like to be able to do prize draws and things in lectures, with bigger prizes if you’ve been along to more lectures. And I reckoned that these little tags might be a way to do this.

So I’ve invented “Tags of Fun”. We are going to give all the new students a tag each and I’m going to trial the devices at the Welcome Party on Thursday evening. We usually give “Drink Tokens” out, but this time everyone can use their tag with a customised “Door of Mystery” device to see if they can have a drink. The system will let you buy one drink, and then the head of department will have to use their magic “key of power” to reset the keys and allow more drinking.

Just to make things even more interesting, I’m going to link each tag with an owner, so the system knows the name of the tag holder.

Of course, now I have to get the software updated, download the student lists, build the user interface and program around 250 tags.

Before Thursday.

First Day of the First Week

DSCF4050.jpg

The progress of the cold continues. My nose is now an even brighter red than is usual. I’ve always fancied being the kind of person who could light up a room when they entered it, but I don’t think this is quite what I meant.

The good news is that all our new students have arrived. It is great to see you. I’m looking forward to my first sessions with you on Thursday.