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


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

Re: Design Question

From Gene Wirchenko <genew@ocis.net>
Newsgroups comp.lang.java.programmer
Subject Re: Design Question
Date 2011-12-19 11:38 -0800
Organization A noiseless patient Spider
Message-ID <m64ve7tl89bnlti6oflqf4cipjmrur8k4o@4ax.com> (permalink)
References <Xns9FBFC38D782BCjpnasty@94.75.214.39>

Show all headers | View raw


On Mon, 19 Dec 2011 00:13:07 +0000 (UTC), Novice <novice@example..com>
wrote:

[snip]

>Or is there a better way?  

     KISS (Keep It Simple, Stupid).

     Why bother with classes?  What do they give you?  Is it very
much?  It is important to answer this.

     When I was taking my degree, I had a course on operating systems.
One assignment was to compare the performance of various algorithms
for CPU allocation.  One of my classmates tried the OOP approach.  He
ended up having to scrap his program and start over.  He did not
complete the assignment.  My approach was to write procedural code.  I
saw no need for classes and so did not use them.  My program worked
fine.  The instructor was impressed with the layout of the output.

     OOP is fine, but you appear to be trying to use it for the sake
of using it.  OOP is a tool.  Use a correct tool correctly.

     So again, what does using classes buy you?  Or do they just
gratuitously complicate your program?

     There are a number of acceptable answers.  If you are just
learning OOP, using it could be a good exercise in using a simple
example so you can be sure you understand.  This does not mean that it
is, in general, a good approach for your problem.

Sincerely,

Gene Wirchenko

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


Thread

Design Question Novice <novice@example..com> - 2011-12-19 00:13 +0000
  Re: Design Question Arne Vajhøj <arne@vajhoej.dk> - 2011-12-18 19:24 -0500
    Re: Design Question ilAn <idonot@wantspam.net> - 2011-12-20 16:47 +0200
      Re: Design Question Arne Vajhøj <arne@vajhoej.dk> - 2011-12-20 10:39 -0500
  Re: Design Question markspace <-@.> - 2011-12-18 19:23 -0800
    Re: Design Question Novice <novice@example..com> - 2011-12-19 13:26 +0000
    Re: Design Question Novice <novice@example..com> - 2011-12-19 13:28 +0000
  Re: Design Question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-12-19 07:16 -0400
    Re: Design Question Novice <novice@example..com> - 2011-12-19 13:49 +0000
      Re: Design Question Martin Gregorie <martin@address-in-sig.invalid> - 2011-12-19 22:22 +0000
        Re: Design Question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-12-19 20:13 -0400
          Re: Design Question Lew <lewbloch@gmail.com> - 2011-12-20 07:37 -0800
            Re: Design Question Arne Vajhøj <arne@vajhoej.dk> - 2011-12-20 10:42 -0500
              Re: Design Question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-12-20 17:46 -0400
        Re: Design Question Martin Gregorie <martin@address-in-sig.invalid> - 2011-12-20 20:40 +0000
  Re: Design Question Novice <novice@example..com> - 2011-12-19 13:34 +0000
  Re: Design Question Roedy Green <see_website@mindprod.com.invalid> - 2011-12-19 06:25 -0800
  Re: Design Question Gene Wirchenko <genew@ocis.net> - 2011-12-19 11:38 -0800
    Re: Design Question Lew <lewbloch@gmail.com> - 2011-12-20 07:42 -0800
      Re: Design Question Gene Wirchenko <genew@ocis.net> - 2011-12-20 11:51 -0800
        Re: Design Question soulspirit@gmail.com - 2011-12-20 14:55 -0800
          Re: Design Question Gene Wirchenko <genew@ocis.net> - 2011-12-20 15:25 -0800
            Re: Design Question soulspirit@gmail.com - 2011-12-21 01:11 -0800
              Re: Design Question Gene Wirchenko <genew@ocis.net> - 2011-12-21 11:08 -0800
                Re: Design Question soulspirit@gmail.com - 2011-12-21 15:27 -0800
                Re: Design Question Gene Wirchenko <genew@ocis.net> - 2011-12-21 18:06 -0800

csiph-web