Melvin's digital garden

Teaching JavaScript

speaker: tan_sun_teck event: klcamp

Motivating examples

  • A,C,E, Ace Card trick
  • Guess number game 1 (4 digit, decreasing - increasing, sum is a multiple of nine)
  • Guess number game 2 (five tables and binary)
  • Guess number game 1.5 (same as before, but iterate until a fixpoint)

Competitive Programming

  • NOI, IOI, ACM/ICPC, TopCoder, Google Code Jam, CodeCrunch
  • Benefits: Scholarship, good job prospects

Online Resources

  • USACO, Spanish judge, SPOJ
  • CodeCrunch

What is programming?

program = data structures + algorithm

The first algorithm does not have to be the best. Think of problem solving as a series of iterative improvements.

Computer programming as manipulating information in memory (analogous to boxes)

Physical demonstration of the technique of swapping two variables with the use of a temporary variables.

Lab

  • students learn JavaScript from [http://www.w3schools.com/js|W3 Schools] by themselves
  • solve some programming tasks
  • register for CodeCrunch account and try to submit a task

Links to this note