CS10, Fall 2009, Lab zero (lab00)
Instructor: Phill Conrad
TAs: Esra Kucukoguz, Yiming Li, Murali Yeleswarapu
Goals
The goals for this weeks lab are fairly modest.
This is mainly an orientation to the Cooper Lab, to the computing environment we are going to be using.
If the tools we'll be using here are familiar to you, then you'll probably complete this lab very quickly—in far less than 50 minutes. If you are willing to help others that may be still learning the environment, that would be very much appreciated, and you might get to know some of your classmates that way.
If Java and/or Linux is new to you, it may take a bit longer—and you might not even get through it all. If that's the case, you'll want to practice some of this in the CSIL lab on your own. We talk about how to do that.
Here's what we want you to be able to do.
- Know how to login to the Cooper Lab Linux environment
- Be able to bring up a web browser (probably Firefox).
- Once you bring up the web browser, find the CS10 home page, and the Gauchospace page.
- Be able to find the menu option to open a Terminal window
- Some folks may call this a "command prompt", or a "shell" window.
- In the Cooper lab, it is under "Applications", "System Tools", "Terminal"
- Know how to invoke multiple terminal windows and arrange them side by side on your screen.
- Know how to create a subdirectory in your home directory, either using the GUI (Graphical User Interface), or the Linux command line. Specifically, we want you to create a cs10 directory (i.e. ~/cs10)
- Know how to create a subdirectory under that called lab00 (i.e. ~/cs10/lab00)
- Know how to navigate through subdirectories at the command line--you'll need this to compile and run java code, and to submit your work using the turnin program:
- Using command pwd to show the name of the current directory
- Using command ls to list the files in the current directory
- Using command
cd (by itself) to return to the home directory
- Using command
cd .. (by itself) to return to the parent of the current directory
- Using command
cd foo (by itself) to change into the foo subdirectory of the current directory
- Using these commands to be able to put yourself in the
~/cs10/lab00 directory, or the parent of that directory, or any other directory
- Know how to ssh into the machine called csil.cs.ucsb.edu (This is where you'll use the turnin script to submit your work.)
- A related skill: knowing how to type "hostname" to determine whether you are logged into the Cooper machines, or CSIL in a particular window
- Knowing how to type "exit" to leave the CSIL environment and return to the Cooper Lab environment.
- Be able to explain the difference between the CSIL and Cooper lab computing environments (i.e. that they are both Linux, both show the same set of files in your home directory, but are running the software from different servers).
- Know how to bring up a text editor to create and edit files
- We strongly suggest Emacs
- The vi (or vim or gvim) editor is an acceptable alternative.
- If you are currently using nano or pico, we strongly encourage you to migrate to Emacs (we'll explain why)
- If you already know another editor, you may use that for now, but we encourage you to talk to Prof. Conrad about why learning emacs or vi is a valuable job skill to pick up
- Know how to create a simple HelloWorld.java Java program in a text editor
- Be sure that your program code contains a comment with your name, your umail address, your CSIL account name, and the text "CS10 lab00" somewhere in the comment.
- Although you may want to show off your Java programming skills—and yes, I know that many of you have mad skills far beyond a Hello World program in Java—please don't for this assignment. (You'll get your chance!)
- Just do a simple Hello World program. The one in the textbook is fine---you can just type it in.
- This assignment is mainly a check to be sure that everyone is up-to-speed—and to identify who isn't, so we can help them. Geting super fancy will just make the TA and instructor's job more difficult.
- Know how to compile that program (javac HelloWorld.java producing HelloWorld.class)
- Know how to run the program (java HelloWorld)
- Know how to submit that program via the turnin program
And, if you get all that done, you are finished.
We aren't providing step-by-step directions for all of these things here, but we will be on hand to guide you through each of these steps, and during the lab, we may provide additional links to more instructions. But, to get the details of how to do these things (if you don't already know), you need to come to lab.
Optional: If you have extra time and want to explore BlueJ, you can run it with these Linux commands:
- on the Cooper Lab machines, type: ~pconrad/cs10/cooper/bluej/bluej
- on the CSIL Lab machines, type: ~pconrad/cs10/csil/bluej/bluej
We will be using BlueJ in future weeks, so getting familiar with it now is helpful.
Participating in and completing this lab is worth 100 points.
- 30 points are for showing up and filling in the questions on the worksheet. (You must come in person to be eligble for these 30 points. If you miss the lab at the first scheduled meeting becuase of registraiton/account issues, you can make it up during the second scheduled meeting---04/10 for Friday folks, 04/16 for Thursday folks.)
- 70 points are for succesfully turning in the HelloWorld.java program via "turnin". (You can earn these 80 points by completing the lab outside of the discussion section time, and submitting the program no later than 5pm on 4/15/09.)
End of lab00