DDD North 2026 Registration Now Open
/You can now register here for the conference. Free to attend, the food is great, the environment wonderful and I’m doing a session. So, that’s two out of three….
Rob Miles on the web. Also available in Real Life (tm)
You can now register here for the conference. Free to attend, the food is great, the environment wonderful and I’m doing a session. So, that’s two out of three….
Just watched Linley and managed to get both the murderer and the other murderer. Very pleased with myself.
When in doubt, start with a joke:
What do you call an underwater dog?
A sub-woofer.
Well, I like it. But it does bring to mind my “technical problem of the week”. On Friday I was seduced by a massively reduced massive sound system that I could bung underneath my telly to boost the sound a bit. On Saturday I gave the system a quick test and having found that it seemed OK I then drilled holes and fixed things to walls. Today I discovered that it doesn’t work properly. The sound from the sub-woofer (see joke above) was intermittent. My least-favourite kind of fault, and usually the hardest to fix. Oh well. That explains the reduced price.
The sub-woofer is the speaker that brings all the crunchy bass sounds to the party and without it you haven’t got much of a party. And with a sub-woofer for only half the time you have a party that makes you feel seasick after a while. So I did what any sane person would do. I did a quick search of the Internets. Fortunately, this was one of those increasingly rare occasions where my search took me to a useful answer. Apparently the wireless connection to the subwoofer can be upset by proximity to Wi-Fi hardware. Like the access point I had right next to the TV. I moved things around a bit and the woofer now sounds great all the time. So, if you’ve got wireless sound stuff which isn’t behaving you might like to check for interfering signals.
Notice how I’ve left off the Number scale on the side
I’m not the kind of person who obsesses over their blog traffic (or am I?) but I’ve noticed over the last few weeks that I get peaks in traffic over the weekend. Very strange. I don’t think it is people going “At last-it’s the end of the week and I can spend my leisure time catching up with Rob”. I think it is more likely that the net might be a bit quieter during the weekend and so that’s when systems go out and scrape it for words to train their large language models. My blog contains quite a few words, so I get a lot of hits on my pages.
This does mean, of course, that my writings are all being stolen without my knowledge or permission, and they will be incorporated into random systems to make them appear ever so slightly more human. Or, at least more Rob. I don’t mind this too much though, if this means that my gift to posterity is devices that sound a bit like me, then I’m OK with that. And, what that in mind, here’s my latest grate thort:
I’ve started wearing high-visibility clothing because my wardrobe is very dark inside.
There are versions for all the different Instax sizes
If you have a bunch of Instax instant photos lying around you might like to print out this Instax Box Picture Holder. It holds a bunch of photos and you can also slot pictures around the sides. It works really well.
DDD North is here again. It’s all happening on the 28th of February. You can find out more, and register soon, here. I’m doing a presentation about my fifty years of programming. And what I’ve learned from it. It won’t last long. Obviously. But it would be lovely to see you if you fancied coming along.
Great fun was had on our first Hardware Meetup field trip today. We we started with a look through the proud possessions of an accomplished engineer who is sadly now no longer with us. There was some amazing stuff there at very reasonable prices. I’ve got no particular need for a “CRT Tester/Rejuvenator” although I was tempted, particularly as it has a setting marked “Super Rejuvenate”.
I picked up some soldering hardware and everyone else found something interesting. Then it was back into the cars and over to Ross’s (is that the right number of sses?) place for a look at his latest piano hardware.
Player Piano plus mechanism
This manual piano has been made automatic by adding a mechanism underneath the keys that pushes up the back of the key and plays a note. The piano also has keyboard lights that can show which keys are playing, or help teach you keyboard skills.
Driving the notes
These are the solenoids which drive the keys from underneath the piano.
The two pianos are linked together
Baby Grand
Ross and his team have been making pianos that play themselves for a while now. They’ve branched out into keyboard sensing too, so that they can change any piano into a MIDI device by simply laying a sensor bar across the top of the keys. Tunes played on the otherwise unmodified baby grand are duplicated on the receiving piano.
Finally we headed for dinner at the Helal Tandoori in Louth which was excellent. After that it was time to head home. The next hardware meetup will be on the 5th of February, back in Hull Makerspace.
I saw Tim Berners-Lee talk at Scarborough a while back. He’s a great public speaker. Plus, he invented the World Wide Web. He also writes books. His latest, This is for Everyone, describes how he came to invent the web, what happened to his invention and where he thinks it should go next. It’s a first-class properly thought provoking read. For me the best bits are the first bit, where he describes the circumstances that led to the development of the web, and the last bits where he puts the latest technical developments, including AI, into a web context.
The middle bit is interesting too, but it left me feeling a bit depressed as it tells the story of a system invented to improve the lot of everyone being bent and twisted into shapes that benefit just the corporate few. Having said that though, it is very impressive that so many of the original. open ideals still underpin the web today.
The book is thoroughly upbeat about technology and it would be lovely to think that ideas such as Solid (which propose managed storage for all) could gain widespread acceptance. I’m going to have a look at the technology, and I suggest that you do too.
I’ve been using AI to write code for a while. Up until recently I was just asking ChatGPT questions and then copying its answers into Visual Studio Code. This works fairly well and is good for me because I have a ChatGPT subscription. But, having seen what Claude can do inside Visual Studio Code I thought I’d give that a whirl.
At around 4:00pm today I decided to add rotary encoders to my Python powered Connected Little Boxes. I wanted an encoder manager that would generate events that other mangers could use to control things. Claude looked at the pattern for other managers and built the manager for me. Then I asked it to make a lamp manger that uses two encoders to control the brightness and colour of a pixel lamp. It did that too. But it didn’t quite work. I took a look at the code and had the following conversation with Claude:
This is exactly what I would have said to a human developer who had come to me and shown me their code (I typed the bit at the top). Claude took the input, modified the relevant source files and the device now works perfectly.
My first role when I graduated included working as the “Duty Programmer”. I sat in an office next to Computer Reception and any user with a problem could come along, show me their code listing and I would suggest how to fix it. I loved the work. New puzzles every day.
One of the best things about the job was that sometimes you didn’t have to have any understanding of the software being shown to you. The user would get half way through describing the fault and then say “Aha! That’s what it is!” and go off and fix it themselves. Turns out explaining a problem to someone else often ends up with you fixing it.
But on the occasions they were properly stuck I’d have to dig into their code and help them work out what was going wrong. After a few years I got quite good at it. And now I seem to have come full circle in my career. Only I’m not looking at code written by someone else, I’m looking at code written by something else. Interesting times.
Python is a wonderful programming language. But, like most languages, there are things about it that you just have to know. You can’t infer the existence of things like *args and **kwargs. You need to be told about them, what they do and how best to use them.
The Visually Explained series of videos does a fantastic job of placing Python elements in context. It covers lots of fiddly things about the language which are super powerful but you might not know about. They are impeccably presented and just the right length. If there’s something you’re grappling with, or you just want to broaden your Python horizons, you should take a look at them.
This is a nifty little camera from a while back. It takes Polaroid 600 film and has a funky flash flip up front. I got this one at the same time as I got the Polaroid MiniPortrait. I’m not sure which was thrown in with which. The camera works well. I love the way that when you move the slider on the left from tree to flower it slides in another lens to adjust the focus . Both lenses are plastic, so you don’t get anything tack sharp. But you do get pleasing colours and contrast.
There’s not that much more to say about it really. The flash normally fires for every picture. If you don’t want flash you can press the button which is wrapped around the release to trigger the shutter on its own (but you’d best brace the camera against something solid or you might be entering a world of camera shake).
If you want to dip your toe in instant photography you can pick these up pretty cheaply and they look really cool (I think) which is nice.
This shot shows the limits of the close focus. The bottoms of the vases are nice and sharp, but the flowerheads are a bit blurred because they are closer to the camera. But it made a good job of exposure and lighting.
Someone has joined Match.com using my email address. This is bad news for Shay (34) from Sacramento (+23 others) who I’ve been told are waiting for my swipe. However, it is even worse news for the other Rob Miles who is out there wondering why he is being ignored….
You don’t say
We had our gas and electricity meters replaced yesterday with new smart ones. The process was quick and efficient. Although it felt strange to be in a house where nothing worked for the hour or so it took to swap the electricity one. The data feeds seem to be working now, although it might take a bit of time for the insights to catch up.
I was looking forward to getting a gadget to put in the kitchen to monitor my energy usage, but these aren’t given away anymore. Apparently nobody uses them and they end up in the back of a drawer. Everything can be done via the app. I’m tempted to see if I can’t make something to provide a display.
We did have a brief go with Agile Octopus a while back but we gave up when the prices reached the point where it was impossible to do things economically for long periods of the day. Perhaps we’ll take a look at some of the more adventurous tariffs in the future. I’m just looking forward to not having to submit meter readings every month.
Make sure that “Keep Tabs” is switched off
Layout is important in Python. How code is indented tells the compiler when code runs. You can indent your program text using tabs or spaces but you need to be consistent about this. Otherwise you will get impossible errors telling you that some of your code is wrong when it looks exactly right on the screen.
By default the Python editor in FreeCAD uses tabs to indicate indents. However, lots of other programs don't. If you use something like ChatGPT to make some code to paste in your FreeCAD program you might have lots of indenting errors when you try to run it. Or at least, I did.
There's no neat solution to this but you can make your life much easier by telling FreeCAD to use spaces for indents, rather than tabs. You can do this on the Edit>Preference menu at the Python Editor tab. This lets you set tab and indent sizes. Change the setting from "Keep tabs" to "Insert spaces".
The picture above was taken with the new (to me) Polaroid Microportrait camera that I got yesterday. I had to put the camera and my Lomo Graflok Instax film back in a dark bag, extract a sheet of film from the film back and load it into the camera, take the camera out of the bag, take the shot, put the camera back in the dark bag, take the sheet of film out of the camera, put it back in the film back, take the film back out of the dark bag and eject the film to process it. Not something I’ll be doing again in a hurry.
Instax film is smaller than the original pack film so the images don’t fill the frame properly. I had to guess the exposure a bit because I wasn’t sure how powerful the flash was and I’m not convinced I set the focus properly. The results show potential though. I’ll try a few more later.
The camera is extremely restricted in terms of what you can do with it. The lens is fixed focus, for portraits of people. You can adjust the aperture, but there are only two shutter speeds available. Having said that, it does take the pictures very well and is super fun to use.
I’ve discovered that you can still get packs of film for it, but they stopped making new film over twenty years ago and what is left (which might not work) is selling for at least ten pounds a shot. You do get four pictures per shot though. Perhaps when I’m rich…
What I plan to do next is make a back that will let me use sheet film with camera. A sheet of 4x5 film will cover the entire image with room to spare. Then I will be able to take super high quality portraits.
Got given this today. Well, it was free with another camera I bought. But what a beauty! It’s a Polaroid MinPortrait which was made for taking passport pictures and the like. You can set it to take four shots at the same time, giving four identical pictures, or you can take individual or dual images. It has ultrasonic focusing, a beefy flash (that works) and it is all round awesome. Only snag is that you can’t get the film for it anymore. But I’ve got plans involving Instax Wide instant film. Great fun.
Tuples are a great way to group data together. Say I want to pass into a function the minimum and maximum values for a particular random item. Say I was writing a function to draw stars, and I want to make random ones with points in the range 5 to 20. I can make tuple like this to express the requirement.
points_min_max=(5,20)
This makes me a tuple with the two values. However, when I call random.randint from the random library it wants two individual arguments. I could do this by getting each value out of the tuple and passing it into the call:
random.randint(points_min_max[0],points_min_max[1])
This is not very elegant, and it would be a real pain if I wanted to pass lots of tuple values. So, instead Python lets you do this:
random.randint(*points_min_max)
We just have to specify the name of the tuple variable, preceded by a * which in this context means "unpack". When the function or method is called Python will convert the values in the tuples into individual arguments and then pass those. The order of the arguments matches the order of the values in the tuple.
You can find all the Python Shorts here.
I need to work on my focus
The weather today wasn’t great, so I got the dogs out and took some pictures of them..
“The tip of the iceberg”
Very sorry about this one as well, the idea came to me as I was vacuuming this morning…
Update:
What has happened to my visitor stats after the last two posts. Oh well. True genius is not always recognised at the time….
CatGPT
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.