Skip to main content
Back to module
Lesson 1 of 3

The Recipe Analogy

Traditional Programming vs. Machine Learning

Scenario: Teaching a computer to recognize apples 🍎

Traditional Programming (The Rule Book):

A programmer writes exact rules: IF color is red AND shape is round AND size is 7-10cm THEN it's an apple.

Problems: What about yellow apples? Apple slices? Different lighting?

Machine Learning (Learning by Example):

Show the computer 5,000 apple photos and 5,000 orange photos. The computer finds patterns itself and can identify NEW apples it has never seen!

The Key Difference

| | Traditional Programming | Machine Learning |
|:---|:---|:---|
| Who solves the problem? | Human programmer | The computer |
| How? | Write explicit rules | Learn from examples |
| Flexibility | Brittle — breaks with edge cases | Adaptable — handles variation |
| Analogy | Teaching with a rulebook | Teaching with flashcards |
Exercise10 points0 attempts

In the 'apple recognition' example, why is Machine Learning better than Traditional Programming?