Bryn
Mawr College
CS 246: Programming Paradigms (C and Unix
Programming)
Spring 2009
Course Materials
General
Information
Instructor: Dianna Xu , 246A Park Hall, 526-6502
E-Mail: dxu at cs dot brynmawr dot edu
WWW: http://cs.brynmawr.edu/~dxu
Lecture Hours: Tuesdays & Thursdays, 11:30 am to 1 pm
Room: Park 232
Lab Hours: Thursday 1-2pm (and Tuesday 1-2pm (not manditory))
Lab room: Park 232
Office hours: Tuesdsays 4pm-6pm
TA hours: Priscy Pais 4pm - 6pm Wendesdays and 6pm-8pm Sundays
Texts & Software
Purchase
- C Programming: A Modern Approach,
by K. N. King, W. W. Norton & Company, 1996.
- Programming
with GNU Software,
by Andy Oram and Mike Loukides, O'Reilly, 1996.
Reference
- The
C Programming Language, Second Edition, by Brian Kernighan & Dennis
Ritchie, Prentice Hall, 1988.
- The
Unix Programming Environment ,
by Brian Kernighan & Rob Pike, Addisson-Wesley, 1984.
Important
Dates
Jan
20: First lecture
Apr 30: Last lecture
Programming
Projects & Homework
Future home works will be posted here and/or handed out in class.
Lectures
Planned Syllabus
| Week
| Topic |
| 1 |
Introduction to Unix and C
|
| 2 |
types, char, scanf, conditionals and loops, gcc and gdb
|
| 3 |
Functions and Scope, program design, the C preprosessor and header files
|
| 4 |
pointers, arrays and pointers. Multiple source files, makefile
|
| 5 |
pointers and function arguments, File I/O, redirection and pipes
|
| 6 |
Strings, strings wrt pointers, string.h, commandline arguments
|
| 7 |
Malloc, memory management, multi-directional arrays
|
| 8 |
Spring Break!
|
| 9 |
Structures, typedef, unions, enums. Linked lists
|
| 10 |
Adavanced use of pointers, function pointers, writing large programs
|
| 11 |
Low level programming, bitwise ops. Object-oriented programming, intro to C++
|
| 12 |
Arrays, pointers & strings in C++. Data abstraction in C++ using classes. Operator Overloading in C++. Friend functions and classes
|
| 13 |
ADT's in C++.
|
| 14 |
Implementing Linked Lists in C++. Templates: Function templates and class templates. Exception Handling, Inheritance and subclasses, C++ standard library
|
| 15 |
Presentations, Wrap up
|
Detailed syllabus will be posted here as the semester progresses
- Week
1
Jan 20: Introduction
to Free Software, Open Source, UNIX, Linux, history of evolution of
UNIX and C.
Homework (due Tuesday 1/27): Write a short 2-page essay on
Open Source Software in latex.
Jan 22: Introduction to C: Basic program structure,
declarations and statements, variables and types. Introduction to
Linux: kernel, shell, filesystem. Compiling and running
C programs.
Presentation topics and reading list
Read: Chapter 1-2, 3.1, 4.1, 7.1 and 7.2 from King and skim 1-3 from O&L.
Lab: latex intro. latex handout another latex handout
- Week 2
Jan 27 : Characters in C. Control statements: assignment, increment/decrement operators, shortcut operators, if-statement, while-statement and logical operators. I/O using scanf.
Read: Chapters 3.2, 5 and 7.3 - 7.5 from King, skim chapter 4 from L&O.
Jan 29 : For loops, more on loops. Arrays, arrays and loops. Char handling and misc library functions.
Read: Chapters 6, 8.1 and 23.4 from King.
Lab: Linux: navigating directories, basic shell commands, Emacs, printing, etc. Compiling and running C programs.
Read: lab handout.
(due Tuesday 2/10): homework1
- Week 3
February 3: Functions and scope. Parameter passing.
Read: Chapters 9 from King.
February 5: Program organization. The C Preprocessor: #define, #ifdef, #ifndef, and #include directives. Conditional compilation.
Read: Chapters 10.1, 10.3, 10.4 and 14 from King.
Lab: More unix, tcsh. gcc and gdb
Read: Chapter 6 from L&O, lab02 handout
- Week 4
February 10 : Number systems. Introduction to pointers and memory.
Read: 11.1 - 11.3 from King.
(due Thursday 2/19): homework2
February 12: Pointers as function arguments, return values. Pointers and arrays.
Read: Chapter 11 till the end, chapter 12 from King.
Lab: prototypes, header files, preprosessor directives
Read: lab03 handout
- Week 5
February 17 : File I/O
Read: Chapter 12 from King.
February 19 : File I/O continued
Lab: Unix file I/O, pipes and redirection
Read: lab04 handout
(due Thursday 2/16): homework3
- Week 6
February 24 : Strings and string.h
Read: Chapter 13 from King.
February 26 : Command line arguments, strings and pointers continuted
(due Tuesday 3/17): homework4
- Week 7
March 3 : Review
Read: Chapter 13 from King.
March 5: Lecture cancelled, I am out of town.
- Week 9
March 17: Unix utilites: cat, echo, sort, grep, cut, head, tail, find and at
Read: Unix man pages regarding the specific commands.
(due Thursday 3/26): homework5a
(due Thursday 3/26): homework5b
March 19: Memory management, malloc and free
Read: King 17.1-17.4
- Week 10
March 24: Structs, typdefs, unions and enums
Read: King chapter 16
March 26: Makefile and gdb
Read: lab07 handout, L&O chapter 7
- Week 11
March 31: Regular Expressions
Read: Unix man pages on grep, pay particular attention to the regular expression section
(due Tuesday 4/7): homework6
April 2: Linked list
Read: King 17.5
- Week 12
April 7: Linked list continued
Read: King 17.5
(due Tuesday 4/21): homework7
April 9: Advanced use of pointers, function pointers
Read: King chapter 17.6-17.7 and 22.6-22.7
Lab: Lab08
- Week 13
April 14: Advanced use of pointers, low level programming.
Read: King 17.5, 17.6-17.7 and 22.6-22.7
April 16: Unix shell programming
Read: Unix man pages
- Week 14
April 21: Presentations: Greg Guthe -- BSD, Caitlin Evans -- A Report on the Masters of Deception, Sonia Gilbukh -- The Unix Philosophy
April 23: Presentations: Shikha Prashad -- Just for Fun, Lili Dworkin -- The Well-Intentioned Hacker: A Report on Cyberpunk, Amanda Hittson -- The Jargon Files
- Week 15
April 28: Presentations: Marissa Moncenigo -- The Journey to Open Source, Matt Gerard-- From the ARPANET to the Internet: Data Analysis in the Global Age, Chris Lewis -- Steven Levy's Hackers: Heroes of the Computer Revolution
April 30: Presentations: Stephanie Viggiano -- The Cathedral and the Bazaar and course wrap up.
Grading
All graded work will receive a score out of 100. Guidelines of letter grades corresponding to lab/exam score levels will be given during the semester. At the end of the semester, a total score (to which the corresponding final grade is assigned) will be calculated from a weighted average of all scores according to the following weights:
Programming
Assignments: 70%
Presentation: 15%
Written Homeworks: 15%
Total: 100%
A list of presentation topics and related reading materials will be given out. Each student should hand in a written report as well as do a class presentation and lead class discussion on the topic. More details will be given out during class.
Links
Unix for Beginners
Basic Unix Tutorial
Unix FAQ
Emacs howto
LaTeX primer
Beginning LaTeX
Class examples
Lecture notes and lab notes 
|