Friday, March 27, 2009

Concurrent/parellal Development

In this post, I just examine how OO can be argued to result in better resource utilization. Resource here is the software programmer/developer. we may be able to use them parellaly without much complications and overheads if we adopt OO. Resource's specific skills are effectively used too.

If the software system to be developed is very extensive, containing a lot of modules, we will have to adopt certain strategies to make the process convenient and faster enough.

say for example if the total system contains 1 million lines of code, line 1 to the last line sequentially  typing is impossible, obviously. In order to get out of this mayhem we may go for structured or object oriented programming. we may partition them to Modules/components and will assign to different people to get the work done in a parallel fashion. Later we will integrate these parts together to form the total system. One effective technique here to conceptualize components with interfaces specified, and then to assemble them together once materialized.

 

The car maker's example:

 

This carmaker only manufactures the metal body. He get components like dashboard, windscreen etc from other suppliers as specified by him [read.. interface specification!]

He then assembles them to form the final Car.

 

vendor A: supplies windscreen-as per the specifications my car maker

vendor B: supplies dashboard as specified by carmaker

vendor C: he is big guy, he makes engine/power train as per the published specification, so our car maker got a copy of the specification and made the car-body etc accordingly.

vendor D: He supplies lights, shades etc.

This way other vendors as well supply a lot many things necessary for the 'final car'.

 

What makes this possible.

I would say "Specifications".... ie, INTERFACES

 

interface dashboard

{

length=100 units,

width=10 units,

color=transparent,

}

 

OR

 

interface engine

{

accelerate(),

decelerate(),

kill(),

}

 

Some form of specifications makes it possible to stick them together as a whole unit, to perform with data passed in between them.

 

  • Advantage I notice here is the effective utilization of resources and their expertise in one realm.
  • Also the process is parallel, cutting down the time for delivery

 

These two things are quite different aspects of OO-other than reducing complexity (earlier described).

 

So 

  1. Mans inability to manage greater levels of complexity,
  2. Time loss due to sequential processing,
  3. Inadequate use of resource (developer) expertise

 

are addressed effectively through object orientation or with the use of interfaces.

 

--let me coin the word--->Component based/interface based programming.

 

Again, please don’t misunderstand that Object Orientation is the only methodology that addresses these. There are other paradigms which addresses these and more or less successful but OO has the significant advantage over others as it matches how we see & manages things in a real life scenarios, like an assembly line. 

to summarize

  • confirm to specifications while creating components
  • parellely create them
  • assemble them together
total110 lines of code, each line takes 1 minutes(so 110 minues to delivery)
conceptualise 11 components of 1o lines each, assign to 11 teams
(total time to deliver=10 mins+ integration time(assume 5 mins)=15 mins)
110-15 is the time we saved.

LOL,  :) conepts are good but practice makes sense!


 

Monday, June 18, 2007

Abstraction and Absoluteness.

which had point of disagreement too. Thanks to the guy.

Atlachinolli wrote
"However, I must disagree with you in one point. As I see it, abstraction is not dependable on who perceives it. I believe that abstraction is the first level of interpretation, the primitive one, where all perception join (of course, I'm talking here of human perception). I believe that reaching the point of abstraction (and I don't mean the correct one, but THE ONE) leads to a well-design environment and thus a good agreement point to start the various branches of interpretation derived from it ... just like we do with the abstraction of universal energy and the "encapsulation" in material object."
He believes that Abstraction is independent of viewer's perspective.

I felt brilliance in the comment.I was behind it for a couple of days. I experienced difficulty analysing the argument. It appeared to be true. It helped me understanding my own faults. Though I believe Abstraction is dependent on viewer's perspective, I should admit the mistake I made earlier by saying that abstraction is inherent in objects. It was a mistake!! Abstraction exists in nature as a concept. But what is inherent in an object is something else-The Essence. It does not vary (Absoluteness) but abstraction varies. Actually an object can have infinite number of abstractions. Abstraction is an element of Object Orientation. It can't be absolute.It is about how we perceive!

Moreover works of giants like Booch, consider Abstraction as Viewer Dependent -Though It can't be blindly taken just because an expert like Booch said; History of Science has seen fall of giants and theories.

I have changed some of my perceptions about Object Orientation. I should not glorify it as a philosophy anymore, I feel.

This one was just my primary impression.
I know, this description is not enough. I will address the issue in my next post, of course.

Friday, May 25, 2007

A casual discussion on Complexity

OOP is a lot about Complexity. I read somewhere that "fortunately,even in the most complex systems there seems to have an underlying order". A software is a complex system that is why Object Orientation is favourite to Programmers. When I searched 'define:complexity' in Google
I could understand something like "the quality of being intricate and compounded".

When I was a student, my parents insisted on daily update of lessons (whatever taught has to be revised on the same day). They believed it could reduce complexity regarding my studies. I never cared this in my teenage, as I had plenty of romantic dreams(like most boys). And I never executed the above plan! I remember my mother's nervous colleague who had a number of wallets for keeping money for different purposes. We all are afraid of Complexity!? We find out a variety of methods for handling it. But sometimes I feel that Complexity is worthy (That is a different story). Some people are much bothered about this complexity and the implications of it ..At last they take asylum of spirituality (Where they say they can find Brahma-The ultimate knowledge). I don't do Share/Forex Trading because it I find it complex. My mom found Mathematics/Physics very Complex. Some say Theory of relativity is Complex. Thus complexity has different facets.

A surgeon, a civil engineer and a software engineer were chatting at a bar. The discussion rolled around to whose profession was the oldest. The surgeon said that his was, since in the book of Genesis, God created Eve from one of Adam's ribs, and surely that involved surgery. The civil engineer countered by saying that before God created man, he created the heavens and the Earth from chaos, surely a feat of civil engineering. The software engineer just smiled and said "Where do you think the chaos came from?"

That one was a well known joke! (Chaos is state of disorder; It is pronounced like 'Ke-yos')
http://pespmc1.vub.ac.be/COMPLEXI.html(Try this and let me know whether it was useful).
I feel, complexity is a characteristic 'God'? has filled while creating the world. He filled Abstraction also here-see my previous posts. And things are as we see/experience today because of complexity. Is complexity just residing inside mind, or it is there in the universe. I believe it is not just a feeling but some thing filled in nature. I believe so because of my exposure to ' Dialectical materialism'. This is becoming too informal...! Let me stop here. My friend is waiting as we planned to go for a movie. I 'll try to have a more authentic post on Complexity and reorganise(edit) this post. I am in a hurry as he is waiting.

By the way, OOP helps handling this complexity inherent to Software Systems.

Tuesday, May 22, 2007

Interfaces -The Contractual Agreements.

An Interface is a contractual agreement between the publishers of the interface and the subscribers of the interface.The publishers assures that they will not change the interface specification. The subscribers are agreed upon implementing the interface without fail in their component.




Where I see an Interface...?

As OOP is derived from the knowledge of how humans perceive things around them, we should be able to find it around us. I see the charging mobile phone-Nokia N73. I see interface there! There is an interface specified by Nokia for attaching charger so that even third party chargers in compliance with it can be plugged and used. I have seen a many cheap non-Nokia chargers in stores. what makes it possible? Interface Implementation. I felt two things are taken care here at least-Voltage Conversion and Shape. If not a better conversion of voltage, the circuits would have been burned. If no structural matching, It would have been tough to plug it there.



I have a PC. I can attach monitor to it-LG, DELL,PHILIPS etc.

The PC maker as well as Monitor manufacturer is agreed upon certain standards. So that two other concepts are originated....
  • Polymorphism
  • Concurrent & Third Party Component Development

I 'll discuss these in another post.


Monday, May 21, 2007

Let Us Share!!

It was quite recently that I knew how intense the criticism and campaigning against a novel idea like Object Orientation are! I have a different perspective and wanted to post about it. OOP can be questioned and it should be (if it deserves). I understand that OOP is much criticised for it being a pedantic discipline! But I wish to express something else, now...................

I it is always nice to hear from you. You may want to express, share your opinion or even call this blog a scrap ..! Actually when I started the blog, I was not much confident. Constraints were more! Yet it happened!

I was not irritated by that guy who was a critique of OPP and called Object Orientation as well as this blog scraps. I don't deny the other person's right to express. I request you to share, criticize...this blog. Feel free to post a comment. It will be much appreciated, irrespective of the content. And no comments will be deleted here unless it contains socially harmful ideas!

Thursday, May 17, 2007

The clash of generations!

I came across an article titled 'OOP Is Much Better in Theory Than in Practice' by Richard Mansfield- http://www.devx.com/opinion/Article/26776 .

Which, as expected attempts to tarnish OOPS. The author seemed to be overenthusiastic to bend facts. It is widely known that Object Oriented Programming was a result of programmer's search for techniques for cost and complexity reduction as well as code reusability. During his attack on oops, Mr.Mansfield doesn't care about the pitfalls of structured Programming.

According to him, OOPS is just a theoretical exercise and lacks practical significance. He himself agrees that it may be resulting from the improper understanding of the technology-oops.
He complains about unnecessary layers!

This misunderstanding usually happens when one doesn't know OOPS well. Its quite natural because OOPS only makes one productive; It doesn't makes the impossible possible. Everything you achieve (end results, not classes or objects) using an Object Oriented Programming language is possible by a low level structured or even machine language...The OOP Code is ultimately a machine language code on execution. But as one knows, it is really tough to program in Machine Language. Are we really in need of assembly language codes everywhere?

After all, everything is a trade off between Efficiency and Maintainability. It is your choice. Most of the current C++,C# or Java Codes do use oops. There is no point in doubting the potential of oops.

Mansfield find OOPS useful while programming UI Widgets. This happens usually because of one's inability for Componentization and visualisation of domain classes as they are intangible. While it is easier to deal with tangible UI Widgets.

I am one of those who directly benefited from OOPS, It reduced the complexity, made our code much maintainable. and I am very confident of its practical significance.It gave me the confidence to simulate almost anything around us.
I should have taken care while critisizing Mr.Mansfield as I see his three decades of industry experience. But I believe irrespective of who speaks, fact is much more important. I don't want somebody propagating ideas that are regressive. Richard Mansfield's arguments are outdated, I believe. More or less a screed! His arguments doesn't seems to be well supported.
Its is just a matter of accepting something 'new'. OOPS is revolutionary!

Wednesday, May 16, 2007

OOP and OO Thinking..

OOP is Object Oriented Programming.But Object Oriented Thinking is different. OOP is a narrowed down thing! Object Oriented Thinking-Object Oriented Analysis, Object Oriented Design- is applied in Computer programming. Then It is named OO Programming. When I said OOPS is present everywhere I was mistaken. It would be correct if I said "Object Orientation is there". OOPS definitely is a stream or paradigm of Computer Programming. But in the broader perspective OO [Object Orientation] is a philosophical stuff. One need not be a programmer to understand Object Orientation ,Abstraction etc..It is there in his daily life. Most of us are living in a world of Object Orientation. OOPS evolved as a means of managing the complexity involved in Programming.It was resulting from the study of human cognition as well as Programming methodologies. There are many things common to the universe as well as A software. Complexity is just one of them. Chaos is there in the universe and ..in software! Chaos is defined as 'A state of extreme disorder and confusion' by web.
http://wordnet.princeton.edu/perl/webwn?s=chaos

The essence is Object Orientation and thus elements of Object Orientation are existent in nature. It is something which is closely related to human cognition [The conscious process of knowing or being aware of thoughts or perceptions, including understanding and reasoning].
And OO Programming[OOP] is the use of OO in programming.

Through OOPS, Programming turned out to be too real world like.....That's what happened.

And my frustration of being the 'abandoned programmer' is reaching new heights. The job is just for livelihood ..No passion!No enthusiasm! I have decided to search for another one.