School of Computer Science, Universidad de Concepción
Prof. Leo Ferres
This is the first "real" Computer Science course in the CS degree at UdeC. And it is my personal favorite. I've programmed computers since I was nine years old, on a Czerweny 1500, an Argentinean clone of the Timex Sinclair 1500 computer, first introduced in 1983. I've loved it ever since.
The objective of this course is to give you the most basic tools you need to understand programming. However, this is not your run-o'-the-mill, vanilla, Java-ish programming course. It will not teach you (many) good practices of software engineering, nor will it teach you how to be a good programmer (who could in a Semester, anyway). What it will do is teach you to understand how a computer does what you tell it to do through a computer programming language. Programming is not black magic, and computers are not black boxes, my job in this course is to make both transparent.
We will use C, but the syntax is irrelevant. I could have picked any programming language. However, C gives me the control and it is lean enough to teach you the concepts I want to teach you. In fact, if I am successful teaching you those concepts, at the end of this course you will be able to easily learn any computer syntax with minimum effort (well, maybe not Prolog... but still).
Have fun in your journey, and happy coding.
A digression: If you get a mark >= 6.1, you get to be invited to WEFU. WEFU (Weird & Funny Algorithms Seminar) is a by-invitation-only
workshop, held the first term of each calendar year, where you learn stuff more in-depth by solving an (as of yet unimplemented) algorithm. There's usually five or six people in WEFU every year, the best three will become 503208's TAs the year following their WEFU attendance.
|Phone: 220 3573
|Office: 305 FI
Contacting the staff: Best way to get a hold of us is to send email to all of us (TA's and myself) and you will have three times the chances of being replied to. TAs, being more responsible, will probably be in their office, so go bother them. If you absolutely have to bother me, best way to contact me is via email. You can call my office, come and bang on my door, whatever, but I enjoy being alone, and I'm usually away from my desk, working from somewhere else. So try not to.
|readings: K&R 2.1-2.6, 2.8-2.10
|code (extra video)
|readings: K&R 2.7 and 2.12, n1570 6.3
|readings: K&R 2.11, 3.1-3.4, 3.8
|readings: K&R 4.1-4.4, 4.6, 4.8-4.9
|readings: K&R 7.1-7.2, 7.4, 7.7
|readings: K&R 5.6-5.9
Miniquizzes are short (1 or 2 questions) quizzes that will be done daily at some point during class. These have no mark associated to them (you cannot "fail" them), but you can only miss 3 of them. If you miss 4, you automatically receive a NCR mark, even if you've passed all other evaluations with the highest mark. This is to ensure continuity of your learning experience.
There will be three assignments, due on the dates below. Two files will be required:
nowebfile (with extension
nw) containing both the explanation (in Spanish) and the code.
Makefileto generate the code and documentation. Here's a sample Makefile with a few instructions in comments inside.
You will be required to post your files in a
.tar.gz file through
.tar.gz file must be named after your student number
and the suffix
x is the assignment number (1, 2, or
202012344A1.tar.gz refers to student 202012344, who handed in
assignment 1. After running
make in your directory, the file should
You have to pass the three assignments with an average (A1+A2+A3)/3 >= 4. There are no "bonus" assignments.
The way I mark the assignments is as follows: I do three input tests. One of them, the first one, is the example test. Everyone should get this right! (if not, it means you didn't do it, or you didn't really compile it, etc.) The other two are novel examples. The marking guide (or "pauta") is the following:
A 1.5-hour "traditional" midterm exam covering everything from Units 1 to 3. This midterm exam is worth 40% of the 50%.
A 3-hour "traditional" exam worth 60% of the 50% covering all the material presented in class and labs. This exam will not be about certain points individually, but will test the integration of the knowledge you should have acquired.
Here are examples of previous Midterm exams:
There will be a lab exam (an exam written in front of a computer with TAs in the room) in the last lab session.
Scribing one, maybe two, lectures (in Spanish). See the lectures page for more details. Note in particular that scribe notes are due on the day of the next lecture. The entire calendar for the course has been posted, so you can select a lecture that interests you. We will circulate a sign-up sheet during the second week. This is a nice way to complement your probably already low mark.
LaTeXsource, and whatever figures you use.
zipfile with the
texfile and the figures you have used. They are posted immediately without proofreading.
There's no penalty for not transcribing the lecture.
We still need transcriptions for Lectures 11, 14, and 15.
We don't have a textbook, really. However, all the material is heavily based on Kernighan and Ritchie's second edition of The C Programming Language, which we refer to as K&R. There are copies on reserve at the library (in Spanish!).
We also use the The C11 Standard, which we call the n1570 book (for historical reasons.)
For each book, we usually give the corresponding sections (like 1.1) instead of pages, because the latter may vary from copy to copy.
I will provide handouts with my notes for each class. Much more material is put in those notes, and it is those notes (plus labs) that you will be evaluated on.
Anything covered in class or in the notes or in labs or in the book can be evaluated.
In this course, we use the following technologies:
GDB. You will learn about these technologies during the
You will have to install a version of the Linux operating system by yourself, or use the computers in the lab. My preferred Linux distribution is Xubuntu. Once you have that working, you need to issue the following commands to get your system up to speed for the course.
sudo apt-get install emacs(1)
sudo apt-get install noweb
sudo apt-get install texlive
sudo apt-get install binutils
sudo apt-get install build-essential manpages-posix-dev manpages-dev
Emacs is my editor of choice. I've required its use since I
started teaching this course. However, it is now optional. Just find
for your own (clean) text editor (not an IDE!) and use it. I obviously
won't be able to provide any help with anything but
Emacs. You're on
your own if you get stuck. Also, code will be demonstrated using
Emacs. In any case, a good, simple text editor is gedit. There are
others, ranging from kiddy text editors to very esoteric such as Acme
Here are some "cheat sheets" or "reference cards" that summarize how to use each program.
printf, in the "Index search" box, though you should prefer
Free C books:
2013-03-15-16:25: Most of this layout, including the idea of recording the lectures and the "handwritten" notes were inspired by Erik Demaine. He does the same thing at MIT. So thanks to him for publishing his lectures online, and for writing the guide. I'm nowhere as smart as he is, but I think we would both agree that, irrespective of politics, knowledge must be free.
2013-01-26-09:36: I've been teaching LP1 since 2008. It's my
favorite "general undergraduate course". I enjoy most of the material
I have to teach here. This is the first course I will have filmed with
actual students in it, in the Software Engineering Lab at UdeC. The
first time around, I requested they use Emacs as a text editor, and
noweb to hand in their homework. Since then, I've become more lenient,
and they can choose the text editor they will use. They use C as the
language, work with a text editor,
gcc and the console. And yes, my
first programming language was BASIC, I learned GW Basic. Problem,