28-07-2026
What I Did
Three rooms today, opening up the programming side of Module 4: Python: Simple Demo, JavaScript: Simple Demo, and Database SQL Basics.
Python: Simple Demo
This room builds a Guess the Number game gradually — v1 handles input, v2 adds decisions, v3 adds a loop, v4 adds validation — and that structure was the biggest thing that clicked. Variables, conditionals, and loops stopped feeling like three separate topics and started looking like one system: variables remember state (the secret, the guess, how many tries), conditionals decide what a guess means, and the loop controls whether the whole thing repeats.
The other useful realization: input() always returns text, even if someone types a number, so the program has to explicitly convert it with int() before comparing it to anything numeric. And the final else in the if/elif/else chain doesn't need its own check — by the time execution reaches it, every other possibility (out of range, too low, too high) has already been ruled out, so equality is the only option left.
What needed a second look: why initialize guess = 0 at the start. The secret is always between 1 and 20, so starting guess at 0 guarantees it can't accidentally already equal the secret — which is exactly what lets the while guess != secret loop actually begin.
JavaScript: Simple Demo
This room rebuilds the exact same Guess the Number game in JavaScript, which made the biggest lesson obvious: Python and JavaScript can look completely different while expressing identical logic. print() becomes console.log(), int(text) becomes parseInt(text, 10), elif becomes else if, != becomes !== — but underneath, it's still variables remembering, conditionals deciding, loops repeating. That reframed learning a second language as learning new syntax for ideas I already had, not starting over.
let vs const also clicked once I stopped treating them as arbitrary keyword choices: if a value needs to change (tries, guess), use let; if it shouldn't be reassigned after being set (secret), use const.
The one thing that took real unpacking: Math.floor(Math.random() * 20) + 1. Reading it as a pipeline made it click — Math.random() gives a decimal between 0 and 1, multiplying by 20 stretches that to 0–20, Math.floor() rounds down to a whole number 0–19, and adding 1 shifts the range to 1–20.
Database SQL Basics
The café notebook example made the whole point of databases obvious immediately: a notebook means searching page by page by hand, while a database means the computer searches instantly, even across millions of records. From there, tables/rows/columns stopped being definitions to memorize and became one mental picture — a spreadsheet where each column is one type of information and each row is one complete record.
Writing actual SQL queries clicked once I saw that each keyword just answers a different question: SELECT asks what you want, FROM asks where it lives, WHERE asks which rows qualify, ORDER BY asks how to sort what's left. Combining WHERE and ORDER BY in one query showed that SQL is built like building blocks — a few keywords stacked together to ask increasingly specific questions, not a huge list of separate commands to memorize.
The part worth double-checking: WHERE and ORDER BY do genuinely different jobs. WHERE filters — it reduces which rows show up at all. ORDER BY only changes the order of whatever rows are already there. Mixing those up leads to expecting a query to filter when it's actually just re-sorting the exact same set of rows.
Visuals
The shared logic behind both programming demos, regardless of language:
How a SQL query actually gets answered:
What's Next
That closes out all five rooms of Module 4: Software Basics. Module 5: Network Fundamentals is next.


Top comments (0)