in reply to Re^2: Factoring out common code in two methods of a class
in thread Factoring out common code in two methods of a class

I had wondered about "use constant..." but had it in my head that I would need a constant for each 'field'

I often do things like this - that is, reject a solution prematurely based on perceived drawbacks. Usually I haven't thought about the problem in enough depth. I find it's very helpful to sit down and actually WRITE DOWN the requirements (or constraints) for a particular problem, then think through them in detail. (For me, the physical act of writing, be it with keyboard or pen, helps me engage in the thinking-through process.)

  • Comment on Re^3: Factoring out common code in two methods of a class