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

General Discussion

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

Algorithms

I'm doing JavaScript Basics at the moment. And I got up to the part in the course that challenges you to write the quiz application.

I didn't try it myself for the simple reason for that is I couldn't think of any questions to ask. I would have had more trouble thinking of questions than writing the code to ask them.

But the course does very well in preparing you for being able to write a script that runs the quiz.

I remember my thought processes exactly.

Stage 1. Good grief how am I going to be able to do all of that. I can't do this I'm absolutely hopeless at thinking out what I'm supposed to be doing.

Stage 2. Start thinking. Okay what's the challenge actually asking of me. Well... I'm going to need to get user input somehow to answer the quiz questions. That needs a prompt command. And that'll have to be assigned to a variable. Hey, I know that. I store prompts, keywords and values in variables for safe keeping. Alright, I'm doing something.

Stage 3 I write this all out in a notepad, or on a text document. Maybe plan out the variable names I'm going to use... okay them down.

Sketch out how I'm going to measure whether the answers input are correct.

Maybe in development, later on, I'd have worked out that I needed to use methods to validate the inputs like sorting out the case of values.

In the end, my thinking of how to complete the program was very close to what Dave came up with, which was encouraging.

Then I got thinking. There's a word for a better way of planning out our programs. Algorithm. Now there is a word I don't think I've heard on Treehouse yet, although I've on;y done JavaScript courses for programming so far.

Are there any courses out there for doing Algorithms. I think this could be a good skill to learn that'll help us plan our scripts and programs as they get larger later on. :-)