Date: 2003-08-01 01:02 (UTC)
I should point out that there was nothing horrendously bad about the code before I hit it. It could have been better documented, and there was excessive duplication, but it was logically sound, and there were no examples of the kind of baroque constructs, so beloved of one of the consultants who laid the groundwork for the system, which I've found in several other places.

Imagine a branching tree of if-then-elses, but with the same decisions deep in each fork. That's how I "inverted" it - taking one of the deeper if-then statements and pulling it out so it happened first - thereby eliminating a swathe of duplication. I also applied a few "else if" clauses to reduce repeated evaluation of string comparisons.

I'm probably going to have to answer a charge that I made the code MORE convoluted, but I reckon it was worth it for the performance improvement and centralised definition of constants. I think, once people grok it, my new code is actually no more complex than the old code, just very different in its approach to the problem.
(will be screened)
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

blufive: (Default)
blufive

April 2024

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 2026-03-23 11:16
Powered by Dreamwidth Studios