Abstraction
This presentation discusses a fundamental concept of computer science, Abstraction. We’ll be talking about Abstraction throughout this whole semester. In this first presentation, we’ll talk about the broad concept of Abstraction and see how it fits into your everyday life. They will take the first step into applying Abstraction and show you how you might use it.
[Slide 1] Abstraction is the process of making something easier to understand by ignoring some of the details that may be unimportant. This allows you to focus on what is important at this time to you. This doesn’t mean that what you ignore is not important. It’s just not important to what you’re doing at that moment. As your interest or goals change, then your Abstraction might change to reflect that. Computer scientists also talk about the levels or layers of Abstraction. Each layer in your Abstraction would include things that can be grouped together in some way.
[Slide 2] There are many ways to abstract something. Each way depends on how you’re looking at it and is individual to you. Here are some types of Abstraction. A physical Abstraction can refer to the physical parts of an object that you’re interested in. Say for instance, a toaster. Do you just want to think about putting the bread on the slot and pushing down on the handle? Or are you interested in the elements inside a toaster like the heating element and the springs?
Another type of Abstraction is a Modeling Abstraction. The levels in a modeling Abstraction have to do with what you want to include in your model. In one of the videos from last week, we had a model of rabbits eating grass. In that model, we only included four things. Moving, eating, reproducing and dying. That was our Abstraction of a rabbit ecosystem.
Another type of Abstraction is Control Abstraction and this is actually, commonly used in different places. The levels in this type of Abstraction are associated with how a process is controlled. In computer science, Control Abstraction is often associated with programming and sometimes, it refers to higher-level languages like NetLogo and how it interacts with lower level languages and how those interact with the computer in terms of bits or zeros and ones. Data Abstraction is another area of particular interest to computer scientist. The levels of Abstraction are associated with the characteristics of the data and how it might be used.
Now, you’re probably thinking, “What the heck is this and why are they teaching me this since I’ll never use it in my life?” Well, here is the thing, everyone uses Abstraction. [Slide 3] Now, you’re probably saying to yourself, “What? No way, I never do that.” Well, yes you do. As a matter of fact, you’re doing it right now. Everyone uses Abstraction; otherwise, we would just go crazy. There’s so much information coming into our brain all the time that our mind automatically filters it. Well, abstracts it.
Right now, your mind is telling your brain to filter things that are unimportant to you and your mind also chooses the level of Abstraction that it uses. So, when you’re driving or walking somewhere that you’re familiar with, you really don’t focus on things. You just get there. It’s like magic but if it’s some place you haven’t been before, then you’re looking at every street sign. Think about that first day of school, when you were trying to find your classes. You were focused on the details of where your were and what classrooms you were passing and how you were going to get to your next class on time.
Now, you just think, “Well, I just have to get to class.” And you automatically do it and you’re thinking about other things as you’re doing. You’re not thinking about the details of getting to class. That’s Abstraction. Or how about if you’re looking for your friends at lunch and you get your tray of food and turn around and all you see in front of you is a sea of faces. You can’t see your friends. Then you remember, “Oh yeah, one of my friends is wearing a red shirt today.” And now your mind automatically tells your brain to focus on red, the color red and suddenly you can see your friend.
Your mind switched levels of Abstraction from the sea of people to people wearing red clothing, another level of Abstraction. [Slide 4] Not only does your mind use Abstraction automatically but you can consciously use Abstraction in your everyday life. Remember, Abstraction is simplifying things to what’s important. This means you only focus on those important things and you ignore the other parts until later.
This is really powerful. It means you don’t waste time and energy [flirting 00:04:49] about the things that are not important or that you can’t do something about until later. It also makes the problem more manageable and doable because you’ve gotten rid of those unnecessary parts or you put them off until you can do something about them. Then you take what’s important to you and now, the level of Abstraction that you’re on and decompose the things at that level into the steps that need to be done. Remember, decomposition is only breaking things down into steps.
Let’s look at an example. [Slide 5] Let’s apply Abstraction to a problem. Say, you want to go to a big amusement park that’s a few hours away. Once you think of trying to get to the amusement park, your mind fills with tons of things to do and questions to answer and it flits around. It’s very confusing. It looks sort of like this. It’s a mess. You sort of fluctuate around and perhaps you talk to your friends and then maybe you ask permission from whomever you have to ask permission from to go and those people usually ask you those same types of questions. The who, what, when, where and how questions and this is so overwhelming that you get deflated and it seems insurmountable. There’s just too much stuff to do.
[Slide 6] Let’s see if we can apply Abstraction to this problem. This is what it might look like. There you are in the inner part of the Abstraction. Now, you might interact with some of your friends to see who wants to go. I mean after all, it’s no fun to go to amusement park by yourself. Since you know that whoever you have to ask permission from is going to ask you those dreaded who, what, when, where and how questions, you might make some preliminary plans or at least investigate those who, why, where, what and how questions a little bit. Perhaps you could figure out who could drive or if there’s some way to get there using public transportation, say a train or a bus and then you might go on the internet to figure out how much it costs and you might make a guess at how much food will cost.
Then you talk to your friends and pick a couple of possible dates that most people can go on. Then you ask permission because you know some of the answers to the who, what, when, where and how questions and you probably have to make the final plans then and then you get to go to the amusement park. Fantastic.
[Slide 7] Okay. Let’s try another abstraction, a physical Abstraction. Here’s an Abstraction of a car. In this case, each layer of the Abstraction has a different level of scale. The outer layer represents the car itself. Perhaps you look at a car this way. You just get it and drive. The next layer represents the parts of the car. The carburetor, the accelerator, the breaks, the alternator, the windshield wipers, the indicators, all those parts of the car that make the car actually run.
The next layer are the bits and pieces that make up the parts of the car like bolts and nuts and straps and belts and wires and pipes and the level of Abstraction below that, we have the materials that make up those bits of the car. The metals and alloys and plastics and fibers and below that level are atoms and neutrons and electrons and I don’t know, subatomic particles. You’re probably wondering why we would even have an abstraction of a car. Let’s investigate that.
Here we use the Abstraction to investigate how different people think about cars. Each person is interested in a different level of the Abstraction. Drivers think about a car as a sort of black box. They get in it, turn the car on and go. Really, a driver only thinks about a few parts of the car. The accelerator, the break, maybe the mirrors and the indicator if we’re lucky. The mechanic is interested in the parts of the car and how they’re working or not working and perhaps, some of the bolts or nuts or belts need to be replaced.
An automotive engineer is concerned about the same things as the mechanic might be concerned but a car parts designer is concerned with choosing the right bits and pieces to make the car parts out of and also, they might be concerned with choosing the right material to make those bits and pieces out of too. Materials engineer or a mechanical engineer is concerned about choosing the materials that the bits and pieces are made of. The bolts and nuts and belts but also they might design new materials to make these bits and pieces out of to make those bits and pieces work better. I don’t know, I guess a physicist might be thinking of those atoms, electrons and subatomic particles. That’s how we might abstract a car and one way we might use it.
Another way we might use an Abstraction is to think about modeling, driving a car. When we drive a car, we only think about the car and a few components. When you’re modeling a car, you would probably eliminate the bits and pieces that make up the components and everything below that. Your Abstraction for your model might look something like this. [Slide 8] You see, we’ve removed the inner part of the car Abstraction and we’re left with the car and the components of the car. Actually, I don’t know about you but when I drive a car, I rarely ever think about the carburetor or the alternator or the radiator or anything like that.
We could even simplify this model even further and it might look something like this. We might include just the accelerator and the brake as the parts of the car for your model. For some purposes, you might find that this Abstraction is sufficient for your model or you might find that you have to include other things to create a good model of driving a car like a gas gauge, mirrors, windshield wipers and indicators. Including these components in your model might allow you to create a better model of driving a car.
[Slide 9] Let’s look at one last Abstraction. Last week, you watched a video on what’s inside a computer. Now, you realize that you can make a physical Abstraction of a computer based on that information. It would look something like this. The blue layer you have computers. Inside of computers, you have the components, the motherboard, the CPU, the RAM, the video card, power supply, hard disk, optical drive, all those components that we talked about last week in the video. Now, those components are made up of smaller things like chips, wires and connectors. There you have an Abstraction of computer.
Now, you can use the Abstraction as part of another Abstraction. [Slide 10] Here’s an Abstraction of the interactions involving a computer. The computer user interacts with programs and applications on the computer. The programs and applications are made up or interact with programming languages. The programming languages interact with the computer telling the components what to do and that interaction occurs primarily on the chips, memory and processing chips.
Different people work with computers at different levels. An average person works with the applications and programs on a computer. A computer programmer develops programs and applications using programming languages. A systems designer is concerned with the interactions of lower-level languages with the computer and hardware engineers deal with components that make up the computers and the bits and pieces that make up those components.
The exciting part about this Abstraction is how it applies to you. Here you are before you start this class. You’re just like the average computer user. You used programs and applications. Now, let’s take a look at later and here is where you’ll be after you’re done with this class. Yes. Not only will you understand all the basic computer science concepts, you will be able to write programs and applications using a programming language and once you know one computer programming language, the rest will come much easier.
[Slide 11] Okay. Let’s summarize what we’ve learned so far. Abstraction is just simplification, focusing only on the important parts. Your Abstraction can have levels or layers. Each level includes things that can be grouped together. You already use Abstraction all the time and you can apply Abstraction to different and for different reasons. You can apply Abstractions to objects. You can apply Abstractions to make models. You can apply Abstraction to your problems in everyday life. Thanks for your attention.
Abstraction V1 / Page 1 of 5