comp.lang.ada
 help / color / mirror / Atom feed
From: "Mike Bandor" <mbandor@satx.rr.com>
Subject: Re: ISO Studies of underscores vs MixedCase in Ada or C++
Date: Mon, 29 Sep 2003 23:19:15 GMT
Date: 2003-09-29T23:19:15+00:00	[thread overview]
Message-ID: <T53eb.143304$KW1.83619@twister.austin.rr.com> (raw)
In-Reply-To: 863cefjy6l.fsf@strudel.futureapps.de

I was once told by a TRW employee that on one particular project they had a
coding standard that used underscores in lieu of running the names together.
One of their "measures" of readability was to take copy of the code, remove
the underscores, and run it through a spell checker.  If it made it through
the spell checker, it was deemed "readable".


-- 
Mike Bandor, Software Engineer, BS-CS/SE
Ada83, Ada95, C++, Delphi, JavaScript, WinHelp, PL/SQL, SQL, JOVIAL, MASM,
Java, HTML
Creator of MEGATERMS, Military Terms & Acronyms
http://home.satx.rr.com/bandor/megaterm/megaterm.htm

"Georg Bauhaus" <georg@strudel.futureapps.de> wrote in message
news:863cefjy6l.fsf@strudel.futureapps.de...
> >>>>> "Frank" == Frank J Lhota <NOSPAM.lhota.adarose@verizon.net> writes:
>
> : Since identifiers are generally phrases (nown phrases
> : for objects, verb phrases for procedures) and phrases often consist
> : of more than one word, I find the use of underscores to be quite
> : natural.
>
> But we should, I think, consider non-phrases or almost-non-phrases
> being used as identifiers, and "juxtapositions" of identifiers.  The
> isolated identifiers might be shorter and thus more easily broken
> into parts during the "reading process".
>
>   theFools(42);
>
>   the_fools (42);
>
>   the_Fools(42);
>
>   The_Fools (42);
>
> ...
>
>   y := doYouMind.ifI();
>
>   y := do_you_mind.if_i ();
>
>   y := do_You_Mind.if_I();
>
>   y := Do_You_Mind.If_I ();
>
>
>   takeAction(doYouMind.ifI(openTheWindow));
>
>   take_action (do_you_mind.if_i (open_the_window));
>
>   take_Action (do_You_Mind.if_I(open_The_Window));
>
>   Take_Action (Do_You_Mind.If_I (Open_The_Window));
>
> So in context, your "Shakespearean" argument might still apply,
> even if short identifiers are readable in dense mixed case?
>
> : There is an easy way to test which convention is more readable. Here
> : is one of Shakespeare's sonnets rendered in the mixed case format:
>
> :     FromFairestCreaturesWeDesireIncrease,
>
>
> Also, looking closely at letters, fonts certainly do matter.
> In a string such as "glubf()" it might or might not be easy
> to distinguish the two characters 'f' and '('. It depends on
> how ink would be spread, or on how pixels would appear on some
> display screen. You can see this comparing foo(a) and oof(a),
> using different fonts for the letters and symbols.
>
> Georg





  reply	other threads:[~2003-09-29 23:19 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-26  4:32 ISO Studies of underscores vs MixedCase in Ada or C++ Andy Glew
2003-09-26  5:43 ` Attila Feher
2003-09-26  5:54 ` Jakob Bieling
2003-09-26  7:11   ` Matt Gregory
2003-09-26 17:12     ` Matt Gregory
2003-09-26 18:25       ` tmoran
2003-09-26 18:41       ` Michael Feathers
2003-09-26 13:43   ` Steve
2003-09-26  7:27 ` Ludovic Brenta
2003-09-26 15:40   ` Frank J. Lhota
2003-09-27 11:18     ` Mad Hamish
2003-09-28  9:26       ` Martin Dowie
2003-09-29 17:34     ` Georg Bauhaus
2003-09-29 23:19       ` Mike Bandor [this message]
2003-10-03 11:53         ` Spell-checking source code (Was: ISO Studies of underscores...) Leif Roar Moldskred
2003-10-03 14:13           ` William
2003-10-03 14:20             ` William
2003-10-03 18:39               ` Leif Roar Moldskred
2003-10-03 22:04                 ` Kevin Morenski
2003-10-04  9:49                   ` Leif Roar Moldskred
2003-10-05 15:16                     ` William
2003-10-06 12:58                   ` Robert Stankowic
2003-10-03 19:48               ` Jim Rogers
2003-10-05 15:08                 ` William
2003-10-04  3:07           ` Steve
2003-10-04  9:44             ` Leif Roar Moldskred
2003-10-04 10:41               ` Jakob Bieling
2003-10-04 18:29                 ` Leif Roar Moldskred
2003-10-04 19:06                   ` Jakob Bieling
2003-10-07 18:56                     ` Spell-checking source code Jacob Sparre Andersen
2003-10-12  8:07                       ` Jakob Bieling
2003-10-14 13:41                         ` Jacob Sparre Andersen
2003-10-14 15:30                           ` Jakob Bieling
2003-10-14 15:50                             ` Peter Bushell
2003-10-14 16:46                               ` Jakob Bieling
2003-10-14 17:34                                 ` Alan Balmer
2003-10-15  5:34                                   ` Jakob Bieling
2003-10-15 15:02                                     ` Alan Balmer
2003-10-16  8:57                                     ` Frank Schmitt
2003-10-20  7:42                                 ` Jacob Sparre Andersen
     [not found]                             ` <h51pov4t28ujj3bqlareldhsiie0m4ljre@4ax.com>
2003-10-15  5:43                               ` Jakob Bieling
2003-10-20  7:44                             ` Jacob Sparre Andersen
2003-10-24 11:55                               ` Stephen Baynes.
2003-10-07 18:47           ` Jacob Sparre Andersen
2003-10-10 11:52       ` ISO Studies of underscores vs MixedCase in Ada or C++ Stephen Baynes.
2003-10-13  9:32         ` Georg Bauhaus
2003-09-26 16:22 ` Randy King
2003-09-26 16:51   ` Hyman Rosen
2003-09-26 18:02     ` Mike Smith
2003-09-26 19:05       ` Hyman Rosen
2003-09-26 19:56       ` Default User
2003-09-26 17:24 ` Jack Klein
2003-09-26 17:44   ` Programmer Dude
2003-09-27 11:44     ` Gerry Quinn
2003-09-26 19:57   ` Default User
2003-09-27 16:35   ` Richard Heathfield
2003-09-28  0:23     ` Ian Woods
2003-09-28 10:17   ` James Dow Allen
2003-10-04  8:45     ` Matt Gregory
2003-10-04 18:41     ` Default User
2003-10-04 22:13       ` Frank J. Lhota
2003-10-20  7:40     ` Jacob Sparre Andersen
2003-10-21  1:08       ` Wes Groleau
2003-10-02  4:20 ` Peter Ammon
2003-10-02 14:35   ` Programmer Dude
2003-10-03 22:42     ` Peter Ammon
2003-10-04  0:10       ` Wes Groleau
2003-10-04  1:03         ` Peter Ammon
2003-10-04  8:48       ` Matt Gregory
2003-10-04 10:19         ` Martin Dowie
2003-10-04 12:13           ` Corey Murtagh
2003-10-04 13:29           ` Georg Bauhaus
2003-10-04 22:15             ` John W. Krahn
2003-10-04 12:28         ` CBFalconer
2003-10-06  6:02       ` Dave Thompson
2003-10-08 16:22       ` Programmer Dude
2003-10-28  1:16       ` Gene Wirchenko
2003-10-28  3:01         ` Oplec
2003-10-28  3:29         ` Dave Vandervies
2003-10-08 15:07 ` Isaac Gouy
  -- strict thread matches above, loose matches on Subject: below --
2003-10-02  9:36 Lionel.DRAGHI
2003-10-02 11:37 ` Peter Hermann
replies disabled

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