1 / 115

1321

1321. CS. CS1321: Introduction to Programming. Georgia Institute of Technology College of Computing Lecture 1 Aug. 21, 2001 Fall Semester. Who I am. Who: Monica Sweat Email: sweat@cc.gatech.edu (use cs1321 in the subject line) (avoid sending me html-formatted email!)

mjent
Télécharger la présentation

1321

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 1321 CS

  2. CS1321:Introduction to Programming Georgia Institute of Technology College of Computing Lecture 1 Aug. 21, 2001 Fall Semester

  3. Who I am Who: Monica Sweat Email:sweat@cc.gatech.edu (use cs1321 in the subject line) (avoid sending me html-formatted email!) Office: Room 120, College of Computing. Course: http://www.cc.gatech.edu/classes/AY2002/cs1321 My website: http://www.cc.gatech.edu/~sweat Office hours: TBA

  4. University Vocabulary • Lecture: Typically led by Professor or Lecturer. Sometimes big. • Lab: Formerly held in equipped laboratory. Now hands on labs are done on your own. • Recitation: Typically led by Teaching Assistant (TA). Smaller group. Questions and answers.

  5. Basic Schedule Lecture: Tues & Thurs (~1.5 hours each) You MUST go to the section you’ve signed up for; For example, the homeworks might vary from section to section. Recitation: One night/week 6:00 p.m. to 8:00 p.m.

  6. Resources • Book & DrScheme Website • How To Design Programs • Felleisen, Findler, Flatt, Krishnamurthi • http://www.htdp.org • Class Web Site • http://www.cc.gatech.edu/AY2002/CS1321 • Lecture slides • Examples • On-line Lab Manual • And much more

  7. Resources • Newsgroups – required reading! • My Web Site • http://www.cc.gatech.edu/~sweat • Lecture slides • Examples • And much more • Again, DrScheme Web Site http://www.htdp.org

  8. Course Text How to Design Programs Matthias Felleisen Robert Bruce Findler Matthew Flatt Shriram Krishnamurthi ISBN 0-262-06218-6 Online copy available at: http://www.htdp.org

  9. Help • Follow the following sequence of people • TA (or newsgroup) • Senior TA (STA) – your TA's supervisor • Instructor/Program Manager

  10. Graded items • Tests – given during recitation, dates TBA • Final exam – consult OSCAR for estimated date & time, but subject to change! • Homework – many. 2-day and 5 day turnaround. Basically assigned one lecture, due the next. • “Lab” - Weekly; often simple. Note: Done on your own – the name “lab” is a misnomer and is misleading.

  11. Course Grading Breakdown Evaluation: (no curve) Test: 33% Hw: 20% Lab: 15% Final: 30% BB: 2%

  12. Some Tips For many students this will be your first exposure to Computer Science (unlike Math, Chemistry, etc.)

  13. Tip #1 Don’t wait until the last minute to get help

  14. Tip #2 Hey, can I still pass if I can get enough partial credit? Bad things happen while learning a new skill. You will probably crash and burn on some programs. Start early; give yourself time for mistakes.

  15. Tip #3 Don’t be too ambitious with your course load. You CANNOT slack off in this class, even for a few days.

  16. Tip #4 Watch out for the “big picture”. Don’t forget this is a programming course, not a Scheme course. It’s dangerous to hide from the programming part of the course. You may be crushed on the final.

  17. Today’s Menu 0. What is Computer Science? 1. What is an Algorithm? 2. Why Study Computer Science? 3. Which Computer Language? 4. Why Scheme? 5. Course Mechanics 6. On to Scheme

  18. 0. What is Computer Science?

  19. Software The Computer Itself Mathematical Theory Many possible answers... languages hardware algorithms … from different perspectives

  20. Definitions “Computer science is the study of what computers do.”

  21. Rather Dry Definition Computer science, today more accurately a separate discipline, considers a number of rather mathematical topics. In addition to computability questions arising from many problems in discrete mathematics, and logic questions related to recursion theory, one must consider scheduling questions, stochastic models, and so on. Computer Science is no more about computers than astronomy is about telescopes.

  22. Definitions "Computer Science is, simply put, the study of computation. The study of anything that lends itself to a computational model is a study in Computer Science."

  23. Definitions “Computer science revolves around computational processes, which are also called information processes or simply processes. A process is a dynamic succession of events—a happening.”

  24. Process—What? ? So we define ‘CS’ based on a study of computational processes--- What’s a process?

  25. A Definition Through Indirection Another way of describing a process is "a procedure in execution." A procedure is a collection of instructions, that results in some useful behavior on behalf of the device that executes the instruction. When expressed in a symbolic language, the procedure is called a computer program. What's a procedure?

  26. 1. What is an Algorithm?

  27. Algorithms • An algorithm is a precise method of solving a problem • A given problem may be solvable by a number of different algorithms • An algorithm will typically use levels of abstraction to make the solution clearer and implementation easier.

  28. Once upon a time Many years ago programmers realized that programming a complex task would be simpler if they could break the big job down into pieces

  29. Once upon a time This was the birth of modular programming where big programs get broken down into smaller pieces called modules, methods, subroutines, procedures or functions.

  30. Abstraction Breaking down a problem into components that finally just do one thing is called abstraction.

  31. Algorithms & Abstraction • A key feature of a well written algorithm will be proper use of abstraction • This will provide an algorithm that • is more understandable • is easier to implement and test • provides more reusable modules • will get a higher grade! A

  32. 2. Why Study Computer Science?

  33. Truth: Computer science should be at the core of a liberal arts education. The essence of computer programming: Describing adequately the process to be used to perform some task is an essential skill in all professions Myth: Computer science is for techno geeks who want to drive expensive luxury imports.

  34. Imagine Taking a class about bicycling And never getting on a bike! So we propose to you, to spend some cycles learning about computer programming Will you be ready for the Tour de France?

  35. The Inevitable... If we propose to study CS, we need the convenience of a symbolic language to express and communicate our instructions. Hence, we’ll use a computer language to learn about processes and procedures.

  36. 3. Which Computer Language?

  37. A# ABC ABEL ABCL ACCENT ACTOR ADA ADL AGORA AKL ALEF ALEPH ALF ALGOL ALLOY AMBER AMIGA E AML AMPL appall AVAIL AWK B BABEL BASIC BAWK BeBOP BEFUNGE BETA BEGL BERTRAND BIGWIG BISTRO BLISS BLUE BRIAN BRILLIANT BSL C C++ C# C* C (GNU CECIL CHARITY CHEETAH CHiLL CILK CLAIRE CLARITY CLEAN CLIPS CLOS CLU COBOL COLD FUSION COMAL COMMON LISP COOL COMPONENT PASCAL CORAL COQ CORBA COSY CWEB DAD DARK BASIC DELPHI DEMETER DIALECT DRAGOON DYLAN DYNACE E ECLIPSE Eiffel EGG ELF ELASTIC C ELLIE EMERALD ENIAC ERLANG ESCHER EuLISP EUPHORIA FRANZ LISP FMPL FORMS/3 FORTH FORTRAN G GEL GENTLE GNU E G+DEL GREEN GUILE HASKELL HOPE HPCODE HUGO ICI ICON INFER ISWIM J JADE JAVA JAVA BEANS JAVASCRIPT JoCAML JOY JUICE K KALEIDOSCOPE KEVO LAGOONA LAMINA LAURE LEDA LENS LIANA LIFE LIMBO LINDA LIS LISP LML LOGO LOOEE LOOKS LORE LPC LUA LUSTRE M4 MAGENTA MAGMA MATCHMAKER MATLAB MCPL MELD MELD C MENTAT MERCURY MEROON MIRANDA MISA ML MODULA 2 MODULA 3 MOPS MOZART MUMPS NAPIER 88 NAWK NEON NESL NET REXX NEWTON NIAL O2 OAKLISP OBERON OBJ OBJECTIVE C OBJECTIVE CAML OBJECT OBLIQ OCCAM OCTAVE OLABL OMEGA ONTIC OPAL ORCA OSCAR OSQL OZ PAL PARASOL PARLOG++ PASCAL PERL PECOS PFL PHOCUS PHANTOM PHP PICO PICT PIKE PILE PIRANHA PIRL PIZZA PL/B PL/I PLANKALKUL PLAIN PLIANT POLKA POLYGOTH PRESTO PROGRESS POOL POP POPTALK POSTSCRIPT POWERBUILDER PROBE PROFAN PROGRAPH PROLOG PROMETHEUS PROTEUS PY PYTHON Q QUEST R REBOL REFINE REGINA RELFUN REXX RPG RUBY S SAS SATHER SCALLOP SCHEME SCREAMER SCRIPT X SED SEL SELF SEQUENCE L SEPIA SIMULA SINA SIRI SISAL SMALLTALK SMSL SNAML SNOBOL SNOOPS SPANNER SQUEAK SQL SR SUNEIDO T3X Tcl/TK TECO TELESCRIPT TELOS TEMPO THETA TOM TOP TRAITS TRELLIS TURBO PASCAL TURING TYCOON UFO UNLAMBDA V VIRT VISUAL BASIC VISUAL BASICSCRIPT VISUAL C++ WINDUCTOR WINTERP WOOL XLISP XML YAFL YERK YORICK Z ZPL ZUSE XSCHEME Flavors Assembler, C, C++, Fortran, Java, Scheme, Lisp

  38. ? What’s the purpose of a computer language?

  39. Consider To understand why there are so many computer languages, we might also consider why there are many spoken languages. Exactly how many spoken languages are there?

  40. Why do people speak different languages? What is the purpose of a human language? Consider: Total Living Languages Percentage The Americas 1,000 15% Africa 2,011 30% Europe 225 3% Asia 2,165 32% The Pacific 1,302 19% ------ TOTAL 6,703 Source: www.sil.org/ethnologue

  41. Insight We have so many spoken languages because there are so many cultures and contexts for societies. Similarly, there are many different computer languages because they each come from unique contexts, and address different types of problems and needs.

  42. Asked Another Way Why are there so many computer languages? (Why not create one “perfect” computer language?) For whom does one write programs in a language? (Why not write them in 1s and 0s?) ?

  43. Typically Different types of problems lead to different approaches with computer languages • Scientific computation - Fortran • List processing - Lisp • Business programming - Cobol • Systems programming - C • Old CS education favorite – Pascal • Object-Oriented programming – C++ • OOP that’s good for running over internet - Java

  44. Computer Languages Computer languages have two related purposes: efficiently provide instructions to machines that execute programs and procedures provide a clear written record of the theory or idea expressed in the procedure 1. Computer consumption 2. Human consumption

  45. Computer Languages We could program in 1s and 0s (machine language), but will instead employ a high-level language. We’re using a language called Scheme, plus introducing some basic software tools (Matlab, Excel, HTML, etc.) But note that: -- what you learn is not restricted to the language -- ideas expressed in the language can be expressed in other languages

  46. Revelation We are therefore writing programs in Scheme (and not 1’s and 0’s that the computers prefer) because. . . ... we want other people to understand our ideas and programs. In other words, computer languages are used to communicate with OTHER PEOPLE(as well as computers).

  47. Note! This is not a class in Scheme programming This is a class about computation and problemsolving. It’s just handy to actually use a programming language while we study the subject at hand – programming and problem solving. Scheme is "incidental but essential" to the course subject. We’re more concerned about programming.

  48. 4. Why Scheme?

  49. Scheme? • The choice of Scheme for beginners is natural. • Permits programmers to focus on two key elements of programming: • Programs as relations between quantities • Evaluating programs for specific inputs. • Using just this core language, students can develop complete programs during the first session with a teacher.

  50. Scheme? The choice of Scheme for beginners is natural. Easily arranged as a tower of language levels. As students learn more about programming and the language, the teacher can expose students to richer layers of the language, which allows students to write more interesting and more concise programs.

More Related