Pointers to Functions in C

I’m re-writing my neopixel animation software for the new light. I’m using a C feature that is sometimes very useful. I’m using pointers to functions.

Note that this is quite strong magic. If you don’t use it properly your program will just stop with no errors or warnings. But then again, that’s pretty much how it is when you write Arduino code anyway, so feel free to have a go. You won’t break any hardware.

The reason why I’m using function pointers is that I want to make the program to select between different animations to control the lights. The update behaviour for each animation is a different function. For example, I’ve got two different displays, one which walks colours around the lights and one which just displays the text in a particular colour. That means I’ve got two update functions:

void update_coloured_message()
{
// update the coloured message
}

void update_text_message()
{
// update the text message
}

Each of these is a function that accepts no parameters and does not return a result. I can create a C variable that can refer to these methods as follows

void (*animation_update) ();

This rather convoluted syntax creates a variable called animation_update that can refer to methods that accept no parameters and don’t return a value. I can make this variable refer to one of my update methods by using a simple assignment:

animation_update = update_text_message;

Note that normally when you want to create a reference to a value in C or C++ you need to put an ampersand (&) in front of the thing you are getting a pointer to. In the case of function references you can leave this out. This is either a neat trick to make C programming easier or a nasty trick to make C programming more confusing. I’ll let you decide.

Anyhoo, once I’ve set animation_update to refer to a function I can call the pointer just as I would the function:

animation_update();

I’ve actually gone one more, in that I’m using function pointers in a structure. Go me. I’ve got a structure that describes an animation in terms of the function that sets up the animation, the function that updates the animation and the number of frames it should run for:

struct Animation_item
{
void(*animation_setup) ();
void(*animation_update)();
int duration;
};

I then create an array of these items that contain all the animations that I want to move between:

struct Animation_item animations[] = {
{ setup_coloured_message, update_coloured_message, 600 },
{setup_walking_colours, update_walking_colours, 600} };

Then just need to count around the array to move between animations.

animations[animation_number].animation_update();

This statement calls the animation update method for the animation that is selected by the value in animation_number. If I add more animations to the array my program just picks them up automatically with no need to change anything else.

"Do It For Josh" Light

Joshua (Josh) Barnfather is a lovely chap who needs your money. Really. You can find out here why he needs the cash. And also give him some. Please.

Josh is a member of c4di and I’ve been really moved by the way that the community has rallied round to help under the tag line “Do it for Josh”. We’ve had Nibble, the local eating place, pitching in with a “Josh” sandwich (which is delicious - I had one on Thursday) and lots of members coming up with neat ways to bring in the cash. Since I can’t make sandwiches as good as the ones that Nibble turn out, I’ve decided to make something electronic.

Behold, the “Do it for Josh” lamp. This prototype will be going in the c4di lobby later this week, but I’d be happy to make one for you. You can even tell me what words you want to put in the 4x4 matrix. A light will cost you fifty pounds with at least forty of that going to Josh. The lamp will be WiFi connected so that you can control the animations from your phone and tell it when to turn on and off. And I’m going to get the Connected Humber bods onto adding even more interesting features.

If you fancy one, just send me an email (rob@robmiles.com). If you want to just want to help, send some money through via the donation page.

Back in the Zone

New board in action

My Twilight Zone pinball machine is the nearest thing that I’ve got to a family heirloom. Rather sadly, it’s been poorly sick recently, owing to some leaky batteries. These are rather stupidly mounted over the main processor board and covered some important chips with corrosive liquid. Although I managed to get the board back to life by cleaning it up a while back, a few weeks ago the input connected to the game start button failed, which made it rather hard to get a game.

Fortunately, even though (or perhaps because) the machine was made in the mid nineties you can still get replacement circuit boards. These are re-manufactured using the same components as the original and, once I’d got one, my machine sprang back into life.

Hull Pixelbot at the Digital Awards

Hull Pixelbot finalist in two categories. Yay!

Hmm. Three blog posts in one day. What an interesting life I lead….

Anyhoo, today it was time to put on my best smart casual wear and head for the Bonus Arena for the finals of the Digital Awards. This was all rather exciting. Firstly because the Hull Pixelbot is a finalist in two of the competition strands, secondly because I really fancied having a look around the new Bonus Arena, which is where the event is being held.

Well, the arena is is splendid. After an lovely meal, accompanied by a saxophonist with a fantastic illuminated saxophone, we went through to the arena for the awards themselves. We had a few speeches at the start which were all shot through with a theme that this is a great place to do digital business. One speaker made the point that they were feeling a bit sad about being in the bottom 48% of Lightstream users in Hull for network performance. He was cheered up a lot when he found that this still meant he was in the top 2% of network users in the country.

And another fun fact stood out for me: A third of the optical fibre in the UK is under the streets of Hull. The government has set what it calls an ambitious project to get all households in the UK connected to fibre by twenty thirty something. KCOM (the telecoms company that provides home networking in Hull) will achieve this in Hull by the end of March next year. Other cities in the UK are now playing catch up with us. Big time. And, we don’t just have networks. We have talent too. As the awards were about to show.

Mark Dolan was a great compere

I’d not seen that much of Mark Dolan before to be honest. But by gum he’s good. After a brief (and very amusing) comic set to break the ice he got things going and presided over the proceedings with some wry observations and knowledgeable comments. The finalist in each award category was introduced by a short video of them in action. Which for me meant two sessions of squirming in my seat as I watched pictures of me and my stuff on the enormous screen. Although I loved the moment when the audience went “Ah…” when they saw a bunch of Hull Pixelbots doing one of their little dances.

I didn’t win. I didn’t expect to, to be honest. I’d taken a look at the field and come to the conclusion that there were much better entries in my categories than mine. But I was mightily honoured to have been picked to get into the finals. And I did get two lovely certificates in really nice frames. One for the office at c4di , one for home. And If you check the awards lineup you’ll see that the Hull Pixelbot was actually first in each category. Alphabetically…

It’s a measure of the confidence that I’m seeing in the area that it can put on what I consider to be a world standard awards ceremony. I’ve been to a few of these over the years and the whole setup, the organisation, the venue and the presentation really was world class. And, and this is the really wonderful bit, so were all the finalists. The winners were real stand-outs.

I was especially pleased to see Hayden Barton win “Young Digital Person of the Year”. I first met Hayden at a Hardware Meetup at c4di when he showed me a neat little device he’d brought along. “That’s nice” I said. “Where did you buy it?”. His reply marked him for greatness in my book. He said “I made it.”.

After the awards we staggered home tired and happy. Thanks to every one who put the event together. Great fun and great for the region.

Build another LoRa Node in a Day

Everyone looking happy at the start

In July we held a “Build a LoRa node” workshop at c4di. It was great fun for us, and those who took part. Today we did it again. I turned up, fresh from my media appearance and helped Robin set things up. As before, the aim was to get attendees to build a working LoRa node and finish up with a device sending environmental data to the cloud.

Everybody succeeded. It was great to watch them all convert a “bag of bits” into a working sensor node and then watch as they saw their readings appearing in their browsers.

We run the events when we get eight or nine people together who want to have a go. They are hosted in the lovely environment of the c4di and we only charge you for the parts that you take away. If you want to come along to our next one, just send me an email or a direct message on twitter and I’ll add you to the list.

Rob on Radio Humberside

The light first thing this morning was rather good

This morning I was up bright and early (oh, OK, just early) and heading into town to review the papers for the Radio Humberside breakfast program. I love doing radio. Apparently I have the perfect face for it. Anyhoo, I settled down with a pile of newsprint and started looking for some vaguely happy stories. There’s so much depressing stuff in the news at the moment that I figured folks would rather hear something a bit uplifting with their cereal.

It turns out that this was surprisingly hard to do. Papers seem to have got a lot more miserable over the years. However, I found a few things to talk about, wandered into the studio and did my bit, which was great fun.

Now, onto building some LoRa nodes….

Test Air Quality with the EMF Badge

The air here seems ok

One of the (many) wonderful things about the electromagnetic fields event I went to was the badge that everyone was given. This was an embedded device with a nice colour screen and a powerful processor that just happened to be a mobile phone as well…… I thought I’d turn it into an air quality display. So I 3D printed a case and make some modifications so that I could fit an air quality sensor and a battery to power it on the back of the badge. This is the back of the badge:

The hardware construction went fine, and I had the badge and the sensor exchanging messages quite nicely. Then I tried to write the software and it all went wrong. So I gave up and decided to enjoy the event instead….

However, I’m not a quitter. So, after a lot of fun and games, I’ve finally submitted my air quality app to the badge store for the emf badge. You can find it in amongst the other apps in the store here. It seems to work a treat and I can wear it around my neck with pride. Although I guess this would probably look a bit silly around Hull, where a lot fewer people seem to be wearing emf badges than there were at the event.

Anyhoo, one significant (at least for me) takeway is that if you want to use the serial port in MicroPython in binary mode (i.e. not have the driver mess around with carriage return and linefeed characters), you can use a special option to request this:

sensor_port = UART(2,9600, bits=8, mode=UART.BINARY, parity=None, stop=1)

This option is, of course, undocumented on the MicroPython pages for the UART class, leading to endless hours of “fun” for developers (like me) who spend ages wondering why their binary checksum values are all wrong…..

Rob at Ron Dearing UTC

Despite arriving a tiny bit late, I had a great time at the evening event at Ron Dearing UTC today. A whole bunch of folks came to see me to talk about technology and I showed off some Hull Pixelbots, my silly goggles and the prototype air quality sensor that we’re working on over at Connected Humber.

Of course, I totally forgot to take any pictures at the event. Silly me. That’s why there’s a rather splendid picture of Whitby pier at the top of this post instead of anything relevant to the night.

Anyhoo, I talked to a bunch of folks and gave out a bunch of advice. Summarised thusly (posh prose)

  • If you’re into computing, start playing with the Arduino device. It’s cheap to get started (much less than a video game) and extremely creative. Buy a Sintron Arduino kit (search ebay or Amazon for “Sintron Arduino” to see a selection of kits. The one that is around thirty pounds is good value. If you want to start cheaper, come along to a Connected Humber event (we have them on the first and third Thursday of the month at c4di starting at 6:00pm in the evening). We’ll sell you an Arduino and some hardware for five pounds and give you some things to do with it. You can find out more here.

  • Start learning about 3D design. Lots of people that I spoke to were already doing this. The ability to think in 3D will stand you in good stead whether you go into fields ranging from video games to product design. There are lots of free packages you can use, I quite like FreeCad, although it can be a brute to get to grips with. If you’re a programming type, take a look at OpenScad. If you want to use a free, professional level, tool take a look at Blender. It will really make your head hurt, but you can do awesome things with it. Take a look online for howto videos for these tools. If you don’t like the ones that you find, make some better ones of your own.

  • Which brings me to my third point. Lean to write and talk. When you start doing something, start writing about it too. Put your writings into a blog, a personal diary or a log. I don’t mind. The important thing is that you do this. I made the point lots of times that you can learn a good living, and have fun, as a programmer. But if you also have the ability to write well and are good at communicating your ideas this makes you much more useful and interesting to employers, getting you even more interesting and rewarding things to do. So you should work at getting those skills. Deliberately do things that take you out of your comfort zone. Practice talking to people (networking is a big part of success) and try to force yourself to speak in public. Trust me. It really pays off.

By the end of the evening my voice had just about worn out, as had the batteries in the robots. But it was great fun. And then I went home and had bananas and custard for supper. Such fun.

To the Moon!

Today we went to see the moon in Hull Minster. Awesome. It hangs from a large steel structure that they’ve set up . I don’t really want to know how it fits together inside or how they printed it. I just want to marvel at it.

We actually saw the moon for the first time last week, when I took along my expensive cameras and fancy lenses to try and get a nice picture. Today I just had my smartphone with me and I ended up with what I consider better pictures - which is an interesting comment on the state of photography.

Using a Line-us plotter with Hershey Fonts

Some time back I got a Line-us plotter. It's actually rather neat.  It comes with a super little program that lets you draw designs on your computer and then print them out in an attractive, if rather wobbly, way.

It is very easy to control the plotter from Python over the network, and I wanted to use it to draw some text. I was wondering how to do this when I remembered the Hershey fonts. These go back a very, very, long time. They were pretty much the only vector character designs available for plotting text for many years. They are based on simple graphic designs and, fortunately for me, someone has written some Python to work with them. 

I've made some modifications to their program so that it now drives the Line-us plotter and I'm rather pleased with how well it works. You can find the code on GitHub

Humber Care Tech Challenge Day 2

The winners being surprised by fireworks…

The second day of the competition was at least as much fun as the first. We actually got to spend some time getting some code to work. By the end we had some sensors sort of working and Amazon Echo behaviours that responded to commands for our application. And we also had a good plan for developing and deploying the application. We still didn’t win though. Mainly because the winning solution (and, to be honest, quite a few of the other 12 entrants) was quite a lot better than ours.

The winner, which started with the idea of giving everyone in a care home their own Amazon Alexa device, moved on to develop this in lots of interesting ways, and ended up with a fully working demonstration application, was just wonderful. It was chosen as the best by both the judges and the “People’s Choice Award” which was marked by all the teams present.

Thanks so much to the councils and healthcare organisations that put the event together. It was a wonderful occasion and I hope that it will be repeated some time in the future. I also really look forward to seeing some of the ideas that were presented going forward to do good.

One of the most impressive things to me about the whole competition has been the commitment of everyone involved to get the ideas into action. I’m really looking forward to seeing this happen.

Humber Care Tech Challenge Day 1

Getting started

From one fun event to another. Now it’s time for a bit of hacking. The Humber Care Tech Challenge started bright and early today. I’ve been involved with some of the organisation of the event. It’s one thing to sit in a meeting making plans and trying to think all the things that could go wrong so you can fix them in advance. It’s another thing to walk into Bridlington Spa Hall and see lots of teams set out and getting started on their solutions.

The level of enthusiasm and commitment at this event is astonishing. From the organisation group, who are trying to do something different to move things forwards to the healthcare professionals who have engaged with teams in a really positive way, to the teams themselves, who were quietly getting down to the business of making something awesome.

I was there with Robin and Keith thing to come up with something. Keith had done his homework, and had arrived with a fully formed solution that he wanted to run past the Subject Matter Experts at the event. Robin and I did a bit of planning and then came up with an exercise aid that tried to recreate the atmosphere of “A Good Walk” for people who have difficultly leaving home. We played with some ideas and sensors and the Amazon Echo that we’d been assigned and, by judging time we had an idea that we thought stood up rather well.

We didn’t win a prize. But I’m looking forward to finding out who wins tomorrow when the solutions are demonstrated.

Heading Home

We were up bright and early and on the road home by 8:00. The whole event was fantastic from start to finish. They say the next one will be in 2020. I’ll be there.

There is also talk of “electromagnetic pulse” events being organised in the gap between the “fields” events. It would be great to set up one of these in the Hull area.

Anyway, time to head for home and then to get the Air Quality sensor working with the badge…..

Day 3 of Electromagnetic Fields

Achievement Unlocked: Shower Ninja Level now at Master. Take a large waterproof bag for clean clothes and dry towel on the way in and dirty clothes and damp towel on the way out. Leave boots outside the shower cubicle, facing outwards so I can just step into them on the way out. I'm really getting the hang of this camping lark. Of course, it’s not rained at any point…..

Having settled into something of a routine the realisation is dawning that this won't go on forever and today is in fact the last day. Wah. I resolve to go to lots of sessions and get the badge air quality sensor working. 

After a great session on LoRa networking, and another on the scary way that you can hack into car keys, I went to some that were all about how the event itself. First up was a session on the making of the emf badge. It turns out that making a complete mobile phone device is actually quite tricky. Kudos that they actually managed to make it work. The next session was about power, amongst other things.

This is the power distribution to the tents in our area of the camp. There were a bunch of “Tardis” booths that contained nothing but distribution boards and, I suppose, a whole bunch of fuses and whatnot. These were connected to a backbone that was powered by a bunch of great big generators spread over the camp.

After the talks and another abortive attempt to get my badge to work with the Air Quality sensor, we went for a wander into the “Null Sector”. This was a seemingly haphazard collection of shipping containers that held, well, interesting stuff. The best time to see it is at night - of which more later - but there were quite a few things to take a look at, including a container from MSRaynsford that contained a kind of steam punk workshop with a laser cutter and some lovely things for sale. I ended up with a useless box (which I’ve always wanted) and a wifi controlled StrandBeest. Of which more later.

After some more coding we headed for the closing ceremony. Rather sad. There was enough content for several weeks I reckon, I wish there had been more of me to go to all the things that I know I missed out on.

The good news was that we still had the evening to enjoy, including some electric car racing that was great fun to watch. I was also able to practice my panning technique as the cars whizzed past.

I have no idea why there is a Christmas tree on the back…

As the night came down we ventured back into “Null Sector”. They had buttons you could press to send out great big gas flares, art installations, an RFID powered treasure hunt and a powerful laser light show. I did the best with my little camera, but the shots don’t really do the setup justice.

Lasers and gas flares

Mostly lasers

Then it was time for bed for the last night under canvas.

Day 2 of Electromagnetic Fields - Starting with Furby Hacking

Good morning...

Shower Ninja Level Zero: Stand fully clothed in a shower booth and press the water button "just to see if it works". Then wonder why all the clothes you're wearing are now soaking wet. And have nothing to put wet clothes into. Oh well; the good news is that the shower was clean and the water was nice and warm. 

After breakfast it was time for some more sessions, starting with "Attacking Websites for Educational Purposes Only". The exploit that was explained was specific only to an elderly version of the PHPBB bulletin system that was released for a short time a while back, but the talk did bring home how vulnerable a site can be.

Then it was time to attack something a bit more cuddly, with a fantastic session on Furby hacking. From modest beginnings, intercepting Bluetooth messages containing firmware updates, the speaker ended up showing how to take complete control of the device, downloading sound and graphics into the hapless cuddly toy. It was so impressive that, not surprisingly, I've gone and bought a Furby device to play with. Such are the perils of connected sessions and Amazon's Buy it Now button. 

Next up was a really good talk on podcasting. I've never podcasted, despite apparently having "The perfect face for radio". However, after this talk, that set out why you would do it and why it is such a good idea, I'm strongly tempted to give it a go. 

Building the badge al-fresco

By now the emf badge had been released and it was back to the tent for a bit of assembly and testing.  I had a plan to connect an Air Quality sensor to the badge for no particular reason, and in an uncharacteristic piece of forward planning I'd actually 3D printed a case for the badge and attached a sensor and a rechargeable battery to it. Now all I had to do was connect up the wiring and write the code. This meant that session attendance had to take a bit of a back seat, although I did manage to catch part of an awesome session about converting photographs to poetry and another which went into scary levels of detail about how easy it is to hack RFID car keys. 

It turned out that the bar was a good place to set up base camp and start developing

After gatecrashing an Arduino session and hijacking a soldering iron for a few minutes I got the cabling wired up to connect the sensor to the badge and then my software worked first time. 

I always get nervous when that happens. My theory, which has been validated many times, is that any given project requires a "pound of flesh" of effort, and if it seems to be going easily that's because there's something nasty lurking round the corner. It turns out that my nervousness was well founded. Although I could get values from the sensor and display them, when I tried to turn the program into an application to publish in the app store for the badge it all went horribly wrong. I was sure it was something stupid that I'd done, but it was very hard to work out what. So, after a while I gave up and went for a wander down to the Hackaday tent where they were showing off hacks. There was a chap there with an amazing barrel organ made using laser cut panels. I also got to have a really good chat with the man behind the RC2014 project

After tea (pizzas this time) we headed for a special showing of Hackers, a deeply silly movie from 1995 that was one of the first on-screen portrayals of hacking. It was great fun and lovely to be part of a huge audience that shouted "Hack the Planet" at every opportunity. The presentation was followed by a question and answer session with the director of the film who gamely entered into the spirit of the thing, even down to judging the best hacker costume. Style tip: the more LEDS the better....

A message for our times. 

After that we took some pictures of the fun and games going on in the Null Sector, and took a walk around the camp. There are various "villages" set out for particular interest groups. You could spend your entire time at the event just going round and seeing what they are doing. 

Hardware hacking by moonlight

Across the camp

Day 1 of Electromagnetic Fields

I’ve not done any camping for over thirty years. After my previous experiences with horizontal rain, sleeping bags frozen solid and forgetting the tin opener, I reckoned it would take something rather special to get me under canvas again.

Home for the next three days...

Turns out that EMF is something special. Electromagnetic Fields is a techie festival in a field. And it is awesome. There are technical tracks, there are crafting tracks, there are things that have been done “just because we were told they were impossible”. You have to stay the night in a tent, but it turns out that in good weather and with working toilets and showers, camping is actually quite fun. Particularly if you have mains power in your tent.

They had these "Tardis" devices all over camp supplying power...

We arrived on site bright and early and picked a spot that looked sensible. Pro tip number one: Lay your power cable from the supply before you pitch your tent, otherwise you’ll find that your wire is six feet too short and have to move everything. However, with that hiccup out of the way, and having made the decision that the fact our tent looked like a “lean to” owing to some curious asymmetry in its inner workings was not going to significantly impact on its integrity, we established base camp and had a look around.

It was around two minutes before I heard someone say to me “You’re Rob Miles aren’t you”. Turns out that I am, and that the techie world has a good quotient of Hull University Computer Science graduates you are out there doing good things and remember the tall bloke who talked a lot about C#. Rather more surprisingly was that the second person to say this, thirty seconds later, was also called “Rob Miles” and was giving a talk in the afternoon. Which of course I was going to attend. I just hoped he’d maintain the integrity of the brand.

The camp is huge, with three large stages for talks, four hardware labs for, well, hardware, and a bunch of other places to go and do stuff. There are themed areas around the site, with different makerspaces and interest groups all over the place.

The best instructions you can get at the start of any event

The first session was the opening one, which brought home the complexity and difficulty of creating a very well-connected village in the middle of a field. Everybody in the emf organisation does it for the hell of it, and it seemed like this year the setup had been more hellish that usual, with failing tent suppliers, hillsides and all manner of other things turning up to cause hassle. Not that we’ve noticed much not working; the only real disappointment being that the badge; a very interesting piece of technology that we all get to play with, is not ready just yet.

Anyhoo, after the opening talk the session tracks started. The great thing about emf is that at any given time there are two or three sessions that look really interesting. The bad thing about emf is that at any given time there are two or three sessions that look really interesting, and you can only go to one.

After a brief look at the Air Quality Sensor workshop being run by Southampton University (and someone else going “You’re Rob Miles aren’t you”) we caught a lecture on a tele-presence robot by Libby Miller. It was a great talk, emphasising the ease with which you can create a something that works well for remote interaction and guaranteeing a peak in sales of a certain Ikea lamp which was used as the basis of the device. I’d love to build one. The instructions are here if you fancy making one to: https://github.com/libbymiller/libbybot_eleven

After that, a change of pace with a session with the fascinating title “101 Hacks for Late Soviet Water Towers”. The presenter of this session certainly leads an interesting life, which involves buying a water tower in Latvia by mistake for five euros and then finding out that you can save your five pound membership fee of the British Water Tower Appreciation Society (http://bwtas.blogspot.com/) if you actually own a water tower.  Which almost makes it a profitable option, assuming you want to join the society as cheaply as possible. The tower is very tall (higher than a Space Shuttle) and not likely to fall down any time soon, which is good. It needed a door to make it harder for people to climb to the top and fall off, and doesn’t actually hold water at the moment, but it all made for a very enjoyable story told in a very engaging way.

 After a burger lunch (very nice) it was time for my namesake to talk about the dangers of Artificial Intelligence. If we make a device that is clever enough to be useful, will it also be clever enough to be dangerous? It was a timely talk, what with the rapid advances in the field and the tendency of humanity to rush into technology without thinking about the consequences.

Then it was time for some hard-core hardware, in the form of a very detailed description of the creation of silicon devices that contain more than just transistors. It turns out that we can put all kinds of sensors directly onto the silicon and even make them small enough to be swallowed and take pictures during their journey through our system.

Next came a description of algorithmic light displays. I've been doing these since my discovery of Neopixel technology and my wedding lights of many years ago. However, the speaker was operating in a slightly different league, with huge displays containing hundreds of lights. There was some very interesting content about gamma correction and the proper use of randomness. Very interesting.

By now my brain was pretty much full for the day, but there was just enough space to take in a description of the project that is recreating one of the first ever stored program computers, the EDSAC project

After that it was dark, which made it a perfect for tying some Light Painting/Light Writing. Everyone else turned up with proper camera on huge tripods. I just had my tiny Sony camera and a table top tripod. However, after literally shaky start, when I fell over onto the grass after setting up the camera, I got some pictures that I'm not too unhappy with. 

We got some nice looking results with some tiny lights on strings. But then a chap turned up who just happened to have hundreds of leds on a pole. Electromagnetic Fields is that kind of place. And the pictures got even more fun. 

After that it really was time for bed. So, after picking our way through guy ropes and power cables we found our way to our tent and turned in, the best kind of happy-exhausted and with the prospect of even more fun and games tomorrow. 

Surface Go Review

When I finish writing a book I allow myself by buy a new computer. It's quite a thing for me. Last year, when I finished "Begin to Code with Python" I got myself an Apple iPad Pro. I was hoping to be able to use it to do proper work on the go. It has an OK keyboard and versions of most of the applications that I use. However, I found it impossible to use productively, over and above responding to emails. Simple actions such as copying values from one spreadsheet to another were taxing beyond belief. And of course, there was no way I could use it to write code. It's great for reading magazines and playing Zoo Keeper, but as a way getting something done, it sucks.

So, move forward to the latest book, the C# exam reference that has just gone to print. This time I've gone and bought myself a Surface Go. I got the bigger of the two versions available, with 128G of storage and 8G of ram. Both versions use a Pentium Gold processor, a model I've not heard of before. If the Surface Go used an Intel Atom processor I'd not have bought it. I've lost count of the number of Atom based computers that I've bought over the years. I was always tempted by the low price, but I was also always annoyed by the way that the things ran with the speed that custard flows uphill.

I'd read a few mixed reports of Surface Go performance, but enough people who I respect had said it was OK for me to take the plunge and part with cash. I needn't have worried. The Surface Go just works.  It gets there. If I compare it with my venerable, i7 powered, Surface 3 device it's like comparing the tortoise and the hare.

The Surface Pro 3, like the hare, sets of in a blaze of speed, and then, a few seconds later the fan comes on, the case gets hot, and things slow down to a much more sedentary level. Then a couple of hours after that the batteries go flat and everything stops.

The Surface Go tortoise sets of at a somewhat more sedate pace and maintains that until it gets there. There are no fans, nothing gets hot and nothing slows down. And the battery seems to go on for a lot longer. If you remember the story, you'll remember that the tortoise was the race winner. Enough said.

I've not bought and commissioned a new Windows computer for a very long time. The Surface Go "out of box" experience was very slick, involved Cortana, and had me working and connected to my Office 365 account in about ten minutes. Microsoft Office is already installed andI didn't need to copy all my files onto the small hard disk, just the ones I wanted to have with me all the time. All the rest will be automatically fetched when needed. Of course, there were updates, but these weren't too onerous.

The device arrived in Windows 10 "S" mode. This isn’t a separate version of Windows, its more like a safety catch that, when set, stops you from running anything other than programs from the Windows Store. However, this is easy to remove and in no time I was installing Visual Studio 2017, Visual Studio Code, Python, GitHub, the Arduino SDK and few other tools of the trade. All worked fine. Visual Studio 2017 is a beast of a program and, sure enough, large projects take a little while to load (around twice the time they do on my Surface Pro 3) but once they are open you can work on your code with a commendable lack of slowdown. I'm not going to use it with Lightroom or Photoshop because that's not what I got it for. Although, in a pinch, I reckon it could deliver if I was patient.

The Surface Go uses Windows Hello face recognition to log me in and while it isn’t quite as good as the one fitted to the iPhone X, it is properly useable. The screen is lovely. The sound is OK, within the limitations of speakers as small as they have to be to fit in such a tiny device. Battery like is OK too, nothing like the promised 9 hours, but good enough to remove any battery anxiety during a working day. It's also possible to charge the Go via its USB C socket, so I'm able to use my portable battery pack to top up the charge when out and about.

The keyboard is a smaller version of the lovely type cover on the Surface 3. I've just about got used to the smaller keys and I can type at good speed using it. If you're thinking of buying a Surface Go I'd strongly suggest you get the keyboard, along with an Office 365 subscription that gives you the use of the Office suite of programs and removes the need to have all your files on the device all of the time. I've paired my old Surface 3 pen with the Surface Go and discovered that the drawing and text entry experience is very, very, good. I reckon it's easily on a par with the Apple pencil on the iPad Pro.

I find that the Surface Go is a device that for me brings a bit of joy when you use it. The quality of manufacture and finish is the equal of much more expensive devices. Everything about it feels just right. It is the perfect size to take with you everywhere and has enough processing grunt to allow you to be useful when you get there. They say that the best camera is the one that you have with you at the time. By that yardstick the Surface Go is the best computer.

It's not that good for games though. Fortnite runs jerkily (although slightly better than on my Surface Pro 3). Graphically simpler games, for example Minecraft, run rather nicely. If the lack of Fortnite is making you think you need a more graphically powerful (and expensive) device like an iPad Pro my advice would be to get a Nintendo Switch with the price difference.

I think this is pretty much the perfect student device. Plenty of battery life, a workable processor, and access to proper productivity. You also get premium finish and the ability to be used as a tablet. And a genuinely pleasant user experience. It's a really nice feeling to have a tiny machine with you that you know can be used to turn out some proper work. If you're thinking about getting a little portable computer you really should take a look at the Surface Go. The girl in PC World was saying that they're selling quite a few Surface devices these days. I can see why.