

1's and 0's - m0th87
http://thedailywtf.com/Articles/1s-and-0s.aspx

======
piramida
Beautiful code! I mean, if you program for an enterprise, one of the ways to
secure your job is to generate few hundred thousand lines of crap like that
and have enterprise heavily use the end product (you need to make it work
first).

Then you will become indispensable. Managers will never know if your code is
unmaintainable because software you wrote is inherently complicated or because
you are an "awesome" programmer. New coders hired to maintain your codebase
will admit failure quickly, or propose costly "total rewrites", so it becomes
cheaper to keep you around.

Sadly, all this from experience on the receiving end. We ended up throwing
away similar code and firing original developers, but we spent ungodly amounts
of time at meetings first.

~~~
noonespecial
Its a perfect storm. Lots of lines of LOC indicating massive productivity,
complete unintelligibility to other coders indicating your rock-star status,
and a completely intractable architecture guaranteeing your job security.

WTF clueless or diabolically brilliant?

~~~
webmat
"lines of LOC"? Is this a new recursive definition for LOL?

~~~
noonespecial
Sadly, its a word for word take of a little pamphlet on productivity I got on
the first day of a consulting gig in 2003. At first I thought it was
hilarious, then I tried to explain it to them, then I took to using it
ironically like a grown man in Vision skatewear, then in a sad bit of learned
helplessness it stuck in my brain, emerging to embarrass me on this future
date.

I am ashamed.

------
Aaronontheweb
I would love to see the execution plan for that Regex-heavy SQL query. I'll
send it to our DBA if he's ever having a bad day and needs a reminder of how
bad things can be elsewhere ;)

~~~
arnorhs
Actually, I think many DBAs would love a problem like this, because there is
soo much room for optimization. You could make this thing run much faster.

Of course, then you'd just be making a piece of shit work faster....

------
dkimball
Just to set the record straight, Caché -- which is the last man standing of
MUMPS packages at the present day -- includes support for bitmaps.

It also contains support for everything else from AJAX to the kitchen sink,
since it originates with several independent (and competing) OS/programming-
language/database systems, originating in the late '60s before worse-is-better
ate everyone's lunch. It even works as a RAD environment (plus a webserver, an
SQL database, an OO programming language, and a go-between for other systems'
incompatible message formats): very unusual (I expect the kitchen-sink module,
or perhaps the mail reader, in the next version), but not primitive.

Its reputation is sullied by some WTF-worthy users, and by old coding
conventions (now less completely abandoned than they should be) that were like
Perl but hard to understand.

Full disclosure: I work for Intersystems, but not in Sales, and this post is
purely on my own initiative. (One does not pay people to make unflattering
comparisons with Perl.)

~~~
rdtsc
> It also contains support for everything else from AJAX to the kitchen sink
> ... It even works as a RAD environment (plus a webserver, an SQL database,
> an OO programming language, and a go-between for other systems' incompatible
> message formats.

Sorry but that sounds like a Frankenstein monster type of
language/sdk/database. Now I am more scared of it than before ;-)

------
SandB0x
Has a company ever sued any TDWTF submitters, or is the code just too
embarrassing to be associated with? I've seen a fair amount of crazy code like
this in the wild, but haven't had the balls to submit, even after some
obfuscation.

------
DCoder
Been there, seen that, all I got was this lousy t-shirt.

From the system I maintain:

    
    
      /*
     e - ExternalStatus
     i - InternalStatus
    
              e\i  |   D    F     N   X
              --------------------------
              D    |   A    B     C   D
              F    |   E    F     G   H 
              N    |   I    J     K   L
              X    |   M    N     O   P 

*/
    
    
      switch( $inst->Status ) {
       case 'A' : 	case 'D' : case 'M' :
        $stats['d']++; break;
       case 'E' : case 'F' : case 'G' : case 'H' :
       case 'B' : case 'J' : case 'N' :
        $stats['f']++; $stats['d']++; break;
       default : $stats['n']++;
      }

------
grandalf
I'd love to see anyone's examples of code that is actually beautiful but
equally ungainly/unnecssary. I've seen Ruby metaprogramming / monkey patching
used in ways that are equally unmaintainable, but also fail to set off such
obvious alarms.

------
wdewind
wow with the exception of the server in the women's bathroom, this has got to
be the worst dailywtf ive ever seen

~~~
Janteh
Here's the link to the story about the women's bathroom, for people who are
also interested: <http://thedailywtf.com/Articles/The-Stalled-Server-
Room.aspx>

~~~
Aaronontheweb
That is the funniest thing I have ever seen.

------
webmat
The person apparently knows about the mvc pattern thoug. There's a controller
in there!

Still deserves death, though

------
mkramlich
There are things on the Internet that, once seen, cannot be unseen. This is
the programmer's equivalent of that.

------
arnorhs
No wonder why PHP devs get such a bad rep, when stuff like this exists...

------
one010101
Reminds me of a client who wanted to know why the program took so long. "I
mean, it's all just 1's and 0's, right? he said. I think he was serious, too!

~~~
dasil003
Show him <http://aturingmachine.com/index.php>

That'll shut him up.

------
lanstein
wtf indeed.

~~~
lanstein
Good old HN. It's so easy to predict what will happen to a comment like this -
in this case, +1 because it's mildly witty compared to the other comments, -1
because someone feels like it shouldn't be upvoted, and another -1 because
it's at the bottom or is now relatively content-free compared to the newer
posts. Will probably settle around 0 or -1, depending on how long the post
stays on the front page. I'd gladly take the two-point hit in order to verify
my suspicions.

~~~
donaq
[http://www.cracked.com/funny-3809-internet-argument-
techniqu...](http://www.cracked.com/funny-3809-internet-argument-techniques/)

I'll probably get more downvotes than you for this, and maybe even a "this
belongs in Reddit" type comment, but you're obviously trying to pull "Winning
by losing" on us. Besides, it's not a "prediction" if you say it after the
event.

p.s. Your original comment was not very witty. :p

~~~
lanstein
It's not a prediction. I tracked the comment throughout the day. Hence the
description of the movement.

~~~
mkramlich
Don't worry. I bet there are lots of HN'ers who regularly experiment and A/B
test HN comments & submissions, in order to learn what yields the best karma.
A bit like SEO but just for HN.

~~~
fizx
If someone is actually doing this, I'd love to see a writeup. Never
underestimate other ocd nerds :)

~~~
xenophanes
I tried doing some testing a while back but PG didn't appreciate it.

