Recursion in Actual Java Programming

Alexander Prutzkow

Abstract


Recursion has been used in programming since the 1960s. The purpose of the study is to identify the place of recursion in actual Java programming for the preparation of a university course. The materials were 19 books on Java describing recursion, as well as articles on mental models of recursion. We have the following results of the study. Recursion is, first of all, a technique and a tool. Recursion is described in books together with the concepts of stack overflow, tail recursion, tail call optimization (TCO), and finite or infinite. TCO can be converted into iterations by techniques or integrated development environment (IDE). The book authors prefer calculation of factorial and Fibonacci numbers, binary search, MergeSort, QuickSort, Towers of Hanoi as examples of recursion. Most authors devote a chapter to recursion. Programmers prefer iteration in many problems. In rare cases (such as tree traversal), most programmers (over 51%) use recursion. The most viable mental model is the Copies Model. There are rules for designing recursive methods. When teaching recursion, it is necessary to carefully select assignments. We have not found an exact answer to the question of when to use recursion. Recursion is used when solving well-defined problems in recursive fashion. Recursion has a strong place in Java programming. We will not include recursion in the course of introductory programming, but we will include it in the course of algorithms and data structures. Recursion in actual Java programming is not necessary, merely useful.


Full Text:

PDF

References


Rubio-Sánchez M. Introduction to Recursive Programming. CRC Press, 2018.

Evans B. et al. The Well-Grounded Java Developer, 2nd ed. Manning, 2022.

Kiesler N. Mental Models of Recursion: A Secondary Analysis of Novice Learners’ Steps and Errors in Java Exercises // 33rd Workshop of PPIG, 2022:226–240.

George C.E. EROSI – Visualising Recursion and Discovering New Errors // SIGCSE Bulletin, 2000:305–309.

Shasha D., Lazere C. Out of Their Minds. The Lives and Discoveries of 15 Great Computer Scientists. Copernicus, 1995.

Mitchell J. Concepts in Programming Languages. Cambridge University Press, 2002.

van den Hove G. On the Origin of Recursive Procedures // Computer Journal, 2015, 58(11):2892-2899. DOI: 10.1093/comjnl/bxu145.

Soare R. Computability and Recursion // Bulletin of Symbolic Logic, 1996, 2(3):284-321.

Sachdeva D., Ustukpayeva N. Mastering Java: A Beginner’s Guide. CRC Press, 2022.

Streib J., Soma T. Guide to Java. A Concise Introduction to Programming, 2nd ed. Springer, 2023. DOI: 10.1007/978-3-031-22842-1.

Valeev T. 100 Java Mistakes and How to Avoid Them. Manning, 2024.

Downey A., Mayfield C. Think Java. How to Think Like a Computer Scientist. O’Reilly, 2016.

Horstmann C. Big Java Late Objects, 2nd ed. Wiley, 2017.

Koffman E., Wolfgang P. Data Structures. Abstraction and Design Using Java, 4th ed. Wiley, 2021.

Sedgewick R., Wayne K. Introduction to Programming in Java, 2nd ed. Addison-Wesley, 2017.

Crotts J. Learning Java. A Test-Driven Approach. Springer, 2024. DOI: 10.1007/978-3-031-66638-4.

Anderson J., Franceschi H. Java Illuminated. An Active Learning Approach, 5th ed. Jones & Bartlett Learning, 2019.

Lelek T., Skeet J. Software Mistakes and Tradeoffs. How to Make Good Programming Decisions. Manning, 2022.

Mongan J. et al. Programming Interviews Exposed, 4th ed. Wrox, 2018.

Dale N. et al. Object-Oriented Data Structures using Java, 4th ed. Jones & Bartlett Learning, 2018.

Deitel P., Deitel H. Java 9 for Programmers, 4th ed. Pearson, 2018.

Saumont P.-Y. Functional Programming in Java. How Functional Techniques Improve Your Java Programs. Manning, 2017.

Subramaniam V. Functional Programming in Java. Harness the Power of Streams and Lambda Expressions, 2nd ed. The Pragmatic Programmers, 2023.

Urma R.-G. et al. Modern Java in Action. Lambdas, Streams, Functional and Reactive Programming. Manning, 2019.

Weidig B. A Functional Approach to Java. Augmenting Object-Oriented Code with Functional Principles. O’Reilly, 2023.

Liang Y. Introduction to Java Programming and Data Structures. Comprehensive Version, 12th ed. Pearson, 2019.

Matuszek D. Quick Recursion. CRC Press, 2023.

Sedgewick R., Wayne K. Computer Science. An Interdisciplinary Approach. Addison-Wesley, 2017.

Sanders K. et al. Student Understanding of Object-Oriented Programming as Expressed in Concept Maps // SIGCSE, 2008:332–336.

Pashukova A.D. Pedagogicheskaja Tekhnologija v Sovremennom Obrazovatel'nom Prostranstve Podgotovki Penitentsiarnykh Psikhologov [Pedagogical Technology in the Actual Educational Space of Teaching Penitentiary Psychologists] // Vectors of Psychological and Pedagogical Research, 2024, 2(3):74–81. [in Rus].

Prutzkow A. Class Functionality and its Related Concepts: Research and Practice // International Journal of Open Information Technologies, 2024, 12(11):63-71.

Baron A., Feitelson D. How a Data Structure’s Linearity Affects Programming and Code Comprehension: The Case of Recursion vs. Iteration // 34th Workshop of PPIG, 2023:44–59.

Sulov V. Iteration vs Recursion in Introduction to Programming Classes // Cybernetics and Information Technologies, 2016, 16(4):63–72. DOI: 10.1515/cait-2016-0068.

Esteero R. et al. Recursion or Iteration: Does it Matter What Students Choose? // SIGCSE, 2018:1011–1016. DOI: 10.1145/3159450.3159455.

Baron A., Feitelson D. Why Is Recursion Hard to Comprehend? An Experiment with Experienced Programmers in Python // ITiCSE, 2024. DOI: 10.1145/3649217.3653636.

Chao J. et al. Dynamic Mental Model Construction: A Knowledge in Pieces-Based Explanation for Computing Students’ Erratic Performance on Recursion, Journal of the Learning Sciences, 2018, 27(3):431–473. DOI: 10.1080/10508406.2017.1392309.

Aqeel A. Understanding Comprehension of Iterative and Recursive Programs with Remote Eye Tracking // 32nd Workshop of PPIG, 2022.

Mackay S. What Does Literature Tell Us About Recursion? // SIGCSE, 2022, 2:1173. DOI: 10.1145/3478432.3499210.

Abelson H., Sussman G. Structure and Interpretation of Computer Programs, 2nd ed. MIT Press, 1996.

Yourdon E., Constantine L. Structured Design. Fundamentals of a Discipline of Computer Program and Systems Design, 2nd ed. Yourdon Press, 1978.

Jones M. The Redesign of the Delivery of an Introductory Programming Unit // Innovation in Teaching and Learning in Information and Computer Sciences, 2007, 6(4):169–182. DOI: 10.11120/ital.2007.06040169.

Smith D. et al. Dealing with the Challenges of Learning Recursive Programming – Helpful Functions and Incremental Approaches to Encourage Recursive Thinking // Issues in Information Systems, 2024, 25(3):357–370. DOI: 10.48009/3_iis_2024_127.

Campesato O. Data Structures in Java. Mercury Learning and Information, 2023.

Liben-Nowell D. Connecting Discrete Mathematics and Computer Science, 2nd ed. Cambridge University Press, 2022.


Refbacks

  • There are currently no refbacks.


Abava  Кибербезопасность ИТ конгресс СНЭ

ISSN: 2307-8162