Campbell Ritchie wrote:
But why are you using recursion rather than a loop?
Karen Guffey wrote:...reading a program is much more difficult for me than writing one. Is that normal?
Karen Guffey wrote:First, as I was writing the program & came to the end of the method, I realized I'd already written what I needed to come next, so the easiest thing just seemed to make the last thing in the method a call to the method I needed.
Second, the lesson on it in chapter 20 of our books was something we had to read along with methods in Chapter 5, so I figured my professor might be impressed if I used it.
One thing we have to do is read a program & tell what the outcome will be, & as counter-intuitive as it seems to me as a linguist ... reading a program is much more difficult for me than writing one. Is that normal? It's like I have to write it to understand it...
And, quite honestly, since I test it as I go along, I sometimes make a small change to see if it will make the program work, & it does, but I'm really not sure why!
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your databasehttps://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database