Coding is the process of writing instructions that tell a computer what to do. It’s how we create apps, websites and digital tools, turning ideas and logic into something interactive and useful.
You can learn coding using different tools, including both text-based languages and visual block-based languages that make coding concepts easier to grasp.
Resources
LOGO
LOGO is a programming language designed to teach coding concepts through simple commands, by controlling a “turtle” on the screen.
LOGO provides a good introduction to key concepts of coding.
MakeCode
MakeCode is a platform that lets you create both block-based and text-based code. It supports devices like the micro:bit and MakeCode Arcade for designing simple retro-style games, making it easy to learn coding through hands-on experiments.
Visual Studio Code
Visual Studio Code is an IDE (Integrated Development Environment)
– a program for writing code in different coding languages – including Python and the web-languages HTML, CSS and Javascript.
Processing
Processing is a flexible software sketchbook and a language for learning how to code. Processing is a great tool for coding computer-generated images and used in the field of visual arts.
Guides & Tutorials
Guide #1
Item #1
Item #2
Item #3
Guide #2
Guide #3
Guide #4
Bubble as OOP - the main sketch
Bubble[] bubbles = new Bubble[10];
void setup() {
size(640, 360);
for (int i = 0; i < bubbles.length; i++) {
float x = 50+i*50;
float r = random(20,60);
bubbles[i] = new Bubble(x, r);
}
}
void draw() {
background(255);
strokeWeight(2);
noFill();
for (int i = 0; i < bubbles.length; i++) {
bubbles[i].update();
bubbles[i].edges();
bubbles[i].show();
}
}
Bubble as OOP - the Bubble-class
class Bubble {
float x, y, r;
Bubble(float tempX, float tempR) {
x = tempX;
y = 360;
r = tempR;
}
void update() {
y = y - random(1, 4);
x = x + random(-1, 1);
}
void show() {
circle(x, y, r*2);
}
void edges() {
if (y < -r) {
y = height + r;
}
}
}
Collisions
ArrayList<Ball> balls = new ArrayList<Ball>();
void setup() {
size(200, 200);
for (int i = 0; i < 150; i++) {
balls.add(new Ball(random(width), random(height)));
}
}
void draw() {
background(255);
for (Ball b : balls) {
b.checkCollision(balls); // Pass the whole list to each ball
b.move();
b.display();
}
}
class Ball {
float x, y, r = 8;
//int id;
Ball(float x, float y) {
this.x = x;
this.y = y;
//this.id = id;
}
void checkCollision(ArrayList<Ball> allBalls) {
for (Ball other : allBalls) {
// USE 'this' TO SKIP SELF:
// If 'other' is 'this' (the same memory address), skip it!
if (other == this) continue;
float d = dist(this.x, this.y, other.x, other.y);
if (d < this.r + other.r) {
fill(random(255), random(255), random(255)); // Turn red if touching another ball
}
}
}
void move() {
this.x += random(-3, 3);
this.y += random(-3, 3);
}
void display() {
ellipse(this.x, this.y, r*2, r*2);
fill(255);
}
}
