Unix
Programming Environment
Lectures: Monday, Friday 12:00 pm -12:50 pm (section 001)
Monday, Friday 15:00 pm -15:50 pm (section
002)
Labs: Wednesday, 12:00 pm -12:50 pm (section 001)
Wednesday, 15:00 pm -15:50 pm (section 002)
The course discusses the basic components of programming practice: testing,
debugging, portability, performance, design alternatives and style. It also
addresses the importance of simplicity, clarity and generality, the basic
principles of programming process, which apply at all levels of computing.
· Simplicity – keep programs short and manageable
· Clarity – write programs which are easy to understand
· Generality – make sure your programs work in a broad range of situations and adapt to new situations as well
· Automation – free yourself from doing work, let the machine do it
We will deal with several programming languages: C, C++, Java and Perl. C++ and Java are the descendants of C, adding richer type structures and libraries, and Perl is a scripting language, which fills the gap between low-level and high-level programming. The course starts with an introduction to UNIX. In this part we stress the basic UNIX programming philosophy, based on the understanding of the relationship between programs. In other words one needs to know not only how to use programs but also how they fit into the environment. In the later part we move to C++ and Java and then to Perl. Parallel to discussing the features of languages we will deal with the principles of programming practice, the main theme of the course. Our main teaching objective is to apply these principles in practical tasks.
Required
Text
Title: The Practice of
Programming
Authors: Brian W. Kernighan and Rob Pike
Publisher: Addison Wesley
Publication Date: February 1999
ISBN: 0-201-61586-X
Reference
texts:
1. Title: Learning Java
Authors: Pat Niemeyer & Jonathan Knudsen
Publisher: O'Reilly
Publication Date: May 2000
ISBN: 1-56592-718-4
2. Title: Learning Perl, 3rd Edition
Author: Randal L. Schwartz & Tom Phoenix
Publisher: O'Reilly
Publication Date: July 2001
ISBN: 0-596-00132-0
3. Title: UNIX in a Nutshell: System V Edition, 3rd Edition
Author: Arnold Robbins
Publisher: O'Reilly
Publication Date: September 1999
ISBN: 1-56592-427-4
Supplementary
Texts
1. Title: The UNIX programming environment
Authors: Brian W. Kernighan and Rob Pike
Publisher: Prentice Hall Computer Books
Publication Date: March 1984
ISBN: 013937681X
2. Title: Core Java
Volume I – Fundamentals
Authors: Cay S. Horstmann, Gary Cornell
Publisher: Prentice Hall PTR
Publication Date: December 2000
ISBN: 0130894680
Syllabus
Weeks 1-4:
Unix Topics: The File System, Filters, Shell Programming, Programming with Standard I/O, Unix System Calls
Programming Practice: Style of Programs, Running, Debugging, Testing, Timing and Profiling C, C++ programs in UNIX environment
Weeks 5-8:
C++ & Java: Basic similarities and differences between C++ and Java, STL of C++, Standard Java Data Structures, Standard Java Classes
Programming Practice: Algorithms and Data Structures, Interfaces, Performance and Portability illustrated with examples of C++ and Java code
Weeks 9-10:
Pearl Topics: Basic Structural Features, Hashes, I/O, Regular Expressions, Manipulating Files and Directories
Course Grade and
Exams
We will have three programming projects, short tests (15 minutes)/lab exercises
every week and the final exam. The final grade will be computed as follows:
Programming Projects 45%
Tests and labs 25%
Final Exam 25%
Class Participation 5%
Final Review 1, Review 1 Solutions
Final Review 2, Review 2 Solutions
Final Exam 03/14/02 10:30-12:30 NSBITT 125
Office
hours before the final: 03/11/02 3:30-4:30, 03/13/02 12:00-2:00
Programming Project 1
Phase 1 – First version of C++ code is due Tuesday 01/22/02. The code should include
at least full reading procedure and the process of marking time gaps, which are
larger than 3 minutes.
Phase 2 – Full code is due Monday 01/28/02 and the presentation should be
arranged during week 5.
Details of the final code
Extras for Programming Project 1
Programming
Project 2
Implement your code from project 1 in Java. The final code is due Monday
02/25/02.
Project 2 evaluation criteria: agreement with specifications of Project 1,
simplicity and clarity of design, run-time.
An alternative topic for Programming Project 2
Develop a more advanced Java version of the Markov chain algorithm, which
incorporates structure of sentences in establishing prefix-suffix relations.
Use this program to analyze statistically several texts and draw your own
conclusions. If you would like to proceed with this topic you will need to
present detailed specifications of what your code will do and what kind of
statistical experiments you want to perform (before or on Wednesday
02/20/02).
Programming
Project 3
Implement CSV algorithm in Perl (C++ version is discussed on pages 99-103 of
the textbook).
Programming Project 3 is not mandatory, but it needs to be done individually.
If you work it out it will count for extra credit. If you have fully completed
projects 1 and 2 you already have the full credit for the programming projects
part. You need to e-mail your code corresponding to project 3 before March 14.
Lectures 1,2, Lecture 3,
Lecture 4,
Lecture 5, Lecture 6, Lectures 7,8,
Lectures 9,10, Lectures
11,12,
Lectures 13,14,15,16, Lectures 17,18,19,
Lectures 20,21, Lecture
22, Lectures 23,24,25
Topics for Test 1
Test 1 Friday 01/11/02
Topics for Test 2
Test 2 Wednesday 01/16/02
Topics for Test 3
Test 3 Wednesday 01/23/02
Preparation for Lab 4
Lab 4 Wednesday 02/06/02
Preparation for Lab 5
Lab 5 Wednesday 02/13/02
Preparation for Lab 7
Lab 7 Wednesday 02/27/02
Reading Assignment 1, Reading Assignment 2,
Reading Assignment 3, Reading Assignment 4,
Reading Assignment 5
For better print quality you may use PDF http://www.mcs.drexel.edu/~knowak/unix/pdf/ or MSWord http://www.mcs.drexel.edu/~knowak/unix/msword/ documents.
Short Tests (15
minutes)
Test 1, Test 2, Test 3
Labs
Lab 4, Lab 5, Lab 6, Lab 7