Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

As a student, I'm looking for hard stuff to do for become a good programmer.

I've tried Personal Software Process (and I hate it), and now I'm improving myself with some agile kata on OOP in c++ and python.

But I like recursion. and I think a deep understanding of its fundamentals is required to be called a good programmer.

Can you recommend some exercises (or website, books, whatever) to practice recursion on a daily basis?

share|improve this question
Start with reading this: amazon.com/Lambda-Calculus-Studies-Foundations-Mathematics/dp/… –  SK-logic Apr 2 '11 at 20:13
I agree with the previous comment. Try learning a Lisp (Common Lisp, Scheme, Clojure, etc.) because by their nature these languages make heavy use of recursion. They will also get you thinking in a completely different way about programming. archive.org/details/mit_ocw_sicp –  WuHoUnited Apr 2 '11 at 23:01
+1 "As a student, I'm looking for hard stuff to do for become a good programmer." Good for you: doing easy tasks (once you have the basics) won't do much for you! I've learned immeasurably more working on difficult projects than easy ones. Almost goes without saying. –  msanford Jan 13 '12 at 15:12
add comment

closed as off-topic by MichaelT, BЈовић, Kilian Foth, Bart van Ingen Schenau, GlenH7 Aug 1 '13 at 18:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – MichaelT, BЈовић, Kilian Foth, Bart van Ingen Schenau, GlenH7
If this question can be reworded to fit the rules in the help center, please edit the question.

5 Answers

Recursion is just one of many tools you will have at your disposal as a professional developer. Please don't get stuck on just that.

I see a risk in your interest in the "hard stuff". It might result in you being a developer too stuck in the code to be able to understand the bigger application picture.

If you really want do so "some hard stuff" create a project and stick at it for a while. Completing a project ( documentation, bug fixes, taking criticism ) these are some of the real hard things you will need to master as a profession developer.

PS: If you do just love recursion and it flows out of you naturally then perhaps look at the language Erlang - the most trivial loop is recursive :)

share|improve this answer
+1 I agree wholeheartedly. As for the last paragraph: About all functional languages favor recursion over loops (some, e.g. Lisps, still provide loops to use in practice (and the rest has map, fold, etc. which cover 90% of what explicit recursion would be used for) - but the resources teaching the language will usually have lots of recursion exercises anyway) –  delnan Apr 2 '11 at 19:18
+1 often the hardest part in this profession is acquiring "soft" skills, e.g. communication. –  Péter Török Apr 2 '11 at 19:22
I disagree; looking for hard stuff is a good attitude, in the sense that he wants to challenge himself to improve. –  hasenj Apr 3 '11 at 5:14
Agreed, and I cannot and was not attempting to fault him for that, but reading between the lines I just saw a risk that he might lose track of the bigger picture. –  Stephen Bailey Apr 3 '11 at 5:25
well, i didn't expected such an answer as the most voted answer. thank you for advice. –  nkint Apr 3 '11 at 9:31
add comment

If you want to exploit recursion, try to solve the 99 Prolog problems. Using recursion, most of those problems can be solved writing much more compact code compared to traditional loops. Of course if you are not interested in learning Prolog, you don't have to. Just try to solve the problems using your own favourite language.

share|improve this answer
add comment

Here are a few that come to mind:

  • Graph Theory
  • Compiler Construction
  • Large-Scale Database Design
share|improve this answer
add comment

Recursion is the only looping construct you have in functional languages. I'd suggest learning about the functional paradigm.

For a challenge, implementing a red-black tree (without parent references) in C/C++ is fairly difficult and tree traversal is a case where recursion is use in the real world.

share|improve this answer
add comment

You can force yourself by using a purely functional language (e.g. Haskell).

Recursion occurs every where -- more than you think! There's almost never a problem that can't be solved with recursion.

Whenever you find yourself thinking about a loop, stop and think: can you solve this using recursion?

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.