[Aiml-programr-developers] New graphmaster "node" class completed

mauro at cicio.org mauro at cicio.org
Fri Oct 5 04:37:18 EDT 2007


Micholas,

> All sounds good to me. I like the idea of comparing old/new... that way
> we can be certain that the code in the lib has earned its place... also
> I like the opportunity to learn. :-)

Me too! Honestly: I am very happy to have this pR coming back to life.
The previous version was too much oriented to get the bare minimum to
work (for Tiresia), and too little attention was therefore paied to my
best love: clean design and good coding :-)
Very happy to have professional developers to discuss this topics with.

> I'll take an in-depth look at your new file / comments tomorrow during
> lunch and will reply in depth very soon.

Fine,

> As I think I mentioned in a previous email, I'm intentionally not
> looking at the "current" node class so we can do an untainted compare
> and contrast.

Good idea. Honestly, I don't even remember the old one.I think I have
never seen some parts of it. But learning by contrast is a good thing
for all of us, I fully agree.

> However, I've obviously quickly skimmed through your new
> file. I'm really going to enjoy this!

:-)

> Some quick points: I agree with using the metaphors as it makes the code
> easier to understand - a good thing.

Good... me too, as you know, even if sometimes I am lazy in looking
for the good metaphores and I end up using "getters and setters" whic,
of course, is better than a bad metaphore.

> Also, seeing how you've refactored
> my clunky Ruby is certainly an eye opener.

Your Ruby is good, man! I have seen much worse code in a lot of plugins.
Obviously you are a very good programmer, with an eye for neat code.
My refactoring is only there because it is the fastest way to show
some ideas on how we can take advantage of Ruby's features to develop
a more concise, still very expressive, style.

> Coming from C# (where there
> is no obvious equivalent) just using the Array.shift method makes things
> a whole lot easier. In addition, I like how "unless" is used to get rid
> of pesky if...else.

I am very glad of this. If you like this things, our collaboration
will be very easy.

> Finally, I think it important that we include some
> means of referencing the origin of a template in the graphmaster as this
> is extraordinarily useful when debugging AIML (see the "source" argument
> in my add_category method).

Right. Is there a class we might invent, that wraps all theis
divverent parameters, so that the meaning of this class will make the
code more readable?
I mean: CleverName.source

Ciao,
Mauro


More information about the Aiml-programr-developers mailing list