Except that under the common UNIX convention, a returned zero is TRUE, and any other result is false. This comes from C coders setting bit flags to indicate the error (so anything > 0 indicates a error flag has been set).

Larry Wall was a bit of a rebel when he selected zero as false. It is a constant gripe of C programmers converting to perl: "Your error return values are the other way around, and that confuses my tiny, C programming brain".

Note: I've been programming too long - I almost added a \n so that sentence looked like: "...C programming brain\n". Somebody help me!

____________________
Jeremy
I didn't believe in evil until I dated it.

spending my time on the report I have to submit tomorrow, instead of procrastinating by typing me-too posts.

I voted for the first time three polls ago and was also not allowed to vote anymore after that. Plus the vote script also seems to use $ENV{REMOTE_ADDR} when it really should be using $ENV{HTTP_X_FORWARDED_FOR} if present.

Right now for every corporate/University network running for a single proxy, only one person can vote. But a dialup user can easily vote multiple times since he'll probably have a different IP adress each time he's logged in.

Indeed. This same thing has been happening to me. It has happened to me the last few times I've voted. I have been chalking it up to being behind a proxy, thus allowing only one of the three PM members at work here to vote. Perhaps I was wrong, though. I believe I was the first one to vote out of our little group here, today, and I still received the message that I had already voted.

I selected Correct because at work, that's what I need the most (and they make me pick). Simple was a close second.
At home, however, it is entirely a different story. Beautiful nears the top of the list. I also believe that a write-in of Clever would be there as well.

CORRECT!!! I believe this to be a trick question. Correct is the only logical answer. If something is correct, it will be consistent, complete, the fasted possible and still maintain all other options "consistently, as simple as possible in order to maintain the fastest possible speed consistently and completely, and beautiful since it is going to be perfectly correct.

Another job would be an incorrect answer because that would mean NO PERL.

I had to pick correct. This question reminds me of a story I read in The Psychology of Computer Programming by Gerald Weinberg, referenced in this short excerpt from Code Complete by Steve McConnell (shamelessly stolen from here):

A fast program is just as important as a correct one--False! It's hardly
ever true that programs need to be fast or small before they need to be
correct. Gerald Weinberg tells the story of a programmer who was flown to
Detroit to help debug a program that was in trouble. The programmer worked with
the team of programmers who had developed the program, and after several days
he concluded that the situation was hopeless.

On the flight home, he mulled over the last few days and realized the true
problem. By the end of the flight, he had outlined the necessary code. He
tested it for several days and was about to return to Detroit when he got a
telegram saying the project had been cancelled because the program was
impossible to write. He headed back to Detroit anyway and convinced the
executives that the project could be completed.

He then had to convince the project's original programmers. They listened to
his presentation, and when he'd finished, the creator of the old system asked,

"And how long does your program take?"

"That varies, but about ten seconds per input."

"Aha! But my program takes only one second per input." The veteran
leaned back, satisfied that he'd stumped the upstart programmer. The other
programmers seemed to agree, but the new programmer wasn't intimidated.

"Yes, but your program doesn't work. If mine doesn't have to work, I can make it run instantly and take up no memory. "

For me, the answer has to be "Correct". In the real world, we're creating software to serve a purpose. The user needs to get a job done and is relying on the software to do it. If they can't get their job done, nothing else matters. That's incorrect software. If the software is too slow for the user's needs or the interface is so cumbersome that they can't figure out how to use it...BZZZT. Wrong answer.

Barely correct software allows the user to get the job done -- barely. Truly correct software allows the user to get the job done with ease, and maybe even pleasure!

Correct software isn't perfect or bug free, but it's close enough. Unreleased software is useless and couldn't possibly be less correct. The trick is judging what's "close enough".

"Correctness" is the most important attribute for software, but for me, "simplicity" is a very strong second. Lots of good things fall out of simplifying software -- it's easier to read, test, understand, and maintain. And that, IMHO, is beautiful.

What's the use of any of those qualities, if your program isn't producing the proper result?

So yes, I voted "correct". The other qualities are nice too, but worth nothing, when the first one, correctness, isn't satisfied.

All that is under the assumption that a program can be correct, that there is a solution, of course. An exception to this rule would be a program to play chess, for example. For such a case, "simple", "complete", "beautiful", "fast", all these would be more important than the holy grail, "correct". Then, it should merely have to produce acceptable results. Fast.

If the code is correct, I won't ever have to look at, and even though beauty et al will go unnoticed, I'll say its wonderful just the same!

Consistency would be next on my list. I struggled between it and beauty but decided that consistency is a prerequisite for beauty. You might find a gem in a pile of manure but no one in their right mind would enjoy the search.

There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
--C.A.R. Hoare

I favor "consistent". As long as you're being consistent it's easy to handle any faulty assumptions, since they are the same throughout the program. Other pogrammers will know what you're consistently doing wrong when debugging your code etc. If you're *really* consistent you can always wrap a virtual macine around your code to comply with your particular, warped, view of the world.

You can pick your friends, and you can pick your nose, but you can't pick your friends nose...

and also, picking your nose when noone is looking is still picking yournose.

these don't have bearing on anything of value, but I just thought I had the right to post them :)
work it harder make it better do it faster makes us stronger more than ever hour after our work is never over.

i cannot see why programming in a "simple" way corresponds to a long term view. for me long term means that the capabilities of the code basis on which the scripts work is so adaptable that it need not be changed for a long time. this of course adds some complexity to the scripts but you can't avoid it. if you can manage that they keep simple then i consider the design beautiful - parallels to perl are not unintended ;)

I almost voted for 'fast' thinking of programming. In other words I pick whatever is the fastest way to program and debug it .. it might not be the most elegant (or even fastet to type!) just whatever is the most obvious way to do it.

But then I figured the poll mean fast as in benchmarking the results.

So I voted for the first option coz that was faster than reading through them all again.

I want a job where I can wear what ever I want
I want a job where I can come in late with out getting written up
I want a job where I can do alot of nothing
I want a job where I can leave early whenever I want
I want a job where I can write a script to do my work for me
I want a job where I can do my homework
I want a job where I can make free long-distance phone calls
I want a job where I can code perl.

I would've liked to have seen 'useful'. But in the absence of, I chose 'consistent'. If something is at least consistent, I can probably use it. I've seen plenty of programs that are 'correct', but useless (this is generally the result of a poor product specification)

My code is never bery pretty, but I can read it and that's all that matters.
Correct is good, but what is "correct" seems to change from time to time.
So I chose complete. If it gets everything done and doesn't put too much load on the server, I'm happy.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other