Practicum in Trading Systems Development: Lab 1

Due:           Thursday, June 28, 2012, by 5:00 PM


PURPOSE AND RATIONALE

The purpose of this lab is to quickly get students up to speed with basic usage of the Unix development environment and tools used in this course, as a preparation for all future lab activities.

NB:  If you are not a CSPP student and are in need of a CS Cluster login ID (if you don't know what this is you are in need of one), contact the TAs immediately so you can get set up with a cluster login ID for the labs.  This course cannot be conducted without a CS Cluster login ID.  If you already have a UofC CNET ID, you can (and should) manually apply for a CS cluster ID here.


PRIMARY RESOURCES:

You should refer to relevant sections of the man pages for assistance for this lab, in addition to materials in your assigned primary texts for this week.

If possible, you should ssh into the cluster to perform all lab activities.

Make sure you have read this week's assigned reading. 

README

  1. If you are not in our course email list, please subscribe to the cspp51025 email list here:  http://mailman.cs.uchicago.edu/mailman/listinfo/cspp51025

  2. Turn the lab assignment in by email to the TA (cc'ing the instructor) by the due date above.

  3. For printing out your documents, you might find the following commands useful during your year(s) in this department:

    1. lpr -  off line print. Note that this command is called when you print from acroread  (for .pdf files) or gv (for .ps files)
    2. lpq - shows the printer queue
    3. lprm - removes jobs from the printer queue
    4. enscript - converts text files to PostScript (useful when you want to print out text files)

  4. Make sure you have read the Submission Guidelines for submission.

LAB 1

  1. Test out the following commands:  emacs, vi, mutt, gcc, g++, gdb, ddd.  Optionally, you can also try out eclipse if that's your prefered environment.

    1. Copy the .emacs file from ~mark/pub/51025/.emacs to your $HOME directory:

      cp ~mark/pub/51025/.emacs ~

      The .emacs file is useful and will help build and debug C and C++ files within emacs.

  2. In your home directory create the subdirectory ~/cspp51025/labs. Under that directory, create a further subdirectory: /lab1 . (Use multiple mkdir commands or consult the -p option for mkdir in the man page for mkdir).

    1. cd ~/cspp51081/labs/lab1

    2. Copy (recursively) the files under ~mark/pub/51025/src/calling.c.from.c++/ into ~/cspp51025/labs/lab1/calling.c.from.c++

    3. Examine the source code visually.  Examine the source code files carefully.  Understand what the makefile is doing.  Then run make.

    4. Did it compile?  If not, figure out why and fix any compilation errors you find.  (You may also find an error with the make file.  Fix that too).

    5. After you've successfully compiled and built the myapp program, execute it.  You should see an error on the screen (it may not say "Error", but there is one.  Find it, figure out why there is an error, and then fix the error and recompile and rebuild and rerun, making sure there are no further errors in the code.  You may wish to compare your output with that of the already-compiled program working.app, which will show you what the working application should look like.

  3.  Read the man pages for the following commands (that is to say, make sure you are fully conversant with the following basic Unix commands):

More information:

GNU text utilities (renamed "GNU coreutils")
Hobbes' Internet Timeline (just for fun)
 

Mark Weindling