<s>
In	O
software	O
development	O
,	O
the	O
yo-yo	B-Application
problem	I-Application
is	O
an	O
anti-pattern	O
that	O
occurs	O
when	O
a	O
programmer	O
has	O
to	O
read	O
and	O
understand	O
a	O
program	O
whose	O
inheritance	B-Language
graph	I-Language
is	O
so	O
long	O
and	O
complicated	O
that	O
the	O
programmer	O
has	O
to	O
keep	O
flipping	O
between	O
many	O
different	O
class	O
definitions	O
in	O
order	O
to	O
follow	O
the	O
control	O
flow	O
of	O
the	O
program	O
.	O
</s>
<s>
It	O
is	O
most	O
often	O
seen	O
in	O
the	O
context	O
of	O
object-oriented	B-Language
programming	I-Language
.	O
</s>
<s>
The	O
term	O
comes	O
from	O
comparing	O
the	O
bouncing	O
attention	O
of	O
the	O
programmer	O
to	O
the	O
up-down	O
movement	O
of	O
a	O
toy	O
yo-yo	B-Operating_System
.	O
</s>
<s>
Taenzer	O
,	O
Ganti	O
,	O
and	O
Podar	O
described	O
the	O
problem	O
by	O
name	O
,	O
explaining	O
:	O
"	O
Often	O
we	O
get	O
the	O
feeling	O
of	O
riding	O
a	O
yoyo	B-Operating_System
when	O
we	O
try	O
to	O
understand	O
one	O
of	O
these	O
message	O
trees.	O
"	O
</s>
<s>
Most	O
practices	O
of	O
object-oriented	B-Language
programming	I-Language
recommend	O
keeping	O
the	O
inheritance	B-Language
graph	I-Language
as	O
shallow	O
as	O
possible	O
,	O
in	O
part	O
to	O
avoid	O
this	O
problem	O
.	O
</s>
<s>
The	O
use	O
of	O
composition	B-Language
instead	O
of	O
inheritance	B-Language
is	O
also	O
strongly	O
preferred	O
,	O
although	O
this	O
still	O
requires	O
that	O
a	O
programmer	O
keep	O
multiple	O
class	O
definitions	O
in	O
mind	O
at	O
once	O
.	O
</s>
<s>
Deep	O
hierarchies	O
are	O
a	O
code	O
smell	O
and	O
a	O
symptom	O
of	O
sub-classification	B-Application
for	O
code	O
reuse	O
.	O
</s>
<s>
More	O
generally	O
,	O
the	O
yo-yo	B-Application
problem	I-Application
can	O
also	O
refer	O
to	O
any	O
situation	O
where	O
a	O
person	O
must	O
keep	O
flipping	O
between	O
different	O
sources	O
of	O
information	O
in	O
order	O
to	O
understand	O
a	O
concept	O
.	O
</s>
<s>
Object-oriented	B-Language
design	O
techniques	O
such	O
as	O
documenting	O
layers	O
of	O
the	O
inheritance	B-Language
hierarchy	I-Language
can	O
reduce	O
the	O
effect	O
of	O
this	O
problem	O
,	O
as	O
they	O
collect	O
in	O
one	O
place	O
the	O
information	O
that	O
the	O
programmer	O
is	O
required	O
to	O
understand	O
.	O
</s>
