Re: reduce redundant code




"Schmidt" <sss@xxxxxxxxx> wrote in message
news:uBfL2p%23gIHA.4196@xxxxxxxxxxxxxxxxxxxxxxx

"MP" <NoSpam@xxxxxxxxxx> schrieb im Newsbeitrag
news:uTklkE%23gIHA.200@xxxxxxxxxxxxxxxxxxxxxxx

<snipped>.

I'd sure like to get a handle on the oo way...
don't know why I'm so stupid that I cant'
figure it out...other than I was born that way :-)

Maybe too many books...? ;)
And BTW, if you can't figure it out, how to implement
a solution "in OOP", then you probably don't need an
OOP-approach for your scenario...<g>

No, seriously - I always try to implement something
in the procedural way first, arrays instead of collections,
Enums instead of large ParamLists, etc., because this
normally results in faster code and also the code-
volume is not large, ...


I have to walk a very fine line here. For while I have the highest respect
for Olaf and am positive that whatever design methods he uses work well for
him, I disagree with this advice.

Back in the day when I started out (Booch and UML 0.9) I blurted out pretty
much the same frustration - "How do you know when you get it?" The reply I
remember and pass on to my students to this day - "When you have trouble
doing it any other way". <g>

If one is trying to learn OO/OOPL starting out with a procedural approach in
order to implement something is not a good way to start. It tends to put the
"how" in front of the "what" and leads to confusion.

But perhaps just as bad is trying to pick a "pattern" and apply it.

OO is simply the definition of objects and defining the collaboration and
relationships between them that exist within your problem domain. So just
define the objects and relationships. Keep it simple, who 'is a', who 'has
a', who 'uses', ... Use a yellow pad, index cards, whiteboard (my
favorite), tinker toys, ...

The implementation will come naturely - but later. <g>

-ralph


.



Relevant Pages

  • Re: reduce redundant code
    ... stupid that I cant' figure it out...other than I was born that way :-) ... Examples would include the OWL or MFC for the Win32 API; ADO; Forms and ...
    (microsoft.public.vb.general.discussion)
  • Re: ICF-SW77 ebay price
    ... I sure think that is stupid! ... one born every min. Mike, you of all the people here should ... BTW, i have a new, in the box, never opened SW77 ...
    (rec.radio.shortwave)
  • Re: reduce redundant code
    ... stupid that I cant' figure it out...other than I was born that way :-) ... I just assume there's an oo way to encapsulate my interaction with that api ...
    (microsoft.public.vb.general.discussion)
  • Re: The Case Against RosAsm (#2)
    ... I cant understand how anyone can critic a product so easy to learn as Spasm. ... There is not one thing in there that is like "stupid". ... I mean the search, expand features, Title, ... And it was much easier to learn to addess memory ...
    (alt.lang.asm)
  • Re: Taxing AIG Bonuses
    ... You're assuming, stupidly, that it's all about personal choice. ... Please explain how Wubya "decided" to be born into the Bush family. ... I think it's a bad idea when stupid people end up in positions of power. ...
    (rec.sport.golf)