Comp210 Lecture # 1    Spring 2003

Welcome to Comp210!

Admnistrivia

  1. The Comp210 home page and what you can find there
  2. General course info = the handout. The key points:
    1. Who -- the staff
    2. What -- the assignments, etc.
      1. Once a week homework plust 3 exams.
      2. Working in pairs.
      3. Electronically dropping off homework
    3. Where - the labs
      1. Sign up for a lab.
      2. Go to your preferred lab this week
    4. How - the Honor System

What is Computing?

  1. What do computers do anyway?
    1. What does it mean to "compute" something?
    2. What are we saying about the specifics of what a computer does?
    3. How does one accomplish the task of "general purpose" computing?
    4. The difference between
      1. Universal = can do everything.
      2. Abstract = does the "essence" of things. Needs "concrete", specific inputs to do anything in particular.
    5. Does a computer perform universal tasks (does everything possible) or does it do "abstract" tasks?
  2. What is a "program"?
    1. Specific tasks vs. abstract tasks
    2. How do we represent abstract tasks?
      1. What is "mathematics"?
      2. What is a mathematical "function"?
      3. The relationship between tasks and functions.
    3. Programs can be represented by functions.

Programming with Functions

There are lots of examples of functions:

So functions aren't always about numbers. That said, today we'll only use functions on numbers. (We'll start enriching our world starting next time.)

Examples of computing, and generalizing to programs:

The First Law of Programming: Your code should reflect the way you think about a problem.

The code in a program is an expression of how you conceptualize the problem. Programming is a very personal process since it depends on the individual programmer's view of the world.

Code that reflects a natural way of looking at the problem is both easier to understand, easier to maintain, and more likely to be correct.

Summary:

 

©2002 Stephen Wong