36

I recently voted to close Error in appendchild as off-topic due to a simple typographical error (OP forgot <body> tags when they were trying to append to the body w/javascript). They even said they were going to delete the question. The flag was declined.

This leads me to wonder how "simple" a "simple typographical error" must be for it to be valid? Was my flag really incorrect? What's the "bar" here?

6
  • 1
    But the solution wasn't a missing element; it was that he couldn't put the script before it was defined.
    – animuson StaffMod
    Commented May 20, 2014 at 17:00
  • 2
    that still seems like a simple typographical error to me... is that wrong? Commented May 20, 2014 at 17:00
  • 10
    How is that at all a typographical error? It may be a pretty basic misunderstanding of how things work, but definitely not a typo.
    – animuson StaffMod
    Commented May 20, 2014 at 17:01
  • 3
    this is why I'm asking. I've seen a bunch of questions where people include libraries in the wrong order... is that a typo? I guess I want some clear examples where it's appropriate vs inappropriate. Commented May 20, 2014 at 17:02
  • 1
    A vote to close cannot be declined. Use the close reason however you see fit, there are few other ways to get rid of unless content. Commented May 21, 2014 at 21:37
  • 1
    Whether or not if the example cited is ideal or not, the general question here is a good one. (+1) Commented Jul 12, 2014 at 16:45

4 Answers 4

42

Example of a simple typographical error:

This code does not compile.

Another user posts this comment:

You left off a semicolon at the end of line six.

OP in comments:

Oh. Thanks.

Question to ask yourself: Will the post (and its answer) ever benefit anyone else, or is it so specific to the OP's situation that it will only benefit him?

If it's not a typo, the usual suspects apply. Downvote if poorly researched, close as duplicate if duplicate, etc.

13
  • 7
    so what about something like "you forgot to include jquery"? Commented May 20, 2014 at 17:11
  • 6
    I think that probably qualifies as "simple typo."
    – Robert Harvey Mod
    Commented May 20, 2014 at 17:12
  • ok, last example: you included your library that uses jquery before you included jquery (order was wrong). Technically not a typo, right? But I'd argue, asked and answered thousands of times and a simple mistake. What's the right thing to do? Commented May 20, 2014 at 17:15
  • 2
    Not a typo; that's essentially the same scenario that Animuson is describing. If you have to copy/paste the text to a different location that changes the semantics of the code, it's not a typo.
    – Robert Harvey Mod
    Commented May 20, 2014 at 17:16
  • 1
    so, all of those are valid questions? take no action? I feel like "put your code in the right place" is a pretty specific problem for that question. Commented May 20, 2014 at 17:18
  • 2
    I feel like Animuson's "If you misspelled something or left something out, you made a typo. Simply put, it's a mistake in typing." is clear enough. Leaving out a jQuery reference is a typo. Moving code from one place to another to correct an underlying assumption is not a typo.
    – Robert Harvey Mod
    Commented May 20, 2014 at 17:22
  • I'm agreeing, but now I want to know what the appropriate action is. Commented May 20, 2014 at 17:22
  • If it's a typo, close as typo. If it's not, don't.
    – Robert Harvey Mod
    Commented May 20, 2014 at 17:23
  • 1
    @penn downvote if poorly researched, unclear or not useful, flag/vote to close as duplicate if it is. Commented May 20, 2014 at 17:23
  • RobertHarvey, if you'd incorporate @jandvorak's comment into your answer, I'd accept it. Thanks. Commented May 20, 2014 at 17:25
  • 1
    @pennstatephil Technically not a typo, right? But I'd argue, asked and answered thousands of times and a simple mistake. Then mark as duplicate. Questions don't need to be exactly the same to mark as duplicate as long as they have the same answers. Commented May 21, 2014 at 15:06
  • 3
    Leaving out a jQuery reference is clearly a different animal than fat-fingering a button or not pressing it hard enough to register. bash.org/?5300
    – Zook
    Commented May 21, 2014 at 15:09
  • Imho this close-vote reason is subjective. Recently this question was downvoted(just as all answers), closed and eventually deleted because it contained a "typo". But in my opinion the question can be useful for future visitors since many users have a format-string that starts or ends with a space(either due to copy/paste, typo or programmatically). There are also no duplicates(probably because they were also deleted). Commented Oct 21, 2014 at 9:07
19

There's really no such thing as a "simple" typographical error - that's just poor sentence structure. It's meant to be read like "it was simply a typographical error" as in, that was it, nothing of value to see here.

A typo is a typo - there is no degree of typo. If you misspelled something or left something out, you made a typo. Simply put, it's a mistake in typing.

In this case, you were assuming that the solution was that they left out the body element. That would be considered a typo, if it was correct. The actual solution, though, was that they needed to move the script below the body element so that it is defined when it runs. That is not a typo. Nothing was misspelled. Nothing was missing. It's just a misunderstanding of some very basic rules of JavaScript.

4
  • Right. Not a typo.
    – Robert Harvey Mod
    Commented May 20, 2014 at 17:12
  • 8
    "it was simply a tyographical error"... I see what you've done there. :-)
    – Bruno
    Commented May 21, 2014 at 1:12
  • 12
    Simple vs complex: replacing int with itn vs replacing Good morning! with MAY YOUR DAYS BE SHORT AND MISERABLE! See also: iOS autocorrect.
    – Shog9
    Commented May 21, 2014 at 3:09
  • @Bruno Someone edited it out. :(
    – Scimonster
    Commented May 22, 2014 at 18:23
10

The key difference is whether it's a misunderstanding, or a mistype. It's the difference between

I accidentally hit ; instead of ,

and

I thought ; was the right thing to use there - I didn't know it should be ,

The former is a typo. The latter is a case where the OP needs to be educated - although not necessarily by us.

2
  • 1
    In the first case, the OP needs to be educated to understand the three most common error messages of his compiler. At least one of them is like "Syntax error at line 123"...
    – Alexander
    Commented May 22, 2014 at 11:56
  • Great answer. In Java, we've gotten lots of questions from students who were apparently told to put ; after all statements and think this means to write if (<condition>); {...} or while (<condition>); {...}. This is definitely a misunderstanding, but I've seen it marked as a "typo".
    – ajb
    Commented May 22, 2014 at 18:28
7

I believe Robert Harvey already provided a good explanation about the typographical error flag, so I'll post my assumptions about why your flag has been rejected.

From a technical standpoint, the issue with that question is not due to a lacking <body> tag:

  • Adding a <body></body> after </head> will not fix the issue, as at the time the script inside <head> executes, the body element still does not exist yet.

  • In HTML, it is valid to omit the <body> tag (as well as <html> and <head>), most browsers will implicitly create a body element in any case. Even then, the body element doesn't exist at the time the <head> script executes.

Hence it is not a typo, but it can be considered a dupe of the thousands of "cannot access element before it exists" questions.

3
  • Agree, I should have closed as duplicate. This is why I asked the question, happy to learn the right way. Commented May 21, 2014 at 4:08
  • "In HTML5" — I don't think there is any version of HTML where that isn't the case (XHTML not being HTML of course)
    – Quentin
    Commented May 21, 2014 at 14:42
  • @Quentin Oh, I always thought omitting these tags started being allowed in HTML5, now I've just checked with HTML4 strict and transitional to make sure and both also validate. Fixed the answer and learned something new today, thanks. =] Commented May 21, 2014 at 15:45

You must log in to answer this question.

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