Presentation of the paper "Easing IoT Development for Novice Programmers Through Code Recipes" at the 40th International Conference on Software Engineering (ICSE 2018) in Gothenburg, Sweden on May 27 - June 3, 2018
Easing IoT Development for Novice Programmers Through Code Recipes
1. e-Lite Research Group
https://elite.polito.it
Easing IoT Development for Novice Programmers
Through Code Recipes
Fulvio Corno, Luigi De Russis, and Juan Pablo Sáenz*
Dipartimento di Automatica e Informatica
The 40th International Conference on Software Engineering
May 27 - 3 June 2018. Gothenburg, Sweden
2. CONTEXT
Broadly speaking, IoT systems are complex to
develop
▪ Include mobile applications, web applications, cloud
computing services, wearable devices, single-board
computers, and IoT sensing devices
▪ They encompass various kinds of devices, protocols,
architectures, programming languages, and runtime
environments
Easing IoT Development for Novice Programmers Through
Code Recipes
230/05/2018
took from: http://www.bems-energy.com/iot-systems/
3. CONTEXT
Concerning Novice IoT Programmers
▪ Our previous research suggested that the integration of heterogeneous software
components is one of the most painful issues that they experience
▪ They struggle with lack of documentation understandable by inexperienced developers,
from both conceptual and technical perspectives
▪ They devote a significant effort looking for documentation and code samples willing to
understand them conceptually, or in the worst case, to make them work
Easing IoT Development for Novice Programmers Through
Code Recipes
330/05/2018
4. OUR RECIPE’S MOTIVATION
How can the lessons learned by IoT novice programmers be captured, so they may become
an asset for other novice developers?
"While examples are valuable resource for programmers, the rich context surrounding them
is often crucial for adaptation and integration" Oney et al. 2012
Easing IoT Development for Novice Programmers Through
Code Recipes
430/05/2018
5. CODE RECIPES
Summarized and well-defined documentation modules, independent from programming
languages or runtime environments, by which non-expert programmers can smoothly
become familiar with source code, written by other developers that faced similar issues
Easing IoT Development for Novice Programmers Through
Code Recipes
530/05/2018
6. CODE RECIPES
Structured around code fragments
▪ Might belong to different programming languages and might be deployed across various runtime
environments, as it is common in IoT systems
More than just code
▪ Include comments and documentation sources that account for the learning process that other IoT
developers followed and the decisions they made to reach out a solution
Cross-linked
▪ On the basis of three criteria: alternative versions, other programming language versions, and
related recipes
Easing IoT Development for Novice Programmers Through
Code Recipes
630/05/2018
7. CODE RECIPE
Ingredients
Technical or data requirements
Dependencies
Requirements associated with the source
code (libraries and packages that must be
installed)
One or more code fragments
Parameters
Documentation URLs
Cross-linked recipes
"ingredients": [{
"name": "Fitbit developer account",
"description": "A Fitbit developer account must be created, and
a new application must be registered. The callback parameter
must be set to http://localhost:8080/login/authorize",
"urls": [ "https://dev.fitbit.com/build/reference/web-
api/oauth2/" ]
}],
"dependencies": [{
"name": "flask-oauthlib",
"description": "OAuthlib implementation for Flask that may be
installed through pip install Flask-OAuthlib",
"urls": [ "https://github.com/lepture/flask-oauthlib" ]
}]
Easing IoT Development for Novice Programmers Through
Code Recipes
730/05/2018
8. CODE RECIPE
Ingredients
Dependencies
One or more code fragments
Programming language
Description
Documentation URLs
IDE
Parameters (values specific to each
implementation of the recipe)
Documentation URLs
Cross-linked recipes
"code fragments": [{
"prog_lang": "Python",
"description": "This is the flask application (where the
integration with the Fitbit is implemented)",
"documentation_urls": [ "https://github.com/lepture/flask-
oauthlib/blob/master/example/weibo.py" ],
"ide": "Visual Studio Code",
"source_code_url": "https://s3.eu-central-
1.amazonaws.com/code-recipes/fitbit.py",
"parameters": [{
"name": "FITBIT_CONSUMER_KEY",
"description": "...",
"data_type": "String",
"sample_value": "..." }]
}]
Easing IoT Development for Novice Programmers Through
Code Recipes
830/05/2018
9. CODE RECIPE
Ingredients
Dependencies
One or more code fragments
Parameters
Documentation URLs
Cross-linked recipes
"ingredients": [{...}],
"dependencies": [{...}],
"code fragments": [{...}],
"documentation_urls": [
"https://dev.fitbit.com/build/reference/web-api/explore/" ],
"rating": "4.6",
"alt_versions": [ "1506957773", "1507562564" ],
"other_lang_versions": [ "1506957773" ],
"related_recipes": [ "1507302404" ]
Easing IoT Development for Novice Programmers Through
Code Recipes
930/05/2018
10. CONCLUSIONS
▪ A Code Recipe was developed to illustrate how the approach might help novices to
overcome complex integration issues (OAuth and third-party APIs)
▪ Recipes aim at easing the learning curve NOT by hiding the code from the developers, but
by enabling the understanding and integration of the code examples written by other
novices
▪ A structured representation of the Code Recipes enables the implementation of various
kinds of tools that might handle them (web application, web browser extension, IDE
plugin)
30/05/2018
Easing IoT Development for Novice Programmers Through
Code Recipes
10
11. WORK IN PROGRESS
30/05/2018
Easing IoT Development for Novice Programmers Through
Code Recipes
11
We are currently developing a Code
Recipes catalog, and web-based tool
through which novice programmers can
manage them
12. TAKE AWAY MESSAGE
Our recipe relies on
▪ Enabling knowledge sharing among non-expert programmers
▪ Surrounding the code with descriptions, comments and documentation sources that
account for the learning process
30/05/2018
Easing IoT Development for Novice Programmers Through
Code Recipes
12