While our society increasingly depends on software for more and more aspects of civic, commercial and social life, software engineers struggle to ensure that software achieves the necessary high quality this requires. Although the discipline of software engineering offers different techniques and strategies to ensure quality, programmers in practice are reluctant to engage with them, with detrimental effects on software quality.
A root cause of this situation lies in how software developers are educated: Software engineering education generally tends to focus more on the creative aspects of design and coding, whereas the more laborious and less entertaining activities are neglected; this disengagement with software quality assurance techniques carries over to practice.
We therefore need a fundamental change in how software engineering is taught and perceived. Tomorrow’s software engineers need to be raised with an appreciation of software quality, and quality assurance techniques need to become a natural aspect of software development, rather than a niche topic.
Improving Engagement of Students in Software Engineering Courses through Gamification
1. Improving Engagement of
Students in Software
Engineering
E R A S M U S + Project 2017-1-NL01-KA203-035259
Tanja E. J. Vos
Open Universiteit
Universidad Politecnica de Valencia
https://impress-project.eu/
2. An EU-funded project aiming at improving students’
engagement in Software Engineering courses through
gamification.
https://impress-project.eu/
: about the project
8. Software engineering stakeholders
* Customers want to have quality products
* Bosses want to make money
* Engineers want to program wonders
What should we teach
students?
9. Teaching/learning programming is fun
* Create something!
* Solve puzzles!
* See it work!
* Different solutions
Pex (Microsoft)
Scratch
Lego
10. Software engineering
* Customers want to have quality products
* Bosses want to make money
* Engineers want to program wonders
But…… engineers should not only program
They also need to test the modules they build
... and invest in formalizing the modules’
specification
11. Not only programming…
we need to teach software engineering
* waterfall, iterative, agile
* requirements, architecture, ….
* 14 UML diagram types
* 23 design patterns
* over 80 refactorings
* Testing
* Security
* ….
* …
* …
15. IMPRESS
• Can gamification improve the engagement in SE
courses?
• Different level of gamification:
• Gamified class room SE quizzes
• SE education games
• Two additional aspects: integrated analytics and
AI/automation to reduce teachers’ effort.
20. int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
@Test
void testAbs() {
int res = abs(42);
assertEquals(42,
res);
}
Mutation Testing1970’s — DeMillo (Georgia Tech), Lipton (Princeton), Sayward (Yale)
21. int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
@Test
void testAbs() {
int res = abs(42);
assertEquals(42,
res);
}
int abs(int x) {
if (x <= 0)
return x;
else
return -x;
}
Mutation Testing1970’s — DeMillo (Georgia Tech), Lipton (Princeton), Sayward (Yale)
22. int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
@Test
void testAbs() {
int res = abs(42);
assertEquals(42,
res);
}
int abs(int x) {
if (x >= 0)
return x;
else
return +x;
}
Mutation Testing1970’s — DeMillo (Georgia Tech), Lipton (Princeton), Sayward (Yale)
23. @Test
void testAbs() {
int res = abs(42);
assertEquals(42,
res);
}
int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
@Test
void test() {
??
}
int abs(int x) {
if (x >= 0)
return x;
else
return +x;
}
Mutation Testing1970’s — DeMillo (Georgia Tech), Lipton (Princeton), Sayward (Yale)
24. public class Arithmetics {
public int abs(int x) {
if (x < 0)
return x;
else
return -x;
}
}
Attackers
public class TestArithmetics {
@Test
public void testAbs() {
Arithmetics a;
a = new Arithmetics();
assertEquals(1, a.abs(-1));
}
}
Defenders
public class Arithmetics {
public int abs(int x) {
if (x >= 0)
return x;
else
return -x;
}
}
Class Under Test
Code Defenders
Score points for
surviving mutants
Score points for
effective tests
Equivalent Mutant Duels
no way! here is
a killing test!
equivalent
!
equivalent!
oh no! :(
26. 0 20 40 60 80
I enjoyed playing Code
Defenders
Writing unit tests is more fun in
the game than during coding
I learned/practiced useful skills
Fully agree Partially agree
Neither agree nor disagree Partially disagree
Survey
27. Open Challenges
• Communication mechanism to foster collaboration
• Many opportunities to spice up gameplay
• Integrating more technologies (GUI, concurrency, etc.)
• Analysis for grading and intervention
• …
31. A lesson in writing formal specifications
* We can write simple expressions:
* constants like 1,2,3
* identifiers like x,y,Students
* properties, e.g. x.age, y.goal
* e1 ⊗ e2 where ⊗ is + , - , * , = , > , ≥ , < , ≤ , ∈
* A simple formula is a simple expression of type Boolean
32. A lesson in writing formal specifications
* A formula is either:
* a simple formula
* ∀identifier∈simple-expression● formula
* ∃identifier∈simple-expression● formula )
* For example:
* ∀x∈Students● x.age ≥ 16
* ∃x∈Students● x.age = 16
35. In production: Formal-Z game
* a game to train student to write formal specifcations interpretable in
Java
* will lean more towards the “engagement” aspect
* https://git.science.uu.nl/impresshs/javawlp
40. future work
* Education quizzes and games for Software
Engineering, experimenting with the balance
between “seriousness” and “excitement”.
* Data analytics.
* Studying these innovations in actual class rooms.
Hinweis der Redaktion
ASK AUDIENCE BACKGROUND: * who teach SE* who teach ICT related* who are familiar with formal method
* UNIVERSIDAD COMPLUTENSE DE MADRID
* INESC ID - INSTITUTE OF ENGINEERING OF SYSTEMS AND COMPUTERS, RESEARCH AND DEVELOPMENT IN LISBON
Almost 50 years since the first notions of mutation testing were introduced by Dick Lipton as a class project to Dave Parnas (1970’s — DeMillo (Georgia Tech), Lipton (Princeton), Sayward (Yale))
The objective of mutation testing is…
Mutation score (measure of quality)- Live Mutants: produce more tests
Live mutant - we need more tests
Dead mutant - of no further use
Rounds: Turns of attack and defence
Points: Attacker: how long their mutants live? Defenders: how good their tests are?
Equivalent mutants: play an important role
Code Defenders is a still research prototype, there are plenty of ways in which the game can be improved….
Demo