Skip to main content

Welcome to ZX81.org.uk

Category: Computing

Unsociable Christmas Tree (Part 2)

Back in 2020 I talked about my Raspberry Pi powered Christmas Tree. Today’s blog delves into what I’ve done this year.

Previously, I decided that setting up a web server on which family members could change the light patterns on the tree was too boring. At the time, I was thinking of extending the sample Python code – much as I did with the OpenCV frontend – with a simple Python-based web server.

Unsociable Christmas Tree

Last year I got myself a Raspberry Pi-powered Christmas Tree. It has eleven LEDs, and you can program the Pi to switch them on and off.

Naturally, doing all that takes time, and last year I just didn’t have very much. I just downloaded the sample project and set it up with a random flashing pattern.

It amused me, anyway.

This year I wanted to get a little more sophisticated. I decided that it should be interactive. My first thought was a web server where people could connect using their phones and change the LED patterns. Then I thought better of it. Because of COVID we have no guests, rendering it far less interesting. Also, setting up a web server is hardly very exciting.

When to use -retainCount?

Preamble: In pre-Swift and pre-ARC days of development on Apple’s platforms, it was necessary to “manually” retain and release objects as you used and discarded them. One common, but incorrect, pattern that kept reappearing was the idea that you could use the retainCount method to ascertain whether an object was still being used.

## When to use -retainCount? Never!

There’s pretty much never a good reason to use -retainCount. Here’s a short and mildly abusive explanation why.

iPod vs Zune for the UK

iPod vs Zune

I just read Daniel Eran Dilger’s “Winter 2007 Buyer?s Guide: Microsoft Zune 8 vs iPod Nano” but I felt that it was missing something very important for readers outside the United States.

So to fill that void here is my attempt. I have not actually used any of the new Zunes or iPods but I don’t necessarily feel that this has any material impact on the final result1.

Windows Mobile 5 on Virgin Mobile UK

When I got my new phone, a HTC P4350, I quickly managed to make and receive phone calls and text messages. I even connected straight to the Internet over WiFi and (slowly) over GPRS. It never occured to me that sending a MMS, a picture message, would be so complicated.

With a “Pow!” and a “Zap!” I asked their technical support people and got the answer. It works in two parts, firstly the GPRS side, which you can find in the Connections tab of the Settings screen:

The Promise, The Limits, And The Beauty Of Software

This evening I went along to this years Turing Lecture, an annual presentation hosted by the British Computer Society (of which I’m a professional member) and the Institution of Engineering and Technology. This years lecture was given by Grady Booch, someone that most people in IT will either have heard of or, at the very least, been influenced by. He started his early career working on object oriented design and is currently passionately working on a project to collect the architectures of a hundred computer systems.