CS50 Week 0: A Great Start to Learning Computer Science

Week 0 Scratch

As someone passionate about computer science, I was excited to dive into Harvard's CS50 course and see what it had to offer. In Week 0, we covered a lot of ground, from computational thinking to programming in Scratch. Here's what I learned, and why I think CS50 is a great way to learn computer science.

Lecture

One aspect of CS50 that I really enjoyed was the lectures. The lecture is also available on YouTube for free. The lecture covered the following topics:

  • Introduction to computational thinking

  • Representation of data in different formats such as unary and binary

  • Mapping alphabets, emojis, numbers, and other characters through ASCII

  • How binary is used to store images, videos, colors, and sound

  • Algorithms, pseudocode, and basic programming

Scratch Programming Language

Another highlight of Week 0 was the Scratch programming language. Scratch is a beginner-friendly programming language that uses puzzle pieces to implement logic. It's easy to get started in Scratch, as it can be used directly in the browser without the need for a separate development environment. You can get started with scratch here. Some examples of Scratch programs were also shown in the lecture, with a focus on input, output, conditionals, loops, and more.

Problem Set 0

For the Week 0 assignment, we were tasked with implementing a project in Scratch, subject to the following requirements:

  • Use at least two sprites, at least one of which must not be a cat.

  • Have at least three scripts total.

  • Use at least one conditional, at least one loop, and at least one variable.

  • Use at least one custom block that you have made yourself (via Make a Block), which must take at least one input.

  • Be more complex than most of those demonstrated in lecture.

For my project, I decided to create a simple game where a player controls a spaceship to save it from incoming asteroids, named Save-Ship. Here are some details about the project:

  • The player controls the spaceship using the arrow keys

  • Asteroids appear randomly from the top of the screen and move down at varying speeds.

  • If the player collides with an asteroid three times, the game ends.

  • The player earns points for every asteroid survived.

This project allowed me to experiment with different features of Scratch, such as moving asteroids, generating random asteroids, and keeping track of points and lives left. While it took some time to figure out the logic and create custom blocks, I felt a sense of accomplishment when I finally finished the project. You can check it out here.

Conclusion

Overall, Week 0 of CS50 was a great start. The lectures and Scratch programming language were both engaging and accessible, and the Problem Set 0 assignment allowed me to put what I learned into practice with my own project. I'm looking forward to the rest of the course and the challenges it will bring. If you're interested in learning computer science, I highly recommend giving CS50 a try!