4
\$\begingroup\$

Shortening code to create a JFrame

The user has working code (I assume), but they haven't even started writing the logic for their game. They've just instantiated Java's version of a main window/frame.

I feel like this is the same as me asking, "Please review my OS Kernel" and then all I give you is this:

int main (void)
{
    return 0 ;
}

For my answer, I did my best to explain possible next steps, but there's not really much to advise on.

I'm not advocating that code submitted for review must be complete, but I think there should be a decent amount of progress. Otherwise we can only give design tips that may be better off being posted on Programmers Stack Exchange.

\$\endgroup\$
5
  • 4
    \$\begingroup\$ Close it as "off topic". "Working code" means "solves someone's problem", not "it compiles". \$\endgroup\$ Commented Dec 17, 2013 at 21:48
  • \$\begingroup\$ @Jamal The title seems really condescending now! =( \$\endgroup\$
    – jliv902
    Commented Dec 17, 2013 at 21:51
  • \$\begingroup\$ @jliv902: Well, it sort of was from the start. You're free to make it less-condescending while still making your point. \$\endgroup\$
    – Jamal
    Commented Dec 17, 2013 at 21:54
  • \$\begingroup\$ Hmm, that's not even a very good start for a kernel. Who would it return to? :-) \$\endgroup\$
    – svick
    Commented Dec 18, 2013 at 1:05
  • \$\begingroup\$ @svick So then my custom Kernel code does need reviewing? =) \$\endgroup\$
    – jliv902
    Commented Dec 19, 2013 at 15:03

2 Answers 2

5
\$\begingroup\$

It's not quite as pointless as return 0 — there is some code to be reviewed, and I'd leave it open in case someone wants to review it. I'd rather not trigger any close-vs.-reopen wars. (Who knows, there might be a shortcut or a hidden bug worth mentioning.)

I've downvoted it, though, for being an uninteresting and poorly formulated question.

\$\endgroup\$
3
\$\begingroup\$

After thinking it over, here are my conclusions:

  1. There is, in fact, some code that can be reviewed.
  2. I believe the topic-creator posted the code in good faith. He was probably just wanting to make sure he was starting things correctly. His reasoning was probably along the lines of, "If I make a design mistake this early, it will cost me dearly later on."
  3. I think my real problem was that the code provided did not reflect what the topic title question was asking about. There is no way to improve a game that does not exist and has not been written. Now that the topic title has changed to a more accurate description of the problem, I have no qualms about the topic.
\$\endgroup\$

You must log in to answer this question.

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