SlideShare a Scribd company logo
1 of 45
What do class comments tell us? 

An investigation of comment
evolution and practices in Pharo
Smalltalk
Pooja Rani, Sebastiano Panichella, Manuel
Leuenberger, Mohammad Ghafari, Oscar Nierstrasz
Journal First
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
*/
class Window extends BaseWindow {
…
}
2
Motivation
High-quality code comments assist developers
- Dekel et al. 2009
Java class comment
/**
* A class representing a window on the screen.
*
* For example:
* <pre>
* Window win = new Window(parent);
* win.show();
* </pre>
*
* @author Sami Shaio
* @version 1.13, 06/08/06
* @see java.awt.BaseWindow
*/
class Window extends BaseWindow {
…
}
3
Motivation
Java class comment
Different languages use different conventions to write comments
Smalltalk class comment
4
5
6
Intent
7
Example
8
Implementation
details
9
Class comments are a main source of documentation

No strict comment conventions, such as tags 

Lack of quality assessment tools

Lack of empirical studies

Challenges
10
Class comments are a main source of documentation

No strict comment conventions such as tags 

Lack of quality assessment tools

Lack of empirical studies

Challenges
11
Class comments are a main source of documentation

No strict comment conventions such as tags 

Lack of quality assessment tools

Lack of empirical studies

Challenges
12
Class comments are a main source of documentation

No strict comment conventions such as tags 

Lack of quality assessment tools

Lack of empirical studies

Challenges
13
Class comments are a main source of documentation

No strict comment conventions such as tags 

Lack of quality assessment tools

Lack of empirical studies

Requires empirical knowledge
Using previous techniques a non-trivial task
Challenges
14
We study Smalltalk class comments
15
We analyse from three perspectives
P1
Commenting trend
Comment
adherence to
template
P3
Comment
information types
P2
16
We analyse from three perspectives
P1
Commenting trend
Comment
adherence to
template
P3
Comment
information types
P2
How often developers


write?
17
Commenting trend
https://en.wikipedia.org/wiki/Pharo https://pharo.org/
18
Commenting trend
■ Pharo software system (first appeared in 2008)


■ Study its seven versions from 2008-2019 (11 years)
https://en.wikipedia.org/wiki/Pharo https://pharo.org/
19
0
1000
2000
3000
4000
5000
6000
7000
8000
2 3 4 5 6 7
#
Classes
Pharo versions
New classes
Old classes unchanged
Old classes only comment changed
Old classes only code changed
Old classes comment and code changed
50% of comment changes were related to code changes
20
0
100
200
300
400
500
600
700
800
2 3 4 5 6 7
#
Classes
Pharo versions
Comments removed of old classes
Comments added to old classes
Comments updated of old classes
developers add or update comment of old classes
21
We analyse from three perspectives
P1
Commenting trend
Comment
adherence to
template
P3
Comment
information types
P2
What do developers


write?
22
Implementation
details
Intent
Example
Unlike Java and Python, there is no comment taxonomy
Smalltalk class comments
23
Information types in Smalltalk
7 Pharo versions


2008-2019


364 sample comments


Smalltalk class comments contain 23 types of information
24
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
Smalltalk class comments contain 23 types of information
Information types in Smalltalk
25
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
26
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
27
High-level
overview
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
28
High-level
overview
Conversation
exchanged
29
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
30
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
Internal
(Pharo
core)
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
31
Color scale according to percentage of comments falling into a category
Internal
External
GToolkit
Seaside
Roassal
Moose
PolyMath
Petit
Pillar
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
External
projects
Total
Internal
(Pharo
core)
32
Color scale according to percentage of comments falling into a category
0 50 100
Internal
External
GToolkit
Seaside
Roassal
Moose
PolyMath
Petit
Pillar
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
External
projects
Total
Color scale according to percentage of comments falling into a category
Internal
External
GToolkit
Seaside
Roassal
Moose
PolyMath
Petit
Pillar
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
External
projects
Total
Core developers and external developers vary
33
We analyse from three perspectives
P1
Commenting trend
Comment
adherence to
template
P3
Comment
information types
P2
Do developers


follow guidelines?
Each community has its own guidelines
Apache
Oracle
Google Smalltalk
PEP8/257
34
Coding style guidlines
Each community has its own guidelines
Apache
Oracle
Google Smalltalk
PEP8/257
35
State a one line of summary


Summary should be written in
fi
rst
person style


Coding style guidlines
36
Smalltalk comment template
37
Measure adherence to template
38
Measure adherence to template
Color scale according to number of comments falling into a category
0 25 52
0 26 52
1 (52)
2 (52)
3 (52)
4 (52)
5 (52)
6 (52)
7 (52)
O
t
h
e
r
L
i
c
e
n
s
e
D
e
p
e
n
d
e
n
c
i
e
s
C
o
n
t
r
a
c
t
s
O
b
s
e
r
v
a
t
i
o
n
s
R
e
c
o
m
m
e
n
d
a
t
i
o
n
s
E
x
t
e
n
s
i
o
s
L
i
n
k
s
D
i
s
c
o
u
r
s
e
W
a
r
n
i
n
g
s
C
o
d
i
n
g
G
u
i
d
e
l
i
n
e
s
N
a
m
i
n
g
C
o
n
v
e
n
t
i
o
n
s
T
o
d
o
c
o
m
m
e
n
t
s
C
l
a
s
s
R
e
f
e
r
e
n
c
e
s
S
u
b
c
l
a
s
s
e
s
E
x
p
l
a
n
a
t
i
o
n
R
e
f
e
r
e
n
c
e
O
t
h
e
r
R
e
s
o
u
r
c
e
s
I
m
p
l
e
m
e
n
t
a
t
i
o
n
P
o
i
n
t
s
E
x
a
m
p
l
e
s
K
e
y
M
e
s
s
a
g
e
s
I
n
s
t
a
n
c
e
V
a
r
i
a
b
l
e
s
C
o
l
l
a
b
a
r
t
o
r
s
R
e
s
p
o
n
s
i
b
i
l
i
t
y
I
n
t
e
n
t
Categories
Pharo
versions
(total
classes)
39
31%
38%
37%
Smalltalk
Python
Java
Followed rules
31%
38%
37%
Smalltalk
Python
Java
Followed rules
Measure adherence to template
40
31%
38%
37%
30%
7%
2%
Smalltalk
Python
Java
Followed rules Not followed rules
31%
38%
37%
30%
7%
2%
Smalltalk
Python
Java
Followed rules Not followed rules
Measure adherence to template
41
31%
38%
37%
30%
7%
2%
40%
55%
60%
Smalltalk
Python
Java
Followed rules Not followed rules Not applicable rules
31%
38%
37%
30%
7%
2%
40%
55%
60%
Smalltalk
Python
Java
Followed rules Not followed rules Not applicable rules
Measure adherence to template
Developers do not always adopt conventions (not applicable rules)
42
Developers embed 23 types of information in class
comments

Developers follow template inspired information types
more often than others

Takeaway
43
The ultimate goal of automatically assessing
comments is still far away…
44
Which information types do developers find important?

How do various information types support developers?

How to extract them automatically?

Future work
45
https://twitter.com/poojaruhal http://scg.unibe.ch/staff/Pooja-Rani
What do class comments tell us? 

An investigation of comment evolution and practices in
Pharo Smalltalk
Paper

https://link.springer.com/content/pdf/10.1007/
s10664-021-09981-5.pdf

Replication Package on GitHub

https://github.com/poojaruhal/CommentAnalysisInPharo

Contact us

More Related Content

Similar to What do class comments tell us?An investigation of comment evolution and practices in Pharo Smalltalk

C# Interview Questions | Edureka
C# Interview Questions | EdurekaC# Interview Questions | Edureka
C# Interview Questions | EdurekaEdureka!
 
ICSME2014
ICSME2014ICSME2014
ICSME2014swy351
 
A Decade of Comment Quality Assessment: A Systematic Literature Review
A Decade of Comment Quality Assessment: A Systematic Literature ReviewA Decade of Comment Quality Assessment: A Systematic Literature Review
A Decade of Comment Quality Assessment: A Systematic Literature ReviewPooja Rani
 
Building blocks (Game Architecture)
Building blocks (Game Architecture)Building blocks (Game Architecture)
Building blocks (Game Architecture)Rajkumar Pawar
 
Design Patterns- Course for students .pptx
Design Patterns- Course for students  .pptxDesign Patterns- Course for students  .pptx
Design Patterns- Course for students .pptxkhaledmohamedadelkam
 
SCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on WordpressSCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on WordpressSimo Ssimo
 
Using HPC Resources to Exploit Big Data for Code Review Analytics
Using HPC Resources to Exploit Big Data for Code Review AnalyticsUsing HPC Resources to Exploit Big Data for Code Review Analytics
Using HPC Resources to Exploit Big Data for Code Review AnalyticsThe University of Adelaide
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestCory Foy
 
Comment soup with a pinch of types
Comment soup with a pinch of typesComment soup with a pinch of types
Comment soup with a pinch of typesPooja Rani
 
Talk at FullStack 2016: Automating documentation on JavaScript projects
Talk at FullStack 2016: Automating documentation on JavaScript projectsTalk at FullStack 2016: Automating documentation on JavaScript projects
Talk at FullStack 2016: Automating documentation on JavaScript projectsMarcos Iglesias
 
New Ideas for Old Code - Greach
New Ideas for Old Code - GreachNew Ideas for Old Code - Greach
New Ideas for Old Code - GreachHamletDRC
 
So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...Joe Ferguson
 
Code Review
Code ReviewCode Review
Code ReviewRavi Raj
 
CodeInsight-SCAM2015
CodeInsight-SCAM2015CodeInsight-SCAM2015
CodeInsight-SCAM2015Masud Rahman
 
PRG 420 Effective Communication - snaptutorial.com
PRG 420 Effective Communication - snaptutorial.comPRG 420 Effective Communication - snaptutorial.com
PRG 420 Effective Communication - snaptutorial.comdonaldzs37
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016Joe Ferguson
 
Y5 Coding 2016 Digital Technologies Program
Y5 Coding 2016 Digital Technologies ProgramY5 Coding 2016 Digital Technologies Program
Y5 Coding 2016 Digital Technologies ProgramJoanne Villis
 

Similar to What do class comments tell us?An investigation of comment evolution and practices in Pharo Smalltalk (20)

C# Interview Questions | Edureka
C# Interview Questions | EdurekaC# Interview Questions | Edureka
C# Interview Questions | Edureka
 
ICSME2014
ICSME2014ICSME2014
ICSME2014
 
A Decade of Comment Quality Assessment: A Systematic Literature Review
A Decade of Comment Quality Assessment: A Systematic Literature ReviewA Decade of Comment Quality Assessment: A Systematic Literature Review
A Decade of Comment Quality Assessment: A Systematic Literature Review
 
Building blocks (Game Architecture)
Building blocks (Game Architecture)Building blocks (Game Architecture)
Building blocks (Game Architecture)
 
Design Patterns- Course for students .pptx
Design Patterns- Course for students  .pptxDesign Patterns- Course for students  .pptx
Design Patterns- Course for students .pptx
 
SCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on WordpressSCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
SCAM: Multi-layer Software Configuration: Empirical Study on Wordpress
 
Wordcamp Uk 2008
Wordcamp Uk 2008Wordcamp Uk 2008
Wordcamp Uk 2008
 
Using HPC Resources to Exploit Big Data for Code Review Analytics
Using HPC Resources to Exploit Big Data for Code Review AnalyticsUsing HPC Resources to Exploit Big Data for Code Review Analytics
Using HPC Resources to Exploit Big Data for Code Review Analytics
 
Continuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software WestContinuous Deployment and Testing Workshop from Better Software West
Continuous Deployment and Testing Workshop from Better Software West
 
Comment soup with a pinch of types
Comment soup with a pinch of typesComment soup with a pinch of types
Comment soup with a pinch of types
 
Talk at FullStack 2016: Automating documentation on JavaScript projects
Talk at FullStack 2016: Automating documentation on JavaScript projectsTalk at FullStack 2016: Automating documentation on JavaScript projects
Talk at FullStack 2016: Automating documentation on JavaScript projects
 
New Ideas for Old Code - Greach
New Ideas for Old Code - GreachNew Ideas for Old Code - Greach
New Ideas for Old Code - Greach
 
So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...So You Just Inherited a $Legacy Application...
So You Just Inherited a $Legacy Application...
 
Code Review
Code ReviewCode Review
Code Review
 
CodeInsight-SCAM2015
CodeInsight-SCAM2015CodeInsight-SCAM2015
CodeInsight-SCAM2015
 
Groovy And Grails
Groovy And GrailsGroovy And Grails
Groovy And Grails
 
PRG 420 Effective Communication - snaptutorial.com
PRG 420 Effective Communication - snaptutorial.comPRG 420 Effective Communication - snaptutorial.com
PRG 420 Effective Communication - snaptutorial.com
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016
 
Y5 Coding 2016 Digital Technologies Program
Y5 Coding 2016 Digital Technologies ProgramY5 Coding 2016 Digital Technologies Program
Y5 Coding 2016 Digital Technologies Program
 
Ready, Set, Refactor
Ready, Set, RefactorReady, Set, Refactor
Ready, Set, Refactor
 

Recently uploaded

Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptxMuhammadRazzaq31
 
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRingsTransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRingsSérgio Sacani
 
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Nistarini College, Purulia (W.B) India
 
Fourth quarter science 9-Kinetic-and-Potential-Energy.pptx
Fourth quarter science 9-Kinetic-and-Potential-Energy.pptxFourth quarter science 9-Kinetic-and-Potential-Energy.pptx
Fourth quarter science 9-Kinetic-and-Potential-Energy.pptxrosenapiri1
 
Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Cherry
 
Understanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution MethodsUnderstanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution Methodsimroshankoirala
 
Cot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACherry
 
Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Cherry
 
Adaptive Restore algorithm & importance Monte Carlo
Adaptive Restore algorithm & importance Monte CarloAdaptive Restore algorithm & importance Monte Carlo
Adaptive Restore algorithm & importance Monte CarloChristian Robert
 
Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...
Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...
Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...Cherry
 
CONTRIBUTION OF PANCHANAN MAHESHWARI.pptx
CONTRIBUTION OF PANCHANAN MAHESHWARI.pptxCONTRIBUTION OF PANCHANAN MAHESHWARI.pptx
CONTRIBUTION OF PANCHANAN MAHESHWARI.pptxRASHMI M G
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxseri bangash
 
Site specific recombination and transposition.........pdf
Site specific recombination and transposition.........pdfSite specific recombination and transposition.........pdf
Site specific recombination and transposition.........pdfCherry
 
Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...
Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...
Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...Cherry
 
FS P2 COMBO MSTA LAST PUSH past exam papers.
FS P2 COMBO MSTA LAST PUSH past exam papers.FS P2 COMBO MSTA LAST PUSH past exam papers.
FS P2 COMBO MSTA LAST PUSH past exam papers.takadzanijustinmaime
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Cherry
 
GBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisGBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisAreesha Ahmad
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusNazaninKarimi6
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professormuralinath2
 

Recently uploaded (20)

Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptx
 
ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY // USES OF ANTIOBIOTICS TYPES OF ANTIB...
ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY  // USES OF ANTIOBIOTICS TYPES OF ANTIB...ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY  // USES OF ANTIOBIOTICS TYPES OF ANTIB...
ABHISHEK ANTIBIOTICS PPT MICROBIOLOGY // USES OF ANTIOBIOTICS TYPES OF ANTIB...
 
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRingsTransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
 
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...Energy is the beat of life irrespective of the domains. ATP- the energy curre...
Energy is the beat of life irrespective of the domains. ATP- the energy curre...
 
Fourth quarter science 9-Kinetic-and-Potential-Energy.pptx
Fourth quarter science 9-Kinetic-and-Potential-Energy.pptxFourth quarter science 9-Kinetic-and-Potential-Energy.pptx
Fourth quarter science 9-Kinetic-and-Potential-Energy.pptx
 
Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.
 
Understanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution MethodsUnderstanding Partial Differential Equations: Types and Solution Methods
Understanding Partial Differential Equations: Types and Solution Methods
 
Cot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNA
 
Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.
 
Adaptive Restore algorithm & importance Monte Carlo
Adaptive Restore algorithm & importance Monte CarloAdaptive Restore algorithm & importance Monte Carlo
Adaptive Restore algorithm & importance Monte Carlo
 
Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...
Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...
Major groups of bacteria: Spirochetes, Chlamydia, Rickettsia, nanobes, mycopl...
 
CONTRIBUTION OF PANCHANAN MAHESHWARI.pptx
CONTRIBUTION OF PANCHANAN MAHESHWARI.pptxCONTRIBUTION OF PANCHANAN MAHESHWARI.pptx
CONTRIBUTION OF PANCHANAN MAHESHWARI.pptx
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
Site specific recombination and transposition.........pdf
Site specific recombination and transposition.........pdfSite specific recombination and transposition.........pdf
Site specific recombination and transposition.........pdf
 
Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...
Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...
Molecular phylogeny, molecular clock hypothesis, molecular evolution, kimuras...
 
FS P2 COMBO MSTA LAST PUSH past exam papers.
FS P2 COMBO MSTA LAST PUSH past exam papers.FS P2 COMBO MSTA LAST PUSH past exam papers.
FS P2 COMBO MSTA LAST PUSH past exam papers.
 
Lipids: types, structure and important functions.
Lipids: types, structure and important functions.Lipids: types, structure and important functions.
Lipids: types, structure and important functions.
 
GBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of AsepsisGBSN - Microbiology (Unit 4) Concept of Asepsis
GBSN - Microbiology (Unit 4) Concept of Asepsis
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 

What do class comments tell us?An investigation of comment evolution and practices in Pharo Smalltalk

  • 1. What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk Pooja Rani, Sebastiano Panichella, Manuel Leuenberger, Mohammad Ghafari, Oscar Nierstrasz Journal First
  • 2. /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow */ class Window extends BaseWindow { … } 2 Motivation High-quality code comments assist developers - Dekel et al. 2009 Java class comment
  • 3. /** * A class representing a window on the screen. * * For example: * <pre> * Window win = new Window(parent); * win.show(); * </pre> * * @author Sami Shaio * @version 1.13, 06/08/06 * @see java.awt.BaseWindow */ class Window extends BaseWindow { … } 3 Motivation Java class comment Different languages use different conventions to write comments Smalltalk class comment
  • 4. 4
  • 5. 5
  • 9. 9 Class comments are a main source of documentation No strict comment conventions, such as tags Lack of quality assessment tools Lack of empirical studies Challenges
  • 10. 10 Class comments are a main source of documentation No strict comment conventions such as tags Lack of quality assessment tools Lack of empirical studies Challenges
  • 11. 11 Class comments are a main source of documentation No strict comment conventions such as tags Lack of quality assessment tools Lack of empirical studies Challenges
  • 12. 12 Class comments are a main source of documentation No strict comment conventions such as tags Lack of quality assessment tools Lack of empirical studies Challenges
  • 13. 13 Class comments are a main source of documentation No strict comment conventions such as tags Lack of quality assessment tools Lack of empirical studies Requires empirical knowledge Using previous techniques a non-trivial task Challenges
  • 14. 14 We study Smalltalk class comments
  • 15. 15 We analyse from three perspectives P1 Commenting trend Comment adherence to template P3 Comment information types P2
  • 16. 16 We analyse from three perspectives P1 Commenting trend Comment adherence to template P3 Comment information types P2 How often developers write?
  • 18. 18 Commenting trend ■ Pharo software system (first appeared in 2008) ■ Study its seven versions from 2008-2019 (11 years) https://en.wikipedia.org/wiki/Pharo https://pharo.org/
  • 19. 19 0 1000 2000 3000 4000 5000 6000 7000 8000 2 3 4 5 6 7 # Classes Pharo versions New classes Old classes unchanged Old classes only comment changed Old classes only code changed Old classes comment and code changed 50% of comment changes were related to code changes
  • 20. 20 0 100 200 300 400 500 600 700 800 2 3 4 5 6 7 # Classes Pharo versions Comments removed of old classes Comments added to old classes Comments updated of old classes developers add or update comment of old classes
  • 21. 21 We analyse from three perspectives P1 Commenting trend Comment adherence to template P3 Comment information types P2 What do developers write?
  • 22. 22 Implementation details Intent Example Unlike Java and Python, there is no comment taxonomy Smalltalk class comments
  • 23. 23 Information types in Smalltalk 7 Pharo versions 2008-2019 364 sample comments Smalltalk class comments contain 23 types of information
  • 24. 24 Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes) Smalltalk class comments contain 23 types of information Information types in Smalltalk
  • 25. 25 Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes)
  • 26. 26 Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes)
  • 27. 27 High-level overview Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes)
  • 28. Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes) 28 High-level overview Conversation exchanged
  • 29. 29 Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes)
  • 30. 30 Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes) Internal (Pharo core)
  • 31. Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes) 31 Color scale according to percentage of comments falling into a category Internal External GToolkit Seaside Roassal Moose PolyMath Petit Pillar O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t External projects Total Internal (Pharo core)
  • 32. 32 Color scale according to percentage of comments falling into a category 0 50 100 Internal External GToolkit Seaside Roassal Moose PolyMath Petit Pillar O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t R e f e r e n c e O t h e r R e s I m p l e m e n t a t i o n P o i E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t External projects Total Color scale according to percentage of comments falling into a category Internal External GToolkit Seaside Roassal Moose PolyMath Petit Pillar O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories External projects Total Core developers and external developers vary
  • 33. 33 We analyse from three perspectives P1 Commenting trend Comment adherence to template P3 Comment information types P2 Do developers follow guidelines?
  • 34. Each community has its own guidelines Apache Oracle Google Smalltalk PEP8/257 34 Coding style guidlines
  • 35. Each community has its own guidelines Apache Oracle Google Smalltalk PEP8/257 35 State a one line of summary Summary should be written in fi rst person style Coding style guidlines
  • 38. 38 Measure adherence to template Color scale according to number of comments falling into a category 0 25 52 0 26 52 1 (52) 2 (52) 3 (52) 4 (52) 5 (52) 6 (52) 7 (52) O t h e r L i c e n s e D e p e n d e n c i e s C o n t r a c t s O b s e r v a t i o n s R e c o m m e n d a t i o n s E x t e n s i o s L i n k s D i s c o u r s e W a r n i n g s C o d i n g G u i d e l i n e s N a m i n g C o n v e n t i o n s T o d o c o m m e n t s C l a s s R e f e r e n c e s S u b c l a s s e s E x p l a n a t i o n R e f e r e n c e O t h e r R e s o u r c e s I m p l e m e n t a t i o n P o i n t s E x a m p l e s K e y M e s s a g e s I n s t a n c e V a r i a b l e s C o l l a b a r t o r s R e s p o n s i b i l i t y I n t e n t Categories Pharo versions (total classes)
  • 40. 40 31% 38% 37% 30% 7% 2% Smalltalk Python Java Followed rules Not followed rules 31% 38% 37% 30% 7% 2% Smalltalk Python Java Followed rules Not followed rules Measure adherence to template
  • 41. 41 31% 38% 37% 30% 7% 2% 40% 55% 60% Smalltalk Python Java Followed rules Not followed rules Not applicable rules 31% 38% 37% 30% 7% 2% 40% 55% 60% Smalltalk Python Java Followed rules Not followed rules Not applicable rules Measure adherence to template Developers do not always adopt conventions (not applicable rules)
  • 42. 42 Developers embed 23 types of information in class comments Developers follow template inspired information types more often than others Takeaway
  • 43. 43 The ultimate goal of automatically assessing comments is still far away…
  • 44. 44 Which information types do developers find important? How do various information types support developers? How to extract them automatically? Future work
  • 45. 45 https://twitter.com/poojaruhal http://scg.unibe.ch/staff/Pooja-Rani What do class comments tell us? An investigation of comment evolution and practices in Pharo Smalltalk Paper https://link.springer.com/content/pdf/10.1007/ s10664-021-09981-5.pdf Replication Package on GitHub https://github.com/poojaruhal/CommentAnalysisInPharo Contact us