Welcome to So C CS 1101 S or

  • Slides: 57
Download presentation
Welcome to So. C!

Welcome to So. C!

CS 1101 S or CS 1010? why are you here?

CS 1101 S or CS 1010? why are you here?

DDP folks You can sleep

DDP folks You can sleep

Turing Programme Yes, you also can sleep

Turing Programme Yes, you also can sleep

Scheme Developed at MIT in 1975 to teach programming methodology

Scheme Developed at MIT in 1975 to teach programming methodology

Scheme 1994 Introduced at NUS 14 years ago

Scheme 1994 Introduced at NUS 14 years ago

What is Scheme?

What is Scheme?

(+ 5 3) 8 (- (+ 5 3) (* 2 3)) prefix notation 2

(+ 5 3) 8 (- (+ 5 3) (* 2 3)) prefix notation 2

(+ 5 6) 11 (define a 5) (+ a 6) 11

(+ 5 6) 11 (define a 5) (+ a 6) 11

Scheme is Expressive (define (square To x) (* x x)) square something, multiply it

Scheme is Expressive (define (square To x) (* x x)) square something, multiply it by itself (square 2) 4 (square 3)) 36 81

Congratulations! You know Scheme

Congratulations! You know Scheme

Why Scheme?

Why Scheme?

Simple (didn’t you just learn it in 10 mins? )

Simple (didn’t you just learn it in 10 mins? )

Futile to Teach a Language (Here today, gone tomorrow)

Futile to Teach a Language (Here today, gone tomorrow)

Computational Thinking

Computational Thinking

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Towers of Hanoi

Can you solve this for 1, 000 discs?

Can you solve this for 1, 000 discs?

How would we think about the problem?

How would we think about the problem?

What if we have one disc?

What if we have one disc?

What if we have no discs? Do nothing!

What if we have no discs? Do nothing!

Towers of Hanoi A B C Suppose we know how to move 3 discs

Towers of Hanoi A B C Suppose we know how to move 3 discs from A to C

Towers of Hanoi A B C Suppose we know how to move 3 discs

Towers of Hanoi A B C Suppose we know how to move 3 discs from A to C

Towers of Hanoi A B C Claim: we can move 3 discs from A

Towers of Hanoi A B C Claim: we can move 3 discs from A to B. Why?

Towers of Hanoi A B C Claim: we can move 3 discs from A

Towers of Hanoi A B C Claim: we can move 3 discs from A to B. Why?

Towers of Hanoi A B C What do we do for 4 discs?

Towers of Hanoi A B C What do we do for 4 discs?

Towers of Hanoi (define (move-tower size from to extra) (cond ((= size 0) ’do-nothing)

Towers of Hanoi (define (move-tower size from to extra) (cond ((= size 0) ’do-nothing) (else (move-tower (- size 1) from extra to) (print-move from to) (move-tower (- size 1) extra to from)))) from extra to

Towers of Hanoi (define (print-move from to) (newline) (display "move top disk from ")

Towers of Hanoi (define (print-move from to) (newline) (display "move top disk from ") (display from) (display " to ") (display to))

Recursion

Recursion

CS 1101 S Road Map Memoization Dynamic Programming Higher-Order Procedures Procedural Abstraction Java Streams

CS 1101 S Road Map Memoization Dynamic Programming Higher-Order Procedures Procedural Abstraction Java Streams Object-Oriented Programming List Processing Iteration Wishful Thinking Symbolic Data Abstraction Recursion ADVANCED INTERMEDIATE Generic Operators Mutation & State BASIC Order of Growth Fundamental concepts of computer programming

“Star Wars” RPG

“Star Wars” RPG

JFDI Academy

JFDI Academy

CS 1101 S or CS 1010?

CS 1101 S or CS 1010?

How to decide?

How to decide?

Puke Test

Puke Test

What is your pain threshold?

What is your pain threshold?

Scheme vs C • Who would you marry? –Pretty but poor? –Rich but ugly?

Scheme vs C • Who would you marry? –Pretty but poor? –Rich but ugly?

Ask your friend

Ask your friend

Ask a senior

Ask a senior

Google is your Friend “cs 1101 s midterm review”

Google is your Friend “cs 1101 s midterm review”

Why are you here?

Why are you here?

What is the meaning of life?

What is the meaning of life?

C Java CS 1010 CS 1020 CS 2010 (4 MC) Scheme Java CS 1101

C Java CS 1010 CS 1020 CS 2010 (4 MC) Scheme Java CS 1101 S CS 2020 (5 MC) Java. Script CS 1101 R (1 MC)

many paths to success is not about how fast

many paths to success is not about how fast

“ “Your time is limited, so don't waste it living someone else's life. Don't

“ “Your time is limited, so don't waste it living someone else's life. Don't be trapped by dogma - which is living with the results of other people's thinking. Don't let the noise of other's opinions drown out your own inner voice. . .

“ . . . And most important, have the courage to follow your heart

“ . . . And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary. ” - Steve Jobs

Caveat • To enroll in CS 1101 S, min requirement of A grade for

Caveat • To enroll in CS 1101 S, min requirement of A grade for ‘A’ Level Math or equivalent. • Or you can appeal at Undergrad Office For your own protection

Please indicate preference by 12 noon tomorrow

Please indicate preference by 12 noon tomorrow

QUESTIONS

QUESTIONS