Reducing Programming Errors in Nested Conditionals by Prescribing a Writing Procedure
暂无分享,去创建一个
Ways to reduce careless programming errors were investigated. Non-programmers learnt to write nested conditional programs in one of three conditions: an Automatic syntax condition, in which syntactic errors were impossible because programs were made up from whole syntactic constructions rather than from single words; a Procedural condition, in which programs were written word by word as usual, but a well-defined procedure was prescribed to help subjects write nested conditionals correctly; and a Plain condition resembling standard programming tuition, in which subjects were told the structure of the language but were given no guide to help in writing. Significantly more error-free programs were written in the Procedural condition than in the Plain condition, showing that explicit procedures can improve programming success, at least in these conditions. In the Automatic condition the success rate was still higher, showing that the procedure we used could still be improved. These results, and the outcomes of further analyses, bear on recommendations by the “structured programming” school to follow explicit procedures when writing programs, and also on previous work on the design of easily-used programming languages.
[1] T. R. G. Green. Conditional program statements and their comprehensibility to professional programmers , 1977 .
[2] Niklaus Wirth,et al. On the Composition of Well-Structured Programs , 1974, CSUR.
[3] Thomas R. G. Green,et al. Scope Marking in Computer Conditionals - A Psychological Evaluation , 1977, Int. J. Man Mach. Stud..