• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• • 上一篇    下一篇

促进学生养成运用函数编程的习惯的策略

叶常春,任浩,苏康   

  1. (广东东软学院计算机学院,广东 佛山 528225)
  • 收稿日期:2019-08-07 修回日期:2019-10-03 出版日期:2019-12-25 发布日期:2019-12-25

Strategy of promoting students’ Habits
of Programming With Functions

YE Chang-chun,REN Hao,SU Kang   

  1. (School of Computing,Neusoft Institute Guangdong,Foshan 528225,China)
  • Received:2019-08-07 Revised:2019-10-03 Online:2019-12-25 Published:2019-12-25

摘要:

函数的运用在程序设计中十分关键。十多年教学经历中,发现学生普遍不习惯运用函数编程,程序设计课程老师需要采取措施促使学生养成运用函数编程的习惯。
阐述了一种针对性的策略,该策略是设计编程案例教学生识别运用函数编程的4种时机,讨论运用函数编程带来更好的可读性、可维护性和可重用性等好处,并在之后的编程练习中反复训练。这一策略的效果得到了实践的验证。

关键词: 运用函数编程, 可读性, 可重用性, 可维护性

Abstract:

The use of functions is very important in programming. In the past more than 10 years of teaching programming courses, we found that students are not used to programming with functions. Teachers need to take some strategies to encourage students to develop the habit of programming with functions. This paper describes such a targeted strategy. This strategy contains three aspects: (1) Programming examples are designed, so as to teach students four opportunities to use functions; (2) the benefits of programming with functions are discussed, including better readability, maintainability, and reusability; (3) they are trained repeatedly in later programming exercises. The effect of this strategy has been verified by practice.
 

Key words: programming with functions, readability, reusability, maintainability