This is CS 50. Harvard College’s Introduction to Computer ... · z Gender Ratio 8 Fall 2007 Fall...

Preview:

Citation preview

zThis is CS 50.

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

1

DAVID J. MALANmalan@post.harvard.eduhttp://www.cs50.net/

2

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

z

“Does everyone know more than me?”

6

z

Prior Coursework in CS

7

z

Gender Ratio

8

Fall 2007 Fall 2008

male71%

female29%

male62%

female38%

z

Expectations

9

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

z

Workload

10

z

Resources

11

‣ Lectures (+ Videos)‣ Sections (+ Videos)‣ Walkthroughs (+ Videos)‣ Office Hours (+ Virtual)‣ Website (PDFs)‣ Scribe Notes‣ Bulletin Board (Anonymized)‣ help@cs50.net‣ ...

z

12

#include  <stdio.h>

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

hello, C?

z

13

hello, Scratch!

z

14

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

Scratch Meets C

z

15

printf("hello,  world\n");

StatementsScratch v. C

z

16

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

Boolean ExpressionsScratch v. C

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

z

18

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

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

LoopsScratch v. C

z

19

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

VariablesScratch v. C

z

20

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

ArraysScratch v. C

z

Lectures

21

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

Week 0

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");}

z

Lectures

23

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

Week 2

z

Lectures

24

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

Week 3

z

Lectures

25

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

Week 4

z

Lectures

26

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

Week 5

z

Lectures

27

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

Week 7

z

Lectures

28

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

Week 8

z

Lectures

29

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

Week 9

z

Lectures

30

Preprocessing. Compiling. Assembling. Linking. CPUs.

Week 10

z

CS 50 in the Cloud

31

z

CS 50 in a Box

32

39

z

The CS 50 Fair

43

44

Recommended