CSCI 340 - Assignment Submission Instructions

All assignments for this class will be submitted electronically from turing/hopper using the e-mail system indirectly.

The most important point to be made here is DO NOT SEND YOUR PROGRAMS DIRECTLY WITH E-MAIL. With as many students as there are in the class, direct e-mail submission leads to chaos. There are too many options. "Should all files be placed in one e-mail or in separate e-mails? Should they go as attachments or in the body of the e-mail? Can I use the e-mail program with my browser at home? Which address do I send my programs to and what do I do if I forget it? "

You get the picture. There are too many ways that things can go wrong.

To make this process easier on you and on the TA, custom programs have been created specifically for submitting course assignments. This page details how to set up your account on turing/hopper in order to use the submission programs.

Setup

  1. If you do not already have one, you need a bin sub-directory in your home directory.
         cd ~
         mkdir bin
            
  2. In this directory you need to place the mailprog program which will submit your programs in the proper format. You may copy the program if you wish, but it is preferable to make a link to the program. In this way, if the submission program is changed, you do not need to reinstall it. You will automatically have access to the updated version. A link also saves precious space on your disk quota.

    To make the link, (assuming that you are in your home directory)

     cd bin
     ln -sf ~t90rkf1/bin/mailprog.340 mailprog.340
    	
    Make sure that you've typed it correctly. Many errors that people have can be traced to an improper link.

  3. Make sure that the system recognizes this new program by logging out and logging in again.

Assignment Directories

It is highly recommended that you have a separate directory in your account for this course. It can be called anything you want, but a good name would be 340. This directory should have the permissions changed so that you are the only one that can access it. Yes, only you, not the TA or even your instructor should be able to access this directory. This prevents a lot of security headaches. Changing the permissions is done using the chmod command.
      cd ~
      mkdir 340
      chmod 700 340
    

Each assignment should have its own subdirectory off of your course directory. Each assignment directory should contain the source code and Makefile for each assignment. You may place the object files and the executable file in the same directory, but these should be removed before the assignment is submitted.

Submission

In order to submit an assignment, you should be in your course directory, but not in the directory of the assignment itself. To submit the assignment type mailprog.340 followed by the name of the directory containing the assignment. The mailprog.340 program will examine your assignment directory and ask you to remove executable and object files if any exist. It will also ask you to remove any data files and core files (often created when a program crashes and useful for serious debugging). If there are no prohibited files, it will ask you for the assignment number and your section number. It will then wrap up all the files in your assignment directory, compress them, and e-mail them to your TA in a consistent format. An additional copy of the e-mail will be sent to your mail account on turing/hopper as a verification. The following is a sample session assuming a directory named hw1.
t90kjm1@turing:~> cd 340
t90kjm1@turing:~/340> mailprog.340 hw1

**********************************************************************
* WARNING : Do NOT use this program to mail notes to your Instructor *
*           Doing so may result in the loss of your program !!       *
**********************************************************************

Enter program number for your assignment : 1

*****************************************************
* Section  1 : McMahon / Dick          MWF   11:00  *
* Section  4 : McMahon / Uppalapati    W      6:30  *
*****************************************************

Enter your section number : 1
shar: Saving /tmp/mailprog.14645 (binary)
t90kjm1@turing:~/340> 

Your Copy

The mailprog.340 program does not destroy or alter any files in your assignment directory. But it does send you a copy of what it sends to the TA. If you do not receive the copy, chances are good that your assignment didn't make it to the TA. The following is an example submission copy.
From t90kjm1@turing.cs.niu.edu  Tue Jun 19 10:49:53 2007
X-Original-To: t90kjm1
Delivered-To: t90kjm1@turing.cs.niu.edu
Date: Tue, 19 Jun 2007 10:49:53 -0500
To: t90kjm1@turing.cs.niu.edu, z1567342@hopper.cs.niu.edu
Subject: CSCI 340 : Program 1 Section 1
User-Agent: nail 11.25 7/29/05
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: t90kjm1@turing.cs.niu.edu (Kurt J MCMAHON)

Course: 340
Program: 1
Section: 1
User: t90kjm1
Name: Kurt J MCMAHON
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.6).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2007-06-19 10:49 CDT by .
# Source directory was `/home/turing/t90kjm1/340/hw1'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   1443 -rw-r--r-- mailprog.14645
#
md5check=true
MD5SUM=${MD5SUM-md5sum}
f="`${MD5SUM} --help`" || md5check=false
if ${md5check}
then
  if echo "${f}" | grep "sage: ${MD5SUM} \\[" >/dev/null
  then
    if echo "${f}" | grep 'c, --check.*check MD5 sums against' >/dev/null
    then :
    else md5check=false
    fi
  else
    md5check=false
  fi
fi
${md5check} || \
  echo 'Note: not verifying md5sums.  Consider installing GNU coreutils.'
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    case `$dir/gettext --version 2>&1 | sed 1q` in
      *GNU*) gettext_dir=$dir ;;
    esac
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    shar_n= shar_c='
'
  else
    shar_n=-n shar_c=
  fi
else
  shar_n= shar_c='\c'
fi
$echo $shar_n 'x -' 'lock directory' "\`_sh14654': "$shar_c
if mkdir _sh14654; then
  $echo 'created'
else
  $echo 'failed to create'
  exit 1
fi
# ============= mailprog.14645 ==============
if test -f 'mailprog.14645' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'mailprog.14645' '(file already exists)'
else
  $echo 'x -' extracting 'mailprog.14645' '(binary)'
  sed 's/^X//' << 'SHAR_EOF' | uudecode &&
begin 600 mailprog.14645
M'XL(`"'[=T8"`^U8ZT_C1A#/9R3^AZTK%8='L`.$E@`2I5>ITAVM[JC4"A!R
MG`WLG6-;W@V/(O[W[ML[&R>`U+L/E0>))+OS_LW,KIU02F[RN)>FG:]&$:=!
M%/'/_LY@;U?^CO=VY"?_UH_W=SIQ--C9V]_?B^-!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^YX*BT2(SHVA9AR#]?5U]%M^EV1\X,$D(+X%>CJC>$F<=<%Q
MZVNG:Y[K3_"GD)@;UN`2[T#9]70M'`ZJ"!J2:Q\_X+2WY,6V)%?ZH,_$8:IQ\W&\,54PI"/YPOI&V?PS3;6T5:L+C\?E^?U
MN6[H9#T/SCP'H:=XQX^S$=7?':L749K0[`I'N6]+?,D
M7S^JZ,?X>L%Y@A>+/;VLD^NP]'W&\'N`@H(7W2"2/E6GX8L/><$Q:0!.`R[(^N<'K#[>:ES"[
M=1H,YZ\NX%YI-E=7U`7-@P,T@`.*?AX"[KT$;,,;$Z1_Z1GB&#"Q;!U!'E#X
M\C7+`CON6Q>D?LQ;<;'8`%SHV,7.8J3CGB0O3O^=I2AP`
#*```
`
end
SHAR_EOF
  chmod 0644 'mailprog.14645' ||
  $echo 'restore of' 'mailprog.14645' 'failed'
  if ${md5check}
  then (
       ${MD5SUM} -c >/dev/null 2>&1 || ${echo} 'mailprog.14645': 'MD5 check fail
ed'
       ) << SHAR_EOF
c962480d3cba810bf1279f5818410279  mailprog.14645
SHAR_EOF
  else
    shar_count="`LC_ALL=C wc -c < 'mailprog.14645'`"
    test 1443 -eq "$shar_count" ||
    $echo 'mailprog.14645': 'original size' '1443,' 'current size' "$shar_count!
"
  fi
fi
$echo $shar_n 'x -' 'lock directory' "\`_sh14654': " $shar_c
if rm -fr _sh14654; then
  $echo 'removed'
else
  $echo 'failed to remove'
fi
exit 0
Note that the word FAILED occurs several times in the above message. This does not mean that the submission failed. Rather it is part of the error checking instructions associated with unpacking the assignment when it reaches the TA. For your information, the section near the end that looks like lines of random characters all starting with M is the actual compressed source code for the assignment. If this section becomes hundreds or thousands of lines long, it's a good indication that an executable or object file slipped through and was accidentally submitted.

These messages to you serve as a verification that you did send the assignment. They can also serve as a backup, but there are better ways of backing up your assignments, and you should be using those means for backing up your assignments. Once you have received a graded assignment from your TA, it is safe to delete your submission copies for that assignment. In fact you should delete your submission copy in this case because it takes away valuable space from your disk quota.

Frequently Asked Questions