Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Tobyvw6987yThat certain comment is useful. IMO, though, the one below that you could do without.
Basically, your comment is "prints blablabla" while the method is called "printBlablabla" -
It depends what it says to be honest. I did know someone who used to do this:
// requests bills
requestBills(...) { ... }
// draw chart
drawChart (...) { ... }
// add numbers together
addNumbers (...) { ... }
In a case like this, I agree with the assistant. There is no need to have a comment explaining the name of the function.
Comments should be meaningful and used to explain business logic that is not immediately clear when looking at it.
You’d have to translate the comments and the function names for us lol -
I've wrote the comment: When the user anwsers the giving question with the wrong anwser, a question about culture will be asked.
I've add this comment just before the else to explain what the else clause is doing. -
zshh38537yPeople saying comments are always good are fucking idiots. Sorry, but that’s how it is. If your code is clear enough there is no reason for any comments.
What you’re doing with a comment that is explaining what the code does is duplicating information. And some day that information will lie, because you will change the code but forget the comment. Then you’ll have a lying comment. That lying comment might confuse someone in the future and may even cause bugs.
So stop writing stupid comments!! Spend a bit more time writing good code. The only time a comment is valid is when it’s explaining WHY something is written in a certain way. Maybe there’s a weird business rule forcing you to do this thing? Then a comment is valid. God I hate comments. -
Root825997y`print0plossingenKwadratischeVergelijking(a,b,c)`
What the crap?
I would subtract a point just for that. -
Tobyvw6987y@Ashkin it's literally
printSolutionsQuadraticEquation(a,b,c) with the comment above it saying
#prints the solutions of the quadratic equation. -
wimujip05yRant feed share this article with us it has some codes that were over this among formation that was used while making software. I need to have some more at this that was at https://my-assignment.help/ this was the site that have all codes among the all language that was useful to have some formats over these.
-
Wow I really like this recipe, it looks very special but can still be done. I will visit your blog more to read other articles. Happy!
http://superfighters2.net/
Related Rants
The student assistant gave me a half point penalty for writing down to much comments! Direct translation:
To much of this kind of comments is not needed, the code itself is clear on its own.
rant
python
comments
education
no comments would be better?