Department of Mathematics and Computer Science

Adelphi University

Fall 2015

 

0145-271-001 

Software I: Utilities and Internals- 3 credits

MWF 09:00am-09:50am in SWL*100

Visiting Professor Kristin Pepper

102 / 103 Post Hall until move to SCI 408

(516) 297-5241

pepper@adelphi.edu

www.adelphi.edu/~pe16132

 

Office Hours

Monday       8:20 - 8:50; 11:00 – 12:00 ; 1:00 – 2:15

Wednesday 8:20 - 8:50; 11:00 - 12:00

Friday          8:20 - 8:50; 11:00 – 12:15

Course Description and Purpose

 

Develop facility using standard Unix facilities, including command language, filters, editors, scripting languages (e.g. sh, sed, awk), compilers, linkers, make and version-control utilities. Understand how to retrieve command arguments, run other programs, and perform I/O and inter-process communication in the C programming language.

 

 

Course Learning Goals

Students will become familiar with UNIX commands by using ed, ex, vi or vim to write many small scripts on a large Linux server, the Adelphi panther system. Students gain shell scripting skills by writing many small scripts that culminate in one large script system using Grep and filters and file I/O. Students explore regular expressions and Perl scripting by creating a web page that searches files. Students will explore compilers, linkers and make files and Linux system calls through coding C programs that build a similar file system in a text terminal environment. Students will learn about inter-process communication by coding C programs  with a forked process. Students will be introduced to mysql by building two related tables and filling them with a sql script. Students will query that database over an already installed Apache web server to gain a proficiency in Perl programming.         

   

Prerequisite

CSC172

 

Required Texts

Matthew, Neil and Richard Stones. Beginning Linux Programming 4th Edition. Indianapolis, IN: Wiley Publishing, 2008. (ISBN: 978-0-470-14762-7)

 

Recommended Texts

Cozens, Simon. Beginning Perl. Indianapolis, IN: Wiley Publishing, 2000. (978-1861003140 or 1861003145). Note that it is the older 2000 version. Freely available online at: http://www.perl.org/books/beginning-perl/

 

A flash drive is also recommended.

 

Topics

  • UNIX/Linux for Beginners
  • The vi Text Editor
  • File System Commands
  • Regular Expressions, grep 
  • Filters
  • The Interactive Bash Shell
  • Programming the Bash Shell
  • UNIX/Linux and Processes
  • UNIX/Linux System Calls
  • Files in UNIX/Linux
  • Programming in Perl
  • Mysql basics

 

NOTE ON FINAL EXAMS:  All students must take the final exam at the scheduled time. The exam times are posted after midterm at http://ecampus.adelphi.edu/registrar/exams.php

 

Major Assignments

Assignments can be done using Adelphi’s Panther machine. Access Panther via the free programs filezilla and putty.

Filezilla: https://filezilla-project.org/

Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/

 

You may also choose to work locally, but must verify code works on panther before submitting homework. Find free local alternatives at http://home.adelphi.edu/~pe16132/csc271/setup.html

 

Major assignments:

 

  • Code a set of shell scripts that write and query a file system containing a catalog of information that you would like to search on a web site. The catalog needs to link to at least one lookup table with multiple attributes (ex: list of movie theaters and list of movies to search by movie name, movie genre, theater name or theater location)

 

  • Use those same files to code a Perl web page that allows search on partial field information by two criteria requiring connection between two files.

 

  • Code a system in C using those same files to add and remove data. Include the ability to launch a launch a forked process and interrupt  its progress.

 

  • Finally, create a web site using Perl scripts to search a MySQL database that holds the same inventory information created in the prior two assignments. A MySQL script will create and fill the database and the web program will search the database. This project uses an existing installation of apache and MySQL that is centrally administered.

 

Students should expect to spend about 6 hours each week outside class working on programming assignments for this class. Debugging and design assistance needs to be sought during the professor’s office hours, at the learning center or with math department tutors outside class.

 

Grading

The midterm must be completed as a minimum for credit. Each exam must be taken at the time scheduled. 10% will be dropped for anything 1 week late. Be sure to back up your classwork frequently so that you do not lose work.

 

The course grading scale is: A 93-100, A- 90-92, B+ 87-89, B 83-86, B- 80-82, C+ 77-79, C 73-76, C- 70-72, D 60-69, and F is below 59. A+ is given at the professor's discretion.

 

The final grade will be a traditional letter grade (A-F). Excessive absences, lateness, and any activities which run counter to the best interests of the class will be deducted at the end of the semester from the final grade as a percentage to be determined by the professor.

 

Grade Percentages:

Midterm Exam and quizzes - 25%

Assignments - 50%

Final  - 25%

 

 

Attendance

The following is the Adelphi University General Attendance Policy:

Only students who are registered for courses, and whose name appears on the Official Class Roster may attend courses at the University. Adelphi students make a commitment to be active participants in their educational program; class attendance is an integral part of this commitment. Attendance requirements for each course will be announced by the faculty member at the beginning of each term. Students are expected to be present promptly at the beginning of each class period, unless prevented by illness or by other compelling cause. In the event of such absence, students may request that faculty members be notified by the Office of Academic Services and Retention. Students are responsible for completing course work missed through absences. Students should wait a reasonable length of time for an instructor in the event that the instructor is delayed.

 

Additionally, you are also responsible for whatever work is covered in class whether or not you are there. Absence from the final exam will be excused only for a good and well-documented reason. The decision to allow a make-up exam will be made in accordance with the policies of Adelphi University.

 

If the University is closed for any class session due to an emergency, log onto this course site under the MOODLE tab in eCampus each day for instructions and assignments. Please check your Moodle News on snow closing days as snow days may be replaced with online instruction. 

 

Moodle

All course materials will be delivered through Moodle. The All Assignments task will describe all assignments and due dates. Use Moodle to hand in all assignments. A Moodle tutorial can be found at http://fcpe.adelphi.edu/moodle/student/

 

This is a weekly schedule. All reading should be done by the beginning of the week. The professor reserves the right to change this schedule.

Date

week

Subject

Assigned Reading

8/31, 9/2, 9/4

1

Introduction to Unix

Vi Text Editor  

Linux Ch. 1

 9/9, 9/11 , no class 9/7

2

File System Commands

Filters

Simple Shell Script execution

 (labor day 9/7 no class)

Linux Ch. 18

9/14, 9/16, 9/18

3

Regular Expressions, Grep and Sed and Filters

Linux Ch. 2

9/21, 9/23, 9/25

4

Using the Shell and Shell Programming

Linux Ch. 2

9/28, 9/30, 10/2

9/28 is last day to drop a course

5

Shell Programming

9/28 Unix Basics Quiz

Linux Ch. 2

10/5, 10/7, 10/9

6

Perl Procedural 

Perl ch 1-4, 9

Shell system due

  10/14, 10/16

- No class 10/12

7

Perl with regular expressions

Perl as an internet page

 

10/12 - Columbus day - no class

Perl ch  5-6

10/19, 10/21, 10/23

8

Review and Midterm 10/23 

Perl system due

10/26, 10/28, 10/30 

9

Start C Programming

File I/O

Linux Ch. 3  

 

11/2, 11/4, 11/6

10

C Programming with Linux Environment variables, GDB Debugger

Linux Ch. 10, 4

11/9, 11/11, 11/13

11

C Programming Make files and file locking

Linux Ch. 7, 9

11/16, 11/18, 11/20

12

C Signals and Processes

 

Linux Ch. 11

11/23,   - no class 11/25 or 11/27

13

Debug

MySQL verify account setup

(11/25 and 27 vacation)

11/30, 12/2, 12/4

14

12/2 C Programming Quiz

Mysql on Linux

Final C system due

Final Perl System due

Perl ch 13

12/7, 12/9, 12/11

Maybe 12/8

15

Perl Over MySQL

Perl Review
Shell Review

12/8 is a makeup day if needed.

Perl Web database lookup due

12/14

16

C and Shell Review 

 

 

 

Final exam based upon Adelphi Final Exam Schedule; finals held Wed 12/16/2015 8:00- 10:00

 

12/22 & 23

Makeup days if needed

 

 

 

Turnitin

Adelphi University has a license agreement with Turnitin.com, a service that helps prevent plagiarism from Internet resources. I reserve the right to request an electronic copy of any written assignment submitted in this course for review through Turnitin.com. Please see Adelphi's tips for students on preventing plagiarism and student instructions for Turnitin.com for more information.

 

Students With Disabilities

If you have a disability that may significantly impact your ability to carry out assigned coursework, please contact the Office of Disability Support Services (DSS), located in Room 310 of the University Center, 516-877-3145, dss@adelphi.edu.  The staff will review your concerns and determine, with you, appropriate and necessary accommodations. When possible, please allow for a reasonable time frame for requesting ASL Interpreters or Transcription Services; a minimum of four (4) weeks prior to the start of the semester is required.*

 

 

Honor Code

Students enrolled in this course are expected to abide by the Adelphi University Honor Code. The purpose of the Honor Code is to protect the academic integrity of the University by encouraging consistent ethical behavior in assigned coursework by students. Following is excerpted from the Student Honor Code:

“The Code of Academic Honesty
The Code of Academic Honesty prohibits behavior that can broadly be described as lying, cheating, or stealing. Violations of the Code of Academic Honesty will include, but not be limited to, the following:

  1. Fabricating data or citations
  2. Collaborating in areas not approved by the professor
  3. Unauthorized multiple submission of one’s own work
  4. Sabotage of others' work, including library vandalism or manipulation
  5. Plagiarism
  6. The creation of unfair advantage
  7. The facilitation of dishonesty
  8. Tampering with or falsifying records
  9. Cheating
  10. Other forms of academic dishonesty”

 

Avoid coding plagiarism: Any code you even vaguely take from the internet needs to be cited in comments. If an algorithm you found was used as a basis, cite it. Any person helping you, even a tutor, needs to be listed in the comments. If you work with another person doing homework, include them in your comments.  If you include any piece of code you do not fully understand for your final project, comment that you are using it as a black box. You are responsible for explaining how every piece of code works except those you designate as "black box" portions.

 

Student Course

Evaluations

During the last two weeks of the class, you will receive notification, via mail and eCampus, that the course evaluation is available for your input electronically. Availability will end at the start of the final examination period. Your feedback is valuable and I encourage you to respond. Please be assured that your responses are anonymous and the results will not be available to the instructor until after the end of the semester and therefore after course grades have been submitted.