Skip to main content

Epilogue

(Written in 2023)

images/010.png

The Writing Process

After starting my career, I set up a personal blog and began sharing technical articles, mostly centered around the LabVIEW programming language. In 2009, I compiled those posts into a book and published it. Over the next few years, I continued to maintain, revise, and expand the book. However, as internet regulations tightened, many overseas websites were blocked, including my blog. Since I did not have a domestic mobile phone number, I could no longer log in or leave comments on domestic platforms either. Interaction with my readers dwindled, and I lost the motivation to write for a long time.

It wasn't until 2021 that a reader mentioned that building sites on GitHub was becoming a popular way to share knowledge—and remarkably, it hadn't been blocked domestically. Inspired, I moved my LabVIEW book to GitHub (https://lv.qizhen.xyz/) to resume updates. However, I hadn't used LabVIEW in years, and writing about it felt increasingly difficult. Since my daily work now primarily revolved around Python, I thought: why not write about Python instead?

Because this book is published and shared online, there is no hard deadline. I plan to refine and maintain it over a long period. Even so, before sharing it with readers, I wanted to quickly build a framework and draft the core chapters; sharing a skeleton site with no real content would be disappointing. My requirements for the draft were modest: the content didn't need to be comprehensive, the structure could be disorganized, and the writing could be a bit rough—as long as it mapped out the book's overall architecture. I expected it would take two or three months, but the draft took shape in just over a month. During that time, I dedicated one to two hours every day to writing, sometimes spending entire weekends on it. It is unlikely I will have that much free time again, but I will try to spend at least two hours a week updating and maintaining this book.

Although I set a low bar for the draft, completing it in a month while only writing in my spare time was incredibly fast. Comparing it to my earlier LabVIEW book, writing the same volume of content would have taken me two to three times longer. This is partly because LabVIEW is less than ideal for text-based writing. Unlike most languages, you don't write LabVIEW code; you "draw" it. While this isn't a drawback for programming, documenting graphical code in text format is far more tedious than with text-based programming languages. However, the main driver behind my speed was my use of large language models to assist with the writing process.

Large Language Models

I have to admire the marketing skills of AI researchers; every few years, they coin a new buzzword to refer to artificial intelligence. When I first started studying AI, the field was in a trough: after decades of research, there were few practical products, and people avoided the term "artificial intelligence," preferring "machine learning" (ML). Soon after, researchers realized that the most promising machine learning algorithms were multi-layer artificial neural networks. Eventually, "multi-layer" lost its novelty, so "deep learning" (DL) became the dominant term. In recent years, neural networks have evolved at a breakneck pace, growing from a few layers to hundreds or thousands. Today, we no longer measure models by their layers, but by their parameter counts. Modern large language models (LLMs) for natural language processing range from tens of billions to trillions of parameters. For comparison, the human brain contains roughly 50 to 100 billion neurons. Models of such immense scale naturally distanced themselves from older "deep" models, giving rise to the term "Large Language Models."

The undisputed leader in this space is OpenAI. Having worked on AI-related projects, I always paid close attention to their releases. When they announced that their GPT-3 model could automatically generate code, some friends and I couldn't wait to test it. I don't recall the exact problem, only that it was a coding interview question we found online. The problem had a simple but inefficient solution, and a highly complex but optimal one. We pasted the description directly into the GPT model, and it instantly returned the straightforward approach. When we asked it to optimize the code for better performance, it generated a verbose but highly efficient program. We compiled the code and ran it—it worked flawlessly. We were so shocked that my programmer friends and I seriously worried about our job security.

However, our panic subsided slightly when we closely inspected the generated code. We noticed a long, peculiar variable name that was highly unusual. Out of curiosity, we searched for that variable online and found a solution written by another developer that was identical to GPT's output. My colleagues and I breathed a sigh of relief: GPT was simply "referencing" existing code. When we tested it on unique problems that couldn't be found online, its performance was significantly weaker.

Yet, our relief was short-lived. OpenAI soon launched ChatGPT, displaying vastly improved programming capabilities. At least for interview questions, I felt I could no longer outperform the AI. In addition to ChatGPT, I have used Google's Gemini and Meta's LLaMA, and their performance has been excellent. I originally wanted to test some Chinese models developed by domestic tech companies, but they blocked access for overseas users at the time. Some of those restrictions have since been lifted, and I plan to test them thoroughly when I have the time.

How Large Language Models Have Helped Me

Technological advancement keeps us programmers on edge. "If you can't beat them, join them." So, I set out to explore how LLMs could assist my work.

A while ago, I noticed my company had integrated LLMs directly into our development environment. Now, as I write code, the editor suggests potential code completions with every new line and keystroke. If a suggestion is useful, a tap of the Tab key inserts it. Standard IDE auto-completions of the past were based on simple prefix matching—typing "a" would prompt "add"—which I found useless and distracting. AI-powered suggestions, however, are on a completely different level because they predict what you need based on context. If you define a variable named latitude, it immediately anticipates that the next line will involve longitude. If you open a data table, it assumes you plan to read its data next. The prediction accuracy is remarkably high, saving me a great deal of typing.

I also find myself relying heavily on LLMs for learning. Previously, when faced with an unfamiliar concept, I would search Google. But search engines have two major limitations: first, they don't truly understand the question, instead splitting it into keywords to match articles. Second, when they return dozens of links, you still have to dig through them to find what is relevant. Even if you find the right article, the answer might be buried in a footnote, surrounded by irrelevant text. LLMs solve both issues. I can ask a question in plain English, and the model understands the context and gives me a direct answer, rather than just returning links for me to filter.

For highly specific issues, the internet rarely provides off-the-shelf answers. For instance, if a script throws a runtime error, searching for the error message might yield related posts, but almost never one with the exact same code. You still have to study the posts, understand the root cause, and adapt the solution. Once, while writing a small PyTorch program, I hit a runtime error. Too lazy to debug it myself, I decided to see how an LLM would handle it. I pasted both my code and the error stack trace into the model. It not only spotted the error but also generated the corrected code. Sure enough, the code ran flawlessly.

For me, the most significant benefit of LLMs has been in English writing. To be honest, my programming skills are decent enough that, without LLMs, I would probably still hold an edge over most. But my English is a different story. Even after living in the United States for over a decade, my language skills haven't improved much. Writing in English is especially challenging; I often struggle to judge if my phrasing is correct, sometimes resorting to having my elementary-school-aged son proofread my work. Since the rise of LLMs, I run almost everything I write through them first. They not only correct my grammar but polish my writing to a level I could never achieve on my own. This has given me the confidence to start translating my previous LabVIEW book into English, a project I had long delayed due to self-doubt.

Unfortunately, most of the LLMs I have used are optimized for English, and their ability to handle Chinese is still not refined enough to help edit Chinese articles. Nevertheless, they are still more than capable of handling basic auxiliary tasks.

I have leveraged LLMs as much as possible while writing this Python tutorial. The first step is always the hardest: with so many ideas floating around, where do you begin? So, my very first prompt to the LLM was: "I want to write a book about Python. What should it cover?" It replied: "Writing a book about Python is a great idea. Here are some topics you might want to include: 1. Introduction to Python (history, use cases, popularity); 2. Python Basics (variables, data types, operators, control flow, functions, error handling); 3. Python Data Structures (lists, tuples, dictionaries, sets)..." Its response was so logical and structured that I decided to follow it.

When writing specific chapters, I also used LLMs extensively to help explain abstract concepts and generate clean code examples.

Problems with Large Language Models

Although large language models are powerful, they are not without flaws.

First, there is the limitation of the models themselves: LLMs are not omniscient. Their knowledge is sourced from the internet. While they can generate highly relevant continuations for prompts based on patterns they have learned and recombine existing content, they do not truly comprehend logical relationships, let alone explore entirely new domains. For unprecedented problems or complex reasoning, they construct highly plausible-sounding answers out of thin air—a phenomenon known as hallucination.

For example, if you ask an LLM: "My wife was cheated on by her female best friend. How should I comfort her?" A human would immediately spot the absurdity or treat it as a joke. But the AI model cannot understand the underlying social dynamics. It will simply generate a formulaic response based on words like "cheated on" and "comfort," such as: "Faced with such a situation, the first step is to support your wife. Here are some steps that might help: 1. Listen and understand..." If this question appears on the internet many times in the future, the model might learn some more appropriate answers, but for now, it can only give mechanical responses.

The same applies to programming. LLMs excel at solving common interview problems because similar resources are already abundant online. But when faced with truly unique, new tasks, they often struggle—and resort to making things up. They frequently generate code that looks perfectly plausible, yet fails completely when run. As it stands, LLMs are extremely useful assistants, but they cannot be blindly trusted. Their outputs must be verified before being applied to critical tasks.

Second, I often reflect on the impact of LLMs on content creators. Traditional search engines do not present content directly; they provide links, ensuring users eventually read the author's original work. This traffic provides authors with the motivation to keep creating. Now, however, LLMs blend content from multiple sources and present it directly to users. Creators have no way of knowing how many people read their work or if it helped. This is a severe blow, particularly for authors who rely on traffic-driven revenue.

LLMs have greatly accelerated the completion of this book. However, from another perspective, they have also lowered the barrier to entry for writing. If the labor of three months in the past can now be completed in one month, then the value of this work may only be a third of what it was, or even lower. In the future, the internet will likely be flooded with AI-generated articles, images, and videos. While this will vastly enrich the volume of content, it will simultaneously dilute the value of individual works.

Of course, as mentioned above, LLMs cannot solve new problems or create entirely new content. In these areas, human experts are still essential. In the near future, large language models may eliminate some entry-level positions, such as junior programmers, junior writers, or junior artists. However, today's experts all started as beginners. Without these entry-level positions, how will we cultivate the high-level talent of tomorrow?

Perhaps there is another possibility: AI's creative ability will improve rapidly, reaching higher and higher levels. By the time human experts pass away, their successors may not be human apprentices, but AI systems—and there will be no so-called high-level talent anymore.

Will Programmers Be Eliminated?

Looking back at the history of programming languages, the core trajectory is undoubtedly evolving towards "lowering the cognitive threshold for humans." From early punched tape, to cryptic assembly language, to the popularization of high-level languages, humans have been building increasingly user-friendly layers of abstraction. Even among high-level languages, today's most popular language, Python, is known for its simplicity. Compared to C++, which was mainstream twenty years ago, Python has already significantly lowered the barrier to programming. Extrapolating from this trend, in the near future, development in most application areas may no longer require traditional programming languages. Instead, users will simply express their needs clearly in natural language, and the computer will directly handle the logic construction and execution.

In the past, the biggest technical barrier to this ultimate goal was that machines could not accurately parse the ambiguity of natural language. However, the recent explosive breakthrough of large language models (LLMs) has essentially cleared this obstacle. "Natural language replacing programming languages" is just around the corner in many application scenarios. Of course, the profession of programmer will not completely disappear. Low-level architecture, core algorithms, and system development requiring extremely high performance will still need a small number of hardcore professional programmers. But we must face the reality that the demand for routine development positions will inevitably shrink significantly. Considering the massive pool of software talent accumulated during the industry's expansion over the past decade or two, the future supply-demand imbalance may confront average programmers with an unprecedented employment winter.

The shockwaves of this transition extend far beyond programming. Under the sweep of this round of AI technological innovation, teachers, administrative assistants, translators, illustrators, and even doctors, lawyers, and drivers—none can remain unaffected. Although technological optimists always emphasize that "AI will also create new jobs," an extremely cruel reality lies before us: Can those who are ruthlessly eliminated by the technological tide easily bridge that massive skills gap and transition to new roles without severe disruption?

Looking back from the threshold of the future, history is always strikingly similar. Every technological revolution hailed as a "great social progress" has been accompanied by the squeezing out and elimination of large numbers of people at the bottom. The evolution of social and economic structures always lags behind the rapid surge of technological productive forces. In the early stages of major technological leaps, wealth and resources inevitably concentrate among the few who master the new technology, making life even more difficult for the majority who have yet to adapt.

Faced with this unstoppable technological tide, anxiety and resistance are futile. The core competitiveness of the future will no longer be proficiency in a specific language or a single professional skill, but rather the ability to deconstruct complex real-world problems, cross-disciplinary cognition, and the "architectural" ability to harness AI tools. For each of us, letting go of our path dependency on existing skills and transitioning from an "executor" to an "orchestrator and decision-maker" is perhaps the only way to retain control in this era of rapid disruption.

Will AI Become Conscious?

If the conclusion were that AI will soon become conscious and replace humans, then that conclusion would certainly be more attention-grabbing. It's no wonder that the machine threat theory resurfaces every decade or so. But my view is still relatively conservative. I believe I will not live to see that day. Especially since humans themselves don't even know what consciousness is, how can we expect to judge whether an AI does? Discussing AI and consciousness nowadays easily deviates from technology and devolves into arguments about the concept of "consciousness" itself.

I don't have a deep understanding of what consciousness is, but I am quite familiar with AI. Currently, the most popular AI algorithms, including large language models and diffusion models, are all based on artificial neural networks. Their core principle is to approximate a complex function by stacking many simple, smaller functions. We can abstract the problem to be solved into a function. For example, a function for chatting takes some text as input and outputs other text; a function for drawing takes some text as input and outputs an image. These functions are very complex, and we cannot express them with a single formula, but we can use methods similar to series expansion to decompose them into countless simple small functions. For instance, a large language model can be viewed as a complex function built by linearly superimposing hundreds of millions of extremely simple ReLU functions. Thus, the essence of modern AI is function fitting—a mathematical concept that has little to do with "consciousness."

People who support the idea that AI will soon "awaken" mainly have two arguments. First, they argue that AI simulates the human brain, so it should eventually inherit human-like consciousness. It is true that both the brain and artificial neural networks are built of "neurons." However, artificial neural networks are designed to fit mathematical functions, not to simulate biological brains. The difference between artificial neural network models and the human brain is still significant. For example, at the most fundamental level, the neural network in the human brain is dynamic—neurons can form new connections or break existing ones; but the structure of artificial neural networks is static, fixed before training. The structures are also vastly different: the neurons in the human brain are truly networked and non-linear, while artificial neural networks are mainly hierarchically and linearly connected. In fact, our understanding of the human brain is still very limited; we haven't fully figured out its operating mechanism. Just because the human brain has neurons doesn't mean that human "consciousness" only involves neurons. Some scholars believe that quantum effects also participate in human thinking. Humans discovered quantum effects less than a hundred years ago. There may be many physical laws yet to be discovered that also participate in thinking activities. These are all things that current AI algorithms completely lack. To claim that our current simple artificial architectures simulate the human brain is a massive oversimplification.

The second argument is that artificial neural networks have so many parameters—perhaps one day, they might suddenly flash with insight and develop self-awareness. This idea treats AI like magic. Current AI algorithms are entirely based on rigorous mathematical reasoning and computation; they possess no magical abilities. Making them conscious would still require active human design. Expecting AI to awaken on its own is like putting the organic chemicals of life into a jar, shaking it, and expecting them to self-assemble into a living organism. Sometimes we have beautiful wishes, hoping that things we don't understand can spontaneously produce magic and miracles. But in the end, these wishes almost always come to nothing.

In short, while I find the current progress in AI exhilarating, I believe true human-level intelligence will require several more technological revolutions.