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

Michael Fish
7,804 PointsWhat are the steps to writing a JS program?
Hello guys. I have put a solid year into learning code and when I look at a JavaScript program I understand 90% of what I see. My problem isn't with programming it is with writing programs. I just don't know how to structure one. The programs I have written were ideas I stole from reading another person's code. After I read a program I understand how to write my own version of it. I only need a couple JavaScript projects to round out my portfolio and start applying to jobs. How do I fill in the blanks in my brain to be able to write programs myself and without looking at other people's work? Or should I just copy and edit other people's programs for my portfolio?
2 Answers

Will Potter
7,577 PointsStart with an idea for what you want your program to do. Think big picture. Maybe you want your portfolio project to be an online shopping store, or maybe a website where you can search and display Flickr photos with certain tags.
The next step is to scale that big idea into smaller tasks. Write out a list of all the things your code needs to do to make that bigger goal happen. For the second example, you would need to include a search button, deal with user input, and use AJAX to get photos from Flickr.
This is when the coding begins. Use what you learned in your Treehouse classes to start coding each of the smaller tasks. Preview it along the way to make sure each little bit works properly. If you get stuck, use an online resource like W3 or MDN. These are encyclopedias of coding knowledge that are indispensable to beginners. I've been using them all the time for my portfolio projects, when I don't know what method to use, for example.
You should start seeing your project come together, slowly but surely. Don't be afraid to ask for help. If you have questions you can't figure out, post them in the forums. Learning to code is a tough process, but you learn so much more by actually doing coding rather than just reading someone else's code. I hope this answer is helpful. All the best!

Joseph Rimar
17,101 PointsHey Michael,
If I understand you correctly you're saying that you understand the Javascript language just fine but you're having trouble implementing what you know without first looking at other peoples code. I had the same problem until I started practicing algorithms. I highly recommend that you practice coding with websites like coderbyte.com or sign up with codewars. Go through as many challenges as you can and only search for an answer as a last resort. At first they will be quite difficult and frustrating but over time you will learn a how to break each problem down to simple steps and you'll be able to come up with solutions to many programing problems on your own. Once you've got some experience coming up with algorithms do as Will said and break each big picture project down into smaller tasks. Hopefully this helps.