Collaboration and late policy
All assignments (except for L5) in this course are single-student assignments. The
work must be all your own. Do not copy any parts of any of the
assignments from anyone including the web. Do not look at other
students' code, papers, or exams. Do not make any parts of your
assignments available to anyone, and make sure nobody can read your
files. The university policies on academic integrity will be applied
rigorously.
It is not considered cheating to clarify vague points in the
assignments or textbook, or to give help or receive help in using the
Linux system, compilers, debuggers, profilers, or other facilities.
Each student will automatically receive 5 grace late
days for the entire semester. However, one should not submit any
specific lab more than 3 days late.
Lab environments
You must complete all labs on the given virtual machine.
If you do not have a personal desktop or laptop on which to install the virtual machine,
please contact the TA. To install the virtual machine on your computer, take
the following steps.
- Step 1. Download the Virtualbox
virtual machine monitor here. Choose the right
binary to download according to the type of operating system running on your laptop.
- Step 2. Download the class virtual machine image here. This file is large (1.2GB), so you need to be patient.
- Step 3. Install and launch Virtualbox. On the Virtualbox application toolbar, under the Menu
item "File", click on "Import appliance...", and choose the previously downloaded cso.ova file
when prompted.
- Step 4. After importing, start the virtual machine
and you are done. Recall that the login name and password are given to you in the first class (they are also on Piazza).
Tips for programming on Linux
Basic UNIX
Our lab environment is based on Linux. If you have never used a UNIX
machine before, there are many sources online to help you get
started. An introduction to the UNIX command line interface can be
found
here. This
cheat
sheet lists the most common UNIX commands. I also like this
survival guide for Unix newbies. Here's a entertaining
book for those who think better in magic and spells.
Man up If you need help with a
particular UNIX command, you can use the manual pages built into all
UNIX distributions. Type: man [command name]. For
example, ls is the command to list the contents of a
directory, man ls will describe the many command line options
that ls accepts.
In addition to using linux from the command line, you'll be writing
C programs that use built-in library functions.
These are documented
in Chapter 3 of the man
pages. You can view these on your linux machine by via man,
e.g.: man 3 strcmp describes the strcmp library function.
Learn to use an editor You'll be editing text files on Linux. The two most common editors
used by developers are "emacs" and "vim". Both can be intimidating to
new users. You may find the "nano" editor easier to use.
Learn to use gdb The debugger gdb is indispensible when it comes to debugging
your C (or C++) programs. Skim through the gdb tutorial. Here are two handy gdb cheat sheets, one for IA32 (txt, pdf), one for x86-64 (txt,pdf).
Coding style
When grading your labs, we will consider your coding style. Please
refer to this
document for
proper coding style.