Writing JS code

I have no problem understanding JS code, I can explain a block of code bit by bit, what it does, and what each line means but I have a huge problem when writing the actual code. For instance, I can explain the code to a challenge but cannot come up with the code if given the challenge. What do you guys do in such situations?

1 Like

Hello @stephenmutheu
Would it help if I remind you that we all learned to speak way before we even knew how to associate those sounds that we made with our mouth and put them into words that we could write down?
Thatā€™s just a thought!

1 Like

Write down in words what the problem is, without any reference to code.

Then break it down into smaller pieces. Once there are enough details, start writing basic code to solve each problem.

I give myself mini projects to do. More often than I like I google how to do things, skim read articles, just to get an idea when I hit a hurdle.

Spending just an hour every few days writing code, debugging, and testing is enough for me to develop conceptual skills. As the experts on this forum suggest, practice, practice, practice.

1 Like

You are understanding the code, you know how to use it, thatā€™s the most important thing. Syntax and even languages will be less and less important with code snippets and AI assistants available 24/7.

Iā€™m your super nerd, sometimes coding 60+ hours a week, but Iā€™ll be damned if you ask me to write a Python function out of memory without referring to my sources. I also donā€™t know why to waste time and brain capacity by memorizing syntax.

I know where to look, what to ask, what the function is supposed to do, how to optimize and deploy the result. Thatā€™s where we should focus our skills as developers.

1 Like

I recommend you do what you do with every other thing you want to get good at. Just do it! Open up your editor and start typing, it may not be the response you are looking for but you should just do it.

Take some 1 or half hour, just typing out the syntax you already are familiar with, that way, when you pick up another challenging task, your fingers know the first things to doā€¦and watch the domino magic effect.

This is me here. The advice I got was to keep practicing. Regular practice of building actual features here and there helps us become more comfortable using it. Maybe not every line of code but some will become familiar enough to write ourselves due to repetition.

1 Like

It is OK to fail as long as you try.

Coding is pretty much just failing your way to success.

1 Like

Yes, thereā€™s even a whole discipline to coding based on it: Test Driven Development.

Iā€™m new here Stephen and at the same time Iā€™m new to writing programing can you pls put me through where to start from?

I thank you all for the insights. Iā€™ll make sure to adhere.

1 Like

ā€œFirst tryā€ is a meme in coding for a reason, because we rarely get things right the first time. We fail and try until it works. Then we test it some more and find new bugs. So we try again until the code (to the best of our knowledge) works as intended. Debugging code is part of the coding process for this reason.

Failing your way to success just means trying until it works and is a reflection of the fact that your code often will not work ā€œfirst tryā€.

1 Like

I left an answer in the other post. If you need something, please, open a new dedicated thread for it, in that way we do not interfere with the original poster request.

1 Like

First of, Freecodecamp is your goldmine. Explore, ask questions, etc here. That said, I think it depends of where you feel like you will excel at. So you donā€™t waste time because whichever track you decide on, you need to commit and be consistent asap. If you were to be in BACKEND, I suggest starting with learning ā€˜how to programā€™, Programming helps you understand the fundamentals because whatever language out there all have similar approaches, maybe the difference is in syntax. Then move on to Projects. Start building PROJECTS and get comfortable.

As already mentioned, create a new post for this, so you can get others to contribute and you can chart your way from there.

1 Like

if you guys are tired of doing programming and still need an helper to help you out with your programming assignment help needs then as I did you should also take help from Global Assignment help now and see the difference from what you see and what they offer you. good luck

Iā€™ve been to this phase during learning and below has helped me

  1. Break down big problem into smallest chunk possible. Write down each of these small chunk of problems on notepad and once you solve them individually; checkmark against them. This will boost your confidence level as well.

  2. Try to solve smallest problem with JS and move forward

  3. Take help of Google

  4. Do check below YT video, it helped me tremendously ( https://www.youtube.com/watch?v=KwP9pTEwdrE )

  5. Start building projects ( easy to complex ). For me frontend mentor helped a lot and also exercism. Do check both or similar once

All the very best and donā€™t hesitate to ask further queries