To Be, or Not To Be: That is the Recursive Question

F. F. Vega
{"title":"To Be, or Not To Be: That is the Recursive Question","authors":"F. F. Vega","doi":"10.1109/EDUCON.2019.8725191","DOIUrl":null,"url":null,"abstract":"This paper discusses the opportunity of Functional Programming for making students aware about data dependencies and their implications when using parallel and distributed computing infrastructures. Although other programming methodologies, such as Object Oriented Programming (OOP) are usually preferred to be taught at computer science degrees, the problem is that the sequential programming approach is inherent to the model, and once students have entered the framework, it is not easy for them to learn modern parallel programming models. Thus, the methodology learned may act as a straitjacket, preventing students from taking advantage of the parallel architectures widely available. The idea presented here relies on choosing Functional Programming as the methodology to be learned first. Moreover, when any selected language that embodies the functional model is shown to students, we propose to forbid loops, similarly as how go-to sentences are classically forbidden in high level programming languages, or global variables are forbidden to avoid side effects. Students must thus resort instead to recursive functions if data dependencies are present and a sequential order of operations is required, or to map functions when no dependencies exist. This way, students naturally develop the skill to automatically write parallel code within the functional programming context, and then the map/reduce model can be easily exploited in any context when parallel and distributed infrastructures are available. We describe preliminary results obtained when the model has been successfully tested with a group of middle school students.","PeriodicalId":235118,"journal":{"name":"IEEE Global Engineering Education Conference","volume":"69 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Global Engineering Education Conference","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/EDUCON.2019.8725191","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

This paper discusses the opportunity of Functional Programming for making students aware about data dependencies and their implications when using parallel and distributed computing infrastructures. Although other programming methodologies, such as Object Oriented Programming (OOP) are usually preferred to be taught at computer science degrees, the problem is that the sequential programming approach is inherent to the model, and once students have entered the framework, it is not easy for them to learn modern parallel programming models. Thus, the methodology learned may act as a straitjacket, preventing students from taking advantage of the parallel architectures widely available. The idea presented here relies on choosing Functional Programming as the methodology to be learned first. Moreover, when any selected language that embodies the functional model is shown to students, we propose to forbid loops, similarly as how go-to sentences are classically forbidden in high level programming languages, or global variables are forbidden to avoid side effects. Students must thus resort instead to recursive functions if data dependencies are present and a sequential order of operations is required, or to map functions when no dependencies exist. This way, students naturally develop the skill to automatically write parallel code within the functional programming context, and then the map/reduce model can be easily exploited in any context when parallel and distributed infrastructures are available. We describe preliminary results obtained when the model has been successfully tested with a group of middle school students.
生存还是毁灭:这是一个递归的问题
本文讨论了函数式编程的机会,使学生意识到数据依赖性及其在使用并行和分布式计算基础设施时的含义。尽管其他编程方法,如面向对象编程(OOP)通常更倾向于在计算机科学学位课程中教授,但问题是顺序编程方法是模型固有的,一旦学生进入框架,他们就不容易学习现代并行编程模型。因此,所学到的方法可能会成为一种束缚,阻止学生利用广泛可用的并行体系结构。这里提出的思想依赖于选择函数式编程作为首先要学习的方法。此外,当向学生展示任何包含函数模型的选定语言时,我们建议禁止循环,就像在高级编程语言中禁止go-to语句一样,或者禁止全局变量以避免副作用。因此,如果存在数据依赖关系并且需要操作的顺序,则学生必须转而使用递归函数,或者在不存在依赖关系时映射函数。通过这种方式,学生自然地培养了在函数式编程上下文中自动编写并行代码的技能,然后当并行和分布式基础设施可用时,map/reduce模型可以很容易地在任何上下文中使用。我们描述了该模型在一组中学生中成功测试时获得的初步结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信