Builder to Architect
CS Fundamentals

CS50 Lecture 0 — Scratch

Learn how computers think. Understand binary, algorithms, and abstraction through visual programming with Scratch.

What is Computer Science?

Computer science is not really about computers, and it's not really about science. It's about problem solving — taking an input (a problem), processing it, and producing an output (a solution). Every app, every website, every tool you've ever used follows this pattern.

When you vibe-code a project, you're already doing this. But understanding how the processing works underneath is what separates someone who copies code from someone who architects systems.

Binary — How Computers Count

Computers only understand two things: on and off. That's it. We represent this as 1 (on) and 0 (off). This is called binary.

You already know a counting system: decimal (base 10). You have digits 0-9, and when you run out, you carry over: 9 → 10 → 11...

Binary works the same way, but with only 0 and 1:

  • 0 = 0
  • 1 = 1
  • 10 = 2
  • 11 = 3
  • 100 = 4
  • 101 = 5

Each position in binary represents a power of 2 (1, 2, 4, 8, 16, 32...). So 101 means: (1 × 4) + (0 × 2) + (1 × 1) = 5.

Every photo, every email, every spreadsheet your GEC clients send you — it's all stored as billions of 0s and 1s.

ASCII and Unicode — How Computers Store Text

If computers only know numbers, how do they store the letter "A"? By agreement. Everyone agreed that the number 65 means "A", 66 means "B", and so on. This system is called ASCII.

But ASCII only covers English. For Georgian (ა, ბ, გ...), Arabic, Chinese, and thousands of other characters, we need Unicode — a much larger system that assigns a unique number to every character in every language. When your browser displays ქართული, it's reading Unicode numbers and drawing the right shapes.

Algorithms — Step-by-Step Problem Solving

An algorithm is just a set of step-by-step instructions to solve a problem. You already use algorithms every day:

The phone book example from CS50: Imagine you need to find "John Smith" in a phone book with 1000 pages.

  • Algorithm 1: Start at page 1, check, go to page 2, check... This works but takes up to 1000 steps. Terrible.
  • Algorithm 2: Skip every 2 pages. Faster (500 steps max) but you might skip past John.
  • Algorithm 3: Open to the middle. Is John before or after this page? Throw away half the book. Repeat. This takes only about 10 steps for 1000 pages!

Algorithm 3 is called binary search — you'll learn it deeply in Week 4. The key insight: the right algorithm can make a problem thousands of times faster to solve. This matters when your system handles real data.

Abstraction — Hiding Complexity

Abstraction means hiding the messy details behind a simple interface. You don't need to understand how your car engine works to drive — you just use the steering wheel and pedals. That's abstraction.

In programming:

  • When you call fetch() in JavaScript, you don't think about TCP packets, DNS resolution, or HTTP headers. Those details are abstracted away.
  • When you deploy to Netlify, you don't configure servers. The deployment complexity is abstracted.

Good systems are built in layers of abstraction. Each layer hides the complexity of the layer below it. This is why your vibe-coded projects work even though you don't fully understand every line — you're using abstractions built by others.

The goal of this course is to help you understand what's happening inside those abstractions, so you can build better ones yourself.

Scratch — Visual Programming

CS50 starts with Scratch, a visual programming language from MIT. Instead of typing code, you drag and drop colorful blocks that snap together. This isn't "baby programming" — it teaches the same fundamental concepts as Python, JavaScript, or any language:

  • Functions: A named block that does something (like "say hello")
  • Loops: Repeat something multiple times (like "forever" or "repeat 10 times")
  • Conditionals: Make decisions (like "if touching edge, bounce")
  • Variables: Store and remember values (like "score = 0")
  • Events: Respond to things happening (like "when green flag clicked")

Every programming language has these same building blocks. Once you understand them in Scratch, you'll recognize them everywhere.

What to Do This Week

  1. Watch CS50 Lecture 0 (link above) — David Malan is one of the best lecturers alive. The lecture is ~2 hours but worth every minute.
  2. Build something in Scratch — Open the Scratch editor and create a simple project. It could be a game, an animation, or an interactive story. The CS50 problem set guides you through this.
  3. Take the quiz below to check your understanding.

The point isn't to master Scratch — it's to internalize the concepts of computational thinking that apply to everything you'll build.

Quiz

Question 1/5Score: 0

What is an algorithm?