How to make while loops iterative: an introduction for first-year CS students

M. Morazán
{"title":"How to make while loops iterative: an introduction for first-year CS students","authors":"M. Morazán","doi":"10.1145/3442481.3442504","DOIUrl":null,"url":null,"abstract":"The design of while loops is among the hardest lessons for beginners in programming. Their design is difficult because students must do more than solve a problem. They must also, for example, correctly sequence mutations, define loop invariants, and avoid infinite loops. Another difficulty students face is making while loops iterative. This issue is commonly ignored in programming textbooks for beginners despite being relevant to future courses such as Computer Architecture, Programming Languages, and Algorithms. The difficulty with making while loops iterative revolves around the elimination of delayed operations. This requires introducing beginners to the concept of control. This article presents a novel transformation recipe for beginners to make while loops iterative. The transformation recipe guides students on how to accumulate control information on a stack to eliminate delayed operations in the body of loops. In addition, this article presents descriptive statistics obtained from students on the maiden voyage of the new design recipe. The empirical data suggests that students feel that writing iterative while loops is hard, but enlightening. In addition, the empirical data suggests that students have a very favorable opinion about designing while loops.","PeriodicalId":262503,"journal":{"name":"Proceedings of the 9th Computer Science Education Research Conference","volume":"86 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-10-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 9th Computer Science Education Research Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3442481.3442504","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The design of while loops is among the hardest lessons for beginners in programming. Their design is difficult because students must do more than solve a problem. They must also, for example, correctly sequence mutations, define loop invariants, and avoid infinite loops. Another difficulty students face is making while loops iterative. This issue is commonly ignored in programming textbooks for beginners despite being relevant to future courses such as Computer Architecture, Programming Languages, and Algorithms. The difficulty with making while loops iterative revolves around the elimination of delayed operations. This requires introducing beginners to the concept of control. This article presents a novel transformation recipe for beginners to make while loops iterative. The transformation recipe guides students on how to accumulate control information on a stack to eliminate delayed operations in the body of loops. In addition, this article presents descriptive statistics obtained from students on the maiden voyage of the new design recipe. The empirical data suggests that students feel that writing iterative while loops is hard, but enlightening. In addition, the empirical data suggests that students have a very favorable opinion about designing while loops.
如何使while循环迭代:给计算机科学一年级学生的介绍
while循环的设计是编程初学者最难上的一课。他们的设计是困难的,因为学生必须做的不仅仅是解决一个问题。例如,它们还必须正确排序突变,定义循环不变量,并避免无限循环。学生面临的另一个困难是如何让while循环迭代。这个问题通常在面向初学者的编程教科书中被忽略,尽管它与未来的课程(如计算机体系结构、编程语言和算法)相关。使while循环迭代的困难在于消除延迟操作。这需要向初学者介绍控制的概念。本文为初学者提供了一种新颖的转换方法,使while循环迭代。转换配方指导学生如何在堆栈上积累控制信息,以消除循环体中的延迟操作。此外,本文还介绍了在新设计配方的处女航中从学生那里获得的描述性统计数据。经验数据表明,学生们觉得写迭代while循环很难,但很有启发性。此外,实证数据表明,学生对while循环的设计持非常赞成的态度。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信