# Programming education in the AI era

> What form would programming education in the AI era ideally take? Is programming education still necessary at all?

What form would programming education in the AI era ideally take? Is programming education still necessary at all?

> [!warning] Because I wrote this a year ago and, instead of substantially revising it, only kept adding bits and pieces here and there, there is a lot here that now (2025-12-12) looks outdated. (<ToDo>: update this article)

## The target of education

Whereas in the past it mainly targeted people who wanted to make programming their profession, going forward I think it will become more common to target people who want to use programming as a tool in their own work or research, more like "[Excel](https://wiki.g15e.com/pages/Microsoft%20Excel.txt) education." This is because the barrier to programming is steadily getting lower, and the boundary between programming and non-programming is becoming blurred.

## The form of education

One reason programming assistant tools such as [GitHub Copilot](https://wiki.g15e.com/pages/GitHub%20Copilot.txt) could become one of the earliest successful applications of [LLMs](https://wiki.g15e.com/pages/Large%20language%20model.txt) is that programming environments already contain plenty of tools and practices—such as static analyzers, <automated unit tests>, and <modularization>—for quickly discovering [LLM hallucinations](https://wiki.g15e.com/pages/Hallucination%20(AI.txt)).

The cost of software defects is proportional to the time until the defect is discovered ([DCI](https://wiki.g15e.com/pages/Defect%20cost%20increase.txt); defect cost increase). In other words, the faster a defect is found, the lower the cost of resolving it. Therefore, if you code in a good environment and follow good practices, the cost caused by LLM hallucinations becomes very low. Put the other way around, if you use Copilot in a situation where you are using a language with weak static analysis, or not doing unit tests, or making a mess of the design, hallucinations can instead increase the cost.

The kind of [dichotomy](https://wiki.g15e.com/en/pages/Dichotomy.txt) that says "Copilot benefits only experts and harms beginners" may be because experts tend, on average, to use good tools and good practices. I believe that even beginners can use Copilot beneficially if they learn good tools and good practices.

At the same time, even for beginners, using good tools is relatively easy, but how can they learn good practices? If you already know that, aren't you no longer a beginner?

Therefore, programming education in the AI era must include thinking about how, in a situation where a beginner is pair programming with AI, one can guide them to gradually acquire good practices.

Things that would be good to cover in education:

- **Introducing the concept of [cognitive niche construction](https://wiki.g15e.com/pages/Cognitive%20niche%20construction.txt)**. Depending on the environment in which one programs, there will likely be tremendously important differences in how one's capabilities improve. Especially for beginners.
- **<Git>**: Create a safe environment for exploration by making it possible to return to a "normal" state at any time.
- **Reading code**: Efficiently read and understand code written by AI.
- **[Refactoring](https://wiki.g15e.com/pages/Refactoring.txt)**: Improve code written by AI and understand it in the process. Then guide the AI so it can produce better code. Make a habit of asking not just "it works, so we're done," but "why does it work?" and "what is a better way?"
- **<Unit tests> and [test-driven development](https://wiki.g15e.com/pages/Test-driven%20development.txt)**: Quickly detect errors in code written by AI ([DCI](https://wiki.g15e.com/pages/Defect%20cost%20increase.txt)). Then guide the AI so it can produce better code.
- **Making use of <static type checking>**: Quickly detect errors in code written by AI ([DCI](https://wiki.g15e.com/pages/Defect%20cost%20increase.txt)). Then guide the AI so it can produce better code. In an environment using [JavaScript](https://wiki.g15e.com/pages/JavaScript.txt), [TypeScript](https://wiki.g15e.com/pages/TypeScript.txt); in an environment using [Python](https://wiki.g15e.com/pages/Python.txt), <MyPy>.
- **Having a correct mental model of [LLMs](https://wiki.g15e.com/pages/Large%20language%20model.txt)**: Understand how LLMs work, why [hallucinations](https://wiki.g15e.com/pages/Hallucination%20(AI.txt)) occur, and distinguish what kinds of suggestions are trustworthy (type-based autocomplete) from what kinds of suggestions should be treated with skepticism (LLM-based ghost text).
- **Thinking about the [values embedded in the process](https://wiki.g15e.com/pages/Values%20in%20the%20process.txt)**. From the perspective of training, distinguish what is beneficial to ask the AI to do and what is beneficial for the human to do. [Exploration-exploitation dilemma](https://wiki.g15e.com/pages/Exploration-exploitation%20dilemma.txt).
- **Thinking about the [knowledge embedded in the process](https://wiki.g15e.com/pages/Knowledge%20in%20the%20process.txt)**. Think about ways to convey tacit knowledge by showing the process of coding in an [AI-assisted programming](https://wiki.g15e.com/pages/AI-aided%20programming.txt) environment. Very minor practical methods—such as where you place the cursor after coding—accumulate and make a big difference, but if you look only at the finished code, these processes are not visible. See also: [New practices for AI-assisted programming](https://wiki.g15e.com/en/pages/New%20practices%20for%20AI-aided%20programming.txt)
- **Quantifying code quality**: [Test coverage](https://wiki.g15e.com/pages/Test%20coverage.txt), [cyclomatic complexity](https://wiki.g15e.com/pages/Cyclomatic%20complexity.txt), or [cognitive complexity](https://wiki.g15e.com/en/pages/Cognitive%20complexity.txt), etc. Use a linter. Maintain good code quality even when using AI.
- **Meta**: Develop the ability to distinguish when to ask AI to do which tasks, and in what situations and to what extent to trust results suggested by AI. Also think about what kinds of practices, in ordinary times, can help develop this ability.

## The purpose of education

In the short term, because AI is steadily lowering the barrier to programming, there will actually be more situations in which people who are not professional programmers end up doing programming.

What about the long term? In the near future, will humans no longer need to learn programming?

Even if programming as a means of making software disappears or diminishes, programming as a means of refining thought (or something similar to it; some concrete thing through which one can learn to express abstract thought clearly, develop logic, and abstract complexity) will continue to be necessary. In fact, programming education has a [transfer effect](https://wiki.g15e.com/pages/Transfer%20effect.txt) that improves some cognitive abilities such as mathematical reasoning and creative problem solving. (See: [Programming and cognitive abilities](https://wiki.g15e.com/pages/Programming%20and%20cognitive%20abilities.txt))

In the AI era, why bother refining human thought? Because in the <AI-human communication loop>, human thought (the speed and quality of thought) is the bottleneck (see: [Bottlenecks in the AI-human interaction loop](https://wiki.g15e.com/en/pages/Bottleneck%20of%20AI-Human%20interaction%20loop.txt)). The number of domains in which humans can be removed from the loop will continue to increase, but in some loops humans will still need to be involved, and in those cases reducing the bottleneck caused by humans will have the greatest effect on the performance of the whole loop (<theory of constraints>).

## References

- [Generative AI and programmers' capabilities](https://wiki.g15e.com/en/pages/Generative%20AI%20and%20competency%20of%20programmers.txt)
- [New practices for AI-assisted programming](https://wiki.g15e.com/en/pages/New%20practices%20for%20AI-aided%20programming.txt)
- [AI as a coding practice tool](https://wiki.g15e.com/pages/AI%20as%20coding%20practice%20tool.txt)