Comparative Analysis on the Evaluation of the Complexity of C, C++, Java, PHP and Python Programming Languages based on Halstead Software Science
DOI:
https://doi.org/10.24203/ijcit.v12i1.294Keywords:
Code Complexity, Complexity Evaluation, Halstead Software Science, Programming LanguageAbstract
Quality plays center stage in any software development industry. Software metrics have proven over time as the best measure to be used to assess and assure the software developers of the quality of their products. Halstead software science is an essential technique for measuring software complexity at the source code. In this study, we present a comparative study using this technique to help the developer by evaluating the code complexity by considering the structural composition of a programming language. In this study, an experiment was done using Halstead metrics to evaluate the complexity of PHP, C++, Java, C and Python programming languages. This study demonstrate that Halstead gives a better approach in evaluating the level of complexity of programming languages at source code level. The results showed that C++ and Java are the most complex programming languages while Python was the least complex warranting less of the programmer's time and effort when developing a similar project. These findings can be used by the software developers to make decisions on the programming language to adopt when they want to come up with less complex software of high quality. In the future, the researchers will advance the study to incorporate other software paradigms and also modify the technique to capture also inter and intra-modular structural complexity of the various programming languages.
References
Vard Antinyan, Miroslaw Staron, and Anna Sandberg, (2017) “Evaluating code complexity triggers, use of complexity measures and the influence of code complexity on maintenance time”, Empirical Software Engineering, Vol. 22, No. 6, pp. 3057-3087,2017.
M. Madhan, I. Dhivakar, T. Anbuarasan, and Chandrasegar Thirumalai. (2017) “Analyzing complexity nature inspired optimization algorithms using 4.halstead metrics.” In 2017 International Conference on Trends in Electronics and Informatics (ICEI), pp. 1077-1081. IEEE.
Safa Omri, Pascal Montag, and Carsten Sinz. (2018)” Static Analysis and Code Complexity Metrics as Early Indicators of Software Defects”, Journal of Software Engineering and Applications 11, No. 04, pp. 153-166.
Wilch, J., Fischer, J., Neumann, E. M., Diehm, S., Schwarz, M., Lah, E., ... & Vogel-Heuser, B. (2019, October). Introduction and evaluation of complexity metrics for network-based, graphical IEC 61131-3 programming languages. In IECON 2019-45th Annual Conference of the IEEE Industrial Electronics Society (Vol. 1, pp. 417-423). IEEE.
F. Fioravanti, P. Nesi, (2000 August 31). “A method and tool for assessing object-oriented projects and metrics management,” Journal of Systems and Software, Volume 53, Issue 2, Pages 111-136.
Madi, O. K. Zein, S. Kadry. (2013). On the Improvement of Cyclomatic Complexity Metric, vol. 7 no. 2,
Abdul Rehman Shaikh, “Applying Halstead Metrics in Your Programs”, https://www.academia.edu/23024048/Applying_Halstead_Metrics_in_Y our_Programs/ last accessed on 18 March 2020.
Abdulkareem, S. A., & Abboud, A. J. (2021, February). Evaluating Python, C++, JavaScript and Java Programming Languages Based on Software Complexity Calculator (Halstead Metrics). In IOP Conference Series: Materials Science and Engineering (Vol. 1076, No. 1, p. 012046). IOP Publishing.
Balogun, M. O. (2022). Comparative Analysis of Complexity of C++ and Python Programming Languages. Asian J. Soc. Sci. Manag. Technol, 4, 1-12.
Chandrasegar Thirumalai, Shridharshan R R, Ranjith Reynold L, “An Assessment of Halstead and COCOMO Model for Effort Estimation ”, International Conference on Innovations in Power and Advanced Computing Technologies (i-PACT), April 2017.
Coimbra, Rodrigo Tavares, Antônio Resende, and Ricardo Terra. “A Correlation Analysis between Halstead Complexity Measures and other Software Measures.” In 2018 XLIV Latin American Computer Conference (CLEI), pp. 31-39. IEEE, 2018.
Govil, N. (2020, June). Applying Halstead Software Science on Different Programming Languages for Analyzing Software Complexity. In 2020 4th International Conference on Trends in Electronics and Informatics (ICOEI) (48184) (pp. 939-943). IEEE.
T Hariprasad, K Seenu, G Vidhyagaran and Chandrasegar Thirumala. (2017, May) “Software Complexity Analysis Using Halstead Metrics”, International Conference on Trends in Electronics and Informatics (ICEI) IEEE & 978-1-5090-4257-9.
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Kevin Agina Onyango, Geoffrey Wambugu Mariga
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
The articles published in International Journal of Computer and Information Technology (IJCIT) is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.