44
z This is CS 50. COMPUTER SCIENCE 50 Harvard College’s Introduction to Computer Science I 1 DAVID J. MALAN [email protected] http://www.cs50.net/

This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

zThis is CS 50.

COMPUTER SCIENCE 50Harvard College’s Introduction to Computer Science I

1

DAVID J. [email protected]://www.cs50.net/

Page 2: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

2

Page 3: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Enrollment has increased by 168%

3

0

50

100

150

200

250

300

350

400

450

1989

19

90 19

91 19

92 19

93 19

94 19

95 19

96 19

97 19

98 19

99 20

00 20

01 20

02 20

03 20

04 20

05 20

06 20

07 20

08 20

09

Page 4: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 5: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 6: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

“Does everyone know more than me?”

6

Page 7: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Prior Coursework in CS

7

Page 8: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Gender Ratio

8

Fall 2007 Fall 2008

male71%

female29%

male62%

female38%

Page 9: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Expectations

9

‣ Attend all lectures and sections.‣ Complete nine problem sets.‣ Take two quizzes.‣ Produce a final project.

Page 10: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Workload

10

Page 11: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Resources

11

‣ Lectures (+ Videos)‣ Sections (+ Videos)‣ Walkthroughs (+ Videos)‣ Office Hours (+ Virtual)‣ Website (PDFs)‣ Scribe Notes‣ Bulletin Board (Anonymized)‣ [email protected]‣ ...

Page 12: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

12

#include  <stdio.h>

intmain(int  argc,  char  *argv[]){        printf("hello,  world\n");}

hello, C?

Page 13: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

13

hello, Scratch!

Page 14: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

14

intmain(int  argc,  char  *argv[]){        printf("hello,  world\n");}

Scratch Meets C

Page 15: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

15

printf("hello,  world\n");

StatementsScratch v. C

Page 16: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

16

(x  <  y)((x  <  y)  &&  (y  <  z))

Boolean ExpressionsScratch v. C

Page 17: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

17

if  (x  <  y){        printf("x  is  less  than  y\n");}else  if  (x  >  y){        printf("x  is  greater  than  y\n");  }else{  printf("x  is  equal  to  y\n");}

ConditionsScratch v. C

Page 18: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

18

while  (1){        printf("Hello!\n");}

for  (int  i  =  0;  i  <  10;  i++){        printf("Hello!\n");}

LoopsScratch v. C

Page 19: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

19

int  counter  =  0;while  (1){        printf("%d\n",  counter);        counter++;}

VariablesScratch v. C

Page 20: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

20

char  *inventory[SIZE];inventory[i]  =  "Orange";

ArraysScratch v. C

Page 21: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

21

Introduction. Bits. Binary. ASCII. Programming. Algorithms. Scratch. Statements. Boolean expressions. Conditions. Loops. Variables. Threads. Events.

Week 0

Page 22: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

C. Source code. Compilers. Object code. SSH. SFTP. GCC. Functions. Comments. Standard output. Arithmetic operators. Precedence. Associativity. Local variables. Types. Casting. Standard input. Libraries. Boolean expressions, continued. Conditions, continued. Loops, continued.

Lectures

22

Week 1

#include  <stdio.h>

int

main(int  argc,  char  *argv[])

{        printf("hello,  world\n");}

Page 23: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

23

Functions, continued. Global variables. Parameters. Return Values. Stack. Frames. Scope. Arrays. Strings. Command-line arguments. Cryptography.

Week 2

Page 24: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

24

Linear search. Binary search. Asymptotic notation. Recursion. Pseudorandomness. Bubble sort. Selection sort. Insertion sort. Merge sort. Debugging.

Week 3

Page 25: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

25

Structures. Dynamic memory allocation. Stack and heap. Pointers. Debugging, continued.

Week 4

Page 26: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

26

File I/O. Forensics. Linked lists. Stacks. Queues.

Week 5

Page 27: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

27

Valgrind. Bitwise operators. Hash tables. Trees. Binary search trees. Tries. Heaps. Heapsort. Huffman coding.

Week 7

Page 28: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

28

TCP/IP. HTTP. XHTML. PHP. SQL.

Week 8

Page 29: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

29

DOM. CSS. Inheritance. JavaScript. Events, continued. OOP. Ajax.

Week 9

Page 30: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

Lectures

30

Preprocessing. Compiling. Assembling. Linking. CPUs.

Week 10

Page 31: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

CS 50 in the Cloud

31

Page 32: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

CS 50 in a Box

32

Page 33: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 34: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 35: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 36: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 37: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 38: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 39: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

39

Page 40: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 41: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 42: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%
Page 43: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

z

The CS 50 Fair

43

Page 44: This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall 2008 male 71% female 29% male 62% female 38%

44