Tentative schedule

Week/Date Lecture contents Assignment
JUL-23 Course intro 
  • Organization
  • Grading
  • Assignments and project
  • UNIX, email, news, editor, famiiarization (nothing to be submitted)
    • Email readers: pine, mutt, elm
    • News readers: tin, trn, xrn
    • Emacs and Vi/Vim
    • Text-based browser (lynx)
  • Netscape browser, messenger, and  composer familiarization (nothing to be submitted)
  • Web browsing
    • Lynx and wget: being kind to others
    • Notes on security issues in browsing untrusted sites: active pages, cookies
  • HTML Forms
  • UNIX shells and utilities
  • Build your homepage and a resume (optional) in HTML. 
  • Write a few shell scripts (details below).
  • Clarifications on last assignment
  • Lecture on programming in Perl. Scribe notes are available, thanks to Ameya Prakash Usgaonkar. 
  • Write a bunch of perl scripts, shorter and more readable is better (see below)
  • UNIX Networking in Perl. Scribe notes are available, thanks to Achint Kaur. 
  • Some more Perl assignments
AUG-20 (SI) Building tools 
  • Assignment regarding Java class dependence resolution (see below)
AUG-27 More programming skills 
  • RCS, CVS and version managing skills
  • ANSI C++ Standard Template Library
  • Finding the task graph and some of its properties from a makefile and a directory of files (see below) 
SEP-03 (SI) Typesetting scientific documents using LaTeX  
SEP-10 (SI) Preparing presentations using SliTeX and PowerPoint Mid-semester exams (no homework)
  • More about TeX and LaTeX
  • Class project discussions
Writing macros in TeX and LaTeX
  • Lexical scanners: lex, flex, flex++, JFLex
  • Parsers: yacc, bison
SEP-29 Guest lecture by Prof. Joshi about Object-oriented programming
OCT-01 Postponed owing to Query Optimization Workshop  
OCT-05 17:30 Java language basics
OCT-08 Java UI, AWT, JFC/Swing, JDBC  
OCT-15 15:00
  • Class project informal status report
  • Servlets?
  • Proposals for covering additional topics
Small Java homework 
OCT-22 Hand out LaTeX and Java homeworks.
OCT-29 Project status due
THE-END Class project viva/demo Project report to be typeset in LaTeX and BibTeX

July 23 Assignment Instructions

Simple UNIX commands (read man pages)

  • Logging in (rlogin, telnet)Directory commands (cd, pwd, ls, !, ., .., mkdir, rmdir)
  • File manipulation (cp, mv, rm, chmod, chown, ln, ln -s)
  • File comparison (diff, split, join)
  • File display (less, more, cat)
  • Printing (lpq, lpr, lprm, lpstat)
  • Miscellaneous (echo, date, exec, yes)
  • Disk usage (du, df, quota)

Editors (follow links below)

July 30 Assignment Instructions


Your homepage assignment is due AUG-06. Here are detailed instructions. You can either use a text editor like vi, vim or emacs directly, or use a WYSIWYG editor such as Netscape Composer.  Do not crowd your page with too many images!  Make sure you have used the following features:

Samples available!

Check out the GET and POST examples and follow these to create your own.  In your case, the form should have a text field to enter a machine name and a user name.  Using this, your CGI script should finger the user at the machine and send back the response to the client browser. 

Do NOT run your own HTTP servers any more.  Rony has created a server on port 5901 of Everest.  You place your CGI files in /pkgs/apache/otherserver/cgi-bin/<your_user_name> and enable +x on your CGI files, and point to them from HTML files on Surya (see my examples). 

Shell scripts

August 9 Assignment Instructions

You have to write a few Perl scripts.  You won't get any points unless these work.  If these are functional and reasonably readable you will get 85-90%.  You will get full points only if you exploit Perl to make these really short and clean and yet readable.  All problems carry equal weight.

These are due Friday 20th August.  Submission instructions will be sent out by me or a TA soon.

August 23 Assignment Instructions

This is an assignment involving make and Perl, due Monday 30th Aug.

August 27 Assignment Instructions

This is the homework that went out of control last week...

As mentioned in class, there is a "parallel" version of make called pmake, which tries to process tasks that do not depend on each other concurrently. As you know from the class, a makefile specifies a workflow dependency as a directed acyclic graph (DAG).

The input to your Perl script will be a directory with a few files in it, and a makefile.  The makefile will specify one final target, which will be related to some of the files in the directory using usual rules.  To make the target, it will be in general necessary for make to run programs that will create additional files in the directory.

Assume all files and dependencies are restricted to the given directory.

One of the things pmake/make has to do is to compute the subpart of the task DAG that needs to be remade.  Use suitable flags with make on Linux, together with a Perl script, to compute the effective task DAG. To clarify further, the effective DAG could be much smaller than the DAG expressed through the makefile, because some intermediate targets are already up-to-date.

Using the UNIX time command, you can estimate how much time each task takes. Based on the DAG and the times estimated for each node, report two things:

Extra credit: submit a one-page write-up giving an algorithm to find the width of the DAG, namely, the largest set of nodes/tasks which can be executed concurrently.  You don't have to code up the algorithm.

If you find Perl intolerable for this homework feel free to use C/C++.

September 17 Assignment Instructions (TeX and LaTeX)

You may have come across TeX's main macro definition mechanism, \def. For example, to typeset a small amount of text (no paragraph breaks) in boldface, you may say:
  1. \def\bold#1{{\bf #1}}
or preferably, if you want to permit paragraph breaks,
  1. \long\def\bold#1{{\bf #1}}
Here #1 is the formal argument which is instantiated as
\bold{Ready\par Steady\par Go}.
TeX has another macro construct called \let.  If you say:
  1. \let\mybf=\bf
then you can use \mybf just like you use \bf to typeset in boldface.

Question: Why are there (at least) these two distinct mechanisms to define macros?  Is there a significant difference between \let\a=\b and \def\a{\b}?

Question: Suppose you want \bf to print italics and \it to print boldface, for whatever reason.  How would you do it?

TeX defines macros for looping constructs as follows:

  1. \def\loop#1\repeat{\def\body{#1}\iterate}

  2. \def\iterate{\body\let\next=\iterate\else\let\next=\relax\fi\next}
You invoke the \loop...\repeat construct in the form
\loop <loop-condition> <loop-body> \repeat
Question: Using \loop...\repeat, write a macro called \punishment which, when invoked as
\punishment{I will not take part in trivia quizzes.}{100}
will print the first argument once per line as many times as the second argument.  To help you, here is some information on creating and manipulating counters and conditions in TeX.
\newcount\n     %creates a new counter
\n=1            %sets \n to 1
\advance\n by-2 %new value is -1
\newif\ifabc    %creates a new condition called abc
\abctrue        %sets abc to true
\ifabc \textbf{Now!} \else \emph{Never!} \fi  % uses abc
\abcfalse       %sets abc to false
Question: Write a macro \primes which has one argument #1 and will print the first #1 prime numbers.

As discussed in class, LaTeX uses the .aux file and multiple passes to connect up references and citations with suitable numbers and labels.  LaTeX emits a warning if it cannot resolve all references correctly in the current pass, or it has room to suspect that one or more of its label resolutions is incorrect. For example, the following LaTeX source has a forward label reference, and will not resolve in the first pass.

\section{Introduction} \label{intro}
In Section~\ref{concl} on page~\pageref{concl}
we conclude.

\section{Conclusion} \label{concl}
We started the paper with Section~\ref{intro}.


If you view the .dvi file after one pass, it will have question marks where reference numbers are supposed to be. If you run LaTeX a second time, all labels will be replaced by correct numbers, and LaTeX won't complain any more.

Question: Write and invoke a macro \dupelatex which will prevent LaTeX from ever correctly cross-referencing your submission .tex file, no matter how many times it is run.  (There is good reason why LaTeX does not automatically reinvoke itself even though all references are not resolved properly.) Your source may either leave unresolved labels (question marks) or incorrectly resolved labels (wrong numbering). We prefer that you produce the second problem.

Please typeset all your answers in one LaTeX source file and submit that.  This homework is due Monday 27 Sept.   If LaTeX throws up an error you won't get any points.

General suggestion: On your Linux machine, search for .tex, .cls, and .sty files using the UNIX find command in /usr/share and /usr/lib.  Use these to learn from example.

October 22 Assignment Instructions (Java and LaTeX)