Re: Spelling mistakes!

2006-01-13 Thread Antoon Pardon
Op 2006-01-12, [EMAIL PROTECTED] schreef <[EMAIL PROTECTED]>: > > Antoon> But now we are back to my first doubt. Sure unit test will be > Antoon> helpfull in finding out there is a bug. I doubt they are that > Antoon> helpfull in tracking the bug (at least this kind). > > This thread se

Re: Spelling mistakes!

2006-01-12 Thread Terry Hancock
On Wed, 11 Jan 2006 06:57:06 + Steve Holden <[EMAIL PROTECTED]> wrote: > Terry Hancock wrote: > [...] > > > > The ideal of "don't repeat yourself" seems to get > > nudged out by "repeat yourself exactly once" when it's > > really important to get it right. ;-) > > > I suppose most readers are

Re: Spelling mistakes!

2006-01-12 Thread skip
Antoon> But now we are back to my first doubt. Sure unit test will be Antoon> helpfull in finding out there is a bug. I doubt they are that Antoon> helpfull in tracking the bug (at least this kind). This thread seems to be going in circles. Maybe it's time to simply drop it and move

Re: Spelling mistakes!

2006-01-12 Thread Antoon Pardon
Op 2006-01-11, Hans Nowak schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> Op 2006-01-10, Terry Hancock schreef <[EMAIL PROTECTED]>: >> >>>In unit testing, you write the code, then write code to test >>>the code, which must correctly identify the methods in the >>>code. So you have to type

Re: Spelling mistakes!

2006-01-11 Thread Hans Nowak
Antoon Pardon wrote: > Op 2006-01-10, Terry Hancock schreef <[EMAIL PROTECTED]>: > >>In unit testing, you write the code, then write code to test >>the code, which must correctly identify the methods in the >>code. So you have to type 'everything' twice. > > But you don't type attribute names tw

Re: Spelling mistakes!

2006-01-11 Thread skip
Steve> I suppose most readers aren't old enough to remember the punch Steve> card days, when you would hand your work in on coding sheets to Steve> the punch room and it would be punched onto cards using huge Steve> machines (anyone remember the 026 and 029 punches?). I do remembe

Re: Spelling mistakes!

2006-01-11 Thread Mike Meyer
Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > On Wed, 11 Jan 2006 06:57:06 +, Steve Holden <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: >> I suppose most readers aren't old enough to remember the punch card >> days, when you would hand your work in on coding sheets to t

Re: Spelling mistakes!

2006-01-11 Thread Antoon Pardon
Op 2006-01-10, Terry Hancock schreef <[EMAIL PROTECTED]>: > On 9 Jan 2006 11:21:10 GMT > Antoon Pardon <[EMAIL PROTECTED]> wrote: >> Op 2006-01-06, Terry Hancock schreef >> <[EMAIL PROTECTED]>: >> > On 6 Jan 2006 07:30:41 -0800 >> > "KraftDiner" <[EMAIL PROTECTED]> wrote: >> >> in an init method I

Re: Spelling mistakes!

2006-01-10 Thread Steve Holden
Terry Hancock wrote: [...] > > The ideal of "don't repeat yourself" seems to get > nudged out by "repeat yourself exactly once" when it's > really important to get it right. ;-) > I suppose most readers aren't old enough to remember the punch card days, when you would hand your work in on coding

Re: Spelling mistakes!

2006-01-10 Thread Peter Hansen
Sybren Stuvel wrote: > Xavier Morel enlightened us with: >>1- The unit test will obviously fail in this case, telling you in >>which code unit the issue is > > Given the assumption the same mistake hasn't been made in the test as > well. If the spelling in the test matches the spelling in the cod

Re: Spelling mistakes!

2006-01-10 Thread Terry Hancock
On 9 Jan 2006 11:21:10 GMT Antoon Pardon <[EMAIL PROTECTED]> wrote: > Op 2006-01-06, Terry Hancock schreef > <[EMAIL PROTECTED]>: > > On 6 Jan 2006 07:30:41 -0800 > > "KraftDiner" <[EMAIL PROTECTED]> wrote: > >> in an init method I declare a variable > >self.someLongName > > >> later in a differe

Re: Spelling mistakes!

2006-01-10 Thread Antoon Pardon
Op 2006-01-09, Xavier Morel schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: >> I don't think unit tests are that helpful in this case. >> Unit tests help you in finding out there is a bug, they >> don't help that much in tracking down a bug. >> >> I for some reason a person is reading over the

Re: Spelling mistakes!

2006-01-09 Thread Steve Holden
KraftDiner wrote: > I've spent hours trying to find a bug that was a simple spelling > mistake. > > in an init method I declare a variable self.someLongName > > later in a different method of the class I use > self.sumLongName > Now I really meant self.someLongName. > In fact I don't want a vari

Re: Spelling mistakes!

2006-01-09 Thread bb
[EMAIL PROTECTED] wrote: > > Terry> But not faster than use a dict server! Why not just use (e.g.) > Terry> kdict? > > >> Maybe because not everybody has it? > > Sybren> Lame excuse. If you don't have something but you do want to > use Sybren> it, you get it. > > I don't t

Re: Spelling mistakes!

2006-01-09 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Terry> But not faster than use a dict server! Why not just use (e.g.) > Terry> kdict? > > >> Maybe because not everybody has it? > > Sybren> Lame excuse. If you don't have something but you do want to use > Sybren> it, you get it. > > I don't think

Re: Spelling mistakes!

2006-01-09 Thread Sybren Stuvel
Xavier Morel enlightened us with: > 1- The unit test will obviously fail in this case, telling you in > which code unit the issue is Given the assumption the same mistake hasn't been made in the test as well. Sybren -- The problem with the world is stupidity. Not saying there should be a capital

Re: Spelling mistakes!

2006-01-09 Thread skip
Terry> But not faster than use a dict server! Why not just use (e.g.) Terry> kdict? >> Maybe because not everybody has it? Sybren> Lame excuse. If you don't have something but you do want to use Sybren> it, you get it. I don't think I want it badly enough to figure out how

Re: Spelling mistakes!

2006-01-09 Thread Xavier Morel
Antoon Pardon wrote: > I don't think unit tests are that helpful in this case. > Unit tests help you in finding out there is a bug, they > don't help that much in tracking down a bug. > > I for some reason a person is reading over the difference > between sumLongName and someLongName and doesn't n

Re: Spelling mistakes!

2006-01-09 Thread Antoon Pardon
Op 2006-01-06, Terry Hancock schreef <[EMAIL PROTECTED]>: > On 6 Jan 2006 07:30:41 -0800 > "KraftDiner" <[EMAIL PROTECTED]> wrote: >> I've spent hours trying to find a bug that was a simple >> spelling mistake. > > You're not the first. ;-) > >> in an init method I declare a variable self.someLong

Re: Spelling mistakes!

2006-01-09 Thread Michele Simionato
I like to play devil's advocate here, so I will say that in this case using automatic testing will increase your probability of spelling mistakes: I do most of my spelling mistakes in the test cases! <0.5 wink> Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-09 Thread Michele Simionato
[EMAIL PROTECTED] wrote: > The OP sort of seemed like he was pining > for attribute declarations. __slots__ is the closest thing Python has to > them. I don't use them myself (since I've basically avoided new-style > classes so far). > > Skip No, slots are a memory optimization trick and should

Re: Spelling mistakes!

2006-01-09 Thread Sybren Stuvel
Walter S. Leipold enlightened us with: > [Gee, I hope their were no spelling misteaks inn that paragraph...] It should be "where" Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but wh

Re: Spelling mistakes!

2006-01-09 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > Terry> But not faster than use a dict server! Why not just use (e.g.) > Terry> kdict? > > Maybe because not everybody has it? Lame excuse. If you don't have something but you do want to use it, you get it. If everybody just used what they had at one point

Re: Spelling mistakes!

2006-01-08 Thread Walter S. Leipold
Terry Hancock ([EMAIL PROTECTED]) writes: > BTW, one of the most common programming spelling errors is > "deprecate" versus "depreciate" -- I wonder how many people > actually realize that both words exist, but have entirely > different meanings? That's a common spelling error, yes, but.. The

Re: Spelling mistakes!

2006-01-08 Thread skip
>> 1. It's generally faster than reaching for the dictionary. Terry> But not faster than use a dict server! Why not just use (e.g.) Terry> kdict? Maybe because not everybody has it? % kdict -bash: kdict: command not found Skip -- http://mail.python.org/mailman/listinfo/p

Re: Spelling mistakes!

2006-01-08 Thread Chris F.A. Johnson
On 2006-01-08, Robin Becker wrote: > Chris F.A. Johnson wrote: >> On 2006-01-08, Terry Hancock wrote: >> >>>BTW, one of the most common programming spelling errors is >>>"deprecate" versus "depreciate" -- I wonder how many people >>>actually realize that both words exist, but have entirely >>>diff

Re: Spelling mistakes!

2006-01-08 Thread Chris F.A. Johnson
On 2006-01-08, Terry Hancock wrote: > > BTW, one of the most common programming spelling errors is > "deprecate" versus "depreciate" -- I wonder how many people > actually realize that both words exist, but have entirely > different meanings? The words overlap in meaning. Both can mean to dispa

Re: Spelling mistakes!

2006-01-08 Thread Robin Becker
Chris F.A. Johnson wrote: > On 2006-01-08, Terry Hancock wrote: > >>BTW, one of the most common programming spelling errors is >>"deprecate" versus "depreciate" -- I wonder how many people >>actually realize that both words exist, but have entirely >>different meanings? > > >The words overla

Re: Spelling mistakes!

2006-01-08 Thread Terry Hancock
On Sun, 8 Jan 2006 08:58:48 -0600 [EMAIL PROTECTED] wrote: > Sybren> And what's up with using Google to check for spelling? I have a > Sybren> dictionary for that, works a lot better! > > A couple things: > > 1. It's generally faster than reaching for the > dictionary. But not fa

Re: Spelling mistakes!

2006-01-08 Thread skip
Sybren> And what's up with using Google to check for spelling? I have a Sybren> dictionary for that, works a lot better! A couple things: 1. It's generally faster than reaching for the dictionary. 2. The hit count for a word and its misspelling gives me some measure of ho

Re: Spelling mistakes!

2006-01-08 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > I'm one of those people who, for better or worse, is a good speller. > Words just look right or wrong to me and it bothers me when they > look wrong. Same here. I have to use code that has "childs" instead of "children"... I also can't stand "then" vs "than

Re: Spelling mistakes!

2006-01-08 Thread Jorgen Grahn
On Fri, 6 Jan 2006 23:46:42 -0600, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I do tend to be a bit brief with my names and recognizing an identifier as > an abbreviation don't bother me the way a misspelled word does. Maybe I've > been using Unix systems for too long with their brief command

Re: Spelling mistakes!

2006-01-08 Thread Jorgen Grahn
On Sat, 07 Jan 2006 08:57:24 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: [British/American English] > Hah! Canucks r00l! Most of those words look about equally good to us > most of the time. (And it's not because of the beer!) (But our beer > r00lz too.) And so does "primairy", "seconda

Re: Spelling mistakes!

2006-01-07 Thread Scott David Daniels
Terry Hancock wrote: > One thing I've figured out is that using the full spelling > of a word instead of groovy programmer abbreviations makes > it a lot easier to remember the names of things. Of course, > like everything, that can be taken too far, so I still use > things like "bkg_clr" too. Ye

Re: Spelling mistakes!

2006-01-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Alan Kennedy <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] >> >> Aside from the other responses (unittests, pychecker/pylint), you might also >> consider using __slots__ for new-style classes: > >I've been shouted at for suggesting exactly that! :-) > >http://groups

Re: Spelling mistakes!

2006-01-07 Thread skip
>> Aside from the other responses (unittests, pychecker/pylint), you >> might also consider using __slots__ for new-style classes: Alan> I've been shouted at for suggesting exactly that! :-) Maybe Aahz didn't notice my post. The OP sort of seemed like he was pining for attribute dec

Re: Spelling mistakes!

2006-01-07 Thread Alan Kennedy
[EMAIL PROTECTED] > Aside from the other responses (unittests, pychecker/pylint), you might also > consider using __slots__ for new-style classes: I've been shouted at for suggesting exactly that! :-) http://groups.google.com/group/comp.lang.python/msg/fa453d925b912917 how-come-aahz-didn't-shout

Re: Spelling mistakes!

2006-01-07 Thread Peter Hansen
Sam Pointon wrote: > What's worse is the closely related problem of British/American > English, though you sort of get used to it after typing > s/colour/color/g or s/serialise/serialize/g for the thousandth time. > The words look wrong to me, but they're correct in the context. Hah! Canucks r00l

Re: Spelling mistakes!

2006-01-07 Thread Sam Pointon
[EMAIL PROTECTED] wrote: > >> In fact, googling for "referer" and "referrer" reports a similar > >> number of hits, unlike most misspellings. > > Terry> You know, I almost mentioned that myself. Drives me crazy. > > Me too. I'm one of those people who, for better or worse, is a good > spel

Re: Spelling mistakes!

2006-01-06 Thread Alex Martelli
KraftDiner <[EMAIL PROTECTED]> wrote: ... > Frankly how are you ever to know if this type of error is occuring? . Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-06 Thread skip
>> In fact, googling for "referer" and "referrer" reports a similar >> number of hits, unlike most misspellings. Terry> You know, I almost mentioned that myself. Drives me crazy. Me too. I'm one of those people who, for better or worse, is a good speller. Words just look right or w

Re: Spelling mistakes!

2006-01-06 Thread Terry Hancock
On Fri, 6 Jan 2006 19:51:22 -0600 [EMAIL PROTECTED] wrote: > >> > Duh. Next time I use a dictionary before freezing > >an API! > > >> Can you please explain what you mean by that? Use a > >dictionary how? > > Paul> Use a dictionary by looking up words in it to > check the

Re: Spelling mistakes!

2006-01-06 Thread Terry Hancock
On Sat, 07 Jan 2006 14:03:10 +1100 "Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > On Fri, 06 Jan 2006 17:29:32 -0800, Paul Rubin wrote: > > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > >> > Duh. Next time I use a dictionary before freezing an > >API! > Can you please explain what you mean by t

Re: Spelling mistakes!

2006-01-06 Thread Steven D'Aprano
On Fri, 06 Jan 2006 17:29:32 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > Duh. Next time I use a dictionary before freezing an API! >> Can you please explain what you mean by that? Use a dictionary how? > > Use a dictionary by looking up words in it to check the spe

Re: Spelling mistakes!

2006-01-06 Thread skip
>> > Duh. Next time I use a dictionary before freezing an API! >> Can you please explain what you mean by that? Use a dictionary how? Paul> Use a dictionary by looking up words in it to check the spelling. I think the most widely spread API misspelling must be "referer", as in the H

Re: Spelling mistakes!

2006-01-06 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > Duh. Next time I use a dictionary before freezing an API! > Can you please explain what you mean by that? Use a dictionary how? Use a dictionary by looking up words in it to check the spelling. -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-06 Thread Steven D'Aprano
On Fri, 06 Jan 2006 17:23:27 -0600, Terry Hancock wrote: > I once misspelled a name in a set of API methods, which was > very embarrassing (I spelled "fovea" as "fovia"). So then I > had to go through and change it, and report it in as an API > change so that a "patch" became a "minor version upg

Re: Spelling mistakes!

2006-01-06 Thread Terry Hancock
On 6 Jan 2006 07:30:41 -0800 "KraftDiner" <[EMAIL PROTECTED]> wrote: > I've spent hours trying to find a bug that was a simple > spelling mistake. You're not the first. ;-) > in an init method I declare a variable self.someLongName > > later in a different method of the class I use > self.sumLo

Re: Spelling mistakes!

2006-01-06 Thread skip
>> try this: >> class x(object): >>def __init__(self): >> self.someName = "hello" >>def someMethod(self): >> self.sumName = "bye" >> find that bug. Aside from the other responses (unittests, pychecker/pylint), you might also consider using __slots_

Re: Spelling mistakes!

2006-01-06 Thread Peter Hansen
KraftDiner wrote: > try this: > > class x(object): >def __init__(self): > self.someName = "hello" >def someMethod(self): > self.sumName = "bye" > > find that bug. You forgot to include unit tests for someMethod(). Those would have caught the bug. The reality is that if you

Re: Spelling mistakes!

2006-01-06 Thread André
KraftDiner wrote: > try this: > > class x(object): >def __init__(self): > self.someName = "hello" >def someMethod(self): > self.sumName = "bye" > > find that bug. Write a test for each method before writing the method. Write the code once; read it critically (at least) twice.

Re: Spelling mistakes!

2006-01-06 Thread Jean-Paul Calderone
On 6 Jan 2006 07:57:04 -0800, KraftDiner <[EMAIL PROTECTED]> wrote: >try this: > >class x(object): > def __init__(self): > self.someName = "hello" > def someMethod(self): > self.sumName = "bye" > >find that bug. > [EMAIL PROTECTED]:~$ cat > xobj.py class x(object): def __init

Re: Spelling mistakes!

2006-01-06 Thread Xavier Morel
KraftDiner wrote: > I've spent hours trying to find a bug that was a simple spelling > mistake. > > in an init method I declare a variable self.someLongName > > later in a different method of the class I use > self.sumLongName > Now I really meant self.someLongName. > In fact I don't want a vari

Re: Spelling mistakes!

2006-01-06 Thread KraftDiner
try this: class x(object): def __init__(self): self.someName = "hello" def someMethod(self): self.sumName = "bye" find that bug. -- http://mail.python.org/mailman/listinfo/python-list

Re: Spelling mistakes!

2006-01-06 Thread Fuzzyman
VBScript allows you to specify that variable names be declared. I used to think this was good - until I realised that Python allows you to dynamically assign attributes in namespaces using all sorts of tricks. (Setattr, using __dict__ etc). It's just not possible with Python. Rarely happens to me

Re: Spelling mistakes!

2006-01-06 Thread Heiko Wundram
KraftDiner wrote: > Frankly how are you ever to know if this type of error is occuring? By the traceback: [EMAIL PROTECTED] ~ $ python Python 2.4.2 (#1, Dec 22 2005, 17:27:39) [GCC 4.0.2 (Gentoo 4.0.2-r2, pie-8.7.8)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

Spelling mistakes!

2006-01-06 Thread KraftDiner
I've spent hours trying to find a bug that was a simple spelling mistake. in an init method I declare a variable self.someLongName later in a different method of the class I use self.sumLongName Now I really meant self.someLongName. In fact I don't want a variable called sumLongName. Frankly how