Presentation is loading. Please wait.

Presentation is loading. Please wait.

Abstraction Computer Science and Software Engineering

Similar presentations


Presentation on theme: "Abstraction Computer Science and Software Engineering"— Presentation transcript:

1 Abstraction Computer Science and Software Engineering
© 2014 Project Lead The Way, Inc.

2 Abstraction Removing details Separation of concerns
Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Abstraction Removing details Separation of concerns Strategy for handling complexity The details of anything are often important. But there is only so much that we can focus on at once. When we are driving a car, we just trust that the steering wheel turns the car. We accept this as the interface through which we can interact with inventions that other people designed, created, and maintain – work that deals with the details of the linkages and friction with the wheels. Those workers also use abstraction: the car mechanic often chooses and installs a brake rotor without concerning herself with how the material of the brake pad was designed or manufactured. Abstraction is also useful when communicating about the kinds of inventions mentioned before as well as software. You’ll find as you program that it will often be handy to discuss parts of your program with others (teacher, partner, other students, or parents) in abstract terms depending on the level of expertise that the person you are talking to has and the purpose of your communication. When discussing a problem with a teacher, you might generalize more to give a quick overview or direct their attention to a general area of concern, whereas in day-to-day work with your partner you may need to be very concrete about exact syntax. If you are explaining the functionality of your program to someone who does not know about programming, a high level of abstraction may be required to help keep them from getting lost. In summary, abstraction is a useful tool for interfacing with software, for communicating about software, and for creating software.

3 The Ladder of Abstraction
Presentation Name Course Name Unit # – Lesson #.# – Lesson Name The Ladder of Abstraction application software for thing in room: pick_up(thing) high-level language COBOL C int register c; low-level language Grace Hopper en.wikipedia.org/wiki/File:Intel_80486DX2_bottom.jpg Abstractions build on each other and let people focus on one level of the ladder of abstraction at a time. Note: the slide notes from Lesson 1.2 are shown here for easy reference for use in discussion. At the bottom of it all is physics: Newton’s Laws and the four forces of the universe and the two ways in which Newtonian physics had to be “fixed”: relativity and quantum mechanics. We can ignore the physics and just pay attention to abstractions of the semiconductor, represented by a few equations that summarize current and voltage under certain conditions. We can ignore the voltage and just trust that the CPU accepts 0’s and 1’s and steps through its instructions the way Intel designers say it does. We can ignore the bits and just use a language like Hopper’s COBOL – nowadays, C or C++, or Java, letting those languages worry about the CPU. We can even ignore the low-level languages and use a language like Scratch or Python – which take care of the lower level languages for us. And we can deal with an even higher level of abstraction at the application level. A funny comic: bytes and bits N P - + + - voltage and current - - - + - physics 𝑖 ℎ 2𝜋 𝜕 𝜕𝑡 Y= 𝐻 Y

4 CPU Follows a Sequence of Instructions
Presentation Name Course Name Unit # – Lesson #.# – Lesson Name CPU Follows a Sequence of Instructions CPU is the Central Processing Unit: one “core” Our programs are turned into instruction understood by the CPU This processor is a “Core 2 Duo” Intel processor. Intel is one of the leaders in seminconductor manufacturing, alongside Texas Instruments and Samsung. Intel has manufacturing facilities with researchers and designers around the world and is headquartered in the Silicon Valley south of San Francisco, California. en.wikipedia.org/wiki/File:E6750bs8.jpg

5 Grace Hopper Typing Code That Makes Sense Closer to Human Language
Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Typing Code That Makes Sense Closer to Human Language Thankfully, Grace Hopper invented the compiler, a computer program that lets programmers work with more human-readable language. A compiler translates a more human-friendly code into a sequence of assembly language code before the code runs. Grace Hopper called her new language COBOL. She received a B.S. in mathematics from Vassar College and a Master’s and Ph.D. from Harvard. She programmed the Mark I, II, and III computers and was a Rear Admiral in the U.S. Navy. Grace Hopper’s work let humanity gracefully “hop” up the ladder of abstractions. She invented the compiler specifically because she wanted more people to be able to use the new reality of computers. She programmed in assembly language – directly using the instruction set. She created another language by defining it to the computer in assembly language. People using her compiler no longer needed to worry about the details of the assembly language. Instead they could write a more human-like statement for what they wanted the computer to do. A Grace Hopper quotation: ‘The most important thing I've accomplished, other than building the compiler, is training young people. They come to me, you know, and say, "Do you think we can do this?" I say, "Try it." And I back 'em up. They need that. I keep track of them as they get older and I stir 'em up at intervals so they don't forget to take chances.’ Grace Hopper


Download ppt "Abstraction Computer Science and Software Engineering"

Similar presentations


Ads by Google