# 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
4 years, 6 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

• bulleted
• list

1. numbered
2. list

1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

> This is a quote
This is a quote
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

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.

- 4 years, 6 months ago