Psychology of programming

Last updated

The psychology of programming (PoP) is the field of research that deals with the psychological aspects of writing programs (often computer programs). The field has also been called the empirical studies of programming (ESP). It covers research into computer programmers' cognition, tools and methods for programming-related activities, and programming education.

Contents

Psychologically, computer programming is a human activity which involves cognitions such as reading and writing computer language, learning, problem solving, and reasoning.

History

The history of psychology of programming dates back to late 1970s and early 1980s, when researchers realized that computational power should not be the only thing to be evaluated in programming tools and technologies, but also the usability from the users. [1] In the first Workshop on Empirical Studies of Programmers, Ben Shneiderman listed several important destinations for researchers. These destinations include refining the use of current languages, improving present and future languages, developing special purpose languages, and improving tools and methods. Two important workshop series have been devoted to psychology of programming in the last two decades: the Workshop on Empirical Studies of Programmers (ESP), based primarily in the US, and the Psychology of Programming Interest Group Workshop (PPIG), having a European character. ESP has a broader scope than pure psychology in programming, and on the other hand, PPIG is more focused in the field of PoP. However, PPIG workshops and the organization PPIG itself is informal in nature, It is group of people who are interested in PoP that comes together and publish their discussions.

Goals and purposes

It is desirable to achieve a programming performance such that creating a program meets its specifications, is on schedule, is adaptable for the future and runs efficiently. [2] Being able to satisfy all these goals at a low cost is a difficult and common problem in software engineering and project management. By understanding the psychological aspects of computer programming, we can better understand how to achieve a higher programming performance, and to assist programmers to produce better software with less error.

Research methods

Some methods which one can use to study the psychological aspects of computer programming include introspection, observation, experiment, and qualitative research. [2]

Cognitive biases

Cognitive biases are systematic differences from an optimal way of reasoning about something. Research has suggested there are a number of biases involved in programming. [3] Anchoring bias have been identified for estimation and the reuse of ideas. [3] :7 There is an optimism bias applies to work being carried out. [3] :7 Availability bias can cause programmers to use incorrect keywords when searching documentation and not find relevant information and prevent programmers from applying lessons learned from previous projects in an organization. [3] :7

Confirmation bias can apply to testing leading developers to write test cases that will work for the code rather than those that are likely to fail. It can also apply to searching documentation only for a programmers current hypothesis. Training in logical reasoning and hypothesis testing reduced this confirmation bias. [3] :7

See also

Related Research Articles

<span class="mw-page-title-main">Cognitive science</span> Interdisciplinary scientific study of cognitive processes

Cognitive science is the interdisciplinary, scientific study of the mind and its processes with input from linguistics, psychology, neuroscience, philosophy, computer science/artificial intelligence, and anthropology. It examines the nature, the tasks, and the functions of cognition. Cognitive scientists study intelligence and behavior, with a focus on how nervous systems represent, process, and transform information. Mental faculties of concern to cognitive scientists include language, perception, memory, attention, reasoning, and emotion; to understand these faculties, cognitive scientists borrow from fields such as linguistics, psychology, artificial intelligence, philosophy, neuroscience, and anthropology. The typical analysis of cognitive science spans many levels of organization, from learning and decision to logic and planning; from neural circuitry to modular brain organization. One of the fundamental concepts of cognitive science is that "thinking can best be understood in terms of representational structures in the mind and computational procedures that operate on those structures."

Cognitive psychology is the scientific study of mental processes such as attention, language use, memory, perception, problem solving, creativity, and reasoning.

Confirmation bias is the tendency to search for, interpret, favor, and recall information in a way that confirms or supports one's prior beliefs or values. People display this bias when they select information that supports their views, ignoring contrary information, or when they interpret ambiguous evidence as supporting their existing attitudes. The effect is strongest for desired outcomes, for emotionally charged issues, and for deeply entrenched beliefs. Confirmation bias is insuperable for most people, but they can manage it, for example, by education and training in critical thinking skills.

Cognitive linguistics is an interdisciplinary branch of linguistics, combining knowledge and research from cognitive science, cognitive psychology, neuropsychology and linguistics. Models and theoretical accounts of cognitive linguistics are considered as psychologically real, and research in cognitive linguistics aims to help understand cognition in general and is seen as a road into the human mind.

Distributed cognition is an approach to cognitive science research that was developed by cognitive anthropologist Edwin Hutchins during the 1990s.

Tim van Gelder is the co-founder of Austhink Software, an Australian software development company, and the Managing Director of Austhink Consulting. He was born in Australia, and was educated at the University of Melbourne. He went on to receive his PhD from the University of Pittsburgh (1989). He has held academic positions at Indiana University and the Australian National University before returning to Melbourne as an Australian Research Council QEII Research Fellow. In 1998, he transitioned to part-time academic work allowing him to pursue private training and consulting, and in 2005 began working full-time at Austhink Software. In 2009 he transitioned to Managing Director of Austhink Consulting. He co-leads The SWARM Project at the University of Melbourne.

<span class="mw-page-title-main">Problem solving</span> Approaches to problem solving

Problem solving is the process of achieving a goal by overcoming obstacles, a frequent part of most activities. Problems in need of solutions range from simple personal tasks to complex issues in business and technical fields. The former is an example of simple problem solving (SPS) addressing one issue, whereas the latter is complex problem solving (CPS) with multiple interrelated obstacles. Another classification of problem-solving tasks is into well-defined problems with specific obstacles and goals, and ill-defined problems in which the current situation is troublesome but it is not clear what kind of resolution to aim for. Similarly, one may distinguish formal or fact-based problems requiring psychometric intelligence, versus socio-emotional problems which depend on the changeable emotions of individuals or groups, such as tactful behavior, fashion, or gift choices.

<span class="mw-page-title-main">Ziva Kunda</span> Israeli social psychologist

Ziva Kunda was an Israeli social psychologist and professor at the University of Waterloo known for her work in social cognition and motivated reasoning. Her seminal paper "The Case for Motivated Reasoning", published in Psychological Bulletin in 1990, posthumously received the Scientific Impact Award from the Society of Experimental Social Psychology. Kunda authored the book Social Cognition: Making Sense of People.

Dedre Dariel Gentner is an American cognitive and developmental psychologist. She is the Alice Gabriel Twight Professor of Psychology at Northwestern University, and a leading researcher in the study of analogical reasoning.

Cognitive ergonomics is a scientific discipline that studies, evaluates, and designs tasks, jobs, products, environments and systems and how they interact with humans and their cognitive abilities. It is defined by the International Ergonomics Association as "concerned with mental processes, such as perception, memory, reasoning, and motor response, as they affect interactions among humans and other elements of a system. Cognitive ergonomics is responsible for how work is done in the mind, meaning, the quality of work is dependent on the persons understanding of situations. Situations could include the goals, means, and constraints of work. The relevant topics include mental workload, decision-making, skilled performance, human-computer interaction, human reliability, work stress and training as these may relate to human-system design." Cognitive ergonomics studies cognition in work and operational settings, in order to optimize human well-being and system performance. It is a subset of the larger field of human factors and ergonomics.

<span class="mw-page-title-main">Analysis of competing hypotheses</span> Process to evaluate alternative hypotheses

The analysis of competing hypotheses (ACH) is a methodology for evaluating multiple competing hypotheses for observed data. It was developed by Richards (Dick) J. Heuer, Jr., a 45-year veteran of the Central Intelligence Agency, in the 1970s for use by the Agency. ACH is used by analysts in various fields who make judgments that entail a high risk of error in reasoning. ACH aims to help an analyst overcome, or at least minimize, some of the cognitive limitations that make prescient intelligence analysis so difficult to achieve.

<span class="mw-page-title-main">Outline of thought</span> Overview of and topical guide to thought

The following outline is provided as an overview of and topical guide to thought (thinking):

The following outline is provided as a topical overview of science; the discipline of science is defined as both the systematic effort of acquiring knowledge through observation, experimentation and reasoning, and the body of knowledge thus acquired, the word "science" derives from the Latin word scientia meaning knowledge. A practitioner of science is called a "scientist". Modern science respects objective logical reasoning, and follows a set of core procedures or rules to determine the nature and underlying natural laws of all things, with a scope encompassing the entire universe. These procedures, or rules, are known as the scientific method.

The psychology of reasoning is the study of how people reason, often broadly defined as the process of drawing conclusions to inform how people solve problems and make decisions. It overlaps with psychology, philosophy, linguistics, cognitive science, artificial intelligence, logic, and probability theory.

Some of the research that is conducted in the field of psychology is more "fundamental" than the research conducted in the applied psychological disciplines, and does not necessarily have a direct application. The subdisciplines within psychology that can be thought to reflect a basic-science orientation include biological psychology, cognitive psychology, neuropsychology, and so on. Research in these subdisciplines is characterized by methodological rigor. The concern of psychology as a basic science is in understanding the laws and processes that underlie behavior, cognition, and emotion. Psychology as a basic science provides a foundation for applied psychology. Applied psychology, by contrast, involves the application of psychological principles and theories yielded up by the basic psychological sciences; these applications are aimed at overcoming problems or promoting well-being in areas such as mental and physical health and education.

Motivated reasoning is a cognitive and social response in which individuals, consciously or unconsciously, allow emotion-loaded motivational biases to affect how new information is perceived. Individuals tend to favor evidence that coincides with their current beliefs and reject new information that contradicts them, despite contrary evidence.

<span class="mw-page-title-main">Embodied cognition</span> Interdisciplinary theory

Embodied cognition is the concept suggesting that many features of cognition are shaped by the state and capacities of the organism. The cognitive features include a wide spectrum of cognitive functions, such as perception biases, memory recall, comprehension and high-level mental constructs and performance on various cognitive tasks. The bodily aspects involve the motor system, the perceptual system, the bodily interactions with the environment (situatedness), and the assumptions about the world built the functional structure of organism's brain and body.

Cognitive bias mitigation is the prevention and reduction of the negative effects of cognitive biases – unconscious, automatic influences on human judgment and decision making that reliably produce reasoning errors.

Alan F. Blackwell is a New Zealand-British cognition scientist and professor at the Computer Laboratory, University of Cambridge, known for his work on diagrammatic representation, on data and language modelling, investment modelling, and end-user software engineering.

Intuitive statistics, or folk statistics, is the cognitive phenomenon where organisms use data to make generalizations and predictions about the world. This can be a small amount of sample data or training instances, which in turn contribute to inductive inferences about either population-level properties, future data, or both. Inferences can involve revising hypotheses, or beliefs, in light of probabilistic data that inform and motivate future predictions. The informal tendency for cognitive animals to intuitively generate statistical inferences, when formalized with certain axioms of probability theory, constitutes statistics as an academic discipline.

References

  1. Jorma Sajaniemi. Psychology of Programming: Looking into Programmers’ Heads. Human Technology [Internet]. 2008 May 4–8 [cited 2012 Oct 4]; 4(1): Available from: http://www.humantechnology.jyu.fi/articles/volume4/2008/ge-sajaniemi.pdf
  2. 1 2 Weinberg, Gerald M. (1998), The Psychology of Computer Programming (Silver ed.), New York: Dorset House, ISBN   0-932633-42-0
  3. 1 2 3 4 5 Mohanani, Rahul; Salman, Iflaah; Turhan, Burak; Rodriguez, Pilar; Ralph, Paul (2020-12-01). "Cognitive Biases in Software Engineering: A Systematic Mapping Study". IEEE Transactions on Software Engineering. 46 (12): 1318–1339. arXiv: 1707.03869 . doi:10.1109/TSE.2018.2877759. ISSN   0098-5589. S2CID   2172676.