Introduction to Computing

Download Report

Transcript Introduction to Computing

COS 111
Computers and Computing
COS 111
Computers and Computing
Course Staff
• Prof.: Jaswinder Pal (J.P.) Singh
• Room 423, Tel: 8-5329, [email protected]
• Office hours: Wednesday 3 – 4 pm
• TA: Nitin Garg (5th year graduate student)
• Room 217, Tel: 8-0451, [email protected]
• Office hours: Tuesday 4:30 pm
• Head Lab TA: Yesim Koman
• [email protected]
• Lab TA schedule to be posted at www.princeton.edu/~ykoman/TA.htm
• Undergraduate Coordinator: Tina McCoy
• Room 410, 8-1746, [email protected]
Me and My Computer
• What is your year, (intended) major?
• Why are you in this class?
• What are you hoping to get out of it?
• When did you first start to use a computer, and what for?
• What do you use a computer for today?
– Do you browse and use the Web regularly?
– Do you have any background in programming or tinkering?
• What are two of the most important uses of computers, other
than your own?
What abilities do you need in a computer?
What are the major changes you’ve
observed in the use of computers?
What are the major changes you’ve
observed in computers themselves?
What are the major changes you expect
to see over the next few years?
What are the major changes you would
most like to see over the next few years?
When Was the Computer Invented?
When Was the Transistor Invented?
When was the Microprocessor Invented?
When Was the Internet Invented?
When Was the World Wide Web Invented?
What is the Difference between the
Internet and the WWW?
A Brief History of Computer Time
• Harvard MK-I and Colossus: 1943
– Colossus designed to crack German coding system
– Vacuum valves as “transistors” and punched cards for storage
• ENIAC: completed 1946 (first generation)
– Weighed 30 tonnes; contained 18,000 electronic valves; consumed 25KW
of power; could do 100,000 calcs/sec
• Transistor: 1947 (second generation)
• Integrated circuit (third generation: minicomputers)
– 1958; first commercial implementation 1963
• Microprocessor (CPU on a chip)
– First commercial in 1971 (Intel 4004)
– 60,000 instructions/sec (supercomputers like Cray 1 were 150M)
• Personal Computer: MITS Altair 8800 in 1974
– Followed by Apple 1 and II, Commodore, and IBM PC (1981)
A Brief History of Internet Time
• ARPANET: DARPA research project started 1969
– First RFC: April 7th, 1969
• Opened to non-military use in 1970s
– Big universities
• Opened to international connections 1972
– Still no email, web etc; just networking and research
• Domain names etc in mid 80s; standardized email
• World Wide Web 1989
– For physicists to share information; usage begins 1991
• Web takes off: Mosaic (1993); Netscape (1994)
Who Invented the Internet?
• Al Gore
•
•
•
•
Kleinrock (packet switching theory: 1961)
Roberts (plan for ARPANET: 1969)
TCP Team: 1974
First virus team: 1980
What is the Role of Computers in
Cosmology and Astrophysics?
What is the Role of Computers in the
Human Genome Project?
Why are You in this Class, and What do
You Hope to Get out of it?
The Following is Not a Test …
Some Questions
• What happens between the time I send an email
and you receive it?
• What happens between the time you submit a URL
to a browser and you see the page returned?
• What happens between the time you submit a
query to a search engine and you get results back?
• Where do the data that a search engine returns
come from?
Some Questions
• How long does it take for a request to go from NY
to San Francisco and back on the Internet?
• How long does it take for light to go from NY to
SF and back?
• What is “market cap?”
Some Questions
•
•
•
•
•
•
•
•
•
•
What is TCP/IP?
What is IP?
What is TCP?
What is HTTP?
What is HTML?
What is SMTP?
What is MP3?
What is JPEG?
What is the size of a 3 minute audio file?
What is the size of a 3 minute video file?
Some Questions
•
•
•
•
•
•
•
•
•
What is Java?
What is C?
What is a compiler?
What is Windows?
What is an operating system?
What is Linux?
What is Unix?
What is the difference between RAM and a hard drive?
What is a cache?
Some Questions
•
•
•
•
•
What is SETI@Home?
What is Napster?
What is Gnutella?
How are Napster and Gnutella similar and different?
What is the legal implication of the difference
between Napster and Gnutella?
Some Questions
• What does “security” mean in the context of
computers?
• What are some key aspects of computer security?
• What is DRM?
Should You be Here?
• COS 111 is intended for students from the humanities and
social sciences who want a one-course introduction to
computers and computer science. Emphasis is on
understanding how computers really work, starting with a
single switch, and showing step by step how to use just
that one kind of part to build the most interesting humanmade machine. Also addressed are algorithms or methods
for solving problems on a computer, programming a
computer, and essential limitations of the computer, such
as undecidability, as well as future prospects for artificial
intelligence and on-line access to the world's knowledge.
The laboratory is complementary to the classroom work
and explores a broad spectrum of modern applications.
So is he only going to ask questions, or
is he going to teach?
?
What Does a Computer Do?
Whatever I tell it to do
• I say: Add 2 and 3 and show me the result
– Computer says: 5
• I say: Multiply that result by 7 and show me the result
– Computer says: 35
• I say: Show me the home page of the Princeton CS
department
– Computer says:
What’s Going On?
The Ghost in the Machine
• Read an input and memorize it
• Read another input and memorize it
• Add the inputs, display and memorize result
• Read input and memorize it
• Multiply input with previous result
and display the result
• Hardware does the work
• Programmer writes a
program for the machine
• Program tells hardware
what to do at each step
What A Program Looks Like
read (a)
read (b)
c = a + b
; Read first input and store it in variable a
read (d)
e = d * c
; Read third input and store it in variable d
print (e)
; Display the value of variable e
; Read second input and store it in variable b
; Add the values of a and b and store the
result in variable c
; Multiply the values of c and d and store the
result in variable e
• The computer takes each of these instructions and executes it
Steps and Layers in Solving a Problem
by Computer
• Problem to solve or service you want to provide
• Methods to solve the problem: Algorithms
• Description of the methods to the computer: Programming
and Languages
• Translating your description into instructions the computer
understands: Compilers
• Performing the instructions: Architecture and Hardware
–
–
–
–
–
–
Execute instructions
Represent and store data
Sequence instructions
Communicate
Take data as input and produce as output
Handle sound, graphics, video, …
Other Aspects We Will Cover
• Manage resources so multiple applications can run
on the computer: Operating Systems
• Special application areas like Graphics, Sound and
Distributed File Sharing
• Hard problems: impossible or very difficult for a
computer to solve in reasonable time
• Security: Taking advantage of hard problems
• Artificial Intelligence
Our Approach
• Take some very simple problems and algorithms, and see
how computer actually runs them
• Then, see how the simple algorithms are written as
programs in programming languages, and compiled so the
computer can understand them
• Then, examine more sophisticated and interesting
algorithms, and how to compare and analyze different
algorithms for solving a problem
Throughout, illustrate some key concepts like abstraction,
hierarchy and recursion
• Then, talk about some of the other areas
Rest of the Course
• Introduction to Computing (2 classes, including this one)
• Hardware: Building a computer (6 classes)
• Programming and Languages (2 classes)
• Midterm review and Midterm (2 classes)
• SPRING BREAK
• Operating Systems and Networking (2 classes)
• Algorithms (2 classes)
• Sound and Graphics (2 classes)
• Distributed Applications (1 class)
• Limitations of Computing; hard problems and security (2 classes)
• Artificial Intelligence (1 class)
• Review (1 class)
Practical Details
• Lectures Monday and Wednesday 1:30-2:50 p.m.
– Lecture slides will be online
– Class participation expected AND GRADED
• Labs
–
–
–
–
Start week of 2/7, due by Friday at 5PM
Tues, Wed, Thurs: 7:30 to 10:30 pm; room TBD
Can do in lab sessions or elsewhere
Lab TA schedule and contact info to be posted at
www.princeton.edu/~ykoman/TA.htm by end of week
• Problem Sets
– Handed out Mondays, due Wednesdays at 5 pm (9 days later)
YOU ARE RESPONSIBLE FOR MONITORING THE WEB SITE
AND THE MAILING LIST FOR ANNOUNCEMENTS. WE
WILL NOT PROACTIVELY NOTIFY YOU OF ANYTHING.
Practical Details
• Paperless course
– All assignments, lecture notes on web
• Go to http://www.cs.princeton.edu
• Click on fall courses
• Click on COS 111
• Mailing list for communication with students (and TA)
– Sign up at https://lists.cs.princeton.edu/mailman/listinfo/cos111 a.s.a.p.
• Problem sets
– Lowest score dropped
– Must do 7 of 9 to pass the course
• Labs
– Must complete all labs to pass the course
• Midterm and Final
Grading Basis
• Problem sets 20%
• Lab reports 10%
• Midterm exam 25%
• Final exam 25%
• Class Participation 20%