Reply to post:

When customers try to be programmers: 'I want this CHANGED TO A ZERO ASAP'

Anonymous Coward
Anonymous Coward

I have seen legacy code with things like:

True = true

do while True

if (something) then

True = false

end if

end while

if (True) then

'why doesn't this work anymore???

end if

and

(some code)

'remove this after 2012 june release

if (1=2) then...

only no one remembers if the thing was removed but not the comment, or even what the thing was that should have been removed, or if the if(1=2) is the removal, or if the if(1=2) is what was meant to be removed, so now both the comment and the if(1=2) block remain forever, just in case someone works out what the hell that code is meant to do, and finally removes whatever was meant to be removed.

Also,

'I have uncommented this line. it has been commented out for a while but I can't work out why. if anyone has a problem please let me know.

And one more:

call invert()

sub invert()

'WARNING: extid and extref have inverted meanings for the rest of this file!

tempid = extid

extid = extref

extref = tempid

end sub

yes. the warning is in the sub.

And even better

call SetBackEndValue(value, 1) '<=== DO NOT COPY THIS LINE, not ever! And especially not the '1'

I found it copied (complete with comment) in about 50 places...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon