Back to labLearn AIShovon Saha
LEVEL 1Curious· 7 min

What a computer is actually doing

A vending machine, a list of rules, and why software breaks so suddenly.

Learning goal: You can spot input → transformation → output in anything.

Contents

1 / 10

You do not need to code to finish this lesson. You do need to be a bit stubborn for nine minutes.

Before you start

  • You need: nothing installed - just a browser and any AI chat window (ChatGPT, Claude, Gemini, whatever you have).
  • You need: no coding background at all; this lesson is deliberately code-free except one tiny readable example.
  • You need: about 15 minutes and a willingness to poke at something until it breaks.
  • You need: a phone or laptop with a calculator app, or any spreadsheet, for the warm-up.
  • Mindset: you are debugging your own assumptions about what "the system decided" means, not learning to program.

Do this first:

  1. Open your bank's app (or any app with a running balance) in your head, and write down one rule you're sure it follows, e.g. "if balance is negative, show it in red."
  2. Open a calculator and divide 1 by 0. Read whatever it says. That response was written by a human years ago, for exactly this case.
  3. Open any AI chat and ask it "divide 1 by 0 and explain what happens." Compare the two answers - one is a fixed rule, one is a guess about what a good answer sounds like.

Start with the least magical thing in the world: a vending machine

You put in a coin. You press B4. A bag of crisps falls out.

Nobody thinks a vending machine is intelligent, and yet it does something genuinely useful. Why does it work? Because a person, sitting at a desk, once wrote down every situation it could be in and what to do in each one:

  • Coin inserted? Add to balance.
  • Balance ≥ price and button pressed? Turn the coil for that slot.
  • Slot empty? Light the little "sold out" LED.

That list is the whole machine. If a situation is not on the list, the machine does nothing, or it does something dumb. It never improvises. That is traditional software in one sentence: a human wrote down the rules in advance, and the machine follows them exactly, forever, at enormous speed.

Every app you have ever used - your banking app, a spreadsheet, the traffic-light system in your city - is a very long, very carefully argued version of that list.


The three-box picture you will see all the way to the end

   ┌───────────┐        ┌──────────────────┐        ┌───────────┐
   │  INPUT    │──────▶ │  TRANSFORMATION  │──────▶ │  OUTPUT   │
   └───────────┘        └──────────────────┘        └───────────┘

Coin + button press → rules → crisps. Search text → rules → results. Photo + filter → rules → nicer photo. Once you can spot the three boxes in something, it stops being mysterious. Half of the fear people have about AI comes from not knowing where to draw the boxes. We will draw them every time.


Rules are astonishing, and then suddenly useless

Here is a real customer-support rule set. Watch what happens when a human types something slightly different from what the author imagined.

animated · rules vs patterns

The same sentence, four ways - through hand-written code and through a model.

customer says "refund my order 4471"

traditional software

Rules a human wrote

if text == "refund"
elif text == "cancel order"
elif text.startswith("refund my order")
else: sorry, I did not get that

matched rule #3

the LLM half

Patterns nobody wrote by hand

understood intent: refund

Neither side is the winner. Rules are cheap, instant and repeatable. Models are flexible and forgiving. An agent is what you get when you stop choosing and wire both together.

Play that through all four cases. Notice the shape of the failure: the code does not get slightly worse when the wording changes. It falls off a cliff. Matched or not matched. Right or "sorry, I did not get that".

This is the single most important thing to understand about normal software, because it explains why everyone got so excited about the other kind:

Traditional rulesWhat it costs you
Handles the case you thought ofPerfectly, foreverYou must think of every case
Handles a new phrasingNot at allA developer, a ticket, two weeks
Same answer twiceAlwaysAlso when it is wrong
Price per runEffectively zeroPrice is paid up front in human time
Can you explain the answerLine by line-

That last row matters more than people admit. A bank can point at line 412 and say this is why your loan was declined. Keep it in your pocket; it comes back in Level 4.


Where the rules physically live

You do not need to program, but you should know what a programmer is actually doing, because it demystifies the whole industry.

They are writing sentences like this:

python · sandbox

Browser interpreter: a limited Python subset. Package, file and API examples may use simulated responses. Run the project locally for real integrations.

Press Run. Change balance to 100 and run it again.

That is not a simplified illustration. That is the real thing. Software is millions of those, stacked, calling each other. There is no other secret ingredient. When someone says "the system decided", a human wrote the if.


The two jobs software has always been good at

  1. Remembering exactly. Databases. Your bank balance is correct to the cent, in a way no human ledger has ever been.
  2. Repeating without getting bored. A payment processor handles nine million transactions today with the same care as the first one.

Notice that both of these are about precision. Nothing in that list says "understand what someone meant". Computers have been superhuman at arithmetic since 1945 and, until very recently, worse than a distracted toddler at "is this email angry?".

That gap - brilliant at exactness, hopeless at meaning - is exactly the hole the next lesson fills.


Where things stand (as of 2026)

Rule-based software still runs almost everything that touches money, safety, or law - banking cores, flight control, tax calculations. That has not changed and is not going to. What has changed is that AI is now routinely bolted onto the edges of these systems (as you'll see in Level 3), while the exact, auditable core stays untouched. What is still unreliable: knowing, from the outside, where the line between "hard rule" and "AI guess" actually sits inside a product you're using. Companies rarely advertise it clearly. The details of which company uses what, and how, shift every few months - treat any specific claim you read about a product's internals as a snapshot, not a permanent fact, and check the date on it.

How to read the docs and look things up

For plain software, the "primary source" is usually a company's own engineering blog, a status page, or (for open tools) the actual README on GitHub, not a news article summarising it. A quick way to tell a marketing page from a real spec: specs have version numbers, dates, and boring tables; marketing pages have adjectives and no dates. To test a claim yourself in ten minutes: find the actual feature in the product, try to break it with an unusual input (like the "divide by zero" trick above), and see whether it fails sharply (a sign of hard-coded rules) or gracefully (a sign something more flexible is behind it). Keep a running note - date, what you tried, what happened - because "I read somewhere that X does Y" ages badly within a year.

Check yourself

  • Can you describe your last app interaction as input → transformation → output?
  • Why does a rule-based system fail so sharply rather than gradually?
  • Who decides what a piece of traditional software does: the machine, or a person who left the building three years ago?

Common mistake: thinking that "AI will replace software". It will not. Almost everything valuable an AI does ends up calling boring, exact, rule-based code to actually get anything done - as you will see very clearly in Level 3.


Recap: what changed in your head

  • You can now spot input → transformation → output in almost anything.
  • You know why rule-based systems fail sharply instead of gradually.
  • You know that "the system decided" always traces back to a human's if.
  • You know the two things software has always been good at: exact memory and tireless repetition.
  • You're primed for the gap this leaves - understanding meaning - which the next lesson fills.