viernes, 17 de agosto de 2007

On Merit

Merit in very important in the software world, as in the real world.

In the real world if you show no merit (if you don't go to school for example) you will probably never find a job and starve to death. There are some mechanism on societies that prevent this, but most of the time, you will be taken out of existence. You can live by asking and using the money of your rich aunt, but it certainly won't last forever.

I know gross generalizations are mostly wrong, most of the time, including this one. But bear with me, this story has a moral.

With computer languages it is the same. At the end of the 80's and beggining of the 90's object technology was going to win. Or so we thought.

Windowing environments like the Mac were the models others would follow, and those windowing environments could not be successfully duplicated without object technology: object oriented languages were going to replace the arcane C, COBOL, FORTRAN, LISP, etc.

The replacement was called Smalltalk, but it was not available on every desktop. It was a very expensive product that run on very expensivve hardware, so older languages were retrofitted to be able to execute object oriented concepts like encapsulation, inheritance and polymorphism.

Therefore C++, ADD 1 TO COBOL GIVING COBOL, Object Oriented Fortran and CLOS were invented in order to improve the rather lousier languages before Smalltalk took over.

Ok, ADD 1 TO COBOL doesn't exist, but Object Oriented COBOL is in the works:
http://en.wikipedia.org/wiki/COBOL#COBOL_2002_and_object-oriented_COBOL

Object Oriented Fortran does exist:
http://en.wikipedia.org/wiki/Object-Oriented_Fortran

Somehow Smalltalk, which was too big to run on our computers in 1990, was too small to run on our computers in 1996, compared with the amount of RAM and hardisk required to compile C++.

The thing was not a hardware problem, that was just the explanation given, the real problem was that the people who liked C were afraid to learn something new like Smalltalk. At least new for them...

Why? The more I think of it, I think it has to do with the fact that if we all change languages, then who knows more? The smarter ones will learn faster (or at least we tend to think smart guys learn quickly), therefore people who invested 10 or 20 years in one language would find themselves asking newbies how to do things... So they need to say, with a straigh face, something about Smalltalk, like:

- It is too hard to learn.
- It is too expensive.
- It is too slow.
- It consumes too much resources.

They need to say something to convince others not to look into it. Also they need an explanation for themselves. Self delution.

If you feel comfortable about a thought, it might be that it is not true, but that you prefer to think that way. Comfortable. Not true, but sure it feels good.

C++ went belly up the way of the dinasour. I worked many years in C++ and I developed long lists of "do's and don'ts" similar to design patterns, but full of technical details. There were around 30 of those recommendations, and they were arcane (in the sense that they were hard to understand), and were all interrelated with each other, so if you wanted to understand deeeply one of them, you had to understand almost all of them, so they were very hard to explain to newbies.

It was like a miracle for job stability.

But C++ projects were failing. Not my projects, mind you, but projects all over the place.

The problem was that I had a technique, a solution, that wouldn't scale.

I know very smart people who can write code I could barely understand, but for 99% of the cases the opposite is true. If you have worked in C++ I know for sure this has been your experience too. Even maybe you never had the luck to see C++ code you could't understand, but given the amount of open source code, I doubt that.

Did C++ have any merit?

I mean, C++ is now being retired as a language and being totally replaced by Java. Java exists since 1991 with the name Oak, but it became widely known as Java in 1996.

http://ei.cs.vt.edu/book/chap1/java_hist.html

I really think C++ will not be recognized as a good language 50 years from now. If you think about how many failed projects it produced, how many late projects it produced, you will see that it will be teached at universities showing how not to design languages.

Bjarne Stroustrup or course wouldn't like that, but it really doesn't matter. Nobody could have guessed at that point that the language was going to be such a disaster, and the fact that he believed he could create such a language, actually do it and finally give it away for free shows how noble his intentions were. The results of course were terrible, but his intentions were noble.

I seriously think we should form a kind of alliance or professional body to limit such endeavors. Ok, probably you now think I lost my mind. But let us explore this idea as a thought experiment and see what could happen.

First, everyone should be free to try whatever they want, but standards should be approved by a comitee, like it happens already with the RFC internet standars and the JCP community process.

They need to submit an spec and a working prototype for everyone to review. After a few months or a few years, everyone has something to say and finally they vote. The process is simple because you can always know in which state it is, it is cumbersome if you want to subvert it, which is a rather good characteristic, it may take a lot of time, but since you always know in which state it is, at least from the outside, it is simple.

The internet run 24x7 and is never taken down for service (a clear indication IBM and Microsoft had nothing to with it). Do you see any other system with that characteristic?

Now imagine IBM and Microsoft decide to replace the internet with a new standard invented by them. Would you trust them?

The fact is that both IBM and Microsoft do not have good technical people working for them, or if they have them, they are not the ones making any decisions. If that's good or bad for those companies would be interesting to discuss, but it would take too long and is irrelevant with the topic of merit I'm trying to put on the table.

Would there be any merit on such a standard?

Was there any merit on C++?

I think that all software have to have some merit in order to be considered.

And that takes me to the current technologies: Web Services, SOA, ESB, who need them?

Have you ever seen J2EE merits?

J2EE merits were already debunked by Rod Jonhson: http://www.thespringexperience.com/speaker_view.jsp?speakerId=149

All that is left of J2EE is transaction processing, something databases did before J2EE joined the party.

So, if we already have J2EE, why do we need web services?

One reason could be to make .NET and J2EE interoperable. But web services are not transaction aware, so how could they replace EJBs?

Someone has already thought abut this: http://www-128.ibm.com/developerworks/xml/library/x-transws/

Morals:
  • Before sinking into new technologies you should first understand the need for it.
  • Usually there is no need for new technology and you play safer using the old technology for solving the new problem.
  • Whenever you make a technical choice, make sure there is a way to back out.

No hay comentarios: