Symbols
&& operator 29
+ operator 29
Numerics
500 Lines or Less (DiBernardo) 175
A
abbreviations 137-140
Abelson, Harold 14
abstraction dimension 200
activating 84-85, 217
active thinking 42-44
schemata 43
using elaboration 44
activities 180-183
comprehension 181, 203
debugging 182-183
exploration 182, 203
incrementation 181-182, 203
optimizing codebase for expected activities 204
searching 180-181, 202-203
transcription 181, 203
anonymous functions 53
APL program 7
Apps Hungarian 74-75
Architecture of Open Source Systems, The (Brown, Wilson) 175
association 113
automatization 167-172
implicit memories over time 168-169
associative phase 169
autonomous phase 169
cognitive phase 168
improving implicit memories 171-172
multitasking and 189
programming quicker with 170
B
Bartlett, Frederic 43
beacons 28-30, 87, 129
beginners
activities for onboarding 213-218
drawing diagrams 216
explaining relevant information 215
limiting tasks 213-214
preparing small, focused tasks 215-216
reading code together 216-218
behavior of 207-211
neo-Piagetian model for programming 208-210
Piaget’s original model 207-208
temporarily forgetting things 210-211
concepts, seeing concretely vs. abstractly 211-213
expert programmers vs. 83-84
reading code 22-23
blog posts 175
books 175
boxplot() function 34, 39
brain-based measurements 157
Brodmann areas 79-80
Brodmann, Korbinian 79
Brooks, Fred 185
Brown, Amy 175
bugs 123
misconceptions 117-123
about programming languages 120-122
debugging with conceptual change 118-119
diagnosing in new codebase 122-123
preventing while learning new programming language 122
suppressing 119-120
naming and 141-142
transfer 111-117
difficulties of 116-117
existing programming knowledge benefits 113-114
forms of 114
C
calculate() function 52
call patterns 78
camel case 140-141
CDCB (cognitive dimensions of code bases) 200
CDN (cognitive dimensions) 204
activities and 202-204
comprehension 203
exploration 203
incrementation 203
optimizing codebase for expected activities 204
searching 202-203
transcription 203
properties of 192-202
abstraction 200
closeness of mapping 197-198
closeness of mapping, exercise 12.2 198
consistency 194
design maneuvers 201-202
diffuseness 194-195
error proneness 193
hard mental operations 198-199
hidden dependencies 195-196
improving codebase with CDCB 200
progressive evaluation 196-197
provisionality 196
role expressiveness 197
secondary notation 199
viscosity 196
visibility 200
celsius variable 104
checked exceptions 115
chunking 19-21, 25-30
beacons 28-30
code clones and 152-153
design patterns 26
in code 21
practicing 30-31
writing chunkable code 25-26
writing comments 27-28
chunks 19
class-level code smells 150
closeness of mapping dimension 197-198
code 90
applying text comprehension strategies 84-90
activating prior knowledge 84-85
determining important lines of code 86-87
inferring meaning of variable names 87-88
monitoring 85
questioning 89
summarizing code 90
visualizing 88-89
models for thinking about 92-94
paradigms 71-75
benefits of roles 72-73
Hungarian notation 73-75
programs 75-78
stages of comprehension 76-78
text knowledge vs. plan knowledge 75
reading code 79-84
cognitive processes 15-16, 23-31, 79-80
natural language skills vs. 81-84
with beginners 216-218
variables 68-71
different roles of 68-69
eleven roles covering 69-71
code clones 153
code reviews 129
code smells 148-153
catalog of 148-151
class-level code smells 150
codebase-level code smells 150-151
impact of code smells 151
method-level code smells 150
harming cognition 151-153
code clones 153
god class, long method 152-153
long parameter list, complex switch statements 152
influence of bad names on cognitive load 153-159
linguistic antipatterns 154-155, 158-159
measuring cognitive load 155-158
brain-based measurements 157
EEG (electroencephalogram) 157
eye-based measurements 156
fNIRS and programming 157-158
Paas Scale 155
skin-based measurements 156
code synonyms 55-56
codebase-level code smells 150-151
codebases
checking linguistic antipatterns in 154-155
diagnosing misconceptions in 122-123
naming
as part of 129
consistency with 131
Coders at Work (Seibel) 79
coding 12
cognitive processes affecting 6-12
interaction of 9
LTM (long-term memory) 7
regarding programming tasks 10-12
STM (short-term memory) 7-8
working memory 8-9
confusion in 4-6
lack of information 5
lack of knowledge 5
lack of processing power 6
cognitive compiling 60
cognitive load 48
Germane load 173-174
influence of bad names on 153-159
linguistic antipatterns and 158-159
measuring 155-158
brain-based measurements 157
EEG (electroencephalogram) 157
eye-based measurements 156
fNIRS and programming 157-158
Paas Scale for cognitive load 155
skin-based measurements 156
techniques to reduce 51-56
code synonyms as additions to flashcards 55-56
refactoring 51-52
replacing unfamiliar language constructs 52-55
types of 49-50
extraneous cognitive load 49-50
intrinsic cognitive load 49
cognitive phase, implicit memories 168
cognitive processes 6-12
code smells harming 151-153
code clones 153
god class, long method 152-153
long parameter list, complex switch statements 152
interaction of 9
LTM (long-term memory) 7
reading code 15-16, 23-31, 79-80
Brodmann areas 79-80
evidence from fMRI 80
iconic memory 23-24
regarding programming tasks 10-12
STM (short-term memory) 7-8
with naming 133-136
evaluating quality of names 136
LTM 134-135
STM 133-134
variable names with information 135-136
working memory 8-9
cognitive refactoring 52
collaborating with colleague 175
complex code 63
cognitive load
techniques to reduce 51-56
types of 49-50
reasons for difficulties with 47-50
working memory 56-61
combining dependency graphs and state tables 61
dependency graphs 56-59
short-term memory vs. 48
state tables 59-60
complex switch statements 152
compound beacons 29
comprehension 84-90
activating prior knowledge 84-85
activity of 181
determining important lines of code 86-87
dimensions and 203
inferring meaning of variable names 87-88
monitoring 85
questioning 89
summarizing code 90
visualizing 88-89
concepts, concrete and abstract 211-213
conceptual antipatterns 153
conceptual change 118-119
concrete models 98-99
confusion in coding 4-6
lack of information 5
lack of knowledge 5
lack of processing power 6
consistency
properties of CDN (cognitive dimensions) 194
with codebase names 131, 134
containers 70
context 113
control() function 199
counter variable 69, 72
Craik, Kenneth 95
critical attributes 113
D
debugging 182-183
declarative memory 164
deliberate practice 30
delocalized code 51
dependency graphs
combining state tables and 61
working memory and 56-59
design maneuvers 201-202
error proneness vs. viscosity 202
provisionality and progressive evaluation vs. error-proneness 202
role expressiveness vs. diffuseness 202
design patterns 26
determining importance 84, 217
diagrams, drawing 216
DiBernardo, Michael 175
diffuseness dimension 194-195, 202
disruptions 34-35
documentation 129
domain learning 215
drawing diagrams 216
dual-task measure 188
dyadic encode function 7
E
Ebbinghaus, Hermann 38
EEG (electroencephalograms) 81, 157
Effects of Beacons, Comments, and Tasks on Program Comprehension Process in Software Maintenance, The (Fan) 27
elaboration 44
emotions 114
encoding 38
error proneness 193
provisionality and progressive evaluation vs. 202
viscosity dimension vs. 202
executeQuery() function 198
expert programmers
beginners vs. 83-84
reading code 22-23
explicit memory 164
exploration 182, 203
extraneous cognitive load 49-50
eye trackers 83
eye-based measurements 156
F
factors variable 69
Fan, Quiyin 27
far transfer 114
fclose() function 111
Feitelson's three-step model 145-146
overview 145-146
success of 146
file.close() function 111
file.open() function 197
filter() function 53
fixed values 69, 72
flashcards 35-37
code synonyms 55-56
expanding set 36
thinning set 36-37
when to use 36
fMRI (functional magnetic resonance imaging) 80
fNIRS (functional near infrared spectroscopy) 157-158
focal poin 76
followers 70
foo() function 153
forgetting 38-39
forgetting curve 38-39
hierarchy vs. networks 38
learning new information and 210-211
formatting names 137-141
abbreviations 137-140
snake case or camel case 140-141
Fowler, Martin 148
G
gatherer 70
Germane load 173-174
GitHub 175
God class 150, 152-153
goo() function 153
H
hard mental operations 198-199
hidden dependencies dimension 195-196
hierarchy, networks vs. 38
high-road transfer 114
Hungarian notation 73-75
I
iconic memory 23-24
implicit memories 168-169
associative phase 169
autonomous phase 169
cognitive phase 168
improving 171-172
importance, determining 84, 217
incrementation 181-182, 203
inferring 87-88, 217
inherent complexity 49
inhibition 120
inlining 52
instance theory 170
interruptions 183-190
at convenient times 187-189
multitasking 189-190
automatizing and 189
research on 190
preparing for 185-187
helping prospective memory 186-187
labeling subgoals 187
storing mental model 185
resuming after 184
warm-up time 183-184
intrinsic cognitive load 49
is_available variable 70
is_error variable 70
is_set variable 70, 197
isMember variable 54-55
isValid variable 154, 159
J
JAVA
attempting to remember 17
STM (short-term memory) 8
K
knowledge 5
activating prior knowledge 84-85
existing programming knowledge benefits 113-114
text vs. plan 75
L
labeling subgoals 187
lambdas 53
language
notional machines and 106-108
conflicting mental models 107-108
expanding sets of notional machines 106
replacing unfamiliar constructs 52-55
lambdas 53
list comprehensions 54
ternary operators 54-55
linguistic antipatterns 154-155, 158-159
causing confusion 159
checking in codebase 154-155
list comprehensions 54
live programming 197
long method 152-153
low-road transfer 114
LTM (long-term memory) 7
APL program 7
explaining relevant information 215
mental models 100-101
in working memory and 102
of source code in 101-102
names and 134-135
problem solving, role in 162-166
resolving cognitive process question 162-164
types of memories 164-166
M
main() function 59, 76-78, 152
mastery 113
max_benefit_amount 143
max_interest_amount 144
max_points 146
max_prime_factors variable 69
maximum value 120
memory 37-44
active thinking 42-44
schemata 43
using elaboration 44
forgetting, reasons for 38-39
forgetting curve 38-39
hierarchy vs. networks 38
forms of remembering information 40-41
retrieval strength 41
storage strength 41
memories 164-166
overview 165-166
unlearning 166
seeing information and 41
spaced repetition 39-40
strengthening memories 42
mental models 94, 97-102
concrete models 98-99
in LTM 100-102
in working memory 98, 102
learning new 97
notional machines creating conflicting 107-108
of source code in LTM 101-102
of source code in working memory 99-100
overview 96
storing during interruptions 185
Meta-Programming (Simonyi) 74
method-level code smells 150
minimum variable 121
minimum() function 152
misconceptions 117-123
about programming languages 120-122
debugging with conceptual change 118-119
diagnosing in new codebase 122-123
preventing while learning new programming language 122
suppressing 119-120
models 109
for thinking about code 92-94
mental models 94-102
concrete models 98-99
in LTM 100-101
in LTM and working memory 102
in working memory 98
learning new 97
of source code in LTM 101-102
of source code in working memory 99-100
overview 96
notional machines 102-105
defined 103
examples of 103-104
language and 106-108
levels of 105
schemata and 108-109
monitoring 85, 218
most recent holders 69-70
most wanted holders 69-70
multiples() function 152
multitasking 189-190
automatizing and 189
research on 190
Mythical Man-Month (Brooks) 185
N
naming 128-146
choosing better names 142-146
Feitelson's three-step model 145-146
name molds 142-144
cognitive aspects of 133-136
evaluating quality of names 136
LTM 134-135
STM 133-134
variable names with information 135-136
formatting 137-141
abbreviations 137-140
snake case or camel case 140-141
inferring meaning of variable 87-88
influence on bugs 141-142
influence on cognitive load 153-159
lasting impact of practices 131-133
perspectives on 129-131
consistency within codebase 131
syntactic rules 130-131
reasons for 129
form of documentation 129
part of codebases 129
role in code reviews 129
serving as beacons 129
Nature of Explanation, The (Craik) 95
near transfer 114
negative transfer 115
neo-Piagetian model 208-210
networks, hierarchy vs. 38
Node class 29
notional machines 102-105
defined 103
examples of 103-104
language and 106-108
conflicting mental models 107-108
expanding sets of notional machines 106
levels of 105
schemata and 108-109
are notional machines semantics? 109
importance of 108-109
O
onboarding new developers 219
activities for 213-218
drawing diagrams 216
explaining relevant information 215
limiting tasks 213-214
preparing small, focused tasks 215-216
reading code together 216-218
beginners' behavior 207-211
neo-Piagetian model for programming 208-210
Piaget's original model 207-208
temporarily forgetting things 210-211
difference between seeing concepts concretely and abstractly 211-213
issues in process of 206-207
open() function 111, 197
operation tables 88-89
operator 29
organizers 71
Ousterhout, John 185
P
Paas Scale 155
paradigms 71-75
benefits of roles 72-73
Hungarian notation 73-75
parameter list, long 152
Petzold, Charles 75
Philosophy of Software Design, The (Outerhout) 185
Piaget's original model 207-208
plan knowledge 75-76, 90
positive transfer 115-116
practices, naming 131-133
problem solving 176
automatization 167-172
implicit memories over time 168-169
improving implicit memories 171-172
programming quicker with 170
elements of 161
learning from code and its explanation 172-175
Germane load 173-174
using worked examples in working life 175
models 109
for thinking about code 92-94
mental models 94-102
notional machines 102-105
role of LTM with 162-166
resolving cognitive process question 162-164
types of memories 164-166
state space 161-162
processing power 6
programming languages 120-122
Programming Windows (Petzold) 75
programs 75-78
stages of comprehension 76-78
text knowledge vs. plan knowledge 75
progressive evaluation dimension 196-197, 202
prospective memory 186-187
provisionality dimension 196, 202
public class 8
public static void main 8
Q
questioning 89, 218
R
reading code 32, 79-84, 216-218
activating 217
chunking 19-21, 25-30
beacons 28-30
design patterns 26
in code 21
practicing 30-31
writing chunkable code 25-26
writing comments 27-28
cognitive processes 79-80
Brodmann areas 79-80
evidence from fMRI 80
cognitive processes affecting 23-31
complex code 63
cognitive load 49-56
reasons for difficulties with 47-50
working memory 48, 56-61
determining importance 217
expert programmers vs. beginners 22-23
inferring 217
monitoring 218
natural language skills vs. 81-84
beginners vs. expert programmers 83-84
eye trackers 83
strategies for reading 82-83
questioning 218
quickly reading 14-18
cognitive processes when 15-16
difficulties of 18
reexamining reproduced code 16-17
summarizing 218
visualizing 218
refactoring 51-52
Refactoring (Fowler) 148
refactorings 148
repacking 212
reproduced code 16-17
JAVA 17
second attempt 17
retrieval strength 41
retrieveElements() function 159
reverse refactoring 52
reverse() function 163
roadblock reminders 184
role expressiveness dimension 197, 202
roles of variables framework 68
root variable 28-29
S
schemata 43, 108-109
as semantics 109
importance of 108-109
searching 180-181, 202-203
secondary notation dimension 199
Seibel, Peter 79
semantic memory 165
semantic wave 211
semantics 109
sensory memory 23
similarity 113
Simonyi, Charles 74
skin-based measurements 156
slices of code 77
snake case 140-141
source code
books or blog posts about 175
mental models in working memory 99-100
mental models LTM 101-102
spaced repetition 39-40
state space 161-162
state tables
combining dependency graphs and 61
working memory and 59-60
steppers 69, 72
STM (short-term memory) 7-8
JAVA program 8
names and 133-134
preparing small, focused tasks 215-216
working memory vs. 48
storage strength 41
structural antipatterns 153
Structure and Interpretation of Computer Programs (Abelson, Sussman, Sussman) 14
subgoals, labeling 187
summarizing 90, 218
suppressing misconceptions 119-120
Sussman, Julie 14
Sussman,Gerald Jay 14
switch statements, complex 152
syntax 45, 109
building memory 37-44
active thinking 42-44
forgetting, reasons for 38-39
forms of remembering information 40-41
seeing information and 41
spaced repetition 39-40
strengthening memories 42
learning with flashcards 35-37
expanding set 36
thinning set 36-37
when to use 36
naming rules 130-131
remembering 34-35
system Hungarian 74-75
System.out.print() function 33
T
temp variable 71
temporary variables 71
ternary operators 54-55
text
comprehension strategies 84-90
activating prior knowledge 84-85
determining important lines of code 86-87
inferring meaning of variable names 87-88
monitoring 85
questioning 89
summarizing code 90
visualizing 88-89
reading code vs. 81-84
beginners vs. expert programmers 83-84
eye trackers 83
strategies for reading 82-83
text comprehension strategies 83
text structure knowledge 75, 90
toBinaryString() function 4-5, 8, 47-48
tracing 9, 60
transcription 181, 203
transfer 111-117
difficulties of 116-117
during learning 111
existing programming knowledge benefits 113-114
forms of 114
high- and low-road transfer 114
near and far transfer 114
positive transfer 115-116
of learning 112
transform() function 52
tree variable 28-29
Tree variable name 87
turtle 103
type systems 193
U
Über das Gedächtnis (Memory A Contribution to Experimental Psychology) , (Ebbinghaus) 39
unpacking 212
upperbound variable 69
V
variables 68-71
different roles of 68-69
eleven roles covering 69-71
inferring meaning of names 87-88
names containing information 135-136
single letters used as 138-140
Vergleichende Lokalisationslehre der Großhirnrinde (Brodmann) 79
viscosity dimension 196, 202
visibility 200
visualizing 88-89, 218
W
walkers 70
warm-up time 183-184
Wilson, Greg 175
working life examples 175
collaborate with colleague 175
explore GitHub 175
read books or blog posts about source code 175
working memory 8-9, 56-61
BASIC program 9
combining dependency graphs and state tables 61
dependency graphs 56-59
drawing diagrams 216
mental models in 98
LTM and 102
of source code 99-100
overloading capacity of 152
short-term memory vs. 48
state tables 59-60
writing code 190
activities while programming 180-183
comprehension 181
debugging 182-183
exploration 182
incrementation 181-182
searching 180-181
transcription 181
chunkable code 25-26
comments 27-28
interruptions 183-190
at convenient times 18 7-189
multitasking 189-190
preparing for 185-187
resuming after 184
warm-up time 183-184