ActiveState going the wrong way

Dave Brueck dbrueck at edgix.com
Wed Apr 11 11:21:28 EDT 2001


"Maniac" <Maniac at alltel.net> wrote in message news:45m0b9.fem.ln at alltel.net...

>> Lack of autocompletion tends to _encourage_ laziness and _lower_
>> productivity. 
>I strongly disagree lack of autocompletion will in the short run (in your 
>words lower productivity)  but will also increase the skill of the 
>programmer by forcing you to look up functions and other such stuff that
>you accidently store in your brain and you are EGAD "forced" to learn 
>something that the next time you're coding you happen to remember the
>function. 

Huh? Having to look it up doesn't make you learn anything - I've watched people load up the same man page over and over and over again. I guess it might develop your librarian skills but beyond that... Whether or not I learn or remember something after looking it up is completely dependent on me and independent of the presence or absence of autocompletion.

>I have yet to find a "useless" comment. Any documentation in source code 
>helps 

Nope. Here's an unmodified snippet of code I came across not too long ago:

  lpPool->iFlags=aFlags;  /* set flags */
  lpPool->iSize=aElementSize; /* set size */


Do these help? No, these comments add no value. Worse, because they are present, as you scan through the code you end up reading them just because they are there. It slows you down and clutters the code. So the original programmer wasted time putting them there and everyone else who reads the code wastes time reading them. 

In Python, beyond docstrings and some level-of-intent comments near blocks of code whose purpose/function is not instantly clear, you don't need much else. (and if the code's purpose/function isn't instantly clear, it's often because the code is sloppy and needs to be rewritten). 

>Yes it might be redundant now but starting another project and then
>returning to the "old" code base (when you now have a whole new mindset)
>w/o documentation (I don't care how "descriptive" function names you use) 
>still requires a re-learning curve and the comment might trigger something
>that your all-encompassing descriptive function name wouldn't. 

I'm not against well-placed level-of-intent comments, but comments that exist because the programmer was too lazy/dumb to choose descriptive names. Another common example I've seen:

int i,j,k; // i is the page index, j is the paragraph index, and k is the word index

Bleh. You're fired. :)

-Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20010411/9f4aa91d/attachment.html>


More information about the Python-list mailing list