Abstract:
This thesis aims to provide a straightforward measurement for source level difficulty of programs using a set of well-established measurements, namely, operators, operands, parameters, inputs and outputs, file operations, external functions or libraries, variable declarations, and flow graphs. Six popularly used programming languages, namely, C, C#, Java, Python, PHP, and Perl are selected to measure and assess source code difficulty. Four classes of problems are studied, i.e., matching, I/O, computation, and comparison, One hundred and fifty six programs written in the aforementioned programming languages are collected from the Internet to be measured. The approach transforms source code into program flow graph and utilizes traditional software metrics, namely, LOC, CCM, and HCM to measure code complexity. Experiments show that source code written in compiled languages have greater difficulty than those written in interpreted languages. In addition, there is no one language which is suitable for all types of problems. As a consequence, developers can decide on language that is appropriate for the task to be implemented.