CS214 (Advanced Unix Tools), Spring 2008
MWF 12:20-1:10 PM, Phillips Hall 213
Course description
A focus on GNU Linux/Unix as a programming environment
for people with a basic knowledge of Linux/Unix and experience programming in
at least one language. Projects cover advanced shell scripts (bash)
Makefiles, programming and debugging tools for C and other
languages, networking in Linux and network tools, and more modern scripting languages such as Perl and Python.
Students with little or no experience with Unix should take CS114
first.
CS214 is a four week, one credit, S/U only course. It runs
February 18 to March 14, 2008. The drop deadline is 2/25/08, one week
into the course. The course number is: 706-528. To add this course (if you have not
done so already), you will need to go to the Engineering School Registrar, take
an add form, go to Upson 303 and get the form stamped.
Instructor
- Ymir Vigfusson
- Email: ymir + cs.cornell.edu (replace + with @)
- Office hours: By Appointment Only
Grading and course policies
There will be no official textbook for this course; below you may find some books and websites that might be helpful. There are many books on this subject, so pick your favorite one. Feel free to contact me if you have any questions about this course.
There will be 2 homework assignments and a 24-hour take-home final exam.
You must complete all these assignments to
pass this class. Please take a look at
Cornell University Code of Academic Integrity. Please
follow these guidelines when submitting your work.
Announcements
Most recent first:
- 3/14/2008: I will release grades for homework 2 and the take-home final at some point during spring break. Please look for comments in CMS for details about your grade for an assignment. Also, please fill out the course evaluations survey on CMS. Thank you for attending the course and have a nice spring break! CS214, over and out.
- 3/10/2008: The takehome exam will be released after class (1:10) on Wednesday 3/12 and due 24-hours later on CMS. For convenience, a second batch will be released on Thursday 3/13 at 2pm and due in CMS after after class at 2pm on Friday. Pick the day that's more convenient for you. Remember that no cooperation or discussions are allowed about the exam. Instead, you can e-mail me if you have questions, I will propose a point deduction for a hint, which you can then either accept or decline.
- 3/1/2008: The second homework is out. It is due in a week (March 8th).
- 3/1/2008: Please respond to the CMS survey on what the exam format should be like (in-class, take-home or contest).
- 2/27/2008: Congratulations to the winner (team5) of the contest. The problems are available here.
Thanks to everyone who participated, hope you had fun!
- 2/25/2008: Next lecture (Wed 27th) will be in Blue room of the ACCEL lab on the second floor of the Engineering Library (Carpenter Hall).
- 2/25/2008: Today is the final drop deadline. Go to Upson 303 to get a stamp if you wish to drop the course.
- 2/17/2008: The first homework is out.
- 2/17/2008: The people on my enrollment list have been added to CMS. If you are unable to access the CS214 course, please e-mail me as soon as possible. We will use CMS to manage homeworks and projects for the course.
- 2/12/2008: Welcome to Advanced UNIX! For those of you who
are curious to see what CS114 UNIX Tools covers, please
take a look at the web pages for 2007, 2006, 2005 and 2004. In
the Advanced UNIX class you will study shell scripting in more
detail, and become familiar with writing scripts to automate everyday
tasks. The goal of this class is for you to become familiar with
writing scripts and gain experience by means of examples. We will cover bash
scripting, basic programming using Python (and Perl), and makefiles.
Lectures and Schedule
Assignments
Take-home final.
Homework 2. Due in CMS by Saturday, March 8th at 2pm. Use this skeleton to start. Clarification:
-
P3: Determining whether all words are connected on the initial board configuration is a bit more tricky than I had in mind. The right approach is to do a ``flood'' (or a depth-first search), i.e. start on a non-empty square and make that tile infect all uninfected tiles around it. We do this for each uninfected tile that we discover as we go, meaning that we need to keep track of them. If some tile is uninfected after the flood then the board is disconnected, otherwise it's fully connected.
In any case, I will not be harsh in grading this aspect. It may be worth 1-2 extra points out of 40 to those who put in the extra effort. Keep in mind that there is a simpler way to check if the board is connected after adding the new characters. The idea is that you can order the moves such that each new tile is always adjacent to another tile that has been put on the board...
In-class contest problems.
Homework 1. Due in CMS by Februrary 27th at 6pm. Some clarifications:
-
P1: The output should be in lower-case.
stdout means standard output (i.e. the terminal).
- P2: "No duplicates" means no duplicate (file,number) pair.
Very Useful links
- UNIX shells and scripts
- Perl
Useful books
- UNIX Shells by Example (2nd ed), E. Quigley,
Prentice
Hall,2000
- excellent presentation of all five
leading UNIX shells: C, Bourne, Korn, Bash, and tcsh; also covers three
main utilities in UNIX: grep (for searching), sed (for editing), and
awk (for scripting).
- UNIX in a Nutshell, A. Robbins, O'Reilly, 1999
- good general reference, contains alphabetized listing
of
core UNIX commands, and documentation on editors like Emacs, ex and vi,
among others
- Programming Perl (3rd ed), L. Wall, T.
Christiansen,
and
J. Orwant, O'Reilly, 2000
- the standard introduction to Perl
- Mastering Regular Expressions, J. Fried, O'Reilly,
1997
- in-depth presentation of the use of regular expressions
for
manipulating text and data; a special chapter is dedicated to Perl
All books are optional, but highly recommended if you plan to do serious shell/perl scripting.
Miscellaneous
- 2/12/2008: One of the many links discussing scripting languages (WWW Journal, vol.2, spring '97)
- 2/12/2008: UNIX history as experienced by its creators: Dennis
Ritchie's
webpage