Two of my questions were down-voted as -3 and -4. I couldn't understand the problem with them. But if at-least 3 people are down-voting something is bad with them. Nobody commented or answered or closed. I have no idea.

Can anyone experienced enough tell me why my questions are bad, if or what could be the reason for down-voting could be? In this way both of us benefit. I will know which question and what type of not to put up and you will not see such questions and maybe that'll improve the standards of the society.


5 Answers 5


I wasn't one of the downvoters, so I can only speculate.

However, it is site policy to include textual summaries of programming challenges. This policy was actually instated when Project Euler went offline for some time. So, the first thing you can do is include descriptions of the problem that you're trying to solve.

The next thing you could do is take some time to call out any concerns you have about your code. Were there any areas where you did the best you could, but weren't quite happy with your code? Mention them.

Lastly, on your Problem #68 question, you say

I know I name variables badly, but I'm a little lazy since I solve alone, you can however point this out too

That's a bit problematic from our point of view. It means that the code isn't your best effort. Good questions here have already put forth their best effort and yet, still fall short from your point of view. The answer "It's not as bad as you think. Looks good, ship it." should always be a possible answer to a question here. Obviously, if you know that your names need improvement, then that answer isn't possible and your code isn't ready for review.

It's also nice when titles say what the code does. Now, I realize this is sometimes difficult with programming challenges, but you can get creative.

For further reading on the topic, I recommend this meta.

How to get the best value out of Code Review - Asking Questions

  • 8
    \$\begingroup\$ I don't always answer meta questions, but when I do, I would like to answer as well as this. ;-) \$\endgroup\$
    – rolfl
    Jun 5, 2015 at 18:12

The question about Project Euler 21 had:

  • An uninformative title: See How to Ask for good and bad examples (fixed)
  • Irrelevant spoiler: We don't care what the answer is as long as it's correct (fixed)
  • Tone: "I need to bring it under 0.5 secs seriously" doesn't sound very polite or professional (fixed)
  • Hidden code: If the entire program is posted, ready to run (including imports, main(), and everything), it's much easier to review. You've omitted key parts such as sieve() and isPrime(), which may be relevant to your performance problem. Even if we assume that their implementations are good, why make reviewers reimplement those bits before they can run your code?

The question about Project Euler 68 had:

  • An uninformative title
  • No problem description, and a link to the wrong problem description!
  • Hidden code: What is getNextPermDistinct(x)?
  • \$\begingroup\$ I actually kind of appreciated that OP used a spoiler tag for the answer. \$\endgroup\$
    – RubberDuck
    Jun 5, 2015 at 21:09

There might be a number of reasons for this:

  • Probably the biggest one: the problem statement isn't embedded into the question. This is useful in case the Project Euler site is down while someone is trying to look up the problem.
  • The title only states the problem number and not the problem name (you can't expect anyone to memorize the Project Euler problems).
  • Probably just me: you really don't need "code" or "here's my code" in large print. You actually don't need it at all; we know your code is already there.

Beyond that, it may also be due to the number of these questions posted in a short period of time. There's nothing wrong with posting several questions like this in general, but if they're all not so appealing in the first place, then it may start annoying others thus attract downvotes.


This is not very important, but it would improve the quality of your question:

Provide a short plain-English description about how you have approached the solution.

And always remember that you can edit your question to improve it!


Your latest question has a complex title. Make it catchy so people stick around longer. This also improves your chance on receiving answers.

Project Euler #70: Numbers with φ(n) as a permutation of n and n/φ(n) is a minimum

The question starts with the following (emphasis mine):

The problem was to find which phi(n) is a permutation of n and n/phi(n) is minimum, as we all know that means:

If I'd have survived the title, this would make me leave your question. Do you want a code review or do you want to teach people about mathematics? You're in the right place for the former, not for the latter.

Later on, you state:

  • The prime factors should be as large as possible (if \$a < b\$ then \$\dfrac{a-1}a < \dfrac{(b-1)}b\$ and \$\dfrac{n}{\varphi(n)} = \dfrac{1}{\prod_{p|n}\left(1-\frac1p\right)}\$. Or in other words, the number should be as large as possible.

I've had enough math during my studies to follow this, but I think you're missing the point of providing context. The above boils down to the last sentence:

The number should be as large as possible.

Again, you're here for a code review. Keep it clear, keep it simple. Providing context is good, but we're only interested in the plain English variant.

  • \$\begingroup\$ updated the question \$\endgroup\$
    – RE60K
    Jun 6, 2015 at 8:27
  • \$\begingroup\$ Additionally: I don't expect everyone here to actually know what that means. \$\endgroup\$ Jun 7, 2015 at 20:12

You must log in to answer this question.

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