Representative line



  • I'm doing some cleanup on an existing webapp, and found this gem implemented by the previous Java CMS expert who was frustrated about having to build the site in PHP. This was the layout code used for displaying the company logo throughout the site:




    [code]
    Site Home
    [/code]



  • It is now your duty as a web developer to find the author of this code and shoot him.



  •  I've seen a colleague do this to make form submit buttons work.

    Because, you know, it's not like HTML will do it for you.

    Thankfully he cut that out as soon as I pointed it out to him.



  •  I worked on converting a website from ColdFusion (a WTF in itself) to PHP and every single link in the site was like this. Apparently, before I'd joined the client (whose site it was) had asked my manager (a typical PHB) why the site came so low on search results pages, and my manager had told them that there was nothing that could be done to the site to improve it. Even forms were submitted with images as buttons with Javascript attached, and not a real submit or image input type to be seen.



  • I always maintain to my programmers: "write your code in the knowledge that the developer immediately succeeding you is a dangerous psychotic with your home address."

    Overcomplicating stuff like this brings on the red mist, it really does. Some people are still alive purely because it's illegal to kill them.


  • Trolleybus Mechanic

    @dynedain said:


    <font size="2" face="Lucida Console"> <a href="javascript: document.location='<?= $home?>';" class="header-logo">Site Home</a> </font>

    <font size="2" face="Lucida Console"></font>

     

    I can one-up you on that:

    @dynedain said:


    <font size="2" face="Lucida Console"> <a href="javascript: submt('home');" class="header-logo">Site Home</a></font>

    <input type='hidden' id='querystring_name' val='<%= Request.Querystring("name")' />
    <input type='hidden' id='querystring_id val ='<%= Request.Querystring("id") %>' />

    <script language="javascript"> // Yes, this is how the script tag is declared
     

       function submt(targ)
    {
       if (targ == "home")
       {
           document.location = '<%= Me.homeURL %>' + '?' + 'id=' + document.form.querystring_id + '&' + 'name=' + document.form.querystring_name + '';

       }
       else if ...// snip code blocks for each page that can be navigated to
       {

       }
       else
       {

           alert("here0"); // ??????????????????????????

        }

         return false;

    }

    </script>


     



  • @Cassidy said:

    Some people are still alive purely because it's illegal to kill them.
    That's going in the quote jar.  Thanks!



  • @Lorne Kates said:

    [snipped evil code]
    Holy hell, tell me the guy who wrote this no longer works there.



  • @ASheridan2 said:

     I worked on converting a website from ColdFusion (a WTF in itself) to PHP and every single link in the site was like this. Apparently, before I'd joined the client (whose site it was) had asked my manager (a typical PHB) why the site came so low on search results pages, and my manager had told them that there was nothing that could be done to the site to improve it. Even forms were submitted with images as buttons with Javascript attached, and not a real submit or image input type to be seen.

    Sorry but I have to butt in here. Bad programming has nothing to do with the language. I have seen some truly terrible code writtten in php and some great code written in coldfusion. Likewise I have seen the reverse. Lets stop blaming [insert language] because some idiot decided they could programme in it.

     

    Instead lets hunt down the original developer and deal with them "with extreme prejudice".


  • Trolleybus Mechanic

    @C-Octothorpe said:

    @Lorne Kates said:

    [snipped evil code]
    Holy hell, tell me the guy who wrote this no longer works there.

     

    Thankfully. His name is Bob, for liability reasons. To this day, I can explain any bug or project time overrun by simply stating "I ran into a Bob Special."

     



  • @codefanatic said:

    great code written in coldfusion
     

    No. I obviously agree that any programming language can be used well or poorly, but CF is that rare breed of language that cannot be used to write good code. There exists no good CF code.



  • @dhromed said:


    @codefanatic said:

    great code written in coldfusion
     

    No. I obviously agree that any programming language can be used well or poorly, but CF is that rare breed of language that cannot be used to write good code. There exists no good CF code.

    Personnaly I have seen good cf code. The problem with cf was always it was an enterprise targeted language which meant enterprisy developers used it. And then when the app was slow and buggy they used the excuse that it was CF's fault. It is not the languages fault that it made it easy to write code. It is our fault for accepting the excuse that you can't write good cf. ANY language can be used to write good code, but that does not make any developer capable of writing good code.

    Personally I would like to kill all the legacy CF apps out there and then refactor them in modern CF while simultaneously hitting the original developers over the head.


     



  • @Cassidy said:

    "write your code in the knowledge that the developer immediately succeeding you is a dangerous psychotic with your home address."


    I have just decided to email that quote around my team :-)



  • @Cassidy said:

    Some people are still alive purely because it's illegal to kill them.

    I think you meant "all people"... or maybe "all people, but especially politicians", or "everyone who is not already on death row"...



  • @ekolis said:

    I think you meant "all people"... or maybe "all people, but especially politicians", or "everyone who is not already on death row"...

    I'm pretty sure he didn't mean the incoherent mess you just posted.



  • @Lorne Kates said:

    I can one-up you on that:

    (snip)

    Or you can just check any code spat out by WebForms.



  • @MiffTheFox said:

    @Lorne Kates said:

    I can one-up you on that:

    (snip)

    Or you can just check any code spat out by WebForms.

    If it was meant to be read by humans, I would agree with you...


  • @codefanatic said:

    It is not the languages fault that it made it easy to write code.
     

    It's the language's fault for using the shittiest syntax. It is like this hideous in-vitro conceived prematurely aborted clone of Algol and SGML. It is a few shift-number characters removed from being a esotheric anti-programming language like Malebolge or XSLT.

    Please do not take this from me! Then I would have nothing onto which to freely pour all my hate and it would leave me an empty husk of my former self.



  •  @dhromed said:

    @codefanatic said:

    It is not the languages fault that it made it easy to write code.
     

    It's the language's fault for using the shittiest syntax. It is like this hideous in-vitro conceived prematurely aborted clone of Algol and SGML. It is a few shift-number characters removed from being a esotheric anti-programming language like Malebolge or XSLT.

    Please do not take this from me! Then I would have nothing onto which to freely pour all my hate and it would leave me an empty husk of my former self.

     Then I better not tell you that it now has a normal syntax mode so you dont have to use the sgml type syntax anymore....

     



  • @codefanatic said:

    Bad programming has nothing to do with the language.

    Indeed. The skill is not in the tool itself, but in those that wield it.

    (flipside: bad workman... etc)

    @codefanatic said:

    Instead lets hunt down the original developer and deal with them "with extreme prejudice".

    From orbit. It's the only way to be sure.



  • @codefanatic said:

     Then I better not tell you that it now has a normal syntax mode so you dont have to use the sgml type syntax anymore....
     

    YOU TOOK IT.

    YOU TOOK IT FROM ME.


Log in to reply