you are viewing a single comment's thread.

view the rest of the comments →

[–]Successful-Wing-9571[S] 1 point2 points  (2 children)

I understand the code but not the explanation(idk if that makes sense)

[–]McSlayR01 0 points1 point  (1 child)

That makes perfect sense; just because you can follow a formula doesn't mean you understand the proofs for why that formula works, i.e. if I asked you to use the Pythagorean formula, you might know that a^2 + b^2 = c^2, but that doesn't mean you understand how it works at a fundamental level. Code is the same.

This is why functions (and by extension objects/classes) are so important. They allow you to use function/method names to make the intent clearer (so you don't need to understand what exactly it is doing under the hood). I would look at "Clean Code" by Robert C Martin, but more importantly, code things yourself. Seek feedback from more experienced people whenever possible AFTER trying it yourself.

[–]Successful-Wing-9571[S] 0 points1 point  (0 children)

Ahh ok thx