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

Nick Manring
Nick Manring
11,369 Points

Colors on code challenges

I've been getting stuck left and right in jQuery because I have not learned it at all while taking classes so it's just new to me, but when I'm really stuck it's hard to check simple syntax against the video or the project files because the code challenge editor has a different color scheme for words and interactions.

Basically side-by-side it's hard to compare and find the issue with your code.

Am I the only one? Is this fixable?

4 Answers

James Barnett
James Barnett
39,199 Points

You are getting too caught in transcribing what teachers are saying on screen. You need to focus on learning the concepts not typing out word for word what someone else is saying.

Videos are meant for learning concepts not as a syntax reference, that's what HTML Dog is for.

Also you skipped quite a few courses including CSS & JavaScript Foundations, you might find it easier if you follow the Learn JavaScript & jQuery learning adventure.

Nick Manring
Nick Manring
11,369 Points

Thanks, I am now doing the deep dives for jquery specifically.

It's just that I think I understand the concepts really well and 3 days go by where i'm just stuck and I feel like giving up and the error I'm getting is just 'null' so I can't really get the answer on my own from rewatching the video.

Basically what will happen is I will finally get the answer from some other source and the answer being just that I had an extra parenthesis or something similar, maybe missing a semi colon.

I don't try to copy-paste the teachers notes or codes but they are the only examples of correct code that are somewhat relative to the question.

Example: Just did some numbers lessons for javascript and it asked to do the parse the numbers out of a string of a variable.

The lesson showed parsing like this aplenty: var a = parseInt("7 strings", 10); which got 7

but when the code challenge came up it asked to parse from a variable that already existed. so i thought maybe something like this var a = "7 strings"; var b = a.parseInt( , 10);
... may work.

but it was var b = parseInt(a, 10); ...which makes sense now, but the teacher did not demonstrate and example like that so I was confused.

Not all the methods work the same way, so how would I know to insert the variable right into the method or, like in other jquery/java code, put the string name first and then the method.

It's things like that as well that are just a bit different between the lesson and the challenge.

I am glad it has us try different things that are a bit outside the box from what was just shown in the lesson, but with no hints on syntax (although sometimes i do get some good hints when something is just a bit off) it just is hard to compare back to the lesson to infer the answer.

Regardless, I am still confused why the code challenges are color coded differently, is this to make sure that it's difficult to compare quickly to the lesson code?

Nick Manring
Nick Manring
11,369 Points

Oh i also meant to add, when I started this website, I went right into learning how to build a website. I have progressed throught the lessons in order since, build a simple website, and once I got to jQuery it got kind of hairy because the code challenges did not match the lessons very accurately without some prior programming knowledge.

I didn't know there were learning adventures for developing specific skills yet, so maybe making it more obvious if someone is getting wrong answers that there are other areas of TreeHouse to develop specific skills like coding syntax.

Also, if.. "Videos are meant for learning concepts not as a syntax reference, that's what HTML Dog is for." ... do you not have coding syntax videos on the Treehouse website? Isn't that kind of fundamental to coding in general? Sorry, just confused on the learning model since I am under the impression you can learn from a complete novice level of programming languages.

James Barnett
James Barnett
39,199 Points

I have progressed throught the lessons in order since

The learning adventures are the order they were designed to be viewed in, judging from your profile it looks like you have skipped over quite a bit foundational content on CSS & JavaScript. CSS is an extremely important prerequisite for JQuery, which can be thought of a type office-flavored JavaScript.

why the code challenges are color coded differently, is this to make sure that it's difficult to compare quickly to the lesson code?

People often get tripped up by following the videos too closely. There's not suppose to a direct 1 to 1 match between the videos and the code challenges. Text editors often have different syntax highlighting styles. In programming you often have to learn on how to go from the specific to the general. To figure out what an error looks like in a text editor, to take an educated guess if syntax highlighting doesn't look right and then double check your syntax.

The videos are for learning concepts, a concept in JavaScript would be What is a string or What is a method.

These concepts apply to all programming languages once you understand how the concept works you just need to learn the syntax of the language you are using. Understanding programming concepts require critical thinking and problem solving skills. Syntax on the other hand is merely applied memorization.

Sorry, just confused on the learning model since I am under the impression you can learn from a complete novice level of programming languages.

Learning programming is a bit like eating a balanced meal, Treehouse is a main course other resources like a syntax guide are your sides of fruits & veggies. You can't learn everything from one place.

JSBin is pretty awesome because it has a built in debugger that would immediately tell you there was a syntax issue with your code. Once you know there's a syntax issue and realize you don't know what mistake you made then it's time to consult a syntax reference. My advice for learning JavaScript to use HTML Dog, Sitepoint Reference & devdocs.io (in preference order) for all of your syntax needs.

Nick Manring
Nick Manring
11,369 Points

Ok great! Thanks so much for all the info. I think this will help guide me a bit better. I appreciate it.

Nick Manring
Nick Manring
11,369 Points

Just a note to add to this coversation, and maybe you can pass it along.

When I started I saw in the library "Websites" which is why I came to TreeHouse, to improve my website building skills. I have a pretty good idea of how they work, but was not taught advanced programming language in college to prep for making websites via Photoshop and dreamweaver.

Basically along the way, "Websites" made it clear that it was ok if I was not familiar with writing code yet like CSS because they would ease me into it, and I was pretty familiar so I wasn't worried. As you progress in "Websites" you get to "jQuery" and that is where I was caught up because of the syntax I was unfamiliar with.

At this point I decided to look for a dedicated section on javascript to learn the language better. I found one area that was a deep dive on javascript. Up until this point I thought "Deep Dives" were more advanced courses not more indepth ones on specific content from beginner to intermediate.

So I started javascript deep dive and the instructor kept mentioning how "As you learning in 'Intro to Programming'..." which confused me because along this entire process it was not required to have had gone through that course.

So now I am starting from scratch with intro to programming and it's very helpful, but I just wanted to let you know that maybe it would be smart to have a notice before certain areas that say "Intro to Programming course is strongly recommended before contining forward" or something to that effect. Maybe even placement test to see what courses you should take to make sure you are prepared with the right languange skills before entering something like the "jQuery" area.

I just want to try to point this out so others in the future who are literally told "Don't worry about not being familiar with coding at this point" don't take it literally like I did, because I should have worried about not being entirely familiar.

**** Also, I didn't skip anything, I didn't start at the "Become a Web Designer Learning Adventures, and actually I didn't even know there were Learning Adventures until just the other day when I got really stuck. I don't really appreciate how you made me feel about my coursework here. I am doing the best I can and don't need criticism when direction isn't clear to begin with. I started at the Library home page and went to "Websites" and followed the lessons as they are presented to me. If you think someone should do something different, don't leave the "foundations" training at the bottom of the page, or on another page entirely.****

James Barnett
James Barnett
39,199 Points

I don't really appreciate how you made me feel about my coursework here. I am doing the best I can and don't need criticism when direction isn't clear to begin with.

Thanks for the feedback, I didn't mean for it to come off as criticism. I'm sorry about that.

I didn't even know there were Learning Adventures until just the other day when I got really stuck.

In terms of not noticing the Learning Adventures, it's a pretty common for new people to follow the same path that you did.

Nick Manring
Nick Manring
11,369 Points

It's really no problem, as you and anyone else here would know, code can be frustrating! It's just hard when you've looked and looked and you think you understand the syntax well to have someone kind of allude that you have not tried hard enough at something.

I take no offense and criticism is welcomed, just try to buff it with some other pleasantries next time haha. I'm sure i'm not the only one who gets straightforward comments and interprets it horribly. I appreciate the help. I'm not past jQuery and onto bigger and better stuff!