|
A couple of sys admin i know have named their server room "the shire" all the *nix server names have a LOTR theme to them and the windows servers are named after the sith. eg Darth Maul.
|
|
|
|
|
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
My personal favourite is from some old Foxpro code I saw which had a global variable called:
OB1KNOBI (Obi-wan Kenobi...)
(Only 8 chars long of course...)
Some (very) old support utilities I have seen had swear words as variable names, which caused a couple of problems when an error occurs...
A big DOS error box appears showing 'Variable "swear word" not found' !
|
|
|
|
|
An old favourite of mine was a piece of commercial software code I ran across in college. The programmer had a particular routine which was used to handle error exceptions, close any open files, etc. and terminate. He decided to mark the routine with the label HELL. Why? So that whenever he detected that something had gone wrong he could write GOTO...
Clive Pottinger
Victoria, BC
modified on Tuesday, December 18, 2007 4:48:12 PM
|
|
|
|
|
That is good.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Very cool.
|
|
|
|
|
Reminds me of a former co-worker who named all his programs POORLY. (I don't mean he chose bad names, I mean *each* of his programs had the same name ... POORLY.) I asked him why he did so. He replied that he liked it when he saw the computer display "COMPILING POORLY" when he submitted his programs....
;^)
'droid
|
|
|
|
|
The absolut hardes thing I found was when I searched for a bug in a Module written in some kind of PL/I. I tried to understand, why a special line of code does not work, using 'true' and 'false' Boolean statements... now ... my forerunner was able du redefine true and false so that true was 0 and false was -1 ... incredible!
|
|
|
|
|
In my first Fortran program I managed to redefine a constant 3 (written as a digit '3' in the source) to something else (by passing it to a subroutine that changed its argument) and then the program would crash at the DO statement which should have executed 3 times. I never figured it out, needed a senior colleague to find it for me.
|
|
|
|
|
My favorite was a guy who used to contract at our company. He liked to write his code using variable names like tt (for Transaction Type), and pt (for Process Type, not Point). I happen to understand what he was writing as I somewhat knew the system he was working on, but what about another developer who was coming in fresh? They're not going to have a clue without asking, or a lot of time analyzing it. Even better, he liked to rewrite other people's code to fit in with his "better" design.
There's nothing worse than someone "knows" they know better than you, but clearly doesn't.
Kyosa Jamie Nordmeyer - Taekwondo Yi (2nd) Dan
Portland, Oregon, USA
|
|
|
|
|
Sounds like a clever chap to me.... My kind of plan.... Guarenteed employment for life (or the life of the software )
|
|
|
|
|
Some years ago I had to convert a quickbasic program to VB6. The original developer had a variable called drol (for diameter of the roll). However in my (and his) native language, dutch, this also means turd.
Mark C Hagers
New Media Ventures
Amersfoort, the Netherlands
|
|
|
|
|
Does anyone see anything stupid in this code? Here's a hint: it isn't the most efficient logic I've seen.
void CrapClass::reverse_points()
{
CPoint *pt, *npt;
CList <CPoint *, CPoint *> list;
POSITION next, prev;
next = m_point_list.GetHeadPosition();
while (next != NULL)
{
pt = m_point_list.GetNext(next);
npt = new CPoint(*pt);
list.AddTail(npt);
}
delete_points();
prev = list.GetTailPosition();
while (prev != NULL)
{
pt = list.GetPrev(prev);
npt = new CPoint(*pt);
m_point_list.AddTail(npt);
}
while (!list.IsEmpty())
delete list.RemoveHead();
}
modified on Thursday, December 13, 2007 6:52:30 PM
|
|
|
|
|
That code is bad. I love the use of a completely pointless copy the first time round.
|
|
|
|
|
Pete O'Hanlon wrote: Forum:Coding Horrors
Subject:Re: How NOT to reverse a list
Sender:Pete O'Hanlon
Date:Friday, December 14, 2007 4:49:00 PM
That code is bad. I love the use of a completely pointless copy the first time round.
I'm thinking he wanted a really fresh copy -- nothing like data where the bits are still warm. Yummy.
|
|
|
|
|
CurtD wrote: nothing like data where the bits are still warm
Souldn't he have done it twice then - just in case the first wasn't heated through warmly enough.
|
|
|
|
|
well the class has been named CrapClass...was the developer in question trying to write bad code??
but i guess u must have renamed it urself...
modified on Friday, December 14, 2007 9:57:28 AM
|
|
|
|
|
Haroon Sarwar wrote: well the class has been named CrapClass...was the developer in question trying to write bad code??
but i guess u must have renamed it urself...
Real names have been changed to protect the innocent (and the guilty).
|
|
|
|
|
Hi
You know I am really wondering why people actually posting questions in this forum? It should not be of the name, I mean how can someone think that coding horrors is a kind of help page???
And as I can see in the last posts they are getting more and more.
I just hope that they are coding better then reading instructions or names.
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
And what be the coding horror in this "question"?
|
|
|
|
|
yes you're right. the coding horrors forum is definitely not the place to post programming questions and it's getting more and more. but you know.. your post is not a coding horror either and would be more appropriate in the soapbox or maybe in the lounge
Fatbuddha 1 wrote: I just hope that they are coding better then reading instructions or names.
do you?
|
|
|
|
|
Sorry for that I just was wondering!
You are right!
Cheers
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
|
|
|
|
|
In part I would blame the forum's name.
"Coding horrors" can be taken for something horrible about programming, such as a coding task
one does not like, does not understand, etc.
To reduce wrong posts, I suggest "Horrible Code", which more clearly suggests it is about
existing bad code.
|
|
|
|
|
Or change to "I do not read that's why I am posting questions here" forum.
|
|
|
|
|
I say we go back to the WTF forum.
|
|
|
|