LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 16 May 2010 11:03:35 -0700
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: Alternative for "goto" in do loop
Comments: To: Joe Whitehurst <>
In-Reply-To:  <>
Content-Type: text/plain; charset="UTF-8"

Shaw: he is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.

On Sun, 16 May 2010 13:20 -0400, "Joe Whitehurst" <> wrote:

Yes, this is precisely my point. The word "intuitive" is bandied about as though it were an attribute of something be it a software interface, programming code or a remote control for some electronic equipment or some other piece of machinery to be used by humans without regard for who those humans might be nor what their prior experiences might have been nor what the context or circumstances of their encounter with the thing being described as "intuitive" or not might be.

On Sun, May 16, 2010 at 1:03 PM, Jack Hamilton <[1]> wrote:

"Intuitive" is one of those words that has both a general meaning and several domain-specific meanings. And since it is not always clear, even in context, which of those meanings is intended, "intuitive" may not be the best word to use. I suspect that the intended meaning in software is something like the "principle of least surprise" - the behavior is whatever surprises an experienced user of the language (or interface) the least. See:

[2] t

[3] ment.html The creator of Ruby had an interesting comment: Everyone has an individual background. Someone may come from Python, someone else may come from Perl, and they may be surprised by different aspects of the language. Then they come up to me and say, 'I was surprised by this feature of the language, so Ruby violates the principle of least surprise.' Wait. Wait. The principle of least surprise is not for you only. The principle of least surprise means principle of least *my* surprise. And it means the principle of least surprise after you learn Ruby very well. For example, I was a C++ programmer before I started designing Ruby. I programmed in C++ exclusively for two or three years. And after two years of C++ programming, it still surprises me. [4]

Joe Whitehurst wrote:

Sid, I did not experience any irritation whatsoever at your use of the word "intuitive", and I applaud your efforts to understand SAS code. Keep up your efforts. I think you will find your efforts will pay off. I apologize if my statements make you experience any unease at all. I have an entirely different agenda and my attention to your use of "intuitive" was merely a pretext to help me pose the questions I did. So, let me withdraw my questions to you. I still hope that others in SAS-L-Dom will offers some answers to the two questions I posed to you. Joe On Sun, May 16, 2010 at 3:16 AM, Sid N <[5]> wrote:

Joe, First, I did not intend to irritate any one when I said that the alternative code suggested to my question in using the GOTO loops was more intuitive. What I meant to say was that my understanding of the (original) code was not spontaneous when I first came across that sequence of GOTO statements. As Arthur put it, the code did not provide the "quick insight." Does it make it an attribute of the code? I don’t actually know. When I looked at some of the other code submitted by SAS-Lers, I could make out immediately what the code is aiming for, and I could at least think of what the output would be like. This has more to do with the limited data step coding experience, and more familiarity with some of the SAS functions that I have had in the past. I am not a native English speaker. Therefore, I am not completely sure if "intuitive" is the right word to mean what I described above. May be the usage of the word was just superfluous. However, I did not quite understand your persistence in knowing what I actually meant when I used the term "intuitive." I am interested in knowing why it is annoying when someone uses the word “intuitive”? When is it actually acceptable to use that word? Couldn’t a block of code be termed intuitive in nature? Sid On Sat, May 15, 2010 at 7:35 PM, Joe Whitehurst <[6]

wrote: Dear SAS-Lers, Sid N has not answered the questions I put to him regarding his use of


pesky adjective "intuitive" and one of the finest minds in all of


admits he has "nothing interesting or intelligent to say on the subject". Yet, we all see this pesky adjective applied not only in marketing super-hype but in many


discussions about software including coding practices within the SAS


Can and will any SAS-Lers venture answers to the two simple questions I


to Sid N? The whole nation (in Colbert's terms) is awaiting the answers. Joe On Fri, May 14, 2010 at 11:46 AM, Joe Whitehurst <


Sid, Your use of the word "intuitive" prompts me to ask: "Just specifically what do you mean by intuitive"? Are you asserting that "intuitive" is


attribute of the code? Joe Whitehurst Personal Construct Psychologist To learn more about this 21st century psychological science click any of the following links: By George Kelly Himself: A Brief Introduction to Personal Construct Psychology<

[8] f>

Ontological Acceleration<

[9]> (superb

ideas, marginal quality media) By others: Introduction to PCP <[10]> Constructivist Psychology Network <[11]> Cognitive Mapping Tools<

[12] ndServices/RepGrid.htm





On Fri, May 14, 2010 at 11:31 AM, Sid N <[15]> wrote:

I have never thought such an innocuous post (as the original) would elicit so much discussion. Thank you everyone for sharing his/her inputs.


what I like the most about SAS-L -- not just answering the question,


also providing some amazing perspective and background. So much here to learn! Personally, I have not felt comfortable working with the original code with that sequence of GOTO statements. I have tried other alternatives suggested in this thread; they are easily understandable and much more intuitive. Sid On Fri, May 14, 2010 at 9:24 AM, toby dunn <[16]>


Ahhh well we will have to agree to disagree on this. I am a stright


GOTO hater. Can't help myself I guess, I beleive that if you have to


a GOTO statement (other than in extreme rare circumstances), you need

to go

back and redesign your code. There is almost always a better



to use a GOTO. Thats just my opinion on the subject so take it for


ever it is worth. Reminds me of Macro Arrays. Yeah we should teach people about them,


that when they come across them they can rewrite the suckers in to


Macro list processing or one of couple oter methods that are easier



efficient. Toby Dunn "Don't bail. The best gold is at the bottom of barrels of crap." Randy Pausch "Be prepared. Luck is where preparation meets opportunity." Randy Pausch

Date: Fri, 14 May 2010 00:59:24 -0400 From: [17]s.lassen@POST.TELE.DK Subject: Re: Alternative for "goto" in do loop To: [18]SAS-L@LISTSERV.UGA.EDU Toby, In terms of pure efficiency, gotos are sometimes needed, as long as


does not have a statement to leave an outer loop. (could possibly


implemented as "leave <n>" where n is the number of levels you want


escape, 1 being the default). Even when efficiency is not paramount, I think gotos sometimes make programs easier to write, read and maintain. Regards, Søren On Thu, 13 May 2010 16:11:10 +0000, toby dunn <



Søren, Yes in general GOTO's are never needed. Proper loop construction,


no more than 3 levels of nesting, using proper branching, and in



the proper exit condtion at the beggining of the loop. SAS does



and Continue statements. These aren't bad so long as the level of


and Looping is relatively simple. Th more omplex the Do-Loop the



wants to use these as they just add unneeded code complexity.

Toby Dunn "Don't bail. The best gold is at the bottom of barrels of crap." Randy Pausch "Be prepared. Luck is where preparation meets opportunity." Randy Pausch

Date: Thu, 13 May 2010 12:05:57 -0400 From: [20]s.lassen@POST.TELE.DK Subject: Re: Alternative for "goto" in do loop To: [21]SAS-L@LISTSERV.UGA.EDU Perusing Knuths execellent paper [22] pdf (Thank you, Michael!), I stumbled upon this little gem: "Of course, event indicators are not the only decent





statements that have been proposed. Many authors have suggested


features which provide roughly equivalent facilities, but which


expressed in terms of exit, jumpout, break, or leave statements.


[57] has proved that such statements are sufficient to express



without go to's and without any extra computation, but only if




arbitrarily many levels of control is permitted." Which seems to vindicate my personal GOTO policy quite



that GOTOs can be used instead of LEAVE when you need to break




levels of nested loops, and (in SAS) STOP or DELETE(/RETURN) is



Thanks to you all for an entertaining and enlightening



______________________________________________________________ ___ Hotmail is redefining busy with tools for the New Busy. Get more






______________________________________________________________ ___ Hotmail is redefining busy with tools for the New Busy. Get more from



[24] 26::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2


1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. mailto:s.lassen@POST.TELE.DK 18. mailto:SAS-L@LISTSERV.UGA.EDU 19. mailto:tobydunn@HOTMAIL.COM 20. mailto:s.lassen@POST.TELE.DK 21. mailto:SAS-L@LISTSERV.UGA.EDU 22. 23. 24.

-- Brevis esse laboro, obscurus fio.

Jack Hamilton Sacramento, California

Back to: Top of message | Previous page | Main SAS-L page