-23

I am a new Stack Overflow user, but I have been a lurker for a while. Occasionally I get stuck on things and often look on this site for solutions. I recently posted a problem with some code that I am stuck on and ran into two things that are common in forums and sites like this.

  • The question got closed because it wasn't meeting exact criteria for the format and information that Stack Overflow wants. Yet none of those criteria were stipulated in the original ask a question window. If you want people to include certain information in a certain way, then don't provide a text box and say "ask a question" with no direction.

  • I got snippy "it works for me, you're doing something wrong" answers. I am an experienced developer and that makes me want to go somewhere else rather than try to contribute more. I can't imagine how a new programmer still in college is going to experience it.

I have seen what Stack Overflow can be and want to contribute but I don't want to deal with the drama when people are just trying to ask questions. I have enough stress in my life and don't need that.

9
  • 14
    I mean, there's a snippet proving the code works...... What else do you want someone who isn't you to do? If I look at your code and run it, it runs. It's kinda hard to troubleshoot it when, on my end, it runs fine... no? Yes it's frustrating when you're stuck with the issue.... but if I'm trying to fix an issue I can't reproduce, it's.... pretty much impossible? For me the way to fix your code is to... run your code exactly as is.... won't be helpful to you :/
    – Patrice
    Jan 6, 2020 at 18:04
  • 9
    Let me leave this link first: meta.stackoverflow.com/questions/252149/… and to your first bullet I have to ask if you saw the guidance at the right hand side: i.stack.imgur.com/SqIZz.png . If not please tell us where it should have been so you would have noticed it.
    – rene
    Jan 6, 2020 at 18:11
  • 1
    As for your first point, there actually is a Ask Question Wizard. I don't know why it's not showing you the guided mode; you're under the threshold. This may be a bug.
    – BSMP
    Jan 6, 2020 at 18:17
  • @patrice I'm all for the OP doing the leg work on solving the problem. That isn't the issue. The issue also isn't the posted code. We figured that out. Instead what would be helpful is troubleshooting questions. What version of PHP are you running? Are you using a code framework like Laravel or CodeIgniter? Have you looked at what xdebug is giving you for before and after values? Jan 6, 2020 at 18:48
  • 9
    @objecttothis ok... the issue isn't the posted code. Then what do we have left to troubleshoot? "I have code that doesn't do what I want it to do". Not possible to fix this for a coder, without any more details :/. As for the troubleshooting questions: you're correct, they are helpful. But as an experienced developer, it's likely stuff you can include when you open your question as well, no?
    – Patrice
    Jan 6, 2020 at 18:51
  • 1
    but some of that guidance is in the tag wiki: stackoverflow.com/tags/php/info
    – rene
    Jan 6, 2020 at 18:53
  • 9
    Basically the problem I see is that you seem to expect this to work like a help desk. "I have a problem" -> "what about this?" -> "nope" -> "ok... what about this?" -> "still no" -> "ok, lemme engage level 2". On stack, it's more of a "here's everything anyone would need to reproduce this. Can you look at it?" We aim to be a long term repository of knowledge. If every user asking a question needs to have a bunch of back and forth to get their answer, we failed at our goal...
    – Patrice
    Jan 6, 2020 at 18:55
  • @BSMP I didn't not see an ask a question wizard. This would be helpful. I understand the responsibility is mine to ask questions in the format that is expected with the information needed, so a wizard would help to reduce everyone's frustration level. Jan 6, 2020 at 18:56
  • 4
    @objecttothis re: this comment, it sounds like you had the reasonable idea that there's some helpful information which could result in getting a solution. Why not add that information to the question? Instead, your comment of "all I'm doing is X" would indicate to readers questioning "is he running CI? Is it a version issue?" that the answer is "no" when in fact it is "yes".
    – TylerH
    Jan 6, 2020 at 19:03

3 Answers 3

20

The "it works for me" comment seems to be related to this question.

It's impossible for anyone to give help with that question, as stated. Since the code does not exhibit that behaviour, something else must be causing it.

You mention in passing that the error is present during CI, so it could be environment related. And yet you mention nothing about the environment where the code runs.

You are an experienced developer. If a junior developer came to you with this a question informed this way, you would be frustrated as well. You'd be telling them that the code works as shown, and that that there must be something else wrong in their end. Either the data does not match what they were showing you, or an important setup detail was missing.

The same goes here. It's not about "correcting" the site's culture, but adjusting expectations when asking for help. Experts are not clairvoyants, and can't debug a problem without adequate information.

At most, we could tell you that it is more likely that the log message is being truncated when rendered that there is an actual regex issue (the preg_replace() call obviously works as expected). But that's just guesswork and not really an answer.

5
  • I found the solution to the original question (stackoverflow.com/questions/59613914/…) and I edited it with updated explanation. I would like to learn from my mistakes here, so can someone point out anything related to the formatting of that question, code display, practices, etc for future stackoverflow posts to avoid this kind of experience for everyone? I'm not so much asking input on the code itself since it can be easily deduced not to assume anything about casting. Lesson learned (hopefully). I'm more talking about the question. Jan 7, 2020 at 9:41
  • Sorry, I mean the question as it is now. People have already given a lot of input on the original wording and format of the question. Jan 7, 2020 at 9:45
  • 3
    @objecttothis That's great! But you do realize it was impossible for anyone to guess that from the code as presented, right? That's why is so important to properly inform a question. Not only will help experts give you good answers, but many times it will lead the asker to fix the problem on their own. The lesson to the future is that question should include as much information as possible to be answerable. You need to imagine what follow up questions experts will have, and try to anticipate that in your post.
    – yivi
    Jan 7, 2020 at 9:46
  • yes, I get it. I posted just the snippet because 1) I assumed that my input value in preg_replace was a specific value (it wasn't because I casted it and php truncated it) and 2) The instructions on the "Ask a Question" page were to include just enough code to show the problem. Believe it or not, I thought I was making the problem easier to see rather than more difficult. Jan 7, 2020 at 11:10
  • 6
    @objecttothis Including enough code to show the problem also implies that you check on your side whether that piece of code still shows the problem. Jan 7, 2020 at 12:00
19

You talking about this question?

Unless there are some deleted comments I'm not capable of seeing, the comments have been pleasant in regards to your question.

enter image description here

Basically - people can't reproduce your issue, so the question was closed.

If you're convinced that it's happening with the code you've presented, then offer more data for others to test. I'm a bit too allergic to PHP to validate those claims in the comments for myself, but since they're the experts we lean on in situations like this, be sure that the code you're asking exhibits the behavior you're asking about.

If there were comments there that have since been deleted, then that means the system is doing its job and has removed inflammatory remarks. It's safe to disregard those.

8
  • 4
    It's pretty bad when you run it in a sandbox and it gives the expected results right off the bat
    – Machavity Mod
    Jan 6, 2020 at 19:00
  • 1
    I think I posted some lovely PHP in SO CVR once, hope that is not the cause of your allergic reaction :=/
    – halfer
    Jan 6, 2020 at 19:34
  • 5
    @halfer: My affliction started before Stack Overflow was ever a thing, but you using "lovely" and "PHP" in the same sentence seems to have caused me to break out again. ;)
    – Makoto
    Jan 6, 2020 at 19:56
  • @Makoto here, have some e l e P g H a P n t code :=)
    – halfer
    Jan 6, 2020 at 20:18
  • 2
    No moderator-deleted comments there. Or anything rude at all. Of course, now the whole darn question is deleted, which makes it awfully hard to have a Meta discussion about it... Jan 6, 2020 at 20:38
  • 1
    @CodyGray: It seems that you're uniquely positioned to, uh, "fix" that aspect...
    – Makoto
    Jan 6, 2020 at 20:39
  • 5
    Oh, I thought this diamond was just for looks. Jan 6, 2020 at 21:01
  • 6
    When I commented on the question, the code did not even have the log_message() function call in it. It was a simple 2 lines of vanilla PHP that gave absolutely no indication that CI was even involved. This is a perfect example of a question asked in haste that does not impart enough information to someone attempting to assist
    – RiggsFolly
    Jan 7, 2020 at 0:01
2

On a more general note:

The question got closed because it wasn't meeting exact criteria for the format and information that Stack Overflow wants. Yet none of those criteria were stipulated in the original ask a question window. If you want people to include certain information in a certain way, then don't provide a text box and say "ask a question" with no direction.

But that is the case. Have a look at the right panel next to the "ask a question" area under "more helpful links" you have all the information about how to ask a good question and additionally there is some explicit guidance on the right side above the links (like "Avoid asking opinion-based questions.")

If that was not enough, what would you be missing or how could that be improved? Feel free and welcome to make more specific proposals for improvement there. How can askers be made even more aware of it?

I got snippy "it works for me, you're doing something wrong" answers. I am an experienced developer and that makes me want to go somewhere else rather than try to contribute more.

We are all humans and make mistakes. Sometimes, someone will get snippy and there will be a certain amount of snippiness everywhere all the time. Where do you want to go to avoid that? Again of course there might be still room left to avoid that. If there are any specific proposal for how to reduce it, I would be very keen on seeing them. In the meantime I would just ignore it or point it out. Downvoting unhelpful content as well as flagging unfriendly comments for moderator attention are additional measures.

For example a "Believe me, it doesn't work for me and doesn't help me solving my problem either." comment should do the trick in the above case.

I have seen what Stack Overflow can be and want to contribute but I don't want to deal with the drama when people are just trying to ask questions. I have enough stress in my life and don't need that.

If you know that Stack Overflow can be very useful but had personally a bad experience, it means that you had just bad luck. I'm sorry for that and of course it's your decision to contribute or not to contribute. If you have proposals for how to improve the system further, don't hesitate to post them. I think that may end up in a productive outcome.

You must log in to answer this question.

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