Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14035

Re: Learning Java

Path csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Learning Java
Date Sun, 29 Apr 2012 11:44:14 -0700
Organization albasani.net
Lines 74
Message-ID <jnk25v$5kq$1@news.albasani.net> (permalink)
References <jmklps$3uu$1@speranza.aioe.org> <jmknim$mlo$1@dont-email.me> <jmkojn$asd$1@speranza.aioe.org> <bBnjr.1802$yC6.1600@newsfe08.iad> <4f8e21b4$0$293$14726298@news.sunsite.dk> <Nrwjr.2990$ay5.1551@newsfe14.iad> <4f9ca365$0$295$14726298@news.sunsite.dk> <KPbnr.63422$T5.37504@newsfe13.iad>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace news.albasani.net 6tpy/TujWrmDEz1T2kIy+KwoLrV2dKDmeho4cwz5+NQict/hYCQxzyLu0YiOYpPyr8sMOi85dqbzkYpmD8oSZUkjbZ9M9qb/yfIL/hOdrdx1wmNx36LJllUc9HAO0aMa
NNTP-Posting-Date Sun, 29 Apr 2012 18:44:15 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="YCqOkY6jQ7JYesZ2wWUObUpWTHZP3voSJ5854dg3KrNijrrE7Ce7sZtoVd+C7Htpus2v7yfn8pSjPGRSbuTHBpAI1RCxTqzP/vCcfxCX/b3AmrJjRLNwNGIphoIRvpTZ"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1
In-Reply-To <KPbnr.63422$T5.37504@newsfe13.iad>
Cancel-Lock sha1:tHLthy20wSf5no5bKcnOPILXp5Q=
Xref csiph.com comp.lang.java.programmer:14035

Show key headers only | View raw


Arved Sandstrom wrote:
> Arne Vajhøj wrote:
>> Arved Sandstrom wrote:
>>> Arne Vajhøj wrote:
>>>> Arved Sandstrom wrote:
>>>>> glen herrmannsfeldt wrote:
>>>>>> markspace wrote:
>>>>>>> Steve Graham wrote:
>>>>>>>> I've been a programmer for 3 decades working in mostly procedural
>>>>>>>> languages, although I have done some work with a couple of
>>>>>>>> object-oriented ones.


Superb point/counterpoint exchange, comrades, with many points on both sides.

... fast-forwarding ...

> However, the argument here is about where a lot of the procedural logic
> goes. The attempt to keep it all in domain classes failed a long time
> ago. People have adjusted, often quite well. What's been missing is a
> general acknowledgement that we write a *lot* of procedural Java code,
> and maybe work on ways to formalize how to do that well. DCI is one
> approach.

Pretty good job of teasing apart the two questions of, "Is that 
object-oriented?" and, "Is that good code?".

Other discussions in this forum have called out the distinction between an 
"object" in a sense useful to computer programming and an "object" as it's 
usually taught to programmers. Classic pedagogical examples like "A Ford 
/is-a/ Car that /has-an/ Engine" do some harm to understanding what an object 
really is in a programming sense.

Part of the difficulty in the discussion here is to converge on a definition 
of "object-oriented". Some, amongst whom I will presume to number Arved, hold 
to a very rigid technical definition, fortunately devoid of value judgment, 
with the notion of degree of compliance to that definition. It's attractive, 
because his characterization allows an unambiguous statement like, "This 
program is 73% object oriented."

Except that orientation is by design an imperfect and teleological notion. I'd 
prefer a more, well, objective term such as "objectified", or 
"object-compliant". You can orient yourself to objects but still digress to 
what we've been pleased to call "procedural" code.

Regardless. The central message that emerges is that 100% object-compliant 
code is not necessarily a good thing and rarely if ever seen in Java code 
(that works). At less than 100%, a programmer still thinks in terms of objects 
(orients themself to them), but occasionally needs some function to stand as 
its own sort of object (what a first-class notion), or procedure, apart from 
the purity of a fantastic "object model", and strays from the object path to 
static methods and such.

And yet - and yet -

If it's good code, and I'm willing to bet sight unseen that both Arne and 
Arved write very good code, there will be attributes of encapsulation, 
inheritance, and polymorphism throughout, even to the static constructs. The 
mental model for class-level behavior in Java might still conceive in 
"object-oriented" terms that which Java itself cannot directly express. 
(Functional programmers: time to jump in with your functional-flavor of the 
month rant.)

Don't make "object-oriented" a religion. If it makes you more comfortable to 
reason Arved's way, and call what you do "73% object-oriented", or to go 
Arne's way and say, "Sure, it's object-oriented, static methods 
notwithstanding", or to frame it some other way, go for it. Just be ready to 
map your understanding to common terms when talking with others, and continue 
to write good code.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Learning Java Steve Graham <jsgrahamus@yahoo.com> - 2012-04-17 15:03 -0600
  Re: Learning Java markspace <-@.> - 2012-04-17 14:33 -0700
    Re: Learning Java glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-17 21:50 +0000
      Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 19:21 -0400
      Re: Learning Java markspace <-@.> - 2012-04-17 16:47 -0700
        Re: Learning Java glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-18 02:30 +0000
          Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-28 21:56 -0400
      Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-17 21:07 -0300
        Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 22:06 -0400
          Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-18 07:11 -0300
            Re: Learning Java Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-04-18 06:47 -0500
            Re: Learning Java Lew <lewbloch@gmail.com> - 2012-04-18 10:19 -0700
              Re: Learning Java Lew <lewbloch@gmail.com> - 2012-04-18 10:20 -0700
            Re: Learning Java glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-04-18 21:10 +0000
            Re: Learning Java Gene Wirchenko <genew@ocis.net> - 2012-04-18 15:01 -0700
            Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-28 22:11 -0400
              Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-29 11:00 -0300
                Re: Learning Java Lew <noone@lewscanon.com> - 2012-04-29 11:44 -0700
                Re: Learning Java markspace <-@.> - 2012-04-29 16:34 -0700
                Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-30 20:52 -0300
                Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-05-05 18:17 -0400
                Re: Learning Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-05-06 15:49 -0300
                Re: Learning Java Gene Wirchenko <genew@ocis.net> - 2012-05-07 09:50 -0700
      Re: Learning Java RedGrittyBrick <RedGrittyBrick@spamweary.invalid> - 2012-04-19 15:30 +0100
  Re: Learning Java Arne Vajhøj <arne@vajhoej.dk> - 2012-04-17 19:26 -0400
  Re: Learning Java Patricia Shanahan <pats@acm.org> - 2012-04-17 19:08 -0700
  Re: Learning Java Roedy Green <see_website@mindprod.com.invalid> - 2012-04-26 16:06 -0700
  Re: Learning Java Steve Graham <jsgrahamus@yahoo.com> - 2012-05-15 17:40 -0600

csiph-web