Long File Paths and Begin to Code with C#

I've had a few people hitting problems with the Begin To Code example programs. 

The sample code is supplied as a Visual Studio Solution which you can download and then open. 

You get problems if you put the sample code folders inside other folders with long names, for example:

c:\users\rob\documents\2017\programming\csharp\learningtoprogram\book\BeginToCode\

When Visual Studio builds a program it creates quite a large number of subfolders which makes the paths to files in the application even longer. Some Windows filesystems restrict the maximum length of a filepath which means that the build process will fail.

If you get problems, particularly ones where the error complains that "Snaps.dll can't be found", you could try moving the sample code folder up the directory hierarchy, or putting it directly on your desktop. That might help.

Of course, if that doesn't work you can get in touch with me and I'll give you some help to get things going. 

Hull Pixelbots at the Radio 1 Academy

Radio 1 invited us to take part in the Radio 1 Academy this week, which was nice of them. There are four days of events encouraging folks to engage with the "creative" arts. I was especially pleased to be asked to go along because I do computer stuff, and I see this as incredibly creative.

I had a very happy day showing people the robots, letting them control then with their phone and then telling them that the "magic ingredient" (i.e. the bit that links everything together) costs two pounds fifty. Which is less than the price of a burger and chips.

With a bit of luck, a few people who had never thought of getting into programming will turn up at one of our c4di hardware meetups and get involved in making stuff. I took a bunch of pictures during the event, you can find them here

Dell XPS 18 and Windows 10 Creators Edition

20170520_165154029_iOS.jpg

Just pull out a few wires and all will be well......

Last night I broke my Dell XPS 18 tablet. Rather sad. I've had the machine for a while, and I really like it. I'd never be able to get another one, I don't think anyone will be daft enough to try and make this kind of machine again. It's an 18 inch Tablet PC and up until around 8:35 pm it was running Windows 10 a treat. 

Then suddenly it wasn't. 

What it was doing, was flashing the power light red for half a second and then white for seven flashes, which were repeated until I got bored and held the power switch down. Just before I went to bed I searched for some BIOS error codes and found that seven might mean that the graphics hardware is toast. 

Just the thing you want to do before trying to have a restful night.

This morning I had better luck. A proper search revealed that there is an issue with the power supply management on Windows 10 which means that my trusty tablet had put itself into "zombie sleep" mode during the installation of some updates. The way to fix the problem is to remove the back, unplug the battery and CMOS battery for a few minutes and then restart the machine. Full story here

Now you're talking.

The fix worked fine, and I've now got Windows 10 Creators Edition running handily on my "Big Ole Tablet". There is still something dodgy about things though. Entering Sleep mode makes the computer really hard to wake up (in fact it usually results in a crash). I've no idea why this is, or how to fix it, or if it can be fixed, so I've solved the problem by doing the following, which I call my "None Shall Sleep" plan:

  1. Open the power settings and tell the computer never to Sleep.
  2. Change the Power Button action from "Sleep" to "Nothing". This is a good thing to do on the Dell anyway because the power button is stupidly hard to catch by mistake and very irritating when it takes the machine away from you. 
  3. Remove the Sleep option from the power menu. 
  4. Turn off the "Fast Resume from Sleep". I'm not sure what this does, but I've got an SSD in the Dell now, and it boots pretty darned fast without any fancy shenanigans. 

If you've got an elderly Dell machine that has been broken by a Windows 10 upgrade you might want to look into this issue. The effect of the failure really does leave you thinking the hardware is dead, and I was very pleased when mine sprang back into life again. 

Rob wins "Elevator Pitch" at c4di

20170519_191251462_iOS.jpg

Won a prize today for speaking in an elevator. Not done that before. Only at c4di

As I walked into the building yesterday I was asked if I'd like to take part in an "elevator pitch" competition. The idea behind an elevator pitch is that perhaps one day you'll find yourself in a lift with someone like Bill Gates or Mark Zuckerberg. So you've got the time it takes to get to the tenth floor to convince them to give you a hunk of money to let you follow your dream. 

I was told I had sixty seconds in the c4di elevator (up to the top and back down) to convince someone I'm worth backing. I wasn't really prepared for it, but I said I'd have a go, and off we went.

I'd got a Hull Pixelbot with me (Crystal Masie as it turned out) and so I decided to wax lyrical about the joys of building tiny connected robots. When I'd finished I asked how much time I had left to speak.

Forty more seconds. 

So I went on a bit more about getting people making and coding, and my dream of building an arena containing 100 Hull Pixelbots wandering around, just to see what they'd do.  Finally the time was up and I went back to my room to do battle with the Microsoft Bot Service. As you do. 

Today I found that I'd won the competition, which is awesome. I got a fantastic trophy and a lunch at Nibble

I love that c4di are doing things like this. You can watch the community of developers building up thanks to the efforts of Dee and Jess.  And getting practice telling people what you are doing and why it's a good idea is vitally important for professionals today. So everybody who took part has got something out of it. 

Great fun.

I Hate the word Easy

34721021585_20ce353e84_z (1).jpg

If there's one word that the English language could really do without, I reckon it's the word easy. It's one of those words that you shouldn't ever use because it never helps the situation. 

If I'm trying to do something and you tell me that it's easy that doesn't help. It just makes me even more concerned because I can't do it. And if I finally manage to do that thing, the knowledge that it was considered easy completely devalues the achievement. 

Don't say "It's easy". Say "You can do this". 

Rob at "Pint of Science" on Monday Evening

I'm doing a bit of talking tomorrow night. It's as pat of the "journey inside the human body" part of the "Pint of Science" talks in Hull. I'm going to be talking about whether or not we can make "Artificial Brains".  It's a look at artificial intelligence, computer software, killer robots and what we should really be afraid of.

And there are giveaways. You can sign up here. (please note that the 37 on the screenshot above might be out of date soon - especially when people find out that I'm coming along....)

Judging Three Thing Game

I stole this picture from David Parker

I stole this picture from David Parker

One of my fondest memories of working at Hull University was the Three Thing Game hackathons. Teams spent a chunk of time developing a game based on three "things". What they came up with was always impressive.

David was kind enough to ask me to help with the judging on the latest competition, so I headed into the university this afternoon to see what was going on.

Answer, a lot. More than 80 students. Over thirty teams. APD providing pizza,  Lee Stott and Simon Jackson with game ideas and devices, Adam from BetaJester, the Visr crew .  Just like old times. Only better. 

I saw some awesome games and had some great conversations with students, some new, some I knew. Unfortunately I had to zoom off just before the prize giving, but Lee has got some great pictures on his Twitter feed

Congratulations to the Hull team for running such an awesome competition. 

Loading FreeCad designs into Paint 3D

I've got lots of things I've designed using the lovely FreeCAD program. I wanted to play with them in Paint 3D in Windows 10 Creators Edition. If you want to do this too, this is how:

FreeCad doesn't seem to support a format that Paint 3D understands. You'll need to use a converter program to do this. I've found a free program at NCH Software that seems to do the trick.  First thing you need to do is download and install the program. 

Then, in FreeCad, select all the elements of the model that you want to export in the editor. Then select File>Export from the FreeCad menu to display the Export Dialog:

Select the "Wavefront OBJ" file type as you can see above. Give the file a sensible name, and then click Save.

Now you need to convert the OBJ file into a 3MF file. Open up Spin 3D. Select Add File (the big plus) and add your file. You can add lots of files if you like. 

I've found that models need to be rotated for some reason (perhaps because the coordinate frames of reference are different). Click the Effects button in the bottom left to ask the Spin program to do this for you.

You want to rotate -90 degrees about the X axis. Click the "Apply Offsets to Objects" checkbox and then put -90 in the Rotation X box, as shown above. Then click OK to close the Effects dialog.

Make sure that you've got the output format set to 3md as you can see above, and then click the Convert button on the bottom right hand side of the Spin 3D window. Your design will now be converted into a 3mf file that you can import into Paint 3D. 

I even managed to put the design into the Remix 3D site for people to download and play with. You can find it here.

Hull Pixelbots on News at Ten Tonight

33748533104_f2ce243b12_k.jpg

ITN are doing a feature about Hull and c4di are in it. Yay! John asked me if they could get some shots of Hull Pixelbots in action. 

Could they ever.

They were most helpful. After they'd finished I asked If I could take a shot "For the blog". Not only were they happy to help, but the cameraman set up his camera again so that I could get a good looking result. 

As far as I know, the item is going out on News at Ten on ITV (that's channel 3 in old money) tonight. 

Update:

Well, the items came and went. And there were Hull PIxelbots there. Kind of "blink and you miss it" stuff, but even so it's still News at Ten....

Guardians of the Galaxy 2

Guardians of the Galaxy films seem to use a different set of colours from other science fiction films. They seem to use all of them.

If you like your action bold, incredible and full of snappy comebacks then you'll like this latest instalment of the franchise. Just as you would have liked the first one.

I was talking to someone who had stayed out 'till after midnight to see the first showing of the new film and he was a bit "Meh" about it, but I reckon the film is lot better than "Meh".

The characters develop a bit. We get some new ones. An old one is killed off to make for a bit of pathos. And Sylvester Stallone makes an appearance. What's not to like?

SatNav and NavSat

We went from Hull to Harrogate on Sunday. And then, because we wanted to get home, we went from Harrogate to Hull. On the way back the sat. nav. tried to send us a different way from the one it used for the outbound journey.

I hate this. It happens most of the times that I go somewhere and then, surprise, surprise, come home again. It reminds me of one of my favourite railway station jokes:

Customer: "I'd like to buy a return ticket please."
Ticket seller: "Where to?"
Customer: "Back here of course...."

Anyhoo, for any navigation software writers out there, here are a couple of tips for your next version. 

  1. If I try to plot a route that seems to be the direct reverse of the one I've just driven, just reverse the route and give it straight back to me. 
  2. If you're planning a route from A to B, plan it from B to A as well and compare them. Then pick the best one. 

Rob on MasterChef

We're in the finals week of MasterChef, a BBC cooking competition that is taking up more telly time than I'm happy with to be honest.

I'm afraid I could never take cooking (or indeed anything in life) as seriously as these people do. There's undoubtedly a lot of passion, effort and skill being applied to make these amazing meals, but I can't help thinking that everyone is trying a bit too hard here. After all, it's just food. Right

I'd love to have a chance to take part. I can imagine the hushed and reverential commentary:

"...and Robert is preparing his signature dish, Sausage and Potato Surprise. He's thrown the potatoes in the oven and now he's playing Mario Kart on his Nintendo Switch......"

Buy this Arduino Book

If you're looking for a book about the Arduino that is stunning value for money, just head out to your local newsagents and track down a copy of the latest Teach In from Everyday and Practical Electronics (or EPE). It provides an excellent introduction to the Arduino device and then, as a bonus, adds a bunch of chapters about PIC development and some other good stuff.

Like all of the EPE publications, this is well written, technically accurate and laid out in an easy to read manner. And you even get a CD-ROM with lots of useful stuff on it too. 

Full Disclosure: Many years ago I helped Ian and Tony to write a Teach-In for the magazine. It's nice to see that Ian is still writing for them, there's a lovely piece from him about state machines in the back of this very publication. 

A must-buy in my opinion.

Great Hardware Meetup at c4di

Meetup.PNG

Just had one of our best Hardware Meetups of the year. Not that the others haven't been great, but at this one we had loads of new members, lots of excited talk and some really interesting hardware that folks had brought along. We've still got room for more folks though. If you fancy coming along to the meetups you can find out more here.

If you're having bother finding us, we're in the bottom of the shiny gold c4di building. Doors open at 6:00pm or so.