3. Intro
Short Re-cap of basic Computer Science first principles
Designed for everyone from management to software masters
Basic concepts applicable to planning, management and all
programming languages and technologies
4. Abstraction – The Concept
Abstraction is a way of handling complexity when working with
computers
“The essence of abstractions is preserving information that is
relevant in a given context, and forgetting information that is
irrelevant in that context.” – John V. Guttag [1]
“The purpose of abstraction is not to be vague, but to create a new
semantic level in which one can be absolutely precise.” – Dijkstra [2]
The effective exploitation of his powers of abstraction must be
regarded as one of the most vital activities of a competent
programmer. – Paraphrasing of Dijkstra [3]
Example: Programming Languages abstract the physical hardware
5. Encapsulation – The Usage
Encapsulation is a way to implement abstractions, it involves a
particular piece of software (library, module, component or class)
having a defined responsibility and keeping the details of managing
that responsibility to itself
It is "the process of compartmentalizing the elements of an
abstraction that constitute its structure and behavior; encapsulation
serves to separate the contractual interface of an abstraction and
its implementation.” – Grady Brooch [4]
In Java this is usually achieved by using Interfaces but applies to
other techniques such as a utilities class hiding what 3rd party
libraries and / or custom code it uses to implement its behavior
Example: A Web Sockets library hides the details of TCP/IP
6. Reuse – The Concept
Having proper abstractions in place implemented by encapsulated
software leads to the economic benefit of Reusability
“Code reuse aims to save time and resources and reduce
redundancy by taking advantage of assets that have already been
created in some form within the software product development
process” –”What Is Software Reuse” [5]
Reuse is hampered or in extreme cases destroyed by the
accumulation of Technical Debt – poor usage of abstractions,
encapsulation or implementation details
A well maintained, reusable code base can be worth millions of
dollars over time (like a precious collectable) and a poorly
maintained one can be worth nothing (like tires from 1980)
Example: Using the AWS libraries developed in Phase 1 again
8. References
[1] Guttag, John V. (2013-01-18). Introduction to Computation and
Programming Using Python (Spring 2013 edition ed.). Cambridge,
Massachusetts: The MIT Press. ISBN 9780262519632.
[2] The Humble Programmer (1972) Turing Award Lecture[1],
Communications of the ACM 15 (10), October 1972: pp. 859–866.
[3] “Edsger W. Dijkstra”, Wikipedia,
http://en.wikiquote.org/wiki/Edsger_W._Dijkstra#Quotes_about_E.W.
_Dijkstra, Extracted on Jan 7, 2015
[4] Grady Booch, Object-Oriented Analysis and Design with
Applications, . Addison-Wesley, 2007, ISBN 0-201-89551-X, p. 51-52
[5] Lombard Hill Group. "What Is Software Reuse?". lombardhill.com.
Lombard Hill Group. Retrieved 22 October 2014.