Hello everyone, Here are the notes for the first tutorial. Each week I'll provide you with information about the topics I'd like covered (usually with examples, sample code, etc.), but I'll leave it up to you as to how you want to actually present the material. There's probably more information here than you can cover in one tutorial, so don't worry if you don't enough time for all the topics. (You may want to mention the other topics to your class so that they can review the information themselves.) If there's time, I may have you present the remaining topics in next week's tutorial. You should also let the class ask you questions about the material we cover in class, the assignments, or anything from tutorial. If you are having problems with the material and want further instructions, let me know and I'll send more detailed notes in the future. If a student asks a question that you feel you cannot answer, have the student email me directly. After your tutorial on Wednesday, please sent me a short email letting me know how everything went, how many people attended your tutorial, and what topics you covered. Reminders ========= - Tutorials are on Wednesdays from 6:00-7:00pm. Your room assignments are posted on the course webpage (the doors should be unlocked). There should be an overhead projector and blackboard in each room. - Don't give out your email address, office number, or phone number to your students. - Assignment 1 will be available this Wednesday after lecture. Next week there will probably be questions about Assignment 1 but I'll send you more detailed information at that time. Tutorial 1 Notes -- May 25 ========================== (0) Introduce yourself! (1) Webpage and newsgroup - Remind your students about the course webpage as the primary source of information outside of lectures/tutorials: http://www.cs.utoronto.ca/~csc209h/ In particular, remind them to frequently check the announcements. - There is also a newsgroup for posting questions and discussing course material: ut.cdf.csc209h Let your students know that the newsgroup will be monitored by the instructor and warn them about posting solutions to the newsgroup. (2) CDF accounts - The course webpage contains a list of userids for the first batch of CDF accounts that have been created. (Accounts are automatically created for students that are properly registered in the course.) - You should encourage your students to try logging in to CDF as soon as possible (if they haven't already done so), so that they can become familiar with the CDF environment. If they are having problems, as a starting point direct them to the CDF webpage: http://www.cdf.utoronto.ca/ and, specifically, to the CDF FAQ: http://www.cdf.utoronto.ca/cdf/faq.html Stress that all of the programs they write for this course must work on CDF, so even if they work at home they must still be able to use CDF. - If you want to add a technical component you can introduce them to the "uname" command for displaying system information. For example: seawolf% uname -a Linux seawolf 2.4.27-i686-cdf-server #1 SMP Wed Sep 1 15:12:03 EDT 2004 i686 unknown (i.e., operating system is Linux, OS release name is "2.4.27-i686-cdf-server", hostname is "seawolf", machine hardware type is "i686".) (3) Basic Unix commands, relative and absolute pathnames, editors - There are probably going to be some people that are totally new to Unix. Each week in lecture we will cover a number of new commands, but it's worthwhile to highlight some of them in tutorial. This week we'll just concentrate on some simple filesystem commands. It might help to put a picture of a simple directory tree on the board (or on a slide) and use it for your examples, e.g., / (root) | -------------------- | | | | bin dev h usr | | u3 local | | c1 bin | c1xyzw a) A user normally starts a shell session in the "home directory". At a shell prompt the user can type "pwd" to determine the current working directory of the shell. For instance, a user "c1xyzw" might see the following result after logging in to CDF: seawolf% pwd /h/u3/c1/c1xyzw b) Files and directories can be referenced by either "absolute pathnames" (i.e., pathnames specified from root) or "relative pathnames" (i.e., pathnames specified with respect to the current working directory). For instance, if the user's current working directory is "c1xyzw" in the above figure, and a file "accounts.txt" is in the directory "c1", then the following pathnames refer to the same file: /h/u3/c1/accounts.txt (absolute pathname) ../accounts.txt (relative pathname) (".." refers to the parent directory of the current working directory.) In general, any time a file or directory needs to be specified, either an absolute or relative pathname can be used. c) The "cd" command allows a user to change the shell's current working directory, to move around the filesystem. Examples: cd dirA - change the directory to "dirA" (to succeed, dirA should be a subdirectory of the current working directory) cd / - change the directory to the root directory cd /usr/local - change the directory to the directory /usr/local cd .. - move "up" one directory in the directory tree cd - change the directory to the user's home directory You could also point out how "cd /usr/local" and the sequence "cd /", "cd usr", "cd local" all change the directory to /usr/local. d) Information about files and directories can be displayed using "ls". Examples: ls - list the name of the files in the current directory ls -l - show file information about the files in the current directory ls /usr/local - list the files in /usr/local ls -l ../accounts.txt - list information about the file accounts.txt in the parent directory e) Files can be copied using "cp" and moved using "mv". Examples: cp fileA fileB - make a copy of fileA and call it fileB (*) mv fileA fileB - rename fileA as fileB (*) cp fileA .. - copy fileA to the parent directory cp fileA ~/dirA - copy fileA to the directory dirA contained in the user's home directory (#) mv fileA ~/dirA - move fileA to the directory dirA contained in the user's home directory (#) Notes: (*) If fileB is a directory then fileA is copied/moved into the directory fileB. (#) If dirA is not a directory then fileA is copied/moved to the file dirA. f) New directories can be created using "mkdir" and removed using "rmdir". g) For more information about a Unix command, use "man " to display the online manual information about the command. - Point out to your students that they should also learn how to use a text editor. Just mention a few editors: "pico" is a very simple and easy to use editor. "vi" and "emacs" are more fully featured, but also more difficult to learn. (Also, graphical editors "nedit" and "gvim".) (4) A simple CVS review - NOTE: students are supposed to already know about CVS, but many of them have probably forgotten. Just give them a very high-level overview of CVS and encourage them to use it for developing their programs. Here are some points to make: a) CVS (Concurrent Versions System) keeps of history of a source tree and the changes made to the tree. Master copies of the files are stored in a central repository that also records the changes that have been made to the files. Users can "check out" copies of the files, make local changes, then "commit" their changes to the repository. CVS also alerts users to conflicts between their local changes and changes to the master copy, and allows users to "revert" to older copies of files. b) Before using the environment variable CVSROOT must be set to the repository path, e.g.: setenv CVSROOT ~/cvs (using "tcsh" - default shell on CDF) export CVSROOT=~/cvs (using "bash" - another popular shell) c) To create a repository for the first time use: cvs init d) Add files to the repository by changing to the directory with the files you want to add, and then use the "import" command, e.g.: cvs import UofT start ( is the name you assign to a project. "UofT" is a "vendor name" and can also be changed). e) To checkout a copy of a project, use cvs checkout f) Make changes to the (local) project files using your favourite editor. g) Once you have a working copy of your files (i.e., after a checkout): cvs add - add a new file to the repository cvs update - update the local files from the repository, mark files that are modified cvs commit - commit local changes to the repository - Let your students know that a simple CVS tutorial will be posted to the course webpage. ---------------------------------------------------------------------- If you have any questions, please email me. Thanks, Ron ---------------------------------------------------------------------- Ron Petrick -- Cognitive Robotics Group -- University of Toronto Email: rpetrick@cs.utoronto.ca -- Web: www.cs.utoronto.ca/~rpetrick/ ----------------------------------------------------------------------