On 07.07.2011 18:06, Ian Lynch wrote:
> I suppose it also depends on what you mean by code clean up. If for example
> the LibO people had identified say 2 meg of redundant code, ie stuff that
> doesn't do anything useful and they removed it and know it has not broken
> anything else it seems to me that would be an easy win. Even if we
> established there was no such code worth removing, it is something. I don't
> see any licensing problems with removing stuff so it is a non-controversial
> starting point that gets people working together. (Ok in practice some
> smaller replacements might be needed but I'm considering the ideal
> situation) I can see months of argument on larger scale issues that never
> had a chance of getting anything practical done so I'm working on the basis
> that something is better than nothing and making a start that is positive
> gets the possibility of incremental improvement.
Just to prevent that a false impression comes up (and the "2 meg" you
named gets a meaning that it doesn't have in fact): the "code cleanup"
in LO we are talking about comprises several things:
(1) removing code that was not compiled at all
(2) removing code that was compiled, but not used
(3) removing superfluous comment lines
(4) translating comments from German to English
(5) "real" code work: removing duplicated classes, simplifying code etc.
The most valuable part is (5) but this is not what falls into the
category that you have brought up, as it is not just removal of
something, it's more code refactoring. There was some great work done in
LO, like the removal of the "vos" library and the replacements of some
old container classes. But again, it's more than just removing code.
The same is true for (4).
So we are talking about the first three cleanups. The smallest part is
(2), but it's the most valuable part of the three, as not only the
developers but also the users will benefit from it. There's not much of
that kind as such code removals have been contributed to OOo until last
summer anyway (a big "thank you" to Caolan Mc Namarra from Red Head, the
"call catcher" magician). As far as I can see not that much has been
added since then. Nevertheless, patches for that would be very welcome.
So most of the time we are talking about (1) and (3). This is work I
usually do "on the fly", when I'm at the code that contains stuff like
that. If it helps collaboration, we could consider doing it as an end in
itself (though it would take considerably more time doing it that way).
If we wanted to repeat these cleanups in the OOo code base so that
future code merges become easier, we have to do it in exactly the same
way as it was done in LO. Let's see if patches will come.
Wait a moment - there's something we have to do before! What was it? Ah,
yes, we first have to get some code that can be patched! :-)
Regards,
Mathias