This is CS 50.
Harvard College’s Introduction to Computer Science I
z
COMPUTER SCIENCE 50
DAVID J. MALAN
[email protected]
http://www.cs50.net/
1
2
0
50
100
150
200
250
300
350
400
450
19
89
19
90
19
91
19
92
19
93
19
94
19
95
19
96
19
97
19
98
z
19
99
20
00
20
01
20
02
20
03
20
04
20
05
20
06
20
07
20
08
20
Enrollment has increased by 168%
09
3
“Does everyone know more than me?”
6
Prior Coursework in CS
7
Gender Ratio
Fall 2007 Fall 2008
female female
29% 38%
male male
71% 62%
8
Expectations
‣ Attend all lectures and sections.
‣ Complete nine problem sets.
‣ Take two quizzes.
‣ Produce a final project.
9
Workload
10
Resources
‣ Lectures (+ Videos)
‣ Sections (+ Videos)
‣ Walkthroughs (+ Videos)
‣ Office Hours (+ Virtual)
‣ Website (PDFs)
z
‣ Scribe Notes
‣ Bulletin Board (Anonymized)
‣ [email protected]
‣ ...
11
hello, C?
#include
<stdio.h>
int
main(int
argc,
char
*argv[])
{
z
printf("hello,
world\n");
}
12
hello, Scratch!
13
Scratch Meets C
z
int
main(int
argc,
char
*argv[])
{
printf("hello,
world\n");
}
14
Statements
Scratch v. C
printf("hello,
world\n");
15
Boolean Expressions
Scratch v. C
(x
<
y)
((x
<
y)
&&
(y
<
z))
16
Conditions
Scratch v. C
if
(x
<
y)
{
printf("x
is
less
than
y\n");
}
else
if
(x
>
y)
{
z
printf("x
is
greater
than
y\n");
}
else
{
printf("x
is
equal
to
y\n");
}
17
Loops
Scratch v. C
while
(1)
{
printf("Hello!\n");
}
z
for
(int
i
=
0;
i
<
10;
i++)
{
printf("Hello!\n");
}
18
Variables
Scratch v. C
int
counter
=
0;
while
(1)
{
printf("%d\n",
counter);
counter++;
}
19
Arrays
Scratch v. C
z
char
*inventory[SIZE];
inventory[i]
=
"Orange";
20
Lectures
Week 0
Introduction. Bits. Binary. ASCII.
Programming. Algorithms. Scratch.
Statements. Boolean expressions. Conditions.
Loops. Variables. Threads. Events.
21
Lectures
Week 1
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, zcontinued. Loops,
continued.
#include
<stdio.h>
int
main(int
argc,
char
*argv[])
{
printf("hello,
world\n");
}
22
Lectures
Week 2
Functions, continued. Global variables.
Parameters. Return Values. Stack. Frames.
Scope. Arrays. Strings. Command-line
arguments. Cryptography.
23
Lectures
Week 3
Linear search. Binary search. Asymptotic
notation. Recursion. Pseudorandomness.
Bubble sort. Selection sort. Insertion sort.
Merge sort. Debugging.
24
Lectures
Week 4
Structures. Dynamic memory allocation. Stack
and heap. Pointers. Debugging, continued.
25
Lectures
Week 5
File I/O. Forensics. Linked lists. Stacks.
Queues.
26
Lectures
Week 7
Valgrind. Bitwise operators. Hash tables.
Trees. Binary search trees. Tries. Heaps.
Heapsort. Huffman coding.
27
Lectures
Week 8
TCP/IP. HTTP. XHTML. PHP. SQL.
28
Lectures
Week 9
DOM. CSS. Inheritance. JavaScript. Events,
continued. OOP. Ajax.
29
Lectures
Week 10
Preprocessing. Compiling. Assembling.
Linking. CPUs.
30
CS 50 in the Cloud
31
CS 50 in a Box
32
39
The CS 50 Fair
43
44