Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Classes and OO

Name: Anonymous 2007-09-02 21:13 ID:DbhLNVSF

I'm not the greatest programmer ever, I'll brute force if I have to, and any professional programmer would probably cringe in horror at some of my code.  Just a small disclaimer.  I'm currently using a Java derivative language (Processing), and hence Object Oriented.  My question is, is there some kind of guideline for when a new class is or isn't a good idea? How do you know when you're over or underusing classes vs. new methods.

Name: Anonymous 2007-09-03 7:00 ID:5zNUI1DN

>>11
surely I can't just keep using arrays forever
A common misconception. You can; as a matter of fact it's far more useful to have 10 data types with 100 functions to do useful things with each, than to have 100 data types with 10 functions to do useful things with each. The more arrays you use, the richier your array library (both built-in and application-specific) becomes. And surely a gene is nothing more than a list of one or more pairs of ACGT, which doesn't need to be "passed any message", right?

So don't jump into the enterprise best-practices bandwagon and shoot yourself in the foot by using enterprise scalable stuff when you can work the proper way.

Lists and dictionaries (AKA hash tables) are like violence: if it doesn't work, use more.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List