10
Got stuck on a simple loop for 2 hours and finally figured it out by writing it on paper
I was trying to build a for loop in Python that counted backwards and kept messing up the range() parameters until I drew each step on graph paper and saw my mistake... has anyone else found that physically writing code out helps when you're totally stuck?
3 comments
Log in to join the discussion
Log In3 Comments
aaronf4025d agoMost Upvoted
Wrote out a Fibonacci sequence by hand last night after my recursive function kept overflowing, and yeah, seeing the actual steps laid out made it click way faster than staring at a screen. The physical act of writing forces your brain to slow down and actually process each line.
8
parkerl3324d ago
Man, same here! I did the exact same thing with a linked list reversal a few months back, just drew it out on graph paper step by step. Actually tracing the pointers moving around made me finally understand recursion in a way no tutorial could.
6
clark.faith24d ago
Did @aaronf40 actually expect recursive Fibonacci to work without blowing the stack?
5