How Programmers See The World - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

How Programmers See The World

Description:

Animals.Dogs.BullDog is a class. but Lemmy here is. an actual dog. Lemmy is an Object. Animals.Dogs.BullDog.Lemmy. Note the abstraction ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 20
Provided by: cseBu
Category:

less

Transcript and Presenter's Notes

Title: How Programmers See The World


1
How Programmers See The World
  • OBSESSIVELY, COMPULSIVELY ORDERED
  • EVERYTHING IN ITS PLACE
  • EVERYTHING HAS A PLACE
  • SPELLING, UPPER and lower Case
  • THERES NOTHING FREE FORM ABOUT IT
  • UNFORTUNATELY, ITS A WHOLE NEW LANGUAGE

2
The sky is blue
  • No,
  • Universe.Galaxies.MilkyWay.OurSun.Planets.
  • Earth.Sky Color.blue

3
Computers
  • Computers.big
  • Computers.small.mp3players.dontWork.iPod

4
What Is This?
  • Its called classification
  • Youve heard this before
  • A class of problems
  • In a class by itself
  • Classy new styles
  • A Class is a container of properties and behaviors

5
Talking to your computer
  • Your computer speaks through the keyboard and
    monitor
  • Not like anything youve
  • ever seen
  • System.out.println
  • JOptionPane.showUserDialog

6
x?
  • "real" numbers are rarely used in computing.
  • Computer programs use "variables" that hold real
    numbers.
  • x might be equal to 14 now, but something else
    later.

7
(No Transcript)
8
Finally
  • Class is the category.subCategory.subSub
  • Object is an example of something of that class
  • Animals.Dogs.BullDog is a class
  • but
    Lemmy here is
  • an
    actual dog.

  • Lemmy is an Object

Animals.Dogs.BullDog.Lemmy
9
Note the abstraction
  • Impress your friends, because this IS rocket
    science
  • Abstract ? ? ? ? Specific
  • General ? ? ? Concrete
  • High Order ? ? ? ? Low Order
  • FreeForm ? ? ? ? Details
  • Class ? SubClass ? SubClass ? Object

10
Solve A Problem
  • What could we possibly build a computer system to
    do, that is currently being done by animals?

11
Now, Objects are never alone

I see three kinds of relationships here
12
Our World The Problem Space
  • Real problems, in the real world. In REAL TIME.
  • Real Time is an interesting concept.

13
The Only Tool We Have
  • The Computer The Solution Space
  • Computers solve real world problems
  • To be solved, the real world problem must be
    reflected in the computer
  • Modeling

14
Robots
  • They LOOK like humans. Why?

15
The Essence of Programming
  • We build high quality systems to the extent that
    we can model the problem space within the
    solution space.
  • Programs are models of something in the real
    world.

16
Classification and Modeling
  • Ponder events in the real world. Analysis
  • Identify the actors (objects). Specification
  • Generalize them into classes of that describe
    their, um, properties and behaviors. Model
  • Why Model ? Because its not real. Its in our
    computer.

17
Where do we implement our model?
  • In a document. In a file. In the computer.
  • Its called a computer program, but it reflects a
    MODEL, not a list of instructions.
  • When the computer runs our program, it
    construct a model in memory.
  • It uses classes to build objects in memory.
  • The objects interact, just like the system it
    represents.

18
What does the model give us?
  • So what, weve recreated a little piece of the
    real world in our computer?
  • It gives us INFORMATION, via SIMULATION.

19
Any computer that does something
  • Is a model of something in the real world
  • mp3 players are bands
  • Cell phones are your friends
  • ATMs are bank tellers
  • Robots are people
  • Video games are adventures
  • Nemo is an actor
Write a Comment
User Comments (0)
About PowerShow.com