home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / software / 4994 < prev    next >
Encoding:
Text File  |  1992-12-15  |  2.5 KB  |  63 lines

  1. Newsgroups: comp.software-eng
  2. Path: sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!usc!cs.utexas.edu!sun-barr!ames!george.arc.nasa.gov!lehman
  3. From: lehman@george.arc.nasa.gov (John Lehman -- GDP)
  4. Subject: Just how sophisticated should we assume progrr & her/his tools to be?
  5. Message-ID: <1992Dec16.004059.15927@news.arc.nasa.gov>
  6. Summary: i, ii, \<i\>, "_any_" editor can; simple method for simple purpose.
  7. Sender: usenet@news.arc.nasa.gov
  8. Organization: NASA Ames Research Center, Moffett Field, CA
  9. Date: Wed, 16 Dec 1992 00:40:59 GMT
  10. Lines: 51
  11.  
  12.  
  13. >Subject: Re: average identifier length (was Comments: Code...)
  14. >Message-ID: <1992Dec15.131302.22615@b30.ingr.com>
  15. >
  16. >>>> >          "i" and "j" are bad loop indices
  17. >>>> No, they're not.                                                     
  18. >>>Yes, they are. 
  19. >>>                 there is a second consideration: searching.  When you
  20. >>>want to see where variable 'i' is used, you are going to get a number of
  21. >>>false hits.  Recommendation: use 'ii', 'jj', etc.
  22. >>
  23. >>If you are using vi to look at your code then you can find all uses of
  24. >>any "word" by specifying your search as \<word\>.                      
  25. >
  26. >So you're going to force everyone to use vi?
  27. >AAAARRRRGGGGHHHH!!!!
  28.  
  29.  
  30. This topic was covered a few weeks ago, when _I_ recommended ii,
  31. and got a reply post to the effect that _any_ respectable editor
  32. can do a word search.
  33.  
  34. So, IMO, the question is, just how sophisticated should we
  35. assume programmers and their tools to be?
  36.  
  37. Should a person, who wants to find a string, have to know
  38. more than one string search command?
  39.  
  40. Should anyone who calls herself a programmer 
  41.  
  42.  
  43. Regarding the taste in editors:  I chose vi when I found out
  44. that it is on all Unix systems.  Because of that, I haven't 
  45. had to learn a new editor in years, which is a relief.  But
  46. I was using vi for years before I learned (a few weeks ago)
  47. how to do \<i\>.  By the way, \<i\> looks reasonable, because
  48. at least some versions of grep or sed would use that syntax.
  49.  
  50.  
  51. >I'm glad someone else uses the 'ii' technique.  Means that there's some
  52. >code I may have to maintain someday that doesn't use 'i' <gag>.
  53.  
  54.  
  55. So, there were at least 3 of us who were using "ii".  I'm not
  56. quite sure how sophisticated  --  e.g.,  \<i\>  --  I want to be;
  57. but lately I've been using "i" because it looks elegant (the i of
  58. the beholder), being the shortest possible name -- one less keystroke,
  59. times # variables times # modules times # programmers.  But I'm
  60. sentimental about "ii".
  61.  
  62. lehman@ames.arc.nasa.gov
  63.