{ANNOUNCE} Games::Quake::Log

Stray Toaster mwk at stray-toaster.co.uk
Fri Dec 28 05:38:29 CST 2001


On Fri, Dec 28, 2001 at 11:30:30AM +0000, Andrew Wilson wrote:
> Hi Marc

Good morning Andrew.
> 
> I see several things that could be improved
> 
> 1) It has no tests
> 2) It has no tests [0]

Ah yes, I know. That is as I didn't get round to constructing a log
file/s that had every eventuality covered.

> 3) You see that init method.  That's too big that is.

Oh, I know that too. But as it is parsing a log file, I overcame all
those fears I have about making methods longer than 10 lines. And boy,
did I overcome it.

> 4) It doesn't seem very OO to me, all those 
> 
>   if ($action eq foo) {
>     $bar = $wibble
>   } 
>   
>   sections should probably be methods called foo   

Well, the OO bit is just that you make it with a log file, then can ask
it for information. That is all.


> 5) how would I go about subclassing this to override a small piece of
>    functionality?  I wouldn't easily, that's a hint that your methods
>    are doing to much (a common BlackStar failing if I remember
>    correctly, wea always tried to do far too much in one method).

Well, as it is PARSING A LOG FILE, it would be difficult to override, as
the object stores all the information gleaned while PARSING THE LOG.

> 6) If you make the all simpler method calls (see point 40 it will be
>    easier to write tests for them. [1]

No, on second thoughts, I don't even want to write tests. And I normally
do. This is my first module san tests.

> 7) Data structures.  You're quite mad.  You're also not going to
>    start listening to my data structure rants at this point, are you?
>    :-)

Oh, those structures are lovely. I have a script which takes the
structures and pulls them apart and stores them in a series of tables,
which have Class::DBI modules with them. And *they* have tests.

> 
> Nice module by the way.

not sure which way to take that, since you are Mr. Sarcasm.

bah. I am off to my huffing again....(not with you, incidently...)

m.

-- 
So they went off together. But wherever
they go, and whatever happens to them on the way,
in that enchanted place on the top of the Forest
a little boy and his Bear will always be playing.



More information about the Belfast-pm mailing list