4

The question is how to capitalize the first letter of each word using loops in java? It's a Hot Network Question with 518 views and a score of +9/-1. Not a single close vote has been cast. The question consists of:

Hello please help me I am a student and it's my first time to learn java and I don't know whats wrong with my code, when I run this code the output be like

Followed by code. I think it should be downvoted because it doesn't show any research. It should also be closed as "Too Broad" because there is no clear problem statement and all of the answers vary greatly, most of which don't sample the original code. Another close reason states "must include the desired behavior, a specific problem or error" and "questions without a clear problem statement are not useful to other readers", which probably means the question should be downvoted.

You can remove the sentence and the question would essentially be a question title and code. Are questions which just consist of a title and code allowed? I thought at least some effort was required on this site.

3
  • 2
    There are 6 answers - that likely accounts for more than half of the upvotes (from answerers so user has enough rep to upvote their answer).
    – James
    Mar 19, 2015 at 15:11
  • 4
    The current state of the question is fine. It ain't a great one, it lacks research as this is a commonly asked problem (in various different ways) but it doesn't deserve being closed, unless a good duplicate can be found. Mar 19, 2015 at 15:26
  • 5
    More evidence that the Universe is running out of newbies. Even though he can't program himself out of a paper bag, he's doing everything right asking the question and there is no close reason left to stop SO users from posting answers. All you can do is not like it. Mar 19, 2015 at 17:03

4 Answers 4

22

I think it should be downvoted

Then downvote it

It should also be closed

Then cast a close flag on it for whichever reason you feel best fits

it doesn't show any research

Maybe they haven't said exactly what posts they have looked at to try but they do show effort

there is no clear problem statement

Sure there is. The user wants to capitalize the first letter of each word then shows the output received which isn't what the user wants.

It may seem like a trivial problem for some but the post itself looks strides better than most I see on a daily basis.

You could edit it if you think you can make it better (which was just done by Deduplicator). You also could, as stated above, downvote, flag, comment, or walk away. But I'm not sure what you expect from a meta post.

What I would be more bothered by here

is the highly upvoted code only answer from a high rep user. No explanation (granted, there are a couple short comments in the code) tsk tsk

13
  • There was no problem statement 3 minutes ago when the meta question was asked. Someone else edited in what they think the problems is; the OP never stated his problem statement.
    – Servy
    Mar 19, 2015 at 15:12
  • 4
    @Servy it's in the question title. Unless, that doesn't count.
    – Kevin B
    Mar 19, 2015 at 15:13
  • 3
    1) I need 125 reputation to downvote. 2) What's the point in flagging to close if over 512 people have seen the question and nobody closed to vote? 3) What else can I add to the question? There's just a title and code, I can't put words into the author's mouth. 4) I wanted to know why a question like this is highly upvoted. Mar 19, 2015 at 15:15
  • @servy I think the question title and the output (which were both in the original version, though output was poorly formatted) serve as a problem statement.
    – codeMagic
    Mar 19, 2015 at 15:16
  • 1
    I would have definitely downvoted the question due to lack of explanation, but not close. 8 upvotes does seem a bit excessive for code asking how to do x where x is something you wouldn't want to do in a real program, but... to each his own.
    – Kevin B
    Mar 19, 2015 at 15:17
  • 5
    @codeMagic <code block> plz fix it is not a problem statement. Trying to guess what the code should do, and how, specifically, it's not working, does not a good question make. It causes all sorts of problems. I admit I didn't notice the question title; I expect the problem statement in the query body.
    – Servy
    Mar 19, 2015 at 15:18
  • @user4689757 1) wasn't thinking about the rep issue 2) The point is maybe others will agree with you in the queue and, if not, you have still done what you could 3) maybe nothing but it's always an option. But there is also output so not just title and code. Output means a lot. 4) That is highly opinion based. Others disagreed
    – codeMagic
    Mar 19, 2015 at 15:18
  • 2
    @user4689757 I've flagged to close questions that tens of thousands of people have seen... and had them closed. Until you have sufficient rep, you can't see current close votes. There are vastly fewer people who have close vote privledges than visitors to stack overflow. As to putting words in the asker's mouth - it can be done (easier when its closed) - see What is needed to really fix a question (an Atwood transform) (though that's guideance from another meta).
    – user289086
    Mar 19, 2015 at 15:20
  • 1
    @Servy you are correct but it isn't just <code block> plz fix. It is: code block, output, desired output (in title). I agree there could be much more explanation and diving into some preliminary debugging but it isn't that bad from a user who just joined today and asked his first question.
    – codeMagic
    Mar 19, 2015 at 15:25
  • He wants to know why his loop isn't capitalizing the first letter of each word, there's a clear attempt, and the resulting output is there. Not sure what we want from a new user. Sure it could be better but certainly not terrible. Let's give a new user the support they need to make it better instead of just downvoting and closing a clear, attempted issue.
    – codeMagic
    Mar 19, 2015 at 15:28
  • @codeMagic Agreed with you there, but I thought the point of closure was to prevent bad answers. The answers could be better if the question was better, otherwise they don't learn anything. Mar 19, 2015 at 15:29
  • That is true but if the answers are bad then downvote them. The user isn't simply asking "Gimme teh codez. plz. k thx bye". The user is asking, "How can I make the code I have work correctly. This is what I want, this is what I get, and this is what I have tried." You have enough rep to comment so if you think it could use something more, just ask for it.
    – codeMagic
    Mar 19, 2015 at 15:32
  • 2
    though it doesn't show research, I don't expect much research from a beginner, most beginners are just confused, especially the first time they program, maybe the op happened to be one of them, not just someone new to java but to programming as whole
    – niceman
    Mar 19, 2015 at 15:40
3

well the problem is in the title, it is clear unless it should be in the question, in that case it isn't.

The desired behaviour is also included in the title and the wrong output is included in the question.

The reason it would deserve a downvote is research, enough searching should solve the problem because I think the problem is well known, though from the code I see, it is apparent that the OP isn't good at java and may have tried many things counting on himself.

But I don't see it as very bad, it may not deserve those upvotes but -1 score is maybe what it deserves.

You must always remember that being trivial isn't a reason for a downvote because life surprises you how complicated a trivial thing turns out to be even if you're experienced.

3

I voted this question up before this meta question was asked. I originally looked at the question and thought the same: 'this question is so basic it clearly shows no effort!' But then I read through it and realized that the user had in fact shown their attempt and wasn't just saying gimmethecodez. This is miles better than the usual 'here is my massive wall of text, fix it.' with no actual problem statement or comprehension of coding.

So for that, I decided it was worth an upvote. 9 upvotes and a hot question listing? Probably not, but that wasn't my choice.

0

You are correct. It is a bad question. It does not state what the actual problem is in the question body and does not show any attempt to fix or research the problem. Unfortunately, due to the large amount of questions that could be closed, that question must have just been able to slip through. It perfectly fits this close reason in my opinion:

Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.

[emphasis mine]

The question does have the problem in the title, but it should really be in the question itself as well.

Also, a large issue with the question is that nobody would have any idea what the exact issue with the output was unless they examined the code. At first glance, the question appears to be saying that the entire top portion is the output. Actually, the first line is the prompt, the second line is the input, and the third line is the output. Although this may be able to be resolved by paying careful attention to exactly what the code is doing, the problem statement definitely starts to become murky at this point.

Not the answer you're looking for? Browse other questions tagged .