Exception as the primary error handling mechanism?

R

r0g

Ben said:
Shouting is usually rude, yes.


Again, you're reading something that isn't there. I utterly deny the
motives you're imputing.


I'll reiterate that you can address this by paying more attention to
what is actually written, and endeavouring to avoid finding emotions or
motives that are likely not in the message.


Both you and Steve are routinely harsh is all I'm saying, although he's
worse than you.

I'm sure you're both very good programmers who don't have the time to
tread carefully around those who come in, often under prepared, seeking
advice. Fair enough you don't tolerate fools lightly, I can respect that
(within reason) and you contribute a lot to the group so you're perhaps
owed a bit more slack than your average Joe but... There's a difference
between that and repeatedly seeking out reasons to stick your boot in -
and to my mind you seem to do that.

Maybe it's just me, but have you considered that maybe it's not?... Most
of the time when I see an extremely blunt, overly harsh response to a
question on here I know if I glance up to the name field I'll find one
of your names there (as I say, probably Steve more often that yourself).
I'm sure you think I'm making this up but many passive aggressive don't
realise how they're acting - can't see the wood for the trees and all that.

Anyway I'm going to butt out now, I'm sure everyone is getting
thoroughly bored of the OT noise.

Roger
 
R

r0g

Grant said:
No. When somebody asks a yes/no question, answering yes or no
seems quite polite to me. Following the yes/no answer with an
explanation of the answer is always nice, and I've little doubt
that's what happened.

Well actually I hadn't asked a question and I hadn't been talking to
him, he just butted in with it. Otherwise yes I agree completely.

Roger.
 
S

Steven D'Aprano

Well actually I hadn't asked a question and I hadn't been talking to
him, he just butted in with it. Otherwise yes I agree completely.


It's a public forum. You're talking to the whole world.
 
R

r0g

Steven said:
It's a public forum. You're talking to the whole world.


See? Spoiling for an argument even now! I never said you weren't allowed
to butt in, just that you did. Butting in is fine, that's half the point
of public groups after all but it's also besides the point. I was merely
explaining to Grant that I hadn't posed a yes/no question to anyone, let
alone you.

Roger.
 
R

r0g

Ben said:
In fairness, the “No†was in response, not to an explicit question, but
to an assertion.

Every assertion expressed, though, implies the question “is this
assertion true?â€. It was that question that was answered “No†(followed
by an explanation of why the assertion was not true).


That's a fair point I had never really considered. I'd wouldn't have
been nearly as upset if you'd started your sentence with AssertionError :)

People sometimes get upset — on an immediate, irrational level — when
their assertions are challenged. There's no denying that emotions
entangle our discourse, and our interpretation of the discourse of
others.


That's truer than most people appreciate, to the extent that it's a good
idea to tread very lightly when correcting strangers if you want
rational discourse to continue. Even small amounts of negativity
commonly provoke large threat responses in people which in turn inhibit
rational thinking... Have a watch of this Google Tech Talk if you have
time, it's really quite enlightening...



That's not something I'd ever want to eradicate. I ask only that, rather
than decrying that assertions be challenged per se, the challenge be
assessed to see whether it's valid.


Well I think sometimes, for the sake of expediency and overall
pleasantness, it's better to let the smaller things go: and if you just
can't let them go then at least try and issue corrections in a friendly
manner rather than a cold or pious one. As this thread is demonstrating
endless checking of every detail of every assertion leads to very long
execution times and on balance I'm not sure we benefit from these extra
digits of precision.

Roger.
 
S

Steven D'Aprano

See? Spoiling for an argument even now! I never said you weren't allowed
to butt in, just that you did. Butting in is fine, that's half the point
of public groups after all but it's also besides the point. I was merely
explaining to Grant that I hadn't posed a yes/no question to anyone, let
alone you.

I quote from your very next post:


Well I think sometimes, for the sake of expediency and overall
pleasantness, it's better to let the smaller things go: and if you just
can't let them go then at least try and issue corrections in a friendly
manner rather than a cold or pious one.
[end quote]


Perhaps you should consider taking your own advice instead of lecturing
us in an unpleasant, aggressive manner about how horrible we are for
answering your questions with things you don't want to hear?

BTW, you were actually talking about Ben butting in -- it was Ben's
answer that started with "No" that triggered this series of complaints
from you:

I might have let it slip had you not started your reply with the word
"No", that just p***** me off.
[end quote]


And the offending, dastardly comment from Ben?

[r0g]
Yes, it returns a tuple if you return more than one value, it just has
a lovely syntax for it.
[ben]
No, there is nothing inherent to the ‘return’ statement for dealing with
multiple values.


The word "No" was clearly and obviously a response to the previous
sentence that started "Yes". If this is all it takes to put you in a
temper ("p***** me off") then I suggest you need to look at your own
behaviour and stop blaming others.
 
R

r0g

Ben said:
I prefer the strategy of acknowledging and desensitising this irrational
response, by making it obvious that every assertion expressed is
inevitably an exposure of that assertion to challenge and criticism.


I see what you're saying but the "tough love" approach has been shown to
be ineffective in many of the situations it has been tried in, it's
something people instinctively think ought to work but rarely does in
the modern world. Anyway, it's only an irrational response in the sense
that it is likely to provoke irrationality in your counterpart which
isn't a good outcome for either of you.

To our brains it is a very natural and powerful response. That it's
emotional doesn't necessarily make it irrational. Bear in mind that
evolution is the distilled rationality of countless generations and to
fight it is to engage in a very one sided battle. Seriously, watch that
video I recommended, it's very interesting and delves into the neurology
of this exact subject.

Challenging assertions and criticising reasoning are both healthy and in
insufficient supply, and I want them to be normal and routine. I try to
act accordingly.


OK that's fair enough as a general principle but I disagree we are
insufficiently supplied with either here on usenet. I reckon we have too
much if anything. I do understand that a balance must be struck and the
bar ought to err on the high side after, all this group isn't yahoo
answers but neither is it a peer reviewed journal or a legal proceeding.

And anyway, my main point was concerning the tone used when challenging
(perceived) falsehoods rather than the rationale behind challenging
(perceived) falsehoods. Naturally it's right to correct non-trivial
technical falsehoods in the context of this group.

Roger.
 
R

r0g

Steven said:
See? Spoiling for an argument even now! I never said you weren't allowed
to butt in, just that you did. Butting in is fine, that's half the point
of public groups after all but it's also besides the point. I was merely
explaining to Grant that I hadn't posed a yes/no question to anyone, let
alone you.

I quote from your very next post:


Well I think sometimes, for the sake of expediency and overall
pleasantness, it's better to let the smaller things go: and if you just
can't let them go then at least try and issue corrections in a friendly
manner rather than a cold or pious one.
[end quote]


I did answer HIM in a friendly manner, to you I'm merely responding in kind.

Anyway I got upset at Ben's comments for several reasons which I
explained at length in that very post (and several subsequent ones) so I
won't rehash them any further here. The "No" in question was merely the
straw that broke the camels back and triggered my admittedly undignified
outburst. I have just seen too many supercilious replies beginning "No,
" in this forum and so yes, it p***** me off - I can happily admit it.

Of course clearly you're too cool to ever get p***** off yourself, I
detect no background seething at all here.

Roger.
 
A

alex23

r0g said:
Well I think sometimes, for the sake of expediency and overall
pleasantness, it's better to let the smaller things go: and if you just
can't let them go then at least try and issue corrections in a friendly
manner rather than a cold or pious one.

The irony, it is too rich...
 
R

r0g

alex23 said:
The irony, it is too rich...

Hi Alex, I didn't think anyone else would still be reading this thread!

The above was in the context of people who have done nothing to warrant
coldness and piety. Sadly we seem to have gotten way beyond that. You
are right though, in retrospect I should have let this slip, clearly no
minds have been changed by not doing :/

Roger.
 
R

r0g

detect no background seething at all here.

Roger.


Actually guys I've just reread this thread from the start and I clearly
did overreact, sorry about that. In fact it reminded me of this comic...

http://xkcd.com/481/

Time to smoke a joint and get a half decent nights sleep I think!

Roger.
 
S

Steve Holden

r0g said:
Actually guys I've just reread this thread from the start and I clearly
did overreact, sorry about that. In fact it reminded me of this comic...

http://xkcd.com/481/

Time to smoke a joint and get a half decent nights sleep I think!

Roger.

Brilliant. It takes a real whole human being to make an admission like
that (or even to bother to question their own behavior sufficiently to
bother re-reading the thread). I think a lot more of you for the admission.

Not that you really need care one way or the other what *I* think ...

We all have off-days. About three years ago I went completely apeshit at
someone in a fit of tiredness-induced pique, as was at one point amply
evidenced by

http://mail.python.org/pipermail/python-list/2007-August/thread.html#454510

Strangely the universe conspired to stamp on that thread, and it appears
to have been lost to the python.org archives. A Google search for "Steve
Holden" and "not a fucking computer", however, reveals that my shame has
not been totally expunged.

[If only I could rickroll those links ... :)]

regards
Steve
 
R

Roel Schroeven

Bruno Desthuilliers schreef:
Phlip a écrit :

It's at least a _very_ common error in all languages that allow this
construct.

Maybe it is, maybe it's not. All I know is my own experience; in all the
years I've been doing C and C++ (1998 - now) I've made that mistake only
twice. And in both cases I found the mistake very rapidly.

In C, it's common enough to gave birth to the "BestPractice"
you described, ie swapping operand orders in equality test to have the
compiler detect the problem - at least when one of the operand is a
function call expression or constant (it obviously won't 'work' when
both operands are variables).

I've never liked that practice, for the following reasons:
- As you say, it doesn't work when both operands are variables. In my
experience, in many cases both operands are variables.
- I tend to think that not following that practice trains me to be
careful in all cases, whereas I'm afraid that following the practice
will make me careless, which is dangerous in all the cases where the
practice won't protect me.
Anyway: in Python, assignment is not an expression, and this isn't going
to change anytime soon.

To be fully clear: I'm not advocating to change the current behavior in
Python, I'm just stating my experience in other languages.

--
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
-- Isaac Asimov

Roel Schroeven
 
L

Lie Ryan

- I tend to think that not following that practice trains me to be
careful in all cases, whereas I'm afraid that following the practice
will make me careless, which is dangerous in all the cases where the
practice won't protect me.

That's a sign of a gotcha... a well-designed language makes you think
about your problem at hand and less about the language's syntax.
 
D

Dave McCormick

Lie said:
That's a sign of a gotcha... a well-designed language makes you think
about your problem at hand and less about the language's syntax.
Not until you learn the language that is.
From a Python newbee.... ;-)
 
R

Roel Schroeven

Lie Ryan schreef:
That's a sign of a gotcha... a well-designed language makes you think
about your problem at hand and less about the language's syntax.

It's not a big deal to me, but you're right, it's a gotcha. I don't
think there's a single language without gotcha's; one of the things I
like about Python is that is has many less than the other languages I know.

--
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
-- Isaac Asimov

Roel Schroeven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top