{ANNOUNCE} Games::Quake::Log

Andrew Wilson andrew at soto.kasei.com
Fri Dec 28 06:01:50 CST 2001


On Fri, Dec 28, 2001 at 11:38:29AM +0000, Stray Toaster wrote:
> Good morning Andrew.

Thanks, merry christmas by the way. 

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

Constructing said Log file is neither necessary nor desirable.  See
below.

Points 3 and 4 are really the same point.  You are parsing a log file
but you've given your module a OO interface externally.  Internally it's 
procedural.

If you broke the functionality out into methods (private methods
probably) then call them from the init it makes the code easier to
follow and easier to test.  You don't need to construct a massive log
file covering every eventuality, you test each little method on its own.

> > 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, we 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.

And if the format of your log file changes and you need to be able to
parse the old and new versions of the file, what do you do then?  If
it's properly written you sub class the log file parser and override the
bits that have changed.   Lovely Jubbly.

> 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.

lovely data structures are in the eye of the beholder.
 
> > Nice module by the way.
> 
> not sure which way to take that, since you are Mr. Sarcasm.

Take it as it was, I like it warts an all.  Of course I'd like it better
if you made it properly OO and made the functions/methods whatever
smaller ;-)

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

Oh well, suit yourself.

Do you want to get together for lunch next week sometime?

cheers

Andrew



More information about the Belfast-pm mailing list