Support UK Arts


The arts and entertainment industries in the UK need your help. We're pretty deep into this global pandemic, and the UK government has failed to provide any emergency funding for them, in contrast to our neighbours in Europe and further afield. Aside from creating a lot of economic value, the people working in these sectors make the UK the cultural hub it's known as.

Two things I've joined so far to support the things I love:

NTS Radio plays a huge variety of music from great guest DJs and has no advertising. They've opened up a monthly subscription to help continue their work and keep the station sustainable.

Truants is probably the best music blog in the UK, and they do a great mix series too. Subscribe to their Patreon to get the writers paid.

There's loads of other causes and platforms running similar schemes, so I'd encourage anyone to chip in a few quid to try and help.

Edit: The government has since offered some kind of funding, but you should still support the people and organisations you can!

Anatomy of a Twitter Bot


The past couple of weeks I've been looking back on code I wrote during and shortly after the bootcamp. It's strange because there's been a fair few 'Who wrote this?' moments, including for an early project, which was building a Twitter bot with Node.js.

The now-retired bot tweeted a picture of concrete architecture every hour, using the Unsplash API and package for random images and a package called Twit to interact with the Twitter API. The whole thing ran continuously on a Raspberry Pi. You can find the repo on GitHub.

In steps, the bot:

At the time I thought that while it was a very simple bit of code it was fairly slick. However with a couple of months hindsight that is definitely not the case.

Concrete Pics on Twitter

There are a lot of nested functions and callbacks that make it pretty hard to read what's going on. In a future refactor I'll separate these out into separate files with asynchronous functions, give them better comments(!), and have everything called by a main init function.

By taking this approach it would be easy to modularise the whole thing to add and remove functionality provided by the Twitter API, and turn them to different things. I saw a great one recently that tweets randomised Haikus, which is a form I'd like to experiment with.

There's a few other problems with redundant code and error handling, but the fun thing is that I can come back to this in my downtime (I'm employed now by the way, more on that some other time) with the benefit of more knowledge every time.

More to come on in terms of little programs like this!

Black Lives Matter


It's felt inappropriate to post about tech recently given the importance of anti-racism protests in the USA and across the world. Everyone should be treated with respect regardless of their race, and the persecution of Black people must end. Black Lives Matter.

Here are a couple of things that I've found useful for reading, donations, and ways to support:

Black Lives Matter - ways you can help


'Why I'm No Longer Speaking To White People About Race' by Reni Eddo-Lodge

'Natives: Race and Class in the Ruins of Empire' by Akala

'The End of Policing' by Alex S. Vitale

Also, If you're in the UK it's easy to write to your local MP and ask them to cease sales of tear gas and rubber bullets to the USA.

Find their contact details on the parliament website.

More posts