Monday, January 31, 2011

i hate arrays

In the first project I participated in this company collections were widely used. But at that time I didn't understand the benefits of this at all.
Now I can say I do. How come that the system we are preparing has not anything but the arrays. Every time you change the initial SQL for getting data from DB you have to rewrite the Java code.
Isn't this dumb? :
String dataForThis = inputDataArray[0];
String dataForThat = inputDataArray[1];
...
String dataForSmth = inputDataArray[119];

Why not define all the keys, put the key/value pair in a collection?
It would make lives of many people much easier.

And the worst thing is the leaders decided not to alter anything because the current system is already 8-9 yrs old and it works fine. This means any further development must follow these techniques.
The Japanese would say 負の遺産 (negative legacy)

No comments:

Post a Comment