The subjective cost of writing reusable code: The case of functions

Itamar Lachman, Irit Hadar, Uri Hertz

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Functions provide substantial benefits for software development, simplifying programming through decomposition, reusability and abstraction. In a previous study, our group identified a tendency of high-school students to not use functions, even in programming tasks where functions can be a good solution strategy. The current research extends this observation to university students and aims to provide an explanation for the factors underlying this tendency. We focus on the subjective cost of the cognitive effort required for writing functions. Our experiment examined how information systems students solved a set of programming tasks, which varied by the number of repetitive questions. The results showed that most of the students avoided using functions altogether. We further found that in the subgroup of students who used functions at least once, the likelihood of using functions was positively associated with (a) the number of repetitive questions in each task, and (b) the task order, i.e., the progress of the experiment. These results indicate that the subjective cost of writing functions is taken into account when making a decision on how to solve a task at hand and is compared with the cost of repetitive work without using function, and that the former cost is updated with experience.

Original languageAmerican English
Title of host publicationAdvanced Information Systems Engineering Workshops - CAiSE 2019 International Workshops, Proceedings
EditorsHenderik A. Proper, Janis Stirna
PublisherSpringer Verlag
Pages29-39
Number of pages11
ISBN (Print)9783030209476
DOIs
StatePublished - 2019
Event31st International Conference on Advanced Information Systems Engineering, CAiSE 2019 - Rome, Italy
Duration: 3 Jun 20197 Jun 2019

Publication series

NameLecture Notes in Business Information Processing
Volume349

Conference

Conference31st International Conference on Advanced Information Systems Engineering, CAiSE 2019
Country/TerritoryItaly
CityRome
Period3/06/197/06/19

Keywords

  • Abstraction
  • Code-reuse
  • Cognition
  • Dual-process theory
  • Functions
  • Programming
  • Subjective cost

All Science Journal Classification (ASJC) codes

  • Management Information Systems
  • Control and Systems Engineering
  • Business and International Management
  • Information Systems
  • Modelling and Simulation
  • Information Systems and Management

Fingerprint

Dive into the research topics of 'The subjective cost of writing reusable code: The case of functions'. Together they form a unique fingerprint.

Cite this