HP3000-L Archives

January 2005, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Gehan Gehale <[log in to unmask]>
Reply To:
Gehan Gehale <[log in to unmask]>
Date:
Thu, 20 Jan 2005 09:43:36 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (86 lines)
I read this article and have to say I disagree with a lot of it. 

I do agree with:
> If the professors introduce a new, enticing theory, perhaps OOP will subside.

Of course OOP is a fad. If you look at computers in general one could
predict that they are a fad too. For desktops as we know it are
changing over night and by a few years time they are hardly
recognizable.

What parts do you agree with? He does make a few points. But mostly to
me it sounds like the ramblings of  an english major who was forced to
take a college programming class.  When my wife and I were in college
(IU CS me, Purdue Bio her) they made all BS Bio majors take a class in
C++. all semester I kept hearing things from her like "why do they
make this so hard"
LoL If only she ever saw assembly...

When I was growing up I learned Basic from my father(Started on C64,
then Win 3.11 basic). I really took a liking to programming and subs
when you could use them. Then when I learned Visual Basic I was even
more happy by how things were going. I didn't know it at the time but
OOP was what I was longing for but didn't even know it yet. Right
after high school I was introduced to C++. My programming skills were
being primed, just waiting for it. Then when I took my first class in
java programming in 2000. I knew I was in love.

>Even after years of OOP, many"perhaps most" people still don't get it.

I definitely get it. It was a great teacher by the name of George
Shafer who showed me the way. On the second or 3ed day of class I was
having a problem with all of it as a big picture. I couldn't see it.
But then he explained a few things, wrote some C and c++ examples, and
somehow instantly I saw it.
It was like the sky opened up and a ray of light shined down on the
board and from then on I see OOP like an artist sees paint. It just
speaks to me. It's natural, and makes since to use in 90% of the
cases. The other 10 you see that coming and work around it. If you
don't get it, keep trying, it will come.

>Consider the profound contradiction between the OOP practices of 
>encapsulation and inheritance. To keep your code bug-free, encapsulation 
>hides procedures (and sometimes even data) from other programmers and
> doesn't allow them to edit it. 
>Inheritance then asks these same programmers to inherit, modify, and reuse 
>this code that they cannot see—they see what goes in and what comes out, 
>but they must remain ignorant of what's going on inside. In effect, a
programmer
>with no knowledge of the specific inner workings of your encapsulated class is 
>asked to reuse it and modify its members.

Exactly the point. Although he does a horrible job explaining it in my
opinion. Encapsulation doesn't hide procedures from programmers per
se. It's not like if you printed out the source code it's going to be
in a feorign language.
Encapsulation is making certain data and methods private so they can
not be edited by the program itself, think of it as a const data type
if you will. You wouldn't want someone accidentally changing pi to
3.11 on you would you..

So let's say you really to need to change pi, you can create an
inherited version of this class, but change the value of the pi part,
add any new methods you wish, expand on the class capabilities. do
what you will with it.

But any other program that runs on this system still see's pi as
normal. Only programs that call in your specific inherited class would
see a difference.

Inheritance and encapsulation is a way to guarantee that anyone can
expand on your code, and make anything they need to fit their
particular needs, without damaging the system stability as a whole.

Make sense? Too Long? I can try to explain it but be more brief.

Gehan G.



On Thu, 20 Jan 2005 Richard Barker <[log in to unmask]> wrote:
>
>http://www.devx.com/DevX/Article/26776

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2