[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]

Is that a good Java comment?

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: 15
Thread images: 3

File: Screenshot_20170915_205646.png (14KB, 974x147px) Image search: [Google]
Screenshot_20170915_205646.png
14KB, 974x147px
Is that a good Java comment?
>>
>>62447824
short, descriptive and variables are explained.
It is fine.
Why do you ask?
>>
>>62447824
you think he said 'playlist' too many times?
>>
>>62447854

I'm doing YouTube playlist manager that will use youtube-dl and work on Wangblows/Lincuck/Applel Mac OS and I'm starting to get a little bit lost in my code and I don't know if my comments are readable for other humans.

>>62447877
You think so? Well that code resolves around playlists so its hard for me to avoid but I will keep that in mind.
>>
File: Screenshot_20170915_211013.png (104KB, 815x775px) Image search: [Google]
Screenshot_20170915_211013.png
104KB, 815x775px
>>62447979

Umm, comment is oversimplifyng it. It actually uses GSON and Retrofit inside of it and is threaded.
>>
>>62448038
>comment is oversimplifyng it.

there's your problem.

the comment tells you so little about the function why would it need to be there?
>>
>>62448070
I prefer to comment what I'm doing step by step.

>the comment tells you so little about the function why would it need to be there?

Mostly for javadoc desu.
>>
>>62448111
>I prefer to comment what I'm doing step by step.

This is a sign you have to refactor that mess into separate functions and document them individually.

>Mostly for javadoc desk.

A javadoc made out of comments like that? If I were to read that javadoc like a manual what would I learn?
>>
>>62447824
I think the summary is a bit hazy.

>Creates Playlist object from link by calling API

So you give it a single link that is what? A video url? Or a playlist url?

>And adds that playlist
Which playlist? The video url playlist, or the playlist object that you just made?

>to playlists object
I guess this is some global object.
>>
You described its internals, but you should describe what it returns or what side effect it produces.
>>
>>62448574
not him, but could you give example plox
>>
>>62448609
If you have a method called 'getUser', describe what kind of user it returns. Is it the current user? Is it the last active user? Who knows...
Describe the destination is the user for a method called 'writeUser'. Is it written to file, to a database or send over the net?
>>
>>62448774
Should say: describe the destination of the user for a method...
>>
File: p_koharu9_st1_02_018.jpg (466KB, 1920x1279px) Image search: [Google]
p_koharu9_st1_02_018.jpg
466KB, 1920x1279px
>>62448774
is this containing side effects already? thanks nevertheless
>>
>>62447824
If I could make it out on the first read and out of context it's good enough.
Thread posts: 15
Thread images: 3


[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.