<img alt="" src="https://secure.leadforensics.com/150446.png " style="display:none;">
Go to top icon

The Language of Abstraction

Abhishek Mishra Oct 28, 2013

Technology

Evolution and progress in science is introducing more and more layers of abstraction in the world today. In fact, it has been influencing technology the most and we all are a witness to it today. However in spite of being aware of this fact, we all still choose to live in abstraction and forget to look at the details within. And the irony is that, it is in these very details that the ease with which we can get things done today is really hidden. Now let me make this simpler taking cue from history itself and let us begin with technology; particularly programming languages.

  • Language C: The mother of all programming languages, C is known to have spearheaded or being the driving force behind all high level programming. Now let me take you back to a time where C didn’t even exist. Then there were all sorts of things being done to compute and program. If you wanted something scientific you had FORTRAN. If you were in high school and were called Bill Gates, you definitely had been using BASIC to impress people with your skills. Then of course, if I were to tread a little more into the past, there would be mnemonics, codes that were precise and comprehensible, but which made programming nightmarish, but just exactly how? Now for e.g. you would need to write something like the following to make tea:
TAKE <teapowder>
MOVE <teapowder>, <kettle1>
TAKE <sugar>
MOVE <sugar>, <kettle1>
TAKE <milk>
MOVE <milk>, <kettle1>
STIR <kettle1>
BOIL <kettle1>

And that’s about it. You just wrote an assembly level program to make tea. How cool is that, isn’t it? But now imagine you wanted to take a shower (because sometimes when you make tea, you do feel like taking a shower in the middle!) Here’s how it is done…

TAKE <tea powder>
MOVE <tea powder>, <kettle1>
TAKE <sugar>
GOTO: shower room
MOVE <sugar>, <kettle1>
TAKE <milk>
MOVE <milk>, <kettle1>
STIR <kettle1>
BOIL <kettle1>

And towards the end of the shower it would look something like this…
GOSAVEYOURBOILINGTEABEFOREITBOILSOVER!

Now let me point out the exact problem with the above. If someone is looking at your daily schedule with all the three GOTOs as above; the person looking at the schedule will end up confused and jittery and won’t remember the flow properly. This is what we call a spaghetti code. An additional problem is that, no matter what, at the end of the day, we are dealing with the system, the computer at a very intricate level. It’s something synonymous with a situation like the following:

Let’s say you want to order food from a restaurant. But you have to go inside the kitchen, and give the chef specific recipe steps, lest he messes it up. Now that can’t be a pleasant experience right? Be that as it may, developers of those times did pull off impressive stuff playing with the assembly codes.

Then languages came into being, adding a layer of abstraction. Now you didn’t exactly need to be in the kitchen to talk to the chef; you could do it from the kitchen window. And there was a ‘compiler’ person, who was friendlier to you than the chef. If you gave a wrong instruction, he didn’t spout recipe-lingo but rather words that you would have a better chance at understanding. So these languages slowly became popular and people started believing in the concept of computers and software playing a part in their business.

However as things got more risky; the ‘compiler’ guy would lose his head and scratch it in despair. Don’t get me wrong. The languages were fairly powerful. But there was simply no way they could handle the complexity coming their way.

So what you do now? Add another level of Abstraction! So educate one more guy who understands you better than the last ‘compiler’ guy, and make him take all your instructions. And let’s call this guy Mr. C. Now this Mr. C is powerful because he gives you enough resources to make the chef do anything, anything at all! You can even make the chef throw up the pizza dough counterclockwise instead of doing it clockwise! Mr. C is flexible, powerful, but what’s the expense? Since there is more abstraction in play, there are more veils now in place. You can tell Mr. C to makef(“%f”,tea), but you may not get to play around with the milk and powder like before. So with ease comes a small but sometimes significant sacrifice of customizability.

Now Mr. C was all good and charming, when again, the demands of the customers was getting out-of-hand. Customers now not only wanted to eat, but the food they were eating concerned them more than the recipes that produced the food. Slowly, with this, the object paradigm came, where data was paramount, and code just accompanied it. With this came Mr. C++. He had all the fancy qualifications that Mr. C had and was just as much educated. But in addition, he knew how to deal with the object-oriented clients, to present the menu as classes of different food-items and then create objects of those classes and serve the customers.

At the same time some people decided to add a different layer of abstraction. They called it functional programming, led by Mr. Lisp and Mr. Haskell who were smart, nerdy and very efficient. And thus continued the evolution of languages, with the object-oriented style becoming the accepted standard, and Ruby and Java coming into the picture and adding more layers of abstraction! Now this meant that there were more people that now came between you and the still hardworking chef at some forgotten corner of the restaurant.

So here we are today with our neat stack of technologies that makes life easy for us. We just ask for breakfast by saying, Breakfast myBreakfast=(new Breakfast()).bringMeBreakfast(); and the magic happens!

But somewhere the chef is still there and if we really need to talk to him directly one day, we would need to re-learn the old ways!

Similar Blog

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.