[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Name the superior commenting styles.

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 39
Thread images: 1

File: poisonlist.png (5KB, 303x764px) Image search: [Google]
poisonlist.png
5KB, 303x764px
Pick your pair, and make your argument.
Let's settle this.
>>
>>58633476
it does not matter you autist
>>
>>58633514
Box-style commenter detected

1,4 for me, only answer
>>
>>58633476
//line comment
/*multi line comment
because who care
lmao*/

There is no comment in my code. It's supposed to be understandable. If it's not, it's because I have fucked up with my naming convention.
>>
>>58633476
I shiggy diggy
>>
>>58633546
>"Well anon we were looking over the Github you linked us and we couldn't help but notice the lack of comments. We're no longer considering you for this position, but we'll keep you in mind in case a relevant position opens up."
>>
>>58633476
single line: 1
multi line: 2
>>
//Single
/* Multi
line */

Any other way is just retarded
>>
>>58633580
>Good riddance, I couldn't help but notice I was about to be hired by retards.
>>
>>58633580
kek
>>
-- {{{ lol dis gun be gud
-- }}}
>>
>>58633476
>not using flower box at top with short single line explinations as needed
>>
>>58633476
https://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html
>>
>>58633476
http://www.lispworks.com/documentation/HyperSpec/Body/02_ddb.htm
>>
> god tier:
//
#

> vim tier
"

> long comments only tier
/*
*
*/

> stupid tier
<!-- ->
CSS comments, why the fuck aren't they just //

> pleb tier
everything else
>>
>>58633546
You are a fucking moron. The whole point of comments is so that people do not need to read paragraphs of code to understand what it's supposed to do. Just a couple/few sentences of English is more thhan enough to explain what the purpose of a method or class is. You're just making bullshit excuses to half-ass your work.
>>
>>58634111
That is what documentation is for.
I'm wondering who is just making bullshit excuses to half-ass his work.
>>
>>58634270
Documentation != Code comments
Documentation is a library guide for those who want to USE your code. Code comments are a guide for those who want to MODIFY your code.
>>
>>58634270
Documentation should be generated procedurally from your comments with doxygen, or whatever equivalent exists for your language of choice.
>>
>>58633476
Comments are a bad practice. Your code should be understandable just by reading it.
Also comments are wasting compiler time.
>>
>>58634848
>being this autistic
>being this shitty of a programmer
Have fun coding in your mom's basement
>>
>>58633476
/**
* Comment line 1
* Line 2
*/


is only way for multi-line comments. For single line comments:

/* Single line comment */


Why? Because Linus Torvalds uses it and he's my God.
>>
>>58634863
Actually if another programmer can't understand your code without comments you're the shitty programmer, not me.
>>
>>58634890
Just because someone can understand your code by reading it doesn't mean they should have to in order to gain a basic understanding of what's going on. Furthermore, the majority of professional shops will have you use something like JavaDoc, Yard, Doxygen, or some other tool to generate documentation, and all of those solutions require you to add comments to your code. This is why you will always be a neckbeard NEET.
>>
>>58634427
If he want to modify my code, he need to read it. The code itself is perfectly understandable and need no comment.

>>58634621
Yes, and the doxygen is on another branch, for better code readability.
>>
>>58634953
We agree then. The reason you want comment in your code is the same reason we are doing documentation.

Comments are a bad practice.
The "comments" needed by doxygen should be made on another branch.
>>
>>58635011
>seriously being this retarded
>woud rather read a paragraph of somebody elses code than a couple sentences
>>
>>58633476
What is this font?
>>
>>58635072
Darude Monospace
>>
>>58635047
I'm sorry but what is the problem ?
If you need to modify someones code, you need to read it. If you need to understand what it does to use it, use the documentation. If you need documentation, don't fucked up your code readability just to please the programm generating your documentation, do it on another branch called "doc" that contain the programm and the comments needed by doxygen.

What is so fucking autistic to ask from people to write readable code, and do a proper documentation, instead of putting comment in the middle of everywhere. Comments are a bad practice because they encourage pajeet to make code with var named x and y and be proud of him because he write tons of comments that explain his pile of shit.

What you want from comment are offered by the documentation anyway. The fact that most documentation tool read some formated comment to be generated doesn't mean they should be left in the middle of the code.
>>
>>58635138
>What is so fucking autistic to ask from people to write readable code
Confirmed for never working with someone else's code before. You know what your code does because it's so familiar to you, regardless of its readability. Even if you take all measures to ensure it's as readable as possible, working through another's code is not as nearly as easy as reading plain English. Moreover, comments will allow an editor to quickly move through your code (without reading all of it) straight to the parts he does need to read.
Any company you pull that "Comments are bad practice" charade on will instantly show you the door. This includes both the good companies and the bad companies. I doesn't matter if you hate it anon; if you want a programming job and you're not doing your own start-up, you better learn to comment.
>>
>>58635264
>working through another's code is not as nearly as easy as reading plain English.
If another's code is well written then it should even be more easier to read than english. The code itself is a language the programmer learn to read and write.
It's like math, you don't put comments in the middle of a math demonstration because math it's is own language.
>>
>>58635481
>ike math, you don't put comments in the middle of a math demonstration because math it's is own language.
Also confirmed for never doing math. Have you ever read a math paper before, or even a math textbook? It is adorned with guiding hands in the form of English comments. And yes, they come mid-proof.
>>
>>58635523
>Have you ever read a math paper before, or even a math textbook?
Have you ever read a programming book before ? There's more english than code.
>>
>>58635481
I don't know but when i'm working on something i'd take a concise explanation in a comment rather than waste time reading what the code do.
>>
>>58635639
If you think reading the code you'll be working with is a waste of time i don't know what i can say to you.
>>
>>58635801
Anon, his whole point was he needed to FIND the code he'd be working with, and he can't do that easily without comments.
>>
# >2011
# >needing more than one line to comment
# ISHYGDDT
>>
// for everything, multi-lines comments are so annoying to type.
Thread posts: 39
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.