Click here to Skip to main content
12,395,227 members (71,535 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

7.5K views
3 bookmarked
Posted

Abstraction Layers of the Human Body

, 27 Nov 2013 CPOL
Rate this:
Please Sign up or sign in to vote.
I want to hopefully connect the dots for many to help convince you of the ultimate importance of a well defined and protected interface.

I think that almost no one would disagree that the human body is a very complex structure. Most of the complexity is hidden from our view. I would like to make a literal comparison between the human body and abstraction layers, as though the body was defined in software. I want to hopefully connect the dots for many to help convince you of the ultimate importance of a well defined and protected interface.

At the outer-most level there is the body itself where a small sample of its interfaces are capable of:

  • Sensory input is given in the form of the 5 (or more) senses.
  • Communiucation can be expressed with a variety of means:
    • Speech is expressed with the mouth
    • Signals expressed with sign-language
    • Emotions conveyed with body language
    • Pheremones and other more subtle message transports
  • Energy and medications are administered through a finite number of orifices.
  • Waste and excrement are ejected through well defined interfaces. (When things leave the body from unexpected orifices, this should be concerning.)
  • When the body is sick, it expresses symptoms in many ways. Some of them are only internally detected, others are clearly visible or audible. 

Internally, the body is further abstracted by its internal systems, and composed of discrete organs and glands to perform specific purposes. A small sample of some of these systems are listed below.

  • Commands are issued by the nervous system.
  • Sensory information is received by the nervous system.
  • The endocrine system helps regulate the different systems, even indirectly issuing its own commands.
  • Energy, waste, and hormones are transferred by the circulatory system.

Value of Interface Boundaries

The interface boundaries provide two very important functions:

Provide discreet functionality

Consider one of the bodies organs (objects), the eye. Its purpose is to detect light and send the signals to the brain for interpretation. In order to accomplish this task, smaller interfaces are composited to achieve this. Input through the cornea, output through the optic nerve and other various components for protection and adapting to the environment. While the eye can be used for other purposes, such as identification or even feeling sensations, its basic purpose can be summarized to provide sight.

Access Control

Interfaces control access to both the data and the implementation.

The cornea and the optic nerve provide access for input and output for the eye. However, these are not the only components that are required to have a properly functioning eye. The Iris, Ciliary muscle, Lens, Vitreous humor, Retina, Fovea, and many other components are contained within the eye. The eye works as a closed system. If the behavior or characteristics of any one of these components changes, it may affect the overall quality of vision the eye is capable of producing. For example, many people see floaters. Floaters are caused by debris or impurities find their way into the Vitrious humor and distort the signals detected by the retina.

I only have a rudimentary understanding of the eye, mostly what can be observed from the outside, and information from a few diagrams. Even though the diagrams I have viewed of the eye are very detailed and depiect all of its internal components of the eye, I wouldn’t know where to begin to hook in and create a new type of eye by just looking at the diagrams. There are many interconnected components to the eye that do not directly contribute to providing sight. However, if these components are compromised, the eye may no longer provide reliable information to the brain or cease to function altogether.

System Integrity

Now consider what it means to violate these interfaces. I already pointed out what happens when the Vitreous humor in the eye is contaminated. Let’s consider the internal regulatory systems of the body. Under natural circumstances, the only way to interaction with the nervous system is through the 5 senses.

Doctors have invented ways to get around that:

  • Ingest medications
    • Input validation is important. If you cannot control the input you may no longer be able to control the output either.
  • Inject chemicals into your system with hypodermic needles.

  • Brain surgeons can stimulate regions of the brain with a probe to induce laughing, searching kayak.com other behaviors and actions during surgery

  • Catheter

    • The ingenious invention of the doctors and surgeons to take advantage of the orifices provided by the bodies original designers.

Generally, we get to elect when and who we let violate our natural interfaces. I wouldn’t want just anybody reaching in and tickling your kidneys.

Inheritance

Inheritance is such a valuable and widely abused tool. The topic is so broad many blog entries could be devoted to inheritance. Therefore, I will leave the specifics for another time, and just give you this thought.

Parents interfaces are completely protected from access even to their children. I trust my children even less than my doctor to monkey with my internals. .

Conclusion

Think of your objects as living organisms when you define the interfaces and create the implementations. Imagine you were that organism and consider what is required to guarantee the integrity of your object.

Take advantage of strict interfaces to:

  • Protect access
  • Verify input
  • Encapsulate details
  • Abstract complexity

Would you trust the invariants of your design to be left up to users that interact with you? 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Paul M Watt
Engineer
United States United States
I am a software architect and I have been developing software for nearly two decades. Over the years I have learned to value maintainable solutions first. This has allowed me to adapt my projects to meet the challenges that inevitably appear during development. I use the most beneficial short-term achievements to drive the software I develop towards a long-term vision.

C++ is my strongest language. However, I have also used x86 ASM, ARM ASM, C, C#, JAVA, Python, and JavaScript to solve programming problems. I have worked in a variety of industries throughout my career, which include:
• Manufacturing
• Consumer Products
• Virtualization
• Computer Infrastructure Management
• DoD Contracting

My experience spans these hardware types and operating systems:
• Desktop
o Windows (Full-stack: GUI, Application, Service, Kernel Driver)
o Linux (Application, Daemon)
• Mobile Devices
o Windows CE / Windows Phone
o Linux
• Embedded Devices
o VxWorks (RTOS)
o Greenhills Linux
o Embedded Windows XP

I am a Mentor and frequent contributor to CodeProject.com with tutorial articles that teach others about the inner workings of the Windows APIs.

I am the creator of an open source project on GitHub called Alchemy[^], which is an open-source compile-time data serialization library.

I maintain my own repository and blog at CodeOfTheDamned.com/[^], because code maintenance does not have to be a living hell.

You may also be interested in...

Comments and Discussions

 
QuestionMore Than 5 Senses Pin
Tom Gilkison27-Nov-13 8:49
memberTom Gilkison27-Nov-13 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160721.1 | Last Updated 27 Nov 2013
Article Copyright 2013 by Paul M Watt
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid