JavaScript practice tips? Can't seem to retain anything

JavaScript practice tips? Can't seem to retain anything
0

Hello Campers, I could use some advice.

I’m a brand-new coding student, and I started freeCodeCamp two months ago. The Responsive Web Design module was fun and challenging; but JavaScript is giving me serious trouble. Around the Record Collection part, I keep having to use hints or watch the solution videos, which tells me I’m retaining very little.

This thread had some wonderful advice on staying motivated and identifying your deficiencies. My deficiency is I’m a bit lost on how to actually practice my JS chops.

I come from a blue-collar background, so I need a practical concept to link to the abstract concept. With HTML/CSS this was easy. With JS, however, I’m not sure how to get my hands dirty and not just build lines of code in a vacuum. It just seems like a ton of individual theories that aren’t leading me to a practicable application, as opposed to tinkering with FlexBox or the like.

Any recommendations or tips would be very appreciated. (For what it’s worth, I just downloaded Visual Studio Code.) Please explain as if I were a child, haha.

Thanks!

1 Like

My guess is it is not the code syntax which is giving you trouble. Instead, it is that you are not understanding the algorithm needed before trying to write the first line of code. This is completely normal for beginners You will do yourself a huge favor by first writing out the algorithm on paper (the steps needed) to solve the problem. You can test your algorithm by using the test cases and “walk through” your algorithm. Once you have the algorithm down, then you can think about JavaScript syntax you may remember to help you implement your algorithm. If you get stuck (before looking a the solution), post your algorithm and any code you have written and we can help guide you to a solution which you can call your own.

1 Like

Thing 1: Hints and solutions

The hints are there for a reason, so don’t be ashamed to use them sometimes. If you feel like you are over-reliant on solutions, I strongly encourage you to become more engaged here on the forum. It’s a great place to come and talk about the troubles that you are having with JavaScript in general or for a specific challenge. The incredibly supportive group of people here will be very happy to help walk through the process of solving the problem instead of showing you the solution. Sometimes all you need is a little reminder or nudge to work it out, and sometimes you will want to keep talking through each step in the process. You’ll be supported either way.

Thing 2: Abstraction vs. “practical”

When you create a function you are making a thing. Think of it like building small machines that don’t take up space in your house. I think what you may be missing is the confidence to tinker with your code. Go ahead and break it! You won’t hurt anything. Just like understanding a physical object often involves picking it up and shaking it and trying to open a flap - oops! it’s not supposed to open! oh. it snaps back in. nothing to see here- you want to explore your functions. If you have a function doing what you expect it to, challenge yourself to modify it to do something different. Make changes and predict what effect they will have. The freeCodeCamp editor isn’t the best suited for this, but you can use tools like repl.it to run your code in isolation, or a tool like PythonTutor to step through execution.

1 Like

Hi Clifton893,

JavaScript is giving me serious trouble.

This is normal.

The video bellow is from “geohot”: a hacker, ex employee of Facebook and Google. The first recommendation is “just don’t give up” (like geohot says in the video).

My deficiency is I’m a bit lost on how to actually practice my JS chops.

Second recommendation: don’t spend too much time solving puzzles.

I come from a blue-collar background, so I need a practical concept to link to the abstract concept. With HTML/CSS this was easy.

Are you using some kind of REPL[1]?
How do you explore the problem domain[2]?

With JS, however, I’m not sure how to get my hands dirty and not just build lines of code in a vacuum.

I really like this quote about Joe Armstrong[0]

Joe wrote amazingly simple programs and he did so in a peculiar way. First he wrote down the program any old way just to get it out of his head. Then once it worked he would then immediately create a new directory program2 and write it again. He would repeat this process five or six times (program5, program6, …) and each time he would understand the problem a little better and sense which parts of the program were essential enough to re-type. He thought this was the most natural thing in the world: of course you throw away the first few implementations, you didn’t understand the problem when you wrote those!

I think that pair programming[3] sessions can be a good way to practice coding, maybe you can try it.

The course “How to Design Programs” is really good:

Systematic Programming Design
https://www.youtube.com/channel/UC7dEjIUwSxSNcW4PqNRQW8w

https://htdp.org/2018-01-06/Book/
How to Design Programs, Second Edition

Cheers and happy coding :slight_smile:


Notes:

[0] https://github.com/lukego/blog/issues/32

[1] https://en.wikipedia.org/wiki/Read–eval–print_loop

[2] https://en.wikipedia.org/wiki/Problem_domain

[3] https://en.wikipedia.org/wiki/Pair_programming

1 Like

Just wanted to pop back in here and say thanks for the helpful words. I chewed on the tips here, and I’m exploring some other JS tutorials to supplement my fCC studies.

Thanks again!

I must confess, I had some struggles with the intermediate algorithm section. Planning to go back there as soon as possible to do more “hands on” exercises, just like @RandellDawson suggested.

Just be patient.

The JavaScript is important to understand but it’s not really important till you connect it to a website. The later lessons cover exactly that.

The certification right now isn’t for web development and JavaScript. It’s merely JavaScript if I recall correctly.

You’re probably overthinking this. Just relax. :hugs: You got this.

1 Like

Welcome to the world of JS and Free Code Camp!!! I started right when FCC was brand new and was only a curated curriculum. In otherwords, FCC linked to other sites that had coding lessons, and FCC helped you track your progress and provide a guided learning pathway.

What I found back then was that

  • I needed to repeat lessons I had just done
  • I used muiltiple sites to reinforce what I had just learned
  • I wrote a parallel project to the ones in the lesson to make sure I could abstract the concepts.

I’m not sure what your background is in education, but there are a lot of ideas out there that apply to any thing you’re trying to get better at.

Kaizen is a japanese term for continual improvement. It doesn’t matter if you are a beginner, intermediate or expert, there is always someplace you can improve. Some tennets of improving are:

-You need a blueprint of what you’re trying to do. Code tutorials and lessons here provide a blue print
-You need to break things down into small managable pieces. (Code tutorials do this for you…as you make progress you can take 2 ideas from a code tutorial and create your own idea. eg how to create a random number & how to create an array of strings. Combine these ideas and you can create random quotes…assuming quotes are what you stored in the array
-You need objective feedback on how you’re doing. The tests in FCC provide feedback on whether you’re correct or incorrect. The forums can hep provide feedback on your thinking process.
-You need to reapply what you just got feedback on to see if you can do it better.

As long as you’re generally following these steps, you’ll make continual improvement.

It doesn’t matter if you’re not meeting someone else’s objectives for progress…what matters is if YOU are making progress.

Keep in mind that finding mistakes and errors are how you identify what you need to improve upon.

Maybe you can’t recall the syntax for making a random number. This is a memorization/repetition issue. So make notes, or notecards and review your notecards during breaks at work.

Those are just some simple ideas, but meant to provide encouragement. Keep it up.

As you make progress what seems abstract now will beome more concrete.

Maybe take some example from your field. YOu said you have a blue collar background, so think of some process that you do in your job. Just making this up, but say you are a welder…you need to do things in a specific order to make a good weld. Or you need to make choices about your materials, rod size, etc before you weld. Or there is a series of safety steps (turn gas on, put mask on, etc).

With somethign you know really well in mind, think of how what you just learned and try to apply it. At first it’s super simple…
-print a list of steps to the screen
-store the steps in an array
-let a user interact with the steps, like “click here when done”.

Hope that helps. You got this!

1 Like