On 10/22/2010 04:29 PM, Paul Roche wrote:
> Thanks for taking a look.

No problem. ;-)

> I acknowledge your points, particularly about indentation.
> To be honest, this is school work, not an assigment, more take home work 
> to experiment with, so the class variables are probably there for me to 
> improve on it. Could you recommend how I change tese to local variables 
> and make use of them? I'd like to stick with the list_add method. 
> Overall I am implementing this to learn differnt aspects such as CSV 
> files and mixin modules. So this could be considered the goal of the 
> program. I'd like to keep away from objectspace. This is where I'm stuck 
> at. I'm currently trying to utilize the list add method and .list. Again 
> thanks for taking a look. I hope this has mad eit a bit clearere. Any 
> advice would be welcomed

I suggest that you try breaking down your experiment into more atomic
parts to start.  Then assemble them once you understand things better.
You don't want to muddle things by trying too many things all at once.
Build on a solid foundation.

First of all, mixins aren't the solution for everything.  From what I've
seen in this project so far, there doesn't appear to be a need for
making your own unless you want to contrive a need.  Of course,
contrivance can torture you later.  Given that, I would start with
playing with CSV processing and see if you can figure out how to do your
work without mixins at all.

I noticed that Reader#read_in_songs returns an Array of Song instances.
 Whatever code calls that method could store that value into whatever
kind of variable makes sense for future reference and processing.  There
should be no need to use a class variable for that, really.  Another
option might be to create a SongList class, instances of which are tied
to a particular file containing a list of songs.  Then you pass around
instances of that class to methods that will process the songs in the list.

As far as mixins go, I wouldn't bother too much with trying to bake your
own at this point.  Your Pred module looks like it should work, but all
it's really doing is providing an alias for the instance_of? method.
Unless you add something more meaningful to it, it's probably best to
just remove it from your code for now.

-Jeremy