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


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

Re: Inserting Multiple Lines from Console

From Gene Wirchenko <genew@telus.net>
Newsgroups comp.lang.java.programmer
Subject Re: Inserting Multiple Lines from Console
Date 2013-04-11 11:11 -0700
Organization A noiseless patient Spider
Message-ID <vludm8dsfrrgk53qdn1urgf5j6cb5np2nh@4ax.com> (permalink)
References (4 earlier) <87r4ik8vu0.fsf@xopzuey.i-did-not-set--mail-host-address--so-tickle-me> <e9643093-3765-490b-ab6f-0626af042ff8@googlegroups.com> <stQ8t.185632$m21.117009@newsfe02.iad> <87d2u246v9.fsf@xopzuey.i-did-not-set--mail-host-address--so-tickle-me> <kk4bnt$9da$1@dont-email.me>

Show all headers | View raw


On Wed, 10 Apr 2013 14:43:39 -0400, Eric Sosman
<esosman@comcast-dot-net.invalid> wrote:

[snip]

>See the matrices?  They're still there, if you sort of tilt your
>head to the side and squint a little; it may help if you're slightly
>astigmatic.  See the right-hand sides in their systematic little
>dance?  Not I, not with all the head-tilting my vertebrae can manage.
>Somebody's insistence on his own notions of formatting (as embodied
>in the mechanical formatter) transformed my code from crystal-clear
>to opaque and ugly.

     Of course, it can go the other way around, too.  Sometimes,
formatters do help clean up code.  One reason that I have avoided
using code formatters though is because sometimes, aesthetics is
important.  Your code is an example of this.  Another would be a
function/method call with some parameters that are important.  How
would you split (typed all on one line):


retval=functionname(importantparm1,importantparm2,option1,option2,option3,option4,option5);

I would probably use
   retval=functionname(importantparm1,importantparm2,
    option1,option2,option3,option4,option5);
or
   retval=functionname(

importantparm1,importantparm2,option1,option2,option3,option4,option5);
It is extremely unlikely that I would use
   retval=functionname(importantparm1,importantparm2,option1,option2,
    option3,option4,option5);
but how do I specify what the aesthetics are?

>     Perhaps I should just be thankful it left the line breaks
>in place.  It doesn't always, you know!  About a month ago I used
>this well-known pattern:
>
>          Quotation quo = new Quotation.Builder()
>                  .setDate(elt.getAttribute(DATE))
>                  .setPrice(elt.getAttribute(PRICE))
>                  .setSize(elt.getAttribute(SIZE))
>                  .setSource(elt.getAttribute(SOURCE))
>                  .build();
>
>... which the friendly formatter turned into:
>
>          Quotation quo = new 
>Quotation.Builder().setDate(elt.getAttribute(DATE)).setPrice(elt.getAttribute(PRICE)).setSize(elt.getAttribute(SIZE)).setSource(elt.getAttribute(SOURCE)).build();
>
>... after which the check-in system dinged me for line length.

     Are you coming?  We got you.
     Are you going?  We got you.

Sincerely,

Gene Wirchenko

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


Thread

Inserting Multiple Lines from Console subhabangalore@gmail.com - 2013-04-08 06:59 -0700
  Re: Inserting Multiple Lines from Console Joerg Meier <joergmmeier@arcor.de> - 2013-04-08 17:04 +0200
    Re: Inserting Multiple Lines from Console Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-08 14:10 -0700
      Re: Inserting Multiple Lines from Console Lew <lewbloch@gmail.com> - 2013-04-08 15:10 -0700
        Re: Inserting Multiple Lines from Console x@x.com (znôrt) - 2013-04-09 01:08 +0200
          Re: Inserting Multiple Lines from Console Lew <lewbloch@gmail.com> - 2013-04-08 17:59 -0700
            Re: Inserting Multiple Lines from Console x@x.com (znôrt) - 2013-04-09 08:46 +0200
            Re: Inserting Multiple Lines from Console Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-04-09 05:39 -0300
              Re: Inserting Multiple Lines from Console Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-09 23:04 +0000
              Re: Inserting Multiple Lines from Console x@x.com (znôrt) - 2013-04-10 19:45 +0200
                Re: Inserting Multiple Lines from Console Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-04-10 14:43 -0400
                Re: Inserting Multiple Lines from Console Gene Wirchenko <genew@telus.net> - 2013-04-11 11:11 -0700
                Re: Inserting Multiple Lines from Console Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-04-11 15:05 -0400
  Re: Inserting Multiple Lines from Console lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-08 16:21 +0100
  Re: Inserting Multiple Lines from Console markspace <markspace@nospam.nospam> - 2013-04-08 09:56 -0700
  Re: Inserting Multiple Lines from Console lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-09 08:28 +0100

csiph-web