CS 50 Introduction to Computer Science I

Similar documents
Introduction to Basis and Practice in Programming

Administration Computers Software Algorithms Programming Languages

Spring 2018 NENG 202 Introduction to Computer Programming

CS 113: Introduction to

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

CS240: Programming in C

Concepts in Programming Languages

Fundamentals of Programming. Lecture 1: Introduction to C Programming

PROGRAMMAZIONE I A.A. 2017/2018

CS120 Computer Science I. Instructor: Jia Song

EL2310 Scientific Programming

by Pearson Education, Inc. All Rights Reserved.

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

CSc 372 Comparative Programming Languages

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

Course and Unix Intro

Chapter 1: Introduction


Introduction to Programming

Christopher Strachey and the Development of CPL. by Martin Richards

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

Introduction to Computer Science I

Programming Languages, Summary CSC419; Odelia Schwartz

A little bit of history. Jordi Cortadella Department of Computer Science

CS 61C: Great Ideas in Computer Architecture Lecture 2: Introduction to C, Part I

CSCI 3136 Principles of Programming Languages

Introduction. A. Bellaachia Page: 1

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

CSCI.4430/6969 Programming Languages Lecture Notes

CSCI 2132 Software Development. Lecture 2: Introduction to UNIX and Unix-like Operating Systems

Mechanization. A little bit of history. Mechanization. The old dream of mechanical computing. Jordi Cortadella Department of Computer Science

CSIS 104 Introduction to Computer Science

A Brief History of Computer Science

CMSC 330: Organization of Programming Languages. Administrivia

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Introduction to Computer Systems

Welcome to CS120 Fall 2012

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

Part (01) Introduction to Computer

Principles of Programming Languages. Lecture Outline

LECTURE/ STUDY NOTES ON C

CS 61: Systems programming and machine organization. Prof. Stephen Chong November 15, 2010

CS252 Advanced Programming Language Principles. Prof. Tom Austin San José State University Fall 2013

CSc 372 Comparative Programming Languages

Advanced Programming Concepts. CIS 15 : Spring 2007

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

CSc 372. Comparative Programming Languages. 1 : Introduction. Department of Computer Science University of Arizona

Chapter 1. The Big Picture


CS 241 Data Organization. August 21, 2018

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

COMP 102: Computers and Computing Lecture 1: Introduction!

Lecture 1: Course Introduction

What is a programming language?

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Welcome to. Instructor Marc Pomplun CS 470/670. Introduction to Artificial Intelligence 1/26/2016. Spring Selectivity in Complex Scenes

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

Low-Level Languages. Computer Programs and Programming Languages

Appendix to Topic IV

CSc 520. Course Outline (Subject to change) Course Outline (Subject to change)... Principles of Programming Languages. Christian Collberg

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

Component V Supporting Materials / Learn More Interesting Facts. Interesting Facts

Python for Earth Scientists

LECTURE 1. Overview and History

Dennis Ritchie. Dennis Ritchie - The Computer Science Pioneer without whom there would be no Jobs

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages

COSC 2P95. Introduction. Week 1. Brock University. Brock University (Week 1) Introduction 1 / 18

USING EPORTFOLIOS TO PROMOTE STUDENT SUCCESS THROUGH HIGH- IMPACT PRACTICES

Introduction to Computers, the Internet and the Web Pearson Education, Inc. All rights reserved.

Lecture 1: Course Introduction

Welcome to Introduction to Computer Science I

EL2310 Scientific Programming

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

CS Prof J.P.Morrison

Programming Languages: Part 1. Robert M. Dondero, Ph.D. Princeton University

FUNKCIONÁLNÍ A LOGICKÉ PROGRAMOVÁNÍ 1. ÚVOD DO PŘEDMĚTU, LAMBDA CALCULUS

Welcome to COS151! 1.1

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

1DL321: Kompilatorteknik I (Compiler Design 1) Introduction to Programming Language Design and to Compilation

How Many Programming Languages are there in this World? CS 199 Computers Unplugged. What is a Programming Language? What is a Programming Language?

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

1DL321: Kompilatorteknik I (Compiler Design 1)

Read & Download (PDF Kindle) Ruby: Programming, Master's Handbook: A TRUE Beginner's Guide! Problem Solving, Code, Data Science, Data Structures &

SCU SEEDs Workshop Angela Musurlian

Comp 333: Concepts of Programming Languages Fall 2016

0 Introduction: Computer systems and program development

CSE 333 Lecture 1 - Systems programming

CS415 Compilers Overview of the Course. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Chapter 2. Evolution of the Major Programming Languages

CSE 240 Introduction to Computer Architecture

EECS 282 Information Systems Design and Programming. Atul Prakash Professor, Computer Science and Engineering University of Michigan

CS111: Intro to Computer Science

Programming Languages Part 1. Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

CS 3304 Comparative Languages. Lecture 1: Introduction

Introduction to the course and basic programming concepts

Transcription:

CS 50 Introduction to Computer Science I Michael D. Smith smith@eecs.harvard.edu Fall 2005 CS50 1 Q1: What s in common? Internet commerce and electronic markets Blockbuster movies and their special effects Medical research and life-support systems The space program The photocopier that made your handouts The car that brought me here today The ipod you listened to on the way to class Each relies heavily on software and advances in computer science. CS50 2 1

CS50 3 CS50 4 2

Calculating machines Napier's Bones, c. 1620 CS50 5 Calculating machines Babbage and Byron,early 1800 s CS50 6 3

Calculating machines Babbage and Byron,early 1800 s Theory of computation Turing, 1936 CS50 7 Calculating machines Babbage and Byron,early 1800 s Theory of computation Turing, 1936 Programmable computers Aiken, 1944 CS50 8 4

Calculating machines Babbage and Byron,early 1800 s Theory of computation Turing, 1936 Programmable computers Aiken, 1944 ENIAC, 1946 CS50 9 Calculating machines Babbage and Byron,early 1800 s Theory of computation Turing, 1936 Programmable computers Aiken, 1944 ENIAC, 1946 Stored program computers Von Neumann, 1945 EDSAC, 1949 CS50 10 5

Algorithms Computer science began as the study of mechanical processes, now called algorithms Example: Let s design an algorithm that tells us what else we might choose to do (academically) at 10am on MWF CS50 11 A Computable Algorithm A strategy for solving a problem that is Precise: clearly and unambiguously defined Effective: each step is capable of being executed Finite: expressed in bounded space and executable in bounded time Is English a good language for expressing algorithms? CS50 12 6

Programming Languages Help humans to express algorithms precisely and effectively (only 2 of 3) History 1940 s: machine language 1950 s: assembly language 1960 s: imperative languages (e.g. Fortran, Algol, Cobol) 1970 s: system-programming languages (e.g. C) 1980 s: strongly-typed languages (e.g. Modula, ML) object-oriented languages (e.g. Smalltalk, C++) 1990 s: strongly-hyped languages (e.g. Visual..., Java) 2000 s: scripting languages (e.g. Perl, Python, Ruby) as stated by Kernighan CS50 13 Programming programming:computer science :: drafting:architecture Drafting is the technical lingua franca of architecture a necessary background skill not coextensive with architecture not performed well by many excellent architects CS50 14 7

Software Construction Coding and programming are misleading terms imply a mechanical (and boring) translation of preexisting designs into a computer language and maybe all you did in high school CS Software construction as we ll study it isn t mechanical involves substantial creativity and judgment CS50 15 Q2: What s the field? In what field can you walk into a sterile room, carefully controlled at 68ºF, and find viruses, Trojan horses, worms, bugs, bombs, crashes, flames, twisted sex changers, and fatal errors? from Code Complete by Steve McConnell CS50 16 8

We ll program primarily in C Invented in 1973 by Dennis Ritchie 63, PhD 68 Preceded by B (Ken Thompson, Bell Labs, 1970) BCPL (Martin Richards, Cambridge, 1967) Designed for systems programming (operating systems, compilers) Not designed for pedagogy CS50 17 Why C? Good things about the language: expressive, efficient, concise (cryptic?) permissive (doesn't get in your way) popular portable small step to other imperative language Fits with my teaching style: bottom-up approach abstraction without the mystery CS50 18 9

We ll also use Ruby Invented in 1993 by Yukihiro Matz Matsumoto Scripting language more powerful than Perl more object-oriented than Python strong connections to Smalltalk Designed to adhere to the Principle of Least Surprise makes programming fun Ruby is written in C http://www.leuf.net/ww/wikidn?jaoo2003report CS50 19 What you re missing require 'net/http' URL = 'HREF="http://www.registrar.fas.harvard.edu(/Courses/.*\.html)"' TITLE = '">([-A-Za-z ]+ \d*\w*\..*)<.a>' TIME = '\(fall term\). M., W., F., at 10' h = Net::HTTP.new('www.registrar.fas.harvard.edu', 80) resp = h.get('/courses/index.html', nil) if resp.message == "OK" resp.body.scan(/#{url}/) do resp2 = h.get($1, nil) if resp2.message == "OK" course = "NONE YET" resp2.body.each_line do line line.scan(/#{title}/) { course = $1 } line.scan(/#{time}/) { puts "\t" + course } end end end end CS50 20 10

What is Computer Science 50? Mathematics: What is computation and what is computable? Science: How can these be computed? By what algorithms? What are the properties of these algorithms, including correctness and efficiency? Engineering: How can actual systems that enable or manifest these computations be built and improved? CS50 21 Course Coverage Programming in C and Ruby under UNIX with associated tools Basic concepts in computer science algorithms and analysis data representation and data types computer architecture Design and implementation of algorithms Additional topics networks security and cryptography theoretical foundations of computation artificial intelligence CS50 22 11

Administration http:// www.fas.harvard.edu/ ~lib50 Prerequisites: none Texts: Harel, Computers Ltd. Kernighan & Ritchie, The C Programming Language Schwartz, Introduction to UNIX [ONLINE] Thomas & Hunt, Programming Ruby [OPTIONAL] Roberts, The Art and Science of C Teaching Fellows: excellent CS50 23 Course Work 8 problem sets Roughly weekly Simple programs An instant message client Typically 10-15 hours per week Collaboration policy Late policy 2 hourly exams and a final project Sections and topic sessions CS50 24 12