Stanford CS101 Introduction : Lecture 1

 


Stanford CS101 Introduction

Nick Parlante - Stanford University (Nick's Home Page)

  • CS101 on Stanford Online
  • Basic ideas of how computers work
  • Not a magic box, basics understandable
  • Look inside, how they work (play)
  • Understand what they can do
  • No computer background required at all
  •  Curious .. next step

This class explores the essential qualities of computers, how they work, what they can and cannot do, and requires no computer background at all.

Acknowledgements: thanks to Google for supporting my early research that has helped me create this class.

Format note: Video + Document

  • Each video has a companion written document
  • Written explanations, diagrams, live code examples
  • Switch or revisit the document from the video
  • Review, curious about link ... it's all there

Fundamental Equation of Computers

The fundamental equation of computers is:

  Computer = Powerful + Stupid

  • Powerful - look through masses of a data
    -Billions of "operations" per second
  • Stupid
  •  -Operations are simple and mechanical
  •  -Nothing like "insight" or "understanding"
  • In movies - the mechanical stupidity of computers is missing
  • (HAL 9000 video)
  • Exercises: Powerful + Stupid ... comes through vividly
  • Stupid, but very useful. How is that?
  • That's what CS101 is about
    -Visit this funny computer world, play, see how it works
    -Understand how computers get useful work done
    -Ultimately not intimidated, computer is not some magic box
  • Hidden agenda: open eyes for some, more computer science courses
  • Computers are very powerful, looking through large amounts of data quickly. Computers can literally perform billions of operations per second.
  • However, the individual "operations" that computers can perform are extremely simple and mechanical, nothing like a human thought or insight. A typical operation in the language of computers is adding two numbers together.
  • So although the computers are fast at what they do, the operations that they can do are extremely rigid, simple, and mechanical. The computer lacks anything like real insight. Or put another way, computers are not like the HAL 9000 from the movie 2001: A Space Odyssey.
  • If nothing else, you should not be intimidated by the computer as if it's some sort of brain. The computer is a mechanical tool which can do amazing things, but it requires a human to tell it what to do.

High Level - How Does a Computer Work?

  • Computer is driven by "code" instructions (lots more later)
  • Instructions simple, mechanical, e.g. add 2 numbers
  • The computer "runs" a long series of instructions
  • Run through the instructions, purely mechanical
  • Question: if the computer is so mechanical...

computer running its simple instructions

But So Many Useful Features

  • Think of all the useful computer features (phone, camera)
    --Email, instant messaging
    --MP3 audio
    --Red-eye reduction
  • If computers are so stupid... how are they so useful?
  • What connects the two sides?

computer vs. red-eye reduction

Programmers Make It Happen

  • Human programmer thinks of a useful feature
    --Creativity, insight about problems, computers
  • Programmer thinks through the solution
  • "Algorithm" -- steps to accomplish
  • Breaking it down, writing code for the computer
  • Dumbing it down for the computer
  • This is computer programming
  • Every useful feature you've ever used has this pattern
  • This is a great picture
  • Best features of both sides: inexpensive/fast + creative insight
  • CS101 explorations: code and algorithm

programmer writes code to implement their feature idea

Since the computer is totally mechanical and stupid -- how do they manage to do so many useful things? The gap between the computer and doing something useful is where the human programmer creates solutions. Programming is about a person using their insight about what would be useful and how it could be done, and breaking the steps down into code the computer can follow.

Next: start with code

Comments

Popular posts from this blog

CSS Selectors : Chaining and specificity