I’m working for a bank in Paris, and my principle job is to maintain an application and add new features when needed. Because the application have been written and in production now, I usually have to read and re-use the legacy code. The application is written in Java.
Even Java is a very good Object-Oriented Programming Language, what I have seen here is NOT object-oriented programming at all. It is unstructured programming, ok, with a lot of tolerance, we can say that it is procedural programming, but it cannot be object-oriented programming in any case.
Let me explain why:
there are no objects (classes that model real-world object): when they want to encapsulate a contract, for exemple, with a list of people concerned. In the place of creating the People object and maintain a List of People, they have:

  • a Vector of people names
  • a Vector of people address
  • a Vector of people roles
  • a Vector of people sexes
  • a Vector of people ages
  • a Vector of anything you can imagine

no object, no List, no Set, nothing, just a disk of spaghetti made of Vector. And when they want to add a new Customer, they add his name in the Vector of names, his age in the Vector of ages, …. You can imagine that ? More than a nightmare, it is really a disaster. And even worse, there is no document – no Javadoc at all and names of variable and method are abbreviations in any ways, just what come in there head at the moment of coding. You can believe it ?
The guys who have create this application are all Software Professionnal Developers, at least it is what they are proud to be. And they were really paid for that.

So, when you use OOP language, please, think in object.

I suggest the book “Thinking in Java” for those who use Java.

Advertisements