2

I got two down votes and four votes to close in like 3 minutes, and I don't know why. I have deleted the post already, but I asked whether this code was acceptable and needed anything to be added to it.

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>...</title>
    <meta name=”description” content=”...”>
    <meta name="author" content="...">
    <link rel="stylesheet/less" type="text/css" href="..." />
    <script src="..."></script>
</head>
<body>
...
</body>
</html>

What I meant to ask, I guess, was if you were going to tell newbies how to structure the code of an html page, would you include anything more or less than what I have coded above.

5
  • 2
    If that was your full question then I could imagine it being closed as either "not a real question" or "not constructive". Was that all you asked?
    – Bart
    Commented Feb 26, 2013 at 19:03
  • 7
    I suspect it was because your question did not contain any problem to be solved. To paraphrase someone else's answer that I read earlier today: I read your question on to be "I'm looking for consulting regarding my code". That is a perfectly valid thing to want, but it is not a good fit for SO's question and answer format.
    – Rachel
    Commented Feb 26, 2013 at 19:05
  • Oddly enough, I'd posted an answer to the last part of your question (which you've not included here) shortly before you deleted it. Commented Feb 26, 2013 at 19:08
  • 2
    http://codereview.stackexchange.com/ Commented Feb 26, 2013 at 19:09
  • @BoltClock's a Unicorn yes, thank you, I got your response. I just figured I'd delete it because nobody seemed to like it being there.
    – dezman
    Commented Feb 26, 2013 at 19:10

3 Answers 3

6

OK, so you asked:


Is this code acceptable and is there anything that needs to be added to it?

If you were going to tell newbies how to structure the code of an html page, would you include anything more or less than what I have coded below?

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>...</title>
    <meta name=”description” content=”...”>
    <meta name="author" content="...">
    <link rel="stylesheet/less" type="text/css" href="..." />
    <script src="..."></script>
</head>
<body>
...
</body>
</html>

It's just an empty HTML page. There's nothing to "improve" or "review" because it doesn't do anything. Your question makes no sense. This has nothing to do with if it's OK to ask "Is X better than Y?" or "What is the best way to accomplish X?".

It's like saying:

How could I improve this PHP project?

<?php
include 'lib/Application.php';
Application::run();

It's not a real question.

3
  • must... resist... php jokes...
    – AakashM
    Commented Feb 26, 2013 at 20:23
  • @AakashM I refactored it please tell me what you think: <?php include 'app.php';
    – user159834
    Commented Feb 26, 2013 at 20:26
  • @WesleyMurch: <?php require 'magic.php'; Magic::doApp(); ?> << OOP example. Commented Feb 26, 2013 at 22:20
5

Probably because asking "is this acceptable?" is not a real question, or constructive for our site. Questions on Stack Overflow need to have a real, defined problem. We're not a feedback site. So unless you have a problem with something in your code not working (at all or in the manner you expected), your question probably isn't acceptable here.

Do you have any reason to believe that the code you provided is not acceptable? If you're just wondering if it's valid HTML, try the HTML Validator.

11
  • There are many questions on SO regarding 'the best way' to do something, and I think is is an important concern for a lot of people, where should these types of questions be asked?
    – dezman
    Commented Feb 26, 2013 at 19:05
  • 2
    @watson Your question doesn't even ask what "the best way to do something" is. I have no clue what you're asking. (and by the way, most of those similar questions should also be closed, but some are better than others)
    – user159834
    Commented Feb 26, 2013 at 19:06
  • 1
    @watson There is a difference from saying something like "What is the most efficient way to accomplish X" and "Please review my code and tell me how to improve it". The first has a clearly defined goal and parameters, while the 2nd does not.
    – Rachel
    Commented Feb 26, 2013 at 19:07
  • Fine, but the question still stands, where should I ask questions regarding the best way to do something.
    – dezman
    Commented Feb 26, 2013 at 19:09
  • 1
    @watson Probably nowhere, you still haven't clarified what the question actually is.
    – user159834
    Commented Feb 26, 2013 at 19:10
  • 1
    @watson On some site other than the SE network. Your question, as it stands, really isn't appropriate on any site.
    – Servy
    Commented Feb 26, 2013 at 19:10
  • 2
    @watson: You have to tell us what "best" means, first. Does it mean fastest performing? Does it mean least amount of code? Does it mean what some Architecture Astronaut considers the best way to do it? Even if you tell us what "best" means, it still amounts to opinion, and we're looking for answers, not opinions.
    – user102937
    Commented Feb 26, 2013 at 19:11
  • @watson - "where should I ask questions regarding the best way to do something?" Nowhere within the Stack Exchange network of sites.
    – user164207
    Commented Feb 26, 2013 at 19:31
  • 3
    @watson: Speaking the truth is not being a dick; it's providing information. SE gets accused of being rude all the time for enforcing their own rules, but that doesn't mean they're actually being rude; it means you decided to be offended.
    – user102937
    Commented Feb 26, 2013 at 19:37
  • 2
    @Jack Maney Okay, I'm sorry, I'm being ridiculous.
    – dezman
    Commented Feb 26, 2013 at 19:46
  • 1
    @Robert Harvey Okay, I'm sorry, I'm being ridiculous.
    – dezman
    Commented Feb 26, 2013 at 19:47
2

Asking "is this acceptable ?" or "what can be done to make it better?" is off topic for StackOverflow. SO is about problems with code, not working code.

Your question could have been on topic for Code Review which is about reviewing stuff that works. (As stated in the comments) You have to have a specific things to improve to post there, but depending on your question, it could apply there.

The question may have gotten downvoted not because it was a bad question or badly formatted, but because you did not post it at the right place.

6
  • 3
    I'm not sure how great of a question this would be for Code Review. I don't think they let you just post code and say "improve it" - You still need details on what you're trying to do and what, specifically, you were thinking needed improvement.
    – animuson StaffMod
    Commented Feb 26, 2013 at 19:09
  • 1
    "Is this perfect?" won't fly on Code Review either, just sayin'. Commented Feb 26, 2013 at 19:09
  • It's just code for a blank HTML page. What is there to review?
    – user159834
    Commented Feb 26, 2013 at 19:11
  • From what he posted it seems that he removed stuff from his question. We would have to see the real question to judge. But depending on what was his questions there are more chances for it to be on topic on Code Review than on SO Commented Feb 26, 2013 at 19:13
  • @Hugo Dozois: The part he left out was a small part that wasn't all that relevant to the actual question. Commented Feb 26, 2013 at 19:26
  • @BoltClock'saUnicorn ah! Thanks for the information, I don't have 10K rep on SO, and thus don't access to deleted questions. I will still let my answer since generally questions of improvement or code styles are on topic for code review Commented Feb 26, 2013 at 19:36

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