+ 1
do you write comments in your code ALWAYS?
when I am in hurry or eager to achieve some task, I forget to write comments. is it bad thing?
6 Respostas
+ 6
for some complex tasks it would be beneficial. Even though sometimes I comment almost every thing and after completing my work, clean up the code.
+ 4
Any code that is not immediately obvies about what it does or it's purpose I would comment.
If you find you must comment a lot due to this, try to write more readable code.
Lots of things should be obvies within themselves.
Example/
Scanner sc = new Scanner(System.in);
String input = sc.next();
I wouldn't really comment this, just cause I know immediately what it does, without having to think about it.
That's my take on it atleast.
Although on CodePlayground I may try to comment a lot for people to hopefully learn more.
+ 3
You don't always have to write comments. They're not mandatory on every task. If you're in a hurry and absolutely positively sure that your code is readable then just skip over comments. Although, comments are ideal but it's not law.
+ 1
I am writing comments, sometimes. This is my remainder in my code to know what i'm just writted.