Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.lang.c > #391500

Re: Which code style do you prefer the most?

Path csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: Which code style do you prefer the most?
Date Sat, 22 Mar 2025 06:49:12 -0700
Organization A noiseless patient Spider
Lines 91
Message-ID <86y0wxkwfb.fsf@linuxsc.com> (permalink)
References <vpkmq0$21php$1@dont-email.me> <vpn8vs$2jmv1$1@dont-email.me> <vpn92i$86q$1@reader1.panix.com> <vpnfmn$2ksdj$1@dont-email.me> <vpni33$2ld5k$1@dont-email.me> <vpnrld$2mq8h$2@dont-email.me> <vpourn$30a9h$1@dont-email.me> <vpq1es$35inm$1@dont-email.me> <vpr019$3b2ld$1@dont-email.me> <20250228144442.00002037@yahoo.com> <868qpnw2sn.fsf@linuxsc.com> <gRjxP.122767$FVcd.55407@fx10.iad> <8734ftn1fb.fsf@nosuchdomain.example.com> <8634f6n2k8.fsf@linuxsc.com> <_neDP.1161502$_N6e.249216@fx17.iad> <SpeDP.1161503$_N6e.551434@fx17.iad>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Injection-Date Sat, 22 Mar 2025 14:49:15 +0100 (CET)
Injection-Info dont-email.me; posting-host="8c00933fd2fdb83fc14e0f99a9437a0f"; logging-data="101837"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+D692B7QUPSOd/CYwYYdny3lOZpFcdFtk="
User-Agent Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock sha1:3I1BXECKcYv4AqjuTxNYr83eBKI= sha1:1qwvcSHjDYF65aR8mvh9TbqXJ7s=
Xref csiph.com comp.lang.c:391500

Show key headers only | View raw


scott@slp53.sl.home (Scott Lurndal) writes:

> scott@slp53.sl.home (Scott Lurndal) writes:
>
>> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>>
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>>
>>>> IBM developed 80-column cards, with the same overall size, in
>>>> the late 1920s.  Apparently 80 just happened to be the number
>>>> of rectangular holes that could reasonably be accommodated
>>>> [...]
>>>
>>> We don't know that.  The same size might have accommodated 85
>>> columns, but was revised down to 80 for other reasons.  Or the
>>> same size might have accommodated only 77 columns, but it was
>>> discovered that 80 columns could work if a different card
>>> material was used.  The form factor was one constraint, but
>>> not the only constraint, and not the only consideration.
>>
>> I have a hardcover book about punched cards somewhere
>> in storage - came from the Burroughs library when they
>> closed it.    I'll try to dig it out if I get a chance.
>>
>> Casey, Robert S. and Perry, James W. Editors
>> Punched Cards - Their application to science and industry
>
> https://archive.org/stream/
>     PunchedCardsTheirApplicationsToScienceAndIndustry/
>     Punched_cards-their_applications_to_science_and_industry_djvu.txt

A remarkable document.  Thank you for the link.

I perused it only briefly before deciding that the 600+ pages
(or is it 900+ pages?) had a lot more material than what I
was willing to tackle.

Thinking it might be interesting, I gathered some information and
statistics from the contents, in particular having to do with
line widths.  After eliminating lines that looked like overly
long gibberish (hundreds or thousands of characters), lines that
looked like they were meant to be set in a smaller font (mostly
footnotes and figure captions), and discarding lines shorter than
66 characters (because they are probably short lines at the end
of a paragraph), I came up with these results.

    17308 lines, ranging from 66 to 91 characters
    average:  73.95 characters
    std dev:   3.48 characters


  length    percent  prcntile
  ------    -------  --------
      66       1.01      1.01
      67       1.63      2.64
      68       2.62      5.26
      69       4.06      9.32
      70       6.07     15.39
      71       8.35     23.75
      72      10.62     34.37
      73      11.97     46.33
      74      11.88     58.21
      75      11.36     69.57
      76       9.58     79.15
      77       6.75     85.90
      78       4.88     90.78
      79       3.09     93.87
      80       2.19     96.06
      81       1.39     97.45
      82       0.91     98.35
      83       0.69     99.05
      84       0.47     99.52
      85       0.21     99.73
      86       0.13     99.86
      87       0.07     99.93
      88       0.06     99.99
      91       0.01    100.00


Notes:

There were only two lines of length 91.  I couldn't tell if they
were distinct in some way from the other lines (other than being
longer).

In some cases the line widths are probably too high, because of
html-isms like &lt; and so forth.

I expect the book uses proportionally spaced fonts rather than
fixed-width fonts, but the contents are part of a <pre></pre>
block so that's just a guess.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Which code style do you prefer the most? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-03-21 02:41 -0700
  Re: Which code style do you prefer the most? scott@slp53.sl.home (Scott Lurndal) - 2025-03-21 14:06 +0000
    Re: Which code style do you prefer the most? scott@slp53.sl.home (Scott Lurndal) - 2025-03-21 14:08 +0000
      Re: Which code style do you prefer the most? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-03-22 06:49 -0700
        Re: Which code style do you prefer the most? scott@slp53.sl.home (Scott Lurndal) - 2025-03-22 14:32 +0000
          Re: Which code style do you prefer the most? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-03-22 12:45 -0700
  Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?] Jakob Bohm <egenagwemdimtapsar@jbohm.dk> - 2025-04-01 05:46 +0200
    Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?] Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-04-01 09:46 +0200
    Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?] scott@slp53.sl.home (Scott Lurndal) - 2025-04-01 13:52 +0000
      Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?] Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-04-01 19:11 +0200
        Re: 80 char lines and holerith cards [Was:Which code style do you prefer the most?] scott@slp53.sl.home (Scott Lurndal) - 2025-04-01 17:20 +0000

csiph-web