From: Daniel Waite Date: 2007-10-13T04:41:48+09:00 Subject: Re: I don't like my code -- what can I do? John Joyce wrote: > design problem. That's what I thought. The specs are being written by someone who is fluent in Java (I believe) and he puts a heavy emphasis on SQL. Granted, he's forgiven to a great extent as the program we are porting isn't of his own design. He's said before he feels it's a poor design, too. But still... SQL everywhere (not in the views though... thankfully)! > You're trying to do too much with one model. (that's more like C > structs) You need more models that can interact with each other. > (more like Ruby objects) You may need to break it down further... I definitely agree with the too much responsibility for one model. It's perverted and I feel dirty. > But just make your little sketches on paper. > There are a few perspectives you could take here, but start with the > most basic items You may need to alter the naming. Sometimes it can > be confusing. is a bid the price offered by a vendor? or is a bid > the whole response from the vendor? > > One thing to be wary of are words that are verbs and nouns. > objects tend to be nouns and methods tend to be verbs or predicates. Yes, yes, yes! You read my mind! (I'm almost welling up!) I've said this for a long time! Words are sometimes the most difficult part of programming! Words MEAN something. And programming isn't politics, so meaning should be preserved as much as possible -- what do I call the adapter part of a polymorphic association to an appointment? "Schedulable" isn't a word, so it doesn't make sense to say that (one example I recently came across -- I settled on available). Thanks John, you've made my day. Whew... time to get back to work! -- Posted via http://www.ruby-forum.com/.