In order to avoid further cluttering of the question's comment section, I will elaborate here on my stance. At the same time I would like to invite the user in question and the community to provide their thoughts as well.
2 days ago this question was asked. As you can see from the revision history the code was cluttered with so many comments that half of all lines were just comments. I removed all the comments while also fixing the remaining issues.
In the comments I left a note that all these comments weren't necessary. He disagreed with me on that point after which I left a final comment referring to Meta if he wishes to discuss it (paraphrasing, refer to the original question for exact words).
Today a new question was posted and by the style of the comments I immediatly recognized it as the same user. I already fixed the question once and left feedback; I wasn't going to fix it again. For this reason I simply left a comment asking to remove the unnecessary code and comments while referring to the "describe the specific problem" guideline.
He disagreed with this again so in order to avoid further escalation I decided to talk this out on Meta instead.
I believe the comments and non-relevant code (including getters) should be removed. These comments don't provide any extra information at all; here are a few examples:
- getter method to return the boolean value of the variable
- constructor for ojbects of type CO2FromWaste
- main method
- 15 lines describing the purpose of a class, the private variables, etc
Every two lines of code has one line of comments, that's just needless clutter. It doesn't help the question, it just makes it hard to read.
My issues with these comments is that it is hard to find the problematic code. You're essentially forcing us to comb through a bunch of lines for no reason, you could just as well take them out.
Your main issue is that you think it takes too much work. I removed the comments in your first question in just a few minutes, how hard can it be?
Concerning the getters: are they really necessary? They have no functionality, all they do is return the field that's on top. You're not providing the source code for an
ArrayList either, why would you add that from a simple getter? Once again several lines of code that can be condensed to an actually relevant comment:
// Appropriate getters.
Unclear problem description
Further along the line of the off-topic rule, there is this quote from a comment:
"your code sample should describe the specific problem." it does--very specifically, I have given the error message--when ran, it returns this error.
I have looked through the entire post and tried to unravel what it is you're saying but nowhere could I find an error message.
Granted, I didn't specify this in my initial comment. The only reason I'm bringing this up is because you did.
I tried to find out what the problem was but all I got was that you thought it was something to do with boolean statements.
What boolean statements?
What made you think this?
You say something about receiving 0 values before you added boolean statements, but you're not specifying what your current result this.
You also said all your methods are just returning 0 without specifying what methods and what you expect them to do instead.
Last but not least there's your opening sentence:
I have an issue taking the values which I've set in the ArrayList of objects I've created, and printing their values
- What issue?
- What list?
This is an extremely unclear question with a lot of (irrelevant) code.
I hope this isn't too late yet but I wanted to state that I don't have a personal vendetta against you, as you seem to assume. I'm acting from what I belief to pure intentions to improve the quality of the site where I can. However if I fix someone's question once, I expect notes to be taken for improvement in future questions, otherwise it's just an uphill battle.
I'm not claiming to be universally right so I might very well be wrong, which is why I'm bringing it up here.
Maybe a flag for mod attention might have been appropriate but since this would only provide me with very limited feedback in the case I was wrong, I decided to opt for a Meta post instead.
I'd like to see opinions on the - in my eyes - overdose of comments and clutter code and - possibly - how I should approach this differently in the future.