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

JavaScript: One Step at a Time

I'm having trouble visualizing all of the minutiae and tiny steps when tackling a JS problem on my own (the four Ps, as it were)—I feel as though the art of writing code is breaking down already tiny solutions into even tinier ones, and I'm just wondering if any of you out there have any strategies for asking the right questions when coding.

Any resources, observations, or Game Genie cheat codes would be greatly appreciated. Thank you!

Jim Hoskins

Andrew Chalkley

3 Answers

Zak Erving, Geoffrey is right when he say you need time and experience. My only addition to the 4P's strategy is to look for inputs and outputs when you're trying to break things down. What I mean by that is all code works with data, input, and make changes to it, output. So when I'm trying to break down a problem I first look at the data I have been given, whether by a database or the DOM, and then figure out what I need to do to change it into what I want. Each step I add to my process usually becomes a step/function in my code.

I think It's because you need some more experience. I've experienced the same and I still have the same feeling when It comes to new "technology" or concern. It's probably because some aspects aren't actually "natural" to us and so we don't know really how to tackle correctly the problem.

And from my tiny experience, practice makes it perfect to be able to manage easily furtur projects.

Thanks for the insight, guys. It's good to know that this is totally normal, ya know?