Programming vs. Training
How programming changed when people stopped writing every rule themselves.
For decades, programming meant dictating rules to a computer one by one: If the customer spends more than 100 euros, grant a discount. If the email contains the word "prize", flag it as spam. Then researchers asked a radical question: What if the computer could figure out the rules on its own?
This idea — that machines learn from examples instead of following instructions — transformed AI from a frozen research field into one of the most influential technologies of the 21st century. In this article, you will learn three things: why inverting the roles of rules and data changed everything, how the four building blocks of machine learning work together, and why the breakthrough happened in 2012 of all years.
The Inversion: From Rules to Data
In classical programming, a developer writes explicit rules that a computer executes. The programmer must understand the problem down to every detail and encode every edge case as an if-then statement. In machine learning, this process is completely reversed: the developer provides the computer with example data and the desired outcomes, and the machine discovers the underlying rules on its own.
Human writes rules. The computer executes those rules on new data and produces answers. The human must anticipate every edge case.
Human provides data and the expected answers. Training produces a model. This model generates answers for new data. The machine discovers the rules itself.
Machine Learning — When Computers Learn from Experience
The apple-pear analogy has limits: it suggests ML works effortlessly. In reality, ML requires large amounts of labeled data, and it can learn spurious patterns (such as background color instead of fruit shape). ML finds statistical patterns, not causal relationships.
A concrete example: a rule-based spam filter blocks emails containing "click here" or "you won." Spammers bypass it with typos like "cl1ck h3re." An ML model trained on 100,000 labeled emails learns subtle statistical patterns — word combinations, formatting cues, metadata signals — that no human could ever write as an explicit rulebook.
Common Misconception: "ML Replaces Programming"
Deep Dive: Tom Mitchell's Formal Definition (1997)
The Four Building Blocks of Machine Learning
Every ML system follows a four-stage pipeline. Think of preparing for an exam: the practice problems are your training data, your understanding is the model, studying is the training, and the actual exam is inference.
Training data consists of historical labeled examples the system learns from. These could be 10,000 images of cats and dogs, each with the correct label attached. The quality of this data matters more than its quantity — a model trained on poorly labeled data learns the wrong patterns.
The model is a mathematical function with adjustable parameters — the weights. Initially, these weights are randomly set, and the model produces nothing but nonsense. That changes in the next step.
During training, the model is shown data, makes a prediction, the error (loss) is measured, and the weights are adjusted via gradient descent. This cycle repeats hundreds or thousands of times — just like studying for an exam, where you solve problems, recognize mistakes, and improve your understanding.
Inference is the moment of truth: the trained model is applied to new, unseen data. Like the exam itself, where you must solve problems you have never seen before.
These four steps interlock seamlessly — and this is exactly where the mathematics from previous paths comes in: the loss function comes from calculus, the weight adjustment from linear algebra. ML absolutely requires mathematics.
Example: House Price Prediction in Pseudocode
Why 2012? The Three Factors
Machine learning theory had existed since the 1950s. Neural networks had been around for decades. Backpropagation was known since 1986. So why did everything explode in 2012? Because three factors were available simultaneously in sufficient measure for the first time.
Imagine cooking an elaborate dish: the algorithms are the recipe (known since the 1980s). The data are the ingredients (only available in mass with the internet era). The compute power is the professional kitchen (GPUs). In the 1980s, researchers had recipes but lacked both sufficient ingredients and a powerful enough kitchen. By 2012, everything was available simultaneously.
The turning point was the ImageNet competition in 2012. Traditional image recognition methods had plateaued at roughly 74% accuracy. Then a team entered with a deep neural network called AlexNet — and achieved 84.7%. This leap was larger than all improvements of the previous decade combined. AlexNet convinced the entire field that deep learning works.
AlexNet Success
The turning point for deep learning and modern AI. On September 30, 2012, the results of the ImageNet Challenge were published — AlexNet won by such a wide margin that computer vision was fundamentally changed. Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton from the University of Toronto developed a CNN architecture that beat its competition by a notable 10.9 percentage points — an improvement considered extraordinary in the scientific community. With 60 million parameters and innovative techniques such as ReLU activations and dropout layers, AlexNet demonstrated the practical superiority of deep learning impressively. That was the moment when an interesting theory became a dominant technology. Yann LeCun called it 'an undeniable turning point in the history of computer vision.' The GPU-based implementation paved the way for modern AI development.
Deep Dive: What AlexNet Changed Technically
Common Misconception: "ML Suddenly Appeared in 2012"
Interactive: 5 ML Myths Busted
Test your knowledge: click on a card to reveal the misconception. Each myth is based on a common misunderstanding about machine learning covered in this article.
Key Takeaways
Now you understand WHY machine learning works. The next article introduces the first concrete learning paradigm: Supervised Learning — learning with a teacher.
Quiz: Programming vs. Training
Did you understand everything?
- How would you explain the difference between classical programming and machine learning to a friend?
- What four steps does every ML system go through — and how do they interlock?
- Which three factors had to come together in 2012 for deep learning to finally work?