liveBook · Manning

Creative coding

As explained in The Creative Programmer

Creative coding is programming practiced primarily to create expressive or visually engaging works.

Creative coding uses programming as a blank canvas for self-expression rather than as a way to solve a customer's software problem. Its immediate aim can be an expressive or visually engaging scene, while its wider value may include playful learning, interest in computing, and practice with creative constraints. section 5.3 section 1.5

It is useful to keep the label in perspective. A creative coder uses code exclusively to express themselves; a creative programmer may instead apply creativity to broader problem solving. Visual experimentation can motivate beginners, but it does not by itself teach the full picture of systemic creative problem solving. section 5.3

Use creative coding as an exploratory habit, not a demand for instant inspiration:

  • Start with a visual idea, a constraint, or a small scene, then let the act of making reveal possibilities. section 5.3
  • Treat exercises as thinking prompts and retrospective material; turn pointers into action through your own experimentation. section 1.5
  • Protect readability and structure when code must be maintained; excessive creative programming can reduce maintainability. section 8.5
  • When syntax blocks an idea, sketch the idea first and defer syntax correction until implementation becomes clearer. section 8.5

A shareable visual sketch

A p5.js sketch can animate colliding spheres along sine-wave trajectories. The online editor makes projects easy to share by URL and relies on documented Processing-specific functions such as sphere, so a visually oriented experiment need not begin with extensive JavaScript knowledge. section 5.3

Figure 5.6 The online p5.js editor running a simple example of colliding spheres following the trajectory of sine waves. Once logged in, projects are easy to share: simply copy the URL. p5.js requires little knowledge of JavaScript since you’ll be relying on the well-documented Processing-specific functions, such as sphere.
CH05_F06_Groeneveld

Inspect the colliding-spheres sketch to connect a compact visual result with a beginner-oriented creative-coding environment. section 5.3

How The Creative Programmer covers it

How deep it goes
Defines creative coding, distinguishes it from broader creative programming, and notes limits of self-expression-focused teaching.
Examples
Uses a p5.js sketch of colliding spheres following sine-wave trajectories in a shareable online editor.
What it assumes
Starts from little JavaScript knowledge by relying on documented Processing-specific functions in p5.js.
What you can do after
Practice/perform visual self-expression through small code sketches while judging its limits for broader problem solving.
How it connects
Connects creative coding with creative problem solving, constraint-based thinking, maintainability, and critical thinking.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Creative Programmer. The section links point to the parts of the book it draws on.