(Latest Revision: 09/13/2004)
Week 02 Notes for CS 1500 -- Fall 2004
- Take Roll
- Announcement(s)
- Tutoring available
- Don't be confused by reading Andersen. On our Sun Ultra System, you
need to use the command "nispasswd" to change your password. The
"passwd" command will not do the trick on our system. Nispasswd is
required to distribute the information around to all the Sun
Ultra's.
- Pass out remaining accounts.
- Take care of Add/Drop??
- Partners Assignments: Students may make swaps if they notify me by
e-mail.
(I make arbitrary initial assignments. If you want to change
partners you and the other parties involved must take care of all the
"divorcing" and "remarrying" required so that everyone has a partner.
Then you must let me know by e-mail what the new partner assignments
are.)
- Passwords:
- You can look at your little Unix book by Andersen to get help on
choosing a password.
- You should make up a new password and have it all ready
before we start lab next week.
- Lecture topic: What should have been the outcome of the Hello
World! assignment?
- Pass out replicas of e-mail Professor received
- Figure out what is correct
- Discuss what the parts of the program do.
- Lecture topic: Look at some Examples of C++ programs
- Lecture topic: Class must learn to work on Suns
- The Suns provide a standard environment and a level playing field
for the whole class -- everybody learns the same system --
everybody's questions apply to everybody else -- we all go forward
together.
- The Suns are equally accessible to all members of the class
- The Suns are accessible via telnet 24 hours a day, seven days a week
to all members of the class -- you can telnet from home or from
another computer lab on campus.
- It's good preparation for the future to learn how to get along on
Sun's: You get exposure to advanced operating system features.
Leading employers in computing-related fields usually value Unix
knowledge highly.
- Lecture topic: Each Sun is equivalent to the others.
- About Compiling:
- Computers have their machine language
- Each micro-processor has its own machine language.
- In general a different language for each chip, although
typically designers make sure that the newer version of a chip
model will run all the instructions of the earlier model.
- The machine language instructions do *really simple* things.
It takes a great many of them to do anything of "much
consequence."
- High level languages solve the problem (well, to a degree).
High level languages do a lot more with each instruction, and
they are portable too. Portable programs are a big plus.
- Computers need support, or they cannot run high level languages. A
computer that could execute C++ instructions natively would be
prohibitively expensive.
- The computer needs a compiler or interpreter -- a program that
translates high level programs into machine language programs.
- Since the machine languages of computers vary, different
computers need particular compilers designed to produce their
native language.
- We create a C++ program called hello.cpp with a character-file
editor. Word processors don't tend to work well for this
purpose because the files they output are formatted with
special codes that the compilers and interpreters are not
designed to understand. Also, editors for programs tend to
include features that are helpful to programmers, such as
auto-indent, and integration with compilation. Word processors
don't do that. The g++ command translates hello.cpp into
a.out. g++ is the name of the compiler. If we do "which g++"
or "whereis g++", we can see where the g++ program is in the
system. The translated program is called "a.out". We type its
name to run the program.
- Look at the assignment of Solo Prog #1 and discuss elements we need to
build solution -- how do we make function calls and declare functions?
Where are the examples in the text that will guide us? The example on
pages 37-38 should serve well.
- Show students how to do compilation of a program with JOVE.
- Note that using JOVE as above makes debugging go easier.
-