Experiments show programming tasks shift moral evaluations toward utilitarianism in novice programmers, indicating potential cognitive biases.
The rapid diffusion of programming skills across education and industry may impact how individuals consider moral dilemmas. Across a series of experiments, we show that performing even simple programming tasks shifts novice programmers’ evaluation of the classic trolley problem toward utilitarian responses. After solving a programming problem, respondents are more willing to sacrifice one life to save many. This effect arises because programming induces a deliberative, rule-based cognitive style. However, the effect diminishes with greater programming experience and can be mitigated through interventions, such as time delays or moral nudges. These findings highlight that organizations training employees in coding should be aware that programming tasks may temporarily alter moral reasoning, potentially influencing judgments in ethically charged contexts (e.g., product design, risk management, or AI development). Incorporating reflective cooling-off periods or explicit ethical reinforcement may reduce bias toward utilitarian reasoning. As programming becomes a baseline skill across the workforce, its cognitive spillovers could shape societal attitudes toward contested moral dilemmas. These include ethical trade-offs in settings such as autonomous vehicles and artificial intelligence systems.
No takes yet. Share an insight, caveat, or question.
Singh et al. (2025) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: