Is there a way communicate or measure levels of abstraction?

I’ll be the first to say that this question is a bit… out there. But here are a couple questions I bear in mind :

Is abstraction continuous or discrete?

Is there a single unit of abstraction?

But I’m not sure those questions are truly answerable or even really makes sence. My naive answer would be something along the lines of abitrarily discrete but not necescarily having a single unit measure. Here’s what I mean…

Take a Black Labrador; an abstraction that could be made is that a Black Lab is a type of animal.

[Animal]<--[Black Lab]

A Black Lab is also a type of Dog.

[Dog]<--[Black Lab]

One way to establish a degree of abstraction is by comparing the two the abstractions. We could say that [Animal] is more abstract than [Dog] in respect to a Black Lab. It just so happens [Animal] can also be used as an abstraction of [Dog] So, we might end up with something like

[Animal]<--[Dog]<--[Black Lab]

With the model above, one might be inclined to say that there’s two hops of abstraction to get from [Black Lab] to [Animal]. But you can’t exactly tell somebody they need one level abstraction and reasonalby expect they will come up with [Dog] given they aren’t explicity given the options above.

If I needed to tell someobody in a single email that they needed an abstract class with out knowing what that abstract class is, is there a way to communaticate a degree of abstraction such that they might end up on Dog instead of Animal? As a side note, what area of study might this type of analysis fall under?

1

Is abstraction continuous or discrete?
Is there a single unit of abstraction?

I look at abstraction as a discrete thing, measured in “layers” that can only be counted based on your current point of view.

For the sake of example, let’s say an Animal is at the top of a class hierarchy.

If I call some method that expects an Animal, you’re looking down at the top and have absolutely no clue if what you’ve been handed is actually a Dog or an Aardvark. You shouldn’t care, either, because those details are hidden behind the abstraction. That barrier prevents you from measuring any deeper than Animal. The abstraction does allow you to know that every Animal has a sleep() method but not that it’s implemented as layDown(); closeEyes() (Aardvark) or turnAround(3); layDown(); closeEyes() (Dog). As long as the end result is a sleeping Animal, that shouldn’t be an impediment.

If I call a method expecting a BlackLab, you’re in a different position. By virtue of the fact that you know this class inherits Dog and Animal, you can measure that there are two layers of abstraction above you, but you’re still blind to anything below such as subclasses MaleBlackLab and FemaleBlackLab.

If I needed to tell someobody in a single email that they needed an
abstract class with out knowing what that abstract class is, is there
a way to communaticate a degree of abstraction such that they might
end up on Dog instead of Animal?

No, because your scenario is dropping not-so-subtle hints that implementation has started without having completed a design which would tell you how the class hierarchy will look

Without that context, the directions you’d give (“write a BlackLab class with two layers of abstraction above it”) would be ambiguous. The first several implementation possibilities that come to mind are these:

  • Animal / Dog / BlackLab
  • Dog / HuntingDog / BlackLab
  • HuntingDog / Retriever / BlackLab
  • Canine / Dog / BlackLab
  • Dog / BlackDog / BlackLab

Without an understanding of what kind of software you’re writing, any of those might be appropriate. Once you start to zero in on solving a specific problem, only one becomes the right thing:

  • If your project is for the local animal shelter, which deals with many kinds of animals (dogs, cats, etc.), the first hierarchy makes a lot of sense.
  • For the American Kennel Club (dogs only), it the second one might work better.
  • For the North American Gun Dog Association (hunting dogs only), the third works.

You get the picture. Context is king.

As a side note, what area of study might this type of analysis fall under?

This is really basic software engineering, specifically the chapter on fully understanding the problem before you start work on it. 🙂

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật