Saturday, November 8, 2014

In Short

We are putting together a leave tracking system for an affiliate, the third leave tracking system that we will have done in four years. I hope that we are getting better at this, not that the first one was bad. In any case, I have made a number of simplifications that render one of the main portions less scary.

But while going through and removing commented-out procedures left over from a prior version, I noticed that the package body runs just over one thousand lines. Further edits might have eliminated another fifty lines. Now, there is a fair bit of white space in that count, a line or two around data structure declarations and subprogram bodies, generally a line before the return statement of any function, and so on. There are not many, not enough, lines of comments, though those will come: our own organization's working version has some comments twenty or thirty lines long, carefully setting out all the errors I have made and corrected. I suspect that the true working payload is about 600 lines of PL/SQL. That's a fair bit.

The largest single procedure is probably around eighty lines, though most of that it is in subprograms, the main portion being around a dozen lines. I am generally satisfied with the structure. Some pieces need to be pulled out to make it easier to accommodate other classes of employees. I'd like to find a better way to handle testing, too.

There remains one other package, dauntingly line, full of procedures or functions written to handle this or that need of ours, and not applicable to the affiliate. I would guess that it is around 1200 lines, and should be nearer 400. We'll see next week.

No comments:

Post a Comment