From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,997e6472f58cc955 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-05 10:54:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Case dependence and coding standards Date: 05 Jun 2003 13:47:45 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <035odv8mfiksmqo69q0250qp141oebtdro@4ax.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1054836238 22923 128.183.235.92 (5 Jun 2003 18:03:58 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 5 Jun 2003 18:03:58 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Xref: archiver1.google.com comp.lang.ada:38717 Date: 2003-06-05T18:03:58+00:00 List-Id: Vinzent Hoefler writes: > Stephen Leake wrote: > >The goal is overall productivity; how fast I can write good code. > > Well, that is a point. Hey! Agreement in a newsgroup thread :). > But I don't type in a compiler (unless someone is crazy enough to > tell the compiler to use standard input...). Close enough; you type in an editor, and the file is fed to the compiler. > OTOH, usually pure coding only takes a relatively small amount of time > of the whole development process, so the advantage of fast typing > isn't that much. If that would be, we should all take secretary > lessons to type in 10-finger-system. I never had such lesson, compared > to the usual secretary I'm typing darn slow, although I'd say, my > productivity is still good. I disagree. I get very frustrated watching programmers who can't type with all ten fingers. Take a lesson and see what you gain! I don't have numbers, but I bet the time spent typing is about 10% of my time on average (some of it in this newsgroup :). If I can cut that to 8%, it's worth it. > >It's faster for me to not worry about hitting the space bar, as > >long as the editor and compiler either do it for me or make it very > >easy to detect and fix case errors. > > Well, if the IDE fixes it, this is ok. Although I wouldn't like to fix > it automatically. Well, I have Emacs set up so I type "text_io", and Emacs changes it to "Text_IO". Sometimes it screws up, and I moan about it. Sometimes I fix it. On the whole, I find it worth it. > Indeed, after trying out Word sometimes, I have the strong feeling > that turning on the automatic spelling correction (or whatever it is > called) actually *slowed* down by process of typing. Yes, I hate the automatic capitalization in Word. That's because I'm _not_ typing letters, which is Word is good for (yes, that's a very strong and probably inaccurate statement. This isn't the MS Windows newsgroup :). But I've taught Emacs to do a good job in helping me write Ada code; that is the crucial difference. > Well, programming languages are much more strict than the usual > documentation or letters (especially because Word doesn't know of > all the technical terms I may use), so this probably really isn't > comparable. Exactly. > >And yes, _thinking_ about what the capitalization of an identifier > >should be takes mental cycles that can be better spent thinking > >about the problem solution. > > I don't know. Never took the measurement, it's hard to measure brain > cycles. :) But sometimes I even reformat old code while reviewing and > enhance it both visually and in terms of robustness. I don't have the > feeling that it takes me longer to do so in the end. It is hard to measure. I decided a long time ago that fixing the IDE was always worth it in the long run. So now, whenever I find myself thinking "the computer could do this faster", I figure out how to make that happen. If I get more people to use Emacs, the time savings is magnified (yes, that is an ulterior motive :). > Hmm. Ok, you're right, if it's just to make sure of a consistent > capitalization, this is usually a search and replace tasks that should > be left to the machine. Wow! Twice in one posting :). > > >> Its kind of the same problem why quick fixes (aka. dirty hacks) > >> become standard some months later... ;) > > > >I disagree. The compiler enforces capitalization, in the same way it > >enforces syntax rules. > > Ok, you're right. > > The result would be the same in terms of maintainance, because the > other coders actually never see what kind of crap someone typed into > the editor before... ;) > > >I'm trading brain cycles for CPU cycles, and I > >see a net gain. > > Well, I agree with you, if the IDE would fix it instantly. But if I > would type > > for foo in bar'range loop exit when baz<3; end loop; > > or such and then trust the compiler to fix it I would have a hard time > understanding the code that I write. And I think, the more I type it > right in the first place, then it is less likely that the compiler > will complain about some stupid errors like a missing semicolon. So I > see a net gain here in less editor-compiler cycles. YMMV. Yes, I only let Emacs fix simple things like "text_io"; I still use proper line breaks and indenting as I'm typing new code; although Emacs does the indenting as well. -- -- Stephe