[Freeipa-devel] Why do we have so much duplicated code?

Rob Crittenden rcritten at redhat.com
Wed Jan 27 14:34:10 UTC 2010


John Dennis wrote:
> I constantly find identical code spread across multiple files. Is there 
> a reason for this code duplication? (Perhaps trying to keep import name 
> spaces isolated?)

No, we don't intentionally add duplicate code. Details would be helpful.

> 
> It seems to me code duplication is bad software practice for obvious 
> reasons.
> 
> If there isn't a compelling design justification for the duplication can 
> we start moving some of this stuff to common libraries?
> 

Yes.

We did a tremendous amount of code reorganization many months ago, it is 
possible that some of this duplication is a result of that. There may be 
some dead code too. We completely replaced the entire XML-RPC subsystem 
but we didn't do it all at once, we slowly replaced it, so unused code 
may still exist as a result of that transition.

rob




More information about the Freeipa-devel mailing list