- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The scariest part of this is that the function only outputs a close table tage and then calls onether function who in the hell writes code like that? My guess is that all of this was written by a point and click programmer. I shudder when reffering to them as a programmer. This guy needs to spend some time behind the scenes using some good ol' WYGIWYG tools.
For the uninnitiated:
WYGIWYG = What You Get Is What You Get. Example: Vi, notepad, emacs
Admin
It means, as opposed to good design where content is kept separate from layout by leveraging the power of CSS (I like the verb leverage, it's very enterprisey) the following example does the exact opposite. It uses code with obfuscation to output HTML in the most unmaintanable fashion possible.
The first paragraph introduces the notion of 'best practices' and the rest of the post explains the WTF.
The real WTF now is that I'm interested in mating habits of aardvark.
Captcha: poprocks, indeed.
Admin
you see so many posts around the net about how you shouldn't use frontpage for your webpages because it'll produce crappy code, or don't use the save to .htm feature of ms word because you'll end up with so much rubbish... but seriously, as bad as FP and MSword are for html, I've never seen them do anything like this before.
Admin
I think I just vomited a little in my mouth.
Yech.
-D
Admin
Nonono, there's nothing wrong with that! You see, once upon a time, that was ugly code, but now it has been refactored with A LOT of "extract method"s. Do you see the beauty of it now?
--
Why can't I copy-paste the CAPTCHA?
Admin
The code it outputs still looks like normal HTML... no obfuscation here. No one will see that ASP code anyway.
Admin
So, did you find the tool usefull, when writing the webpage and keeping track of Box.asp-BoxB66.asp? :)
Admin
It's more like this: the person creating the WTF is at first too lazy to do it right, and then forced by deadlines and higher-ups to work much harder to get it to work at all.... And then doesn't learn from this experience, of course.
Admin
I know this isn't an English usage website, but I always love seeing people criticise other people for their "incompetency". I'd do something to combat it, but I suffer from impotency in the face of their ignorancy.
Admin
Are you sure they didnt just want to draw a sheep?
Admin
It's simply the result of an inability or unwillingness to take a step back, look at an idea you've had, and realize as well as admit to yourself that it's complete rubbish. Some people witll go to great lengths to rationalize to themselves why their rubbish ideas are great. There's most likely a system behind the box numbers, and whoever came up with it thinks it's essential that the "box" names contain this (most likely rather unimportant, like the order in which they were written) information. Oh, and of course it's a "modular design", that's great too!
I once saw someone post a benchmark that was pretty damn obfuscated, which used some sort of extreme hungarian notation, with all variables consisting solely of type, size and other technical information, a counter and NO semantic information. That guy though it was the best thing since sliced bread.
Admin
Oh, that is truly funny (speaking as someone who is old enough to have actually played Adventure on a mainframe...)
Admin
Asshole.
1st you make me ROTFLMAO.
THEN I have to TRY to explain why I am laughing so hard to my non-computer, much less programming-literate wife!
( after a 10 minute set-up, she laughed too )
( I think it was a pity laugh... )
Admin
Wow! It's like I've gone back to MS Commerce Server 2000 all over again!
(MS Commerce Server 2k was "Classic" ASP, and used an include called "HTML_Lib.asp", that was filled with functions that looked like this:
It was hell, I tell ya!
Admin
Can't help but notice all the end tags.
I suspect this was an (overly) designed effort to support *upgrading* from HTML to XHTML at some future point. The developer probably started out with an include file for each </tag> but soon realized the performance hit, and started constructing shortcut includes that embodied specialized nested tables, based on page geometry. ...Thus a proliferation of nested-tag closure files.
I also suspect that a matching opening <tag> file exists for each nested configuration.
I've used tag libraries that functionalize common HTML tags which facilitate building HTML dynamically effectively. For instance - in a loop where the number of cells or rows of a table is unknown. However, all the tag functions were contained in a single file.
But this...specialized nesting... is a goofy approach.
Admin
It's called structured programming. And I agree with you :)
Admin
It's like something you'd see in a Lovecraftian horror story. I mean, it was surely generated by a poorly designed code generator, but still.
Admin
This comment is brilliant. Truly brilliant.
Admin
Be careful. A comment similar to that spawned mudsh.
Admin
No, this is worse than bingo. I can tell that you've never played it from thinks like having the number 78, or G having 65. At least in bingo, certain numbers are only under certain numbers. For bingo, its 1-75, with 15 numbers allocated to each letter. B=1-15, I=16-30 and so on.
Admin
Humm... a bunch of functions?
You can do that:
$ cat includes/box*.asp > includes/toolbox.asp
Remove the includes and add
I have a problem here, but maybe is rooted on the original article.
Admin
Hahaha!
Nezt time they'll think twice before forcing me to work on boxing day!
Admin
The verbosity of HTML combined with all the readability of assembly. Compiled assembly. Viewed as bitmap images.
Brillant!
On a more serious note, a sensible way to produce this kind of code would be to:
1. Steal the code from your competitor
2. Run it through a parser, generating a syntax tree
3. From the syntax tree, generate one function for each node in the tree, one file for each original function and another container file for each original file.
4. The competitor now has no chance in hell of proving that this code is stolen from them, but I guess some string constant put into the generated HTML that says "Copyright (C) The Other Company" might still be left in there for the sake of truthiness!
(Insert frivolous amounts of printing and putting on wooden tables before and/or after any or all steps, at will)Admin
From a box?
Or from a hat?
Admin
Tables for formatting. Urgh!
Admin
I wonder if this code was generated by civil cervants because they tend to use the same kinda obfustication. You need form 310a-61x7 if you have already filled in form 7231b6 unless you haven't filled in form 299g-87237k1-g36 in which case you should use form 42-n3728-f3f ...
I also don't see why boxes are numbered like box0, box1, boxF... I would definately opt for more characters like box00, box01, box0F... In that way you can have up to 256 boxes and still have a nice alphabetical order.
By the way, I have seen code like this in my time ...
function startTable() {
print "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
}
function endTable() {
print "</table>";
}
... snip ...
<b>Here is some data</b><br />
<?php
startTable();
?>
<tr>
<td>blah</td>
<td>blah</td>
<td>blah</td>
</tr>
<tr>
<td>blah</td>
<td>blah</td>
<td>blah</td>
</tr>
... snip ...
<?php
endTable();
?>
<!-- more html -->
Coditor
Admin
This WTF is like matryoshka dolls, because there is a smaller WTF inside the big one : BoxB66 is closing a table, then the cell enclosing the table, then the line enclosing the cell, then ... a table!
A table tag inside another table tag : a common little webby WTF inside this boxes WTF.
Alex seems to have invented the "matryoshka WTF"
Admin
You know, I think you've got it.
On another thread - I vaguely remember the original 'Wooden table, take picture' WTF but I can't find it in the archives - anybody got a link for it?
Admin
"If only they had used FrontPage"??? If only they wanted to make it EVEN worse!
Admin
I want to be an ignorancer when I grow up. Think of the power.
Admin
No. Real programmers use octal.
Admin
Ah the Honeywell 316 - with near-ASCII too.
Admin
Nothing big though yet still enough to have seen some radical approaches to programming.
And all you really have to get up to snuff on is vector and matrix algebra. (And there are lots of books that approach them from a gamedev view so its easier than the pure mathematicians approach). And to make it even better, you dont even have to know math do do game dev stuff. Sure, you wont be on the geometry or rendering team, but someone has to do the networking, server and level editor. :)
Admin
I wonder where my quote went.
Well, in reply to the dude that asked what I'd worked on and generic stuff on game dev.
Admin
WYGIWYG? I always prefered the expression YAFIYGI (You asked for it; you got it), with the 'tough' implied. If a 'programmer' cann't handle a YAFIYGI tool, they cann't programme.
Admin
It was so good I'm reading it now.
Admin
more likely created by a monty python character....
<font size="1">Humphrey: I do wish you'd listen, Wymer. It's perfectly simple. If you're not getting your hair cut, you don't have to move your brother's clothes down to the lower peg. You simply collect his note before lunch, after you've done your scripture prep, when you've written your letter home, before rest, move your own clothes onto the lower peg, greet the visitors, and report to Mr. Viney that you've had your chit signed.</font>
Admin
boxes? I see no boxes!
Admin
Anonumous user wrote:
Admin
Unfortunately for serious web developers, developers like the OD who obviously haven't understood how to use HTML and CSS appropriately have nothing better to do than develop such nonsense.
Admin
talking about obfuscation, you should take a look at GXPortal and its parent and child applications GeneXus and GX Theme Editor...
just look at the code it generates (GXPortal homepage is a good sample) and drool at the state of the art obfuscation, coupled with 1998 state of the art HTML and over-redundant generated CSS to encourage a state of the art boxes-of-boxes approach.
and all this in a nice thirty-something thousand dollars package ^_^
Admin
i could have been blind and predict they are using VB. It was out of the question.
After one mid-sized VB project some months ago that i had to take care of, i now truly can stand up and laugh at any VB Coder. Not because of prejudice, but because of proof.
I forgot the syntax, so keep it if you have corrections... :D
-- snip---
Dim Integer(20) intarr Console.WriteLine("Length: " & intarr.Length)
-> Length: 21
--snap----
best regards
Admin
Ok, I think this is a 50/50 chance I saw this being built by my coworker back in 1999. It was at a large company and it was ASP. This guy, for some reason, thought that he should build all the html functionality within the asp vb code. He gave us a presentation of his code, which he had spent quite some effort building, and we all just rolled our eyes. "Who would want to maintain this monstrosity?" "Why did he 'reinvent' asp html?"...
I left that contract after 6 months and the last I heard the whole team had been fired except for him because no one could maintain his code and his system was deemed an essential reporting application.
Admin
Someday, possibly after the heat-death of the universe itself, people will realize that the plural of "anecdote" is not "data"
I suspect that once that happens, we'll all be better off.
Admin
<font face="tahoma,arial,helvetica,sans-serif">Fixed that for you... You wouldn't want to confuse <font face="tahoma,arial,helvetica,sans-serif">him </font>as to which box you're refering right?
</font>
Admin
How about a little out-of-the-box thinking?
Admin
Wow, with all these boxes we just need a hotline to the banker and we've got ourselvs a gameshow.
"I'm ready for the question Noel..."
Admin
Yes, no-one shoud ever split a function / class into multiple files. That is just wrong. Like not thinking of splitting >1000 line code into seperate classes.
Perferably, one file shuld also contain only one programming language, something that seems impossilble in web design.
Which makes me happy never to have done a web project for money....
Admin
gnaaah! I'm blind. I will disable the view source function in my firefox immediately. Nothing good can come from this...
CAPTAHA: whiskey ... now that you mention it ...