Programming Lecture 1 Welcome Administrivia Introduction Chapter 1

  • Slides: 36
Download presentation
Programming – Lecture 1 Welcome Administrivia Introduction (Chapter 1) • Brief history of computing

Programming – Lecture 1 Welcome Administrivia Introduction (Chapter 1) • Brief history of computing • CS, Algorithms, SW Engineering, Errors • Compilation vs. Interpretation

Conduct in Class I: • • Start and finish on time Try to deliver

Conduct in Class I: • • Start and finish on time Try to deliver high-quality lectures Listen to your concerns Make sure you have a fair chance of passing this class You: • Are punctual • Do not disturb others (no talking with neighbor, no laptops/smartphones/tablets/. . . ) • Ask if things are unclear (during lecture, or afterwards) • Actively participate 2

We Prof: Reinhard von Hanxleden, rvh@informatik. uni-kiel. de Staff (Mitarbeiter/innen): Christoph Daniel Schulze (lead),

We Prof: Reinhard von Hanxleden, rvh@informatik. uni-kiel. de Staff (Mitarbeiter/innen): Christoph Daniel Schulze (lead), cds@. . . Steven Smyth (lead), ssm@, , , Nis Wechselberg (CTO), nbw@. . . Insa Fuhrmann, ima@. . . Ulf Rüegg, uru@. . . Jan Tikovsky, jrt@. . . 3

We Student Staff (Hilfskräfte): Jan Ole Albert Michael Cyruk Astrid Mariana Flohr Lena Grimm

We Student Staff (Hilfskräfte): Jan Ole Albert Michael Cyruk Astrid Mariana Flohr Lena Grimm Lars Peiler Jan Reese 4

You twbk. de/e 92 5

You twbk. de/e 92 5

Question 1 What is your gender? a) Female b) Male 6

Question 1 What is your gender? a) Female b) Male 6

Question 2 Did your school offer Informatik? a) Yes, and I took it b)

Question 2 Did your school offer Informatik? a) Yes, and I took it b) Yes, but I did not take it c) No 7

Question 3 How much programming experience do you have? a) None b) I participated

Question 3 How much programming experience do you have? a) None b) I participated once or twice in a programming project c) I have programmed extensively d) I earn money with programming 8

Question 4 How familiar are you with Java? a) b) c) d) Not at

Question 4 How familiar are you with Java? a) b) c) d) Not at all A little Very I earn money with Java programming 9

Question 5 How many years of English training did you have? a)None b)1 –

Question 5 How many years of English training did you have? a)None b)1 – 3 c)4 – 6 d)7 or more 10

Question 6 What was your final grade in English? a)1 b)2 c)3 d)4 e)5

Question 6 What was your final grade in English? a)1 b)2 c)3 d)4 e)5 – 6 11

Question 7 What was your final grade in Math? a)1 b)2 c)3 d)4 e)5

Question 7 What was your final grade in Math? a)1 b)2 c)3 d)4 e)5 – 6 12

Question 8 How long does it take you from home to campus? a) b)

Question 8 How long does it take you from home to campus? a) b) c) d) e) 10 minutes max 11 to 20 minutes 21 to 40 minutes 41 to 60 minutes More than one hour 13

Question 9 Do you already have a “study buddy”? a)Yes b)No 14

Question 9 Do you already have a “study buddy”? a)Yes b)No 14

Question 10 During the last two years of school, how much time did you

Question 10 During the last two years of school, how much time did you spend at home for school per week on average? a) b) c) d) One hour or less More than one hour, up to four hours More than four hours, up to ten hours More than ten hours 15

Question 11 Did you participate in any of these activities conducted by the Institut

Question 11 Did you participate in any of these activities conducted by the Institut für Informatik: a)Software Challenge b)Girls Day c)Schnupperstudium d)School visits by faculty members e)Praktikum 16

Course Components • Lecture (Vorlesung) – Mon 10: 15 – 11: 55, Fri 8:

Course Components • Lecture (Vorlesung) – Mon 10: 15 – 11: 55, Fri 8: 15 – 9: 55 – Olshausenstr. 40, Norbert-Gansel Hörsaal • Recitation class (Globalübung) – Wed 14: 15 – 15: 45 – Olshausenstr. 40, Norbert-Gansel Hörsaal – Starts this week – informs about registration • Practical classes (Rechnerübungen) – 2 hours/week, done individually, must register in i. Learn – Grundausbildungspool in Hermann-Rodewald-Str. 3, Room 105 (basement) – Start next week, ends Feb. 10 • Project (Praktikum) – 4 hours/week, done in pairs must register in i. Learn – Grundausbildungspool – Feb. 29 – March 11 17

tinyurl. com/infprogoo • Setting up Eclipse • Eric S. Roberts, The Art and Science

tinyurl. com/infprogoo • Setting up Eclipse • Eric S. Roberts, The Art and Science of Java • Mentoring (deadline: Nov 2) • Forum • Studi. DB • Exam admission requirements 18

Exam Your grade will be determined by final exam Date: March 21, 14: 00

Exam Your grade will be determined by final exam Date: March 21, 14: 00 – 16: 00 Admission requirements: • Presence in all practical classes and project – Exceptions granted by medical “attest” or prof • Passing three mini exams – You explain your homework solutions – Conducted in practical classes – Spread semi-randomly across semester • If you fail admission requirements: try again next year 19

Plagiarism / Cheating • You are encouraged to help each other for solving the

Plagiarism / Cheating • You are encouraged to help each other for solving the assignments • However, you must submit your own code • Copying/adopting somebody else’s code or parts thereof is plagiarism and may result in not admitting you to the final exam • We run plagiarism detection software across all submissions 20

Erstsemester: Und sorg dafür, dass du Freitag frei hast Das studentische Wochenende beginnt am

Erstsemester: Und sorg dafür, dass du Freitag frei hast Das studentische Wochenende beginnt am Donnerstag Abend. Hannes Schrader, Xing / www. zeit. de, 12. Oktober 2015 21

The Challenge 5 x 200+ = [flickr / Creative Commons 2. 0] 22

The Challenge 5 x 200+ = [flickr / Creative Commons 2. 0] 22

 • 287 Students registered • 7 groups of 36 each, 1 group of

• 287 Students registered • 7 groups of 36 each, 1 group of 35 • 60% got 1 st choice, 30% 2 nd choice, 10% 3 rd choice 23

Introduction (Chapter 1) Brief history of computing CS, Algorithms, SW Engineering, Errors Compilation vs.

Introduction (Chapter 1) Brief history of computing CS, Algorithms, SW Engineering, Errors Compilation vs. Interpretation

A Brief History of Computing Image courtesy of Eric Roberts 25

A Brief History of Computing Image courtesy of Eric Roberts 25

Charles Babbage (1791 – 1871) Images courtesy of Eric Roberts Augusta Ada Byron, Lady

Charles Babbage (1791 – 1871) Images courtesy of Eric Roberts Augusta Ada Byron, Lady Lovelace (1815 – 1852) 26

CC BY-SA 3. 0 Z 1 CC BY-SA 3. 0 Konrad Zuse (1910 –

CC BY-SA 3. 0 Z 1 CC BY-SA 3. 0 Konrad Zuse (1910 – 1995) 27

Computer Science The science of problem solving in which the solutions happen to involve

Computer Science The science of problem solving in which the solutions happen to involve a computer Solving a problem by computer: 1. Algorithmic design 2. Coding 28

Algorithm Ninth-century Persian mathematician Abu Ja‘far Mohammed ibn Mûsâ al-Khowârizmî Properties: 1. Clearly and

Algorithm Ninth-century Persian mathematician Abu Ja‘far Mohammed ibn Mûsâ al-Khowârizmî Properties: 1. Clearly and unambiguously defined 2. Effective 3. Finite 29

Software Engineering Discipline of writing programs so that they can be understood and maintained

Software Engineering Discipline of writing programs so that they can be understood and maintained by others 30

Programming Errors Distinguish • Syntax errors • Bugs „The first step [in all of

Programming Errors Distinguish • Syntax errors • Bugs „The first step [in all of my inventions] is an intuition, and comes with a burst, then difficulties arise – this thing gives out and [it is] then that ‘Bugs’ – as such little faults and difficulties are called – show themselves […]. “ Thomas Edison, 18 Nov 1878 31

[U. S. Naval Historical Center Online Library] Page from the Harvard Mark II electromechanical

[U. S. Naval Historical Center Online Library] Page from the Harvard Mark II electromechanical computer's log, 1947 32

Java – Design Goals • • • Simple, object oriented, familiar Robust, secure Architecture

Java – Design Goals • • • Simple, object oriented, familiar Robust, secure Architecture neutral, portable High performance Interpreted, threaded, dynamic White Paper: The Java Language Environment James Gosling and Henry Mc. Gilton, May 1996 33

Classic Compilation Process source file #include <stdio. h> gcc hello. c int main() {

Classic Compilation Process source file #include <stdio. h> gcc hello. c int main() { printf("hellon"); } object file 0100100101011001000010100011101011 0110100111010101100 a. out compiler executable file linker 0100100101011001000010100011101011 0110100111010101100 10010110001011 01001001011011 01011010100101 other object files and libraries 10010110001011 01001001011011 01011010100101 Graphic courtesy of Eric Roberts 34

The Java Interpreter source file public class Hello { public static void main(String[] args)

The Java Interpreter source file public class Hello { public static void main(String[] args) { System. out. println("hello"); } } javac Hello. java CA 00 00 01 class file FE 16 04 00 BA 07 00 16 BE 00 07 2 B 00 1 A 0 C 4 C Hello. class 03 07 00 6 A 00 00 13 61 compiler archive JAR archive CA 00 00 01 47 2 D 14 00 FE 16 04 00 72 00 0 A 18 BA 07 00 16 61 1 F 00 0 C BE 00 07 2 B 70 08 02 00 00 1 A 0 C 4 C 68 00 00 17 03 07 00 6 A 69 0 F 08 00 00 00 13 61 63 07 0 A 1 C other class files 47 2 D 14 00 72 00 0 A 18 61 1 F 00 0 C 70 08 02 00 68 00 00 17 69 0 F 08 00 63 07 0 A 1 C JVM java Hello hello Graphic courtesy of Eric Roberts 35

Summary • Long history of computing, recent acceleration • Defined “CS”, “Algorithm”, “SW Engineering”

Summary • Long history of computing, recent acceleration • Defined “CS”, “Algorithm”, “SW Engineering” • Syntax errors vs. Bugs • Discussed Java design goals • Compilation vs. Interpretation 36