Blog

Christmas Pygames: Solar System Simulator and Subbuteo

Coding
Over the last few months I have been super busy and not really had much time to undergo any large coding projects outside of work. I therefore decided to undertake some fun projects that I could just tweak and add features in my spare time. I decided to make some games on Pygame as I haven't had too much experience with building user interfaces before, and there is something I find very satisfying about being able to see a graphical representation of how my code is working. Over the last few weeks I have building and adding features to a solar system simulator. (Code: https://github.com/domrigby/funPlanetSim.git). This was my first proper experience of building a (very bad) user interface. I found it quite enjoyable building all the classes I would need…
Read More

Python Object Based Sudoku Solver

Coding
GITHUB: code here Recently I have been spending most of my time trying to learn C and work on the 8-bit computer, and I realised the other day that I had not actually done any proper Python in over a month. Python was the first language I learnt and to this day is probably still my favourite due to its readability and wide selections of libraries. Therefore I set myself the challenge to build a Sudoku solver during my lunch breaks. I absolutely love object orientated programming, and I've been doing a lot of C recently, I wanted to make this object oriented as possible. Here my plan: I am going to make each level of the grid an object. There will be cell objects. This will be for one…
Read More

How To Make Commands For Linux Terminal. Compile and Run Your C Code in One Command

Coding, Tips
My friend has just started learning C and he was talking about how it was irritating that you couldn't run the code with one command like you can with Python. I agreed this was irritating, so I decided to take advantage of the customisability of Linux and make a command to do this for you. Quick: clone this repository, make the setup file executable using "sudo chmod +x setup" and then run "./setup". Steps: 1: Create a bash script Bash is the programming language used by the shell on Linux. You can create a bash script with the extension .sh, but you can also make a file without an extension by starting the file #! /bin/bash to create a bash environment. $ gedit FILENAME 2: Add your bash code As…
Read More

Basic Python Tutorial

Coding
This is an article for a friend who is learning Python from scratch. I will be adding to it over the next few weeks when I have time. If you are using Python on Windows, use the install here. I would also recommend downloading Visual Studio here. It is an IDE which will give you some tips as you go along. After installing, go to the extensions on the top left of the screen and install the Python extension. Extensions is the fifth icon down Very Basic Python A few basic functions: print() will write whatever is in the brackets to the screen. Eg print(10) would appear as 10 on the screen.# the hashtag sign on Python is the for commenting. It means that the program won't read whatever is…
Read More

From Transistors to an 8-bit Computer

Computers
A few weeks ago, a memory popped up on my phone of a 3-bit added I had made from purely transistors and resistors. I remember building this after being fascinated by how computers could take electric charges and use clever circuitry to turn these into complex mathematical computations. After seeing went to watch a quick video to remind me of the logic behind this, and I really got in a rabbit hole. After watching a few video series, mainly Ben Eater's breadboard computer, I was really inspired to take up a challenge of my own, something that would really force me to truly understand the low-level behavior of a basic computer. https://www.youtube.com/watch?v=HyznrdDSSGM&list=PLowKtXNTBypGqImE405J2565dvjafglHU&ab_channel=BenEater The video series which inspired me to start this project. I would highly reccomend it. Over the next…
Read More

Twitter API bot for generating image out of tweets using tweepy and Craiyon.io

Coding
Find the code: here. After seeing a variety of automated accounts on Twitter recently, I decided to apply for access to the Twitter API for developers. I decided to code it in Python as Twitter has an excellent library called Tweepy which can perform many Twitter-based tasks such as retrieving Tweets or data about specific users. Now the problem of deciding what would be useful or fun to code. Having seen a lot of tweets about the Dall-E or 'Craiyon AI', a picture-generating AI, I decided to make a bot that would return the images generated by the text of the tweet that the account had been tagged in, Here I will post the process of making a bot along with certain problems I had to overcome in the hope…
Read More