Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 1: Welcome and overview.

Slides:



Advertisements
Similar presentations
Computer Software 3 Section A Software Basics CHAPTER PARSONS/OJA
Advertisements

ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Lecture 1: Overview of Computers & Programming
Welcome to CMPE003 Personal Computer Concepts: Hardware and Software Winter 2003 UC Santa Cruz Instructor: Guy Cox.
1 CS 106, Winter 2009 Class 4, Section 4 Slides by: Dr. Cynthia A. Brown, Instructor section 4: Dr. Herbert G. Mayer,
16/13/2015 3:30 AM6/13/2015 3:30 AM6/13/2015 3:30 AMIntroduction to Software Development What is a computer? A computer system contains: Central Processing.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu.
16 March, 2000 CS1001 Lecture 1 Introduction - Syllabus History of Computers Computer Components.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 1: Welcome & overview.
Introduction to C++ Programming CS 117 Section 2 and KNET Sections Spring 2001 MWF 1:40-2:30.
Chair of Software Engineering Updated: 04 April 2006 Lecture 1: Course overview and introduction Concurrent Object-Oriented Programming Bertrand Meyer,
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Lecture 1: Introduction.
SM3121 Software Technology Mark Green School of Creative Media.
Computers They're Not Magic! (for the most part)‏ Adapted from Ryan Moore.
Computer Software.
Introduction to Computers and Programming
COMPUTER SOFTWARE Chapter 3. Software & Hardware? Computer Instructions or data, anything that can be stored electronically is Software. Hardware is one.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
CS102 Introduction to Computer Programming
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510, Section 2.
CS110/CS119 Introduction to Computing (Java)
CSE 1340 Introduction to Computing Concepts Class 2.
I NTRODUCTION TO P ROGRAMMING Lecture No. 1 and 2 Combined Lahore Leads University 21 st October 2013.
1 COMPSCI 110 Operating Systems Who - Introductions How - Policies and Administrative Details Why - Objectives and Expectations What - Our Topic: Operating.
INTRODUCTION TO COMPUTING
The Study of Computer Science Chapter 0 Intro to Computer Science CS1510.
Welcome to CSIS10A Computer Science: Beginning Programming Please, take a syllabus.
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
CS 444 Introduction to Operating Systems
1 8/29/05CS150 Introduction to Computer Science 1 Professor: Shereen Khoja
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Lucas Bang Lecture 1: Introduction.
CS 390 Unix Programming Summer Unix Programming - CS 3902 Course Details Online Information Please check.
Welcome to CS 115! Introduction to Programming. Class URL Write this down!
COP3502: Introduction to Computer Science Yashas Shankar.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Fundamental Programming: Fundamental Programming K.Chinnasarn, Ph.D.
Robert Crawford, MBA West Middle School.  Explain how the binary system is used by computers.  Describe how software is written and translated  Summarize.
Principles of Computer Science I Honors Section Note Set 1 CSE 1341 – H 1.
Module 2 : Part 1 INTRODUCTION TO HARDWARE & SOFTWARE INTRODUCTION TO HARDWARE & SOFTWARE.
Syllabus Highlights CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Kuliah 4 Pengantar Teknologi Informasi Oleh Coky Fauzi Alfi cokyfauzialfi.wordpress.com Software.
MIS 105 LECTURE 1 INTRODUCTION TO COMPUTER HARDWARE CHAPTER REFERENCE- CHP. 1.
Syllabus Highlights CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 1 Introduction to Computers and Programming.
# 1 Introduction & Operating Systems Introduction & Operating Systems What is a computer ? What is an operating system? What is a GUI? What is cheating?
HOW A COMPUTER PROCESSES DATA. What is hardware? Hardware is the electric, electronic and mechanical equipment that makes up a computer What is software?
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
The Hashemite University Computer Engineering Department
Syllabus Highlights CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
PRESENTED BY : Dr. Sarah M.Eljack 8/31/ The course codeThe course nameCredit hours COMP413Computer graphics3 The course contents (lectures + exercises)
Introduction Computer Organization Spring 1436/37H (2015/16G) Dr. Mohammed Sinky Computer Architecture
ITP 109 Week 2 Trina Gregory Introduction to Java.
Computer Operating Systems And Software applications.
B.A. (Mahayana Studies) Introduction to Computer Science November March Preliminaries Some background information for this course.
Discovering Computers 2008 Fundamentals Fourth Edition Discovering Computers 2008 Fundamentals Fourth Edition Chapter 1 Introduction to Computers.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Introduction to Operating Systems Concepts
Computer Engineering Department Islamic University of Gaza
Computer Fundamentals 1
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Java programming lecture one
CS190/295 Programming in Python for Life Sciences: Lecture 1
Instructor: Xiuwen Liu Department of Computer Science
The Study of Computer Science Chapter 0
ICS103 Programming in C 1: Overview of Computers And Programming
Presentation transcript:

Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 1: Welcome and overview

2 Sprache für diese Vorlesung Das ist die erste deutsche Folie dieser Vorlesung Das war die letzte deutsche Folie dieser Vorlesung Wer singt und tanzt in dieser Video?  1. Paris Hilton?  2. Céline Dion?  3. Micheline Calmy-Rey?  4. Samuel Schmid?

3 Language Languages spoken by assistants:  German (several varieties)  English  Italian  Romanian  Russian  … Exercise sessions (Übungsgruppen) are available in German (5) and English (4).

4 Goals of the course After successfully taking this course, you will:  Know the key concepts of programming  Be able to tackle many different programming problems, including in new areas  Understand basic hardware and software tools  Master a programming language: Eiffel  Know basic concepts of design, implementation and maintenance of software systems (“software engineering”).

5 Schedule Lectures:  Monday, 13:15 – 15:00, HG E3  Tuesday, 8:15 – 10:00, HG F1 Exercise sessions:  8 groups Monday, 15:15 – 16:00, various rooms Tuesday, 13:15 – 15:00, various rooms

6 The assistant team Marco Piccioni (head) Conrado Plano Andreas Leitner Michela Pedroni (back-office) Yi Wei (Jason) Benjamin Morandi Wolfgang Schwedler Hermann Lehner (quality assurance) Ilinca Ciupa Ivo Colombo Nadia Polikarpova

7 Exercise groups We have made up the exercise groups Your group is based on your last name: A-Bro: Nygaard (Ilinca) Bru–Fan: Goldberg (Conrado) Fav–Guz: Knuth (Marco) Ham–Käs: Torvalds (Ivo) Kat–Lon: Dijkstra (Benjamin) Lor-Ngu: Lovelace (Wolfgang) Noe–Sche: Liskov (Jason) Schi–Tad: Hoare (Nadia) Tan-Z: Wirth (Andreas) If you have a good reason to change, e.g. a language problem, ask Hermann Leitner

8 Kristen Nygaard group: Ilinca Ciupa Office: RZ J4 Phone: Language: English Room:  Monday: ML J37.1  Tuesday: ETZ E9 Mailing list: A-Bro

9 Adele Goldberg group: Conrado Plano Language: German Rooms:  Monday: ML F39  Tuesday: LEC C18 Mailing list: Bru-Fan

10 Donald Knuth group: Marco Piccioni Language: English Office: RZ J5 Phone: Rooms:  Monday: HG E21  Tuesday: CAB H52 Mailing list: Fav-Guz

11 Linus Torvalds group: Ivo Colombo Language: German Rooms:  Monday: ML H37.1  Tuesday: HG E22 Mailing list: Ham-Käs

12 Edsger Dijkstra group: Benjamin Morandi Language: German Office: RZ J3 Phone: Rooms:  Monday: ML H34.3  Tuesday: LFW C5 Mailing list: Kat-Lon

13 Ada Lovelace group: Wolfgang Schwedler Language: German & English Office: RZ F6 Phone: Rooms:  Monday: IFW A32.1  Tuesday: ETZ E9 Mailing list: Lorn-Ngu

14 Barbara Liskov group: (Jason) Yi Wei Office: RZ J3 Phone: Language: English Rooms:  Monday: ML J34.1  Tuesday: ML J34.3 Mailing list: Noe-Sche

15 Tony Hoare group: Nadia Polikarpova Office: RZ J8 Phone: Language: English Rooms:  Monday: LEC C14  Tuesday: IFW B42 Mailing list: Schi-Tad

16 Niklaus Wirth group: Andreas Leitner Office: RZ J4 Phone: Language: German Rooms:  Monday: IFW A 36  Tuesday: LEC C14 Mailing list: Tan-Z

17 Coordinating assistant Michela Pedroni A-Bro

18 The quality assurance assistant Hermann Lehner RZ F

19 About me At ETH since end of 2001, Professor of Software Engineering In industry most of my career, last with Eiffel Software in Santa Barbara, California, in Now “Chief Architect” Assoc. Prof. at University of California, Santa Barbara in 80s Published a number of books, in particular Object-Oriented Software Construction (2 nd edition: 1997) Research interests: software engineering, methods, tools, programming languages, object-oriented programming, concurrent programming, program proofs, testing, development environments, persistence etc. Contact:  Office: RZ J22  Secretary: Claudia Günthart, Office: RZ J7 Office hours: Thursdays during the semester, ask Ms. Günthart

20 Course page:  Check it at least twice a week English version available, but German more up to date Lecture material:  Lecture slides  Textbook: Touch of Class (draft) Available electronically from course page Exercise material:  Exercise sheets  Master solutions Also: Video recording of lectures! Your most important URL for the next 4 months

21 The textbook in progress

22 Electronic forums Discussion forums: Help forum for the whole course: Mailing list for each group Advice and rules:  Use the forums and mailing lists! Learning to program is hard: take advantage of every help you can get.  Don’t be shy. There are no stupid questions.  Criticism welcome, but always be polite to every participant and observe the etiquette. To the whole teaching team (professor and assistants):

23 If you need a laptop (actually you do) ETH has good prices through the NEPTUN program Thinkpad (Lenovo, ex-IBM), HP or Apple You choose your OS: Windows, Linux Limited time window: see

24 Exercises The exercises are a key part of the course  Ca. 10 weekly assignments  Two “mock exams” What you must do for each task:  Show serious effort to address the questions  Fill out questionnaire Military services or illness  contact your assistant.

25 Grading The basic rules are by the ETH, the details of the Testat are ours The grade comes entirely from the exam in September BUT: to be permitted to take the exam you must get a “Testat”. This means that you do  All the weekly assignments except at most one  Both mock exams What you must do for each task:  Show serious effort to address the questions  Fill out questionnaire Military services or illness  contact your assistant.

26 The software The exercises rely on the Traffic “library” Application domain: Transportation system in a city (in the book: Paris in this course: Zurich) You will need to download:  EiffelStudio:  Traffic: (this can wait until next week).

27 Discovering Traffic

28 Behind the software Michela Pedroni (current Traffic project leader) Numerous ETH students including: Marcel Kessler, Rolf Bruderer, Ursina Caluori, Roger Küng, Alan Fehr, Sarah Hauser, Michele Croci, Matthias Bühlmann, Florian Geldmacher, Susanne Kasper, Lars Krapf, Valentin Wüstholz, Stefan Daniel, Etienne Reichenbach, Maria Husmann … Patrick Schoenbach (initial version)

29 Warning Not everything is perfect from our side. The Traffic software probably has mistakes (“bugs”), and the textbook does, too. BUT:  We will correct our mistakes, as quickly as we can.  If you try something, don’t blame the software first. It may be doing just what you told it to.

30 Why this approach? Many software issues become really tough for big systems With other approaches, in an intro course, you only see small programs We give you lots of software; use it as model & inspiration You learn to use software through abstract interfaces (also known as contracts) You go from consumer to producer: outside-in Traffic is graphical and fun! You should at the end be able to understand all of it. Then you can add to it yourself

31 Background of 1 st -year CS students ( ) Computer experience  1 year: 0% (0%, 0%, 1%) 2 to 4 years: 1% (3%, 4%, 1%, 6%) 5 to 9 years: 38% (35%, 48%, 35%, 55%) (62%, 48%, 63%) Programming experience None: 12% (19%, 18%, 14%, 22%) No O-O: 20% (26%, 33%, 38%) (11%, 15%, 10%, 5%) Previous years  100 classes: 8%  10 years: 61%  100 classes: 8% 2007

32 Topics  What is software?  Objects & programs  Interfaces and the notion of class  Logic and contracts  The run-time model: object creation, references  Describing syntax  Control structures  Inheritance  Genericity  Recursion  Data structures  Event-driven programming & agents  Topological sort  Intro to software engineering

33 Basic advice  Attend all lectures  Read material — textbook, slides — before lecture (Note: slides often updated after lecture)  Bring a printout of the slides to the lecture, take notes  Attend all exercise sessions  Do all exercises & the project (you’ll need them for the “Testat”)  If you don’t understand, ask (again: there are no stupid questions)

34 Previous programming experience If you have already programmed, take advantage of it, but using a fresh look; explore Traffic If you are new to programming, don’t be afraid; it can be hard at the beginning but you’ll get the hang of it. Mathematics is as useful a preparation as programming experience

35 Some personal advice Succeeding at university (and specifically ETH):  You are in charge  Take advantage of ETH possibilities Talks by visiting scientists Conferences Library Labs Projects  Talk to professors, assistants  Read the Web pages of the department and the Chair of Software Engineering, browse around  Look for courses with projects, other opportunities to do personal work

36 More advice  Attend lectures  Attend exercise sessions  Read and print slides ahead of courses  Take notes  Don’t neglect non-CS courses, esp. first two years  Don’t prepare for the exam at the last minute  Keep a critical, probing attitude

The industry of pure ideas

38 Software engineers build machines You can’t touch, kick or drop our machines: they’re immaterial But they are machines anyway We call them programs or systems To operate (or run or execute) a program you need a physical machine: a computer Computers and related devices: hardware Programs and associated intellectual value: software

39 Software everywhere Banking: manage millions of accounts Trading: decide to sell or buy Transportation: control trains, track planes...  Some cars have millions of lines of program code Travel: air, train, hotel reservations Communication: phones, Internet, … Government: manage taxes, track laws... Health care: keep health record, control devices Education Entertainment Information etc.

40 Computers Computers are universal machines. They execute the program that you feed them The only limit is your imagination The good news:  Your computer will do exactly what your program says

41 Working with a computer Programmer: writes programs User: runs programs Program A programmer writes a a user which runs on a computer

42 Program A programmer writes a a user which runs on a computer using a computer Working with a computer

43 Program A programmer writes a users which their computers using a computer run on Working with a computer

44 Program Programmers write a users which their computers using a computer run on Working with a computer

45 Computers Computers are universal machines. They execute the program that you feed them. The only limit is your imagination. The good news:  Your computer will do exactly what your program says.  It will do it very fast.

46 Moore’s “Law” Approximate doubling of computing power, for comparable price, every eighteen months (Is this what Moore’s law says?) (No: approximate doubling of the number of transistors)

47 Moore’s law (source: Intel)

48 Moore’s “Law” Approximate doubling of computer power, for comparable price, every eighteen months MHz 10 MHz 1 GHz 100 MHz : < 1 MHz 80386: 33 MHz 80486: 50 MHz Pentium: 133 MHz Pentium IV: 1.3 GHz to 1 GHz: 26 years from 1 to 2 GHz: 8 months Speed of Intel processors (1 Hertz = 1 clock cycle per second) 3.8 GHz

49 Microprocessors (source: Intel)

50 Common myths and excuses “Computers are intelligent” Fact: Computers are neither intelligent nor stupid. They execute programs devised by humans. These programs reflect the intelligence of their authors. The basic computer operations are extremely elementary (store this value, add these two numbers…). “The computer has crashed” “The computer doesn’t allow this” “The computer lost your record” “The computer messed up your record”

51 Computers don’t make mistakes *....  Programs don’t make mistakes either  Programmers do make mistakes * Actually, hardware can malfunction, but this is much more rare than program errors

52 Computers Computers are universal machines. They execute the program that you feed them The only limit is your imagination and your carefulness The good news:  Your computer will do exactly what your program says  It will do it very fast The bad news:  Your computer will do exactly what your program says  It will do it very fast “To err is human, but to really mess things up takes a computer”

53 Writing software is tough Programs “crash” Programs that don’t crash don’t necessarily work Badly functioning programs have killed people, e.g. in medical devices Ariane 5 rocket, 1996: $10 billion lost because of a simple program error Programmers are responsible for the good functioning of their programs The purpose of this course is to teach you not just programming but good programming

54 The “Blue Screen Of Death”

55 Learning to program well

56 What computers do Storage and retrieval Operations Communication Storage and retrieval  memories Operations  processors Communication  communication devices Memories, processors and communication devices are the hardware. Rest of the world Processors Memories Communication devices

57 General organization Rest of the world Processors Memories Communication devices “Core” memory, disks... “Persistent” or not Keyboard, mouse, video display, network connector... Also “CPU”

58 Data: collections of symbols held in a computer Information: interpretation of data for human purposes Information and data Information is what you want, e.g. a text or music Data is how it is encoded for the computer, e.g. MP3 audio format

59 Information and data processing Data is stored in memory Input devices produce data from information Output devices produce information from data Information Data InputOutput Process Computer

60 Computers come in all sizes, colors, flavors

61 Computers everywhere Banks Airplanes, cars… Washing machines Cell phones (70% of value) Printers Tomorrow: your shirt…

62 Computers Computers are universal machines. They execute the program that you feed them. Program (Universal machine) += Specialized machine

63 Where’s the program? Stored-program computer: the program is in memory “Executable data” The computer (more precisely the platform: computer + operating system) finds your program in memory to execute it A program can appear in memory in different forms:  Source: human-readable form (programming language)  Target form, machine code, object form: form executable by the computer Compilers transform source text to machine code

64 Software Engineering Writing software that’s  Correct Does what it’s supposed to!  Extendible Easy to change!  Readable by humans!  Reusable Don’t reinvent the wheel!  Robust React appropriately to errors  Secure Defeat attackers

65 Operating systems: source size Unix V7: 10K Red Hat 7.1: 30 Linux: 10 K Lines of code (millions) Windows 3.1: 3 M Windows NT: 4 M Windows 95: 15 Windows 98: 18 Windows 2000: 40 Red Hat 6.2: 17 Solaris 7: 12 Windows XP: Vista: 50 Debian 2.2: 55 Debian 3.1: 213! 2001

66 In other application areas (source: Siemens)

67 Writing software is tough It is difficult to get a program right Trial-and-error approach very inefficient

68 Writing software is fun Design and build your own machines Exert your creativity and imagination Programs save lives and help make the world better Experience the feeling of a program that you wrote, and that works

69 For next week Read chapters 1 and 2 of Touch of Class Read slides for next two lectures (2 and 3)