• (cs)

    Somebody needs a good slap with a 50 ft fish... >_>

    I get the feeling that the end if statements are auto-generated (ASP.NET?) but none-the-less, it's still icky.

  • (cs)

    On Error Resume WTF

     

    what page did this come from.......?

  • (cs) in reply to pbounaix

    So what is the WTF? That they're commenting out things in three different ways? Or that they enclose strings inside script tags?

  • it's a secret (unregistered)

    Looks like code that's meant to be internationalized to me. Doesn't explain all the WTFs of course.

  • (cs) in reply to Mikademus

    I can think of one reason for not hardcoding strings like this: localisation. (A bad attempt at it, admittedly).

  • Stupidumb (unregistered)

    myResponse = "I don't see  a problem with the first one";
    'while(true)
    PutOnInternet(myResponse);
    'return 0
    'return "maybe"
    return 1

  • (cs)

    Cmon, is anything in this code really that bad?
    This is one of the highlights of my day Alex.
    You can do better than that.

  • diaphanein (unregistered) in reply to Kippesoep

    Kippesoep:
    I can think of one reason for not hardcoding strings like this: localisation. (A bad attempt at it, admittedly).

    Um...the strings were still hardcoded.  Albeit in an extremely ineffecient manner.  I'm guessing response buffering probably isn't enabled, so each response write to write out static html is causing data transfer to the client.  Brillant!

    I'm always fond of people commenting out html using <!-- --> .  I mean, that's extra bytes flowing across.  There's more bytes flowing out in commenting than rendered in html in several of these examples!

  • hi (unregistered) in reply to ferrengi

    The last part where they seemingly cut/paste code from somewhere else was sort of funny...

  • (cs)

    I'm not doing anything in classic ASP right now, thankfully, but the 2 things that bothered me the most were:

    1. one logical line of code was literally one line!
    2. no block comment ability. Sometimes when I wanted to comment out a block of code I would resort to:

    <FONT face="Courier New">   If <FONT color=#ffa500>false</FONT> Then
    <FONT color=#006400>      {much code}
          {much more code}
    </FONT>   End If</FONT>

    Yes, I really did that[:$]

  • (cs)

    I must say, this is the worst anonymization that has taken place here in a long time.  I mean really, is it that hard to figure out that you are just putting the name of the site in pig-latin?  I bet you are running the risk of a lawsuit
     from the lawyers at bi.com

  • Stupidumb (unregistered) in reply to Disgruntled DBA

    That ain't pig latin.

    It's pig l337en

  • toxik (unregistered) in reply to Stupidumb

    It is a WTF fo sho' but uhm, not really all that funny to be honest.

  • Just Another WTF (unregistered) in reply to Disgruntled DBA

    Disgruntled DBA:
    I must say, this is the worst anonymization that has taken place here in a long time.  I mean really, is it that hard to figure out that you are just putting the name of the site in pig-latin?  I bet you are running the risk of a lawsuit
     from the lawyers at bi.com

    Really his choices where limited to iBay or XBay or the real name... until the technobabble wizards come up with a new way to make the same of crap sound new and cool thats what we are stuck with.  Though now that I come to think of it ABay might also have worked but really AJAX is the only "cool new technology" to go that route yet... and it still has an "X" in it so don't know if it even counts.

  • BillWert (unregistered) in reply to Vector

    Vector:
    Somebody needs a good slap with a 50 ft fish... >_>

    I get the feeling that the end if statements are auto-generated (ASP.NET?) but none-the-less, it's still icky.

     

    Nah, that stuff isn't autogenerated by any version of ASP.Net I've used.  This is classic ASP anyway, from the looks of things..

  • Timbo Jones (unregistered) in reply to Just Another WTF
    Anonymous:

    Disgruntled DBA:
    I must say, this is the worst anonymization that has taken place here in a long time.  I mean really, is it that hard to figure out that you are just putting the name of the site in pig-latin?  I bet you are running the risk of a lawsuit
     from the lawyers at bi.com

    Really his choices where limited to iBay or XBay or the real name...

    Or maybe Initech, like normal.  There's nothing in the code snippets that make it important for us to know where it came from.  I can only surmise that in this case, the source is actually part of the WTF.

    Also, may I suggest considering the pig latin comment a bit more.  It's really quite funny.  I laughed for hours.  And by hours I mean a few moments.  And by laughed I mean chuckled quietly to myself.  I am at work, after all.

  • JC (unregistered)
    Alex Papadimoulis:

    As you may have noticed, I try to anonymize code before I post so that it cannot easily be traced back to any individual or company. When Jonathan Spalletta sent me some of the code that he came across while working at the world's number one auction website, I thought I might make an exception to the rule. After all, it is kind of interesting to see a piece of the inner workings of one of the top five websites. But I've decided to stick to my principles and conceal what company these snippets found on a single ASP page came from ...

    <font color="#990099"><%</font> L_Title_text = <font color="#990000">"iBay Site Search : New to iBay?"</font> <font color="#990099">%></font>
    <<font color="#000099">title</font>><font color="#990099"><%</font> = L_Title_text <font color="#990099">%></font><!--<FONT color=#000099-->title>

     

    ... note that this is Method 1 for commenting out ...

    <<font color="#000099">center</font>><<font color="#000099">h2</font>>Site Search<!--<FONT color=#000099-->h2><!--<FONT color=#000099-->center>
    <font color="#990099"><%</font> <font color="#006600">'search form</font> <font color="#990099">%></font>
    <font color="#006600"><!-- <table width="100%" cellpadding="5" border="0"> --></font>
    <font color="#006600"><!-- <table width=600 cellpadding="5" border="0"> --></font>
    <<font color="#000099">table</font> width="450" cellpadding="5" border="0">

     

    ... the iBay coders seem to really hate hard-coding text directly as HTML ...

    <font color="#990099"><%</font> 
      <font color="#000099">if</font> NoCatalogs = <font color="#000099">true then</font>
        L_NoCatalogs_text = _
          <font color="#990000">"</font>

    <font color="#990000">No catalogs are available for searching. New catalogs "</font> & _ <font color="#990000">"may be propagating. Please wait 10 seconds and try again.</font>

    <font color="#990000">"</font> Response.write <font color="#990000">"</font>

    <font color="#990000">"</font> & L_NoCatalogs_text & <font color="#990000">"</font><font color="#990000">"</font> <font color="#000099">end if</font> <font color="#990099">%></font>

    ...

    <<font color="#000099">font</font> face="Verdana,Arial,sans-serif" style="font-size: 10pt"> <font color="#990099"><%</font> L_Find_text = <font color="#990000">" for documents containing"</font><font color="#990099">%></font> <font color="#990099"><%</font>=L_Find_text <font color="#990099">%></font>:

    <!--<FONT color=#000099-->font>

     

    ... I should note that the following comment is not mine ...

    <font color="#990099"><%</font> <font color="#006600">' this is all crap </font><font color="#990099">%></font>
    <font color="#990099"><%</font> <font color="#000099">if</font> Request(<font color="#990000">"advanced"</font>) = <font color="#990000">"yes"</font> <font color="#000099">then</font> <font color="#990099">%></font> 
      <font color="#990099"><%</font>  Response.write <font color="#990000">"</font>

    <font color="#990000">"</font> <font color="#990099">%></font> <font color="#990099"><%</font> <font color="#000099">end if</font> <font color="#990099">%></font>

     

    ... here is Method 2 for commenting out ...

    <font color="#990099"><%</font> 
      Response.write <font color="#990000">"<!-- <p> -->"</font>
    <font color="#990099">%></font>

     

    ... and finally, Method 3 ...

    <font color="#990099"><%</font>         
    <font color="#006600">' search image button
    '<input name="Search" src="Images/SearchButton.gif" align="bottom" border="0" height="28" type="image" width="50"> 
    ' </font>
    <font color="#990099">%></font>

     

    ... some try to solve the problem, others just write about it ...

    <font color="#990099"><%</font> 
      <font color="#006600">' this next 
    causes too much ' whitespace when there is no query</font> Response.write <font color="#990000">"
    "</font> <font color="#990099">%></font>

     

    ... this last one was particularly interesting, especially considering that the page had nothing to do with OWA, Exchange, or anything but searching for auctions ...

    <font color="#990099"><%</font> <font color="#000099">end if</font> <font color="#006600">' End of check for OWA messages.</font> <font color="#990099">%></font>
    <font color="#990099"><%</font> <font color="#000099">end if</font> <font color="#006600">' End of check for first Exchange message.</font> <font color="#990099">%></font>
    <font color="#990099"><%</font> <font color="#006600">' End of Microsoft Exchange Public Folder Results Setup Section.</font> <font color="#990099">%></font>


    Interesting... considering eBay is written in Java....
  • (cs) in reply to Timbo Jones

    Simply "BRILLANT"

         -Paula

  • (cs) in reply to JC

    Anonymous:


    Interesting... considering eBay is written in Java....

     

    Agreed I haven't seen any asp on "ibay" yet.

  • JC (unregistered) in reply to JC

    None of that looks like JSP either, so we can safely assume either this is a hoax (which is rather desperate considering there are better WTFs to be had) or it's ripping on another auction site (which can be a dime a dozen). This comes to mind.

  • anon a. mouse (unregistered) in reply to JC
    Anonymous:


    Interesting... considering eBay is written in Java....


    java now, yes. was ASP.
  • (cs)

    Can you say "overhead?" [^o)]

  • chris (unregistered) in reply to JC
    Anonymous:
    Alex Papadimoulis:
    ...


    Interesting... considering eBay is written in Java....

    I'm glad that I'm not the only one who noticed this. Sun made huge announcements about their hardware an application server powering ebay, they even have their logo on the front page. All of their ebay's subsidiary sites that are listed on the left side of the main page are running of of apache or some java application server. I wonder where this code is from?

  • Mike (unregistered) in reply to Disgruntled DBA

    Disgruntled DBA:
    I must say, this is the worst anonymization that has taken place here in a long time.  I mean really, is it that hard to figure out that you are just putting the name of the site in pig-latin?  I bet you are running the risk of a lawsuit
     from the lawyers at bi.com

    I agree.  You're putting up proprietary code for ridicule and only changing one letter of the company name.  You're playing with fire.

  • Yahbulon (unregistered) in reply to Mike

    You guys don't get the joke about the pig-latin, do you?  Look up pig latin, and then re-read his post.
    After that, at least try to laugh.

  • (cs) in reply to chris
    Anonymous:
    All of their ebay's subsidiary sites ... are running of of apache or some java application server.


    Apache isn't a Java application server.
  • JC (unregistered) in reply to anon a. mouse
    Anonymous:
    Anonymous:


    Interesting... considering eBay is written in Java....


    java now, yes. was ASP.


    Hmm.. that may be true.

    Check out the archive of the site from 1997. ;)

  • JC (unregistered)
    pbounaix:
    lol...you broke it w/ your "test" div! :P


    Yeah... we had to do some html injection testing stuff today, and I thought I'd try it.

    Highly amusing :D
  • (cs)
    <center><h2>Site Search</h2></center>
    <% 'search form %>
    <!-- <table width="100%" cellpadding="5" border="0"> -->
    <!-- <table width=600 cellpadding="5" border="0"> -->
    <table width="450" cellpadding="5" border="0">

    To be absolutely honest, I have shamefully commented out bits in this way before, while testing things. However, in my defense, I always went back to clean them up and either remove the code entirely or comment it out using language-specific syntax (thus preventing it from actually being sent to the browser).

     

  • (cs) in reply to JC
    Anonymous:
    Alex Papadimoulis:

    As you may have noticed, I try to anonymize code before I post so that it cannot easily be traced back to any individual or company. When Jonathan Spalletta sent me some of the code that he came across while working at the world's number one auction website, I thought I might make an exception to the rule. After all, it is kind of interesting to see a piece of the inner workings of one of the top five websites. But I've decided to stick to my principles and conceal what company these snippets found on a single ASP page came from ...

    <font color="#990099"><%</font> L_Title_text = <font color="#990000">"iBay Site Search : New to iBay?"</font> <font color="#990099">%></font>
    <<font color="#000099">title</font>><font color="#990099"><%</font> = L_Title_text <font color="#990099">%></font><!--<FONT color=#000099-->title>

     

    ... note that this is Method 1 for commenting out ...

    <<font color="#000099">center</font>><<font color="#000099">h2</font>>Site Search<!--<FONT color=#000099-->h2><!--<FONT color=#000099-->center>
    <font color="#990099"><%</font> <font color="#006600">'search form</font> <font color="#990099">%></font>
    <font color="#006600"><!-- <table width="100%" cellpadding="5" border="0"> --></font>
    <font color="#006600"><!-- <table width=600 cellpadding="5" border="0"> --></font>
    <<font color="#000099">table</font> width="450" cellpadding="5" border="0">

     

    ... the iBay coders seem to really hate hard-coding text directly as HTML ...

    <font color="#990099"><%</font> 
      <font color="#000099">if</font> NoCatalogs = <font color="#000099">true then</font>
        L_NoCatalogs_text = _
          <font color="#990000">"</font>

    <font color="#990000">No catalogs are available for searching. New catalogs "</font> & _ <font color="#990000">"may be propagating. Please wait 10 seconds and try again.</font>

    <font color="#990000">"</font> Response.write <font color="#990000">"</font>

    <font color="#990000">"</font> & L_NoCatalogs_text & <font color="#990000">"</font><font color="#990000">"</font> <font color="#000099">end if</font> <font color="#990099">%></font>

    ...

    <<font color="#000099">font</font> face="Verdana,Arial,sans-serif" style="font-size: 10pt"> <font color="#990099"><%</font> L_Find_text = <font color="#990000">" for documents containing"</font><font color="#990099">%></font> <font color="#990099"><%</font>=L_Find_text <font color="#990099">%></font>:

    <!--<FONT color=#000099-->font>

     

    ... I should note that the following comment is not mine ...

    <font color="#990099"><%</font> <font color="#006600">' this is all crap </font><font color="#990099">%></font>
    <font color="#990099"><%</font> <font color="#000099">if</font> Request(<font color="#990000">"advanced"</font>) = <font color="#990000">"yes"</font> <font color="#000099">then</font> <font color="#990099">%></font> 
      <font color="#990099"><%</font>  Response.write <font color="#990000">"</font>

    <font color="#990000">"</font> <font color="#990099">%></font> <font color="#990099"><%</font> <font color="#000099">end if</font> <font color="#990099">%></font>

     

    ... here is Method 2 for commenting out ...

    <font color="#990099"><%</font> 
      Response.write <font color="#990000">"<!-- <p> -->"</font>
    <font color="#990099">%></font>

     

    ... and finally, Method 3 ...

    <font color="#990099"><%</font>         
    <font color="#006600">' search image button
    '<input name="Search" src="Images/SearchButton.gif" align="bottom" border="0" height="28" type="image" width="50"> 
    ' </font>
    <font color="#990099">%></font>

     

    ... some try to solve the problem, others just write about it ...

    <font color="#990099"><%</font> 
      <font color="#006600">' this next 
    causes too much ' whitespace when there is no query</font> Response.write <font color="#990000">"
    "</font> <font color="#990099">%></font>

     

    ... this last one was particularly interesting, especially considering that the page had nothing to do with OWA, Exchange, or anything but searching for auctions ...

    <font color="#990099"><%</font> <font color="#000099">end if</font> <font color="#006600">' End of check for OWA messages.</font> <font color="#990099">%></font>
    <font color="#990099"><%</font> <font color="#000099">end if</font> <font color="#006600">' End of check for first Exchange message.</font> <font color="#990099">%></font>
    <font color="#990099"><%</font> <font color="#006600">' End of Microsoft Exchange Public Folder Results Setup Section.</font> <font color="#990099">%></font>


    Interesting... considering eBay is written in Java....


    Ignorant... considering it wasn't always written in Java.  The early days of the site had many features that were ASP pages and ISAPI applications.
  • Timbo Jones (unregistered) in reply to Sean
    Sean:
    Anonymous:
    Alex Papadimoulis:

    As you may have noticed, I try to anonymize code before I post so that it cannot easily be traced back to any individual or company....



    Interesting... considering eBay is written in Java....


    Ignorant... considering it wasn't always written in Java.  The early days of the site had many features that were ASP pages and ISAPI applications.


    So is this (somewhat) bad code still around?  Has it been sitting at the bottom of the WTF barrel since 'the early days'?  Maybe the submitter sat on it until he left the company?  A previous commenter talked about doing similar things when testing web sites.  Did these snippets ever see the light of a production server?

    Too many questions...
  • cynic (unregistered) in reply to JC
    Anonymous:

    Interesting... considering eBay is written in Java....


    The web interface isn't. You can check it at netcraft.

Leave a comment on “Code it on iBay!”

Log In or post as a guest

Replying to comment #:

« Return to Article