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.
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).
A phone is a great example. When you call someone, you don't need to know all of the technical steps between you pressing some numbers and "Dial" and being connected to the person you're calling. All you know is that when you press their number and dial, you're connected. The details are abstracted out.
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.
"[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 ?"
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 ?"
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).
发布评论
评论(12)
大多数人花一整天的时间从复杂的事物中抽象出相关的细节,所以我认为找到一个例子并不是太困难。
如果我告诉你我给你 10 秒的时间来画一些东西,那么当我说“开始!画一座房子”时,你不太可能想出与我的画有任何不同的东西:
因为你的大脑抽象了最相关的细节你的房子:屋顶、墙壁——如果你有时间——门、窗户。
我们从一切事物中抽象出细节,因为它使理解更容易。我们不会了解椅子构造的每一个细节——我们只是去宜家买一把看起来不错的椅子。有很多很好的例子。
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.
抽象可能意味着编写可应用于更广泛情况的规则(或过程)。
您可以编写玛格丽特披萨的食谱,其中需要:西红柿、马苏里拉奶酪、白面粉、水、罗勒、糖、盐、特级初榨橄榄油和酵母。
或者你可以制作披萨食谱,这需要面团和配料。这是一个抽象的食谱。
然后,您可以选择用白面粉、水、糖、盐、特级初榨橄榄油和酵母制作面团。
您还可以选择用西红柿、马苏里拉奶酪、罗勒和特级初榨橄榄油制作配料。
但您也可以选择使用其他配料(例如意大利辣香肠和辣椒)和其他类型的面团(例如全麦面粉或玉米粉)。
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).
手机就是一个很好的例子。当您呼叫某人时,您不需要了解按某些号码和“拨号”以及连接到您要呼叫的人之间的所有技术步骤。您所知道的是,当您按下他们的号码并拨打时,您就已接通。细节被抽象出来。
A phone is a great example. When you call someone, you don't need to know all of the technical steps between you pressing some numbers and "Dial" and being connected to the person you're calling. All you know is that when you press their number and dial, you're connected. The details are abstracted out.
如果您指的是库/框架提供的抽象:
使用抽象某些东西的软件层可以被视为雇用为您工作但您自己不能或不想做的人。
将事物抽象为典型的软件结构(例如类和对象)有点难以解释......
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 ...
我想说,抽象是将复杂的概念概括为相对简单的概念,重点关注概念的哪些部分在当前上下文中是重要的。
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.
我建议抽象是关注相关的细节并忽略其余的。
假设您想聘请一名厨师。
您确实想要关注
但是,您不需要关注
等等。
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
But, you don't need to pay attention to
And so on.
为什么不直接做“住宅”呢?
正如“24a Posh Towers”中的意思是“码头区的四居室顶层复式公寓”是“伦敦公寓”是“家”是住宅。
“埃塞俄比亚素食帐篷旁边的蓝色帐篷”是“我在格拉斯顿伯里的帐篷”,是一个“临时家”,也是一个“住所”
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"
抽象是与任何特定实例无关的概念或想法
abstraction is a concept or idea not associated with any specific instance
数字。
三头牛、三把椅子和三棵樱桃树有什么共同点?这些问题的共同点是什么?你无法画出它,甚至解释这个概念也很困难,但它仍然是一个有用的概念。
引用路易斯·卡罗尔的《爱丽丝梦游仙境》:
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:
汽车对我来说太先进了。购物车怎么样?你一推,它就动。
Car is too advanced for me. How about a shopping cart? You push, it moves.
一辆车。
您通过抽象概念(油门踏板、方向盘)与汽车进行交互,这些抽象概念用于隐藏车辆的复杂性。
您使用油门踏板的抽象来控制发动机转速,而不必手动将气体注入发动机并控制活塞。
方向盘是另一个抽象概念。您转动方向盘,它会同时转动两个前轮,从而极大地简化了您作为驾驶员的任务。您可以用另一种实现替换基本实现,同时保留接口(例如,较新的汽车具有动力转向系统)。
自动变速器是另一个很好的例子。
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.
抽象
忽略事物如何工作的细节。
例如,转动汽车钥匙启动汽车,这抽象了诸如启动电机、电池、防盗装置、油箱等细节。
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...