Code is just a very fussy recipe
A computer is fast, obedient and extremely stupid. Code is how you tell it what to do.
Imagine writing instructions for making tea β for someone who is incredibly fast, will do exactly what you say, and has absolutely no common sense.
You write: "Put the teabag in the cup."
They ask: "Which cup?"
You say: "The cup on the table."
They ask: "There are two cups on the table."
That conversation is programming. All of it.
What a programmer does all day
Not what films suggest. A real programmer spends their day:
- Working out exactly what the task is (harder than it sounds)
- Breaking it into steps small enough for a computer
- Writing those steps
- Finding out why it doesn't work (debugging β this is most of the job)
- Making it readable so a colleague can change it in six months
Notice that only one of those five is typing code. Programming is mostly thinking clearly and being patient.
The three ideas that build all software
Genuinely all of it. Every app on your phone is made of these three things.
1. Do something
price = 100
tax = price * 0.18
total = price + taxWe stored a number, calculated another, added them. price is a variable β a labelled box holding a value.
2. Choose between things
if total > 1000:
discount = 10
else:
discount = 0This is the exact same idea as Excel's IF. A fork in the road: a question, a yes path, a no path.
3. Repeat things
for customer in customer_list:
send_email(customer)"For each customer in the list, send them an email." If the list has 4,000 people, that's three lines of code and about six seconds.
That third one is why software matters. Repeating an action four thousand times costs a computer nothing.
You can already read code
Look at this and just guess:
students = ["Amit", "Priya", "Sara"]
for name in students:
if name.startswith("A"):
print(name + " β starts with A")
else:
print(name)Read it as English: make a list of three students; for each name in the list; if the name starts with "A", print the name plus a note; otherwise just print the name.
Output:
Amit β starts with A
Priya
SaraYou just read code. It wasn't magic, it was a list, a loop and a question.
Why you'd learn this even for a non-coding job
- You can talk to developers without nodding blankly
- You can estimate whether a request is "five minutes" or "three weeks"
- You can automate the boring 20% of your own job
- AI tools now write code for you β but you need to understand it well enough to check it
Too Long; Didnβt Read
- Code is instructions for something fast, obedient and completely literal.
- All software is built from three ideas: do something, choose between things, repeat things.
- Most of programming is thinking clearly and debugging, not typing.
Your tiny task
Write instructions for making a cup of tea for someone with zero common sense. Aim for at least 15 steps. Notice every place you had to add "which one?" or "how much?" β that is exactly what programming feels like.
It takes a few minutes and itβs the bit that makes the lesson stick.
Quick check
0 of 3 answered
Three questions. Get one wrong and youβll get a hint β thereβs no penalty and you can try again straight away.
Your score is saved to your dashboard.
Finished reading? Tick it off.
Create a free account to save your progress, streak and badges.
Up next: How a website actually works
Advertisement
Ad space (lessonFooter)
Add your AdSense IDs to .env and real ads appear here.
Ads keep the free courses free. Go Pro to remove them.