Presentation is loading. Please wait.

Presentation is loading. Please wait.

Demystifying Programming

Similar presentations


Presentation on theme: "Demystifying Programming"— Presentation transcript:

1 Demystifying Programming
August 18 the basics Demystifying Programming

2 Today’s agenda Review last class Intro to Programming
Intro to Abstraction Blown to Bits!

3 Create Piazza Account Get an assigned laptop for the year
Create a Piazza account via Teacher website at Lincoln. Follow the steps.

4 Sample 1st Program

5 Who has programmed before?
ACTIVITY: First hear from the “real” programmers. Goal is to get everyone to realize that they’ve programmed. Ask them about: Alarm clocks VCR / TiVo Microwave Then start asking them what other electronic device that they use where they tell it to do something for them…

6 ACTIVITY: First hear from the “real” programmers. Goal is to get everyone to realize that they’ve programmed. Ask them about: Alarm clocks VCR / TiVo Microwave Then start asking them what other electronic device that they use where they tell it to do something for them…

7 You all are already programmers!
ACTIVITY: First hear from the “real” programmers. Goal is to get everyone to realize that they’ve programmed. Ask them about: Alarm clocks VCR / TiVo Microwave Then start asking them what other electronic device that they use where they tell it to do something for them…

8 Group Exercise: Write and evaluate short program NumCourses = 3
English = 3.2 Algebra = 2.7 Chemistry = 3.1 GradePtAve = _____________________ Part One: Write the formula Part Two: Calculate the GPA

9 Group Exercise - Recap Write and evaluate short program NumCourses = 3
English = 3.2 Algebra = 2.7 Chemistry = 3.1 GradePtAve = ( English + Algebra + Chemistry ) / NumCourses GPA = ( ) / 3 = 3.0

10 Central Processing Unit (CPU)
Computer Architecture Display Memory Central Processing Unit (CPU) Input / Output (IO) Ex. Keyboard DIsk

11 3. Arithmetic Logic Unit (ALU)
1 3 1. Instructional Memory Stores the instructions that get fed into the ALU. 2. Main Memory Stores the variable names and variable values. 3. Arithmetic Logic Unit (ALU)   It executes the instructions, performs the calculations, and returns the results. 2

12 4. Program Counter. 5. Variables
1 3 4. Program Counter. Tells the ALU what step to execute next. 5. Variables They store the results from the ALU processing. 2

13 4 5 1 3 2

14 4 5 1 3 2

15 fundamentals Abstraction

16 Abstraction Detail removal and Generalization

17 Detail removal The act or process of leaving out of consideration one or more properties of a complex object so as to attend to others.

18 Detail removal Automatic Generation of Detail Maps Maneesh Agrawala (UCB EECS), among others

19 The London Underground map (1928 vs 1933) by Harry Beck
Detail removal Abstraction is the idea that you focus on the essence, the cleanest way to map the messy real world to one you can build The London Underground map (1928 vs 1933) by Harry Beck

20 Generalization The process of formulating general concepts by abstracting common properties of instances

21 Generalization you have a farm with many animal kinds.
different food for each you have directions that say To feed dog, put dog food in dog dish To feed chicken, put chicken food in chicken dish To feed rabbit, put rabbit food in rabbit dish Etc… how could you do better? To feed <animal>, put <animal> food in <animal> dish

22 Generalization y = sin(x)
we’ll be doing this all the time in this class sometimes it may even look like math! y = sin(x) we think about what inputs make sense to use so we don’t have to duplicate code

23 Abstraction is a BIG idea fundamental to CS
ACTIVITY: First hear from the “real” programmers. Goal is to get everyone to realize that they’ve programmed. Ask them about: Alarm clocks VCR / TiVo Microwave Then start asking them what other electronic device that they use where they tell it to do something for them…

24 Abstraction Ford Model T Tesla Model S

25 Class Reading “Blown to Bits: Your Life, Liberty, and Happiness After the Digital Explosion” by Hal Abelson

26 Lab Exercise: Using the computer at your desk,
find the free online version of the class text: “Blown to Bits: Your Life, Liberty, and Happiness After the Digital Explosion” by Hal Abelson

27 Lab Exercise:

28 Reviewing Today: Intro to Programming Computing Intro to Abstraction Computing Blown to Bits!

29 Computer Program Counter. Variables
Tells the ALU what step to execute next. Variables They store the results from the ALU processing.

30 Computer Arithmetic Logic Unit (ALU) Main Memory Instructional Memory
It executes the instructions, performs the calculations, and returns the results. Main Memory Stores the variable names and variable values. Instructional Memory Stores the instructions that get fed into the ALU.

31 Homework Read Chapter 1*
before the start of class on Tuesday, Sept 6st (for 4st period) Wednesday, Sept 7th (for 3nd period) *NOT just the excerpt

32

33 code.org watch via youtube https://www.youtube.com/watch?v=fbQTez4a0ck
watch via youtube


Download ppt "Demystifying Programming"

Similar presentations


Ads by Google