FYI: what's OOP's jargons and complexities?

T

Trans

And everything still gets to be objects :)

Great point Douglas. Ruby (especially) helps make OOP manageble. And I
hope it continues to improve on that.
 
F

Florian Frank

Trans said:
Thankfully I didn't know that. So I took it for what it said. I have

recently read a few other artciles to that effect as well. For
instance,

http://www.devx.com/opinion/Article/26776/0/page/1
To quote from this article: "A frequent argument for OOP is it helps
with code reusability, but one can reuse code without OOP—often by
simply copying and pasting."

You really ought to be more careful in deciding, which people's opinion
you should take serious and which you shouldn't.
 
D

Douglas Livingstone

String c = new String("a string" + " another one");
System.out.println(c);

The challange was:

Store two strings, a and b, in memory. Combine those two strings and
store them in memory. Take the data in memory and send it to the
standard output.

Your code only does:

Store a tring in memory, then send it to the output.

I don't speak Java, so I don't know what the best answer to the
original challange was; perhaps someone can help me out?

I'm sure that most of these problems are static typing problems
anyway, in the original code a and b were never defined as being
strings. This has nothing to do with OOP, it is just advcation for
dynamic typing (or even Duck typing ;)

Douglas
 
T

Trans

Hi Florian,

I didn't say what I thought of it, in fact I didn't find it a
particluarly good article myself. It was just an example that there is
varying opinions and discussion going on about the topic. Having read
it I was likewise keen on other opinions like Lee's. Again, it is easy
to cherry pick. If that were the critera by whihc we judged then none
would have a worthy word. One should be careful not to throw out the
baby with the bath water. I think the topic is worthy of consideration,
as I have discussed in my earnest messages at the start of this thread.
Seriously,
T.
 
P

PA

To quote from this article: "A frequent argument for OOP is it helps
with code reusability, but one can reuse code without OOP—often by
simply copying and pasting."

You really ought to be more careful in deciding, which people's
opinion you should take serious and which you shouldn't.

Right... I have to admit that I never, never, never encountered any
sort of "copying and pasting" monkey business going on in a truthfully
pure OOP environment. The only catch though, is that I never really
encountered a pure enough OOP environment which proactively prevents
its very own user from being dumb, lazy asses either.

Oh, well...

Cheers
 
F

Florian Frank

Douglas said:
I don't speak Java, so I don't know what the best answer to the
original challange was; perhaps someone can help me out?
public class test {
public static void main(String[] args) {
String a = "a string", b = "another one", c = a + b;
System.out.println(c);
}
}

Xah Lee usually talks about things, he doesn't understand. He's also
unable to learn anything new, from the explanations he receives. There
are many reasons to criticize Java, but it's unlikely that Xah will ever
come up with any of them.
 
D

Douglas Livingstone

public class test {
public static void main(String[] args) {
String a = "a string", b = "another one", c = a + b;
System.out.println(c);
}
}

That makes more sense, thanks.
Xah Lee usually talks about things, he doesn't understand. He's also
unable to learn anything new, from the explanations he receives. There
are many reasons to criticize Java, but it's unlikely that Xah will ever
come up with any of them.

I can imagine that :)

Cheers,
Douglas
 
J

James Britt

Trans said:
James!

Your not willing to correct his mistakes as _that_ would be feeding the
troll, but you are willing take the time to bad mouth it and shout
"troll!" ?

You do have a strange sense of irony!

As well as an ironic sense of the strange.

James
 
T

Trans

Xah Lee usually talks about things, he doesn't understand.
He's also unable to learn anything new, from the
explanations he receives. There are many reasons to
criticize Java, but it's unlikely that Xah will ever come up
with any of them.

Considering I took the criticism ernestly, I suppose I should infer
that must also be a common opinion of me. Sigh.

T.
 
P

PA

Considering I took the criticism ernestly, I suppose I should infer
that must also be a common opinion of me. Sigh.

"No one would talk much in society, if he knew how often he
misunderstands others"
-- Some dead German dude

Cheers
 
M

Mathieu Bouchard

First off I'm wondering if you read the referenced post?

If you mean the one from gmane.org, yes, and I think it misses a few
things.

The word "purity" it uses is straight from Java gospel, and ignores other
definitions of purity in OOP thinking. From my perspective, purity means
that a language _integrates_ the concepts of OOP quite deeply into its
design. If OOP was only added as an afterthought (C++ over C) then more
purity can be achieved by reexpressing parts of the base language so that
OOP can be better integrated with it. In that sense, both C++ and Perl get
the spirit of OOP better and deeper than Java because they offer features
to allow user-defined code to look like the base non-OOP language.

Purity is only mentioned a bit, but all of the article seems to be
attacking mostly Java, with little evidence of any research into other
approaches to OOP. For something in a Python newsgroup I'd expect
something more enlightened than that.
I've been programming for over 20 years.

Same here, although I started quite young and half of the years involved
almost only BASIC and LOGO...
But with OOP I find myself spending much more time on the "proper
model". OOP has made me an aweful programmer by comparision. Yea, so
great others can more easily use my code. That's nice. But it sure as
hell doesn't make my coding any simpler.

Here's my impression of your situation, which is also a lot my personal
experience:

OOP made you raise your standards enormously, and ask yourself lots of
questions and doubt of your ways to write code. This is good, but there
has to be some kind of stopper, to avoid getting in an endless loop of
rewriting programs. It's good to plan for future expansions, but it
shouldn't be overdone. In particular, there is no single ideal way that a
program should be written, and some redesigns may look like switching from
one ideal to another and back and forth and getting lost. Extreme
Programming methodology mentions that problem and advocate a more
laid-back attitude about this (just code the "minimum" and redesign only
to fill in new actual needs or to shorten the program... well that's _my_
interpretation of it anyway...)
I wnated to modularize, but it's tricky b/c modules don't include
class level stuff (without wrtting some meta-code to manually do it) [...]
Now my problems aside, consider all those OOP design patterns. All very
cool I think, but a whole lot more complexity. OOP is NOT simple.
Otherwise it wouldn't be so difficult to teach.

First, the module-vs-class concept of Ruby is superfluous, and it's a
pity, because CommonLisp has the same mixin system using only classes, and
so demonstrates you don't need modules. Apparently Modules were introduced
to make things more intuitive, but my experience has been the reverse, and
I have spent significant time circumventing that distinction.

Apart from that, I'd like to give the example of Complex Numbers. In
Mathematics, Complex Numbers are defined by an extremely short
formula: i*i=-1. That doesn't seem very complex, isn't it? Then you can
work out a full course explaining to students the _consequences_ of that
little formula on usual arithmetics. However, Complex Numbers are very
much used in practice, as a way to _simplify_ formulas, some becoming 3
times shorter or even better. Some things even look like they were made
for being used with complex numbers. (ask physicists and engineers)

I think it's a good example of a tradeoff, of having to learn more
complexity, to later be able to reduce it even more in various
situations. Just like OOP.
I don't believe teaching how to use any set of language constructs is
neccessarily hard. Kids program in Logo! Becoming an expert is hard,
_especailly in a hard thing_.

Oh yeah. But then, you wouldn't use Logo to code the projects you have
today. Why is that then?

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
 
J

James Britt

Mathieu said:
...
Purity is only mentioned a bit, but all of the article seems to be
attacking mostly Java, with little evidence of any research into other
approaches to OOP. For something in a Python newsgroup I'd expect
something more enlightened than that.


But that's the thing; it was apparently posted to comp.lang.*

If this were just Pythonistas discussing things among themselves I too
would expect far more enlightened observations.

I don't care for certain things about Python, but it seems to attract a
number of bright people, and I hope that this particular article doesn't
tarnish how people view the Python community.


James
 
A

Alexander Kellett

To quote from this article: "A frequent argument for OOP is it helps
with code reusability, but one can reuse code without OOP—often by
simply copying and pasting."

lol
stupid people always provide a good laugh :)

Alex
 
T

Trans

Mathieu said:
The word "purity" it uses is straight from Java gospel, and ignores other
definitions of purity in OOP thinking. From my perspective, purity means
that a language _integrates_ the concepts of OOP quite deeply into its
design. If OOP was only added as an afterthought (C++ over C) then more
purity can be achieved by reexpressing parts of the base language so that
OOP can be better integrated with it. In that sense, both C++ and Perl get
the spirit of OOP better and deeper than Java because they offer features
to allow user-defined code to look like the base non-OOP language.

Purity is only mentioned a bit, but all of the article seems to be
attacking mostly Java, with little evidence of any research into other
approaches to OOP. For something in a Python newsgroup I'd expect
something more enlightened than that.

Its interesting what peopl take away from something. The thing that I
focused on, and what I meant by what I had "figured out myself" was the
encapsulation --i.e. that an class/object is just an ecapsulation, and
a method an ecapsulation in an encapsulation.

The purity thing didn;t strike me as much b/c that main 6 of one or
half dozen of another. Either you lean toward types and key what
methods do off those, or you len toward a univeral type and use lots of
different methods --they "typing" ends up somewhere --either in the
methods or the data. In OOP its all to the data, in so far as it is
OOP.
Same here, although I started quite young and half of the years involved
almost only BASIC and LOGO...

Sure I started with BASIC and 6502 Asm on C64.
Here's my impression of your situation, which is also a lot my personal
experience:

OOP made you raise your standards enormously, and ask yourself lots of
questions and doubt of your ways to write code.

Oh no! I respectively disagree here. OOP made we add another layer of
conern to my programming. There was nothing wrong with my code before
--it worked quite well. You know my father was Cobol programmer and I
tell you I think that man could have out written anyone here. He single
handedly wrote CRM and Accounting applications that today would take
dozens of progammers to do. But I don't have to go there to get at my
point either. I used to maintain 1,000,000 lines of code for such an
app all in MS compiled BASIC. It was all very well organized into small
managble programs. And I could chrun'em out pretty quick. I think if we
had to OOP that code, it would have been an absolute nightmare --in
fact that's what that comapny started to do (to get with the "Windows"
times) right after I left them. Two years later they were no longer in
business.
This is good, but there
has to be some kind of stopper, to avoid getting in an endless loop of
rewriting programs. It's good to plan for future expansions, but it
shouldn't be overdone. In particular, there is no single ideal way that a
program should be written, and some redesigns may look like switching from
one ideal to another and back and forth and getting lost. Extreme
Programming methodology mentions that problem and advocate a more
laid-back attitude about this (just code the "minimum" and redesign only
to fill in new actual needs or to shorten the program... well that's _my_
interpretation of it anyway...)

So then you end up writing even crappier programs anyway b/c you don't
really get the model the way it ought to be. So what's the point? Worse
you don't even realize it till you go to add the last little feature
and realize it screws the whole model up, and the only way to get it in
there is to write a god aweful hack. And how do you know everything
fits well in an OOP model anyway?
I wnated to modularize, but it's tricky b/c modules don't include
class level stuff (without wrtting some meta-code to manually do
it)
[...]
Now my problems aside, consider all those OOP design patterns. All very
cool I think, but a whole lot more complexity. OOP is NOT simple.
Otherwise it wouldn't be so difficult to teach.

First, the module-vs-class concept of Ruby is superfluous, and it's a
pity, because CommonLisp has the same mixin system using only classes, and
so demonstrates you don't need modules. Apparently Modules were introduced
to make things more intuitive, but my experience has been the reverse, and
I have spent significant time circumventing that distinction.

I agree with you there!
Apart from that, I'd like to give the example of Complex Numbers. In
Mathematics, Complex Numbers are defined by an extremely short
formula: i*i=-1. That doesn't seem very complex, isn't it? Then you can
work out a full course explaining to students the _consequences_ of that
little formula on usual arithmetics. However, Complex Numbers are very
much used in practice, as a way to _simplify_ formulas, some becoming 3
times shorter or even better. Some things even look like they were made
for being used with complex numbers. (ask physicists and engineers)

I think it's a good example of a tradeoff, of having to learn more
complexity, to later be able to reduce it even more in various
situations. Just like OOP.

Okay, I'll buy that explination I guess. OOP principles certainly have
relavence. I'm not totally knocking them mind you. I simply think we
haven't really seen them for what they are fully, which has created an
over exuberhance for all things OOP and also set up some artifical
barriers we must now contend.
Oh yeah. But then, you wouldn't use Logo to code the projects you have
today. Why is that then?

Oh I'd probably Logo in a heart beat if ther were any _really good_
implementations. It's basically just slightly simplified-syntax lisp.
And consider BASIC. Who would have ever thought BASIC would become a
premier OOP langage? VB.net has the whole OOP thing going on now --in
some ways even more so than Ruby.

T.
 
D

Douglas Livingstone

Douglas said:
I don't speak Java, so I don't know what the best answer to the
original challange was; perhaps someone can help me out?
public class test {
public static void main(String[] args) {
String a = "a string", b = "another one", c = a + b;
System.out.println(c);
}
}

I just did a quick google to see what these "refactoring tools" looked
like, see the code in the demo:

http://www.refactorit.com/?id=1319

Looks like it came right out of Xah's post!

People really do write code like that :(

Douglas
 
H

Hal Fulton

James said:
As well as an ironic sense of the strange.

Of course, sometimes the worst troll is the unintentional troll. ;)


"Irony can be pretty ironic. " - Leslie Neilsen, _Naked Gun_


Hal
 
M

Mathieu Bouchard

But that's the thing; it was apparently posted to comp.lang.*

Woops! I should have noticed that.
I don't care for certain things about Python, but it seems to attract a
number of bright people, and I hope that this particular article doesn't
tarnish how people view the Python community.

I hope too.

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
 
M

Mathieu Bouchard

So then you end up writing even crappier programs anyway b/c you don't
really get the model the way it ought to be. So what's the point? Worse
you don't even realize it till you go to add the last little feature
and realize it screws the whole model up, and the only way to get it in
there is to write a god aweful hack.

And how is it terribly different in a program that carefully avoid using
any OOP feature (except for the fact that, by choice, you don't use any
OOP constructs to simplify the system, or just paraphrase your way into
equivalent but different-looking concepts) ?
And how do you know everything fits well in an OOP model anyway?

You don't need to know that, just need to be comfortable enough with the
model, and make sure the model serves well its present requirements, and
if possible, its near-future requirements.
Okay, I'll buy that explination I guess. OOP principles certainly have
relavence. I'm not totally knocking them mind you. I simply think we
haven't really seen them for what they are fully, which has created an
over exuberhance for all things OOP and also set up some artifical
barriers we must now contend.

Well, I say that alot of OOP code is crappy, and OOP is usually not
properly taught, because OOP is a new norm and some people have been too
enthusiastic and _naïve_ about it. Worst offender is Java.
Oh I'd probably Logo in a heart beat if ther were any _really good_
implementations. It's basically just slightly simplified-syntax lisp.

Funny, I thought it was a complexified-syntax lisp, but less powerful.
And consider BASIC. Who would have ever thought BASIC would become a
premier OOP langage? VB.net has the whole OOP thing going on now --in
some ways even more so than Ruby.

I didn't know VB.NET was BASIC... I thought it was just C# but with an
alternate horrendous sin-tax designed to appeal to sixties nostalgics.

_____________________________________________________________________
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
 
T

Trans

Mathieu said:
And how is it terribly different in a program that carefully avoid using
any OOP feature (except for the fact that, by choice, you don't use any
OOP constructs to simplify the system, or just paraphrase your way into
equivalent but different-looking concepts) ?

Really just in that it's easier to code -- IMHE (Experience).
Well, I say that alot of OOP code is crappy, and OOP is usually not
properly taught, because OOP is a new norm and some people have been too
enthusiastic and _naïve_ about it. Worst offender is Java.

For sure. I leanred Java nad then decide to quick forget it. I want
comuters to work for me not the other way around ;-)
lisp.

Funny, I thought it was a complexified-syntax lisp, but less
powerful.

He he. Simplified for the human, complexified for the computer. The
power is basically the same.
I didn't know VB.NET was BASIC... I thought it was just C# but with an
alternate horrendous sin-tax designed to appeal to sixties
nostalgics.

LOL :) Some parts of it I miss actually. I especailly miss the VB RAD
environment --that was pretty nice.

T
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,166
Messages
2,570,902
Members
47,442
Latest member
KevinLocki

Latest Threads

Top