comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: AWS Coding Styles (and about boring plain-linear text files in the end)
Date: Wed, 19 Jan 2011 11:04:42 +0100
Date: 2011-01-19T11:04:42+01:00	[thread overview]
Message-ID: <lf2fgnkh806s.lizpv3kuqh49$.dlg@40tude.net> (raw)
In-Reply-To: op.vpjtxhz8ule2fv@garhos

On Wed, 19 Jan 2011 10:28:19 +0100, Yannick Duchêne (Hibou57) wrote:

> Le Wed, 19 Jan 2011 10:13:34 +0100, Dmitry A. Kazakov  
> <mailbox@dmitry-kazakov.de> a écrit:
> 
>> On Wed, 19 Jan 2011 08:19:39 +0100, J-P. Rosen wrote:
>>
>>> I beg to (partially) disagree here: reading a newspaper has nothing to
>>> do with reading a program.
>>
>> Of course it does, because the process of reading is same.
> But the layout is not the same: you have longer “words” as you agreed  
> later, you have indent also.

That does not change the process of reading, which is a chemical reaction
in human body. The length of words may make this process slower or shorter,
less or more effective, but it cannot change the process.

>>> In programming, most identifiers are far longer than five characters,
>>> especially if you are use-phobic (hint, hint).
>>
>> Right, yet another argument for "use" against fully qualified names.
> These phobic people who like qualified names, also like renaming  
> declarations to provide shorter prefix, you know ;)

I know, they have an impression that ATIO.Put_Line is more readable than
just Put_Line. Of course the same package must be renamed to different
names in different parts of the program in order to further "improve"
"readability." (:-))

>> BTW, the argument to exactness works rather against you. Consider how texts
>> on mathematics are formatted. Formulae have always *shorter* lines than
>> plain texts, to be read "exactly."
> Reformulated: you suggest the more you have to care to each single part,  
> to shorter the line should be.

There is some optimal length, which could be directly derived from the
sight angle and the distance to the rendering surface. This is biologically
given.

> This could be confirmed by another common standard: one instruction per  
> line only (and I personally also try to do it “on expression per line  
> only” and use intermediate variable or constants for that purpose).

Yes, a good pick. Into the same basket: one variable declaration per line.
 
> May be we should distinguish two kind of line length: the one which is  
> measured in characters, and the one which is measured in semes ? (seme =  
> semantic unit). The length in semes is more meaningful.

There are differences in how chains of characters and chains of symbols are
recognized. Meaningful words are far easier to read. While reading known
words people actually read only prefixes and suffixes. The brain
automatically fills the gaps. Properly spelt words can be much longer than
arbitrary chains of symbols. BTW, this why graphical languages will never
make it, because written texts have the advantage of 10+ years of training
on perpetual daily reading, while arrows and blocks do not.

> What's the average  
> length in characters of a seme in a computer program source ? And what's  
> the average indent width ?

Indentation is a "semantic unit" in your classification.

> I feel we could agree we could go beyond 80 characters (seems OK). But 120  
> is too much. Well, let say 100 (cheese).

I stick to my 72.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2011-01-19 10:04 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17  5:07 AWS Coding Styles (and about boring plain-linear text files in the end) Yannick Duchêne (Hibou57)
2011-01-17  5:18 ` Yannick Duchêne (Hibou57)
2011-01-21  4:06   ` Yannick Duchêne (Hibou57)
2011-01-17  6:43 ` Shark8
2011-01-17 10:22   ` Yannick Duchêne (Hibou57)
2011-01-17 10:23 ` pascal.obry
2011-01-17 10:49   ` Simon Wright
2011-01-17 10:54     ` pascal.obry
2011-01-18 19:07   ` Florian Weimer
2011-01-18 19:47     ` Adam Beneschan
2011-01-18 20:44       ` Florian Weimer
2011-01-18 21:03         ` Adam Beneschan
2011-01-18 22:16       ` Yannick Duchêne (Hibou57)
2011-01-19  6:58         ` Simon Wright
2011-01-19  9:15           ` Yannick Duchêne (Hibou57)
2011-01-19 20:16             ` Simon Wright
2011-01-19 22:42               ` Peter C. Chapin
2011-01-19 22:21             ` Florian Weimer
2011-01-20  1:52             ` Stephen Leake
2011-01-18 20:23     ` Pascal Obry
2011-01-18 21:39       ` Georg Bauhaus
2011-01-18 22:13         ` Randy Brukardt
2011-01-19  0:47           ` Georg Bauhaus
2011-01-19  1:06             ` Yannick Duchêne (Hibou57)
2011-01-19  7:00               ` J-P. Rosen
2011-01-19  8:53                 ` Yannick Duchêne (Hibou57)
2011-01-19 10:04               ` Georg Bauhaus
2011-01-19 11:42                 ` Yannick Duchêne (Hibou57)
2011-01-19 13:17                   ` Georg Bauhaus
2011-01-19 21:56                     ` Yannick Duchêne (Hibou57)
2011-01-19 23:34                       ` Georg Bauhaus
2011-03-16 18:28                     ` Yannick Duchêne (Hibou57)
2011-03-16 20:13                       ` Shark8
2011-03-16 21:51                       ` Randy Brukardt
2011-03-16 22:01                         ` Yannick Duchêne (Hibou57)
2011-03-19  1:47                           ` Randy Brukardt
2011-03-16 19:59                     ` Yannick Duchêne (Hibou57)
2011-01-18 22:20       ` Yannick Duchêne (Hibou57)
2011-01-18 22:11     ` Yannick Duchêne (Hibou57)
2011-05-25 20:43   ` Yannick Duchêne (Hibou57)
2011-01-17 13:47 ` Bill Findlay
2011-01-17 14:02   ` Yannick Duchêne (Hibou57)
2011-01-17 21:12   ` Simon Wright
2011-01-18  8:03     ` Stephen Leake
2011-01-18 20:41       ` Simon Wright
2011-01-18  0:45   ` Adam Beneschan
2011-01-18  1:40     ` Bill Findlay
2011-01-19 11:12       ` Stephen Leake
2011-01-18  6:07     ` Yannick Duchêne (Hibou57)
2011-01-18  6:07     ` Yannick Duchêne (Hibou57)
2011-01-18  8:04     ` Stephen Leake
2011-01-18  9:11       ` pascal.obry
2011-01-19 11:17         ` Stephen Leake
2011-01-19 11:53           ` Yannick Duchêne (Hibou57)
2011-01-18  8:22     ` Dmitry A. Kazakov
2011-01-18  8:50     ` Georg Bauhaus
2011-01-18 14:20       ` sjw
2011-01-18 15:41         ` Adam Beneschan
2011-01-18  0:58 ` Adam Beneschan
2011-01-18  1:43   ` Bill Findlay
2011-01-18  6:10   ` Yannick Duchêne (Hibou57)
2011-01-18  7:02   ` Pascal Obry
2011-01-18  7:14     ` Thomas Løcke
2011-01-18  7:26     ` Yannick Duchêne (Hibou57)
2011-01-18 12:42     ` Peter C. Chapin
2011-01-18 21:09       ` Yannick Duchêne (Hibou57)
2011-01-18 22:01         ` Randy Brukardt
2011-01-18 22:35           ` Yannick Duchêne (Hibou57)
2011-01-18 23:37           ` tmoran
2011-01-20  2:14             ` Randy Brukardt
2011-01-18  8:06   ` Stephen Leake
2011-01-18  8:54     ` Georg Bauhaus
2011-01-18 15:45       ` Adam Beneschan
2011-01-18 22:03         ` Yannick Duchêne (Hibou57)
2011-01-19  7:19           ` J-P. Rosen
2011-01-19  9:07             ` Yannick Duchêne (Hibou57)
2011-01-19 13:31               ` J-P. Rosen
2011-01-20  1:53                 ` Stephen Leake
2011-01-19  9:13             ` Dmitry A. Kazakov
2011-01-19  9:28               ` Yannick Duchêne (Hibou57)
2011-01-19 10:04                 ` Dmitry A. Kazakov [this message]
2011-01-19 12:16                   ` Yannick Duchêne (Hibou57)
2011-01-24  5:13                   ` Yannick Duchêne (Hibou57)
2011-01-24  8:29                     ` Yannick Duchêne (Hibou57)
2011-01-19 13:39               ` J-P. Rosen
2011-01-19 14:20                 ` Dmitry A. Kazakov
2011-01-19 14:52                   ` J-P. Rosen
2011-01-19 15:25                     ` Dmitry A. Kazakov
2011-01-19 21:43                     ` Yannick Duchêne (Hibou57)
2011-01-19 22:20                       ` Dmitry A. Kazakov
2011-01-19 21:47                 ` Yannick Duchêne (Hibou57)
2011-01-21 19:17                   ` Robert Matthews
2011-01-21 19:54                     ` Yannick Duchêne (Hibou57)
2011-01-19 18:02             ` Jeffrey Carter
2011-01-19 11:21           ` Stephen Leake
2011-01-19 13:32             ` Yannick Duchêne (Hibou57)
replies disabled

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