Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Inserting Multiple Lines from Console Date: Thu, 11 Apr 2013 15:05:10 -0400 Organization: A noiseless patient Spider Lines: 44 Message-ID: References: <1g78uhsyrvwdo.wcwiwmnmky0$.dlg@40tude.net> <51dbac84-c063-43fa-b7cc-7a86fbf50a29@googlegroups.com> <87r4ik8vu0.fsf@xopzuey.i-did-not-set--mail-host-address--so-tickle-me> <87d2u246v9.fsf@xopzuey.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 11 Apr 2013 19:02:30 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="16115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18SGeCsx78e4BLVtEQD9OQG" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 In-Reply-To: Cancel-Lock: sha1:6LIt4uXtGMosSJ8qE68QcrtBy7E= Xref: csiph.com comp.lang.java.programmer:23423 On 4/11/2013 2:11 PM, Gene Wirchenko wrote: > On Wed, 10 Apr 2013 14:43:39 -0400, Eric Sosman > 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. [...] That, I think, should be their main purpose and use case. Refactor a bunch of deeply-nested code into a method of its own, and a mechanical reformatter is a great convenience in re-adjusting the nesting levels. Throw a loop or an if() around something, ditto. And, of course, every so often you encounter some wretched piece of code where twenty different programmers have used thirty different styles -- the mechanical cleaner- upper can be as helpful as forty maids with forty mops. But I truly think casual use of reformatters is a bad idea. Some folks require them at check-in ("Unless thy code pass unchanged through the reformatter, Lo! I say unto thee that it shall not enter the Kingdom of Checkin"), and some apply them routinely at check-out ("Nobody should care what the code in the repository looks like, because everyone reformats it to his own style when working on it anyhow"). Both practices, it seems to me, are capable of destroying or at least obscuring information.[*] [*] For an extreme example of code that would be damaged by mechanical reformatters, note that Whitespace code embedded in Java code (perhaps for steganographic purposes) would be quite unlikely to survive Java-oriented reformatting. :-) http://en.wikipedia.org/wiki/Whitespace_%28programming_language%29 -- Eric Sosman esosman@comcast-dot-net.invalid