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


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

Re: Holy boop: goto for Java

From Gene Wirchenko <genew@ocis.net>
Newsgroups comp.lang.java.programmer
Subject Re: Holy boop: goto for Java
Date 2012-07-23 13:23 -0700
Organization A noiseless patient Spider
Message-ID <9fcr0816qulcjd2v840rd3l35nli6mka6j@4ax.com> (permalink)
References (3 earlier) <jqhcth$u5a$1@news.albasani.net> <hsZyr.46128$Gm4.1924@newsfe01.iad> <77a353f2-0933-413a-8e47-df577ba64976@googlegroups.com> <MKCdnZn3OM6Gn5HNnZ2dnUVZ_rSdnZ2d@earthlink.com> <a75jcfFcehU1@mid.individual.net>

Show all headers | View raw


On Mon, 23 Jul 2012 13:27:27 -0500, Chris Riesbeck
<Chris.Riesbeck@gmail.com> wrote:

>On 7/22/2012 8:37 AM, Patricia Shanahan wrote:

[snip]

>> One test that I use in this sort of situation is to try to think of a
>> name for the potential extracted method. If there is a good, clear,
>> simple name, I make a method. If not, I'm more likely to leave it in place.

     That is the first test.  If there is no GCS name, either it does
not need extracting or you have a bad design that should be addressed.

>I've always liked the way someone long ago put it on this group or maybe 
>comp.lang.lisp: "You should define a function if the call to it is 
>clearer than the code it replaces."

     I would add that if the code is repeated, then break it out even
if it is a bit more complicated.  (I do not like cut-and-paste
programming.)

Sincerely,

Gene Wirchenko

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


Thread

Holy boop: goto for Java markspace <-@.> - 2012-06-03 19:36 -0700
  Re: Holy boop: goto for Java Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-03 20:03 -0700
    Re: Holy boop: goto for Java markspace <-@.> - 2012-06-03 20:30 -0700
      Re: Holy boop: goto for Java Lew <noone@lewscanon.com> - 2012-06-03 21:17 -0700
        Re: Holy boop: goto for Java Robert Klemme <shortcutter@googlemail.com> - 2012-06-04 07:56 +0200
        Re: Holy boop: goto for Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-06-04 04:28 -0300
          Re: Holy boop: goto for Java Robert Klemme <shortcutter@googlemail.com> - 2012-06-04 00:37 -0700
            Re: Holy boop: goto for Java Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-04 07:43 -0700
              Re: Holy boop: goto for Java "Mike Schilling" <mscottschilling@hotmail.com> - 2012-06-04 07:47 -0700
                Re: Holy boop: goto for Java "Mike Schilling" <mscottschilling@hotmail.com> - 2012-06-04 08:17 -0700
            Re: Holy boop: goto for Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-06-04 17:07 -0300
              Re: Holy boop: goto for Java Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-04 13:17 -0700
                Re: Holy boop: goto for Java Gene Wirchenko <genew@ocis.net> - 2012-06-04 14:46 -0700
                Re: Holy boop: goto for Java Robert Klemme <shortcutter@googlemail.com> - 2012-06-05 07:31 +0200
                Re: Holy boop: goto for Java Gene Wirchenko <genew@ocis.net> - 2012-06-05 09:15 -0700
                Re: Holy boop: goto for Java Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-05 10:51 -0700
                Re: Holy boop: goto for Java Gene Wirchenko <genew@ocis.net> - 2012-06-05 10:54 -0700
                Re: Holy boop: goto for Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-06-06 05:58 -0300
                Re: Holy boop: goto for Java Lew <lewbloch@gmail.com> - 2012-06-06 12:11 -0700
                Re: Holy boop: goto for Java Robert Klemme <shortcutter@googlemail.com> - 2012-06-05 23:24 +0200
                Re: Holy boop: goto for Java Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-06-05 17:30 -0400
                Re: Holy boop: goto for Java Gene Wirchenko <genew@ocis.net> - 2012-06-05 20:06 -0700
            Re: Holy boop: goto for Java Patricia Shanahan <pats@acm.org> - 2012-07-22 06:37 -0700
              Re: Holy boop: goto for Java Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-07-23 13:27 -0500
                Re: Holy boop: goto for Java Gene Wirchenko <genew@ocis.net> - 2012-07-23 13:23 -0700
          Re: Holy boop: goto for Java Lew <lewbloch@gmail.com> - 2012-06-04 09:33 -0700
        Re: Holy boop: goto for Java Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-06-04 07:26 -0400
        Re: Holy boop: goto for Java "Mike Schilling" <mscottschilling@hotmail.com> - 2012-06-04 07:44 -0700
          Re: Holy boop: goto for Java Robert Klemme <shortcutter@googlemail.com> - 2012-06-04 18:13 +0200
            Re: Holy boop: goto for Java Gene Wirchenko <genew@ocis.net> - 2012-06-04 10:23 -0700
              Re: Holy boop: goto for Java Lew <lewbloch@gmail.com> - 2012-06-04 10:45 -0700
                Re: Holy boop: goto for Java Robert Klemme <shortcutter@googlemail.com> - 2012-06-04 20:31 +0200
                Re: Holy boop: goto for Java Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-04 11:52 -0700
                Re: Holy boop: goto for Java Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-06-04 14:15 -0500
                Re: Holy boop: goto for Java Lew <lewbloch@gmail.com> - 2012-06-04 14:52 -0700
          Re: Holy boop: goto for Java Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-04 10:50 -0700
          Re: Holy boop: goto for Java Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-06-04 10:56 -0700
          Re: Holy boop: goto for Java Leif Roar Moldskred <leifm@dimnakorr.com> - 2012-06-04 13:05 -0500
    Re: Holy boop: goto for Java Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-06-04 07:28 -0400
  Re: Holy boop: goto for Java Roedy Green <see_website@mindprod.com.invalid> - 2012-06-03 22:10 -0700

csiph-web