Waste less time on Facebook — follow Brilliant.

CS50 - Week 1: Wednesday - Getting started with C, introduction to tools, bugs

Today I watched Week 1, lecture 1. In this lecture, we got acquainted with the programming environment for students (the CS50 appliance), the simple code editor, and began to make the leap from the graphic programming Scratch to the word-based programming language C.

We learned the "quirks" of getting started programming, which largely seem to boil down to the fact that computers only do what you tell them to do. By that, I mean that a missed comma is important, as the computer follows very rigid rules about how it processes its input. When I write an email to a friend, the same rules don't apply! Similarly, if I try to bake a cake, and I mess up the ingredients or the method slightly, I will likely wind up with something that, by and large, is a cake, or at least cake like.

There is another side to this argument, though, which is that in the event of a mistake, my oven will return me no do overs, no data about what went wrong, and a ruined cake. Once one learns to understand the errors, the program will return garbage, but a chance to start over with low costs. (Note: it is true that an experienced chef will know from the output what the initial errors are, so please excuse me the poor parallel.)

The several times I've tried to get started programming previously, I've run into the intimidating error problem the teacher discusses briefly: you make a small beginners mistake, and the computer throws 20 lines of uninterpretable errors! Obviously to the trained eye, these errors mean things, but it makes being a beginner very hard. As the teacher points out, these errors actually do have meanings, and if you aren't intimidated you can figure out what they mean and how to fix your program.

I already know that there are all kinds of sophisticated tools and code editors that are built to help programmers not make these errors, as well as conventions of formatting, commenting, and naming, but again, these are things that don't help true novices immediately.

So, today we learned how to make a program in C that prints "Hello World" on the screen, and then another program that asks for your name, and then says "Hello (name)". We even learned how to write a program that loops, and counts. Nothing shocking, but it's a start.

Note by Daniel Hirschberg
2 years, 9 months ago

No vote yet
1 vote


Sort by:

Top Newest

I have watched both the lectures of week 1 and I loved them. But the CS50 appliance is well over 1GB in size. That sucks:( ! I've asked one of my friends who has unlimited internet data usage [and is taking the course with me] to download it. Mursalin Habib · 2 years, 9 months ago

Log in to reply


Problem Loading...

Note Loading...

Set Loading...