CS W1007x Introduction to Computer Science
Homework 0 (3 points)
We would like to get the semester
off to a flying start! So, what class would be complete without an
assignment asking you to write an essay describing what you did over
break? Answer: this one. Rather, we want you to get
started using the
computers at Columbia, and UNIX in particular!
For Homework 0, we would like you to:
- Get an AcIS extended account.
- Try out a variety of UNIX commands.
- Start using EMACS
- Change and compile a simple C program
- Send email using Pine (or your email program of choice).
Due Date:
Tuesday, January 27, 1998 (section 1),
Wednesday, January 28, 1998 (section 2).
Reading:
Chapters 1 and 2 ("The Art and Science of C" by Roberts)
The nitty-gritty for this homework:
- Log into your UNIX account.
- Explore the topics in the online UNIX tutorial, by typing
"tutor" (now and later).
- Start up EMACS (type "emacs").
- Run the EMACS tutorial (control-h t) to learn EMACS (now and later).
- Use EMACS to make sure you have a file called ".profile" in your
home directory with (at least) the line "export PATH=$PATH:~es66/bin" -- this
will hook you up to the libraries for this course.
- However, after you
edit .profile you need to logout and log back in to have
the system reread your variables.
- "mkdir w1007" will create a space (directory) for this work (This
and the
commands below are at the dollar sign prompt.)
- "cd w1007" will go to that directory
- "pwd" will show you what directory you are in ("print working directory")
- "cp ~es66/inchtocm.c ." will copy some source code (don't forget that
"extra" period at the end!)
- "ls" will show you there is a new file in your w1007 directory
- "cat inchtocm.c" will show you the contents of that file
- If you are typing into an HP in Mud, "rlogin cunix" will connect
you to a remote computer that will allow you to compile.
- "gccx inchtocm.c -o inchtocm" will compile it. If it says it cannot
find gccx, the PATH command above did not work for you -- make sure you did
it correctly.
- "ls" will show you there is a new file, inchtocm
- "inchtocm" will execute it. If it says "not found," try "./inchtocm"
- Now, edit inchtocm.c so it performs the opposite conversion. Test it
to make sure it works by compiling with gccx and then executing it.
- After you get it to work, "hand it in" by emailing your new source code to a TA who has
office hours that are most compatible with your schedule. These office
hours may change, and this will not necessarily be your TA.
Use pine (or your favorite mailer) to send it -- you
can use the control-r command (hold down the control key and press the
r key at the same time) in pine to read in a file.
email: evs at cs dot columbia dot edu
(Thanks to Andrew Kosoresow and Ivan Leichtling for helping develop this handout.)