Thursday, April 07, 2005

Code maintainability, people. Think about it!

The only thing more painful than 5 pages of code containing the counterproductive GoSub function is the realization that the next requirement for the project is to modify another script...that is a copy of the aforementioned 5 pages of horrible, hard to follow, pain in the butt to maintain code making extensive use of GoSubs.

Yes... a direct copy. The "author" didn't even bother changing comments to reflect the slightly different functionality of this new chunk of code. In fact, the following comment "This sub is called only if the approver is the same as the submitter" is laughable in this case and if accurate, this sub would never be called.

This is a perfect example of where, in Lotus Notes, one may want to implement a script library. Inside this script library would reside all of these pretty little Sub's. Of course, this would require thought and planning re: variable types, passing values to and from subroutines/functions and code reuse.

The scary thing is I've heard comments from the web side of the team. The appear rather surprised that I've been put on this project rather than some of the more senior team members. I've heard my project manager reassuring one of our web contractors that the changes are small. Yet apparently I'm more capable of writing clean, maintainable code than the folks they originally had on this project.

Hmmm, I may need to start a technical web blog about some of the higher level, object oriented programming concepts out there.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home