Do Programmers Prefer Predictable Expressions in Code?

Casey Casalnuovo1, Kevin Lee1, Hulin Wang1

  • 1Department of Computer Science, University of California, Davis.

Cognitive Science
|December 14, 2020
PubMed

Related Concept Videos

Pascal's Law01:04

Pascal's Law

In 1653, the French philosopher and scientist Blaise Pascal published "Treatise on the Equilibrium of Liquids," which discussed the principles of static fluids. A static fluid is a fluid that is not in motion. When a fluid is not flowing, we say that the fluid is in static equilibrium. If the fluid is water, we say it is in hydrostatic equilibrium. For a fluid in static equilibrium, the net force on any part of the fluid must be zero; otherwise, the fluid will start to flow. Pascal...
10.5K
Rules for Defining Functions01:29

Rules for Defining Functions

A relation is a function if each input x is associated with exactly one output y. For example, the equation      y = 2x + 5 defines a function because every value of x yields a unique y. However, x = y² + 1 is not a function of x, since a single x-value, such as x = 2, corresponds to two possible y-values: y = 1 and y = -1.The vertical line test helps determine whether a graph represents a function. If a vertical line intersects a curve more than once, the curve fails the test and does not...
73
Rational Expressions01:28

Rational Expressions

Rational expressions are algebraic fractions in which both the numerator and the denominator are polynomials. These expressions follow the arithmetic rules of numerical fractions but require extra care due to the presence of variables. A fundamental part of working with rational expressions is identifying values that make the expression undefined, typically those that result in division by zero or undefined radicals.Determining the DomainThe domain of a rational expression includes all real...
108
Algebraic Expressions01:26

Algebraic Expressions

Algebraic expressions are essential in mathematics. They represent relationships through variables, constants, and operations. These expressions help describe patterns and solve problems in various mathematical fields. Understanding their components, classifications, and operations allows for efficient simplification and manipulation.Each algebraic expression consists of individual parts, including numbers and symbols, that work together to form meaningful mathematical statements. The numerical...
98
Fixed Action Patterns01:06

Fixed Action Patterns

A fixed action pattern (FAP) is a specific, hard-wired sequence of behaviors that occurs in response to an external stimulus, called a sign stimulus. The behavior is “fixed” because it is essentially unchangeable—proceeding similarly across individuals of a species every time it occurs.
17.0K
Constraints and Statical Determinacy01:26

Constraints and Statical Determinacy

In structural engineering, the equilibrium of a system is not only determined by its equations of equilibrium but also with the help of constraints. Constraints refer to restrictions on the motion of a system. The proper combinations of constraints can minimize the total number of constraints needed to maintain a system in mechanical equilibrium. When this happens, the system is said to be statically determinate. For such systems, the unknown reaction supports can be estimated using equilibrium...
840