Part 1 · Article 4 Stage 1 · Foundations

RULES VS LEARNING

The old way (writing step-by-step instructions) vs. the new way (showing thousands of examples and letting the machine infer the pattern).

About 13–15 minutes

01

Two Completely Different Ways to Teach a Computer

Suppose you want a computer to recognize a picture of a Golden Retriever. How do you explain what a Golden Retriever looks like to a machine that only understands numbers? For the first forty years of computing, programmers tried to do it by writing explicit rules—like a legal contract or a baking recipe.

They wrote lines of code saying: IF fur color is golden-yellow AND ear shape is floppy AND snout length is medium AND tail is feathered, THEN label = Golden Retriever. It sounded logical in a meeting room. It fell apart the moment the camera caught a wet Golden Retriever after a swim, a puppy lying curled up in a shadow, or a yellow Labrador that matched almost every rule on the list [1].

That clash captures the single biggest shift in software history: Rules-Based Programming (the old way) versus Machine Learning (the new way). In the old way, humans supply the rules and the data, and the computer spits out answers. In the new way, humans supply the data and the correct answers, and the computer figures out the rules on its own [2].

The Old Way: Rules-Based Code

Inputs: Human-written IF/THEN rules + new data.
Output: Exact, predictable answers.
Works like a strict tax form or thermostat: fast, transparent, and 100% obedient, but completely helpless when an edge case breaks the rules.

The New Way: Machine Learning

Inputs: Thousands of labeled examples (data + answers).
Output: Learned statistical rules.
Works like teaching a child by pointing at animals at the zoo: handles messy variations gracefully, though harder to inspect rule-by-rule.

ZappyWait—if Machine Learning figures out the rules on its own, why don't we throw away all old-fashioned rule-based code?

Prof. BoltBecause you never want an AI "guessing" the odds of 2 + 2 = 4 or whether a lethal drug dose exceeds the safe limit! Rules are unbeatable when the law is crystal clear; learning is unbeatable when reality is too messy to write down.

02

How the Old Way Worked: Expert Systems & Medical Flowcharts

In the 1970s and 1980s, pioneers built famous rule-based programs called Expert Systems. One of the most celebrated was MYCIN, built at Stanford University to help doctors identify bacteria causing severe blood infections and recommend the right antibiotics [3].

To build MYCIN, computer scientists spent years interviewing infectious-disease specialists and translating their clinical wisdom into roughly 600 hand-crafted IF-THEN rules. For example: IF the stain of the organism is gram-negative AND the morphology is rod AND the patient is a compromised host, THEN there is suggestive evidence (0.6) that the organism is Pseudomonas.

In controlled tests, MYCIN performed remarkably well—matching or beating junior doctors on narrow blood-infection cases. Yet MYCIN was never deployed in routine hospital wards. Why? Because maintaining 600 interlocking rules was fragile. Changing one rule could accidentally break ten others. Worse, if a patient arrived with a brand-new bacterial strain or an unusual combination of symptoms that no programmer had typed into the rulebook, MYCIN hit a brick wall. Real medicine had too many exceptions for human typists to anticipate.

The Two Workflows Side by Side
Old Way: Human Writes Rules Computer Applies Rules New Way: Human Shows Examples Computer Discovers Rules
THE LEARNING SHIFT IN ACTIONHow showing examples solved problems that defied fifty years of hand-written code
03

How the New Way Works: Training by Example

Instead of writing a rulebook, Machine Learning sets up a giant game of "guess and adjust." Suppose a team wants software that detects early signs of pneumonia from chest X-rays. Instead of asking radiologists to measure pixel shades and write formulas, the team collects 200,000 past chest X-rays—100,000 confirmed healthy and 100,000 confirmed pneumonia—and hides the answers from the model during training.

At the very beginning, the model's internal mathematical weights are completely random. It looks at the first X-ray and makes a wild guess: "52% chance of healthy." The training software checks the true label ("pneumonia"), calculates how far off the guess was, and nudges millions of internal weights slightly so that next time, similar pixel patterns tilt toward "pneumonia" [4].

Repeat that nudge across 200,000 X-rays dozens of times—millions of tiny adjustments—and the model gradually carves out subtle, multi-dimensional patterns that no human could ever write as neat IF-THEN statements. It learns to ignore rib shadows, adjust for patient posture, and spot faint cloudy patches in the lower lobes.

Why Hand-Written Rules Hit a Wall on Messy Real-World Tasks
Payroll Tax Calculation
~50 Exact Rules
Hospital Drug Allergy Check
~5,000 Rules
Recognizing Handwritten Notes
Millions of Variations

No human team can write a rule for every person's messy handwriting—showing 100,000 examples lets the machine learn the patterns automatically.

04

The Trade-Offs: Transparency vs. Flexibility

Choosing between rules and learning is never about picking "old" vs. "modern"—it is about choosing between crystal-clear transparency and messy-world flexibility. When a rule-based system rejects a loan or flags a pharmacy order, you can point to line 42 of the code and see the exact reason: "Patient has documented penicillin allergy; amoxicillin blocked." There is zero mystery.

With a learned model, especially a deep neural network with millions of weights, explaining why it flagged a borderline heart scan is much harder. You cannot easily read a single English sentence out of ten million decimal numbers. Furthermore, a learning system is only as trustworthy as the examples you showed it. If your training examples came from only one demographic group or one hospital scanner, the learned rules will quietly bake in those blind spots [5].

FeatureRules-Based Systems (Old Way)Machine Learning (New Way)
How It Is BuiltHuman experts write explicit IF-THEN logicTrained on thousands/millions of labeled examples
Explainability100% transparent—every step is readable codeOften a "black box" of millions of weights
Handling Messy InputsBreaks easily on accents, lighting, or typosHandles noise, accents, and visual variety smoothly
Best Clinical UseHard safety guardrails (max drug dose, allergy alerts)Image screening, risk triage, voice-to-text notes
Modern systems combine both worlds: Machine Learning handles messy perception (reading scans, transcribing speech), while hard-coded Rules enforce strict safety limits (blocking unsafe dosages).
05

The Three Questions That Decide: Rules or Learning?

Whether you are building software for a neighborhood pharmacy, a bank, or a hospital ward, choosing between hand-written rules and machine learning comes down to three practical tests:

Test 1: Can a human expert write down all the rules on two pages? Calculating body mass index (weight divided by height squared), checking whether a patient's age qualifies for a standard vaccine schedule, or converting milligrams to micrograms are governed by exact laws of math and policy. Never use Machine Learning for exact arithmetic or strict legal rules—a five-line rule-based script is 100% accurate, instantaneous, and never hallucinates.

Test 2: Does the input come from the messy physical world? Photographs of skin rashes, spoken doctor notes with background corridor noise, handwritten prescriptions, or continuous heart-rate waveforms vary endlessly from person to person. Trying to write IF-THEN rules for pixel brightness or voice pitch is a trap. Whenever data comes from cameras, microphones, or messy human language, Machine Learning wins decisively.

Test 3: What happens when a mistake occurs—do you need an exact audit trail? In high-stakes regulated settings—like insurance coverage denials, ICU ventilator shutoffs, or automated pharmacy dispensing—regulators and doctors demand to know why a decision happened. Pure deep learning models struggle to give simple human reasons, which is why modern healthcare engineering builds hybrid guardrails: a Machine Learning model suggests a recommendation, and a strict rule-based safety layer verifies that every vital sign and dosage sits inside safe physiological boundaries before any action reaches the patient.

When Rules Rule

Tax brackets, unit conversions, allergy contraindication checks, maximum safe drug dosage limits, and emergency triage cutoffs. Zero guesswork allowed.

When Learning Leads

Spam detection, speech-to-text dictation, spotting tumors on MRI scans, predicting sepsis from noisy vitals, and translating medical leaflets across languages.

06

Why Data Quality Became the New Programming

In the old rules-based era, if software made a mistake, engineers opened the code editor and fixed a buggy line of logic. In the Machine Learning era, if a model makes a mistake, engineers rarely touch the learning algorithm at all—instead, they open the training dataset to see what misleading examples taught the machine the wrong habit.

Consider pulse oximeters and skin-tone datasets, or dermatology models trained primarily on light-skinned patients. When a model underperforms on darker skin tones, the math equation isn't "broken"—the examples fed into the equation were incomplete. Teaching by example means your curriculum is your code. Curating clean, fair, representative examples is now the single highest-leverage job in modern AI.

ZappySo in the old days programmers spent all night debugging code, and today AI teams spend all night debugging messy spreadsheets and photo folders?

Prof. BoltYou nailed it! Garbage rules gave garbage answers in 1985; biased or sloppy training examples give biased or sloppy predictions today. The medium changed from code to data, but human care still decides the quality.

07

A Step-by-Step Story: How a Clinic Upgraded Its Triage Desk

To watch Rules vs. Learning play out in real life, look at what happened when a busy regional outpatient clinic tried to cut down emergency-room wait times for chest-pain and breathing patients.

Attempt 1 (Pure Rules): Initially, the clinic's IT team programmed a rigid 40-rule intake form. If a patient ticked "chest tightness" AND "age over 50," the software triggered a red urgent flag. Within two weeks, nurses were overwhelmed: harmless heartburn, mild anxiety, and pulled chest muscles triggered dozens of false alarms every morning, while an elderly diabetic woman experiencing silent heart-attack fatigue (with zero chest pain) slipped quietly to the back of the queue because she didn't match the textbook rule.

Attempt 2 (Pure Learning): Next, a vendor installed a black-box Machine Learning risk score trained on regional insurance claims. It caught subtle combinations of age, lab history, and vital-sign trends—including the silent fatigue cases! However, on Tuesday afternoon, a software glitch caused a patient's pulse oximeter to read 0% oxygen, and the model calmly output a "moderate risk" score because 0% never appeared in its training table.

Attempt 3 (The Hybrid Solution): Finally, the clinical team combined both approaches. Hard-coded Rules acted as unbreakable safety circuit-breakers at the front door (flagging any oxygen reading below 90%, extreme heart rates, or sensor errors immediately), while a calibrated Machine Learning model ranked subtle multi-factor risks in the middle tier for nurse review. False alarms dropped by 40%, and high-risk silent cases were seen twice as fast.

Rules enforce hard clinical boundaries that must never be crossed; Learning uncovers subtle multi-variable patterns that human checklists miss. Together, they cover each other's blind spots.

The evidence file

Checked December 2026. Source types are labelled. Dialogue is fictional.

  1. AI and Machine Learning for Coders (Laurence Moroney), Technical Book, 2020; classic comparison of rule-based programming vs. machine learning paradigms.
  2. A Few Useful Things to Know About Machine Learning, Communications of the ACM, 2012; Pedro Domingos on how ML replaces hand-crafted rules with data-driven generalization.
  3. Rule-Based Expert Systems: The MYCIN Experiments, Stanford Heuristic Programming Project, 1984; architecture and maintenance bottlenecks of 600-rule medical diagnosis systems.
  4. Deep learning (gradient descent & representation learning), Nature, 2015; how iterative error-correction adjusts millions of parameters across training examples.
  5. Dissecting racial bias in an algorithm used to manage the health of populations, Science, 2019; how learned healthcare models inherit blind spots from historical data proxies.
Write to ussrini.present@gmail.com
Read more: srinipresents.com