Cortana Speech Library Helper for Windows Phone

I've been playing around with voice controlled adventures ever since I discussed them with someone at a Techdays session a while back. To make life easier I've now made a little helper class that takes away all the hard work from making simple speech enabled applications for Windows Phone. You can find out all about it on the Microsoft UK Developers pages here.

Hope and Glory Coffee at C4DI

Something different at C4DI tonight, with a visit from a bunch of folks from Hope&Glory coffee. I'm not much of a coffee aficionado myself, but number one wife is, and so we both headed out to find out about roasting and blending and whatnot.

Turns out that there is a lot more to this than I thought. Apparently coffee is second to oil as the most valuable commodity traded worldwide, it originated in Ethiopia and has been round the world since. It takes many years training to acquire the ability to properly discern different types of bean and there are only sixty or so people in the UK with the highest level of ability in this area. One of them is from Hope&Glory and we had a fascinating session where she showed off an iPhone controlled coffee roaster and talked about the business of sourcing the right beans, how they are prepared, what happens during roasting and lots of other stuff.

Then we took a look at different ways you can take your ground coffee and make it into a drink.

This was my favourite way to make a brew. In fact, it might turn out to be my favourite way to make any drink ever. It involves naked flames, steam and vacuum power to make a really nice cup of coffee. Heated water is forced up into the top container to mix with the coffee grounds. Then you take away the heat and as the steam in the bottom bulb cools it contracts and pulls the liquid back down through the cloth filter.

A great way to end a dinner party methinks, as long as you don't burn the house down. You can get all the kit from Amazon for around thirty quid. I've ordered mine. Much more exciting than a video game and actually cheaper. I was tempted by this amazing device but I think it is probably a bit expensive even though it looks enormous fun. If you aren't sure how to make any of this stuff work there are some rather nice howtos on brewing on the Hope&Glory site.

We left after an hour or so of learning about coffee, clutching a sample pack of beans. There are three different types of bean available from the Hope&Glory site. The prices are reasonable for coffee this nice and they do free postage, with the packets designed to fit through your letterbox and be waiting on the mat when you get home.

I still don't really think of myself as much of a coffee drinker, but after tonight that could change...

HIVE Rather Useful Seminar

Some of the audience, suitably attired

Some of the audience, suitably attired

Today Jon Purdy from HIVE (the Hull Immersive Virtual Environment) gave a great talk on how 3D displays work, followed by a demonstration of the HIVE systems. It was great to see so many first year students come along because we'd love them to come up with ideas for final year projects and the like using all our shiny toys.

 I took some pictures..

Using a virtual torch to send virtual light into simulated scene on the HIVE wall

Using a virtual torch to send virtual light into simulated scene on the HIVE wall

Using the HIVE cave to check out wind turbines

Using the HIVE cave to check out wind turbines

Time Travel in C#

Imagine if you could control time. Wouldn't that be useful? Especially if you were writing a program to manage artwork in an art gallery, and you wanted to test the part where after two weeks the artwork must be returned to the artist. You could start the program running, add an artwork, hop into the time machine and move two weeks forward and then check that the code works correctly. Of course this is impossible. But fortunately we don't have to do it this way. Instead we can build a bit of cleverness into the way that our program uses dates and times.

Normally a C# program will get a date from the system clock by using DateTime.Now:

artwork.DisplayDate = DateTime.Now;

This sets the display date of my Artwork to the current date and time. My program can then compare the artwork date with future dates to see if more than two weeks have gone by. The snag is that i have to wait two weeks to find out if the code works. So I make something like this:

static class DateSource
    public static TimeSpan Offest = new TimeSpan(0);

    public static DateTime Now 
            return DateTime.Now + Offest;

This can be used in exactly the same way as the system DateTime class, in that it provides a property called Now which gives a date and time value. But, and this is the useful bit, the date it sends back has an offset applied to it, which I can change. If my program uses DateSource rather than DateTime I can move my program forward (or even backwards) in time simply by changing the offset value:

DateSource.Offest = new TimeSpan(days:14, hours:0, minutes:0, seconds:0);

The first statement will print out the current date and time. The second will wind the clock forward 14 days as far as my program is concerned. When we are testing I can add a "wind forwards" button that changes the offset so that I can test my code. I could even change the offset value in a test harness that does this automatically.

This is all part of my "build yourself a nice place to work" philosophy. If your program has to do special things depending on location, don't test it by walking around the countryside. Instead make a program that feeds test coordinates into the location part of the code.

Windows 10 Game Development Event: June 11th-12th

What better way to celebrate the end of the semester than a bit of game creation? Plus a chance to have a play with the latest operating system and development tools.

I'm very pleased to be able to announce a Three Thing Game that we are organising in conjunction with Microsoft. We'll have all kinds of interesting people coming along from Microsoft, local games companies and software houses.

The event is open to any developers who fancy coming along and having a go.

Folks from Hull University are of course welcome, but if you are in a company and want to get hands-on experience working with Windows 10, plus support from Microsoft expertise, then you should come along.

We are working on setting up a lab full of Windows 10 machines for you to work on, so all you have to bring along is yourself and a winning smile. Plus you get to join in our "Summer Bash", with lashing of pizza, video games and perhaps even a game of Werewolf.

It all happens over 11th-12th of June. We've got some presentations on Thursday morning, followed by an afternoon of coding, then the Summer Bash, some late night development and judging and presentations on Friday. With prizes.

If you've never done a game jam before, come along and find out what they are all about. If  you're a Three Thing Game veteran we'd love to see you back in Hull.

You can find out more here: (but don't worry about bringing your own machine - we are sorting that out at the moment)

You can sign up here:

If you've no idea what Three Thing Game is all about, take a look at

This is going to be such fun.

Applications open for Summer Internships at Hull

If you're a student at Hull and you fancy spending 8 weeks in the summer getting paid to play with technology you should apply for a place on our Summer Internships programme. We had a very successful crop of interns last year and we want to repeat this. There are a number of different projects up for grabs and they all sound very interesting to me. The posts are open to students from any year, including first year students.

Students at Hull should check their inboxes for details of the programme, or get in touch with me and I'll send you a copy of the details.

Video Game Ratings at the Rather Useful Seminar

Today's Rather Useful seminar was all about sex, violence, gambling and drugs. Or rather the precise amounts of these things that can be present in video games and how this affects the age ratings assigned to them. Gianni and Joanna from the Video Standards Council came along and gave a fascinating talk on the origins of ratings and the way that video games are assessed.

Gianni started off with a discussion of the way that Victorian concerns about the effect of "Penny Dreadful" publications had on the minds of the masses have led to the creation of institutions to manage the way that media of all kinds is classified before distribution.

Gianni explained that this is not about censorship as such, but more about allowing people to make informed choices on the content that they purchase. Joanna then filled in the details, doing an excellent job of mapping the various levels of content onto the rating scheme used by PEGI for games released in Europe.

There was some great discussion about the way that the rules apply to different kinds of game and what you can and can't do. If you want to find out more about this fascinating field you can take a look here.

Platform Edge at Hull University Enterprise Centre

Platform Edge - we look to the skies

Platform Edge - we look to the skies

Today I went over to the launch of Platform Edge in the Enterprise Centre in the university. Platform Edge is an initiative aimed at giving great ideas a home. It's supported by Microsoft, Game Republic, Platform Expos and the University of Hull, amongst other people. It builds on the experience we have had over the last few years setting up companies and making them work.

Platform Edge provides desk and meeting space in the lovely environment of the top floors of the enterprise centre and is specifically aimed at students who have graduated and want to stay in the area and develop their ideas into games or apps.

If you want to know more, and get hooked up with facilities and expertise, give me a yell and I'll connect you up. 

Give Yourself Time to Fail

Restarted the teaching today. I did a show of hands in the first year lecture to find out how many people had started the coursework, which is due for completion in three weeks or so. I was pleased to find that pretty much everyone had started work on it. (or was claiming to have)

It is very important to start your computer science coursework as early as you can. This is because you need to have time to fail. By that I mean that there will be times when your program won't work and you won't be able to work out why. (this still happens to me by the way). In this situation you need time to be able to walk away from the computer and go back to it, which is a problem solving technique that works for me a lot of the time.

The other technique I use is explaining the problem to somebody else, or even just the wall. Half way through the explanation I hit upon the "broken assumption" that is the cause of the problem and can then go and fix it.

This is one of the things that makes computing different from lots of other disciplines. I don't think it is OK to work on the basis that you could dash off an essay overnight, but at least by the time morning comes you could have a bunch of words that may or may not be the right ones.

Try this technique with a programming assignment and at around 10:30 in the evening you'll find that your program doesn't work and you've no idea why. And you have no time to step away for a while and then come back and fix it. So start early.

Gadget Show Live Fun and Games

Today we had the other half of our "Busy Weekend", driving off down to the NEC for the Gadget Show Live event. We've been to these a few times and they are always worth the trip.

And so it was this time.

This stand prompted one of the first of several "Want One" moments. The gadget in question is the HP Sprout. This is a re-imagining of the PC which brings novel user interfaces and 3D scanning to the fore. In front of you sits a touch sensitive workspace onto which the computer projects a display. The workspace is also viewed by a number of cameras, including ones that can measure depth. The upshot of this is that you can scan objects in 3D and colour and manipulate them in all kinds of interesting ways. It's a bit pricey, at around 2 grand, but you do get a high-spec PC with an i7 processor and big hard drive for your cash.

There wee lots of 3D printers for sale, with some extremely tempting prices.

This brought out the second "want one" of the day. It's the Dyson robot vacuum cleaner. It looks really interesting. It uses SLAM (Simultaneous Location and Mapping) technology to build a map of its environment to make sure that it cleans everything. If its battery gets low it will go and pick up some charge and then return to cleaning where it left off. I had a Roomba robot vacuum a while back which was basically a "bumper car" toy that just bounced off the furniture for a while.  This looks a whole lot more advanced. It's due for release next year, so perhaps I should start saving now..

They even had a whole bunch of BBC micros. The urge to go down there and type

10 GOTO 10

- was pretty hard to resist.

And of course there were lots of, er, gadgets for sale too.

Hairy Bikers at the Good Food Show

I'm not a huge fan of TV shows about food preparation to be honest. I've been known to shout "But it's only cooking" at the telly during the final moments of MasterChef, when the music picks up tempo and the voiceover solemnly intones '..and now Anton only has two minutes to finish his Béarnaise sauce..".

To me cooking is that thing you do when you feel hungry, or if you are into advanced cooking an hour or so before you feel hungry, because that's the time it takes to bake a couple of potatoes and lob some sausages into the oven to have with them.

All this means that I didn't have the highest of expectations today when we set of to the Good Food Show. But it was great. First off they had lots of stalls dishing out samples of food (including a wealth of cheeses) and then we got to see the Hairy Bikers do a live presentation.

I was really hoping that they would bring out a Yamaha motorbike engine and discuss how to adjust the valve timings, followed by a few minutes on caring for greasy hair, but instead they did some cookery. However, it was great fun to watch then cook up some bits and bobs. They have a great banter and worked hard to make it very entertaining. Harrogate is a great location for this kind of thing. The theatre is lovely, see above, and the exhibition centre is near the middle of the town, which is a nice place to walk round.

We left burdened down with a whole bunch of samples (including a pint of milk each, which struck me as strange as I already know what milk is like) and some really nice cheese. Much more fun that I was expecting.

Unity Book Winner

I won a couple of Unity books from those lovely folks over at Microsoft Developer. Thanks so much. Here's a picture of me with them, looking smug.

I don't win prizes very often. The last thing I won was at a school raffle when I was six years old. And my dad was headmaster of the school at the time. The village was up in arms about it. Oh well.

Anyhoo, thanks for the books, I'm going to find them useful. I want to learn a bit more about Unity. They are from Simon, who was kind enough to come along to our last GameJam.

RGB LED Panel Magic

Some time back I got some of these SparkFun LED panels. I hooked one up to an Arduino and got impressive results, although just driving the pixels took pretty much all the power that the Arduino had. I had this plan to use a Parallax Propeller chip or maybe something from Xmos to create a fast moving animated display. But I never got around to it.

Then I found out about the SmartMatrix Shield for the Teensy 3.1 device. This sorts out all the wiring and power supply issues (all you need is something that can spit out 5 volts at a couple of amps). The Teensy is a quite amazing machine. It pops a 72Mhz processor with 64K of RAM and 260K of ROM onto a platform the size of an Arduino Pro. The development tools integrate straight into the Arduino environment and the deployment to the device works wonderfully, far better than a "proper" Arduino.

TodayI set about building my display. Everything fits into an 8 inch picture frame that I got from HobbyCraft.

You can see it all above. The Teensy and the SmartMatrix Shield are at the bottom of the picture. I've also attached an SD card and an IR receiver that allows remote control of the display.  There's a really good set of step-by-step instructions on the AdaFruit site. I designed and printed some corner brackets to position the panel inside the frame, you can get them from Thingiverse here.

The Teensy runs the Aurora software which is completely wonderful. it produces some really lovely displays. I've had to hack it slightly to get it to work with a remote control I happened to have lying around. The display is excellent, and photographs just can't do it justice.

One other nice surprise was that I did all this on my old Surface Pro that is now running Windows 10. It took all these strange programs and usb devices in its stride and just worked. I'm looking forward to adding some more visualisations and searching down some animated gifs to play on the device.