Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Holy boop: goto for Java Date: Tue, 05 Jun 2012 07:31:44 +0200 Lines: 50 Message-ID: References: <6AVyr.1859$8l2.827@newsfe14.iad> <77a353f2-0933-413a-8e47-df577ba64976@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net wT0kyRrMVusdjTVbrPlg6wh1GoX/7+os1W6UFvLV5xzqtBZY/kaqvZLGSvERmBzxw= Cancel-Lock: sha1:CBaEuAD7epNXsnsrkbGUOtjeqg0= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:15069 On 04.06.2012 23:46, Gene Wirchenko wrote: > On Mon, 04 Jun 2012 13:17:21 -0700, Daniel Pitts > wrote: > >> On 6/4/12 1:07 PM, Arved Sandstrom wrote: >>> On 12-06-04 04:37 AM, Robert Klemme wrote: >>>> On Monday, June 4, 2012 9:28:13 AM UTC+2, Arved Sandstrom wrote: >>>>> What amazes me is that these individuals support this religious stance >>>>> by arguing that it improves readability, when producing little auxiliary >>>>> methods usually does anything but. > > Personally, I find this sort of stuff to be very unreadable. If > it is used multiple times, it is not quite so bad. If it is used but > once, it is a disruption to following the caller. Hmm, but with that argument you must put everything in one method - what you clearly do not do as your later comments show. :-) > There is also context to consider. I have sometimes considered > moving some short, common code to subroutines to find that by the time > I re-established the context in the subroutine, the subroutine's code > would be longer than having the code in the caller. Right. Or if argument lists get too long that is also a good sign that something is wrong. > I like my code to tell a story at one level of abstraction. That's an interesting way to put it. And it hits the nail on the head. > It makes it easier to follow the logic. The high-level code is all in > one sequence. With this, I can skip the lower-level logic most of the > time. If I need to adjust the higher-level logic, it is a good sign > when I do not have to concern myself much with the lower-level logic > (because what I came up with for it is still what is needed). Right! That discussion nicely shows why it still needs humans to write software: the process of cutting algorithms in parts cannot be easily automated. One reason for that is that we do not write for machines (which easily cope with the most contrived code as long as it compiles) but rather for humans - namely the one who comes after us and has to fix a bug or add a feature. Kind regard robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/