Finding the first null character in a file got downvoted a lot. Why?

| |

The question itself

The way the question was asked was rather strange:

  • You knew exactly some of the drawbacks your current solution has, but instead of implementing a solution, you asked for one. While it's fine to mention one or two concerns, it's important to keep the focus on your code. By raising so many concerns, you essentially asked a StackOverflow question ("How do I find the first null character in a FILE*?").
  • Apparently there was some error handling in if(!Buffer), but it was omitted. That's usually a sign that the code does a lot more and the relevant parts were extracted, which leaves us with Frankenstein's code, e.g. code that's a scrapped from a real project. Code like this is very hard to reason about.
  • The function's name MyFunc was a clear sign of getting in line of the word of CR's rule's, but not their spirit.
  • The file format for the file that contains '\0' wasn't clear clear and thus it was hard to reason whether the code is actually correct.

Overall, the post was lacking the quality I expect from a CodeReview question. That's why I downvoted. However, I retracted my downvote after my concerns mentioned above where alleviated by the latest edits.

The "rant"

Aside from the question itself, however, people will read your profile and post's revision history: they read your profile to check your other posts for similar questions and thus hints to improve the question; they will read the revision history of the specific post for even more hints and how the current state came into being.

In both, you unfortunately rant about your negative experience in a community; a community that includes you. And while downvotes should only get used for bad content, people that feel attacked might just use it as a reprimand, given that downvotes are anonymous and don't need any explanation.

You have one chance for a first impression, and your current one isn't optimal. I'm not going to quote any content here, however, as you might want to change it into something more diplomatic.

| |

You must log in to answer this question.