Скачать презентацию Welcome to the Computer and Information Technology program Скачать презентацию Welcome to the Computer and Information Technology program

6ebf1578aaadd510c0d8b52370806d28.ppt

  • Количество слайдов: 32

Welcome to the Computer and Information Technology program http: //www. cis. upenn. edu/~matuszek Welcome to the Computer and Information Technology program http: //www. cis. upenn. edu/~matuszek

Who am I? n n n David Matuszek (muh-TOOZ-ik) I prefer “Dave” or “Dr. Who am I? n n n David Matuszek (muh-TOOZ-ik) I prefer “Dave” or “Dr. Dave” I’m the director of the MCIT program I’m here to teach, not to do research My most important courses are CIT 591 and CIT 594 2

Who are you? n Most of you are in the new MCIT program. You Who are you? n Most of you are in the new MCIT program. You are here because: n n You are extremely bright You do not have a BA or BS in computer science The rest of you are in other programs You have a very wide range of backgrounds 3

What is this course? n This is a beginning programming course n n The What is this course? n This is a beginning programming course n n The primary audience is MCIT students n n The language we are using is Java 5 This is one of six required MCIT courses It is also a service course for other students who need to learn to program n n CIT 591 replaces CIS 500 in this role If I can lure you into computing, I will! 4

Why are you here? n There are two good reasons for getting into computer Why are you here? n There are two good reasons for getting into computer science: n n n The job market is (usually) very good Computer programming can be extremely satisfying and enjoyable Which of these is more important? n Money is a necessity n n Being rich isn’t a necessity (but it sure is nice) You spend about 1/4 of your adult life working n It’s important to find work that you enjoy 5

What are you getting yourself into? n Programming is intellectually challenging n It can What are you getting yourself into? n Programming is intellectually challenging n It can be tremendous fun… n n …if you like that sort of thing! Lifelong learning is essential n n n The technology is constantly changing We cannot teach you all you need to know We can point you in the right direction and give you a good, hard push--but the rest is up to you! 6

Programming can be fun n Programming is puzzle-solving n n n Very little is Programming can be fun n Programming is puzzle-solving n n n Very little is mechanical, routine work You always have to be thinking If you like solving puzzles, there’s a good chance you will like programming n n n Some puzzles are hard You need a tolerance for frustration Solving hard puzzles can be very satisfying 7

Computer Science n Computer science is the study of n n n what we Computer Science n Computer science is the study of n n n what we can do with computers how we can best do it If we really understand how to do something, we can write a program to do it n We do a lot of things without really understanding how we do them n n Walk upright Recognize faces Talk, and understand someone else’s speech Computer science is all about how to do things n n Programming is about how to make the computer do the things that we ourselves know how to do Computer science is about figuring out how to do additional things 8

CIT 591 is a programming course n n Programming is teaching the computer how CIT 591 is a programming course n n Programming is teaching the computer how to do something Programming, like woodworking, is a craft n n n To master a craft, you need both knowledge and experience Even a poor woodworker can produce a useable chair A master craftsman can produce a chair that is strong, comfortable, and beautiful 9

Beauty in computer science n Programs can be beautiful or ugly n n I Beauty in computer science n Programs can be beautiful or ugly n n I am not speaking metaphorically Usually, n n Blind people can’t appreciate fine paintings Deaf people can’t appreciate good music Non-mathematicians can’t appreciate elegant proofs Non-programmers can’t appreciate the beauty in programs (but can often feel the lack of it!) 10

Basic esthetics n People have different tastes in music, but… n n A two-year Basic esthetics n People have different tastes in music, but… n n A two-year old pounding on a piano is not making music Very few musicians disagree on what notes make up a “chord, ” or a “chord progression” People have different tastes in programming, but many values are held in common Programming is an art as well as a craft 11

Elegance n n Powerful software can do everything you want to do--for example, Microsoft Elegance n n Powerful software can do everything you want to do--for example, Microsoft Word Complex software is hard to learn and hard to use-for example, Microsoft Word More power usually means more complexity Elegant software somehow manages to be both simple and powerful 12

Elegance in mathematics n n n In school, the mathematician Johann Carl Friedrich Gauss Elegance in mathematics n n n In school, the mathematician Johann Carl Friedrich Gauss was told to add up the numbers from 1 to 100 Gauss realized that 1 + 100 = 101, 2 + 99 = 101, 3 + 98 = 101, and so on There are fifty such pairs The answer must be 50 x 101, or 5050 This is elegant: it saves work, and it’s easy to understand 13

Beauty in programming n Outer beauty in programs consists of: n n Doing a Beauty in programming n Outer beauty in programs consists of: n n Doing a job the way the user wants it done Providing a simple, intuitive set of controls Working reliably, without crashes or glitches Inner beauty in programs consists of: n n n Simple, elegant, efficient solutions to problems Code that is easy to read, understand, and modify Good commenting and coding style 14

Elegance in programming n Consider the following problem: n n You are given a Elegance in programming n Consider the following problem: n n You are given a stack of cards, allegedly containing the numbers 1 through 100. . . …but there are only 99 cards How do you determine which card is missing? One solution: n n Go through all the cards looking for 1, then do it again looking for 2, etc. Is there a better way? 15

Elegance, again n Suppose you are given a deck of 51 playing cards n Elegance, again n Suppose you are given a deck of 51 playing cards n n n Suppose you are given five decks, each missing one (not necessarily all the same) card n n n How do you decide which card is missing? Can you adapt Gauss’s solution to this problem? You want to find how many complete decks you can form Can you adapt Gauss’s solution to this problem? Suppose you are given one thousand decks, each missing one card n n You want to find how many complete decks you can form Would the large number of decks change the way you solve the problem? 16

What CIT 591 and 594 are about n You need to learn the craft What CIT 591 and 594 are about n You need to learn the craft of programming n n In CIT 591 we study programming n n n How to design and write programs that work How to write clear code and documentation This is a skill, and it requires a lot of practice You learn a language (Java 2) and some basic skills You learn how to use the language to tell the computer how to do things In CIT 594 we concentrate more on computer science n n Remember what I said: If you really understand how to do something, you can write a program to do it Computer science is all about how to do things 17

Out with the old, in with the new n Geometry is about 2300 years Out with the old, in with the new n Geometry is about 2300 years old n n n It’s all based on straight lines and circles These were viewed as idealizations of nature There are no straight lines or circles in nature Didn’t anybody notice? Benoit Mandelbrot developed fractal geometry starting in about 1977 n Even in a 2300 year old subject, things change! 18

Fractals are everywhere 19 Fractals are everywhere 19

Changes in computer science n Computer science is only about 60 years old n Changes in computer science n Computer science is only about 60 years old n n It’s changing much faster than geometry! Java was first introduced in 1995 We will be covering Java features that didn’t exist this time last year Change is rapid and accelerating n n n Dominant language of the 1990 s: C++ Dominant language of early 2000 s: Java Dominant company: IBM to Microsoft to ? First GUI: Macintosh, 1984 First web browser: Mosaic, 1992 Web pages: HTML to DHTML to XML 20

What’s ahead? n n Half-life of CS knowledge: about 5 years Typical length of What’s ahead? n n Half-life of CS knowledge: about 5 years Typical length of career: about 40 years n n n What does this tell you? Nobody expected: personal computers, graphical user interfaces, the mouse, the World Wide Web, the popularity of Java, the ascendance of XML, etc. There is only one safe prediction: n You will be taken by surprise! 21

Maybe you should learn accounting instead? n What can we possibly teach you that Maybe you should learn accounting instead? n What can we possibly teach you that will do you any good five years from now? n n n Many underlying programming concepts and mathematical foundations don’t change Programming paradigms change slowly Each new language you learn will be easier to learn than the previous one, because most of the ideas in it will be familiar 22

But more importantly. . . n The attitude you need doesn’t change n n But more importantly. . . n The attitude you need doesn’t change n n Always be prepared to learn Take pride in your work, but-n n Realize that your work is not, and can never be, perfect Learn to welcome corrections and criticisms as helping you to perfect your work; do not take them personally Seek out and fix problems, don’t avoid them Be responsive to the realities of the situation 23

A little problem A 4 M 9 n n n I know: each of A little problem A 4 M 9 n n n I know: each of the above cards has a letter on one side and a number on the other My theory is: if a card has a vowel on one side, it has an even number on the other I want to test my theory, but. . . I want to turn over as few cards as possible Which cards must I turn over ? 24

Answer to the cards problem n Theory: If vowel, then even A 4 M Answer to the cards problem n Theory: If vowel, then even A 4 M 9 2 K 8 E need don’t need n n You have to look for things that show you are wrong, not things that show you are right! This is part of what I mean by “attitude” don’t need 25

Small projects n You can build a doghouse in a few hours n n Small projects n You can build a doghouse in a few hours n n You don’t need a blueprint The materials don’t cost much A little knowledge of tools is enough Imperfections are no big deal 26

Medium-sized projects n You can build a house in a year or so n Medium-sized projects n You can build a house in a year or so n n n You really do need blueprints Excess materials mean wasted money House building requires more skills: plumbing, bricklaying, electrical work, carpentry, etc. Imperfections matter: you don’t want a leaky roof! It’s easier if you aren’t doing it all by yourself 27

Large projects n You cannot build a skyscraper by yourself n n n It’s Large projects n You cannot build a skyscraper by yourself n n n It’s just too much work for one person You don’t have the money You don’t have all the skills Imperfections could be costly or even fatal Skyscrapers can only be built by a team n n Communication is essential A “paper trail” is essential 28

What does that mean for CS? n n n What can we ask you What does that mean for CS? n n n What can we ask you to build in your classes? What will be expected of you in industry? We teach skyscraper-level skills, but n n n we ask you to apply those skills to doghouses it’s silly, but what alternative do we have? It’s up to you: When you leave here, n n will you be able to build skyscrapers? or will you just be very good at building doghouses? 29

Why am I here? n My personal goals are n For the MCIT students: Why am I here? n My personal goals are n For the MCIT students: n n For the non-MCIT students: n n n get everybody through this program with the skills and attitudes you need to succeed into a career that you will enjoy give you a solid understanding of basic programming try to lure you into learning more about the field For the program: n Produce really competent graduates that reflect well on the MCIT program 30

How to get a good grade in here n Start your assignments early! n How to get a good grade in here n Start your assignments early! n n Test your programs thoroughly n n n One or two simple tests are not enough We often provide simple but incomplete tests, just to get you started We will do thorough testing, even if you don’t! Read the assignments carefully n n This is the first and most important way to improve your grades Programming takes a lot of time It’s not easy to predict how long a program will take Do what is assigned, not “something like” what is assigned Learn to use your tools (Blue. J, JUnit, etc. ) Use comments and good style right from the beginning, not as a last-minute addition To prepare for tests, review and understand the lectures 31

The End He who works with his hands is a laborer. He who works The End He who works with his hands is a laborer. He who works with his hands and his head is a craftsman. He who works with his hands and his head and his heart is an artist. -- St. Francis of Assisi 32