Double Aibo Fun

I mentioned a while back that one of the robot dogs has a broken battery and I was getting a new one. It arrived today. Above is the battery we got. We just had to drop a couple of flat topped cells into it. They can be found here. We were able to have both dogs wandering around which was rather nice.

I took the picture with the Mint RF70 instant camera using the built-in flash. I’m quite happy with this one.

Using a Hannimex pro550 Flash with a Mint RF70

Something of a minority interest here folks. But, as I’ve said before, My Blog. Anyhoo, I finally got around to making an adapter to plug the big flash gun on the right into the funky camera on the left. I’d been a bit nervous about doing this because when you stick a plug into something you instantly have a new way of breaking it. I was worried that waggling the plug might damage the camera socket. Fortunately Switch Electronics (based in Hull) had exactly what I needed for the princely sum of 66 pence. It’s a right angle plug that fits nice and flush on the camera and doesn’t look like it will do any damage.

Note that if you do decide to use a plug like this, make sure that you fit the round rubber ring (you and see it on the left hand side of the image above) over the wire before you solder the wire onto the plug. The ring holds the case on. If, like me, you forget this important detail any people in the room with you will learn some “interesting new words” when you realise that you now have to take off the plug you have just soldered on so that the ring can be fitted. Fortunately I was able to get the ring around the plug on the other end of the cable, but you might not be so lucky.

I got the flash going and figured out how to use it. It has automatic and manual modes. When “white” is selected you get full power. Set the dial on the side to the speed of your film (remember film?) and then you can measure the required aperture against the distance your subject is away from the flash. Set it to green and you can fix the aperture (remember aperture?) and the flash will measure the light reflected from your subject and make the exposure right. Red does the same job, but at higher power so you can use a smaller aperture.

I took some pictures that came out really well. They are of people, so they won’t be appearing in the blog (company policy) but take it from me that the combination works a treat. Especially if you point the flash at the ceiling so that the light is spread out.

One final tip. Don’t look directly at the flash when testing it. This can leave you with coloured blobs in your vision for the next hour or so…..

CMD inside PowerShell

This post is for all the old-timers out there who have fond memories of the MS-DOS command prompt and have bother remembering all the new-fangled (but awfully powerful) PowerShell commands in Windows. You can get back all your command prompt goodness by with the command cmd, which starts a command processor with all the old style commands. As you can see above.

I’ve just had to use this when while deploying a web application to a Linux-powered device. I had a bunch of image files that had the extension “.jpg” which were referred to in the code as “.JPG”. The Windows filestore doesn’t mind this. But Linux does. So all my image links were broken. What I wanted to do was rename all the extensions. You can probably do this in PowerShell. But I can definitely do it in MS-DOS:

rename *.jpg *.JPG

So it was in with the old, out with the rename and the site now works. And I, not for the first time, must try to focus on greater consistency in my coding….

Getting started with JavaScript and hardware is super easy

I’m writing the final chapter of the book at the moment. I’m calling it “JavaScript technologies”. The idea is to leave the reader with some ideas of things that they can do with JavaScript that they might not expect. For example, how about a website that you can visit to turn a light on and off?

This has turned out to be a wonderful example of how simple it is to deploy complex technology today. You can start with an empty Raspberry Pi and a memory card and within a few minutes you an have a device that you can attach to your home network and access remotely. You can make the device host a web server, wire up a few pins (see above) and have a site you can access with the browser in your phone to make the light work. Completely amazing.

Dead Dog

After the success of the debut of “Bluey” at the hardware meetup last week I thought I’d get my other robot dog, “Digby II” working. Unfortunately he is not well. His 20 year old battery has finally given up the ghost so we are down to being a one-dog family. There are people who will put new cells into an old battery. You can also make your own battery controller and build your own batteries. Or you can get a battery made for you. I’ve gone for the last option. This should solve the problem and make it really easy to replace the batteries if they wear out again. Hopefully we can get the dogs back in action together before Christmas.

Getting a Notion

One of the takeaways from the DDD event a while back was that I need to take a look at Notion. At the moment I manage my life using a single Word document and a few carefully named folders. That has been showing strain for a while. I’d really like to do proper project management and also keep track of things I’ve found out about stuff. I think that Notion will do all this, and probably a lot more, so I’ve signed up and installed a bunch of copies on machines around the place. I think this is going to be fun.

ChatGPT vs Eliza - round 2

After yesterday's post I asked ChatGPT to compare ChatGPT and Eliza. It wrote this:

ChatpGPT and Eliza are both AI-powered conversational systems, but they are quite different in terms of their capabilities and intended uses.

ChatpGPT is a state-of-the-art language model developed by OpenAI that is capable of generating human-like text in response to input from a user. It can be used for a variety of purposes, including generating creative writing, responding to customer inquiries, or engaging in conversation with users.

Eliza, on the other hand, is a much simpler program that was developed in the 1960s. It uses a set of rules and patterns to generate responses to user input, and is intended primarily as a demonstration of how computers can simulate conversation. Unlike ChatpGPT, Eliza is not capable of generating original text and is only able to produce responses based on the rules that it has been programmed with.

Overall, ChatpGPT is a much more advanced and capable system than Eliza, but Eliza has its own unique place in the history of AI.

You could believe a person wrote this, just like you could believe Eliza was a psychiatrist. But if you look closer you see a well put together pastiche of a few facts gleaned from the web, plus one paragraph straight from the sales brochure. It’s cleverly done. But I still don’t think it’s clever.

Eliza vs GPT

Many years ago there was a program called Eliza. It was very good at making people think it was human. I came across a Basic version in “More Basic Computer Games”, typed it into my Micro-Tan and got it working. It was great fun. It pretended to be a type of psychiatrist but all it ever did was parrot back to you what you had entered. My favourite bit of the code was the part which changed "I” to “Your” and “Me” to “You” etc so that it could be sent back to the user as if the computer understood what you had just written. What struck me about the reaction of other people to the program was how easy it was to make them think the thing understood what they had entered and, which is much more scary, how keen folks were for this to be the case. They really wanted to believe the software was properly clever. Me, I just wanted to type in things like “I’ve just shot grandma” so that I could get back the response “You’ve just shot grandma? Tell me more about your family”.

I was strongly reminded of Eliza when Ross was showing me how good ChatGPT is at writing programs. He asked for some Arduino code to make lights flash in response to sensors and what came back looked like fairly convincing C. It was very impressive. But it it is still not clever. It is just taking a bunch of stuff from you, looking things up and then crafting a response that chimes with what you expected to see. Sometimes it might combine things in ways you don’t expect, sometimes it will find things that strike you as original. And it might react differently from Eliza if you tell it you just shot grandma. But I don’t think it’s clever like we are. That’s not to say that it won’t change the world though. It will. For one thing search engines are going to get a lot easier to use and a lot more conversational. For another, the essay and the programming exercise are about to get massively devalued as a way of assessing knowledge. Some students will use ChatGPT to craft their submissions. Others will question why they are being asked to write something which can be done better by a machine.

For me the hardest thing about writing and programming has never been about turning out the prose or getting the code to work (although it can be fiddly), it has been working out what the program needs to do or thinking up a good subject and then crafting a narrative that works well with it. I like to think that with more of the “grunt work” out of the way with tools like ChatGPT we could focus our efforts on these human parts of problem solving. I’m looking forward to playing with it.

Christmas Meetup Fun at Hull Makerspace

We had our Hardware Group Christmas Meetup at Hull Makerspace this evening. We had sweets, mince pies, instant pictures, a robot dog and a digital trombone. As you do. Much fun was had. I’d taken along “Bluey” my Sony Aibo (he’s called Bluey because he’s, well, bluey) and he was on fine form. He could easily see his pink ball against the Makerspace floor and it was great to watch him chasing it around the place. We’ll be having more events next year. I’ll keep you posted.

Instax Overdrive

It is quite fun working with chemical photography instead of digital. It behaves in ways you might not expect. If you put too much light on the Instax film it goes dark and then produces a negative of the image. The picture on the left shows this in action. It is supposed to be a multiple exposure of some lights.

The centres of the bulbs should be bright white rather than purple or green. This is due to some chemical reaction or other. People have even managed to create proper looking pictures by shining very powerful flashes onto negative images. Instant photography has made picture taking harder, costlier and more of a lottery in terms of what you get. I love it.

Dal-E 2 and Kids

“Two unicorns on a roofgaRDEN having tea”

Number one granddaughter came to see us today. We were talking about stuff and playing games, as you do. And then I thought it might be fun to show her Dall-E 2. This is a lump of cloud-based AI that will take text from you and make a matching picture. We decided we wanted to see two unicorns on a rooftop garden having tea. Above you can see one of the results.

Then we tried some more phrases and we found that some worked, and some didn’t. All the time I was wondering whether showing this stuff to a five-year-old was the right thing to do. Would she now give up drawing and work on the basis that she can just ask for pictures to be drawn when she wants one? I really hope not. And actually, I don’t think she will.

The program is very clever but pretty soon we started to find that it tended to head off for the one thing it knew about, which was not always what we wanted. Tools like these are going to find their way into our lives whether we want them or not and knowing what they are and how they are limited is really important.

DDD North in Hull was completely wonderful

DDD North today at Hull University. Lots of interesting talks. Including one from me. First live event since forever. What’s not to love. Although I really wish I’d taken a notebook and pen. Completely forgot how useful they are.

The first session I went to was by Derek Graham. How to be psychic. It turns out that you don’t actually have to be psychic to write useful code. But if you get it right you can certainly appear to be. This was a great description of sensible things to do when writing software. I particularly liked his tip for someone who didn’t know what to make. He said “Make something”. There’s a hugely important lesson here for folks learning to program. “Your first attempt doesn’t have to be right”. Even if you are an expert it is virtually guaranteed that your first attempt will not do everything the problem demands. So why not lean into that and make something that kind of works and then have a framework that lets you iterate. I was also impressed by the term “walking skeleton”. A version that does the absolute minimum the requirements need but will serve as the basis of more discussion and development to get to the finished solution. Brian even mentioned UML (great stuff) and a tool that I’m going to look at for making diagrams from text: https://plantuml.com/

The second session was by Luce Carter. Productivity++: Things I Have Learned from Managing My ADHD. This was a very confident presentation of strong content. Turns out that it is really all about organisation and mindset. I’m not sure I’m prone to ADHD any more than I think I might be psychic. But it was a great description of tools and techniques that you can use to keep yourself moving forwards. Luce mentioned a tool called Notion which looks really interesting. I organise my work using a single word file that contains my diary and all my projects. Not optimal. Notion looks super useful. It stores data in the cloud and runs across all my devices.

Third session was by John Stavely. Getting started with Satellite IoT. It turns out that there is low-cost gear you can get which lets you send packets of data to a satellite as it flies overhead. Then, when the satellite goes over a downlink it will send the data down to earth where it appears in MQTT messages that can pop up in your Azure IoT Hub application. You have to do some work to predict when to send to the satellite. They come along every now and then and precess as they orbit the earth. You also have to do a bit of error correction and bit twiddling to make the best of the 64 bytes you can send. But it means you could make something that can send data from anywhere on the surface of the earth. Amazing. At the moment it is even free to use. You’ll have to buy some kit and you need somewhere with a good view of the sky, but it works. John has a GitHub site here with his software and more details.

Thanks to DDD North for the picture

Then it was time for my talk. I was talking about getting started on the internet. In rhyme. I changed into my red jacket and went for it. I really enjoyed the talk. I just hope the audience did. I’m not sure how many folks learned much, but I like to think they picked up a few interesting rhymes in amongst the cheese puns. I was quite merciless in my extraction of funds for Red Nose Day. I think for everyone who came along it was the most expensive experience they’ve had for a while. But by the end we’d raised over 120 pounds for a super-good cause. The audience were fantastic. They rolled with all the punches, threw money at me (in the form of carefully folded five-pound notes - not painful coins) and went along with everything. I’d taken my Mint TL70 and I was taking pictures of the audience wearing my big hat (for a fee of course). The camera did a great job. People loved having a physical picture of themselves to take away. You can donate too if you like. Go here.

The final session I went to was from Don Wibier of DevExpress. State Management in Blazor. I’m getting very interested in Blazor. It will be featuring in the next version of the C# Yellow Book. There was some great technical content, but my mind was a bit full of bad rhymes and not in a state to absorb a great deal. Fortunately, Don has put a whole slew of videos on YouTube which I now intend to search out.

Thanks so much to the DDD team, and particularly Boss, for setting up such a wonderful event.