In the “post-scarcity era of code”, Karpathy shared his latest insights on AI-assisted programming: Against the backdrop of code being generated at low cost and discarded at any time, the value of “writing” and “deleting” code is being reevaluated. Cursor’s auto-completion is suitable for daily development. Claude Code and Codex can complete large-scale functions but lack “taste”, while GPT-5 Pro is the ultimate defense for tackling stubborn bugs.
Our good friend, the great Andrej Karpathy, who is also Elon Musk’s buddy, has released his latest “AI Programming Guide”!
Given that the current model capabilities have reached a doctoral level, how can we maximize the help of AI in programming?
When AI can “generate code at low cost” and you only need to do “vibe coding”, a new question arises:
Is it more important to be able to write code or be able to delete code now?
Karpathy shared his experience and methods of “optimal LLM-assisted programming”.
Concept of Tool Usage
First, establish the concept that tools serve humans.
Don’t be fixated on a single “perfect” tool. Instead, prefer to integrate multiple workflows to make up for each other’s shortcomings.
Because different tools have their own advantages in tasks at different levels.
For example, Claude Code, Codex, etc. are suitable for large-scale and not overly difficult tasks, while Tab auto-completion requires humans to “set an example” first.
Cursor (Tab Auto-completion)
Karpathy said that this method is the main way of daily work, accounting for about 75%.
Because writing code blocks or comments at the correct positions in the code can efficiently convey task specifications to AI.
This “human-first writing method” has a higher information transmission efficiency than natural language conversations.
However, there is a problem. You often need to turn Tab auto-completion on and off to avoid interference.
A more advanced usage is to highlight a specific block of code and then let it make certain modifications.
Assistive Tools (Claude Code / Codex, etc.)
For heavyweight tools like Claude Code and Codex, they can be used to implement large-scale and directly describable functions.
However, the overall performance of this complete “autopilot” mode is uneven and it is easy to deviate from the requirements.
You often need to manually interrupt (ESC) to avoid incorrect output.
Karpathy hasn’t learned how to improve efficiency by using multiple instances in parallel yet – just using one already feels quite strenuous.
Moreover, Karpathy hasn’t found a good way to maintain the CLAUDE.md file.
You often need to conduct a round of “purification” on issues related to code style or personal preferences, which Karpathy calls “code taste”. Karpathy gave some examples.
The code they write is overly defensive. For example, they often abuse try/catch; they make abstractions overly complex;
They produce bloated code. For instance, in places where list comprehensions or single-line if-then-else statements can be used, they insist on using nested if-then-else structures;
They repeat code blocks instead of creating a useful auxiliary function, etc…
Karpathy believes that, for now, these tools basically have no “taste”.
In short, they can get the job done, but they don’t write “elegant” code.
However, when Karpathy ventures into some fields he is not very familiar with and needs to do “programming by feel”, these tools become indispensable.
For example, some Rust and SQL commands he wrote recently, or any other technologies he has dabbled in less before.
Another experience is, can AI act as a teacher while writing code and teach while writing?
Karpathy once tried to let Claude Code teach him knowledge while writing code, but it didn’t work at all – AI just wants to focus on writing code and doesn’t want to give any explanations during the process.
He also tried to let it do hyperparameter tuning, and the result was very ridiculous.
In addition, these tools are also extremely useful when dealing with various low-risk, one-time customized, practical tools or debugging code. Without them, Karpathy wouldn’t even bother to write because it would take too much time.
For example, to locate a specific bug, Claude Code can write 1000 lines of one-time, extremely detailed visualization code in one go. After the bug is found, all this code is deleted.
This is the “post-scarcity era of code” – you can now casually create and delete thousands of lines of highly customized and short-lived code, and that’s okay. Code is no longer a precious/expensive thing.
GPT-5 Pro: The Last Line of Defense
When facing the most difficult problems, GPT-5 Pro is the last line of defense.
Only GPT-5 Pro can locate subtle bugs that other tools can’t solve, and it can handle the most hardcore problems.
For example, Karpathy has encountered this situation several times:
Karpathy (human), Cursor, and Claude Code together were stuck on a bug for 10 minutes.
But after copying and pasting everything to GPT-5 Pro, it thought for 10 minutes and actually found an extremely subtle bug.
It is very powerful and can dig out various obscure documents and papers.
Karpathy also uses it to handle other more difficult tasks, such as seeking advice on how to optimize code abstractions (the results are mixed; sometimes it can come up with good ideas, but not always), or doing a complete literature review around a specific topic. It can always return relevant high-quality resources and clues.
Characteristics of the “Post-Scarcity Era of Code”
You can quickly generate and discard a large amount of customized, one-time code.
The threshold for writing code is lowered, and code is no longer a scarce resource.
Tools make exploratory and experimental programming possible.
All in all, with the support of numerous programming “paradigms” and tools with their own advantages and disadvantages, Karpathy feels that the field of programming has been completely detonated and is full of infinite possibilities.
Being in this field, it’s hard not to feel anxious about not keeping up with the latest technology.
Therefore, these random thoughts emerged, along with a strong interest in what new discoveries others have made.
This has also triggered a big discussion in the comment section.
Regarding the update issue of CLAUDE.md, someone specifically set up an Agent to be responsible for updating and calibration.
Someone also said that they can give the code generated by Claude Code to GPT 5 for “polishing”.
Someone shared their workflow of using AI programming tools.
Someone else shared their commonly used development tools.
Someone expressed the same feeling that choosing the right model for different tasks is an art.
How is your current experience of using AI for programming? You can share it in the comment section!
References
https://x.com/karpathy/status/1959703967694545296
This article is from the WeChat official account “New Intelligence Yuan”, author: Dinghui Haokun. It is published by 36Kr with authorization.