[Skip Navigation] [CSUSB] / [CNS] / [Comp Sci & Eng Dept] / [R J Botting] / [CSci201] / index
[Text Version] [Syllabus] [Schedule] [Glossary] [Labs] [Projects] [Resources] [Grading] [Contact] [Search ]
Notes: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]
Labs: [01] [02] [03] [04] [05] [06] [07] [08] [09] [10]
Fri Feb 5 11:52:53 PST 2010

Contents


    CS201 Laboratory 1 -- Introducing the Lab Computers and UNIX

      Next [ ../lab02/ ]

      Welcome

      Welcome to the CS201 Laboratory. The room, the computers, and the operating system are all state-of-the-art for a university computer science department. We try to maintain world class hardware and software. So we use Linux.

      Goal

      In this laboratory it will be enough to have logged in, changed your password, found the browser, and used it to find and explore the course web site and syllabus. You should bookmark the course web page. Finally, log out. This will earn an A for the lab.

      Warning -- This is the easiest lab we will do.

      Future labs will involve thinking, creativity, testing ideas, fixing errors, and constructing new software. You should find this challenging -- even after 60 years work, computer science has not found an easy way to develop software.

      In this lab, when everything works as plan we can all leave early. However, it can take the full 200 minutes to do this.

      Read Me First

      The first rule is to leave our computers running! It takes time to reboot. During your first quarter if you think you need to reboot -- ask the lab teacher or the help desk next door.

      Read Me Next

      At the start the teacher will show you how to get started -- take notes.

      Logging in

      Your should have a blue screen with a box for your "user-name", otherwise call over your teacher.

      In the menu bar, select Session->Gnome

      Input your user name(this should be the same as your campus Email id) in the box provided and click the OK button.

      You should get a window to input your password. This will be announced in the lab. (It is not secure and you should change it SOON). Click the OK button

      Wait for the operating system to start up.

      Changing your password

      Follow these menus: "System" -> Preferences -> Personal -> About Me. This should open up a window with a "Change Password..." button. Click, supply your current password and then a new secure password (twice)...

      In a terminal window (access from a remote machine) you input

       		passwd your_user_name
      then supply you old password and tap return. Then enter your new password twice tapping return each time.

      Starting a Browser

      Click the icon that shows an orange "firefox" embracing the world.... of look under Applications -> Internet -> Firefox. Wait for it to start running....

      Find the lab instructions for this lab

      Type the following location
       	http://cse.csusb.edu/dick/cs201/lab01/
      into the location box and tap the "Enter" Key to go to the web site for this lab session.

      Find the web page for the class

      Click the "button" [Index] on the second line of the lab page.

      Notice that it lists events that have happened in the CS201 class. I post changes and new information every week.

      Once found you should bookmark it for the future.

      Find the syllabus and Open it

      The link to the syllabus is at the top of the "CS201 page".

      We covered this in class. You can print it out if you want a copy.

      Then go "Back" to the course web page.

      Find the study guide for the next class

      Look for the "button" [02] on the second or third line labeled "Notes:". Select it.... it tells you what to study...

      Grade = B

      If you account is OK and you get this far you have earned a B.

      You can now experiment further with our systems and with the programs you have downloaded. There are many interesting things to discover!

      1. Right click this link [ hello.cpp ] and Save as "hello.cpp".
      2. You will need a terminal window...
      3. Input into the terminal window the following to see what is in the file.
         		cat hello.cpp
      4. To compile type the command line into the terminal window
         	g++ -o hello hello.cpp
        This compiles the program.
      5. Input the command line
         	./hello
      6. To run the program.
      7. Hold down the "Ctrl" key and tap the letter "D" to close the terminal.

      The first readings in the book explain some of the mumbo-jumbo above.
      Table
      CommandPurpose
      catOutput file to the terminal
      g++Run the Gnu C++ compiler to make an executable program
      ./programRun program in current directory "."

      (Close Table)

      Get Credit Grade = A

      If you get this far before the end of the lab session you have earned an A. Tell me something you learned to get credit.

      Spare time

      The "Start" Menu has a large number of things -- and all of them are safe to use. You can also access stuff on the WWW -- including your Email.

      You should spend time exploring...

      Logging Out

      NEVER leave a machine without logging out. Horrible things can be done to your work and reputation if others pretend to be you when you leave without logging out.

      Use a right click on the desk top... and then select the System -> Logout menu...

      Now you can leave.

      About our Laboratories

      We try to maintain world class hardware and software. So we use Linux. This is the most popular university operating system. It is starting to be adopted by professionals in large and small companies world wide for the following reasons:
      1. Price: It is free.
      2. Cost: It is easy to maintain and update.
      3. Security: It has evolved to resist the viruses, back doors, and Trojan horses found in Microsoft products.
      4. Privacy: It has a simple privacy scheme that hides your files from other users (but not the system administrators).
      5. Open: It was created by an international group of expert developers. We can join this group to fix problems.
      6. Powerful: It is designed by programmers, for programmers, to be is used by programmers.
      7. Customizable: Before and after you log in there are dozens of options
      8. Applications: There are hundreds of programs you can use -- most of them designed by and for professional programmers.
      9. Internet-Based: Linux is based on the Internet. A window on your machine can be connected to any computer in the world.

    . . . . . . . . . ( end of section CS201 Laboratory 1 -- UNIX and X Windows) <<Contents | End>>

    Abbreviations

  1. Algorithm::=A precise description of a series of steps to attain a goal, [ Algorithm ] (Wikipedia).
  2. Class::=A description of a type of object that includes data it knows and the functions that can change it.
  3. Function::programming=A selfcontained and named piece of program that knows how to do something.
  4. Gnu::="Gnu's Not Unix", a long running open source project that supplies a very popular and free C++ compiler.
  5. OOP::="Object-Oriented Programming", Current paradigm for programming.
  6. Semantics::=Rules determining the meaning of correct statements in a language.
  7. SP::="Structured Programming", a previous paradigm for programming.
  8. Syntax::=The rules determining the correctness and structure of statements in a language, grammar.
  9. Q::software="A program I wrote to make software easier to develop",
  10. TBA::="To Be Announced", something I should do.
  11. TBD::="To Be Done", something you have to do.
  12. UML::="Unified Modeling Language", industry standard design and documentation diagrams.
  13. void::C++Keyword="Indicates a function that has no return".

End