Re: reduce redundant code

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:uXBHnf8gIHA.4140@xxxxxxxxxxxxxxxxxxxxxxx

"MP" <NoSpam@xxxxxxxxxx> wrote in message
news:Oz$SIG8gIHA.536@xxxxxxxxxxxxxxxxxxxxxxx

"Ralph" <nt_consulting64@xxxxxxxxx> wrote in message
news:OkB%23ag7gIHA.4724@xxxxxxxxxxxxxxxxxxxxxxx

"MP" <NoSpam@xxxxxxxxxx> wrote in message
<snipped>
my sample is totally f*ed up?
mark


No, not at all. But it doesn't appear very "elegant" does it?

really sheepish grin....well, I *thought* it was more elegant than the
original form?
goes to show what I know!
:-)

I'd appreciate a specific pointer to the "non-elegance"
what is it i'm doing wrong in that (admittedly brief :-) ) sample



Over the years, what has always been interesting to me is the innate
ability
of a programmer to notice when something "just ain't right". Experience
will
teach to recognize "Bad Patterns" as quickly as "Good Patterns". Frankly
the
former is perhaps more useful as a learning tool than the latter. <g>

Go ahead and follow through with it. Usually the effort itself will be
more
enlightening than a ton of books.

well, I did and it "works" and I thought it was "better", and I was asking
if it was an example of "strategy" pattern but apparently it's just another
example of my confused state
<vbg>



But since you ordered the book - you will soon be on your way to
"elegance"
that fits YOUR problem domain.

well, maybe not...
I've read :
1 gof (several times)
2 Object-Oriented Modeling and Design by Rumbaugh
3 Microsoft Visual Basic Design Patterns by Stamatakis

oh crap i also bought and read (in 2005)
4 Design Patterns Explained : A New Perspective on Object-Oriented Design
now just ordered a second time cause I didn't remember the title...grrrr ...
:-)

5 Head First Object-Oriented Analysis and Design: A Brain Friendly Guide to
OOA&D
6 Object-Oriented Thought Process, The (2nd Edition)

and apparenly none of that is sinking in
:-(


-ralph




.



Relevant Pages

  • Re: object oriented parsing
    ... expression by using above design pattern. ... Expression evaluation is usually at a much lower level of abstraction than the overall problem so it would usually be encapsulated in a single method. ... This is analogous to trying to code a Quicksort algorithm using OO techniques; one might be able to identify object like Pivot and Partition, but OO techniques would be overkill for such a low-level problem and one would usually encapsulate it in a sortIt library function that one calls from a method. ... Design patterns are not an end in themselves and they are not intended to be some cookbook tool for mechanically designing software. ...
    (comp.object)
  • Re: Design Pattern to create a family tree
    ... Family tree app. ... The representation that is convenient for navigating the tree may not be the most convenient one for representing the *content* of the tree. ... Design patterns exist to resolve common problems the appear repeatedly during design activities but they are not a substitution for design activities. ...
    (comp.software.patterns)
  • AIB 2010-13: Design Patterns for Safety-Critical Embedded Systems
    ... Design Patterns for Safety-Critical Embedded Systems ... considered requirements include safety, reliability, modifiability, ...
    (comp.doc.techreports)
  • Re: The OO approach
    ... Some design patterns are ... techniques, and a marketing gimmick. ... The methodology is useful whenever it's useful, ...
    (comp.lang.forth)
  • Re: Lisp article at IBM
    ... here i mean an overall meaning for the concept of design. ... you saw my use of 'smart' and 'elegant' and rather than read ... part of the issue with the failure of lisp and CL to evolve *might* be due to ... not arguing for a change to the language - for my own personal use, ...
    (comp.lang.lisp)