Thank you all for the great comments on the blog entry "Appropriate Levels of Abstraction". We all seem to acknowledge the general solution of
finding the right level of abstraction to express our intention. Still,
we recognize the issues with current coding practices. As Refux
said:

Let’s face it, the code is dumb, there is
no higher level picture.
We need to figure out how to encode real useful and
actionable data so code path decisions can be made at runtime.

This is exactly right – it is only the code in its context, with its generator or
compiler – that gives it meaning during execution. But still, there is a higher
level picture – it is just not recorded. Even for the sort example, the domain description of what the data is likely to be like, could be useful to decide which way to go. And we can go even further – why do we sort? Is it for presentation to the user, is it for merging, is it for searching?

Separating these two issues are
at the core of the solution. By changing what we put into code to be more
intentional information that captures more useful and actionable data (our
intentions), we separate the source code from the execution of it, which is
controlled by the generator or the runtime components. Code therefore needs to
get refactored into one part that is the generator and runtime components, which
obviously can not be as static as they are today. The more intentional
code will then be what these components operate
on.

And as Paddy points
out

Often parts of a
problem could be better solved in a different language, if there were easier
ways to develop in multiple programming languages then savings could be
made.

So true! Our tools and languages are simply not designed to mix very well. Still, it is
getting to be the rule rather than the exception that languages like SQL, HTML
and XML gets embedded into C++, Python or Java, and this is often very clunky with
limited semantic and syntactic support from our tools. Today language design is out of reach
for most programmers (and managers). As Scott points
out:

… we tend to get stuck in the
mind frame of using general-purpose language for domain-specific problems (and
this idea is usually enforced by management).

So how do we
get unstuck from the current use of languages?
Obvioulsy new technology is required.

The software engineering community has aspired to new
more powerful languages for decades, and often very domain specific languages.
Indeed, the first higher level languages – Fortran and Cobol – were designed
with the goal to be used by domain experts directly, mathematicians and business people
respectively. They had many domain specific abstractions in them. As we know, they
were not fully successful in reaching their goal – still professional
programmers were required to use these languages properly. Interestingly, the
first programmer oriented programing language – Algol – actually came AFTER
these first higher level languages. And as we know, essentially all general purpose languages
today, including C, C++, Java, Python, Perl, Ruby and C#, are all direct or indirect descendants from Algol.

So not only do we need to revisit new language designs, but also the dominant paradigm of how languages are used and what they represent. Wes gives us a good example:

In my
experience, systems that work to permit one to move between abstraction layers
seamlessly have also made it extremely difficult to make unanticipated changes.
Conversely, source code is easy to understand and edit, and as a form it has
flourished in the face of many efforts to replace it, notwithstanding the lack
of seamless abstraction layers. I’m hoping that Intentional Software can make a
form that accomodates the evolution of software and lowers the cost of making
unanticipated changes.

First thanks
for your support, Wes! We certainly recognize that moving between abstractrion levels
to make unanticipated changes is troublesome although sometimes required. Many current DSL, model
driven and even aspect oriented tools simply work best when you stay at only one level of abstraction. And of course
this vastly limits the value of these type of approaches. Intentional Software
has a unique approach to resolve this that centers around unlimited
parameterization and unlimited projection. We will discuss more about this in a future
post.

Share →

8 Responses to Appropriate Levels of Abstraction – Follow up

  1. Chiluvuri says:

    The next level of abstraction is “loosely coupled” components that eliminate irrational dependencies between the Objects. Dependency of each component comprises of (a) services it offers to other components and/or (b) services it request from other components in the system. In a loosely coupled system, on average this dependency can be reduced to between 4 to 9 lines of code for the loosely coupled components. This is the rational dependency a component has with rest of the application. This system eliminates nearly 90% of the complexity of large software application projects
    An ideal software development paradigm must allow developers to only concern about the rational dependencies, which is about 2 to 5% of the total code. However, today developers are stuck with tightly coupled paradigm, which has unstructured irrational dependencies that constitutes are nearly 50% of the code. This makes it nearly impossible to replace or refine any complex component.
    In a “loosely coupled” system the complexity is eliminated by dividing any complex problem into many small loosely coupled parts (or components). That means if you building a complex systems, it will be divided in to say 10 “loosely coupled” components. Then it require about 1 percent of the code to couple them. In addition to reducing the complexity, it offers many advantages: such as it may require about 10 lines of code to replace any “loosely coupled” component.
    OK, how does it reduce the complexity, if application has millions of lines of code and large component may have hundreds of thousand lines of code? Answer is simple, do the same thing to each “loosely coupled” component: subdivide it into subcomponents. Then subdivide the subcomponents again into further small “loosely coupled” components. Repeat this process until each component is no larger than 300 lines of code (or even smaller, if you think 300 lines is too big to handle in a day).
    I have been working on this for years and invented elegant solutions. However, it is a radically new solution (but works) that requires at least an hour or two of your time to see how it works. The complete proof is provided in the web site. It is worth your time because it solves an important problem of building graphics intensive online applications, which is highly relevant today. Please review the following web pages:
    http://cbsdf.com/technologies/LC-CBSD.htm
    http://cbsdf.com/technologies/OOP-indivisible-components.htm
    http://cbsdf.com/technologies/software-irony.htm
    P.S: Sorry for too much nerdy language in the web site. It has too much information and examples. I hope, you can understand why we need radically new thinking and processes to solve the “software crisis”. The programming languages that can solve the problem are already available. Although the 3GL languages (e.g. Java, C# or C++) offer an important part of the solution, they cannot offer full solution by themselves, because they have fundamental limitations to build the “loosely coupled” components and the “component hierarchy” to build larger and larger “loosely coupled” components, and offer the “unified handle” to remove or replace the “loosely coupled” component.

  2. chiluvuri1 says:

    I like to share some figures that shows “component code generation” can be employed to create a software development paradigm that satisfies many goals of the “intentional programming” or “code looks like design”. Please review the following web page that provides high-level overview through figures.
    http://cbsdf.com/technologies/misc-docs/CF-LC-Intent.htm
    I believe, emerging technologies such as Microsoft’s XAML/Vista and Adobe’s MXML/Flash offers excellent “Domain Specific” platforms to build next generation online GUI applications at fraction of the cost. The generative paradigm offers a useful solution for intentional software, for example, please read: http://cbsdf.com/technologies/software-irony.htm
    I like to know what you think! The process works and has no technical hurdles, but likes to know practical issues and suggestions. I appreciate you thoughts.

  3. Good article and site. Congratulations

  4. Nice site. Greetings

  5. rowery says:

    Good site.Congrats.

  6. kalendarze says:

    hey! your article is great. thanks

  7. Thanks for this article. I like your posts

  8. Thanx a lot! This is very useful.