@inproceedings{26355f36d739423e8806d62229efc66b,
title = "The subjective cost of writing reusable code: The case of functions",
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.",
keywords = "Abstraction, Code-reuse, Cognition, Dual-process theory, Functions, Programming, Subjective cost",
author = "Itamar Lachman and Irit Hadar and Uri Hertz",
note = "Publisher Copyright: {\textcopyright} Springer Nature Switzerland AG 2019.; 31st International Conference on Advanced Information Systems Engineering, CAiSE 2019 ; Conference date: 03-06-2019 Through 07-06-2019",
year = "2019",
doi = "https://doi.org/10.1007/978-3-030-20948-3_3",
language = "American English",
isbn = "9783030209476",
series = "Lecture Notes in Business Information Processing",
publisher = "Springer Verlag",
pages = "29--39",
editor = "Proper, {Henderik A.} and Janis Stirna",
booktitle = "Advanced Information Systems Engineering Workshops - CAiSE 2019 International Workshops, Proceedings",
address = "Germany",
}