Thinking in C and *nix (CSC 282 2015S) : Handouts


This is an approximate schedule. Expect topics and dates of topics to change. (I will try to keep due dates of assignments the same.)

Some of the information here can also be found in the Google calendar for the course, which is available at <>.

Date Topic Reading Lab Work Due
01 Thursday, 22 January 2015 Introduction The origins of the course. Some principles and practices. Example: C from K and R. Detour: A C memory problem. Exercises: Some simple tasks. Some important *nix tools. Looking ahead. HW 00: Set up a GitHub account and Learn a bit of git
02 Thursday, 29 January 2015 Some Basic Tasks and Corresponding Tools Fun with GitHub. Go over homework. Exercise: The spaces problem. Raymond, chapter 1. Thinking about basic tools. HW 01: Solve some simple tasks
03 Thursday, 5 February 2015 The Bash Shell - A Refresher Some things you should know. Files and directories. Command-line patterns. File and directory permissions. I/O redirection. Variables. Command-line history. The script command. HW 02
04 Thursday, 12 February 2015 A C Program Ecosystem A C program ecosystem. Steps in compilation. Including files. Detour: Why we have included files. Macros. CPP cnditionals. Detour: Standard header file format. Command-line flags. Hack: Generic data types. HW 03
05 Thursday, 19 February 2015 Cron HW 04
06 Thursday, 26 February 2015 Compilation, Macros, and the C Preprocessor Including files. Macros. CPP conditionals. Detour: Standard header file format. Command-line flags. Hack: Generic data types. HW 05
07 Thursday, 5 March 2015 Debugging with gdb Debuggers. gdb, the GNU Debugger. Tracing crashes. Some other operations. Another example. HW 06
08 Thursday, 12 March 2015 Using Macros for Logging Interesting macro examples. Requirements for a debugging/logging system. Implementation details. HW 07
Spring Break
09 Thursday, 2 April 2015 Automating Work with Make Project ecosystems. An introduction to Make. Example: A standard C project. Good Make practice: Standard targets Example, continued: Adding more targets to our project. Using variables. Example, continued: Improving our Makefile with variables. HW 08
10 Thursday, 9 April 2015 Improved Make A quick review of Make. Variables in Make. Some standard variables for C programs. Another example: Document development. Automatic variables. Generic rules. Standard make rules. Other useful techniques. Miscellaneous tools and techniques. HW 09
11 Thursday, 16 April 2015 Miscellaneous C Programming Issues Sorting, revisited. Function pointers. Testing C programs. Testing with macros. Testing through the command line. Testing with assert. Memory issues in C programs. Checking memory problems with valgrind. HW 10
12 Thursday, 23 April 2015 Testing An introduction to testing. An introduction to unit testing. Exercise, part 1: Write binary search. Exercise, part 2: Test binary search. HW 11
13 Thursday, 30 April 2015 Cancelled HW 12
14 Thursday, 7 May 2015 Wrapup What we've learned. Topics for future exploration. Course evaluation. Debriefing. HW 13