comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephe.Leake@nasa.gov>
Subject: Re: Case dependence and coding standards
Date: 05 Jun 2003 13:47:45 -0400
Date: 2003-06-05T18:03:58+00:00	[thread overview]
Message-ID: <u4r34h0vy.fsf@nasa.gov> (raw)
In-Reply-To: bbmskc$bc8lj$6@ID-175126.news.dfncis.de

Vinzent Hoefler <ada.rocks@jlfencey.com> 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



  reply	other threads:[~2003-06-05 17:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-03  5:05 Case dependence and coding standards Fionn mac Cuimhaill
2003-06-03 17:31 ` Robert A Duff
2003-06-03 17:46   ` Vinzent Hoefler
2003-06-03 19:04     ` Robert A Duff
2003-06-03 23:37       ` Randy Brukardt
2003-06-04  2:39         ` Wesley Groleau
2003-06-04 13:28           ` Georg Bauhaus
2003-06-04 15:44             ` Preben Randhol
2003-06-04 22:32             ` Wesley Groleau
2003-06-05 12:01               ` Georg Bauhaus
2003-06-05 15:36                 ` Preben Randhol
2003-06-05 17:41                   ` Wesley Groleau
2003-06-05 17:47                     ` Preben Randhol
2003-06-05 17:51                       ` Preben Randhol
2003-06-05 18:32                 ` Wesley Groleau
2003-06-06  8:58                   ` Georg Bauhaus
2003-06-07  0:53                     ` Wesley Groleau
2003-06-10 15:05                       ` Georg Bauhaus
2003-06-05 17:32               ` Wesley Groleau
2003-06-05 17:43                 ` Preben Randhol
2003-06-04  8:39       ` Vinzent Hoefler
2003-06-04 16:32         ` Stephen Leake
2003-06-05  1:27           ` Robert I. Eachus
2003-06-05  7:47           ` Vinzent Hoefler
2003-06-05 17:47             ` Stephen Leake [this message]
2003-06-05 19:43               ` Wesley Groleau
2003-06-06  9:27               ` Georg Bauhaus
2003-06-06 10:29                 ` Preben Randhol
2003-06-03 19:38   ` Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
2003-06-04 17:00 Lionel.DRAGHI
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox