• (cs)

    While I can't say that I haven't built classes that encapsulated HTML tags (and aggregated them), I can surely say that I haven't done that.

    I'd almost suspect some sort of code generator to be in use here--other than a human being, that is.

  • Fluffy (unregistered)

    The reason Im a gamedev instead of a web... whatever. ;)

  • J (unregistered)

    Ah, if only they used Frontpage :).

  • EV (unregistered)

    I have to admit... I sincerily RESPECT the person who can write such code and actually finish it, making it do something remotely what it should do...

  • (cs)

    maybe deliberate obfuscation?

  • (cs)

    Alex Papadimoulis:
    <font color="#000099">function</font> BoxB66()
        response.Write (<font color="#990000">"</table>"</font>)
        <font color="#009900">'response.Write ("</td></tr>")
        'response.Write ("</table>")</font>
        <font color="#000099">call</font> BoxBEnd()
    <font color="#000099">end function</font>

    This alone makes me scared to think of what the rest of the application looks like.

    Are the concepts of "using names that make sense" and "not burying the actual functional code behind thirty layers of obfuscation" completely lost on some people?  Call me crazy, but if I'm designing a system, I want to be able to...you know...remember what the hell a certain function is supposed to do, much less make sure that anybody else that might inherit my project be able to figure out as much without spending three weeks following the spaghetti.

  • KattMan (unregistered)

    <font color="#000099">function</font> BoxB66()

    Wow, shall we call this the BINGO programming pardigm?  All you need is boxO78 inside G65 withing N57 contained from I34 inherited by B12 and you will have a working one cell one row grid.  Want two rows, you need box G71 instead.  Of course none of this will be commented and you are only allowed to stick boxes together in the order they are called by the random box picker.

    Captcha=random as in randomly add boxes until you spell BINGO

  • (cs) in reply to ammoQ

    Looks like a job for AutoCAD.

  • JamesB (unregistered) in reply to EV

    Anonymous:
    I have to admit... I sincerily RESPECT the person who can write such code and actually finish it, making it do something remotely what it should do...

     

    I too respect the person who CAN do this.  I hate the person who WOULD do this though.

  • (cs)

    I'm used to seeing WTFs that are the result of

    • laziness
    • incompetency
    • ignorance

    But to do this...  It actually would require hard work, and maybe reams of notes, to produce a simple web page.

  • Beavis (unregistered)

    Heh, that's pretty bad. However...

     I once worked at a company that had been doing fairly large scale web development since 1994 or so - certainly one of the first on the scene. While I didn't get there until several years later, it was obvious they hadn't moved too far from their roots. They used such modern niceties as Oracle Pro*C, including compiled (custom - eg not perl, php, etc) binaries to run certain websites. But one of their better innovations was a scripting language developed in house (more or less like PHP), coupled with another in-house pseudo-scripting/templating language that let designers work on pseudo-valid HTML pages without breaking the developers' code. Oh, and lest I forget, there was yet another in-house scripting language that was just like the first one, except using reverse polish notation. Apparently the "Tools Development Guru" found this method much more elegant than the original.


    Anyway, for my first project there, I was charged with making a few small changes to an order form. This required changing the reverse scripting language code, since this generated the regular scripting language code. I forget exactly why this was "necessary", but the basic premise was that it took less time to do it this way than to write in the normal scripting language in the first place. Then (you saw this coming, right), the "normal" scripting language code generated the pseudo-scripting/templating language code. In other words, the whole point of this last scripting language was so that designers could work on the pages without breaking them, but, the templating code wasn't actually generated unless you ran the entire application....I wtf'ed my way out the door a few months later.

  • 4tehwin!!! (unregistered)

    now THAT is enterprisey

  • Someone (unregistered) in reply to EV

    Just curious - if this was a Java/C++/C#/... IDE, you could just ctrl-click your way from one 'function' to the next, regardless of the useless names.

    Does such a beast exist for this sort of 'code'?

  • BG (unregistered)

    No doubt a mainframe programming background.

  • Todd Hile-Hoffer (unregistered)

    As an asp.net developer, at my current position all of our style info is located in css files in one or more of our app_themes! So some of us actually do use css properly. Of course, ASP.Net 2.0 makes life so easy that I often run out of work to do.  Include files are poo. I feel bad for the poor guy who has to maintain that site.

  • (cs)
    Alex Papadimoulis:

    ...

    <!--#INCLUDE FILE="includes/box0.asp" -->
    <!--#INCLUDE FILE="includes/box.asp" -->
    <!--#INCLUDE FILE="includes/box2.asp" -->
    <!--#INCLUDE FILE="includes/box3.asp" -->
    <!--#INCLUDE FILE="includes/box6.asp" -->
    [ ... snip ... ]
    <!--#INCLUDE FILE="includes/boxF.asp" -->

    But the boxes are numbered in hex. Doesn't that prove the original developer was a real programmer to whom we all must bow down?

    --Rank

  • (cs)

    It's not so bad...I did the same thing once.  I kept forgetting what the stupid closing tag for <table> was, so I just wrote up a super neat function to remember it for me.  Just in case...</sarc>

  • (cs) in reply to R.Flowers
    R.Flowers:

    I'm used to seeing WTFs that are the result of

    • laziness
    • incompetency
    • ignorance

    But to do this...  It actually would require hard work, and maybe reams of notes, to produce a simple web page.

    I actually kind of disagree ... I think that most of the time, the person creating the WTF is working a hell of a lot harder than the person simply using best practices.  That's kind of the very definition of what a WTF is:  doing things that are simple in a very unnecessarily complicated and convoluted way.

  • CoderDude (unregistered)

    <table type="wooden">
        <script>
          TakePicture();
       </script>
    </table>

  • (cs) in reply to Fluffy

    Anonymous:
    The reason Im a gamedev instead of a web... whatever. ;)

     

    Where do you work/what have you worked on??

     

    Game development always interested me but I hear its very competitive and my math skills aren't up to snuff.

  • (cs) in reply to ammoQ

    ammoQ:
    maybe deliberate obfuscation?

    That's what I thought: some PHB said, "Oh, and make sure that nobody can steal our web page. I don't care what you have to do, but make sure that our competitors can't just steal our source code."

     

  • ben (unregistered)

    What on earth does CSS have to do with any of this? The first paragraph might as well discuss the mating habits of the aardvark for its relevance to the code.

     

     

  • (cs)

    Wow. That's worse than GIF webpages!

    Wait - that's XHTML Transitional with a correct DOCTYPE. Laudable! Doesn't validate though.

    Disclaimer: If this posting looks fucked, itt's because TDWTF does not allow me to preview using Firefox on Mac OS X. grrrr

  • anonymous (unregistered) in reply to Digitalbath

    Obviously, the original developer had built a framework, which, if Philip had been smart enough to understand, would have made everything very easy.  Also, the OD probably thought, anyone who wasn't smart enough to understand the framework, would be frightened away from the code and, therefore, stupid people wouldn't touch it and the code would work forever.

    Unfortunately for the OD, poeple like Philip have nothing better to do than plow into things which they do not understand.

  • foonly (unregistered) in reply to Saladin
    Saladin:

    Alex Papadimoulis:
    <font color="#000099">function</font> BoxB66()
        response.Write (<font color="#990000">"</table>"</font>)
        <font color="#009900">'response.Write ("</td></tr>")
        'response.Write ("</table>")</font>
        <font color="#000099">call</font> BoxBEnd()
    <font color="#000099">end function</font>

    This alone makes me scared to think of what the rest of the application looks like.

    Are the concepts of "using names that make sense" and "not burying the actual functional code behind thirty layers of obfuscation" completely lost on some people?  Call me crazy, but if I'm designing a system, I want to be able to...you know...remember what the hell a certain function is supposed to do, much less make sure that anybody else that might inherit my project be able to figure out as much without spending three weeks following the spaghetti.

     

    I think it's pretty clear that obfuscation is the point in this case.  The designer wanted job security.  I am kind of curious what is in BoxB01 - BoxB65, tho.

  • Anna Knee Mouse (unregistered)
    Little boxes on the hillside
    Little boxes made of tickytacky
    Little boxes on the hillside
    And they all look just the same.
  • (cs) in reply to Todd Hile-Hoffer

    Anonymous:
    As an asp.net developer, at my current position all of our style info is located in css files in one or more of our app_themes! So some of us actually do use css properly. Of course, ASP.Net 2.0 makes life so easy that I often run out of work to do.  Include files are poo. I feel bad for the poor guy who has to maintain that site.

    Sounds like a job ripe for outsourcing. 

  • (cs) in reply to Jeff S

    That or it started out as a good idea to the developer and just became insanely WTFish to keep up with.

  • (cs) in reply to Digitalbath
    Digitalbath:

    It's not so bad...I did the same thing once.  I kept forgetting what the stupid closing tag for <table> was, so I just wrote up a super neat function to remember it for me.  Just in case...</sarc>

    <elbat>

    <elbat>

    WTF?! This works fine in bash, whysn't it work in HTML?

  • pete (unregistered) in reply to anonymous
    Anonymous:

    Obviously, the original developer had built a framework, which, if Philip had been smart enough to understand, would have made everything very easy.

     

    Admit it, you are the original developer 

  • Dazed (unregistered)
    Anonymous:
    The only way this could be kept track of is if it was automatically generated, but who the blazing heck would write a system to generate code like this?

    If there was any justice in the world the perpetrators of things like this would be identified on the web with name and photo, so that they could be avoided like the plague. Also in the interests of justice they would be allowed - nay, required - to write a short piece explaining what on earth was going through their head at the time. At worst it would provide some more unintentional humour.

    I fear I may have encountered the birth of a similar mess. It's an authoring tool that generates HTML. Well, supposedly it does. It mainly generates Javascript which then extrudes some HTML-like stuff. I can envisage an economy measure scrapping the licences for said tool, and some poor sod having to maintain the generated mess. Oh and of course it's all frames-based, so on an Intranet containing thousands of pages, no-one can bookmark anything.

  • (cs)

    A Rube Goldberg device for generating a web page.  Fascinating.

  • sVB_Enterprise_Specialist (unregistered)

    The real WTF TM is that this system didn't grind to its knees in production!  If this page/site literally loaded up hundreds of files from the web server (IIS?), per page request, the I/O must have been horrible.  To what level will IIS/Apache handle these nested file loads... before performance is as exciting as mud?

     

    If I understand correctly, none of this could even be cached, because each included file is also processed (e.g. not a static include)

     

  • (cs)

    <sarcasm>

    The true WTF is that there is a box.asp as opposed to a box1.asp. I mean, C'MON ppl!

    </sarcasm> 

    ...

    ...

    ...

    Lately I've found that I have not much to say? Bheh.
     

  • Kooky Koder (unregistered) in reply to sVB_Enterprise_Specialist

    They missed the meeting on "thinking outside of the box"!

    captch=whiskey  = what the dev had way too much of...
     

  • anonymous (unregistered) in reply to pete
    Anonymous:
    Anonymous:

    Obviously, the original developer had built a framework, which, if Philip had been smart enough to understand, would have made everything very easy.

     

    Admit it, you are the original developer 

     

    And, of course, the framework can't be documented, because that would spoil the "IQ Test" property of the framework.

  • (cs)

    This reminds me of a website redesign I've seen lately. All of the pages used asp so I assumed "Hey, maybe it'll be DB based, or time sensative, or something dynamic." As it happens, they just didn't know about server side includes, and also thought it was easier to change "<%dim PageTitle = "page title"%><title><% = PageTitle%></title>" than to just change the title...

     

    Sometimes I hate websites. 

  • (cs) in reply to mouseover

    > look

     You are in a maze of nesty little boxes, all alike.

    > wtf?

     Talking to yourself is a sign of impending mental collapse.

    > wear goggles

     They do nothing. 

    > hide under desk

     It is dark. You are likely to be eaten by a grue, or possibly a project manager.

    > quit

     If only it were that simple. You are in a maze of nesty little boxes, all alike...

  • merreborn's nemesis (unregistered) in reply to Fluffy

    Anonymous:
    The reason Im a gamedev instead of a web... whatever. ;)

     

    We all wish we could be game devs ;)  or at least I do, but that doesn't remove all stupidity!

     

    Though I have to agree with you:  web programming == stupid

    It's like someone deliberately made internet languages retarded.  What's the point of having structured code if you are required to utilize 400 languages???

     

    hahaha:  CAPTCHA:  paula (like the bean!)

  • SHO (unregistered) in reply to Anna Knee Mouse
    Anonymous:
    Little boxes on the hillside
    Little boxes made of tickytacky
    Little boxes on the hillside
    And they all look just the same.

    Weed obviscation

  • Kai MacTane (unregistered)

    Zemlya wrote:

    >[image of Magic: the Gathering card, with "the Goggles" as a Legendary Artifact]

    I can't believe nobody has yet commented on how fabulous that image is. I want to rejoin an M:tG group and get a physical, real-world card like that, jsut so I can play it in the middle of a game and have everyone go "OMGWTFBBQ?" .

    I want to have that Magic card's babies. It is that cool.

     

  • (cs)

    What's the generally-accepted programming term for the idea that a process that begins in one file or function should complete within the same file or function?

     'Cause this dude just reminded me of why that concept is not to be trifled with.
     

  • merreborn's nemesis (unregistered) in reply to John Bigboote

    John Bigboote:

    What's the generally-accepted programming term for the idea that a process that begins in one file or function should complete within the same file or function?

     'Cause this dude just reminded me of why that concept is not to be trifled with.
     

     

    The generally-accepted programming term is:  sanity! 

  • (cs)

    H T M HELL!

  • (cs)

    oh swell - open the box containing the box of the box based on this boxes' internal box

    I ran into a index card once: similar scenario but you had to shuffle the index cards

    whenever you wished to edit/delete information where some of the indexed cards were marked "do not use, use index card [parameter].  so you ended up shuffling, and shuffling, and shuffline, to input basic contact information where each index card updated the database in the codebehind of the web page holding the index card.  All of this in the web paradigm of server side execution vs. client side execution.

    :)

  • (cs) in reply to Rank Amateur
    Rank Amateur:
    Alex Papadimoulis:

    ...

    <!--#INCLUDE FILE="includes/box0.asp" -->
    <!--#INCLUDE FILE="includes/box.asp" -->
    <!--#INCLUDE FILE="includes/box2.asp" -->
    <!--#INCLUDE FILE="includes/box3.asp" -->
    <!--#INCLUDE FILE="includes/box6.asp" -->
    [ ... snip ... ]
    <!--#INCLUDE FILE="includes/boxF.asp" -->

    But the boxes are numbered in hex. Doesn't that prove the original developer was a real programmer to whom we all must bow down?

    --Rank

     

    I'd bet even odds that there's a boxG.asp somewhere in there.

     

  • Harry (unregistered)

     

    This is the work of a true genius! Clearly whoever put this site together wrote a templating system that generated this code from a high level page description language, and when laid off took the template system with them to tweek the employer.

     The original page definition code was probably something like:

    \set {theme=catalog}
    \set {pagination=true}
    \include {navigation=rightside}
    \table { \row { "A","b","c,"d","e" } , {next.catalog{rows=30}} }
    \include {footer}

    Editing the pages theselves is like trying to edit a sendmail.cf file when you should be editing the .mc file. The problem in this case is that you don't have m4.

     

  • Jonathan Allen (unregistered) in reply to sVB_Enterprise_Specialist
    Anonymous:

    The real WTF TM is that this system didn't grind to its knees in production!  If this page/site literally loaded up hundreds of files from the web server (IIS?), per page request, the I/O must have been horrible.  To what level will IIS/Apache handle these nested file loads... before performance is as exciting as mud?

     

    If I understand correctly, none of this could even be cached, because each included file is also processed (e.g. not a static include)

     

    Actually it isn't much of a problem. In ASP, you get an "engine" for every page. That engine contains the parsed script with all of its include files merged in. As long as you have plenty of memory, only the first page hit is expensive.

    And with the size of those files, the OS disk caching should  help a lot too.

  • (cs)
    Anonymous:
    Anonymous:

    Just curious - if this was a Java/C++/C#/... IDE, you could just ctrl-click your way from one 'function' to the next, regardless of the useless names.

    Does such a beast exist for this sort of 'code'?

    I built a tool that does this. If anyone wants a copy, contact me a [email protected].  

     

     

     

    You are what some might call an enabler.

    ;) 

  • hack-o-matic (unregistered)

    I see an easy fix..CTRL+H!

    Find:<!--#INCLUDE FILE="includes/box3.asp" -->

    Replace with: box contents (i.e. </table>)

     Eventually you will unbox everything and have a..err...better...place to start.
     

Leave a comment on “Boxes And Boxes Of Boxes”

Log In or post as a guest

Replying to comment #:

« Return to Article