CS50 2022 - Lecture 0 - Scratch
David Malan took CS50 and Harvard's Introduction to the Intellectual Enterprises of Computer
Science and the Arts of Programming. Malan says that the light bulb went off in his freshman year
of studying computer science. He says that the hope for CS50 more generally is that you just find
your way to applying principles that you'll learn to whatever field is of interest to you. The key to
success in programming in general is just to allow yourself enough time. Over time and with
practice, everything just starts to make more sense. 2/3 of you have never taken a cs class before.
So it's absolutely not the case that the person to the left or the right surely must know more than
you. Indeed, as you write your own code and solve your own problems, what ultimately matters is
the code. We'll soon see why computers and computer scientists start counting from 0. Week 0 is
one in which we explore computational thinking, thinking like a computer. Getting you to think and
then translating that into code. thereafter, we're going to transition just next week to week one.
We'll introduce you to a more traditional language.
We'll take a look underneath the hood of your computer at your memory or RAM, random access
memory. And we'll transition then to algorithms, stepbystep instructions for solving some
problems. We'll use metaphors along the way, if it helps, and then explore ideas in computer
science that you can apply. We'll talk about problems that arise even nowadays. In fact, most of you
are familiar with your Mac, PC, and even phone like spontaneously rebooting sometimes. And you
can go to a mailbox to grab information that's from it. At the end of the day, that's really all your
computer is doing with information. It's just organizing it, not into mailboxes per se, but a term you
probably know called bytes. As soon as next week, in week one, we'll transition to a more modern,
higher level language called Python. The course very deliberately introduces you first to C, which
many people don't tend to program in certainly every day. In fact, even today's other languages—
with which you might be familiar like Python and Java and yet others still—you see this same
primitive language underneath the hood.
This is the very first web app that I myself made back in 1997. I was teaching myself how to build
web applications. I only knew C and maybe a little bit of something else at the time. CS50 Puzzle
Day is meant to be not jigsaw puzzles but logic puzzles that require no prior experience with
computer science or programming. Later in the semester, once you tackle your final projects, the
capstone of the course, you yourself come up with something to build. The CS50 fair allows you to
come with your laptop or phone and exhibits of students, faculty and staff across campus put
together something in person and on video that people can delight in seeing. And ultimately, a
chance to just share and inspire others as well. Computational thinking is just the application of
ideas from computer science. In the coming months, we'll have to decide how are we going to
represent these inputs and outputs, and really, how do we code up. How do we write solutions for
what it is that's solving the problem of interest to us. So when it comes to representation of
information, like there's a lot of ways we can do this. But unary is a simple system of using a single
symbol, a human finger, to solve some problem.
A bit is a 0 or a 1, a binary digit. Computers use binary. Human beings generally think and talk in
terms of decimal. But at the end of the day, these are fundamentally going to be the same thing.
Even if you're not a computer person, I dare say you're about to be. So why is this relevant to
computers? If you think of this in miniature form, in your mind's eye, this is like a computer with
three transistors representing now the number you and I know as 0. So how does a computer go
David Malan took CS50 and Harvard's Introduction to the Intellectual Enterprises of Computer
Science and the Arts of Programming. Malan says that the light bulb went off in his freshman year
of studying computer science. He says that the hope for CS50 more generally is that you just find
your way to applying principles that you'll learn to whatever field is of interest to you. The key to
success in programming in general is just to allow yourself enough time. Over time and with
practice, everything just starts to make more sense. 2/3 of you have never taken a cs class before.
So it's absolutely not the case that the person to the left or the right surely must know more than
you. Indeed, as you write your own code and solve your own problems, what ultimately matters is
the code. We'll soon see why computers and computer scientists start counting from 0. Week 0 is
one in which we explore computational thinking, thinking like a computer. Getting you to think and
then translating that into code. thereafter, we're going to transition just next week to week one.
We'll introduce you to a more traditional language.
We'll take a look underneath the hood of your computer at your memory or RAM, random access
memory. And we'll transition then to algorithms, stepbystep instructions for solving some
problems. We'll use metaphors along the way, if it helps, and then explore ideas in computer
science that you can apply. We'll talk about problems that arise even nowadays. In fact, most of you
are familiar with your Mac, PC, and even phone like spontaneously rebooting sometimes. And you
can go to a mailbox to grab information that's from it. At the end of the day, that's really all your
computer is doing with information. It's just organizing it, not into mailboxes per se, but a term you
probably know called bytes. As soon as next week, in week one, we'll transition to a more modern,
higher level language called Python. The course very deliberately introduces you first to C, which
many people don't tend to program in certainly every day. In fact, even today's other languages—
with which you might be familiar like Python and Java and yet others still—you see this same
primitive language underneath the hood.
This is the very first web app that I myself made back in 1997. I was teaching myself how to build
web applications. I only knew C and maybe a little bit of something else at the time. CS50 Puzzle
Day is meant to be not jigsaw puzzles but logic puzzles that require no prior experience with
computer science or programming. Later in the semester, once you tackle your final projects, the
capstone of the course, you yourself come up with something to build. The CS50 fair allows you to
come with your laptop or phone and exhibits of students, faculty and staff across campus put
together something in person and on video that people can delight in seeing. And ultimately, a
chance to just share and inspire others as well. Computational thinking is just the application of
ideas from computer science. In the coming months, we'll have to decide how are we going to
represent these inputs and outputs, and really, how do we code up. How do we write solutions for
what it is that's solving the problem of interest to us. So when it comes to representation of
information, like there's a lot of ways we can do this. But unary is a simple system of using a single
symbol, a human finger, to solve some problem.
A bit is a 0 or a 1, a binary digit. Computers use binary. Human beings generally think and talk in
terms of decimal. But at the end of the day, these are fundamentally going to be the same thing.
Even if you're not a computer person, I dare say you're about to be. So why is this relevant to
computers? If you think of this in miniature form, in your mind's eye, this is like a computer with
three transistors representing now the number you and I know as 0. So how does a computer go