Clarity vs. code reuse/generality

Ethan Furman ethan at stoneleaf.us
Fri Jul 10 18:11:08 EDT 2009


Steven D'Aprano wrote:
> On Mon, 06 Jul 2009 21:02:19 -0700, Aahz wrote:
> 
> 
>>In article <006e795f$0$9711$c3e8da3 at news.astraweb.com>, Steven D'Aprano 
>><steve at REMOVE-THIS-cybersource.com.au> wrote:
>>
>>>On Mon, 06 Jul 2009 14:32:10 +0200, Jean-Michel Pichavant wrote:
>>>
>>>>kj wrote:
>>>>
>>>>>    sense = cmp(func(hi), func(lo))
>>>>>    assert sense != 0, "func is not strictly monotonic in [lo, hi]"
>>>>
>>>>As already said before, unlike other languages, sense in english does
>>>>**not** mean direction. You should rewrite this part using a better
>>>>name. Wrong informations are far worse than no information at all.
>>>
>>>Absolutely.
>>>
>>
>>>From Webster's Dictionary:
>>
>>>     8. (Geom.) One of two opposite directions in which a line,
>>>     surface, or volume, may be supposed to be described by the motion
>>>     of a point, line, or surface.
>>>     [1913 Webster]
>>>
>>>
>>>And from WordNet:
>>>
>>>    2: the meaning of a word or expression; the way in which a word
>>>       or expression or situation can be interpreted
>>>
>>>Both meanings are relevant to the way KJ is using the word. Please take
>>>your own advice and stop giving wrong information. As a native English
>>>speaker, I had no difficulty understanding the meaning of "sense" in the
>>>sense intended by KJ.
>>
>>As another native English speaker, I agree with Jean-Michel; this is the
>>first time I've seen "sense" used to mean direction.
> 
> 
> 
> Just goes to show you learn something new all the time.
> 
> http://www.merriam-webster.com/dictionary/sense
> 
>     7: one of two opposite directions especially of motion (as 
>     of a point, line, or surface)
> 
> 
> http://dictionary.reference.com/browse/sense
> 
>     18.  Mathematics. one of two opposite directions in which 
>     a vector may point.
> 
> 
> 
> Paraphrasing the Collins Dictionary of Mathematics:
> 
> The sense of a vector is the sign of the measure, contrasted with the 
> magnitude. Thus the vectors AB and BA have the same direction but 
> opposite sense. Sense is also used to distinguish clockwise and anti-
> clockwise.
> 
> Sense is, if you like, a "signed direction". "Towards north" (say) as 
> opposed to "along the north-south axis".
> 

This also illustrates the importance of knowing your target audience.  I 
have also not seen "sense" used this way before, and from the placement 
in the dictionaries I would venture to say it's not common usage outside 
of mathematics and the sciences.

Of course, since kj is teaching biologists, odds are decent they know 
what he's talking about.

~Ethan~



More information about the Python-list mailing list