CS1101S

Introduction and First Lecture

15 August 2012

Martin Henz

Welcome to SoC

yoda

1. What to expect

Expect the unexpected!

2. Why you want to take CS1101S

      (or not)

Module content

Developed at MIT in the 1980s, using the programming language Scheme MIT

1101S Legacy (the beginning)

Introduced in DISCS in Sem 1 1997/1998 as "IC1101S"

logo           by Jacob Katzenelson and                               Leong Tze Yun background

         

         

         

The recitation were done by Leong Hon Wai. Terence Sim was Honorary TA, Razvan Voicu was one of the TAs, too.

Jacob also taught the module in Sem 1 1998/1999, by then renamed to "CS1101S".

1101S Legacy (...continued...)

Taught by Leong Tze Yun in Sem 1 1999/2000 tzeyun

1101S Legacy (...continued...)

Taught by Razvan Voicu in Sem 1 2001/2002 terence Razvan also taught the module in Sem 1 2002/2003 and Sem 1 2003/2004.

1101S Legacy (...continued...)

Taught by Terence Sim in Sem 1 2004/2005 terence Terence also taught the module in Sem 1 2005/2006.

110S Legacy (...continued...)

Taught by

logo           Razvan Voicu and                               Ben Leong background

          in Sem 1 2006/2007

1101S Legacy (...continued...)

Ben Leong took over the module in Sem 1 2007/2008 and taught it until Sem 1 2011/2012 (including the co-teaching with Razvan, 6 years) ben

1101S Legacy (...continued...)

Martin teaches the module in Sem 1 2012/2013, for the first time world-wide using JavaScript instead of Scheme ben

The Cast

ben

Martin Henz

Associate Professor in Computer Science, NUS.

Deputy Director for Residential Life at the USPrc

Acted in Bram Stoker's Dracula in 2012 (minor roles) ben

Avengers

The life blood of the module: Discussion groups, 24-hours marking, running the module server, fine-tuning and testing the student tasks, handle "awards and incentives", run contests, etc etc

Junwei

I'd like to have my interesting fact to be "Patrick's nickname is 'Rabbit'", so my introduction should preferably be immediately after his.

I'm not really very photogenic, so for the picture this is the best I could dig up: ben

Zi Chun

Don't judge him by his size! He loves calisthenics and recently picked up the sport of arm-wrestling.

Zi Chun in his favourite sweater ben

Michael

something interesting:

1. Junwei was my CS1101S tutor
2. Zichun was my CS2020 tutor ben

Richard Goulter

From New Zealand. Took CS1101S last batch.

All round nice guy. Likes long walks on the beach, pina coladas, & getting caught in the rain.

If that's a bit too silly, then something boring like "has an awesome Kiwi accent". ben

Wang Sha

I took CS1101S four years ago and I am in my 5th year in school now. Love the undergraduate life in NUS. Had lots of adventures and fun in learning with fellow students. Created my own facebook app in year one. For the past six months, I was interning at an Israeli IT start-up company.

Personal goal: hope I can run as much as I code.

p.s. the photo was taken at the Purim party in Israel ben

Chun Teck

Just back from exchange in Sweden, spending 6 months of craziness in Europe touring 13 different countries and more than 20 cities. ben

Patrick

Patrick likes sweet stuff and really likes cats, and can often be found looking for either of them. ben

Information Sources

The Flow

Textbook

ben

...with a twist: Translated into JavaScript! Available in the module homepage.

Programming Environment

Firefox

Komodo Edit

Firebug

JFDI Academy

7 problem sets

containing 22 main missions

+ side quests and contests

+ 24-hour grading

+ unlock achievements

+ Facebook integration

Complete Missions

+ XP

Complete Side Quests

+ XP

Win Contests

+ XP

Attend Discussion Groups

+ XP

Post on Forum

+ XP

Enough XP

LEVEL UP!

Assessment Overview

Are the grades "curved"?

NO

CS1101S is hard

modeled after MIT course

Feels like a bullet train?

NORMAL

Upside

Help is available

Upside

Fun missions, contests, quests

Credits for CS1101S Preparation

Teething Problems

They will crop up. Let's handle them with grace on both sides.

Computational Thinking

Why program?

What is programming?

communicating a computational process

Why JavaScript?

History of JavaScript

Use of ECMAScript

Elements of Programming

Primitives

Means of combination

5 + 8

(5 + 3) - (2 * 3)

infix notation for primitive applications

Means of abstraction: Naming

55 + 8

var a = 55;
a + 8

Means of abstraction: Function expressions

function(x) { return x * x; }

represents a function that takes an argument x and produces (returns) x multiplied by itself.

Combining function expressions and naming

var square = function(x) { return x * x; }

Evaluation of expressions

(3 * 4) + (7 - 8)

12 + (7 - 8)

12 + -1

11

  1. Evaluate of sub-expressions
  2. Apply operator

Environment

Example: x * y

Combining functional abstraction and naming

var square = function(x) { return x * x; }

can be written (nicer) as

function square(x) { return x * x; }

(note name, formal parameters, function body)

Using square

square(21)

square(2 + 5)

square(square(3))

Defining a function in terms of another one

function sum_of_squares(x,y) {
      
return square(x) + square(y);
}

Another example

function hypotenuse(a,b) {
      
return Math.sqrt(sum_of_squares(a,b);
}

Summary

Outlook

/

#