9
\$\begingroup\$

I've written a program that works most of the time. But occasionally it would crash due to a segfault, so I wonder whether it is proper to post such a snippet of code.

Most programs contain bugs; some are big while others are small. Mine contains a little bug that I cannot find. Is it proper to post that for review?

\$\endgroup\$
12
\$\begingroup\$

Bugs can be big, bugs can be small, it is still a bug. Unfortunately, this is off-topic.

Code Review is not for helping you find and fix bugs in your code. Code Review is about making your code do the same thing in a better way.

\$\endgroup\$
5
\$\begingroup\$

Funnily enough, if it's not obvious and you pretend you don't know about it, it'll most probably get reviewed and you may get advice on fixing it.

But, now it's too late as we all know Alex's code has a bug. :D


Seriously, this is something I hate about CR: You can gain advantage by being dishonest.
But this is just a consequence of this whole site pretending it's multiple sites. Whenever your problem is a bordercase (like too much code making it non-fit for SO and a bug making it non-fit for CR), you're lost.

\$\endgroup\$
  • 2
    \$\begingroup\$ No code is perfect; that's the point of review. It depends on what kind of answers you expect. If you really want to get the segfault fixed, ask about that specific issue on Stack Overflow. If you disingenuously post it to Code Review anyway and keep the known segfault a secret, the bug might get picked up in a review, and the reviewer might suggest a solution, but there is no guarantee that you'll get the segfault fixed. \$\endgroup\$ – 200_success Jun 22 '15 at 22:40
  • \$\begingroup\$ I know... I was new to code review so I wonder a little bit. But I would never post any snippet with bugs on code review. I respect and love this community.........And if I have ever tried to post any code with bug on codereview then I wouldn't have post this post on meta codereview. \$\endgroup\$ – Alex Jun 23 '15 at 12:26

You must log in to answer this question.

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