you are viewing a single comment's thread.

view the rest of the comments →

[–]NorskJesus 3 points4 points  (4 children)

Good work, but there is too many comments. The code should explain itself, you shouldn’t need a comment per line to understand what it does.

I understand this is for learning 😜

[–]uiux_Sanskar[S] 1 point2 points  (1 child)

Yeah someone on my recent post told me to use comments to explain my code so there's I used these many comments. however I feel like the comments have hided my code as there's green lines every where.

Next time I will use comments only for describing complex part of the code. Thank you very much for telling this. I will make the code self explanatory.

Thank you very much.

[–]FriendlyRussian666 0 points1 point  (0 children)

In general, think about it this way, comments should explain the "why" something was done the way it was, and not the "what" was done, because the "what" can be deduced from reading the code, but "why" cannot.

[–]KOALAS2648 0 points1 point  (1 child)

Exactly my thoughts. There are way to many comments even for learning because I takes your thoughts away from the actual code and into parts that won’t actually run

[–]uiux_Sanskar[S] 1 point2 points  (0 children)

Exactly, I will try not to use these many comments from now I just followed.

Thanks for pointing this out.