Comment On Code it on iBay!

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 S 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 ... [expand full text]
« PrevPage 1Next »

Re: Code it on iBay!

2006-02-08 15:24 • by 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.

Re: Code it on iBay!

2006-02-08 15:26 • by pbounaix

On Error Resume WTF


 


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

Re: Code it on iBay!

2006-02-08 15:29 • by Mikademus
59474 in reply to 59473
So what is the WTF? That they're commenting out things in three different ways? Or that they enclose strings inside script tags?

Re: Code it on iBay!

2006-02-08 15:32 • by it's a secret
Looks like code that's meant to be internationalized to me. Doesn't explain all the WTFs of course.

Re: Code it on iBay!

2006-02-08 15:34 • by Kippesoep
59477 in reply to 59474
I can think of one reason for not hardcoding strings like this: localisation. (A bad attempt at it, admittedly).

Re: Code it on iBay!

2006-02-08 15:37 • by Stupidumb
myResponse = "I don't see  a problem with the first one";

'while(true)

PutOnInternet(myResponse);

'return 0

'return "maybe"

return 1



Re: Code it on iBay!

2006-02-08 15:38 • by ferrengi
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.

Re: Code it on iBay!

2006-02-08 15:39 • by diaphanein
59480 in reply to 59477

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!

Re: Code it on iBay!

2006-02-08 15:40 • by hi
59481 in reply to 59479
The last part where they seemingly cut/paste code from somewhere else was sort of funny...

Re: Code it on iBay!

2006-02-08 15:40 • by R.Flowers

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:

   If false Then
      {much code}
      {much more code}
   End If


Yes, I really did that[:$]

Re: Code it on iBay!

2006-02-08 15:43 • by 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

Re: Code it on iBay!

2006-02-08 15:45 • by Stupidumb
59484 in reply to 59483
That ain't pig latin.



It's pig l337en

Re: Code it on iBay!

2006-02-08 15:55 • by toxik
59485 in reply to 59484
It is a WTF fo sho' but uhm, not really all that funny to be honest.

Re: Code it on iBay!

2006-02-08 15:58 • by Just Another WTF
59486 in reply to 59483

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.

Re: Code it on iBay!

2006-02-08 16:01 • by BillWert
59487 in reply to 59472

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..

Re: Code it on iBay!

2006-02-08 16:10 • by Timbo Jones
59490 in reply to 59486
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.

Re: Code it on iBay!

2006-02-08 16:12 • by JC
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 ...


<% L_Title_text = "iBay Site Search : New to iBay?" %>

<title><% = L_Title_text %>title>

 

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


<center><h2>Site Searchh2>center>

<% 'search form %>


<table width="450" cellpadding="5" border="0">

 

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


<% 

if NoCatalogs = true then
L_NoCatalogs_text = _
"

No catalogs are available for searching. New catalogs " & _
"may be propagating. Please wait 10 seconds and try again.

"
Response.write "

" & L_NoCatalogs_text & ""
end if
%>

...

<font face="Verdana,Arial,sans-serif" style="font-size: 10pt">
<% L_Find_text = " for documents containing"%>
<%=L_Find_text %>:
font>


 

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


<% ' this is all crap %>

<% if Request("advanced") = "yes" then %>
<% Response.write "

" %>
<% end if %>


 

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


<% 

Response.write ""
%>

 

... and finally, Method 3 ...


<%         

' search image button
'
'

%>

 

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


<% 

' this next
causes too much
' whitespace when there is no query

Response.write "
"

%>

 

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


<% end if ' End of check for OWA messages. %>

<% end if ' End of check for first Exchange message. %>
<% ' End of Microsoft Exchange Public Folder Results Setup Section. %>


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

Re: Code it on iBay!

2006-02-08 16:15 • by ParkinT
59492 in reply to 59490

Simply "BRILLANT"


     -Paula

Re: Code it on iBay!

2006-02-08 16:16 • by e.thermal
59493 in reply to 59491

Anonymous:


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


 


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

Re: Code it on iBay!

2006-02-08 16:17 • by JC
59494 in reply to 59491

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.


Re: Code it on iBay!

2006-02-08 16:18 • by anon a. mouse
59495 in reply to 59491
Anonymous:


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


java now, yes. was ASP.

Re: Code it on iBay!

2006-02-08 16:24 • by connected
Can you say "overhead?" [^o)]

Re: Code it on iBay!

2006-02-08 16:34 • by chris
59497 in reply to 59491
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?

Re: Code it on iBay!

2006-02-08 16:45 • by Mike
59499 in reply to 59483

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.

Re: Code it on iBay!

2006-02-08 16:47 • by Yahbulon
59500 in reply to 59499
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.

Re: Code it on iBay!

2006-02-08 16:54 • by kipthegreat
59502 in reply to 59497
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.

Re: Code it on iBay!

2006-02-08 16:55 • by JC
59503 in reply to 59495
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. ;)

Re: Code it on iBay!

2006-02-08 16:59 • by JC
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

Re: Code it on iBay!

2006-02-08 17:02 • by Otto
<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).


 

Re: Code it on iBay!

2006-02-08 17:18 • by Sean
59514 in reply to 59491
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 ...


<% L_Title_text = "iBay Site Search : New to iBay?" %>

<title><% = L_Title_text %>title>

 

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


<center><h2>Site Searchh2>center>

<% 'search form %>


<table width="450" cellpadding="5" border="0">

 

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


<% 

if NoCatalogs = true then
L_NoCatalogs_text = _
"

No catalogs are available for searching. New catalogs " & _
"may be propagating. Please wait 10 seconds and try again.

"
Response.write "

" & L_NoCatalogs_text & ""
end if
%>

...

<font face="Verdana,Arial,sans-serif" style="font-size: 10pt">
<% L_Find_text = " for documents containing"%>
<%=L_Find_text %>:
font>


 

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


<% ' this is all crap %>

<% if Request("advanced") = "yes" then %>
<% Response.write "

" %>
<% end if %>


 

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


<% 

Response.write ""
%>

 

... and finally, Method 3 ...


<%         

' search image button
'
'

%>

 

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


<% 

' this next
causes too much
' whitespace when there is no query

Response.write "
"

%>

 

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


<% end if ' End of check for OWA messages. %>

<% end if ' End of check for first Exchange message. %>
<% ' End of Microsoft Exchange Public Folder Results Setup Section. %>


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.

Re: Code it on iBay!

2006-02-08 17:25 • by Timbo Jones
59516 in reply to 59514
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...

Re: Code it on iBay!

2006-02-08 17:46 • by cynic
59527 in reply to 59491
Anonymous:

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


The web interface isn't. You can check it at netcraft.
« PrevPage 1Next »

Add Comment