SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 71
  1. #1
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)

    "Spot the Error" Competition 2: Olympic Edition

    Spot the Error!


    Here is the second Spot the Error Competition. (If you missed the first, you can find it here.)

    See how many errors you can find in the quoted text below—a pretend forum post. These include grammatical and coding errors, and perhaps even others.

    Since we're in Olympic mode, we'll award a free SitePoint ebook to the best three responses—ranked in Gold, Silver and Bronze positions.

    Here are some ways to stand out from the crowd:

    - spot more errors than anyone else
    - offer outstanding explanations for why something is an error
    - list errors neatly, in point form.

    Beware, though, as there's a sting in the tail this time. If you flag something as an error that's not one, you'll be disqualified, so choose your errors carefully!

    Remember that this is just for fun, and lively debate is welcome! We'll leave the actual competition open for a day or two.

    Good luck!

    There seems to be problems with this code, but I can not see what. Id be greatful to whomever is able help with this. Im not much good with java.

    Code:
    <DOCTYPE html>
    <html lang="em">
    <head>
    
    <meta charset="utf8">
    
    <title>Spot the Eror</title>
    	
    <link rel="stylesheet" media="screen projection tv" href="/css/styles.css">
    
    <body>
    
    <!- --start slideshow-- -->
    
    <div class="slideshow">	
      <img href="bird1.jpg" alt="Bird in flight"
      <img href="bird2.jpg alt="Bird in cage">
    </div>
    
    <script type="text/java" src="/js/jquery.cycle.lite.min.js"></script>
    <script type="text/script" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    </body>
    </html>
    Edit:

    OK folks, the competition part of this thread is now over, though you are welcome to discuss further the issues involved.

    Results can be seen in post #67.
    Last edited by ralph.m; Aug 5, 2012 at 17:46. Reason: announcing results

  2. #2
    SitePoint Member dsimk2002's Avatar
    Join Date
    May 2005
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Spot the Error Entry

    Quote Originally Posted by ralph.m View Post
    Spot the Error!


    Here is the second Spot the Error Competition. (If you missed the first, you can find it here.)

    See how many errors you can find in the quoted text belowóa pretend forum post. These include grammatical and coding errors, and perhaps even others.

    Since we're in Olympic mode, we'll award a free SitePoint ebook to the best three responsesóranked in Gold, Silver and Bronze positions.

    Here are some ways to stand out from the crowd:

    - spot more errors than anyone else
    - offer outstanding explanations for why something is an error
    - list errors neatly, in point form.

    Beware, though, as there's a sting in the tail this time. If you flag something as an error that's not one, you'll be disqualified, so choose your errors carefully!

    Remember that this is just for fun, and lively debate is welcome! We'll leave the actual competition open for a day or two.

    Good luck!

    The person who asked for help says they are not good with java but Java is a programming language not a scripting language used int his context
    Line 1 Should read <!DOCTYPE html> it is missing the !
    Line 2 Should read <html lang="en"> not <html lang="em">
    Line 5 should read <meta charset="utf-8"> It was missing the hyphen in utf8 but also should read <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    Line 7 Error is misspelled as Eror
    Line 9 should have commas (,) between screen and projection and tv
    Line 10 </head> is missing
    Line 16 is missing the closing >
    Line 17 should read <img href="bird2.jpg" alt="Bird in cage"> not <img href="bird2.jpg alt="Bird in cage"> It was missing the quote after the href
    Line 20 is wrong. it should read <script type="text/javascript" src="/js/jquery.cycle.lite.min.js"></script> not <script type="text/java" src="/js/jquery.cycle.lite.min.js"></script> Javascript and Java are completely different. Java is an OOP language and JavaScript is an OO scripting language. Java must be compiled where Javascript does not
    Line 21 should read <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> not <script type="text/script" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    Lines 20 and 21 should be placed in the head. The Javascript libraries are needed to make the animations work. If they are placed at the end of the document they are loaded after the HTML page is loaded

  3. #3
    SitePoint Member
    Join Date
    May 2012
    Location
    Saint Louis, Missouri, United States
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's my attempt.

    HTML Code:
    <DOCTYPE html>
    1. I would put "html" in caps. However, I don't think it matters too much.
    HTML Code:
    <html lang="em">
    2. The "em should be "en" for English.
    HTML Code:
    <meta charset="utf8">
    3.The meta charset is missing a dash. It should read "utf-8" in the quotes.
    4. </head> is missing
    HTML Code:
    <img href="bird1.jpg" alt="Bird in flight"
    <img href="bird2.jpg alt="Bird in cage">
    5. This section is missing a > and ". It should look like this:
    HTML Code:
    <img href="bird1.jpg" alt="Bird in flight">
    <img href="bird2.jpg" alt="Bird in cage">
    HTML Code:
    <script type="text/java" src="/js/jquery.cycle.lite.min.js"></script>
    <script type="text/script" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    6. The scripts should read as "text/javascript" in the quotes, instead of type="text/java" or type="text/script".
    7. Also, the scripts should probably be inside the <head></head> tags. Unless there is some script specific reason it is down there.
    8. I think there should be a separate stylesheet for each media Instead of there being one for "screen projection tv".

    I've probably missed something. Worse, I may have made a mistake. Oh well, It's just for fun.

  4. #4
    SitePoint Member
    Join Date
    May 2012
    Location
    Saint Louis, Missouri, United States
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh yeah, and doctype is missing the !

    Opps. Too late now.

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    I can see quite a few more myself so keep looking. But I cannot complete.

  6. #6
    SitePoint Member
    Join Date
    Aug 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looked like fun so her is my shot at it


    The original poster's text has many errors. The sentence would make much more sense if written
    like this:

    1. It would make more grammatical sense to add a "they are" at
    the end of the first sentence.
    2. Needs an ' between I and d ) - I'd
    3. greatful is misspelled and should be grateful
    4. Should not be whomever but whoever
    5. Need to add the word "to" between able and help.
    6. Another ' is needed between I and m - I'm
    7. I would not correct the error on the OP writing java as
    it is a common mistake to new coders, so he might have written java
    actually thinking it was java.

    Code Section:

    1. ! missing from doctype so it should be <!DOCTYPE html>
    2. lang="em" should be changed to lang="en" for english
    3. meta tagshould be set as <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    4. Error is spelled wrong in the title tag
    5. media attribute should be media="screen, projection, tv" and the href="" should not contain a / at the beginninng of css or it will not call the right relative path
    6. missing closing head tag </head>
    7. HTML comment should start with two dashes like <!--
    8. Image one should be like this instead: <img src="bird1.jpg" alt="Bird in flight"> (missing closing bracket, and needs to be src not href)
    9. Image two should look like this: <img src="bird2.jpg" alt="Bird in cage"> (Should be src not href and missing closing ")
    10. The script tag needs some work:
    Could do 1 of 2 things to fix this
    1. Change type to type="text/javascript"
    2. Since this is the HTML5 DOCTYPE the user could actually just leave out
    the type attribute since HTML5 automatically uses text/javascript for
    any <script> tag by default
    Also need to remove the / before js in the src attribute
    11. Same as above for second script tag
    12. The scripts should be swapped since jquery.cycle.lite.min.js needs the jQuery loaded in order to run
    13. I would personally move the scripts to either the head section or after the body tag, but don't think
    it is necessary to make the page function any better

  7. #7
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Great responses so far, guys. You sure have eagle eyes.

    Quote Originally Posted by Jeremy P. Reed View Post
    Too late now.
    No, not too late. Well spotted.

  8. #8
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    I can still see some more but you guys are getting closer.

  9. #9
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'm going to have a go at this at lunch. I've already spotted one trap that loads of people have fallen into...

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Stormrider View Post
    I've already spotted one trap that loads of people have fallen into...

  11. #11
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    In fact, EVERYONE so far has fallen in to!

  12. #12
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Although I shouldn't be too cocky, I'm sure I'll fall in to one myself!

  13. #13
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Stormrider View Post
    Although I shouldn't be too cocky, I'm sure I'll fall in to one myself!
    We eagerly await your list.

    Don't worry, though. I don't bite, and I'm not a know-it-all.

  14. #14
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    My comments below in orange
    Quote Originally Posted by ralph.m View Post
    There seems to be problems with this code, but I can not (cannot is one word) see what. Id (missing apostrophe, should be I'd) be greatful (spelling, should be grateful) to whomever is able (missing word to) help with this. Im (missing apostrophe, should be I'm) not much good with java (Java should be capitalised. It looks as though knowledge of Java is irrelevant to the problem (it uses Javascript) but it may not actually be untrue!).

    Code:
    <DOCTYPE html> (Missing !, should start <!DOCTYPE)
    <html lang="em"> ("em" is not a valid language code, should probably be "en")
    <head>
    
    <meta charset="utf8"> (Missing hyphen, should be "utf-8")
    
    <title>Spot the Eror</title> (spelling, shoud be Error)
    	
    <link rel="stylesheet" media="screen projection tv" href="/css/styles.css"> (media types should be separated by commas, not spaces)
    
    <body>
    
    <!- --start slideshow-- --> (comments should start with a double dash <!--)
    
    <div class="slideshow">	
      <img href="bird1.jpg" alt="Bird in flight" (should be src, not href)(missing >)
      <img href="bird2.jpg alt="Bird in cage"> (should be src, not href)(missing " after filename)
    </div>
    
    <script type="text/java" src="/js/jquery.cycle.lite.min.js"></script> (should be "text/javascript")
    <script type="text/script" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> (should be "text/javascript")
    </body>
    </html>

  15. #15
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ralph.m View Post
    It was the comment about disqualification for false positives that got me checking that one very carefully! (There was a grammatical one as well that I wasn't sure about so I left it out)

  16. #16
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Right, here we go then... my attempted list!

    SPAG

    1. 'seem' not 'seems'
    2. 'grateful' not 'greatful'
    3. 'I'd' not 'Id'
    4. 'whoever' not 'whomever'
    5. 'able to' not 'able'
    6. 'I'm' not 'Im'
    7. 'JavaScript' rather than 'java'

    GENERAL

    1. It would probably help if the poster described what problems they were having, and what they are intending to achieve. Although it's not that much of a point because it could be picked up from context / it's obvious what it's meant to do!

    Code

    1. Missing ! from Doctype
    2. lang="en" not lang="em"
    3. 'UTF-8' not 'utf8' (although case insensitive, the hyphen should be there)
    4. 'Eror' should be 'Error' in <title>
    5. Media attribute of link element must be a valid media query, so "screen, projection, tv"
    6. Comment must start with <!--, not <!-
    7. Comment cannot contain 2 consecutive hyphens even if it was a valid comment
    8. Comment cannot end with a hyphen
    9. <img> elements should have src attribute, not href
    10. First <img> element is missing its closing >
    11. Second <img> element is missing a quote
    12. The alt attribute for both images should contain a text alternative for the images, not a description of them
    13. The type attributes for both script tags should be "text/javascript", or omitted entirely
    14. The src attribute of the second script could generate a browser warning if this page is not on a secure site, as it refers to secure content
    15. Arguably these scripts should be loaded in the document head
    16. The scripts are loaded in the wrong order - jQuery should be loaded before its plugin

    That's everything I can see I think... bound to have missed something though!

  17. #17
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    An additional one that I wasn't sure whether to put in, but I think I will:

    17. Probably not the best idea to just load the latest 1.x.x version of jQuery - you should stick to a specific version in case future updates break things you are relying on

  18. #18
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Robert View Post
    I can see quite a few more myself so keep looking. But I cannot comp[l]ete.
    See I even added an error to my post.

    Actually I like you Ralph; I see you've possibly got at least another sneaky one or two hidden there in the code. That they haven't spotted between them. Might involve them explaining why those are possible errors though.

  19. #19
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Stop taunting me!

  20. #20
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Heh heh, as usual, people spotting things that didn't even occur to the OP. Ahem. Great work! This is fun.

  21. #21
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Actually you aren't doing too bad Chris and I see in #17 you got one of those I was thinking of in #18 but you bet me to the post my browser wasn't refreshed.

  22. #22
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The fact that there are any I've missed is annoying me :P (Apart from anything to do with absolute vs relative paths... I discounted those because they all depend on the environment it's set up in) Ah well, will have to wait till the answers come out and see what I missed!

  23. #23
    Non-Member
    Join Date
    Feb 2012
    Posts
    892
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Part I - THE TEXT

    There seems to be [a] problem with this code, but I cannot see what. I'd be grateful to whomever is able [to] help [me] with this. I'm not much[so] good with java[script].

    Will tackle the code a little later.

    EDIT: I should mention that whomever vs. whoever goes a little (more) above my ESL head...

  24. #24
    Non-Member
    Join Date
    Feb 2012
    Posts
    892
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Part II - THE CODE

    Others have covered very well this part. I have one or two comments to add:

    1. The </head> tag is missing. Not an error though in HTML5, so I don't know if it counts. But they recommend that if you use the start tag for one of the optional elements, you should use the corresponding close tag too.

    2. You're not allowed consecutive hyphens inside HTML comments,
    Code:
    <!- -start slideshow-- -->
    should be

    Code:
    <!-- start slideshow -->
    or something similar, just without any other consecutive hyphens inside, beside those at the start and at the end of the HTML comment.

    EDIT: I just saw that Stormrider already covered the consecutive hyphens part. So I guess it's just one point, the missing closing tag on the optional head element.

  25. #25
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Mitică, I believe for Gold medal - if you are going for gold - you have to give a full in-depth explanation. Consider as if it were you own standalone analysis (as if you were the "first poster" to reply to the OP as if it were a real question in the SPF itself) so you might want to add your own full list of what you personally believe or see is wrong not just add to the previous posts, which may or may not be correct.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •