+ 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?

16th Aug 2017, 8:12 PM
Darshak Mehta
Darshak Mehta - avatar
6 Réponses
+ 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.
16th Aug 2017, 8:16 PM
Babak
Babak - avatar
+ 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.
17th Aug 2017, 12:49 AM
Rrestoring faith
Rrestoring faith - avatar
+ 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.
16th Aug 2017, 8:16 PM
Don
Don - avatar
+ 1
I am writing comments, sometimes. This is my remainder in my code to know what i'm just writted.
16th Aug 2017, 8:24 PM
SomeCoder
SomeCoder - avatar