lecture 1

48
Winter, 2007 Computing for Engineers 1 Introduction to Computing Nathan Friedman Fall, 2006

Upload: sammy17

Post on 13-Dec-2014

450 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Lecture 1

Winter, 2007 Computing for Engineers 1

Introduction to Computing

Nathan FriedmanFall, 2006

Page 2: Lecture 1

Winter, 2007 Computing for Engineers 2

Why Am I Taking This Course?

Page 3: Lecture 1

Winter, 2007 Computing for Engineers 3

Why Am I Taking This Course?

Reason #1:My faculty made me!!

Page 4: Lecture 1

Winter, 2007 Computing for Engineers 4

Why Am I Taking This Course?

Reason #1:My faculty made me!!

Reason #2:I’m actually going to learn a lot of

interesting new things

Page 5: Lecture 1

Winter, 2007 Computing for Engineers 5

Why Am I Taking This Course?

Reason #1:My faculty made me!!

Reason #2:I’m actually going to learn a lot of

interesting new things(Believe it or Not)

Page 6: Lecture 1

Winter, 2007 Computing for Engineers 6

What Are We Going to Study?

There are three components to this course

Page 7: Lecture 1

Winter, 2007 Computing for Engineers 7

What Are We Going to Study?

There are three components to this course

1. FORTRAN2. C3. Algorithms

Page 8: Lecture 1

Winter, 2007 Computing for Engineers 8

FORTRAN

Fortran was one of the first high level programming languages. It was designed to be used for scientific applications and has been updated several times. It remains an important language in the engineering community.

We will spend about four weeks studying how to design and implement programs using Fortran

Page 9: Lecture 1

Winter, 2007 Computing for Engineers 9

C

We will spend four weeks studying a language called C. This language was developed in the 1970’s for systems programming applications. It is very powerful and efficient and very widely used in many applications areas including scientific and engineering computations.

Many modern languages are based on C, making it a useful springboard to learning new languages

Page 10: Lecture 1

Winter, 2007 Computing for Engineers 10

Algorithms

There are many fundamental problems that arise in engineering and other areas of application.

These include sorting data, searching for specific data values, numerical integration, finding roots of functions, solving ordinary differential equations and solving systems of linear equations

We will spend about four weeks studying important algorithms for these problems.

Page 11: Lecture 1

Winter, 2007 Computing for Engineers 11

Why Study This Stuff?

Computers play a central role in almost every branch of engineering

You will often have to put into practice the theoretical ideas you study in your courses.

This may involve the use of software packages with limitations on their applicability.

You may have to write programs during to modify or extend this software.

Even using programs developed by others may require some knowledge of the programming process.

Page 12: Lecture 1

Winter, 2007 Computing for Engineers 12

What if I never write a program again?

Besides programming this course will give you: A basis for interpreting and appraising the results

and limitations of software Tools for the analysis and design processes that

underlie engineering practices Sharper logical thinking and problem solving skills Tools for scientific and mathematical applications

Page 13: Lecture 1

Winter, 2007 Computing for Engineers 13

In short, this course will make you a better person

Page 14: Lecture 1

Winter, 2007 Computing for Engineers 14

In short, this course will make you a better person

Page 15: Lecture 1

Winter, 2007 Computing for Engineers 15

Course Staff

This course is taught by a team that includes a course coordinator/lecturer, a lecturer for the second section and a number of teaching assistants.

The lecturers will present the course material in the lectures and be available during office hours to assist you.

The teaching assistants will run tutorials, assist you during their office hours and grade your assignments.

Page 16: Lecture 1

Winter, 2007 Computing for Engineers 16

Instructors

Nathan Friedman (course coordinator) [email protected], (514) 398-7076

Yi Lin [email protected], (514) 398-7071 ext 0664http://www.cs.mcgill.ca/~ylin30/courses/

cs208/

Page 17: Lecture 1

Winter, 2007 Computing for Engineers 17

Teaching Assistants

Nicolas Gervasi [email protected]

Zouhair Mahboubi [email protected]

Marina [email protected]

Omar [email protected]

Page 18: Lecture 1

Winter, 2007 Computing for Engineers 18

Timetable

Lectures are Tuesday, Thursday 2:30-4:00

Tutorials Weekly tutorials will be held Time and place to be announced Attendance is not mandatory but

highly recommended

Page 19: Lecture 1

Winter, 2007 Computing for Engineers 19

Sections

Assignments and tests will be the same for both sections of the course. You are free to attend whichever lecture you prefer

Section 1 is taught by Nathan Friedman in ENGTR 0100

Section 2 is taught by Yi Lin in ENGTR 1080

Page 20: Lecture 1

Winter, 2007 Computing for Engineers 20

Computing Facilities

The Faculty of Engineering computers have all the software required for the course

The main facilities are in FDA 1 and MDHAR G15

Software used in the course can also be downloaded from the class web site on WebCT

Page 21: Lecture 1

Winter, 2007 Computing for Engineers 21

Computers in Engineering

Please see the course description and outline that is available (in pdf format) on WebCT (at www.mcgill.ca/webct/)

That document was prepared by Jean Francois Bastien, a former TA for the course.

It will be an invaluable tool for you to use throughout the course.

Page 22: Lecture 1

Winter, 2007 Computing for Engineers 22

Resources

TextbookFORTRAN, C and Algorithms by G.

Ratzer and J. Vybihal WebCT resources include

Lecture notes Code for algorithms studied in class Previous midterm and final

examinations

Page 23: Lecture 1

Winter, 2007 Computing for Engineers 23

Grading

Assignments There will be 3 assignments in Fortran and 3

in C They will be worth 20% of the final grade

Midterm A 90 minute midterm will be held during

class time It will be worth 30% of the final grade

Final Examination A 3 hour final exam will be held at the end of

term It will be worth 50% of the final grade

Page 24: Lecture 1

Winter, 2007 Computing for Engineers 24

Academic Integrity

You are encouraged to attend tutorials to get ideas for solving the assignments

You can discuss approaches to solving the problems

BUT: You must code the programs yourselves and not copy from anyone else

Copying all or portions of a program can be detected by software

If you copy an assignment, you will receive a zero on it

Please read the McGIl Code of Student Conduct at www.mcgill.ca/integrity for the University policy on cheating and plagiarism and disciplinary procedures

Page 25: Lecture 1

Winter, 2007 Computing for Engineers 25

How do I Ace this course?

Prepare for lectures Slides for the lectures will be

available on WebCT for you to read and download

Ask questions about anything you find unclear

Page 26: Lecture 1

Winter, 2007 Computing for Engineers 26

How do I Ace this course?

Prepare for lectures Attend the tutorials

We will try and set times to accommodate as many of you as possible

This is an opportunity to see more examples, get pointers on how to approach assignments and benefit from the experience the TA’s have had with this course in the past

Page 27: Lecture 1

Winter, 2007 Computing for Engineers 27

How do I Ace this course?

Prepare for lectures Attend the tutorials See the TA’s during lab hours

(in FDA 1)

Page 28: Lecture 1

Winter, 2007 Computing for Engineers 28

How do I Ace this course?

Prepare for lectures Attend the tutorials See the TA’s during lab hours See your instructor during office

hours Don’t be afraid to ask questions I will also try to answer emails within

24 hours

Page 29: Lecture 1

Winter, 2007 Computing for Engineers 29

How do I Ace this course? Prepare for lectures Attend the tutorials See the TA’s during lab hours See your instructor during office

hours Do the assignments by yourself

The only way to learn how to program is to program

There is no substitute for practice

Page 30: Lecture 1

Winter, 2007 Computing for Engineers 30

How do I Ace this course?

Prepare for lectures Attend the tutorials See the TA’s during lab hours See your instructor during office hours Do the assignments by yourself Study using old midterms and finals as

well as sample programs on WebCT

Page 31: Lecture 1

Winter, 2007 Computing for Engineers 31

Let’s Get Started

Page 32: Lecture 1

Winter, 2007 Computing for Engineers 32

A Brief History

The Abacus is considered to be the first mechanical computing device

Page 33: Lecture 1

Winter, 2007 Computing for Engineers 33

Mechanical Calculators 1612 – John Napier used floating point

arithmetic and invented the logarithm 1622 – William Oughtred created the

slide rule based on Napier’s logarithms. This was the primary calculator used by engineers until the 1960’s

1642 – Blaise Pascal created a machine that could add and subtract, automatically carrying numbers

Page 34: Lecture 1

Winter, 2007 Computing for Engineers 34

The Pascaline -- 1642

Page 35: Lecture 1

Winter, 2007 Computing for Engineers 35

Mechanical Calculators 1612 – John Napier used floating point

arithmetic and invented the logarithm 1622 – William Oughtred created the

slide rule based on Napier’s logarithms. This was the primary calculator used by engineers until the 1960’s

1642 – Blaise Pascal created a machine that could add and subtract, automatically carrying numbers

1673 – Gottfried Leibnitz built a calculator that could multiply as well

Page 36: Lecture 1

Winter, 2007 Computing for Engineers 36

The Industrial Age

Joseph-Marie Jacquard invented an automatic loom using punched cards to control patterns in the fabrics. (Leading to riots against replacing people by machines.)

Page 37: Lecture 1

Winter, 2007 Computing for Engineers 37

Charles Babbage 1822 – Charles Babbage designed

the Difference Engine for comuputing navigational tables

1833 – Designed the Analytical Engine that had the basic components used in a modern computer

1847-1849 – Work on Difference Machine but technology too primitive to build it. In 1991 the Science Museum in London built it

Page 38: Lecture 1

Winter, 2007 Computing for Engineers 38

Early Modern Machines

1935-38 Konrad Zuse developed Z-1 and Z-2 computers using binary arithmetic

1936-39 John Vincent Atanasoff and John Berry built ABC computer for solving linear systems in Physics. Introduced ALU and rewriting memory.

Page 39: Lecture 1

Winter, 2007 Computing for Engineers 39

ENIACThe First Electronic Computer

1943 Work started on ENIAC at University of Pennsylvania under John Mauchly and J. Presper Eckert with Herman Goldstein

A general purpose computer used for computing artillery tables

Page 40: Lecture 1

Winter, 2007 Computing for Engineers 40

ENIAC Used 18,000

vacuum tubes U shaped, 25m

long, 2.5m high, 1m wide

Programmed by plugging cables and setting switches

From 1 hour to 1 day to program

Page 41: Lecture 1

Winter, 2007 Computing for Engineers 41

Von Neumann Computer

1944 – John von Neumann joined ENIAC team.

Credited with the idea of storing programs as numbers

1945 – von Neumann proposed a stored program computer called EDVAC

Page 42: Lecture 1

Winter, 2007 Computing for Engineers 42

The 1950’s

IBM produces series of computers with Jean Amdahl as chief architect

Memory upgraded to magnetic core memory, magnetic tapes and disks with movable read/write heads

1957 – Fortran introduced 1958 – Integrated Circuit invented

Page 43: Lecture 1

Winter, 2007 Computing for Engineers 43

The 1960’s

1963 – ASCII code introduced 1965 – IBM/360 introduced using

integrated circuits 1965 – DEC introduced PDP-8, first

minicomputer 1969 – Work began on ARPAnet

(the predecessor of the internet)

Page 44: Lecture 1

Winter, 2007 Computing for Engineers 44

The Early 1970’s 1971 – Intel 4004 the first

microprocessor and the first floppy disk introduced

1973 – Xerox invents Ethernet 1775 – First PC, MITS Altair 8800 (no

keyboard, no display, no auxilliary storage)

Bill Gates and Paul Allen wrote a BASIC compiler for the Altair, their first product

Page 45: Lecture 1

Winter, 2007 Computing for Engineers 45

The Later 1970’s

1976 – Steve Jobs and Steve Wozniak develop Apple I in their parent’s garage

1976 – Cray-1, first supercomputer announced

Page 46: Lecture 1

Winter, 2007 Computing for Engineers 46

IBM PC 1981 – IBM enters

market with IBM PC based on Intel 8088 chip

Release of Microsoft DOS for the PC

1982 Computer chosen by Time Magazine as “Man of the Year”

Page 47: Lecture 1

Winter, 2007 Computing for Engineers 47

Apple Macintosh 1984 – Macintosh

introduced, based on Xerox Alto. The icon and mouse became the main tools for interacting with computers

Page 48: Lecture 1

Winter, 2007 Computing for Engineers 48

INTERNETS

SUN THE NETWORK IS THE COMPUTER

WHO NEXT?