At our University, we have in the first semester a very difficult C Introductory Course, that consists of presenting a shortened version of the language specification: What are for/while loops, if clause, what is a pointer and so on.
But they never show how good C code in a more complicated application should look. What version control is, what Valgrind is (a gnu tool for detecting memory leaks) and so on. For the many new (about 60%) to programming or C, the group projects are quite a knockout (about 40%).
Some motivated students and I decided to offer a "best practices" session before the first assignment is handed out and after the lecture has finished. For the students to have a better chance of finishing this course successfully.
Our selected Chapters are these:
- how to compile (clang and gcc and their flags and warnings)
- coding style
- best practices -> how to allocate memory, typedefs, file operations
- basic program flow, some simple patterns
- pitfalls specific to this course and C in general
- how to ask the right question (and in turn how to google their problems)
- how to use the manpage
Are there points missing? Is there something that we shouldn't do? In short, how to improve the content. We are planning on 3 Sessions with around 3 hours each.
<shamelessPlug>Dear HNQ visitors, this question was asked yesterday, and is related enough to this one that it might also benefit from your expertise.