views:

300

answers:

11

Abstraction is a concept that seems difficult to explain, without reverting to using programming terminology. I've thought about it a lot, and I can't come up with a satisfactory answer. Does anyone have any very general, yet very pertinent explanations?

Metaphors, similes etc are all welcome.

A: 

I'd say, abstraction is the generalization of complex concepts into relatively simple ones, with a focus on what parts of the concept are important in the context at hand.

WhirlWind
+14  A: 

A car.

You interact with the car through abstractions - a gas pedal, the steering wheel, which are used to hide the complexity of the vehicle.

You use the abstraction of the gas pedal to control the engine speed, you do not have to manually inject the gas into the engine and control the pistons.

The steering wheel is another abstraction. You turn the wheel and it turns both front wheels at once, dramatically simplifying your task as a driver. You can replace the basic implementation with another one while preserving the interface (e.g. newer cars have power steering).

Automatic transmissions are another good example.

Stephen
On some cars the steering wheel turns all four wheels!
eyelidlessness
Not good -- I would hate to have an Abstract brake pedal on my car -- these are concrete implementations of the accelerator and brake classes.
James Anderson
Well, the steering wheel turns the front, and then a servo turns the back ;)
Dominic Bou-Samra
+1  A: 

If you're referring to abstraction like it's provided by libraries/frameworks:

Using a software layer that abstracts something can be seen like hiring somebody who does work for you that you can't or do not want to do yourself.

Abstraction of things into typical software structures like classes and objects is a bit harder to explain ...

Techpriester
+2  A: 

Most people spend all day abstracting the pertinent detail from complicated things, so I don't think it's too terribly difficult to find an example.

If I told you I'll give you 10 seconds to draw something, then when I say "start! draw a house" you won't likely come up with something any different from my drawing:

 /\
/  \
|  |
 --

Because your brain abstracted the most pertinent details about your house: roof, walls--and if you had time--doors, windows.

We abstract detail from everything simply because it makes understanding it easier. We don't learn every minutiae of detail in how a chair is constructed--we just go to Ikea and buy one that looks good. There are lots of good examples.

Nick Klauer
A: 

I'd suggest that Abstraction is about paying attention to the details that are relevant and ignoring the rest.

Say you want to hire a chef.

You do want to pay attention to

  • Training
  • What kinds of food can s/he cook
  • How good is the presentation of the food
  • How will s/he interact with the rest of the team
  • How well is the food cooked

But, you don't need to pay attention to

  • Hair color
  • Tattoos
  • How well he can paint
  • Nasal hair
  • His/Her girlfriend's piercings

And so on.

Bevan
+2  A: 

Abstraction

Ignoring the details of how something works.

eg Turning the key in the car starts the car, this abstracts details such as the starter motor, battery, immobiliser, petrol tank...

mikek3332002
+1  A: 

Car is too advanced for me. How about a shopping cart? You push, it moves.

fastcodejava
'Shopping cart' and 'car' can be abstracted as 'vehicles' ;) (Actually, this is more a categorization, but the functions of a vehicle, such as `move` or `run_over_people` can be abstracted as well)
Chubas
A: 

Why not just do "dwellings".

As in a "24a Posh Towers" is "four bedroom penthouse duplex in docklands" is a "london apartment" is a "home" is a dwelling.

"The blue tent next to the ethiopian vegatarrian food tent" is "my tent at glastonbury" is a "temporary home" and is also a "dwelling"

James Anderson
+1  A: 

Abstraction can mean writing rules (or procedures) that can be applied to a wider set of circumstances.

You could write a recipe for Margherita pizza which requires: tomatoes, mozzarella cheese, white flour, water, basil, sugar, salt, extra virgin olive oil, and yeast.

Or you could make a recipe for pizza, which requires dough and a topping. This is an abstract recipe.

You could then choose to make the dough out of white flour, water, sugar, salt, extra virgin olive oil, and yeast.

You could also choose to make the topping out of tomatoes, mozzarella cheese, basil, and extra virgin olive oil.

But you could also choose to use other toppings (for example, pepperoni and chili), and other types of dough (such as wholemeal flour, or cornmeal).

wisty
A: 

abstraction is a concept or idea not associated with any specific instance

joe
A: 

Numerals.

What's in common between three cows, three chairs and three cherry trees? What's the problem with what these have in common? You cannot draw it, and even explaining the concept is hard, but it is still a useful concept.

Quote Alice in Wonderland, by Lewis Caroll:

    "[doormice that were drawing everything that begins with an M, 
such as mousetraps, and the moon and memory, and muchness — [..]
 did you ever see such a thing as a drawing of a muchness ?"
Pavel Radzivilovsky