Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been a SWE for 12 years and has been teaching people how to code during my free time ever since I started coding (so more than 12 years of teaching).

I have taught around 30 students over the past 12 years who went from knowing nothing to getting a SWE job and from my limited dataset I have observed that:

1. Students who were taught for/while loops first has a hard time grasping recursion. I suspect it is because following the recursive callstack gets tricky and feels unintuitive. This inspired me to try a curriculum where I teach students recursion first and don't expose them for/while loops until they are prepping for interviews.

2. Students who were taught recursion first has no problem understanding for/while loops when they were exposed to it.

For people who are curious, I used to teach students at my local library but recently created a free online curriculum at: https://c0d3.com



My background is in teaching CS1 courses in undergrad (as a TA).

There have been various studies that agree with you: teaching recursion before iteration seems to have benefits! From my experience, it seems to be extremely unpopular among teachers due to the claim that recursion is "useless in industry". My personal opinion is that learning recursion first is probably a step in the right direction, but I'm curious to hear your thoughts (in terms of their claims of the usefulness of recursion in industry).


> recursion is "useless in industry"

From my experience its true. I have never written recursive code in my 12 years of professional experience (primarily JS).

But during interviews, I have written recursive solutions many times to solve some of the harder problems.


Your site looks and reads fantastic; I can’t wait to give it a shot!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: