Introduction

These sections use a coding language called p5.js which is a JavaScript library designed for creatives to use. It is a graphics package which makes learning to code fun and interactive

This website is here to help anyone who is interested in coding. It is aimed at those who are either completely new to coding or want to learn something new. The basic course covers the foundations from the very basics to more advanced features. For those who would rather make something and learn that way there is the learning to code from making games. For the future there will be a section on coding artificial intelligence using p5.js and ML5.js.

The Joy of Coding Course

This course covers a wide range of topics, it is suitable for any age from 8 to 80. It starts with the basics of creating shapes, using colour and animating the shapes through to more advanced aspects of coding. You work through the course of books one at a time building on your knowledge and experience as you go through the course. 

For some of you doing only the first book ‘creating shapes and movement’ will be enough to get a real taste of coding. I am hoping that you don’t stop there but continue the journey of exploring this very creative field and open up a wonderful vista of possibilities. Just keep going, keep learning and you never know where the path will lead you. 

These books are available as eBooks on Amazon (kindle) for £2.99 each. I recommend starting at book 1 and work through them in order, also when using them use the kindle app on your computer and have a split screen so that you have the code in front of you, alternatively you have a tablet, phone or kindle to display the books as you work through the curriculum.

Book 1 Creating Shapes & Movement

In book 1 this is where you start your coding journey one small step at a time. You begin with drawing some regular shapes and text. Once you have mastered creating and colouring the shapes then you can bring them to life and make them move. This section also shows you how can interact with the canvas using your mouse.

Example from the book

Buy the eBook on Amazon £2.99

Book 2 Oscillations, Arrays & 3D Shapes

In book 2 you will cover a range of topics including arrays and oscillations. The use of arrays is a fundamental aspect of coding. They are a way of storing data than can be easily accessed and manipulated. Also in book 2 you will cover 3D shapes which allows you create in a 3D environment. 

Example from the book

Buy the eBook on Amazon £2.99

Book 3 Noise, Classes & Vectors

Book 3 introduces you to a type of random element called perlin noise. This is a smoother and more realistic form of randomness. The is an important ingredient in coding that goes by the name of Object Orientated Programming (OOP for short). It makes use of classes which is a powerful way of coding that many coding languages incorporate. The final part of book 3 covers vectors.

Example from the book

Buy the eBook on Amazon £2.99

Book 4 Keyboard, Mouse & HTML

Book 4 covers a topic broadly called DOM elements that you might use in a website involving CSS, HTML and JavaScript. This section also covers more functionality available for the keyboard and the mouse. A brief look at how you can incorporate the time and date, and using the millis() function to measure the passage of time. 

Example from the book

Buy the eBook on Amazon £2.99

Book 5 Json, Promises & Arrow Functions

Book 5 is primarily about data files in the .json format. This covers how they are created and can be used. JavaScript makes good use of this data file type as do other coding languages. Before moving onto book 6 there are a few additional bits and pieces that cover useful functions like promise, the for/of loop and the arrow functions. 

Example from the book

Buy the eBook on Amazon £2.99

Book 6 Video & Images

Book 6 explores video and images. For this you will need a webcam, most machines have them built in. Using the webcam you can create and manipulate images and video. There is also a brief section on creating .png images that have a transparency.

Example from the book

Buy the eBook on Amazon £2.99

Book 7 Sound and Music

Book 7 explores sound and music. For this you will need a microphone, most machines have them built in. You will be creating and graphing sound using the microphone and downloading free music from this you can create visualisation of the sounds and music. 

Download Music

Example from the book

Buy the eBook on Amazon £2.99

Book 8 Flappy Bird

Creating the famous flappy bird game. You press the spacebar repeatedly to make the bird fly through the gap in the pipes. This draws on mush of what you have learned in the first seven sections. This will be useful later when looking at reinforcement learning in Artificial Intelligence. 

Example from the book

Buy the eBook on Amazon £2.99

Book 9 Space Invaders

A classic game that is far more complex than you might think. Learning how to fire lasers and then delete them once they are off the screen. Moving the aliens from side to side and they move downwards. This isn’t the completed game but there is plenty for you to add your finishing touches to. 

Example from the book

Buy the eBook on Amazon £2.99

Book 10 Asteroids

This another seemingly simple and yet challenging game. You can rotate and move as well as fire and be hit. The asteroids are irregular shapes and disintegrate on being hit. A challenging game to play and one you can add your own score and levels of difficulty. 

Example from the book

Buy the eBook on Amazon £2.99

Book 11 PacMan

This is a game in two parts. The first part is to generate a random maze which follows a well know algorithm. The second part is navigating the maze using control keys. Part three is where you create a version of the PacMan game, the game is not the complete game but one where you can apply the finishing touches. 

Buy the eBook on Amazon £2.99

Book 12 Pendulums and Springs 

This book explores angular velocity and acceleration in simple harmonic motion. Here you will simulate a simple pendulum and a spring. Again this is far from straight forward to effect realistic simulations whether for a game or an artificial intelligence project or to create algorithmic art. 

Example from the book

Buy the eBook on Amazon £2.99

Book 13 Particle Systems

This covers particle systems where they are generated and have forces applied to them, wind and gravity. The final effort is to create a realistic fire/smoke effect using different techniques and blending of images. This would be used to create some very pleasing and gentle effects. 

Example from the book

Buy the eBook on Amazon £2.99

Book 14 Gravity and the Random Walker

Developing further the concept of perlin noise randomness and how to simulate forces such a s gravity, wind, friction and drag. These are linked to mass and acceleration of objects. These are the foundations of simulation models for events in nature which is surprisingly difficult to do.

Buy the eBook on Amazon £2.99

Book 15 Steering Behaviours

This covers objects that are either seeking, fleeing, pursuing, evading, catching, resporning and arrival. These can be features of animal/insect behaviour or something that you might want to use in a games. It builds on some of the concepts already covered with forces and vectors. This is a quite fascinating topic.

Buy the eBook on Amazon £2.99

Book 16 Path Following

This starts with a more natural wander. Scalar projection forms the basis for path following. Path following is where the vehicle seeks a path as its target, it doesn’t just sit on it and follow it (that would be too easy) but meanders along the path in a much more seeking fashion. 

Buy the eBook on Amazon £2.99

Book 17 Classification

This introduces you to the concept of Artificial Intelligence. It is more hands on than just learning about it. You get to build your first one using a library called ml5.js which sits neatly with p5.js. So no new coding language to learn and is a gentle introduction. 

Buy the eBook on Amazon £2.99

Book 18 Regression

After learning about Classification in book 18 you will now explore Regression and the differences between them. This is an opportunity to also explore hyper-parameters and looking a bit more in depth into what makes a neural network work. This is still small steps and a lot of ground to cover.

Buy the eBook on Amazon £2.99

Book 19 Pixels

Using a webcam we can train a neural network to detect when you are in shot or not. You can use your built in webcam otherwise you will need an external one. You will collect the data, save it and train it and then tweak the hyperparameters to improve its performance. 

Buy the eBook on Amazon £2.99

Book 20 Image Classification

This looks at the use of Convolutional Neural Networks. They are a mainstay of image processing with neural networks and machine learning. This simple introduction covers filters, stride, max pooling and how you can create your own layers. In this example you can train it to recognise if you are wearing a mask or not. 

Buy the eBook on Amazon £2.99

Book 21 PoseNet

PoseNet is a pre-trained model that can detect posture and poses. It works with ml5.js and in this section you can use it to determine the joints and parts of the body and match it in real time. You can access the co-ordinates and use them for analysis or creatively in a game. 

Buy the eBook on Amazon £2.99

Book 22 Feature Extraction

This section uses a dataset from ImageNet which has nearly 15 million images to train a model called mobileNet. You will use your own data with that pertained model, in the form of videos and images using something called feature extraction. You will also cover transfer learning object detection with coco-ssd.

Buy the eBook on Amazon £2.99

Book 23 Noughts and Crosses AI

Creating the very simple game of Noughts and Crosses (Tic-Tac-Toe) before adding an AI element using the Minimax algorithm. This takes you step by step through the process of using the algorithm to make the best decisions to maximise the end result. This principle can be applied to other scenarios.

Buy the eBook on Amazon £2.99

Book 24 Evolutionary Steering Behaviour

Building a simple perceptron that introduces key concepts to building a neural network of our own. Having a closer look at how the weights, bias and activation function fit together. The second part is to code the matrix maths that we will need for doing the necessary calculations in the neural network.

Buy the eBook on Amazon £2.99

Book 25 Travelling Salesperson

Having been introduced to a genetic algorithmic approach is then to apply it to the perennial problem of the Travelling Sales Person challenge. This challenge is to find the shortest distance possible between a set of cities where each one is only visited once and you can start anywhere. This may sound a simple problem but it isn’t because of the number of possible permutations.

Buy the eBook on Amazon £2.99