Do Code Smell Hamper Novice Programmers?
-
Upload
felienne-hermans -
Category
Technology
-
view
227 -
download
0
Transcript of Do Code Smell Hamper Novice Programmers?
Do code smells hamper novice programmers?
Do code smells hamper novice programmers?
Felienne Hermans Efthimia
Aivaloglou
Do code smells hamper novice programmers?
Felienne Hermans Efthimia
Aivaloglou
@Felienne
Code smells matter to devs
Do code smells matter to kids?
Do code smells matter to kids?
Sprites
Scripts
Each sprite can have scripts
Do code smells matter to kids?
A simple game
Version N
Version L
Version D
Version D
Version D
Wait what?
Version D
Version D
Version D
Version N
Version L
The experiment
The experiment
61 kids20 x N20 x L21 x D
Hour 1:Scratch Intro
Lesson
Hour 2:Pong experiment
Task types
Task types
Explanation
Task types
“What does this
code do?”
Explanation
Task types Understandi
ng
Task types Understandi
ng
“When have you lost this
game?”
Task types
Modification
Task types
Modification
“Make the game go until
10 pts”
Do code smells matter
to kids?
tl;drYes
tl;drYes
Kids performed significantly better on the non-smelly program
tl;drYes
But, there were differences
between the tasks!
Let’s have a closer look!
Explanation is unaffected by
the presence of smells
Version N
“What does this code
do?”
Version L
“What does this code
do?”
Let’s have a closer look!
Understanding seems affected
more by the Long Method
smell
Version N
“When have you won the
game?”
Version L
“When have you won the
game?”
Let’s have a closer look!
Modification is hampered most by Duplication
Version N
“Make the game go to 10 points”
Version N
“Make the game go to 10 points”
Version D
Version D
Version D