|
I didn't know that they were big fans of sarcasm!
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
I like this one!!!
"how to tightly couple objects in your application so that they do not become too separated…”
Em, shouldn't that be the other way around... Duh!
"Program testing can be used to show the presence of bugs, but never to show their absence."
<< please vote!! >>
|
|
|
|
|
Superb! Either the guys had a sense of humour, or they were hopelessly incompetent. If it was the former, then maybe you missed out on a cool gig; the latter and you had a lucky escape!
|
|
|
|
|
It is government we are talking about.
|
|
|
|
|
Having had many government contract jobs both state and feral i can empathize with you. Its not what you do or how well you do it its how much politics you put into doing it.
Logic Chip
|
|
|
|
|
Logic Chip wrote: contract jobs both state and feral i can empathize with you
Is a Feral job one you wish you hadn't taken?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
yes, every government job has been feral, those in Canberra especially.
Logic Chip
|
|
|
|
|
Programmer humor. I love it!
My favorite is the singleton with millions of instances.
|
|
|
|
|
Please tell me it was state or local government and not federal...
|
|
|
|
|
Fortunately no, it’s not the federal government. It’s a state government. I’d honestly be too embarrassed to say which one, but let’s just say it wouldn’t be a big surprise.
|
|
|
|
|
Darn. And here I was hoping it was somebody else's government
patbob
|
|
|
|
|
This explains much. I've always suspected that the lunatics are running the asylum. Now I know where NMCI came from.
|
|
|
|
|
I'm no fan of goto at the best of times, but at least this one disappeared quickly:
If Not rsTest.EOF Then
rsTest.MoveLast
If Format(rsTest!OKDATE, "yyyy/mm/dd") > Format(cutOffDate, "yyyy/mm/dd") Then
dataStat = "2"
GoTo UpdAccount
End If
End If
UpdAccount:
I kid you not!
|
|
|
|
|
I'm not quite sure if the GoTo is the horror, or that I just read a block of VB....
Dirty... I feel dirty...
I wasn't, now I am, then I won't be anymore.
|
|
|
|
|
It's slightly worse than that, this is VBA.
|
|
|
|
|
My thoughts exactly
return 5;
|
|
|
|
|
Well, the GoTo is important here, otherwise the computer may not know what to do: Sit down and have a coffee, travel to Egypt and visit the pyramides or maybe format the harddisks..
I always suggested to put a GoToNextStatement after each statement. But these dumb guys from microsoft didn't want to listen to me..
|
|
|
|
|
Yeah, if only we could maybe assign a numerical order to the statements...
|
|
|
|
|
What I find deeply disturbing by this and other examples of bad coding is that these people get paid for writing this rubbish. Furthermore, what is more frightening is the fact that they could be writing code for safety systems or banking systems or who knows what else.
No bloody wonder the software industry puts a NO WARRANTIES EXPRESSED OR IMPLIED notice into every EULA D'Oh! They're not even sure it's going to work. Can you imagine buying a new car and the manufacturer said that there were no warranties?
Nobody can get the truth out of me because even I don't know what it is. I keep myself in a constant state of utter confusion. - Col. Flagg
|
|
|
|
|
How about this piece of code:
<br />
if (a == null == false) {<br />
}<br />
Spent some time before figuring out it is a version of
<br />
if (а != null) {}<br />
|
|
|
|
|
when in doubt, you can look it up and then clarify by adding parentheses, like so:
if ( ( (a==null) == false ) == true ) {...}
|
|
|
|
|
Luc Pattyn wrote: if ( ( (a==null) == false ) == true ) {...}
can you extend this recursively? only to be very very sure:
if ( ( ( ( ( (a==null) == false) == true) == true) == true) == true)
to shock afterworkers and make compiler happy, one could sometimes say == true and == false
|
|
|
|
|
Just to make it more subtle add a little "!" at the beginning
if ( !( ( ( (a==null) == false ) == true ) == false)) {...}
|
|
|
|
|
This one would be even more subtle
if ( !( !( !( !(a==null) == true ) == false ) == true)) {...}
|
|
|
|
|
How about this one?
if ( true == (!((!(((a ?? true) is bool) ? true : false) == false) == true) == false)) {...}
|
|
|
|