| 122 lab week 1
Project questions are discussed on cis122.blogspot.com |
IT Applications for 122: The DuckWare CD (available at 151 Mck) contains Firefox, TextPad, and SSH for installing on your home computer. For related information, see the 122 Resource page.
SKILL ASSESSMENT NOTATION: In 122, we'll assess skill-acquisition using three levels: E (Exposure), F (Familiarity), M (Mastery).
Micro Labs on Campus: In addition to 026 Kla, You can work in 013 Kla and 101 Mck or in any CC microlab on campus.
Saving your lab work: The My Documents folder on the PCs in 026 Kla is cleared periodically by the systems staff. If you want to save a copy of your lab work, use SSH/FTP to upload your files to your uoregon.edu account. Alternately, bring a USB drive with you to your lab.
All the software we use in the lab (SSH, TextPad, FireFox, etc.) is on the DuckWare CD, and can be installed on your personal computer. The DuckWare CD is available from MicroHelp, 151 McKenzie.
For notebook computer enthusiasts, you are welcome to use your notebook in lab, which has WiFi access.
For labs that are full, three names may be added beyond the max, on the condition that the added students may have to watch over someone's shoulder when everyone registered attends the lab. Note that originally registered students up to the max are guaranteed a seat. If you are one of the extra students added over the max and you have a notebook computer, bring it to the lab which is a wireless hotspot (and there are also Ethernet connections in the walls of B26 Kla if your notebook is not wireless enabled.)
If your name is added to a new list, be sure it is deleted from the original list.
Start SSH and use Quick Connect:
Host Name: shell.uoregon.edu
User Name: enter your uoregon.edu username
Click Connect; click Yes is prompted about a digital certificate; enter your uoregon.edu password
Your SSH window now displays the Command Prompt for the login shell on uoregon.edu
shell means "command interpreter"
bash (Bourne Again Shell)
login prompt, shell prompt ($)
Your lab instructor will explain these basic Unix commands:
print working directory: pwd
list directory contents:
ls
ls -a
ls -l
create new directory: mkdir
change directory: cd
tab key: file name completion
Use mkdir to create a directory named "public_html"
(Do this only if this directory does not already exist in your home directory.)
If you make a spelling error, your can use the following commands to delete
or rename a directory:
rmdir ("remove directory")
mv ("rename")
To delete a file that is not a directory: rm
122 is your 122 site directory on uoregon.edu.
It's Unix pathname is ~/public_html/122, where ~ stands for
the path to your home directory on the server.
Enter this command at the prompt: echo ~
Move to the 122 directory and make directories named p1, p2, p3, p4, and images.
Quiz Questions:
Translate to Unix:
"move to your 122 directory"
"make a 'p1' directory in your 122 directory"
"make directories named p2, p3, p4, p5 in your 122 directory"
Open Using Emacs in a browser. Your GTF will introduce you the Edit/Compile/Debug/Execute cycle in Emacs, as follows:
HELLO WORLD! A First C++ Program.
Just as Thoreau had to teach the earth to says "beans" rather than "weeds", you must teach uoregon.edu to follow your lead and sing your tune:
Follow your GTFs directions to edit/compile/execute the following hello.cpp program. It can be copied from here: http://www.cs.uoregon.edu/classes/cis122/code/w1/hello1.cpp
i) If the statement flagged by the compiler as being in error looks totally correct to you, then look for an error in the statements immediately preceding the flagged statement.When your program compiles without error, you are ready to execute it from the command line.
ii) Correct the first few errors, and then recompile-- this may eliminate the remaining error messages. This is known as an error cascade-- a syntax error in line 5, for example, may confuse the compiler so that many subsequent lines, which are totally correct, will be flagged with errors. A cascade of error messages is output, only the first few of which are meaningful.
Important: Your GTF will carefully explain these key points
• Suspending emacs vs. Exiting emacs.
• Resuming Emacs vs. Restarting emacs.
When emacs is suspended in the background, you must then RESUME emacs (with the fg command, for example, or the %1 command). . If you enter the "emacs hello.cpp" command again, that RESTARTS Emacs, and you will have multiple emacs processes running, which irritates the uoregon.edu systems staff.
You will repeat a similar lab exercise each week until you achieve Mastery of using emacs to edit/compile/execute.
GOALS FOR WEEK 1: At the end of lab, your skill level should be at E-level with the following topics:
Basic Unix Commands
Basic Emacs commands
Basic Edit/Compile/Execute procedure for "Hello World"
NOTE: if you missed the week 1 lab, attend one of the Help Sessions scheduled for week 1 and week 2. See Announcements in Blackboard for days/times.
In addition to B26 Kla, You can work in 013 Kla and
O26 Kla or in any CC microlab on campus.
It's important that you are able to follow along as the instructor presents material. If you cannot hear or understand what is being said, please raise your hand and say (politely) that you are having difficulty following the presentation. The lab instructor will appreciate your assistance.
Also, please keep in mind that your responsibility is to pay attention and follow the instructor's directions. In particular, you should not be reading email, surfing the web, visiting with other students, etc., during the lab. Save those activities for after the lab.