Computer Science 271 Software I

Dr. Stephen Bloch office 112 Alumnæ Hall phone 877-4483

                email sbloch@boethius.adelphi.edu

office hours: whenever I’m not teaching on Tuesday, Wednesday, and Thursday

September 11, 1996

1 Prerequisites

This course assumes you have taken and passed CSC 171 (“Introduction to Structured Programming with Pascal”) and CSC 172 (“Introduction to Algorithms and Data Structures”), and that you either have taken or are now taking CSC 270 (“Survey of Programming Languages”). This course will demand a lot of time programming, testing, and debugging in C, particularly in the latter half of the semester. If you have not taken CSC 270 but are familiar with the C or C++ programming language, you should have no problem; otherwise, you should reconsider taking this course.

2 Subject Matter

This course will explain the basic concepts common to many computer operating systems and introduce you to a great number of tools and features provided by operating systems, especially Unix tm, which is currently the most popular at academic and research institutions and coming into widespread use elsewhere.

The Unix tm operating system has more personality than most, not because of how it works but because the people who built (and continue to build) it left such a distinctive mark on it with their senses of beauty, humor, and responsible behaviour. These have led to a system which, once you’ve grasped its fundamental philosophy, allows you both to make efficient use of your time and to have fun at it.

The creators of Unix tm used computers all day, every day, and wanted to use them as efficiently as possible. These people loved elegance and simplicity, and hated re-inventing the wheel, so they built a number of simple tools that could be combined as needed in billions of ways. They also loved whimsy, so you will find a lot of puns and jokes built into the system.

On the other hand, they believed strongly in personal responsibility, so destructive pranks, invasions of privacy, and insults are strongly discouraged — usually not by rules, but by peer pressure. Unix tm has evolved from a computer system to a philosophy and finally to a community. I hope, among other things, to make you productive and civilized members of that community.

A disadvantage of building the whole system out of simple tools is that you need to learn a lot of simple tools before you can do anything. So in the first half of the semester you’ll read a lot of documentation and try your skill on small examples. In the second half of the semester the emphasis will shift from reading about Unix tm tools to actually using them.

Many of the people in this class are taking CSC 270 concurrently. You’ll need to learn the same Unix tm tools and commands for both courses, but whereas for 270 it will suffice to learn only their simplest, most basic uses, in this class we’ll discuss each tool and command in greater detail.

3 Texts

The main text for this course is A Student’s Guide to Unix, by Harley Hahn. I’ve ordered the black-covered second edition of Hahn through the bookstore. (If you have the blue-covered first edition, you may use that instead, but check with me: the chapter numbers are different and some subjects have been added.) This very engaging, fun book discusses Unix tm philosophy and many common tools and commands. It does not cover Unix tm internals and programmers’ tools, so I expect you to learn about those through online documentation later in the semester.

I expect to give a few reading assignments in C by Dissection, by Kelley & Pohl, 3rd edition. This is the same textbook we’re using in CSC 270, which most of you are taking concurrently. If you’re not taking CSC 270, find somebody to borrow the book from. (If you have the 2nd edition, check with me; the chapter numbers are different.) I may also give some reading assignments on the World Wide Web, by email, or in magazines.

To be more specific, I want you to read most of the Hahn book before the midterm exam. This amounts to about a hundred pages a week. It’s easy reading because the book is written in a light style, but you do need to keep up with the reading.

You are responsible for everything in the reading assignments, whether or not I discuss it in a lecture.

4 Grading

As I write this (a week before classes start), I envision five homework assignments, each worth 10% of the semester grade, a midterm worth 20%, and a final exam worth 30%. I may change this somewhat as the semester unfolds.

Exams must be taken at the scheduled time, unless arranged in advance or prevented by a documented medical or family emergency. If you have three or more exams scheduled on the same date, or a religious holiday that conflicts with an exam or assignment due date, please notify me in writing within the first two weeks of the semester in order to receive due consideration. Exams not taken without one of the above excuses will get a grade of 0.

Homework and programming assignments will be accepted late, with a penalty of 1/3 per 24 hours or portion thereof after they’re due. An hour late is 33% off, 25 hours late is 67% off, and after 48 hours don’t bother turning it in. It’s still a good idea to do as much of it as you can, however, because I’ll assume on the exams that you’ve done the homework.

Programs are not abstract works of art, they are supposed to run and solve real problems. So if I get a program that doesn’t compile or run, or a program that has little or nothing to do with the problem I assigned, I will give it a zero, no matter how much time you put into it. Don’t bother turning in a program you haven’t tested yourself.

5 Ethics

Most of the assignments in this class are to be done individually. You may discuss general approaches to a problem with classmates, but you may not copy large pieces of programs or homework solutions. If you do, all the students involved will be penalized.

All work on an exam must be entirely the work of the one person whose name is at the top of the page. If I have evidence that one student copied from another on an exam, both students will be penalized; see above.

6 Schedule

This class meets every Tuesday and Thursday from 12:15 to 1:30 PM, except on University holidays or if I cancel class. All dates in the following schedule are tentative, except those fixed by the University; if some topic listed here as taking one lecture in fact takes two lectures to cover adequately, or vice versa, the schedule will shift.

All reading assignments below are from the Hahn textbook unless stated otherwise. I expect you to have read the specified chapters in the textbook before the lecture that deals with that topic; this way I can concentrate my time on answering questions and clarifying subtle or difficult points in the textbook, rather than on reading to you, which will bore both of us. Please read ahead!

Date(s) Assignment Reading Lecture Subject 5 Sept Administrivia, accounts, passwords, introduction

10 Sept  HW1  1–4,16  What is Unix tm? How do I use it?
12 Sept  5–6  Windows and keyboards and mice, oh my!
17 Sept  7–8; info info  Common Unix tm commands and help
19 Sept  9–10  Command shells

20 Sept Last day to add courses

24 Sept  HW2  11  Shell scripts
26 Sept  24–25  The Unix tm File System
1 Oct  26–27  More on the Unix tm File System
3 Oct  HW1 due 18–19  Redirection, pipes, and filters

4 Oct Last day to drop courses 8 Oct 20–21 Displaying and printing files; review for midterm 10 Oct Midterm exam

15 Oct  13–15  Basic communication and the Net
17 Oct  HW2 due 17  More on electronic mail; discuss midterm
22 Oct  22–23  “Real” text editors
24 Oct  HW3  Programming and Unix tm
29 Oct  K&P 10  The Shell-Program Interface

31 Oct K&P 13;man pages The stdio library

5 Nov  HW4  man pages  Process control: fork, exec, wait
7 Nov  HW3 due man pages  More on process control

8 Nov Last day to withdraw from classes

12 Nov  man pages  Low-level I/O
14 Nov  man pages  Process control meets I/O: pipe
19 Nov  HW5  man flex  The flex scanner generator

21 Nov K&P 14;info make The make utility 26 Nov HW4 due make meets flex 28 Nov Thanksgiving — no classes 3 Dec man rcsintro, etc. The rcs version-control utility 5 Dec Usenet, Listserv, and Browsers

10 Dec  Web pages  The World Wide Web and HTML
12 Dec  HW5 due  Catch up and review for final

17 Dec 1:00–3:00 PM, Final Exam