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 Object-Oriented JavaScript (2015) Practice Project Project Overview

Greg Schudel
Greg Schudel
4,090 Points

Feeling overwhelmed and confused

I don't even know where to begin...(a list of my conundrums and pedagogical questions)

1.) I find myself lost on how to address the project at hand: I'm analyzing WHY it seems like I am in the deep end so quickly despite the amount of hours I've spent on learning Javascript. Perhaps I "thought" I knew the process simply because I had all the answers in front of me? Perhaps I had too much code handed to me without typing it all out myself?

2.) how do you map this project out?: I'm confused by the file names. It would seem these are there to guide me, but I don't see how they would fall in line with the construction and flow of the code. All code appears to have a "thinker" (the object that stores the questions) a "doer" (the function that assembles in the DOM) and a "caller" (calling what is returned from the conditionals). Is that too simplistic of a approach for my psuedo code?

3.) where to look for help: I looked at the previous section of this course and tried to follow through on how making the playlist relates to the problem at end....dead end. I have more questions and answers which leads me to believe my process for figuring this problem out needs to be revisited.

4.) when I should look for a pre-made solution: I do NOT WANT someone to figure the problem out for me and simply hand me the solution. I believe this is part of why I'm so lost, BUT how else can I learn AND REMEMBER everything to this problem WITHOUT looking.

5.) I know JS can be divided into the how the what and the why. I find myself seeing the why(look at code and seeing such-and-such do this) and the what (identifying pre-written code that is presented to me), but confused with the how (syntax). Should I go over the previous section all over again from scratch noting and literally mermorize the syntax? Perhaps, hand-write it out?

12 Answers

Kyle Bilton
Kyle Bilton
7,111 Points

Have never related so much to a post before, I am really struggling with this Object-oriented javascript part of the course. I've arrived at this project and have absolutely no idea where to start. Not sure if its Andrews way of teaching and the way they've set out this part of the course or I've simply jumped the gun and need more practice. Maybe a bit of both.

Looking forward to future responses to this one :/

Greg Schudel
Greg Schudel
4,090 Points

Kyle,

Glad I'm not alone. Listen, from what I've read from other comments, it really is the material. Object oriented programming is difficult to understand. I would ask yourself several questions first.

1.) Have you done ALL the other beginner level Javascript courses first? If not, do some searching and even reach out to one of the teachers here for guidance if need be.

2.) If your confused, you need to ask yourself, "what are you confused about?" in other words, "which parts are confusing you?" I divide all code into the "when" (where do you type the specific code, "should I use a constructor function with a prototype? etc") and the "how" (how does it work in the browser). Try that. Start with a simple understanding first.

3.) Break the process down into chunks. If your not sure how to do that, again, I would refer to point 1.

4.) Sometimes, you might need to pause form your course and make your own VERY simple projects based on what you already know. Neuroscience proves doing on your own is way different than just following along in a course. This is where you can do something fun. You can take this code and throw it in the forum to ask on how to do it better, you'll get lots of feedback! Not sure where to start, try this : https://teamtreehouse.com/library/exploring-new-tech-with-starter-projects-featuring-chalkers

5.) Learning code online can sometimes lead to the illusive belief that you understand the code. Following along and doing the courses isn't enough. You have to apply what you learned in different contexts. It's literally like learning Spanish. You don't know Spanish because you speak to one person in Spanish. You know Spanish when you speak to dozens of people who know Spanish. I found myself doing this sometimes and after taking a break and doing some reflection, I believe this is why I am getting lost.

5.) Take breaks and reward yourself for your breaks! This will make you feel less dreadful when your working on your next project. Sometimes the biggest problems you face when you go to learn code is the fear you'll never get it.

6.) Ensure you are concentrating for approximately 25 mins at a time when your reviewing this information. Then take a break. You may be getting distracted when your reviewing this complex info. Little distractions over time add up to big misunderstandings.

7.) Finally, if you need further motivation I would suggest audio books that are specifically geared toward motivating people on learning code.

In summary, OOP (object oriented programming) is a essential part of javascript; it's really what makes JS so valuable to learn. Just because it'd hard doesn't mean it's not worth it; it's a big hump to leap over!

Personally, what I plan to do is move forward, take the answer that is given and spend time organizing it into chunks that makes more sense to me. This is done by virtually every web dev out there. Then when I am done with this course, I intend on taking my own advice and making a personal project for fun.

May the Force (of learning) be with you :)

Jack Cummins
Jack Cummins
17,417 Points

Also, since Andrew Chalkey has a really strong accent, that makes his courses even harder to understand!

Nicholas Gaerlan
Nicholas Gaerlan
9,501 Points

99% of the time you won't ever use this confusing syntax. It's all obsolete because of ES2015 http://blog.teamtreehouse.com/get-started-ecmascript-6

https://teamtreehouse.com/library/introducing-es2015 Arcane prototypal inheritence... GONE (well... hidden) and replaced with 'class' and 'extends'. I don't even have to tell you what those are and you can tell that class is an object and extends... extends that class/object. Makes this whole thing way easier. Just wait till you play with functional programming libraries like Ramda or Mori and learn that "for loops" never have to be used... maybe they should never be used actually (performance and integrity reasons). I'm telling you this because I'm not stressing out at all about actually having to write code in the way shown here. It's good to know, but if you look up JS jobs, ALL of them require you to know Node, JQuery, React, maybe a framework like Angular, so in essence you won't be spending most of your time writing vanilla JS. And if you ever forget... just get a refresher from some treehouse courses :-)

Greg Schudel
Greg Schudel
4,090 Points

ALL of them require you to know Node, JQuery, React, maybe a framework like Angular, so in essence you won't be spending most of your time writing vanilla JS. And if you ever forget... just get a refresher from some treehouse courses :-)

Good point, but if I don't know the foundations of JS, I'll never have the tempered wisdom as to which library to go with whenever I do a project. Thanks for giving me the intel though! I already reviewed ES6, probably will be reviewing it again when I jump on the React.js course soon after I'm done tinkering with some personal projects.

M Glasser
M Glasser
10,868 Points

Feeling the EXACT same way. I get these OOP concepts are some of the more difficult to understand, but in this case it feels like the training wheels came off way too soon. It's hard not to get frustrated by this and feel like this code challenge is some kind of trial by fire. But my response is... who cares? It's perfectly OK to find another guide to learn these concepts (and that's what I'll be doing). I feel like I've grasped a broad overview of how this stuff works from Andrew's course, but not quite enough to then come up with the solution on my own or remember how all the moving parts work together. I also don't feel particularly inspired by this particular project. I'd rather figure out a way to use these ideas to make something relevant to my interests.

This has happened to me with other topics on TT... I barely understood anything the first run through, then worked independently, sought out other resources, and then finally revisited the treehouse course to help solidify the ideas. Everybody learns differently, rather than watching the same treehouse video over and over I'd prefer to seek out other examples and tutorials to fill in the gaps.

As in with most programming learning paths, we hit a point of frustration, this is normal, this is actually a good sign, a sign that you are trying to really understand what it is going on, what makes the wheels move as they say. I find myself in this position from time to time, in my experience, a couple of things help me step over the hump: simply keep going for a little longer, some times learning the next step allows us to understand the previous topics better. If this does not work, take a break and try using the material in a hands-on project of your own, the key here is to try come up with a situation where you can use the material using the most basic implementation possible. I hope this helps, do not despair, some times all we need is to stop and breathe for a few minutes. Cheers.

Greg Schudel
Greg Schudel
4,090 Points

For anybody who needs some guidance on their journey of struggling with JS. https://www.sitepoint.com/learning-javascript-9-common-mistakes/?utm_source=SitePoint&utm_medium=email&utm_campaign=Versioning

These are 9 problems that keep people back from learning JS. I definitely found this validating and helpful! I found my biggest problems were picking too big a project for me and for following along too often without understanding, rather than slowing down and just practice the small elements of what I learned. Hope it helps.

Nicholas Gaerlan
Nicholas Gaerlan
9,501 Points

good article. I'm not so focused on making anything as much as I am understanding it all. the NodeJS section was horrible. I think the problem there was that it's entirely focused on a project instead of explaining all the most commonly used features of Node. And I'll come back around to the Gulp section later. My big plan is to get through full-stack java and continue learning and experimenting online for a few months while I save up to do the HackReactor bootcamp. I'm trying to get a career in this, so meanwhile I'm also applying for junior internships. Honestly, the back end stuff is more appealing to me than the web-application-design part, but I like all of it. I actually like Python and Go languages way more than JS.

from all i've read... learning to code in JS is a clusteF@#K because it has changed so much over time and so little vanilla JS is used in professional environments (by 'vanilla' I mean, JS that doesn't use any library or framework). This is good and bad. Good, because I agree with the idea that you shouldn't reinvent the wheel all the time, so there's actually some bit of brilliance to the idea that you go out and learn to use the newest tools. On the bad side, it makes it all very confusing. So one dev blog I read gave some very good advice. "Pick a stack and specialize in it". The big 2 that seem to float around are MEAN and more recently MERN. I am personally leaning toward MERN. Treehouse has

M ongoDB / E xpress / N ode

in the fullstack JS course and then they have separate courses for either Angular or React. it's a good way to organize it. good thing the internet has so many projects and even youtube has tons of vids by ppl who show how to create projects within either of those stacks. treehouse is a very good starting point, but you definitely have to explore outside of it.

SAMUEL LAWRENCE
SAMUEL LAWRENCE
Courses Plus Student 8,447 Points

Loved the article. Thanks for the link. Very helpful hints and guidance.

SAMUEL LAWRENCE
PLUS
SAMUEL LAWRENCE
Courses Plus Student 8,447 Points

It was a relief to see that I wasn't the only one struggling with this. There are a lot of great suggestions and links here and they're helping a lot. What's helping the most though, is that I was able to remove the added pressure I gave myself by thinking I was dumb, and focus on the advice, links, tips and resources provided above, after reading this thread.

So a huge thanks guys.

ps. I also thought that Andrew Chalkley style of teaching wasn't very good, but after reading this thread I have to change that thinking because of all the resources and suggestions, and tips that I was able to have access to as a result of his teaching. So kudos.

Nicholas Gaerlan
Nicholas Gaerlan
9,501 Points

I'm right there with you in the novice pits. Game Dev?!?! That's amazing! I've only been learning for 5 weeks now, but I love all this stuff.

Kyle Bilton
Kyle Bilton
7,111 Points

Couldn't agree more with everything you said. I've nearly finished the "Front-end Web Development Course" and as soon as I have I plan on jumping into the "Javascript Basics" course.

I need to start trying to make some own little projects of my own, wasn't really sure where to start though so I will check out the link (Thank you!) I do try and give myself plenty of breaks and rewards as I know I am someone who can potentially become unmotivated and distracted easily. I completely related to 5.) Following and doing the course is just a start, once you start developing your own sites and apps is when you really learn.

After reading through my "Javascript and Jquery" book by "Jon Duckett" last night i managed to get a MUCH better understanding of OOP, I think just explaining it differently helped me.

Still plenty of work and practice to be done to ensure i do understand it though! =D and may the force be with you, good luck and thanks!

Nicholas Gaerlan
Nicholas Gaerlan
9,501 Points

Great to hear you're sticking with it! I've been chugging along with JS and Python and I probably research trends in programming every day. I will say this... the future looks like a hybrid of OOP and Functional Programming. Over time JS has become more and more like a classic OOP, meanwhile the 'hot' trend in OOP is to absorb more Functional Programming ideas. I've done a bunch of reading on the subject and I can see why treehouse offers a course on Scala. I was tempted to try Haskell, and I tried the Scala vids, BUT the best one I've seen so far is Ramda JS. Before you fall down that rabbit hole, JavaScript does have NATIVE CODE for three of the most used FP methods of map, filter, and reduce. This is not some extra library, it's native. So just like the ES2015 stuff, you can use it and not ever have to worry about going back to code in the old way. (if you need to transpile it or something, just run your code through Babel). I highly suggest learning these and using them everywhere you can:

https://hackernoon.com/understanding-map-filter-and-reduce-in-javascript-5df1c7eee464

Greg Schudel
Greg Schudel
4,090 Points

I know OOP, but what is functional programming? I reviewed the internet and basically got this:

Functional programming (often abbreviated FP) is the process of building software by composing pure functions, avoiding shared state, mutable data, and side-effects.

Not sure what that means. And could you grant me and example?

Nicholas Gaerlan
Nicholas Gaerlan
9,501 Points

That hackernoon article shows some of it. from what i've seen it's better at manipulating large data sets (arrays, databases, key/value pairs, etc). because when you work in OOP you primarily focus on 'how' you will do things. most of the time that's in the form of some kind of 'for loop' ... i'm gonna go very abstract here cuz i'm not familiar with the code/syntax... basically here's the diff as I understand it. Here might be an example of a program to send a promo message to some customers in a database. The OOP method

  1. create a variable 'message' that holds a string
  2. create a variable 'users' that holds an array
  3. create a method sendMessage() for sending the message to the users. it will take an array of users and a string as it's arguments.
  4. create a "for loop" that iterates over a large database of customers and returns who bought something in the last 30 days
  5. now create a loop that iterates over that result and gets returns users living in any of 5 cities
  6. now create a loop over the result that finds users that are interested in certain hobbies
  7. now take the result and use the ".length" of the list to create a string variable to that reads something like "you are one of [400/500/1000? whatever the length of the list is] to get a special pre-order offer!"
  8. assign that string to the message variable
  9. assign the results of steps 4-6 to the variable 'users' you created earlier
  10. call the sendMessage() function and pass it the arguments of message and users

in OOP

  1. find(all users (whoBoughtThingsInTheLast30days (livingInTheseCities (whoAreInterestedInTheseHobbies(inCustDataBase)))
  2. forEachUserFound(send("Congratulations! you are one of %{theTotalNumberofResultsFound} selected to get a special pre-order offer!))

in general, functional programming focuses on what you want to do instead of how you want to do it, it's easier to read, there's less guarding/error handling you have to write into the code, and it tends to run faster than OOP solutions. That's not to say that OOP is useless. OOP I think is fantastic for modeling representations of what you want to achieve, but then if you want to manipulate large data, then use FP for that and then pass on the results to your model to display it. So far the best vid I've seen for it is on pluralsight.com I did their trial and watched some vids on golang and one series on "JavaScript Hardcore Functional Programming". I'll probably end up subscribing there too, but I like treehouse more. It's just that TH doesn't have much on Go or Functional programming, and most of the dev blogs i've been reading keep saying that you need to learn some kind of FP. If you are interested in building a website for your own purposes, then I would say, don't bother. I want to get a $$$ job doing full-stack work with maybe more of a focus on the backend.

Greg Schudel
Greg Schudel
4,090 Points

My focus is on fullstack (for now), but I need to focus on JS to become a JS FS. I know it will be hard, but I believe it will be worth it. I have experience with WP, html/css. But JS is more focused on technical dev skills that are more rewarding. Eventually I'd like to create my own games (mobile and console) too (using unity and C# and such) again this is further down the road. I think TH addresses those needs well and I HATE getting kicked in the teeth for asking "novice" subjective questions in other forums. Keep in touch Nick! Lemme see the projects your working on as you grow in your career direction!