Hi everyone, i’ve started the javaScript curriculum and i’ve found myself in a very frustrating situation. In the javaScript curriculum we have : word blanks, shopping list, stand in line, golf code, counting cards, record collection and profile lookup and these in my opinion are the most interesting and challenging challenges but out of seven on them i could only solve two and i can’t help but feel frustrated because when i looked up the solution of the challenges that i couldn’t solve i realized that they were quite simple and i said to myself that i could’ve solved them if only the way i’d come about those challenges was different. Maybe i don’t know how to think like a programmer yet, maybe it’s normal to be frustrated in the beginning … but really, what i want is someone to tell me what i need to do to be able to use effectively what i’m learning in order to pass those types of challenges when they arise
Did you complete all the other challenges, designed to provide you with the framework in which these seven challenges you name become tractable?
How much time and effort did you spend on the five that you abandoned?
Do you have previous experience in breaking large problems into smaller ones? This is a critical skill in programming, and the only way to manage codebases in the thousands, tens of thousands, or even hundreds of thousands of code lines.
Have you add facility in solving word problems in the past, in other disciplines such as mathematics or physics? Again the ability to translate plain-language descriptions of a problem or solution into code is a key skill to be learned, exercised, and finally mastered.
yes i completed all the other challenges. i’d say that i spent at least two hours on each of the other five. to be honest i don’t think i have any experience in breaking
larger problems into smaller ones
Learning to program is HARD. Some people have overlapping skills that make certain parts easier, but this is hard to do.
If you let us, the community here can help you by working with you through the problem solving process. Come here to the forum when you get stuck and tell us what your thought process is. We can give you a nudge in the right direction, which can be a lot more help than jumping to the answer.
re:
i don’t think i have any experience in breaking
larger problems into smaller ones
The good news is - the programmed learning environment provided here is perfect for getting practice in this essential skill.
Note that the challenges typically have several very specific tests to be met. Focus on these one at a time, and work on each one as a separate task. Save your work as you pass each one, in case subsequent work breaks it. If you have access to a git repository, that is a perfect way to compare a past revision with a current one that breaks a task previously working.
Programming is occasionally frustrating for all of us. We were all beginners at one time.
yeah i think that’s what i’ll do next time, i have the feeling that i’ll learn a lot more from that than jumping straight to the answer. thank you
thanks for the advice
Also - when debugging, console.log(JSON.stringify())
is your best friend. Use it liberally.
your story is so inspiring and thank you for sharing it. i’m gonna use as a motivator
Waaaaw you really inspired me,just start coding 3months back but love it a lot
Did you have any background in computing or coding before reading PHP/MySQL book?
One strategy for breaking larger problems down into smaller ones, is to write pseudocode first. (Maybe you already do this, but I’m going to throw it out there just in case it’s a helpful angle.)
I’m going to use the record collection as my example because I found it frustrating when I hit it about 2 months ago!
Starting out on this challenge I would probably start by translating the instructions given into code, then filling in the tricky bits one at a time.
The first item in the instructions for the function, “If prop
isn’t "tracks"
and value
isn’t empty ( ""
), update or set the value
for that record album’s property.” would become…
if (prop != tracks && value != "") {
// update or set the value
}
But then lower down in the instructions I notice this! " If value
is empty ( ""
), delete the given prop
property from the album." This will apply whether or not the prop is “tracks”. So this had actually better come first:
if (value === "") {
// delete the given prop
}
Then other concerns, like whether or not the prop
is "tracks"
, can be stated more simply since we have already confirmed that the value is not an empty string.
if (prop == "tracks") {
// do something
}
Moving these simple if/else statements around allows you to think through the logic and make sure you have a clear understanding of each step you need to accomplish. It’s like a road map!
A lot has already been said, I am kinda where you are, Infact i temporarily avoided the whole curriculum. Then I asked myself something. Why did freecodecamp add the solutions to these challenges? My answer is they knew this could happen!! Now I have decided to tackle at least 5 challenges a day. When I get to the very difficult ones I will simply time myself (No more than 30 mins - at most an hour if I got something going!)
If I’m not onto something when the time elapses, I will check the solution and completely digest it. I think this is better, cos you would reduce the frustration. After all the solutions checking, Take a bresal and learn the fundamentals you missed
This is inspirational. Thank you for sharing this. I often have thoughts that I am not good enough to become a programmer. But seeing that I’m able to comprehend a lot of technologies covered by FreeCodeCamp and beyond to it, maybe I’m selling myself short.
Other than problem-solving skills, pattern-recognition plays a role here.
With enough practice, you’ll probably be able to spot patterns within problems and can solve them easily. Though, that only comes after you go through the frustration of not being able to solve problems and forced to look up the solution.
A reminder for myself too who is also prone to be frustrated with my incompetence.
thank you very much for sharing story, its very inspiring.
oh, this has hit me really hard…There is always hope…
How do I save my answers??Cos it always disappears when I get back
You need to download them if you want to save them, or copy and paste somewhere
Thank YOU YOu have no idea how youve made me feel