skip to main content
article

Conditional statements and program coding: an experimental evaluation

Published:05 November 1984Publication History

Abstract

No abstract available.

Index Terms

  1. Conditional statements and program coding: an experimental evaluation

        Recommendations

        Reviews

        Michael Marcotty

        This paper reports on studies comparing the effect on programming efficiency of the nested conditional (IF-THEN-ELSE) and the branch-to-label conditional (IF-GOTO). Previous work in this area, using special programming languages [1, 2, and 3] has concluded that the nested structure is superior to the branch-to-label structure. The authors of the present paper, while intuitively agreeing with these results, question the experimental techniques used to obtain them. Their particular areas of complaint are: (1)The subjects were inexperienced programmers with no language-free formal training in the paradigms of program design, coding, and debugging. Thus, the results may reflect idiosyncratic approaches to these tasks. (2)While the languages with nested conditionals were indented, those for GOTO conditionals were not because the experimentors argued that this could not be done. Vessey and Weber believe that meaningful indentation is possible and that for a valid comparison the “best” GOTO syntax should be compared with the “best” nested syntax. The authors investigated indented and unindented forms of nested and goto languages. Their studies covered programming performance up to the point where the first version of the code has been written. Performance was assessed on the basis of the time taken to reach this first version, the number of syntax and semantic errors made, and the number of error-free programs per subject. The authors postulated that three factors primarily affect the time required to reach the first version of the code: :9Bthe number of words that must be written; whether the language allows control to proceed straight down a branch or requires a jump to an alternative branch before proceeding; and cognitive complexity of the grammatical structural unit. Within the context of these factors, indenting is an extra operation that must be performed as part of producing the code. The authors postulate that indentation is useful when it provides a spatial pattern that signals to the programmer the need for some otherwise obscure sequencing operation. The paper reports results obtained from experiments based on these postulates. The subjects were 59 students in a first-year undergraduate introductory accounting class who were given some training in programming as part of the preparation for the experiment. The study involved programming exercises in four languages at two levels of indentation. The results of these experiments are carefully analyzed statistically. As a result of the statistical analyses, two major conclusions are obtained: (1)Counter to the authors' intuition, there is little evidence in favor of nested languages over goto languages; the authors question prior research results. (2)There is some support that indentation is of value when a conditional structure is complex. I found the paper to be of considerable interest, not only for the results obtained but also for the detailed discussion of the extreme care that must be taken in such experiments to avoid the unwitting inclusion of extraneous factors in the results. It is clear that considerable further work in this area is required.

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image International Journal of Man-Machine Studies
          International Journal of Man-Machine Studies  Volume 21, Issue 2
          Aug. 1984
          72 pages

          Publisher

          Academic Press Ltd.

          United Kingdom

          Publication History

          • Published: 5 November 1984

          Qualifiers

          • article