informatik i
play

Informatik I Course at BAUG department of ETH Z urich 1. - PowerPoint PPT Presentation

Informatik I Course at BAUG department of ETH Z urich 1. Introduction Hermann Lehner, Felix Friedrich Welcome to the Lecture Series! ETH Z urich HS 2018 1 2 Material The Team Lecturers Hermann Lehner Felix Friedrich Chief


  1. Informatik I Course at BAUG department of ETH Z¨ urich 1. Introduction Hermann Lehner, Felix Friedrich Welcome to the Lecture Series! ETH Z¨ urich HS 2018 1 2 Material The Team Lecturers Hermann Lehner Felix Friedrich Chief assistant Andrea Lattuada Course homepage Assistants Vincent Becker Lukas Burkhalter Mihai Bace Irfan Bunjaku http://lec.inf.ethz.ch/baug/informatik1 Patrick Gruntz Max Rossmannek Josua Schneider Rafael Wampfler Temmy Bounedjar Simon Guldimann Staal Sander 3 4

  2. Programming and Problem Solving Programming and problem solving In this course you learn to solve problems with selected algorithms In this course you learn how to program using Java and data structures Software development is a handicraft Fundamental knowledge independent of the language Analogy: learn to play a musical instrument Comparison: musical scale, read music, rythm skills. The problem: nobody has become a pianist from listening to The problem: without musical instrument this is no fun. music. Hence we combine learning problem solving with learning the Hence this course offers several possibilities, to train. Make use of it! programming language Java. 5 6 Course Content Goal of today’s Lecture Programming using Java arrays introduction statements and expressions methods and recursion Introduction of computer model and algorithms number representations types, classes and objects General informations to the course control flow inheritance and polymorphy Writing a first program Algorithmen Searching and Sorting 7 8

  3. What is Computer Science? The science of systematic processing of informations ,. . . 1.1 Computer Science and Algorithms . . . particularly the automatic processing using digital computers. Computer Science, Euclidean Algorithm (Wikipedia, according to “Duden Informatik”) 9 10 Computer Science � = Computer Literacy Inhalt dieser Vorlesung Computer literacy: user knowledge Handling a computer Systematic problem solving using algorithms and the Working with computer programs for text processing, email, programming langauge Java presentations . . . Hence: not only Computer Science Fundamental knowledge but also programming course. How does a computer work? How do you write a computer program? 11 12

  4. Algorithm: Fundamental Notion of Computer Science Oldest Nontrivial Algorithm Euclidean algorithm (from the elements from Euklid, 3. century B.C.) Algorithm: Instructions to solve a problem step by step Input: integers a > 0 , b > 0 Execution does not require any intelligence, but precision (even Output: gcd of a und b computers can do it) http://de.wikipedia.org/wiki/Algorithmus according to Muhammed al-Chwarizmi , While b � = 0 author of an arabic If a > b then computation textbook (about 825) a ← a − b else: b ← b − a Result: a . a b a b a b a b “Dixit algorizmi. . . ” (Latin translation) 13 14 Live Demo: Turing Machine Euklid in the Box Speicher 0 1 2 3 4 5 6 7 8 9 R > L ? L = 0? [ 8 ] [ 9 ] L − R R − L springe springe a b springe → [ 8 ] → [ 9 ] zu 0 zu 0 → L → R stop zu 6 Programmcode Daten Daten While b � = 0 If a > b then L inks R echts a ← a − b else: a b b ← b − a Ergebnis: a . Register 15 16

  5. Computers – Concept An bright idea: universal Turing machine (Alan Turing, 1936) 1.3 Computer Model http://en.wikipedia.org/wiki/Alan_Turing Turing Machine, Von Neumann Architecture Alan Turing 17 18 Computer – Implementation Computer Z1 – Konrad Zuse (1938) http://commons.wikimedia.org/wiki/File:John_von_Neumann.jpg ENIAC – John Von Neumann (1945) http://www.hs.uni-hamburg.de/DE/GNT/hh/biogr/zuse.htm Ingredients of a Von Neumann Architecture Memory (RAM) for programs and data Konrad Zuse Processor (CPU) to process programs and data I/O components to communicate with the world John von Neumann 19 20

  6. Memory for data and program Processor Sequence of bits from { 0 , 1 } . Program state: value of all bits. The processor (CPU) Aggregation of bits to memory cells (often: 8 Bits = 1 Byte) executes instructions in machine language Every memory cell has an address. has an own "fast" memory (registers) Random access: access time to the memory cell is (nearly) can read from and write to main memory independent of its address. features a set of simplest operations = instructions (e.g. adding to register values) 21 22 Computing speed Programming In the time, onaverage, that the sound takes to travel from from my With a programming language we issue commands to a computer such that it does exactly what we want. mouth to you ... The sequence of instructions is the http://en.wikipedia.org/wiki/Harvard_Computers (computer) program 30 m � = more than 100 . 000 . 000 instructions a contemporary desktop PC can process more than 100 millions instructions 1 1 Uniprocessor computer at 1 GHz. The Harvard Computers , human computers, ca.1890 23 24

  7. Why programming? Do I study computer science or what ... Mathematics used to be the lingua franca of the natural There are programs for everything ... sciences on all universities. Today this is computer I am not interested in programming ... science. because computer science is a mandatory subject here, Lino Guzzella, president of ETH Zurich, NZZ Online, 1.9.2017 unfortunately... . . . 25 26 This is why programming! This Course is for You Any understanding of modern technology requires knowledge You learn the fundamental principles – the basics of computer about the fundamental operating principles of a computer. science and programming – from us on a nontrivial level Programming (with the tool computer) is evolving a cultural You will need to apply the principles learned in a different context technique like reading and writing (using the tools paper and – for example for other programming languages (C++ ,Python pencil) ,Matlab , R) Most qualified jobs require at least elementary programming skills This is not our requirement – we know this from you (= your Programming is fun! department) 27 28

  8. Programming Languages Higher Programming Languages can be represented as program text that The language that the computer can understand (machine language) is very primitive. can be understood by humans Simple operations have to be disassembled into many single steps is independent of the computer model The machine language varies between computers. → Abstraction! 29 30 Java is based on a virtual machine (with von-Neumann architecture) Program code is translated into intermediate code Intermediate code runs in a simulated computing envrionment, the 1.5 General Informations about the Course intermediate code is executed by an interpreted Optimisation: Just-In-Time (JIT) compilation of frequently used code: virtual machine → physical machine Organisation, Tools, Exercises, Exams Consequence, and manifested goal of the Java developers: write once – run anywhere 31 32

  9. Recitation Session Registry Exercises Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat V V Ü Ü submission issuance preliminary discussion discussion Registration via web page http://echo.ethz.ch Exercises availabe at lectures. Works only when enrolled for this course via myStudies. Preliminary discussion in the following recitation session Available rooms depend on the course of studies. Solution of the exercise until the day before the next recitation session. Dicussion of the exercise in the next recitation session. 33 34 Exercises Lacking Resources are no Excuse! At ETH an exercise certificate is not required in order to subscribe for the exams. The solution of the weekly exercises is thus voluntary but stronly For the exercises we use an online development environment that recommended. requires only a browser, internet connection and your ETH login. If you do not have access to a computer: there are a a lot of computers publicly accessible at ETH. 35 36

  10. Tutorial Tutorial - Url In the first week you work through our Java-tutorial on your own Java Tutorial Simple introduction to Java, no foreknowledge required Here you find the tutorial: Time needed: about two hours https://frontend-1.et.ethz.ch/sc/WKrEKYAuHvaeTqLzr In the second week recitation session there will be a self assessment about the tutorial → This time is well-invested! 37 38 Book to the Lecture Exams Sprechen Sie Java? The exam (in examination period 2019) will cover Hanspeter Mössenböck Lectures content (lectures, handouts) dpunkt.verlag Exercise content (recitation hours, exercise tasks). Well structured learning material Written exam - might be executed on a computer In-depth discussion of the topics We will test your practical skills (programming skills and theoretical knowledge Exercise tasks with solutions (background knowledge, systematics). Our exam will include 1-2 questions from the book 39 40

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend