CS50–Week 0: Scratch

A series of articles based on Harvard CS50: Introduction to Computer Science Course by David J. Malan

Kenji Ariya
3 min readAug 22, 2022
A picture of people using laptop on their lap
Photo by Alex Kotliarskyi on Unsplash

What’s Computer Science?

Computer science isn’t just about programming and working in isolation on your computer.

Computer science is basically about problem solving. It helps you to think more methodically, carefully, correctly, and precisely. The reason behind this is that the computer isn’t going to do what you want, unless precise and methodical. Problem solving can be interpreted as process taking some input (problems to solve) and generate some output (solution to a problem).

How do Computer Speak and Communicate?

In the world of computers, we need to decide how we represent these inputs and outputs. In order to do that, computer uses a simple system called binary. Means that computer has just two digits at its disposal, 0 and 1. And indeed, humans have many more than that. So, how to communicate with computers? We can represent letters in numbers. Whatever we’re representing, can only be stored as zeros and ones.

A system that standardized these mapping for characters called as ASCII (American Standard Code for Information Interchange). With ASCII, you can only represent 256 total characters using English only. As time goes, the world decided to create a new mapping that supports other languages as well. This newer standard is called Unicode, with a capability represent up to 4 billion characters around the world.

Algorithms and Pseudocode

Let’s move on to problem solving. There’s a gap between input and output, which is algorithms. Algorithms contains a step-by-step instructions for solving problems. As beginners, pseudocode might be very useful, which is a presentation of algorithm in precise English or some other human language.

For example, let’s search “John Harvard” name on phone book. Algorithms take places in structuring these step-by-step. Start from checking the middle page, deciding what to do, and repeat. If the person isn’t on the page, and there’s no more pages in the book left, then we stop. Final case is important to remember, because the program might appear freeze or stop responding, results repeating the same work over and over without making any progress.

Pseudocode of searching someone name on phonebook

Scratch

For a beginner, Scratch might be really useful to understand the fundamentals of programming. With a friendly programming environment, it’ll let you to drag and drop things that look like puzzle pieces, that interlock together if it makes logical sense to do. Scratch will allow us to explore some of the programming fundamentals that will be in C, Python, JavaScript, and others.

Scratch environment preview of my project, “Break It Ken”

--

--