CPS Welcome! Principles of Computer Science CPS 1 LSRC B101 M, W, F 1:10-2:00 Professor Dietolf (Dee) Ramm
CPS Today’s topics l What is this course about? l How are we going to learn that? l Who is this guy talking to us? l Where do we from here? l An overview of computer science l Upcoming ä The World Wide Web and HTML ä Problem Solving
CPS Course Information l Grading Breakdown l Scores on absolute scale l No make-ups, no late submissions l Important Dates ä Midterm 10/1 ä Final 12/13 2pm-5 ! ! ! ! ä Wednesday Quizzes l Let me know ASAP if you have any concerns “A survey of the great ideas of computer science along with experience with programming, the theoretical foundations of computer science, how computer systems are organized and work, and the applications of computers including their effect on society.” AssessmentWeight (approx) Labs10% Lab Final5% In-class5% Quiz/Assign23% Project17% Midterm15% Final25%
CPS Administrivia l Read Blackboard web page regularly l Read discussion forums l Reading posted on Blackboard page due by Friday class time l Labs start on Monday, September 1 (Labor Day) l Collaboration policy l Late policy
CPS Frequently Asked Questions l What is the prerequisite? ä High school algebra (?) l How does this course fit into the curriculum? ä A survey, service course designed for non-majors ä CPS 6 is more programming oriented ä Satisfies QID (M) and STS requirements l Why take this course? ä Computers are interesting, useful, and ubiquitous ä Pure entertainment l Why doesn’t this course teach anything practical ?
CPS On the subject of questions… l Did you ask any good questions today? ä Ideas and Information by Nobel prize winning physicist Arno Penzias ä Questions which illuminate help nourish ideas ä Children are born curious ä Fear of public displays of ignorance prevents learning l Participate in class l Go to office hours l Make study groups with your classmates
CPS Getting help l Contact Information ä Phone: ä Office Hours in D226 Levine Science Research Center Wed 10:00-11:00, Thu 2:30-3:30 When my door is open By appointment l TAs Grad TA: Vijeta Johri ( ) Office hours TBA D328 LSRC, ä Head UTA: tba l And a whole gang of UTAs
CPS Who are you? l Class ä Frosh / Soph / Jun / Sen / Other l Major ä Fuzzy / Techie / Undecided l Box at home? ä Mac / PC / Linux / Other l Programmed before ä Never / HTML / Javascript / Java / C / C++ / Lisp / Other
CPS Stories l Who is Marc Andreessen and what did he do (21 years old)? l Who is Claude Shannon and what did he do (21 years old)? l Who is Linus Torvalds and what did he do (21 years old)? l Who is Steve Jobs and what did he do (21 years old)? l Who is Ada Byron and did she do (27 years old)? l Who is Jim Ellis and what did he do (23 years old)? l Who is Alan Biermann and what did he do (51 years old)? Other names: Alan Turing, Edsger Dijkstra,... (more?)
CPS Precise, logical thinking l Breaking down a task into unambiguous steps l Computers are deterministic l Algorithm: a set of steps that defines how a task is performed l Debugging ä Programs will rarely work the first time one writes them ä Systematic approach to detecting, diagnosing, and fixing errors ä Debugging skills are useful in many parts of life
CPS Creating a Program l Specify the problem ä remove ambiguities ä identify constraints l Develop algorithms, design classes, design software architecture l Implement program ä revisit design ä test, code, debug ä revisit design l Documentation, testing, maintenance of program l A programming language is a way to describe an algorithm.
CPS The Ice Cream Story "This is the second time I have written you, and I don't blame you for not answering me, because I kind of sounded crazy, but it is a fact that we have a tradition in our family of ice cream for dessert after dinner each night. But the kind of ice cream varies so, every night, after we've eaten, the whole family votes on which kind of ice cream we should have and Drive down to the store to get it. It's also a fact that I recently purchased a new car and since then my trips to the store have created a problem. You see, every time I buy vanilla ice cream, when I start back from the store my car won't start. If I get any other kind of ice cream, the car starts just fine. I want you to know I'm serious about this question, no matter how silly it sounds: 'What is there about your car that makes it not start when I get vanilla ice cream,and easy to start whenever get any other kind?'"
CPS Quotations about Computer Science "Computer science has such intimate relations with so many other subjects that it is hard to see it as a thing unto itself“ - Marvin Minsky, 1979 "It has often been said that a person does not really understand something until he teaches it to someone else“ - Donald Knuth "Actually, a person does not really understand something until he can teach it to a computer" - Judith Gal-Ezer and David Harel
CPS Algorithms as Cornerstone of CS l Step-by-step process that solves a problem ä more precise than a recipe ä eventually stops with an answer ä general process rather than specific to a computer or to a programming language l Searching: for phone number of G. Samsa, whose number is , or for the person whose number is ä Are these searches different? l If the phone book has 8 million numbers in it (why are there only 7.9 million phone numbers with area code 212?) ä How many queries to find phone number of G. Samsa? ä How many queries to find person with number ä What about IP addresses?
CPS Sorting Experiment: why do we sort? l Groups of four people are given a bag containing strips of paper ä on each piece of paper is an 8-15 letter English word ä create a sorted list of all the words in the bag ä there are 100 words in a bag l What issues arise in developing an algorithm for this sort? ä l Can you write a description of an algorithm for others to follow? ä Do you need a support line for your algorithm? ä Are you confident your algorithm works?
CPS Layers of abstraction Applications Programming Languages Operating Systems Machine Architecture Circuits Physics The User: The Result:
CPS Survey the field l Artificial intelligence l Graphics/Multimedia l Parallel Computation l Programming Languages l Systems l Scientific Computing l Theory l User Interfaces
CPS Themes and Concepts of CS l Theory ä properties of algorithms, how fast, how much memory ä average case, worst case: sorting cards, words, exams ä provable properties, in a mathematical sense l Language ä programming languages: C++, Java, C, Perl, Fortran, Lisp, Scheme, Visual BASIC, ML,... ä Assembly language, machine language, ä Natural language such as English l Architecture ä Main memory, cache memory, disk, USB, SCSI,... ä pipeline, multi-processor
CPS What’s more difficult 1. Sketch artist vs. Your dog? ä Generating a face ä Recognizing a face 2. Vacation planner vs. Super-librarian? ä Finding the best route through cities ä Alphabetize the books in the Library of Congress l Fundamental ideas of computer science ä Complexity ä Computability
CPS Complexity: What’s hard, what’s easy? l What is a prime number? ä 2, 3, 5, 7, 11, 13, … ä Largest prime? l l How do we determine if these numbers are prime? ä Test 3, 5, 7, … ä If we can test one million numbers a second, how long to check a 100 digit #? l Why do we care? is not prime, I can prove it but I can’t give you the factors. l Finding factors is “hard”, determining primality is “easy” ä What does this mean? ä Why do we care? l Encryption depends on this relationship, without encryption and secure web transactions where would we be?
CPS Questions you will be able to answer l Vendor tries to sell you a system that will check all of your systems and procedures to see if they are correct. ä A good deal? l Programmer tells you that to optimize the routing of your sales personnel is beyond the power of today's computers. ä Do you believe her? l Computer consultant demonstrates complicated management system with test data including a handful of employees. ä Is the performance with this small set of data a good indicator of how the system will perform with all of your company data entered?
CPS What is a computer? l Turing machine: invented by Alan Turing in 1936 as a theoretical model infinite tape, moving tape-reader 0 1 Mainframe, PC,laptop, supercomputer A computer is a computer, is a computer, Church-Turing Thesis, all have same “power”
CPS Chips, Central Processing Unit (CPU) l CPU chips/Microprocessors ä Pentium (top) ä G3/4 (bottom) ä Sound, video, … l Moore’s Law ä chip “size” (# transistors) doubles every months (formulated in 1965) ä 2,300 transistors Intel 4004, 42 million Pentium 4
CPS Assignment 0 ä Due in your first lab l What would life be like without computers? l Pick one 24 hour period over the next week 1. Write down ALL interactions you have with a computer 2. What would change in your life if all computers stopped working? ä Come up with clean computer science related joke l First question you should be asking is: What is a computer? ä