View Single Post
AsLan^
Not a tame lion...
 
Join Date: May 2004
Location: Narnia
 
2006-04-16, 11:12

Also, as far as critical assessment goes, if I may be so bold

Does ruby support breaking up your program into different files ? If so that would be a good start to making it more object oriented (if that is what you are still interested in).

A basic textbook example would have you break up your program into a class for the object and a driver class that instantiates the object (and then does stuff with it).

I can see where you have defined CCConnection and then instantiated it again with connection = CCConnection.new(). Normally you would want to separate these into two different files.

Although it doesn't serve much practical purpose now, if you wanted to reuse your CCConnection class in another program without cutting, pasting, and tweaking, you would be better off having it separate from the start.

Of course, if ruby doesn't work like this then... umm, please disregard everything I said
  quote