Yo-yo problem

Yo-yo problem

In computer science, the yo-yo problem is an anti-pattern that occurs when a programmer has to read and understand a program whose inheritance graph is so long and complicated that the programmer has to keep flipping between many different class definitions in order to follow the control flow of the program. It often happens in object-oriented programming. The term comes from comparing the bouncing attention of the programmer to the up-down movement of a toy yo-yo.

Most practices of object-oriented programming recommend keeping the inheritance graph as shallow as possible, in part to avoid this problem. The use of composition instead of inheritance is also strongly preferred, although this still requires that a programmer keep multiple class definitions in mind at once.

More generally, the yo-yo problem can also refer to any situation where a person must keep flipping between different sources of information in order to understand a concept. See Design Patterns, Chapter 1 summary, for additional information.

Object-oriented design techniques such as documenting layers of the inheritance hierarchy can reduce the effect of this problem, as they collect in one place the information that the programmer is required to understand.

ee also

*Complexity What it means for a system (of any sort) to be complex
*Hrair limit The suggestion that humans can entertain at most approximately seven concepts at once
*Implementation inheritance
*Inheritance semantics
*Virtual Inheritance (object-oriented programming)


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Problem solving — forms part of thinking. Considered the most complex of all intellectual functions, problem solving has been defined as higher order cognitive process that requires the modulation and control of more routine or fundamental skills (Goldstein Levin …   Wikipedia

  • Problem Frames Approach — Problem Analysis or the Problem Frames Approach is an approach to software requirements analysis. It was developed by British software consultant Michael A. Jackson. The Problem Frames Approach was first sketched by Jackson in his book Software… …   Wikipedia

  • Problem-based learning — (PBL) is a student centered instructional strategy in which students collaboratively solve problems and reflect on their experiences. It was pioneered and used extensively at McMaster University, Hamilton, Ontario, Canada. Characteristics of PBL… …   Wikipedia

  • Problem gambling — Classification and external resources ICD 10 F63.0 ICD 9 312.31 …   Wikipedia

  • Problem finding — means problem discovery. It is part of the larger problem process that includes problem shaping and problem solving. Problem finding requires intellectual vision and insight into what is missing. This involves the application of creativity.… …   Wikipedia

  • Problem-oriented policing — (POP), coined by University of Wisconsin Madison professor Herman Goldstein, is a policing strategy that involves the identification and analysis of specific crime and disorder problems, in order to develop effective response strategies in… …   Wikipedia

  • Problem shaping — means revising a question so that the solution process can begin or continue. It is part of the larger problem process that includes problem finding and problem solving. Problem shaping (or problem framing) often involves the application of… …   Wikipedia

  • Problem Child — may refer to: * Problem Child (1990 film) * Problem Child 2 , a 1991 comedy sequel * , a 1995 film * Problem Child (TV series), a 1993 animated series * Problem Child (song), by AC/DC on the albums Dirty Deeds Done Dirt Cheap and Let There Be… …   Wikipedia

  • Problem novel — is a term used to refer to a sub genre of young adult literature that deal exclusively with an adolescent s first confrontation with a social or personal ill. The term was first used in the late 1960s to differentiate contemporary works like The… …   Wikipedia

  • Problem Child — Título Adorable criatura (Hispanoamérica) brasil o pestinha Este chico es un demonio (España) Ficha técnica Dirección Dennis Dugan Guion Música Miles Goodman …   Wikipedia Español

  • problem child — ˈproblem ˌchild noun problem children PLURALFORM [countable usually singular] 1. COMMERCE a product or business that has financial problems, often one that its makers or owners do not know what to do with: • The troubled company is widely… …   Financial and business terms

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”