pptx - iLearn

Download Report

Transcript pptx - iLearn

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 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, [email protected]
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
Lars Peiler
Jan Reese
4
You
twbk.de/e92
5
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) Yes, but I did not take it
c) No
7
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 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 – 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 – 6
11
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)
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 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 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: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 iLearn
– 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 iLearn
– Grundausbildungspool
– Feb. 29 – March 11
17
tinyurl.com/infprogoo
• Setting up Eclipse
• Eric S. Roberts,
The Art and Science of Java
• Mentoring (deadline: Nov 2)
• Forum
• StudiDB
• Exam admission requirements
18
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 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 Donnerstag Abend.
Hannes Schrader, Xing / www.zeit.de, 12. Oktober 2015
21
The Challenge
5 x 200+ =
[flickr / Creative Commons 2.0]
22
• 287 Students registered
• 7 groups of 36 each, 1 group of 35
• 60% got 1st choice, 30% 2nd choice, 10% 3rd choice
23
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
Charles Babbage
(1791 – 1871)
Images courtesy of Eric Roberts
Augusta Ada Byron,
Lady Lovelace
(1815 – 1852)
26
CC BY-SA 3.0
CC BY-SA 3.0
Z1
Konrad Zuse
(1910 – 1995)
27
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 unambiguously defined
2.Effective
3.Finite
29
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 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 computer's log, 1947
32
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 McGilton, May 1996 33
Classic Compilation Process
source file
#include <stdio.h>
object file
gcc hello.c
int main() {
printf("hello\n");
}
0100100101011001000
1000010100011101011
0110100111010101100
a.out
compiler
executable file
0100100101011001000
1000010100011101011
0110100111010101100
1001011010110001011
0100100101001011011
0101101011010100101
linker
other object files
and libraries
1001011010110001011
0100100101001011011
0101101011010100101
Graphic courtesy of Eric Roberts
34
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
2B
00
1A
0C
4C
Hello.class
03
07
00
6A
00
00
13
61
compiler
archive
JAR archive
CA
00
00
01
47
2D
14
00
FE
16
04
00
72
00
0A
18
BA
07
00
16
61
1F
00
0C
BE
00
07
2B
70
08
02
00
00
1A
0C
4C
68
00
00
17
03
07
00
6A
69
0F
08
00
00
00
13
61
63
07
0A
1C
other class files
47
2D
14
00
72
00
0A
18
61
1F
00
0C
70
08
02
00
68
00
00
17
69
0F
08
00
63
07
0A
1C
JVM
java Hello
Hello
hello
Graphic courtesy of Eric Roberts
35
Summary
• Long history of computing, recent
acceleration
• Defined “CS”, “Algorithm”, “SW Engineering”
• Syntax errors vs. Bugs
• Discussed Java design goals
• Compilation vs. Interpretation
36