Re: Heads up - go-pear refactor
| From: | Arnaud Limbourg | Date: | Mon, 04 Apr 2005 04:50:49 +0000 |
| Subject: | Re: Heads up - go-pear refactor | ||
| References: | 1 | Groups: | php.pear.dev php.pear.core |
| Request: | Send a blank email to pear-dev+get-37062@lists.php.net to get a copy of this message | ||
excellent :)
Arnaud.
Greg Beaver wrote:
> Hi all,
>
> This is an official notice.
>
> The bug count for go-pear is climbing, and to be honest, I can't fix
> them. Why? go-pear is about as spaghetti as code can get. Every time
> I change one small thing, the whole plate of pasta crashes to the floor
> and then I have to mop up the mess. I don't like doing that.
>
> I am now spending some time taking the existing code and re-factoring
> all the global stuff into functions. This may morph into classes, as
> there appears to be a lot of stuff in common between CLI and Web
> installer, but for now it is just functions to make the refactor
> smoother initially.
>
> What I am trying to do is to use the EXACT same code that we have now,
> and simply re-organize it into functions. My thinking is that simply
> naming the functions will act as a self-documenting kind of code (this
> code must set up zlib because it's a function called "setupZlib"). Then
> I will test to make sure the same logic path is followed that the
> current go-pear follows. Once this is done, I will post a sample
> go-pear script for QAers to test. Once we've verified that it works for
> everyone, I will continue to refactor until we get to code that is
> unit-testable.
>
> Then I will write unit tests for go-pear that will allow us to at least
> verify that basic functionality is working.
>
> Once that is in place, it will make fixing bugs possible.
>
> Greg
>