一句话:提出面向物联网新手程序员的“代码配方”,以语言与运行时无关的文档模块降低异构组件集成门槛。
物联网系统涉及多种设备、协议、架构和编程语言,开发本身已很复杂,对新手程序员而言软件工程挑战更大。既有研究指出,最痛苦的环节之一是异构软件组件集成,主要原因在于缺少新手可理解的文档:他们需要花费大量精力查找文档和代码样例,以便从概念上理解或至少让代码运行。本文提出的“代码配方”(Code Recipes)是经过总结、定义良好的文档模块,独立于具体编程语言或运行时环境,帮助非专家顺利理解其他开发者处理类似问题时所写的源码。作者通过一个用例展示,代码配方是支持新手物联网开发者构建系统的可行机制,也能将新手开发经验转化为其他新手可复用的资产。
The co-existence of various kinds of devices, protocols, architectures, and programming languages make Internet of Things (IoT) systems complex to develop, even for experienced programmers. Perforce, Software Engineering challenges are even more difficult to address by novice programmers. Previous research focused on identifying the most challenging issues that novice programmers experience when developing IoT systems. The results suggested that the integration of heterogeneous software components is one of the most painful issues, mainly due to the lack of documentation understandable by inexperienced developers, from both conceptual and technical perspectives. In fact, novice programmers devote a significant effort looking for documentation and code samples willing to understand them conceptually, or in the worst case, at least to make them work. Driven by the research question: "How do the lessons learned by IoT novice programmers can be captured, so they become an asset for other novice developers?", in this paper, we introduce Code Recipes. They consist of summarized and well-defined documentation modules, independent from programming languages or run-time environments, by which non-expert programmers can smoothly become familiar with source code, written by other developers that faced similar issues. Through a use case, we show how Code Recipes are a feasible mechanism to support novice IoT programmers in building their IoT systems.