Hello! I’ve come to Basic Algorithm Scripting and I try to do my best before I click “Get a hint button”, and after clicking it turns out that I forgot to add one or two conditions to the code, but I really tried to do my best and didn’t look at other peoples’ code and wrote some parts of code correctly.
So the question is: is it ok for beginners to write some parts of code at least or they should do everything at the first attempt and only use materials provided by the camp?
Because of other peoples’ code examples on freecodecamp, I am starting to think that I don’t understand the whole logic of coding, but how can I understand it if I’ve just finished Basic JS?
You will make millions of mistakes. Even when you’re good at it, you’ll still make mistakes and need to look things up. It’s ok for beginners to do whatever they need to do to learn more.
You won’t be able to complete Freecodecamp by only using the things they provide - you’ll need to search for answers. Mozilla Developer Network is one really good source of information.
It gets easier to read other people’s code and your own code will improve too, it just takes some time. It sounds as though you are headed in the right direction.
If you don’t get something at first I don’t think it’s bad to look at someone else’s good and see how it works; just make sure you actually look at any code you see line by line and understand what it’s doing so you can write it yourself the next time.
I think not looking at other people’s answers before you have solved the algorithm is a learning path, and looking at other people’s answers first is another learning path. I think a combination of the two is probably the best, probably essential in fact. I did everything myself right through all the algorithms because I liked the challenge, but now I find I can’t read other people’s code at all well and my own code is very basic in comparison to other people’s, so I think doing it all yourself is not the best idea. Maybe do it yourself first, then do it again after reading other people’s code and use some of their ideas would be best.
I try to complete the Algorithm challenges without looking at other people’s code but if I get really stuck then I look up the answer. When I do this, I try to understand other peoples’ code line by line and I have found this is where I learn a lot. I rationalise it to myself that once I’ve gone through all the challenges then I’ll go back and try to do them again without looking up the answers