220 likes | 480 Views
Introduction to Computer Science I Topic 0: Introduction. Prof. Dr. Max Mühlhäuser Dr. Guido Rößling. What Computer Science is Not About. The computer ! Just as biology is not “microscope science” and writing is not “pen science”. The subject of ICS 1 . Problem Description.
E N D
Introductionto Computer Science ITopic 0: Introduction Prof. Dr. Max Mühlhäuser Dr. Guido Rößling
What Computer Science is Not About The computer! Just as biology is not “microscope science” and writing is not “pen science”
The subject of ICS 1 Problem Description mental Model Challenge: Formulating a solution that is both easy to understand for a human and executable for a machine huge representationalgap executable program machine layer
The role of ICS-1 – Introduction to Programming - • Content constraints • Sociological constraints • Time constraints
The role of ICS-1 Parents: “CNN talks a lot about Java. Why do you teachmy childScheme?” Student: “I know everythingand Perl is the best!” ICS-1 Introduction to Programming Industry: “Today we are usingC# v4.538. Why don’tyou teach it toyour students?” Other Profs: “Everybody in myworld needs pointers. This is what you should teach in ICS-1!”
The role of ICS-1 Students who can programon a similar level ICS-1 Students with mathematicalbackground Students who“program” Students withoutprevious knowledge
In many ICS-1 Courses… • Classic ICS-1 course: • You learn the syntax of a fashionable programming language • You use a commercial development environment • You are shown code examples and asked to imitate them • You discuss a couple of algorithmic ideas • The meaning of the language remains unclear • superficial explanations • explanation in terms of implementation details/ hardware • How you can design new programs remains unclear
Tinkering vs. Design • Syntax: Tinkering until it works • Design: Tinkering until it works • You know some standard algorithms, but this is no replacement for a program design methodology • Your knowledge about the meaning of the language is a mixture of gut feeling and some details about low-level implementation details of the language
Work Environment of a Pilot Appropriate for the first flying lesson?
Work Environment for Experienced Programmers Appropriate for the first programs?
Our approach: 4 pillars • Development environment for beginners • Simple programming language • Precise models to understand the meaningof the language • Recipes and methodology how to design programs
Simple programming language • You will not learn only one - but many different layered programming languages • Different levels, structured from the pedagogical point of view • Subsets of the programming language Scheme • Features that you don’t know yet are disabled • No bizarre error messages regarding features you don’t know • We can always concentrate on the design concepts and ideas that fit your current standard of knowledge!
Precise Models to understand the meaning of the language For every language level, we will teach you a model which explains the meaning of the various programs • You can “execute” programs on a piece of paper • These models are not defined in terms of hardware, but their purpose is to specify the meaning in the simplest possible way • You will also hear about models illustrating how a programming language is implemented on typical hardware
Recipes and methodology “how to design programs” • We will not just present programs and ask you to imitate • We teach recipes – that is, step-by-step instructions – how you can design programs • These recipes are more or less independent of the programming language
Typical program “design” approach… That is not how we will do it, though …
From Scheme to Java • In the second half of the semester we will use Java • The design recipes work step-by-step also for object-oriented Java programs • Many differences are just notation • More fundamental differences are very instructive
Why not Java first? • Complex notation, complex errors • No IDE (integrated development environment) supports language levels • Direct interaction with Scheme interpreter makes it easier to get started • Design recipes are drown in syntax • K.I.S.S. - Keep It Simple Syntactically • Java/C++/Pascal: 90% syntax, 10% problem solving • Scheme: 10% syntax, 90% problem solving • Scheme (or Lisp) is the “mother” of most modern language features • Language features can be studied in full “purity” in Scheme • Many “new” features of modern languages can easily be understood once you know Scheme • Studies show that our approach produces better OO programmers!
Advantages of an easy language We want to compute the sum of 2 and 3 Java/Eclipse: We start a new projectWe create a new packageWe create a new classWe write the following program: DrScheme: We enter the program (+ 2 3),DrScheme responds “5” package test; public class Test { public static void main(String args[]) { System.out.println(2+3); } } The steps required in Java/Eclipse are not “nonsense”, but all have their meaning. For a beginner, they can be confusing and unnecessary. (You need weeks before you understandevery part of this program) We compile the programWe run the program The console shows “5”
Summary • Training good programmers does not mean starting them on “currently fashionable” or professional tools & languages • We provide a strong, rigorous foundation in basic concepts of programming • Then, and only then, we will expose you to current fashion!
Books • Scheme: • most important book:How to Design Programs (HTDP) • Structure and Interpretations of Computer Programs (SICP) • Java • Thinking in Java all books available for free online!
More information • News, Links, Lecture Notes etc. are all available on our homepages: http://proffs.tk.informatik.tu-darmstadt.de/gdi1 http://proffs.tk.informatik.tu-darmstadt.de/gdi1/en