Beautiful JavaScript: how to guide students to create good and elegant code

H. Passier, Sylvia Stuurman, H. Pootjes
{"title":"Beautiful JavaScript: how to guide students to create good and elegant code","authors":"H. Passier, Sylvia Stuurman, H. Pootjes","doi":"10.1145/2691352.2691358","DOIUrl":null,"url":null,"abstract":"Programming is a complex task, which should be taught using authentic exercises, with supportive information and procedural information. Within the field of Computer Science, there are few examples of procedural information that guide students in how to proceed while solving a problem. We developed such guidelines for programming tasks in JavaScript, for students who have already learned to program using an object oriented language.\n Teaching JavaScript in an academic setting has advantages and disadvantages. The disadvantages are that the language is interpreted so there is no compiler to check for type errors, and that the language allows many 'awful' constructs. The advantage is that, because of those disadvantages, programmers should consciously apply rules for 'good' programs, instead of being able to rely on the errors and warnings that a compiler will raise.\n In this article, we show how we guide students to develop elegant code in JavaScript, by giving them a set of guidelines, and by advising a process of repeated refactoring until a program fulfills all requirements. To show that these guidelines work, we describe the development of a generic module for client-side form validation. The process followed and the resulting module both are valuable in an educational setting. As an example, it shows and explains precisely to students how such a module can be developed by following our guidelines, step by step.","PeriodicalId":131223,"journal":{"name":"Computer Science Education Research Conference","volume":"61 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-11-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"5","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Science Education Research Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2691352.2691358","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 5

Abstract

Programming is a complex task, which should be taught using authentic exercises, with supportive information and procedural information. Within the field of Computer Science, there are few examples of procedural information that guide students in how to proceed while solving a problem. We developed such guidelines for programming tasks in JavaScript, for students who have already learned to program using an object oriented language. Teaching JavaScript in an academic setting has advantages and disadvantages. The disadvantages are that the language is interpreted so there is no compiler to check for type errors, and that the language allows many 'awful' constructs. The advantage is that, because of those disadvantages, programmers should consciously apply rules for 'good' programs, instead of being able to rely on the errors and warnings that a compiler will raise. In this article, we show how we guide students to develop elegant code in JavaScript, by giving them a set of guidelines, and by advising a process of repeated refactoring until a program fulfills all requirements. To show that these guidelines work, we describe the development of a generic module for client-side form validation. The process followed and the resulting module both are valuable in an educational setting. As an example, it shows and explains precisely to students how such a module can be developed by following our guidelines, step by step.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
美丽的JavaScript:如何引导学生创建良好和优雅的代码
编程是一项复杂的任务,应该用真实的练习来教授,并辅以支持性信息和程序性信息。在计算机科学领域中,很少有程序信息的例子来指导学生如何在解决问题时继续进行。我们为已经学会使用面向对象语言编程的学生开发了JavaScript编程任务指南。在学术环境中教授JavaScript既有优点也有缺点。缺点是该语言是解释性的,因此没有编译器来检查类型错误,并且该语言允许许多“糟糕的”结构。优点是,由于存在这些缺点,程序员应该有意识地为“好”程序应用规则,而不是依赖编译器会提出的错误和警告。在本文中,我们将向学生展示如何指导他们用JavaScript开发优雅的代码,方法是给他们提供一组指导方针,并建议在程序满足所有需求之前进行重复重构。为了说明这些指导原则是有效的,我们描述了一个用于客户端表单验证的通用模块的开发。随后的过程和最终的模块在教育环境中都是有价值的。作为一个例子,它向学生准确地展示和解释了如何按照我们的指导方针一步一步地开发这样一个模块。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Gamification in educational software development The design of mobile apps: what and how to teach? Improving students' learning in software engineering education through multi-level assignments Strategy-based feedback in a programming tutor Beautiful JavaScript: how to guide students to create good and elegant code
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1