Cost-benefit considerations have limited effect on the decision to exert cognitive effort in real-world computer-programming tasks

Itamar Lachman, Irit Hadar, Uri Hertz

Research output: Contribution to journalArticlepeer-review

Abstract

Recent research shows that people usually try to avoid exerting cognitive effort yet they are willing to exert effort to gain rewards. This cost-benefit framework provides predictions for behaviour outside the laboratory. Nevertheless, the extent to which such considerations affect real-life decisions is not clear. Here we experimentally examined computer-programmers' decisions to write code in a reusable manner, using functions, which demands an initial investment of cognitive effort or to clone and tweak code, a strategy whose cost increases with repetitions. Only a small portion of our participants demonstrated sensitivity to the benefits and costs of programming strategies. When asked to solve the tasks, participants tended to avoid using functions, demonstrating biased effort estimation. By contrast, when asked how they planned to solve the tasks, participants tended to demonstrate an opposite trend, overestimating effort, in line with an injunctive norm involving the overuse of functions. In the context of real-world problems, the effect of cost-benefit considerations may therefore be limited by task-irrelevant factors. Our interdisciplinary approach may be useful in providing novel theoretical insights and in promoting cognitive-effort investments outside the laboratory.

Original languageEnglish
Article number211885
JournalRoyal Society Open Science
Volume9
Issue number6
DOIs
StatePublished - 22 Jun 2022

Bibliographical note

Funding Information:
U.H. received support from the Israel Science Foundation (no. 1532/20).

Publisher Copyright:
© 2022 The Authors.

Keywords

  • code reuse
  • cognitive effort
  • decision-making
  • programming
  • subjective value

ASJC Scopus subject areas

  • General

Fingerprint

Dive into the research topics of 'Cost-benefit considerations have limited effect on the decision to exert cognitive effort in real-world computer-programming tasks'. Together they form a unique fingerprint.

Cite this