Friday, September 4, 2009

One horrible interface that I had to use were some calls that took all of their input parameters in a Hashtable, and returned all of their results in another Hashtable. It wasn't as if the parameters or the results were all that dynamic either. The inputs were parameters for a JDBC call of a stored procedure, and the results of the stored procedure were returned. After having to deal with it for a week or so, I wasted a few hours rewriting them to take a data structure for the input and return a data structure. After doing that, I decided to give up on it. It had been that way before I got there, and, as far as I know, it's still that way, years later. Even though it's a pain to deal with and more error-prone than it should be, it still works well enough.

Even worse, though, was this other code that passed this gigantic Properties around. It contained all the HTML form parameters, I think. But, for some reason, someone stuffed all the JVM system properties into it, among other things. And it was also used for passing other parameters around. I even added some more parameters to it when I had to make some stuff work, and I wasn't about to take the time or the effort required to understand the mess of the code there. The Properties was dumped to the debug logs at least twice in the codepath, which made for pages and pages of junk. I still preferred having it dumped in the logs twice than not at all, though.

No comments:

Post a Comment