Table of Contents
Welcome
Before I scroll through the syllabus and explain the course policies in detail I want to give an overview of what this course actually is.
Overall Information
CS211 is an undergraduate level introductory programming course. The key words here being undergraduate and introductory. This class does not take for granted your ability to program a computer competently. We will go through in excruciating detail what it means to program a computer and how to do it using the C programming language.
Goals of This Course
The purpose of this course is to get you from not knowing how to program at all to being capable of reading/writing simple to intermediate C programs. This means by the end of the course you will have familiarity with all facets of the C programming language including its syntax, type system, runtime behaviour and much more. You'll also be picking up on general programming practices through the use of popular tooling and techniques. You'll be exposed to programs like make, gcc, and valgrind. Towards the end of the semester we'll also be covering a few simple, but essential, data structures including linked lists, stacks, and queues. If all goes well, we'll also take a look at C++ and show how it relates to all of what we learned about C during the semester.
Why C?
A short trip to the TIOBE index shows that there's at least 49 other languages to choose when deciding on a first programming language. To further confound matters, at the School of Computing we teach Python as the beginner programming language for first year computer science majors. So it only feels natural to ask: Why bother learning about C? Is there something special about C? Why not Python?
The cop out answer would be that there's no such thing as a "perfect" introductory programming language and we might as well use C, but that only side steps the question. We can boil down the answer to a few points:
- C is high level
- C is imperative
- C is statically typed
- C is "bare metal"
(1) means that C is easier to read and write than "machine level" languages; (2) means that C code is represented as step-by-step instructions that affect the state of the program (this behaviour is shared with many other popular languages); (3) means every variable must be explicitly assigned a type by the programmer; (4) means that C the programming abstractions used by C are closer to the hardware than other popular languages. Since everyone taking this course is either an aspiring electrical/computer engineer all of these points (particularly (4)) are relevant to your future needs.
Here's a tiny example of a C program:
1: #include <stdio.h> 2: int main(){ 3: printf("Hello, World!\n"); 4: }
In the next lecture, I'll teach you how to run it.