Lab00, CISC105, Fall 2004

Welcome

Welcome to CISC105! The purpose of this first lab, "lab zero", is to orient you to some of the knowledge and skills you will need to complete the remaining labs in this course. In particular, this lab will introduce you to the Sun Rays.

The Sun Rays are computer workstations that you can use to access the machine called strauss. Strauss is where you will do your actual programming in this course. In lab, you'll access strauss via the Sun Rays. The SunRays are a specific brand name for a type of system called an "X Terminal".

Note: Outside of lab, you may access strauss from any computer connected to the Internet, provided you have the right access software (e.g., a secure shell client program.) Your instructor will say more about that in lecture. Some work for this course you can do from any computer, provided you can use that computer to access strauss. Other work you might have to do directly on the Sun Rays. There are Sun Rays in Willard Hall 009, and also in some other locations on campus, including the basement of Smith Hall.

Goals for Lab Zero

This lab is kind of a "warm up" for the semester. We want to make sure that you are comfortable with the environment before we get into the heavy lifting, which starts next week.
  1. Make sure you know how to log in and out of the Sun Rays, and set up your account for this course.
  2. Make sure you know how to access the web on the Sun Rays.
  3. Make sure you can find the CISC105 home page.
  4. Your instructor may be using a course management system called WebCT, that allows you to track your assignments, submit assignments online, and track your grades in the course (among other things). Your instructor or TA will tell you whether WebCT is being used in this course. If your instructor is using WebCT, you need to make sure you can find WebCT, login to WebCT, and find CISC105 among your courses.
  5. Make sure you know how to create a text file with the text editor known as emacs.
    Chapter 15 in your Anderson textbook covers emacs, and there is also some material below. In this lab, you'll create a text file, and submit it both online via WebCT and on paper.
  6. Make sure you can create a C program, compile it, run it, script the results, and submit it to your TA on paper, and if requested, also via WebCT.
  7. Make sure you understand the lab policies. There may be a quiz on these next week!

If you can do all those things, you are all set for this week, and you can start on reading Chapters 1 and 2 in your Tan and D'Orazio text. Reading notes for Chapters 1 and 2 are at http://udel.edu/~pconrad/cisc105/td99. Look under ch01 for notes about chapter 1, and ch02 for notes about Chapter 2.

Reference Materials for Lab 00

In your Anderson textbook (Just Enough Unix, 4th Edition), Chapters 1,2,3,15,32,33, (pages 3-34, 181-194, 363-382).

Goals 1 and 2: Login/Logout and Web on the Sun Rays, and account setup

Info on logging in and out and accessing the web on the Sun Rays is at the following link:

http://copland.udel.edu/~pconrad/UnixAtUD/SunRay.html

That link also has information on what to do if you don't yet have a UDelNet Id. Finally, there is also information on that page that will help you pull up an "XTerm on Strauss"; you'll need that when you get to Goals 5 and 6.

In addition, you should do the following steps:

Goals 3 and 4: CISC105 homepage and WebCT

Once you've managed to get logged on to the SunRay system, and you've found the Web Browser, navigate to the following link:

http://copland.udel.edu/~pconrad/cisc105

There, you should find the main web page for the course. You should find a link to the syllabus, and a link to the labs directory, where the lab you are now reading can be found. Some of the links will lead you, for the time being, to empty directories which will soon be filled with your projects, homework assignments, source code examples, and lecture notes.

Then, click on the link that says "WebCT". This should take you to a login screen, and then directly to the WebCT page for this course. Alternatively, you can go to the main WebCT page, and click "logon".

http://www.udel.edu/webct

Once you are on WebCT, be sure to find the calendar link, and check out the reading assignments for the next two weeks.

Goal 5: Creating a text file with emacs

Open an XTerm on strauss (If you don't know how and/or are not sure what "Xterm on Strauss" means, follow this link to the Sun Ray documentation: http://copland.udel.edu/~pconrad/UnixAtUD/SunRay.html).

Now it's time to start learning emacs. Emacs is a "text editor", that is, a program that helps you create files on strauss. Go to an xterm on strauss, and type "xemacs". For more instructions on what to do, follow this link:

http://copland.udel.edu/~pconrad/UnixAtUD/EmacsTips.html


Once you are comfortable with using emacs, go ahead and use emacs to create a text file called "lab00.dat" containing the following, each on a separate line: your name, your hometown, your favorite US state other than the one in which your hometown is located, and your unix userid.) For example, Prof. Conrad's file would look like this:

Phill Conrad

Wilmington, DE

Arizona

pconrad

When you are finished, send the file to the printer in Willard 009 with the following Unix command:

qpr -q whlps lab00.dat

Also, upload this file as part of your submission for Lab00 in WebCT. But DON'T SUBMIT YET! Just upload for now. You'll hit submit at the end of lab, after you've also uploaded your C program and script file.

If you aren't sure how to do this, check the following link for help, or ask your TA:

http://www.udel.edu/webct/students/assignments.html

(If you accidently hit submit before you get your C program uploaded, don't freak out; your TA can reset the assignment so that you can try it again. Your TA might not be able to fix it on 9/1, because its the first week of the semester and his TA account might not be active yet. But if not, he can fix it up for you by next lab on 9/8, or at the latest on 9/15, and you can make it up then without penalty.)

Goal 6: C programming on Strauss

  1. Create a file lab00.c that contains the following (except substitute your name and Unix user id for those of Jane Doe, and use today's date.)

    DO NOT include your student number (NEVER include that number in anything you submit in this class!)
    // lab00.c Jane Doe doej@udel.edu 9/1/04
    // traditional first program (hello.c from Anderson, p. 369)

    #include <stdio.h>
    int main(void)
    {
    printf("Hello, world!\n"); return 0;
    }
  2. Once you've created this program, use the following command to compile it (compile means: translate from C into machine language, or if it cannot be translated because of errors, report the errors) with one of the following commands. At this point in the semester, you may use either one (later on, I may tell you to use one or the other.)
  1. In both cases, a new file is produced called "a.out". To execute this file (run your program, type the following:
  1. You are now ready to use the "script" command to make a record of your work.
  1. Now, use "cat lab00.txt" to make sure your script looks ok, and use the following command to print both your .c file and your .txt file. (Yes, I want you to print both of them, and submit both of them, even though the .c file is contained inside the .txt. file.)
qpr -q whlps lab00.txt 
qpr -q whlps lab00.c


And finally, you are done with Goal 6!

Goal 7: Understanding Lab Policies

First, lets get this out of the way: Lab attendance is mandatory.

Attendance will be recorded. Be sure to sign the attendance sheet and return it to the TA before leaving your lab session.

Lab attendance is reported on WebCT as, for example, LA0901 (lab attendance for 09/01/04.) Grades are marked as P, A, E, or U for "Present", "Absent", "Excused", or "Unknown". You must at least make an appearance to be counted present.

Please read about more lab policies by following http://copland.udel.edu/~pconrad/cisc105/04F/labs/lab_policy.html

Finishing up: What to turn in for this lab

  1. Be sure that you have a printed copy of your three files: lab00.dat, lab00.c, and lab00.txt (script file).. Hand these to your TA before leaving the room. If you are making up this lab, hand it to him/her on 09/08/04 during Lab01, or at the very latest on 9/15/04 during Lab02 (that should only be for students who for whatever reason, added the class late.)
  2. Be sure that you uploaded a copy of all three files to WebCT (lab00.dat, lab00.c, and lab00.txt). Then, click submit to send these to your TA.
  3. Grading:

Next Steps:

Do your reading assignment (found on the Calendar in WebCT) before coming to lab next week (09/08/04).


Phillip T Conrad
Last modified: Wed Sep 1 17:30:41 EDT 2004