Subj : Re: Change Patterns (was: Polymorphism sucks) To : comp.programming,comp.object From : Chris Sonnack Date : Thu Aug 25 2005 11:37 am Robert Maas, see http://tinyurl.com/uh3t writes: >> ... programmers shouldn't design solutions that address a specific >> problem in a specific way, but should abstract the problem and solve >> it in the most general way possible. > > You present a false dichotomy between one extreme and the other. No, that's your perception and misunderstanding. >> *Conceptually*, which is the whole point of OOP, code and data are >> bound, and there are languages that don't work that way. > > There are two possible conclusions to that: No, there are many possible conclusions to that. > -1- Java isn't an object-oriented language at all, it's a > class-oriented language, because you can't define arbitrarily > different methods for each instance of a class which would be > needed to satisfy the definition of OOP. > -2- The definition of OOP is wrong. OOP doesn't match methods to > instances, it matches methods to classes. > You pick which. I pick neither. OO is not a well-defined term with a well-defined meaning. It applies to a general *class* (pun not really intended) of things. >>> Here's a good mantra for all software people: REFACTOR >> >> It's a great mantra and one I apply to my personal projects. In the >> business world, things move too fast, so you need to get it as right >> as possible up front. Odds are very much against you revisiting it >> again (unless you really screwed it up the first time). > > If you were given a week (five workdays) to finish some module of a > project, and you got a rough prototype finished and working in one day, > but then you realized you could refactor it to be much better, would > you spend the next day refactoring it, and turn it in three days early, > or would you turn in the rough version at the end of the first day, > four days early? Would I turn in a rough prototype as a complete project? Only if I had suffered extreme brain death. And you've asked the wrong question anyway. To me refactoring is when you revisit *completed* code, and that doesn't often happen in a commercial environment. In fact, it's famous among programmers to be very careful about whipping up quickfix projects, because they tend to have a life beyond your expectations (in other words, try to get it as right as possible first go). Refactoring a work in progress is, to me, just development, and I've been "re-doing" my designs since long before "refactoring" was coined. > I don't consider getting the first rough draft working in very short > time, so that you then understand better what's going on, to be > screwing it up. Duh. That obviously wasn't what I meant. -- |_ CJSonnack _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________| .