Pedagogical Suitability: A Software Metrics-Based Analysis of Java and Python
Keywords:
Introductory Programming, Programming Language Comparison, Halstead Complexity Metrics, Java, PythonAbstract
Programming is one of the foundational skills essential for computer science professionals, yet attaining proficiency in this skill is widely acknowledged as a formidable challenge. The intrinsic complexity of programming is often cited as the primary factor contributing to its difficulty. The choice of programming language for IP courses typically relies on past experiences and empirical evidence, rather than on a quantitative basis, which can affect its effectiveness and suitability for novice learners. The study presented in this article conducted a quantitative analysis of Java and Python to assess their suitability for use in IP courses. The analysis involved evaluating programs based on a total of 210 elementary programming algorithms using HCM. The results of the study indicated that Python programs, compared to Java programs, have a reduced reliance on lexical elements, are less complex, and have a smaller code size. Additionally, Python was found to produce less complex programs and required less effort and time for development and maintenance. Moreover, Python programs tend to have fewer bugs. Overall, the study concluded that Python is better suited for IP courses than Java. The novelty of this study lies in its quantitative comparison of Java and Python using HCM, revealing that Python is more appropriate for IP courses due to its lower complexity, reduced development effort, and fewer bugs.
References
J. C.-C. and F. P. M. Tupac-Yupanqui, C. Vidal-Silva, L. Pavesi-Farriol, A. Sánchez Ortiz, “Exploiting Arduino Features to Develop Programming Competencies,” IEEE Access, vol. 10, pp. 20602–20615, 2022, doi: 10.1109/ACCESS.2022.3150101.
E. R. and S. Stenbom, “Engineering Students’ Experiences of Assessment in Introductory Computer Science Courses,” IEEE Trans. Educ., vol. 66, no. 4, pp. 350–359, 2023, doi: 10.1109/TE.2023.3238895.
M. R. I. L. Graafsma, Serje Robidoux, Lyndsey Nickels, Vince Polito, Judy D. Zhu, “The cognition of programming: logical reasoning, algebra and vocabulary skills predict programming performance following an introductory computing course,” J. Cogn. Psychol., vol. 35, no. 3, pp. 364–381, 2023, doi: https://doi.org/10.1080/20445911.2023.2166054.
M. S. Naveed and M. Sarim, “Two-Phase CS0 for Introductory Programming: CS0 for CS1,” Proc. Pakistan Acad. Sci. A. Phys. Comput. Sci., vol. 59, no. 1, pp. 59–70, Jun. 2022, doi: 10.53560/PPASA(59-1)710.
S. R. Sobral, “Teaching and Learning to Program: Umbrella Review of Introductory Programming in Higher Education,” Mathematics, vol. 9, no. 15, p. 1737, 2021, doi: 10.3390/math9151737.
A. M. B. Emil Stankov, Mile Jovanov, “Smart generation of code tracing questions for assessment in introductory programming,” Comput. Appl. Eng. Educ., vol. 31, no. 1, pp. 5–25, 2023, doi: https://doi.org/10.1002/cae.22567.
Á. F. José Carlos Paiva, José Paulo Leal, “PROGpedia: Collection of source-code submitted to introductory programming assignments,” Data Br., vol. 46, p. 108887, 2023, doi: https://doi.org/10.1016/j.dib.2023.108887.
J. J. Sohail Iqbal Malik, Roy Mathew, Abir Al Sideiri, “Enhancing problem‐solving skills of novice programmers in an introductory programming course,” Comput. Appl. Eng. Educ., vol. 30, no. 1, pp. 174–194, 2022, doi: 10.1002/cae.22450.
P. K. C. I. & C. David Wong-Aitken, Diana Cukierman, “’It Depends on Whether or Not I’m Lucky, How Students in an Introductory Programming Course Discover, Select, and Assess the Utility of Web-Based Resources,” ITiCSE ’22 Proc. 27th ACM Conf. Innov. Technol. Comput. Sci. Educ., vol. 1, pp. 512–518, 2022, doi: https://doi.org/10.1145/3502718.3524751.
F. Demir, “The effect of different usage of the educational programming language in programming education on the programming anxiety and achievement,” Educ. Inf. Technol., vol. 27, pp. 4171–4194, 2022, doi: https://doi.org/10.1007/s10639-021-10750-6.
M. C. L. I. & C. Zahra Atiq, “A Qualitative Study of Emotions Experienced by First-year Engineering Students during Programming Tasks,” ACM Trans. Comput. Educ., vol. 22, no. 3, pp. 1–26, 2022, doi: https://doi.org/10.1145/350769.
K. M. Y. and W. N. L. C. Wee, “iProgVR: Design of a Virtual Reality Environment to Improve Introductory Programming Learning,” IEEE Access, vol. 10, pp. 100054–100078, 2022, doi: 10.1109/ACCESS.2022.3204392.
J. F. and F. García-Peñalvo, “Teaching and Learning Tools for Introductory Programming in University Courses,” 2021 Int. Symp. Comput. Educ. (SIIE), Malaga, Spain, pp. 1–6, 2021, doi: 10.1109/SIIE53363.2021.9583623.
A. I. Idongesit Eteng, Sylvia Akpotuzor, Solomon O. Akinola, “A review on effective approach to teaching computer programming to undergraduates in developing countries,” Sci. African, vol. 16, p. 01240, 2022, doi: https://doi.org/10.1016/j.sciaf.2022.e01240.
F. J. G.-P. José Figueiredo, “Design science research applied to difficulties of teaching and learning initial programming,” Univers. Access Inf. Soc., vol. 23, pp. 1151–1161, 2024, doi: https://doi.org/10.1007/s10209-022-00941-4.
M.-L. H. & W.-Y. C. Chia-Wen Tsai, Michael Yu-Ching Lin, Yih-Ping Cheng, Lynne Lee, Chih-Hsien Lin, Jian-Wei Lin, “Integrating online partial pair programming and socially shared metacognitive regulation for the improvement of students’ learning,” Univers. Access Inf. Soc., 2024, doi: https://doi.org/10.1007/s10209-024-01127-w.
M. K. I. & C. Neil C. C. Brown, Pierre Weill-Tessier, Maksymilian Sekula, Alexandra-Lucia Costache, “Novice Use of the Java Programming Language,” ACM Trans. Comput. Educ., vol. 23, no. 1, pp. 1–24, 2023, doi: https://doi.org/10.1145/3551393.
M. S. N. Kashif Munawar, “The Impact of Language Syntax on the Complexity of Programs: A Case Study of Java and Python,” Int. J. Innov. Sci. Technol., vol. 4, no. 3, pp. 683–695, 2022, doi: 10.33411/IJIST/2022040310.
M. D. Raquel Hijón-Neira, Celeste Pizarro, John French, Pedro Paredes-Barragán, “Improving CS1 Programming Learning with Visual Execution Environments,” Information, vol. 14, no. 10, p. 579, 2023, doi: 10.3390/info14100579.
W.-C. H. Hsiao-Chi Ling , Kuo-Lun Hsiao, “Can Students’ Computer Programming Learning Motivation and Effectiveness Be Enhanced by Learning Python Language? A Multi-Group Analysis,” Front. Psychol., vol. 11, p. 600814, 2021, doi: 10.3389/fpsyg.2020.600814.
M. S. Naveed, “Comparison of C++ and Java in Implementing Introductory Programming Algorithms,” Quaid-E-Awam Univ. Res. J. Eng. Sci. Technol. Nawabshah., vol. 19, no. 1, pp. 95–103, Jun. 2021, doi: 10.52584/QRJ.1901.14.
J. A. W. Silveira, Thiago L. T. da, Dennis Balreira, “Investigating the impact of adopting Python and C languages for introductory engineering programming courses,” Comput. Appl. Eng. Educ., vol. 31, no. 1, 2022, doi: 10.1002/cae.22570.
J. X. and M. Frydenberg, “Python Programming in an IS Curriculum: Perceived Relevance and Outcomes,” Inf. Syst. Educ. J., vol. 19, no. 4, pp. 37–54, 2021, [Online]. Available: https://files.eric.ed.gov/fulltext/EJ1310052.pdf
M. S. Naveed, “Measuring the Programming Complexity of C and C++ using Halstead Metrics,” Univ. Sindh J. Inf. Commun. Technol., vol. 5, no. 4, pp. 158–165, 2021.
L. L.-O. Norka Bedregal-Alpaca, “Incorporation of Computational Thinking Practices to Enhance Learning in a Programming Course,” Int. J. Adv. Comput. Sci. Appl., vol. 13, no. 2, pp. 194–200, 2022, doi: http://dx.doi.org/10.14569/IJACSA.2022.0130224.
V. K. and B. L. D. Viduka, “A Comparative Analysis of the Benefits of Python and Java for Beginners,” QUAESTUS Multidiscip. Res. J., vol. 1, no. 19, pp. 318–327, 2021.
N. A. Khan B, “Evaluating the effectiveness of decomposed Halstead Metrics in software fault prediction,” PeerJ Comput Sci, vol. 27, no. 9, p. 1647, 2023, doi: 10.7717/peerj-cs.1647.
K. A. Onyango, “A comparative study of the lexicographical complexity of Java, Python and C languages based on program characteristics,” J. Innov. Technol. Sustain., vol. 1, no. 1, pp. 42–67, 2023, [Online]. Available: https://www.academia.edu/122346019/A_comparative_study_of_the_lexicographical_complexity_of_Java_Python_and_C_languages_based_on_program_characteristics
I. L. Graafsma, “The cognition of programming: logical reasoning, algebra and vocabulary skills predict programming performance following an introductory computing course,” J. Cogn. Psychol., vol. 35, no. 3, pp. 364–381, 2023, doi: https://doi.org/10.1080/20445911.2023.2166054.
R. P. and B. C. P. Perera, G. Tennakoon, S. Ahangama, “A Systematic Mapping of Introductory Programming Languages for Novice Learners,” IEEE Access, vol. 9, pp. 88121–88136, 2021, doi: 10.1109/ACCESS.2021.3089560.
A. C. and M. L. E. Lokkila, “A Data-Driven Approach to Compare the Syntactic Difficulty of Programming Languages,” J. Inf. Syst. Educ., vol. 34, no. 1, pp. 84–93, 2023, [Online]. Available: https://aisel.aisnet.org/jise/vol34/iss1/7/
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2024 50sea
This work is licensed under a Creative Commons Attribution 4.0 International License.