[KongchangAI]
· 2 min read· 1,235 words

In the Age of AI Programming, Should You Still Write Code by Hand?

In the Age of AI Programming, Should You Still Write Code by Hand?

In the AI era, you still need to handwrite code—but only to build understanding, not for repetitive labor.

The article explores whether you still need to type code by hand now that AI can write it. Using a creator's scikit-learn classifier examples on iris and wine datasets, it shows AI-generated code is correct and runnable yet creates an illusion of understanding. Handwriting forces you to question every keyword and parameter, shifting from result- to process-orientation. The stance is conditional: handwrite when learning new skills; hand off internalized repetition to AI.

When AI can autocomplete functions, generate scripts, and even scaffold entire projects, a seemingly counter-trend question surfaces: do we still need to type out code by hand? A YouTube tech creator offers a clear but non-extreme answer in a video—yes, but only in specific scenarios.

Video frame: explaining the necessity of writing code by hand

The First Value of Handwriting Code: Forcing True Understanding

The video creator opens with a minimalist supervised learning example: training a random forest classifier on the iris dataset with scikit-learn, and a k-nearest neighbors classifier on the wine dataset. He admits that to anyone familiar with classical machine learning, this code is practically "Hello World," but for a beginner, every line could be a black box.

That's exactly where the problem lies. When AI writes these few dozen lines for you, you glance at it and feel "I get it"—load the dataset, split into train and test sets, instantiate the model, train, evaluate; the flow is clear. But once you type it out yourself, the depth of understanding is completely different. The author raises a series of questions that only surface when you write it by hand: Why write this line returning x, y? What happens if you don't? Can you just return the result as a dataframe? If not, why do you still need .frame? What happens if you adjust test_size? What other parameters can be tuned? And what does n_jobs=-1 even mean?

AI-generated code won't ask you these questions. You only "see" the surface structure, but you aren't forced to confront every keyword and ask why it exists. Writing code by hand is a self-interrogation: every symbol must be justified, and the places you can't explain are precisely the gaps in your knowledge.

Video frame: a beginner's confusion when facing classification code

The scikit-learn mentioned in the article is the most mainstream classical machine learning library in the Python ecosystem, offering one-stop implementations of classification, regression, clustering, dimensionality reduction, and more, with a highly unified interface style (fit for training, predict for prediction, score for evaluation). Precisely because it encapsulates a great deal of detail under the hood, beginners can run results with just a few lines of API calls, which makes it all the easier to develop the illusion of "I've already mastered this." Understanding this point makes it clear why the author emphasizes handwriting: the more complete the encapsulation, the more you need to actively ask what's happening inside it.

The random forest and k-nearest neighbors (KNN) in the example represent two algorithms with very different approaches. Random forest is an ensemble of multiple decision trees, reducing the overfitting risk of a single tree through voting—it belongs to ensemble learning. K-nearest neighbors does no explicit training; it decides the class by voting based on distances between samples, making it a typical example of "lazy learning." The two differ in parameter sensitivity—random forest cares about the number and depth of trees, while KNN cares about the k value and distance metric. The author asks about n_jobs=-1 precisely because it controls the number of CPU cores used for parallel computation; -1 means using all cores. Parameters like this only get truly noticed when you're hands-on tuning them.

The Cognitive Gap Between "Understanding" and "Being Able to Write"

The author repeatedly emphasizes one detail: this code is "very trivial," yet for someone encountering classical machine learning for the first time, it's not trivial at all. This contrast reveals an illusion amplified by AI programming tools—the fluency of reading code gets mistaken for depth of mastery.

AI-autocompleted code is especially prone to creating this false impression. It's syntactically correct, stylistically consistent, and even comes with comments, giving you a runnable result within seconds. But the author's view is that the essence of learning isn't about getting a runnable output—it's about building the causal chain between each decision and its consequence. You change a parameter and see the model's performance change with your own eyes; you delete a line and handle the error yourself—these frictions are where learning truly happens. Writing code by hand shifts the focus from "result-oriented" to "process-oriented," and the latter is irreplaceable in the early stages of learning.

Video frame: breaking down the code for the training and testing flow

The iris dataset (150 samples, 4 features, 3 iris species) and the wine dataset (178 samples, 13 chemical features, 3 wine classes) are classic small-sample datasets in machine learning education, often used as benchmarks for algorithm comparison. They're small in scale, have clear features, and balanced classes, making them suitable for quickly validating pipelines—but precisely because they're so "clean," it's easy to underestimate the complexity of real data. The author uses them as examples precisely to show that even on the most standard datasets, every choice in the code is worth scrutinizing—and in real-world scenarios, it's only more so.

So, When Can You Skip Handwriting?

The video title is a question, and the author's stance is equally conditional: writing code by hand is worth doing, but only in specific situations. The primary scenario he explicitly points to is learning. When you're building the underlying mental model of a new skill, typing it out yourself is an unavoidable path.

From this, a practical guideline follows naturally: the more you don't understand a domain and the more you need to build intuition, the more you should write by hand; the more internalized it is and the more it's just repetitive labor, the more you can hand it off to AI. A beginner copying a few lines of classifier code isn't wasting time—that's laying the cognitive foundation; whereas a senior engineer rewriting boilerplate to get familiar with a framework has far less to gain. The author doesn't lay out a complete list of "which scenarios you can let go" in the video, but the principle of "handwrite for learning" itself already draws a clear boundary for using AI programming tools.

Video frame: a segment explaining the training and testing code

Conclusion: Don't Let Tools Think for You

The value of AI programming tools is undeniable, but their most dangerous side effect is letting people stop asking questions in a state of "I seem to understand." Writing code by hand isn't a rebellion against efficiency—it's an investment in depth of understanding at key learning moments. The video author's attitude can be summed up in one sentence: let AI handle repetition, let yourself handle confusion—because the places where you're confused are exactly where you truly grow.

One-line Summary

In the AI era, you still need to write code by hand—but for building understanding, not for repetitive labor.

Paragraph Summary

The article discusses whether you still need to type code by hand now that AI can write code. The author uses a YouTube tech creator's example of training classifiers with scikit-learn on the iris and wine datasets to point out that AI-generated code is syntactically correct and runnable, yet easily creates the illusion of "understanding." The value of handwriting lies in forcing you to question every keyword, parameter, and return value, shifting from result-oriented to process-oriented. The author's stance is conditional: handwrite when learning new skills and building underlying mental models; hand off internalized, purely repetitive work to AI. The core guideline: the more a domain requires building intuition, the more you should handwrite; the more familiar and repetitive the work, the more you can let go.

#AI programming#handwriting code#scikit-learn#machine learning#learning programming#AI coding tools
Share:

Related articles