Coding lessons need paint brushes, not pencils, the author argues

Coding lessons need paint brushes, not pencils, the author argues

In 2022, while teaching high school computer science, the author wrote a Python class called PaintBrush for a classroom lesson. Built on Python's turtle module, PaintBrush works differently from the plain turtle class familiar from CS teaching: instead of moving a cursor with relative turns and steps, it lets students draw a line straight between two named coordinates by calling line(x1, y1, x2, y2), along with setcolor() to change the pen color, setwidth() to change the line thickness, and setrandomness() to add a configurable amount of random jitter to each line's endpoints. Writing the class took the author 20 to 30 minutes on a Sunday afternoon, and the goal, in the author's words, was a lesson where students' code could do something visual and fun.

The piece's starting point is that the same class could now be written by Claude in what the author estimates as 20 to 30 seconds, not a measured benchmark. That gap frames the central hypothesis: a lesson that once existed only to make programming visual and engaging can now serve a second purpose too, motivating students to write code by hand at all, given that an LLM could produce it for them instantly. Framed explicitly as a hypothesis rather than a tested finding, the author's expectation is that students in 2026 would be more likely to write this particular PaintBrush code themselves than students were in 2022, because it is quick to produce a visible, tangible result.

The author draws a line between kinds of assignments. A repetitive or overly prescriptive exercise, such as 'write a loop to print a multiplication table', would not draw blame if a student handed it to AI instead of writing it by hand. An open-ended, creative prompt, such as 'can you use a concept we know to make 1000 lines in your painting?', should produce different engagement, in the author's view, because it invites exploration rather than filling in a template. That distinction becomes the piece's central metaphor: if writing plain print statements is like drawing with a pencil, then working with a high-level, creative abstraction like PaintBrush is like painting with a brush.

PaintBrush is not presented as unique. The author names Turtle, Processing, and pygame as existing tools in the same 'paint brush' category, abstractions that let students make something visual or interactive instead of writing plain, rote code. The concern raised is that any single abstraction wears out: a student's twelfth turtle drawing, in the author's words, does not 'hit' with the same excitement as the first or second one. The proposed fix turns the AI capability that opened the piece into an asset for teachers rather than only a shortcut for students: because LLMs let teachers generate new abstractions quickly, teachers are no longer limited to the existing menu of Turtle, Processing, and pygame, and could build tools that let students easily make music, data visualizations, photo filters, games, or videos.

The conclusion is that the right abstractions can keep students engaged in writing code themselves, regardless of whether an LLM could generate the same code faster. In the author's framing, learning to program is not about output speed but about building students' sense of self-efficacy and pride in work that is authentically their own, and teachers need every available tool to make that case to students.

Key facts

  • In 2022, while teaching high school CS, the author wrote PaintBrush, a Python class built on the turtle module that draws lines between exact coordinates rather than moving a cursor with relative turns, as plain turtle graphics does.
  • Writing PaintBrush took the author 20 to 30 minutes on a Sunday afternoon in 2022; the author estimates, without testing it, that an LLM like Claude could write the same class in 20 to 30 seconds today.
  • The author's hypothesis, explicitly labeled a hypothesis rather than a tested finding, is that students in 2026 would be more likely to write this kind of code by hand than students were in 2022, because it produces a tangible visual result quickly.
  • The author contrasts a prescriptive prompt ('write a loop to print a multiplication table') with an open-ended one ('use a concept we know to make 1000 lines in your painting'), arguing the two should produce different levels of student engagement.
  • The author names Turtle, Processing, and pygame as existing 'paint brush' style abstractions and argues LLMs let teachers build fresh ones quickly, for music, data visualization, photo filters, games, or video, instead of reusing the same few tools.

Why it matters

The piece addresses a live classroom question: if an LLM can write a given exercise instantly, why should a student still write it by hand? Rather than arguing for or against letting students use AI tools, the author reframes the design problem. The claim is that a lesson's power to motivate hand-written code was never really about there being no alternative; it was about the lesson producing something the student wanted to make. Under that framing, the response to AI-written homework is not restriction but better lesson design: open-ended, visual, creative tasks (paint brushes) instead of narrow, prescriptive drills (pencils).

Who it affects

CS teachers designing exercises for introductory programming classes, and by extension the students in them, are the direct audience. It is a classroom-level argument rather than an industry or policy one, but it sits inside the broader, active debate over what AI coding assistance does to how programming is taught and learned.

How to use it

The concrete pattern is to wrap a lower-level API, turtle in this case, inside a small class that exposes a handful of beginner-friendly methods (line, setcolor, setwidth, setrandomness), then hand students an open-ended creative prompt rather than a fixed exercise. The author's broader suggestion is to use LLMs to author new domain-specific abstractions quickly, for music, data visualization, photo filters, games, or video, rather than reusing the same handful of existing tools such as Turtle, Processing, and pygame semester after semester, since any single abstraction stops feeling novel to students after enough repetition.

How solid is it

This is a first-person reflection and opinion piece from one teacher, not a study. The central claim, that students would be more likely to write this code by hand in 2026, is explicitly presented by the author as a hypothesis, with no data, survey, or test behind it, and nothing indicates the '20 to 30 seconds' estimate for Claude was actually measured rather than guessed. The post drew light engagement: 8 points and 2 comments on Hacker News after more than four days.

Risks and caveats

The argument rests on a single lesson and is not shown to generalize beyond students who already respond well to visual, creative programming exercises. The actual instructions given to students, referenced in the piece right after 'Here were the instructions I gave students after we reviewed the basics of the PaintBrush together', are missing from the extracted text, likely an image or embed the crawler did not capture, so the exact classroom exercise beyond the class code itself is not fully known. No baseline is given for what 'more likely to write code by hand' is being measured against.

“If print statements are pencils in art class, abstractions like PaintBrush are, well, paint brushes.”

— the author