List Comprehensions & Slicing in Python

This post is going to cover comprehensions and slicing of data sets in Python. This topic is what makes Python so loved by programmers because it allows us to filter elements from a collection and transform those elements in the filtering process using one very concise expression where other languages (such as Java) may require 5 or 6 lines of code to do the same thing. // These are notes taken from my lecture at university The following is what...Read more

Data Structures and Loops in Python

This post is going to be the first post that I write on the topic of Python and will cover data structures and various implementations. I will be discussing lists, dictionaries, sets and tuples as well as loops and data structures. // These are notes taken from my lectures. Lists The key points of a list are that they are ordered, flexible (don’t need to be initialised with a size) and can contain different data types within the list i.e....Read more
How Geolocation Works  to Calculate Distances on c4rt.uk

How Geolocation Works to Calculate Distances on c4rt.uk

If you’ve had a play around with my shopping cart builder c4rt, you would have seen that I have given it the ability to restrict distances on orders people make and I wanted to write a little post explaining how all that works because I think it’s pretty cool. I could have used the Google distance matrix API to complete these calculations but that would have meant calling the Google API to get the physical location of each address, and...Read more
Using the OMDB (IMDB) API to Create an Application Using Node.js

Using the OMDB (IMDB) API to Create an Application Using Node.js

In this post I’m going to build a Node.js app that allows that user to search through the movie database and then build a page of results. It’s not going to be pretty, it’s just (as all my posts are) a reference for my future self who has forgotten all this stuff. Exploring the Open Movie Database API Before getting started creating the app. Let’s take a look at the API we’re going to be working with to populate our...Read more

Setting Up a New “Express” App Using Node.js and Goorm IDE

The objectives of this exercise is to create an app in Node.js that has everything I need to copy and paste stuff from in the future to quickly get setup. If you want to know how to get setup with a development environment to give some of this stuff a go then have a little read of Working With the Command Line in Goorm IDE (Node.js) – Backend Web Development. The first thing is to setup routes to various directories...Read more

Working With the Command Line in Goorm IDE (Node.js) – Backend Web Development

If you’d like to follow along (I’m writing this as notes for my future self) then you want to head on over to goorm.io and get yourself setup on their platform. They are a “full stack” web development IDE and allow you to access various virtual environments called “containers”. I this post I’m going to be talking about the command line, what it is, what we use it for and what commands we can use in it. Getting setup before...Read more

Making a RGB Colour Guessing Game in JavaScript – Part 3

We left off from the second post with a game that was fully functional and in this post we’re going to style it. You can view the game by clicking here to get a feel for what we’re going to cover in this post. We’re aiming for the game to look like the game on the left (shown above) and at the moment we’re looking like the game on the right. Here is a list of the things that we...Read more

Making a RGB Colour Guessing Game in JavaScript – Part 2

In the first post in the making the colour guessing game we left off with a functional game and the last thing that we needed to do was neaten the page up (style the page etc) and add a bit more functionality (like a reset button or the difficulty button). You can see a working example of where we’re currently at by visiting this link. Similarly, if you’d like to catch up on how we got to this point then...Read more

Making a RGB Colour Guessing Game in JavaScript – Part 1

This is the first complete “game” that I’m going to be making in JavaScript albeit a very simple one. The basic premise is to generate 6 or 3 (depending on difficulty) different colours and display one RGB value above the colours. The aim is for the player to correctly identify (hence improving their skills at recognising RGB colours) the correct colour from the ones displayed. This is going to be tying together a lot of stuff that I’ve been learning...Read more

Events in JavaScript – Part 2 – Coding a “ToDo list”

In the last post Events in JavaScript – Part 1 – Coding a “Score Keeper Game” I looked at using events to code a “gaming score keeper” that had event listeners (“click” and “change”) that allowed us to keep track of our score when playing a game with someone. This post is going to carry on from that last one and this time I’m going to be using event listeners to make a simple ToDo list (looks wise – we...Read more