Bryn
Mawr College
CS 246: Programming Paradigms (Linux
Programming)
Fall 2003
Course Materials
General
Information
Instructor: Deepak
Kumar, 248 Park Hall, 526-7485
E-Mail: dkumar@brynmawr.edu
WWW: http://mainline.brynmawr.edu/~dkumar
Lecture
Hours: Mondays, Wednesdays & Fridays, 11:00 a.m. to 12:00
noon
Room: 232 Park Science Building
Laboratory
Hours: Fridays 1:30 p.m. to 4:30 p.m. (Deepak Kumar)
Laboratories:
- Computer
Science Lab, Room 232 Park Science Building
Texts & Software
Purchase
- Practical
C Programming,
Third Edition, by Steve Oualline, O'Reilly, 1997.
- 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
Practice of Programming,
by Brian Kernighan & Rob Pike, Addisson-Wesley, 1999.
Important
Dates
September
1: First lecture
December 8: Last lecture
Programming
Projects & Homework
- Homework
(Due on Friday September 5): Write a short 1-2 page
essay on Free Software vs Open Source.
- Homework
(Due on Monday September 8): Posted in ~dkumar/cs246/Homework1
- Homework
(Due on Monday September 8): Reformat your essay submitted
today using LaTeX.
- Homework
(Due on Wednesday September 10): Posted in ~dkumar/cs246/Homework2
- Homework
(Due on Friday September 12): Posted in ~dkumar/cs246/Homework3
- Homework
(Due on Wednesday September 17): Posted in ~dkumar/cs246/Homework4
- Homework
(Due on Monday September 22): Posted in ~dkumar/cs246/Homework5
- Homework
(Due on Friday September 26): Posted in ~dkumar/cs246/Homework6
- Homework
(Due on Monday September 29): Posted in ~dkumar/cs246/Homework7
- Homework
(Due on Monday October 6): Posted in ~dkumar/cs246/Homework8
- Homework
(Due on Monday October 27): Posted in ~dkumar/cs246/Homework9
- Homework
(Due on Monday, November 3): Posted in ~dkumar/cs246/Homework10
- Homework
(Due on Friday, November 7): Posted in ~dkumar/cs246/Homework11
- Homework
(Due on Monday November 10): Posted in
~dkumar/cs246/Homework12
- Homework
(Due on Monday November 17): Posted in ~dkumar/cs246/Homework13
- Homework
(Due on Monday November 24): Posted in ~dkumar/cs246/Homework14
- Homework
(Due on Friday December 5): Posted in ~dkumar/cs246/Homework15
- Homework
(Due on Friday December 12): Posted in ~dkumar/cs246/Homework16
Lectures
- Week
1
Monday, September 1: Introduction
to Free Software, Open Source, UNIX, Linux, history of evolution of
UNIX.
Homework (Due on Friday Septembe 5): Write a short 1-2 page essay on
Free Software vs Open Source.
Wednesday, September 3: Introduction to C: Basic program structure,
declarations and statements, variables and types. Introduction to
Linux: logging in, filesystem, navigating directories, basic shell
commands, editing using Emacs, printing, etc. Compiling and running
C programs.
Read: Chapter 1-4 from Oualline and skim 1-3 from
L&O.
Homework (Due on Monday September 8): Posted in
~dkumar/cs246/Homework1
Friday, September 5: Discussion on Free Software
and Open Source Software. Discussion will be led by Karen Pang. Introduction
to LaTeX.
Read: Examine the files
small2e.tex and sample2e.tex in ~dkumar/cs246/LaTeX
Homework (Due on Monday September 8): Reformat your
essay submitted today using LaTeX.
- Week
2
Monday, September 8: Variables and constants
in C, control statements: assignment, increment/decrement
operators, shortcut operators, if-statement, while-statement
and logical operators. Arrays and strings. The string.h
library and string I/O using fgets.
Read: Chapters 5 & 6 from Oualline.
Homework (Due on Wednesday September
10): Posted in ~dkumar/cs246/Homework2
Wednesday, September 10: for- and switch- statements.
L-value operator, simple C functions and prototypes,
I/O using scanf and sscanf.
Read: Chapters 8&9 from Oualline, and LaTeX handout.
Homework (Due on Friday September 12): Posted
in ~dkumar/cs246/Homework3
Friday, September 12: TGIF Special: UNIX/LINUX magic! (cut,
grep/fgrep, sort, pipes, etc.)
Homework (Due on Wednesday September 17): Posted
in ~dkumar/cs246/Homework4
- Week
3
Monday, September 15: No class today, I am out of town.
Wednesday, September 17: The run time structure of memory. Activation
records. Types of variables: scope, lifetime, etc. Declaring variables
in C and passing parameters.
Read: Chapter 9 from Oualline.
Homework (Due on Monday September 22): Posted
in ~dkumar/cs246/Homework5
Friday, September 19: The C Preprocessor:
define, ifdef, ifndef, and include directives. Conditional compilation.
Read: Chapter 10 from Oualline.
- Week
4
Monday, September 22: Pointers in C. The &- and *-operators.
Doint pass-by reference function parameters. Arrays and pointers.
Pointer
arithmetic for indexing arrays. Command line arguments.
Read: Chapter 13 from Oualline.
Homework (Due on Friday September 26): Posted
in ~dkumar/cs246/Homework6
Wednesday, September 24: Command Line arguments in C. File I/O.
Read: Chapters 13 & 14 from Oualline.
Friday, September 26: Debugging using gdb. Structures
in C.
Read: Chapters 12 & 15 from Oualline.
Homework (Due on Monday September 29): Posted in
~dkumar/cs246/Homework7
- Week
5
Monday, September 29: Structures, arrays of structures, pointers
to structures, defining recursive structures: lists, trees, etc.
Memory allocation and dallocation using malloc.
Read: Chapter 17 from Oualline. Also Chapter 6 of Loukides &
Oram is a nice introduction to GDB.
Wednesday, October 1: Implementing
linked lists in C. Creating header files. Compiling programs with
multiple files.
Homework (Due on Monday October 6): Posted in ~dkumar/cs246/Homework8
Friday, October 3: Browsing the C Standard Library.
Using makefile and the make utility. Simple compilation rules and
dependencies.
Read: Chapter 7 from Loukides & Oram
- Week
6
Monday, October 6: Pointers to functions. Writing 'generic' functions
in C.
Wednesday, October 8: More on pointers. Implementing Graphs and
other linked structures
Homework (Due on Monday October 27): Posted in ~dkumar/cs246/Homework9
Friday, October 10: No
class today, I am out of town.
- Week
7 (October 13, 15, 17)
No Classes this week. Fall Break!!
- Week
8
Monday, October 20: A look under the hood of Compiling:
Compiler phases, assembly language and assembler, linkers, loaders.
Static
and dynamic linking of C libraries (.a versus .so libraries). Creating
your own shared object (.so) libraries.
Wednesday, October 22: Shared-object libraries again.
Friday, October 24: An overview of programming
paradigms: Operational, Definitionals, Imperative, Functional, Logic,
etc.
- Week
9
Monday, October 27: Overview of programming paradigms, contd.
Visual programming, GUI programming, X Windows, Toolkits, widgets,
events,
and handlers. Event-driven programming. GUI programming in Linux:
Glade. Read and do the Glade tutorial. Try and build a GUI using
Glade for any one of the programs you have written this semester.
Wednesday, October 29: Object-Oriented Programming: Abstraction,
Encapsulation, Hiererchies, and Inheritance. Introduction to C++. Structure
of a C++ program. Compiling and running C++ programs. The iostream
library and new style include's.
Homework (Due on Monday, November 3): Posted
in ~dkumar/cs246/Homework10. See an example
Java applet here. This applet implements a
part of the homework.
Friday, October 31: Some
changes/additions from C to C++: Comments, using structs, static
casts, iomanip.h library
for formatted output, generating random numbers, inline functions,
reference parameters, default parameters, function overloading, function
templates.
- Week
10
Monday, November 3: Arrays, pointers & strings in C++. Data abstraction
in C++ using classes.
Homework (Due on Friday, November 7): Posted in
~dkumar/cs246/Homework11
Wednesday, November 5: Operator Overloading in C++. Friend functions
and classes.
Friday, November 7: Defining
ADT's in C++. A Complex Number ADT.
Homework (Due on Monday, November 10): Posted in
~dkumar/cs246/Homework12
- Week
11
Monday, November 10: ADT's in C++. Defining a flexible and safe
interger array ADT.
Wednesday, November 12: IntegerArrays, contd. Defnining a Number
ADT for storing and computing with big integers.
Friday, November 14: Computing large numbers.
Homework (Due on Monday November 17): Posted in
~dkumar/cs246/Homework13
- Week
12
Monday,
November 17: Implementing Linked Lists in C++. Templates:
Function templates and class templates.
Wednesday, November 19: Exception Handling, Inheritance
and subclasses, C++ standard library.
Homework (Due on Monday November 24): Posted
in ~dkumar/cs246/Homework14
Friday, November21: The string
class in C++ (versus the cstring library).
- Week
13
Monday, November 24: Introduction to the Standard Template Library
in C++. Container classes, iterators, and algorithms. The vector
and list classes. Sorting.
Homework (Due on Friday December 5): Posted in ~dkumar/cs246/Homework15
Wednesday, November 26:
Friday, November 28: No class (Thanksgiving Break)
- Week
14
Monday, December 1: No Class today (I will out of town on NSF
busineess).
Wednesday, December 3: STL continued...associative containers: set, multiset, map, and multimap. Example applications of associative
containers.
Homework (Due on Friday December 12): Posted in
~dkumar/cs246/Homework16. This is an EXTRA CREDIT homework. Your
overall grade in this course will be a numerical average of all work
due until Friday, December 5. Completing this homework will give
you extra credit equivalent to TWO homeworks. NO EXTENSIONS WILL
BE GRANTED FOR this homework.
Friday, December 5: Class cancelled
due to snow storm.
- Week
15
Monday, December 8: STL: Algorithms overview. Wrap-up of C &
C++.
Wednesday, December 10: Other
programming paradigms: Functional, Logic, etc.
Friday,
December 12:
Grading
All
graded work will receive a grade, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0,
1.7, 1.3, 1.0, or 0.0. At the end of the semester, final grades will
be calculated as a weighted average of all grades according to the
following weights:
Programming
Assignments: 80%
Written Homework: 20%
Total: 100%
Links
|