Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Asynchronous Programming with JavaScript Asynchronous JavaScript with Callbacks Managing Nested Callbacks

Charting flow of callbacks on pen and paper?

Hopefully not a silly question but I had a hard time following without mapping everything out on paper with pen.

Do professional developers do this? Or is it better to stick to dev tools?

I hope to get to the point where I can follow only using dev tools.

4 Answers

Steven Parker
Steven Parker
231,236 Points

Mapping out program flow on paper is a popular technique for beginners and experts alike, but only some of them. It's more a personal preference than an indicator of skill level.

Use the tools that work best for you, without concern for their being physical or virtual.

Shawn Lindsey
Shawn Lindsey
20,952 Points

I had a lot of trouble with callbacks in general, not to mention the heavily nested CPS stuff. For those banging your head against a wall right now and wondering about sketching out the flow or how you'll ever get used to this, be aware that you're about to be introduced to more modern asynchronous approaches using Promise based code. It's much easier to read, especially the final form of async/await, and will make you feel much better about getting into asynchronous programming. In hindsight, I do appreciate how we were introduced to callbacks first here so that we understand what's going on beneath the sugar. If you're struggling with this particular section like I was, just stick with it and move along.

Thank you guys for this thread. It's helpful to know it'll be easier to manage with modern approaches. But also good to know what's going on with callbacks and being able to track the progress of the call stack.

I was also thinking about mapping out the flow with a pen and pencil. I'll definitely give that a go!

Matthew Turner
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Matthew Turner
Full Stack JavaScript Techdegree Graduate 16,968 Points

Wow.....I'm totally lost trying to follow this. I thought I had a handle on Unit 5 until I hit this spot. I've watched the video several times, followed the links to read other sources and still no better. I think I will revisit this first thing tomorrow morning as I am just not getting it even a little bit right now.