A beginner's guide to

Creative Coding

Use code as a paintbrush: a few lines can draw something you didn't plan. Writing code to make visual art, animation, sound and interactive pieces, starting with simple shapes and moving to generative patterns and live visuals.

Guide updated 31 October 2026

Start here ↓
Start-up costFree–£25
Best settingComputer
FeelsCurious
PopularityVery popular
CostFree/very low
DifficultyModerate
Time needed30 minutes
Physical effortVery low
Social levelOptional
🖥️

Start this hobby

Your first practical checklist

01

Buy or borrow

A laptop and the p5.js web editor. It is free, runs in the browser, saves your sketches to an account and needs no setup

02

First 30 minutes

Draw a circle, a rectangle and a line on a canvas with p5.js, then change the fill colours and sizes until you are comfortable with coordinates.

03

First week goal

Combine a loop, randomness and mouse input into one finished sketch, give it a title and export a still image or short screen recording.

04

Avoid this mistake

Drawing a new, complicated shape in every frame without clearing or limiting it makes a sketch slow, so keep counts modest and test with fewer shapes first.

Is this for me?

A quick fit check

Good signs

  • You enjoy tinkering until something unexpected appears on screen, because a lot of creative coding is changing one number and seeing what the picture does.
  • You like the idea of rules producing variety, such as a hundred circles that are all slightly different because of random() and noise().
  • You are happy to share work-in-progress sketches online, since the community learns largely by reading each other's short, open code.

Think twice if

  • You will hit maths early, mainly coordinates, a little trigonometry (sin and cos for circles and waves) and vectors, and some people find that off-putting before the pictures start to pay off.
  • Animated sketches can slow a laptop to a crawl if you draw thousands of shapes every frame, so you will need to learn simple optimisation.
  • Flashing or strobing visuals are easy to make by accident and can bother other people, so you have to think about who will view your work.

Make creative coding easier

Skip the install and work in the free p5.js web editor, then follow one short video series from start to finish rather than hopping between tutorials. Having one sketch to improve each week keeps the hobby from turning into endless reading.

First session

What to do in the first 30 minutes

0–5 min

Open the p5.js web editor, delete nothing, press play on the starter code and then change createCanvas(400, 400) to a different size to see how the setup() and draw() functions behave.

5–15 min

Add background(20), then draw an ellipse, a rect and a line using fill(), stroke() and noStroke(), writing down which number is x and which is y.

15–25 min

Replace one ellipse with a for loop that draws a row of ten circles across the canvas, then change the spacing and size using the loop variable.

25–30 min

Replace a fixed colour with random(255), press play several times to see the variety, then save the sketch with a name and duplicate it before your next experiment.

The appeal · Digital practice

Why try creative coding?

Creative coding uses programming to make things for how they look, sound or feel rather than for a business purpose. It differs from software development because the goal is expression and experiment, and from digital drawing because the image comes from rules, randomness and maths rather than strokes. Most beginners start in a friendly environment such as p5.js or Processing, then move to generative art, shaders, live visuals or physical installations.

✦

Immediate visual feedback

You press play and see the result in a second, so every small idea can be tested straight away.

✦

A reason to use maths and logic creatively

Ideas like loops, noise and angles become tools for making patterns rather than abstract exercises.

✦

Work you can share

Sketches run in a browser link, export as images or video, and make a portfolio-style collection that grows with you.

Keep it simple

What you need to begin

  • A laptop and the p5.js web editorIt is free, runs in the browser, saves your sketches to an account and needs no setup
  • A beginner-friendly language referenceThe p5.js and Processing reference pages are free and each function has a small working example
  • A folder of saved sketchesDuplicate a sketch before you change it so a broken experiment never costs you a good one
  • A cheap second-hand book on generative art or ProcessingOptional; a library copy or charity-shop find is more than enough, and many tutorials are free online

The fundamentals

Four skills to build

01

Drawing with coordinates

Knowing that the origin is the top-left corner and that y grows downward lets you place and size anything on the canvas.

02

Loops and repetition

A for loop that draws a grid or ring of shapes is the basis of most generative patterns.

03

Randomness and noise

random() gives jumpy variety, while noise() gives smooth organic change, and choosing between them changes the character of a piece.

04

Animation with draw()

Understanding that draw() runs about sixty times a second, and that variables hold state between frames, is what turns still images into moving ones.

Software deep dive

Creative Coding: zero to professional

Data work turns messy source material into a trustworthy explanation. The professional skill is not producing a chart—it is preserving meaning through collection, cleaning, analysis, visual encoding and communication.

Specific to Creative Coding

Fresh starter paths and projects

Choose a path

  • Visual sketches: p5.js, Canvas, SVG and Three.js.
  • Live visuals: TouchDesigner, Hydra and audio-reactive systems.
  • Installations: sensors, Arduino, projection and physical interaction.

Project ladder

  1. mouse-controlled sketch
  2. audio-reactive visual
  3. gallery of ten sketches
  4. interactive webpage
  5. sensor-driven installation prototype

Watch-outs

  • Keep sketches small and finishable.
  • Optimise frame rate before adding complexity.
  • Document controls so other people can experience the work.

Start with the right route

Common options and trade-offs

Python and Jupyter

Flexible analysis, automation and machine learning using libraries such as pandas and Matplotlib.

Know the trade-offNotebooks become hard to maintain unless code is organised and rerun from a clean state.

R and RStudio

Strong statistics, reporting and visualisation, particularly with the tidyverse and ggplot2.

Know the trade-offIt is a separate language and ecosystem from most application-development stacks.

D3, Observable, Tableau or Power BI

Interactive web visualisation or dashboarding. D3 gives control; dashboard tools accelerate business reporting.

Know the trade-offEase of chart creation does not guarantee correct analysis or accessible communication.

A practical setup

Common tools and what each one does

ToolPurposeBeginner advice
SpreadsheetInspect and validate small data

Keep raw data separate and make transformations explicit.

Python, pandas and JupyterClean, analyse and automate

Restart and run all cells to prove the notebook is reproducible.

R, tidyverse and QuartoStatistics and reproducible reports

Keep analysis, narrative and outputs connected.

D3 or ObservableCustom interactive visualisation

Use semantic structure and accessible alternatives.

Tableau Public or Power BIDashboards

Define metrics and refresh behaviour before styling.

Git and data documentationTrack code and assumptions

Large or sensitive datasets need storage outside ordinary Git.

Do not skip levels

A five-stage learning roadmap

1
Foundation

Learn rows, columns, types, missing values, formulas and honest chart selection.

Proof you are ready to move on: Clean a small public dataset and answer three specific questions.

2
Working beginner

Use grouping, joins, reshaping and reproducible scripts.

Proof you are ready to move on: Publish a notebook or report that reruns from raw input.

3
Intermediate

Validate assumptions, design metrics and create accessible interactive views.

Proof you are ready to move on: Build a dashboard with definitions, filters and data-quality notes.

4
Advanced

Use statistical inference, pipelines, tests and performance-aware data models.

Proof you are ready to move on: Maintain an automated analysis with monitoring and versioned outputs.

5
Professional

Clarify stakeholder decisions, govern data, review methodology and communicate uncertainty.

Proof you are ready to move on: Lead an analysis from ambiguous question through measured outcome.

How real work gets done

A professional workflow

Use the same sequence on small personal projects that you would use on serious work. The scale changes; the discipline does not.

  1. Write the decision and question before opening the data.
  2. Preserve raw input and document provenance.
  3. Profile types, missingness, duplicates and ranges.
  4. Transform with repeatable code and validation checks.
  5. Choose visual encodings that match the comparison.
  6. State limitations, uncertainty and refresh date beside the result.

Build evidence, not tutorial history

Three portfolio milestones

Beginner

Exploratory report

Clean data, three justified charts and written findings.

Intermediate

Decision dashboard

Metric definitions, filters, accessibility, refresh notes and validation.

Advanced

Reproducible pipeline

Automated ingestion, tests, monitoring, versioned outputs and documentation.

The difference at professional level

Habits that make work trustworthy

  • ✓Never overwrite raw source data.
  • ✓Define every metric in plain language.
  • ✓Test row counts, keys, ranges and important totals.
  • ✓Use colour and interaction accessibly.
  • ✓Separate correlation, prediction and causation.
  • ✓Make uncertainty and limitations visible near the conclusion.

Words you will encounter

Essential vocabulary

Schema
The defined structure and types of a dataset.
Join
Combining tables using matching key values.
Provenance
Where data came from and how it changed.
Metric
A precisely defined quantitative measure.
Reproducibility
The ability to recreate results from documented inputs and steps.
Encoding
The visual property—position, length, colour or shape—used to represent a value.

Continue with primary sources

Official learning resources

Documentation is a working tool, not something to read once from beginning to end. Follow one structured introduction, then return with specific questions from a project.

Four small steps

Your first week

  1. Draw a circle, a rectangle and a line on a canvas with p5.js, then change the fill colours and sizes until you are comfortable with coordinates.
  2. Use a loop to draw a grid of 100 shapes, then add random() to vary each shape's size or colour.
  3. Make a shape follow your mouse, then add a trail by drawing a semi-transparent rectangle over each frame.
  4. Combine a loop, randomness and mouse input into one finished sketch, give it a title and export a still image or short screen recording.

The longer path

How progress usually looks

For creative coding, a sustainable rhythm is two or three 45-minute sessions a week, with one small sketch finished and saved each week. Move forward when the current step feels repeatable, not merely possible once.

1

First sketches

You can draw shapes, use loops and make something respond to the mouse, and you understand what setup() and draw() do.

2

Generative patterns

You build grids, spirals and noise-driven textures, use functions to organise your code, and can export an image or recording.

3

Your own style

You use classes, arrays and noise fields to build systems such as flocks or particles, and start to see recurring themes in your work.

4

Showing and exploring further

You publish a collection, try shaders, plotter drawings or live visuals, and perhaps submit work to a community challenge or meetup.

Progress markers

What improvement looks like

Beginner

You can draw shapes, use loops and make something respond to the mouse, and you understand what setup() and draw() do.

Intermediate

You use classes, arrays and noise fields to build systems such as flocks or particles, and start to see recurring themes in your work.

Confident

You publish a collection, try shaders, plotter drawings or live visuals, and perhaps submit work to a community challenge or meetup.

Spend deliberately

A realistic cost plan

The headline starting range is Free–£25, but access, borrowing and second-hand equipment can change that substantially.

Try it£0The free p5.js web editor in a browser, plus free tutorials and reference pages.
Get going£0–£15A second-hand or library book on generative art, or a paid extra such as a code editor theme or a donation to a tool you enjoy.
Later£25+Optional extras such as a pen plotter, a better screen, a hosting domain for a portfolio, or books on shaders and creative maths.

Learn with other people

Community and safety

☺

Finding your people

Beginner-friendly places include the p5.js and Processing discussion forums, OpenProcessing for sharing and remixing sketches, and online challenge prompts where people post a sketch on a theme. Look for local creative-technology or generative-art meetups in your city, which often welcome people with no experience.

+

Safety note

Be careful with fast flashing or high-contrast strobing visuals, which can be uncomfortable or dangerous for some viewers, and add a warning or avoid them if you share publicly. Take screen breaks and watch your wrists, because long sessions of typing and mouse use add up.

Three common beginner mistakes

  • Drawing a new, complicated shape in every frame without clearing or limiting it makes a sketch slow, so keep counts modest and test with fewer shapes first.
  • Using magic numbers everywhere makes your code impossible to adjust later, so put values such as size and speed into named variables at the top.
  • Waiting until a sketch is perfect before saving means losing good versions, so save a copy at each step that works and name them clearly.

Good to know

One tip worth keeping

From the HobbyWiki notebook

Beginners often copy a polished example and then cannot change it. Instead, start from a tiny sketch and alter one value at a time to see what each line does. If you share your work online, credit any code or images you borrowed.

Find your angle

Useful searches from here

Before you begin

Common questions

Do I need to know how to code before starting creative coding?+

No. p5.js is designed for beginners and you can learn the basics of JavaScript as you go, because every concept comes with a visual result. Working through a short beginner video series is enough to start.

What is the difference between p5.js and Processing?+

Both come from the same community and share most function names. p5.js uses JavaScript and runs in a browser, while Processing uses Java and runs as a desktop app. Most beginners start with p5.js because there is nothing to install.

Do I need to be good at maths?+

Not to begin. You can make a lot with addition, loops and random numbers, and you pick up sin, cos and vectors when you want circles, waves or movement.

What is generative art?+

Art made by setting up rules and some randomness and letting a program produce the result, often many variations. Creative coding is the most common way to make it.

Can I turn my sketches into prints or videos?+

Yes. You can save a still with saveCanvas, record the screen for animations, or export vector files for a pen plotter or print shop. Check the resolution before ordering a print.