Should i use code that i don't understand yet?

Should i use code that i don't understand yet?
0

#1

Hi campers.

I’m kind of in a dilemma right now. i’m a new learner, and currently working on my personal portfolio.

The thing is, i have a vision of my page to look like. but i don’t know how to make it with my current knowledge. So i googled it, and found the code that made the effect i was looking for. However, i don’t understand the code yet (just copy paste, and it work).

Sooo, should i use it, and learn about it on the go. or does it considered cheating, and just do what i’m really capable right now and learn it later?

But also, i think with my curent limitation, it kinda forced me to figure out the answer myself and to learn even more, but on the other hand i also feel maybe it’s just not in my capability right now.

Am i being a smartass/showoff or what do you guys think?


#2

There’s a difference between just pasting whole sites into your editor and changing the headings and searching out the snippets that solve problems you might have…

If you look at something like the Bootstrap components library, not only is copy/pasting encouraged, it’s kinda best practice!

You may not know what every part of the snippet does yet, but you should make the effort to try to understand as much of it as you can. But it’s a balance - don’t burn out on trying to understand one esoteric pseudo class; prod it enough that you learn something but continue actually building things so you can be productive.

Personally, I designate particular chunks of time to just building things with what ever I can find that makes it work, and then devote other chunks of time to really digging into the working code I have to understand its secrets a little better. The benefit of that for me is that I can see exactly what code does and I’m free to tinker with it to see what effects tweaking it might have.

I’m basically always using some new technique I have a very tenuous understanding of, but when I need to use the same technique a month later all the mystery has usually evaporated :slight_smile:


#3

Yes, that is exactly what i was doing.
i would work on my page, and would look out to google if i had an idea or problem that i can’t put into/solve on my own. and would try to tweak it to see what the code does to understand a little bit of it.

Thank you for your wonderful advice, it is very helpful for me to continue with my learning ahead :smile: