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 Basics Making Decisions in Your Code with Conditional Statements The Conditional Challenge

I feel like a deer in headlights

I am going through these JavaScript courses, but cannot do these challenges without looking at the solution. I don't feel like I know where to start even though I just went over these concepts. It's disheartening and makes me feel inadequate to learn this stuff.

I feel the same way! During the courses I feel like I get it and then a challenge comes along and I don't even.. I can't even.. what in the world??

It's funny because I learned SQL here in Treehouse a few years ago and I felt the same way about SQL... but now, I can write just about anything in SQL with my eyes closed. I'm more of a hands-on learner but just typing along with the instructor doesn't quite count.

What helped me with SQL (and what I am trying to apply with JavaScript) is repetition and hands-on practice. I have gone back and watched some of the videos again when I feel like I did not quite understand it, I am also taking notes on OneNote and then I go through and organize the notes which sometimes means I am typing the same thing multiple times. I use w3schools.com both to reference what we're learning AND (&&) I try out some of their practice exercises. https://www.w3schools.com/js/js_exercises.asp

Just keep in mind that it's like learning a language (because it is).. absolutely NO ONE gets it right away and it takes time. Give yourself the benefit of the doubt. See if you can do even one part of the challenge and if not then go look at the solution.. see what he touches on and go re-watch those videos and then try the challenge again.

You can do this! Ha, we can do this!

6 Answers

Hi!

I know how you feel - I have been there myself.

I have found that learning coding can be frustrating because in many ways a great deal of ANY code syntax (regardless of the language) can be extremely non-intuitive. In fact, in many cases, it is ONLY the way it is because that's just how the developer(s) decided it should be - with no necessary rhyme or reason to it (sometimes they can make it relatively intuitive, but often it can be downright arbitrary).

For example, when I first started learning UNIX terminal commands, they seemed absolutely arbitrary. Once you learned them, they were actually very easy to grasp and actually made a lot of sense, but without reading about them or have. someone else teach them to you, there was ABSOLUTELY NO WAY to figure any of it out. They use a lot of abbreviations, so typing is minimal, but it also makes many of the commands downright cryptic. Many switch flags are just one letter, so guessing what the flag does can next to impossible - there's no way to know without documentation.

For example, in the Git command:

> git commit -m "Added new paragraph"

-m is the message flag, allowing you to use "Added new paragaph" inline and not requiring a text editor.

git commit is pretty self-explanatory, but the -m gives nothing away to inform you of its purpose.

When I got started, I literally bought a UNIX for Dummies book, and within the first ten pages, I could do A LOT, without which I didn't have a clue. Before that, the UNIX dumb terminal was a complete baffling mystery.

Anyway, one thing I highly recommend (as does Guil) is to tap into any/every resource OUTSIDE of Treehouse to round-out and expand your knowledge and understanding of JavaScript (and HTML and CSS) and have them handy in other browser tabs for reference - you can't remember everything.

I also recommend taking every beginner course offered by Treehouse on HTML, CSS, and Javascript.

In fact, if you are not strong in HTML and CSS, I would plow through those courses first, then resume the JS, it will make understanding JS a whole lot easier.

Also, I go back and forth between JavaScript, PHP, and Python all the time, which are syntactically different in many significant ways, therefore, without reference docs - I'd be dear-in-headlight half the time, too!?!

Some recommended third-party resources:

https://www.w3schools.com/

https://www.freecodecamp.org/

https://developer.mozilla.org/en-US/

https://css-tricks.com/

https://www.youtube.com/user/derekbanas (His videos are BOMB - he talks fast, so he covers a lot and you don't end up waking up in a puddle of your own drool!?! LOL)

I hope that helps.

Stay safe and happy coding!

Karina Rogers
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Karina Rogers
Front End Web Development Techdegree Graduate 15,908 Points

Hello! I too opened this challenge and thought "where do I even begin!?" Being a newbie coder, I thought it'd be relevant to share my thought process on working through this particular code:

First I scanned the directions for any part that looked doable - step 4 stood out because we have used the prompt method multiple times so far. So I wrote out my 5 questions using "const questionOne = prompt('question here?');" (Obviously this is not my exact code, I'm trying to explain my thought process, not give explicit answers)

Next, using a similar start to the number guessing game challenge, I set let score = 0 in step 1.

Then, using my notes, I wrote out a rough draft of step 6 using querySelector() and innerHTML: "You've earned X points and Y crowns".

Then I was stumped again. Eventually, I figured the only code we've been using is 'if else' statements so I wrote out my answers using that... if questionOne = correct-answer-here then +1 to score. I did this for each question.

Next, step 5 seemed like it also needed a function so I tried to apply my if/else statements to that too. 'if score = 5 then gold medal' else 'if score = 3 or 4, silver medal', and so on.

In the end, I had a working code that asked questioned, displayed the # of correct answers and a corresponding metal. I kinda skipped over steps 2 and 3 but since my code was working, I went on to watch the how-to video to see how I could have improved.

Thanks for sharing your frustrations. Hopefully, this shows that some of us are in your same boat! One small step at a time, right? =]

Mark Ryan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Mark Ryan
Python Web Development Techdegree Graduate 28,648 Points

Hi, odysseywow. You've done the right thing by coming to the community with this. I'd like to share with you that, in my short journey of coding, I too have felt this way before. It seems to be a pretty common feeling actually. We're doing hard stuff! If I have any advice to offer it's this: things do get better. As long as you continue to show up and invest some of your time, things will fall into place. As prepared as that statement seems, this really is the way I've seen things go.​

Here a few things that have helped me personally:

  1. Seek out other sources of information. After learning a difficult concept here at Treehouse, I'll usually seek out Youtube videos, books, blogs, etc, to offer my mind diversity in medium and presentation of concepts. Then I come back to Treehouse to redo courses (that's my preference). Usually I'll pick up more information the second and third time watching a course.

  2. Build everything. Make sure part of your time is dedicated to hands on coding projects. Build your projects, not tutorial projects. Start small. This is where you'll fail frequently and consistently. Failure is where the opportunity to learn is! This is just another way of learning.

  3. Don't over do it. This is a long journey, not a short one. Give your mind and body the rest it needs to achieve these amazing things.

I hope any bit of this helps!

BTW, one other thing I would suggest is try to test challenge code outside of the challenge, when necessary.

One thing I don't like about some/many of the challenges is you don't often get to see the RESULT of the code.

Either that or the "Bummer" message doesn't really reveal what the error is very accurately.

So, I often go here:

https://www.w3schools.com/js/tryit.asp?filename=tryjs_array

And paste in my Treehouse code and see if it behaves as intended or expected (and I often have to add a little extra code that is not part of the challenge, say to log a result to the console).

This way I can actually go through formal debugging procedures to help me pinpoint my error(s).

For Python I go here:

https://www.katacoda.com/courses/python/playground

Anyway, I hope that helps.

Stay safe and happy coding!

Thanks for posting that. It's helpful to see other people don't find this super intuitive. I started reading these comments because I too feel out of my element and not sure how to complete this challenge without additional resources. I don't have any helpful advice but can say that I agree with your comments and it doesn't mean we are not still learning, it just may take a little longer for it all to sink in.

boi
boi
14,241 Points

There are some great guides here and adding to that, I would like to underline some other problems;

It seems like you're not sticking with the challenge as you should but rather jumping into the solution once you feel like a "deer in headlights". I subscribe to the fact that everyone sometimes in their lives feels like a "Deer in lights". Back in the days of my new coding journey, I felt like that all the time. Sometimes It would take me days to solve a simple two lines of code Python challenge. One of the things that kept me going to the point where I no longer feel "Deer in lights" is consistency. You only fail when you stop trying.

I would also advise to ask yourself "Why am I learning to code". If you can't answer that question, I recommend working on the answer. Another thing is comfort zone learning. If you're just going through videos without completing challenges, and quizzes and have a practical workflow, chances are you'll not make any progress in learning.

Another thing is giving time to learn not learning when you feel like it. Keep a schedule to every day, every other day or at least twice a week.

The only difference between people who make it and don't is consistency no matter what odds they are up against. You only fail when you stop trying.