July 21, 2005

To code or not to...


I am confused and little frustrated. The guy at onshore does not think my design will work. He wants it another way, in a much simpler way actually. He cannot be blamed either. The problem is, I like to write code that is confusing at first sight! :-) (Its just COBOL, so confusing code here refers to a set of nested IFs and PERFORMs and no hard-to-crack coding concepts)

My requirement is to include a provision in the existing code, to check for two new possible values of an existing field. I knew that there are two options to do that. Either I could add some more IFs to the existing set of loops or I could replicate the existing code and use the new values of the field in place of old ones. The first option would make the code a little more confusing but need only few changes and second one would require replicating all the junk in four existing paragraphs. I preferred the first one, but my onshore reviewer tells me that other one is better. I do not want to do it, and do not agree with his comment that my code will not work. (I am sure he got confused by the code! ha..ha...ha...)

I have been sitting idle from morning, thinking whether to make the changes or wait till night to talk to this guy and make him understand my code.

I have had a similar experience in my previous company, where I made some similar "beautiful" coding which the reviewer, a guy with 20 years of experience on the system did not understand (which made me proud of my coding skills), but agreed to proceed with. But the code had a small bug, which became evident on the first day of production run, when the program crashed!

This previous experience and the lack of interest to sit here till night persuades me to think otherwise. I will do what my reviewer says!!

No comments: