Search results for ${query}



  • Go to iwantoneofthose.com

    Search for something (i.e., 'usb')

    Click on a page number, or change the sort order (note: requires JavaScript)

    Witness the page title



  • WTF@Requiring javascript to do something that <a href ... /> does.



  • That is one disgusting site.



  • WTF?!! Don't contribute to the insanity - don't buy there!



  • Shitty Javascript is a dime a dozen these days, but this is still pretty bad. Here's some particularly retarded snippets:

    function openWindow2(theURL,winName,features) {
    	window.open(theURL,winName,features);
    }
    
    function randInt(min,max)
    {
         var div = (max - min) + 1
         var randNum = Math.random()
         for (var i = 0; i <= div - 1; i++)
         {
              if (randNum >= i / div && randNum < (i+1) / div)
              {return i + min}
         }
    }
    function swapBanners() {
    	
    	var abc = randInt(1,3);
    	//var bannerDiv = document.getElementById("Java_banner");
    
    	if (abc == 1) {
    
         	document.write(Banner1);
    
    	}
    
    	if (abc == 2) {
    
         	document.write(Banner2);
    
    	}
    
    	if (abc == 3) {
    
        	document.write(Banner3);
    
    	}	
    }
    


  • I like the URLs: http://www.iwantoneofthose.com/searchSite.do?SearchHandle=DADADJDFDADADDDGGBDFDBDBDGGDDFDGCNDEDGDAGCCNDEDBDEDECNGBGBGFDDCNGEDCDAGCGCDADJDBDADGDDDDDADADADBDCDADADADDHFHDGCDADADADEDADADADADADADADBDFDADADADBDADADADADADADADADADADADADBDADADADADDHFHDGCDADADADBDB&PageSettings=0%2310%230%23%230%230&SpecialCases=0&Action=1&Page=1

    WTF@Requiring javascript to do something that does.

    MySpace is so bad like that. I wrote a script to "export" a user's friends list (ie. scrape all the data), and it was rather interesting to see how they handled this. Here's a snipplet of the main bit of the code:


        
    // Process all pages.
        
    for ($i 1$i <= $pages$i++)
        {
            echo 
    'Page '$i'... ';
            
    flush();
            
    // Get this page.
            
    curl_setopt($curlCURLOPT_URL'http://friends.myspace.com/index.cfm?fuseaction=user.viewfriends&friendID=' $id);
            
    curl_setopt($curlCURLOPT_POST1);
            
    curl_setopt($curlCURLOPT_POSTFIELDS'__EVENTTARGET=ctl00$cpMain$pagerTop&__EVENTARGUMENT=' $i '&__LASTFOCUS=&__VIEWSTATE=' $viewstate '&ctl00$Main$rblSearchType=Display+Name&ctl00$Main$txtSearch=&___msPagerState=' $mspagerstate '&ctl00$Main$ddlSearch=Display&ctl00$Main$ddlHidden=0&ctl00$Main$seletedAlpha=&ctl00$Main$editMode=false');
            
    $result curl_exec($curl);
            
    //$headers = curl_getinfo($curl);
            
            // Was this request a broken one?
            
    if (strpos($result'HTTP Error 404 - File or directory not found'))
            {
                echo 
    'Error occurred, retrying...';
                
    $i--;
                continue;
            }
        
            
    // ... other stuff ...    
        
    }

    Yes, occasionally a MySpace server will return a 404 on that request. Oh, and the full script is on my blog if you're interested.



  • I think they're encoding the DNA of the page into the URL.



  • @boomzilla said:

    I think they're encoding the DNA of the page into the URL.


    By golly, I think you're right!



  • @Daniel15 said:

    I like the URLs: http://www.iwantoneofthose.com/searchSite.do?SearchHandle=DADADJDFDADADDDGGBDFDBDBDGGDDFDGCNDEDGDAGCCNDEDBDEDECNGBGBGFDDCNGEDCDAGCGCDADJDBDADGDDDDDADADADBDCDADADADDHFHDGCDADADADEDADADADADADADADBDFDADADADBDADADADADADADADADADADADADBDADADADADDHFHDGCDADADADBDB&PageSettings=0%2310%230%23%230%230&SpecialCases=0&Action=1&Page=1

    Clearly their query is dead save, with their sophisticated proprietary encryption scheme guarding it... 

    @Daniel15 said:

    MySpace is so bad like that. I wrote a script to "export" a user's friends list (ie. scrape all the data), and it was rather interesting to see how they handled this. Here's a snipplet of the main bit of the code:

    [...]

     curl_setopt($curlCURLOPT_POSTFIELDS'__EVENTTARGET=ctl00$cpMain$pagerTop&__EVENTARGUMENT=' $i '&__LASTFOCUS=&__VIEWSTATE=' $viewstate '&ctl00$Main$rblSearchType=Display+Name&ctl00$Main$txtSearch=&___msPagerState=' $mspagerstate '&ctl00$Main$ddlSearch=Display&ctl00$Main$ddlHidden=0&ctl00$Main$seletedAlpha=&ctl00$Main$editMode=false');

    [...]


    Isn't that just the normal ASP.NET insanity though? </noob> 



  • @PSWorx said:

    Isn't that just the normal ASP.NET insanity though? </noob> 

    It is. I wrote a script to datamine an ASP site few days ago, and it looks painfully familiar 😕



  • I think that's Coldfusion insanity, but same difference.



  • You serious? That's "normal" ASP.NET insanity? I've never used ASP.NET so I didn't know.
    Surely MySpace's way of doing it is not normal, though? They've got a hidden form called "aspnetForm". When a page link is clicked, it sets two variables (__EVENTTARGET and __EVENTARGUMENT) and submits this form. If this is normal, I'll probably never touch ASP.NET.
    Whoever designed it likes that seriously needs to rethink things. What ever happened to having a GET variable called "page"?

    I think that's Coldfusion insanity, but same difference.

    Internally, MySpace reroute the ColdFusion URLs to the new ASP.NET ones. Each "fuseaction" has an equivalent .aspx page. For example:
    http://home.myspace.com/index.cfm?fuseaction=user → http://home.myspace.com/Modules/HomeDisplay/Pages/Home.aspx
    http://comment.myspace.com/index.cfm?fuseaction=user.viewComments&friendID=173242021 → http://comment.myspace.com/Modules/Comments/Pages/ViewComments.aspx?friendID=173242021 (comments page for my profile)



  • @PhillS said:

    Go to iwantoneofthose.com

    Search for something (i.e., 'usb')

    Click on a page number, or change the sort order (note: requires JavaScript)

    Witness the page title



    							<div>
    								<span id="ctl00_ctl01_bcr_ctl00___PostRepeater_ctl01_InlineTagEditorPanel">Filed under: <a href="http://forums.worsethanfailure.com/tags/iwantoneofthose.co.uk/default.aspx" rel="tag">iwantoneofthose.<b>co.uk</b></a></span></div></blockquote> The Real WTF is the mismatch between the domains.<br>


  • @m0ffx said:

    The Real WTF is the mismatch between the domains.

    I posted as .co.uk, then realised that it was actually .com, went back and edited the post, but forgot to change the tag. D'oh!

    I think both will get you to the same site though



  • @Daniel15 said:

    You serious? That's "normal" ASP.NET insanity? I've never used ASP.NET so I didn't know.
    Surely MySpace's way of doing it is not normal, though? They've got a hidden form called "aspnetForm". When a page link is clicked, it sets two variables (__EVENTTARGET and __EVENTARGUMENT) and submits this form. If this is normal, I'll probably never touch ASP.NET.
    Whoever designed it likes that seriously needs to rethink things. What ever happened to having a GET variable called "page"?

    I think that's Coldfusion insanity, but same difference.

    Internally, MySpace reroute the ColdFusion URLs to the new ASP.NET ones. Each "fuseaction" has an equivalent .aspx page. For example:
    http://home.myspace.com/index.cfm?fuseaction=user → http://home.myspace.com/Modules/HomeDisplay/Pages/Home.aspx
    http://comment.myspace.com/index.cfm?fuseaction=user.viewComments&friendID=173242021 → http://comment.myspace.com/Modules/Comments/Pages/ViewComments.aspx?friendID=173242021 (comments page for my profile)

     

    Of course, you *could* use a GET request with a query string parameter but it looks like MySpace decided to try and fool ASP.NET into believing that a button was clicked by a user.  Hence the filling in of hidden field values used by ASP.NET.

    If I try and use a screwdriver as a hammer, you can hardly say that the screwdriver's design is flawed, can you? 



  • @Daniel15 said:

    You serious? That's "normal" ASP.NET insanity? I've never used ASP.NET so I didn't know. Surely MySpace's way of doing it is not normal, though? They've got a hidden form called "aspnetForm". When a page link is clicked, it sets two variables (__EVENTTARGET and __EVENTARGUMENT) and submits this form. If this is normal, I'll probably never touch ASP.NET. Whoever designed it likes that seriously needs to rethink things. What ever happened to having a GET variable called "page"?



    Yes, that is normal. It's so the backend event processing can happen. If you look at any Visual Studio produced aspx page, you'll see the same thing. The whole page is one big form. Everything in it acts as a button. So, they all route through the same script with identifiers of what, where, when, why... whatever. I've yet to try out ASP.NET because that scares the bejeezus out of me. I still write in ASP classic simply because I know what the heck it's doing. For WinForms, though, I use C#.



  • @AbbydonKrafts said:

    @Daniel15 said:

    You serious? That's "normal" ASP.NET insanity? I've never used ASP.NET so I didn't know. Surely MySpace's way of doing it is not normal, though? They've got a hidden form called "aspnetForm". When a page link is clicked, it sets two variables (__EVENTTARGET and __EVENTARGUMENT) and submits this form. If this is normal, I'll probably never touch ASP.NET. Whoever designed it likes that seriously needs to rethink things. What ever happened to having a GET variable called "page"?



    Yes, that is normal. It's so the backend event processing can happen. If you look at any Visual Studio produced aspx page, you'll see the same thing. The whole page is one big form. Everything in it acts as a button. So, they all route through the same script with identifiers of what, where, when, why... whatever. I've yet to try out ASP.NET because that scares the bejeezus out of me. I still write in ASP classic simply because I know what the heck it's doing. For WinForms, though, I use C#.

    Actually, you just have to have a look on the page source of this forum.

    These two articles give a good overview about the whole postback/viewstate technique. I'm sure the whole thing was developed by very intelligent people with great ideas (as "Let's forget everything about how the web works and develop web pages as if they were stateful applications! Then we can get the limitations of both for the price of one!"). Unfortunately, at least according to the articles, there are not many other people who understood those ideas, leading to massive abuse of an already warped concept.



  • @PSWorx said:

    @AbbydonKrafts said:
    @Daniel15 said:

    You serious? That's "normal" ASP.NET insanity? I've never used ASP.NET so I didn't know. Surely MySpace's way of doing it is not normal, though? They've got a hidden form called "aspnetForm". When a page link is clicked, it sets two variables (__EVENTTARGET and __EVENTARGUMENT) and submits this form. If this is normal, I'll probably never touch ASP.NET. Whoever designed it likes that seriously needs to rethink things. What ever happened to having a GET variable called "page"?



    Yes, that is normal. It's so the backend event processing can happen. If you look at any Visual Studio produced aspx page, you'll see the same thing. The whole page is one big form. Everything in it acts as a button. So, they all route through the same script with identifiers of what, where, when, why... whatever. I've yet to try out ASP.NET because that scares the bejeezus out of me. I still write in ASP classic simply because I know what the heck it's doing. For WinForms, though, I use C#.

    Actually, you just have to have a look on the page source of this forum.

    These two articles give a good overview about the whole postback/viewstate technique. I'm sure the whole thing was developed by very intelligent people with great ideas (as "Let's forget everything about how the web works and develop web pages as if they were stateful applications! Then we can get the limitations of both for the price of one!"). Unfortunately, at least according to the articles, there are not many other people who understood those ideas, leading to massive abuse of an already warped concept.

    it is horrible (i do use it every day)

    i just wonder what is the alternative :

    - coldfusion, nice but has its quirks (version 8 is great, fixed v7 bugs, but i'm waiting to test it and find new ones) ? (I use it every day as well, check the I-hate-coldfusion-club post in the oracle forum for CF rants)

    And free alternatives :

    - JSP - not so shiny
    - php - i have used it, and it was nice, but in my opinion, it is still not in the rank of CF or .NET when it comes to server management ?
    - perl, python ?
    - ruby on rails - tried it, scaffolding is nice - but i do not need it, nice active record - but not for complex joins, great plugins though
    - Struts ?

    what are your impressions and recommendations ?
    what would you recommend to a startup web application development firm ?



  • @Nelle said:

    it is horrible (i do use it every day)

    i just wonder what is the alternative :

    - coldfusion, nice but has its quirks (version 8 is great, fixed v7 bugs, but i'm waiting to test it and find new ones) ? (I use it every day as well, check the I-hate-coldfusion-club post in the oracle forum for CF rants)

    And free alternatives :

    - JSP - not so shiny
    - php - i have used it, and it was nice, but in my opinion, it is still not in the rank of CF or .NET when it comes to server management ?
    - perl, python ?
    - ruby on rails - tried it, scaffolding is nice - but i do not need it, nice active record - but not for complex joins, great plugins though
    - Struts ?

    what are your impressions and recommendations ?
    what would you recommend to a startup web application development firm ?

    Java Server Faces (JSF) seems to be gaining popularity. It's still relatively new, but it's gaining in popularity and is quite nice to use - compared with JSP - if you can get round the quirks. Struts 1 is old technology, Struts 2 looks interesting but I haven't really looked into it much yet.

    Then, just to add the confusion, there's always Google Web Toolkit (GWT)! 



  • @PhillS said:

    Then, just to add the confusion, there's always Google Web Toolkit (GWT)! 

    I never heard about it, thanks for the tip, looks pretty new and shiny ... me likes shiny things ...  



  • ""what are your impressions and recommendations ?
    what would you recommend to a startup web application development firm ?""


    Since your already on .net have a look at Asp.Net MVC. Viewpages instead of pages, much lighter. The url handling stuff is pretty nice. As many forms as you want on a page (finally!). Ability to mix webforms and MVC where necessary without infecting the new MVC code with viewstate and such.

    The only downsides I can see over regular asp.net are its impositions of REST type architecture. Although in my case thats an advantage, but depending on what your doing I could see it being a bit restrictive. Also it requires .net 3.5 and (currently) the asp.net futures install.

    ScottGu does a better job of explaining it than i ever could.

    http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx

    replace 1 with 2/3/4





  • @Nelle said:

    @PhillS said:

    Then, just to add the confusion, there's always Google Web Toolkit (GWT)! 

    I never heard about it, thanks for the tip, looks pretty new and shiny ... me likes shiny things ...  

     From what I've heard (which isn't much, admittedly), it's even crazier - but it might actually work: Basically, they write their projects in Java with their own UI toolkit. Then they run it through a special compiler which generates the server-side code, the HTML/JavaScript front end, a no script fallback front end and the ajax to connect it all. The result is (said to be) an application like gmail that feels as responsive as if you had compiled your java project as a stand alone app.
     



  • @PSWorx said:

    @Nelle said:
    @PhillS said:

    Then, just to add the confusion, there's always Google Web Toolkit (GWT)! 

    I never heard about it, thanks for the tip, looks pretty new and shiny ... me likes shiny things ...  

     From what I've heard (which isn't much, admittedly), it's even crazier - but it might actually work: Basically, they write their projects in Java with their own UI toolkit. Then they run it through a special compiler which generates the server-side code, the HTML/JavaScript front end, a no script fallback front end and the ajax to connect it all. The result is (said to be) an application like gmail that feels as responsive as if you had compiled your java project as a stand alone app.

    The reality, as always, is more qualified. You can't just feed it any Java and get this result. As with most code translators of this form, you need to either understand how it works and code to the translator's behaviour, or follow strict rules written by somebody who did understand it.



  • @PSWorx said:

    The result is (said to be) an application like gmail that feels as responsive as if you had compiled your java project as a stand alone app.


    What's sad is I'm not sure if that's a compliment or an insult.



  • @Daniel15 said:




    Yes, occasionally a MySpace server will return a 404 on that request.

    Isn't that just normal IIS? 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.