Intention-revealing function names and small functions to facilitate code comprehension
Sammanfattning: Code comprehension is by many considered to be one of the most expensive and time-consuming phases of the software life cycle. There are multiple techniques for making code more comprehensible, one of them alleged to be keeping functions small. However, the claim that small functions are superior to large functions with regards to code comprehension, are often based upon programming experience and stated without references from research. In these claims the importance of intention-revealing function names to improve codecomprehension is also emphasized. It could therefore be questioned whetherit is keeping functions small or the enabling of intention-revealing functionn ames that underlies the claim of superiority of small functions. This thesis presents previous studies and relevant literature within the area as well as carries out tests using eye tracking. The results of the tests indicated that intention-revealing function names have a significant effect on how fast developers comprehend code. It is also indicated that simply splitting up a function, without using intention-revealing function names, increases the chance for programmers to be able to tell the correct output. To be able to draw reliable conclusions, further studies would be necessary, where the most important improvements would be to provide an unlimited amount of time for each test as well as a larger quantity of test persons.
HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)